:root {
  --bg: #0b110f; --panel: #131b17; --panel2: #1a241f; --raise: #202c26; --line: #26332c; --text: #e9f0eb; --muted: #8fa197;
  --accent: #5fd38d; --gold: #ffe066; --red: #e5383b; --yellow: #f5c542;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.4 var(--font); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.ic { width: 20px; height: 20px; display: block; flex: none; }
[data-icon] { display: inline-flex; }

.app { display: grid; grid-template-rows: auto 1fr auto auto; height: 100vh; height: 100dvh; }

/* ---------------------------------------------------------- top bar */
.topbar { display: flex; align-items: center; gap: 14px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); min-width: 0; }
.ib { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; white-space: nowrap; min-height: 38px; }
.ib:hover { border-color: var(--muted); }
.ib[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.scorebug { display: flex; align-items: stretch; border-radius: 8px; overflow: hidden; background: #050807; border: 1px solid #2d3a33; font-weight: 650; min-width: 0; }
.sb-team { display: flex; align-items: center; gap: 8px; padding: 6px 11px; font-size: 16px; min-width: 0; }
.sb-team b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kit { width: 5px; align-self: stretch; border-radius: 2px; flex: none; }
.sb-score { display: flex; align-items: center; padding: 0 13px; font-size: 21px; font-variant-numeric: tabular-nums; background: #0f1714; letter-spacing: .03em; }
.sb-score.flash { animation: scoreflash 2.5s; }
@keyframes scoreflash { 0%, 40% { background: var(--accent); color: #052; } }
.sb-clock { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 3px 12px; border-left: 1px solid #2d3a33; min-width: 86px; line-height: 1.15; }
.sb-time { font-variant-numeric: tabular-nums; color: var(--accent); font-size: 17px; font-weight: 700; letter-spacing: .02em; }
.sb-added { color: var(--gold); font-size: 13px; margin-left: 4px; }
.sb-phase { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.sb-clock.stopped .sb-time { color: var(--muted); }
.sb-clock.paused .sb-time { animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.status { color: var(--muted); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status b { color: var(--text); }
.status .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 6px; animation: pulse 1.4s infinite; vertical-align: 1px; }
.status.replay .dot { background: var(--muted); animation: none; }
@keyframes pulse { 50% { opacity: .3; } }
.tb-right { margin-left: auto; display: flex; gap: 6px; }

/* ---------------------------------------------------------- stage */
.main { display: grid; grid-template-columns: 1fr 360px; min-height: 0; }
.stage { position: relative; min-height: 0; overflow: hidden; background: #1b5c34; touch-action: manipulation; }
.stage canvas { position: absolute; inset: 0; display: block; cursor: pointer; }
.dimmer { position: absolute; inset: 0; background: rgba(6, 12, 9, .8); display: none; align-items: center; justify-content: center; padding: 32px; }
.dimmer.show { display: flex; }
.dim-text { max-width: 640px; text-align: center; font-size: 18px; line-height: 1.5; }
.dim-text small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 10px; letter-spacing: .08em; text-transform: uppercase; }
.banner { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none;
  text-align: center; transition: opacity .25s, transform .35s cubic-bezier(.2, 1.6, .4, 1); width: max-content; max-width: 92%; }
.banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.banner .goal { font-size: 60px; font-weight: 900; letter-spacing: .08em; padding: 4px 36px; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.banner .who { margin-top: 10px; font-size: 19px; font-weight: 650; background: rgba(0,0,0,.78); padding: 8px 18px; border-radius: 6px; display: inline-block; }
.banner .who small { display: block; font-size: 13px; font-weight: 500; color: #cfd8d2; }
.badge { position: absolute; top: 12px; padding: 5px 12px; border-radius: 5px; font-weight: 800; letter-spacing: .08em; font-size: 12px; opacity: 0; transition: opacity .2s; pointer-events: none; display: flex; align-items: center; gap: 6px; }
.badge.show { opacity: 1; }
.badge .ic { width: 16px; height: 16px; }
.replay-badge { left: 12px; background: #fff; color: #111; }
.var-badge { right: 12px; background: #2a2f7a; color: #fff; max-width: 60%; font-weight: 600; letter-spacing: 0; }
.var-badge b { letter-spacing: .08em; }
.paused-badge { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); background: rgba(0,0,0,.7); border: 1px solid rgba(255,255,255,.2);
  padding: 5px 12px 5px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; display: none; align-items: center; gap: 6px; }
.paused-badge.show { display: flex; }
.paused-badge .ic { width: 14px; height: 14px; }
.subboard { position: absolute; top: 12px; left: 50%; transform: translateX(-50%) translateY(-140%); transition: transform .35s; background: #050807;
  border: 2px solid #333; border-radius: 6px; padding: 6px 12px; display: flex; gap: 14px; align-items: center; font-weight: 650; white-space: nowrap; }
.subboard.show { transform: translateX(-50%) translateY(0); }
.subboard .on, .subboard .off { display: flex; align-items: center; gap: 4px; }
.subboard .on { color: #3ddc84; } .subboard .off { color: #ef5a5a; }
.subboard .ic { width: 14px; height: 14px; }
.subboard .num { font-family: ui-monospace, Menlo, monospace; font-size: 19px; padding: 0 6px; border-radius: 3px; background: #111; margin-right: 4px; color: #ffb000; }
.break { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); background: rgba(8, 14, 11, .95); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 22px; width: min(380px, 92%); display: none; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.6); max-height: 88%; overflow: auto; }
.break.show { display: block; }
.break h3 { margin: 0 0 4px; font-size: 12px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.break .res { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.break table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.break td { padding: 3px 6px; } .break td:nth-child(2) { color: var(--muted); font-size: 12px; text-align: center; }
.break td:first-child { text-align: left; } .break td:last-child { text-align: right; }
.break .scorers { font-size: 13px; color: #cfd8d2; margin-bottom: 10px; }
.break .best { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; text-align: left; font-size: 13px; }
.break .rt { display: inline-block; min-width: 30px; text-align: center; color: #111; font-weight: 750; border-radius: 3px; margin: 2px 4px 2px 0; }
.break .others { margin-top: 12px; text-align: left; font-size: 13px; border-top: 1px solid var(--line); padding-top: 8px; }
.break .others span { color: var(--muted); font-size: 11px; }
.commbar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: max-content; max-width: 88%; display: flex; align-items: stretch;
  background: rgba(5, 8, 7, .9); border-radius: 6px; overflow: hidden; font-size: 15px; transition: opacity .3s; border-left: 6px solid #666; pointer-events: none; }
.commbar.hide { opacity: 0; }
.commbar.goal { font-size: 17px; font-weight: 700; }
.commbar.flash { animation: cbflash .45s 5 alternate; }
@keyframes cbflash { to { filter: brightness(1.7); } }
.cb-min { padding: 7px 10px; opacity: .75; font-variant-numeric: tabular-nums; background: rgba(0,0,0,.18); }
.cb-text { padding: 7px 14px; }
.skip-pill { position: absolute; right: 14px; bottom: 62px; display: none; align-items: center; gap: 6px; background: #fff; color: #111; border: 0; border-radius: 22px;
  padding: 9px 14px 9px 16px; font-weight: 750; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.45); }
.skip-pill.show { display: flex; animation: pillin .25s ease-out; }
.skip-pill .ic { width: 18px; height: 18px; }
@keyframes pillin { from { transform: translateY(10px); opacity: 0; } }
.toasts { position: absolute; top: 52px; right: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; z-index: 6; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: rgba(10, 16, 13, .96); border: 1px solid var(--line); border-left: 5px solid var(--accent);
  border-radius: 8px; padding: 8px 12px; font-size: 13px; box-shadow: 0 8px 28px rgba(0,0,0,.45); max-width: 320px; cursor: pointer; animation: toastin .3s ease-out; }
.toast .ic { width: 18px; height: 18px; flex: none; }
.toast b { display: block; font-size: 14px; }
.toast small { color: var(--muted); }
.toast.out { opacity: 0; transform: translateX(20px); transition: all .3s; }
@keyframes toastin { from { transform: translateX(30px); opacity: 0; } }
.playercard { position: absolute; display: none; width: 260px; background: rgba(10, 16, 13, .97); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; box-shadow: 0 12px 40px rgba(0,0,0,.5); font-size: 13px; z-index: 5; }
.playercard.show { display: block; }
.playercard h4 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.playercard h4 .ic { width: 14px; height: 14px; }
.playercard .pos { color: var(--muted); margin-bottom: 8px; }
.playercard .rating { float: right; font-weight: 800; color: #111; padding: 2px 7px; border-radius: 4px; }
.playercard dl { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 3px 10px; margin: 0; }
.playercard dt { color: var(--muted); } .playercard dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- side panel */
.side { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1 0 auto; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 7px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.panel { display: none; overflow-y: auto; flex: 1; padding: 10px 12px; -webkit-overflow-scrolling: touch; }
.panel.on { display: block; }
.stat { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 6px; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.stat .lbl { text-align: center; color: var(--muted); font-size: 12px; }
.stat .r { text-align: right; }
.stat .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; display: flex; overflow: hidden; background: #2a332e; }
.stat-head { display: grid; grid-template-columns: 1fr 1fr; font-weight: 650; margin-bottom: 10px; }
.stat-head span:last-child { text-align: right; }
.evlist { margin-bottom: 14px; display: grid; gap: 2px; }
.evrow { display: grid; grid-template-columns: 52px 20px 1fr; gap: 6px; align-items: center; font-size: 13px; padding: 4px 6px; border-radius: 4px; border-left: 3px solid var(--tc, #666); background: rgba(255,255,255,.03); }
.evrow .m { color: var(--muted); font-variant-numeric: tabular-nums; }
.evrow .ic { width: 16px; height: 16px; }
.rt-team { margin-bottom: 14px; }
.rt-team h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.rt-team h4 i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.rt-row { display: grid; grid-template-columns: 26px 1fr auto 40px; gap: 6px; align-items: center; padding: 4px; border-radius: 4px; font-size: 13px; min-height: 30px; }
.rt-row:hover, .rt-row.sel { background: var(--panel2); }
.rt-row .no { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.rt-row .icons { display: flex; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
.rt-row .icons .ic { width: 14px; height: 14px; }
.rt-row .icons .on { color: #3ddc84; } .rt-row .icons .off { color: #ef5a5a; }
.rt-row .rt { text-align: center; font-weight: 750; color: #111; border-radius: 3px; font-variant-numeric: tabular-nums; }
.rt-row.out { opacity: .55; }
.lu-pitch { width: 100%; height: 190px; display: block; border-radius: 6px; margin-bottom: 10px; }
.lu-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.an-controls { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
#anCanvas { width: 100%; height: 230px; display: block; border-radius: 6px; }
.an-legend { font-size: 12px; color: var(--muted); margin-top: 8px; }
.ev { display: grid; grid-template-columns: 46px 1fr; gap: 6px; padding: 6px 6px; border-radius: 5px; font-size: 13px; }
.ev .m { color: var(--muted); font-variant-numeric: tabular-nums; }
.ev.goal { background: rgba(95, 211, 141, .14); } .ev.card { background: rgba(245, 197, 66, .12); }
.ev.new { animation: evflash 1.4s; } @keyframes evflash { from { background: rgba(255,255,255,.16); } }
.sc-day { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 10px 0 4px; }
.fx-row, .sc-row { display: grid; grid-template-columns: 1fr 58px 1fr 58px; gap: 8px; align-items: center; padding: 8px 6px; border-radius: 5px; font-size: 13px; cursor: pointer; }
.fx-row:hover, .sc-row:hover { background: var(--panel2); }
.fx-row.cur, .sc-row.cur { background: rgba(95, 211, 141, .14); }
.fx-row .h, .sc-row .h { text-align: right; } .fx-row .s, .sc-row .s { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.fx-row .st, .sc-row .st { text-align: right; font-size: 11px; color: var(--muted); display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.fx-row .st.live, .sc-row .st.live { color: var(--red); font-weight: 700; }
.cap { color: var(--accent); display: inline-flex; } .cap .ic { width: 10px; height: 10px; }
.ltable { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.ltable th { color: var(--muted); font-weight: 500; font-size: 11px; text-align: right; padding: 3px 4px; }
.ltable td { padding: 4px; text-align: right; border-top: 1px solid rgba(255,255,255,.04); }
.ltable td:nth-child(2) { text-align: left; }
.ltable td:first-child { color: var(--muted); width: 38px; }
.ltable td:first-child span { display: inline-flex; vertical-align: -2px; }
.ltable .ic { width: 12px; height: 12px; }
.ltable .up { color: #3ddc84; } .ltable .down { color: #ef5a5a; } .ltable .lv { color: var(--red); }
.ltable tr.cur td { background: rgba(95, 211, 141, .14); }

/* ---------------------------------------------------------- momentum + controls */
.momentum { height: 50px; background: var(--panel); border-top: 1px solid var(--line); }
.momentum canvas { width: 100%; height: 100%; display: block; }
.controls { background: var(--panel); border-top: 1px solid var(--line); padding: 6px 12px calc(8px + var(--safe-b)); display: grid; gap: 6px; }
.ctl-timeline { display: flex; align-items: center; gap: 10px; }
.tl-clock { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; min-width: 44px; }
.timeline { position: relative; flex: 1; padding-top: 16px; }
.markers { position: absolute; left: 9px; right: 9px; top: 0; height: 16px; pointer-events: none; }
.mk { position: absolute; transform: translateX(-50%); top: 0; display: flex; color: #fff; }
.mk[data-t] { pointer-events: auto; cursor: pointer; }
.mk .ic { width: 13px; height: 13px; }
.mk.card { width: 6px; height: 9px; border-radius: 1px; top: 3px; }
.mk.period { width: 1px; height: 30px; background: var(--muted); opacity: .6; }
.ctl-buttons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grp { display: flex; align-items: center; gap: 6px; }
.cb { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; min-width: 40px; height: 40px; padding: 0 10px; white-space: nowrap; }
.cb:hover { border-color: var(--muted); }
.cb.primary { background: var(--text); color: #0b110f; border-color: var(--text); min-width: 48px; }
.cb.attn { border-color: var(--gold); color: var(--gold); }
.cb.live { margin-left: auto; }
.cb.live.on { background: var(--red); border-color: var(--red); color: #fff; }
.cb:disabled { opacity: .4; cursor: default; }

/* range inputs: our own track and thumb */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--pct, 0%), #34413a var(--pct, 0%)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: #34413a; }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; margin-top: -6px; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; }

/* ---------------------------------------------------------- custom dropdown */
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; height: 40px; padding: 0 10px 0 12px; white-space: nowrap; }
.dd-btn:hover, .dd.open .dd-btn { border-color: var(--muted); }
.dd-btn .ic { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.dd.open .dd-btn .ic { transform: rotate(180deg); }
.dd-label { color: var(--muted); font-size: 12px; }
.dd-list { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 100%; margin: 0; padding: 5px; list-style: none; background: #17211c;
  border: 1px solid #33423a; border-radius: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.55); display: none; max-height: 320px; overflow-y: auto; outline: none; }
.dd-list.right { left: auto; right: 0; }
.dd.up .dd-list { top: auto; bottom: calc(100% + 6px); }
.dd.open .dd-list { display: block; animation: ddin .12s ease-out; }
@keyframes ddin { from { opacity: 0; transform: translateY(-4px); } }
.dd-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 10px; border-radius: 7px; white-space: nowrap; cursor: pointer; min-height: 38px; }
.dd-list li small { display: block; color: var(--muted); font-size: 11px; white-space: normal; }
.dd-list li:hover, .dd-list li.active { background: var(--raise); }
.dd-list li[aria-selected="true"] { color: var(--accent); }
.dd-list li .ic { width: 16px; height: 16px; }
.dd.compact .dd-btn { padding: 0 8px 0 10px; }

/* ---------------------------------------------------------- drawers */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 19; }
.scrim.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; width: 400px; max-width: 100vw; background: var(--panel); border: 1px solid var(--line);
  z-index: 20; transition: transform .25s; display: flex; flex-direction: column; box-shadow: 0 0 40px rgba(0,0,0,.5); }
.drawer.right { right: 0; transform: translateX(105%); }
.drawer.left { left: 0; transform: translateX(-105%); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 16px; }
.drawer-body { overflow-y: auto; padding: 10px 16px calc(16px + var(--safe-b)); flex: 1; -webkit-overflow-scrolling: touch; }
.capture { padding: 8px 16px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.fx-day { position: sticky; top: -10px; background: var(--panel); padding: 10px 0 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; z-index: 1; }
.set-group { margin-bottom: 18px; }
.set-group h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.05); min-height: 48px; }
.set label { flex: 1; }
.set small { display: block; color: var(--muted); font-size: 11px; }
.set input[type=range] { width: 130px; }
/* toggle switch */
.tg { -webkit-appearance: none; appearance: none; width: 42px; height: 24px; border-radius: 12px; background: #34413a; position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.tg::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.tg:checked { background: var(--accent); }
.tg:checked::after { transform: translateX(18px); }
.keys { font-size: 12px; color: var(--muted); line-height: 1.8; }
.keys kbd { font: 11px ui-monospace, Menlo, monospace; background: var(--raise); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--text); }

/* ---------------------------------------------------------- phones and narrow screens */
@media (max-width: 900px) {
  .app { display: flex; flex-direction: column; height: auto; min-height: 100dvh; padding-bottom: calc(146px + var(--safe-b)); }
  .main { display: contents; }
  .topbar { order: 0; } .stage { order: 1; } .momentum { order: 2; } .side { order: 3; }
  .topbar { position: sticky; top: 0; z-index: 10; flex-wrap: wrap; gap: 8px; padding: 6px 8px; }
  .ib .lbl, .cb .lbl { display: none; }
  .ib { padding: 6px; min-height: 36px; }
  .ib .ic { width: 19px; height: 19px; }
  .scorebug { order: 0; flex: 1 1 auto; justify-content: center; }
  .sb-team { padding: 5px 6px; font-size: 13px; flex: none; gap: 5px; }
  .sb-team b { overflow: visible; }
  .sb-score { font-size: 17px; padding: 0 7px; white-space: nowrap; }
  .sb-clock { min-width: 62px; padding: 2px 6px; }
  .sb-time { font-size: 14px; }
  .sb-added { font-size: 11px; }
  .sb-phase { font-size: 9px; letter-spacing: .06em; }
  .tb-right { margin-left: 0; gap: 4px; }
  .status { order: 3; flex-basis: 100%; font-size: 12px; text-align: center; }
  .stage { height: calc(100dvh - 146px - 92px - var(--safe-b)); min-height: 340px; max-height: 150vw; flex: none; }
  .side { border-left: 0; border-top: 1px solid var(--line); min-height: 50dvh; }
  .tabs { position: sticky; top: 92px; background: var(--panel); z-index: 2; }
  .panel { overflow: visible; }
  .controls { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; box-shadow: 0 -8px 24px rgba(0,0,0,.35); }
  .momentum { height: 40px; }
  .ctl-buttons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .ctl-buttons .grp:not(.opts) { display: contents; }
  .cb { min-width: 0; padding: 0 4px; height: 42px; }
  .grp.opts { grid-column: span 4; gap: 6px; }
  .ctl-buttons:has(#btnLive[style*="none"]) .grp.opts { grid-column: 1 / -1; }
  .grp.opts .dd { flex: 1; min-width: 0; }
  .grp.opts .dd-btn { width: 100%; justify-content: space-between; height: 38px; }
  .cb.live { grid-column: span 2; margin-left: 0; height: 38px; }
  .cb.live .lbl { display: inline; font-size: 13px; }
  .banner .goal { font-size: 40px; padding: 4px 24px; }
  .banner .who { font-size: 16px; }
  .commbar { font-size: 13px; bottom: 10px; max-width: 94%; }
  .commbar.goal { font-size: 14px; }
  .cb-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .skip-pill { top: 10px; bottom: auto; right: 10px; padding: 8px 12px 8px 14px; font-size: 13px; }
  .toasts { top: 56px; }
  .toasts { top: 44px; right: 8px; left: 8px; align-items: stretch; }
  .toast { max-width: none; }
  .drawer { width: 100vw; border: 0; }
  .playercard { left: 8px !important; right: 8px; width: auto; top: 8px !important; }
  .dd-list { max-height: 50dvh; }
  .dd-list li { min-height: 44px; }
}
@media (max-width: 480px) {
  #btnAlerts { display: none; }
  .topbar { gap: 6px; row-gap: 2px; }
  .status { font-size: 11px; }
}
