@font-face { font-family: 'Limelight'; src: url('/fonts/limelight-latin-400-normal.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Limelight'; src: url('/fonts/limelight-latin-ext-400-normal.woff2') format('woff2'); font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Playfair'; font-weight: 500; src: url('/fonts/playfair-display-latin-500-normal.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Playfair'; font-weight: 500; src: url('/fonts/playfair-display-latin-ext-500-normal.woff2') format('woff2'); font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Playfair'; font-weight: 700; src: url('/fonts/playfair-display-latin-700-normal.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Playfair'; font-weight: 700; src: url('/fonts/playfair-display-latin-ext-700-normal.woff2') format('woff2'); font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --room: #120d08;
  --walnut: #2a1d12;
  --walnut-hi: #4a331f;
  --beige: #d2b98c;
  --beige-deep: #a88c60;
  --cream: #f2e7cd;
  --ink: #231708;
  --gold: #cda555;
  --gold-hi: #efd391;
  --blood: #97211c;
  --blood-hi: #c23a30;
  --good: #2c7a4b;
  --muted: #cbb995;
  --display: 'Limelight', 'Playfair', Georgia, serif;
  --serif: 'Playfair', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { min-height: 100%; background: var(--room); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--cream);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- the room ---------- */
.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ambient::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 85% 55% at 50% -4%, rgba(236, 212, 163, .72), rgba(186, 152, 100, .25) 55%, transparent 78%),
    radial-gradient(ellipse at 50% 42%, #7a6240 0%, #433320 46%, #1c140c 100%);
  transition: opacity 1.8s ease;
}
.ambient::after {
  /* art deco fans, like casino carpet */
  content: ''; position: absolute; inset: 0; opacity: .13;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' fill='none' stroke='%23f2e7cd' stroke-width='1'%3E%3Cpath d='M0 40a40 40 0 0 1 80 0M10 40a30 30 0 0 1 60 0M20 40a20 20 0 0 1 40 0M30 40a10 10 0 0 1 20 0M-40 20a40 40 0 0 1 80 0M40 20a40 40 0 0 1 80 0M-30 20a30 30 0 0 1 60 0M50 20a30 30 0 0 1 60 0M-20 20a20 20 0 0 1 40 0M60 20a20 20 0 0 1 40 0'/%3E%3C/svg%3E");
}
.night-sky {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s ease;
  background: radial-gradient(ellipse at 50% 0%, rgba(80, 100, 150, .5), transparent 60%), linear-gradient(rgba(9, 11, 24, .86), rgba(8, 6, 10, .93));
}
body[data-time='night'] .night-sky { opacity: 1; }
.moon {
  position: absolute; right: 7%; top: -90px; width: 64px; height: 64px; border-radius: 50%;
  box-shadow: inset -16px 8px 0 0 #e9e2c8; transform: rotate(-12deg); opacity: 0;
  transition: top 2.2s cubic-bezier(.2, .8, .2, 1), opacity 1.6s;
}
body[data-time='night'] .moon { top: 74px; opacity: .85; }
.smoke {
  position: absolute; width: 70vmax; height: 34vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 231, 205, .13), transparent);
  animation: drift 26s ease-in-out infinite alternate;
}
.smoke.s1 { left: -30vmax; top: 8vh; }
.smoke.s2 { right: -34vmax; top: 42vh; animation-duration: 33s; animation-delay: -9s; }
.smoke.s3 { left: 6vw; bottom: -20vmax; animation-duration: 41s; animation-delay: -20s; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(22vw, -6vh) scale(1.25); } }
.suit { position: absolute; bottom: -60px; font-size: 30px; color: var(--cream); opacity: 0; animation: rise 24s linear infinite; }
.suit.red { color: #d4675c; }
@keyframes rise {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  12%, 70% { opacity: .16; }
  100% { transform: translateY(-112vh) rotate(220deg); opacity: 0; }
}

.app { position: relative; z-index: 1; }

/* ---------- shared pieces ---------- */
.marquee { font-family: var(--display); font-weight: 400; letter-spacing: .02em; line-height: 1.1; color: var(--gold-hi); text-shadow: 0 2px 0 #3a2508, 0 0 26px rgba(239, 211, 145, .4); }
.bulbs { height: 10px; width: 100%; background: radial-gradient(circle, #fff2c4 0 3px, rgba(255, 220, 130, .35) 4px, transparent 6px) 0 0 / 22px 10px repeat-x; animation: chase .9s steps(2) infinite; }
@keyframes chase { to { background-position: 22px 0; filter: brightness(.7); } }

.panel {
  background: linear-gradient(rgba(48, 34, 20, .94), rgba(28, 19, 11, .95));
  border: 1px solid var(--gold);
  outline: 1px solid rgba(205, 165, 85, .4);
  outline-offset: 4px;
  border-radius: 6px;
  padding: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.panel h2 { font-size: 20px; margin-bottom: 10px; color: var(--gold-hi); }
.soft { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px;
  border: 1px solid #7c5f24; border-radius: 8px;
  background: linear-gradient(#f0d696, #c59a48);
  color: var(--ink); font-weight: 700;
  box-shadow: 0 3px 0 #6a4f1b, 0 8px 18px rgba(0, 0, 0, .35);
}
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #6a4f1b; }
.btn.ghost { background: rgba(20, 13, 7, .6); color: var(--cream); border-color: var(--gold); box-shadow: none; }
.btn.blood { background: linear-gradient(#c23a30, #85170f); color: #fff3e0; border-color: #5d0d08; box-shadow: 0 3px 0 #4d0a06, 0 8px 18px rgba(0, 0, 0, .35); }
.btn.good { background: linear-gradient(#3d9a63, #22603b); color: #f3ffe9; border-color: #123a22; box-shadow: 0 3px 0 #123a22; }
.btn.wide { width: 100%; }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.btn.warn-pulse { animation: warn 1s ease-in-out infinite; }
@keyframes warn { 50% { filter: brightness(1.4); } }

/* a poker chip carries each player's color */
.chip {
  --c: #888; --edge: #f6efdc; --size: 38px;
  flex: none; display: inline-grid; place-items: center;
  width: var(--size); height: var(--size); border-radius: 50%;
  background:
    radial-gradient(circle, var(--c) 0 52%, var(--edge) 53% 58%, transparent 59%),
    repeating-conic-gradient(var(--edge) 0 20deg, var(--c) 20deg 60deg);
  box-shadow: 0 3px 6px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(0, 0, 0, .3);
  color: #fff; font-weight: 700; font-size: calc(var(--size) * .36); line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .75);
}
.chip.light { --edge: #4a3a26; color: #241a0f; text-shadow: none; }

.pips { display: inline-flex; gap: 6px; vertical-align: middle; }
.pips i { width: 18px; height: 22px; background: var(--gold); clip-path: polygon(50% 0, 100% 18%, 90% 72%, 50% 100%, 10% 72%, 0 18%); transition: background .4s; }
.pips i.spent { background: rgba(242, 231, 205, .18); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60;
  width: max-content; max-width: 90vw; padding: 12px 18px; border-radius: 8px;
  background: var(--blood); color: #fff3e0; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 70; padding: 6px; text-align: center; background: var(--blood); font-size: 14px; }

/* ---------- full screen moments ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; gap: 14px; padding: 20px;
  text-align: center; pointer-events: none;
  background: radial-gradient(circle, rgba(34, 22, 12, .96), rgba(8, 5, 3, .98));
  animation: curtain 2.1s ease forwards;
}
.curtain .marquee { font-size: clamp(40px, 9vw, 96px); animation: curtain-title 2.1s ease forwards; }
@keyframes curtain { 0% { opacity: 0; } 14%, 72% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes curtain-title { 0% { transform: scale(.86); letter-spacing: .24em; } 40%, 100% { transform: scale(1); letter-spacing: .02em; } }
.flash { position: fixed; inset: 0; z-index: 41; pointer-events: none; background: radial-gradient(circle, rgba(190, 30, 20, .15), rgba(140, 10, 5, .85)); animation: flash 1.3s ease-out forwards; }
@keyframes flash { 0% { opacity: 0; } 10% { opacity: 1; } 22% { opacity: .35; } 34% { opacity: .9; } 100% { opacity: 0; visibility: hidden; } }
.shake { animation: shake .6s ease; }
@keyframes shake { 20% { transform: translateX(-9px) rotate(-.4deg); } 40% { transform: translateX(8px) rotate(.4deg); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.stamp {
  display: inline-block; padding: 4px 18px; border: 4px double currentColor; border-radius: 8px;
  font-family: var(--display); font-size: clamp(22px, 4vw, 40px); color: var(--blood);
  transform: rotate(-7deg); animation: stamp .55s cubic-bezier(.2, 1.4, .4, 1) both;
}
.stamp.gold { color: #85601a; }
.stamp.green { color: var(--good); }
@keyframes stamp { from { transform: rotate(-20deg) scale(2.8); opacity: 0; } to { transform: rotate(-7deg) scale(1); opacity: 1; } }

/* ---------- playing card ---------- */
.flip { width: 250px; height: 360px; margin: 0 auto; perspective: 1000px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; border: 0; background: none; padding: 0; display: block; }
.flip-inner { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3, .7, .2, 1); }
.flip.open .flip-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 18px 36px rgba(0, 0, 0, .55); overflow: hidden; }
.face.back {
  display: grid; place-items: center; border: 8px solid var(--cream);
  background: repeating-linear-gradient(45deg, transparent 0 9px, rgba(205, 165, 85, .35) 9px 11px), repeating-linear-gradient(-45deg, transparent 0 9px, rgba(205, 165, 85, .35) 9px 11px), radial-gradient(circle, #9d2a22, #4c0c08);
}
.face.back span { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: #3d0a06; border: 3px double var(--gold); font-family: var(--display); font-size: 50px; color: var(--gold-hi); }
.face.front {
  transform: rotateY(180deg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 34px 18px 20px;
  background: linear-gradient(160deg, #fbf3dd, #e4d2a8); color: var(--ink); text-align: center;
}
.face.front .corner { position: absolute; top: 10px; left: 14px; font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1; }
.face.front .corner.br { top: auto; left: auto; bottom: 10px; right: 14px; transform: rotate(180deg); }
.face.front svg { width: 100px; height: 100px; }
.face.front h3 { font-family: var(--display); font-weight: 400; font-size: 36px; line-height: 1.05; }
.face.front p { font-size: 14px; line-height: 1.4; }
.face.front.evil { color: #6f120c; }
.face.front.evil p, .face.front.evil .mates { color: var(--ink); }
.mates { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 13px; }
.mates > span { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 3px; border-radius: 99px; background: rgba(151, 33, 28, .13); }

/* ---------- phone ---------- */
.phone { width: 100%; max-width: 470px; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 18px calc(210px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
.phone.enter > * { animation: deal .5s cubic-bezier(.2, .8, .2, 1) both; }
.phone.enter > *:nth-child(2) { animation-delay: .07s; }
.phone.enter > *:nth-child(3) { animation-delay: .14s; }
.phone.enter > *:nth-child(4) { animation-delay: .21s; }
@keyframes deal { from { opacity: 0; transform: translateY(22px) rotate(-1.5deg); } }
.phone h1 { font-size: 27px; line-height: 1.15; text-align: center; }
.phone h1.marquee { font-size: 40px; }
.me { display: flex; align-items: center; gap: 12px; }
.me strong { flex: 1; font-size: 18px; }

.field { width: 100%; height: 54px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--gold); background: var(--cream); color: var(--ink); font-size: 20px; font-weight: 700; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 10px; border: 2px solid transparent; background: none; font-size: 13px; }
.swatch .chip { --size: 46px; }
.swatch[aria-pressed='true'] { border-color: var(--gold-hi); background: rgba(239, 211, 145, .16); }
.swatch[aria-pressed='true'] .chip { animation: spin-in .5s ease; }
@keyframes spin-in { from { transform: rotate(-200deg) scale(.7); } }
.swatch:disabled { opacity: .2; }

.targets { display: flex; flex-direction: column; gap: 9px; }
.target {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 14px; text-align: left;
  border-radius: 10px; border: 2px solid rgba(205, 165, 85, .45); background: linear-gradient(#f7edd4, #e2cfa5); color: var(--ink); font-weight: 700; font-size: 17px;
}
.target > span.grow { flex: 1; }
.target.selected { border-color: var(--blood-hi); box-shadow: 0 0 0 3px rgba(194, 58, 48, .55); transform: translateX(6px); transition: transform .18s; }
.target .tag { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: rgba(35, 23, 8, .12); }
.target.team { background: linear-gradient(#f3d3c2, #dfae9b); }
.target.team .tag { background: var(--blood); color: #fff3e0; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.dot.red { background: var(--blood-hi); box-shadow: 0 0 8px var(--blood-hi); }
.dot.green { background: #3d9a63; box-shadow: 0 0 8px #3d9a63; }

.confirm-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(12, 8, 4, .98) 16px); }
.confirm-bar > div { max-width: 434px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; animation: deal .25s ease both; }
.confirm-bar p { text-align: center; color: #ffb4a8; font-weight: 700; }

.sleep { min-height: 68vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; color: #aeb4cc; }
.sleep .big-moon { width: 90px; height: 90px; border-radius: 50%; box-shadow: inset -22px 12px 0 0 #c9c6b4; transform: rotate(-12deg); animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; transform: rotate(-12deg) scale(.93); } }
.sleep h1 { color: #d9d8d0; }

.verdict-circle { width: 190px; height: 190px; margin: 6px auto; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 42px; color: #fff; border: 8px solid var(--cream); animation: pop .6s cubic-bezier(.2, 1.5, .4, 1) both; }
.verdict-circle.red { background: radial-gradient(circle, #d8483c, #7c1009); box-shadow: 0 0 60px rgba(216, 72, 60, .75); }
.verdict-circle.green { background: radial-gradient(circle, #46ad70, #175231); box-shadow: 0 0 60px rgba(70, 173, 112, .65); }
@keyframes pop { from { transform: scale(0) rotate(-90deg); } }

.news { text-align: center; padding: 20px 16px; border-radius: 8px; background: linear-gradient(170deg, #f6ecd3, #dcc79b); color: var(--ink); border: 1px solid var(--beige-deep); box-shadow: 0 16px 34px rgba(0, 0, 0, .45); }
.news h2 { font-size: 22px; line-height: 1.25; margin-bottom: 8px; }
.news .stamp { margin-bottom: 14px; }
.muted-banner { text-align: center; padding: 14px; border-radius: 8px; background: var(--blood); border: 2px dashed #ffcabf; font-weight: 700; animation: warn 1.4s ease-in-out 3; }

.roster { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0; padding: 0; }
.roster li { display: flex; align-items: center; gap: 10px; }
.roster li > span.grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster li.out { opacity: .45; text-decoration: line-through; }
.roster .chip { --size: 32px; }
.roster .why { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-block; text-align: right; }

.timer { font-size: 42px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; line-height: 1; }
.timer.low { color: var(--blood-hi); animation: warn 1s infinite; }

.code-field { text-align: center; text-transform: uppercase; letter-spacing: .5em; padding-left: .5em; font-size: 32px; height: 68px; }

/* ---------- main screen: lobby ---------- */
.room-code { margin: 14px 0 6px; font-family: var(--display); font-size: 58px; letter-spacing: .16em; line-height: 1; color: var(--gold-hi); user-select: all; }
.host-head { text-align: center; padding: 18px 16px 6px; }
.host-head h1 { font-size: clamp(40px, 6vw, 70px); }
.host-head .bulbs { max-width: 560px; margin: 4px auto 0; }
.lobby { display: grid; grid-template-columns: minmax(250px, 320px) minmax(240px, 1fr) minmax(300px, 420px); gap: 26px; align-items: start; max-width: 1280px; margin: 0 auto; padding: 20px 26px 40px; }
.qr { background: var(--cream); padding: 14px; border-radius: 8px; margin: 0 auto; max-width: 270px; }
.qr svg { display: block; width: 100%; height: auto; }
.join-url { display: block; margin-top: 10px; font-size: 18px; font-weight: 700; color: var(--gold-hi); word-break: break-all; text-align: center; user-select: all; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.guest { animation: deal .45s ease both; }
.iconbtn { border: 1px solid rgba(205, 165, 85, .5); background: none; border-radius: 6px; min-width: 32px; min-height: 32px; padding: 2px 9px; font-size: 14px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs button { flex: 1; padding: 8px 4px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font-weight: 700; }
.tabs button[aria-selected='true'] { color: var(--gold-hi); border-color: var(--gold); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(205, 165, 85, .18); }
.setting > div:first-child { flex: 1; }
.setting small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.setting select { background: var(--walnut-hi); border: 1px solid var(--gold); border-radius: 6px; padding: 6px 8px; max-width: 170px; }
.setting input[type='range'] { width: 130px; accent-color: var(--gold); }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper b { min-width: 30px; text-align: center; font-size: 19px; }
.switch { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; flex: none; border-radius: 99px; background: #54412c; position: relative; cursor: pointer; margin: 0; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--cream); transition: transform .2s; }
.switch:checked { background: var(--gold); }
.switch:checked::after { transform: translateX(20px); }
table.presets { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; text-align: center; }
table.presets th, table.presets td { padding: 3px 2px; border-bottom: 1px solid rgba(205, 165, 85, .18); }
table.presets tr.now { background: rgba(205, 165, 85, .22); }
.problem { color: #ffb4a8; text-align: center; }

/* ---------- main screen: the table ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; }
.bar .marquee { font-size: 28px; }
.table-wrap { position: relative; width: min(1180px, 96vw); height: clamp(540px, calc(100vh - 86px), 780px); margin: 0 auto; }
.felt {
  position: absolute; left: 9%; right: 9%; top: 13%; bottom: 13%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 38%, #ecdcb4 0%, #d2b98c 48%, #a58a5e 100%);
  border: 20px solid #3d2716;
  box-shadow: 0 0 0 3px var(--gold), inset 0 0 0 2px var(--gold), inset 0 14px 50px rgba(60, 35, 10, .45), 0 34px 70px rgba(0, 0, 0, .6);
  transition: filter 1.8s;
}
.felt::after { content: ''; position: absolute; inset: 26px; border-radius: 50%; border: 1px solid rgba(90, 60, 25, .35); }
body[data-time='night'] .felt { filter: brightness(.4) saturate(.6) hue-rotate(-8deg); }
.middle { position: absolute; left: 22%; right: 22%; top: 24%; bottom: 24%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--ink); z-index: 2; transition: color 1.2s; }
body[data-time='night'] .middle { color: var(--cream); }
.middle h2 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4.4vw, 54px); line-height: 1.1; }
.middle .cue { font-size: clamp(16px, 2vw, 24px); max-width: 30ch; min-height: 2.9em; }
.middle .timer.low { color: var(--blood); }
body[data-time='night'] .middle .stamp { color: #e8695d; }
.seat { position: absolute; width: 104px; transform: translate(-50%, -50%); z-index: 3; }
.seat-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 128px; padding: 12px 6px 8px;
  border-radius: 10px; background: linear-gradient(165deg, #fbf3dd, #e1cda1); color: var(--ink); text-align: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .5); border-top: 7px solid var(--c);
  transition: transform .4s, filter 1.8s;
}
.dealing .seat-card { animation: deal-seat .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes deal-seat { from { opacity: 0; transform: translateY(-60px) rotate(-30deg) scale(.5); } }
body[data-time='night'] .seat-card { filter: brightness(.62) saturate(.7); }
.seat-card .chip { --size: 46px; }
.seat-name { font-weight: 700; font-size: 14px; line-height: 1.15; width: 100%; overflow-wrap: anywhere; }
.seat-note { font-size: 12px; line-height: 1.1; }
.seat.out .seat-card { background: repeating-linear-gradient(45deg, transparent 0 7px, rgba(205, 165, 85, .3) 7px 9px), #62150f; color: var(--cream); transform: rotate(-6deg); }
.seat.out .chip { filter: grayscale(1) brightness(.7); }
.seat .cross { position: absolute; top: 30px; left: 50%; translate: -50% 0; font-size: 18px; color: #fff3e0; background: #1b0b07; padding: 0 8px; }
.seat.just-died .seat-card { animation: die 1s ease both; }
@keyframes die { 0% { transform: none; } 35% { transform: rotateY(90deg) scale(1.2); } 100% { transform: rotate(-6deg); } }
.seat.ready .seat-card { box-shadow: 0 0 0 3px #3d9a63, 0 10px 22px rgba(0, 0, 0, .5); }
.seat.offline-seat .seat-card { opacity: .55; }
.below { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 0 16px 26px; }
.joinbox { width: min(360px, 100%); }
.panel .bulbs { margin: 18px 0; }
.middle .bulbs { background-image: radial-gradient(circle, #97211c 0 3px, rgba(151, 33, 28, .3) 4px, transparent 6px); }
.results { font-size: 15px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }

@media (max-width: 1100px) {
  .lobby { grid-template-columns: 1fr 1fr; }
  .lobby > .settings { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .moon { width: 38px; height: 38px; box-shadow: inset -10px 5px 0 0 #e9e2c8; }
  body[data-time='night'] .moon { top: 18px; }
  .lobby { grid-template-columns: 1fr; padding: 16px; }
  .table-wrap { height: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; padding: 0 10px 18px; width: 100%; }
  .felt { display: none; }
  .middle { position: static; grid-column: 1 / -1; min-height: 270px; padding: 20px 14px; border-radius: 18px; background: radial-gradient(ellipse at 50% 30%, #ecdcb4, #b89c6c); border: 8px solid #3d2716; margin-bottom: 6px; }
  body[data-time='night'] .middle { background: radial-gradient(ellipse at 50% 30%, #4a4130, #1f1a14); }
  .seat { position: static; transform: none; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .suit, .smoke { display: none; }
  .curtain, .flash { display: none; }
}
