/* =========================================================
   RUFUS TRIVIA - styles
   Look & feel: deep-space nebula + synthwave grid + glass cards
   (like The Prompt Journey), in Rufus's fox orange.
   ========================================================= */
:root {
  --bg: #070816;
  --ink: #fff7ec;
  --ink-2: #e9e3ff;
  --muted: #b3acd6;
  --line: rgba(255, 255, 255, .13);
  --glass: rgba(30, 22, 70, .55);
  --glass-2: rgba(14, 10, 38, .82);
  --a: #ff8a1f;          /* accent: changes per screen / topic / mood */
  --a-rgb: 255, 138, 31;
  --fox: #D2691E;
  --fox-light: #F4A460;
  --gold: #ffd23f;
  --good: #3ddc97;
  --good-rgb: 61, 220, 151;
  --bad: #ff4d6d;
  --display: "Lilita One", "Arial Black", Impact, sans-serif;
  --body: "Nunito", "Trebuchet MS", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 26px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-weight: 700;
  overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
a { color: var(--a); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- background layers ---------- */
.sky {
  position: fixed; inset: 0; z-index: 0; transition: background 1.2s ease;
  background:
    radial-gradient(70% 55% at 80% 12%, rgba(var(--a-rgb), .24), transparent 60%),
    radial-gradient(55% 45% at 8% 6%, rgba(139, 92, 246, .28), transparent 60%),
    radial-gradient(60% 50% at 30% 70%, rgba(56, 189, 248, .10), transparent 60%),
    radial-gradient(120% 90% at 50% 120%, rgba(var(--a-rgb), .16), transparent 60%),
    linear-gradient(180deg, #0d0a26 0%, #080720 55%, #05040f 100%);
}
.layer { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 1; }
#particles { z-index: 2; }
.layer.top { z-index: 60; }
.vignette { position: fixed; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 0 220px 30px rgba(0, 0, 0, .7); transition: box-shadow .25s; }
.vignette.hurt { box-shadow: inset 0 0 260px 60px rgba(255, 30, 70, .55); }
.vignette.glow { box-shadow: inset 0 0 260px 50px rgba(var(--good-rgb), .35); }

/* floating flags behind the home screen */
.parade { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; transition: opacity .8s; }
.parade.off { opacity: 0; visibility: hidden; transition: opacity .8s, visibility 0s linear .8s; }
.parade.off img, .parade.off .pe { animation-play-state: paused; }
.parade img {
  position: absolute; width: var(--w); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; opacity: var(--o);
  filter: blur(var(--b)) saturate(1.1); box-shadow: 0 10px 30px -10px #000;
  animation: drift var(--t) linear infinite; animation-delay: var(--dl);
}
@keyframes drift {
  from { transform: translate3d(0, 110vh, 0) rotate(var(--r1)); }
  to   { transform: translate3d(var(--dx), -30vh, 0) rotate(var(--r2)); }
}

/* ---------- app shell ---------- */
.app { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px clamp(14px, 3vw, 28px); padding-top: max(14px, env(safe-area-inset-top)); }
.spacer { flex: 1; }
.brand {
  display: flex; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; padding: 6px 4px;
  font-family: var(--mono); font-size: 13px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--ink);
}
.brand b { color: var(--a); margin-left: 2px; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--a); box-shadow: 0 0 14px 3px var(--a); animation: pulseDot 2s infinite; }
@keyframes pulseDot { 50% { opacity: .35; } }
.icon-btn {
  width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line); background: var(--glass);
  backdrop-filter: blur(10px); cursor: pointer; font-size: 17px; display: grid; place-items: center; transition: transform .15s, border-color .2s;
}
.icon-btn:hover { border-color: var(--a); transform: translateY(-2px); }
.icon-btn[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.music-wrap { position: relative; }
.music-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 90; width: 250px; padding: 8px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(36, 26, 82, .97), rgba(16, 12, 42, .98)); border: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px #000; animation: rise .25s cubic-bezier(.2, .7, .2, 1) both;
}
.music-menu p { margin: 4px 8px 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.music-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; font-weight: 800; font-size: 15px; text-align: left; }
.music-menu button:hover { background: rgba(255, 255, 255, .07); }
.music-menu button[aria-checked="true"] { background: rgba(var(--a-rgb), .2); color: #fff; }
.music-menu button[aria-checked="true"]::after { content: "✓"; margin-left: auto; color: var(--a); }
.music-menu .e { font-size: 20px; width: 26px; text-align: center; }
.music-menu small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 13px; text-decoration: none;
  font-size: 13.5px; color: #fff; background: linear-gradient(180deg, #ff3b3b, #c4001d); box-shadow: 0 4px 0 #7d0012, 0 10px 24px -10px #ff2a2a;
}
.pill svg { width: 20px; height: 20px; }
.me-chip {
  display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 16px 0 6px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(var(--a-rgb), .55); background: var(--glass); backdrop-filter: blur(10px); transition: transform .15s;
}
.me-chip:hover { transform: translateY(-2px); }
.me-chip .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 21px; background: var(--pc, var(--a)); box-shadow: 0 0 16px -3px var(--pc, var(--a)); }
.me-chip .nm { font-size: 15px; font-weight: 800; white-space: nowrap; }
@media (max-width: 720px) { .pill span, .me-chip .nm { display: none; } .me-chip { padding: 0 5px; } .brand { font-size: 11px; letter-spacing: .16em; } }

.screens { flex: 1; min-height: 0; position: relative; }
.screen {
  position: absolute; inset: 0; display: none; flex-direction: column; overflow-y: auto; overflow-x: hidden;
  padding: 4px clamp(14px, 3.4vw, 48px) 26px; scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.on { display: flex; }
.screen .anim { opacity: 0; transform: translateY(18px); }
.screen.on .anim { animation: rise .7s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 70ms + 40ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- shared bits ---------- */
.eyebrow { font-family: var(--mono); text-transform: uppercase; letter-spacing: .26em; font-size: 12px; color: var(--a); margin: 0 0 8px; font-weight: 800; }
.h { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4vw, 44px); line-height: 1; margin: 0 0 14px; letter-spacing: .01em; text-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 0 40px rgba(var(--a-rgb), .35); }
.sub { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.fine { color: var(--muted); font-size: 13px; margin: 14px 0 0; text-align: center; font-weight: 600; }
.panel {
  position: relative; width: 100%; max-width: 760px; margin: 2vh auto auto; padding: clamp(18px, 3vw, 34px);
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--glass), var(--glass-2)); backdrop-filter: blur(14px);
  box-shadow: 0 40px 90px -50px #000, inset 0 0 70px -36px rgba(var(--a-rgb), .55);
}
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.row-center { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.waiting { margin: 0; color: var(--muted); font-size: 15px; animation: pulseDot 1.8s infinite; }

/* chunky 3D buttons */
.btn {
  --c: rgba(255, 255, 255, .08); --c2: rgba(255, 255, 255, .02); --edge: rgba(0, 0, 0, .45);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 16px; border: 1px solid var(--line); cursor: pointer;
  font-size: 17px; font-weight: 900; color: #fff; text-decoration: none;
  background: linear-gradient(180deg, var(--c), var(--c2)); box-shadow: 0 5px 0 var(--edge), 0 16px 30px -18px #000;
  transition: transform .12s ease, box-shadow .12s ease, filter .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge), 0 6px 14px -10px #000; }
.btn:disabled { opacity: .45; cursor: default; transform: none; filter: grayscale(.4); }
.btn.primary { --c: #ffa53c; --c2: #ff7a00; --edge: #9c4300; border-color: transparent; text-shadow: 0 2px 0 rgba(120, 50, 0, .5); box-shadow: 0 5px 0 var(--edge), 0 18px 34px -14px rgba(255, 122, 0, .8); }
.btn.blue { --c: #4cc9ff; --c2: #1f8fff; --edge: #0b4fa8; border-color: transparent; text-shadow: 0 2px 0 rgba(0, 40, 120, .45); box-shadow: 0 5px 0 var(--edge), 0 18px 34px -14px rgba(31, 143, 255, .8); }
.btn.ghost { backdrop-filter: blur(8px); }
.btn.ghost:hover { border-color: var(--a); }
.btn.sq { width: 52px; padding: 0; }
.btn.big { min-height: 84px; padding: 0 26px; border-radius: 22px; justify-content: flex-start; text-align: left; flex: 1; }
.btn.big .ic { font-size: 28px; width: 50px; height: 50px; border-radius: 14px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; flex: none; }
.btn.big b { display: block; font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: .02em; line-height: 1; }
.btn.big small { display: block; font-size: 13px; font-weight: 800; opacity: .88; margin-top: 4px; }
.btn.pulse { animation: btnPulse 1.6s ease-in-out infinite; }
@keyframes btnPulse { 50% { box-shadow: 0 5px 0 var(--edge), 0 0 0 10px rgba(var(--a-rgb), .18), 0 18px 34px -14px rgba(255, 122, 0, .9); } }

.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(0, 0, 0, .2); }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 11px 16px; cursor: pointer; font-weight: 800; font-size: 15px; transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--a); color: #1a0d00; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--mono); font-size: 12px; padding: 7px 11px; border-radius: 999px; border: 1px solid rgba(var(--a-rgb), .5); color: var(--a); background: rgba(var(--a-rgb), .1); }

/* ---------- HOME ---------- */
/* flex: 1 0 auto = fill the screen, but grow (and scroll) instead of cutting off the top on short windows */
.home-grid { flex: 1 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(16px, 3vw, 44px); align-items: center; max-width: 1280px; width: 100%; margin: 0 auto; }
@media (max-width: 980px) { .home-grid { grid-template-columns: 1fr; } .hero-stage { order: -1; height: 260px !important; } }
.title { margin: 0 0 12px; line-height: .86; font-family: var(--display); font-weight: 400; font-size: clamp(64px, 10vw, 132px); letter-spacing: .01em; }
.title .t1 {
  display: block; background: linear-gradient(180deg, #ffd23f 10%, #ff8a1f 55%, #e2560c 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 5px 0 #7a2f00) drop-shadow(0 0 40px rgba(255, 138, 31, .45));
}
.title .t2 { display: block; color: #fff; filter: drop-shadow(0 5px 0 #3b2a8a) drop-shadow(0 0 40px rgba(139, 92, 246, .5)); font-size: .62em; letter-spacing: .12em; margin-top: 6px; }
.tagline {
  display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 16px; padding: 7px 14px 7px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: 13px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--a);
  background: rgba(var(--a-rgb), .12); border: 1px solid rgba(var(--a-rgb), .5); box-shadow: 0 0 24px -6px rgba(var(--a-rgb), .7);
}
.tagline span { font-size: 17px; letter-spacing: 0; }
.lead { color: var(--ink-2); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.45; max-width: 46ch; margin: 0 0 22px; font-weight: 700; }
.topics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 1280px) { .topics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 980px) { .topics { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .topics { grid-template-columns: repeat(2, 1fr); } }
.topic {
  --tc: #ff8a1f; position: relative; text-align: left; cursor: pointer; padding: 14px 14px 12px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); border: 2px solid var(--line);
  transition: transform .2s, border-color .2s, box-shadow .2s, background .2s; overflow: hidden;
}
.topic:hover { transform: translateY(-3px); }
.topic[aria-checked="true"] { border-color: var(--tc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc) 22%, transparent), 0 18px 40px -20px var(--tc); background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 22%, transparent), rgba(255, 255, 255, .02)); }
.topic .te { font-size: 34px; display: block; line-height: 1; margin-bottom: 8px; transition: transform .3s; }
.topic[aria-checked="true"] .te { transform: scale(1.15) rotate(-6deg); }
.topic b { display: block; font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: .02em; }
.topic small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; line-height: 1.3; }
.topic .best { position: absolute; top: 10px; right: 10px; font-family: var(--mono); font-size: 10.5px; padding: 4px 7px; border-radius: 8px; background: rgba(0, 0, 0, .35); color: var(--gold); }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }
.actions.small { margin-top: 12px; }
.actions.small .btn { flex: 1; min-width: 180px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 18px 0 4px; font-weight: 600; }
.foot a { color: var(--fox-light); }

/* hero: Rufus with flags orbiting around him */
.hero-stage { position: relative; height: min(64vh, 560px); display: grid; place-items: center; }
.hero-fox { position: relative; width: clamp(150px, 19vw, 240px); z-index: 3; cursor: pointer; }
.hero-bubble {
  position: absolute; z-index: 5; top: 4%; left: 50%; max-width: min(300px, 80%); padding: 12px 16px; border-radius: 18px 18px 18px 4px;
  background: #fff; color: #23164a; font-size: 15px; font-weight: 800; line-height: 1.3; box-shadow: 0 16px 34px -14px #000;
  transform-origin: bottom left; opacity: 0;
}
.hero-bubble:empty { display: none; }
.hero-bubble.show { animation: bubbleIn .5s cubic-bezier(.2, 1.5, .4, 1) forwards; }
@keyframes bubbleIn { from { opacity: 0; transform: scale(.4) translateY(20px); } to { opacity: 1; transform: none; } }
@media (max-width: 980px) { .hero-bubble { top: 0; left: 52%; font-size: 13px; } }
.hero-shadow { position: absolute; bottom: 16%; width: 180px; height: 24px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); z-index: 2; animation: shadow 2.6s ease-in-out infinite; }
@keyframes shadow { 50% { transform: scale(.8); opacity: .6; } }
.orbit-ring { position: absolute; left: 50%; top: 50%; width: 200px; height: 200px; border-radius: 50%; border: 2px solid rgba(var(--a-rgb), .55); transform: translate(-50%, -50%) scale(.3); animation: ring 4s ease-out infinite; }
.orbit-ring.r2 { animation-delay: 1.33s; } .orbit-ring.r3 { animation-delay: 2.66s; }
@keyframes ring { 0% { transform: translate(-50%, -50%) scale(.3); opacity: .9; } 100% { transform: translate(-50%, -50%) scale(2.6); opacity: 0; } }
.orbit { position: absolute; left: 50%; top: 50%; width: 0; height: 0; animation: spin 46s linear infinite; z-index: 2; }
.orb { position: absolute; left: 0; top: 0; transform: rotate(var(--ang)) translateX(var(--rad)) rotate(calc(-1 * var(--ang))); animation: orbIn .8s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: calc(var(--k) * 70ms); }
/* when you pick a topic, the new things fly out from Rufus into orbit */
@keyframes orbIn { from { scale: 0; opacity: 0; } to { scale: 1; opacity: 1; } }
.orb i { display: block; animation: spin 46s linear infinite reverse; }
.orb .oe { display: block; font-size: var(--s, 56px); line-height: 1; font-style: normal; transform: translate(-50%, -50%); filter: drop-shadow(0 0 18px rgba(var(--a-rgb), .75)) drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); animation: bob 3s ease-in-out infinite; animation-delay: var(--dl); }
.parade .pe { position: absolute; font-size: calc(var(--w) * .7); line-height: 1; opacity: var(--o); filter: blur(var(--b)); animation: drift var(--t) linear infinite; animation-delay: var(--dl); }
.orb img { display: block; width: var(--s, 72px); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; transform: translate(-50%, -50%); box-shadow: 0 12px 24px -10px #000, 0 0 0 2px rgba(255, 255, 255, .15); animation: bob 3s ease-in-out infinite; animation-delay: var(--dl); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translate(-50%, calc(-50% - 10px)); } }

/* ---------- PROFILE ---------- */
.saved { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.saved:empty { display: none; }
.saved button { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 2px solid var(--line); background: rgba(255, 255, 255, .05); cursor: pointer; font-weight: 800; }
.saved button[aria-pressed="true"] { border-color: var(--a); background: rgba(var(--a-rgb), .14); }
.saved .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; }
.builder { display: flex; flex-direction: column; align-items: center; text-align: center; }
.avatar-big { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font-size: 66px; margin: 14px 0 10px; background: var(--pc, var(--a)); box-shadow: 0 0 0 6px rgba(255, 255, 255, .12), 0 0 60px -6px var(--pc, var(--a)); animation: floaty 2.4s ease-in-out infinite; transition: background .3s, box-shadow .3s; }
.avatar-big span { display: inline-block; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .25)); }
.avatar-big.pop span { animation: popIn .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@keyframes popIn { 0% { transform: scale(.3) rotate(-30deg); } 100% { transform: none; } }
.name-reel { font-family: var(--display); font-size: clamp(30px, 5vw, 46px); margin-bottom: 12px; text-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 0 30px rgba(var(--a-rgb), .5); min-height: 1.1em; }
.name-reel span { display: inline-block; }
.name-reel .spinning { animation: slot .09s linear infinite; }
@keyframes slot { 0% { transform: translateY(-40%); opacity: .3; } 100% { transform: translateY(40%); opacity: .3; } }
.reel-row { display: flex; gap: 10px; justify-content: center; }
.reel-row.off { opacity: .35; pointer-events: none; }
.name-reel .own { color: var(--gold); }
.name-reel .own:empty { display: none; }
.link-btn { min-height: 44px; margin-top: 12px; border: 0; background: none; color: var(--a); font-weight: 900; font-size: 15px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.link-btn:hover { color: #fff; }
.own-name { width: 100%; max-width: 380px; margin-top: 10px; display: flex; flex-direction: column; align-items: center; }
.own-name input {
  width: 100%; height: 58px; border-radius: 16px; border: 2px solid var(--line); background: rgba(0, 0, 0, .3); color: #fff; outline: none;
  text-align: center; font-family: var(--display); font-size: 28px; letter-spacing: .02em; transition: border-color .2s, box-shadow .2s;
}
.own-name input:focus { border-color: var(--a); box-shadow: 0 0 30px -8px var(--a); }
.own-name input.bad { border-color: var(--bad); animation: shake .4s; }
.own-name .hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.own-name .hint.bad { color: #ff8fa3; }

/* quit button + friendly "are you sure?" card */
.quit-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255, 77, 109, .5); background: rgba(255, 77, 109, .12); color: #ffb3c0; font-weight: 900; font-size: 14px;
  transition: background .2s, transform .15s;
}
.quit-btn:hover { background: rgba(255, 77, 109, .25); transform: translateY(-2px); }
@media (max-width: 640px) { .quit-btn span { display: none; } }
.modal { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 16px; background: rgba(5, 3, 15, .7); backdrop-filter: blur(6px); animation: rise .2s both; }
.modal-card {
  width: min(420px, 100%); padding: 24px 22px 22px; border-radius: 26px; text-align: center; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(40, 28, 90, .98), rgba(16, 12, 42, .98)); box-shadow: 0 40px 90px -30px #000;
  animation: popIn .4s cubic-bezier(.2, 1.5, .4, 1);
}
.modal-fox { width: 84px; margin: -64px auto 6px; }
.modal-card h3 { font-family: var(--display); font-weight: 400; font-size: 30px; margin: 0 0 8px; }
.modal-card p { color: var(--ink-2); margin: 0 0 6px; line-height: 1.4; }
.btn.danger { --c: #ff6b86; --c2: #e0244b; --edge: #7a0c22; border-color: transparent; }
.animal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; width: 100%; }
.animal-grid button { aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--line); background: rgba(255, 255, 255, .05); cursor: pointer; font-size: 28px; transition: transform .15s, border-color .15s, background .15s; }
.animal-grid button:hover { transform: scale(1.1); }
.animal-grid button[aria-pressed="true"] { border-color: var(--a); background: rgba(var(--a-rgb), .2); transform: scale(1.08); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.swatches button { width: 40px; height: 40px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; background: var(--sw); box-shadow: 0 0 16px -4px var(--sw); transition: transform .15s; }
.swatches button[aria-pressed="true"] { border-color: #fff; transform: scale(1.18); }

/* ---------- SETUP / JOIN ---------- */
.opt { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.opt .label { margin-top: 12px; }
.code-inputs { display: flex; gap: clamp(6px, 1.4vw, 12px); justify-content: center; margin: 14px 0; }
.code-inputs input {
  width: clamp(48px, 11vw, 76px); height: clamp(60px, 13vw, 92px); text-align: center; text-transform: uppercase;
  font-family: var(--display); font-size: clamp(30px, 6vw, 50px); color: #fff; border-radius: 18px; border: 2px solid var(--line);
  background: rgba(0, 0, 0, .3); outline: none; transition: border-color .2s, transform .15s; caret-color: var(--a);
}
.code-inputs input:focus { border-color: var(--a); transform: translateY(-3px); box-shadow: 0 0 30px -8px var(--a); }
.code-inputs.bad input { animation: shake .4s; border-color: var(--bad); }
.join-preview { min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); text-align: center; }
.join-preview .room-card { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 16px; background: rgba(var(--a-rgb), .1); border: 1px solid rgba(var(--a-rgb), .4); color: var(--ink); }
.join-preview .room-card .e { font-size: 30px; }
.join-preview { flex-direction: column; }
.join-preview .join-as { font-size: 14px; color: var(--muted); }
.join-preview .join-as .link-btn { margin: 0; font-size: 14px; }

/* ---------- LOBBY ---------- */
.lobby { flex: 1 0 auto; display: grid; grid-template-columns: minmax(280px, .8fr) 1.2fr; gap: 20px; max-width: 1200px; width: 100%; margin: 1vh auto auto; }
@media (max-width: 900px) { .lobby { grid-template-columns: 1fr; } }
.lobby .panel { margin: 0; max-width: none; }
.lobby-code { text-align: center; }
.code-tiles { display: flex; gap: 8px; justify-content: center; margin: 6px 0 12px; }
.code-tiles span {
  width: clamp(44px, 5vw, 62px); height: clamp(58px, 6.6vw, 80px); border-radius: 14px; display: grid; place-items: center;
  font-family: var(--display); font-size: clamp(30px, 3.6vw, 46px); color: #1a0d00;
  background: linear-gradient(180deg, #ffe08a, #ffb02e); box-shadow: 0 5px 0 #a35e00, 0 14px 30px -14px #ffb02e;
  animation: tileIn .6s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(var(--k) * 90ms + 200ms);
}
@keyframes tileIn { from { transform: rotateX(90deg) translateY(-20px); opacity: 0; } to { transform: none; opacity: 1; } }
.qr { width: 190px; height: 190px; margin: 0 auto; padding: 12px; background: #fff; border-radius: 18px; box-shadow: 0 0 40px -10px rgba(var(--a-rgb), .7); }
.qr svg { width: 100%; height: 100%; display: block; }
.lobby-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 14px; min-height: 160px; align-content: start; }
.pcard {
  position: relative; padding: 14px 10px 12px; border-radius: 18px; text-align: center; background: rgba(255, 255, 255, .05);
  border: 2px solid color-mix(in srgb, var(--pc) 60%, transparent); animation: joinPop .6s cubic-bezier(.2, 1.6, .4, 1) both;
}
.pcard .av { width: 62px; height: 62px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font-size: 36px; background: var(--pc); box-shadow: 0 0 24px -6px var(--pc); animation: floaty 2.6s ease-in-out infinite; animation-delay: var(--dl, 0s); }
.pcard .nm { font-weight: 900; font-size: 14px; line-height: 1.2; }
.pcard .tag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 10px; padding: 3px 8px; border-radius: 999px; background: var(--gold); color: #1a0d00; white-space: nowrap; }
.pcard.away { opacity: .45; filter: grayscale(.8); }
.pcard .kick {
  position: absolute; top: 6px; right: 6px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 77, 109, .5); background: rgba(0, 0, 0, .35); color: #ffb3c0; font-size: 12px; font-weight: 900;
  opacity: .55; transition: opacity .2s, background .2s;
}
.pcard:hover .kick, .pcard .kick:focus-visible { opacity: 1; }
.pcard .kick.armed { opacity: 1; background: var(--bad); color: #fff; }
.pcard.you { box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
@keyframes joinPop { 0% { transform: scale(.2) translateY(30px); opacity: 0; } 100% { transform: none; opacity: 1; } }
/* someone opened the join link and is still picking their avatar */
.pcard.ghost { border-style: dashed; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .03); animation: joinPop .6s cubic-bezier(.2, 1.6, .4, 1) both, ghostPulse 1.8s ease-in-out .6s infinite; }
.pcard.ghost .av { background: rgba(255, 255, 255, .1); box-shadow: none; }
.pcard.ghost .av span { display: inline-block; animation: wiggle 1.2s ease-in-out infinite; }
.pcard.ghost .nm { color: var(--muted); font-weight: 800; }
@keyframes ghostPulse { 50% { opacity: .6; } }
@keyframes wiggle { 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.choosing-note { margin: 14px 0 0; padding: 10px 14px; border-radius: 14px; background: rgba(255, 210, 63, .12); border: 1px solid rgba(255, 210, 63, .4); color: var(--gold); font-size: 15px; text-align: center; }
.player-grid .empty { grid-column: 1 / -1; display: grid; place-items: center; color: var(--muted); border: 2px dashed var(--line); border-radius: 18px; min-height: 140px; font-size: 15px; }

/* ---------- GAME ---------- */
.screen.game { padding-bottom: 16px; }
.hud { display: flex; align-items: center; gap: 12px; max-width: 1280px; width: 100%; margin: 0 auto 12px; }
.hud-left, .hud-right { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.hud-right { justify-content: flex-end; }
.hud-mid { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1.2; }
.topic-chip { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 8px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qcount { font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: .1em; white-space: nowrap; }
.qcount b { color: var(--a); font-size: 16px; }
.hearts { display: flex; gap: 6px; }
.hearts span { font-size: 30px; display: inline-block; filter: drop-shadow(0 0 10px rgba(255, 120, 40, .7)); transition: transform .3s; }
.hearts span.lost { filter: grayscale(1) brightness(.4); transform: scale(.8); }
.hearts span.breaking { animation: heartBreak .8s ease forwards; }
@keyframes heartBreak { 0% { transform: scale(1.4) rotate(0); } 30% { transform: scale(1.5) rotate(-15deg); } 60% { transform: scale(.7) rotate(12deg); filter: grayscale(1) brightness(.4); } 100% { transform: scale(.8); filter: grayscale(1) brightness(.4); } }
.pips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pips i { width: 26px; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .16); transition: background .3s, width .3s; }
.pips i.on { background: var(--a); width: 42px; box-shadow: 0 0 10px var(--a); }
.pips i.good { background: var(--good); } .pips i.bad { background: var(--bad); }
.streak { font-family: var(--display); font-size: 22px; color: #ffb02e; text-shadow: 0 0 18px rgba(255, 120, 0, .8); white-space: nowrap; }
.streak.hot { animation: flame .5s ease-in-out infinite alternate; }
@keyframes flame { to { transform: scale(1.08) rotate(-2deg); text-shadow: 0 0 26px rgba(255, 60, 0, 1); } }
.score { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; padding: 8px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); min-width: 110px; }
.score small { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.score b { font-family: var(--display); font-weight: 400; font-size: 28px; color: var(--gold); font-variant-numeric: tabular-nums; }
.score.bump b { animation: bump .5s ease; }
@keyframes bump { 40% { transform: scale(1.3); color: #fff; } }

.stage { flex: 1 0 auto; display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(16px, 2.6vw, 36px); align-items: center; max-width: 1280px; width: 100%; margin: 0 auto; min-height: 0; }
@media (max-width: 980px) { .stage { grid-template-columns: 1fr; align-items: start; } }

.media-card {
  position: relative; height: min(60vh, 540px); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(180deg, var(--glass), var(--glass-2)); backdrop-filter: blur(12px);
  box-shadow: 0 40px 90px -50px #000, inset 0 0 70px -30px rgba(var(--a-rgb), .55); display: grid; place-items: center;
  container-type: size;
}
@media (max-width: 980px) { .media-card { height: 34vh; min-height: 220px; } }
.timebar { position: absolute; left: 0; right: 0; top: 0; height: 7px; background: rgba(255, 255, 255, .08); }
.timebar i { display: block; height: 100%; width: 100%; background: var(--tcol, var(--good)); box-shadow: 0 0 14px var(--tcol, var(--good)); transform-origin: left; }
.level-tag { position: absolute; right: 14px; bottom: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); }
.media { width: 100%; height: 100%; display: grid; place-items: center; padding: 30px 26px; }
.media.swap { animation: mediaIn .55s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes mediaIn { from { opacity: 0; transform: scale(.85) rotate(-3deg); } to { opacity: 1; transform: none; } }

/* waving flag on a pole */
/* sized so the whole flag (plus pole) always fits inside the card, whatever the screen shape */
.flagpole { position: relative; width: min(86%, 470px, calc((100cqh - 120px) * 1.33 + 12px)); display: flex; align-items: flex-start; margin-top: 10px; }
.pole { width: 12px; align-self: stretch; margin-top: -22px; margin-bottom: -40px; border-radius: 6px; background: linear-gradient(90deg, #8a8fa8, #f3f4ff 40%, #9ea2bb); box-shadow: 0 10px 20px -6px #000; position: relative; z-index: 2; }
.pole::before { content: ""; position: absolute; top: -16px; left: 50%; width: 22px; height: 22px; border-radius: 50%; transform: translateX(-50%); background: radial-gradient(circle at 35% 35%, #fff6c4, #ffc531 45%, #b37400); box-shadow: 0 0 16px rgba(255, 210, 63, .7); }
.cloth-wrap { flex: 1; perspective: 900px; }
.cloth {
  position: relative; aspect-ratio: 4 / 3; border-radius: 3px 8px 8px 3px; overflow: hidden; transform-origin: left center;
  animation: wave 3.4s ease-in-out infinite; box-shadow: 0 30px 50px -24px #000, 0 0 60px -24px rgba(var(--a-rgb), .9); background: #fff;
}
.cloth img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cloth::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: repeating-linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .55) 9%, rgba(0, 0, 0, .45) 20%, rgba(255, 255, 255, 0) 30%);
  background-size: 200% 100%; animation: ripple 2.6s linear infinite;
}
@keyframes wave { 0%, 100% { transform: rotateY(-12deg) skewY(-2deg); } 50% { transform: rotateY(9deg) skewY(1.6deg); } }
@keyframes ripple { from { background-position: 0 0; } to { background-position: -200% 0; } }
.media .caption { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-family: var(--display); font-size: 22px; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }

.word-card { text-align: center; }
.word-card .w { font-family: var(--display); font-size: clamp(38px, 6vw, 72px); line-height: 1; text-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 0 50px rgba(var(--a-rgb), .6); }
.word-card .ws { margin-top: 12px; font-size: 18px; color: var(--muted); }
.story-card { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.story-card .emoji-card { font-size: clamp(90px, 13vw, 160px); }
.story-card .place {
  font-family: var(--mono); font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px;
  color: var(--fox-light); background: rgba(210, 105, 30, .18); border: 1px solid rgba(244, 164, 96, .5);
}
.photo-card { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.photo-card img { flex: 0 1 auto; min-height: 0; max-width: 100%; max-height: 100%; border-radius: 14px; object-fit: contain; box-shadow: 0 24px 50px -20px #000, 0 0 0 4px rgba(255, 255, 255, .9); animation: mediaIn .55s cubic-bezier(.2, .9, .3, 1.2); }
.media:has(.photo-card) { padding: 22px; }
.emoji-card { font-size: clamp(110px, 16vw, 190px); line-height: 1; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .5)); animation: floaty 3s ease-in-out infinite; }

.qside { min-width: 0; display: flex; flex-direction: column; }
.q-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.timer { position: relative; width: 68px; height: 68px; flex: none; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer .bg { fill: rgba(0, 0, 0, .35); stroke: rgba(255, 255, 255, .1); stroke-width: 6; }
.timer .fg { fill: none; stroke: var(--tcol, var(--good)); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 175.9; filter: drop-shadow(0 0 6px var(--tcol, var(--good))); }
.timer span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 26px; }
.timer.urgent { animation: urgent .5s ease-in-out infinite alternate; }
@keyframes urgent { to { transform: scale(1.12); } }
.prompt { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3vw, 38px); line-height: 1.05; margin: 0; text-wrap: balance; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.q-anim { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.q-anim.d2 { animation-delay: .08s; }

.answers { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.4vw, 16px); }
.ans {
  --c: #ff8a1f; --c2: #e0600a; --edge: #8a3300;
  position: relative; min-height: clamp(74px, 11vh, 104px); border-radius: 20px; border: 0; cursor: pointer; color: #fff;
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left;
  font-size: clamp(16px, 1.9vw, 22px); font-weight: 900; line-height: 1.15; text-shadow: 0 2px 0 rgba(0, 0, 0, .28);
  background: linear-gradient(180deg, var(--c), var(--c2)); box-shadow: 0 7px 0 var(--edge), 0 18px 30px -14px var(--c);
  transition: transform .13s ease, box-shadow .13s ease, opacity .35s, filter .35s;
  animation: ansIn .5s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--k) * 70ms + 120ms);
}
@keyframes ansIn { from { opacity: 0; transform: translateY(24px) scale(.9); } to { opacity: 1; transform: none; } }
.ans.c0 { --c: #ff9a2e; --c2: #f26a00; --edge: #8f3a00; }
.ans.c1 { --c: #43c3ff; --c2: #1688f0; --edge: #0b4a95; }
.ans.c2 { --c: #45e0a0; --c2: #10b06e; --edge: #06623b; }
.ans.c3 { --c: #ff6fb5; --c2: #e53390; --edge: #7e1650; }
.ans .shape { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .24); display: grid; place-items: center; font-size: 18px; flex: none; }
.ans .em { font-size: 28px; flex: none; }
.ans .mini { width: 46px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; flex: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.ans:hover:not(:disabled) { transform: translateY(-3px) rotate(-.5deg); }
.ans:active:not(:disabled) { transform: translateY(6px); box-shadow: 0 1px 0 var(--edge), 0 6px 14px -10px var(--c); }
.ans:disabled { cursor: default; }
.ans .key { position: absolute; right: 10px; bottom: 7px; font-family: var(--mono); font-size: 10px; opacity: .55; }
/* flag picture answers */
.answers.pics .ans { padding: 10px; min-height: 0; flex-direction: column; gap: 6px; }
/* flag pictures shrink with the screen height so the whole question always fits */
.answers.pics .ans .pic {
  height: clamp(54px, calc((100dvh - 470px) / 2), 170px); max-width: 100%; aspect-ratio: 4 / 3;
  border-radius: 10px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
}
.answers.pics .ans .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.answers.pics .ans .shape { position: absolute; top: 14px; left: 14px; width: 30px; height: 30px; border-radius: 9px; font-size: 14px; background: var(--c2); box-shadow: 0 2px 0 var(--edge); }
.answers.pics .ans .lbl { font-size: 14px; min-height: 1.2em; text-align: center; width: 100%; }
@media (max-width: 980px) { .answers.pics .ans .pic { height: clamp(54px, 14vh, 130px); } }
/* states */
.answers.locked .ans:not(.picked) { opacity: .4; filter: grayscale(.6); }
.ans.picked { box-shadow: 0 7px 0 var(--edge), 0 0 0 5px #fff, 0 18px 40px -10px var(--c); }
.ans .lock { position: absolute; top: -12px; right: -8px; padding: 4px 10px; border-radius: 999px; background: #fff; color: #1a1033; font-size: 12px; font-weight: 900; box-shadow: 0 6px 14px -6px #000; animation: popIn .35s cubic-bezier(.2, 1.6, .4, 1); }
.answers.revealed .ans { opacity: .35; filter: grayscale(.7); }
.answers.revealed .ans.right { opacity: 1; filter: none; --c: #4be3a3; --c2: #13b26f; --edge: #075f3b; animation: rightPop .6s cubic-bezier(.2, 1.6, .4, 1) both; box-shadow: 0 7px 0 var(--edge), 0 0 0 5px #b8ffe0, 0 0 50px -6px #3ddc97; }
.answers.revealed .ans.wrong { opacity: 1; filter: none; --c: #ff5a7a; --c2: #d4234a; --edge: #74081f; animation: shake .5s both; }
@keyframes rightPop { 0% { transform: scale(1); } 40% { transform: scale(1.07) rotate(-1deg); } 100% { transform: scale(1.02); } }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
.ans .mark { position: absolute; top: -14px; right: -10px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: #fff; box-shadow: 0 6px 16px -6px #000; animation: popIn .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.ans.right .mark { color: #0b8f57; } .ans.wrong .mark { color: #d4234a; }
.ans .who { position: absolute; left: 10px; top: -14px; display: flex; }
.ans .who span { width: 28px; height: 28px; margin-right: -8px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; background: var(--pc); border: 2px solid #fff; animation: popIn .4s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--k) * 80ms + 300ms); }

.fact {
  flex: 1; min-width: 0; display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; border-left: 4px solid var(--a);
  border-radius: 0 16px 16px 0; background: rgba(var(--a-rgb), .12); animation: rise .5s cubic-bezier(.2, .7, .2, 1) both;
}
.fact .fact-ic { font-size: 24px; line-height: 1; }
.fact p { margin: 0; font-size: clamp(14px, 1.3vw, 16.5px); line-height: 1.4; color: var(--ink); }
.fact p b { color: var(--a); }
.fact .credit {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  margin-top: 4px; font-size: 11px; line-height: 1.3; color: var(--muted); font-weight: 600;
}
.fact .credit:empty { display: none; }
.fact .credit a { color: var(--muted); }
.photo-card { flex-direction: column; gap: 10px; }
.photo-card .caption-pill { font-family: var(--display); font-size: 22px; padding: 4px 14px; border-radius: 12px; background: rgba(0, 0, 0, .45); text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.answers.pics .ans .pic img[src^="/l/"] { object-fit: cover; }
/* the row under the answers is always the same height, so nothing jumps when the fact appears */
.after { display: flex; align-items: center; gap: 14px; margin-top: 14px; min-height: 72px; }
.answered-row { flex: 1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.answered-row:empty { display: none; }
.answered-row .mini-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; background: var(--pc); opacity: .3; transition: opacity .3s, transform .3s; }
.answered-row .mini-av.done { opacity: 1; transform: scale(1.1); box-shadow: 0 0 12px -2px var(--pc); }
#nextBtn { margin-left: auto; flex: none; min-height: 58px; padding: 0 26px; font-size: 19px; overflow: hidden; }
#nextBtn.auto::after { content: ""; position: absolute; left: 0; bottom: 0; height: 5px; width: 100%; background: rgba(255, 255, 255, .7);
  transform-origin: left; animation: autoNext var(--auto, 8000ms) linear forwards; }
@keyframes autoNext { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* 🐾 fastest paw */
.ans .who span.fastest { box-shadow: 0 0 0 3px var(--gold), 0 0 16px var(--gold); transform: scale(1.25); }
.ans .who span.fastest::after { content: "🐾"; position: absolute; top: -14px; right: -10px; font-size: 14px; }
.ans .who span { position: relative; transition: transform .3s, box-shadow .3s; }
/* phones: Next floats in the corner so it's never off-screen */
@media (max-width: 640px) {
  #nextBtn { position: fixed; right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 55; box-shadow: 0 5px 0 var(--edge), 0 18px 40px -8px rgba(0, 0, 0, .8); }
  .after { min-height: 0; padding-bottom: 70px; }
}

/* room scoreboard between questions */
.standings {
  position: absolute; right: clamp(14px, 3vw, 40px); top: 70px; width: min(380px, calc(100% - 28px)); z-index: 30; padding: 16px 18px;
  border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(30, 22, 70, .92), rgba(14, 10, 38, .96));
  backdrop-filter: blur(14px); box-shadow: 0 40px 80px -30px #000; animation: slideIn .55s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes slideIn { from { transform: translateX(110%); opacity: 0; } to { transform: none; opacity: 1; } }
.standings ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.srow { display: grid; grid-template-columns: 26px 34px 1fr auto; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 13px; background: rgba(255, 255, 255, .05); }
.srow.me { background: rgba(var(--a-rgb), .2); box-shadow: inset 0 0 0 2px rgba(var(--a-rgb), .6); }
.srow .r { font-family: var(--display); font-size: 18px; color: var(--muted); text-align: center; }
.srow .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; background: var(--pc); }
.srow .n { font-weight: 900; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .s { font-family: var(--display); font-size: 18px; color: var(--gold); text-align: right; }
.srow .plus { display: block; font-family: var(--body); font-size: 11px; color: var(--good); }
.srow .mv { font-size: 11px; margin-left: 4px; } .srow .mv.up { color: var(--good); } .srow .mv.down { color: var(--bad); }

/* ---------- FINAL ---------- */
.final { width: 100%; max-width: 980px; margin: 0 auto auto; text-align: center; position: relative; padding-top: 1vh; }
.final-title { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 7vw, 80px); line-height: .95; margin: 0 0 10px; text-shadow: 0 5px 0 rgba(0, 0, 0, .35), 0 0 50px rgba(var(--a-rgb), .55); }
.bigscore { font-family: var(--display); font-size: clamp(70px, 12vw, 140px); line-height: 1; color: var(--gold); text-shadow: 0 6px 0 #8a5a00, 0 0 60px rgba(255, 210, 63, .6); }
.bigscore small { display: block; font-family: var(--mono); font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); text-shadow: none; margin-top: 4px; }
.stamp {
  position: absolute; top: 8%; right: 4%; padding: 14px 18px; border: 5px solid #ff4d6d; border-radius: 14px; color: #ff4d6d;
  font-family: var(--display); font-size: clamp(22px, 3vw, 34px); line-height: .95; transform: rotate(12deg); background: rgba(255, 77, 109, .08);
  box-shadow: 0 0 40px -6px rgba(255, 77, 109, .7); animation: stamp .55s cubic-bezier(.2, 1.4, .4, 1) .9s both;
}
@keyframes stamp { from { transform: rotate(12deg) scale(3); opacity: 0; } to { transform: rotate(12deg) scale(1); opacity: 1; } }
@media (max-width: 700px) { .stamp { position: static; display: inline-block; margin: 10px 0; } }
.stats { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.stat { min-width: 130px; padding: 12px 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.stat .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--display); font-size: 32px; color: var(--a); }
.hall-result { display: inline-flex; align-items: center; gap: 14px; padding: 14px 20px; border-radius: 20px; background: rgba(255, 210, 63, .1); border: 1px solid rgba(255, 210, 63, .4); min-height: 70px; }
.hall-result .medal { font-size: 40px; }
.hall-result .txt { text-align: left; } .hall-result .txt b { font-family: var(--display); font-size: 24px; font-weight: 400; color: var(--gold); display: block; }
.hall-result:empty { display: none; }
.hall-result { flex-wrap: wrap; justify-content: center; }
.hall-result .name-btn { min-height: 44px; font-size: 15px; }
.hall-result .renamed { display: block; color: var(--good); font-weight: 800; margin-top: 2px; }
.hall-me .link-btn { margin: 0 0 0 6px; font-size: 14px; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: clamp(8px, 2vw, 18px); margin: 26px auto 18px; min-height: 300px; }
.pod { width: clamp(96px, 18vw, 170px); display: flex; flex-direction: column; align-items: center; }
.pod .who { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 10px; animation: dropIn .8s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: var(--dl); }
.pod .av { position: relative; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 42px; background: var(--pc); box-shadow: 0 0 30px -4px var(--pc); }
.pod .crown { position: absolute; top: -34px; font-size: 38px; animation: floaty 2s ease-in-out infinite; }
.pod .nm { font-weight: 900; font-size: 14px; } .pod .sc { font-family: var(--display); color: var(--gold); font-size: 20px; }
.pod .block {
  width: 100%; border-radius: 16px 16px 6px 6px; display: grid; place-items: start center; padding-top: 12px;
  font-family: var(--display); font-size: 46px; color: rgba(0, 0, 0, .35); animation: grow .9s cubic-bezier(.2, .9, .3, 1.1) both; animation-delay: var(--gd); transform-origin: bottom;
}
.pod.p1 .block { height: 170px; background: linear-gradient(180deg, #ffe27a, #ffb21e); box-shadow: 0 0 50px -10px #ffc531; }
.pod.p2 .block { height: 125px; background: linear-gradient(180deg, #eef1ff, #a9b2d6); }
.pod.p3 .block { height: 95px; background: linear-gradient(180deg, #ffc49a, #d0793b); }
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }
@keyframes dropIn { from { transform: translateY(-120px) scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.rest { list-style: none; padding: 0; margin: 0 auto; max-width: 520px; display: flex; flex-direction: column; gap: 8px; }
.learned { margin: 20px auto 0; max-width: 900px; }
.learned.hidden-empty { display: none; }
.learned-row { display: flex; gap: 10px; overflow-x: auto; padding: 6px 4px 10px; justify-content: center; flex-wrap: wrap; }
.lcard { width: 120px; padding: 8px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); font-size: 12.5px; animation: joinPop .5s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--k) * 60ms + 600ms); }
.lcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 6px; }
.lcard .le { font-size: 40px; display: block; }

/* ---------- HALL OF FAME ---------- */
.panel.hall { max-width: 820px; }
.hall-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.tabs button { padding: 9px 14px; border-radius: 999px; border: 2px solid var(--line); background: rgba(255, 255, 255, .04); cursor: pointer; font-weight: 900; }
.tabs button[aria-pressed="true"] { border-color: var(--a); background: rgba(var(--a-rgb), .16); }
.hall-me { color: var(--muted); font-size: 14px; margin-bottom: 10px; min-height: 1.2em; }
.hall-me b { color: var(--gold); }
.hall-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hrow { display: grid; grid-template-columns: 46px 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid transparent; animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--k) * 50ms); }
.hrow.me { border-color: rgba(var(--a-rgb), .7); background: rgba(var(--a-rgb), .15); }
.hrow .r { font-family: var(--display); font-size: 24px; text-align: center; color: var(--muted); }
.hrow.g1 { background: linear-gradient(90deg, rgba(255, 210, 63, .22), rgba(255, 255, 255, .04)); } .hrow.g1 .r { font-size: 30px; }
.hrow.g2 { background: linear-gradient(90deg, rgba(200, 210, 240, .16), rgba(255, 255, 255, .04)); }
.hrow.g3 { background: linear-gradient(90deg, rgba(220, 130, 70, .18), rgba(255, 255, 255, .04)); }
.hrow .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: var(--pc); }
.hrow .n { font-weight: 900; font-size: 16px; } .hrow .n small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.hrow .s { font-family: var(--display); font-size: 26px; color: var(--gold); }
.hall-empty { text-align: center; color: var(--muted); padding: 30px 10px; border: 2px dashed var(--line); border-radius: 18px; }

/* ---------- Rufus (our host) ---------- */
.rufus-dock { position: fixed; left: clamp(6px, 2vw, 24px); bottom: max(6px, env(safe-area-inset-bottom)); z-index: 40; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; transition: transform .5s cubic-bezier(.2, .9, .3, 1.2), opacity .4s; }
.rufus-dock.away { transform: translateY(140%); opacity: 0; }
.rufus { width: clamp(70px, 8vw, 104px); pointer-events: auto; cursor: pointer; }
.bubble {
  position: relative; max-width: min(320px, 70vw); margin: 0 0 10px 30px; padding: 11px 15px; border-radius: 18px 18px 18px 4px;
  background: #fff; color: #23164a; font-size: 15px; font-weight: 800; line-height: 1.3; box-shadow: 0 16px 34px -14px #000;
  transform-origin: bottom left; transition: transform .3s cubic-bezier(.2, 1.5, .4, 1), opacity .25s; pointer-events: auto;
}
.bubble::after { content: ""; position: absolute; left: -2px; bottom: -10px; border: 10px solid transparent; border-top-color: #fff; border-left-color: #fff; border-bottom: 0; }
.bubble.hide { transform: scale(.3); opacity: 0; }
@media (max-width: 980px) { .rufus-dock.ingame .bubble { display: none; } .rufus-dock.ingame .rufus { width: 62px; } }

/* pixel-art Rufus SVG + moods */
.fox-svg { width: 100%; display: block; overflow: visible; shape-rendering: crispEdges; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); }
.fox-svg .body { transform-origin: 16px 30px; animation: foxIdle 2.4s ease-in-out infinite; }
.fox-svg .tail { transform-origin: 8px 16px; animation: tailWag 1.2s ease-in-out infinite; }
.fox-svg .eyes { transform-origin: 17px 8px; animation: blink 4.5s infinite; }
@keyframes foxIdle { 50% { transform: translateY(-1.2px) scaleY(1.02); } }
@keyframes tailWag { 50% { transform: rotate(-14deg); } }
@keyframes blink { 0%, 92%, 100% { transform: none; } 95% { transform: scaleY(.1); } }
.fox.happy .fox-svg .body { animation: foxHop .5s ease-in-out 3; }
.fox.happy .fox-svg .tail { animation: tailWag .25s ease-in-out infinite; }
.fox.cheer .fox-svg { animation: foxSpin .9s cubic-bezier(.3, 1.4, .5, 1); }
.fox.cheer .fox-svg .tail { animation: tailWag .18s ease-in-out infinite; }
.fox.sad .fox-svg .body { animation: none; transform: translateY(2px) scaleY(.94); }
.fox.sad .fox-svg .tail { animation: none; transform: rotate(30deg); }
.fox.sad .fox-svg .grin { opacity: 0; } .fox .frown { opacity: 0; } .fox.sad .frown { opacity: 1; }
.fox.think .fox-svg { animation: foxTilt 1.6s ease-in-out infinite; }
@keyframes foxHop { 50% { transform: translateY(-6px); } }
@keyframes foxSpin { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(200deg) scale(1.2) translateY(-10px); } 100% { transform: rotate(360deg) scale(1); } }
@keyframes foxTilt { 50% { transform: rotate(-6deg); } }

/* ---------- overlays ---------- */
.countdown { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: radial-gradient(circle, rgba(10, 6, 30, .55), rgba(5, 3, 15, .9)); backdrop-filter: blur(6px); }
.countdown span { font-family: var(--display); font-size: clamp(140px, 30vw, 320px); color: #fff; text-shadow: 0 10px 0 rgba(0, 0, 0, .4), 0 0 80px rgba(var(--a-rgb), .9); }
.countdown span.tick { animation: cdTick .9s cubic-bezier(.2, 1.4, .4, 1) both; }
.countdown span.go { color: var(--gold); }
@keyframes cdTick { 0% { transform: scale(2.4); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 80% { transform: scale(.92); opacity: 1; } 100% { transform: scale(.6); opacity: 0; } }
.cd-ring { position: absolute; width: 360px; height: 360px; border-radius: 50%; border: 6px solid rgba(var(--a-rgb), .6); animation: ring 1s ease-out infinite; left: 50%; top: 50%; }
/* streak banners: colours come from the streak tier (--b1/--b2), bigger tiers = bigger show */
.banner {
  --b1: #ff2d55; --b2: #ffd23f;
  position: fixed; left: -10%; right: -10%; top: 38%; z-index: 65; padding: 14px 0 12px; text-align: center; transform: rotate(-4deg); pointer-events: none;
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(90deg, var(--b1), var(--b2), #fff6, var(--b2), var(--b1)); background-size: 200% 100%;
  box-shadow: 0 20px 60px -10px var(--b1); animation: bannerIn 1.8s cubic-bezier(.2, .9, .3, 1) both, bannerSlide 1s linear infinite;
}
.banner span { font-family: var(--display); font-size: clamp(36px, 7vw, 80px); color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 0 30px rgba(255, 255, 255, .5); letter-spacing: .04em; }
.banner .b-emoji { font-size: clamp(40px, 7vw, 84px); animation: wiggle .5s ease-in-out infinite; text-shadow: none; }
.banner small { flex-basis: 100%; margin-top: -4px; font-family: var(--mono); font-weight: 800; font-size: clamp(13px, 1.6vw, 18px); letter-spacing: .3em; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.banner.lv-high span:not(.b-emoji) { font-size: clamp(44px, 9vw, 104px); }
.banner.lv-high { padding: 22px 0 18px; animation: bannerIn 2.2s cubic-bezier(.2, .9, .3, 1) both, bannerSlide .5s linear infinite, bannerPulse .4s ease-in-out infinite alternate; }
@keyframes bannerPulse { to { filter: brightness(1.25) saturate(1.3); } }
.banner.mini { top: 16%; padding: 8px 0 6px; transform: rotate(3deg); animation: bannerMini 1.6s cubic-bezier(.2, .9, .3, 1) both, bannerSlide 1s linear infinite; }
.banner.mini span { font-size: clamp(24px, 4vw, 44px); } .banner.mini .b-emoji { font-size: clamp(26px, 4vw, 46px); }
.banner.mini small { flex-basis: auto; margin: 0; }
@keyframes bannerMini { 0% { transform: rotate(3deg) translateX(120%); } 20%, 75% { transform: rotate(3deg) translateX(0); } 100% { transform: rotate(3deg) translateX(-120%); } }
/* streak badge by the score changes colour as it grows */
.streak.t1 { color: #ffe066; text-shadow: 0 0 18px rgba(255, 220, 60, .9); }
.streak.t2 { color: #c4b5fd; text-shadow: 0 0 20px rgba(139, 92, 246, 1); }
.streak.t3 { background: linear-gradient(90deg, #ffd23f, #ff8a1f, #f472b6, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0 10px rgba(255, 210, 63, .8)); }
.srow .stk { margin-left: 6px; font-size: 12px; color: #ffb02e; }
@keyframes bannerIn { 0% { transform: rotate(-4deg) translateX(-120%); } 20%, 75% { transform: rotate(-4deg) translateX(0); } 100% { transform: rotate(-4deg) translateX(120%); } }
@keyframes bannerSlide { to { background-position: -200% 0; } }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 80; padding: 12px 18px; border-radius: 14px; background: #fff; color: #23164a; font-weight: 900; box-shadow: 0 20px 40px -14px #000; animation: rise .35s both; max-width: calc(100% - 32px); }
.float-pts { position: fixed; z-index: 66; pointer-events: none; font-family: var(--display); font-size: 38px; color: var(--gold); text-shadow: 0 3px 0 #7a4b00, 0 0 24px rgba(255, 210, 63, .8); animation: floatUp 1.3s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes floatUp { 0% { transform: translate(-50%, 0) scale(.6); opacity: 0; } 20% { transform: translate(-50%, -20px) scale(1.25); opacity: 1; } 100% { transform: translate(-50%, -110px) scale(1); opacity: 0; } }
.shake-screen { animation: shake .45s; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .hud { flex-wrap: wrap; } .hud-mid { order: 3; flex-basis: 100%; }
  .score { min-width: 90px; } .score b { font-size: 22px; }
  .hearts span { font-size: 24px; }
  .q-head { gap: 10px; } .timer { width: 54px; height: 54px; } .timer span { font-size: 20px; }
  .ans { padding: 10px 12px; } .ans .shape { width: 30px; height: 30px; font-size: 14px; }
  .btn.big { min-height: 72px; } .btn.big b { font-size: 22px; }
}
@media (max-height: 760px) and (min-width: 981px) {
  .media-card { height: min(54vh, 440px); } .ans { min-height: 70px; }
}
/* short laptop windows: squeeze the chrome so the question, answers, fact and Next all fit */
@media (max-height: 640px) and (min-width: 981px) {
  .topbar { padding-top: 8px; padding-bottom: 6px; }
  .icon-btn, .pill { height: 38px; } .icon-btn { width: 38px; }
  .me-chip { height: 40px; } .me-chip .av { width: 30px; height: 30px; font-size: 18px; }
  .hud { margin-bottom: 4px; } .score { padding: 5px 12px; } .score b { font-size: 22px; } .hearts span { font-size: 24px; }
  .q-head { margin-bottom: 10px; } .timer { width: 54px; height: 54px; } .timer span { font-size: 20px; }
  .prompt { font-size: clamp(20px, 2.4vw, 30px); }
  .media-card { height: min(64vh, 400px); }
  .ans { min-height: 58px; }
  .after { min-height: 60px; margin-top: 10px; }
  .answers.pics .ans { padding: 8px; gap: 4px; }
  .answers.pics .ans .pic { height: clamp(40px, calc((100dvh - 380px) / 2), 170px); }
  #nextBtn { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .screen .anim { opacity: 1; transform: none; }
}

/* ---------- STICKERS ---------- */
/* an emoji with a white die-cut border and a soft shadow, slightly tilted, like a real sticker */
.sticker {
  display: inline-grid; place-items: center; font-size: var(--sz, 28px); line-height: 1; font-style: normal;
  transform: rotate(var(--rot, -6deg));
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff)
          drop-shadow(0 4px 5px rgba(0, 0, 0, .45));
}
.stk-row { display: flex; justify-content: center; gap: 6px; margin-top: 6px; min-height: 0; }
.stk-row .sticker { --sz: 18px; }
.srow .n .sticker, .pod .stk-row .sticker { --sz: 15px; margin-left: 4px; }
.stk-n { height: 42px; min-width: 44px; padding: 0 12px; border-radius: 13px; cursor: pointer; font-size: 14px; font-weight: 900;
  border: 1px solid rgba(244, 114, 182, .55); background: rgba(244, 114, 182, .16); color: #ffd1e8; }
.stk-n.bump { animation: bump .6s ease; }

/* in-game: a small "new sticker" note in the corner that doesn't get in the way */
.sticker-toast {
  position: fixed; right: clamp(10px, 2vw, 24px); top: 78px; z-index: 58; display: flex; align-items: center; gap: 12px;
  max-width: min(320px, calc(100vw - 20px)); padding: 10px 16px 10px 12px; border-radius: 18px; cursor: pointer; text-align: left;
  border: 2px solid rgba(244, 114, 182, .6); background: linear-gradient(180deg, rgba(48, 28, 90, .96), rgba(22, 14, 52, .96));
  box-shadow: 0 18px 40px -16px #000, 0 0 30px -10px #f472b6; color: var(--ink);
}
.sticker-toast.in { animation: toastIn .5s cubic-bezier(.2, 1.5, .4, 1) both; }
.sticker-toast .sticker { --sz: 36px; animation: spWobble 1.2s ease-in-out .4s 2; }
.sticker-toast .st-txt { display: flex; flex-direction: column; line-height: 1.2; }
.sticker-toast b { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #ffb3dd; }
.sticker-toast #stName { font-family: var(--display); font-size: 19px; }
.sticker-toast small { display: none; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.sticker-toast.open small { display: block; }
@keyframes toastIn { from { transform: translateX(120%) rotate(8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spWobble { 25% { transform: rotate(6deg) scale(1.08); } 50% { transform: rotate(-10deg); } 75% { transform: rotate(-4deg); } }

/* results screen: peel your stickers off the sheet and stick them in your book */
.sheet { margin: 18px auto 0; max-width: 720px; padding: 14px 16px 16px; border-radius: 20px;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 10px, rgba(255, 255, 255, .02) 10px 20px);
  border: 2px dashed rgba(244, 114, 182, .5); animation: rise .6s cubic-bezier(.2, .7, .2, 1) .8s both; }
.sheet-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.peel { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 110px; padding: 12px 10px; border-radius: 16px; cursor: pointer;
  border: 0; background: rgba(255, 255, 255, .06); color: var(--ink); animation: joinPop .6s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--k) * 120ms + 900ms); }
.peel .sticker { --sz: 54px; animation: spWobble 2.4s ease-in-out infinite; animation-delay: calc(var(--k) * .3s); }
.peel .pn { font-weight: 900; font-size: 13.5px; }
.peel:hover .sticker { transform: rotate(-14deg) scale(1.12); }
.peel.stuck { cursor: default; background: transparent; outline: 2px dashed rgba(255, 255, 255, .15); }
.peel.stuck .sticker { opacity: .15; animation: none; }
.peel.stuck .pn { color: var(--good); }
.sticker.flying { position: fixed; z-index: 90; --sz: 54px; pointer-events: none; margin: 0; }

/* sticker book */
.panel.book { max-width: 880px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 8px; }
.slot { position: relative; padding: 16px 10px 12px; border-radius: 18px; text-align: center; background: rgba(255, 255, 255, .05);
  border: 2px dashed rgba(255, 255, 255, .14); }
.slot.got { border-style: solid; border-color: rgba(244, 114, 182, .45); background: radial-gradient(circle at 50% 30%, rgba(244, 114, 182, .16), rgba(255, 255, 255, .03)); }
.slot .sticker { --sz: 54px; margin: 2px 0 8px; }
.slot.locked .sticker { filter: grayscale(1) brightness(.25) drop-shadow(0 0 0 transparent); opacity: .55; }
.slot b { display: block; font-size: 14.5px; }
.slot small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; margin-top: 3px; }
.slot .rar { position: absolute; top: 8px; right: 10px; font-size: 10px; letter-spacing: 1px; color: var(--gold); }

/* sticker book: tap to inspect, pin to show off */
.slot { cursor: pointer; font: inherit; color: inherit; transition: transform .15s; }
.slot:hover { transform: translateY(-3px); }
.slot.pinned::after { content: "📌"; position: absolute; top: 6px; left: 8px; font-size: 16px; }
.slot.sel { outline: 3px solid #f472b6; outline-offset: 2px; }
.inspect { display: flex; align-items: center; gap: 18px; padding: 16px 18px; margin: 4px 0 14px; border-radius: 20px;
  background: radial-gradient(circle at 15% 50%, rgba(244, 114, 182, .22), rgba(255, 255, 255, .04)); border: 1px solid rgba(244, 114, 182, .45);
  animation: rise .35s cubic-bezier(.2, .7, .2, 1) both; }
.inspect .sticker { --sz: 76px; animation: spWobble 1.4s ease-in-out; }
.inspect .ix b { display: block; font-family: var(--display); font-size: 26px; font-weight: 400; }
.inspect .ix small { display: block; color: var(--muted); margin: 2px 0 8px; }
.inspect .ix .btn { min-height: 42px; font-size: 14.5px; }
.inspect.locked .sticker { filter: grayscale(1) brightness(.3); }
