/* Game covers and the area players use during a round. */
.game-shell { --game-surface:color-mix(in srgb,var(--soft) 60%,white); --game-rule:color-mix(in srgb,var(--brand) 23%,white) }
.page-game .game-shell:not(.wide):not(.theme-likely) { background:var(--game-surface); border-color:var(--game-rule) }
.game-shell:not(.theme-likely) .game-mast {
  position:relative; align-items:center; grid-template-columns:minmax(0,1.16fr) minmax(0,1fr);
  min-height:16rem; padding:0; gap:0; overflow:hidden;
  background:var(--game-surface);
}
.game-shell:not(.theme-likely) .game-mast-copy { padding:clamp(1.25rem,3.7vw,3rem); z-index:1 }
.game-shell:not(.theme-likely) .game-mast h1 {
  font-size:clamp(2rem,4.7vw,4rem); color:var(--brand); text-wrap:balance;
}
.game-shell:not(.theme-likely) .game-mast p { color:var(--ink); margin:.55rem 0 .5rem }
.game-shell:not(.theme-likely) .game-mast .meta { padding:0; color:var(--brand); background:none }
.game-mast-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem 1rem; margin-top:.75rem }
.game-mast-actions a[href="#cards"] { display:inline-flex; align-items:center; min-height:42px; font-weight:650 }
.game-quick-rule { margin:0 clamp(1rem,3vw,2.5rem); padding:.7rem 0 .7rem 1rem; border-inline-start:3px solid var(--brand); }
.game-quick-rule h2 { margin:0; font-size:1rem; }
.game-quick-rule p { margin:.25rem 0; max-width:68ch; }
.game-shell.wide .game-quick-rule { display:none; }
.game-mast-actions .button { min-height:42px; padding:.38rem .8rem; box-shadow:none; background:var(--brand); color:white }
.game-mast-actions .button:hover { background:color-mix(in srgb,var(--brand) 83%,black) }
.theme-likely .game-mast-actions .button { background:var(--table-green) }
#game-setup { scroll-margin-top:1rem }

.game-shell:not(.theme-likely) .game-mast-art {
  position:relative; isolation:isolate; display:grid; grid-template-rows:1fr auto;
  place-items:center; align-self:stretch; gap:.35rem; min-height:12rem;
  margin:0; padding:1.2rem 1rem; border-radius:0; overflow:hidden;
  background:radial-gradient(ellipse at 56% 48%,var(--wash),transparent 72%);
}
.game-mast-art::before {
  content:""; position:absolute; z-index:-1; inset:8% 11%;
  background:repeating-radial-gradient(ellipse at 52% 48%,transparent 0 1.45rem,color-mix(in srgb,var(--brand) 13%,transparent) 1.5rem 1.54rem);
  mask-image:radial-gradient(ellipse,black 18%,transparent 72%); pointer-events:none;
}
.game-mast-art > .game-logo {
  width:clamp(5.6rem,15vw,10rem); max-width:90%; object-fit:contain;
  filter:drop-shadow(0 .65rem .55rem #24243b23);
}
.game-shell .game-mast-art .cover-design { width:min(100%,16rem); text-align:center }
.game-mast-art .session-cover {
  min-width:0; display:flex; justify-content:center; align-items:center; flex-wrap:wrap;
  gap:.3rem .6rem; padding:.36rem .65rem; margin-inline:auto; width:fit-content; max-width:100%;
  background:var(--card); color:var(--brand); border:1px solid var(--game-rule); box-shadow:none;
}
.game-mast-art .session-cover strong,.game-mast-art .session-cover span { font-size:.85rem }
.game-mast-art.cover-wolf .cover-phases { display:flex; justify-content:center; gap:.35rem; flex-wrap:wrap }
.game-mast-art.cover-wolf .cover-phases span { padding:.26rem .45rem; font-size:.78rem }
.game-mast-art.cover-wolf .cover-phases strong { display:none }
.game-mast-art.cover-mime::before {
  inset:8% 16%; background:linear-gradient(to bottom,#f6d69d60,transparent);
  clip-path:polygon(44% 0,56% 0,98% 100%,2% 100%); mask-image:none;
}
.game-mast-art.cover-draw::before { background:radial-gradient(var(--brand) 1px,transparent 1px) 0 0/12px 12px; opacity:.18 }
.game-mast-art.cover-code::before { background:radial-gradient(var(--brand) 2px,transparent 2px) 0 0/19px 19px; opacity:.2 }
.game-mast-art.cover-undercover > .game-logo { rotate:-6deg }
.game-shell:not(.theme-likely) .likely-mast-photo {
  width:48%; object-position:center 50%;
  mask-image:linear-gradient(to right,transparent,#000 24%),linear-gradient(to bottom,#000 90%,transparent);
}

.game-toolbar-title { display:none }
.game-shell:not(.wide,.theme-likely) .game-toolbar { background:transparent; border-block:0; border-bottom:1px solid var(--game-rule) }
.game-shell:not(.wide,.theme-likely) .play { background:transparent }
.game-shell:not(.theme-likely) .play :is(form .cta,[data-action="guess-start"]) { background:var(--brand); color:white }
.game-shell:not(.theme-likely) .play :is(form .cta,[data-action="guess-start"]):hover { background:color-mix(in srgb,var(--brand) 80%,black) }
.game-shell.theme-truth .setup-choices { gap:0; border-top:1px solid var(--game-rule) }
.game-shell.theme-truth .setup-mode { background:transparent; border:0; border-radius:0; padding:1rem clamp(.8rem,3vw,1.75rem) .25rem }
.game-shell.theme-truth .setup-mode:first-child { padding-inline-start:0 }
.game-shell.theme-truth .setup-mode + .setup-mode { border-inline-start:1px solid var(--game-rule) }
.game-shell.theme-truth .setup-mode h3,.game-shell.theme-guess .play h2 { color:var(--brand) }
.game-shell.theme-wolf:not(.wide) .wolf-panel:has([data-wolf-setup]) { background:none; border:0; padding:0 }
.game-shell.session-game:not(.wide) .play:has(> :is([data-table-setup],[data-mime],[data-infiltration])) {
  display:grid; grid-template-columns:minmax(10rem,1fr) minmax(0,2.25fr);
  grid-template-rows:auto 1fr; gap:.4rem 1rem; min-height:0;
}
.game-shell.session-game:not(.wide) .play:has(> :is([data-table-setup],[data-mime],[data-infiltration])) > h2 {
  grid-area:1 / 1; margin:0; color:var(--brand); font-size:clamp(1.45rem,2.8vw,2.2rem);
}
.game-shell.session-game:not(.wide) .play:has(> :is([data-table-setup],[data-mime],[data-infiltration])) > p { grid-area:2 / 1; margin:0; color:var(--muted) }
.game-shell.session-game:not(.wide) .play > :is([data-table-setup],[data-mime],[data-infiltration]) {
  grid-area:1 / 2 / 3 / 3; width:100%; max-width:none; margin:0;
  padding-inline-start:clamp(.8rem,2vw,1.5rem); border-inline-start:1px solid var(--game-rule);
}
.game-shell.session-game:not(.wide) .play > :is([data-table-setup],[data-mime],[data-infiltration]) .session-fields:first-child { margin-top:0 }

.game-shell.wide:not(.theme-wolf,.theme-likely) {
  background:radial-gradient(ellipse at 50% 46%,var(--game-surface),var(--soft) 75%);
}
.game-shell.wide .game-toolbar { justify-content:space-between; align-items:center; background:var(--game-surface); border-color:var(--game-rule) }
.game-shell.theme-likely.wide .game-toolbar { color:#fff5e0; background:#0c2e29; border:0 }
.game-shell.wide .game-toolbar-title { display:block; color:inherit; overflow-wrap:anywhere; flex:1 1 0; min-width:0; line-height:1.2; padding-inline:.5rem }
.game-shell.wide .game-toolbar-actions { margin-inline-start:auto }
.game-shell.wide:not(.theme-wolf,.theme-likely) .play {
  display:flex; flex-direction:column; justify-content:safe center;
  min-height:calc(100dvh - 52px); width:100%; max-width:76rem;
}
.game-shell.wide .play > :is(.infiltration-ballot,.finger-grid,.choice-duel,.ballot) { width:100% }
.game-shell.wide .play .button { box-shadow:none }
.game-shell.wide .game-prompt {
  border:0; border-radius:.9rem; background:var(--card);
  box-shadow:0 1px 0 var(--game-rule),0 .45rem 1.75rem #28234110;
}
.game-shell.wide .game-clock {
  background:var(--brand); color:white; border:0; border-radius:.9rem;
}
.game-shell.wide .game-clock[data-low="true"] { background:#a63143; color:white }
.game-shell.wide .time-track { background:#ffffff54 }
.game-shell.wide .time-track span { background:#e5f584 }
.game-shell.wide.theme-truth .game-prompt {
  background:repeating-linear-gradient(0deg,transparent 0 1.55rem,#976b2719 1.56rem 1.6rem),#fff9e9;
}
.game-shell.wide.theme-truth .play .statement { background:#fffaf0 }
.game-shell.wide.theme-truth .play:not(:has(.truth-live)) { display:block }
.truth-live { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(12rem,1fr); align-items:center; gap:clamp(.8rem,3vw,2rem); text-align:start }
.game-shell.theme-truth .truth-live .game-prompt { display:grid; align-content:center; min-height:clamp(10rem,30dvh,18rem); padding:clamp(.9rem,4vw,2.75rem); text-align:start }
.game-shell.theme-truth .truth-live .game-prompt :is(h2,p) { margin-inline:0 }
.game-shell.theme-truth .truth-live .game-prompt .meta { color:var(--brand) }
.game-shell.theme-truth .truth-live-controls .round-guide { margin-inline:0 }
.game-shell.theme-truth .truth-live-controls .actions { justify-content:flex-start }
.game-shell.theme-truth .truth-live-controls .timer { color:var(--brand); margin-inline:0 }
.game-shell.wide.theme-either .choice-side { box-shadow:0 1px 0 var(--game-rule),0 .35rem 1.4rem #26203d10 }
.game-shell.wide.theme-never .finger-seat[aria-pressed="true"] { background:#d5efe5; border-color:var(--brand) }
.game-shell.wide.theme-draw .drawing-paper { border:1px solid var(--game-rule); box-shadow:0 .5rem 1.45rem #5b3b1920 }
.game-shell.wide.theme-code .code-panel { background:#f9fbff; border-color:var(--game-rule); box-shadow:0 .45rem 1.4rem #15294114 }
.game-shell.wide.theme-categories .letter-tile,.game-shell.wide.theme-chain .chain-arena div:first-child { box-shadow:0 .38rem 1rem #26203d18 }
.game-shell.wide.theme-numbers .interval-board { border-radius:.75rem; box-shadow:0 .45rem 1.4rem #15294121 }
.vote-progress {
  margin-block:0 .25rem; color:var(--brand); font-weight:750; font-variant-numeric:tabular-nums;
}
.theme-likely .vote-progress { color:var(--table-deep) }
.session-recap {
  width:min(100%,36rem); margin:.4rem auto 0; text-align:start; border-top:1px solid var(--game-rule);
}
.session-recap summary { padding:.35rem .15rem; cursor:pointer; color:var(--brand); font-weight:750; font-size:.9rem }
.session-recap :is(ol,ul) { max-height:min(15rem,42dvh); overflow:auto; margin:.15rem 0 .4rem }
.session-recap ol { padding-inline-start:1.5rem }
.session-recap ol li { padding:.35rem .35rem .35rem .1rem; border-bottom:1px solid var(--game-rule) }
.session-recap ol li span { display:inline-block; margin-inline-end:.7rem }
.session-recap ol li strong { font-variant-numeric:tabular-nums }
.question-number { font-weight:650; opacity:.75; font-variant-numeric:tabular-nums }
.play .finger-instruction,.play .code-instruction { margin:.15rem auto .5rem; color:var(--muted); font-size:.9rem }
:is(.mime-clock,.table-clock)[data-low="true"] { color:#843328; background:#fff0cc }
.mime-clock[data-low="true"] progress { accent-color:#843328 }
@media(prefers-reduced-motion:no-preference) {
  .mime-card.is-open,.infiltration-card.is-open { animation:reveal-game-card .22s ease-out both }
  .truth-live .game-prompt { animation:reveal-game-card .24s ease-out both }
  .choice-side .choice-meter i { animation:game-result-meter .32s ease-out both; transform-origin:left }
  .code-panel button[aria-pressed="true"] { transition:background-color .16s ease-out }
  @keyframes reveal-game-card { from { transform:translateY(.25rem) scale(.975); opacity:.68 } to { transform:none; opacity:1 } }
  @keyframes game-result-meter { from { transform:scaleX(0) } to { transform:scaleX(1) } }
}
@media(max-width:650px) {
  .game-mast-actions .button { min-height:44px }
  .game-shell.wide .game-toolbar-title { display:none }
  .game-shell:not(.theme-likely) .game-mast { grid-template-columns:minmax(0,1fr); min-height:0 }
  .game-shell:not(.theme-likely) .game-mast-copy { padding:1.15rem 1rem .7rem }
  .game-shell:not(.theme-likely) .game-mast-art { grid-area:2 / 1; min-height:0; padding:.35rem .75rem .9rem }
  .game-shell:not(.theme-likely) .likely-mast-photo {
    position:static; grid-area:2 / 1; width:100%; height:auto; aspect-ratio:2.1;
    mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 88%,transparent);
  }
  .game-shell.theme-truth .setup-choices { grid-template-columns:1fr }
  .truth-live { grid-template-columns:minmax(0,1fr) }
  .game-shell.theme-truth .setup-mode { padding-inline:0 }
  .game-shell.theme-truth .setup-mode + .setup-mode { border-inline-start:0; border-top:1px solid var(--game-rule); margin-top:.7rem }
  .game-shell.session-game:not(.wide) .play:has(> :is([data-table-setup],[data-mime],[data-infiltration])) { display:block }
  .game-shell.session-game:not(.wide) .play > :is([data-table-setup],[data-mime],[data-infiltration]) {
    padding:.8rem 0 0; margin-top:.75rem; border-inline-start:0; border-top:1px solid var(--game-rule);
  }
}
