/* tracker.css — camera tracker page, layered over ../styles.css */

.topbar.slim { padding: 14px 16px 10px; }
.topbar.slim h1 { font-size: 1.35rem; }
.topbar.slim .tagline { font-size: .8rem; margin-top: 2px; }

main, .foot-note { max-width: 760px; margin: 14px auto 0; padding: 0 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.05rem; }

.ctl { margin: 10px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ctl-lbl { color: var(--muted); font-size: .82rem; min-width: 64px; }
.chk { display: inline-flex; gap: 6px; align-items: center; font-size: .92rem; cursor: pointer; }
.chk input { width: 18px; height: 18px; }
.toggles { gap: 18px; }

.cam-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cam-row select { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; max-width: 55%; }
button.primary { background: var(--gold); color: #241c02; border: none; border-radius: 10px; padding: 10px 18px; font-weight: 700; }
button.ghost { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; }
button:disabled { opacity: .45; cursor: default; }
.small-btn { padding: 5px 12px; font-size: .85rem; }

.players-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; }
.players-row input { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 110px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tv-info { margin-top: 10px; padding: 10px 12px; background: var(--panel-2); border-radius: 10px; font-size: .9rem; }
.tv-info b { color: var(--gold); font-size: 1.25rem; letter-spacing: 3px; font-family: var(--mono); }
.how p { margin: 4px 0 0; }
.how a { color: var(--accent); }

/* ---------- video stages ---------- */
.video-stage { position: relative; width: 100%; border-radius: 12px; overflow: hidden; background: #000; }
.video-stage video { width: 100%; display: block; }
.video-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.video-stage.small { max-width: 340px; }

.cal-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.loupe { position: absolute; width: 140px; height: 140px; border-radius: 50%; border: 2px solid var(--gold); background: #000; pointer-events: none; z-index: 6; box-shadow: var(--shadow); }
.nudge-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.nudge-row .segmented button { font-weight: 700; }
.nudge-pad { display: flex; gap: 6px; }
.nudge-pad button { background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; min-width: 46px; min-height: 42px; font-size: 1.15rem; touch-action: none; }
.nudge-pad button:active { border-color: var(--gold); color: var(--gold); }
.a20 { color: #6fe08f; } .a6 { color: #ffd24d; } .a3 { color: #5db4ff; } .a11 { color: #ff8fa3; }

.cal-dot { fill: rgba(0,0,0,.35); stroke-width: 2.5; cursor: grab; }
.cal-dot-hit { fill: transparent; stroke: none; cursor: grab; }
.cal-lbl { font-size: 15px; font-weight: 700; paint-order: stroke; stroke: rgba(0,0,0,.7); stroke-width: 3px; }
.wire { fill: none; stroke: rgba(70, 235, 130, .85); stroke-width: 1.2; }
.wire-dim { fill: none; stroke: rgba(70, 235, 130, .35); stroke-width: 1; }

/* ---------- live view ---------- */
.live-top { display: flex; gap: 12px; align-items: flex-start; }
.live-side { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 8px; }
.status-pill { padding: 7px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: .85rem; text-align: center; transition: background .15s; }
.status-pill.motion { background: #4a3a10; border-color: #8a6d1d; }
.status-pill.hit { background: #14522e; border-color: #36d07a; font-weight: 700; }
.status-pill.warn { background: #58222a; border-color: var(--red); }
#mini, #scatter { width: 100%; max-width: 220px; align-self: center; }

.turn-row { display: flex; gap: 10px; align-items: center; margin: 12px 0 8px; flex-wrap: wrap; }
.turn-who { font-weight: 700; color: var(--gold); }
.dart-chips { display: flex; gap: 6px; }
.dart-chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-family: var(--mono); font-weight: 700; cursor: pointer; }
.dart-chip.cv { border-color: #2c7a4d; }
.dart-chip.iffy { border-style: dashed; border-color: var(--yellow); }
.dart-chip.pending { opacity: .4; font-weight: 400; }
.hint { margin: 10px 0 0; }
.picker-row + .picker-row { margin-top: 6px; }
.picker-row .danger { border-color: #8a3a42; color: #ff9aa4; }
.sb-p .sc { cursor: pointer; }
.sb-p, .sb-cricket th { cursor: pointer; }

/* scoreboard */
.sb-x01 { display: flex; gap: 10px; flex-wrap: wrap; }
.sb-p { flex: 1; min-width: 130px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.sb-p.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.sb-p .nm { font-size: .85rem; color: var(--muted); }
.sb-p .sc { font-size: 2.1rem; font-weight: 800; font-family: var(--mono); line-height: 1.1; }
.sb-p .avg { font-size: .78rem; color: var(--muted); }
table.sb-cricket { width: 100%; border-collapse: collapse; text-align: center; }
.sb-cricket th, .sb-cricket td { padding: 5px 6px; border-bottom: 1px solid var(--line); }
.sb-cricket th.on { color: var(--gold); }
.sb-cricket .num { font-weight: 700; font-family: var(--mono); }
.sb-cricket .m0 { color: #3a4552; } .sb-cricket .m1, .sb-cricket .m2 { color: var(--yellow); }
.sb-cricket .m3 { color: var(--green); font-weight: 700; }
.sb-cricket .pts { font-family: var(--mono); font-weight: 700; }

.live-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.warn { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #58222a; border: 1px solid var(--red); font-size: .9rem; }
.win-banner { margin: 10px 0; padding: 14px; border-radius: 12px; background: #14522e; border: 1px solid var(--green); font-size: 1.15rem; font-weight: 800; text-align: center; }

/* practice */
.practice-grid { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.fit-card { flex: 1; min-width: 200px; font-size: .95rem; line-height: 1.7; }
.fit-card b { font-family: var(--mono); }
.dot-hit { fill: rgba(74, 168, 255, .75); }
.dot-old { fill: rgba(74, 168, 255, .28); }
.dot-mean { fill: none; stroke: var(--gold); stroke-width: 2; }

/* picker sheet */
.picker { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 30; }
.picker-sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 14px 16px 22px; width: 100%; max-width: 480px; }
.picker-head { font-weight: 700; margin-bottom: 10px; }
.picker-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0; }
.picker-grid button { background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 10px 0; font-family: var(--mono); font-weight: 700; }
.picker-row { display: flex; gap: 6px; }
.picker-row button { flex: 1; }

/* ---------- TV view ---------- */
#tv-main { max-width: 1100px; }
.tv-room { text-align: center; font-family: var(--mono); letter-spacing: 2px; margin-bottom: 8px; }
#tv-board .sb-p .sc { font-size: 5.5rem; }
#tv-board table.sb-cricket { font-size: 1.6rem; }
#tv-board .sb-cricket th, #tv-board .sb-cricket td { padding: 10px; }
.tv-last { text-align: center; font-size: 1.6rem; font-family: var(--mono); margin-top: 14px; min-height: 2rem; }
.tv-stale { text-align: center; color: var(--yellow); margin-top: 10px; }

.foot-note { padding-bottom: 30px; }
.foot-note a { color: var(--accent); }

@media (max-width: 560px) {
  .live-top { flex-direction: row; }
  .video-stage.small { max-width: 55%; }
  #mini { max-width: 150px; }
  .sb-p .sc { font-size: 1.7rem; }
}
