/* Relay only: supplied colors and controls, scoped over legacy Relay styles. */
.relay-mode{--relay-yellow:#D6FF35;--relay-yellow-active:#C5EF2C;--relay-green-light:#213A2C;--relay-dark:#081C15;--relay-green:#10251C;--relay-border:#72967A;--relay-text-dark:#17200A}
.relay-panel.relay-mode .relay-points button.relay-action-button{background:var(--relay-yellow);color:var(--relay-text-dark);border:1px solid #B5DA22;border-radius:14px;min-height:64px;padding:14px 12px;font-size:16px;font-weight:700;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;transition:background .15s ease,transform .1s ease}
.relay-panel.relay-mode .relay-points button.relay-action-button:active{background:var(--relay-yellow-active);transform:scale(.98)}
.relay-panel.relay-mode .relay-points button.relay-action-button:disabled{background:#536452;color:#B5C4B5;border-color:#536452;cursor:not-allowed}
.relay-panel.relay-mode .relay-points.relay-single-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%}
.relay-panel.relay-mode .relay-points button.relay-single-start,.relay-panel.relay-mode .relay-points button.relay-single-end{background:var(--relay-yellow);color:var(--relay-text-dark);min-height:78px;padding:12px 8px;font-size:16px;font-weight:700;text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center}
.relay-panel.relay-mode .relay-button-subtitle{display:block;margin-top:5px;font-size:12px;font-weight:500}
.relay-panel.relay-mode .relay-points.relay-point-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%}
.relay-panel.relay-mode .relay-points button.relay-point-button{background:var(--relay-green);color:#FFFFFF;border:1px solid var(--relay-border);border-radius:14px;min-height:72px;padding:12px 8px;font-size:14px;font-weight:700;text-align:center;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.relay-panel.relay-mode .relay-points button.relay-point-button.is-selected{background:var(--relay-yellow);color:var(--relay-text-dark);border-color:var(--relay-yellow)}
.relay-panel.relay-mode .relay-points button.relay-point-button.is-registered:not(.is-selected){border-color:#91BD76}
.relay-panel.relay-mode #relayConfirm.relay-register-point{width:100%;background:var(--relay-yellow);color:var(--relay-text-dark);border:1px solid #B5DA22;border-radius:14px;min-height:72px;padding:14px;font-size:16px;font-weight:700;cursor:pointer;touch-action:manipulation}
.relay-panel.relay-mode .relay-use-single-time{width:100%;background:var(--relay-yellow);color:var(--relay-text-dark);border:1px solid #B5DA22;border-radius:14px;min-height:56px;padding:12px;font-size:16px;font-weight:700;cursor:pointer;touch-action:manipulation}
.relay-panel.relay-mode .relay-reset-points{width:100%;background:#213A2C;color:var(--relay-yellow);border:1px solid #688E70;border-radius:14px;min-height:56px;padding:12px;font-size:15px;font-weight:700;cursor:pointer;touch-action:manipulation}
.relay-panel.relay-mode .relay-next-race{width:100%;background:#284034;color:#FFFFFF;border:1px solid #72967A;border-radius:14px;min-height:56px;padding:12px;font-size:15px;font-weight:700;cursor:pointer;touch-action:manipulation}
.relay-panel.relay-mode #relayResetPoints{margin-top:10px}
@media(max-width:480px){.relay-panel.relay-mode .relay-points button.relay-point-button{font-size:13px;min-height:66px}.relay-panel.relay-mode .relay-points button.relay-action-button{font-size:15px}.relay-panel.relay-mode .relay-points button.relay-single-start,.relay-panel.relay-mode .relay-points button.relay-single-end{min-height:72px;font-size:15px}.relay-panel.relay-mode #relayConfirm.relay-register-point{font-size:15px}}

.relay-mode .relay-flow-actions{display:grid;gap:10px;margin:18px 0}.relay-mode .relay-flow-actions p{margin:0;font-size:.9rem;color:#B5C4B5}.relay-mode #relayAnalyze:disabled{background:#536452;color:#B5C4B5;border-color:#536452;opacity:.65;cursor:not-allowed}

.relay-mode button:focus-visible{outline:3px solid var(--relay-yellow);outline-offset:3px}.relay-mode button:disabled{opacity:.55;cursor:not-allowed}
.relay-mode .relay-operation-dialog{width:min(480px,calc(100% - 28px));max-height:85vh;overflow:auto;background:var(--relay-green);color:#fff;padding:20px;border:1px solid var(--relay-border);border-radius:16px}.relay-mode .relay-operation-dialog::backdrop{background:#000a}.relay-mode .relay-dialog-actions{display:grid;gap:10px}.relay-mode .relay-operation-dialog h2{margin:0 0 12px;font-size:1.2rem}.relay-mode .relay-operation-dialog p{font-size:.9rem;line-height:1.6}
/* Relay submode selection and isolated marker workflow. */
.relay-panel.relay-mode .relay-mode-select{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:24px 0}
.relay-panel.relay-mode .relay-mode-select h2{grid-column:1/-1}
.relay-panel.relay-mode .relay-mode-card{display:flex;flex-direction:column;gap:10px;text-align:left;background:#183628;color:#fff;border:1px solid #72967A;border-radius:18px;padding:24px 18px;min-height:180px;touch-action:manipulation}
.relay-mode .relay-mode-card strong{font-size:23px;color:#D6FF35}.relay-mode .relay-mode-card span{color:#B9D0C0;font-size:16px}
.relay-panel.relay-mode .marker-panel{background:#081C15;color:#fff}.relay-mode .marker-panel input,.relay-mode .marker-panel select{font-size:16px;min-height:44px}.relay-mode .marker-panel input[type=checkbox]{min-height:24px;width:24px;vertical-align:middle}
.relay-mode .marker-panel label{display:block;color:#B9D0C0}.relay-mode .marker-panel details{margin:18px 0;padding:16px;border:1px solid #72967A;border-radius:14px}.relay-mode .marker-panel summary{min-height:44px;font-size:17px;cursor:pointer;touch-action:manipulation}.relay-mode .marker-panel button{touch-action:manipulation}.relay-mode .marker-panel video{display:block;width:100%;height:100%;object-fit:contain}.relay-mode .marker-panel .video-stage{min-width:100%;min-height:100%}.relay-mode .marker-panel .video-wrap{height:100%;overflow:auto}.relay-mode .marker-panel .relay-video-box{height:clamp(220px,45vh,440px);overflow:hidden}.relay-mode .marker-metric{display:flex;flex-direction:column;padding:18px;background:#183628;border-radius:14px;gap:8px}.relay-mode .marker-metric strong{font-size:30px;color:#D6FF35}.relay-mode .marker-metric span{font-size:16px;color:#B9D0C0}.relay-mode .marker-advice{display:block;font-size:22px;color:#D6FF35;padding:14px 0}.relay-mode .marker-note{color:#B9D0C0;font-size:15px;line-height:1.6}.relay-mode #markerNextDialog label{display:block;margin:16px 0}.relay-mode .marker-panel .relay-point-grid{margin:14px 0}.relay-mode #markerRegister,.relay-mode #markerResetPoints,.relay-mode #markerNext,.relay-mode #markerAnalyze{margin-top:12px}
@media(max-width:480px){.relay-panel.relay-mode .relay-mode-select{grid-template-columns:1fr}.relay-panel.relay-mode .marker-panel .relay-metrics{grid-template-columns:1fr}.relay-mode .marker-metric strong{font-size:29px}}
.relay-panel.relay-mode .marker-panel .relay-action-button,.relay-panel.relay-mode .marker-panel .relay-register-point{width:100%;background:#D6FF35;color:#17200A;border:1px solid #B5DA22;border-radius:14px;min-height:64px;padding:14px;font-size:16px;font-weight:700;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.relay-panel.relay-mode .marker-panel .relay-register-point{min-height:72px}.relay-panel.relay-mode .marker-panel .relay-action-button:active,.relay-panel.relay-mode .marker-panel .relay-register-point:active{background:#C5EF2C}.relay-panel.relay-mode .marker-panel .relay-action-button:disabled,.relay-panel.relay-mode .marker-panel .relay-register-point:disabled{background:#536452;color:#B5C4B5}
.relay-panel.relay-mode .marker-panel .relay-points button.relay-point-button{font-size:15px;overflow-wrap:anywhere}.relay-panel.relay-mode .marker-panel .relay-zoom-controls{grid-template-columns:repeat(4,minmax(0,1fr))}.relay-mode #markerSeek,.relay-mode #markerClock{grid-column:1/-1}.relay-mode #markerSeek{width:100%;min-height:44px;touch-action:pan-x}.relay-panel.relay-mode .marker-panel input:not([type=checkbox]),.relay-panel.relay-mode .marker-panel select{width:100%;min-width:0;border:1px solid #72967A;border-radius:10px;background:#10251C;color:#fff;padding:10px;font-size:16px}.relay-panel.relay-mode .marker-panel input[type=file]{white-space:normal}.relay-panel.relay-mode .marker-panel .marker-metric strong{font-size:30px}

/* Marker evaluation v1.1: scoped entirely to the marker panel. */
.relay-panel.relay-mode .marker-panel .marker-visual-input{border:1px solid #72967A;border-radius:14px;padding:14px;grid-column:1/-1;min-width:0;background:#183628}.marker-panel .marker-visual-input legend{color:#D6FF35;font-size:17px;font-weight:700}.marker-panel .marker-feet-step{display:grid;grid-template-columns:70px minmax(0,1fr) 70px;gap:8px;margin-top:6px}.relay-panel.relay-mode .marker-panel .marker-feet-step button{background:#D6FF35;color:#17200A;min-height:56px;font-size:16px;border:1px solid #B5DA22;border-radius:12px;touch-action:manipulation}.marker-panel .marker-flight-card{padding:16px;background:#183628;border:1px solid #72967A;border-radius:14px}.marker-panel .marker-flight-card strong{font-size:20px;color:#D6FF35}.marker-panel .marker-cue-table{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;background:#183628;padding:12px;border-radius:12px}.marker-panel .marker-cue-table p{margin:6px;font-size:16px}
/* Marker v1.2: conclusion first, independent coach hypothesis. */
.relay-panel.relay-mode .marker-panel .marker-main-conclusion{font-size:clamp(24px,5vw,32px);line-height:1.4;padding:18px;background:#183628;border-radius:14px}.marker-panel .marker-summary{background:#183628;border:1px solid #72967A;border-radius:14px;padding:16px;margin:14px 0}.marker-panel .marker-summary p{font-size:17px;line-height:1.5}.marker-panel .marker-coach-plan{border:1px solid #72967A;border-radius:14px;padding:16px;margin:18px 0;min-width:0;background:#183628}.marker-panel .marker-coach-plan legend{color:#D6FF35;font-size:18px;font-weight:700}.marker-panel .marker-coach-plan label{margin:12px 0}.relay-panel.relay-mode .marker-panel textarea{width:100%;min-height:96px;font-family:inherit;font-size:16px;color:#fff;background:#10251C;border:1px solid #72967A;border-radius:10px;padding:12px}.marker-panel .marker-evaluation-details summary{font-size:17px;min-height:48px}

/* Marker race operations only. */
.relay-panel.relay-mode .marker-panel [hidden]{display:none!important}
.marker-panel .marker-race-actions{margin-top:24px;padding:16px;background:#183628;border:1px solid #72967A;border-radius:14px}
.marker-panel .marker-race-buttons{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:16px}
.relay-panel.relay-mode .marker-panel .marker-race-buttons button{width:100%;height:72px;min-height:72px;padding:12px;font-size:17px;font-weight:700;border-radius:14px;touch-action:manipulation}
.relay-panel.relay-mode .marker-panel .marker-race-buttons #markerSave{background:#D6FF35;color:#17200A;border:1px solid #B5DA22}
.relay-panel.relay-mode .marker-panel .marker-race-buttons #markerNext{background:#213A2C;color:#fff;border:1px solid #72967A}
.relay-panel.relay-mode .marker-panel .marker-race-buttons .marker-history-button{background:transparent;color:#fff;border:1px solid #72967A}

.marker-panel .marker-observation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.marker-panel .marker-observation-card{padding:16px;border:1px solid #72967A;background:#183628;border-radius:14px;min-width:0}.marker-panel .marker-observation-card small{display:block;color:#B9D0C0;font-size:14px}.marker-panel .marker-observation-card strong{display:block;font-size:clamp(18px,4vw,26px);overflow-wrap:anywhere;margin-top:8px}.marker-panel .marker-share-info{padding:16px;background:#183628;border:1px solid #72967A;border-radius:14px;min-width:0}.marker-panel .marker-share-info label{margin:10px 0}.marker-panel #markerVideoExport{margin-top:20px}.marker-panel #markerVideoExport button{margin:8px 0;width:100%;min-height:64px}

/* Marker-only offset scenario */
.relay-mode .marker-offset-flow{margin-bottom:24px}.relay-mode .marker-offset-card{background:#183628;border:1px solid #72967A;border-radius:14px;padding:16px;margin:12px 0}.relay-mode .marker-offset-card strong{display:block;font-size:26px;color:#D6FF35}.relay-mode .marker-offset-card p{font-size:16px;line-height:1.5}.relay-mode .marker-offset-adjust{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}.relay-mode .marker-offset-adjust label{grid-column:1/-1}.relay-mode .marker-offset-adjust input{width:100%;min-width:0;font-size:20px;text-align:center;touch-action:manipulation}
