:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efebe3;
  --text: #1d1b26;
  --muted: #6b6878;
  --line: #e1ddd3;
  --brand: #4f3fd8;
  --go: #15803d;
  --warn: #c0262d;
  --A: #2563eb;
  --A-soft: #e1eaff;
  --B: #e5580f;
  --B-soft: #ffe7d9;
  --shadow: 0 1px 2px rgba(20, 16, 40, 0.06), 0 6px 18px rgba(20, 16, 40, 0.07);
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #121118;
    --surface: #1d1b25;
    --surface-2: #272431;
    --text: #f2f0f8;
    --muted: #a6a2b5;
    --line: #34303f;
    --brand: #8577ff;
    --go: #1f9d55;
    --warn: #e5484d;
    --A: #5b8cff;
    --A-soft: #1c2747;
    --B: #ff8a4c;
    --B-soft: #43241a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #121118;
  --surface: #1d1b25;
  --surface-2: #272431;
  --text: #f2f0f8;
  --muted: #a6a2b5;
  --line: #34303f;
  --brand: #8577ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 560px; margin: 0 auto; padding: 0 16px 140px; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: 28px; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 0 0 10px; }
h2 small, h3 small { color: var(--muted); font-weight: 600; }
a { color: var(--brand); }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.center-text { text-align: center; }
.boot { padding: 80px 0; text-align: center; color: var(--muted); font-size: 18px; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; color: var(--muted); }
label { font-weight: 600; }

/* ---------- building blocks ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; margin: 12px 0; box-shadow: var(--shadow); }
.stack { display: grid; gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 14px; padding: 12px 16px; font: inherit; font-weight: 700; min-height: 50px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; text-align: center;
  transition: transform 0.06s ease, opacity 0.15s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.big { width: 100%; min-height: 64px; font-size: 21px; }
.btn.primary { background: var(--brand); border-color: transparent; color: #fff; }
.btn.go { background: var(--go); border-color: transparent; color: #fff; }
.btn.warn { background: transparent; border-color: var(--warn); color: var(--warn); }
.btn.ghost { background: transparent; }
.btn.buzz { background: var(--warn); border-color: transparent; color: #fff; min-height: 104px; font-size: 32px; letter-spacing: 0.06em; }
.btn.start { font-size: 30px; letter-spacing: 0.14em; min-height: 88px; }
.btn.big-link { justify-content: space-between; min-height: 60px; font-size: 18px; }
.btn.big-link small { opacity: 0.85; font-weight: 600; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; font-weight: 800; }
input, select {
  font: inherit; font-size: 18px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); width: 100%;
}
input:focus-visible, select:focus-visible, .btn:focus-visible, .chip:focus-visible, .seg button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.code { font-family: ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace; font-weight: 800; letter-spacing: 0.08em; }
.code-input { text-transform: uppercase; letter-spacing: 0.25em; font-weight: 800; max-width: 150px; text-align: center; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--muted); }
.check input { width: auto; }

.banner { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 8px 0; display: flex; gap: 10px; align-items: center; justify-content: space-between; font-weight: 600; }
.banner.warn { background: #fef3c7; color: #78350f; }
.notice { background: var(--surface-2); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.notice .row { margin: 0; }
.notice .btn { flex: 1; }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.on { background: #22c55e; }
.dot.off { background: #a8a29e; }
.tchip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #fff; vertical-align: middle; }
.tchip.tA { background: var(--A); }
.tchip.tB { background: var(--B); }

/* ---------- header ---------- */
.bar { display: flex; align-items: center; gap: 10px; padding: 12px 0 10px; position: sticky; top: 0; background: var(--bg); z-index: 10; border-bottom: 3px solid transparent; }
.bar.tA { border-bottom-color: var(--A); }
.bar.tB { border-bottom-color: var(--B); }
.brand { font-weight: 900; color: var(--brand); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.bar-mid { flex: 1; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- home & join ---------- */
.home .hero { text-align: center; padding: 44px 0 16px; }
.logo {
  font-size: 60px; font-weight: 900; line-height: 0.92; letter-spacing: -0.035em;
  background: linear-gradient(120deg, var(--A), var(--brand) 50%, var(--B)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo.small { font-size: 24px; text-align: center; margin: 32px 0 8px; }
.tag { color: var(--muted); font-size: 18px; margin: 14px 0 0; }
.center { padding-top: 12px; }
.join h1 .code { color: var(--brand); }

/* ---------- lobby ---------- */
.invite-row { display: flex; gap: 14px; align-items: center; }
.invite-text { flex: 1; min-width: 0; }
.link { font-weight: 700; word-break: break-all; margin: 4px 0 6px; }
.qr { width: 112px; height: 112px; background: #fff; border-radius: 12px; padding: 6px; flex: none; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 13px; padding: 4px; gap: 4px; margin: 8px 0; }
.seg button { border: 0; background: transparent; padding: 10px 4px; border-radius: 10px; font: inherit; font-weight: 700; color: var(--muted); min-height: 46px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg button:disabled { cursor: default; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 13px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted); }
.chip.on { background: var(--brand); color: #fff; border-color: transparent; }
.chip:disabled { cursor: default; }
.chip.ghost { border-style: dashed; background: transparent; }
.more { margin-top: 8px; }
.label.field { margin: 14px 0 0; }
.muted.small { font-size: 14px; margin: 6px 0 0; }
.pick { margin-top: 12px; text-align: left; }
.center-cats { justify-content: center; }
.more summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 6px 0; }
.estimate { margin: 12px 0 0; color: var(--muted); }
.estimate b { color: var(--text); }
.rules { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.pchips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchips.col { flex-direction: column; align-items: stretch; }
.pchip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); border: 0; font: inherit; color: var(--text); text-align: left; min-height: 42px; }
button.pchip { cursor: pointer; }
.pchip em { color: var(--muted); font-style: normal; font-size: 13px; }
.swap { margin-left: auto; color: var(--muted); }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.team { border-radius: 14px; padding: 10px; min-width: 0; }
.team.tA { background: var(--A-soft); }
.team.tB { background: var(--B-soft); }
.team h3 { margin: 2px 2px 10px; font-size: 16px; }
.team.tA h3 { color: var(--A); }
.team.tB h3 { color: var(--B); }
.team .pchip { background: var(--surface); }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 18px 16px max(14px, env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--bg) 35%); z-index: 20; }
.sticky-cta > * { max-width: 528px; margin-left: auto; margin-right: auto; }
/* Buttons are inline-flex elsewhere; auto margins only center block-level boxes. */
.sticky-cta > .btn { display: flex; }
.waiting { text-align: center; font-weight: 700; background: var(--surface); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }

/* ---------- ready ---------- */
.progress { text-align: center; color: var(--muted); font-weight: 700; font-size: 14px; margin-top: 10px; }
.upnext { text-align: center; border: 3px solid transparent; }
.upnext h1 { font-size: 34px; margin: 6px 0; }
.upnext.mine { border-color: var(--brand); }
.upnext.mine.tA { border-color: var(--A); }
.upnext.mine.tB { border-color: var(--B); }
.upnext .row { justify-content: center; }
.kicker { text-transform: uppercase; letter-spacing: 0.09em; font-size: 12px; font-weight: 900; color: var(--muted); }
.offline { color: var(--warn); font-weight: 700; margin: 6px 0; }
.role { font-weight: 600; }
.summary h2 .pts { color: var(--brand); }
.results { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.res { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 12px; background: var(--surface-2); }
.res .w { font-weight: 800; min-width: 0; overflow-wrap: anywhere; }
.res .st { font-size: 14px; font-weight: 700; text-align: right; }
.res.got .st { color: var(--go); }
.res.foul .st { color: var(--warn); }
.res.skip .st, .res.timeout .st { color: var(--muted); }
.res select { font-size: 16px; padding: 6px 8px; width: auto; max-width: 58%; }
.btn.start:disabled { opacity: 0.55; }
.scores2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sc { border-radius: 16px; padding: 14px 10px; text-align: center; color: #fff; min-width: 0; }
.sc.tA { background: var(--A); }
.sc.tB { background: var(--B); }
.sc .n { font-size: 46px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.sc .l { font-weight: 800; opacity: 0.95; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); }
.rank li.me { outline: 2px solid var(--brand); }
.pos { width: 22px; font-weight: 900; color: var(--muted); }
.nm { flex: 1; display: flex; align-items: center; gap: 7px; min-width: 0; }
.pt { font-weight: 900; font-size: 18px; font-variant-numeric: tabular-nums; }

/* ---------- turn (fixed full-height, no scrolling) ---------- */
.turn {
  position: fixed; inset: 0; margin: 0 auto; max-width: 560px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  padding: max(10px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom)); background: var(--bg);
  border-top: 8px solid var(--brand); overflow: hidden;
}
.turn.tA { border-top-color: var(--A); }
.turn.tB { border-top-color: var(--B); }
.turn-head { display: flex; align-items: center; gap: 10px; }
.turn-head .btn, .turn-head .tscore { flex: none; }
.turn-head .who { flex: 1; min-width: 0; font-weight: 700; color: var(--muted); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tscore { font-weight: 900; font-size: 20px; font-variant-numeric: tabular-nums; }
.timer { font-size: clamp(46px, 13vw, 76px); font-weight: 900; text-align: center; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin-top: 4px; }
.bar-track { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 4px 0 2px; }
.bar-track i { display: block; height: 100%; width: 100%; background: var(--brand); border-radius: 999px; transition: width 0.2s linear; }
.turn.tA .bar-track i, .board-turn.tA .bar-track i { background: var(--A); }
.turn.tB .bar-track i, .board-turn.tB .bar-track i { background: var(--B); }
.low .timer { color: var(--warn); animation: pulse 1s ease-in-out infinite; }
.low .bar-track i { background: var(--warn) !important; }
.timeup .timer { color: var(--warn); }
@keyframes pulse { 50% { opacity: 0.55; } }
.turn-card { position: relative; display: flex; flex-direction: column; justify-content: center; justify-content: safe center; align-items: center; text-align: center; gap: 6px; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 6px 0; }
/* Short screens (laptops with browser bars, phones with toolbars): shrink so the whole card always fits. */
@media (max-height: 760px) {
  .timer { font-size: clamp(34px, 7vh, 56px); }
  .word { font-size: clamp(28px, min(10vw, 7vh), 52px); }
  .word.small { font-size: clamp(24px, min(8vw, 6vh), 40px); }
  .taboo { gap: 4px; }
  .taboo li { font-size: 17px; padding: 3px 10px; }
  .dont { margin-top: 2px; }
  .btn.act.go.big { min-height: 64px; font-size: 24px; }
  .btn.buzz { min-height: 72px; font-size: 26px; }
  .btn.guess { min-height: 44px; }
  .qmark { font-size: clamp(80px, 20vh, 150px); }
  .guess-big { font-size: clamp(48px, 12vh, 90px); }
  .turn-actions { gap: 8px; padding-top: 6px; }
}
@media (max-height: 600px) {
  .timer { font-size: 32px; }
  .taboo li { font-size: 15px; padding: 2px 8px; }
  .btn.act.go.big, .btn.buzz { min-height: 56px; }
  .bar-track { margin: 2px 0; }
}
.cat { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.word { font-size: clamp(38px, 11vw, 62px); font-weight: 900; line-height: 1.04; width: 100%; overflow-wrap: normal; word-break: normal; letter-spacing: -0.02em; }
.word.small { font-size: clamp(30px, 9vw, 48px); }
.dont { margin-top: 6px; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; color: var(--warn); }
.taboo { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; width: min(100%, 360px); }
.taboo li { font-size: 21px; font-weight: 800; color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); border-radius: 10px; padding: 5px 10px; }
.watching { font-weight: 800; color: var(--warn); }
.guess-big { font-size: clamp(56px, 18vw, 96px); font-weight: 900; color: var(--brand); line-height: 1; }
.turn.tA .guess-big { color: var(--A); }
.turn.tB .guess-big { color: var(--B); }
.qmark { font-size: clamp(110px, 34vw, 180px); font-weight: 900; line-height: 0.9; color: var(--brand); }
.sub { font-weight: 700; color: var(--muted); font-size: 17px; }
.act-banner { background: #fde68a; color: #713f12; font-weight: 900; padding: 6px 14px; border-radius: 999px; letter-spacing: 0.04em; }
.turn-actions { display: grid; gap: 10px; padding-top: 8px; }
.turn-actions.frozen { pointer-events: none; opacity: 0.5; }
.btn.act.go.big { min-height: 92px; font-size: 28px; }
.who-label { font-weight: 900; text-align: center; font-size: 15px; }
.chips3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.btn.guess { min-height: 54px; font-size: 16px; padding: 6px; background: var(--go); color: #fff; border-color: transparent; overflow: hidden; text-overflow: ellipsis; }
.played { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; font-size: 13px; }
.turn-actions .played { flex-wrap: nowrap; overflow: hidden; height: 26px; min-height: 26px; }
.turn-actions .pl { white-space: nowrap; }
.pl { padding: 3px 9px; border-radius: 999px; background: var(--surface-2); font-weight: 700; color: var(--muted); }
.pl.got { color: var(--go); }
.pl.foul { color: var(--warn); }
.flash { position: absolute; left: 50%; top: 6px; transform: translate(-50%, -12px); opacity: 0; transition: opacity 0.2s, transform 0.2s; padding: 8px 16px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 800; pointer-events: none; white-space: nowrap; max-width: 94%; overflow: hidden; text-overflow: ellipsis; z-index: 3; }
.flash.show { opacity: 1; transform: translate(-50%, 0); }
.flash.got { background: var(--go); color: #fff; }
.flash.foul { background: var(--warn); color: #fff; }
.paused-cover { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); font-size: 42px; font-weight: 900; z-index: 4; border-radius: 16px; }

/* ---------- host sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 8, 20, 0.45); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh; overflow: auto; background: var(--surface); border-radius: 22px 22px 0 0; padding: 16px 16px max(18px, env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25); }
.sheet header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet h2 { margin: 0; }
.sheet h3 { font-size: 15px; margin: 18px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.adjust, .plist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.adjust li, .plist li { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; background: var(--surface-2); border-radius: 12px; }
.adjust li span, .plist li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adjust li b { min-width: 28px; text-align: right; }

/* ---------- game over ---------- */
.winner { text-align: center; font-size: 40px; margin: 28px 0 18px; font-weight: 900; letter-spacing: -0.02em; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 10px 0 18px; }
.step { text-align: center; width: 31%; }
.step .block { color: #fff; font-weight: 900; font-size: 28px; border-radius: 14px 14px 0 0; display: grid; place-items: center; }
.p1 .block { height: 120px; background: #d4a106; }
.p2 .block { height: 90px; background: #8b97a8; }
.p3 .block { height: 66px; background: #b9733a; }
.pn { font-weight: 900; overflow-wrap: anywhere; }
.pp { color: var(--muted); font-weight: 800; margin-bottom: 4px; }
.awards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 16px 0; }
.award { background: var(--surface); border-radius: 16px; padding: 12px; text-align: center; box-shadow: var(--shadow); }
.at { font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 900; }
.an { font-size: 21px; font-weight: 900; }
.ad { color: var(--muted); font-size: 14px; }

/* ---------- toast & confetti ---------- */
#toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; transition: opacity 0.2s, transform 0.2s; background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 700; z-index: 100; pointer-events: none; max-width: 92vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; pointer-events: none; display: none; z-index: 90; }

/* ---------- board (screen-share window) ---------- */
body.is-board #app { max-width: none; padding: 0; }
.board { min-height: 100vh; padding: 22px 36px 30px; display: grid; gap: 18px; align-content: start; }
.board-head { display: flex; align-items: center; gap: 16px; font-size: 20px; }
.board-head .brand { font-size: 26px; }
.bmode { color: var(--muted); flex: 1; font-weight: 700; }
.board .rules { font-size: 21px; line-height: 1.4; }
.board-lobby { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: center; }
.board-lobby h1 { font-size: 60px; margin: 0 0 8px; }
.board-lobby h2 { font-size: 26px; margin-top: 26px; }
.big-link { font-size: clamp(26px, 3.3vw, 46px); font-weight: 900; color: var(--brand); word-break: break-all; }
.bl-right { text-align: center; }
.qr.big { width: min(30vw, 360px); height: auto; aspect-ratio: 1; padding: 12px; border-radius: 20px; }
.code.big { font-size: 60px; margin-top: 8px; }
.board-players .teams { gap: 16px; }
.board-players .pchip { font-size: 20px; }
.phase-turn { grid-template-columns: 1.65fr 1fr; align-items: stretch; }
.phase-turn .board-head, .phase-turn > .banner { grid-column: 1 / -1; }
.board-turn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--surface); border-radius: 26px; padding: 28px; box-shadow: var(--shadow); border-top: 12px solid var(--brand); gap: 8px; min-height: 70vh; }
.board-turn.tA { border-top-color: var(--A); }
.board-turn.tB { border-top-color: var(--B); }
.board-turn .bar-track { width: 80%; height: 14px; }
.bt-who { font-size: 38px; font-weight: 900; }
.timer.huge { font-size: clamp(110px, 15vw, 230px); }
.bt-score { font-size: 28px; color: var(--muted); }
.bt-score b { color: var(--text); }
.played.big { font-size: 22px; margin-top: 10px; }
.played.big .pl { padding: 6px 14px; }
.board-side { display: flex; flex-direction: column; gap: 20px; }
.mini-join { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 700; }
.mini-join .qr { width: 96px; height: 96px; }
.board-ready { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.up-name { font-size: 76px; font-weight: 900; line-height: 1; }
.up-name.tA { color: var(--A); }
.up-name.tB { color: var(--B); }
.up-role { font-size: 28px; color: var(--muted); margin: 6px 0 16px; font-weight: 700; }
.summary.big { font-size: 19px; }
.summary.big .results { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.scores2.big .n { font-size: 100px; }
.scores2.big .l { font-size: 24px; }
.rank.big li { font-size: 24px; padding: 12px 18px; }
.rank.big .pt { font-size: 28px; }
.board-over { text-align: center; }
.board-over .winner { font-size: 84px; }
.board .podium .step { width: 230px; }
.board .p1 .block { height: 230px; font-size: 48px; }
.board .p2 .block { height: 170px; font-size: 40px; }
.board .p3 .block { height: 130px; font-size: 36px; }
.board .pn { font-size: 30px; }
.board .pp { font-size: 26px; }
.board .awards { max-width: 1000px; margin: 20px auto; }
.board .flash { position: static; transform: none; font-size: 26px; margin: 2px auto; max-width: 90%; }
.board .flash:not(.show) { visibility: hidden; }
/* ---------- organizer screen (board + host controls, safe to share) ---------- */
body.is-organizer .board { padding-bottom: 12px; min-height: 0; }
body.is-organizer #app { padding-bottom: 96px; }
.org-tag { background: var(--surface-2); border-radius: 999px; padding: 4px 12px; font-size: 15px; font-weight: 800; color: var(--muted); }
.org-setup { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; padding: 0 36px 20px; align-items: start; }
.org-setup .card { margin: 0; }
.org-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.org-bar .btn { min-height: 48px; }
.org-note { color: var(--muted); font-weight: 600; }
.org-note b { color: var(--text); }
@media (max-width: 900px) {
  .org-setup { grid-template-columns: 1fr; padding: 0 16px 16px; }
}
@media (max-width: 900px) {
  .board { padding: 16px; }
  .board-lobby, .board-ready, .phase-turn { grid-template-columns: 1fr; }
  .board-turn { min-height: 50vh; }
}
@media (max-width: 360px) {
  #app { padding: 0 10px 140px; }
  .btn.guess { font-size: 14px; }
  .taboo li { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .low .timer { animation: none; }
  * { transition: none !important; }
}
