/* Science Tug of War — styles. Same game chrome as the other review games (deep navy, gold for the main action,
   raised things on a solid darker bottom edge). Readability floor for a Chromebook at arm's length or a projector:
   body 16px+, HUD 20px+, answers 18px+, the prompt 22-26px, tap targets 48px+. The match fits a 1366x768 window
   (about 1366x650 inside the browser) with no scrolling: the scene (whole-number pixel scale) on top, the question
   panel at the bottom, the HUD over the scene. */
:root {
  --tow-page: #0e1424;
  --tow-panel: #1a2340;
  --tow-raised: #243056;
  --tow-raised-hover: #2d3b69;
  --tow-edge: #0a0f1c;
  --tow-line: #33406a;
  --tow-ink: #f2f5fc;
  --tow-muted: #b4bed8;
  --tow-gold: #ffc53d;
  --tow-gold-edge: #b9820c;
  --tow-gold-ink: #1d1400;
  --tow-good: #3ddc97;
  --tow-good-bg: #10392c;
  --tow-bad: #ff8a8a;
  --tow-bad-bg: #401a22;
  --tow-l: #7cc4ff;          /* side L accent (always paired with a label) */
  --tow-r: #ff9f6b;          /* side R accent */
  --tow-focus: #7cc4ff;
  --tow-font: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tow-mono: 'DM Mono', ui-monospace, monospace;
}

.tow-body { margin: 0; color: var(--tow-ink); background: var(--tow-page); min-height: 100vh; font-size: 16px; line-height: 1.45; }
.tow-app { font-family: var(--tow-font); color: var(--tow-ink); background: var(--tow-page); padding: 20px 16px 40px; }
.tow-app *, .tow-app *::before, .tow-app *::after { box-sizing: border-box; }
.tow-app button, .tow-app input, .tow-app select { font: inherit; }
.tow-app button { cursor: pointer; }
.tow-app :where(button, a, input, select, summary, [tabindex]):focus-visible { outline: 3px solid var(--tow-focus); outline-offset: 3px; }
.tow-app h1, .tow-app h2 { font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.tow-app h1 { font-size: 40px; line-height: 1.1; }
.tow-app h2 { font-size: 26px; }
.tow-app [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tow-app kbd { padding: 0 6px; font: 500 14px/1.4 var(--tow-mono); color: inherit; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); border-bottom-width: 2px; border-radius: 6px; }
.tow-kicker { margin: 0 0 4px; color: var(--tow-muted); font-family: var(--tow-mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.tow-lede { font-size: 18px; color: var(--tow-muted); margin: 0 0 16px; }
.tow-hint { color: var(--tow-muted); margin: 4px 0 12px; }
.tow-msg { min-height: 1.45em; margin: 10px 0 0; color: var(--tow-gold); font-weight: 600; }
.tow-msg.is-bad { color: var(--tow-bad); }
.tow-card { background: var(--tow-panel); border: 2px solid var(--tow-line); border-radius: 14px; padding: 22px; }

/* While a match is on screen the game owns the viewport. */
body.tow-playing { overflow: hidden; }
body.tow-playing .tlg-header, body.tow-playing .tlg-footer, body.tow-playing .tlg-skip, body.tow-playing .tlg-overlay { display: none; }

.tow-screen { display: none; max-width: 1180px; margin: 0 auto; }
.tow-screen.is-active { display: block; }

/* ---- buttons ---------------------------------------------------------------------------------- */
.tow-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 10px;
  font-weight: 700; font-size: 18px; color: var(--tow-ink); background: var(--tow-raised); box-shadow: 0 3px 0 var(--tow-edge); transition: transform .06s, box-shadow .06s, background .12s; }
.tow-btn:hover:not(:disabled) { background: var(--tow-raised-hover); }
.tow-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--tow-edge); }
.tow-btn:disabled { opacity: .55; cursor: not-allowed; }
.tow-btn-go { color: var(--tow-gold-ink); background: var(--tow-gold); box-shadow: 0 3px 0 var(--tow-gold-edge); }
.tow-btn-go:hover:not(:disabled) { background: #ffd162; }
.tow-btn-quiet { background: transparent; box-shadow: inset 0 0 0 2px var(--tow-line); }
.tow-btn-quiet:hover:not(:disabled) { background: rgba(255, 255, 255, .06); }
.tow-btn-bad { background: #8f2a35; box-shadow: 0 3px 0 #4d141b; }
.tow-btn-small { min-height: 40px; padding: 0 12px; font-size: 16px; }
.tow-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 18px; }

/* ---- title ------------------------------------------------------------------------------------ */
.tow-title-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .tow-title-grid { grid-template-columns: 1fr; } }
.tow-me { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 18px; background: rgba(0, 0, 0, .18); border-radius: 12px; }
.tow-me-av { width: 64px; height: 64px; flex: none; }
.tow-me-av canvas { width: 48px; height: 48px; image-rendering: pixelated; }
.tow-me-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tow-me-label { color: var(--tow-muted); font-size: 15px; }
.tow-me-name { font-size: 22px; overflow-wrap: anywhere; }
.tow-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .tow-modes { grid-template-columns: 1fr; } }
.tow-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; text-align: left; color: var(--tow-ink);
  background: var(--tow-raised); border: 0; border-radius: 12px; box-shadow: 0 3px 0 var(--tow-edge); min-height: 96px; }
button.tow-mode:hover:not(:disabled) { background: var(--tow-raised-hover); }
button.tow-mode:disabled { opacity: .6; cursor: not-allowed; }
.tow-mode-main { background: var(--tow-gold); color: var(--tow-gold-ink); box-shadow: 0 3px 0 var(--tow-gold-edge); }
button.tow-mode-main:hover:not(:disabled) { background: #ffd162; }
.tow-mode-title { font-size: 22px; font-weight: 800; }
.tow-mode-sub { font-size: 16px; opacity: .9; }
.tow-mode-row { display: flex; gap: 8px; margin-top: 6px; }
.tow-mode-row .tow-btn { min-height: 44px; padding: 0 16px; font-size: 16px; }
.tow-toggles { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tow-toggle { min-height: 44px; padding: 0 14px; border-radius: 10px; color: var(--tow-ink); background: transparent; border: 2px solid var(--tow-line); font-size: 16px; }
.tow-toggle strong { color: var(--tow-gold); }
.tow-how { margin-top: 16px; color: var(--tow-muted); }
.tow-how summary { cursor: pointer; color: var(--tow-ink); font-weight: 700; min-height: 32px; }
.tow-how ul { margin: 8px 0 0; padding-left: 20px; }
.tow-how li { margin: 4px 0; }

/* Lab Rating board (rows from games/shared/leaderboard.js; .lb-games is ours). */
.tow-board h2 { margin-bottom: 2px; }
.tow-lb-head { display: grid; grid-template-columns: 44px 1fr 70px 60px; gap: 8px; padding: 0 8px 6px; color: var(--tow-muted); font-size: 14px; border-bottom: 1px solid var(--tow-line); }
.tow-lb-head span:nth-child(n+3) { text-align: right; }
.tow-lb-body { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; min-height: 60px; }
.tow-lb-body .lb-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: rgba(0, 0, 0, .16); font-size: 16px; }
.tow-lb-body .lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tow-lb-body .lb-pts { display: flex; gap: 8px; font-family: var(--tow-mono); }
.tow-lb-body .lb-rating { min-width: 56px; text-align: right; color: var(--tow-gold); font-weight: 600; }
.tow-lb-body .lb-games { min-width: 44px; text-align: right; color: var(--tow-muted); }
.tow-lb-you { margin: 10px 0 0; color: var(--tow-muted); }

/* ---- setup screens ---------------------------------------------------------------------------- */
.tow-narrow { max-width: 620px; margin: 0 auto; }
.tow-center { text-align: center; }
.tow-center .tow-actions { justify-content: center; }
.tow-field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 0; font-weight: 600; border: 0; padding: 0; }
.tow-field select, .tow-field input { min-height: 48px; padding: 0 12px; color: var(--tow-ink); background: var(--tow-page); border: 2px solid var(--tow-line); border-radius: 10px; font-size: 18px; font-weight: 400; }
.tow-skill { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.tow-skill legend { width: 100%; margin-bottom: 6px; }
.tow-skill label { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; background: var(--tow-raised); border-radius: 10px; font-weight: 600; cursor: pointer; }
.tow-skill input { width: 20px; height: 20px; accent-color: var(--tow-gold); }
.tow-code-input { font-family: var(--tow-mono); font-size: 32px !important; letter-spacing: .2em; text-transform: uppercase; text-align: center; min-height: 64px !important; }
.tow-code { font-family: var(--tow-mono); color: var(--tow-gold); letter-spacing: .12em; font-size: 34px; }
.tow-big { font-size: 24px; font-weight: 700; margin: 8px 0; }
.tow-spinner { width: 56px; height: 56px; margin: 16px auto; border-radius: 50%; border: 6px solid var(--tow-line); border-top-color: var(--tow-gold); animation: tow-spin 1s linear infinite; }
@keyframes tow-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tow-spinner { animation-duration: 3s; } }

/* ---- lobby ------------------------------------------------------------------------------------ */
.tow-lobby { max-width: 900px; margin: 0 auto; }
.tow-lobby-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.tow-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
@media (max-width: 560px) { .tow-sides { grid-template-columns: 1fr; } }
.tow-side { padding: 14px; border-radius: 12px; background: rgba(0, 0, 0, .18); border: 2px solid var(--tow-line); }
.tow-side h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: 18px; }
.tow-side[data-side="L"] h3 .tow-side-name { color: var(--tow-l); }
.tow-side[data-side="R"] h3 .tow-side-name { color: var(--tow-r); }
.tow-seat { display: flex; align-items: center; gap: 10px; padding: 6px 0; min-height: 52px; }
.tow-seat-av { width: 48px; height: 48px; flex: none; }
.tow-seat-av canvas { width: 48px; height: 48px; image-rendering: pixelated; }
.tow-seat-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.tow-seat-name small { display: block; font-weight: 400; color: var(--tow-muted); font-size: 14px; }
.tow-seat-empty { color: var(--tow-muted); font-style: italic; }
.tow-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .tow-settings { grid-template-columns: 1fr; } }

/* ---- match ------------------------------------------------------------------------------------ */
.tow-screen.tow-game { position: fixed; inset: 0; z-index: 50; max-width: none; margin: 0; flex-direction: column; background: #0b1020; }
.tow-screen.tow-game.is-active { display: flex; }
.tow-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tow-canvas { display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.tow-hud { position: absolute; top: 0; left: 0; right: 0; display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 14px; pointer-events: none;
  background: linear-gradient(rgba(8, 12, 24, .9) 70%, rgba(8, 12, 24, 0)); }
.tow-hud-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.tow-hud-team-l, .tow-hud-team-r { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tow-hud-team-r { justify-content: flex-end; }
.tow-icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em; }
.tow-hud-side { display: flex; flex-direction: column; gap: 0; font-size: 20px; font-weight: 700; min-width: 0; }
.tow-hud-r { align-items: flex-end; text-align: right; }
.tow-hud-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tow-hud-name small { font-weight: 500; color: var(--tow-gold); font-family: var(--tow-mono); font-size: 16px; margin-left: 6px; }
.tow-hud-mid { text-align: center; }
.tow-timer { font: 700 34px/1 var(--tow-mono); color: var(--tow-ink); padding: 6px 14px; background: rgba(0, 0, 0, .5); border: 2px solid var(--tow-line); border-radius: 10px; min-width: 120px; }
.tow-timer.is-low { color: var(--tow-gold); border-color: var(--tow-gold); }
/* Streak flames: an icon AND "N in a row", beside the team. */
.tow-flame { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 3px 10px; border-radius: 999px; font: 800 17px/1.2 var(--tow-font); color: #2a0e00;
  background: linear-gradient(#ffd23f, #ff7a1a); box-shadow: 0 2px 0 #9a3d05; animation: tow-flicker .5s ease-in-out infinite alternate; }
.tow-flame .tow-icon { width: 18px; height: 18px; color: #c4260f; }
@keyframes tow-flicker { to { transform: translateY(-1px) scale(1.05); } }
/* The rope meter: team ends (icon + name), a track from win line to win line, the knot. */
.tow-meter { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.tow-meter-end { display: inline-flex; align-items: center; gap: 6px; font: 700 19px/1 var(--tow-mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.tow-meter-l { color: var(--tow-l); }
.tow-meter-r { color: var(--tow-r); }
.tow-meter-end .tow-icon { width: 22px; height: 22px; }
.tow-meter-track { position: relative; height: 22px; border-radius: 11px; background: rgba(0, 0, 0, .55); border: 2px solid rgba(255, 255, 255, .35);
  background-image: linear-gradient(90deg, rgba(124, 196, 255, .22) 0 4%, transparent 4% 96%, rgba(255, 159, 107, .22) 96%); }
.tow-meter-fill { position: absolute; top: 2px; bottom: 2px; left: 50%; width: 0; border-radius: 8px; transition: left .25s ease-out, width .25s ease-out; }
.tow-meter-fill[data-side="L"] { background: repeating-linear-gradient(135deg, var(--tow-l) 0 8px, #5aa9ea 8px 16px); }
.tow-meter-fill[data-side="R"] { background: repeating-linear-gradient(45deg, var(--tow-r) 0 8px, #ea8a55 8px 16px); }
.tow-meter-tick { position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; background: #fff; }
.tow-meter-mid { left: 50%; }
.tow-meter-knot { position: absolute; top: 50%; left: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #c79a58; border: 3px solid #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .5); transition: left .25s ease-out; }
.tow-meter-knot::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -5px; border: 5px solid transparent; border-top: 9px solid #ee4038; }
@media (prefers-reduced-motion: reduce) { .tow-meter-fill, .tow-meter-knot { transition: none; } .tow-flame { animation: none; } }
.tow-flagread { text-align: center; font-size: 17px; font-weight: 600; color: var(--tow-ink); min-height: 1.4em; text-shadow: 0 1px 2px #000; }
.tow-tags { position: absolute; inset: 0; pointer-events: none; }
.tow-tag { position: absolute; transform: translate(-50%, -100%); padding: 1px 8px; border-radius: 6px; font: 700 16px/1.4 var(--tow-mono); letter-spacing: .06em; white-space: nowrap; background: rgba(8, 12, 24, .82); color: var(--tow-ink); border: 1px solid rgba(255, 255, 255, .3); }
.tow-tag { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.tow-tag.is-you { background: #fff; color: #10172a; border-color: #fff; }
.tow-tag.is-bot { color: var(--tow-muted); }
.tow-tag.is-out { text-decoration: line-through; opacity: .7; }
.tow-banners { position: absolute; left: 0; right: 0; top: 136px; display: grid; grid-template-columns: 1fr auto 1fr; padding: 0 16px; pointer-events: none; }
.tow-banner { justify-self: center; padding: 4px 14px; border-radius: 8px; font: 800 22px/1.3 var(--tow-font); letter-spacing: .04em; color: var(--tow-gold-ink); background: var(--tow-gold); box-shadow: 0 3px 0 var(--tow-gold-edge); }
.tow-banner-l { grid-column: 1; justify-self: start; }
.tow-banner-mid { grid-column: 2; background: #ff6b6b; color: #22070a; box-shadow: 0 3px 0 #8f2a35; }
.tow-banner-r { grid-column: 3; justify-self: end; }
.tow-banner.is-flash { animation: tow-flash .5s ease-out 2; }
@keyframes tow-flash { 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .tow-banner.is-flash { animation: none; } }
.tow-quit { position: absolute; right: 16px; bottom: 10px; min-height: 40px; padding: 0 14px; border-radius: 8px; color: var(--tow-muted); background: rgba(8, 12, 24, .7); border: 1px solid var(--tow-line); font-size: 15px; }
.tow-quit:hover { color: var(--tow-ink); }

.tow-intro { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 40px; background: rgba(8, 12, 24, .86); }
.tow-intro-side { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 200px; }
.tow-intro-avs { display: flex; gap: 6px; }
.tow-intro-avs canvas { image-rendering: pixelated; }
.tow-intro-name { font-size: 24px; font-weight: 800; text-align: center; }
.tow-intro-rating { font: 600 20px var(--tow-mono); color: var(--tow-gold); }
.tow-intro-team { display: inline-flex; align-items: center; gap: 6px; font: 700 17px var(--tow-mono); letter-spacing: .1em; }
.tow-intro-side:first-child .tow-intro-team { color: var(--tow-l); }
.tow-intro-side:nth-child(3) .tow-intro-team { color: var(--tow-r); }
.tow-vs { font: 900 56px var(--tow-font); color: var(--tow-gold); }
.tow-pull { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 900 96px var(--tow-font); color: var(--tow-gold); background: rgba(8, 12, 24, .6); text-shadow: 0 6px 0 var(--tow-gold-edge); }

.tow-results { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(8, 12, 24, .55); padding: 16px; overflow-y: auto; }
.tow-results-card { width: min(560px, 100%); text-align: center; margin: auto 0; }
.tow-results-card > h2 { font-size: 40px; }
.tow-res-how { font-size: 20px; color: var(--tow-muted); margin: 0 0 12px; }
.tow-res-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.tow-res-stats div { padding: 10px; border-radius: 10px; background: rgba(0, 0, 0, .2); }
.tow-res-stats dt { color: var(--tow-muted); font-size: 15px; }
.tow-res-stats dd { margin: 0; font: 700 26px var(--tow-mono); }
.tow-res-reward { font-size: 18px; margin: 14px 0 0; min-height: 1.4em; }
.tow-res-reward strong { color: var(--tow-gold); }
.tow-results .tow-actions { justify-content: center; }

/* Question panel: a lab-bench slab under the scene, your team's color along its top edge. Sized for the back of a
   classroom on a projector: prompt 28px, answers 22px on 60px+ buttons. */
.tow-panel { flex: none; padding: 12px max(24px, calc((100% - 1180px) / 2)) 16px; background: linear-gradient(#232c4a, #1a2240); border-top: 6px solid var(--tow-line); box-shadow: 0 -2px 0 #0a0f1c; min-height: 250px; }
.tow-panel[data-side="L"] { border-top-color: var(--tow-l); }
.tow-panel[data-side="R"] { border-top-color: var(--tow-r); }
.tow-q-meta { display: flex; gap: 14px; align-items: center; min-height: 28px; color: var(--tow-muted); font-family: var(--tow-mono); font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.tow-streak { color: var(--tow-gold); font-weight: 700; }
.tow-afk { margin-left: auto; color: var(--tow-bad); text-transform: none; letter-spacing: 0; font-family: var(--tow-font); font-weight: 700; font-size: 18px; }
.tow-prompt { margin: 4px 0 12px; font-size: 28px; font-weight: 700; line-height: 1.25; min-height: 1.25em; color: #fff; }
.tow-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tow-options.is-tf { grid-template-columns: 1fr 1fr; max-width: 720px; }
.tow-opt { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 16px; text-align: left; font-size: 22px; font-weight: 600; color: #fff; background: #2c3a6b;
  border: 2px solid #4a5c9a; border-radius: 12px; box-shadow: 0 4px 0 var(--tow-edge); line-height: 1.2; transition: transform .06s, box-shadow .06s, background .12s; }
.tow-opt:hover:not(:disabled) { background: #3a4c88; border-color: #8fa4e6; }
.tow-opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--tow-edge); }
.tow-opt:disabled { cursor: default; }
.tow-opt kbd { flex: none; min-width: 34px; text-align: center; font-size: 17px; color: var(--tow-gold); border-color: rgba(255, 197, 61, .5); }
.tow-panel.is-locked .tow-opt, .tow-panel.is-locked .tow-typed { opacity: .55; }
.tow-typed { display: flex; gap: 12px; max-width: 820px; }
.tow-input { flex: 1; min-height: 60px; padding: 0 16px; font-size: 22px; color: #fff; background: var(--tow-page); border: 2px solid #4a5c9a; border-radius: 12px; }
.tow-typed .tow-btn { min-height: 60px; font-size: 20px; }
.tow-stumble { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 16px; margin-top: 4px; font-size: 22px; border-radius: 12px; background: var(--tow-bad-bg); border: 2px solid var(--tow-bad); }
.tow-stumble strong { color: var(--tow-bad); }
.tow-stumble-answer { font-weight: 800; color: #fff; }
.tow-stumble-bar { flex-basis: 100%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.tow-stumble-bar span { display: block; height: 100%; width: 100%; background: var(--tow-bad); transform-origin: left; }
.tow-feedback { margin: 8px 0 0; min-height: 1.4em; font-size: 20px; font-weight: 700; }
.tow-feedback.is-good { color: var(--tow-good); }
.tow-feedback.is-bad { color: var(--tow-bad); }

.tow-dialog { max-width: 460px; padding: 22px; color: var(--tow-ink); background: var(--tow-panel); border: 2px solid var(--tow-line); border-radius: 14px; font-family: var(--tow-font); }
.tow-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.tow-dialog h2 { margin-top: 0; }

/* Short windows (a Chromebook at 1366x768 with the browser bar): a slightly tighter panel. */
@media (max-height: 700px) {
  .tow-panel { min-height: 226px; padding-top: 8px; padding-bottom: 10px; }
  .tow-prompt { font-size: 26px; margin-bottom: 8px; }
  .tow-opt { min-height: 54px; font-size: 21px; }
  .tow-feedback { margin-top: 6px; font-size: 18px; }
  .tow-timer { font-size: 30px; padding: 4px 12px; }
  .tow-hud { padding-top: 6px; gap: 4px; }
  .tow-banners { top: 120px; }
}
@media (max-width: 700px) { .tow-options { grid-template-columns: 1fr; } .tow-intro { flex-direction: column; gap: 12px; } }
