/* Gambit. One stylesheet for every role. */

:root {
  --bg: #121417;
  --surface: #1b1e23;
  --surface-2: #23272e;
  --line: #2f343c;
  --text: #f1f2f4;
  --muted: #a3a9b3;
  --a: #4a86e8;
  --a-strong: #2f6fd6;
  --a-soft: rgba(74, 134, 232, 0.16);
  --b: #e0574a;
  --b-strong: #c9402f;
  --b-soft: rgba(224, 87, 74, 0.16);
  --ok: #3fb26f;
  --ok-soft: rgba(63, 178, 111, 0.16);
  --bad: #e39a35;
  --bad-soft: rgba(227, 154, 53, 0.16);
  --focus: #ffd34d;
  --radius: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

.icon { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }

/* ---------- buttons and inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px; padding: 0.55em 1.1em;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2); font-weight: 600; text-decoration: none; color: var(--text);
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: #fff; }
.btn-quiet { background: transparent; }
.btn-small { min-height: 34px; padding: 0.3em 0.7em; font-size: 0.9em; }
.field {
  width: 100%; min-height: 48px; padding: 0.6em 0.8em;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.field:focus { border-color: var(--muted); }
label.lbl { display: block; font-size: 0.85rem; color: var(--muted); margin: 0 0 0.35rem; font-weight: 600; }
.error { color: #ffb4a8; margin: 0.6rem 0 0; }
.error ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }

.wordmark { font-weight: 800; letter-spacing: -0.01em; }
.wordmark span { color: var(--muted); font-weight: 500; }

.conn-banner {
  position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 50;
  background: #3a2a0c; color: #ffdca0; border: 1px solid #6b4d14;
  padding: 0.5rem 1rem; border-radius: var(--radius); font-weight: 600;
}

/* ---------- landing and login ---------- */
.narrow { max-width: 440px; margin: 0 auto; padding: 12vh 16px 3rem; }
.narrow h1 { font-size: 1.9rem; margin: 0 0 0.25rem; }
.narrow p.sub { color: var(--muted); margin: 0 0 2rem; }
.role-list { display: grid; gap: 0.6rem; }
.role-link {
  width: 100%; text-align: left; font: inherit;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); text-decoration: none; color: var(--text);
}
.role-link:hover { border-color: var(--muted); }
.change-role { background: none; border: 0; padding: 0.3em 0; color: var(--muted); font-size: 0.85rem; text-decoration: underline; }
.change-role:hover { color: var(--text); }
.screen-change { position: fixed; right: 12px; bottom: 8px; opacity: 0; z-index: 30; }
.screen-change:hover, .screen-change:focus-visible { opacity: 1; }
.role-link strong { display: block; font-size: 1.1rem; }
.role-link small { color: var(--muted); }
.stack { display: grid; gap: 1rem; }

/* ---------- team colour helpers ---------- */
.team-A { --tc: var(--a); --tc-strong: var(--a-strong); --tc-soft: var(--a-soft); }
.team-B { --tc: var(--b); --tc-strong: var(--b-strong); --tc-soft: var(--b-soft); }
.tag {
  display: inline-flex; align-items: center; gap: 0.35em;
  font-size: 0.78em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.dot { width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.on { background: var(--ok); }

.outcome { display: inline-flex; align-items: center; gap: 0.35em; font-weight: 700; }
.outcome.correct { color: var(--ok); }
.outcome.wrong { color: var(--bad); }
.outcome.blank { color: var(--muted); }

/* =========================================================
   MAIN SCREEN
   ========================================================= */
.screen {
  height: 100vh; display: grid; grid-template-rows: auto 1fr auto;
  font-size: clamp(16px, 1.25vw, 30px);
  overflow: hidden;
}
.screen-top {
  display: flex; align-items: center; justify-content: space-between; gap: 1em;
  padding: 1em 2em; border-bottom: 1px solid var(--line);
}
.screen-top .meta { display: flex; gap: 1.2em; align-items: center; color: var(--muted); font-weight: 600; }
.screen-top .meta b { color: var(--text); }
.pill {
  border: 1px solid var(--line); border-radius: 999px; padding: 0.15em 0.75em;
  font-size: 0.85em; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text);
}
.pill.easy { border-color: #3d6b4f; color: #8fd6aa; }
.pill.medium { border-color: #7a6326; color: #f0cf7a; }
.pill.hard { border-color: #7a3a33; color: #f3a499; }

.screen-main { display: flex; flex-direction: column; justify-content: center; padding: 2em 4em; min-height: 0; }
.screen-timer {
  font-size: 2.6em; font-weight: 800; min-width: 2.2em; text-align: right;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.timer-low { color: var(--bad); }
.timer-zero { color: var(--muted); }

.phase-title { font-size: 1em; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.8em; }
.question-text { font-size: 2.6em; line-height: 1.2; font-weight: 700; margin: 0 0 1.1em; max-width: 34em; letter-spacing: -0.01em; }
.question-text.long { font-size: 2.1em; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8em; max-width: 60em; }
.option {
  display: flex; gap: 0.8em; align-items: center;
  padding: 0.8em 1em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  font-size: 1.5em; font-weight: 600;
}
.option .letter {
  flex: none; width: 1.8em; height: 1.8em; display: grid; place-items: center;
  border-radius: 4px; background: var(--surface-2); font-weight: 800;
}
.option.is-correct { border-color: var(--ok); background: var(--ok-soft); }
.option.is-correct .letter { background: var(--ok); color: #08140d; }
.option.dim { opacity: 0.45; }
.option .picks { margin-left: auto; display: flex; gap: 0.4em; }
.pick {
  font-size: 0.6em; font-weight: 800; padding: 0.25em 0.6em; border-radius: 4px;
  background: var(--tc); color: #fff; letter-spacing: 0.04em; text-transform: uppercase;
}
.hint { color: var(--muted); font-size: 1.3em; }

.big-centre { text-align: center; }
.big-centre .huge { font-size: 9em; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.big-centre .label { font-size: 1.6em; color: var(--muted); font-weight: 600; margin-top: 0.4em; }

.reveal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2em; margin-top: 1.4em; max-width: 60em; }
.reveal-card { border-left: 6px solid var(--tc); padding: 0.6em 1em; background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.reveal-card .who { color: var(--muted); font-weight: 700; font-size: 0.95em; }
.reveal-card .said { font-size: 1.9em; font-weight: 700; margin: 0.1em 0; overflow-wrap: anywhere; }
.reveal-card .outcome { font-size: 1.3em; }
.reveal-card .detail { color: var(--muted); }
.correct-line { font-size: 1.6em; margin: 0 0 0.2em; }
.correct-line + .result-grid { margin-top: 1em; }
.correct-line b { color: var(--ok); }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2em; max-width: 64em; width: 100%; }
.result-card { border-top: 6px solid var(--tc); background: var(--surface); padding: 1em 1.3em; border-radius: 0 0 var(--radius) var(--radius); }
.result-card h3 { margin: 0 0 0.6em; font-size: 1.3em; }
.result-lines { list-style: none; margin: 0; padding: 0; font-size: 1.25em; }
.result-lines li { display: flex; justify-content: space-between; gap: 1em; padding: 0.25em 0; border-bottom: 1px solid var(--line); }
.result-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 0.6em; }
.result-total .delta { font-size: 2.4em; font-weight: 800; font-variant-numeric: tabular-nums; }
.result-total .now { color: var(--muted); font-size: 1.2em; }
.power-used { color: var(--muted); margin: 0 0 0.6em; display: flex; align-items: center; gap: 0.4em; }
.power-used s { opacity: 0.8; }
.notes { margin: 1.4em 0 0; padding: 0; list-style: none; font-size: 1.25em; color: var(--muted); }
.notes li { margin: 0.2em 0; }

/* Scoreboard along the bottom */
.scoreboard { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.score-team { display: flex; align-items: center; gap: 1.2em; padding: 0.9em 2em; position: relative; }
.score-team::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--tc); }
.score-team + .score-team { border-left: 1px solid var(--line); }
.score-team .name { font-size: 1.5em; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-team .score { font-size: 3.2em; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.score-team .side { display: grid; gap: 0.2em; justify-items: end; color: var(--muted); font-weight: 600; font-size: 0.95em; }
.score-team .status { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85em; }
.status.locked, .status.chosen { color: var(--text); }
.status.timeup, .status.offline { color: var(--bad); }

.lobby-title { font-size: 5em; font-weight: 800; letter-spacing: -0.02em; margin: 0; line-height: 1; }
.lobby-sub { font-size: 1.6em; color: var(--muted); margin: 0.6em 0 2em; }
.lobby-sub b { color: var(--text); }
.lobby-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2em; max-width: 50em; }
.lobby-team { border-left: 6px solid var(--tc); background: var(--surface); padding: 1em 1.3em; border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.4em; }
.lobby-team .tag { font-size: 0.6em; }

.overlay {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10, 11, 13, 0.82); z-index: 20;
  font-size: clamp(28px, 4vw, 90px); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; gap: 0.3em;
}

/* =========================================================
   TEAM DEVICE
   ========================================================= */
.team { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.team-head {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 16px;
  border-bottom: 1px solid var(--line); position: relative;
}
.team-head::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--tc); }
.team-head .name { font-weight: 800; font-size: 1.15rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-head .stat { text-align: right; line-height: 1.1; }
.team-head .stat b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.team-head .stat small { color: var(--muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.team-body { flex: 1; padding: 1.2rem 16px 2rem; display: flex; flex-direction: column; gap: 1rem; }
.team-phase { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.team-phase h2 { margin: 0; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.team-timer { font-size: 2.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.team-msg { font-size: 1.15rem; color: var(--muted); }
.team-notes { display: grid; gap: 0.5rem; }
.note { padding: 0.7rem 0.9rem; border-radius: var(--radius); background: var(--surface-2); border-left: 4px solid var(--muted); font-weight: 600; }
.note.warn { border-left-color: var(--bad); }
.stakes { font-weight: 700; }

.power-grid { display: grid; gap: 0.6rem; }
.power-btn {
  display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.8rem; align-items: center; text-align: left;
  padding: 0.85rem 1rem; min-height: 64px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.power-btn .icon { width: 1.6rem; height: 1.6rem; grid-row: span 2; }
.power-btn strong { font-size: 1.1rem; }
.power-btn small { color: var(--muted); grid-column: 2; }
.power-btn[aria-pressed="true"] { border-color: var(--tc); background: var(--tc-soft); }
.power-btn.pass { grid-template-columns: auto 1fr; }

.answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.answer-btn {
  min-height: 92px; font-size: 2.2rem; font-weight: 800; border-radius: var(--radius);
  border: 2px solid var(--line); background: var(--surface);
}
.answer-btn.tf { font-size: 1.5rem; letter-spacing: 0.06em; }
.answer-btn[aria-pressed="true"] { border-color: var(--tc); background: var(--tc); color: #fff; }
.lock-btn { min-height: 64px; font-size: 1.25rem; width: 100%; }
.lock-btn.ready { background: var(--tc); border-color: var(--tc); color: #fff; }
.blank-btn { width: 100%; }
.text-answer { font-size: 1.3rem; min-height: 60px; }
textarea.text-answer { min-height: 110px; resize: vertical; }

.locked-big {
  text-align: center; padding: 2.2rem 1rem; border: 2px solid var(--tc); border-radius: var(--radius); background: var(--tc-soft);
}
.locked-big .word { font-size: 2.4rem; font-weight: 800; letter-spacing: 0.12em; display: flex; align-items: center; justify-content: center; gap: 0.4em; }
.locked-big .what { font-size: 1.2rem; margin-top: 0.3rem; color: var(--muted); overflow-wrap: anywhere; }
.team-result { font-size: 1.15rem; }
.team-result .delta { font-size: 3rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.inventory { border-top: 1px solid var(--line); padding: 0.9rem 16px 1.4rem; }
.inventory h3 { margin: 0 0 0.5rem; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.inv-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.inv-list li { display: inline-flex; align-items: center; gap: 0.35em; padding: 0.3em 0.65em; border: 1px solid var(--line); border-radius: 4px; font-weight: 600; font-size: 0.95rem; }

.team-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.team-pick button { min-height: 72px; font-size: 1.2rem; font-weight: 800; border: 2px solid var(--tc); background: var(--tc-soft); border-radius: var(--radius); }
.team-pick button[aria-pressed="true"] { background: var(--tc); color: #fff; }
.team-pick small { display: block; font-weight: 500; font-size: 0.8rem; color: var(--muted); }
.team-pick button[aria-pressed="true"] small { color: rgba(255,255,255,0.85); }

/* =========================================================
   HOST
   ========================================================= */
body.host-body {
  --bg: #f4f4f2; --surface: #ffffff; --surface-2: #ecece8; --line: #d7d7d1;
  --text: #17191c; --muted: #5f6570; --ok: #1f7a46; --ok-soft: #e1f2e8; --bad: #9a5a00; --bad-soft: #fbecd6;
  --a: #2563c9; --a-strong: #1d4fa3; --a-soft: #e5eefc; --b: #c0392b; --b-strong: #9e2c20; --b-soft: #fbe7e4;
  --focus: #1d4fa3;
}
.host { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; padding: 16px; max-width: 1500px; margin: 0 auto; }
.host .btn { background: var(--surface); }
.host .btn-primary { background: var(--text); color: #fff; }
.host-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.host-head .phase { font-family: var(--mono); font-weight: 700; padding: 0.2rem 0.6rem; background: var(--text); color: #fff; border-radius: 4px; }
.host-head .links { margin-left: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.panel h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 0.7rem; }
.host-main { display: grid; gap: 16px; align-content: start; min-width: 0; }
.host-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.controls .btn-primary { min-width: 200px; min-height: 52px; font-size: 1.05rem; }
.controls .timer { font-size: 1.8rem; font-weight: 800; margin-left: auto; font-variant-numeric: tabular-nums; }
.kbd { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.live-q { font-size: 1.25rem; font-weight: 700; margin: 0.2rem 0 0.6rem; }
.live-a { margin: 0; }
.live-a b { color: var(--ok); }
.live-opts { margin: 0.4rem 0 0; padding-left: 0; list-style: none; columns: 2; }
.host-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.host-team { border-top: 5px solid var(--tc); }
.host-team .top { display: flex; align-items: center; gap: 0.5rem; }
.host-team .top input { flex: 1; min-width: 0; font-weight: 700; font-size: 1.05rem; border: 1px solid transparent; background: transparent; padding: 0.2rem 0.3rem; border-radius: 4px; }
.host-team .top input:hover, .host-team .top input:focus { border-color: var(--line); background: var(--bg); }
.host-team .nums { display: flex; gap: 1.5rem; margin: 0.5rem 0; }
.host-team .nums div { line-height: 1.1; }
.host-team .nums b { font-size: 2rem; font-variant-numeric: tabular-nums; display: block; }
.host-team .nums small { color: var(--muted); font-weight: 600; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.8rem; margin: 0.6rem 0; font-size: 0.95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.override { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.3rem; }
.override .btn[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip { display: inline-flex; align-items: center; gap: 0.3em; padding: 0.2em 0.3em 0.2em 0.55em; border: 1px solid var(--line); border-radius: 4px; font-size: 0.9rem; font-weight: 600; background: var(--bg); }
.chip button { border: 0; background: transparent; padding: 0 0.25em; color: var(--muted); font-size: 1rem; line-height: 1; }
.chip button:hover { color: var(--text); }
.row { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; margin-top: 0.5rem; }
.row select { min-height: 34px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); padding: 0 0.4rem; }
.qlist { list-style: none; margin: 0; padding: 0; max-height: 70vh; overflow: auto; }
.qlist h3 { font-size: 0.8rem; color: var(--muted); margin: 0.8rem 0 0.3rem; text-transform: uppercase; letter-spacing: 0.06em; }
.qitem { display: flex; gap: 0.6rem; align-items: center; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.qbody { flex: 1; min-width: 0; display: grid; gap: 0.15rem; }
.qitem.used { opacity: 0.45; }
.qitem.next { background: var(--a-soft); }
.qitem .qa { color: var(--muted); font-size: 0.85rem; }
.qitem .qmeta { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; font-weight: 700; letter-spacing: 0.04em; }
.import { display: grid; gap: 0.6rem; }
.flash { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 0.6rem 1rem; border-radius: var(--radius); font-weight: 600; z-index: 40; max-width: calc(100% - 32px); }
.danger { color: var(--b-strong); }
.muted { color: var(--muted); }

@media (max-width: 1000px) {
  .host { grid-template-columns: 1fr; }
  .qlist { max-height: none; }
}
@media (max-width: 640px) {
  .host-teams { grid-template-columns: 1fr; }
}
@media (max-width: 900px) and (orientation: portrait) {
  .screen { font-size: 14px; height: auto; min-height: 100vh; overflow: visible; }
  .screen-main { padding: 1.5em 16px; }
  .options, .reveal-grid, .result-grid, .lobby-teams { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .reveal-card, .result-card, .option.is-correct { transition: background-color 0.25s, border-color 0.25s; }
}

/* ---------- How to play ---------- */
.rules { margin: 0; padding-left: 1.4em; font-size: 1.1rem; line-height: 1.5; }
.rules li { margin: 0.5em 0; padding-left: 0.2em; }
.rules-page { max-width: 560px; margin: 0 auto; padding: 3rem 16px 4rem; }
.rules-page h1 { margin: 0 0 1rem; }
.sheet { position: fixed; inset: 0; background: rgba(10, 11, 13, 0.7); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-inner { background: var(--surface); border: 1px solid var(--line); border-radius: 10px 10px 0 0; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; padding: 1rem 16px 2rem; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.sheet-head h2 { margin: 0; font-size: 1.2rem; }
.rules-overlay { position: fixed; inset: 0; z-index: 25; background: var(--bg); display: grid; place-items: center; }
.rules-screen { font-size: clamp(18px, 2.2vw, 48px); padding: 1em 16px; max-width: 30em; }
.rules-screen h1 { font-size: 1.6em; margin: 0 0 0.6em; }
.rules-screen .rules { font-size: 1em; }
.how-panel h2, .sheet-sub { font-size: 1.2rem; margin: 1rem 0 0.4rem; }
.how-panel { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.power-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem; }
.power-cards li {
  display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.7rem; align-items: center;
  padding: 0.7rem 0.85rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.power-cards .icon { width: 1.5rem; height: 1.5rem; grid-row: span 2; }
.power-cards small { grid-column: 2; color: var(--muted); line-height: 1.35; }
.sheet .power-cards li { background: var(--surface-2); }

/* ---------- Endgame and Hijack ---------- */
:root { --endgame: #e3a63a; }
body.host-body { --endgame: #9a5a00; }
.pill.endgame { border-color: var(--endgame); color: var(--endgame); }
.endgame-title { font-size: 4em; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--endgame); margin: 0 0 0.2em; }
.screen.is-endgame { box-shadow: inset 0 6px 0 var(--endgame); }
.endgame-tag { margin: 0 0 0.4rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--endgame); }
.team.is-endgame .team-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--endgame); }
.hijack-box { border: 1px dashed var(--muted); border-radius: var(--radius); padding: 0.7rem 0.9rem; margin-bottom: 0.9rem; }
.hijack-box b { display: flex; align-items: center; gap: 0.4em; margin-bottom: 0.2rem; }
.hijack-row { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.hijack-row .btn { flex: 1; font-size: 1.1rem; }

/* ---------- Host tidy-up ---------- */
.host-head { min-height: 44px; }
.host-head .phase { font-family: var(--font); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em; }
.host-head .links { align-items: center; }
.game-row { display: flex; gap: 0.3rem; margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px solid var(--line); }
.game-row .btn { color: var(--muted); }
.game-row .btn.danger { color: var(--b-strong); }
.answer-box { background: var(--ok-soft); border-radius: var(--radius); padding: 0.6rem 0.8rem; margin: 0.6rem 0 0.4rem; }
.answer-box .live-a { margin: 0; }
.explain { margin: 0.3rem 0 0; color: var(--text); font-size: 0.95rem; line-height: 1.45; }
.conn { font-size: 0.85rem; color: var(--muted); }
.conn.on { color: var(--ok); font-weight: 600; }
.conn span { color: var(--muted); font-weight: 400; margin-left: 0.3em; }
.host .btn-quiet { background: transparent; }
.power-btn:disabled { opacity: 0.5; cursor: not-allowed; }
