:root {
  --bg: #0d0716;
  --panel: #1a1030;
  --panel-2: #22163d;
  --line: #2c1d4c;
  --ink: #f6f0ff;
  --muted: #a99bc7;
  --pink: #ff2d95;
  --cyan: #27e8ff;
  --yellow: #ffe94d;
  --good: #3dff9a;
  --bad: #ff5d5d;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body {
  background: radial-gradient(1200px 700px at 50% -10%, #2a1054 0%, var(--bg) 60%) fixed;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); margin: 0; }
.center { text-align: center; }
h2 { margin: 0; font-size: 1.7rem; }
h3 { margin: 0; }
a { color: var(--cyan); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: rgba(13, 7, 22, 0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { all: unset; cursor: pointer; font-weight: 900; letter-spacing: -0.01em; font-size: 1.05rem; }
.brand span { color: var(--pink); }
.nav { display: flex; align-items: center; gap: 10px; }
.nav-group { display: flex; gap: 8px; align-items: center; }
.navlink { all: unset; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.navlink:hover { color: var(--ink); }
.navlink:focus-visible, .brand:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.user-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.user-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.linkish { all: unset; cursor: pointer; color: var(--cyan); font-weight: 700; }
.linkish:hover { text-decoration: underline; }
.nav .btn { white-space: nowrap; }
@media (max-width: 700px) { #nav-board { display: none; } .nav { gap: 6px; } .nav .btn.small { padding: 7px 12px; } }

/* ---------- layout ---------- */
#app { max-width: 960px; margin: 0 auto; padding: 20px 16px 48px; min-height: calc(100vh - 56px); display: flex; flex-direction: column; }
.screen { display: none; flex: 1; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.screen.active { display: flex; }

/* ---------- home ---------- */
.home { justify-content: flex-start; gap: 56px; }
.hero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 16px; }
.logo { margin: 0; line-height: 0; }
.logo-img { width: min(680px, 94vw); height: auto; display: block; }
.brand-logo { height: 30px; width: auto; display: block; }
@media (max-width: 480px) { .brand-logo { height: 24px; } }
.tagline { max-width: 36ch; font-size: 1.15rem; margin: 0; }
.online { font-weight: 700; color: var(--good); min-height: 1.2em; }
.fine { color: var(--muted); font-size: 0.78rem; max-width: 46ch; margin: 0; }
.block { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; width: 100%; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; text-align: left; }
.card p { color: var(--muted); margin: 6px 0 0; }
.card .num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--pink); color: #1a0630; font-weight: 900; margin-bottom: 8px; }
.streamers { background: linear-gradient(135deg, rgba(39, 232, 255, 0.08), rgba(255, 45, 149, 0.08)); border: 1px solid var(--line); border-radius: 20px; padding: 24px 18px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: left; max-width: 620px; }
.ticks li { padding-left: 28px; position: relative; color: var(--muted); }
.ticks li b { color: var(--ink); }
.ticks li::before { content: "\2713"; position: absolute; left: 0; color: var(--good); font-weight: 900; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 820px; }
.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 0.85rem; color: var(--muted); }
.chip.custom { border-color: var(--pink); color: var(--ink); }
.chip.hit { border-color: rgba(39, 232, 255, 0.45); color: var(--ink); }
.request-form { width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.request-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; width: 100%; }
@media (max-width: 480px) { .request-row { grid-template-columns: 1fr; } }
.request-row input { font: inherit; padding: 8px 12px; border-radius: 999px; border: 1px solid #3a2a5c; background: var(--panel); color: var(--ink); min-width: 0; }
.request-row input:focus { outline: 2px solid var(--cyan); border-color: transparent; }
.faq { align-items: stretch; max-width: 680px; margin: 0 auto; text-align: left; }
.faq h2 { text-align: center; }
.faq details { background: var(--panel); border-radius: 12px; padding: 12px 16px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { color: var(--muted); margin: 8px 0 0; }
.footer { color: var(--muted); font-size: 0.8rem; }

.wheel {
  width: 96px; height: 96px; border-radius: 50%;
  background: conic-gradient(var(--pink), var(--yellow), var(--cyan), #8a5cff, var(--pink));
  box-shadow: 0 0 40px rgba(39, 232, 255, 0.35);
  position: relative;
}
.wheel::after { content: ""; position: absolute; inset: 34px; border-radius: 50%; background: var(--bg); }
.wheel.spin { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- controls ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 800; text-decoration: none; display: inline-block;
  padding: 12px 22px; border-radius: 999px; color: #1a0630;
  background: linear-gradient(135deg, var(--yellow), var(--pink));
  box-shadow: 0 6px 24px rgba(255, 45, 149, 0.35);
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.big { font-size: 1.6rem; padding: 18px 54px; }
.btn.alt { background: linear-gradient(135deg, var(--cyan), #8a5cff); color: #07101f; box-shadow: 0 6px 24px rgba(39, 232, 255, 0.3); }
.btn.ghosty { background: transparent; color: var(--muted); box-shadow: none; border: 1px solid #3a2a5c; }
.btn.small { padding: 8px 16px; font-size: 0.85rem; }
.row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.toggles { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 40px; height: 22px; border-radius: 999px; background: #3a2a5c; position: relative; transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: transform 0.15s; }
.switch input:checked + span { background: var(--pink); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- lobby ---------- */
.preview { position: relative; width: min(320px, 80vw); aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--panel); display: grid; place-items: center; }
.preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.small-wheel { width: 64px; height: 64px; position: absolute; right: 10px; bottom: 10px; }
.small-wheel::after { inset: 22px; }
.meter { width: min(320px, 80vw); height: 12px; border-radius: 999px; background: var(--panel); overflow: hidden; }
#mic-level { height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--pink)); transition: width 0.06s linear; }
.note-readout { font-size: 1.3rem; font-weight: 800; color: var(--cyan); min-height: 1.7rem; margin: 0; }

/* ---------- battle ---------- */
.battle { justify-content: flex-start; gap: 10px; }
.arena { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) {
  .arena { gap: 6px; }
  .arena .tile { aspect-ratio: 3 / 4; }            /* phone front cameras are portrait */
  .arena .tile-label { font-size: 0.75rem; padding: 4px 8px; }
  .arena .tile-label b { font-size: 1.1rem; }
}
.tile { position: relative; aspect-ratio: 4 / 3; background: var(--panel); border-radius: 16px; overflow: hidden; border: 3px solid transparent; transition: border-color 0.2s, box-shadow 0.2s; }
.tile.active { border-color: var(--yellow); box-shadow: 0 0 28px rgba(255, 233, 77, 0.35); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile.me video { transform: scaleX(-1); }
.tile video.blurred { filter: blur(32px) saturate(0.6); }
.tile-ph { position: absolute; inset: 0; padding-bottom: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 3rem; background: var(--panel); }
.tile-ph small { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.tile-label { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: rgba(13, 7, 22, 0.7); font-weight: 800; font-size: 0.85rem; }
.tile-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-label b { font-size: 1.3rem; }
#tile-them .tile-label b { color: var(--pink); }
#tile-me .tile-label b { color: var(--cyan); }
.reveal { position: absolute; inset: 0; border: 0; cursor: pointer; background: rgba(13, 7, 22, 0.55); color: var(--ink); font: inherit; font-size: 0.85rem; }
.reveal b { color: var(--yellow); }

.stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.round-label { margin: 0; color: var(--muted); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.song-title { font-size: 1.4rem; font-weight: 900; margin: 0; }
.big-text { font-size: clamp(2rem, 9vw, 3.6rem); font-weight: 900; min-height: 1.2em; line-height: 1.1; color: var(--yellow); text-shadow: 0 0 22px rgba(255, 233, 77, 0.45); }
.big-text.toobad { color: var(--bad); text-shadow: 0 0 22px rgba(255, 93, 93, 0.5); animation: shake 0.4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px) rotate(-2deg); } 75% { transform: translateX(8px) rotate(2deg); } }
canvas#trace { width: 100%; max-width: 640px; height: auto; background: var(--panel); border-radius: 14px; }
.progress { width: 100%; max-width: 640px; height: 6px; background: var(--panel); border-radius: 999px; overflow: hidden; }
#progress-bar { height: 100%; width: 0; background: var(--pink); }
.turn-result { font-size: 1.2rem; font-weight: 800; min-height: 1.5rem; margin: 0; }
.turn-result.good { color: var(--good); }
.turn-result.meh { color: var(--yellow); }
.turn-result.bad { color: var(--bad); }
.battle-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* reactions */
.reactions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.react-btn { font-size: 1.5rem; line-height: 1; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); cursor: pointer; transition: transform 0.08s; }
.react-btn:hover { transform: scale(1.12); }
.react-btn:active { transform: scale(0.9); }
.react-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.float-emoji { position: absolute; bottom: 20%; font-size: 2.6rem; pointer-events: none; z-index: 3; animation: floatUp 1.7s ease-out forwards; }
.float-emoji.splat { font-size: 3.4rem; animation: splat 1.7s ease-out forwards; }
@keyframes floatUp { 0% { transform: translateY(0) scale(0.6); opacity: 0; } 15% { opacity: 1; transform: translateY(-10px) scale(1.15); } 100% { transform: translateY(-140px) scale(1); opacity: 0; } }
@keyframes splat { 0% { transform: translateY(-160px) scale(0.6) rotate(-30deg); opacity: 0; } 20% { transform: translateY(-30px) scale(1.5) rotate(10deg); opacity: 1; } 30% { transform: translateY(-30px) scale(1.2, 0.8); } 100% { transform: translateY(10px) scale(1.2, 0.8); opacity: 0; } }

/* tomato: flies in, then splats on the camera */
.toss { position: absolute; z-index: 4; font-size: 2.8rem; pointer-events: none; transform: translate(-50%, -50%); animation: toss 0.3s ease-in forwards; }
@keyframes toss { from { transform: translate(-50%, 160%) scale(0.5) rotate(-120deg); } to { transform: translate(-50%, -50%) scale(1.35) rotate(160deg); } }
.splat-mark { position: absolute; z-index: 3; width: 46%; pointer-events: none; transform: translate(-50%, -50%) scale(0.2);
  animation: splatHit 0.22s cubic-bezier(.2, 1.8, .4, 1) forwards, splatFade 0.7s ease-in 2.4s forwards; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.splat-mark svg { width: 100%; height: auto; display: block; overflow: visible; }
.splat-mark .drip { transform-box: fill-box; transform-origin: top; transform: scaleY(0.15); animation: drip 2.2s ease-in 0.25s forwards; }
@keyframes splatHit { to { transform: translate(-50%, -50%) scale(1); } }
@keyframes splatFade { to { opacity: 0; } }
@keyframes drip { to { transform: scaleY(1); } }

/* reaction effects on a camera tile */
.tile.fx-burn video:not(.blurred) { filter: sepia(0.8) saturate(3) hue-rotate(-25deg) brightness(1.15) contrast(1.3); }
.tile.fx-burn::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at 50% 115%, rgba(255, 120, 0, .85), rgba(255, 60, 0, .35) 45%, transparent 70%);
  box-shadow: inset 0 0 40px 10px rgba(60, 10, 0, .8); animation: burnGlow 0.25s ease-in-out infinite alternate; }
@keyframes burnGlow { from { opacity: .75; } to { opacity: 1; } }
.flame { position: absolute; bottom: -10%; z-index: 3; pointer-events: none; animation: flameUp 1.4s ease-in infinite; }
@keyframes flameUp { 0% { transform: translateY(0) scale(.8); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-160%) scale(1.3) rotate(8deg); opacity: 0; } }
.tile.fx-shake { animation: tileShake 0.12s linear 7; }
@keyframes tileShake { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-6px, 3px) rotate(-1.5deg); } 75% { transform: translate(6px, -3px) rotate(1.5deg); } }
.bounce-emoji { position: absolute; z-index: 3; font-size: 2.4rem; pointer-events: none; animation: bounceIn 1.4s cubic-bezier(.3, 1.8, .5, 1) both; }
@keyframes bounceIn { 0% { transform: scale(0) rotate(-30deg); } 30% { transform: scale(1.3) rotate(10deg); } 50% { transform: scale(1) rotate(-6deg) translateY(-8px); } 85% { opacity: 1; } 100% { transform: scale(1) translateY(-30px); opacity: 0; } }
.tile.fx-dead video:not(.blurred) { filter: grayscale(1) brightness(.45) contrast(1.4); }
.dead-mark { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; font-size: 5rem; pointer-events: none; animation: deadIn 2.2s ease both; }
.dead-text { position: absolute; left: 0; right: 0; bottom: 18%; z-index: 3; text-align: center; font-weight: 900; font-size: 2rem; letter-spacing: .3em; color: #fff;
  text-shadow: 0 0 12px #000; pointer-events: none; animation: deadIn 2.2s ease both; }
@keyframes deadIn { 0% { opacity: 0; transform: scale(1.8); } 15% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
.confetti { position: absolute; top: -8%; z-index: 3; width: 8px; height: 14px; border-radius: 2px; pointer-events: none; animation: confettiFall 1.8s ease-in both; }
@keyframes confettiFall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(900%) rotate(540deg); opacity: 0; } }
.tile.fx-goat { box-shadow: 0 0 0 4px #ffd34d, 0 0 40px 8px rgba(255, 200, 40, .8); border-color: #ffd34d; }
.tile.fx-goat video:not(.blurred) { filter: sepia(.4) saturate(1.6) brightness(1.15); }
.goat-text { position: absolute; left: 0; right: 0; top: 40%; z-index: 3; text-align: center; font-weight: 900; font-size: clamp(1.4rem, 5vw, 2.4rem); color: #ffd34d;
  text-shadow: 0 0 14px rgba(0, 0, 0, .8), 0 0 30px rgba(255, 190, 40, .9); pointer-events: none; animation: deadIn 2.4s ease both; }

/* first-time walkthrough */
.dialog.tut { text-align: center; align-items: center; width: min(440px, calc(100vw - 32px)); }
.tut-count { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .1em; }
.tut-emoji { font-size: 3.4rem; line-height: 1; }
.dialog.tut h2 { margin: 0; }
.tut-text { margin: 0; color: var(--muted); line-height: 1.5; min-height: 6.5em; }
.tut-text b { color: var(--ink); }
.tut-dots { display: flex; gap: 6px; }
.tut-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.tut-dots i.on { background: var(--cyan); }
.tut-skip { background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; }

/* your turn / rematch alerts */
.turn-banner { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; pointer-events: none; }
.turn-banner.hidden { display: none; }
.turn-banner .tb-inner { background: var(--yellow); color: #1a0630; font-weight: 900; text-align: center;
  font-size: clamp(1.8rem, 8vw, 3.6rem); line-height: 1; padding: 16px 32px; border-radius: 24px; transform: rotate(-3deg);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5); animation: tbIn 1.3s ease forwards; }
.turn-banner .tb-inner small { display: block; font-size: 0.32em; margin-top: 8px; letter-spacing: .05em; }
.turn-banner.them .tb-inner { background: var(--panel); color: var(--ink); border: 3px solid var(--pink); font-size: clamp(1.6rem, 7vw, 3.4rem); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
@keyframes tbIn { 0% { opacity: 0; transform: rotate(-3deg) scale(.3); } 14% { opacity: 1; transform: rotate(-3deg) scale(1.12); } 24% { transform: rotate(-3deg) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: rotate(-3deg) scale(.92); } }
/* your turn: one calm, steady highlight on your own camera (no full-screen flashing frame) */
body.my-turn #tile-me { outline: 4px solid var(--yellow); outline-offset: -4px; box-shadow: 0 0 28px rgba(255, 233, 77, .35); }
body.my-turn #reactions { visibility: hidden; }
.toast { position: fixed; top: 70px; left: 50%; z-index: 60; transform: translateX(-50%); max-width: calc(100vw - 32px);
  background: linear-gradient(135deg, var(--good), var(--cyan)); color: #04150c; font-weight: 900; font-size: 1.3rem; text-align: center;
  padding: 14px 24px; border-radius: 16px; box-shadow: 0 12px 40px rgba(61, 255, 154, .45); animation: toastIn 0.4s cubic-bezier(.2, 1.6, .4, 1); }
.toast.hidden { display: none; }
@keyframes toastIn { from { transform: translate(-50%, -40px) scale(.8); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
.btn.pulse { animation: btnPulse 0.9s ease-in-out infinite; }
@keyframes btnPulse { 50% { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(61, 255, 154, .35), 0 6px 30px rgba(255, 45, 149, .6); } }
.rematch-callout { font-size: 1.4rem; font-weight: 900; color: var(--good); animation: btnPulse 0.9s ease-in-out infinite; }

/* winner's highlight: movie-trailer overlay */
.cinema { position: fixed; inset: 0; z-index: 50; background: #000; overflow: hidden; display: grid; place-items: center; }
.cinema.hidden { display: none; }
.cine-stage { position: absolute; inset: 0; animation: cineZoom 12s ease-in-out forwards; }
.cine-video { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.15) saturate(1.25) sepia(0.15); }
.cine-video.mirror { transform: scaleX(-1); }
.cine-video.blurred { filter: blur(30px) contrast(1.15); }
.cine-emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30vmin; }
@keyframes cineZoom { from { transform: scale(1); } 60% { transform: scale(1.25) rotate(-1deg); } to { transform: scale(1.45) rotate(1deg); } }
.cinema.finale .cine-stage { filter: blur(6px) brightness(0.45); transition: filter 0.6s; }
.cine-bar { position: absolute; left: 0; right: 0; height: 11vh; background: #000; z-index: 2; }
.cine-bar.top { top: 0; } .cine-bar.bottom { bottom: 0; }
.cine-grain { position: absolute; inset: -50%; z-index: 1; pointer-events: none; opacity: 0.12;
  background-image: radial-gradient(rgba(255, 255, 255, .8) 1px, transparent 1px); background-size: 3px 3px; animation: grain 0.4s steps(3) infinite;
  box-shadow: inset 0 0 22vmin 10vmin rgba(0, 0, 0, .85); }
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-1%, 1%); } 66% { transform: translate(1%, -1%); } }
.cine-badge { position: absolute; top: calc(11vh + 12px); left: 16px; z-index: 3; color: #ff5d5d; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.2em; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cine-caption { position: absolute; left: 6%; right: 6%; bottom: calc(11vh + 6%); z-index: 3; margin: 0; text-align: center; color: #fff;
  font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.6rem, 5.5vw, 3.4rem); letter-spacing: 0.18em; font-weight: 700;
  text-shadow: 0 2px 4px #000, 0 0 14px #000, 0 0 32px rgba(0, 0, 0, .9); opacity: 0; }
.cine-caption.show { animation: caption 2s ease-out forwards; }
@keyframes caption { 0% { opacity: 0; transform: scale(1.12); letter-spacing: 0.4em; } 20% { opacity: 1; transform: scale(1); letter-spacing: 0.18em; } 85% { opacity: 1; } 100% { opacity: 0; } }
.cine-title { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 0 6%; }
.cine-title p { margin: 0; }
.cine-name { font-family: Georgia, serif; font-size: clamp(2.6rem, 11vw, 6.5rem); font-weight: 900; letter-spacing: 0.1em; color: #ffe94d;
  text-shadow: 0 0 30px rgba(255, 200, 50, .9), 0 0 80px rgba(255, 120, 40, .6); animation: titleSlam 0.6s cubic-bezier(.2, 1.4, .4, 1); }
.cine-sub { font-family: Georgia, serif; color: #fff; letter-spacing: 0.25em; font-size: clamp(0.9rem, 2.6vw, 1.4rem); }
.cine-tag { color: #a99bc7; font-style: italic; font-size: clamp(0.8rem, 2.2vw, 1.1rem); }
@keyframes titleSlam { from { transform: scale(2.2); opacity: 0; filter: blur(8px); } to { transform: scale(1); opacity: 1; filter: none; } }
.cine-skip { position: absolute; right: 16px; bottom: calc(11vh + 12px); z-index: 4; color: #fff; border-color: rgba(255, 255, 255, .4); }

/* roast + streak */
.roast { max-width: 520px; background: linear-gradient(135deg, rgba(255, 93, 93, 0.14), rgba(255, 233, 77, 0.08)); border: 1px solid rgba(255, 93, 93, 0.5); border-radius: 16px; padding: 14px 18px; }
.roast-title { margin: 0 0 6px; font-weight: 800; color: var(--bad); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; }
.roast-text { margin: 0; font-size: 1.3rem; font-weight: 800; line-height: 1.35; }
.roast.brag { background: linear-gradient(135deg, rgba(61, 255, 154, 0.14), rgba(39, 232, 255, 0.08)); border-color: rgba(61, 255, 154, 0.5); }
.roast.brag .roast-title { color: var(--good); }

/* podium: winner up on a bar stool, loser on the floor */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 18px; width: min(460px, 100%); min-height: 290px; }
.podium .champ, .podium .chump { display: flex; flex-direction: column; align-items: center; position: relative; }
.podium .face { border-radius: 50%; overflow: hidden; background: var(--panel); border: 4px solid var(--good); display: grid; place-items: center; }
.podium .champ .face { width: 150px; height: 150px; box-shadow: 0 0 30px rgba(61, 255, 154, 0.35); }
.podium .chump .face { width: 92px; height: 92px; border-color: var(--bad); filter: grayscale(0.85); transform: rotate(12deg); }
.podium .face video, .podium .face canvas { width: 100%; height: 100%; object-fit: cover; }
.podium .face canvas.blurred { filter: blur(18px); }
.podium .face video.mirror { transform: scaleX(-1); }
.podium .face video.blurred { filter: blur(18px); }
.podium .emoji-face { font-size: 4rem; line-height: 1; }
.podium .chump .emoji-face { font-size: 2.6rem; }
.podium .crown { font-size: 2.4rem; margin-bottom: -14px; z-index: 1; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-6deg); } }
.podium .who { margin: 6px 0 4px; font-weight: 800; font-size: 0.9rem; }
.podium .chump .who { color: var(--muted); }
.stool { display: flex; flex-direction: column; align-items: center; }
.stool .seat { width: 150px; height: 16px; border-radius: 10px; background: linear-gradient(90deg, #8a5cff, #ff2d95); }
.stool .legs { position: relative; width: 124px; height: 82px; background: linear-gradient(#5b3aa8, #5b3aa8) center 60% / 84px 6px no-repeat; }   /* the rung */
.stool .legs::before, .stool .legs::after { content: ""; position: absolute; top: 0; width: 8px; height: 86px; background: #5b3aa8; border-radius: 3px; transform-origin: top center; }
.stool .legs::before { left: 16px; transform: rotate(9deg); }
.stool .legs::after { right: 16px; transform: rotate(-9deg); }
.podium.tie .stool, .podium.tie .crown { display: none; }
.podium.tie { align-items: center; min-height: 0; }
.podium.tie .chump .face { width: 150px; height: 150px; border-color: var(--yellow); filter: none; transform: none; }
.podium.tie .champ .face { border-color: var(--yellow); }

/* streamer rooms */
.room-box { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.room-box > div { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.room-join { display: flex; gap: 8px; width: 100%; }
.room-join input { flex: 1; min-width: 0; font: inherit; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; text-align: center; padding: 8px 12px; border-radius: 999px; border: 1px solid #3a2a5c; background: var(--bg); color: var(--ink); }
.room-join input:focus { outline: 2px solid var(--cyan); border-color: transparent; }
.room-label { margin: 0; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.room-code { margin: 0; font-size: 2.6rem; font-weight: 900; letter-spacing: 0.25em; color: var(--yellow); }
.footer { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.streak { margin: 0; font-weight: 900; color: var(--yellow); font-size: 1.2rem; min-height: 0; }
.streak:empty { display: none; }

/* ---------- result ---------- */
.stamp { font-size: clamp(2.2rem, 10vw, 4.6rem); max-width: 92%; font-weight: 900; letter-spacing: 0.02em; transform: rotate(-6deg); padding: 6px 22px; border: 6px solid currentColor; border-radius: 14px; animation: slam 0.35s cubic-bezier(.2, 1.6, .4, 1); }
.stamp.win { color: var(--good); }
.stamp.lose { color: var(--bad); text-shadow: 0 0 30px rgba(255, 120, 40, 0.8); }
.stamp.tie { color: var(--yellow); }
@keyframes slam { from { transform: rotate(-6deg) scale(2.4); opacity: 0; } to { transform: rotate(-6deg) scale(1); opacity: 1; } }
.result-table, .board { border-collapse: collapse; width: min(560px, 100%); }
.result-table th, .result-table td, .board th, .board td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; }
.result-table th, .board th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.result-table td:first-child, .result-table th:first-child, .board td:first-child, .board th:first-child,
.board td.name, .board th.name { text-align: left; }
.result-table small, .board small { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 400; }
.result-table tr.total td { font-weight: 900; font-size: 1.15rem; border-bottom: 0; }
.board .rank { color: var(--muted); width: 2.5em; }
.board tr.me td { color: var(--yellow); }
.outcome-win { color: var(--good); font-weight: 800; }
.outcome-loss { color: var(--bad); font-weight: 800; }
.outcome-tie { color: var(--yellow); font-weight: 800; }

/* ---------- game mode picker ---------- */
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(520px, 100%); }
.mode { border: 2px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 16px; padding: 12px; font: inherit; font-weight: 900;
  font-size: 1.05rem; cursor: pointer; transition: border-color .15s, transform .08s, box-shadow .15s; }
.mode small { display: block; font-weight: 500; font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.mode:hover { border-color: #5b3aa8; }
.mode:active { transform: scale(0.98); }
.mode:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.mode.active[data-mode="classic"] { border-color: var(--cyan); box-shadow: 0 0 24px rgba(39, 232, 255, .35); }
.mode.active[data-mode="worst"] { border-color: var(--pink); box-shadow: 0 0 24px rgba(255, 45, 149, .45); }
.btn.big.scream { background: linear-gradient(135deg, #ff5d5d, var(--pink)); animation: screamShake 2.6s ease-in-out infinite; }
@keyframes screamShake { 0%, 88%, 100% { transform: rotate(0); } 90% { transform: rotate(-2deg) scale(1.03); } 93% { transform: rotate(2deg) scale(1.03); } 96% { transform: rotate(-1deg); } }
.mode-badge { display: inline-block; background: var(--pink); color: #1a0630; font-weight: 900; font-size: 0.72rem; letter-spacing: .08em; padding: 3px 10px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .btn.big.scream { animation: none; } }

/* ---------- settings ---------- */
.settings { justify-content: flex-start; }
.settings-group { width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.toggles-col { flex-direction: column; align-items: flex-start; gap: 12px; }
.toggles-col small { font-weight: 400; }
.genre-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.genre-list .switch { background: var(--bg); border-radius: 12px; padding: 10px 12px; color: var(--ink); }
.genre-list .switch small { display: block; color: var(--muted); font-weight: 400; font-size: 0.78rem; }
@media (max-width: 480px) { .nav-label { display: none; } }

/* ---------- profile ---------- */
.profile { justify-content: flex-start; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; width: min(640px, 100%); }
.stat { background: var(--panel); border-radius: 14px; padding: 12px; }
.stat b { display: block; font-size: 1.6rem; }
.stat span { color: var(--muted); font-size: 0.8rem; }

/* ---------- dialogs ---------- */
.dialog { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--ink); padding: 22px; width: min(400px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(5, 2, 10, 0.7); backdrop-filter: blur(3px); }
.dialog form, .dialog { display: flex; flex-direction: column; gap: 12px; }
.dialog:not([open]) { display: none; }
.dialog label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.9rem; text-align: left; }
.dialog input { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid #3a2a5c; background: var(--bg); color: var(--ink); }
.dialog input:focus { outline: 2px solid var(--cyan); border-color: transparent; }
.tabs { display: flex; gap: 6px; background: var(--bg); border-radius: 999px; padding: 4px; }
.tab { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; padding: 8px; border-radius: 999px; cursor: pointer; }
.tab.active { background: var(--panel-2); color: var(--ink); }
.small-print { font-size: 0.8rem; }
.error { color: var(--bad); margin: 0; min-height: 1.2em; font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
  .wheel.spin, .stamp, .big-text.toobad { animation: none; }
  .float-emoji, .float-emoji.splat { animation-duration: 0.01s; }
  .podium .crown { animation: none; }
  .toss { animation-duration: 0.01s; }
  .splat-mark { animation: splatFade 0.7s ease-in 2.4s forwards; transform: translate(-50%, -50%); }
  .splat-mark .drip { animation: none; transform: none; }
  .cine-stage, .cine-grain, .cine-badge { animation: none; }
  .tile.fx-shake, .flame, .bounce-emoji, .confetti, .btn.pulse, .rematch-callout, .tile.fx-burn::after { animation: none; }
  .turn-banner .tb-inner { animation: none; }
}

/* account email / reset */
.ok-note { color: var(--good); margin: 0; min-height: 1.2em; font-size: .9rem; }
.dialog .linkish { align-self: center; }

/* ======================= cosmetics: names, badges, frames, stools ======================= */
.pname { font-weight: 800; }
.nc-cyan { color: var(--cyan); }
.nc-pink { color: var(--pink); }
.nc-lime { color: #9dff3d; }
.nc-orange { color: #ff9a3d; }
.nc-purple { color: #b18cff; }
.nc-gold { color: #ffd34d; text-shadow: 0 0 10px rgba(255, 211, 77, .45); }
.nc-tomato { color: #ff4b3e; }
.nc-fire, .nc-ice, .nc-brand, .nc-aurora, .nc-sunset, .nc-ocean, .nc-galaxy, .nc-rainbow, .nc-glitch, .nc-staff {
  background-clip: text; -webkit-background-clip: text; color: transparent; -webkit-text-fill-color: transparent; background-size: 200% 100%; }
.nc-fire { background-image: linear-gradient(90deg, #ffe94d, #ff7a1a, #ff2d2d, #ff7a1a, #ffe94d); animation: ncSlide 2.4s linear infinite; }
.nc-ice { background-image: linear-gradient(90deg, #e8fbff, #7fe3ff, #3fa8ff, #7fe3ff, #e8fbff); animation: ncSlide 3s linear infinite; }
.nc-brand { background-image: linear-gradient(90deg, var(--cyan), var(--yellow), var(--pink), var(--cyan)); animation: ncSlide 3s linear infinite; }
.nc-aurora { background-image: linear-gradient(90deg, #3dff9a, #27e8ff, #8a5cff, #ff2d95, #3dff9a); animation: ncSlide 4s linear infinite; }
.nc-sunset { background-image: linear-gradient(90deg, #ffe94d, #ff8a3d, #ff2d95); }
.nc-ocean { background-image: linear-gradient(90deg, #27e8ff, #2d6bff, #3dffd0); }
.nc-galaxy { background-image: linear-gradient(90deg, #8a5cff, #ff6bd6, #6ad7ff, #8a5cff); animation: ncSlide 5s linear infinite; }
.nc-rainbow { background-image: linear-gradient(90deg, #ff3d3d, #ffb13d, #ffe94d, #3dff9a, #27e8ff, #8a5cff, #ff3d3d); animation: ncSlide 2s linear infinite; }
.nc-glitch { display: inline-block; background-image: linear-gradient(90deg, #fff, #27e8ff, #fff, #ff2d95, #fff); animation: ncSlide 1.2s steps(6) infinite, glitch 2.6s steps(1) infinite; }
.nc-staff { background-image: linear-gradient(90deg, #ffd34d, #ff3d3d, #ffd34d, #fff6c4, #ffd34d); animation: ncSlide 2.2s linear infinite; }
@keyframes ncSlide { to { background-position: -200% 0; } }
@keyframes glitch { 0%, 92% { transform: none; } 94% { transform: translate(1px, -1px) skewX(8deg); } 97% { transform: translate(-1px, 1px); } }

.pbadge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: .72em; font-weight: 800;
  vertical-align: middle; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); white-space: nowrap; }
.pbadge i { font-style: normal; }
.pbadge.r-rare { border-color: #4da3ff; }
.pbadge.r-epic { border-color: #b16bff; }
.pbadge.r-legendary { border-color: #ffd34d; }
.pbadge.r-staff { background: linear-gradient(90deg, #ff3d3d, #ffb13d); color: #1a0630; border-color: transparent; }
.tile-label .pbadge i, .board .pbadge i { display: none; }        /* tight spots: just the emoji */
.board .pbadge { padding: 1px 5px; }

/* camera frames (match tiles + previews) */
.tile.fr-bronze { border-color: #c27a3f; box-shadow: 0 0 0 2px #6b3d17 inset; }
.tile.fr-silver { border-color: #d6dde8; box-shadow: 0 0 14px rgba(214, 221, 232, .35); }
.tile.fr-gold { border-color: #ffd34d; box-shadow: 0 0 22px rgba(255, 211, 77, .45); }
.tile.fr-diamond { border-color: #bff4ff; box-shadow: 0 0 0 2px #7fe3ff inset, 0 0 26px rgba(127, 227, 255, .6); }
.tile.fr-neon { border-color: var(--pink); box-shadow: 0 0 18px var(--pink), 0 0 2px var(--pink) inset; }
.tile.fr-doodle { border: 4px dashed #ffe94d; }
.tile.fr-bubble { border: 6px solid #ff8fd0; border-radius: 28px; }
.tile.fr-tape { border: 8px solid transparent; border-image: repeating-linear-gradient(45deg, #ffd400 0 12px, #111 12px 24px) 8; }
.tile.fr-fire { border-color: #ff6a1a; animation: frFire 0.9s ease-in-out infinite alternate; }
@keyframes frFire { from { box-shadow: 0 0 14px #ff3d1a, 0 -4px 22px #ffb13d; } to { box-shadow: 0 0 26px #ff6a1a, 0 -8px 34px #ffe94d; } }
.tile.fr-ice { border-color: #b8f1ff; box-shadow: 0 0 0 3px rgba(184, 241, 255, .5) inset, 0 0 22px rgba(63, 168, 255, .5); }
.tile.fr-rainbow, .tile.fr-disco, .tile.fr-glitch, .tile.fr-staff { border-color: transparent; }
.tile.fr-rainbow::before, .tile.fr-disco::before, .tile.fr-glitch::before, .tile.fr-staff::before {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: inherit; padding: 4px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.tile.fr-rainbow::before { background: conic-gradient(#ff3d3d, #ffb13d, #ffe94d, #3dff9a, #27e8ff, #8a5cff, #ff3d3d); animation: hueSpin 3s linear infinite; }
.tile.fr-disco::before { background: repeating-conic-gradient(#fff 0 10deg, #8a5cff 10deg 20deg, #27e8ff 20deg 30deg, #ff2d95 30deg 40deg); animation: hueSpin 1.2s linear infinite; }
.tile.fr-glitch::before { background: linear-gradient(90deg, #27e8ff, #fff, #ff2d95); animation: glitchFrame 1.8s steps(1) infinite; }
.tile.fr-staff::before { background: linear-gradient(90deg, #ffd34d, #ff3d3d, #ffd34d); animation: hueSpin 4s linear infinite; }
.tile.fr-staff { box-shadow: 0 0 26px rgba(255, 90, 60, .55); }
@keyframes hueSpin { to { filter: hue-rotate(360deg); } }
@keyframes glitchFrame { 0% { transform: none; } 33% { transform: translate(2px, -1px); } 66% { transform: translate(-2px, 1px); } }

/* winner stools */
.stool.st-wood .seat { background: linear-gradient(#b5793f, #8a5326); }
.stool.st-wood .legs { background: linear-gradient(#7a4a22, #7a4a22) center 60% / 84px 6px no-repeat; }
.stool.st-wood .legs::before, .stool.st-wood .legs::after { background: #7a4a22; }
.stool.st-neon .seat { background: var(--cyan); box-shadow: 0 0 16px var(--cyan), 0 0 30px var(--pink); }
.stool.st-neon .legs::before, .stool.st-neon .legs::after { background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.stool.st-throne .seat, .stool.st-staff .seat { height: 22px; background: linear-gradient(90deg, #ffd34d, #fff1a8, #ffd34d); box-shadow: 0 0 20px rgba(255, 211, 77, .7); }
.stool.st-throne .legs { background: linear-gradient(#d9a520, #d9a520) center 60% / 84px 6px no-repeat; }
.stool.st-throne .legs::before, .stool.st-throne .legs::after { background: #d9a520; }
.stool.st-staff .seat { background: linear-gradient(90deg, #ff3d3d, #ffd34d, #ff3d3d); }
.stool.st-staff .legs::before, .stool.st-staff .legs::after { background: #ff3d3d; box-shadow: 0 0 10px #ff3d3d; }
.stool.st-emoji { justify-content: flex-start; }
.stool-emoji { font-size: 5.2rem; line-height: 1; margin-top: -6px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5)); }

/* ======================= reaction effects (new) ======================= */
.rain-emoji { position: absolute; top: -12%; z-index: 3; pointer-events: none; animation: rainFall 2.2s ease-in both; }
@keyframes rainFall { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(900%) rotate(200deg); opacity: 0; } }
.big-mark { font-size: 5.5rem; }
.fx-word { top: 66%; color: #fff; text-shadow: 0 3px 0 #1a0630, 0 0 18px rgba(0, 0, 0, .7); }
.tp-strip { position: absolute; top: -110%; z-index: 3; width: 16px; height: 130%; pointer-events: none; border-radius: 3px;
  background: repeating-linear-gradient(#fff 0 22px, #e9e9e9 22px 24px); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); animation: tpFall 0.9s ease-out forwards; }
@keyframes tpFall { to { top: -8%; } }
.tile.fx-sleep video:not(.blurred), .tile.fx-sleep .tile-ph { filter: brightness(.5) saturate(.4); }
.tile.fx-siren { animation: sirenFlash 0.4s steps(1) 6; }
@keyframes sirenFlash { 0% { box-shadow: 0 0 0 6px #ff2d2d inset, 0 0 30px #ff2d2d; } 50% { box-shadow: 0 0 0 6px #2d6bff inset, 0 0 30px #2d6bff; } }
.tile.fx-beam::after { content: ""; position: absolute; inset: 0 25%; z-index: 2; pointer-events: none;
  background: linear-gradient(rgba(157, 255, 61, .55), rgba(157, 255, 61, 0)); animation: beam 2.2s ease both; }
@keyframes beam { 0% { opacity: 0; } 20%, 80% { opacity: 1; } 100% { opacity: 0; } }
.tile.fx-beam video:not(.blurred), .tile.fx-beam .tile-ph { animation: abduct 2.2s ease both; }
@keyframes abduct { 40%, 70% { transform: translateY(-14%) scale(.9) rotate(-4deg); } }
.tile.fx-zap video:not(.blurred), .tile.fx-zap .tile-ph { animation: zapFlash 0.15s steps(1) 6; }
@keyframes zapFlash { 0% { filter: brightness(3) contrast(2); } 50% { filter: invert(1); } }
.tile.fx-ice video:not(.blurred), .tile.fx-ice .tile-ph { filter: hue-rotate(170deg) saturate(.6) brightness(1.2); }
.tile.fx-ice::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border: 10px solid rgba(220, 248, 255, .75);
  background: radial-gradient(transparent 55%, rgba(200, 240, 255, .55)); }
.tile.fx-rainbow video:not(.blurred), .tile.fx-rainbow .tile-ph { animation: rainbowCam 1s linear 2; }
@keyframes rainbowCam { from { filter: hue-rotate(0) saturate(2.5); } to { filter: hue-rotate(360deg) saturate(2.5); } }
.tile.fx-melt video:not(.blurred), .tile.fx-melt .tile-ph { transform-origin: bottom; animation: melt 2.2s ease both; }
@keyframes melt { 50%, 75% { transform: scaleY(.55) skewX(8deg); filter: blur(1px); } }
.tile.fx-disco video:not(.blurred), .tile.fx-disco .tile-ph { animation: rainbowCam .4s linear 6; }
.tile.fx-disco::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle at 30% 30%, rgba(255, 45, 149, .5), transparent 30%), radial-gradient(circle at 70% 60%, rgba(39, 232, 255, .5), transparent 30%);
  animation: hueSpin .5s linear infinite; }
.tile.fx-goat .tile-ph { filter: sepia(.4) saturate(1.6) brightness(1.15); }

/* ======================= staff troll tools ======================= */
.troll-bar { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; padding: 8px; border-radius: 14px;
  border: 1px dashed #ff3d3d; background: rgba(255, 61, 61, .08); }
.troll-title { font-weight: 900; color: #ff8a7a; margin-right: 4px; }
.troll-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; padding: 6px 8px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 1.2rem; cursor: pointer; }
.troll-btn small { font-size: .6rem; color: var(--muted); }
.troll-btn:hover { border-color: #ff3d3d; }
body.troll-flip #app { transform: rotate(180deg); transition: transform .5s; }
body.troll-disco #app { animation: rainbowCam 1s linear infinite; }
.tile.troll-spin { animation: spin360 .6s linear 3; }
@keyframes spin360 { to { transform: rotate(360deg); } }
.tile.troll-shrink { transform: scale(.35); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.troll-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; align-content: center; gap: 4px; pointer-events: none;
  background: rgba(5, 2, 10, .55); animation: toastIn .25s ease; }
.troll-overlay span { font-size: 9rem; line-height: 1; }
.troll-overlay b { font-size: clamp(2.4rem, 12vw, 6rem); font-weight: 900; color: #ff3d3d; text-shadow: 0 4px 0 #1a0630; transform: rotate(-6deg); }

/* ======================= shop / library ======================= */
.navlink.has-dot { position: relative; }
.navlink.has-dot::after { content: ""; position: absolute; top: 4px; right: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.coin-chip { border: 1px solid var(--line); background: var(--panel); color: #ffd34d; font: inherit; font-weight: 800; font-size: .85rem;
  padding: 5px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.coin-chip span { color: #7fe3ff; margin-left: 4px; }
@media (max-width: 480px) { .coin-chip span { display: none; } }
.shop, .library { max-width: 1000px; margin: 0 auto; justify-content: flex-start; gap: 14px; }
.shop-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; flex-wrap: wrap; }
.wallet { display: flex; gap: 10px; font-weight: 900; font-size: 1.15rem; }
.wallet span { background: var(--panel); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; }
.guest-card, .daily-card { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-align: left; }
.guest-card { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.guest-card p { margin: 0; }
.daily-card { display: flex; gap: 12px; align-items: center; border-color: rgba(61, 255, 154, .4); }
.daily-card > div { flex: 1; display: flex; flex-direction: column; }
.daily-card small { color: var(--muted); }
.shop-layout { width: 100%; display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.shop-stage-wrap { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 6px; }
.shop-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (max-width: 760px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-stage-wrap { position: sticky; top: 56px; z-index: 6; width: 180px; margin: 0 auto; }
}
.shop-tabs, .lib-types, #lib-tabs { flex-wrap: wrap; border-radius: 16px; }
.shop-tabs .tab, .lib-types .tab { flex: 1 1 auto; font-size: .85rem; }
.preview-tile { width: 100%; aspect-ratio: 4 / 3; }
.preview-tile .tile-ph { font-size: 3.4rem; }
.preview-podium { position: absolute; right: 8px; top: 8px; z-index: 4; display: flex; flex-direction: column; align-items: center; transform: scale(.42); transform-origin: top right; }
.crown-mini { font-size: 2.4rem; margin-bottom: -10px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; width: 100%; }
.item-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 14px; text-align: center;
  background: var(--panel); border: 1px solid var(--line); }
.item-card.r-rare { border-color: rgba(77, 163, 255, .55); }
.item-card.r-epic { border-color: rgba(177, 107, 255, .65); }
.item-card.r-legendary { border-color: rgba(255, 211, 77, .7); box-shadow: 0 0 18px rgba(255, 211, 77, .12); }
.item-card.r-staff { border-color: #ff3d3d; }
.item-card.locked .item-art { filter: grayscale(.7) brightness(.7); }
.item-card.on { outline: 2px solid var(--good); }
.item-art { width: 100%; height: 84px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--bg); color: var(--ink); cursor: pointer; overflow: hidden; font: inherit; }
.item-art:disabled { cursor: default; }
.art-emoji { font-size: 2.6rem; line-height: 1; }
.art-name { font-size: 1.2rem; }
.art-frame { display: block; width: 74px; height: 56px; aspect-ratio: auto; background: var(--panel); }
.art-stool { transform: scale(.45); transform-origin: center; }
.art-stool .stool-emoji { font-size: 4.6rem; }
.item-name { font-size: .9rem; }
.rarity { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rarity.r-rare { color: #6bb5ff; }
.rarity.r-epic { color: #c08cff; }
.rarity.r-legendary { color: #ffd34d; }
.rarity.r-staff { color: #ff6b5b; }
.item-card .how { color: var(--muted); font-size: .72rem; line-height: 1.3; }
.btn.gem { background: linear-gradient(135deg, #27e8ff, #8a5cff); color: #08021a; }
.gem-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; width: 100%; }
.gem-pack { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid rgba(39, 232, 255, .35); }
.gem-pack small { color: var(--good); font-weight: 800; }
.small-print { font-size: .8rem; }

.look-top { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 16px; align-items: start; width: 100%; margin-top: 12px; }
@media (max-width: 640px) { .look-top { grid-template-columns: 1fr; } }
.look-side { text-align: left; }
.rx-slots { display: flex; gap: 8px; flex-wrap: wrap; }
.rx-slot { width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel); font-size: 1.8rem; cursor: pointer; color: var(--ink); }
.rx-slot.empty { border-style: dashed; color: var(--muted); font-size: 1.3rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; width: 100%; margin-top: 14px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; min-height: 120px; justify-content: center; }
.slot small { color: var(--muted); text-transform: uppercase; font-size: .68rem; letter-spacing: .06em; font-weight: 800; }
.slot .art-stool { height: 60px; }
.lib-mini { max-width: 220px; margin: 6px auto; }
#lib-items h3 { margin: 16px 0 8px; text-align: left; }
.ach-sum { margin: 12px 0; }
.ach-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; text-align: left; }
.ach { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.ach.done { border-color: rgba(61, 255, 154, .45); }
.ach.done.secret { border-color: rgba(177, 107, 255, .7); }
.ach.locked { opacity: .75; }
.ach .ach-icon { font-size: 1.6rem; text-align: center; }
.ach small { display: block; color: var(--muted); }
.ach-reward { font-size: .78rem; color: #ffd34d; text-align: right; max-width: 220px; }
@media (max-width: 560px) { .ach { grid-template-columns: 34px 1fr; } .ach-reward { grid-column: 2; text-align: left; } }
.ach-bar { display: block; height: 6px; margin-top: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; max-width: 260px; }
.ach-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--good)); }

/* unlock toasts */
.ach-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 32px)); }
.ach-toast { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: #241540; border: 1px solid #ffd34d;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: achIn .45s cubic-bezier(.2, 1.6, .4, 1); transition: opacity .5s, transform .5s; }
.ach-toast.secret { border-color: #b16bff; box-shadow: 0 0 24px rgba(177, 107, 255, .45); }
.ach-toast.out { opacity: 0; transform: translateX(30px); }
.ach-toast .ach-icon { font-size: 1.8rem; }
.ach-toast small { display: block; color: var(--muted); font-size: .8rem; }
@keyframes achIn { from { opacity: 0; transform: translateX(60px) scale(.9); } }

/* streamer room scoreboard */
.room-board { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); text-align: left; }
.room-board h3 { margin: 0 0 4px; font-size: 1rem; }
.room-rows { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.room-rows li span { float: right; color: var(--muted); font-size: .8rem; }

@media (prefers-reduced-motion: reduce) {
  .nc-fire, .nc-ice, .nc-brand, .nc-aurora, .nc-galaxy, .nc-rainbow, .nc-glitch, .nc-staff, .tile.fr-fire,
  .tile.fr-rainbow::before, .tile.fr-disco::before, .tile.fr-glitch::before, .tile.fr-staff::before, body.troll-disco #app { animation: none; }
  .rain-emoji { animation-duration: 0.01s; }
}
.preview-tile .big-mark { font-size: 3rem; }
.preview-tile .fx-word { font-size: 1.1rem; }
.preview-tile .rain-emoji, .preview-tile .float-emoji, .preview-tile .bounce-emoji { font-size: 1.3rem !important; }
.preview-tile .goat-text { font-size: 1.1rem; }
