/* gn-party.css: Game Night's party sheet, loaded after the neutral base (/games/gn.css)
   on /games and its four rooms (party, road, score, tools). PartyStarter HQ's pink and
   blue, used as quiet pastels on the surface colour.
   Colour means one thing each, on every Game Night page:
   - the main button (.rene-button-primary, silver) starts or commits the main thing on a panel: start a room, start
     a game, roll, flip, pick one, deal the roles, end the round, lock in an answer.
   - the glass secondary (.rene-button-secondary) joins, adds or moves things along: Join on the party door and the
     join card, Add a name, the host's Next. On the hub, Join is the glass secondary beside
     Start a room, so the hero has one main action.
   - white marks room codes and scores; the party pink marks whoever is ahead or has won
     (no gold on a PartyStarter page since 2026-11-17: one accent pair per brand).
   - a red edge (.p-danger) is only for a confirm that throws something away: Remove,
     Clear, Reset, New game. A confirm that loses nothing uses the silver primary.
   - green is kept for things that went right (a correct answer, a player who is done).
   The hub gives each section one tint: party rooms pink, the one-phone games and the
   table tools blue, the score keepers blue too. */
:root{--atmo-a:115,184,255;--atmo-b:240,106,169;--accent:var(--party-pink, #F06AA9)}
/* Design System v1 (D-1116-5, 2026-11-17): one accent per brand, PartyStarter pink and blue.
   Buttons are /party.css's one system. */

/* every Game Night page sits under the shared top bar (/shell.js, 52px and sticky): anything
   scrolled into view or announced at the top clears it */
html{scroll-padding-top:64px}
.toast{top:calc(64px + env(safe-area-inset-top))}
/* and the page keeps the bar's side padding, so its mark and the page share one left edge (a phone
   turned sideways keeps its content clear of the notch, too) */
@media(min-width:431px){main{padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}}

/* on a desktop a room's title takes the kit's H2 scale, light, beside the back link (the shared
   bar above already names PartyStarter HQ, so the rooms carry no byline of their own) */
@media(min-width:900px){main>header:not(.hub-head) .logo{font-size:clamp(1.7rem,3vw,2.8rem);font-weight:300;letter-spacing:-.025em;line-height:1.1}}
/* and a room's panel can sit in two columns there: what you read on the left, what you tap on the
   right. On a phone the two halves simply stack, in the same order. */
@media(min-width:900px){
  .split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px 40px;align-items:center}
  .split.top{align-items:start}
}

/* ---- a grid of toggles (plates, letters, bingo). Found is the kit's selected state, the same on
   all three: brighter glass, white type, a pink edge and a drawn tick in the corner, so it never
   rests on colour alone. Words wrap only where they may: at spaces, real hyphens and the soft
   hyphens the page adds. ---- */
.cells{display:grid;gap:6px;margin-top:12px}
.cells button{position:relative;min-height:44px;min-width:0;padding:4px;border:1px solid var(--line);border-radius:12px;background:var(--glass);color:var(--ink);font:inherit;font-size:13px;font-weight:500;
  line-height:1.2;cursor:pointer;overflow-wrap:normal;word-break:normal;-webkit-hyphens:auto;hyphens:auto;-webkit-tap-highlight-color:transparent;
  transition:background .24s var(--ease),border-color .24s var(--ease),color .24s var(--ease)}
.cells button:hover{border-color:var(--edge-hover)}
.cells button[aria-pressed="true"]{background:rgba(255,255,255,.1);border-color:rgba(240,106,169,.7);color:var(--ink)}
.cells button[aria-pressed="true"]::after{content:"";position:absolute;top:6px;right:6px;width:8px;height:4px;border-left:1.5px solid var(--hot);border-bottom:1.5px solid var(--hot);transform:rotate(-45deg)}

/* ---- the hub ---- */
.hub-head{display:flex;align-items:center;gap:14px;margin:8px 0 0}
.hub-head .appicon{width:52px;height:52px;border-radius:13px;flex:none;display:block}
.hub-head .logo{font-size:28px}
.intro{color:var(--ink2);font-size:16px;line-height:1.55;max-width:56ch;margin:18px 0 0;text-wrap:pretty}
.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.join{display:flex;gap:8px}
.code-in{width:9em;text-transform:uppercase;letter-spacing:.22em;font-weight:500;font-variant-numeric:tabular-nums}
.code-in::placeholder{text-transform:none;letter-spacing:0;font-weight:400}
/* on a phone the code field takes what the Join button leaves: width 0 and flex 1, so the field's
   own intrinsic size never pushes the row past a 320px screen */
@media(max-width:600px){.actions>:is(.rene-button-primary,.rene-button-secondary){flex:1 1 100%}.join{flex:1 1 100%;min-width:0}.join .code-in{flex:1;width:0;min-width:0}}
/* on a desktop the hub opens at the kit's H1 scale, light, with controls to match */
@media(min-width:900px){
  .hub-head{gap:20px;margin-top:24px}
  .hub-head .appicon{width:72px;height:72px;border-radius:18px}

  .intro{font-size:17px;margin-top:24px}
  .actions{margin-top:24px;gap:12px}
  .actions :is(.rene-button-primary,.rene-button-secondary),.actions .code-in{min-height:52px;border-radius:16px}
  .actions :is(.rene-button-primary,.rene-button-secondary){padding:0 26px;font-size:16px}
}
/* one tint per section, set on the section's grid and inherited by every tile and row in it */
.tint-pink{--tint:240,106,169;--icon:var(--pink)}
.tint-blue{--tint:115,184,255;--icon:var(--cyan)}
.tint-score{--tint:115,184,255;--icon:var(--cyan)}
.tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
/* the icon, title and a two-line caption block are one fixed-height stack, centred: titles line up across a row */
.tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;aspect-ratio:5/4;padding:18px 14px;border-radius:22px;
  border:1px solid rgba(var(--tint, 240,106,169),.16);color:var(--ink);text-decoration:none;text-align:center;overflow:hidden;-webkit-tap-highlight-color:transparent;
  background:radial-gradient(90% 75% at 50% 18%,rgba(var(--tint, 240,106,169),.13),rgba(var(--tint, 240,106,169),.02) 72%),var(--panel);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 20px 60px rgba(0,0,0,.2);transition:transform .3s var(--ease),border-color .3s var(--ease)}
.tile .gi{width:clamp(48px,34%,68px);height:auto;aspect-ratio:1;margin-bottom:8px;color:var(--icon, var(--pink))}
.tile b{display:block;font-size:clamp(15px,1.9vw,18px);font-weight:500;letter-spacing:-.01em;line-height:1.25}
/* the caption is two lines, the kind of game over the player count, so no separator is ever left at a line end */
.tile .cap{display:block;min-height:2.7em;font-size:12.5px;color:var(--dim);line-height:1.35;text-wrap:balance}
.tile .cap .n{display:block}
.tile:active{transform:scale(.985)}
@media(hover:hover){.tile:hover{transform:translateY(-3px);border-color:rgba(var(--tint, 240,106,169),.34)}}
@media(min-width:900px){.tile{aspect-ratio:3/2}}
/* two a row up to 720px: wider than tall on a foldable or a split-screen iPad (the desktop's 3:2),
   square on a phone. The tile is no scroll box here, so its automatic minimum height is its
   content: a tile grows rather than clip when its words need more room than the ratio gives. */
@media(max-width:720px){.tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.tile{aspect-ratio:3/2;overflow:visible}}
@media(max-width:480px){.tile{aspect-ratio:1}}
/* under 360px a square tile is about 138px: a smaller icon and a little less padding keep every
   title on one line and the whole stack inside the tile; if a font ever runs wider, the tile grows
   to fit instead of clipping its caption */
@media(max-width:359px){.tile{padding:12px 10px}.tile .gi{width:40px;margin-bottom:4px}}
.rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.rows .span{grid-column:1/-1}
@media(max-width:600px){.rows{grid-template-columns:1fr}}
.rowlink{display:flex;align-items:center;gap:14px;min-height:72px;padding:12px 16px 12px 12px;border-radius:18px;border:1px solid var(--line);color:var(--ink);text-decoration:none;-webkit-tap-highlight-color:transparent;
  background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.012)),var(--panel);transition:border-color .24s var(--ease),transform .24s var(--ease)}
.rowlink:hover{border-color:var(--edge-hover)}
.rowlink:active{transform:scale(.985)}
.rowlink .ic{width:44px;height:44px;border-radius:12px;flex:none;display:grid;place-items:center;color:var(--icon, var(--cyan));
  background:rgba(var(--tint, 115,184,255),.1);border:1px solid rgba(var(--tint, 115,184,255),.2)}
.rowlink .ic .gi{width:26px;height:26px}
.rowlink .t{flex:1;min-width:0}
.rowlink b{display:block;font-size:15px;font-weight:500;line-height:1.3}
.rowlink .s{display:block;font-size:13px;color:var(--dim);line-height:1.4;margin-top:2px}
.rowlink .chev{width:16px;height:16px;color:var(--dim)}

/* ---- the party room ---- */
.code{font-size:34px;font-weight:500;letter-spacing:.18em;color:var(--ink);font-variant-numeric:tabular-nums;line-height:1.15}
.code-sm{font-size:20px;letter-spacing:.14em}
.lobby-top{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap}
.lobby-h{margin:0}
.lobby-h>span{display:block}
/* the connection line: quiet, in the flow under the header, gone when all is well */
.conn{display:flex;align-items:center;justify-content:center;gap:8px;width:fit-content;max-width:100%;margin:-8px auto 12px;padding:8px 14px;border:1px solid var(--line);border-radius:999px;
  background:var(--glass);color:var(--ink2);font-size:13px;line-height:1.4}
.conn:empty{height:0;margin:0;padding:0;border:0}
.or{display:flex;align-items:center;gap:12px;margin:22px 0 4px;color:var(--dim);font-size:12px;font-weight:500;letter-spacing:.2em;text-transform:uppercase}
.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line-soft)}
.door-alt{display:flex;justify-content:center;margin-top:6px}
.games{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.gcard{display:block;width:100%;min-height:44px;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--glass);color:var(--ink);font:inherit;text-align:left;cursor:pointer;
  -webkit-tap-highlight-color:transparent;transition:border-color .24s var(--ease),background .24s var(--ease)}
.gcard:hover{border-color:var(--edge-hover);background:var(--glass-hover)}
.gcard[aria-pressed="true"]{border-color:rgba(240,106,169,.7);background:rgba(240,106,169,.1)}
.gcard b{display:block;font-size:15px;font-weight:500}
.gcard span{display:block;color:var(--dim);font-size:13px;line-height:1.4;margin-top:4px}
@media(max-width:380px){.games{grid-template-columns:1fr}}
#startwhy:empty,#nextwhy:empty{min-height:0;margin-top:0}
#nextwhy{text-align:center}
.stage{margin-top:14px;padding:24px 18px;border-radius:20px;background:var(--panel2);border:1px solid var(--line);text-align:center}
.stage .k{font-size:12px;letter-spacing:.2em;text-transform:uppercase;color:var(--dim);font-weight:500}
.stage .big{font-size:clamp(26px,7vw,38px);font-weight:500;letter-spacing:-.02em;margin:10px 0 6px;line-height:1.15;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}
.stage .big.md{font-size:clamp(22px,5.6vw,28px);letter-spacing:-.01em;line-height:1.25}
.stage .sub{color:var(--dim);font-size:14px;line-height:1.5;text-wrap:pretty}
.stage .sub b{color:var(--ink);font-weight:500}
.stage.imp{background:radial-gradient(80% 80% at 50% 0%,rgba(240,106,169,.14),transparent 70%),var(--panel2);border-color:rgba(240,106,169,.3)}
/* the other side of the imposter's pink: the room's blue (green stays for success only) */
.stage.crew{background:radial-gradient(80% 80% at 50% 0%,rgba(115,184,255,.13),transparent 70%),var(--panel2);border-color:rgba(115,184,255,.3)}
/* waiting on the board or the pack: slow ambient light moves across the stage instead of a
   spinner, so it never reads as frozen. Still under reduced motion. */
.stage.wait{position:relative;overflow:hidden;isolation:isolate}
.stage.wait::before{content:"";position:absolute;inset:-30% -20%;z-index:-1;pointer-events:none;
  background:radial-gradient(45% 55% at 50% 40%,rgba(var(--atmo-b),.16),transparent 70%),radial-gradient(40% 50% at 30% 70%,rgba(var(--atmo-a),.10),transparent 70%);
  animation:gn-breathe 3.6s ease-in-out infinite alternate}
@keyframes gn-breathe{from{opacity:.3;transform:translateX(-6%)}to{opacity:1;transform:translateX(6%)}}
@media(prefers-reduced-motion:reduce){.stage.wait::before{animation:none;opacity:.7;transform:none}}
.opts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.opt{min-height:48px;padding:6px 10px;border:1px solid var(--edge);border-radius:14px;background:var(--glass);color:var(--ink);font:inherit;font-size:15px;font-weight:500;cursor:pointer;
  overflow-wrap:break-word;-webkit-tap-highlight-color:transparent;transition:background .24s var(--ease),border-color .24s var(--ease)}
.opt:hover:not(:disabled){background:var(--glass-hover);border-color:var(--edge-hover)}
.opt.on{background:var(--cyan);color:var(--on-accent);border-color:var(--cyan)}
/* a vote tapped while the room is reconnecting: it landed, and goes in when the room is back */
.opt.pending{border-style:dashed;border-color:rgba(115,184,255,.75);background:rgba(115,184,255,.1)}
.opt .pend{display:block;margin-top:2px;font-size:12px;font-weight:500;color:var(--ink2)}
.opt:disabled{opacity:.5}
/* Sync: the spectrum, the slider and the reveal */
.spec{display:flex;justify-content:space-between;gap:12px;font-size:15px;font-weight:500;margin-top:16px}
.spec span:first-child{color:var(--cyan)}
.spec span:last-child{color:var(--pink);text-align:right}
.slider{width:100%;height:44px;-webkit-appearance:none;appearance:none;background:none;cursor:pointer}
.slider::-webkit-slider-runnable-track{height:8px;border-radius:4px;background:linear-gradient(90deg,var(--cyan),var(--pink))}
.slider::-moz-range-track{height:8px;border-radius:4px;background:linear-gradient(90deg,var(--cyan),var(--pink))}
.slider::-webkit-slider-thumb{-webkit-appearance:none;width:28px;height:28px;border-radius:50%;background:var(--ink);border:2px solid var(--panel);box-shadow:0 2px 10px rgba(0,0,0,.35);margin-top:-10px}
.slider::-moz-range-thumb{width:28px;height:28px;border-radius:50%;background:var(--ink);border:2px solid var(--panel);box-shadow:0 2px 10px rgba(0,0,0,.35)}
.slider:disabled{opacity:.6;cursor:default}
/* the bar carries ticks only; the target's label sits above it and each guess's label below,
   placed by the page in as many rows as it takes for no two to touch, and kept inside the bar */
.bar{position:relative;height:10px;border-radius:5px;background:linear-gradient(90deg,var(--cyan),var(--pink));margin:38px 0 0}
.bar i{position:absolute;top:-8px;width:3px;height:26px;margin-left:-1.5px;background:var(--ink);border-radius:2px}
.bar i.t{background:var(--ink);width:5px;height:32px;top:-11px;margin-left:-2.5px;box-shadow:0 0 0 1px rgba(5,8,12,.6)}
.bar .tl{position:absolute;bottom:24px;transform:translateX(-50%);font-size:12px;font-weight:500;color:var(--ink);white-space:nowrap;line-height:1.2}
.marks{position:relative;height:20px;margin-top:14px}
.marks b{position:absolute;top:0;transform:translateX(-50%);font-size:12px;font-weight:500;color:var(--ink2);white-space:nowrap;line-height:18px}
/* Trivia: five categories of five values. Each category is a row, its name across the top and
   its five values beneath, so a name always has the full width and words never break mid-word. */
.board{display:grid;grid-template-columns:1fr;gap:12px;margin-top:12px}
.bcol{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;min-width:0}
.bcat{grid-column:1/-1;font-size:13px;color:var(--ink2);font-weight:500;line-height:1.3;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto}
.bcell{min-height:44px;border:1px solid rgba(115,184,255,.24);border-radius:12px;background:rgba(115,184,255,.1);color:var(--cyan);font:inherit;font-size:15px;font-weight:500;
  font-variant-numeric:tabular-nums;cursor:pointer;transition:background .24s var(--ease)}
.bcell:hover:not(:disabled){background:rgba(115,184,255,.18)}
.bcell.done{background:none;border-color:var(--line-soft);border-style:dashed;color:transparent;cursor:default}
.bcell:disabled:not(.done){cursor:default;opacity:.85}
/* Chameleon: the sixteen words are something to read, so they are a list, not buttons.
   Only the chameleon's guess step draws them as buttons. */
.wlist{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 8px;margin-top:14px;list-style:none}
.wlist li{padding:5px 11px;border-radius:999px;background:rgba(255,255,255,.04);color:var(--ink2);font-size:14px;line-height:1.35}
.wlist li.secret{background:var(--hot);color:var(--on-accent);font-weight:500}
.wlist li.guessed{box-shadow:inset 0 0 0 1.5px var(--pink);color:var(--ink)}
.wgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:12px}
@media(max-width:520px){.wgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.wpick{min-height:48px;min-width:0;padding:6px 8px;border:1px solid rgba(240,106,169,.5);border-radius:12px;background:var(--glass);color:var(--ink);font:inherit;font-size:14px;font-weight:500;
  line-height:1.25;cursor:pointer;overflow-wrap:normal;-webkit-hyphens:auto;hyphens:auto;-webkit-tap-highlight-color:transparent;transition:background .24s var(--ease),border-color .24s var(--ease)}
.wpick:hover{background:rgba(240,106,169,.1);border-color:rgba(240,106,169,.75)}
/* scores and lists of players */
.rank{margin-top:10px}
.rank .r{display:flex;align-items:center;gap:10px;min-height:44px;padding:4px 0;border-top:1px solid var(--line-soft)}
.rank .r:first-child{border-top:none}
.rank .n{flex:1;min-width:0;overflow-wrap:break-word}
.rank .r>b{font-weight:500;font-variant-numeric:tabular-nums;min-width:2ch;text-align:right}
.rank .d{color:var(--dim);font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
/* you, in a list of players: the name a step heavier, and the "you" tag beside it (white for
   codes, scores and winners) */
.rank .r.me .n{font-weight:500}
.rank small{font-size:12px;font-weight:500;margin-left:4px}
.rank .off{color:var(--dim)}
.rank .you{color:var(--dim)}
.rank .xsp{width:44px;flex:none}
.done-mark{display:inline-block;width:12px;height:7px;border-left:1.5px solid var(--ok);border-bottom:1.5px solid var(--ok);transform:translateY(-2px) rotate(-45deg);flex:none}
/* the host's Next stays in reach at the bottom. Its band runs out through main's side gutters
   and fades away across them, so it never draws an edge against the atmosphere behind it. */
.hostbar{position:sticky;bottom:0;margin:0 -16px;padding:16px 16px calc(8px + env(safe-area-inset-bottom));background:linear-gradient(rgba(5,8,12,0),var(--bg) 32%);
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 16px,#000 calc(100% - 16px),transparent);mask-image:linear-gradient(90deg,transparent,#000 16px,#000 calc(100% - 16px),transparent)}
@media(min-width:431px){.hostbar{margin:0 -20px;padding-left:20px;padding-right:20px;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 20px,#000 calc(100% - 20px),transparent);mask-image:linear-gradient(90deg,transparent,#000 20px,#000 calc(100% - 20px),transparent)}}
/* a resting Next (waiting on facts or on a guess) is drawn solid and quiet rather than see-through,
   so nothing scrolled beneath the bar shows through it; the line under it says why it rests */
.hostbar :is(.rene-button-primary,.rene-button-secondary):disabled{opacity:1;background:var(--panel2);border-color:var(--line);color:var(--dim)}
/* whatever is scrolled to or focused stops short of the bar instead of landing under it */
html:has(#game:not([hidden]) > .hostbar:not([hidden])){scroll-padding-bottom:140px}
/* a phone turned sideways has little height to spare: Next and the two quiet actions share one
   row, so the bar takes about a sixth of the screen instead of half of it */
@media(orientation:landscape) and (max-height:500px){
  .hostbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 8px;padding-top:10px}
  .hostbar #next{min-height:44px;font-size:15px;border-radius:14px}
  .hostbar #nextwhy{grid-column:1/-1;grid-row:2}
  .hostbar #endrow{margin-top:0;flex-wrap:nowrap}
  html:has(#game:not([hidden]) > .hostbar:not([hidden])){scroll-padding-bottom:96px}
}
/* the Sound toggle draws its state as well as saying it */
#sound .x{display:none}
#sound[aria-pressed="false"] .w{display:none}
#sound[aria-pressed="false"] .x{display:block}
.door-game{margin-bottom:6px}
/* Trivia's reveal: each answer, the right ones in green */
.rank .ans{color:var(--dim);overflow-wrap:anywhere;text-align:right}
.rank .ans.right{color:var(--ok)}

/* ---- shared by the rooms ---- */
/* the name field and its Add button, under a panel's hint */
.add{margin-top:12px}
.add+.chips{margin-top:10px}
/* the few vertical gaps the rooms use, as classes, so the markup carries no style attributes.
   Last in the sheet, so they win over a component's own margin. */
.mt-6{margin-top:6px}.mt-8{margin-top:8px}.mt-10{margin-top:10px}.mt-12{margin-top:12px}.mt-14{margin-top:14px}.mt-20{margin-top:20px}
.t-center{text-align:center}
