/* Boom Bazaar table (SPEC §9.2): the game screen grid at 360 × 640, strips, show row, score bar, hand, lock, drawers, summary, final, handoff, coach.
   Owner: table agent. Tokens come from app.css (§10.1); card anatomy and motion classes from cards.css. Text sizes use --fs-* (Big text adds 2 px). */

html.tbl-open, html.tbl-open body { height:100%; overflow:hidden; overscroll-behavior:none; }
html.tbl-open #app { height:100dvh; min-height:0; }

/* ===================================================================== the grid */
.tbl {
  position:relative; width:100%; max-width:480px; height:100dvh; margin:0 auto;
  padding:var(--sat) calc(var(--sar) + 8px) max(8px, var(--sab)) calc(var(--sal) + 8px);
  display:grid; grid-template-columns:minmax(0,1fr);
  grid-template-rows:44px auto auto auto 56px 28px minmax(8px,auto) minmax(196px,1fr) auto 56px;
  grid-template-areas:"top" "from" "to" "others" "show" "score" "coach" "hand" "pass" "lock";
  align-content:start; font-family:var(--font-ui); color:var(--ui);
  -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; touch-action:manipulation;
}
.tbl[data-seats="2"] { grid-template-areas:"top" "from" "from" "others" "show" "score" "coach" "hand" "pass" "lock"; grid-template-rows:44px auto 0 auto 56px 28px minmax(8px,auto) minmax(196px,1fr) auto 56px; }
.tbl > .tb-coachslot { grid-area:coach; min-height:8px; }
.tbl > .tb-top { grid-area:top; } .tbl > .tb-from { grid-area:from; } .tbl > .tb-to { grid-area:to; } .tbl > .tb-others { grid-area:others; }
.tbl > .tb-showrow { grid-area:show; } .tbl > .tb-score { grid-area:score; } .tbl > .tb-hand { grid-area:hand; } .tbl > .tb-pass { grid-area:pass; } .tbl > .tb-lockrow { grid-area:lock; }
.tbl[data-seats="2"] > .tb-to, .tbl[data-seats="2"] > .tb-others { display:none; }
.tbl[data-seats="3"] > .tb-others { display:none; }
@media (min-height:700px) { .tb-strip { min-height:60px; } }

/* ===================================================================== top bar */
.tb-top { display:flex; align-items:center; gap:6px; height:44px; min-width:0; }
.tb-round { flex:none; font-size:var(--fs-m); font-weight:800; font-variant-numeric:tabular-nums; min-width:62px; }
.tb-call { flex:1 1 auto; min-width:0; height:40px; display:flex; align-items:center; gap:6px; padding:0 10px 0 4px; border:1.5px solid var(--panel-edge); border-radius:20px; background:var(--panel); color:var(--ui); font-size:var(--fs-s); font-weight:800; text-align:left; }
.tb-call .tb-callic { flex:none; display:inline-flex; }
.tb-call .tb-callname { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tb-ringbox { position:relative; flex:none; width:36px; height:36px; display:flex; align-items:center; justify-content:center; }
.tb-timer { position:relative; width:36px; height:36px; display:flex; align-items:center; justify-content:center; font-size:var(--fs-m); font-weight:800; font-variant-numeric:tabular-nums; }
.tb-timer svg { position:absolute; inset:0; }
.tb-timer .tr-bg { stroke:rgba(169,168,201,.28); } .tb-timer .tr-fg { stroke:var(--ok); transition:stroke-dashoffset 200ms linear; }
.tb-timer .tr-num { position:relative; }
.tb-timer.squeeze .tr-fg { stroke:var(--squeeze); } .tb-timer.squeeze { color:var(--squeeze); animation:tb-pulse 1s ease-in-out infinite; }
.tb-squeezeword { position:absolute; right:0; top:42px; padding:0 8px; border-radius:10px; background:var(--squeeze); color:var(--ink); font-size:var(--fs-s); font-weight:900; letter-spacing:.06em; z-index:6; line-height:20px; }
html[data-motion="reduced"] .tb-timer.squeeze { animation:none; }
@keyframes tb-pulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.14); } }
.tb-menu { flex:none; width:44px; height:44px; border:0; border-radius:12px; background:transparent; color:var(--ui); display:flex; align-items:center; justify-content:center; }
.tb-menu:active { background:rgba(251,246,234,.12); }

/* ===================================================================== strips */
.tb-strip { position:relative; display:flex; flex-direction:column; min-height:52px; padding:2px 8px 2px 8px; background:var(--panel); border-radius:10px; border-left:4px solid var(--sc, var(--panel-edge)); cursor:pointer; min-width:0; overflow:hidden; }
.tb-to, .tb-from { margin-bottom:0; }
.tb-strip + .tb-strip { margin-top:2px; }
.tb-strip-head { display:flex; align-items:center; gap:6px; height:18px; flex:none; font-size:var(--fs-s); line-height:18px; min-width:0; }
.tb-dir { flex:none; color:var(--ui-dim); font-weight:700; font-size:var(--fs-s); }
.tb-strip-name { flex:none; display:inline-flex; align-items:center; gap:4px; min-width:0; max-width:46%; }
.tb-seat { display:inline-flex; align-items:center; gap:4px; min-width:0; color:var(--sc, var(--ui)); }
.tb-seat svg { flex:none; display:block; }
.tb-seat b { color:var(--ui); font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tb-bot { display:inline-flex; color:var(--ui-dim); } .tb-sub { color:var(--ui-dim); font-size:var(--fs-xs); }
.tb-lockchk { flex:none; display:inline-flex; width:18px; height:18px; border-radius:9px; background:var(--ok); color:var(--ink); align-items:center; justify-content:center; animation:tb-pop calc(var(--anim) * .5) ease-out; }
.tb-lockchk svg { width:12px; height:12px; }
@keyframes tb-pop { 0% { transform:scale(0); } 70% { transform:scale(1.25); } 100% { transform:scale(1); } }
.tb-counters { flex:1 1 auto; min-width:0; display:flex; gap:6px; justify-content:flex-end; overflow:hidden; white-space:nowrap; color:var(--ui-dim); font-size:var(--fs-s); font-weight:700; mask-image:linear-gradient(90deg, transparent 0, #000 12px); -webkit-mask-image:linear-gradient(90deg, transparent 0, #000 12px); }
.tb-cb { flex:none; } .tb-cb.cb-chain { color:var(--lights); }
.tb-strip-chips, .tb-show-chips, .tb-rack-chips { display:flex; align-items:center; gap:2px; min-width:0; }
.tb-strip-chips { height:32px; flex:none; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
.tb-strip-chips::-webkit-scrollbar, .tb-show-chips::-webkit-scrollbar { display:none; }
.tb-cw { position:relative; flex:none; width:24px; height:32px; transform:scale(var(--cs,1)); transform-origin:0 50%; margin-right:calc(24px * (var(--cs,1) - 1)); }
.tb-chips[data-size="show"] .tb-cw { width:30px; height:40px; margin-right:calc(30px * (var(--cs,1) - 1)); }
.tb-cw .bb-chip { position:absolute; left:0; top:0; }
.tb-passed { display:flex; align-items:center; gap:3px; height:22px; flex:none; overflow-x:auto; scrollbar-width:none; }
.tb-passed[hidden] { display:none; }
.tb-pl { flex:none; font-size:var(--fs-s); color:var(--ui-dim); font-weight:700; margin-right:2px; }
.tb-pchip { flex:none; position:relative; width:14px; height:20px; }
.tb-pchip .bb-chip { position:absolute; left:0; top:0; transform:scale(.6); transform-origin:0 0; }

/* others row: compact pills */
.tb-others { display:flex; gap:6px; height:32px; align-items:center; overflow:visible; padding:0; }
.tb-others[hidden] { display:none; }
.tb-pill { flex:1 1 0; min-width:0; max-width:130px; height:32px; display:flex; align-items:center; gap:4px; padding:0 8px; border:1.5px solid var(--sc, var(--panel-edge)); border-radius:16px; background:var(--panel); color:var(--ui); font-size:var(--fs-s); font-weight:800; }
.tb-pill .tb-pg { display:inline-flex; flex:none; } .tb-pill .tb-pn { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; flex:1 1 auto; text-align:left; }
.tb-pill .tb-ps { flex:none; font-variant-numeric:tabular-nums; } .tb-pill .tb-pc { flex:none; color:var(--lights); font-size:var(--fs-s); }
.tb-pill .tb-pk { flex:none; display:inline-flex; width:16px; height:16px; border-radius:8px; background:var(--ok); color:var(--ink); align-items:center; justify-content:center; }
.tb-pill .tb-pa { flex:none; display:inline-flex; color:var(--ui-dim); }
.tb-pill[data-locked="1"] { background:rgba(31,199,138,.16); }

/* ===================================================================== your show */
.tb-showrow { position:relative; display:flex; align-items:center; gap:6px; height:56px; padding:0 6px; background:rgba(13,19,50,.72); border-radius:10px; min-width:0; }
.tb-showhint { position:absolute; left:10px; top:0; bottom:0; display:flex; align-items:center; color:var(--ui-dim); font-size:var(--fs-s); }
.tb-show-chips { flex:1 1 0; min-width:0; align-items:center; height:50px; overflow-x:auto; overflow-y:visible; scrollbar-width:none; padding-left:3px; }
.tb-show-chips .bb-run { flex:none; align-items:center; margin:-3px 4px -3px -1px; padding:2px 4px 2px 2px; }
.tb-show-chips .bb-runtag { position:static; align-self:center; margin:0 1px 0 3px; padding:0; border:0; background:none; line-height:16px; font-size:var(--fs-s); color:var(--lights); }
.tb-divider { flex:none; width:2px; height:36px; margin:0 2px 2px; border-radius:1px; background:var(--panel-edge); }
.tb-divider[hidden] { display:none; }
.tb-rack-chips { flex:none; align-items:center; height:40px; }
.tb-rack-chips[hidden] { display:none; }
.tb-tray { flex:none; position:absolute; right:4px; top:-10px; height:24px; min-width:44px; display:flex; align-items:center; justify-content:center; gap:2px; border:1px solid var(--panel-edge); border-radius:12px; background:var(--panel-solid); color:var(--ui-dim); font-size:var(--fs-xs); }
.tb-tray[hidden] { display:none; }
.tb-showrow.zmode { outline:2px solid var(--fuse); outline-offset:-2px; }

/* ===================================================================== score bar */
.tb-score { display:flex; align-items:center; gap:8px; height:28px; padding:0 8px; border:0; border-radius:14px; background:rgba(13,19,50,.72); color:var(--ui); text-align:left; min-width:0; overflow:visible; }
.tb-totbox { flex:none; display:inline-flex; align-items:baseline; gap:3px; }
.tb-total { font-size:calc(18px + var(--bt)); font-weight:900; font-variant-numeric:tabular-nums; }
.tb-total.bump { animation:tb-bump calc(var(--anim)) ease-out; }
@keyframes tb-bump { 0% { transform:translateY(0); } 50% { transform:translateY(-3px) scale(1.1); } 100% { transform:none; } }
.tb-totlab { font-size:var(--fs-s); color:var(--ui-dim); font-weight:700; }
.tb-cats { flex:1 1 auto; min-width:0; display:flex; gap:10px; overflow-x:auto; scrollbar-width:none; white-space:nowrap; font-size:var(--fs-s); line-height:28px; }
.tb-cats::-webkit-scrollbar { display:none; }
.tb-cat { flex:none; display:inline-flex; gap:4px; align-items:baseline; } .tb-cat i { font-style:normal; color:var(--ui-dim); font-weight:600; } .tb-cat b { font-weight:800; color:var(--lights); }
.tb-cat.none { color:var(--ui-dim); }
.tb-score.pulse { animation:tb-bump calc(var(--anim)) ease-out; }

/* ===================================================================== hand */
.tb-hand { position:relative; min-height:0; display:flex; align-items:center; justify-content:center; }
.tb-grid { display:grid; justify-content:center; align-content:center; gap:6px; padding-top:10px; }
.tb-grid[data-size="81"] { grid-template-columns:repeat(4,81px); }
.tb-grid[data-size="65"] { grid-template-columns:repeat(5,65px); gap:4px; }
.tb-grid .bb-card { margin:0; }
.tb-dl { position:absolute; left:26px; right:14px; top:0; height:18px; line-height:18px; text-align:right; font-size:calc(14px + var(--bt)); font-weight:900; color:var(--ink); letter-spacing:-.2px; white-space:nowrap; pointer-events:none; font-variant-numeric:tabular-nums; }
.bb-card[data-size="65"] .tb-dl { top:-1px; height:15px; line-height:15px; right:12px; left:22px; }
.tb-prev { position:absolute; z-index:6; max-width:100%; padding:3px 10px; border:2px solid var(--fuse); border-radius:14px; background:var(--panel-solid); color:var(--ui); font-size:calc(14px + var(--bt)); font-weight:800; line-height:18px; white-space:nowrap; pointer-events:none; box-shadow:0 3px 0 var(--shadow); animation:tb-fade calc(var(--anim) * .4) ease-out; }
.tb-prev[data-neg="1"] { border-color:var(--ember); }
.tb-prev[hidden] { display:none; }
@keyframes tb-fade { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.bb-card.is-y { outline:0; }

/* pass line + Swap toggle */
.tb-pass { display:flex; align-items:center; gap:6px; min-height:24px; padding:0 8px; margin:2px 0; border-radius:12px; background:rgba(13,19,50,.78); font-size:var(--fs-s); color:var(--ui); min-width:0; }
.tb-pass:has(button:not([hidden])) { min-height:44px; }
.tb-passtext { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tb-dirword { color:var(--ui-dim); opacity:.8; }
.tb-rule { display:flex; align-items:center; gap:6px; min-width:0; color:var(--ui); font-size:14px; line-height:1.15; }
.tb-rule > span { overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.tb-rule-badge { flex:0 0 auto; padding:1px 7px; border-radius:999px; background:var(--paper); color:var(--ink); font-weight:800; font-variant-numeric:tabular-nums; }
.tb-prompt { color:var(--fuse); font-weight:800; } .tb-note { color:var(--ui); font-weight:700; }
.tb-info { flex:none; width:44px; height:44px; border:0; border-radius:12px; background:transparent; color:var(--ui); display:flex; align-items:center; justify-content:center; }
.tb-info[hidden], .tb-swap[hidden] { display:none; }
.tb-swap { flex:none; display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 14px; border:1.5px solid var(--panel-edge); border-radius:22px; background:var(--panel); color:var(--ui); font-size:var(--fs-s); font-weight:800; }
.tb-swap.on { background:var(--fuse); color:var(--ink); border-color:var(--fuse); }
.tb-lockrow { display:flex; align-items:stretch; }
.tb-lockbtn { min-height:56px; font-size:calc(19px + var(--bt)); }
.btn.off { opacity:.55; filter:saturate(.45); }
.tb-lockbtn.good { animation:tb-lockpop calc(var(--anim) * .5) ease-out; }
@keyframes tb-lockpop { 0% { transform:scale(.96); } 60% { transform:scale(1.02); } 100% { transform:none; } }

/* ===================================================================== banners and overlays inside the table */
.tb-layer { position:absolute; inset:0; pointer-events:none; z-index:20; overflow:hidden; }
.tb-fly { position:absolute; left:0; top:0; will-change:transform; z-index:8; }
.tb-banners { position:absolute; left:8px; right:8px; top:46px; z-index:12; display:flex; flex-direction:column; gap:6px; pointer-events:none; }
.tb-banners > * { pointer-events:auto; }
.tb-bar { display:flex; align-items:center; gap:8px; padding:6px 8px 6px 12px; min-height:44px; border-radius:12px; background:var(--panel-solid); border:1.5px solid var(--panel-edge); box-shadow:0 4px 0 var(--shadow); font-size:var(--fs-s); font-weight:700; }
.tb-bar span.grow { flex:1; } .tb-bar.warn { border-color:var(--warn); } .tb-bar.ember { border-color:var(--ember); }
.tb-bar .btn { min-height:44px; padding:4px 14px; font-size:var(--fs-s); }
.tb-waiting { padding:0 4px; font-size:var(--fs-s); color:var(--ui-dim); text-align:center; min-height:0; }
.tb-log { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
.tb-glow-ring { position:absolute; pointer-events:none; border-radius:8px; box-shadow:0 0 12px 2px var(--gc, var(--lights)); }
.tb-why { position:absolute; z-index:14; max-width:300px; padding:8px 12px; border-radius:12px; background:var(--paper); color:var(--ink); font-size:var(--fs-s); font-weight:700; box-shadow:0 4px 0 var(--shadow); }

/* ===================================================================== Light your show (S10) */
.tb-lightwrap { position:fixed; inset:0; z-index:38; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; padding:0 16px calc(var(--sab) + 110px); background:linear-gradient(180deg, rgba(6,10,28,.2), rgba(6,10,28,.55) 60%); }
.tb-lightwrap.playing { background:none; pointer-events:none; }
.tb-lightwrap.playing > * { visibility:hidden; }
.tbl.veil > * { visibility:hidden; }
.tb-lightmsg { margin-bottom:14px; padding:6px 14px; border-radius:14px; background:var(--panel); font-size:var(--fs-m); font-weight:800; text-align:center; }
.tb-fuse { position:relative; width:72px; height:72px; border-radius:50%; border:3px solid var(--ink); background:radial-gradient(circle at 35% 30%, #FFC48A, var(--fuse) 55%, #D9531D); color:var(--ink); box-shadow:0 5px 0 var(--shadow); display:flex; align-items:center; justify-content:center; animation:tb-fusepulse 1.1s ease-in-out infinite; }
.tb-fuse svg { width:34px; height:34px; }
.tb-fuse.lit { animation:none; background:radial-gradient(circle at 35% 30%, #fff, var(--lights) 60%, var(--fuse)); }
@keyframes tb-fusepulse { 0%,100% { transform:scale(1); box-shadow:0 5px 0 var(--shadow), 0 0 0 0 rgba(255,138,61,.6); } 50% { transform:scale(1.07); box-shadow:0 5px 0 var(--shadow), 0 0 0 12px rgba(255,138,61,0); } }
html[data-motion="reduced"] .tb-fuse { animation:none; }
.tb-fuselabel { margin-top:8px; font-size:var(--fs-s); font-weight:800; color:var(--ui); text-align:center; }
.tb-lightrow { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; }
.tb-lightcol { display:flex; flex-direction:column; align-items:center; gap:2px; }
.tb-lightcol .tb-fuse { width:64px; height:64px; }
.tb-lightcol.done .tb-fuse { opacity:.5; animation:none; }
.tb-lightbtn { min-height:56px; padding:6px 16px; }
.tb-fusespark { position:absolute; left:50%; bottom:100%; width:2px; height:60px; margin-left:-1px; background:linear-gradient(0deg, var(--lights), transparent); transform-origin:50% 100%; animation:tb-sizzle calc(var(--anim) * 1.33) linear both; }
@keyframes tb-sizzle { 0% { transform:scaleY(0); opacity:1; } 100% { transform:scaleY(1); opacity:.2; } }

/* ===================================================================== sheets: drawer, card sheet, breakdown, summary, final */
.tb-sheetbox { display:flex; flex-direction:column; gap:10px; }
.tb-seatcard { border:1.5px solid var(--panel-edge); border-left:5px solid var(--sc); border-radius:12px; background:rgba(0,0,0,.24); overflow:hidden; }
.tb-seatcard > button.hd { width:100%; min-height:48px; display:flex; align-items:center; gap:8px; padding:6px 10px; border:0; background:transparent; color:var(--ui); font-size:var(--fs-m); font-weight:800; text-align:left; }
.tb-seatcard .hd .sc-score { margin-left:auto; font-variant-numeric:tabular-nums; }
.tb-seatcard .hd .sc-tags { display:flex; gap:6px; align-items:center; font-size:var(--fs-s); color:var(--ui-dim); font-weight:700; }
.tb-seatcard .bd { padding:2px 10px 10px; display:flex; flex-direction:column; gap:8px; }
.tb-seatcard .bd[hidden] { display:none; }
.tb-dchips { display:flex; flex-wrap:wrap; gap:4px; }
.tb-dchip { width:44px; height:48px; display:inline-flex; align-items:center; justify-content:center; border:0; padding:0; background:transparent; border-radius:8px; }
.tb-dchip .bb-chip { transform:scale(1.15); }
.tb-dchip.in-run { background:rgba(255,255,255,.1); outline:1.5px dashed var(--ui); outline-offset:-2px; }
.tb-dcounts { display:flex; flex-wrap:wrap; gap:6px 12px; font-size:var(--fs-s); color:var(--ui-dim); font-weight:700; }
.tb-dcounts b { color:var(--ui); }
.tb-ring { display:flex; align-items:center; justify-content:center; padding:4px 0 2px; }
.tb-ring svg { max-width:100%; height:auto; }
.tb-cardsheet { display:flex; gap:14px; align-items:flex-start; }
.tb-cardsheet .bb-card { cursor:default; }
.tb-cardsheet .rule { font-size:var(--fs-m); line-height:1.45; }
.tb-unseen { margin-top:10px; padding:8px 10px; border-radius:10px; background:rgba(0,0,0,.28); font-size:var(--fs-s); font-weight:700; }
.tb-unseen b { color:var(--lights); }
.tb-bk { width:100%; border-collapse:collapse; font-size:var(--fs-m); }
.tb-bk td, .tb-bk th { padding:0; border-top:1px solid rgba(169,168,201,.16); }
.tb-bk button.row { width:100%; min-height:48px; display:flex; justify-content:space-between; align-items:center; gap:10px; padding:4px 6px; border:0; background:transparent; color:var(--ui); font-size:var(--fs-m); font-weight:700; text-align:left; }
.tb-bk button.row b { font-variant-numeric:tabular-nums; color:var(--lights); }
.tb-bk button.row[disabled] { opacity:.45; }
.tb-bk .sub { font-size:var(--fs-xs); color:var(--ui-dim); font-weight:600; display:block; }
.tb-cards-row { display:flex; flex-wrap:wrap; gap:8px; }
.tb-cards-row .bb-card { cursor:default; }
.tb-why-line { margin:0; font-size:var(--fs-m); line-height:1.4; }

/* summary (S12): rows = seats, columns = categories; sticky seat column */
.tb-sumwrap { overflow-x:auto; margin:0 -4px; -webkit-overflow-scrolling:touch; }
.tb-sum { border-collapse:separate; border-spacing:0; min-width:100%; font-size:var(--fs-m); }
.tb-sum th { position:sticky; top:0; font-size:var(--fs-xs); color:var(--ui-dim); font-weight:800; letter-spacing:0; min-width:46px; padding:4px 3px; text-align:center; background:var(--panel-solid); white-space:nowrap; }
.tb-sum td, .tb-sum th.nm { padding:0; }
.tb-sum th.nm, .tb-sum td.nm { position:sticky; left:0; background:var(--panel-solid); z-index:2; text-align:left; min-width:92px; max-width:112px; padding:0 8px 0 6px; border-right:1px solid rgba(169,168,201,.16); }
.tb-sum td.nm { font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; border-left:4px solid var(--sc); }
.tb-sum td.nm .tb-seat b { max-width:64px; }
.tb-sum tr.me td { background:rgba(255,217,138,.07); } .tb-sum tr.me td.nm { background:#1B2155; }
.tb-sum button.cell { width:44px; min-width:44px; height:44px; border:0; background:transparent; color:var(--ui); font-size:var(--fs-m); font-weight:700; font-variant-numeric:tabular-nums; }
.tb-sum button.cell:disabled { color:var(--ui-dim); font-weight:600; }   /* zero cells: dim but ≥ 4.5:1 (was .5 alpha, 2.9:1) */
.tb-sum button.cell.pos { color:var(--lights); font-weight:900; } .tb-sum button.cell:active { background:rgba(255,255,255,.1); }
.tb-sum td.tot { position:sticky; right:0; background:var(--panel-solid); font-weight:900; font-size:var(--fs-l); text-align:center; min-width:48px; border-left:1px solid rgba(169,168,201,.16); }
.tb-sum th.tot { position:sticky; right:0; z-index:3; }
.tb-sum tr.me td.tot { background:#1B2155; }
.tb-callres { margin:6px 0 8px; font-size:var(--fs-m); font-weight:700; }
.tb-nextrow { display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.tb-nextbar { position:relative; height:44px; border-radius:var(--radius); background:rgba(0,0,0,.34); overflow:hidden; display:flex; align-items:center; justify-content:center; font-weight:800; }
.tb-nextbar i { position:absolute; inset:0 auto 0 0; width:0; background:rgba(255,138,61,.45); }

/* final (S13) */
.tb-final { display:flex; flex-direction:column; gap:12px; }
.tb-podium { display:flex; align-items:flex-end; justify-content:center; gap:8px; height:176px; padding-top:8px; }
.tb-pod { flex:1 1 0; max-width:104px; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:2px; min-width:0; }
.tb-pod .who { display:flex; flex-direction:column; align-items:center; font-weight:800; font-size:var(--fs-s); max-width:100%; }
.tb-pod .who b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:96px; }
.tb-pod .step { width:100%; border-radius:10px 10px 0 0; background:linear-gradient(180deg, var(--sc), rgba(255,255,255,.1)); display:flex; align-items:flex-start; justify-content:center; padding-top:6px; font-size:var(--fs-xl); font-weight:900; color:var(--ink); transform-origin:50% 100%; animation:tb-rise calc(var(--anim) * 2) ease-out both; }
.tb-pod .pts { font-size:var(--fs-l); font-weight:900; font-variant-numeric:tabular-nums; }
@keyframes tb-rise { from { transform:scaleY(0); } to { transform:none; } }
.tb-fin-tie { text-align:center; font-weight:700; color:var(--lights); }
.tb-xp { display:flex; flex-direction:column; gap:6px; padding:10px 12px; border-radius:12px; background:rgba(0,0,0,.28); }
.tb-xp .xpbar > i { width:0; transition:width calc(var(--anim) * 4) ease-out; }
.tb-lvlup { padding:10px 12px; border-radius:12px; background:var(--fuse); color:var(--ink); font-weight:900; text-align:center; animation:tb-lvl calc(var(--anim) * 5) ease-out both; }
@keyframes tb-lvl { from { transform:translateY(-14px); opacity:0; } to { transform:none; opacity:1; } }
.tb-actions { display:flex; flex-direction:column; gap:8px; }
.tb-actions .row { display:flex; gap:8px; } .tb-actions .row .btn { flex:1; }
.tb-whychips { display:flex; flex-wrap:wrap; gap:6px; }
.tb-whychip { min-height:44px; padding:6px 12px; border-radius:22px; border:1.5px solid var(--panel-edge); background:rgba(0,0,0,.28); color:var(--ui); font-size:var(--fs-s); font-weight:700; }

/* ===================================================================== handoff (S14, One Phone) */
.tb-handoff { position:fixed; inset:0; z-index:44; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; padding:calc(var(--sat) + 16px) 20px calc(var(--sab) + 16px); text-align:center; background:var(--hc, var(--panel-solid)); color:var(--ink); -webkit-user-select:none; user-select:none; touch-action:manipulation; }
.tb-handoff.neutral { background:var(--sky-0); color:var(--ui); }
.tb-handoff h1 { font-size:calc(34px + var(--bt)); font-weight:900; color:var(--ink); }
.tb-handoff.neutral h1 { color:var(--ui); }
.tb-handoff .sub { font-size:var(--fs-l); font-weight:700; opacity:.85; }
.tb-handoff .big-glyph { display:flex; align-items:center; justify-content:center; }
.tb-handoff .big-glyph svg { width:96px; height:96px; }
.tb-callgrid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; width:100%; max-width:360px; }
.tb-callgrid .btn { min-height:76px; flex-direction:column; gap:4px; padding:6px 4px; font-size:var(--fs-s); }
.tb-callgrid .btn svg { display:block; }
.tb-hold { position:relative; width:150px; height:150px; border-radius:50%; border:0; background:rgba(22,24,43,.16); color:var(--ink); display:flex; align-items:center; justify-content:center; touch-action:none; -webkit-user-select:none; user-select:none; font-size:var(--fs-l); font-weight:900; text-align:center; }
.tb-hold svg.ring { position:absolute; inset:0; width:100%; height:100%; transform:rotate(-90deg); }
.tb-hold svg.ring circle { fill:none; stroke-width:8; }
.tb-hold svg.ring .bg { stroke:rgba(22,24,43,.22); } .tb-hold svg.ring .fg { stroke:var(--ink); stroke-linecap:round; stroke-dasharray:439.8; stroke-dashoffset:439.8; }
.tb-hold.armed { background:var(--ink); color:var(--paper); }
.tb-holdhint { font-size:var(--fs-s); font-weight:700; opacity:.85; }
.tb-callchips { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.tb-callchip { display:inline-flex; align-items:center; gap:4px; padding:2px 10px; border-radius:14px; background:var(--panel-solid); color:var(--ui); font-size:var(--fs-s); font-weight:800; line-height:24px; }
.tb-callchip.ok { background:var(--ok); color:var(--ink); } .tb-callchip.no { background:var(--ember); color:var(--ink); }

/* ===================================================================== tutorial coach (S20) */
.tb-coach { margin:6px 0 0; padding:8px 10px; border-radius:12px; background:var(--paper); color:var(--ink); font-size:calc(14px + var(--bt)); font-weight:700; line-height:1.3; box-shadow:0 4px 0 var(--shadow); }
.tb-coach[hidden] { display:none; }
.tb-coach .lines p { margin:0 0 4px; } .tb-coach .lines p:last-child { margin:0; }
.tb-coach .skip { float:right; margin:-6px -6px 0 6px; min-height:44px; min-width:44px; padding:0 8px; background:none; border:0; color:#4a4f78; font-weight:800; font-size:var(--fs-s); text-decoration:underline; }

/* ===================================================================== pause menu rows */
.tb-menurows { display:flex; flex-direction:column; gap:8px; }
.tb-menurows .btn { justify-content:flex-start; text-align:left; }
.tb-menurows .btn small { display:block; font-weight:600; opacity:.75; font-size:var(--fs-xs); }
.tb-confirm { display:flex; flex-direction:column; gap:10px; }

/* ===================================================================== setup screens (S02 / S03 / S15) */
.setup-bots { display:flex; flex-direction:column; gap:8px; }
.botrow { display:flex; align-items:center; gap:10px; min-height:52px; padding:6px 10px; border-radius:12px; background:rgba(0,0,0,.28); }
.botrow .nm { flex:1; font-weight:800; display:flex; align-items:center; gap:6px; }
.botrow .seg { max-width:none; }
.humanrow { display:flex; align-items:center; gap:10px; }
.humanrow input { flex:1; min-width:0; }
.daily-calls { display:flex; flex-direction:column; gap:8px; }
.daily-call { display:flex; gap:10px; align-items:center; padding:8px 10px; border-radius:12px; background:rgba(0,0,0,.28); }
.daily-call .nm { font-weight:800; } .daily-call .rl { font-size:var(--fs-s); color:var(--ui-dim); }
.share-card { white-space:pre-wrap; overflow-wrap:anywhere; font:700 calc(13px + var(--bt))/1.5 ui-monospace,Menlo,monospace; padding:12px; border-radius:12px; background:var(--paper); color:var(--ink); user-select:text; -webkit-user-select:text; }
.streak { display:inline-flex; align-items:center; gap:6px; font-weight:800; }

@media (hover:hover) { .tb-strip:hover, .tb-pill:hover { filter:brightness(1.12); } }

.tb-whybtn { flex:none; min-width:44px; min-height:44px; padding:0 10px; border:1.5px solid var(--panel-edge); border-radius:22px; background:var(--panel); color:var(--ui); font-size:var(--fs-s); font-weight:800; }
.tb-whybtn[hidden] { display:none; }
.tb-pill.pulse { animation:tb-bump calc(var(--anim) * 1.2) ease-out; }

/* compact tables (Final): narrower cells so Finale / Fewest / Total fit at 360 */
.tb-sum.compact button.cell { width:44px; min-width:44px; }
.tb-sum.compact th { min-width:44px; padding:4px 1px; }
.tb-sum.compact th.nm, .tb-sum.compact td.nm { min-width:68px; max-width:72px; padding:0 2px 0 5px; }
.tb-sum.compact td.nm .tb-seat b { max-width:38px; overflow:hidden; text-overflow:ellipsis; }
.tb-sum.compact td.tot { min-width:44px; }

.tb-sum td.nm .nmcell { display:flex; flex-direction:column; justify-content:center; min-height:44px; line-height:1.15; }
.tb-sum td.nm small { font-size:var(--fs-xs); color:var(--ui-dim); font-weight:700; }
.tb-sum td.tot { padding:0; text-align:center; }
.tb-sum td.tot button.cell { width:100%; font-size:var(--fs-l); font-weight:900; }
.tb-sumwrap { position:relative; }

.seg.setup-seg { width:100%; max-width:none; justify-content:stretch; flex-wrap:nowrap; }
.seg.setup-seg .btn { flex:1 1 0; padding-left:6px; padding-right:6px; }
.botrow .seg { flex:1 1 auto; max-width:none; flex-wrap:nowrap; justify-content:stretch; }
.botrow .seg .btn { flex:1 1 0; padding-left:6px; padding-right:6px; }

.tb-pass[data-swap="1"] .tb-whybtn, .tb-pass[data-swap="1"] .tb-info { display:none; }
.tb-pill { max-width:190px; }

/* >= 44 px hit areas for the compact rows (the visible size stays the §9.2 budget) */
/* z-index 1: the extensions must sit above the later siblings (the show row, the hand), or a hit-test only finds ~36 px (P9 sweep) */
.tb-pill, .tb-score { position:relative; z-index:1; }
.tb-pill::after { content:""; position:absolute; left:0; right:0; top:-7px; bottom:-7px; }
.tb-score::after { content:""; position:absolute; left:0; right:0; top:-6px; bottom:-10px; }
.tb-call { height:44px; border-radius:22px; }
