/* Best Jest: the club, the menus over it, and the show.
   Design: cream "cue card" panels over a dark club, glossy candy buttons with
   a pressable lip, gold and hot-pink showbiz accents, Luckiest Guy for
   headlines, Nunito for everything else. base.css (from ProcreNate) supplies
   the plumbing; this file sets the look. */

:root {
  --club: #0b0614;
  --night: #160c24;
  --plum: #2a1640;
  --ink: #261a35;
  --ink-2: #4b3d60;
  --muted: #8b7f9f;
  --paper: #fffaf2;
  --paper-2: #f7efe3;
  --line: #ece2d4;
  --press: #dccdbb;
  --pink: #ff3fa4;
  --pink-d: #c41774;
  --gold: #ffc93c;
  --gold-d: #d08a10;
  --cyan: #32d9ff;
  --accent: #7b5cff;
  --accent-d: #5333e0;
  --green: #22c070;
  --green-d: #12884b;
  --orange: #ff9f1c;
  --orange-d: #cf7600;
  --red: #ff4d5e;
  --red-d: #c42a3b;
  --glass: rgba(255, 250, 242, 0.95);
  --glass-dark: rgba(22, 12, 34, 0.76);
  --glass-line: rgba(255, 255, 255, 0.13);
  --display: 'Luckiest Guy', var(--font);
  --shadow-lg: 0 24px 60px rgba(4, 0, 12, 0.55), 0 2px 8px rgba(4, 0, 12, 0.3);
  --shadow-md: 0 12px 30px rgba(4, 0, 12, 0.4);
}
html, body { background: var(--club); color: var(--ink); }
input, textarea { -webkit-user-select: text; user-select: text; touch-action: manipulation; font-family: var(--font); }
::selection { background: rgba(255, 63, 164, 0.3); }
@keyframes pulse { 50% { transform: scale(1.1); } }
@keyframes popin { from { opacity: 0; transform: scale(0.85) translateY(10px); } }
@keyframes slam { 0% { opacity: 0; transform: scale(2.4) rotate(-8deg); } 60% { opacity: 1; transform: scale(0.95) rotate(1deg); } 100% { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes dots { 0%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes glowpulse { 50% { filter: drop-shadow(0 0 22px rgba(255, 63, 164, 0.85)); } }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0.7); } 70% { box-shadow: 0 0 0 7px rgba(255, 77, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0); } }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes shine { from { background-position: -200% 0; } to { background-position: 200% 0; } }

#stage3d { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
body.no3d #stage3d { display: none; }
body.no3d {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 63, 164, 0.35), transparent 55%),
    radial-gradient(ellipse at 10% 110%, rgba(50, 217, 255, 0.2), transparent 50%),
    radial-gradient(ellipse at 90% 110%, rgba(143, 85, 255, 0.3), transparent 50%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 2px, transparent 2px 46px),
    #140a20;
}

/* ---------------------------------------------------------------- loading curtain */
#loader { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #2a1240, var(--club) 70%); transition: opacity 0.6s ease, visibility 0.6s; }
#loader .bj-logo span { font-size: clamp(48px, 12vw, 96px); }
#loader p { margin: 18px 0 0; text-align: center; color: rgba(255, 255, 255, 0.6); font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase; }
body:not(.loading) #loader { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --b1: #fffdf8; --b2: #f2e9dc; --lip: #d6c7b3; --glow: rgba(10, 4, 20, 0.28); --fg: var(--ink);
  --shade: var(--lip);
  position: relative;
  background: linear-gradient(180deg, var(--b1), var(--b2));
  color: var(--fg);
  font-weight: 900;
  letter-spacing: 0.005em;
  border-radius: 18px;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.8), inset 0 -2px 0 rgba(0, 0, 0, 0.05), 0 4px 0 var(--lip), 0 10px 22px var(--glow);
}
.btn .ic { flex: none; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 0 var(--lip), 0 4px 10px var(--glow); }
.btn:disabled { opacity: 0.5; filter: saturate(0.4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 0 var(--lip); }
.btn:focus-visible, .round-btn:focus-visible, .mega:focus-visible, .animal-card:focus-visible, .swatch:focus-visible, .ans-card:focus-visible, .f-card:focus-visible, .pill:focus-visible, .switch:focus-visible, .seg button:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px;
}
.btn-green { --b1: #47e293; --b2: #1db265; --lip: var(--green-d); --glow: rgba(34, 192, 112, 0.38); --fg: #fff; text-shadow: 0 1px 0 rgba(0, 40, 20, 0.25); }
.btn-accent { --b1: #9b82ff; --b2: #6c48ff; --lip: var(--accent-d); --glow: rgba(123, 92, 255, 0.38); --fg: #fff; text-shadow: 0 1px 0 rgba(20, 0, 60, 0.25); }
.btn-orange { --b1: #ffbb4d; --b2: #ff940f; --lip: var(--orange-d); --glow: rgba(255, 159, 28, 0.35); --fg: #fff; text-shadow: 0 1px 0 rgba(80, 30, 0, 0.25); }
.btn-red { --b1: #ff7380; --b2: #ff3f52; --lip: var(--red-d); --glow: rgba(255, 77, 94, 0.35); --fg: #fff; }
.btn-pink { --b1: #ff6dbb; --b2: #ff2f98; --lip: var(--pink-d); --glow: rgba(255, 63, 164, 0.4); --fg: #fff; }
.btn-red-soft { --b1: #fff1f2; --b2: #ffe1e5; --lip: #f2bdc5; --fg: var(--red-d); }
.btn.ghost { --b1: rgba(255, 255, 255, 0.1); --b2: rgba(255, 255, 255, 0.06); --lip: rgba(0, 0, 0, 0.3); --fg: #fff; border: 1px solid var(--glass-line); }
.btn.big { min-height: 62px; font-size: 19px; border-radius: 22px; }
.btn.small { min-height: 44px; border-radius: 14px; }
.round-btn {
  background: linear-gradient(180deg, #fffdf8, #f2e9dc);
  color: var(--ink);
  --shade: var(--press);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.8), 0 4px 0 var(--press), 0 10px 20px rgba(4, 0, 12, 0.35);
}
.pill { background: #f3ece2; color: var(--ink-2); }
.pill.on { background: var(--accent); color: #fff; }
.seg { background: #f1e9dd; box-shadow: inset 0 1px 3px rgba(60, 30, 10, 0.12); }
.seg button { color: var(--ink-2); font-weight: 800; }
.seg button.on { background: #fff; color: var(--pink-d); box-shadow: 0 2px 0 var(--press), 0 3px 10px rgba(60, 30, 10, 0.12); }
.seg button:disabled { opacity: 1; cursor: default; }
.seg button:disabled:not(.on) { opacity: 0.55; }
.switch { background: #e2d8ca; box-shadow: inset 0 1px 3px rgba(60, 30, 10, 0.18); }
.switch.on { background: linear-gradient(180deg, #3ddc8a, #1db265); }
.switch:disabled { opacity: 0.6; }

/* ---------------------------------------------------------------- panels */
.card {
  background: linear-gradient(180deg, #fffdf8 0%, #fff7ec 100%);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 #fff, inset 0 -3px 0 rgba(120, 80, 40, 0.05), var(--shadow-lg);
  color: var(--ink);
}
.glass-dark { background: var(--glass-dark); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid var(--glass-line); color: #fff; }

/* ---------------------------------------------------------------- menus over the club */
.screen.clear {
  background: linear-gradient(180deg, rgba(11, 6, 20, 0.7), rgba(11, 6, 20, 0) 24%, rgba(11, 6, 20, 0) 52%, rgba(11, 6, 20, 0.78));
}
body.no3d .screen.clear { background: transparent; }
.screen.clear .menu-title { color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6); }
.screen.clear .hint, .screen.clear .menu-lead { color: rgba(255, 255, 255, 0.82); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
.card .hint { color: var(--muted); text-shadow: none; }
.menu-top { gap: 10px; }
.menu-head { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.menu-title { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 4vw, 32px); letter-spacing: 0.5px; line-height: 1; }
.menu-lead { margin: 0; text-align: center; font-size: 17px; }

/* step dots: Room → Comedian → Lobby */
.steps { list-style: none; margin: 0; padding: 4px; display: flex; gap: 4px; border-radius: 999px; background: rgba(15, 8, 26, 0.6); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.steps li { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; color: rgba(255, 255, 255, 0.55); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.steps i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.75); }
.steps li.done i { background: var(--green); color: #fff; }
.steps li.on { background: rgba(255, 63, 164, 0.22); color: #fff; }
.steps li.on i { background: var(--pink); color: #fff; box-shadow: 0 0 12px rgba(255, 63, 164, 0.7); }
@media (max-width: 420px) { .steps li span { display: none; } .steps li { padding: 3px; } .steps li.on span { display: inline; padding-right: 6px; } }

/* ---------------------------------------------------------------- logo + title */
.bj-logo { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 0.84; font-family: var(--display); font-weight: 400; letter-spacing: 2px; user-select: none; }
.bj-logo span { display: block; font-size: clamp(54px, 13vw, 104px); }
.bj-logo .l1 { color: #fff; text-shadow: 0 0 2px #fff, 0 0 18px var(--pink), 0 0 42px var(--pink), 0 6px 0 #b0146a; transform: rotate(-3deg); }
.bj-logo .l2 { color: var(--gold); text-shadow: 0 0 18px rgba(255, 201, 60, 0.75), 0 6px 0 #c47a00, 0 10px 24px rgba(0, 0, 0, 0.45); transform: rotate(2deg) translateX(0.3em); }
.bj-logo em { position: absolute; right: -0.5em; top: -0.25em; font-style: normal; font-family: var(--font); font-weight: 900; font-size: clamp(12px, 2.4vw, 17px); letter-spacing: 0; background: linear-gradient(180deg, #ff6b78, var(--red)); color: #fff; border-radius: 50%; width: 2.6em; height: 2.6em; display: grid; place-items: center; transform: rotate(14deg); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 3px 0 var(--red-d); }
.bj-logo.big { animation: glowpulse 3.2s ease-in-out infinite; }

.t-title { justify-content: space-between; gap: 14px; }
.title-top { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: max(1.5vh, 6px); }
.t-title .tagline { margin: 4px 0 0; color: #fff; opacity: 0.92; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); font-size: clamp(14px, 2.2vw, 18px); letter-spacing: 0.02em; }
.title-actions { width: min(500px, 100%); display: flex; flex-direction: column; gap: 12px; margin-bottom: max(1vh, 6px); }
.title-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.title-row .btn { min-height: 50px; font-size: 15px; }
@media (max-height: 720px) {
  .mega { min-height: 86px; padding-top: 10px; padding-bottom: 10px; }
  .mega-art { width: 66px; height: 66px; }
  .bj-logo span { font-size: clamp(44px, 9.5vh, 90px); }
}

/* "you're still in a room" */
.rejoin-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 24px; background: var(--glass-dark); border: 2px solid rgba(255, 201, 60, 0.6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 0 30px rgba(255, 201, 60, 0.25), var(--shadow-md); animation: rise 0.5s both; }
.rejoin-card.soft { border-color: var(--glass-line); box-shadow: var(--shadow-md); }
.rj-text { flex: 1; display: flex; flex-direction: column; color: #fff; min-width: 0; }
.rj-text small { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.65); }
.rj-text b { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: 1px; color: var(--gold); }
.rejoin-card .btn { min-height: 50px; padding: 0 18px; font-size: 16px; }
.rj-x { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.08); }
.rj-x .ic { width: 16px; height: 16px; }
.rj-x:hover { color: #fff; background: rgba(255, 255, 255, 0.16); }

/* ---------------------------------------------------------------- mega buttons */
.mega { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 7px 0 var(--shade), 0 18px 34px rgba(4, 0, 12, 0.4); border: 1px solid rgba(255, 255, 255, 0.18); }
.mega-host { --shade: #0a6f78; background: linear-gradient(135deg, #3fe0d3 0%, #18a6c4 60%, #1488b3 100%); }
.mega-join { --shade: #b81a58; background: linear-gradient(135deg, #ff9a4a 0%, #ff4f8f 55%, #f0307f 100%); }
.mega-art { position: relative; overflow: hidden; background: radial-gradient(circle at 50% 30%, #fff 0%, #fff6ea 45%, color-mix(in srgb, var(--pc, #fff) 35%, #fff) 100%); box-shadow: inset 0 -4px 0 rgba(42, 36, 64, 0.08), 0 4px 10px rgba(0, 0, 0, 0.18); }
.mega-art img.art { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12) translateY(5%); }
.mega-text b { text-shadow: 0 3px 0 rgba(0, 0, 0, 0.16), 0 0 18px rgba(255, 255, 255, 0.15); }
.mega.picked { box-shadow: 0 0 0 4px var(--gold), inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 7px 0 var(--shade), 0 18px 34px rgba(4, 0, 12, 0.4); }

/* ---------------------------------------------------------------- host + join */
.t-host .menu-body, .t-join .menu-body { justify-content: flex-start; padding-top: 10px; }
.join-form.card { padding: 18px 18px 20px; gap: 8px; }
.join-lbl { color: var(--muted); font-size: 12.5px; letter-spacing: 0.14em; }
.join-form input { border: 2px solid var(--line); background: #fff; box-shadow: inset 0 2px 4px rgba(60, 30, 10, 0.06); }
.join-form input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 63, 164, 0.18); }
.join-form input#hostName, .join-form input#jName { font-size: 22px; }
.join-code { font-size: 56px !important; letter-spacing: 0.32em !important; padding-left: 0.32em !important; color: var(--pink-d); background: repeating-linear-gradient(90deg, #fff 0 calc(25% - 3px), #f6efe4 calc(25% - 3px) 25%) !important; }
.join-code::placeholder { color: #e6d9c8; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; margin: 4px 0 -2px; }
.or::before, .or::after { content: ''; flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.watch-btn { min-height: 52px; }

/* ---------------------------------------------------------------- character select */
.t-pick .menu-body { justify-content: flex-start; }
.pick-panel { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.animal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.animal-card { --pc: var(--accent); --shade: var(--press); position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 10px; border-radius: 22px; background: linear-gradient(180deg, #fff, #fbf4ea); box-shadow: inset 0 1px 0 #fff, 0 4px 0 var(--press), 0 8px 18px rgba(60, 30, 10, 0.1); transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1), box-shadow 0.2s; }
.ac-art { width: min(92px, 100%); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #fff 0%, color-mix(in srgb, var(--pc) 22%, #fff) 70%, color-mix(in srgb, var(--pc) 40%, #fff) 100%); }
.animal-card img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.animal-card b { font-size: 15px; }
.animal-card small { font-size: 11.5px; color: var(--muted); min-height: 1.2em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-check { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--pc); color: #fff; transform: scale(0); transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }
.ac-check .ic { width: 16px; height: 16px; stroke-width: 3; }
.animal-card.on { box-shadow: 0 0 0 4px var(--pc), 0 5px 0 color-mix(in srgb, var(--pc) 70%, #000), 0 12px 26px color-mix(in srgb, var(--pc) 45%, transparent); transform: translateY(-2px); }
.animal-card.on .ac-check { transform: scale(1); }
.animal-card.locked { opacity: 0.5; filter: grayscale(0.75); }
.animal-card.locked small::before { content: '🔒 '; }
.pick-sub { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); text-align: center; margin-bottom: -4px; }
.color-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.swatch { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 45%), var(--sw); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.15), 0 3px 0 rgba(42, 36, 64, 0.15); transition: transform 0.15s cubic-bezier(0.3, 1.6, 0.5, 1); }
.swatch.on { transform: scale(1.18); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--sw), 0 6px 14px rgba(0, 0, 0, 0.25); }
.pick-foot { display: flex; align-items: center; gap: 14px; }
.pick-foot .btn { flex: 1; }
.pick-sel { display: flex; flex-direction: column; min-width: 150px; }
.pick-sel small { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.pick-sel b { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: 0.5px; color: var(--pc, var(--ink)); line-height: 1.05; }
@media (max-width: 520px) {
  .animal-grid { gap: 6px; }
  .animal-card { padding: 5px 2px 6px; border-radius: 16px; }
  .animal-card b { font-size: 13px; }
  .ac-check { width: 22px; height: 22px; top: 3px; right: 3px; }
  .swatch { width: 34px; height: 34px; }
  .color-row { gap: 6px; }
  .pick-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .pick-sel { text-align: center; align-items: center; }
}

/* ---------------------------------------------------------------- lobby */
.t-lobby { padding-bottom: calc(10px + var(--sb)); }
.lobby-top { width: min(1000px, 100%); }
.room-card {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; padding: 12px 18px; text-align: left; border-radius: 28px;
  background: linear-gradient(180deg, rgba(36, 18, 58, 0.88), rgba(20, 10, 34, 0.9)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 2px solid rgba(255, 201, 60, 0.55); box-shadow: inset 0 0 0 5px rgba(20, 10, 34, 0.9), inset 0 0 0 6px rgba(255, 201, 60, 0.25), 0 0 40px rgba(255, 201, 60, 0.15), var(--shadow-lg); color: #fff;
}
.rc-code { display: flex; flex-direction: column; align-items: center; }
.rc-code small { font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.6); }
.room-card .room-big { font-size: clamp(46px, 8.5vw, 88px); margin: 0; color: var(--gold); text-shadow: 0 0 18px rgba(255, 201, 60, 0.5), 0 5px 0 #a8650a; display: flex; align-items: center; gap: 10px; letter-spacing: 0.16em; padding-left: 0.16em; }
.room-card .room-big .reveal { height: 40px; padding: 0 12px; font-size: 14px; letter-spacing: 0; }
.rc-how { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rc-join { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.rc-qr { flex: none; width: 84px; height: 84px; padding: 0; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 0 0 3px rgba(255, 201, 60, 0.6); }
.rc-qr svg { display: block; width: 100%; height: 100%; }
.rc-qr { cursor: zoom-in; }
.rc-qr.hidden { display: none; }
@media (max-width: 900px), (pointer: coarse) { .rc-qr { width: 64px; height: 64px; } }
.here-t { flex: 1; min-width: 0; }
.here-qr { flex: none; width: 62px; height: 62px; padding: 3px; border-radius: 10px; background: #fff; border: 0; cursor: zoom-in; box-shadow: 0 0 0 2px rgba(255, 201, 60, 0.6); }
.here-qr svg, .qr-big svg { display: block; width: 100%; height: 100%; }
.qr-card { text-align: center; }
.qr-big { width: min(300px, 74vw); aspect-ratio: 1; margin: 6px auto 10px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 4px rgba(255, 201, 60, 0.6); }
.qr-code { margin: 0; font-size: 20px; }
.qr-code b { color: var(--pink-d, #c2185b); letter-spacing: 0.14em; }
.qr-url { margin: 4px 0 0; font-size: 13px; opacity: 0.7; word-break: break-all; }
.rc-how small, .rc-count { color: rgba(255, 255, 255, 0.62); font-size: 12.5px; }
.rc-how small { text-transform: uppercase; letter-spacing: 0.14em; }
.rc-url { font-size: clamp(14px, 1.8vw, 19px); word-break: break-all; color: #fff; }
.rc-where { align-self: flex-start; margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: livepulse 1.8s infinite; flex: none; }
body[data-net='reconnecting'] .live-dot, body[data-net='connecting'] .live-dot { background: var(--orange); }
.rc-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-right: 58px; }
.room-card .menu-open { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.seat-strip { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.seat { width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fff, color-mix(in srgb, var(--pc, #fff) 30%, #fff)); object-fit: cover; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
.seat.empty { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25); background: transparent; }
.seat.off { opacity: 0.4; }
.lobby-mid { flex: 1; min-height: 120px; width: 100%; display: flex; align-items: center; justify-content: center; }
.lobby-roster { display: none; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; padding: 10px 0; }
body.no3d .lobby-roster { display: flex; }
.lr-card { width: 108px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 10px; border-radius: 22px; background: linear-gradient(180deg, #fffdf8, #fff3e4); box-shadow: 0 4px 0 var(--pc), var(--shadow-md); animation: popin 0.4s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.lr-card .pt.lg { width: 72px; height: 72px; }
.lr-card b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-card small { font-size: 12px; color: var(--muted); }
.lr-card.me { box-shadow: 0 0 0 3px var(--pc), 0 4px 0 var(--pc), var(--shadow-md); }
.lr-card.off { opacity: 0.5; }
@media (max-width: 420px) { .lr-card { width: 96px; } .lr-card .pt.lg { width: 60px; height: 60px; } }
.lobby-bottom.card { width: min(780px, 100%); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.lobby-status p { margin: 0; }
.ls-main { font-size: 17px; color: var(--ink-2); }
.ls-role { margin-top: 2px !important; font-size: 13px; color: var(--muted); }
.ls-role b { color: var(--pink-d); }
.spice-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #f3ece2; color: var(--ink-2); }
.spice-tag.spicy { background: #ffe5ea; color: var(--red-d); }
.tv-tip { display: block; margin-top: 4px; color: var(--ink-2); font-weight: 600; }
.lobby-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.lobby-row .btn { min-height: 46px; font-size: 14.5px; padding: 0 14px; gap: 7px; }
.lobby-row .btn .ic { width: 20px; height: 20px; }
.wait-host { margin: 4px 0; font-size: 16px; color: var(--ink-2); }
.start-btn.ready { --shade: var(--green-d); --glow: rgba(34, 192, 112, 0.5); animation: breathe 2s ease-in-out infinite; }
@media (max-width: 680px) {
  .room-card { grid-template-columns: 1fr; text-align: center; gap: 4px; padding: 10px 14px 12px; }
  .rc-how { justify-content: center; order: 2; }
  .rc-join { align-items: center; }
  .rc-where { align-self: center; position: absolute; left: 14px; top: 14px; margin: 0; }
  .rc-meta { align-items: center; padding-right: 0; order: 3; }
  .rc-code { order: 1; }
  .seat-strip { justify-content: center; }
  .room-card .menu-open { top: 10px; transform: none; width: 44px; height: 44px; }
  .lobby-row .btn span { font-size: 13.5px; }
}

/* ---------------------------------------------------------------- sheets */
.sheet { z-index: 150; background: rgba(8, 3, 16, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet-card { background: linear-gradient(180deg, #fffdf8, #fff6ea); border-radius: 30px; box-shadow: inset 0 1px 0 #fff, var(--shadow-lg); border: 1px solid rgba(255, 255, 255, 0.7); }
.sheet-head { align-items: flex-start; gap: 12px; }
.sheet-head h3 { font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: 0.5px; line-height: 1.05; }
.sheet-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.35; }
.set-row { border-top-color: #f1e8db; }
.set-row > span small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; margin-top: 2px; }
.set-row > span .ic { width: 18px; height: 18px; vertical-align: -3px; color: var(--pink); margin-right: 4px; }
.set-row .seg button { padding: 0 10px; font-size: 14px; }
@media (max-width: 520px) {
  .set-row:has(.seg) { flex-direction: column; align-items: stretch; gap: 8px; }
  .set-row .seg { display: flex; }
  .set-row .seg button { flex: 1; }
}
.set-head { color: var(--muted); }
.prow img.pt { width: 36px; height: 36px; border-radius: 50%; }
.prow .pill { height: 38px; padding: 0 12px; font-size: 13px; gap: 4px; }
.prow .pill .ic { width: 16px; height: 16px; }
.prow .crown-tag { font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.pill.danger { color: var(--red-d); background: #ffe9ec; }
.menu-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.menu-foot .btn { min-height: 50px; font-size: 15px; }
.menu-foot .btn:only-child { grid-column: 1 / -1; }
.menu-sheet .sheet-card, .settings-sheet .sheet-card { width: min(540px, 100%); }
.menu-grid .btn.tile { min-height: 82px; }
.menu-grid .btn.tile:only-child { grid-column: 1 / -1; min-height: 64px; flex-direction: row; }
.menu-foot .btn { padding: 0 12px; font-size: 14.5px; white-space: nowrap; gap: 8px; }
.btn.tile .ic { color: var(--pink); }
.btn.tile.tile-go { --b1: #47e293; --b2: #1db265; --lip: var(--green-d); --glow: rgba(34, 192, 112, 0.38); --fg: #fff; }
.btn.tile.tile-go .ic { color: #fff; }
.sheet-done { width: 100%; margin-top: 16px; }
.here-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; margin: -2px 0 14px; border-radius: 20px; background: linear-gradient(180deg, #2a1640, #1c0f2c); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 201, 60, 0.35); }
.here-card .pt { background: radial-gradient(circle at 50% 35%, #fff, #f1e5ff); }
.here-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); color: var(--gold); flex: none; }
.here-card small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--gold); }
.here-card b { display: block; font-size: 18px; line-height: 1.2; }
.here-card b span { color: rgba(255, 255, 255, 0.7); font-weight: 800; }
.here-card em { display: block; font-style: normal; font-size: 13px; color: rgba(255, 255, 255, 0.7); }
.here-card em b { display: inline; font-size: inherit; color: var(--gold); }
.custom-form { display: flex; gap: 10px; align-items: stretch; margin: 6px 0 12px; }
.custom-form textarea { flex: 1; resize: none; font-size: 16px; font-weight: 800; color: var(--ink); border: 2px solid var(--line); border-radius: 18px; padding: 10px 12px; outline: none; background: #fff; }
.custom-form textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 63, 164, 0.15); }
.custom-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.custom-list li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; background: #f7efe4; border-radius: 16px; font-size: 15px; }
.custom-list li span { flex: 1; }
.custom-list li.empty { color: var(--muted); justify-content: center; text-align: center; padding: 14px; font-size: 14px; }
.tips { padding-left: 0; list-style: none; counter-reset: tip; }
.tips li { position: relative; padding-left: 40px; counter-increment: tip; }
.tips li::before { content: counter(tip); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--pink); color: #fff; font-weight: 900; font-size: 14px; }
.confirm-card h3 { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: 0.5px; }
.choice-col .btn { min-height: 54px; }

/* ---------------------------------------------------------------- name tags */
#tags { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#tags.hidden, body.no-tags #tags, body.no3d #tags { display: none; }
.tag { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; will-change: transform; }
.tag-name { padding: 3px 11px 4px; border-radius: 12px; background: linear-gradient(180deg, #fffdf8, #f6ede0); color: var(--ink); font-size: 13px; white-space: nowrap; box-shadow: 0 3px 0 var(--pc), 0 5px 14px rgba(0, 0, 0, 0.4); max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.tag.me .tag-name { background: var(--pc); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); box-shadow: 0 0 0 2px #fff, 0 3px 0 rgba(0, 0, 0, 0.25), 0 5px 14px rgba(0, 0, 0, 0.4); }
.tag.me .tag-name::after { content: ' (you)'; font-weight: 800; opacity: 0.85; }
.tag-st { font-size: 12px; color: #fff; text-shadow: 0 1px 4px #000; min-height: 0; }
.tag-st b.ok { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--green); font-size: 13px; animation: popin 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.tag-st i { font-style: normal; background: rgba(15, 8, 26, 0.7); padding: 1px 8px; border-radius: 8px; }
@media (max-width: 600px) { .tag-name { font-size: 11px; padding: 2px 7px 3px; max-width: 86px; } .tag.me .tag-name::after { content: ''; } }
#tags.compact .tag { flex-direction: row; gap: 4px; }
#tags.compact .tag-name { font-size: 11px; padding: 2px 8px 3px; max-width: 96px; box-shadow: 0 2px 0 var(--pc), 0 4px 10px rgba(0, 0, 0, 0.4); }
#tags.compact .tag.me .tag-name::after { content: ''; }
#tags.compact .tag-st i, #tags.compact .tag-money { font-size: 10px; padding: 1px 5px; }

/* ---------------------------------------------------------------- HUD */
#hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; display: none; }
body.in-game #hud { display: block; }
/* only the real controls take taps; the full-screen layers (views, floating
   emoji, the hidden pause veil) let them through */
#hud > .emotes { pointer-events: auto; }
.hud-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 4;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 10px;
  padding: calc(10px + var(--st)) calc(12px + var(--sr)) 0 calc(12px + var(--sl));
  pointer-events: none;
}
.hud-top > * { pointer-events: auto; }
.code-chip { justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 20px; font-size: 14px; color: #fff; background: var(--glass-dark); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-md); letter-spacing: 0.04em; }
.hud-right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.aud-chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 20px; background: var(--glass-dark); border: 1px solid var(--glass-line); color: #fff; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.aud-chip .ic { width: 18px; height: 18px; color: var(--gold); }
.hud-top .menu-btn { width: auto; padding: 0 14px 0 12px; gap: 6px; min-height: 44px; border-radius: 16px; font-size: 15px; }
.hud-top .menu-btn .ic { width: 22px; height: 22px; }

/* the show bar: which round, which step, what to do, how long */
.showbar { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 5px 6px 5px 8px; border-radius: 26px; background: var(--glass-dark); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); box-shadow: var(--shadow-md); color: #fff; max-width: min(640px, calc(100vw - 340px)); }
.showbar.bump { animation: bump 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
.sb-track { display: flex; gap: 3px; flex: none; }
.pip { display: grid; place-items: center; min-width: 30px; height: 24px; padding: 0 7px; border-radius: 12px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.07); }
.pip.done { color: rgba(255, 255, 255, 0.85); background: rgba(34, 192, 112, 0.35); }
.pip.on { color: var(--ink); background: linear-gradient(180deg, #ffe08a, var(--gold)); box-shadow: 0 0 14px rgba(255, 201, 60, 0.6); }
.pip.fin.on { color: #fff; background: linear-gradient(180deg, #ff6dbb, var(--pink)); box-shadow: 0 0 14px rgba(255, 63, 164, 0.7); }
.sb-step { display: flex; flex-direction: column; min-width: 0; padding-right: 4px; }
.sb-title { font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: 0.6px; line-height: 1.05; color: var(--gold); white-space: nowrap; }
.showbar.final .sb-title { color: #ff8fcb; }
.sb-sub { font-size: 13px; color: rgba(255, 255, 255, 0.82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-time { position: relative; flex: none; width: 46px; height: 46px; display: grid; place-items: center; }
.sb-time svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.sb-ring-bg { fill: rgba(255, 255, 255, 0.08); stroke: rgba(255, 255, 255, 0.14); stroke-width: 4; }
.sb-ring { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 106.8; stroke-dashoffset: 0; transition: stroke-dashoffset 0.25s linear, stroke 0.3s; }
.sb-time span { position: relative; font-size: 15px; font-variant-numeric: tabular-nums; }
.sb-time.urgent .sb-ring { stroke: var(--red); }
.sb-time.urgent span { color: #ff8a95; animation: pulse 1s infinite; }
@media (max-width: 760px) {
  .hud-top { grid-template-columns: 1fr auto; }
  .code-chip, .aud-chip { display: none; }
  .showbar { justify-self: stretch; max-width: none; min-width: 0; }
  .hud-top .menu-btn span { display: none; }
  .hud-top .menu-btn { padding: 0; width: 46px; }
}
@media (max-width: 420px) {
  .showbar { gap: 8px; padding-left: 8px; min-height: 48px; }
  .sb-track { display: none; }
  .sb-step { padding-left: 6px; }
  .sb-title { font-size: 17px; }
  .sb-sub { font-size: 12px; }
  .sb-time { width: 42px; height: 42px; }
}

.hud-main { position: absolute; inset: 0; pointer-events: none; }
/* a soft scrim so cards stay crisp over the bright stage (neon, spotlights) */
.hud-main::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(11, 6, 20, 0.72) 0%, rgba(11, 6, 20, 0.5) 32%, rgba(11, 6, 20, 0) 58%); transition: opacity 0.6s; }
body.no3d .hud-main::before { display: none; }
.hud-view {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  padding: calc(76px + var(--st)) calc(14px + var(--sr)) calc(14px + var(--sb)) calc(14px + var(--sl));
  opacity: 0; transform: translateY(18px) scale(0.985);
  transition: opacity 0.32s ease, transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1);
  pointer-events: none; overflow-y: auto; overflow-x: hidden; touch-action: pan-y;
}
.hud-view.show { opacity: 1; transform: none; }
.hud-view.leaving { opacity: 0; transform: translateY(-16px) scale(0.98); }
.hud-view > * { pointer-events: auto; }
@media (max-width: 420px) { .hud-view { padding-top: calc(70px + var(--st)); } }
.v-center { justify-content: flex-start; padding-top: max(calc(84px + var(--st)), 9vh); }

/* ---- intro */
.v-intro { justify-content: space-between; padding-bottom: calc(22px + var(--sb)); }
.intro-logo { margin-top: 3vh; display: flex; flex-direction: column; align-items: center; font-family: var(--display); line-height: 0.85; opacity: 0; pointer-events: none; }
.intro-logo span { font-size: clamp(70px, 16vw, 170px); }
.intro-logo span:first-child { color: #fff; text-shadow: 0 0 22px var(--pink), 0 0 50px var(--pink), 0 8px 0 #b0146a; }
.intro-logo span:last-child { color: var(--gold); text-shadow: 0 0 22px rgba(255, 201, 60, 0.8), 0 8px 0 #c47a00; }
.v-intro.go .intro-logo { opacity: 1; animation: slam 0.7s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.intro-sub { color: #fff; font-size: 18px; text-transform: uppercase; letter-spacing: 4px; opacity: 0; text-shadow: 0 2px 8px #000; }
.v-intro.go .intro-sub { animation: rise 0.6s 0.6s both; opacity: 1; }
.intro-cast { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 900px; }
.cast { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px 8px; border-radius: 20px; background: linear-gradient(180deg, #fffdf8, #fff3e4); box-shadow: 0 4px 0 var(--pc, var(--press)), 0 8px 20px rgba(0, 0, 0, 0.4); opacity: 0; transform: translateY(30px) scale(0.8); transition: all 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
.cast.in { opacity: 1; transform: none; }
.cast .pt { width: 58px; height: 58px; }
.cast b { font-size: 14px; }

/* ---- shared bits */
.pt { width: 40px; height: 40px; object-fit: contain; flex: none; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fff, color-mix(in srgb, var(--pc, #e9e0f7) 28%, #fff)); }
.pt.sm { width: 30px; height: 30px; }
.pt.md { width: 52px; height: 52px; }
.pt.lg { width: 104px; height: 104px; }
.pt.xl { width: min(150px, 28vw); height: min(150px, 28vw); box-shadow: 0 0 0 6px #fff, 0 0 0 9px var(--gold), 0 14px 30px rgba(0, 0, 0, 0.35); }
.pt-empty { display: inline-block; background: #e4dcef; }
.name-tag { background: linear-gradient(180deg, #fffdf8, #f6ede0); }
.pchip { padding: 3px 12px 3px 3px; font-size: 15px; box-shadow: 0 3px 0 var(--pc, var(--press)); }
.pchip .pt { width: 34px; height: 34px; }
.dots { display: inline-flex; gap: 3px; margin-left: 4px; }
.dots b { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: dots 1.1s infinite; }
.dots b:nth-child(2) { animation-delay: 0.15s; }
.dots b:nth-child(3) { animation-delay: 0.3s; }
.kicker { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; background: var(--ink); color: var(--gold); }

/* ---- round intro */
.ri-card { position: relative; width: min(640px, 100%); text-align: center; padding: 26px 24px 24px; border-radius: 34px; background: linear-gradient(180deg, #fffdf8, #fff4e6); box-shadow: inset 0 1px 0 #fff, var(--shadow-lg); animation: slam 0.6s cubic-bezier(0.2, 1.3, 0.4, 1) both; overflow: hidden; }
.ri-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 8px; background: repeating-linear-gradient(90deg, var(--pink) 0 22px, var(--gold) 22px 44px); }
.ri-title { font-family: var(--display); font-size: clamp(54px, 12vw, 104px); line-height: 0.95; color: var(--accent); text-shadow: 0 6px 0 #d9cffd; letter-spacing: 2px; }
.ri-card.is-final .ri-title { color: var(--red); text-shadow: 0 6px 0 #ffc2c9; }
.final-kind { display: inline-block; margin: 8px 0 4px; padding: 8px 20px; border-radius: 18px; background: var(--ink); color: var(--gold); font-family: var(--display); font-size: clamp(28px, 6vw, 44px); letter-spacing: 1px; transform: rotate(-2deg); box-shadow: 0 6px 0 #000; animation: slam 0.6s 0.4s both; }
.ri-blurb { margin: 10px 0 0; font-size: clamp(17px, 2.4vw, 21px); color: var(--ink-2); }
.dbl { display: inline-block; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 5vw, 42px); color: var(--orange); letter-spacing: 1px; animation: pulse 0.8s 3; }
.ri-note { margin: 12px 0 0; color: var(--muted); font-size: 15px; }

/* ---- writing */
.v-writing { justify-content: flex-start; }
.write-card { position: relative; width: min(640px, 100%); padding: 18px; border-radius: 30px; background: linear-gradient(180deg, #fffdf8, #fff6ea); box-shadow: inset 0 1px 0 #fff, var(--shadow-lg); display: flex; flex-direction: column; gap: 12px; }
.write-card.in { animation: rise 0.4s cubic-bezier(0.2, 1, 0.3, 1) both; }
.write-card.out { position: absolute; opacity: 0; transform: translateY(-20px); transition: all 0.25s; }
.wc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 10px; }
.wc-count { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--ink); color: var(--gold); font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; }
.wc-count i { display: inline-flex; gap: 4px; }
.wc-count i u { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); text-decoration: none; }
.wc-count i u.on { background: var(--gold); }
.wc-kind { font-family: var(--display); letter-spacing: 1px; font-size: 24px; color: var(--red); text-transform: none; white-space: nowrap; line-height: 1; }
.wc-by { font-size: 13px; color: var(--accent); text-transform: none; letter-spacing: 0; }
.wc-prompt { font-size: clamp(22px, 3.6vw, 32px); line-height: 1.18; font-weight: 900; color: var(--ink); }
.wc-input { position: relative; }
.answer-input { width: 100%; font: inherit; font-size: 21px; font-weight: 800; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 14px 56px 14px 16px; outline: none; resize: none; line-height: 1.3; box-shadow: inset 0 2px 4px rgba(60, 30, 10, 0.06); }
.answer-input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 63, 164, 0.16); }
.answer-input::placeholder { color: #c9bcae; }
.wc-left { position: absolute; right: 14px; bottom: 12px; font-size: 13px; color: var(--muted); }
.wc-left.low { color: var(--red); }
.wc-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.wc-actions .btn { min-height: 58px; }
.safety-btn { padding: 0 12px; gap: 8px; }
.safety-btn span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; font-size: 15px; white-space: nowrap; }
.safety-btn small { display: block; font-size: 11px; opacity: 0.88; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 420px) { .safety-btn .ic { display: none; } .safety-btn span { align-items: center; } }
.done-card { align-items: center; text-align: center; }
.done-card h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 42px; color: var(--green); letter-spacing: 1px; }
.done-big .pt { animation: bob 1.6s ease-in-out infinite; }
.watch-card { text-align: center; align-items: center; }
.watch-card h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: 0.5px; }
.wait-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.wait-slot { width: 100%; }
@media (max-width: 560px) {
  .write-card { padding: 14px; border-radius: 24px; gap: 10px; }
  .answer-input { font-size: 18px; }
  .wc-actions .btn { min-height: 52px; font-size: 15px; }
}

/* final writing */
.fk-form { display: flex; flex-direction: column; gap: 10px; }
.fk-field { display: flex; flex-direction: column; gap: 4px; }
.fk-lab { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.fk-hint.ok { color: var(--green); font-style: normal; }
.fk-hint.off { color: var(--orange); font-style: normal; }
.fk-form .answer-input { padding-right: 16px; font-size: 19px; padding-top: 11px; padding-bottom: 11px; }
.fk-preview { font-size: 18px; color: var(--ink); min-height: 0; }
.fk-preview:empty { display: none; }
.fk-preview .ok { color: var(--green); }
.fk-preview .bad { color: var(--red); }
.fk-acro .fk-preview { display: flex; gap: 8px; justify-content: center; }
.fk-acro .fk-preview span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-size: 24px; background: #f3ece2; color: var(--muted); }
.fk-acro .fk-preview span.ok { background: var(--green); color: #fff; }
.fk-acro .fk-preview span.bad { background: #ffe1e5; color: var(--red); }
.fk-err { margin: 0; color: var(--red-d); font-size: 15px; min-height: 1.2em; }
.fk-err:empty { min-height: 0; display: none; }
.emoji-pad { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; max-height: 136px; overflow-y: auto; padding: 6px; background: #f7efe4; border-radius: 16px; }
.emoji-pad button { font-size: 24px; height: 40px; border-radius: 10px; }
.emoji-pad button:active { background: #ece2d4; transform: scale(0.9); }
.emoji-del { font-size: 18px !important; color: var(--muted); }
.fk-acro-letters { display: flex; justify-content: center; gap: 10px; margin-bottom: 6px; }
.fk-acro-letters span { width: 1.6em; height: 1.6em; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(180deg, #9b82ff, var(--accent)); color: #fff; font-family: var(--display); font-size: clamp(30px, 6vw, 48px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 5px 0 var(--accent-d); }
.fk-sub { font-size: 0.6em; color: var(--muted); font-weight: 800; margin-top: 4px; }
.fk-madlib .blank, .fk-preview .blank { color: var(--accent); letter-spacing: 1px; }
.fk-madlib mark, .fk-preview mark { background: #efe9ff; color: var(--accent-d); padding: 0 6px; border-radius: 8px; }
.fk-couplet { font-style: italic; }
.fk-couplet .q { color: var(--accent); font-size: 1.3em; }
.fk-jeopardy { display: inline-block; padding: 10px 18px; background: #1d2b9c; color: #fff; border-radius: 12px; font-family: var(--display); font-weight: 400; letter-spacing: 1px; text-transform: uppercase; text-shadow: 2px 2px 0 #000; }

/* ---- the duel */
.v-duel { justify-content: flex-start; gap: 12px; }
.duel-prompt { position: relative; width: min(860px, 100%); text-align: center; padding: 14px 20px 16px; border-radius: 28px; background: linear-gradient(180deg, #2c1745, #1d0f2f); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 201, 60, 0.3), var(--shadow-lg); }
.v-duel.p-in .duel-prompt, .v-final .duel-prompt { animation: slam 0.55s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.duel-count { display: inline-block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold); margin-bottom: 4px; }
.dp-text { font-size: clamp(20px, 3.2vw, 32px); line-height: 1.18; font-weight: 900; }
.duel-prompt .wc-by { color: #c9b8ff; }
.duel-cards { position: relative; width: min(980px, 100%); display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; }
.vs { align-self: center; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 24px; color: var(--ink); background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 55%, #e29a12); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15), 0 0 0 4px rgba(20, 10, 34, 0.85), 0 0 26px rgba(255, 201, 60, 0.55); transform: rotate(-8deg); }
.ans-wrap { position: relative; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: scale(0.6) rotate(-3deg); transition: opacity 0.3s, transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.ans-wrap[data-i='1'] { transform: scale(0.6) rotate(3deg); }
.ans-wrap.in { opacity: 1; transform: none; }
.ans-card {
  position: relative; width: 100%; min-height: 124px; padding: 20px 18px 18px; border-radius: 26px; background: linear-gradient(180deg, #fffdf8, #fff4e6); color: var(--ink);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; text-align: center; overflow: hidden;
  --shade: var(--press); box-shadow: inset 0 1px 0 #fff, 0 6px 0 var(--press), 0 16px 34px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1), box-shadow 0.2s, opacity 0.3s, filter 0.3s;
}
.ans-card::before { content: ''; position: absolute; inset: 12px 14px auto; height: 2px; background: repeating-linear-gradient(90deg, #f0c4d6 0 8px, transparent 8px 14px); opacity: 0.7; }
.ans-card:disabled { cursor: default; }
.ans-text { position: relative; z-index: 2; font-size: clamp(20px, 2.9vw, 30px); line-height: 1.2; font-weight: 900; word-break: break-word; }
.ans-card.empty .ans-text { color: var(--muted); font-style: italic; }
.ans-card.votable { cursor: pointer; }
.ans-card.votable::after { content: 'Tap to vote'; position: absolute; bottom: 9px; left: 0; right: 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
@media (hover: hover) { .ans-card.votable:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 0 0 4px rgba(255, 63, 164, 0.45), 0 8px 0 var(--press), 0 20px 40px rgba(0, 0, 0, 0.4); } }
.ans-card.votable:active { transform: translateY(4px) scale(0.98); }
.ans-card.picked { box-shadow: 0 0 0 5px var(--green), 0 6px 0 var(--green-d), 0 16px 34px rgba(34, 192, 112, 0.45); }
.ans-card.picked::after { content: '✓ Your vote'; color: var(--green-d); }
.ans-voters { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 0; }
.ans-voters .vt { width: 34px; height: 34px; animation: popin 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15); }
.aud-votes { display: inline-flex; align-items: center; gap: 3px; padding: 4px 10px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 13px; animation: popin 0.35s both; }
.aud-votes .ic { width: 15px; height: 15px; }
.ans-bar { position: absolute; left: 0; bottom: 0; top: 0; width: 100%; z-index: 0; pointer-events: none; }
.ans-bar i { position: absolute; inset: auto 0 0 0; height: 100%; transform-origin: bottom; transform: scaleY(0); background: linear-gradient(180deg, rgba(255, 63, 164, 0.06), rgba(255, 63, 164, 0.2)); transition: transform 1s cubic-bezier(0.2, 0.9, 0.3, 1); }
.ans-card.tallied .ans-bar i { transform: scaleY(var(--pct, 0)); }
.ans-pct { position: absolute; bottom: 8px; right: 14px; z-index: 2; font-family: var(--display); font-size: 26px; color: var(--pink-d); opacity: 0; transition: opacity 0.3s; }
.ans-card.tallied .ans-pct { opacity: 1; }
.stamp { position: absolute; z-index: 4; left: 12px; top: -15px; padding: 4px 12px 2px; border: 3px solid currentColor; border-radius: 12px; font-family: var(--display); font-size: clamp(18px, 2.4vw, 24px); letter-spacing: 1px; color: var(--red); background: rgba(255, 255, 255, 0.92); transform: rotate(-8deg); opacity: 0; pointer-events: none; }
.stamp.show { animation: slam 0.5s cubic-bezier(0.2, 1.3, 0.4, 1) both; opacity: 1; }
.stamp.gold { color: #d08a00; background: #fff8dc; box-shadow: 0 0 20px rgba(255, 201, 60, 0.8); }
.like-btn { position: absolute; top: -10px; right: -8px; z-index: 6; display: inline-flex; align-items: center; gap: 4px; height: 38px; min-width: 38px; padding: 0 10px; border-radius: 19px; background: linear-gradient(180deg, #fff, #fbf1e6); color: #cdbfb0; font-size: 14px; box-shadow: 0 3px 0 var(--press), 0 6px 14px rgba(0, 0, 0, 0.3); transition: transform 0.15s cubic-bezier(0.3, 1.6, 0.5, 1), color 0.15s; }
.like-btn .ic { width: 20px; height: 20px; }
.like-btn b:empty { display: none; }
.like-btn b { color: var(--ink); }
.like-btn.on { color: #ff3f6e; }
.like-btn.pop { animation: pulse 0.35s; }
.like-btn.mine, .like-btn:disabled { opacity: 0.5; pointer-events: none; }
.like-btn:disabled:has(b:empty) { display: none; }
.ans-author { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 0; opacity: 0; transform: translateY(-12px); transition: all 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); }
.ans-author b { font-size: 18px; display: block; }
.ans-author .pts { font-family: var(--display); font-size: 30px; color: var(--gold); text-shadow: 0 3px 0 #000; }
.ans-wrap.authored .ans-author { opacity: 1; transform: none; padding: 8px 14px 8px 8px; border-radius: 24px; background: var(--glass-dark); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); align-self: center; }
.ans-wrap.win .ans-card { box-shadow: 0 0 0 5px var(--gold), 0 6px 0 #c47a00, 0 0 44px rgba(255, 201, 60, 0.6); transform: scale(1.03); }
.ans-wrap.lose .ans-card { filter: saturate(0.6) brightness(0.9); transform: scale(0.97); }
.safety-tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 8px; background: var(--orange); color: #fff; text-shadow: none; }
.duel-banner { color: #fff; text-align: center; font-size: 17px; padding: 8px 16px; border-radius: 22px; background: var(--glass-dark); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.duel-banner:empty { display: none; }
.db-you { display: inline-block; padding: 8px 16px; border-radius: 18px; background: linear-gradient(180deg, #ff6dbb, var(--pink)); text-shadow: none; box-shadow: 0 4px 0 var(--pink-d); }
.voted-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.vchip { position: relative; opacity: 0.35; filter: grayscale(1); transition: all 0.3s; }
.vchip .pt { width: 32px; height: 32px; }
.vchip.in { opacity: 1; filter: none; }
.vchip.in::after { content: '✓'; position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: var(--green); color: #fff; font-size: 11px; display: grid; place-items: center; }
.aud-count { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 4px 10px; border-radius: 14px; background: rgba(0, 0, 0, 0.45); }
.aud-count .ic { width: 15px; height: 15px; }
.bonus-banner { position: relative; z-index: 6; opacity: 0; padding: 10px 22px; border-radius: 20px; background: var(--ink); color: #fff; font-size: 18px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.bonus-banner.show { animation: slam 0.5s cubic-bezier(0.2, 1.3, 0.4, 1) both; opacity: 1; }
.bonus-banner b { font-family: var(--display); font-weight: 400; font-size: 28px; color: var(--gold); letter-spacing: 1px; margin-right: 6px; }
.bonus-banner.jinx { background: var(--red); }
.bonus-banner.forfeit { background: var(--orange); }
@media (max-width: 700px) {
  .duel-cards { grid-template-columns: 1fr; gap: 14px; }
  .vs { justify-self: center; margin: -14px 0; width: 46px; height: 46px; font-size: 19px; position: relative; z-index: 3; }
  .ans-card { min-height: 92px; padding: 18px 14px 22px; border-radius: 22px; }
  .ans-text { font-size: 20px; }
  .duel-prompt { padding: 12px 14px; border-radius: 22px; }
  .dp-text { font-size: 19px; }
  .ans-author b { font-size: 15px; }
  .ans-author .pts { font-size: 24px; }
}

/* ---- scores */
.score-card { position: relative; width: min(560px, 100%); padding: 18px; border-radius: 30px; background: linear-gradient(180deg, #fffdf8, #fff4e6); box-shadow: inset 0 1px 0 #fff, var(--shadow-lg); animation: rise 0.5s both; overflow: hidden; }
.score-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 8px; background: repeating-linear-gradient(90deg, var(--gold) 0 22px, var(--pink) 22px 44px); }
.score-card h2 { margin: 6px 0 12px; text-align: center; font-family: var(--display); font-weight: 400; font-size: 34px; letter-spacing: 1px; color: var(--accent); }
.score-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.score-list li { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 var(--press); animation: rise 0.45s calc(var(--i) * 80ms) both; border-left: 6px solid var(--pc); }
.score-list li.lead { background: linear-gradient(90deg, #fff6d6, #fff); box-shadow: 0 3px 0 #f2d48a, 0 0 0 2px var(--gold); }
.score-list .rank { width: 26px; text-align: center; font-family: var(--display); font-size: 22px; color: var(--muted); }
.score-list li.lead .rank { color: var(--orange); }
.score-list .nm { flex: 1; font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-list .score { font-family: var(--display); font-size: 24px; color: var(--ink); font-variant-numeric: tabular-nums; }
.score-list i { font-style: normal; font-size: 13px; }
.score-list i.up { color: var(--green); }
.score-list i.down { color: var(--red); }
@media (max-height: 760px) and (min-width: 700px) { .score-list li { padding: 3px 12px 3px 6px; } .score-list .pt { width: 32px; height: 32px; } }

/* ---- final round */
.v-final { justify-content: flex-start; gap: 12px; }
.duel-prompt.final { background: linear-gradient(135deg, #3a1060, #5a1a74); }
.duel-prompt.final .dp-text { font-size: clamp(19px, 2.8vw, 28px); }
.final-grid { width: min(1100px, 100%); display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.final-grid.n2, .final-grid.n3 { width: min(820px, 100%); }
.fwrap { position: relative; animation: popin 0.45s calc(var(--i) * 90ms) cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.f-card { position: relative; width: 100%; min-height: 96px; height: 100%; padding: 16px 14px 14px; border-radius: 22px; background: linear-gradient(180deg, #fffdf8, #fff4e6); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; --shade: var(--press); box-shadow: inset 0 1px 0 #fff, 0 6px 0 var(--press), 0 14px 30px rgba(0, 0, 0, 0.35); transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1), box-shadow 0.2s, opacity 0.3s; }
.f-card.pickable { cursor: pointer; }
@media (hover: hover) { .f-card.pickable:hover { transform: translateY(-3px); box-shadow: 0 0 0 4px rgba(255, 63, 164, 0.45), 0 8px 0 var(--press); } }
.f-card.ranked { box-shadow: 0 0 0 4px var(--gold), 0 6px 0 #c47a00, 0 14px 30px rgba(0, 0, 0, 0.3); }
.f-card.mine { background: #efe8f7; box-shadow: 0 6px 0 #d6cde6; }
.f-card .medal { position: absolute; top: -14px; left: -8px; font-size: 34px; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.3)); }
.f-card .medal:empty { display: none; }
.mine-tag { display: none; position: absolute; top: 8px; left: 12px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.f-card.mine .mine-tag { display: block; }
.fwrap .like-btn { top: -12px; right: -6px; }
.final-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(520px, 100%); color: #fff; text-shadow: 0 2px 8px #000; padding: 10px 14px; border-radius: 24px; background: var(--glass-dark); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.final-actions .btn { width: 100%; text-shadow: none; }
.fa-note { margin: 0; font-size: 18px; text-align: center; }
@media (max-width: 420px) { .fa-note { font-size: 15.5px; } .fa-note span { font-size: 20px; } }
.fa-note span { opacity: 0.35; font-size: 24px; transition: opacity 0.2s; }
.fa-note span.got { opacity: 1; }
.fa { font-size: clamp(17px, 2.2vw, 22px); font-weight: 900; line-height: 1.25; word-break: break-word; }
.fa-madlib mark { background: #efe9ff; color: var(--accent-d); padding: 0 5px; border-radius: 6px; }
.fa-triple { text-align: left; margin: 0; padding-left: 26px; display: flex; flex-direction: column; gap: 4px; }
.fa-haiku { font-style: italic; font-family: Georgia, 'Times New Roman', serif; font-weight: 700; }
.fa-headline { width: 100%; font-family: Georgia, 'Times New Roman', serif; border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); padding: 6px 2px; }
.fa-headline small { display: block; font-size: 10px; letter-spacing: 2px; font-family: var(--font); color: var(--muted); }
.fa-headline b { font-weight: 900; font-size: 1.05em; letter-spacing: -0.5px; }
.fa-emoji { font-size: clamp(30px, 4vw, 42px); letter-spacing: 2px; }
.fa-oneword { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3vw, 36px); word-break: normal; overflow-wrap: anywhere; letter-spacing: 1px; color: var(--accent); }
.fa-couplet { display: flex; flex-direction: column; gap: 2px; font-style: italic; }
.fa-couplet span { color: var(--muted); font-size: 0.82em; }
.fa-reverse small { color: var(--accent); font-family: var(--display); font-size: 1.2em; }
.fa-acro span b { color: var(--accent); font-size: 1.25em; }
.f-reveal { display: none; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 2px dashed #efe3d4; width: 100%; font-size: 15px; }
.fwrap.revealed .f-reveal { display: flex; animation: rise 0.4s both; }
.f-reveal .medals { display: inline-flex; gap: 4px; font-size: 13px; }
.f-reveal .audpick { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); }
.f-reveal .audpick .ic { width: 14px; height: 14px; }
.f-reveal .pts { margin-left: auto; font-family: var(--display); font-size: 24px; color: var(--orange); }
.v-final.result .fwrap:not(.revealed) .f-card { opacity: 0.55; filter: saturate(0.5); }
.fwrap.current .f-card { transform: scale(1.05); box-shadow: 0 0 0 5px var(--gold), 0 6px 0 #c47a00, 0 0 40px rgba(255, 201, 60, 0.5); z-index: 2; }
.like-count { position: absolute; top: -10px; right: -6px; display: inline-flex; align-items: center; gap: 3px; padding: 4px 9px; border-radius: 14px; background: #fff; color: #ff3f6e; font-size: 13px; box-shadow: 0 2px 0 var(--press); }
.like-count .ic { width: 16px; height: 16px; }
@media (max-width: 560px) { .final-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .f-card { padding: 12px 10px; } .fa { font-size: 16px; } .fa-emoji { font-size: 26px; } }

/* ---- winner + end */
.v-winner { justify-content: center; gap: 16px; }
.drum-text { display: flex; flex-direction: column; align-items: center; color: #fff; text-shadow: 0 3px 14px rgba(0, 0, 0, 0.9); text-align: center; animation: rise 0.8s both; transition: opacity 0.4s, transform 0.4s; }
.drum-text span { font-size: clamp(20px, 3vw, 30px); }
.drum-text b { font-family: var(--display); font-weight: 400; font-size: clamp(56px, 11vw, 110px); color: var(--gold); line-height: 1; animation: pulse 0.6s infinite; }
.v-winner.revealed .drum-text { display: none; }
.v-winner { justify-content: flex-start; }
.v-winner:not(.revealed) { justify-content: center; }
.win-banner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 26px 20px; border-radius: 34px; background: linear-gradient(180deg, #fffdf8, #fff3df); box-shadow: inset 0 1px 0 #fff, 0 0 0 4px var(--gold), 0 0 60px rgba(255, 201, 60, 0.45), var(--shadow-lg); text-align: center; animation: slam 0.7s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.wb-crown { font-size: 54px; margin-bottom: -10px; animation: bob 1.6s ease-in-out infinite; }
.wb-faces { display: flex; gap: 14px; }
.wb-name { font-family: var(--display); font-size: clamp(38px, 7vw, 66px); line-height: 1; color: var(--ink); letter-spacing: 1px; }
.wb-sub { color: var(--muted); font-size: 17px; }
.awards { display: flex; flex-direction: column; gap: 10px; width: min(560px, 100%); }
.award { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: 22px; background: linear-gradient(180deg, #fffdf8, #fff4e6); box-shadow: inset 0 1px 0 #fff, var(--shadow-md); animation: rise 0.5s both; }
.award:nth-child(2) { animation-delay: 0.25s; }
.aw-ic { font-size: 30px; }
.award small { display: block; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.award q { display: block; font-size: 19px; font-weight: 900; line-height: 1.25; }
.aw-prompt { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.aw-n { font-style: normal; color: #ff3f6e; margin-left: 6px; }
.award-slot { width: min(560px, 100%); }
.v-end { justify-content: flex-start; gap: 14px; }
.v-end .win-banner { animation: none; padding: 12px 22px 14px; }
.v-end .pt.xl { width: min(96px, 22vw); height: min(96px, 22vw); }
.v-end .wb-name { font-size: clamp(30px, 5vw, 48px); }
.end-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: min(980px, 100%); align-items: start; }
.mini-standings { list-style: none; margin: 0; padding: 12px; border-radius: 24px; background: linear-gradient(180deg, #fffdf8, #fff4e6); display: flex; flex-direction: column; gap: 5px; box-shadow: inset 0 1px 0 #fff, var(--shadow-md); }
.mini-standings li { display: flex; align-items: center; gap: 8px; padding: 3px 12px 3px 4px; border-radius: 14px; background: #fff; border-left: 5px solid var(--pc); }
.mini-standings .rank { width: 22px; text-align: center; font-family: var(--display); color: var(--muted); }
.mini-standings .pt { width: 30px; height: 30px; }
.mini-standings b { flex: 1; font-size: 15px; }
.mini-standings .score { font-family: var(--display); font-size: 18px; }
.end-actions { display: flex; gap: 12px; width: min(620px, 100%); justify-content: center; }
.end-actions .btn { flex: 1; }
.end-actions .hint { color: #fff; text-shadow: 0 2px 8px #000; margin: 0; align-self: center; }
.end-actions:has(.hint) { flex-direction: column; align-items: center; }
.end-actions:has(.hint) .btn { flex: none; min-height: 48px; }
@media (max-width: 700px) { .end-cols { grid-template-columns: 1fr; } .end-actions { flex-direction: column; } }
.v-winner.awards-in .win-banner { padding: 10px 20px 12px; }
.v-winner.awards-in .pt.xl { width: min(90px, 20vw); height: min(90px, 20vw); }
.v-winner.awards-in .wb-name { font-size: clamp(30px, 5vw, 44px); }
.v-winner.awards-in .wb-crown { font-size: 36px; }
.v-winner .win-banner, .v-winner .pt.xl, .v-winner .wb-name { transition: all 0.5s cubic-bezier(0.3, 1.3, 0.5, 1); }
.v-end .win-banner { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 4px 14px; padding: 10px 22px; }
.v-end .wb-crown { font-size: 34px; margin: 0; }
.v-end .wb-faces .pt.xl { width: 64px; height: 64px; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--gold), 0 6px 14px rgba(0, 0, 0, 0.3); }
.v-end .wb-sub { width: 100%; }

/* ---- emotes + pause */
.emotes { position: absolute; right: calc(12px + var(--sr)); bottom: calc(12px + var(--sb)); z-index: 6; display: flex; gap: 6px; padding: 6px; border-radius: 26px; background: var(--glass-dark); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow-md); }
.emotes button { width: 44px; height: 44px; border-radius: 50%; font-size: 24px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); transition: transform 0.15s cubic-bezier(0.3, 1.6, 0.5, 1), background 0.15s; }
@media (hover: hover) { .emotes button:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); } }
.emotes button:active { transform: scale(0.85); }
.emotes button.pop { animation: pulse 0.3s; }
@media (max-width: 560px) { .emotes { right: 50%; transform: translateX(50%); } .emotes button { width: 40px; height: 40px; font-size: 21px; } }
.floaters { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.floater { position: absolute; bottom: -40px; font-size: 34px; animation: floatup 2.5s ease-out forwards; }
@keyframes floatup { to { transform: translate(var(--dx), -70vh) scale(1.3); opacity: 0; } }
.pause-veil { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(8, 3, 16, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
#hud.paused .pause-veil { opacity: 1; pointer-events: auto; }
.pause-card { width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 26px 24px 22px; border-radius: 32px; background: linear-gradient(180deg, #fffdf8, #fff4e6); box-shadow: inset 0 1px 0 #fff, var(--shadow-lg); transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1); }
#hud.paused .pause-card { transform: none; }
.pause-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--gold); }
.pause-ic .ic { width: 30px; height: 30px; }
.pause-title { font-family: var(--display); font-size: 60px; color: var(--accent); line-height: 1; }
.pause-by { color: var(--muted); margin: 0; }
.pause-card .btn { width: 100%; }
.resume-btn { display: none !important; }
#hud.is-host .resume-btn { display: inline-flex !important; }
#hud.is-host .pause-wait { display: none; }
.pause-wait { color: var(--muted); margin: 0; }

/* ---- reconnect banner */
#netBanner { position: fixed; left: 50%; top: calc(10px + var(--st)); z-index: 200; display: flex; align-items: center; gap: 10px; transform: translate(-50%, -90px); padding: 8px 8px 8px 16px; border-radius: 22px; background: linear-gradient(180deg, #ffb24a, var(--orange)); color: #fff; font-size: 15px; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2), 0 10px 26px rgba(0, 0, 0, 0.45); transition: transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1); white-space: nowrap; max-width: calc(100vw - 20px); }
#netBanner.show { transform: translate(-50%, 0); }
.nb-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: pulse 0.8s infinite; flex: none; }
.nb-btn { display: none; height: 34px; padding: 0 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.2); color: #fff; font-size: 13px; }
#netBanner.long .nb-btn { display: inline-flex; align-items: center; }
#netBanner:not(.long) { padding-right: 16px; }

/* ---- toast */
.toast { z-index: 210; top: calc(74px + var(--st)); background: var(--glass-dark); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-md); padding: 12px 20px; border-radius: 20px; font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  .bj-logo.big, .start-btn.ready, .drum-text b, .live-dot, .showbar.bump { animation: none !important; }
}
