@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/Manrope.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/static/fonts/Sora.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f3eee7;
  background: #05070b;
  --gold: #efd29a;
  --gold-deep: #b18a55;
  --ink: #05070b;
  --line: rgba(237, 205, 151, .22);
  --display: "Sora", "Manrope", sans-serif;
  --teal: #91c7b2;
  --rose: #e4a2a6;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  --scene-image: none;
  --scene-accent: #efd29a;
  --scene-rgb: 239,210,154;
  background:
    linear-gradient(180deg, rgba(3, 6, 11, .28), rgba(3, 6, 11, .42)),
    url("/static/art/cristie-quiet-current-v3.jpg") center / cover fixed;
}
body[data-role="host"]:is([data-phase="category"], [data-phase="generating"], [data-phase="question"], [data-phase="play"], [data-phase="feedback"], [data-phase="reveal"]) {
  background-image: linear-gradient(90deg, rgba(3, 6, 11, .67), rgba(3, 6, 11, .58) 55%, rgba(3, 6, 11, .64)), var(--scene-image);
  background-position: center, center;
  background-size: cover;
  background-attachment: fixed;
}
body[data-role="host"]:is([data-phase="category"], [data-phase="generating"]) { background: #05070b; }
body[data-role="phone"]:not([data-phase="lobby"]) {
  background-image: linear-gradient(180deg, rgba(3, 6, 11, .68), rgba(3, 6, 11, .76)), var(--scene-image);
  background-position: center, center;
  background-size: cover;
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle at 50% 0%, rgba(65, 99, 154, .16), transparent 52%),
    repeating-linear-gradient(90deg, transparent 0, transparent calc(25vw - 1px), rgba(236, 211, 167, .025) 25vw);
}
/* The supplied Cristie wordmark stays in view without covering controls. */
body::after {
  content: "";
  position: fixed;
  z-index: 19;
  right: clamp(12px, 2vw, 30px);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  width: clamp(112px, 11vw, 156px);
  aspect-ratio: 881 / 240;
  pointer-events: none;
  opacity: .66;
  background: linear-gradient(105deg, #826d51 12%, #efd6a3 30%, #a8885c 48%, #f8e8c8 53%, #8f7755 72%, #d8bd8d 92%);
  background-size: 240% 100%;
  -webkit-mask: url("/static/art/cristie-wordmark-mask.png") center / contain no-repeat;
  mask: url("/static/art/cristie-wordmark-mask.png") center / contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(239, 210, 154, .3));
}
body:not([data-role="phone"])::after { animation: cristie-signature-light 26s ease-in-out infinite; }
body[data-role="phone"]::after { background-position: 57% 50%; }
.capacity-note { display: inline-block; margin-left: .6em; color: #d7bc8b; font-family: "Manrope", sans-serif; font-size: clamp(12px, 1vw, 16px); font-weight: 700; line-height: 1.2; letter-spacing: .04em; vertical-align: middle; }
@keyframes cristie-signature-light {
  0%, 100% { background-position: 0% 50%; filter: drop-shadow(0 0 6px rgba(239, 210, 154, .21)); }
  50% { background-position: 100% 50%; filter: drop-shadow(0 0 11px rgba(239, 210, 154, .42)); }
}
.opening-board { width: min(100%, 1450px); margin: 0 auto; min-height: calc(100svh - 110px); padding: clamp(24px, 4vw, 54px); display: grid; grid-template-columns: minmax(275px, .83fr) minmax(0, 1.55fr); align-items: start; gap: clamp(28px, 4vw, 70px); }
.opening-controls, .opening-seats { border-top: 1px solid rgba(239, 210, 154, .48); padding-top: 22px; }
.opening-controls h2 { margin: 24px 0 18px; max-width: 600px; font-size: clamp(38px, 5vw, 78px); line-height: 1.03; letter-spacing: -.06em; }
.opening-controls > p:not(.eyebrow) { max-width: 430px; line-height: 1.5; }
.opening-controls button { margin: 22px 0 10px; padding: 14px 22px; }
.opening-controls a { display: block; margin-top: 24px; }
.opening-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; }
.opening-actions button { margin: 22px 0 10px; }
.opening-actions .howto-trigger { display: inline-flex; align-items: center; gap: 16px; color: #f3eee7; border-color: rgba(239,210,154,.55); background: rgba(12,18,27,.78); }
.howto-trigger span { color: var(--gold); font-size: .82em; }
.opening-controls .developer-credit { margin-top: clamp(28px, 6vh, 76px); padding-top: 14px; border-top: 1px solid rgba(239,210,154,.18); color: rgba(241,231,216,.65); font-size: 12px; letter-spacing: .03em; }
.developer-credit strong { color: #e8d2a9; font-weight: 700; }
.opening-controls .developer-credit a { display: inline-block; margin-top: 5px; color: #d5bc8e; text-decoration: none; }
.opening-controls .developer-credit a:hover { text-decoration: underline; }
#room-result { color: #ffd0c5; min-height: 1em; }
.opening-seat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.opening-seats .eyebrow { margin-bottom: 15px; }
.opening-seat-grid .seat-card { min-height: clamp(120px, 13vw, 170px); }
@media (max-width: 1050px) { .opening-board { grid-template-columns: 1fr; } .opening-seat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 680px) { .opening-seat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* A portable 1980s CRT cabinet frames the instructions instead of a flat player. */
.retro-tv { position: fixed; inset: auto clamp(12px,2.8vw,40px) clamp(12px,2.5vh,28px) auto; margin: 0; width: min(55vw, 980px); max-width: calc(100vw - 24px); max-height: calc(100svh - 24px); padding: 15px 18px 12px; overflow: auto; color: #eadac0; border: 2px solid #796b55; border-radius: 24px 24px 17px 17px; background: linear-gradient(155deg,#5b4b39 0%,#2b2827 11%,#11151a 27%,#303032 64%,#0e1115 100%); box-shadow: inset 0 2px 2px rgba(255,237,190,.32), inset 0 -7px 10px #060809, 0 18px 55px rgba(0,0,0,.76), 0 0 0 5px rgba(8,10,13,.8); z-index: 100; }
.retro-tv::backdrop { background: rgba(2,4,8,.56); backdrop-filter: blur(3px); }
.tv-heading,.tv-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--display); font-size: clamp(10px,.9vw,13px); font-weight: 800; letter-spacing: .15em; }
.tv-heading { padding: 0 3px 10px 8px; color: #dbc6a1; }
.tv-heading b { color: #f1d899; }
.retro-tv .tv-close { flex: none; margin: 0; padding: 0; width: 30px; height: 30px; border: 1px solid rgba(242,217,172,.4); border-radius: 50%; background: #171b20; color: #edd8ad; font-family: sans-serif; font-size: 24px; font-weight: 400; line-height: 26px; }
.tv-cabinet { display: grid; grid-template-columns: minmax(0,1fr) clamp(50px,7.5vw,93px); gap: clamp(8px,1.2vw,16px); padding: clamp(9px,1.2vw,15px); border: 2px solid #1b1b1a; border-radius: 20px; background: linear-gradient(125deg,#211f1d,#4b4942 45%,#1b1c1c 85%); box-shadow: inset 0 2px 7px #090b0c, 0 1px 0 rgba(255,245,204,.26); }
.tv-screen-bezel { padding: clamp(8px,1.15vw,14px); border: 2px solid #090d0f; border-radius: 35px / 24px; background: linear-gradient(135deg,#0b0e10,#2b3030 49%,#070a0c); box-shadow: inset 0 1px 8px #000, 0 1px 1px rgba(246,231,197,.24); }
.tv-screen { position: relative; overflow: hidden; aspect-ratio: 16/9; border-radius: 24px / 15px; background: #030405; box-shadow: inset 0 0 22px #000, 0 0 2px rgba(234,245,237,.5); }
.tv-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 27px 9px rgba(0,0,0,.7), inset 0 0 2px rgba(221,246,242,.45); background: repeating-linear-gradient(180deg,transparent 0,transparent 3px,rgba(0,0,0,.11) 4px); }
.tv-screen video { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.tv-side-panel { display: flex; flex-direction: column; align-items: center; gap: clamp(9px,1.3vw,16px); padding: clamp(6px,1vw,13px) 3px; border-left: 1px solid rgba(0,0,0,.5); }
.tv-power-light { width: 8px; height: 8px; border-radius: 50%; background: #d18a37; box-shadow: 0 0 10px 3px rgba(228,143,53,.45); }
.tv-dial { width: clamp(27px,3.5vw,43px); aspect-ratio: 1; border: 4px ridge #797973; border-radius: 50%; background: radial-gradient(circle at 42% 36%,#686d68,#171b1d 70%); box-shadow: 1px 3px 6px #080a0b; }
.tv-dial::after { content: ""; display: block; width: 2px; height: 32%; margin: 14% auto 0; background: #d8c6a3; transform: rotate(25deg); }
.tv-dial-small { width: clamp(22px,2.8vw,35px); }
.tv-speaker { align-self: stretch; flex: 1; min-height: 26px; background: repeating-linear-gradient(180deg,transparent 0 3px,#080b0e 4px 5px,transparent 6px 8px); border-radius: 4px; opacity: .8; }
.tv-label { font: 700 8px var(--display); letter-spacing: .07em; color: #afa08a; }
.tv-foot { padding: 10px 7px 0; color: #9e947f; font-size: clamp(8px,.65vw,10px); }
@media (max-width: 850px) { .retro-tv { width: min(88vw,720px); } }
@media (max-width: 540px) { .retro-tv { width: calc(100vw - 18px); right: 9px; bottom: 9px; padding: 10px; border-radius: 15px; } .tv-cabinet { grid-template-columns: minmax(0,1fr) 36px; gap: 5px; padding: 5px; } .tv-screen-bezel { padding: 5px; border-radius: 16px; } .tv-screen { border-radius: 10px; } .tv-dial { width: 23px; border-width: 2px; } .tv-dial-small { width: 19px; } .tv-side-panel { gap: 7px; } .tv-heading,.tv-foot { letter-spacing: .05em; } }
button, input, select { font: inherit; }
button {
  cursor: pointer;
  border: 1px solid rgba(243, 217, 165, .38);
  border-radius: 3px;
  padding: 10px 18px;
  color: #101820;
  background: #efd29a;
  font-weight: 700;
  transition: filter .22s, transform .22s cubic-bezier(.2,.7,.2,1), border-color .22s, background .22s, box-shadow .22s;
}
button:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 7px 22px rgba(0, 0, 0, .15); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: default; transform: none; }
button.secondary { color: #f9f0df; background: rgba(35, 53, 75, .52); }
button.danger { color: #e9c1c2; border-color: rgba(228, 162, 166, .36); background: rgba(46, 29, 42, .72); }
button.danger:hover { color: #fff5f1; border-color: rgba(228, 162, 166, .8); background: rgba(100, 37, 48, .85); }
button.choice { color: #f9f0df; background: rgba(35, 53, 75, .52); text-align: left; }
button:focus-visible, input:focus-visible, select:focus-visible, .photo-picker:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }
header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 11px clamp(18px, 3.2vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(4, 8, 14, .88);
  backdrop-filter: blur(20px);
}
.brand { display: flex; align-items: center; gap: clamp(12px, 1.4vw, 23px); min-width: 0; }
.brand-mark { width: clamp(39px, 3.8vw, 58px); height: clamp(39px, 3.8vw, 58px); flex: none; filter: drop-shadow(0 0 12px rgba(239, 210, 154, .20)); }
.brand-type { min-width: 0; }
header small, .eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .23em;
  text-transform: uppercase;
}
header h1 {
  margin: 2px 0 0;
  font-family: var(--display);
  font-size: clamp(22px, 2.3vw, 34px);
  font-weight: 650;
  letter-spacing: -.065em;
  line-height: 1;
}
header h1 em { font: inherit; font-style: normal; color: var(--gold); }
main { width: 100%; max-width: 1800px; padding: 22px clamp(18px, 3.2vw, 54px) 34px; margin: 0 auto; }
.panel {
  --panel-pad: clamp(24px, 3vw, 45px);
  padding: var(--panel-pad);
  margin-bottom: 16px;
  border: 1px solid rgba(237, 205, 151, .13);
  border-radius: 2px;
  background: rgba(7, 16, 29, .72);
  box-shadow: 0 16px 45px rgba(0, 0, 0, .17);
  backdrop-filter: blur(18px);
}
.panel h2, .phase-head h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.06em;
}
.muted { color: #b4bbc5; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 22px; }
.lobby { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: clamp(28px, 3.2vw, 64px); }
.lobby .panel { padding: 24px 0; border: 0; border-top: 1px solid rgba(239, 210, 154, .5); background: transparent; box-shadow: none; backdrop-filter: none; }
.lobby .panel h2 { font-size: clamp(30px, 3vw, 48px); margin: 0 0 20px; line-height: 1.1; }
.lobby .panel:first-child { border-top-color: var(--gold); }
.lobby .setup-panel > p:has(select) { display: inline-block; width: calc(33.333% - 10px); margin: 9px 8px 12px 0; vertical-align: top; color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: .05em; }
.lobby .setup-panel > p:has(select) select { margin-top: 9px; font-size: 15px; font-weight: 600; letter-spacing: 0; }
.lobby .setup-panel > p:has(#language) { margin-left: 0; }
.qr { width: min(100%, 230px); padding: 12px; background: white; border-radius: 3px; }
.url { overflow-wrap: anywhere; color: var(--gold); font-weight: 650; }
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.players > .muted { grid-column: 1 / -1; }
.player {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end; gap: 8px; min-height: 72px;
  padding: 9px 8px 7px; border: 0; border-bottom: 2px solid var(--scene-accent);
  border-radius: 2px; background: #0b1727;
  font-size: 15px; font-weight: 800; text-shadow: 0 2px 10px #000;
}
.player::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(2, 8, 17, .96), rgba(2, 8, 17, .08) 90%), var(--scene-image) center / cover; opacity: .9; }
.player::after { content: attr(data-seat); position: absolute; top: 7px; right: 9px; color: var(--scene-accent); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.player > span:not(.bot-face) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player img {
  width: 53px; height: 60px; object-fit: cover; object-position: center 34%;
  border: 0; border-radius: 0; background: #101820;
  -webkit-mask-image: linear-gradient(90deg, #000 68%, transparent);
  mask-image: linear-gradient(90deg, #000 68%, transparent);
}
.player button { margin-left: auto; padding: 2px 8px; border-radius: 50%; }
.seat-gallery { grid-column: 1 / -1; min-width: 0; margin-top: -2px; }
.seat-gallery .eyebrow { margin: 0 0 11px; font-size: 10px; }
.seat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px; }
.seat-gallery.crowded .seat-grid { grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); gap: 8px; }
.seat-gallery.crowded .seat-card { min-height: 155px; }
.seat-gallery.crowded .seat-name { font-size: 17px; }
.seat-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  min-height: clamp(135px, 13vw, 170px); min-width: 0; padding: 12px;
  border-bottom: 2px solid var(--scene-accent, rgba(239, 210, 154, .45));
  background: #0b1624;
}
.seat-scene { position: absolute; inset: -5px; z-index: -2; background: var(--scene-image) center 42% / cover no-repeat; opacity: .32; filter: blur(5px); }
.seat-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(2, 7, 15, .96), rgba(2, 7, 15, .14) 72%); }
.seat-card::after { content: attr(data-seat); position: absolute; top: 11px; right: 12px; color: var(--scene-accent, var(--gold)); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.seat-portrait { position: absolute; top: 0; left: 0; z-index: 0; display: block; width: 120px; height: calc(100% - 18px); overflow: hidden; background: transparent; -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent 100%); mask-image: linear-gradient(90deg, #000 55%, transparent 100%); }
.seat-portrait img, .seat-portrait .bot-face { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 34%; border: 0; border-radius: 0; }
.seat-portrait img.selfie { object-fit: cover; }
.seat-name { position: relative; z-index: 1; max-width: 100%; overflow: hidden; color: #fbf4e9; font-size: clamp(16px, 1.5vw, 22px); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 2px 8px #000; }
.seat-card.custom-seat .seat-portrait { width: 120px; height: calc(100% - 18px); }
.seat-card.empty { border: 1px solid rgba(239, 210, 154, .2); border-bottom-color: rgba(239, 210, 154, .34); background: rgba(7, 16, 29, .42); }
.seat-card.empty::before { display: none; }
.seat-card.empty::after { color: rgba(239, 210, 154, .48); }
.seat-card.empty .seat-name { color: #9aa4ad; font-size: 15px; font-weight: 650; text-shadow: none; }
.seat-empty-mark { margin-bottom: 13px; color: rgba(239, 210, 154, .35); font: 300 46px/.8 var(--display); }
.seat-remove { position: absolute; z-index: 2; top: 34px; right: 9px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid rgba(239, 210, 154, .45); border-radius: 50%; color: #f4e2c3; background: rgba(7, 13, 22, .8); font-size: 20px; line-height: 1; }
.lobby label { color: #f0e8da; font-weight: 650; }
.lobby .setup-panel > p:has([type="checkbox"]) { margin: 8px 0; }
.lobby input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; vertical-align: middle; margin-right: 9px; accent-color: #e4bd80; }
input, select {
  width: 100%; min-height: 46px; padding: 10px 13px;
  border: 1px solid rgba(238, 210, 160, .38); border-radius: 4px;
  color: #f8f3e9; background: rgba(6, 13, 25, .72);
}
input:hover, select:hover { border-color: rgba(238, 210, 160, .67); }
.lobby select { margin-top: 8px; }
.lobby { position: relative; isolation: isolate; grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr); gap: 18px clamp(24px, 3vw, 46px); align-items: start; }
.lobby .lobby-join { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: 160px minmax(0, 1fr); column-gap: 24px; align-content: start; padding: 12px 0; }
.lobby .lobby-join h2 { grid-column: 1 / -1; margin-bottom: 10px; font-size: clamp(30px, 2.6vw, 40px); }
.lobby .lobby-join .qr { grid-column: 1; grid-row: 2 / 4; width: 160px; }
.lobby .lobby-join .join-details { grid-column: 2; grid-row: 2; align-self: center; min-width: 0; }
.lobby .lobby-join .join-details p { margin: 0 0 14px; }
.lobby .lobby-settings { grid-column: 1; grid-row: 2; padding-top: 12px; }
.lobby .lobby-settings h2 { margin-bottom: 10px; font-size: clamp(28px, 2.8vw, 38px); }
.lobby .lobby-settings > p:has(select) { margin-top: 5px; margin-bottom: 7px; }
.lobby .lobby-settings > p.muted { margin: 8px 0; font-size: 13px; }
.lobby .seat-gallery { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; padding-top: 20px; border-top: 1px solid rgba(239, 210, 154, .5); }
.lobby .seat-grid, .lobby .seat-gallery.crowded .seat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.controls button {
  border: 0; border-bottom: 1px solid rgba(239, 210, 154, .25);
  border-radius: 0; padding: 8px 12px;
  background: transparent; color: #d6d0c7;
  font-size: 12px; font-weight: 700; letter-spacing: .03em;
  box-shadow: none;
}
.controls button:hover { border-bottom-color: var(--gold); background: rgba(239, 210, 154, .065); color: #fff8ea; box-shadow: none; }
.controls .danger { color: #d9aeb0; background: transparent; }
.controls .danger:hover { border-bottom-color: #e4a2a6; background: rgba(228, 162, 166, .08); }

.chooser-scene {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 520px;
  height: min(900px, calc(100svh - 145px));
  overflow: hidden;
  border: 1px solid rgba(var(--scene-rgb), .34);
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(3, 9, 17, .84), rgba(3, 9, 17, .37) 62%, rgba(3, 9, 17, .43)), var(--scene-image) center / cover no-repeat;
  box-shadow: 0 22px 75px rgba(0, 0, 0, .38);
}
.scene-backdrop {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 39% 55% at 74% 52%, rgba(var(--scene-rgb), .13), transparent 100%);
}
.scene-portrait {
  position: absolute; top: 1%; right: 4%; bottom: -5%; width: 58%;
  display: grid; place-items: end center; pointer-events: none;
}
.scene-portrait img, .scene-portrait video, .scene-portrait .bot-face {
  display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom;
  -webkit-mask-image: radial-gradient(ellipse 57% 61% at 50% 48%, #000 12%, rgba(0,0,0,.93) 38%, rgba(0,0,0,.48) 66%, transparent 92%);
  mask-image: radial-gradient(ellipse 57% 61% at 50% 48%, #000 12%, rgba(0,0,0,.93) 38%, rgba(0,0,0,.48) 66%, transparent 92%);
}
.scene-portrait .bot-face { transform-origin: 50% 74%; animation: living-portrait-breath 6.4s ease-in-out infinite; }
.scene-portrait .bot-face { display: grid; place-items: center; color: var(--scene-accent); font-size: clamp(120px, 20vw, 290px); }
@keyframes living-portrait-breath {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.016, 1.012); }
}
.scene-wash {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 10, 20, .64) 0%, rgba(4, 11, 23, .25) 40%, transparent 67%),
    linear-gradient(0deg, rgba(3, 8, 17, .78) 0%, transparent 27%, transparent 74%, rgba(3, 8, 17, .36) 100%);
}
.chooser-scene::after {
  display: none;
}
.scene-void, .scene-flare { position: absolute; inset: 0; pointer-events: none; }
.scene-void { z-index: 2; background: #02050c; animation: scene-void-open .86s ease-out both; }
.scene-flare {
  z-index: 3; inset: auto; top: 50%; left: 50%; width: 28vmin; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 5%, #fff9dc 14%, rgba(var(--scene-rgb), .75) 38%, rgba(var(--scene-rgb), .18) 58%, transparent 76%);
  mix-blend-mode: screen;
  animation: scene-light-burst .86s ease-out both;
}
.scene-opening .scene-portrait {
  animation: scene-materialize .86s cubic-bezier(.16,.82,.24,1) both;
}
.scene-opening .scene-backdrop { animation: scene-backdrop-arrive .95s ease-out both; }
.scene-opening .scene-topline, .scene-opening .scene-copy {
  animation: scene-words-arrive .48s .42s ease-out both;
}
.scene-opening .scene-copy h2 { animation: none; }
body:has(.scene-opening) .controls { animation: utility-arrive .3s .82s ease-out both; }
@keyframes utility-arrive { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scene-void-open {
  0%, 17% { opacity: 1; }
  46%, 100% { opacity: 0; }
}
@keyframes scene-light-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.015); }
  14% { opacity: .9; transform: translate(-50%, -50%) scale(.06); }
  29% { opacity: 1; transform: translate(-50%, -50%) scale(5); }
  55%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(9); }
}
@keyframes scene-materialize {
  0%, 11% { opacity: 0; transform: scale(.035); filter: blur(20px) brightness(2.8); }
  23% { opacity: .72; transform: scale(.12); filter: blur(12px) brightness(2.2); }
  45% { opacity: 1; transform: scale(1.055); filter: blur(1px) brightness(1.3); }
  72%, 100% { opacity: 1; transform: scale(1); filter: none; }
}
@keyframes scene-backdrop-arrive {
  0%, 12% { opacity: 0; transform: scale(.06); }
  49% { opacity: .9; transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1.05); }
}
@keyframes scene-words-arrive {
  from { opacity: 0; transform: translateY(16px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: none; }
}
.scene-topline, .scene-copy { position: absolute; z-index: 2; }
.scene-topline {
  top: clamp(22px, 4vw, 58px); left: clamp(22px, 4vw, 64px); right: clamp(22px, 4vw, 64px);
  display: flex; justify-content: space-between; gap: 12px;
  color: #fff6e4; font-weight: 800; font-size: clamp(13px, 1.4vw, 20px);
  letter-spacing: .15em; text-transform: uppercase;
}
.scene-topline span:last-child { border-bottom: 1px solid var(--scene-accent); padding-bottom: 7px; }
.scene-topline em { color: rgba(255, 255, 255, .62); font-style: normal; }
.scene-topline .scene-thinking {
  display: flex; align-items: center; gap: 11px; padding: 0;
  border: 0; filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .36));
}
.scene-thinking i {
  display: block; width: clamp(13px, 1.6vw, 21px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 31% 26%, #fffefa 0 13%, #e8e7e0 32%, #a9b2b7 62%, #607078 100%);
  border: 1px solid rgba(255, 255, 255, .62);
  box-shadow: inset -3px -4px 6px rgba(10, 20, 30, .42), 0 2px 12px rgba(var(--scene-rgb), .35);
  animation: thought-breathe 2.7s ease-in-out infinite;
}
.scene-thinking i:nth-child(2) { animation-delay: .35s; }
.scene-thinking i:nth-child(3) { animation-delay: .7s; }
@keyframes thought-breathe { 0%, 100% { transform: translateY(0); opacity: .74; } 50% { transform: translateY(-5px); opacity: 1; } }
.scene-copy { left: clamp(24px, 5vw, 82px); right: 16px; bottom: clamp(48px, 6vw, 94px); }
.scene-status {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 0 0 8px; border: 0; border-bottom: 1px solid var(--scene-accent);
  border-radius: 0; background: transparent;
  color: var(--scene-accent); font-weight: 800; font-size: clamp(11px, 1vw, 14px);
  letter-spacing: .19em; text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.scene-status i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--scene-accent); box-shadow: 0 0 16px var(--scene-accent);
  animation: breathe 1.8s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .28; transform: scale(.68); } }
.scene-copy h2 {
  max-width: 8em; margin: 12px 0 2px;
  font-family: var(--display);
  font-size: clamp(58px, 7.2vw, 118px); line-height: 1.04;
  font-weight: 650; letter-spacing: -.075em;
  text-shadow: 0 5px 30px rgba(0, 0, 0, .55);
  animation: scene-arrive .85s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes scene-arrive { from { opacity: 0; transform: translateY(18px); filter: blur(8px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
.scene-copy p { max-width: 420px; margin: 14px 0 0; color: #f0e9dd; font-size: clamp(17px, 1.7vw, 25px); line-height: 1.35; }
/* Play board */
.question-preview, .phone-question-preview {
  position: relative; isolation: isolate; display: grid; place-items: center;
  text-align: center; overflow: hidden;
}
.question-preview { min-height: calc(100svh - 122px); padding: clamp(28px, 6vw, 100px); }
.question-preview::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--scene-image) center / cover no-repeat;
  opacity: .23; filter: blur(8px);
}
.question-preview::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(var(--scene-rgb), .12), transparent 65%), linear-gradient(90deg, #04080edb, #04080e84 50%, #04080edb);
}
.question-preview-copy { width: min(100%, 1120px); animation: question-arrive .8s cubic-bezier(.18,.72,.2,1) both; }
.question-preview-copy > p, .phone-question-preview > p { color: var(--scene-accent); font-size: clamp(12px, 1.1vw, 16px); font-weight: 850; letter-spacing: .27em; }
.question-preview h1 { margin: 24px 0 34px; font: 720 clamp(38px, 5.6vw, 84px)/1.13 var(--display); letter-spacing: -.045em; text-wrap: balance; text-shadow: 0 6px 36px #000b; }
.question-preview.long-question h1 { font-size: clamp(32px, 4vw, 60px); }
.question-preview-rule { display: block; width: min(300px, 48vw); height: 3px; margin: 0 auto; overflow: hidden; background: rgba(var(--scene-rgb), .25); }
.question-preview-rule::after { content: ""; display: block; width: 100%; height: 100%; background: var(--scene-accent); box-shadow: 0 0 34px rgba(var(--scene-rgb), .65); transform-origin: left; animation: question-reveal-progress var(--question-duration, 5s) linear both; }
@keyframes question-arrive { from { opacity: 0; transform: translateY(22px) scale(.98); filter: blur(12px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes question-reveal-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.phone-question-preview { min-height: calc(100svh - 170px); padding: 28px 8px; }
.phone-question-preview h2 { margin: 18px 0 30px; font: 700 clamp(29px, 8vw, 51px)/1.15 var(--display); letter-spacing: -.04em; text-wrap: balance; }
.play-stage { min-height: calc(100svh - 122px); display: flex; flex-direction: column; }
.play-stage.entering .phase-head { animation: content-arrive .38s cubic-bezier(.18,.7,.2,1) both; }
.play-stage.entering .turn-banner { animation: content-arrive .32s .16s cubic-bezier(.18,.7,.2,1) both; }
@keyframes content-arrive { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } to { opacity: 1; transform: translateY(0); filter: none; } }
.phase-head { position: relative; isolation: isolate; text-align: left; margin: 0 0 12px; max-width: none; min-height: 145px; }
.phase-head::before { content: ""; position: absolute; z-index: -1; top: -24px; right: 0; width: 45%; height: calc(100% + 35px); background: var(--scene-image) center / cover; opacity: .4; -webkit-mask-image: radial-gradient(ellipse at 78% 34%, #000 12%, transparent 74%); mask-image: radial-gradient(ellipse at 78% 34%, #000 12%, transparent 74%); }
.phase-head::after { content: ""; display: block; width: min(100%, 720px); height: 1px; margin: 12px 0 0; background: linear-gradient(90deg, var(--gold), transparent); opacity: .46; }
.phase-head .eyebrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; font-size: 11px; color: var(--scene-accent); }
.source-note { padding-left: 11px; border-left: 1px solid rgba(239, 210, 154, .38); color: #a5a9ad; font-size: 10px; font-weight: 600; letter-spacing: .09em; }
.phase-head h2 { font-size: clamp(38px, 4vw, 62px); line-height: 1.08; margin: 7px 0 9px; max-width: 72%; }
.phase-head p { font-size: clamp(17px, 1.5vw, 22px); margin: 6px 0; max-width: 72%; }
.answers-left { position: absolute; top: 2px; right: 0; display: flex; align-items: baseline; gap: 10px; color: #f8f2e7; text-align: right; }
.answers-left strong { color: var(--scene-accent); font: 650 clamp(43px, 5vw, 76px)/.95 var(--display); font-variant-numeric: tabular-nums; }
.answers-left span { max-width: 120px; font-size: clamp(10px, .95vw, 14px); font-weight: 850; letter-spacing: .14em; line-height: 1.15; }
.turn-banner {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 74px; padding: 8px 0 12px; border: 0; border-bottom: 1px solid var(--scene-accent);
  border-radius: 0; background: transparent;
  box-shadow: none;
  font-size: clamp(21px, 2.2vw, 31px); font-weight: 750;
}
.turn-banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--scene-image) center 42% / cover;
  opacity: .16;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 48%);
  mask-image: linear-gradient(90deg, #000, transparent 48%);
  pointer-events: none;
}
.turn-name { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.turn-name img { width: 72px; height: 66px; flex: none; border: 0; border-radius: 0; object-fit: cover; object-position: center 34%; background: #091423; -webkit-mask-image: linear-gradient(90deg, #000 66%, transparent); mask-image: linear-gradient(90deg, #000 66%, transparent); }
.turn-name .bot-face { display: grid; place-items: center; width: 72px; height: 66px; flex: none; font-size: 18px; }
.turn-tail { display: inline-flex; align-items: center; gap: clamp(14px, 2vw, 32px); margin-left: auto; }
.next-ready { display: inline-flex; align-items: center; justify-content: flex-end; gap: 9px; min-width: 0; color: var(--scene-accent); text-align: right; }
.next-ready-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.next-ready small { color: #d8d5cd; font-size: 10px; font-weight: 850; letter-spacing: .17em; white-space: nowrap; }
.next-ready strong { max-width: 160px; overflow: hidden; font-size: clamp(17px, 1.5vw, 23px); line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.next-ready img, .next-ready .bot-face { display: block; width: 56px; height: 54px; flex: none; object-fit: cover; object-position: center 34%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 38%); mask-image: linear-gradient(90deg, transparent, #000 38%); }
.next-ready .bot-face { display: grid; place-items: center; }
.turn-meta { display: inline-flex; align-items: center; gap: clamp(15px, 2vw, 32px); font-size: .75em; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.turn-clock { display: inline-flex; align-items: baseline; gap: 1px; min-width: 2.6em; justify-content: flex-end; padding-left: 18px; border-left: 1px solid rgba(239, 210, 154, .42); }
.turn-clock .timer { font-size: 1.65em; line-height: .9; }
.turn-clock small { color: var(--gold); font-size: .7em; }
.turn-banner .timer { color: var(--scene-accent); }
.board { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: clamp(8px, 1.1vw, 17px); margin-top: 22px; }
.play-stage > .board { flex: 1; grid-auto-rows: minmax(0, 1fr); }
.board.arriving .tile:not(.removed) { animation: tile-arrive .25s cubic-bezier(.18,.72,.2,1) both; animation-delay: calc(.05s + var(--tile-index) * 5ms); }
.final-reveal .tile.reveal-wrong { animation: wrong-drop .8s cubic-bezier(.3,.3,.2,1) .16s forwards; }
.final-reveal .tile.reveal-correct { animation: correct-hold .75s ease-out .7s both; }
@keyframes wrong-drop { to { opacity: 0; transform: translateY(10px) scale(.88); visibility: hidden; } }
@keyframes correct-hold { 0% { color: #fff; } 55% { color: var(--scene-accent); text-shadow: 0 0 22px rgba(var(--scene-rgb), .65); } 100% { color: #f9f4eb; } }
.reveal-banner { display: flex; align-items: baseline; gap: 18px; min-height: 74px; padding: 14px 0; border-bottom: 1px solid var(--scene-accent); color: #e9e7e1; font-size: clamp(14px, 1.4vw, 20px); }
.reveal-banner strong { color: var(--scene-accent); font-size: clamp(22px, 2.2vw, 33px); }
.reveal-banner > span:last-child { margin-left: auto; white-space: nowrap; }
.reveal-banner .timer { color: var(--scene-accent); font-variant-numeric: tabular-nums; }
@keyframes tile-arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
.tile {
  position: relative; display: grid; place-items: center; min-height: clamp(60px, 7.4vh, 94px);
  padding: 14px 8px 8px; border: 0; border-bottom: 1px solid rgba(240, 216, 178, .48); border-radius: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 75%);
  box-shadow: none;
  text-align: center; font-size: clamp(17px, 1.65vw, 25px); font-weight: 700; line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .65);
  word-break: break-word;
}
.tile::before { content: attr(data-index); position: absolute; top: 6px; left: 7px; color: var(--scene-accent); opacity: .72; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.tile::after { display: none; }
.board.few .tile { min-height: clamp(86px, 12vh, 130px); font-size: clamp(22px, 2.3vw, 32px); }
.tile.removed { opacity: .15; color: transparent; border-bottom-color: transparent; background: transparent; }
.tile.removed::before, .tile.removed::after { opacity: 0; }
.board.dense { margin-top: 12px; gap: clamp(5px, .6vw, 9px); }
.board.dense .tile { min-height: clamp(55px, 7.5vh, 83px); font-size: clamp(17px, 1.6vw, 23px); }
.board-rule { margin-top: 17px; padding-left: 12px; border-left: 1px solid rgba(239, 210, 154, .48); font-size: 14px; }
.event {
  --verdict-color: var(--gold); --verdict-rgb: 239,210,154;
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: 100%; min-height: 88px; margin: 10px 0 14px; padding: 10px 24px 11px 20px;
  border: 0; border-left: 2px solid var(--verdict-color); border-bottom: 1px solid rgba(var(--verdict-rgb), .32);
  border-radius: 0; background: transparent; box-shadow: none;
  animation: verdict-arrive .3s ease-out both;
}
.feedback-handoff { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.feedback-handoff .event { flex: 1; min-width: 0; }
.feedback-handoff .next-ready { flex: none; padding-bottom: 2px; }
.event::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--verdict-rgb), .16), rgba(var(--verdict-rgb), .035) 35%, transparent 72%);
}
.event::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, var(--verdict-color), transparent 75%);
  transform-origin: left; animation: verdict-ripple .65s ease-out both;
}
.event.correct { --verdict-color: var(--teal); --verdict-rgb: 145,199,178; }
.event.wrong, .event.second_wrong { --verdict-color: var(--rose); --verdict-rgb: 228,162,166; }
.event-copy { display: flex; align-items: center; gap: clamp(18px, 3vw, 48px); min-width: 0; }
.event .event-player {
  display: flex; align-items: center; gap: 9px; flex: none; min-width: clamp(150px, 15vw, 225px);
  margin: 0; color: var(--scene-accent); font-size: 13px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase;
}
.event .event-player img { width: 60px; height: 54px; object-fit: cover; object-position: center 34%; border: 0; border-radius: 0; -webkit-mask-image: linear-gradient(90deg, #000 64%, transparent); mask-image: linear-gradient(90deg, #000 64%, transparent); }
.event .event-player .bot-face { display: grid; place-items: center; width: 60px; height: 54px; font-size: 14px; }
.event-verdict { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px clamp(14px, 2vw, 28px); min-width: 0; }
.event h2 { margin: 0; color: var(--verdict-color); font-family: var(--display); font-size: clamp(33px, 3.3vw, 48px); font-weight: 650; line-height: 1.03; letter-spacing: -.055em; }
.event .event-detail { max-width: 580px; margin: 0; color: #e2e3df; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.2; }
.event .event-points { flex: none; margin: 0; color: var(--verdict-color); font-size: clamp(32px, 4vw, 58px); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
body[data-phase="feedback"] main { padding-top: 14px; padding-bottom: 12px; }
body[data-phase="feedback"] .phase-head { margin-bottom: 5px; }
body[data-phase="feedback"] .phase-head h2 { font-size: clamp(35px, 3.7vw, 55px); margin: 2px 0; }
body[data-phase="feedback"] .phase-head p { font-size: clamp(15px, 1.4vw, 20px); margin: 2px 0; }
body[data-phase="feedback"] .phase-head .eyebrow { font-size: 11px; }
body[data-phase="feedback"] .phase-head::after { margin-top: 9px; }
body[data-phase="feedback"] .board { margin-top: 8px; gap: clamp(5px, .6vw, 9px); }
body[data-phase="feedback"] .tile { min-height: clamp(49px, 7vh, 72px); font-size: clamp(14px, 1.4vw, 20px); }
body[data-phase="feedback"] .board.dense .tile { min-height: clamp(49px, 6.5vh, 70px); }
body[data-phase="feedback"] .board-rule { display: none; }
@keyframes verdict-arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes verdict-ripple { from { opacity: .2; transform: scaleX(.08); } to { opacity: .68; transform: scaleX(1); } }

/* The large scores are readable from across the room. */
.score-mode header { padding-top: 8px; padding-bottom: 8px; }
.score-mode header small { display: none; }
.score-mode header h1 { font-size: 25px; }
.score-mode main { padding-top: 14px; padding-bottom: 14px; }
.scores {
  position: relative; width: 100%; min-height: calc(100svh - 110px);
  display: flex; flex-direction: column; gap: 14px;
}
.winner-spotlight {
  position: absolute; z-index: 5; inset: 0; isolation: isolate; overflow: hidden;
  border-bottom: 1px solid rgba(239, 210, 154, .36);
  background: radial-gradient(ellipse at 50% 76%, #1a2635 0%, #0c1420 42%, #05080d 79%);
}
.final-scores.with-spotlight:not(.show-standings) .score-heading,
.final-scores.with-spotlight:not(.show-standings) #score-list { visibility: hidden; }
.final-scores.with-spotlight.show-standings .winner-spotlight { display: none; }
.winner-spotlight::before {
  content: ""; position: absolute; left: 7%; right: 7%; bottom: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239, 210, 154, .42), transparent);
}
.winner-replay {
  position: absolute; z-index: 8; top: clamp(18px, 3vh, 38px); right: clamp(18px, 4vw, 64px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 9px;
  max-width: min(360px, 36vw); text-align: right; pointer-events: auto;
}
.winner-replay > span { color: #f7f2e8; font: 650 clamp(22px, 2.1vw, 32px)/1.15 var(--display); letter-spacing: -.05em; }
.winner-replay button { border-color: rgba(239, 210, 154, .8); padding: 11px 18px; background: var(--gold); font-size: clamp(13px, 1vw, 16px); }
.winner-replay small { color: #d1d3d5; font-size: clamp(12px, .9vw, 15px); line-height: 1.3; }
.podium-person {
  position: absolute; bottom: 6%; z-index: 1; display: flex; flex-direction: column; align-items: center;
  width: clamp(180px, 25vw, 350px); height: clamp(280px, 55svh, 520px);
  text-align: center; pointer-events: none;
}
.podium-2 { left: 12%; animation: podium-left-in .72s cubic-bezier(.18,.8,.22,1) .48s both; }
.podium-3 { right: 12%; animation: podium-right-in .72s cubic-bezier(.18,.8,.22,1) .62s both; }
.podium-1 {
  left: 50%; bottom: 1%; z-index: 2;
  width: clamp(300px, 42vw, 650px); height: clamp(400px, 82svh, 930px);
  animation: podium-winner-in .82s cubic-bezier(.14,.75,.18,1) .08s both;
}
.podium-portrait { width: 100%; flex: 1; min-height: 0; overflow: hidden; }
.podium-portrait img, .podium-portrait .bot-face {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 35%;
  -webkit-mask-image: radial-gradient(ellipse 53% 58% at 50% 48%, #000 12%, rgba(0,0,0,.93) 38%, rgba(0,0,0,.45) 66%, transparent 92%);
  mask-image: radial-gradient(ellipse 53% 58% at 50% 48%, #000 12%, rgba(0,0,0,.93) 38%, rgba(0,0,0,.45) 66%, transparent 92%);
}
.podium-portrait .bot-face { display: grid; place-items: center; color: var(--scene-accent); font-size: 100px; }
.podium-2 .podium-portrait, .podium-3 .podium-portrait { filter: saturate(.78) brightness(.74); }
.podium-caption { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; padding: 0 8px 12px; text-shadow: 0 3px 16px #000; }
.podium-caption span { color: var(--scene-accent); font-size: clamp(13px, 1.3vw, 18px); font-weight: 850; letter-spacing: .18em; text-transform: uppercase; }
.podium-caption strong { max-width: 100%; overflow: hidden; color: #f8f3e9; font: 650 clamp(24px, 2.8vw, 42px)/1.08 var(--display); letter-spacing: -.055em; text-overflow: ellipsis; white-space: nowrap; }
.podium-caption small { color: #d7d6d0; font-size: clamp(13px, 1.25vw, 18px); font-weight: 800; letter-spacing: .05em; }
.podium-1 .podium-caption { gap: 5px; padding-bottom: 18px; }
.podium-1 .podium-caption strong { font-size: clamp(46px, 5.5vw, 78px); }
@keyframes podium-winner-in {
  from { opacity: 0; transform: translate(-50%, 18px) scale(.86); filter: blur(8px); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); filter: none; }
}
@keyframes podium-left-in {
  from { opacity: 0; transform: translate(28px, 12px) scale(.9); filter: blur(7px); }
  to { opacity: 1; transform: translate(0, 0) scale(1); filter: none; }
}
@keyframes podium-right-in {
  from { opacity: 0; transform: translate(-28px, 12px) scale(.9); filter: blur(7px); }
  to { opacity: 1; transform: translate(0, 0) scale(1); filter: none; }
}
.score-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.score-heading h2 { margin: 0; font: 650 clamp(38px, 4.3vw, 66px)/1.05 var(--display); letter-spacing: -.065em; }
.score-heading > span { color: var(--gold); font-size: clamp(17px, 1.8vw, 25px); font-weight: 800; }
#score-list {
  flex: 1; display: grid; grid-template-rows: repeat(var(--score-count), minmax(0, 1fr));
  gap: clamp(5px, .8vh, 11px);
}
.score-row {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: clamp(55px, 6vw, 90px) minmax(0, 1fr) minmax(140px, 20%);
  align-items: center; gap: 12px; min-height: 0; margin: 0; padding: 6px 22px;
  border: 0; border-left: 3px solid var(--scene-accent); border-bottom: 1px solid rgba(238, 206, 154, .26); border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.score-row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--scene-image) center / cover; opacity: .2; -webkit-mask-image: linear-gradient(90deg, #000, transparent 70%); mask-image: linear-gradient(90deg, #000, transparent 70%); }
.scores.mid .score-row { grid-template-columns: 65px minmax(0, 1fr) minmax(125px, 19%); }
.scores.mid .score-row [data-rank] { font-size: clamp(44px, 4.5vw, 70px); }
.scores.mid .score-name { font-size: clamp(30px, 3.4vw, 54px); }
.scores.mid .score-points { font-size: clamp(64px, 7vw, 108px); }
.score-row [data-rank] { color: var(--gold); font-family: var(--display); font-size: clamp(38px, 4vw, 66px); font-weight: 600; line-height: 1; }
.score-name { display: flex; align-items: center; gap: 14px; min-width: 0; font-size: clamp(26px, 3vw, 47px); font-weight: 750; }
.score-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-name .score-portrait, .phone-score-identity .score-portrait {
  position: relative; display: block; flex: none;
  width: clamp(76px, 8.6vh, 112px); height: clamp(76px, 8.6vh, 112px);
  overflow: hidden; background: transparent;
  -webkit-mask-image: radial-gradient(ellipse 87% 88% at 45% 48%, #000 54%, transparent 100%);
  mask-image: radial-gradient(ellipse 87% 88% at 45% 48%, #000 54%, transparent 100%);
}
.score-portrait img, .score-portrait .bot-face {
  display: block; width: 100%; height: 100%; min-width: 0; min-height: 0;
  border: 0; border-radius: 0; object-fit: cover; object-position: center 37%;
  background: #080d14; filter: none;
}
.score-portrait .bot-face { display: grid; place-items: center; font-size: 32px; }
.score-portrait::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 25%, rgba(var(--scene-rgb), .21) 47%, transparent 68%);
  opacity: 0; transform: translateX(-55%);
}
.score-row.score-leader .score-portrait::after, .final-scores .score-row:first-child .score-portrait::after,
body[data-role="phone"][data-phase="finished"] .phone-score-identity .score-portrait::after {
  animation: portrait-light 1.1s ease-out .08s both;
}
@keyframes portrait-light { 45% { opacity: 1; } 100% { opacity: 0; transform: translateX(55%); } }
.score-points { text-align: right; font-size: clamp(52px, 6.2vw, 92px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.07em; white-space: nowrap; }
.score-points .old, .score-points .gain { display: inline-block; }
.gain { color: var(--gold); margin-left: 12px; font-size: .52em; }
.score-row.merged .gain { opacity: 0; transition: opacity .4s; }
.score-row.merged .old { color: var(--gold); animation: score-land .34s ease-out both; }
@keyframes score-land { 0% { transform: scale(.9); opacity: .65; } 65% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.score-row:first-child { border-bottom-color: rgba(239, 210, 154, .72); background: rgba(41, 58, 75, .2); }
.final-scores .score-row:first-child .score-points { color: var(--scene-accent); }
.final-scores .score-row:first-child {
  border-left-width: 5px; border-top: 1px solid rgba(239, 210, 154, .68);
  background: linear-gradient(90deg, rgba(239, 210, 154, .12), rgba(239, 210, 154, .025) 56%, transparent);
  box-shadow: 0 0 42px rgba(var(--scene-rgb), .13);
}
.final-scores .score-row:first-child [data-rank] { color: #fff1c9; text-shadow: 0 0 24px rgba(239, 210, 154, .45); }
.final-scores .score-row:first-child::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 32%, rgba(var(--scene-rgb), .28) 50%, transparent 68%); transform: translateX(-100%); animation: winner-light 2.2s ease-out .3s both; }
@keyframes winner-light { to { transform: translateX(100%); } }
.scores.sparse .score-row { grid-template-columns: clamp(90px, 9vw, 150px) minmax(0, 1fr) minmax(190px, 24%); padding: 18px clamp(20px, 3vw, 50px); gap: clamp(15px, 2.5vw, 42px); }
.scores.sparse .score-row [data-rank] { font-size: clamp(74px, 8vw, 140px); }
.scores.sparse .score-name { font-size: clamp(48px, 5.5vw, 92px); gap: clamp(18px, 2vw, 34px); }
.scores.sparse .score-points { font-size: clamp(118px, 13vw, 215px); line-height: .8; }
.scores.compact { gap: 8px; }
.scores.compact .score-heading h2 { font-size: clamp(36px, 4vw, 58px); }
.scores.compact #score-list {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(var(--score-count), minmax(0, 1fr));
  grid-auto-flow: row;
  gap: clamp(3px, .45vh, 6px);
}
.scores.compact .score-row { padding: 3px clamp(12px, 1.5vw, 25px); grid-template-columns: clamp(40px, 4vw, 62px) minmax(0, 1fr) minmax(96px, 17%); gap: clamp(8px, 1vw, 16px); }
.scores.compact .score-name { font-size: clamp(25px, 2.6vw, 39px); gap: clamp(9px, 1vw, 17px); }
.scores.compact .score-row [data-rank] { font-size: clamp(35px, 3.8vw, 56px); }
.scores.compact .score-points { font-size: clamp(45px, 5vw, 72px); line-height: .9; }
.scores.dense-scores .score-row { padding-top: 1px; padding-bottom: 1px; }
.scores.dense-scores .score-name { font-size: clamp(21px, 2.2vw, 32px); }
.scores.dense-scores .score-row [data-rank] { font-size: clamp(30px, 3.3vw, 45px); }
.scores.dense-scores .score-points { font-size: clamp(38px, 4.2vw, 58px); }
.scores.mid .score-name .score-portrait { width: clamp(88px, 11vh, 128px); height: clamp(88px, 11vh, 128px); }
.scores.sparse .score-name .score-portrait { width: clamp(130px, 18vh, 210px); height: clamp(130px, 18vh, 210px); }
.scores.compact .score-name .score-portrait { width: clamp(51px, 7vh, 75px); height: clamp(51px, 7vh, 75px); }
.scores.dense-scores .score-name .score-portrait { width: clamp(43px, 5.5vh, 58px); height: clamp(43px, 5.5vh, 58px); }

/* Phones */
.phone-panel { width: min(100%, 720px); margin: 0 auto; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.phone-score-identity { display: flex; align-items: center; gap: 16px; margin: 8px 0 26px; }
.phone-score-identity .score-portrait { width: 120px; height: 120px; }
.phone-score-identity > div { min-width: 0; }
.phone-score-identity > div > span { display: block; margin-bottom: 4px; color: var(--scene-accent); font-size: 14px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.phone-score-identity h2 { margin: 0; }
.phone-scene {
  position: relative; height: clamp(155px, 30vw, 260px); margin: calc(0px - var(--panel-pad)) calc(0px - var(--panel-pad)) 25px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, rgba(3, 9, 17, .83), rgba(3, 9, 17, .33)), var(--scene-image) center / cover no-repeat;
  overflow: hidden;
}
.phone-scene-portrait { position: absolute; top: -14%; right: 3%; bottom: -18%; width: 52%; pointer-events: none; }
.phone-scene-portrait img, .phone-scene-portrait video, .phone-scene-portrait .bot-face {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 35%;
  -webkit-mask-image: radial-gradient(ellipse 57% 61% at 50% 48%, #000 12%, rgba(0,0,0,.93) 38%, rgba(0,0,0,.48) 66%, transparent 92%);
  mask-image: radial-gradient(ellipse 57% 61% at 50% 48%, #000 12%, rgba(0,0,0,.93) 38%, rgba(0,0,0,.48) 66%, transparent 92%);
}
.phone-scene-portrait .bot-face { transform-origin: 50% 74%; animation: living-portrait-breath 6.4s ease-in-out infinite; }
.phone-scene-portrait .bot-face { display: grid; place-items: center; color: var(--scene-accent); font-size: 72px; }
.phone-scene::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--scene-accent), transparent); }
.phone-scene::before { display: none; }
.phone-scene > span {
  position: absolute; z-index: 1; left: 20px; bottom: 17px; color: var(--scene-accent);
  font-size: 12px; font-weight: 850; letter-spacing: .19em; text-transform: uppercase;
}
.phone-panel h2 { font-size: clamp(28px, 7vw, 44px); margin: 4px 0 18px; line-height: 1.14; }
.phone-panel h3 { margin-top: 34px; color: var(--gold); }
.phone-panel p { line-height: 1.45; }
.primary-category { margin: 22px 0 26px; }
.primary-category label { display: block; margin-bottom: 8px; color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.primary-category input { width: 100%; min-height: 58px; font-size: 18px; }
.category-ideas { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.category-clock { margin: 10px 0 18px; color: var(--gold); font-variant-numeric: tabular-nums; }
.category-clock strong { font-size: clamp(2rem, 8vw, 3rem); line-height: 1; }
.category-clock small { font-size: .82rem; color: #d5d1c8; }
.category-final { padding: 12px 15px; border-left: 2px solid var(--gold); background: rgba(239, 210, 154, .10); }
.category-ideas .feedback-list { margin: 12px 0; }
.category-ideas .feedback-list button { font-size: 13px; }
.phone-panel .eyebrow { display: block; line-height: 1.5; color: var(--scene-accent); }
.phone-panel form p.row { align-items: stretch; }
.phone-panel form p.row button { min-height: 46px; }
.phone-panel form button[type="submit"] { background: var(--scene-accent); }
.picking-panel { position: relative; isolation: isolate; }
.picking-panel::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 220px;
  background: radial-gradient(ellipse at 0 0, rgba(var(--scene-rgb), .13), transparent 68%);
  pointer-events: none;
}
.phone-pick-head {
  position: sticky; top: 0; z-index: 4;
  margin: -8px -2px 0; padding: 8px 2px 0;
  background: rgba(4, 8, 14, .97);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(var(--scene-rgb), .52);
}
.phone-pick-identity { display: flex; align-items: center; gap: 10px; margin: 0 0 11px; }
.phone-pick-identity img, .phone-pick-identity .bot-face { width: 60px; height: 56px; flex: none; border: 0; border-radius: 0; object-fit: cover; object-position: center 34%; background: #091423; -webkit-mask-image: linear-gradient(90deg, #000 64%, transparent); mask-image: linear-gradient(90deg, #000 64%, transparent); }
.phone-pick-identity strong { display: block; color: #f4eee6; font-size: 14px; line-height: 1.1; }
.phone-pick-head .eyebrow { margin: 3px 0 0; font-size: 10px; line-height: 1.2; }
.phone-pick-head h2 { font-size: clamp(24px, 6vw, 32px); line-height: 1.13; margin: 0 0 8px; }
.phone-answer-count { color: var(--gold); font-size: 15px; font-weight: 800; }
.phone-timer {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px;
  margin: 0; padding: 4px 0 10px;
  color: #e3e0da;
}
.is-picking header { display: none; }
.is-picking main { padding-top: 8px; }
.is-picking .phone-pick-head { padding-top: 5px; }
.is-picking .phone-timer { justify-content: flex-end; }
.phone-countdown { display: inline-flex; align-items: baseline; gap: 5px; color: var(--scene-accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.phone-countdown .timer { font-size: 1.9em; line-height: .8; }
.phone-countdown small { font-size: .78em; }
.phone-panel form label[for="guest-name"] { display: block; margin: 8px 0; font-weight: 750; }
.phone-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.phone-board.dense { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.phone-board button {
  position: relative; min-height: 76px; padding: 20px 9px 10px;
  border: 0; border-bottom: 1px solid rgba(239, 213, 169, .56); border-radius: 0;
  color: #f9f4e9; background: rgba(26, 42, 58, .42); font-size: 16px; line-height: 1.15;
  overflow-wrap: anywhere; hyphens: auto;
}
.phone-board.dense button { min-height: 66px; padding: 19px 4px 7px; font-size: clamp(12px, 3.5vw, 14px); line-height: 1.12; }
.phone-board button:hover, .phone-board button:focus-visible { background: rgba(var(--scene-rgb), .16); border-bottom-color: var(--scene-accent); }
.phone-board button::before { content: attr(data-index); position: absolute; top: 7px; left: 9px; color: var(--scene-accent); opacity: .9; font-size: 10px; font-weight: 600; }
.phone-board button:disabled { opacity: .18; }
.phone-board button:active { transform: scale(.97); }
.feedback-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.feedback-list button { color: #f9f0df; background: rgba(39, 62, 83, .92); font-weight: 650; }
.private-result { margin-top: 16px; padding: 16px 20px; border-left: 3px solid var(--gold); background: rgba(24, 36, 49, .9); font-size: 18px; line-height: 1.35; animation: content-arrive .3s ease-out both; }
.private-result.correct { border-color: var(--teal); background: rgba(22, 67, 60, .9); }
.private-result.wrong, .private-result.second_wrong { border-color: var(--rose); background: rgba(84, 40, 52, .9); }
.photo-picker { display: block; margin-top: 16px; padding: 14px; border: 1px dashed var(--gold); border-radius: 10px; color: var(--gold); font-weight: 750; text-align: center; cursor: pointer; }
.photo-picker input { display: block; min-height: 0; margin-top: 8px; padding: 0; border: 0; background: transparent; font-size: 14px; }
.avatar-picker { margin: 18px 0 8px; padding: 0; border: 0; }
.avatar-picker legend { margin-bottom: 10px; color: var(--gold); font-weight: 750; }
.avatar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: min(52svh, 470px); overflow-y: auto; padding: 2px; }
.avatar-choice { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0; padding: 0 0 7px; border: 1px solid rgba(239,210,154,.28); border-radius: 5px; background: #091421; color: #f4eee1; cursor: pointer; text-align: center; }
.avatar-choice img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 30%; border-radius: 4px 4px 0 0; }
.avatar-choice span { display: grid; place-items: center; min-height: 2.4em; padding: 0 3px; font-size: 12px; line-height: 1.2; text-align: center; text-wrap: balance; }
.avatar-choice.selected { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold), 0 0 16px rgba(239,210,154,.28); }
.avatar-choice:disabled { opacity: .38; cursor: not-allowed; }
.avatar-choice small { position: absolute; top: 5px; right: 5px; padding: 2px 4px; background: rgba(3,8,16,.8); font-size: 10px; }
.selfie-preview, .joined-profile { display: flex; align-items: center; gap: 16px; }
.joined-profile { align-items: flex-start; }
.joined-profile h2 { margin-top: 0; }
.selfie-preview { margin: 14px 0; }
.selfie-preview img, .joined-profile img { width: 105px; height: 105px; border-radius: 0; object-fit: cover; object-position: center 34%; border: 0; box-shadow: none; -webkit-mask-image: linear-gradient(90deg, #000 65%, transparent); mask-image: linear-gradient(90deg, #000 65%, transparent); }
.timer { font-variant-numeric: tabular-nums; }
.notice { color: #ffdca9; }
#notice {
  display: none; position: fixed; z-index: 10; left: 50%; bottom: 16px;
  transform: translateX(-50%); width: max-content; max-width: 90vw;
  padding: 12px 18px; border-radius: 10px;
  color: white; background: #813c40; box-shadow: 0 15px 40px #0007;
}
#notice:not(:empty) { display: block; }
@media (max-width: 760px) {
  header { padding: 12px 16px; flex-wrap: wrap; }
  header .controls { width: 100%; justify-content: flex-start; }
  header small { font-size: 9px; }
  header h1 { font-size: 27px; }
  main { padding: 15px; }
  .lobby { min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .lobby .lobby-join, .lobby .lobby-settings, .lobby .seat-gallery { min-width: 0; }
  .lobby .lobby-join, .lobby .lobby-settings, .lobby .seat-gallery { grid-column: auto; grid-row: auto; }
  .lobby .seat-grid, .lobby .seat-gallery.crowded .seat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lobby .lobby-join { grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); }
  .lobby .setup-panel > p:has(select) { display: block; width: 100%; margin: 15px 0; }
  .chooser-scene { min-height: 540px; height: calc(100svh - 108px); }
  .scene-portrait { top: 13%; right: -9%; bottom: 13%; width: 112%; }
  .scene-portrait img, .scene-portrait video { object-fit: cover; object-position: center 36%; }
  .scene-wash { background: linear-gradient(0deg, #040b17 0%, rgba(4, 11, 23, .75) 27%, transparent 75%, rgba(4, 11, 23, .45)); }
  .scene-copy { bottom: 55px; }
  .scene-copy h2 { font-size: clamp(46px, 12vw, 78px); }
  .scene-copy p { font-size: 18px; }
  .phase-head { min-height: 0; }
  .play-stage { min-height: 0; }
  .play-stage > .board { flex: none; }
  .phase-head::before { width: 55%; opacity: .18; }
  .phase-head h2, .phase-head p { max-width: 100%; }
  .board { gap: 6px; }
  .tile { min-height: 54px; font-size: 14px; }
  .board.dense .tile { min-height: 54px; font-size: 14px; }
  .board.few .tile { min-height: 68px; font-size: 16px; }
  .tile::before { top: 5px; left: 6px; font-size: 8px; }
  .turn-banner { min-height: 60px; padding: 8px 0; gap: 8px; }
  .turn-name { font-size: 18px; gap: 8px; }
  .turn-name img, .turn-name .bot-face { width: 56px; height: 50px; }
  .turn-tail { width: 100%; justify-content: space-between; margin-left: 0; }
  .next-ready img, .next-ready .bot-face { width: 42px; height: 42px; }
  .next-ready strong { max-width: 132px; font-size: 17px; }
  .turn-meta { font-size: 13px; }
  .feedback-handoff { align-items: stretch; flex-direction: column; gap: 0; }
  .feedback-handoff .event { margin-bottom: 5px; }
  .feedback-handoff .next-ready { align-self: flex-end; }
  .event { min-height: 104px; gap: 12px; padding: 10px 13px; }
  .event-copy { display: block; }
  .event .event-player { min-width: 0; margin-bottom: 5px; font-size: 11px; }
  .event .event-player img, .event .event-player .bot-face { width: 42px; height: 40px; }
  .event h2 { font-size: 31px; }
  .event .event-detail { font-size: 14px; }
  .event .event-points { font-size: 32px; }
  .answers-left { position: static; justify-content: flex-start; margin: 10px 0 0; }
  .answers-left strong { font-size: 42px; }
  .answers-left span { max-width: none; }
  .reveal-banner { flex-wrap: wrap; gap: 4px 12px; min-height: 60px; }
  .reveal-banner > span:last-child { margin-left: 0; }
  .score-row { grid-template-columns: 33px minmax(0, 1fr) 100px; padding: 6px 8px; }
  .score-name { font-size: 18px; gap: 8px; }
  .score-name .score-portrait, .scores.mid .score-name .score-portrait, .scores.compact .score-name .score-portrait { width: 48px; height: 48px; }
  .score-row [data-rank] { font-size: 24px; }
  .score-points { font-size: 28px; }
  .scores.compact .score-row { grid-template-columns: 29px minmax(0, 1fr) 88px; }
  .scores.compact #score-list { grid-template-columns: 1fr; grid-template-rows: repeat(var(--score-count), minmax(0, 1fr)); grid-auto-flow: row; }
  .scores.compact .score-name { font-size: 16px; }
  .scores.compact .score-row [data-rank] { font-size: 27px; }
  .scores.compact .score-points { font-size: 26px; }
  .score-heading h2 { font-size: 40px; }
  .podium-1 { width: min(56vw, 300px); height: min(59svh, 490px); bottom: 4%; }
  .podium-2, .podium-3 { width: min(33vw, 180px); height: min(38svh, 310px); bottom: 13%; }
  .podium-2 { left: 1%; }
  .podium-3 { right: 1%; }
  .podium-caption strong { font-size: clamp(16px, 3.8vw, 25px); }
  .podium-1 .podium-caption strong { font-size: clamp(34px, 8vw, 58px); }
  .winner-replay { top: 12px; right: 10px; max-width: 48vw; gap: 5px; }
  .winner-replay > span { font-size: clamp(17px, 4vw, 22px); }
  .winner-replay button { padding: 7px 9px; font-size: 11px; }
  .winner-replay small { font-size: 10px; }
  .scores.sparse .score-row { grid-template-columns: 32px minmax(0, 1fr) 75px; padding: 9px; gap: 7px; }
  .scores.sparse .score-row [data-rank] { font-size: 32px; }
  .scores.sparse .score-name { font-size: 20px; gap: 8px; }
  .scores.sparse .score-name .score-portrait { width: 64px; height: 64px; }
  .scores.sparse .score-points { font-size: 43px; }
  .phone-panel form p.row button { flex: 1 1 100%; }
}
@media (max-width: 350px) {
  .phone-board.dense { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone-board.dense button { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .podium-person { animation: none; }
  .podium-1 { transform: translateX(-50%); }
  .scene-opening { background: #07101d var(--scene-image) center / cover no-repeat; }
  .scene-opening .scene-void, .scene-opening .scene-flare { display: none; }
  .play-stage.entering .phase-head, .play-stage.entering .turn-banner, .board.arriving .tile, body:has(.scene-opening) .controls { opacity: 1; transform: none; filter: none; }
  .final-reveal .tile.reveal-wrong { visibility: hidden; }
}

/* Public setup keeps the table and game length in focus. */
.setup-topline { display:flex; justify-content:space-between; align-items:start; gap:16px; }
.lobby .setup-topline h2 { margin-bottom:18px; }
.corner-language { display:flex; align-items:center; gap:7px; color:#b8b5af!important; font-size:11px; font-weight:600!important; white-space:nowrap; }
.corner-language select { width:auto; min-height:32px; margin:0; padding:3px 25px 3px 7px; font-size:12px; background:rgba(9,19,31,.7); }
.game-length { border-top:1px solid rgba(239,210,154,.28); border-bottom:1px solid rgba(239,210,154,.18); padding:23px 0 20px; }
.game-length h3 { font:600 clamp(20px,2vw,27px)/1.2 var(--display); margin:9px 0 17px; letter-spacing:-.035em; }
.cycles-choice { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:12px; }
.cycles-choice select { width:min(100%,240px); margin:0; font-size:18px; }
.round-summary { color:var(--gold); font-size:14px; margin:15px 0 0; }
.setup-options { margin:19px 0; color:#d4d0c9; }
.setup-options summary { cursor:pointer; color:#c8bdac; font-size:13px; }
.setup-options > p { margin:13px 0; font-size:14px; }
.setup-options select { max-width:100%; }
.paused-banner { position:fixed; z-index:20; top:clamp(85px,11vh,140px); left:50%; transform:translateX(-50%); width:min(90vw,650px); padding:18px 24px; border:1px solid rgba(239,210,154,.6); background:rgba(5,12,22,.95); box-shadow:0 24px 70px #0009; text-align:center; }
.paused-banner strong { display:block; font:650 clamp(25px,3vw,38px) var(--display); color:var(--gold); }
.paused-banner span { display:block; margin-top:5px; font-size:14px; }
.recovery-menu { position:relative; align-self:center; font-size:13px; }
.recovery-menu summary { cursor:pointer; padding:9px 8px; white-space:nowrap; }
.recovery-menu[open] { min-width:260px; z-index:30; padding:10px 14px 14px; background:#0c1727; border:1px solid var(--line); box-shadow:0 20px 45px #0008; }
.recovery-menu p { max-width:260px; line-height:1.45; }
.recovery-menu select { display:block; width:100%; margin:10px 0; }
.recovery-menu .recovery-code { font:700 17px var(--display); color:var(--gold); user-select:all; }
.game-footer { display:flex; justify-content:space-between; align-items:start; flex-wrap:wrap; gap:14px; padding:16px clamp(18px,3.2vw,54px) 25px; border-top:1px solid var(--line); background:rgba(4,8,14,.72); font-size:12px; }
.game-footer a { color:#c9b58f; }
.game-footer summary { cursor:pointer; color:#c9b58f; }
.game-footer details[open] { width:min(100%,440px); }
.game-footer form { display:grid; gap:8px; margin-top:12px; }
.game-footer textarea { min-height:92px; resize:vertical; padding:10px; color:#f3eee7; border:1px solid var(--line); background:#101c2d; font:inherit; }
.game-footer button { justify-self:start; }
.game-footer [hidden] { display:none; }
#recover-form { display:grid; gap:12px; margin-top:20px; }
#recover-form label { font-weight:700; }
#recover-form input { width:100%; }
@media(max-width:680px) { .setup-topline { display:block; } .corner-language { justify-content:flex-end; margin:-4px 0 15px; } .paused-banner { top:78px; } }
.notice-page { max-width:850px; line-height:1.65; }
.notice-page h2 { margin:38px 0 5px; font:650 clamp(24px,3vw,35px) var(--display); color:var(--gold); }
.notice-page p { color:#e5e0d9; }
