/* Forty Feud. Ink-plum ground, amber for points, coral and teal for the two teams. */
:root {
  --bg: #15101d; --panel: #221a30; --panel-2: #2c2240; --line: #40325c;
  --fg: #f7f2ff; --muted: #a99bc4; --amber: #ffc247; --amber-dark: #b97e0c;
  --t0: #ff6f61; --t1: #35d3bd; --ok: #5fe08f; --bad: #ff5468;
  --cream: #fff4dc; --ink: #1b1426;
  --display: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  --body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--body); background: var(--bg); color: var(--fg); }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; }
h1 { margin: .4em 0 .5em; font-size: 2rem; }
h2 { margin: 0 0 .5em; font-size: 1.4rem; }
a { color: var(--amber); }
.big { font-size: 1.3rem; }
.muted { color: var(--muted); }
.error { color: var(--bad); }
.spacer { flex: 1; }
label { display: block; margin-bottom: 12px; }
input[type=text], input[type=password], input[type=number], select {
  font: inherit; font-size: 1.05rem; padding: 8px 10px; border-radius: 6px;
  border: 2px solid var(--line); background: var(--ink); color: var(--fg); }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
form > label input[type=text] { width: 100%; font-size: 1.3rem; padding: 12px; margin-top: 4px; }
button, .button {
  display: inline-block; font-family: var(--body); font-weight: 800; font-size: 1rem; padding: 9px 16px;
  border-radius: 6px; border: 2px solid var(--line); background: var(--panel-2); color: var(--fg);
  cursor: pointer; text-decoration: none; white-space: nowrap; }
button:hover:not(:disabled), .button:hover { border-color: var(--muted); }
button.primary, .button.primary { background: var(--amber); color: var(--ink); border-color: var(--amber-dark); }
button.danger { background: var(--bad); color: var(--ink); border-color: #a51f33; }
button.on { background: var(--ink); color: var(--ok); border-color: var(--ok); }
button.small, .button.small { font-size: .85rem; padding: 5px 10px; }
button.link { background: none; border: 0; color: var(--muted); padding: 4px 0; font-weight: 400; }
button:disabled { opacity: .4; cursor: default; }
[hidden] { display: none !important; }
.card { background: var(--panel); border: 2px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 10px 0; }

/* ---------- host console ---------- */
ul.games { list-style: none; padding: 0; margin: 0 0 20px; }
.game .row { display: flex; gap: 10px; align-items: center; }
.game .info { flex: 1; min-width: 0; }
.game .game-title { font-family: var(--display); font-size: 1.3rem; }
.game form.end-game { display: inline; }
.links { display: flex; gap: 16px; align-items: center; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 3px dashed var(--line);
  border-radius: 8px; background: var(--panel); cursor: pointer; text-align: center; margin: 0 0 16px; }
.dropzone.over { border-color: var(--amber); background: var(--panel-2); }
.dropzone input { display: none; }

/* ---------- admin page ---------- */
body.admin main { max-width: 1180px; }
.adminbar { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.adminbar .home { font-family: var(--display); color: var(--amber); text-decoration: none; font-size: 1.2rem; }
.adminbar .game-name { font-weight: 800; font-size: 1.1rem; }
.adminbar .public { margin-left: auto; color: var(--muted); }
.adminbar .public a { margin: 0 6px; }
.conn.down { color: var(--bad); font-weight: 800; }
#err { min-height: 1.3em; margin: 6px 0; font-weight: 600; }
.stages { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.stages .stage small { margin-left: 6px; color: var(--amber); }
.stages .stage.on { background: var(--amber); color: var(--ink); border-color: var(--amber-dark); }
.stages .stage.on small { color: var(--ink); }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.admin .team { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; background: var(--panel);
  border: 2px solid var(--line); border-left-width: 10px; border-radius: 8px; padding: 10px 14px; }
.admin .team.t0, .admin th.t0 { border-left-color: var(--t0); }
.admin .team.t1, .admin th.t1 { border-left-color: var(--t1); }
.admin .team .team-name { font-weight: 800; font-size: 1.15rem; min-width: 0; width: 100%; }
.admin .team .score { font-family: var(--display); font-size: 2.2rem; color: var(--amber); grid-row: span 2; text-align: right; min-width: 3ch; }
.admin .team .adjust { display: flex; gap: 6px; align-items: center; font-size: .9rem; }
.admin .team .adjust input { width: 6.5em; font-size: .9rem; padding: 4px 8px; }
.panel { background: var(--panel); border: 2px solid var(--line); border-radius: 8px; padding: 16px; }
.panel h2 .mult { margin-left: 12px; font-family: var(--body); font-weight: 800; font-size: .95rem; color: var(--ink); background: var(--amber); border-radius: 99px; padding: 3px 12px; vertical-align: middle; }
.panel .question { font-size: 1.35rem; font-weight: 600; margin: 0; }
.question-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
table { border-collapse: collapse; width: 100%; }
td, th { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
td.num, th.num { text-align: right; }
table.answers .rank { width: 2.2em; font-family: var(--display); color: var(--muted); }
table.answers .answer { font-size: 1.15rem; font-weight: 600; }
table.answers .points { font-family: var(--display); font-size: 1.15rem; color: var(--amber); }
table.answers .do { text-align: right; width: 7em; }
table.answers tr.revealed .answer, table.answers tr.revealed .rank { color: var(--ok); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.controls .strikes { display: inline-flex; gap: 6px; margin-right: 6px; }
.controls .strikes .x { width: 1.9em; height: 1.9em; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid var(--line); color: var(--line); font-weight: 800; }
.controls .strikes .x.lit { border-color: var(--bad); color: var(--bad); }
.controls.bank .bank-sum { font-size: 1.15rem; margin-right: 6px; }
.controls.bank .bank-sum b { font-family: var(--display); color: var(--amber); font-weight: 400; }
.controls.bank .awarded { color: var(--ok); font-weight: 800; }
button.give.t0 { background: var(--t0); border-color: #a83428; }
button.give.t1 { background: var(--t1); border-color: #14806f; }
.keys { margin: 14px 0 0; font-size: .85rem; }
.check { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.clock { font-family: var(--display); font-variant-numeric: tabular-nums; }
.admin .clock { font-size: 1.8rem; min-width: 3.2em; color: var(--muted); }
.admin .clock.running { color: var(--amber); }
.admin .clock.out { color: var(--bad); }
table.final-grid { margin-top: 12px; table-layout: fixed; }
table.final-grid th { vertical-align: top; }
table.final-grid th:first-child { width: 34%; }
table.final-grid th.t0, table.final-grid th.t1 { border-left: 6px solid; padding-left: 10px; }
table.final-grid th .who { color: var(--fg); font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }
table.final-grid th input, table.final-grid td.cell input, table.final-grid td.cell select { width: 100%; font-size: .95rem; padding: 5px 8px; }
table.final-grid td { vertical-align: top; }
table.final-grid tr.current td.q { background: var(--panel-2); box-shadow: inset 4px 0 0 var(--amber); }
table.final-grid .q-head { display: flex; gap: 8px; align-items: baseline; }
table.final-grid .q-head .rank { font-family: var(--display); color: var(--muted); }
table.final-grid .q-head .question { flex: 1; font-size: 1.05rem; }
table.final-grid .survey { font-size: .82rem; margin-top: 4px; }
table.final-grid td.cell { display: table-cell; }
table.final-grid td.cell select { margin-top: 4px; }
table.final-grid td.cell.off { opacity: .6; }
.cell-do { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 5px; }
.cell-do .total { color: var(--amber); font-weight: 800; font-size: .9rem; }
.cell-do .dup { color: var(--bad); font-weight: 800; font-size: .8rem; }

/* ---------- public board ----------
   A lit board on a dark stage. Everything inside #view is sized in cqh/cqw,
   shares of #view's own box, so the board fills whatever room it is given. */
body.board { overflow: hidden; display: flex; flex-direction: column; height: 100vh; background: #0b0712; }
body.board main { flex: 1; min-height: 0; width: 100%; max-width: none; padding: 0; }
body.board #view { height: 100%; container-type: size; position: relative; overflow: hidden;
  background:
    radial-gradient(46% 50% at 50% 54%, rgba(125, 85, 255, .30), transparent 72%),
    conic-gradient(from 118deg at 0% 0%, transparent 0 8deg, rgba(255, 111, 97, .13) 15deg, transparent 27deg),
    conic-gradient(from 215deg at 100% 0%, transparent 0 8deg, rgba(53, 211, 189, .12) 15deg, transparent 27deg),
    linear-gradient(180deg, #1d1331 0%, #120b1f 58%, #0b0712 100%); }
.screen { height: 100%; display: flex; flex-direction: column; padding: 2.2cqh 2.4cqw 2.4cqh; gap: 1.6cqh; }
.screen.enter { animation: enter .5s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(1.5cqh); } }
.chip { position: fixed; left: 50%; top: 8px; transform: translateX(-50%); z-index: 5; font-size: .8rem; padding: 4px 10px; opacity: .6; }  /* top centre: the one spot no screen draws on */
.chip[hidden] { display: none; }
.top { display: flex; align-items: baseline; gap: 1.6cqw; font-family: var(--display); }
.top .title { color: var(--amber); font-size: 2.6cqh; letter-spacing: .04em; text-transform: uppercase; }
.top .where { font-size: 2.6cqh; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.top .mult { margin-left: auto; font-size: 2.4cqh; color: var(--ink); background: var(--amber); padding: .4cqh 1.4cqw; border-radius: 99px; text-transform: uppercase; }
.board .question { min-height: 10.5cqh; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 800;
  font-size: calc(4.8cqh * var(--fit, 1)); line-height: 1.1; padding: 0 4cqw; text-wrap: balance; text-shadow: 0 .4cqh 1.2cqh rgba(0, 0, 0, .6); }
.board .question.blank::before { content: ""; width: 22cqw; height: .5cqh; border-radius: 99px; background: var(--line); }

/* the frame: a bezel with a ring of bulbs around a dark well */
.frame { position: relative; border-radius: 4.6cqh; padding: 3.9cqh;
  background: linear-gradient(155deg, #5c448d 0%, #2b1e49 26%, #1c1332 62%, #4a3572 100%);
  box-shadow: 0 0 0 .5cqh #09060f, 0 2.6cqh 7cqh rgba(0, 0, 0, .65), 0 0 14cqh rgba(125, 85, 255, .32); }
.frame .bulbs { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.frame .bulbs rect { x: 1.95cqh; y: 1.95cqh; width: calc(100% - 3.9cqh); height: calc(100% - 3.9cqh); rx: 2.7cqh; fill: none;
  stroke: #fff1c9; stroke-width: 1.25cqh; stroke-linecap: round; stroke-dasharray: 0 4; animation: bulb 1.2s steps(1) infinite; }
.frame .bulbs rect.b { stroke-dashoffset: 2; animation-delay: -.6s; }
@keyframes bulb { 0% { stroke: #fff1c9; filter: drop-shadow(0 0 .7cqh var(--amber)); } 50% { stroke: #7a5f24; filter: none; } }
.frame .well { position: relative; height: 100%; min-height: 0; border-radius: 1.5cqh; background: #0c0814;
  box-shadow: 0 0 0 .4cqh #09060f, inset 0 1cqh 3cqh rgba(0, 0, 0, .85); }

/* a main round: team, board, team */
.stage { flex: 1; min-height: 0; display: grid; grid-template-columns: 16cqw 1fr 16cqw; gap: 2.2cqw; align-items: center; }
.boardwrap { align-self: stretch; position: relative; min-height: 0; display: flex; flex-direction: column; padding: 6.6cqh 0 4.6cqh; }
.boardwrap .frame { flex: 1; min-height: 0; }
.mount { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); display: flex; align-items: center; background: #0c0814; border-radius: 2cqh;
  box-shadow: 0 0 0 .5cqh #09060f, 0 0 0 1.1cqh #4a3572, 0 0 0 1.5cqh #09060f, 0 1.2cqh 3cqh rgba(0, 0, 0, .6); }
.bank { top: 1.5cqh; height: 9.6cqh; gap: 1.2cqw; padding: 0 2cqw; }
.bank .label { max-width: 8cqw; text-align: right; text-transform: uppercase; letter-spacing: .06em; line-height: 1.15; color: var(--muted); font-weight: 800; font-size: 1.8cqh; }
.bank b { min-width: 3ch; text-align: center; font-family: var(--display); font-weight: 400; font-size: 7.6cqh; line-height: 1; color: var(--amber);
  font-variant-numeric: tabular-nums; text-shadow: 0 0 2.4cqh rgba(255, 194, 71, .55); }
.bank .times { font-family: var(--display); font-size: 3.2cqh; color: var(--fg); }
.bank.given b { color: var(--ok); text-shadow: 0 0 2.4cqh rgba(95, 224, 143, .5); }
.board .strikes { bottom: 1.5cqh; height: 7.4cqh; gap: 1cqw; padding: 0 1.2cqw; }
.board .strikes .x { width: 5cqh; height: 5cqh; display: flex; align-items: center; justify-content: center; border-radius: 1.1cqh; background: #1a1229;
  box-shadow: inset 0 0 0 .35cqh #33264f; color: transparent; font-size: 3.4cqh; font-weight: 800; line-height: 1; }
.board .strikes .x.lit { background: var(--bad); color: var(--ink); box-shadow: 0 0 2.4cqh rgba(255, 84, 104, .75); }
.tiles { height: 100%; display: grid; grid-template-rows: repeat(var(--rows), 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1.2cqh 1cqw; padding: 1.6cqh 1.2cqw; }
.tiles.one { width: 68%; margin: 0 auto; }
.tile { position: relative; perspective: 120cqh; min-height: 0; }
.tile .face { position: absolute; inset: 0; border-radius: 1.1cqh; backface-visibility: hidden; display: flex; align-items: center; overflow: hidden; }
.tile .front { justify-content: center; background: linear-gradient(180deg, #3b2d5e 0%, #2a1f45 48%, #1f1636 52%, #281d42 100%);
  box-shadow: inset 0 0 0 .35cqh #56428233, inset 0 .35cqh 0 #6a549a; }
.tile.blank .front { background: #150e23; box-shadow: inset 0 0 0 .3cqh #241a3a; }
.tile .front .num { display: flex; align-items: center; justify-content: center; width: 5.6cqh; height: 5.6cqh; border-radius: 1.1cqh; transform: rotate(45deg);
  background: var(--ink); box-shadow: 0 0 0 .4cqh var(--amber), 0 0 2cqh rgba(255, 194, 71, .35); }
.tile .front .num i { transform: rotate(-45deg); font-style: normal; color: var(--amber); font-family: var(--display); font-size: 3.4cqh; line-height: 1; }
.tile .back { color: #fff; transform: rotateX(180deg); background: linear-gradient(180deg, #8a63ff 0%, #6a41ea 46%, #5730d0 54%, #4a25b6 100%);
  box-shadow: inset 0 .4cqh 0 rgba(255, 255, 255, .28), inset 0 -.4cqh 0 rgba(0, 0, 0, .25); }
.tile.open .front { transform: rotateX(180deg); }
.tile.open .back { transform: rotateX(0); }
.tile.open.just .front { animation: flip-out .55s ease-in-out both; }
.tile.open.just .back { animation: flip-in .55s ease-in-out both; }
@keyframes flip-out { from { transform: rotateX(0); } to { transform: rotateX(-180deg); } }
@keyframes flip-in { from { transform: rotateX(180deg); } to { transform: rotateX(0); } }
.tile .back .text { flex: 1; min-width: 0; padding: 0 1.2cqw; font-family: var(--display); text-transform: uppercase; font-size: calc(min(4.2cqh, 2cqw) * var(--fit, 1)); line-height: 1.05;
  overflow-wrap: anywhere; text-shadow: 0 .35cqh 0 rgba(27, 20, 38, .45); }
.tile .back .pts { align-self: stretch; display: flex; align-items: center; justify-content: center; min-width: 6cqw; padding: 0 .8cqw; background: #120c1d; color: var(--amber);
  box-shadow: inset .4cqh 0 0 rgba(0, 0, 0, .5); font-family: var(--display); font-size: 4.8cqh; font-variant-numeric: tabular-nums; text-shadow: 0 0 1.8cqh rgba(255, 194, 71, .45); }

/* a team's display: its name on a plate of its colour over the score */
.board .team { --tc: var(--t0); position: relative; border-radius: 1.8cqh; background: #0c0814; text-align: center;
  box-shadow: 0 0 0 .5cqh var(--tc), 0 0 0 1cqh #09060f, 0 2cqh 5cqh rgba(0, 0, 0, .55), 0 0 7cqh color-mix(in srgb, var(--tc) 30%, transparent); }
.board .team.t1 { --tc: var(--t1); }
.board .team .name { display: flex; align-items: center; justify-content: center; min-height: 6.4cqh; padding: .8cqh .8cqw; border-radius: 1.5cqh 1.5cqh 0 0; background: var(--tc); color: var(--ink);
  font-weight: 800; text-transform: uppercase; font-size: calc(2.9cqh * var(--fit, 1)); line-height: 1.05; letter-spacing: .03em; overflow-wrap: anywhere; }
.board .team .score { padding: 1.6cqh 0 2.2cqh; font-family: var(--display); font-size: 10cqh; line-height: 1.05; color: var(--amber); font-variant-numeric: tabular-nums;
  text-shadow: 0 0 2.6cqh rgba(255, 194, 71, .5); }
.board .team.bump .score { animation: bump .7s ease-out; }
@keyframes bump { 30% { transform: scale(1.25); color: #fff; } }
.board .team .won { position: absolute; left: 50%; bottom: -2.6cqh; transform: translateX(-50%); background: var(--ok); color: var(--ink); font-family: var(--display);
  font-size: 2.8cqh; padding: .3cqh 1.2cqw; border-radius: 99px; box-shadow: 0 0 0 .5cqh #09060f; }

/* a strike, across the whole screen */
#flash { position: fixed; inset: 0; z-index: 10; display: none; align-items: center; justify-content: center; gap: 3vw; background: rgba(11, 7, 18, .76); pointer-events: none; }
#flash.show { display: flex; animation: flash 1.5s ease-out forwards; }
#flash .x { width: 30vh; height: 30vh; display: flex; align-items: center; justify-content: center; border-radius: 5vh; background: var(--bad); color: var(--ink); border: 1.6vh solid var(--ink);
  box-shadow: 0 0 0 1vh var(--bad), 0 0 12vh rgba(255, 84, 104, .7); font-size: 20vh; font-weight: 800; line-height: 1; animation: thud .28s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes flash { 0%, 78% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes thud { from { transform: scale(.3); } }

/* the lobby and the results */
.splash { align-items: center; justify-content: center; text-align: center; gap: 6cqh; }
.splash .frame { min-width: 56cqw; max-width: 90cqw; }
.splash .frame .well { display: flex; align-items: center; justify-content: center; padding: 6cqh 5cqw; }
.splash .title { margin: 0; font-size: calc(15cqh * var(--fit, 1)); line-height: 1; color: var(--amber); text-transform: uppercase;
  text-shadow: .6cqh .6cqh 0 #4a25b6, 0 0 6cqh rgba(255, 194, 71, .35); }
.versus { display: flex; align-items: center; gap: 3cqw; font-family: var(--display); font-size: 6.5cqh; text-transform: uppercase; }
.versus .t0 { color: var(--t0); }
.versus .t1 { color: var(--t1); }
.versus .vs { font-size: 3.5cqh; color: var(--muted); }
.results { align-items: stretch; }
.results .headline { margin: 3cqh 0 0; text-align: center; font-size: 11cqh; line-height: 1.05; color: var(--amber); text-transform: uppercase; text-wrap: balance;
  text-shadow: .6cqh .6cqh 0 #4a25b6, 0 0 6cqh rgba(255, 194, 71, .35); }
.results .podium { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6cqw; }
.results .team { width: 30cqw; }
.results .team .name { min-height: 10cqh; font-size: calc(5cqh * var(--fit, 1)); }
.results .team .score { font-size: 17cqh; padding: 3cqh 0 4cqh; }
.results .team.winner { transform: scale(1.1); box-shadow: 0 0 0 .5cqh var(--tc), 0 0 0 1cqh #09060f, 0 0 0 1.7cqh var(--amber), 0 0 9cqh rgba(255, 194, 71, .5); }
.results .team .tag { position: absolute; top: -5.6cqh; left: 50%; transform: translateX(-50%); background: var(--amber); color: var(--ink); font-family: var(--display); font-size: 2.6cqh;
  text-transform: uppercase; padding: .4cqh 1.6cqw; border-radius: 99px; box-shadow: 0 0 0 .5cqh #09060f; }
.results .thanks { text-align: center; font-size: 3cqh; color: var(--muted); margin: 0; }

/* the final round: both players' answers in one frame, the clock between them */
.final .frame { flex: 1; min-height: 0; }
.final .well { display: grid; grid-template-columns: 1fr 15cqw 1fr; gap: 1.4cqw; padding: 1.6cqh 1.2cqw; }
.player { display: flex; flex-direction: column; gap: 1cqh; min-height: 0; min-width: 0; }
.player .who { display: flex; align-items: baseline; gap: 1cqw; padding: .4cqh .8cqw .6cqh; border-bottom: .7cqh solid var(--t0); }
.player.t1 .who { border-color: var(--t1); }
.player .who .name { font-family: var(--display); font-size: 3.4cqh; text-transform: uppercase; }
.player .who .for { color: var(--muted); font-weight: 800; font-size: 2cqh; text-transform: uppercase; }
.player .row { flex: 1; min-height: 0; display: flex; border-radius: 1.1cqh; overflow: hidden; background: linear-gradient(180deg, #3b2d5e 0%, #2a1f45 48%, #1f1636 52%, #281d42 100%);
  box-shadow: inset 0 .35cqh 0 #6a549a; }
.player .row.current { box-shadow: inset 0 0 0 .45cqh var(--amber), 0 0 2.4cqh rgba(255, 194, 71, .4); }
.player .row.said-it { background: linear-gradient(180deg, #8a63ff 0%, #6a41ea 46%, #5730d0 54%, #4a25b6 100%); }
.player .row .said { flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 1.2cqw; font-family: var(--display); text-transform: uppercase; font-size: calc(min(3.9cqh, 2.6cqw) * var(--fit, 1));
  line-height: 1.05; overflow-wrap: anywhere; text-shadow: 0 .35cqh 0 rgba(27, 20, 38, .45); }
.player .row .pts { width: 7cqw; display: flex; align-items: center; justify-content: center; background: #120c1d; color: var(--amber); font-family: var(--display); font-size: 4.4cqh;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 1.8cqh rgba(255, 194, 71, .45); }
.player .row .pts.zero { color: var(--bad); text-shadow: none; }
.player .row .just { animation: pop .45s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }
.player.covered .row { background: repeating-linear-gradient(135deg, #1a1229 0 2cqh, #241a3a 2cqh 4cqh); box-shadow: none; }
.player .total { display: flex; justify-content: flex-end; align-items: center; gap: 1.2cqw; padding: .2cqh 0 0; }
.player .total span { text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; font-size: 2cqh; }
.player .total b { width: 7cqw; text-align: center; font-family: var(--display); font-weight: 400; font-size: 4.8cqh; line-height: 1.1; color: var(--amber); font-variant-numeric: tabular-nums; }
.final .center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4cqh; min-height: 0; }
.final .center .caption { text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; font-size: 1.9cqh; }
.board .clock { width: 13cqw; max-width: 24cqh; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 2.4cqh; background: #120c1d;
  box-shadow: inset 0 0 0 .7cqh #33264f; font-size: 11cqh; line-height: 1; color: var(--muted); }
.board .clock.running { box-shadow: inset 0 0 0 .7cqh var(--amber), 0 0 4cqh rgba(255, 194, 71, .4); color: var(--fg); }
.board .clock.low { box-shadow: inset 0 0 0 .7cqh var(--bad), 0 0 4cqh rgba(255, 84, 104, .5); color: var(--bad); }
.board .clock.out { box-shadow: inset 0 0 0 .7cqh var(--bad); background: #3a1320; color: var(--bad); }
.final .scores { display: flex; justify-content: space-between; gap: 2cqw; padding: .6cqh .6cqw 0; }
.final .scores .team { display: flex; align-items: stretch; min-width: 26cqw; }
.final .scores .team .name { flex: 1; min-height: 0; padding: .6cqh 1.4cqw; border-radius: 1.5cqh 0 0 1.5cqh; font-size: calc(2.6cqh * var(--fit, 1)); }
.final .scores .team .score { min-width: 9cqw; padding: .4cqh 1cqw .6cqh; font-size: 5.6cqh; }
@media (prefers-reduced-motion: reduce) { .frame .bulbs rect { animation: none; } }

/* ---------- the survey page (a phone, mostly) ---------- */
body.survey main { max-width: 520px; padding: 18px 16px 40px; }
.notice { margin: 0 0 14px; padding: 10px 12px; border: 2px solid var(--amber-dark); border-radius: 8px; color: var(--amber); line-height: 1.35; }
.sheet { display: flex; flex-direction: column; gap: 14px; }
.sheet h1 { margin: 0; font-size: 1.7rem; line-height: 1.15; text-wrap: balance; }
.sheet p { margin: 0; line-height: 1.4; }
.sheet .brand { font-family: var(--display); color: var(--amber); text-transform: uppercase; letter-spacing: .05em; font-size: .95rem; }
.sheet .intro { font-size: 1.15rem; }
.sheet form { display: flex; flex-direction: column; gap: 14px; }
.sheet .error:empty { display: none; }
.big-button { font-size: 1.15rem; padding: 14px 18px; }
.progress { display: flex; flex-direction: column; gap: 6px; }
.progress .count { color: var(--muted); font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.progress .bar { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.progress .bar span { display: block; height: 100%; border-radius: 99px; background: var(--amber); transition: width .25s; }
.sheet .question { min-height: 2.3em; }
#answer { width: 100%; font-size: 1.25rem; padding: 14px; border-radius: 8px; }
.go { display: flex; gap: 10px; }
.go .primary { flex: 1; }
.sheet button.link { align-self: flex-start; font-size: 1rem; padding: 8px 0; }
ul.mine { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ul.mine button { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; white-space: normal; padding: 11px 14px; background: var(--panel); font-weight: 400; }
ul.mine .q { color: var(--muted); font-size: .9rem; }
ul.mine .a { font-weight: 800; font-size: 1.1rem; overflow-wrap: anywhere; }
ul.mine .a.none { color: var(--muted); font-weight: 400; font-style: italic; }
.mover { margin-top: 18px; color: var(--muted); font-size: .9rem; }
.mover summary { cursor: pointer; padding: 6px 0; }
.mover p { margin: 6px 0 10px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font-size: 1rem; }

/* ---------- survey results ---------- */
body.results-page main { max-width: 860px; }
.survey-status { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 14px 0; }
.survey-status .counts { flex: 1; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
.survey-status .counts b { font-family: var(--display); font-weight: 400; font-size: 1.4rem; color: var(--amber); }
.survey-status .state { font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; padding: 3px 12px; border-radius: 99px; border: 2px solid; }
.survey-status .state.open { color: var(--ok); }
.survey-status .state.closed { color: var(--muted); }
.tally { margin: 12px 0; }
.tally h2 { margin-bottom: .2em; font-size: 1.25rem; }
.tally p { margin: 0 0 8px; }
.tally td.answer { font-weight: 600; width: 40%; overflow-wrap: anywhere; }
.tally td.bar span { display: block; height: 10px; min-width: 2px; border-radius: 99px; background: var(--amber); }
.tally td.num { width: 4.5em; font-variant-numeric: tabular-nums; }
.tally td.percent { color: var(--amber); font-family: var(--display); }
.tally tr:last-child td { border-bottom: 0; }
