:root {
  font-size:14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #eef6ff;
  background: #041321;
  font-synthesis: none;
  --blue: #38a6ff;
  --muted: #9bb5cb;
  --panel: rgba(5, 25, 48, .78);
  --line: rgba(172, 217, 255, .16);
}
.live-overview { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 28px; padding:16px 18px; margin:12px 0; border:1px solid #3099c777; border-radius:16px; background:#0d2d43; }
.live-progress-heading { display:flex; align-items:center; gap:18px; }
.live-progress-heading strong { font-size:1rem; }
.live-position { display:block; color:var(--muted); margin-top:6px; }
.live-overview #processing progress { display:block; margin:10px 0 0; height:5px; }
.analysis-shell .live-overview #match-results { display:block; margin:0; padding:0; background:none; border:0; min-width:130px; align-self:center; }
.live-score { display:flex; align-items:center; justify-content:flex-end; gap:15px; text-align:center; }
.live-score small { display:block; max-width:130px; overflow:hidden; text-overflow:ellipsis; }
.live-score strong { font-size:2rem; line-height:1.15; }
.live-score>span { color:var(--muted); }
.live-overview .analysis-launch { grid-column:1/-1; margin:0; padding:0; display:block; border:0; }
.live-overview .analysis-launch .form-actions { margin:0; gap:8px; }
.live-overview[data-running="true"] .analysis-launch { grid-column:2; justify-self:end; }
.live-overview[data-running="true"] .analysis-launch [data-view-results] { padding:0; background:none; border:0; color:var(--muted); font-size:.8rem; }
.live-discrepancy { color:#ffd596; font-size:.75rem; }
#kit-frame { width:100%; max-width:640px; display:block; margin:10px 0; cursor:crosshair; }
.kit-swatch { display:inline-flex; align-items:center; gap:8px; margin:8px 20px 12px 0; }
.kit-swatch i { display:inline-block; width:28px; height:28px; border:1px solid #fff8; border-radius:8px; }
#clip-list { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
#clip-answer { display:grid; gap:10px; }
.video-stage { position:relative; }
.tracking-overlay { position:absolute; inset:0; height:100%; width:100%; pointer-events:none; }
@media(max-width:600px){.live-overview{gap:10px;padding:12px}.live-progress-heading{align-items:flex-start;flex-direction:column;gap:7px}.live-score{gap:8px}.live-score small{max-width:75px}}
/* Incident workspace: one mounted player, shared-axis lanes, independent review panel. */
#notice:not(:empty) { position:fixed; top:12px; left:50%; transform:translateX(-50%); z-index:100; max-width:90vw; padding:14px 24px; background:#702b36; color:white; border-radius:12px; }
.setup-card { max-width:880px; margin:auto; }
.setup-card form, #incident-form, #run-form { display:grid; gap:15px; }
.game-list { display:grid; gap:12px; }
.game-entry { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px; background:#102c43; border:1px solid var(--line); border-radius:14px; color:inherit; text-align:left; }
.game-entry small, .incident-row small { display:block; color:var(--muted); margin-top:5px; }
.analysis-shell { max-width:1600px; margin:auto; }
.next-action { align-items:center; }
.next-action p { margin:6px 0; }
.next-action.busy { border:1px solid #3ab7ff; background:#0e3652; }
.next-action.busy strong::before { content:'● '; color:#55c8ff; }
progress { width:100%; height:8px; accent-color:#55c8ff; }
.video-panel { background:#02070e; margin-top:16px; }
.video-panel video { width:100%; max-height:60vh; min-height:200px; display:block; aspect-ratio:16/9; background:#02070e; object-fit:contain; }
.video-meta { align-items:center; flex-wrap:wrap; gap:12px; }
.video-meta label { display:flex; align-items:center; gap:8px; margin:0; }
input[type=checkbox] { width:auto; accent-color:#5dcaff; }
.multi-timeline { margin:18px 0 26px; border:1px solid var(--line); border-radius:14px; background:#071a2a; }
.timeline-tools { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px; flex-wrap:wrap; }
.timeline-tools h3 { margin:0 0 6px; }
.timeline-tools small { color:var(--muted); }
.timeline-tools details { position:relative; }
#row-options { position:absolute; right:0; top:25px; z-index:8; width:240px; max-height:360px; overflow:auto; background:#112a40; padding:18px; border:1px solid var(--line); border-radius:10px; }
#row-options label { display:block; margin:7px 0; }
#timeline-scroll { overflow:auto; padding:0 0 10px; max-height:450px; }
.event-lane, .lane-axis { display:grid; grid-template-columns:165px 1fr; height:57px; border-top:1px solid #173046; }
.lane-axis { height:32px; color:var(--muted); font-size:11px; position:sticky; top:0; z-index:7; background:#0c2133; }
.lane-axis>span { position:sticky; left:0; background:#0c2133; z-index:5; padding:8px 12px; }
.lane-label { position:sticky; left:0; z-index:5; background:#0c2133; padding:10px 12px; border-right:1px solid #274359; }
.lane-label strong { font-size:13px; display:block; }
.lane-label small { color:var(--muted); font-size:10px; }
.lane-track { position:relative; margin-right:26px; }
.axis-tick { position:absolute; top:8px; transform:translateX(-50%); white-space:nowrap; }
.axis-tick:first-child { transform:none; }
.lane-coverage { position:absolute; height:100%; background:rgba(61,162,216,.10); border-right:1px solid #2d6381; }
.event-marker { position:absolute; top:16px; transform:translateX(-50%); min-width:23px; height:25px; padding:0 4px; border-radius:6px; font-size:11px; color:#5dcaff; border:2px solid currentColor; background:#0b2235; z-index:3; }
.event-marker.confirmed, .event-marker.corrected { background:#5dcaff; border-color:#5dcaff; color:#031423; }
.event-marker.away { color:#cf9dff; }
.event-marker.away.confirmed, .event-marker.away.corrected { color:#190a2e; background:#cf9dff; border-color:#cf9dff; }
.event-marker.unknown { border-color:#c4cbd2; }
.event-marker.deferred, .event-marker.suppressed { border-style:dashed; opacity:.6; }
.event-marker:focus-visible { outline:3px solid white; outline-offset:3px; z-index:6; }
.lane-playhead { position:absolute; top:0; height:100%; width:1px; background:#ffedaa; pointer-events:none; z-index:4; }
.period-boundary { position:absolute; height:100%; border-left:1px dashed #648299; }
.event-span { position:absolute; top:22px; height:10px; background:#5dcaff55; }
.event-span.away { background:#cf9dff55; }
.workspace-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(320px,1fr); gap:24px; }
#tab-content, #evidence-panel { padding:20px; background:#091c2de8; border-radius:16px; border:1px solid var(--line); min-width:0; }
#tab-content h3, #evidence-panel h3 { margin-top:0; }
#evidence-panel { align-self:start; }
.incident-row { display:grid; grid-template-columns:90px 12px 1fr auto; align-items:center; width:100%; gap:12px; text-align:left; color:inherit; background:transparent; border:0; border-bottom:1px solid var(--line); padding:16px 0; }
.incident-row:hover { background:#14324a; }
.incident-row small { font-size:11px; }
.team-dot { height:10px; width:10px; border-radius:50%; background:#5dcaff; }
.team-dot.away { background:#cf9dff; }
.team-dot.unknown { background:#899ba9; }
.evidence-actions { display:flex; gap:8px; flex-wrap:wrap; }
.evidence-image { width:100%; border-radius:8px; }
pre { white-space:pre-wrap; overflow-wrap:anywhere; background:#020d17; padding:12px; border-radius:8px; font-size:11px; max-height:300px; overflow:auto; }
.stat-table>div { display:grid; grid-template-columns:1fr 100px 100px; }
#calibration-canvas { width:100%; background:#01070e; aspect-ratio:16/9; cursor:crosshair; touch-action:none; }
#calibration-canvas[hidden] { display:none; }
.calibration-setup { display:grid; gap:12px; }
.calibration-setup ol { padding-left:22px; line-height:1.7; margin:0; }
.score-crop-previews { display:flex; gap:16px; flex-wrap:wrap; }
.score-crop-previews canvas { display:block; width:160px; height:80px; border:1px solid var(--line); background:#0c2133; margin-top:6px; }
#ocr-readiness strong { color:#ffda92; }
summary { cursor:pointer; padding:10px 0; }
button:disabled { opacity:.5; cursor:not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline:2px solid #80d6ff; outline-offset:3px; }
@media(max-width:1000px) { .workspace-grid { grid-template-columns:1fr; } .shell { padding:18px; } .game-entry { flex-wrap:wrap; } .incident-row { grid-template-columns:70px 8px 1fr; } .incident-row>.pill { grid-column:3; justify-self:start; } }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #041321; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.landing {
  min-height: 100vh;
  background: linear-gradient(90deg, rgba(2, 14, 27, .05) 0 48%, rgba(2, 14, 27, .82) 78%, #031222 100%), url('/Background.png') center left / cover no-repeat fixed;
  display: flex;
  justify-content: flex-end;
  padding: clamp(24px, 5vw, 76px) clamp(18px, 4vw, 70px);
}
.hero-panel { width: min(560px, 40vw); min-width: 360px; align-self: center; }
.eyebrow { color: #70c4ff; text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 5vw, 5.2rem); line-height: .95; margin: 16px 0; letter-spacing: -.06em; }
.hero-copy { max-width: 38rem; color: #b9d0e2; font-size: 1.05rem; line-height: 1.6; }
.menu-card, .app-card { background: var(--panel); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 22px 70px rgba(0,0,0,.36); backdrop-filter: blur(18px); }
.menu-card { margin-top: 32px; padding: 12px; }
.menu-btn { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 17px 18px; color: #f2f8ff; border: 0; border-radius: 17px; background: transparent; text-align: left; }
.menu-btn:hover { background: rgba(64, 171, 255, .12); }
.menu-btn.primary { background: linear-gradient(120deg, #2293ed, #67c8ff); color: #031426; font-weight: 800; }
.menu-btn small { color: inherit; opacity: .68; display: block; margin-top: 3px; font-weight: 500; }
.arrow { font-size: 1.4rem; }
.status-line { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .8rem; padding: 14px 18px 9px; }
.shell { min-height: 100vh; padding: 30px clamp(18px, 5vw, 80px); background: radial-gradient(circle at 10% 0%, #0b3151, #041321 44%); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 28px; }
.brand { color: #fff; font-weight: 850; letter-spacing: -.03em; font-size: 1.25rem; }
.ghost-btn, .solid-btn { border: 1px solid var(--line); color: #eaf6ff; background: rgba(255,255,255,.06); padding: 10px 14px; border-radius: 12px; }
.solid-btn { border: 0; background: var(--blue); color: #031426; font-weight: 800; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.app-card { padding: 22px; }
.app-card h2, .app-card h3 { margin: 0 0 9px; }
.muted { color: var(--muted); }
.media-row, .game-row, .run-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.media-row:last-child, .game-row:last-child { border-bottom: 0; }
.meta { color: var(--muted); font-size: .82rem; }
input, select { width: 100%; color: #eef6ff; border: 1px solid var(--line); background: rgba(0,0,0,.22); border-radius: 11px; padding: 11px 12px; margin: 6px 0 10px; }
label { display: block; color: var(--muted); font-size: .8rem; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; border-radius: 999px; padding: 4px 9px; font-size: .72rem; background: rgba(112,196,255,.13); color: #8ed4ff; }
.progress { height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 15px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, #2293ed, #a2e4ff); transition: width .3s; }
.timeline { position: relative; height: 82px; margin: 14px 0 4px; border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid var(--line); }
.marker { position: absolute; top: 11px; bottom: 11px; width: 3px; background: #48b6ff; border-radius: 3px; }
.marker::after { content: attr(data-label); position: absolute; top: -3px; left: 7px; white-space: nowrap; font-size: .68rem; color: #bfe7ff; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-weight: 600; }
.notice { padding: 12px 14px; border-radius: 12px; color: #bfe7ff; background: rgba(49, 157, 232, .12); border: 1px solid rgba(49,157,232,.23); }
.analysis-shell { background: rgba(8, 18, 31, .82); }
.analysis-head { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; }
.analysis-head h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); letter-spacing:-.045em; margin:8px 0; }
.next-action { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin:18px 0; padding:14px 16px; border-radius:15px; background:linear-gradient(90deg, rgba(56,166,255,.17), rgba(56,166,255,.04)); border:1px solid rgba(91,190,255,.25); }
.next-action strong { color:#a9e1ff; }
.next-action span { color:var(--muted); flex:1; }
.video-panel { margin-top:16px; border-radius:18px; overflow:hidden; background:#020b15; border:1px solid var(--line); }
.processing-banner { padding:14px 16px 12px; background:linear-gradient(90deg, rgba(56,166,255,.2), rgba(56,166,255,.06)); border-bottom:1px solid rgba(112,196,255,.22); }
.processing-copy { display:flex; justify-content:space-between; gap:14px; align-items:baseline; flex-wrap:wrap; }
.processing-copy strong { color:#b9e7ff; }.processing-copy span { color:var(--muted); font-size:.8rem; }
.processing-track { height:7px; margin-top:10px; border-radius:99px; background:rgba(255,255,255,.1); overflow:hidden; }
.processing-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#2f9df1,#a1e5ff); transition:width .35s ease; }
.video-panel.is-processing video { outline:1px solid rgba(56,166,255,.28); }
.video-panel video { display:block; width:100%; max-height:520px; background:#020b15; }
.video-meta { display:flex; justify-content:space-between; gap:10px; padding:10px 14px; color:var(--muted); font-size:.78rem; }
.marker.proposed { background:#ffc857; }
.analysis-tabs { display:flex; gap:6px; margin:22px 0 16px; padding:5px; width:max-content; max-width:100%; border-radius:999px; background:rgba(255,255,255,.08); }
.tab-btn { border:0; border-radius:999px; padding:9px 14px; color:#afc6d9; background:transparent; }
.tab-btn.active { color:#061629; background:#f2f6fa; }
.analysis-content { min-height:190px; }
.stats-layout { display:grid; grid-template-columns: minmax(250px, .9fr) minmax(300px, 1.1fr); gap:22px; align-items:start; }
.scoreboard { display:flex; align-items:center; justify-content:space-around; gap:12px; padding:22px 16px; border-radius:18px; background:rgba(255,255,255,.06); }
.scoreboard > div { display:grid; gap:7px; text-align:center; }
.scoreboard strong { font-size:3.8rem; line-height:1; letter-spacing:-.07em; }
.team-label { color:var(--muted); font-size:.74rem; letter-spacing:.1em; }
.score-divider { color:var(--muted); }
.stat-table { display:grid; gap:2px; }
.stat-table > div { display:grid; grid-template-columns:1fr 80px 60px; gap:10px; align-items:center; padding:10px 12px; border-bottom:1px solid var(--line); }
.stat-table span { color:#dceafa; }.stat-table strong { text-align:right; }.stat-table em { color:#77c7ff; font-size:.72rem; font-style:normal; text-align:right; }
.dynamic-layout { display:grid; grid-template-columns:minmax(0, 1.45fr) minmax(230px, .55fr); gap:16px; }
.dynamic-card, .hot-takes { border:1px solid var(--line); border-radius:18px; padding:16px; background:rgba(255,255,255,.045); }
.dynamic-header { display:flex; justify-content:space-between; gap:12px; color:#e8f6ff; }.lead-chart { height:180px; width:100%; margin-top:10px; overflow:visible; }.lead-chart line { stroke:rgba(255,255,255,.15); stroke-width:.7; }.lead-chart polyline { fill:none; stroke:#c582ff; stroke-width:1.7; vector-effect:non-scaling-stroke; }
.chart-labels { display:flex; justify-content:space-between; color:var(--muted); font-size:.72rem; }.section-kicker { color:#d5df58; font-size:.72rem; letter-spacing:.12em; font-weight:800; }.hot-takes p { color:#d5e3ee; line-height:1.4; }
.play-feed { display:grid; gap:3px; max-height:340px; overflow:auto; padding-right:5px; }.play-row { display:grid; grid-template-columns:58px 30px 1fr; gap:12px; align-items:center; padding:11px 10px; border:0; border-bottom:1px solid var(--line); background:transparent; color:#eaf4fc; text-align:left; }.play-row:hover { background:rgba(65,168,237,.1); }.play-row small { display:block; color:var(--muted); margin-top:3px; }.play-time { color:var(--muted); font-variant-numeric:tabular-nums; }.play-icon { display:grid; place-items:center; width:25px; height:25px; border-radius:8px; background:#268fd4; font-size:.68rem; font-weight:800; }.play-icon.away { background:#bd78e9; }.link-btn { border:0; padding:0; background:transparent; color:#83cdfd; }
.compact { padding:6px 9px; font-size:.75rem; }
.game-status { display:flex; align-items:center; gap:8px; margin-top:7px; flex-wrap:wrap; }
.review-count { display:inline-flex; align-items:center; justify-content:center; min-width:20px; padding:2px 7px; border-radius:999px; background:#ffc857; color:#1c1604; font-size:.7rem; font-weight:800; }
.review-queue-panel { margin-bottom:16px; padding:16px; border:1px solid rgba(255,200,87,.36); border-radius:16px; background:rgba(255,200,87,.07); }
.review-queue-panel.empty { border-color:rgba(87,214,154,.3); background:rgba(87,214,154,.06); }
.queue-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:8px; }
.queue-heading h3 { margin:5px 0 4px; }
.review-queue-row { display:grid; grid-template-columns:72px minmax(0,1fr) 65px auto; gap:12px; align-items:center; padding:10px 0; border-top:1px solid rgba(255,255,255,.1); }
.review-queue-row strong, .review-queue-row small { display:block; }
.review-queue-row small { color:var(--muted); margin-top:3px; }
.suppressed-note { margin:12px 0 0; color:var(--muted); font-size:.78rem; }
.play-row { grid-template-columns:88px minmax(0,1fr) auto; }
.play-jump { display:flex; align-items:center; gap:12px; border:0; color:inherit; background:transparent; padding:0; text-align:left; }
.play-detail { min-width:0; }
.review-tools { display:grid; grid-template-columns:minmax(280px,1fr) minmax(240px,.8fr); gap:24px; margin-top:22px; padding-top:20px; border-top:1px solid var(--line); }
.match-results { margin:20px 0; padding:24px; background:rgba(6,18,32,.8); border:1px solid var(--line); border-radius:24px; }
.match-results[data-processing="true"]:not([data-expanded="true"]) .result-grid { display:none; }
.results-heading { display:flex; justify-content:space-between; gap:16px; align-items:center; }
.result-score { display:flex; gap:35px; justify-content:center; align-items:center; text-align:center; margin:18px 0; }
.result-score strong { display:block; font-size:clamp(3rem,6vw,5rem); line-height:1.2; }.score-divider { font-size:2rem; color:var(--muted); }
.result-grid { display:grid; grid-template-columns:1fr 1.1fr; gap:24px; }.result-grid svg { width:100%; }
.results-table { max-height:340px; overflow:auto; }.result-stat,.results-table-head { display:grid; grid-template-columns:1.5fr 1fr 1fr; width:100%; gap:10px; padding:10px; text-align:left; border:0; border-bottom:1px solid var(--line); background:transparent; color:inherit; }.result-stat:hover { background:#18354d; }.result-stat small { display:block; font-size:.7rem; color:var(--muted); }.analysis-launch { padding:18px 0; }.analysis-launch h3 { margin-bottom:4px; }
@media (max-width: 900px) {
  .result-grid { grid-template-columns:1fr; }.results-heading { flex-wrap:wrap; }.match-results { padding:16px; }
  .landing { min-height: 100svh; background-position: 28% center; padding: 22px; align-items: flex-end; }
  .hero-panel { width: 100%; min-width: 0; max-width: 560px; }
  .menu-card { background: rgba(3, 20, 38, .92); }
  h1 { font-size: clamp(2.6rem, 15vw, 4.2rem); }
  .stats-layout, .dynamic-layout, .review-tools { grid-template-columns:1fr; }
  .analysis-head { flex-direction:column; }
  .analysis-tabs { width:100%; justify-content:space-between; }
  .tab-btn { flex:1; padding-inline:7px; }
}

/* Compact analysis and a separate, results-first recap; the player stays mounted. */
[hidden] { display:none !important; }
.shell { padding:18px 24px; }
.has-knowledge-background { position:relative; isolation:isolate; }
.knowledge-background { position:fixed; inset:0; z-index:-1; overflow:hidden; pointer-events:none; color:#f79448; }
.knowledge-network { position:absolute; inset:0; width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:1; }
.knowledge-links { opacity:.13; stroke-width:.75; }
.knowledge-ball { opacity:.4; stroke-width:.75; }
.knowledge-hub { opacity:.52; }
.has-knowledge-background .analysis-shell { background:rgba(8,18,31,.87); backdrop-filter:none; }
.has-knowledge-background .topbar { flex-wrap:wrap; }
.has-knowledge-background .topbar nav { margin-left:auto; }
.background-motion { font-size:.72rem; opacity:.75; margin-left:8px; }
.heatmap-controls { display:flex; gap:10px; align-items:end; flex-wrap:wrap; margin:10px 0; }
.heatmap-controls label { flex:1; min-width:95px; margin:0; font-size:.78rem; }
.heatmap-controls input,.heatmap-controls select { width:100%; min-width:0; padding:7px; }
.heatmap-court { position:relative; aspect-ratio:28/15; background:radial-gradient(ellipse at 50% 45%,#133547,#091c2b 80%); border:1px solid #76c7e23d; border-radius:16px; overflow:hidden; box-shadow:0 0 30px #46b9de1c,0 12px 32px #0004,0 0 65px #ed9d3b09; }
.heatmap-court canvas,.heatmap-court .court-lines { position:absolute; inset:0; width:100%; height:100%; }
.heatmap-court .court-lines { color:#c1e5ef; opacity:.68; filter:drop-shadow(0 0 2px #87d9ed30); pointer-events:none; }
.heatmap-content .recap-section-title { margin-bottom:16px; }
.heatmap-content [data-hm-status] { padding:5px 9px; border:1px solid #73c5df26; border-radius:20px; background:#73c5df0a; font-size:.67rem; letter-spacing:.025em; }
.heatmap-content > .heatmap-controls { padding:10px; margin:0 0 20px; border:1px solid #a2cfe013; border-radius:12px; background:#06142166; }
.heatmap-content > .heatmap-controls label { color:#9bb5c5; font-size:.7rem; letter-spacing:.035em; }
.heatmap-content > .heatmap-controls select { margin-top:5px; border-radius:8px; background:#102636; border-color:#a2cfe024; }
.heatmap-content [data-hm-summary] { font-size:.78rem; line-height:1.55; color:#b3c9d6; }
.court-lines { color:#d8e4e7; width:100%; display:block; }
.heatmap-legend { display:flex; align-items:center; gap:10px; font-size:.65rem; color:var(--muted); margin:16px 0 12px; }
.heatmap-legend i { flex:1; min-width:35px; height:5px; background:linear-gradient(90deg,#193c55,#64b5eb,#ffe637); border-radius:4px; box-shadow:0 0 9px #64b5eb20; }
.heatmap-note { font-size:.72rem; }
.heatmap-content .recap-actions { flex-wrap:wrap; gap:6px; }
.heatmap-content .recap-actions button,.heatmap-content .recap-actions a { padding:7px 10px; font-size:.74rem; }
.coverage-details { margin-top:14px; padding-top:10px; border-top:1px solid var(--line); }
.heatmap-dialog { width:min(1120px,94vw); max-height:90svh; overflow:auto; background:#091c2c; color:var(--text); border:1px solid #41667f; border-radius:18px; padding:20px; }
.heatmap-dialog::backdrop { background:#000b; }
.heatmap-calibration-overlay { position:absolute; z-index:3; top:50%; left:50%; transform:translate(-50%,-50%); box-shadow:0 8px 35px #0008,0 0 28px #329eff35; white-space:nowrap; }
.heatmap-calibration-overlay[hidden] { display:none; }
.heatmap-menu { margin-left:auto; font-size:1.3rem; }
.setup-modal header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.setup-modal nav { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.setup-modal nav [aria-pressed="true"] { background:#277cb3; color:white; }
.setup-modal [data-pane][hidden] { display:none; }
.setup-modal .court-workspace.identity-only > :not(.identity-workspace) { display:none; }
.setup-modal canvas { max-width:100%; height:auto; }
.setup-modal .court-setup-pair { grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); }
.setup-modal .heatmap-controls { flex-wrap:wrap; }
.setup-modal input,.setup-modal select { max-width:100%; min-width:0; }
.setup-modal [data-pane],.court-workspace,.analysis-content { min-width:0; }
@media(max-width:700px) { .setup-modal .court-setup-pair { grid-template-columns:minmax(0,1fr); } .analysis-tabs { flex-wrap:wrap; border-radius:18px; } }
.court-workspace { padding:16px; border:1px solid #86c7df25; border-radius:16px; background:#0a1b29; }
.court-workspace-head,.court-workspace-toolbar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:14px; }
.court-workspace-head h3 { margin:0; margin-right:auto; }
.court-workspace [data-save-state],.court-workspace [data-frame-label],.court-workspace [data-court-progress] { font-size:.75rem; color:#a8c6d5; }
.court-workspace-toolbar [data-map-instruction] { margin-right:auto; font-size:.8rem; }
.court-workspace .court-setup-pair { grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); align-items:center; }
.court-workspace canvas[data-map-frame] { width:100%; height:auto; display:block; border-radius:10px; cursor:crosshair; }
.court-workspace [data-map-court] { background:#103244; border-radius:10px; cursor:crosshair; }
.court-pair-marker circle { fill:#63c9ff; stroke:#071d2a; stroke-width:.06; }
.court-pair-marker.selected circle { fill:#ff993f; stroke:#fff; }
.court-pair-marker text { fill:#061827; font-weight:700; pointer-events:none; }
.court-advanced { border-top:1px solid #86c7df20; padding-top:12px; font-size:.8rem; }
.identity-workspace { margin-top:24px; }
.identity-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; }
.identity-card { display:flex; flex-direction:column; gap:8px; padding:12px; background:#102838; border-radius:12px; min-width:0; }
.identity-card canvas { max-width:100%; align-self:center; border-radius:8px; }
.identity-card span,.identity-card small { font-size:.75rem; }
.identity-card form { display:flex; flex-wrap:wrap; gap:6px; }
.identity-card input,.identity-card select { max-width:100%; min-width:0; width:75px; }
.recap-mode:has(.clean-recap) .topbar { display:none; }
.clean-recap .recap-heading { position:relative; padding-right:50px; }
.overview-menu { position:absolute; right:0; top:4px; border:1px solid #c2dce526; background:#a4d3e908; color:#bad3df; border-radius:50%; width:38px; height:38px; font-size:1.5rem; cursor:pointer; }
.overview-menu:hover,.overview-menu:focus-visible { background:#234050; outline:2px solid #58bfff; }
.overview-drawer { position:fixed; inset:0 0 0 auto; margin:0; width:min(390px,100vw); height:100dvh; max-height:100dvh; background:#0a1b29; color:#e2eff5; padding:24px; border:0; border-left:1px solid #8dd3ef30; box-shadow:-20px 0 60px #0006; overflow:auto; }
.overview-drawer::backdrop { background:#020c16aa; backdrop-filter:blur(4px); }
.overview-drawer header { display:flex; justify-content:space-between; align-items:center; }
.overview-drawer nav,.overview-filters { display:grid; gap:12px; margin:24px 0; }
.overview-drawer select,.overview-drawer input { width:100%; }
.overview-drawer details { margin:18px 0; }
.overview-drawer a { display:block; color:#88cafa; margin:12px 0; }
.clean-recap .recap-stat { cursor:default; }
.clean-recap .recap-heatmap { padding:24px; }
.clean-recap [data-overview-player] { font-size:.8rem; color:#b6d7e5; }
.clean-recap [data-overview-summary] { margin:16px 0 0; color:#aec3d0; font-size:.78rem; }
@media(max-width:700px) { .court-workspace .court-setup-pair { grid-template-columns:1fr; } .court-workspace { padding:10px; } .overview-drawer { padding:18px; } }
.heatmap-dialog [data-hm-close] { float:right; }
.court-setup-pair { display:grid; grid-template-columns:1.5fr 1fr; gap:14px; align-items:center; }
.court-setup-pair canvas { width:100%; background:#020b12; cursor:crosshair; }
[data-court-diagram] { background:#183445; cursor:crosshair; }
[data-point-list] { display:flex; flex-wrap:wrap; gap:8px 24px; font-size:.8rem; }
.track-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:10px; }
.track-card { background:#133247; border:1px solid #40647a; border-radius:8px; padding:6px; color:inherit; }
.track-card canvas { display:block; margin:auto; max-width:100%; }
.track-card span { display:block; font-size:.7rem; }
@media(max-width:700px) { .court-setup-pair { grid-template-columns:1fr; } .heatmap-dialog { padding:12px; } }
@media(max-width:600px) { .background-motion { margin-left:auto; padding:4px 8px; } }
.topbar { margin-bottom:14px; }
.analysis-shell.app-card { padding:18px; }
.analysis-head h2 { margin:4px 0; font-size:1.35rem; }
.analysis-head p { margin:4px 0 10px; }
.next-action { padding:10px 12px; }
.analysis-launch { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; padding:8px 0; }
.analysis-launch h3,.analysis-launch p { margin:3px 0; }
#preflight-status { flex-basis:100%; }
.analysis-shell .match-results { padding:12px 16px; margin:10px 0; border-radius:16px; }
.analysis-shell .match-results:not([data-expanded="true"]) { display:grid; grid-template-columns:1fr auto; column-gap:20px; }
.analysis-shell .match-results:not([data-expanded="true"]) .result-grid { display:none; }
.analysis-shell .match-results:not([data-expanded="true"]) .result-score { grid-column:2; grid-row:1 / 4; margin:0; gap:18px; }
.analysis-shell .match-results:not([data-expanded="true"]) .result-score strong { font-size:2.6rem; }
.analysis-shell .match-results h3 { margin:3px 0; font-size:1rem; }
.analysis-shell .match-results p { margin:5px 0; }
.analysis-shell .match-results .form-actions { margin-top:5px; }
.video-panel video { max-height:43vh; min-height:180px; }
.video-meta { padding:7px 10px; }
.multi-timeline { margin:12px 0; }
.timeline-tools { padding:9px 12px; }
#timeline-scroll { max-height:270px; }
.event-lane { height:45px; }
.lane-label { padding:6px 12px; }
.event-marker { top:11px; height:24px; }
.event-span { top:17px; }
.analysis-tabs { margin:12px 0 8px; }
#tab-content,#evidence-panel { padding:14px; }
.incident-row { padding:10px 0; }
.recap-mode { background:linear-gradient(90deg,#08111a88,#0a0e1788),url('/Background.png') center / cover fixed; }
.recap-mode .shell { background:transparent; min-height:100svh; max-width:1920px; margin:auto; }
.recap-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin:8px 0 16px; }
.recap-heading h1 { font-size:1.6rem; letter-spacing:-.025em; line-height:1.2; margin:5px 0; }
.recap-heading p { color:#c4ccd4; margin:0; }
.recap-heading .eyebrow { color:#dfd4f2; }
.recap-layout { display:grid; grid-template-columns:1.05fr 1fr; gap:20px; align-items:stretch; }
.recap-card { min-width:0; background:rgba(22,23,26,.9); border:1px solid #ffffff15; border-radius:30px; padding:22px 26px; backdrop-filter:blur(10px); box-shadow:0 15px 45px #0004; }
.recap-primary { display:flex; flex-direction:column; max-height:calc(100svh - 185px); }
.recap-tabs { display:flex; gap:4px; padding:4px; background:#ffffff1c; border-radius:24px; align-self:center; }
.recap-tabs button { background:transparent; color:#cfd2d8; border:0; padding:8px 20px; border-radius:22px; }
.recap-tabs .selected { background:#e9e9eb; color:#22242a; }
.recap-match { display:grid; grid-template-columns:1fr .85fr 1fr; align-items:center; gap:12px; text-align:center; margin:18px 0 10px; }
.recap-badge { display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:14px; font-size:11px; font-weight:800; letter-spacing:.04em; background:#479bce44; color:#91d2fa; border:1px solid #77bfe775; }
.recap-badge.away { color:#dfb5ff; background:#a159cb44; border-color:#ad7dc875; }
.recap-match h2 { font-size:1rem; font-weight:500; margin:8px 0; }
.recap-match strong { font-size:3.5rem; letter-spacing:-.045em; line-height:1; }
.recap-score-note { color:#c6ccd4; font-size:.82rem; }
.recap-score-note small { display:block; color:#939dab; margin-top:12px; line-height:1.6; }
.recap-legend { font-size:.72rem; color:#a8afb9; text-align:center; margin:6px 0 10px; }
.recap-stats,.recap-plays { overflow:auto; scrollbar-width:thin; min-height:0; }
.recap-stat { display:grid; grid-template-columns:1fr 1.7fr 1fr; align-items:center; width:100%; padding:7px 8px; text-align:center; background:none; color:#e7e7ed; border:0; border-bottom:1px solid #ffffff0b; }
.recap-stat>span:first-child,.recap-stat>span:last-child { font-size:1.17rem; font-variant-numeric:tabular-nums; }
.recap-stat small,.recap-plays small { display:block; font-size:.68rem; color:#989faa; margin-top:2px; }
.recap-stat:hover,.recap-plays button:hover,.recap-coverage button:hover { background:#ffffff0b; }
.recap-side { display:grid; grid-template-rows:auto minmax(0,1fr); gap:20px; max-height:calc(100svh - 185px); }
.recap-section-title { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.recap-section-title h2 { font-size:1.05rem; margin:0; font-weight:500; }
.recap-section-title>span { color:#a4a6af; font-size:.72rem; }
.recap-team-key { display:flex; align-items:center; justify-content:flex-end; gap:8px; font-size:.76rem; color:#b9bdc7; }
.recap-lead { width:100%; height:clamp(140px,23vh,245px); }
.recap-lead text { fill:#9da4af; font-size:12px; }
.recap-insights { display:flex; justify-content:space-around; gap:18px; }
.recap-insights strong { display:block; font-size:1.4rem; font-weight:600; }
.recap-insights span { font-size:.73rem; color:#a6adba; }
.recap-quality { display:flex; flex-direction:column; min-height:0; }
.recap-side:has(.recap-heatmap) { max-height:none; grid-template-rows:auto auto; }
.recap-side:has(.recap-heatmap) .recap-lead { height:130px; }
.recap-heatmap .heatmap-court { width:min(100%,440px); margin:auto; }
.recap-quality>p { color:#afb5bf; font-size:.8rem; line-height:1.5; margin:12px 0; }
.recap-coverage { display:grid; grid-template-columns:1fr 1fr; gap:5px 16px; overflow:auto; min-height:0; }
.recap-coverage button { display:flex; justify-content:space-between; gap:8px; background:none; border:0; border-bottom:1px solid #ffffff10; padding:8px 0; color:#d7d9e1; text-transform:capitalize; text-align:left; }
.recap-coverage small { color:#a1a7b2; font-size:.66rem; text-align:right; }
.recap-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:15px; }
.recap-actions .ghost-btn { font-size:.76rem; padding:7px 10px; }
.recap-plays button { display:grid; grid-template-columns:48px 10px 1fr auto; width:100%; gap:12px; align-items:center; padding:15px 4px; border:0; border-bottom:1px solid #ffffff12; color:#e1e3e8; background:none; text-align:left; }
.recap-plays time { color:#9fa6b1; font-size:.8rem; }
@media(min-width:901px){
  .recap-match { margin:12px 0 6px; }
  .recap-badge { width:32px; height:32px; border-radius:11px; }
  .recap-stat { padding:4px 6px; }
  .recap-stat>span:first-child,.recap-stat>span:last-child { font-size:1rem; }
  .recap-stat small:empty { display:none; }
}
@media(max-width:900px){
  .shell { padding:12px; }
  .recap-layout { grid-template-columns:1fr; }
  .recap-primary,.recap-side { max-height:none; }
  .recap-stats { max-height:520px; }.recap-plays { max-height:520px; }
  .recap-card { padding:18px; border-radius:24px; }
  .recap-heading { align-items:flex-start; }.recap-heading h1 { font-size:1.3rem; }
  .recap-match { gap:7px; }.recap-match strong { font-size:3rem; }
  .analysis-shell .match-results:not([data-expanded="true"]) { display:block; }
  .analysis-shell .match-results:not([data-expanded="true"]) .result-score { margin:8px 0; }
  .video-panel video { min-height:140px; }
}
/* Private account shell: sits to the right of the original background personas. */
.auth-screen{position:fixed;inset:0;z-index:10000;background:#07131f url('/Background.png') center/cover no-repeat;display:flex;align-items:center;justify-content:flex-end;overflow:auto;padding:40px 4vw}
.auth-screen .auth-panel{position:relative;inset:auto;width:clamp(360px,40vw,560px);max-width:48vw;margin:0;padding:30px;background:rgba(7,21,34,.94);border:1px solid #28465e;border-radius:24px}
.auth-panel h1{font-size:2.2rem;margin:12px 0 22px}.auth-panel form{display:grid;gap:14px}.auth-panel label{display:grid;gap:6px}.auth-error{color:#ffb6b6;min-height:1.4em;margin-bottom:10px}
.auth-screen .auth-panel{max-height:calc(100dvh - 40px);overflow:auto}.mfa-qr{display:block;width:220px;max-width:100%;height:auto;margin:12px auto;background:white}.mfa-codes{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px}[data-setup-key]{display:block;overflow-wrap:anywhere;padding:10px 0}
#account-menu{max-width:calc(100vw - 20px);flex-wrap:wrap;justify-content:flex-end}
#account-menu{position:fixed;right:16px;bottom:12px;z-index:1001;display:flex;gap:8px;align-items:center;background:#10283af2;padding:7px 12px;border:1px solid #31506a;border-radius:12px;font-size:12px}
#account-menu button{color:#d9ecfb;background:transparent;border:0;cursor:pointer;padding:5px}.account-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #294455}.auth-admin .auth-panel{max-height:90vh;overflow:auto}[data-secret]{overflow-wrap:anywhere}
@media(max-width:899px){.auth-screen{align-items:flex-end;background-size:auto 65vh;background-position:left top;background-color:#07131f;padding:16px}.auth-screen .auth-panel{width:100%;max-width:100%;padding:20px;margin-top:45vh}.auth-panel h1{font-size:1.8rem}#account-menu{font-size:10px;right:6px;bottom:4px;gap:3px}}
body[data-role="user"] [data-scan],body[data-role="user"] [data-nav="settings"]{display:none}

.recap-mode:has(.clean-recap) > #account-menu { display:none; }
.overview-drawer #account-menu { position:static; max-width:none; display:flex; flex-direction:column; align-items:stretch; margin-top:24px; padding:12px; font-size:.8rem; }
