/* Theme: Gold Night. A near-black stage, dark booth cards, and two corners: blue for
   you, orange for whoever you're up against, with trophy gold for wins, VS and the main
   buttons. Unbounded for display type, Bricolage Grotesque for text, JetBrains Mono for
   numbers. The ground still sinks to pure black as the vault descends (--depth, 0 → 1). */

@property --depth {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

:root {
  --depth: 0;
  --dusk: #050507; /* stage */
  --abyss: #000000;
  --ground: color-mix(in oklab, var(--dusk), var(--abyss) calc(var(--depth) * 100%));
  --slab: #0e0e14; /* booth: cards */
  --slab-2: #17171f; /* raised: chips, hovers */
  --edge: #26262f;
  --edge-2: #3a3a46;
  --bone: #f4f3ee; /* house lights: text */
  --ash: #a3a3b8;
  --torch: #d4a63a; /* trophy gold */
  --torch-hi: #e8c468;
  --torch-ink: #050507;
  --blue: #3d8bff; /* blue corner: you */
  --orange: #ff7a1a; /* orange corner: them */
  --silver: #c0c6d0;
  --bronze: #cd7f4a;
  --platinum: #e6ecf5;
  --diamond: #7fe3ff;
  --moss: #4fd18b;
  --blood: #ff5c6c;
  --vinyl: #0e0e14;
  --arm: #d4ccdc;

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 16px;
  color-scheme: dark;
  transition: --depth 1.6s ease;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(110% 50% at 50% -20%, color-mix(in oklab, var(--torch) calc((1 - var(--depth)) * 4%), transparent), transparent 70%),
    var(--ground);
  background-color: var(--ground);
  background-attachment: fixed;
  color: var(--bone);
  font: 400 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--torch); outline-offset: 3px; }
[hidden] { display: none !important; }
a { color: inherit; }

.app {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 16px;
  padding-block: 0 64px;
}
@media (min-width: 640px) { .app { padding-inline: 28px; } }

.eyebrow {
  font: 700 0.72rem/1.3 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
}
.section-title {
  font: 700 1.05rem/1.25 var(--font-display);
  letter-spacing: -0.01em;
  margin: 0;
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head .count { font: 700 0.95rem/1 var(--font-mono); color: var(--torch); font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* A 44px tap target around the small record, pulled back in so nothing moves. */
  min-height: 44px;
  min-width: 44px;
  padding: 11px;
  margin: -11px;
  border-radius: 999px;
  font: 900 0.95rem/1 var(--font-display);
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand-word .a { color: var(--blue); }
.brand-word .b { color: var(--orange); }
.brand-disc {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--vinyl) 0 9%, var(--torch) 10% 34%, var(--vinyl) 35%);
  box-shadow: inset 0 0 0 1px var(--edge);
}
.player-chip {
  display: grid;
  justify-items: end;
  gap: 2px;
  background: none;
  border: 0;
  padding: 4px 0;
  text-align: right;
}
#player-name { font-weight: 600; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-chip:hover #player-name { color: var(--torch); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--torch);
  color: var(--torch-ink);
  font: 700 0.88rem/1.1 var(--font-display);
  letter-spacing: -0.005em;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); background: var(--torch-hi); }
.btn:disabled { opacity: 0.45; }
.btn-big { min-height: 56px; font-size: 0.95rem; padding: 0 28px; }
.btn-outline { background: transparent; color: var(--bone); border-color: var(--bone); }
.btn-outline:hover:not(:disabled) { background: transparent; border-color: var(--torch); color: var(--torch); }
.link-btn {
  background: none;
  border: 0;
  padding: 6px 2px;
  color: var(--ash);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--edge-2);
  text-underline-offset: 4px;
}
.link-btn:hover:not(:disabled) { color: var(--bone); text-decoration-color: var(--torch); }
.link-btn:disabled { opacity: 0.4; }
.link-btn.danger:hover { color: var(--blood); text-decoration-color: var(--blood); }
kbd {
  font: 500 0.72rem/1 var(--font-mono);
  color: var(--ash);
  border: 1px solid var(--edge);
  border-radius: 5px;
  padding: 3px 6px;
}
.back {
  justify-self: start;
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--ash);
  font-weight: 500;
}
.back:hover { color: var(--bone); }

/* ---------- home ---------- */
.home { display: grid; gap: 40px; padding-top: 12px; }
.hero { position: relative; display: grid; gap: 22px; }
.hero .wordmark, .hero .lede { position: relative; z-index: 1; }
/* VERSO: blue corner against orange, with a tilted gold VS stamped on the end. */
.wordmark {
  margin: 0;
  font: 900 clamp(2.8rem, 15vw, 5.8rem)/0.92 var(--font-display);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  display: grid;
  gap: 0.08em;
}
.wm-row { display: flex; align-items: center; }
.wm-a { color: var(--blue); }
.wm-b { color: var(--orange); }
.wordmark .vs-badge { font-size: 0.42em; margin-left: 0.45em; align-self: flex-start; margin-top: 0.15em; }
.vs-badge {
  display: inline-grid;
  place-items: center;
  width: 2.3em;
  height: 2.3em;
  border-radius: 0.4em;
  background: var(--torch);
  color: var(--torch-ink);
  font: 900 1em/1 var(--font-display);
  letter-spacing: -0.02em;
  transform: rotate(-8deg);
  flex: none;
}
.lede { margin: 0; max-width: 42ch; font-size: 1.08rem; line-height: 1.5; color: var(--ash); }

/* Quick play: the one-tap way into a 1v1, a gold slab saying how many are waiting. */
.quick-row { position: relative; z-index: 1; display: flex; justify-self: start; width: min(100%, 420px); }
.quick-play {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 12px 10px 10px;
  border: 0;
  border-radius: 20px;
  background: var(--torch);
  color: var(--torch-ink);
  text-align: left;
  box-shadow: 0 10px 30px -12px rgb(212 166 58 / 0.6);
  transition: transform 0.15s ease, background 0.15s ease;
}
.quick-play:hover { transform: translateY(-1px); background: var(--torch-hi); }
.quick-play:active { transform: scale(0.98); }
.qp-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--torch-ink); }
.qp-icon svg { width: 22px; height: 22px; margin-left: 3px; fill: var(--torch); }
.qp-text { display: grid; gap: 3px; flex: 1; min-width: 0; }
.qp-text b { font: 900 clamp(1rem, 4.6vw, 1.15rem)/1 var(--font-display); letter-spacing: -0.02em; text-transform: uppercase; white-space: nowrap; }
.qp-text span { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.8; }
/* Someone's already waiting: how many, with a live dot, on the right. */
.qp-waiting { display: inline-flex; align-items: center; gap: 6px; flex: none; padding-right: 6px; font: 700 0.75rem/1 var(--font-mono); white-space: nowrap; }
.qp-waiting::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #0d7a3e; animation: qp-live 1.2s ease-in-out infinite; }
@keyframes qp-live { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .quick-play { transition: none; } .qp-waiting::before { animation: none; } }

/* Holiday vaults: while a holiday drop is on, its seasonal vault sits under Quick play,
   in the drop's colours (--hv) with its diamond icon. */
.holiday-vaults { position: relative; z-index: 1; display: grid; gap: 8px; justify-self: start; width: min(100%, 480px); }
.holiday-vault {
  display: grid;
  gap: 10px;
  padding: 10px 12px 12px 10px;
  border-radius: 18px;
  border: 1px solid color-mix(in oklab, var(--hv-accent) 60%, transparent);
  background: linear-gradient(100deg, color-mix(in oklab, var(--hv) 22%, var(--slab)), var(--slab) 75%);
  color: var(--bone);
  text-align: left;
  transition: border-color 0.15s ease;
}
.hv-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.holiday-vault:hover { border-color: var(--hv-accent); }
.hv-art { position: relative; flex: none; display: grid; }
.holiday-vault .icon { --size: 50px; }
/* The daily 2×, stamped on the icon like the playlist of the week's; a tick once used. */
.hv-mult {
  position: absolute;
  right: -6px;
  bottom: -4px;
  z-index: 3;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--torch);
  color: var(--torch-ink);
  font: 900 0.72rem/1 var(--font-display);
  box-shadow: 0 0 0 2px var(--slab);
}
.holiday-vault.is-used .hv-mult { background: var(--moss); }
.hv-deal { font-size: 0.78rem; font-weight: 600; color: var(--torch); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holiday-vault.is-used .hv-deal { color: var(--ash); font-weight: 500; }
.hv-text { display: grid; gap: 3px; flex: 1; min-width: 0; }
.hv-eyebrow { font: 700 0.64rem/1.2 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--hv-accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hv-text b { font: 900 1.1rem/1.05 var(--font-display); letter-spacing: -0.01em; color: var(--hv); }
/* Solo or duel: two equal buttons under the name. */
.hv-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hv-go, .hv-duel { min-height: 44px; padding: 0 14px; border-radius: 999px; font: 700 0.85rem/1 var(--font-display); transition: transform 0.1s ease, filter 0.15s ease; }
.hv-go { border: 0; background: var(--hv); color: var(--torch-ink); }
.hv-duel { border: 1.5px solid var(--hv); background: transparent; color: var(--hv); }
.hv-go:hover, .hv-duel:hover { filter: brightness(1.12); }
.hv-go:active, .hv-duel:active { transform: scale(0.98); }
@media (prefers-reduced-motion: reduce) { .holiday-vault, .hv-go, .hv-duel { transition: none; } }

/* Playlist of the week: this week's spotlight genre, in the blue corner's colour, with
   its covers and the double-notes deal. Green once you've cleared it. */
.weekly {
  --wk: var(--blue);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid color-mix(in oklab, var(--wk) 55%, var(--edge));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in oklab, var(--wk) 16%, transparent), transparent 60%), var(--slab);
}
.weekly.is-cleared { --wk: var(--moss); }
.weekly-art { position: relative; flex: none; display: grid; width: 104px; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--vinyl); box-shadow: 0 10px 24px -12px #000; }
.weekly-art.is-mosaic { grid-template-columns: 1fr 1fr; }
.weekly-art img { width: 100%; height: 100%; object-fit: cover; }
.weekly-mult {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--torch);
  color: var(--torch-ink);
  font: 900 0.9rem/1 var(--font-display);
  box-shadow: 0 0 0 2px var(--slab);
}
.weekly.is-cleared .weekly-mult { background: var(--moss); }
.weekly-body { display: grid; gap: 7px; min-width: 0; }
.weekly .eyebrow { color: var(--wk); }
.weekly h2 { margin: 0; font: 900 clamp(1.35rem, 5.5vw, 1.7rem)/1 var(--font-display); letter-spacing: -0.02em; }
.weekly-deal { margin: 0; font-size: 0.9rem; line-height: 1.4; color: color-mix(in oklab, var(--bone) 88%, var(--ash)); }
.weekly-deal b { color: var(--torch); }
.weekly-foot { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-top: 2px; }
.weekly-foot .btn { min-height: 42px; padding: 0 18px; }
@media (max-width: 400px) { .weekly { gap: 12px; padding: 14px 12px; } .weekly-art { width: 84px; } }

/* The daily challenge: today's ten songs, the same for everyone, one try. Its colour is
   the green of a song named at 1 second. Songs show as squares: green at 1 second,
   yellow at 2 to 4, orange at 7 or more, dark for a miss, outlined until played. */
:root { --daily: var(--moss); --sq-1: var(--moss); --sq-2: #f2c14e; --sq-3: var(--orange); --sq-miss: #2b2b36; }
.daily-squares { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.daily-squares li { aspect-ratio: 1; border-radius: 6px; border: 1.5px solid var(--edge-2); }
.daily-squares li.is-1, .daily-squares li.is-2, .daily-squares li.is-3, .daily-squares li.is-miss { border-color: transparent; }
.daily-squares li.is-1 { background: var(--sq-1); }
.daily-squares li.is-2 { background: var(--sq-2); }
.daily-squares li.is-3 { background: var(--sq-3); }
.daily-squares li.is-miss { background: var(--sq-miss); }
.daily-squares li.is-now { border-color: var(--bone); }
.daily-squares.is-small { gap: 3px; width: min(100%, 210px); }
.daily-squares.is-small li { border-radius: 4px; border-width: 1px; }
.daily-squares.is-big { gap: 8px; width: min(100%, 460px); margin-inline: auto; }
.daily-squares.is-big li { border-radius: 10px; animation: sq-pop 0.35s cubic-bezier(0.3, 1.6, 0.6, 1) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes sq-pop { from { transform: scale(0.4); opacity: 0; } }

.daily-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  justify-self: start;
  width: min(100%, 480px);
  padding: 14px 16px 16px;
  border-radius: 20px;
  border: 1px solid color-mix(in oklab, var(--daily) 50%, var(--edge));
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in oklab, var(--daily) 14%, transparent), transparent 60%), var(--slab);
}
.daily-card.is-done { border-color: var(--edge); }
.daily-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.daily-card .eyebrow { color: var(--daily); }
.daily-clock { font: 700 0.72rem/1 var(--font-mono); color: var(--ash); white-space: nowrap; }
.daily-card-title { margin: 0; font: 900 clamp(1.25rem, 5vw, 1.5rem)/1 var(--font-display); letter-spacing: -0.02em; }
.daily-card-line { margin: 0; font-size: 0.88rem; line-height: 1.4; color: color-mix(in oklab, var(--bone) 85%, var(--ash)); }
.daily-card-line b { color: var(--bone); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.daily-card-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.daily-card-actions .btn { min-height: 44px; padding: 0 16px; }
.btn.btn-daily { background: var(--daily); border-color: var(--daily); color: var(--torch-ink); }
.btn.btn-daily:hover:not(:disabled) { background: color-mix(in oklab, var(--daily) 85%, white); }
@media (prefers-reduced-motion: reduce) { .daily-squares.is-big li { animation: none; } }

/* The same deal on the playlist's Vault page, and how the run did against it. */
.weekly-note { padding: 10px 14px; border-radius: 14px; border: 1px solid color-mix(in oklab, var(--blue) 55%, var(--edge)); background: color-mix(in oklab, var(--blue) 10%, transparent); font-size: 0.9rem; line-height: 1.45; }
.weekly-note b { color: var(--blue); }
.weekly-result { margin: 0; font-weight: 600; color: var(--ash); }
.weekly-result.is-win { color: var(--torch); }

/* Phones: a smaller record and wordmark, so Quick play and the search fit on the first
   screen. Returning players (with a "Jump back in" row) skip the explainer. */
@media (max-width: 640px) {
  .home { gap: 26px; padding-top: 4px; }
  .hero { gap: 14px; }
  .hero .hero-deck { width: min(44vw, 220px); margin-bottom: calc(min(44vw, 220px) * -0.5); }
  .wordmark { font-size: clamp(2.5rem, 13vw, 4rem); }
  .lede { font-size: 0.95rem; line-height: 1.45; }
  .home:has(#recent:not([hidden])) .lede { display: none; }
  .quick-row, .holiday-vaults { width: 100%; justify-self: stretch; }
}

.search { display: grid; gap: 10px; position: relative; }
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  min-height: 60px;
  border-radius: var(--radius);
  background: var(--slab);
  border: 1px solid var(--edge);
}
.search-box:focus-within { border-color: var(--torch); background: var(--slab-2); }
.search-box svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--ash); stroke-width: 2; stroke-linecap: round; }
.search-box input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  font-size: 1.15rem;
  font-weight: 500;
}
.search-box input::placeholder { color: var(--ash); opacity: 0.8; }
.search-results {
  list-style: none;
  margin: 0;
  padding: 6px;
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--ground), black 25%);
  border: 1px solid var(--edge);
  display: grid;
  gap: 2px;
}
.search-results button {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
}
.search-results button:hover, .search-results button:focus-visible { background: var(--slab-2); }
.search-results b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.search-results span { color: var(--ash); font-size: 0.85rem; flex: none; }
.search-hint { margin: 0; color: var(--ash); }

.join-strip { display: grid; gap: 10px; }
.join-row { display: flex; gap: 10px; flex-wrap: wrap; }
.join-row input {
  width: 8.5ch;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--slab);
  border: 1px solid var(--edge);
  font: 600 1.15rem/1 var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.join-row input:focus { border-color: var(--torch); outline: none; }

/* Trending vaults: a swipeable, ranked row. */
.trending { display: grid; gap: 14px; min-width: 0; }
.trending-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.trending-head .section-title { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.trending-head .eyebrow { white-space: nowrap; }
.trending-head .flame { width: 0.9em; height: 0.9em; fill: var(--torch); }
.trending-row {
  list-style: none;
  margin: 0 -16px;
  padding: 4px 16px 8px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 148px;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  scrollbar-width: none;
}
.trending-row::-webkit-scrollbar { display: none; }
.trending-row li { scroll-snap-align: start; }
.trending-row button {
  width: 100%;
  height: 100%;
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 8px 8px 12px;
  border-radius: var(--radius);
  background: var(--slab);
  border: 1px solid var(--edge);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.trending-row button:hover { border-color: var(--torch); background: var(--slab-2); transform: translateY(-2px); }
.trending-row button.is-top { border-color: color-mix(in oklab, var(--torch) 60%, var(--edge)); box-shadow: 0 0 0 1px color-mix(in oklab, var(--torch) 25%, transparent), 0 10px 30px color-mix(in oklab, var(--torch) 14%, transparent); }
.trending-row .art { position: relative; display: block; margin-bottom: 6px; }
.trending-row img, .trending-row .ph { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--vinyl); }
.trending-row .rank {
  position: absolute;
  left: -2px;
  bottom: -10px;
  font: 900 2.5rem/1 var(--font-display);
  color: var(--ground);
  -webkit-text-stroke: 2px var(--bone);
  paint-order: stroke fill;
  text-shadow: 0 4px 14px rgb(0 0 0 / 0.6);
}
.trending-row .is-top .rank { -webkit-text-stroke-color: var(--torch); }
.trend-badge { position: absolute; top: 6px; right: 6px; padding: 3px 8px; border-radius: 999px; font: 700 0.7rem/1.2 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; }
.trend-badge.hot { background: var(--torch); color: var(--torch-ink); }
.trend-badge.new { background: var(--bone); color: var(--vinyl); }
.trend-badge.up { background: color-mix(in oklab, var(--moss) 85%, black); color: var(--vinyl); }
.trending-row b { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.trending-row .meta { font-size: 0.8rem; color: var(--ash); }
@media (prefers-reduced-motion: reduce) { .trending-row button { transition: none; } }

.dungeons { display: grid; gap: 16px; }
.dungeon-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.dungeon-grid button {
  width: 100%;
  height: 100%;
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 10px 10px 14px;
  border-radius: var(--radius);
  background: var(--slab);
  border: 1px solid var(--edge);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.dungeon-grid button:hover { border-color: var(--torch); background: var(--slab-2); transform: translateY(-2px); }
.dungeon-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; margin-bottom: 6px; background: var(--vinyl); }
.dungeon-grid b { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.dungeon-grid span { font-size: 0.82rem; color: var(--ash); }
.dungeon-grid .pick { padding: 16px 14px; min-height: 64px; align-content: center; }
.dungeon-grid .pick b { font: 700 0.95rem/1.2 var(--font-display); }

/* ---------- artist page ----------
   A header (back, cover tile, name), a Vault / Duel switch, and one mode at a time:
   facts, fan level, clip worth and the top of the leaderboard for the Vault; stakes,
   a party card and the duel board for Duel. Each tab's main button is pinned to the
   bottom of the screen. */
.artist { display: grid; gap: 18px; padding-top: 4px; }
.artist-loading { display: flex; align-items: center; gap: 18px; padding-block: 40px; color: var(--ash); }
.artist-loading p { margin: 0; max-width: 38ch; }
.artist-body { display: grid; gap: 18px; }
.artist-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.artist-head .round-btn { flex: none; }
.artist-tile {
  position: relative; flex: none; display: flex; align-items: flex-end; width: 56px; height: 56px; padding: 6px; box-sizing: border-box;
  border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, #3a1f28, #1f2a3a);
  font: 900 0.95rem/1 var(--font-display); color: var(--torch);
}
.artist-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.artist-id { display: grid; gap: 4px; min-width: 0; }
.artist-name { margin: 0; font: 900 1.65rem/1 var(--font-display); letter-spacing: -0.03em; overflow-wrap: anywhere; }
.artist-id .eyebrow { margin: 0; }
.facets { margin: 0; }

/* The Vault / Duel switch: a pill with the chosen side lit gold. */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; border: 1px solid var(--edge); background: var(--slab); }
.mode-switch button { min-height: 44px; border: 0; border-radius: 999px; background: none; color: var(--ash); font: 700 0.88rem/1 var(--font-display); }
.mode-switch button:hover { color: var(--bone); }
.mode-switch button[aria-selected="true"] { background: var(--torch); color: var(--torch-ink); }

.mode-panel { display: grid; gap: 18px; }
.mode-panel[hidden] { display: none; }
.mode-lede { margin: 0; font-size: 0.95rem; line-height: 1.45; color: var(--ash); }
.mode-panel .weekly-note { margin: 0; color: var(--bone); }
.section-head .hint { font-size: 0.78rem; color: var(--ash); }

/* Three facts about the vault, as tiles. */
.fact-tiles { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fact-tiles div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; padding: 12px; border-radius: 16px; background: var(--slab); min-width: 0; }
.fact-tiles dd { margin: 0; font: 700 1.15rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.fact-tiles dt { font-size: 0.75rem; color: var(--ash); }
.fact-tiles .is-hearts dd { color: var(--blood); }
.fact-tiles .is-gold dd { color: var(--torch); }

/* Your fan level for this vault. */
.fan-card { display: grid; gap: 10px; padding: 16px 18px; border-radius: 20px; border: 1px solid var(--torch); background: var(--slab); }
.fan-card .fan-title { font-size: 1rem; }
.fan-card p { margin: 0; font-size: 0.82rem; color: var(--ash); }
.fan-card .fan-kit { color: var(--bone); }

/* What each clip length is worth: one row of chips, 1 second lit. */
.clip-worth { display: grid; gap: 8px; }
/* What a right answer is worth at each clip length: a plain bar chart, nothing to tap. */
.worth-bars { list-style: none; margin: 0; padding: 0 0 8px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: end; border-bottom: 1px solid var(--edge); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.worth-bars li { display: grid; justify-items: center; align-content: end; gap: 4px; }
.worth-bars .pct { font-size: 0.72rem; font-weight: 700; color: var(--bone); }
.worth-bars .bar { width: 100%; max-width: 34px; height: calc(var(--v) * 44px); border-radius: 4px 4px 0 0; background: color-mix(in oklab, var(--torch) calc(var(--v) * 100%), var(--edge-2)); }
.worth-scale { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; font: 600 0.7rem/1 var(--font-mono); color: var(--ash); text-align: center; }
.worth-note { margin: 0; font-size: 0.78rem; color: var(--ash); }

/* Stakes, one row each: a coloured dot, the name (and anyone waiting), then the notes
   it costs to enter and the notes the winner takes. */
.stakes { display: grid; gap: 10px; }
.stake-list { display: grid; gap: 6px; }
.stake-opt {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px;
  border-radius: 16px; border: 1px solid var(--edge); background: var(--slab); color: var(--bone); text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.stake-opt:hover:not(:disabled) { border-color: var(--edge-2); }
.stake-opt .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--sc); }
.stake-opt .nm { flex: 1; min-width: 0; display: grid; gap: 4px; }
.stake-opt .nm b { font: 700 0.88rem/1.1 var(--font-display); }
.stake-opt .sub { font-size: 0.72rem; color: var(--ash); }
.stake-opt .cash { display: grid; grid-template-columns: 5.6em 5.6em; gap: 10px; text-align: right; }
.stake-opt .cash > span { display: grid; gap: 3px; justify-items: end; }
.stake-opt .cash small { font: 600 0.6rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ash); }
.stake-opt .cash b { display: inline-flex; align-items: center; gap: 4px; font: 700 0.82rem/1 var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stake-opt .cash .note-ico { width: 1.05em; height: 1.05em; padding: 0.18em; }
.stake-opt .cash .win b { color: var(--torch); }
.stake-opt .cash .win b.none { color: var(--ash); }
.stake-opt .waiting { display: inline-flex; align-items: center; gap: 6px; font: 600 0.72rem/1 var(--font-mono); color: var(--moss); white-space: nowrap; }
.stake-opt .waiting::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--moss); animation: qp-live 1.2s ease-in-out infinite; }
.stake-opt .need { font-size: 0.72rem; font-weight: 700; color: var(--blood); white-space: nowrap; }
.stake-balance { display: inline-flex; align-items: center; gap: 4px; }
.stake-balance .note-ico, #match-note .note-ico { width: 1.05em; height: 1.05em; padding: 0.18em; vertical-align: -0.2em; margin-right: 2px; }
.stake-opt[aria-checked="true"] { border-color: var(--torch); background: var(--slab-2); }
.stake-opt[aria-checked="true"] .dot { box-shadow: 0 0 0 3px color-mix(in oklab, var(--torch) 35%, transparent); }
.stake-opt:disabled { opacity: 0.45; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .stake-opt .waiting::before { animation: none; } }
.queue-status { display: flex; align-items: center; gap: 8px; margin: 0; }
.queue-status .live-dot { width: 8px; height: 8px; }

/* Play friends instead: a free party, straight to the lobby. */
.friends-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; border: 1px solid var(--edge); background: var(--slab); }
.friends-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.friends-text b { font: 700 0.9rem/1.2 var(--font-display); }
.friends-text span { font-size: 0.78rem; color: var(--ash); }
.friends-card .btn { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 0.82rem; }

/* The top of a leaderboard, as rows; the whole board opens below it. */
.mini-board { display: grid; gap: 10px; }
.mini-board .section-head .eyebrow { white-space: nowrap; }
.mini-board .link-btn { justify-self: start; color: var(--torch); }
.top-rows { list-style: none; margin: 0; padding: 4px 16px; display: grid; border-radius: 20px; background: var(--slab); }
.top-rows li { display: flex; align-items: center; gap: 12px; min-height: 52px; font-variant-numeric: tabular-nums; }
.top-rows li + li { border-top: 1px solid var(--edge); }
.top-rows .rank { width: 1.2em; font: 700 0.9rem/1 var(--font-mono); color: var(--ash); }
.top-rows li:first-child .rank { color: var(--torch); }
.top-rows .nm { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-rows .sub { font: 500 0.75rem/1 var(--font-mono); color: var(--ash); white-space: nowrap; }
.top-rows .val { min-width: 3.5em; text-align: right; font: 700 0.92rem/1 var(--font-mono); }
.top-rows .is-me .nm { color: var(--torch); }

/* Each tab's main button, pinned to the bottom of the screen over a fade. */
.cta-dock {
  position: sticky; bottom: 0; z-index: 5; display: grid; justify-items: center; gap: 8px;
  margin-inline: -16px; padding: 22px 16px max(18px, env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--ground) 30%);
}
.cta-dock .btn { width: 100%; max-width: 480px; min-height: 56px; border-radius: 999px; }
.cta-note { font-size: 0.78rem; color: var(--ash); text-align: center; }
.cta-note:empty { display: none; }
@media (min-width: 640px) { .cta-dock { margin-inline: -28px; padding-inline: 28px; } }

.seg-group { display: grid; gap: 6px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
/* Chips: raised and quiet until picked, then lit in house-light white. */
.seg button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--slab-2);
  font-weight: 500;
  font-size: 0.92rem;
}
.seg button:hover { border-color: var(--edge-2); }
.seg button[aria-checked="true"] { background: var(--bone); color: var(--torch-ink); border-color: var(--bone); font-weight: 700; }

.board { display: grid; gap: 16px; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--slab); border: 1px solid var(--edge); }
.tabs button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; color: var(--ash); }
.tabs button[aria-selected="true"] { background: var(--bone); color: var(--torch-ink); }
.board-body { overflow-x: auto; }
.board-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board-table th {
  text-align: left;
  font: 700 0.68rem/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ash);
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--edge);
}
.board-table td { padding: 12px 10px; border-bottom: 1px solid color-mix(in oklab, var(--edge) 50%, transparent); }
.board-table th.num, .board-table td.num { text-align: right; font-family: var(--font-mono); }
.board-table td.rank { width: 3ch; color: var(--ash); font-family: var(--font-mono); }
.board-table tr:nth-child(1) td.rank { color: var(--torch); }
.board-table .who { font-weight: 600; overflow-wrap: anywhere; }
.board-table tr.is-me td { background: color-mix(in oklab, var(--torch) 10%, transparent); }
.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font: 600 0.68rem/1.4 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--torch);
  color: var(--torch-ink);
  vertical-align: 2px;
}
.empty { margin: 0; padding: 24px 0; color: var(--ash); max-width: 44ch; }

/* ---------- the turntable ---------- */
.play { display: grid; gap: 18px; padding-top: 4px; }
.hud { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.play[data-mode="vault"] .hud-duel, .play[data-mode="duel"] .hud-vault { display: none; }
/* The daily challenge keeps the clip lengths (.hud-daily) and has its own HUD. */
.play[data-mode="daily"] .hud-duel, .play[data-mode="daily"] .hud-vault:not(.hud-daily) { display: none; }
.play:not([data-mode="daily"]) .daily-hud { display: none; }
.daily-hud { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.daily-hud .daily-squares { justify-self: center; }
.hud-floor, .hud-score { display: grid; gap: 2px; }
.hud-score { text-align: right; }
.floor-num { font-family: var(--font-display); display: flex; align-items: baseline; gap: 6px; }
.floor-num b { font-size: 2.1rem; line-height: 1; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.floor-num span { color: var(--ash); font: 700 0.95rem/1 var(--font-mono); white-space: nowrap; }
#g-score { font: 600 1.6rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.hearts { display: flex; gap: 6px; }
.hearts svg { width: 26px; height: 26px; }
.hearts .full { fill: var(--blood); }
.hearts .lost { fill: none; stroke: var(--ash); stroke-width: 1.5; opacity: 0.5; }
.hearts .breaking { animation: heartbreak 0.7s ease; }
@keyframes heartbreak {
  0% { transform: scale(1); fill: var(--blood); }
  30% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.descent { display: grid; gap: 6px; }
.descent-track { position: relative; height: 6px; border-radius: 999px; background: var(--edge); }
.descent-track .descent-fill { border-radius: 999px; }
/* The next Guardian, a gold tick on the bar. */
.descent-mark { position: absolute; top: -4px; width: 2px; height: 14px; margin-left: -1px; border-radius: 1px; background: #ffd36b; }
.descent-labels { display: flex; justify-content: space-between; gap: 8px; font: 700 0.62rem/1.2 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); }
.next-guardian { color: #ffd36b; text-align: center; }
.play.is-guardian .next-guardian { color: var(--blood); }

/* The Vault's HUD as one card: hearts, floor and score on a line, the descent under them. */
.vault-hud { display: grid; gap: 10px; padding: 12px 14px; border-radius: 20px; background: var(--slab); }
.vault-hud .hud { gap: 10px; }
.vault-hud .hud-floor, .vault-hud .hud-score { display: flex; align-items: baseline; gap: 6px; }
.vault-hud .floor-num b { font-size: 1.4rem; }
.vault-hud .floor-num span { font-size: 0.75rem; }
.vault-hud #g-score { font-size: 1.1rem; font-weight: 700; }
.vault-hud .hearts { gap: 3px; }
.vault-hud .hearts svg { width: 20px; height: 20px; }
.descent-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--torch), color-mix(in oklab, var(--torch), var(--blood) 50%)); transition: width 0.8s ease; }

.scoreboard { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-width: 0; }
.scoreboard li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--slab);
  border: 1px solid var(--edge);
  font-size: 0.9rem;
  min-width: 0;
}
.scoreboard .nm { font-weight: 600; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Each player wears their corner colour (--c): you blue, them orange. */
.scoreboard .pts { font: 700 0.95rem/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--c, var(--ash)); }
.scoreboard .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--edge-2); flex: none; }
.scoreboard li.locked .dot { background: var(--c, var(--torch)); box-shadow: 0 0 0 4px color-mix(in oklab, var(--c, var(--torch)) 25%, transparent); }
.scoreboard li.is-me { border-color: color-mix(in oklab, var(--c, var(--torch)) 60%, var(--edge)); }
.scoreboard li.gone { opacity: 0.4; }
.scoreboard li.spectator { opacity: 0.75; }
.spec-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border: 1px solid var(--edge); border-radius: 999px; font: 600 0.62rem/1.4 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); vertical-align: middle; }
#do-standings li.spectator { opacity: 0.75; }

.stage { display: grid; justify-items: center; gap: 12px; padding-block: 4px; }
.disc {
  position: relative;
  width: min(68vw, 300px);
  max-width: 100%;
  aspect-ratio: 1;
}
.disc.mini { width: 56px; }
.vinyl {
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, #0b090d 0 1.5px, #1b1820 1.5px 3px),
    var(--vinyl);
  box-shadow: 0 30px 60px -24px rgb(0 0 0 / 0.9), 0 0 0 1px rgb(255 255 255 / 0.08), inset 0 0 0 2px #050406;
}
.disc.mini .vinyl { inset: 0; }
.label {
  position: absolute;
  inset: 31%;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--torch);
  color: var(--torch-ink);
  font: 900 clamp(1.1rem, 5vw, 1.7rem)/1 var(--font-display);
  box-shadow: inset 0 0 0 3px color-mix(in oklab, var(--torch), black 18%);
}
.label img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.label::after {
  content: '';
  position: absolute;
  width: 9%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--vinyl);
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.15);
}
.disc.mini .label { inset: 32%; }
.sheen {
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 20deg, transparent 0 8%, rgb(255 255 255 / 0.09) 13%, transparent 20% 52%, rgb(255 255 255 / 0.07) 60%, transparent 68%);
  mask: radial-gradient(circle, transparent 0 33%, black 34%);
}
.disc.spinning .vinyl { animation: spin 1.8s linear infinite; }
.disc.loading .vinyl { animation: spin 5s linear infinite; opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 2.5; }
.ring-track { stroke: var(--slab-2); }
.ring-fill { stroke: var(--torch); stroke-linecap: round; stroke-dasharray: 301.6; stroke-dashoffset: 301.6; }
.disc.hit .ring-fill { stroke: var(--moss); }
.disc.miss .ring-fill { stroke: var(--blood); }
.tap-to-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  padding: 12px 20px;
  border-radius: 999px;
  border: 0;
  background: var(--bone);
  color: var(--vinyl);
  font-weight: 700;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.5);
}
.tier-note { margin: 0; min-height: 1.4em; font: 500 0.82rem/1.4 var(--font-mono); color: var(--ash); text-align: center; }
.tier-note.is-new { color: var(--torch); animation: pulse 1.2s ease 2; }
@keyframes pulse { 50% { opacity: 0.4; } }

.timer { height: 6px; border-radius: 6px; background: var(--slab-2); overflow: hidden; }
.timer-fill { height: 100%; width: 100%; background: var(--bone); transform-origin: left; transform: scaleX(1); }
.timer.is-low .timer-fill { background: var(--blood); }

.prompt { margin: 0; text-align: center; font-weight: 600; color: var(--ash); min-height: 1.5em; }

.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .options { grid-template-columns: minmax(0, 1fr); } }
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: var(--slab);
  text-align: left;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.25;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.2s ease, transform 0.1s ease;
}
.option .title { min-width: 0; overflow-wrap: anywhere; }
.option kbd { flex: none; }
/* Hover only where there's a real pointer: on a phone, the tap that moves to the next
   floor leaves a "hover" behind on whichever new box lands under the finger. */
@media (hover: hover) { .option:hover:not(:disabled) { border-color: var(--torch); background: var(--slab-2); } }
.option:active:not(:disabled) { transform: scale(0.985); }
.option:disabled { cursor: default; }
.options.is-waiting .option { opacity: 0.5; }
.option.is-picked { border-color: var(--bone); background: var(--slab-2); opacity: 1 !important; }
.option.is-right { border-color: var(--moss); background: color-mix(in oklab, var(--moss) 20%, transparent); opacity: 1 !important; }
.option.is-wrong { border-color: var(--blood); background: color-mix(in oklab, var(--blood) 20%, transparent); opacity: 1 !important; }
.option.is-dim { opacity: 0.35; }
/* After a duel's reveal, who tapped each answer: their icons on its top edge. */
.option { position: relative; }
.pickers { position: absolute; top: -9px; right: 10px; display: flex; flex-direction: row-reverse; pointer-events: none; }
.picker .icon { margin-left: -5px; box-shadow: 0 0 0 2px var(--ground); }
.picker.is-me .icon { box-shadow: 0 0 0 2px var(--bone); }
.option.is-dim:has(.pickers) { opacity: 0.6; }

.reveal {
  display: grid;
  gap: 6px;
  padding: 20px 22px 22px;
  border-radius: 22px;
  background: var(--slab);
  border: 1px solid var(--edge);
}
.verdict { margin: 0; font: 700 0.75rem/1.2 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; }
.verdict.hit { color: var(--moss); }
.verdict.miss { color: var(--blood); }
.reveal-title { margin: 0; font: 900 clamp(1.4rem, 6vw, 2.1rem)/1.05 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.reveal-meta { margin: 0; color: var(--ash); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.reveal-meta a { color: var(--ash); text-decoration-color: var(--edge); text-underline-offset: 3px; }
.reveal-meta a:hover { color: var(--bone); }
.reveal-meta .reveal-save { display: contents; }
.round-results { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.round-results li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid color-mix(in oklab, var(--edge) 60%, transparent);
  font-variant-numeric: tabular-nums;
}
.round-results .mark { font-weight: 700; }
.round-results .mark.hit { color: var(--moss); }
.round-results .mark.miss { color: var(--blood); }
.round-results .nm { font-weight: 600; overflow-wrap: anywhere; }
.round-results .ms { font: 500 0.85rem/1 var(--font-mono); color: var(--ash); }
.round-results .pts { font: 600 0.95rem/1 var(--font-mono); min-width: 5ch; text-align: right; }
.round-results .picked { display: block; margin-top: 3px; font-weight: 500; font-size: 0.8rem; color: var(--ash); }
.round-results .mult { margin-left: 5px; font-size: 0.75rem; color: var(--torch); }
.fast { color: var(--torch); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-left: 6px; }
.advance { position: relative; overflow: hidden; justify-self: start; margin-top: 12px; }
.advance-fill { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--torch-ink); opacity: 0.35; transform-origin: left; transform: scaleX(0); }
.advance-note { margin: 10px 0 0; color: var(--ash); font-size: 0.9rem; }

.play-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding-top: 8px; }
.play-foot .link-btn { display: inline-flex; gap: 8px; align-items: center; }
/* Footer: replay, what you're playing, and Tap out as a quiet pill. */
.play-foot .round-btn:disabled { opacity: 0.4; cursor: default; }
.play-foot .round-btn:disabled:hover { border-color: var(--edge); color: var(--bone); }
.foot-label { flex: 1; min-width: 0; text-align: center; font: 700 0.66rem/1.2 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-foot:has(#btn-skip:not([hidden])) .foot-label { display: none; }
.foot-quit { min-height: 44px; padding: 0 18px; border-radius: 999px; border-color: var(--edge); color: var(--ash); font-weight: 600; font-size: 0.85rem; }
.foot-quit:hover { border-color: var(--blood); color: var(--blood); }
.volume { margin-left: 0; }

/* Volume, for computers only: phones and tablets have their own buttons (and iOS
   ignores a page's volume anyway). */
.volume { display: none; align-items: center; gap: 8px; margin-left: auto; }
@media (hover: hover) and (pointer: fine) { .volume { display: inline-flex; } }
.vol-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ash); }
.vol-btn:hover { color: var(--bone); background: var(--slab); }
.vol-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vol-btn .spk { fill: currentColor; }
.vol-btn .cross, .vol-btn.is-muted .waves { display: none; }
.vol-btn.is-muted .cross { display: inline; }
.volume input[type="range"] {
  --fill: 100%;
  appearance: none;
  width: 96px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bone) var(--fill), var(--edge) var(--fill));
  cursor: pointer;
}
.volume input[type="range"]::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--bone); border: 0; }
.volume input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--bone); border: 0; }
.volume input[type="range"]:focus-visible { outline: 2px solid var(--torch); outline-offset: 6px; }

/* A party's bonus round: the record and its note go gold-bright. */
.play.is-bonus .label { background: var(--bone); color: var(--torch-ink); box-shadow: inset 0 0 0 3px var(--torch), 0 0 28px color-mix(in oklab, var(--torch) 60%, transparent); }
.play.is-bonus .ring-fill { stroke: var(--bone); }
.play.is-bonus .tier-note { color: var(--torch); font-weight: 700; }

/* Saved songs: a heart that fills in. With a label, it's a pill (on the reveal). */
.save-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ash); flex: none; }
.save-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.save-btn:hover { color: var(--bone); }
.save-btn.is-on { color: var(--blood); }
.save-btn.is-on svg { fill: currentColor; }
.save-btn.has-label { display: inline-flex; gap: 6px; width: auto; height: auto; padding: 0; border-radius: 0; font-size: inherit; }
.save-btn.has-label svg { width: 17px; height: 17px; }
.save-btn.has-label .save-label { text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 3px; }
.save-btn.has-label.is-on .save-label { color: var(--bone); text-decoration: none; }

/* ---------- results ---------- */
.over { display: grid; gap: 20px; padding-top: 20px; }
.over-title { margin: 0; font: 900 clamp(2rem, 9vw, 3.4rem)/1 var(--font-display); letter-spacing: -0.03em; text-wrap: balance; overflow-wrap: anywhere; }
.over-sub { margin: 0; max-width: 48ch; font-size: 1.05rem; color: var(--ash); }
.stats { margin: 6px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--edge); }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats div:nth-child(3) { padding-left: 0; border-left: 0; } }
.stats div { padding: 16px 12px 16px 0; display: grid; gap: 6px; min-width: 0; }
.stats div + div { padding-left: 16px; border-left: 1px solid var(--edge); }
.stats dt { font: 700 0.66rem/1.2 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash); }
.stats dd { margin: 0; font: 700 clamp(1.3rem, 5vw, 1.8rem)/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.pb { margin: 0; justify-self: start; padding: 6px 14px; border-radius: 999px; background: var(--torch); color: var(--torch-ink); font-weight: 700; font-size: 0.9rem; }
.missed { display: grid; gap: 12px; margin-top: 8px; }
.missed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.missed-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; }
.missed-list img, .missed-list .ph { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; background: var(--vinyl); }
.missed-list b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.missed-list li > div > span { color: var(--ash); font-size: 0.88rem; }
/* Song lists you can save from: a link out and a heart on the end of each row. */
.song-list li { grid-template-columns: 52px minmax(0, 1fr) auto; }
.song-actions { display: flex; align-items: center; gap: 2px; }
.song-link { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ash); text-decoration: none; }
.song-link:hover { color: var(--bone); background: var(--slab); }
.song-list .named { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; font-size: 0.8rem; }
.song-list .named .icon { margin-left: -6px; box-shadow: 0 0 0 2px var(--ground); }
.song-list .named .icon:first-of-type { margin-left: 2px; }
.setlist, .saved-songs { display: grid; gap: 12px; margin-top: 8px; }
.over-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 12px; }

/* A Vault run's results: a short headline, three stat tiles, one gold card for what
   the run earned, the songs, and the next move pinned to the bottom. */
.vault-over { gap: 18px; padding-top: 12px; }
.over-head { display: grid; gap: 6px; }
.over-head .eyebrow, .over-head .over-sub { margin: 0; }
.vault-over .over-title { font-size: clamp(1.7rem, 7.5vw, 2.4rem); line-height: 1.05; }
.vault-over .over-sub { font-size: 0.92rem; }
.reward-card { gap: 12px; }
.reward-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reward-notes { display: inline-flex; align-items: center; gap: 8px; font: 700 1.1rem/1 var(--font-mono); color: var(--torch); }
.reward-notes .note-ico { width: 1.3em; height: 1.3em; }
.reward-xp { margin-left: auto; font: 700 0.9rem/1 var(--font-mono); }
.reward-card.xp-earned { padding: 16px 18px; border-bottom: 1px solid var(--torch); }
.over-dock { margin-top: 4px; }
.dock-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; max-width: 480px; }
.dock-row .btn { min-height: 48px; border-radius: 999px; padding: 0 12px; font-size: 0.85rem; }
.btn-outline.is-quiet { border-color: var(--edge); color: var(--ash); }
.btn-outline.is-quiet:hover { color: var(--bone); border-color: var(--edge-2); }

.podium { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--edge); }
.podium li {
  display: grid;
  grid-template-columns: 3ch minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--edge);
  font-variant-numeric: tabular-nums;
}
.podium .place { font: 700 1.1rem/1 var(--font-mono); color: var(--ash); }
.podium li:first-child .place { color: var(--torch); }
.podium .nm { font-weight: 600; font-size: 1.1rem; overflow-wrap: anywhere; }
.podium .nm small { display: block; color: var(--ash); font-weight: 400; font-size: 0.85rem; }
.podium .pts { font: 700 1.15rem/1 var(--font-mono); }
.podium.compact li { padding: 10px 0; }
.podium.compact .place { font-size: 1.2rem; }
.podium.compact .nm { font-size: 1rem; }
.podium.compact .pts { font-size: 1.05rem; }

/* Party medals: 1st to 3rd at the end of a party. */
.podium li.has-medal { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; }
.podium li.is-gold .pts { color: #ffd45c; }
.medal {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.35), inset 0 -3px 6px rgb(0 0 0 / 0.25), 0 6px 16px rgb(0 0 0 / 0.45);
}
.medal b { position: relative; z-index: 1; font: 900 1rem/1 var(--font-display); color: rgb(0 0 0 / 0.7); text-shadow: 0 1px 0 rgb(255 255 255 / 0.35); }
.medal-gold { background: radial-gradient(circle at 32% 26%, #fff7cf, #ffd45c 38%, #c8901a 78%, #8a5a08); }
.medal-silver { background: radial-gradient(circle at 32% 26%, #ffffff, #dde1ea 38%, #9aa1b0 78%, #5e6476); }
.medal-bronze { background: radial-gradient(circle at 32% 26%, #ffe3c9, #e29d61 38%, #a8622c 78%, #6b3a14); }
.medal::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(115deg, transparent 40%, rgb(255 255 255 / 0.65) 50%, transparent 60%);
  transform: translateX(-60%);
  animation: medal-shine 3.2s ease-in-out infinite;
}
.medal-silver::after { animation-delay: 0.4s; }
.medal-bronze::after { animation-delay: 0.8s; }
@keyframes medal-shine { 0%, 55% { transform: translateX(-60%); } 85%, 100% { transform: translateX(60%); } }
@media (prefers-reduced-motion: reduce) { .medal::after { animation: none; display: none; } }

/* Party standings and the next round's countdown, between a party's rounds. */
.party-table { display: grid; gap: 10px; }
.next-set { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--slab); }
.next-set[hidden] { display: none; }
.next-set-track { height: 4px; border-radius: 999px; background: var(--vinyl); overflow: hidden; }
.next-set-track span { display: block; height: 100%; background: var(--torch); transform-origin: left; transition: transform 0.2s linear; }
.next-set-row { display: flex; align-items: center; gap: 12px; }
.next-set-row > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.next-set-row b { font-weight: 600; font-size: 1.1rem; overflow-wrap: anywhere; }
.next-set-row img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.next-set-clock { font: 600 1.4rem/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--torch); }
@media (prefers-reduced-motion: reduce) { .next-set-track span { transition: none; } }

/* ---------- lobby ---------- */
.lobby { display: grid; gap: 22px; padding-top: 20px; }
.room-code {
  display: flex;
  align-items: center;
  gap: 0.18em;
  justify-self: start;
  padding: 16px 22px;
  border-radius: 20px;
  border: 1px solid var(--torch);
  background: var(--slab);
  font: 700 clamp(2rem, 9vw, 2.6rem)/1 var(--font-mono);
  color: var(--torch);
  letter-spacing: 0.06em;
}
.room-code::before { content: 'Party code'; margin-right: 14px; font: 700 0.68rem/1.2 var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ash); max-width: 5ch; }
.lobby-settings { margin: -6px 0 0; color: var(--ash); }
.share { display: grid; gap: 10px; }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; }
.share-row input {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--slab);
  border: 1px solid var(--edge);
  font: 500 0.92rem/1 var(--font-mono);
  color: var(--ash);
}
.share-hint { margin: 0; color: var(--ash); font-size: 0.9rem; max-width: 60ch; overflow-wrap: anywhere; }
.share-hint code { font-family: var(--font-mono); color: var(--bone); }
.lobby-players { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lobby-players li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--slab);
  border: 1px solid var(--edge);
}
.lobby-players .nm { font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lobby-players .tag { font: 700 0.66rem/1.2 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); }
/* A party: everyone as a grid of avatars, four across; your ring is gold. */
.lobby-players.is-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 8px; }
.lobby-players.is-grid li { display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; text-align: center; }
.lobby-players.is-grid .icon { box-shadow: 0 0 0 3px var(--ground), 0 0 0 5px var(--edge); margin: 0; }
.lobby-players.is-grid li.is-me .icon { box-shadow: 0 0 0 3px var(--ground), 0 0 0 5px var(--torch); }
.lobby-players.is-grid .nm { flex: none; font-size: 0.82rem; font-weight: 500; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby-players.is-grid .tag { margin-top: -4px; font-size: 0.58rem; }
.lobby-players .tag.host { color: var(--torch); }
.lobby-players .tag.locked { color: var(--bone); }

/* The party's lock-in countdown: stays pinned to the bottom while you scroll the ballot. */
.lockin {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--torch);
  border-radius: 16px;
  background: color-mix(in oklab, var(--torch) 8%, var(--dusk));
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.55);
}
.lockin[hidden] { display: none; }
.lockin-track { height: 6px; border-radius: 999px; background: var(--vinyl); overflow: hidden; }
.lockin-track span { display: block; height: 100%; background: var(--torch); transform-origin: left; transition: transform 0.2s linear; }
.lockin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lockin-text { display: grid; gap: 2px; min-width: 0; }
.lockin-text b { font: 700 1.3rem/1.1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--torch); }
.lockin-text span { font-size: 0.85rem; color: var(--ash); }
.lockin .btn { flex-shrink: 0; }
#btn-lockin { background: var(--torch); color: var(--torch-ink); border-color: var(--torch); }
#btn-lockin.is-locked { background: transparent; color: var(--torch); }
.lockin #btn-lockin-cancel { justify-self: start; font-size: 0.85rem; }
.lockin.is-urgent { border-color: var(--blood); }
.lockin.is-urgent .lockin-track span { background: var(--blood); }
.lockin.is-urgent .lockin-text b { color: var(--blood); animation: lockin-pulse 1s ease-in-out infinite; }
@keyframes lockin-pulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) {
  .lockin-track span { transition: none; }
  .lockin.is-urgent .lockin-text b { animation: none; }
}
.lobby-players li.gone { opacity: 0.45; }
.lobby-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.lobby-wait { margin: 0; color: var(--ash); }

/* ---------- dialog + toast ---------- */
.name-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 26px;
  border-radius: 24px;
  border: 1px solid var(--edge);
  background: var(--slab);
  color: var(--bone);
}
.name-dialog::backdrop { background: rgb(5 4 8 / 0.7); backdrop-filter: blur(4px); }
.name-dialog form { display: grid; gap: 12px; }
.name-dialog h2 { margin: 0; font: 900 1.4rem/1.1 var(--font-display); letter-spacing: -0.02em; }
.name-dialog p { margin: 0 0 6px; color: var(--ash); }
.name-dialog input {
  min-height: 50px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: var(--slab);
  font-size: 1.1rem;
  font-weight: 600;
}
.name-dialog input:focus { outline: none; border-color: var(--torch); }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 10;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--bone);
  color: var(--vinyl);
  font-weight: 600;
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.5);
}

@media (prefers-reduced-motion: reduce) {
  :root { transition: none; }
  .disc.spinning .vinyl, .disc.loading .vinyl, .tier-note.is-new, .hearts .breaking { animation: none; }
  .btn, .option, .dungeon-grid button { transition: none; }
}

/* ---------- matchmaking ---------- */
.queue-roam { margin: 0; font-size: 0.82rem; color: var(--ash); }
.queue-pill {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 9;
  display: flex; align-items: center; gap: 4px; width: min(calc(100vw - 32px), 420px); padding: 6px;
  border-radius: 999px; border: 1px solid color-mix(in oklab, var(--moss) 45%, var(--edge)); background: var(--slab-2);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.5);
}
.queue-pill-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--bone); text-align: left; cursor: pointer; }
.queue-pill-open:hover { background: color-mix(in oklab, var(--bone) 6%, transparent); }
.queue-pill-open .live-dot { flex: none; width: 9px; height: 9px; }
.queue-pill-text { min-width: 0; display: grid; gap: 2px; }
.queue-pill-text b { font: 700 0.86rem/1.1 var(--font-display); }
.queue-pill-text > span { overflow: hidden; font: 600 0.74rem/1.2 var(--font-mono); color: var(--ash); white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.queue-pill-leave { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--slab); color: var(--ash); cursor: pointer; }
.queue-pill-leave:hover { color: var(--bone); background: var(--edge); }
.queue-pill-leave svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
body:has(.queue-pill:not([hidden])) .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
body:has(.queue-pill:not([hidden])) .app { padding-bottom: 76px; }
.live-queues { display: grid; gap: 14px; }
.live-queues .section-title { display: flex; align-items: center; gap: 10px; }
.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--moss) 60%, transparent);
  animation: beacon 1.8s ease-out infinite;
}
@keyframes beacon { to { box-shadow: 0 0 0 10px transparent; } }
.queue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.queue-list li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 10px 10px 10px;
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--moss) 8%, var(--slab));
  border: 1px solid color-mix(in oklab, var(--moss) 30%, var(--edge));
}
.queue-list img, .queue-list .ph { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--vinyl); }
.queue-list b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.queue-list span { color: var(--ash); font-size: 0.85rem; }
.queue-list .btn { min-height: 40px; padding: 0 16px; }

.queue-status { font-size: 0.9rem; color: var(--ash) !important; }
.queue-status.is-hot { color: var(--moss) !important; font-weight: 600; }

.queue { justify-items: start; }
.disc.searching { width: min(44vw, 180px); }
.disc.searching .vinyl { inset: 0; animation-duration: 3.2s; }
.disc.searching .sheen { inset: 0; }
.queue-title { font-size: clamp(1.8rem, 8vw, 3rem); }
.queue-clock { margin: 6px 0 0; font: 600 1.2rem/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--torch); }

.versus { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font: 900 clamp(1.6rem, 7vw, 2.8rem)/1 var(--font-display); letter-spacing: -0.03em; }
.versus .vs { display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 0.35em; background: var(--torch); color: var(--torch-ink); font-size: 0.5em; transform: rotate(-8deg); }
.versus .me { color: var(--blue); }
.versus span:last-child:not(.ghostly) { color: var(--orange); }
.versus .ghostly { color: var(--ash); font-style: italic; }
.ghost-offer {
  display: grid;
  gap: 10px;
  justify-items: start;
  max-width: 52ch;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px dashed color-mix(in oklab, var(--bone) 35%, var(--edge));
  background: var(--slab);
}
.ghost-offer p { margin: 0; }
.scoreboard li.ghost { border-style: dashed; font-style: italic; }
.podium li.ghost .nm, .round-results li.ghost .nm { font-style: italic; color: var(--ash); }
.versus span { overflow-wrap: anywhere; min-width: 0; }

/* ---------- account dialog ---------- */
.dialog-view { display: grid; gap: 12px; }
.dialog-view h2 { overflow-wrap: anywhere; }
/* Sign in or create an account: tabs over a username and password form. */
.auth-tabs { justify-self: start; margin: 2px 0 4px; }
.local-auth { margin-bottom: 4px; }
.local-auth > .btn { margin-top: 4px; }
.auth-new { display: grid; gap: 12px; }
.auth-new .field-hint { color: var(--ash); font-weight: 500; }
#view-password .field-hint { color: var(--ash); font-weight: 500; }
#password-current-wrap, #delete-password-wrap, #delete-confirm-wrap { display: grid; gap: 12px; }
.btn.btn-danger { background: var(--blood); border-color: var(--blood); color: var(--torch-ink); }
.btn.btn-danger:hover:not(:disabled) { background: color-mix(in oklab, var(--blood) 85%, white); }
/* Sign in with Apple (inside the iOS app, in place of Google): a white pill with the
   logo, black text, at the top of the box. */
.apple-slot { display: grid; gap: 8px; margin-bottom: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--edge); }
.apple-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font: 600 1.05rem/1 var(--font-body);
  cursor: pointer;
}
.apple-btn svg { width: 18px; height: 18px; fill: currentColor; margin-top: -2px; }
.apple-btn:hover:not(:disabled) { background: #e8e8ed; border-color: #e8e8ed; }
.apple-btn:disabled { opacity: 0.6; cursor: default; }
.google-slot { min-height: 44px; padding-top: 14px; border-top: 1px solid var(--edge); }
.dialog-note { font-size: 0.9rem; }
.dialog-note code { font-family: var(--font-mono); color: var(--bone); }
.dev-login { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--edge); }
.dev-row { display: flex; gap: 8px; flex-wrap: wrap; }
.dev-row input { flex: 1 1 160px; min-width: 0; }
.field-hint { margin: -4px 0 0 !important; min-height: 1.3em; font-size: 0.88rem; font-weight: 600; }
.field-hint.ok { color: var(--moss) !important; }
.field-hint.bad { color: var(--blood) !important; }
.field-error { margin: 0 !important; color: var(--blood) !important; font-weight: 600; font-size: 0.9rem; }
.dialog-actions.spread { justify-content: space-between; flex-wrap: wrap; }
.tapout { border-color: color-mix(in oklab, var(--blood) 45%, var(--edge)); }
.tapout-stats { margin: 4px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--edge); }
.tapout-stats div { display: grid; gap: 4px; padding: 12px 8px 12px 0; min-width: 0; }
.tapout-stats div + div { padding-left: 12px; border-left: 1px solid var(--edge); }
.tapout-stats dt { font: 700 0.64rem/1.2 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash); }
.tapout-stats dd { margin: 0; font: 600 1.3rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.dialog-actions .dialog-actions { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

/* ---------- browse: decades + genres ---------- */
.browse { display: grid; gap: 22px; }
.browse-row { display: grid; gap: 10px; }
.browse-row h2 { margin: 0; }
.decade-strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.decade-strip button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--slab-2);
  font: 700 0.95rem/1 var(--font-display);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.decade-strip button:hover { border-color: var(--torch); color: var(--torch); background: var(--slab-2); }
.genre-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.genre-grid button {
  width: 100%;
  min-height: 56px;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: var(--slab);
  text-align: left;
  font: 700 0.92rem/1.15 var(--font-display);
  letter-spacing: -0.01em;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.genre-grid button:hover { border-color: var(--torch); background: var(--slab-2); }

.facets { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.facets button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--slab-2);
  font-weight: 500;
  font-size: 0.9rem;
}
.facets button:hover { border-color: var(--torch); }
.facets small { color: var(--ash); font-weight: 500; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ---------- vault card: fan level + interval values ---------- */
.fan { display: grid; gap: 8px; padding: 14px 0 4px; border-top: 1px solid var(--edge); }
.fan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fan-title { font: 900 1.05rem/1.1 var(--font-display); letter-spacing: -0.02em; color: var(--torch); }
.fan-level { font: 600 0.8rem/1 var(--font-mono); color: var(--ash); font-variant-numeric: tabular-nums; }
.xp-track { height: 6px; border-radius: 6px; background: var(--slab-2); overflow: hidden; }
.xp-fill { height: 100%; width: 0; background: var(--torch); border-radius: 6px; transition: width 1.2s ease; }
.fan-next, .fan-kit { margin: 0 !important; font-size: 0.85rem; }
.fan-kit { color: var(--bone) !important; }

/* ---------- vault play ---------- */
.guardian-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in oklab, var(--blood) 60%, var(--edge));
  background: color-mix(in oklab, var(--blood) 14%, transparent);
}
.guardian-banner b { font: 900 1rem/1 var(--font-display); text-transform: uppercase; color: var(--blood); letter-spacing: -0.01em; }
.guardian-banner span { font-size: 0.85rem; color: var(--bone); }
.play.is-guardian .label { background: var(--blood); box-shadow: inset 0 0 0 3px color-mix(in oklab, var(--blood), black 25%); }
.play.is-guardian .ring-fill { stroke: var(--blood); }

/* Clip lengths: a row of chips, the unlocked ones lit gold and the one playing solid,
   with what a right answer is worth right now beside the label. */
.intervals { display: grid; gap: 8px; }
.interval-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.interval-head .eyebrow kbd { margin-left: 4px; }
.clip-chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.clip-chip {
  display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 44px; padding: 0;
  border-radius: 12px; border: 1px solid var(--edge); background: var(--slab); color: var(--ash);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.clip-chip b { font-size: 0.82rem; color: var(--bone); }
.clip-chip span { font-size: 0.66rem; }
.clip-chip:hover:not(:disabled) { border-color: var(--torch); }
.clip-chip.is-open { border-color: var(--torch); background: color-mix(in oklab, var(--torch) 14%, var(--slab)); color: var(--torch); opacity: 1; }
.clip-chip.is-open b { color: var(--torch); }
.clip-chip.is-on { background: var(--torch); color: var(--torch-ink); }
.clip-chip.is-on b { color: var(--torch-ink); }
.clip-chip.is-capped { opacity: 0.3; }
.clip-chip:disabled { cursor: default; }
.play.is-guardian .clip-chip.is-open { border-color: var(--blood); background: color-mix(in oklab, var(--blood) 16%, var(--slab)); color: var(--blood); }
.play.is-guardian .clip-chip.is-open b { color: var(--blood); }
.play.is-guardian .clip-chip.is-on { background: var(--blood); color: var(--torch-ink); }
.play.is-guardian .clip-chip.is-on b { color: var(--torch-ink); }
.worth b { font: 700 1.4rem/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--torch); }
.worth.is-low b { color: var(--blood); }
.hint-line { margin: 0; text-align: center; color: var(--torch); font-weight: 600; }

.pack { display: flex; flex-wrap: wrap; gap: 8px; }
/* Items as pills: the item's icon on a disc of its colour, its name, how many. */
.item {
  --ic: var(--ash);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px 0 5px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--slab);
  font-weight: 600;
  font-size: 0.82rem;
}
.item-ic { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in oklab, var(--ic) 22%, transparent); color: var(--ic); }
.item svg { width: 18px; height: 18px; flex: none; }
.item-encore { --ic: #ff5c6c; }
.item-crossfade { --ic: #7fe3ff; }
.item-liner { --ic: #ffd36b; }
.item-needle { --ic: #c9b6ff; }
.item-shield { --ic: #4fd18b; }
.item-gold { --ic: var(--torch); }
.item-metronome { --ic: #ff9f5a; }
.item .count { font-family: var(--font-mono); color: var(--ash); }
.item:hover:not(:disabled) { border-color: var(--torch); background: var(--slab-2); }
.item:disabled { opacity: 0.35; }
.item.passive { cursor: default; border-style: dashed; }
.item.is-active { border-color: var(--moss); color: var(--moss); }

.find { margin: 6px 0 0; color: var(--moss); font-weight: 600; }
.loot { display: grid; gap: 10px; margin-top: 12px; }
.loot-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.loot-card {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in oklab, var(--torch) 40%, var(--edge));
  background: color-mix(in oklab, var(--torch) 8%, var(--dusk));
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.loot-card:hover { transform: translateY(-2px); border-color: var(--torch); }
.loot-card svg { width: 28px; height: 28px; }
.loot-card b { font: 700 1rem/1.1 var(--font-display); }
.loot-card span { font-size: 0.85rem; color: var(--ash); }

.option .by { display: block; font-weight: 500; font-size: 0.85rem; color: var(--ash); margin-top: 2px; }
.option.is-cut { opacity: 0.18 !important; text-decoration: line-through; }

.xp-earned { display: grid; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--edge); }
.level-up { margin: 4px 0 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in oklab, var(--torch) 16%, transparent); border: 1px solid var(--torch); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .xp-fill, .clip-chip { transition: none; }
}
.board-table .fan-tag { display: block; font-weight: 500; font-size: 0.78rem; color: var(--ash); }

/* ---------- turntable deck: the start screen and the loading screen ---------- */
/* The record sits bottom-left of a square deck; the tonearm pivots from the top-right
   corner and rests its needle on the grooves, so nothing pokes outside the deck. */
.deck { position: relative; aspect-ratio: 1; max-width: 100%; }
.deck .disc { position: absolute; left: 0; bottom: 0; width: 88%; }
.label-print {
  position: relative;
  font: 900 clamp(0.6rem, 2.6vw, 1rem)/0.95 var(--font-display);
  text-transform: uppercase;
  text-align: center;
  letter-spacing: -0.02em;
}
.tonearm {
  position: absolute;
  top: 0;
  right: 0;
  width: 56%;
  height: 56%;
  overflow: visible;
  pointer-events: none;
  transform-origin: 84% 14%;
  filter: drop-shadow(0 6px 8px rgb(0 0 0 / 0.6));
}
.arm-base { fill: #1c1920; stroke: rgb(255 255 255 / 0.12); stroke-width: 1; }
.arm-pivot { fill: var(--arm); }
.arm-rod { fill: none; stroke: var(--arm); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.arm-head { fill: var(--arm); }

.hero-deck {
  justify-self: end;
  width: min(66vw, 380px);
  margin-bottom: calc(min(66vw, 380px) * -0.46);
}
.hero-disc .vinyl { animation: spin 7s linear infinite; }

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 32px;
  padding: 16px;
  background: #000;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.loader.is-on { opacity: 1; }
.loader-deck { width: min(72vw, 320px); }
.loader .vinyl { animation: spin 1.8s linear infinite; }
.loader .tonearm { transform: rotate(-26deg); transition: transform 0.7s cubic-bezier(0.3, 1.35, 0.5, 1) 0.1s; }
.loader.is-on .tonearm { transform: rotate(0deg); }
.loader-text {
  margin: 0;
  max-width: 24ch;
  font: 700 clamp(1.05rem, 4.4vw, 1.5rem)/1.25 var(--font-display);
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
}

@media (prefers-reduced-motion: reduce) {
  .hero-disc .vinyl, .loader .vinyl { animation: none; }
  .loader, .loader .tonearm { transition: none; }
}
.label img:not([hidden]) + .label-print { display: none; }

/* ---------- profile: top-bar icon ---------- */
.profile-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--edge);
  background: var(--slab);
  color: var(--ash);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.profile-btn > svg, .avatar > svg { width: 60%; height: 60%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.profile-btn:hover { border-color: var(--torch); color: var(--bone); }
.profile-btn.is-in { color: var(--torch); border-color: color-mix(in oklab, var(--torch) 45%, var(--edge)); }

/* ---------- home: jump back in ---------- */
.recent { display: grid; gap: 10px; }
.recent h2 { margin: 0; }
.recent-row {
  list-style: none;
  margin: 0;
  padding: 0 0 6px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.recent-row li { flex: 0 0 auto; scroll-snap-align: start; }
.recent-row button {
  display: grid;
  grid-template-columns: 44px auto;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  max-width: 240px;
  padding: 8px 14px 8px 8px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: var(--slab);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.recent-row button:hover { border-color: var(--torch); background: var(--slab-2); }
.recent-row img, .recent-row .ph { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: var(--vinyl); }
.recent-row b { display: block; font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.recent-row span { display: block; font-size: 0.78rem; color: var(--ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-row div { min-width: 0; }

/* ---------- profile screen ---------- */
.profile { display: grid; gap: 28px; padding-top: 4px; }
.profile-head { display: flex; align-items: center; gap: 18px; }
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(72px, 20vw, 96px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--torch) 45%, var(--edge));
  background: radial-gradient(circle, color-mix(in oklab, var(--torch) 14%, transparent), transparent 70%), var(--slab);
  color: var(--torch);
}
.profile-id { display: grid; gap: 4px; min-width: 0; }
.profile-id p { margin: 0; }
.profile-name { margin: 0 0 0.4em; font: 900 clamp(1.7rem, 7.5vw, 2.8rem)/1 var(--font-display); letter-spacing: -0.03em; overflow-wrap: anywhere; }
/* The profile leaves room around the name, so name effects (lights, bats, snow) can
   spread into it without touching the line above. */
.profile-name:has(.nfx) { padding-top: 0.3em; }
.profile-name .nfx-p { inset: -0.3em -0.35em -0.55em; }
.profile-guest { display: grid; gap: 14px; justify-items: start; }
.profile-guest p { margin: 0; max-width: 48ch; color: color-mix(in oklab, var(--bone) 80%, var(--ash)); }
.profile-body { display: grid; gap: 26px; }
.board-table .pick-row { cursor: pointer; }
.board-table .pick-row:hover td { background: var(--slab); }
.board-table .where { display: flex; align-items: center; gap: 10px; min-width: 0; }
.board-table .where img, .board-table .where .ph { width: 36px; height: 36px; border-radius: 5px; object-fit: cover; flex: none; background: var(--vinyl); }
.board-table .where b { font-weight: 600; overflow-wrap: anywhere; }

.settings { display: grid; gap: 12px; }
.setting-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--edge); }
.setting { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--edge); }
.setting > div { display: grid; gap: 4px; flex: 1 1 200px; min-width: 0; }
.setting b { font-weight: 600; overflow-wrap: anywhere; }
.setting .btn { min-height: 40px; }
.setting-links { gap: 4px 20px; }
.setting-links .link-btn { min-height: 44px; display: inline-flex; align-items: center; }
.setting-links .link-btn.danger { color: var(--blood); margin-left: auto; }

/* ---------- music notes ---------- */
.top-actions { display: flex; align-items: center; gap: 10px; }
/* Mid-game the top bar goes, so the game gets the whole screen (Tap out is below it). */
body.is-playing .topbar { display: none; }
/* Plays switched off on the server: no "Uses 1 play" anywhere. */
.plays-off .play-cost { display: none; }
body.is-playing .play { padding-top: 18px; }

/* On a phone the whole round fits on one screen, Tap out included, with no scrolling:
   the screen is one viewport tall, the record takes whatever height is left (the stage
   is a size container, so the disc sizes itself from its height), the choices sit two
   to a row, and everything else tightens up. A reveal can still run longer. */
@media (max-width: 640px) {
  body.is-playing .app { padding-bottom: 10px; }
  body.is-playing .play { display: flex; flex-direction: column; gap: 10px; min-height: calc(100dvh - 10px); padding-top: 12px; }
  body.is-playing .stage { flex: 1 1 0; min-height: 100px; container-type: size; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding-block: 0; }
  body.is-playing #screen-play .disc { width: min(68vw, 300px, calc(100cqh - 24px)); } /* wins over the party size too */
  body.is-playing .tier-note { font-size: 0.74rem; min-height: 1.2em; }
  body.is-playing .vault-hud { gap: 8px; padding: 10px 12px; }
  body.is-playing .clip-chip { min-height: 40px; }
  body.is-playing #screen-play[data-mode="vault"] .disc { width: min(56vw, 230px, calc(100cqh - 24px)); }
  body.is-playing .scoreboard li { padding: 4px 10px; font-size: 0.82rem; }
  body.is-playing .intervals { gap: 6px; }
  body.is-playing .worth b { font-size: 1.3rem; }
  body.is-playing .prompt { font-size: 0.9rem; min-height: 1.3em; }
  body.is-playing .options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body.is-playing .option { min-height: 56px; padding: 8px 12px; border-radius: 14px; font-size: 0.92rem; line-height: 1.2; }
  body.is-playing kbd { display: none; } /* keyboard hints are for desktops */
  body.is-playing .option .title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  body.is-playing .option .by { font-size: 0.76rem; margin-top: 3px; }
  body.is-playing .item { min-height: 34px; }
  body.is-playing .play-foot { padding-top: 0; }
  /* A party round's header: the pick card and countdown, smaller. */
  body.is-playing .play.is-party[data-mode="duel"] .party-hud { gap: 8px; }
  body.is-playing .party-clock { width: 36px; height: 36px; font-size: 0.85rem; }
  body.is-playing .pick-card { gap: 10px; padding: 8px 10px; border-radius: 16px; }
  body.is-playing .pick-art { width: 42px; height: 42px; border-radius: 10px; }
  body.is-playing .pick-text b { font-size: 1.05rem; }
  body.is-playing .pick-text > span:last-child { font-size: 0.78rem; }
  body.is-playing .play.is-party .scoreboard li { padding: 5px 9px; row-gap: 4px; font-size: 0.8rem; }
  /* The Guardian's rules on one line (the record's note also says 6 choices). */
  body.is-playing .guardian-banner { flex-wrap: nowrap; gap: 10px; padding: 7px 12px; }
  body.is-playing .guardian-banner b { flex: none; font-size: 0.85rem; }
  body.is-playing .guardian-banner span { min-width: 0; font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.note-ico {
  width: 1.15em;
  height: 1.15em;
  padding: 0.2em;
  border-radius: 50%;
  background: var(--torch);
  fill: var(--torch-ink);
  flex: none;
  vertical-align: -0.2em;
}

.notes-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--torch);
  background: var(--slab);
  color: var(--torch);
}
.notes-chip b { font: 700 0.92rem/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--torch); }
.plays-chip { padding: 0 14px 0 12px; }
.plays-chip b { color: inherit; }
.notes-chip:hover { border-color: var(--torch); }
.notes-earned { margin: 0; justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: color-mix(in oklab, var(--torch) 12%, transparent); border: 1px solid color-mix(in oklab, var(--torch) 45%, var(--edge)); color: var(--torch); font-weight: 700; }

/* ---------- profile icons ---------- */
/* Players without an icon get their initial on a colour disc (--c), or a plain person.
   Shop and level icons are stickers on tiles (.stk, below). */
.icon {
  --size: 40px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  vertical-align: middle;
  background: var(--dusk);
}
.icon svg { position: relative; z-index: 2; width: 80%; height: 80%; overflow: visible; }
.icon.person { background: var(--slab); border: 1px solid var(--edge); color: var(--ash); }
.icon.person svg { width: 58%; height: 58%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon.initial { background: var(--c, var(--blue)); color: var(--torch-ink); }
.icon.initial b { font: 900 calc(var(--size) * 0.4)/1 var(--font-display); letter-spacing: -0.02em; }

/* ---------- sticker icons ----------
   A sticker (art: an image, or vector art) on a rounded tile in its tier's colours,
   inside a frame of the tier's accent, with record grooves, a light wedge and a strip
   of tier pips along the bottom. Motion builds with the tier (m0 to m4): Demo holds
   still; Single moves one part (a bob, or its own move: k-*); Gold bounces, with a shine
   across the art, a sheen across the tile and glints; Platinum adds turning light rays,
   a breathing halo, sonic rings and a glowing tile; Diamond adds an aurora, orbiting
   gems, rising notes, a beat-drop pop, holo art and a turning holo frame. x-* are an
   icon's own extras. Everything inside is sized in cqw (1% of the icon's width), so a
   tile looks the same at any size; small ones drop the extras and tiny ones hold still.
   Level icons use bronze, silver and gold tiles (and the Verso Addict its own). */
.icon.stk { container-type: size; border-radius: 23%; background: var(--frame, var(--ac)); }
.stk.m4 { --frame: #7FE3FF; }
.stk .st { position: absolute; inset: 1.92cqw; z-index: 1; overflow: hidden; border-radius: 21cqw; background: var(--bg); box-shadow: inset 0 0 0 0.96cqw rgb(255 255 255 / 0.22); }
.stk .st > * { position: absolute; display: block; }
.stk.t-demo { --bg: radial-gradient(120% 100% at 50% 20%, #5A6378, #171A24 75%); --ac: #8A94A8; }
.stk.t-single { --bg: radial-gradient(120% 100% at 50% 20%, #5E86D6, #0F1830 75%); --ac: #8FB4FF; }
.stk.t-gold { --bg: radial-gradient(120% 100% at 50% 20%, #F2B84B, #9A5E12 45%, #3A2006 85%); --ac: #FFD36B; --halo: rgb(255 211 107 / 0.55); }
.stk.t-platinum { --bg: radial-gradient(120% 100% at 50% 20%, #C9D2FF, #6A68C8 45%, #1A1640 85%); --ac: #E6ECFF; --halo: rgb(230 236 255 / 0.7); }
.stk.t-diamond { --bg: radial-gradient(120% 100% at 50% 20%, #6FF0FF, #3A4BD0 45%, #1A0838 85%); --ac: #7FE3FF; --halo: rgb(127 227 255 / 0.75); }
.stk.t-bronze { --bg: radial-gradient(120% 100% at 50% 20%, #E8A577, #8A4A22 45%, #2C1408 85%); --ac: #E8A577; }
.stk.t-silver { --bg: radial-gradient(120% 100% at 50% 20%, #EEF2F8, #7C8496 45%, #1C2028 85%); --ac: #DCE0EA; }
.stk.t-addict { --bg: radial-gradient(90% 80% at 25% 15%, #3D8BFF, transparent 60%), radial-gradient(90% 80% at 80% 90%, #FF7A1A, transparent 60%), #1A1640; --ac: #D4A63A; --halo: rgb(212 166 58 / 0.6); }
.stk.h-halloween { --tint: linear-gradient(180deg, rgb(90 43 168 / 0.55), rgb(20 8 46 / 0.35)); --ac: #FF9A3D; }
.stk.h-christmas { --tint: linear-gradient(180deg, rgb(46 158 106 / 0.45), rgb(120 20 30 / 0.35)); --ac: #FF6B6F; }

.st-grooves { left: -25%; top: -25%; width: 150%; height: 150%; background: repeating-radial-gradient(circle at 50% 46%, rgb(255 255 255 / 0.08) 0 0.64cqw, transparent 0.64cqw 5.1cqw); }
.st-wedge { inset: 0; background: linear-gradient(135deg, rgb(255 255 255 / 0.07) 0 42%, transparent 42%); }
.st-tint { inset: 0 0 13.3% 0; background: var(--tint); }
.st-artw { left: 10.7%; top: 8%; width: 78.7%; height: 69.3%; perspective: 256cqw; }
.st-artm { position: relative; display: block; width: 100%; height: 100%; transform-origin: 50% 80%; }
.stk .st-art { position: static; display: block; width: 100%; height: 100%; object-fit: contain; overflow: visible; filter: drop-shadow(1.6cqw 1.9cqw 0 rgb(0 0 0 / 0.45)) drop-shadow(0 3.8cqw 3.8cqw rgb(0 0 0 / 0.35)); }
.st-shine, .st-holoart { position: absolute; inset: 0; pointer-events: none; -webkit-mask: var(--art) center / contain no-repeat; mask: var(--art) center / contain no-repeat; }
.st-shine { background: linear-gradient(110deg, transparent 38%, rgb(255 255 255 / 0.85) 50%, transparent 62%) 150% 0 / 300% 100%; mix-blend-mode: overlay; animation: st-shine 2.8s ease-in-out infinite; }
.st-holoart { background: linear-gradient(120deg, #7FE3FF, #B57BFF, #FF7AC8, #FFD36B, #7FE3FF, #B57BFF) 0 50% / 300% 300%; mix-blend-mode: color; opacity: 0.55; animation: st-holo 3s linear infinite alternate; }
.st-bar { left: 0; right: 0; bottom: 0; height: 13.3%; z-index: 2; display: flex !important; align-items: center; justify-content: center; gap: 3.2cqw; border-top: 1.3cqw solid rgb(0 0 0 / 0.55); background: var(--ac); }
.st-bar i { width: 3.85cqw; height: 3.85cqw; background: #120F1A; transform: rotate(45deg); }

/* The extras, by tier. */
.st-rays { left: -30%; top: -34%; width: 160%; height: 160%; background: repeating-conic-gradient(from 0deg at 50% 50%, rgb(255 255 255 / 0.16) 0 7deg, transparent 7deg 22deg); -webkit-mask: radial-gradient(circle at 50% 50%, #000 0, transparent 62%); mask: radial-gradient(circle at 50% 50%, #000 0, transparent 62%); animation: st-rot 14s linear infinite; }
.st-halo { left: 16.7%; top: 12%; width: 66.7%; height: 66.7%; border-radius: 50%; background: radial-gradient(circle, var(--halo), transparent 65%); animation: st-halo 2.4s ease-in-out infinite; }
.st-ring { left: 23.3%; top: 18.7%; width: 53.3%; height: 53.3%; border-radius: 50%; border: 1.3cqw solid var(--ac); opacity: 0; animation: st-ring 2.4s ease-out infinite; }
.st-ring.n2 { animation-delay: 1.2s; }
.st-sheen { top: -10%; left: 0; width: 38%; height: 120%; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.28), transparent); transform: translateX(-160%) skewX(-18deg); animation: st-sheen 3.4s ease-in-out infinite; }
.st-spark { width: 6.4cqw; height: 6.4cqw; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: st-spark 1.9s ease-in-out infinite; }
.st-spark.n1 { left: 12%; top: 22.7%; }
.st-spark.n2 { right: 10.7%; top: 14.7%; animation-delay: 0.65s; }
.st-spark.n3 { right: 18.7%; top: 64%; animation-delay: 1.3s; }
.st-spark.n4 { left: 33%; top: 12%; animation-duration: 1.6s; animation-delay: 0.3s; }
.st-spark.n5 { left: 60%; top: 32%; animation-duration: 1.6s; animation-delay: 1s; }
.st-aurora { left: -20%; top: -20%; width: 140%; height: 140%; background: radial-gradient(circle at 30% 30%, rgb(127 227 255 / 0.55), transparent 45%), radial-gradient(circle at 70% 40%, rgb(255 122 200 / 0.45), transparent 45%), radial-gradient(circle at 50% 75%, rgb(181 123 255 / 0.5), transparent 50%); mix-blend-mode: screen; animation: st-aurora 7s linear infinite; }
.st-orbit { left: 50%; top: 44%; width: 0; height: 0; transform: scaleY(0.38); }
.st-orb { position: absolute; left: -2.9cqw; top: -2.9cqw; width: 5.8cqw; height: 5.8cqw; background: #fff; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); animation: st-orbit 3.2s linear infinite; }
.st-orb.n2 { background: #7FE3FF; animation-delay: -0.8s; }
.st-orb.n3 { background: #FF7AC8; animation-delay: -1.6s; }
.st-orb.n4 { background: #FFD36B; animation-delay: -2.4s; }
.st-note { bottom: 16%; width: 6.4cqw; height: 9cqw; opacity: 0; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16'%3E%3Cpath d='M4 12.5a2.5 2.5 0 1 1-1.5-2.3V1.5L10 0v3.5L5 4.6v7.9z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16'%3E%3Cpath d='M4 12.5a2.5 2.5 0 1 1-1.5-2.3V1.5L10 0v3.5L5 4.6v7.9z'/%3E%3C/svg%3E") center / contain no-repeat; animation: st-note 3s ease-out infinite; }
.st-note.n1 { left: 13%; }
.st-note.n2 { left: 69%; background: #7FE3FF; animation-delay: 1s; }
.st-note.n3 { left: 44%; background: #FF7AC8; animation-delay: 2s; }
.st-pt { bottom: 14.7%; width: 4.5cqw; height: 4.5cqw; opacity: 0; background: var(--ac); transform: rotate(45deg); animation: st-pt 2.6s ease-out infinite; }
.st-pt.n1 { left: 16%; }
.st-pt.n2 { left: 37%; background: #fff; animation-delay: 0.5s; }
.st-pt.n3 { left: 58.7%; animation-delay: 1s; }
.st-pt.n4 { left: 77%; background: #FF7AC8; animation-delay: 1.5s; }
.st-pt.n5 { left: 26.7%; background: #FFD36B; animation-delay: 2s; }
.st-flash { inset: 0; background: radial-gradient(circle at 50% 45%, rgb(255 255 255 / 0.75), transparent 60%); opacity: 0; animation: st-flash 4.5s ease-out infinite; }

/* Motion by tier. */
.stk.m1 .st-artm { animation: st-bob 2.4s ease-in-out infinite; }
.stk.m2 .st-artm, .stk.m3 .st-artm, .stk.m4 .st-artm { animation: st-bounce 1.9s ease-in-out infinite; }
.stk.m3 .st-grooves, .stk.m4 .st-grooves { animation: st-rot 16s linear infinite; }
.stk.m3 { animation: st-glow-p 2.4s ease-in-out infinite; }
.stk.m4 { animation: st-glow-d 2.2s ease-in-out infinite; }
.stk.m4::before { content: ''; position: absolute; left: -40%; top: -40%; width: 180%; height: 180%; background: conic-gradient(#7FE3FF, #B57BFF, #FF7AC8, #FFD36B, #7FE3FF); animation: st-rot 4s linear infinite; }
.stk.m4 .st-artw { animation: st-pop 4.5s ease-in-out infinite; }
.stk.m4 .st-rays { animation-duration: 8s; }

/* An icon's own move, in place of the usual one. */
.stk.k-spin:is(.m2, .m3, .m4) .st-artm { animation: st-spin 6s linear infinite; transform-origin: 50% 50%; }
.stk.k-spin.m4 .st-artm { animation-duration: 4s; }
.stk.k-thump:not(.m0) .st-artm { animation: st-thump 1.1s ease-out infinite; transform-origin: 50% 55%; }
.stk.k-float:not(.m0) .st-artm { animation: st-float 3s ease-in-out infinite; }
.stk.k-hover:not(.m0) .st-artm { animation: st-hover 2.4s ease-in-out infinite; }
.stk.k-bob:not(.m0) .st-artm { animation: st-bob 2.6s ease-in-out infinite; }
.stk.k-sway:not(.m0) .st-artm { animation: st-sway 2.2s ease-in-out infinite; transform-origin: 50% 100%; }
.stk.k-jump:not(.m0) .st-artm { animation: st-jump 1.3s ease-in-out infinite; }
.stk.k-still .st-artm { animation: none; }
.stk.k-flicker.m1 .st-artm { animation: st-flicker 2.2s steps(1) infinite; }
.stk.k-flicker:is(.m2, .m3, .m4) .st-artm { animation: st-hover 2.6s ease-in-out infinite; }
.stk.k-flicker:is(.m2, .m3, .m4) .st-art { animation: st-flicker 1.8s steps(1) infinite; }

/* An icon's own extras. */
.stk.x-prism .st-rays { background: repeating-conic-gradient(from 0deg, rgb(127 227 255 / 0.35) 0 6deg, transparent 6deg 18deg, rgb(255 122 200 / 0.3) 18deg 24deg, transparent 24deg 36deg, rgb(255 211 107 / 0.3) 36deg 42deg, transparent 42deg 54deg); animation-duration: 5s; }
.stk.x-prism.k-spin.m4 .st-artm { animation-duration: 2.6s; }
.stk.x-jewels .st-spark.n1 { left: 29%; top: 20%; }
.stk.x-jewels .st-spark.n2 { left: 48%; right: auto; top: 16%; }
.stk.x-jewels .st-spark.n3 { left: 67%; right: auto; top: 25%; }
.stk.x-jewels .st-spark.n4 { left: 39%; top: 35%; }
.stk.x-jewels .st-spark.n5 { left: 20%; top: 31%; }
.stk.x-embers .st-pt { left: 46.7%; bottom: auto; top: 20%; width: 3.2cqw; height: 3.2cqw; background: #FF9A3D; animation: st-ember 1.4s ease-out infinite; }
.stk.x-embers .st-pt.n1 { --dx: -6.4cqw; }
.stk.x-embers .st-pt.n2 { --dx: 3.8cqw; animation-delay: 0.3s; }
.stk.x-embers .st-pt.n3 { --dx: -2.6cqw; animation-delay: 0.6s; }
.stk.x-embers .st-pt.n4 { --dx: 7.7cqw; animation-delay: 0.9s; }
.stk.x-embers .st-pt.n5 { --dx: -9cqw; animation-delay: 1.1s; }
.st-bat { top: 16%; left: -20%; width: 14cqw; height: 6.4cqw; background: #14082E; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 10'%3E%3Cpath d='M12 3 C10 0 7 0 5 2 C4 0 2 0 0 2 C3 3 4 6 6 7 C8 5 10 6 12 9 C14 6 16 5 18 7 C20 6 21 3 24 2 C22 0 20 0 19 2 C17 0 14 0 12 3 Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 10'%3E%3Cpath d='M12 3 C10 0 7 0 5 2 C4 0 2 0 0 2 C3 3 4 6 6 7 C8 5 10 6 12 9 C14 6 16 5 18 7 C20 6 21 3 24 2 C22 0 20 0 19 2 C17 0 14 0 12 3 Z'/%3E%3C/svg%3E") center / contain no-repeat; animation: st-bat 3.4s linear infinite; }
.st-bat.n2 { top: 29%; animation-duration: 4.2s; animation-delay: -1.6s; }
.stk.x-bats .st-halo { background: radial-gradient(circle, rgb(255 154 61 / 0.75), transparent 65%); }
.st-cf { top: -8%; width: 3.85cqw; height: 5.8cqw; opacity: 0; animation: st-confetti 2.6s linear infinite; }
.st-cf.n1 { left: 12%; background: #FFD36B; }
.st-cf.n2 { left: 26.7%; background: #FF7AC8; animation-delay: -0.4s; animation-duration: 2.2s; }
.st-cf.n3 { left: 42.7%; background: #7FE3FF; animation-delay: -0.9s; }
.st-cf.n4 { left: 57.3%; background: #FFD36B; animation-delay: -1.3s; animation-duration: 3s; }
.st-cf.n5 { left: 72%; background: #B57BFF; animation-delay: -1.8s; }
.st-cf.n6 { left: 84%; background: #FFFFFF; animation-delay: -2.2s; animation-duration: 2.4s; }

/* Moving parts inside the vector stickers (stickers.js), from Single up. */
.stk .lv-cover { transform-box: fill-box; transform-origin: 50% 0; }
.stk .lv1 { transform: scaleY(0.5); }
.stk .lv2 { transform: scaleY(0.25); }
.stk .lv3 { transform: scaleY(0.1); }
.stk .lv4 { transform: scaleY(0.35); }
.stk .lv5 { transform: scaleY(0.6); }
.stk:not(.m0) .lv-cover { animation: st-level 1s ease-in-out infinite; }
.stk:not(.m0) .lv1 { animation-duration: 0.9s; animation-delay: -0.2s; }
.stk:not(.m0) .lv2 { animation-duration: 1.15s; animation-delay: -0.5s; }
.stk:not(.m0) .lv3 { animation-duration: 0.8s; animation-delay: -0.1s; }
.stk:not(.m0) .lv4 { animation-duration: 1.3s; animation-delay: -0.7s; }
.stk:not(.m0) .lv5 { animation-duration: 1s; animation-delay: -0.35s; }
.stk .mt-arm { transform-box: view-box; transform-origin: 59px 80px; transform: rotate(-14deg); }
.stk:not(.m0) .mt-arm { animation: st-swing 0.9s ease-in-out infinite alternate; }
.stk:not(.m0) .tt-rec { transform-box: fill-box; transform-origin: 50% 50%; animation: st-spin 1.8s linear infinite; }
.stk:not(.m0) .tt-arm { transform-box: view-box; transform-origin: 98px 30px; animation: st-arm 3.6s ease-in-out infinite; }
.stk:not(.m0) .sp-spin { transform-box: fill-box; transform-origin: center; animation: st-spin 3s linear infinite; }
.stk:not(.m0) .sp-swing { transform-box: fill-box; transform-origin: 50% 0; animation: st-ring-bell 1.6s ease-in-out infinite; }
.stk:not(.m0) .sp-blink { animation: st-blink 1.2s ease-in-out infinite; }
.stk:not(.m0) .sp-fall { animation: st-fall 3s linear infinite; }
.stk:not(.m0) .sp-pulse { transform-box: fill-box; transform-origin: center; animation: st-pulse 1.4s ease-in-out infinite; }
.stk:not(.m0) .sp-float { animation: st-rise 2.4s ease-out infinite; }

/* Small icons drop the extras; tiny ones drop the pip strip too and hold still. */
.icon.stk.sm .st-fx, .icon.stk.xs .st-fx { display: none; }
.icon.stk.xs .st-bar { display: none; }
.icon.stk.xs, .icon.stk.xs *, .icon.stk.xs::before { animation: none !important; }

@keyframes st-rot { to { transform: rotate(360deg); } }
@keyframes st-spin { to { transform: rotate(360deg); } }
@keyframes st-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3.2cqw); } }
@keyframes st-bounce { 0%, 100% { transform: translateY(0) scale(1, 1); } 25% { transform: translateY(-5.8cqw) scale(0.95, 1.06); } 50% { transform: translateY(0) scale(1.07, 0.93); } 65% { transform: translateY(-1.3cqw) scale(0.98, 1.02); } 80% { transform: translateY(0) scale(1, 1); } }
@keyframes st-thump { 0%, 100% { transform: scale(1); } 8% { transform: scale(1.13); } 20% { transform: scale(0.96); } 32% { transform: scale(1.05); } 46% { transform: scale(1); } 54% { transform: scale(1.1); } 66% { transform: scale(0.98); } }
@keyframes st-float { 0%, 100% { transform: translate(0, 0) rotate(-4deg); } 50% { transform: translate(0, -5.8cqw) rotate(4deg); } }
@keyframes st-hover { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3.8cqw); } }
@keyframes st-sway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes st-jump { 0%, 100% { transform: translateY(0) scale(1, 1); } 12% { transform: translateY(1.3cqw) scale(1.04, 0.95); } 30% { transform: translateY(-5.1cqw) scale(0.98, 1.04); } 48% { transform: translateY(0) scale(1.03, 0.97); } 62% { transform: translateY(-3.2cqw); } 78% { transform: translateY(0); } }
@keyframes st-flicker { 0%, 100% { filter: brightness(1); } 8% { filter: brightness(1.35); } 12% { filter: brightness(0.9); } 20% { filter: brightness(1.25); } 48% { filter: brightness(1.05); } 52% { filter: brightness(1.4); } 58% { filter: brightness(0.95); } }
@keyframes st-pop { 0%, 82%, 100% { transform: rotateY(-14deg) rotateX(4deg) scale(1); } 41% { transform: rotateY(14deg) rotateX(-4deg) scale(1); } 86% { transform: rotateY(0deg) scale(1.16); } 92% { transform: rotateY(6deg) scale(0.97); } }
@keyframes st-shine { 0%, 40% { background-position: 150% 0; } 75%, 100% { background-position: -50% 0; } }
@keyframes st-holo { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes st-sheen { 0%, 55% { transform: translateX(-160%) skewX(-18deg); } 100% { transform: translateX(420%) skewX(-18deg); } }
@keyframes st-halo { 0%, 100% { transform: scale(0.85); opacity: 0.55; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes st-ring { 0% { transform: scale(0.35); opacity: 0.9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes st-glow-p { 0%, 100% { box-shadow: 0 0 0 0 rgb(201 210 255 / 0); } 50% { box-shadow: 0 0 calc(var(--size) * 0.15) calc(var(--size) * 0.03) rgb(201 210 255 / 0.6); } }
@keyframes st-glow-d { 0%, 100% { box-shadow: 0 0 0 0 rgb(127 227 255 / 0); } 50% { box-shadow: 0 0 calc(var(--size) * 0.19) calc(var(--size) * 0.05) rgb(127 227 255 / 0.65); } }
@keyframes st-spark { 0%, 100% { opacity: 0; transform: scale(0.3); } 50% { opacity: 1; transform: scale(1.15) rotate(45deg); } }
@keyframes st-pt { 0% { opacity: 0; transform: translateY(0) rotate(45deg) scale(0.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(6.4cqw, -70cqw) rotate(225deg) scale(1); } }
@keyframes st-flash { 0%, 86%, 100% { opacity: 0; } 90% { opacity: 0.9; } }
@keyframes st-aurora { 0% { filter: hue-rotate(0deg); transform: rotate(0deg) scale(1); } 50% { transform: rotate(180deg) scale(1.15); } 100% { filter: hue-rotate(360deg); transform: rotate(360deg) scale(1); } }
@keyframes st-orbit { from { transform: rotate(0deg) translateX(37cqw) rotate(0deg); } to { transform: rotate(360deg) translateX(37cqw) rotate(-360deg); } }
@keyframes st-note { 0% { opacity: 0; transform: translateY(0) rotate(-10deg); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-5cqw, -64cqw) rotate(15deg); } }
@keyframes st-ember { 0% { opacity: 0; transform: translate(0, 0) rotate(45deg) scale(0.8); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -38cqw) rotate(45deg) scale(0.3); } }
@keyframes st-bat { 0% { transform: translate(0, 0) scale(0.8); } 25% { transform: translate(38cqw, -5cqw) scaleY(0.6); } 50% { transform: translate(70cqw, 2.6cqw) scale(0.9); } 75% { transform: translate(103cqw, -3.8cqw) scaleY(0.6); } 100% { transform: translate(135cqw, 0) scale(0.8); } }
@keyframes st-confetti { 0% { opacity: 0; transform: translateY(0) rotate(0deg); } 10% { opacity: 1; } 100% { opacity: 0.9; transform: translate(9cqw, 83cqw) rotate(540deg); } }
@keyframes st-level { 0% { transform: scaleY(0.85); } 18% { transform: scaleY(0.2); } 36% { transform: scaleY(0.6); } 54% { transform: scaleY(0.05); } 72% { transform: scaleY(0.45); } 88% { transform: scaleY(0.15); } 100% { transform: scaleY(0.85); } }
@keyframes st-swing { from { transform: rotate(-26deg); } to { transform: rotate(26deg); } }
@keyframes st-arm { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(1.6deg); } }
@keyframes st-ring-bell { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
@keyframes st-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes st-fall { from { transform: translateY(-8px); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(26px); opacity: 0; } }
@keyframes st-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@keyframes st-rise { 0% { transform: translateY(6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .icon *, .icon::before, .icon.stk { animation: none !important; }
  .stk .st-fx { display: none; }
}

/* The button stays round through its icon; the level badge sits on its edge. */
.profile-btn { position: relative; overflow: visible; padding: 0; }
.lvl-badge {
  position: absolute;
  right: -5px;
  bottom: -4px;
  z-index: 3;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border-radius: 999px;
  border: 2px solid var(--ground);
  background: var(--torch);
  color: var(--torch-ink);
  font: 700 0.62rem/15px var(--font-mono);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
/* Sizes are lengths, not percentages: frames, glows and initials are worked out from them. */
.profile-btn .icon { --size: 40px; } /* inside its 1px border */
.avatar .icon { --size: calc(clamp(72px, 20vw, 96px) - 2px); }
.icon.xs { --size: 18px; }
.icon.sm { --size: 24px; }
.icon.md { --size: 84px; }
.icon.lg { --size: 60px; }
.icon.xl { --size: 112px; }
/* Tiny icons in lists hold still; the motion is for the places you can see it. */
.icon.xs *, .icon.xs::before { animation: none !important; }
.t-level { --tier: #e8c468; }

/* ---------- icon shop ---------- */
.shop { display: grid; gap: 20px; padding-top: 4px; }
.shop-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.shop-title { margin: 0; font: 900 clamp(1.5rem, 6.5vw, 2.2rem)/1 var(--font-display); letter-spacing: -0.03em; }
.coin-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px 8px 10px; border-radius: 999px; border: 1px solid var(--torch); background: var(--slab); color: var(--torch); }
.coin-pill b { font: 700 1rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.shop-guest { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 20px; border: 1px solid var(--edge); background: var(--slab); }
.shop-guest p { margin: 0; }
.shop-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.shop-tabs::-webkit-scrollbar { display: none; }
.shop-tabs button { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--edge); background: var(--slab-2); font-weight: 500; font-size: 0.9rem; white-space: nowrap; }
.shop-tabs button[aria-selected="true"] { border-color: var(--tier); background: var(--tier); color: var(--torch-ink); font-weight: 700; }
.t-demo { --tier: #8c8c9a; }
.t-single { --tier: var(--silver); }
.t-gold { --tier: var(--torch); }
.t-platinum { --tier: var(--platinum); }
.t-diamond { --tier: var(--diamond); }
.shop-featured { display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: 22px; border: 1px solid var(--tier); background: var(--slab); }
.shop-featured .what { display: grid; gap: 6px; flex: 1; min-width: 0; }
.shop-featured .eyebrow { color: var(--tier); }
.shop-featured b { font: 900 1.35rem/1.1 var(--font-display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.shop-featured .need { font-size: 0.85rem; color: var(--ash); }
.shop-featured .meter { height: 6px; border-radius: 999px; background: var(--edge); overflow: hidden; }
.shop-featured .meter i { display: block; height: 100%; background: var(--tier); border-radius: 999px; }
.shop-featured .btn { justify-self: start; margin-top: 4px; min-height: 40px; white-space: nowrap; }
@media (max-width: 400px) { .shop-featured .icon.xl { --size: 76px; } .shop-featured { gap: 14px; padding: 16px 14px; } }
.shop-tier-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.shop-tier-head h2 { margin: 0; font: 700 1rem/1.2 var(--font-display); color: var(--tier); }
.shop-tier-head span { font-size: 0.85rem; color: var(--ash); }
.shop-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.shop-item { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 14px 8px; border-radius: 18px; background: var(--slab); border: 1px solid transparent; text-align: center; min-width: 0; }
.shop-item.is-equipped { border-color: var(--torch); }
.shop-item b { font-weight: 700; font-size: 0.82rem; }
@media (max-width: 400px) { .shop-item .icon.md { --size: 76px; } }
.price-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--torch); background: transparent; color: var(--torch); font: 700 0.78rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.price-pill:hover:not(:disabled) { background: color-mix(in oklab, var(--torch) 14%, transparent); }
.price-pill:disabled { opacity: 0.4; cursor: not-allowed; }
.price-pill.is-equipped { background: var(--torch); color: var(--torch-ink); }
.price-pill.is-owned { border-color: var(--bone); color: var(--bone); }
.price-pill.is-locked { border-style: dashed; border-color: var(--edge-2); color: var(--ash); cursor: default; }
.price-pill .note-ico { width: 1.25em; height: 1.25em; }
.earn-guide { display: grid; gap: 12px; }
.earn-list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--edge); }
.earn-list li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid color-mix(in oklab, var(--edge) 60%, transparent); }
.earn-list b { display: inline-flex; align-items: center; gap: 4px; font: 600 0.95rem/1.2 var(--font-mono); color: var(--torch); white-space: nowrap; }
.shop-link { justify-self: start; margin-top: 8px; min-height: 38px; color: var(--torch); }

/* ---------- seasons ---------- */
.season-bar { margin: 0; font-size: 0.9rem; color: var(--ash); }
.season-bar b { color: var(--bone); }
.last-season { display: grid; gap: 10px; padding-top: 8px; }
.last-season h3 { margin: 0; font: 700 0.95rem/1.2 var(--font-display); color: var(--ash); }
.podium-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.podium-mini li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--slab); border: 1px solid var(--edge); font-weight: 600; font-size: 0.9rem; }
.podium-mini .place { font: 700 0.9rem/1 var(--font-mono); color: var(--torch); padding-left: 6px; }
.awards { display: grid; gap: 12px; }
.award-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.award-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--slab); border: 1px solid var(--edge); }
.award-list img, .award-list .ph { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--vinyl); }
.award-list b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.award-list span { font-size: 0.82rem; color: var(--ash); }
.award-list .got { display: inline-flex; align-items: center; gap: 4px; font: 600 0.95rem/1 var(--font-mono); color: var(--torch); }
.board-table .who .icon, .scoreboard .icon, .lobby-players .icon, .podium .icon, .round-results .icon { margin-right: 8px; }

@media (prefers-reduced-motion: reduce) {
  .icon, .icon::before, .icon::after { animation: none !important; }
}
.earn-list .earn-note { display: block; color: var(--ash); font-size: 0.88rem; border-bottom: 0; }

/* ---------- plays, stakes and ads ---------- */
.plays-chip { color: var(--moss); border-color: color-mix(in oklab, var(--moss) 40%, var(--edge)); background: color-mix(in oklab, var(--moss) 8%, var(--slab)); }
.plays-chip.is-empty { color: var(--blood); border-color: color-mix(in oklab, var(--blood) 50%, var(--edge)); background: color-mix(in oklab, var(--blood) 10%, var(--slab)); }
.plays-chip .note-ico { padding: 0; background: none; fill: currentColor; }

.queue-stake { margin: 0; font-weight: 600; color: var(--torch); }

.pips { display: flex; gap: 6px; flex-wrap: wrap; }
.pips i { width: 26px; height: 10px; border-radius: 5px; background: var(--slab-2); }
.pips i.on { background: var(--moss); }
.pips i.ad.on { background: color-mix(in oklab, var(--moss), var(--torch) 50%); }
.plays-dialog h2.is-out { color: var(--blood); }
.ad-offer { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--edge); background: var(--slab); }
.ad-offer p { margin: 0 !important; }
.ad-offer .btn { justify-self: start; white-space: nowrap; font-size: 0.82rem; }
.pips .more { align-self: center; font: 700 0.8rem/1 var(--font-mono); color: var(--moss); }
.btn .note-ico { background: var(--torch-ink); fill: var(--torch); }
.btn-outline .note-ico { background: var(--torch); fill: var(--torch-ink); }

.ad-player { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / 0.92); }
.ad-frame { display: grid; gap: 14px; width: min(560px, 100%); }
.ad-frame .eyebrow { margin: 0; }
.ad-slot {
  display: grid;
  align-content: center;
  gap: 10px;
  aspect-ratio: 16 / 9;
  padding: 24px;
  border-radius: 14px;
  border: 1px dashed color-mix(in oklab, var(--bone) 30%, var(--edge));
  background: repeating-linear-gradient(135deg, var(--slab) 0 12px, transparent 12px 24px);
  text-align: center;
}
.ad-slot b { font: 900 clamp(1.3rem, 5.5vw, 1.9rem)/1.1 var(--font-display); letter-spacing: -0.02em; }
.ad-slot span { color: var(--ash); max-width: 44ch; justify-self: center; }
.ad-foot { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.ad-count { font: 600 1.4rem/1 var(--font-mono); color: var(--torch); min-width: 3ch; font-variant-numeric: tabular-nums; }
.notes-earned.is-loss { color: var(--blood); border-color: color-mix(in oklab, var(--blood) 45%, var(--edge)); background: color-mix(in oklab, var(--blood) 10%, transparent); }

/* ---------- stage lights for staked duels ---------- */
/* Off for Open Mic. Club gets a neon haze, Theater a spotlight and curtains, Arena two
   sweeping beams, Stadium the full rig: four beams, rising sparks, a strobe on every
   reveal and a gold-trimmed turntable. */
.app { position: relative; z-index: 1; }
.stage-lights {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}
:root[data-stake] .stage-lights { opacity: 1; }
.stage-lights > i { position: absolute; display: none; }

:root[data-stake="club"] { --hz1: #ff3dbb; --hz2: #2de2e6; }
:root[data-stake="theater"] { --hz1: #ffb84d; --hz2: #b3202e; }
:root[data-stake="arena"] { --hz1: #7a5cff; --hz2: #ff3dbb; }
:root[data-stake="stadium"] { --hz1: #ffb84d; --hz2: #4fc3ff; }

:root[data-stake] .haze {
  display: block;
  inset: 0;
  background:
    radial-gradient(70% 45% at 50% 105%, color-mix(in oklab, var(--hz1) 30%, transparent), transparent 70%),
    radial-gradient(40% 35% at 0% 0%, color-mix(in oklab, var(--hz2) 20%, transparent), transparent 70%),
    radial-gradient(40% 35% at 100% 0%, color-mix(in oklab, var(--hz2) 20%, transparent), transparent 70%);
  animation: haze 5s ease-in-out infinite;
}
@keyframes haze { 50% { opacity: 0.55; } }

.curtain {
  top: 0;
  bottom: 0;
  width: 8vw;
  background: repeating-linear-gradient(90deg, #3a0910 0 14px, #5e0f1a 14px 26px, #2a060b 26px 34px);
  box-shadow: inset -24px 0 36px rgb(0 0 0 / 0.65);
}
.curtain.left { left: 0; }
.curtain.right { right: 0; transform: scaleX(-1); }
:root[data-stake="theater"] .curtain { display: block; }

.spot {
  top: -10vh;
  left: 50%;
  width: 90vmin;
  height: 120vh;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, rgb(255 226 170 / 0.24), rgb(255 226 170 / 0.05) 70%, transparent);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  filter: blur(4px);
  animation: flicker 6s infinite;
}
:root[data-stake="theater"] .spot, :root[data-stake="stadium"] .spot { display: block; }
@keyframes flicker { 0%, 46%, 49%, 100% { opacity: 1; } 47% { opacity: 0.7; } 75% { opacity: 0.88; } }

.beam {
  bottom: -6vh;
  width: 30vmax;
  height: 130vh;
  transform-origin: 50% 100%;
  background: linear-gradient(to top, color-mix(in oklab, var(--beam) 55%, transparent), transparent 85%);
  clip-path: polygon(47% 100%, 53% 100%, 100% 0, 0 0);
  filter: blur(3px);
  mix-blend-mode: screen;
  opacity: 0.8;
}
.b1 { left: -12vmax; --beam: #ff3dbb; animation: sweep-l 7s ease-in-out infinite; }
.b2 { right: -12vmax; --beam: #4fc3ff; animation: sweep-r 7s ease-in-out infinite; }
.b3 { left: 12vw; --beam: #ffb84d; animation: sweep-l 5s ease-in-out infinite reverse; }
.b4 { right: 12vw; --beam: #8a6bff; animation: sweep-r 5.5s ease-in-out infinite reverse; }
@keyframes sweep-l { 0%, 100% { transform: rotate(-38deg); } 50% { transform: rotate(18deg); } }
@keyframes sweep-r { 0%, 100% { transform: rotate(38deg); } 50% { transform: rotate(-18deg); } }
:root[data-stake="arena"] .b1, :root[data-stake="arena"] .b2, :root[data-stake="stadium"] .beam { display: block; }
:root[data-stake="stadium"] .b1, :root[data-stake="stadium"] .b2 { animation-duration: 4.5s; }

.sparks {
  inset: 0;
  background-image:
    radial-gradient(circle, #ffd27a 0 1.5px, transparent 2.5px),
    radial-gradient(circle, #fff 0 1px, transparent 2px),
    radial-gradient(circle, #ffb84d 0 1.5px, transparent 2.5px);
  background-size: 140px 180px, 90px 130px, 200px 240px;
  background-position: 0 0, 40px 60px, 100px 20px;
  animation: rise 9s linear infinite;
  opacity: 0.55;
}
.sparks.late {
  background-size: 170px 210px, 120px 160px, 230px 270px;
  animation-name: rise-late;
  animation-duration: 13s;
  opacity: 0.35;
}
/* Each layer moves exactly one tile, so the loop is seamless. */
@keyframes rise { to { background-position: 0 -180px, 40px -70px, 100px -220px; } }
@keyframes rise-late { to { background-position: 0 -210px, 40px -100px, 100px -250px; } }
:root[data-stake="stadium"] .sparks { display: block; }

.strobe { inset: 0; background: radial-gradient(circle at 50% 40%, rgb(255 255 255 / 0.32), transparent 70%); opacity: 0; }
:root[data-stake] .strobe { display: block; }
.stage-lights.flash .strobe { animation: strobe 0.7s ease-out; }
:root[data-stake="stadium"] .stage-lights.flash .strobe { animation: strobe-big 0.9s ease-out; }
@keyframes strobe { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@keyframes strobe-big { 0% { opacity: 0; } 10% { opacity: 1; } 20% { opacity: 0.2; } 30% { opacity: 0.9; } 100% { opacity: 0; } }

.stake-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--slab-2);
  color: var(--bone);
  font: 700 0.7rem/1.4 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}
.stake-badge .note-ico { width: 1.15em; height: 1.15em; padding: 0.18em; margin: 0 3px; vertical-align: -0.28em; }
.stake-badge.big { justify-self: start; margin: 0; padding: 6px 14px; font-size: 0.8rem; }
:root[data-stake="club"] .stake-badge { border-color: #ff3dbb; color: #ff9be0; }
:root[data-stake="theater"] .stake-badge { border-color: #ffb84d; color: #ffd28a; }
:root[data-stake="arena"] .stake-badge { border-color: #8a6bff; color: #c7b8ff; box-shadow: 0 0 12px rgb(138 107 255 / 0.5); }
:root[data-stake="stadium"] .stake-badge { border-color: transparent; background: linear-gradient(135deg, #fff3c2, #f3c64a 40%, #b47d18 70%, #f8d978); color: #3a2604; box-shadow: 0 0 16px rgb(255 200 80 / 0.6); }

:root[data-stake="arena"] #disc .vinyl { box-shadow: 0 0 0 1px rgb(138 107 255 / 0.5), 0 0 30px rgb(138 107 255 / 0.22), 0 30px 60px -24px rgb(0 0 0 / 0.9); }
:root[data-stake="stadium"] #disc .vinyl { box-shadow: 0 0 0 2px rgb(243 198 74 / 0.6), 0 0 44px rgb(255 190 80 / 0.28), 0 30px 60px -24px rgb(0 0 0 / 0.9); }
:root[data-stake="stadium"] #disc .label { box-shadow: inset 0 0 0 3px #f3c64a, 0 0 24px rgb(255 200 80 / 0.5); }
:root[data-stake="stadium"] #disc .ring-fill { stroke: #f3c64a; }

@media (prefers-reduced-motion: reduce) {
  .stage-lights > i { animation: none !important; }
  .stage-lights { transition: none; }
}
.xp-earned.leveled .xp-track { animation: level-flash 0.9s ease-out; }
.xp-earned.leveled .fan-title { animation: level-pop 0.9s ease-out; }
@keyframes level-flash { 0% { box-shadow: 0 0 0 0 rgb(255 184 77 / 0.9); } 100% { box-shadow: 0 0 0 10px rgb(255 184 77 / 0); } }
@keyframes level-pop { 30% { transform: scale(1.12); color: var(--bone); } }
.xp-earned .fan-title { display: inline-block; transform-origin: left center; }
@media (prefers-reduced-motion: reduce) { .xp-earned.leveled .xp-track, .xp-earned.leveled .fan-title { animation: none; } }

/* ---------- rematch screen ---------- */
.rematch {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
  border-radius: 18px;
  border: 1px solid color-mix(in oklab, var(--torch) 40%, var(--edge));
  background: color-mix(in oklab, var(--torch) 6%, var(--slab));
}
.rematch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rematch-clock { font: 600 1.3rem/1 var(--font-mono); color: var(--torch); font-variant-numeric: tabular-nums; }
.rematch-meter { height: 4px; border-radius: 4px; background: var(--slab-2); overflow: hidden; }
.rematch-meter i { display: block; height: 100%; width: 100%; background: var(--torch); transition: width 0.2s linear; }
.rematch-terms { margin: 0; color: var(--ash); font-size: 0.9rem; }
.rematch-players { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rematch-players li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--slab); border: 1px solid var(--edge); }
.rematch-players .nm { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.rematch-players .status { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); }
.rematch-players li.is-ready { border-color: color-mix(in oklab, var(--moss) 55%, var(--edge)); }
.rematch-players li.is-ready .status { color: var(--moss); }
.rematch-players li.is-left { opacity: 0.5; }
.rematch-players li.is-left .status { color: var(--blood); }
.rematch-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rematch-note { margin: 0; min-height: 1.3em; color: var(--ash); font-size: 0.92rem; }

/* ---------- versus screen ---------- */
.versus-screen {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  padding: 16px;
  overflow-y: auto;
  /* Solid black, lit in the stake's colours when there's money on the line. */
  background:
    radial-gradient(60% 40% at 50% 105%, color-mix(in oklab, var(--hz1, #000) 30%, transparent), transparent 70%),
    radial-gradient(45% 30% at 50% -5%, color-mix(in oklab, var(--hz2, #000) 22%, transparent), transparent 70%),
    #000;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.versus-screen.is-on { opacity: 1; }
.vs-eyebrow { margin: 0; text-align: center; }
.vs-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  width: min(820px, 100%);
}
.vs-side { display: grid; gap: 12px; min-width: 0; }
/* The record keeps spinning in the middle; the gold VS badge sits on its label. */
.vs-center { position: relative; display: grid; place-items: center; }
.vs-disc { width: clamp(96px, 17vw, 140px); }
.vs-disc .label::after { display: none; }
.vs-center .vs-badge { position: absolute; font-size: clamp(0.85rem, 2.4vw, 1.15rem); border: 5px solid #000; box-sizing: content-box; width: 2.4em; height: 2.4em; }

.vs-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 20px 16px 18px;
  border-radius: 22px;
  border: 1px solid var(--edge);
  border-top: 6px solid var(--c, var(--edge));
  background: var(--slab);
  text-align: center;
  opacity: 0;
}
.vs-corner { margin: 0; font: 700 0.66rem/1.2 var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--c, var(--ash)); }
.versus-screen.is-on .vs-card, .versus-screen.is-on .pcard-frame { animation: vs-in 0.55s cubic-bezier(0.2, 1.2, 0.4, 1) forwards; }
#vs-left :is(.vs-card, .pcard-frame) { --from: -40px; }
#vs-right :is(.vs-card, .pcard-frame) { --from: 40px; animation-delay: 0.12s; }
.versus-screen .pcard-frame { opacity: 0; }
.versus-screen.is-on .pcard-frame > .vs-card { animation: none; opacity: 1; }
@keyframes vs-in { from { opacity: 0; transform: translateX(var(--from)); } to { opacity: 1; transform: none; } }
.vs-card.is-me { border-color: var(--edge); border-top-color: var(--c, var(--blue)); }
.vs-card.is-ghost { border-style: dashed; }
.vs-card .icon { --size: clamp(58px, 15vw, 84px); }
.vs-name { margin: 0; font: 900 clamp(1.1rem, 4.5vw, 1.6rem)/1.05 var(--font-display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.vs-card.is-ghost .vs-name { font-style: italic; color: var(--ash); }
.vs-rank { margin: 0; font: 700 0.85rem/1.3 var(--font-mono); color: var(--c, var(--torch)); font-variant-numeric: tabular-nums; }
.vs-rank.is-none { color: var(--ash); font-family: var(--font-body); font-weight: 500; font-size: 0.88rem; }
.vs-fan { margin: 0; font: 700 0.85rem/1.35 var(--font-body); color: color-mix(in oklab, var(--bone) 80%, var(--ash)); }
.vs-accolades { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.vs-accolades li {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--slab);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
}
.vs-accolades li.trophy { border-color: color-mix(in oklab, #f3c64a 60%, var(--edge)); color: #f6d684; }
.vs-accolades li.bedrock { border-color: color-mix(in oklab, var(--blood) 50%, var(--edge)); color: #ffb0b0; }
.vs-accolades li.wins { border-color: color-mix(in oklab, var(--moss) 50%, var(--edge)); color: #a9ecc6; }
.vs-accolades li.fresh { color: var(--ash); }
.vs-caption { margin: 0; font: 700 clamp(0.95rem, 3.8vw, 1.25rem)/1.2 var(--font-display); color: var(--torch); text-align: center; }

@media (max-width: 600px) {
  .vs-stage { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .vs-disc { width: 84px; }
  .vs-center .vs-badge { font-size: 0.8rem; }
  #vs-left :is(.vs-card, .pcard-frame), #vs-right :is(.vs-card, .pcard-frame) { --from: 0px; }
}
@media (prefers-reduced-motion: reduce) {
  .versus-screen { transition: none; }
  .versus-screen.is-on :is(.vs-card, .pcard-frame) { animation: none; opacity: 1; }
  .vs-disc .vinyl { animation: none; }
}

/* ---------- payouts counting into your total ---------- */
.payout { display: grid; gap: 6px; justify-items: start; }
.payout .eyebrow { margin: 0; }
.payout-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.payout-total { display: inline-flex; align-items: center; gap: 10px; font: 600 clamp(2rem, 8vw, 2.8rem)/1 var(--font-mono); color: var(--bone); font-variant-numeric: tabular-nums; }
.payout-total .note-ico { color: var(--torch); }
.payout-delta { padding: 6px 12px; border-radius: 999px; font: 700 1.1rem/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ash); background: var(--slab); }
.payout-delta.up { color: var(--moss); background: color-mix(in oklab, var(--moss) 14%, transparent); }
.payout-delta.down { color: var(--blood); background: color-mix(in oklab, var(--blood) 12%, transparent); }
.payout.is-counting .payout-delta.up { animation: drop-in 0.7s ease-in forwards; }
.payout.is-counting .payout-total { animation: total-glow 1.4s ease-out; }
.payout.is-done .payout-total { color: var(--torch); }
@keyframes drop-in { to { transform: translateX(-36px) scale(0.6); opacity: 0; } }
@keyframes total-glow { 30% { text-shadow: 0 0 18px rgb(255 184 77 / 0.75); transform: scale(1.04); } }
.payout-total { transform-origin: left center; }
#notes-btn.is-counting { box-shadow: 0 0 0 3px color-mix(in oklab, var(--torch) 35%, transparent), 0 0 18px rgb(255 184 77 / 0.5); }
@media (prefers-reduced-motion: reduce) {
  .payout.is-counting .payout-delta.up, .payout.is-counting .payout-total { animation: none; }
}

/* ---------- parties: the ballot ---------- */
.party-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px 28px; align-items: end; }
.party-strip .join-strip > .btn { justify-self: start; }
.ballot { display: grid; gap: 14px; }
.ballot-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ballot-count { font-size: 0.85rem; color: var(--ash); }
.ballot-help { margin: -4px 0 0; color: var(--ash); font-size: 0.9rem; max-width: 62ch; }
.ballot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ballot-item {
  width: 100%;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 14px 8px 8px;
  border-radius: 14px;
  border: 1px solid var(--edge);
  background: var(--slab);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ballot-item:hover:not(:disabled) { border-color: var(--torch); }
.ballot-item:disabled { cursor: default; }
.ballot-item.is-mine { border-color: var(--torch); background: color-mix(in oklab, var(--torch) 10%, var(--slab)); }
.ballot-item.is-leading .tally b { color: var(--torch); }
/* A pick whose songs are still loading on the server. */
.ballot-item.is-loading .ph { animation: pulse 1.2s ease infinite; }
.ballot-item.is-loading .what > span { color: var(--torch); }
.ballot-item img, .ballot-item .ph { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--vinyl); }
.ballot-item .dice {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: conic-gradient(from 30deg, #ff8ad8, #8aeeff, #b48aff, #ffe68a, #ff8ad8);
  color: #120f16;
  font: 900 1.3rem/1 var(--font-display);
}
.ballot-item .what { display: grid; gap: 2px; min-width: 0; }
.ballot-item .what b { font-weight: 600; overflow-wrap: anywhere; }
.ballot-item .what span { font-size: 0.8rem; color: var(--ash); }
.ballot-item .tally { display: grid; justify-items: end; gap: 4px; }
.ballot-item .tally b { font: 600 1.2rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.ballot-item .voters { display: flex; }
.ballot-item .voters .icon { --size: 18px; margin-left: -4px; box-shadow: 0 0 0 2px var(--ground); }
.ballot-item .remove { font-size: 0.78rem; color: var(--ash); text-decoration: underline; text-underline-offset: 3px; }
.nominate { display: grid; gap: 8px; }
.search-box.small { min-height: 46px; padding: 0 14px; }
.search-box.small input { font-size: 1rem; }
.nominate-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nominate-chips button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--edge); background: var(--slab-2); font-size: 0.85rem; font-weight: 500; }
.nominate-chips button:hover { border-color: var(--torch); }
.party-settings { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.party-settings .ballot-help { flex-basis: 100%; margin: 0; }
.party-settings .seg button { display: inline-flex; align-items: center; gap: 6px; }
.party-settings .seg button:disabled { cursor: default; }
.party-settings.is-readonly .seg button:not([aria-checked="true"]) { opacity: 0.45; }
.party-settings .seg-note { margin: 0; color: var(--ash); font-size: 0.8rem; max-width: 34ch; }

/* Narrow screens: the record logo stands in for the wordmark, and chips tighten up. */
.brand { white-space: nowrap; }
.topbar { flex-wrap: nowrap; }
.top-actions { min-width: 0; }
@media (max-width: 640px) {
  .brand-word { display: none; }
  .top-actions { gap: 6px; }
  .notes-chip { padding: 0 10px; gap: 5px; }
  .profile-btn { width: 38px; height: 38px; }
  .profile-btn .icon { --size: 36px; }
}
/* Let every screen's sections shrink to the column instead of stretching it. */
.screen > * { min-width: 0; }
.recent-row button { min-width: min(190px, 70vw); }
.search > *, .nominate > *, .share > * { min-width: 0; }
.search-box input, .share-row input { width: 100%; }

/* ---------- results: the win pill, the scoreline, the podium ---------- */
.result-pill {
  justify-self: start;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--torch);
  color: var(--torch-ink);
  font: 900 0.85rem/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  transform: rotate(-4deg);
  transform-origin: left center;
}
.scoreline { display: grid; justify-items: start; gap: 6px; }
.scoreline .score { display: flex; align-items: center; gap: 18px; font: 900 clamp(3.6rem, 18vw, 5.5rem)/1 var(--font-display); letter-spacing: -0.04em; }
.scoreline .score b { color: var(--c); font-variant-numeric: tabular-nums; }
.scoreline .score i { font-style: normal; font-size: 0.38em; color: var(--ash); }
.scoreline .vs-line { color: var(--ash); font-size: 0.95rem; }

/* The top three on a stand: 2nd, 1st, 3rd, gold silver and bronze, a crown for the winner. */
.stand { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; }
.stand li { --m: var(--edge-2); display: grid; justify-items: center; gap: 8px; min-width: 0; }
.stand li.is-gold { --m: var(--torch); }
.stand li.is-silver { --m: var(--silver); }
.stand li.is-bronze { --m: var(--bronze); }
.stand .icon { box-shadow: 0 0 0 3px var(--ground), 0 0 0 5px var(--m); }
.stand .step-1 .icon { --size: 66px; box-shadow: 0 0 0 3px var(--ground), 0 0 0 6px var(--m); }
.stand .crown { width: 28px; height: 20px; fill: var(--torch); margin-bottom: -2px; }
.stand .nm { font-weight: 700; font-size: 0.9rem; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stand li.is-me .nm { color: var(--blue); }
.stand .block { width: 100%; display: grid; place-content: center; justify-items: center; gap: 2px; border-radius: 14px 14px 0 0; background: var(--slab-2); border-top: 4px solid var(--m); }
.stand .step-1 .block { height: 124px; }
.stand .step-2 .block { height: 92px; }
.stand .step-3 .block { height: 72px; }
.stand .place { font: 900 1.6rem/1 var(--font-display); color: var(--m); }
.stand .step-1 .place { font-size: 2rem; }
.stand .pts { font: 700 0.82rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }

.round-list { display: grid; gap: 10px; }
.round-list ol { list-style: none; margin: 0; padding: 4px 16px; border-radius: 20px; border: 1px solid var(--torch); background: var(--slab); }
.round-list li { display: flex; align-items: center; gap: 12px; min-height: 54px; border-bottom: 1px solid var(--edge); }
.round-list li:last-child { border-bottom: 0; }
.round-list .r { width: 26px; font: 700 0.8rem/1 var(--font-mono); color: var(--ash); flex: none; }
.round-list .what { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.round-list .who { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.round-list .who.none { font-size: 0.82rem; color: var(--ash); }
.win-pill { padding: 4px 10px; border-radius: 999px; background: var(--c); color: var(--torch-ink); font-weight: 700; font-size: 0.8rem; white-space: nowrap; }

/* ---------- the daily drop ---------- */
/* Seven tiles, four across: days already collected get a gold tick, today is lit in
   gold, days ahead are dashed outlines, and day 7 takes a double-width tile. */
.login-dialog .dialog-view { gap: 14px; }
.login-dialog h2 { font-size: 1.6rem; }
.login-dialog #login-body { margin: -6px 0 0; }
.login-track { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.login-track .tile {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-height: 74px;
  padding: 10px 4px;
  border-radius: 14px;
  border: 1px dashed var(--edge-2);
  text-align: center;
}
.login-track .tile.is-big { grid-column: span 2; }
.login-track .d { font: 700 0.6rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); }
.login-track .amt { display: inline-flex; align-items: center; gap: 5px; font: 700 0.95rem/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ash); }
.login-track .amt .note-ico { width: 1.05em; height: 1.05em; }
.login-track .is-big .amt { font-size: 1.15rem; color: var(--torch); }
.login-track .is-done { border: 1px solid var(--edge); background: var(--slab-2); }
.login-track .is-done .amt { color: var(--bone); opacity: 0.6; }
.login-track .tick { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: var(--torch); color: var(--torch-ink); }
.login-track .is-today { border: 2px solid var(--torch); background: color-mix(in oklab, var(--torch) 12%, var(--slab)); animation: drop-glow 2s ease-in-out infinite; }
.login-track .is-today .d { color: var(--torch); }
.login-track .is-today .amt { color: var(--bone); font-size: 1.1rem; }
/* Day 7 on the day you reach it: the full gold treatment. */
.login-track .is-big.is-today { border-color: transparent; background: linear-gradient(135deg, #fff3c2, #f3c64a 38%, #b47d18 68%, #f8d978); }
.login-track .is-big.is-today .d, .login-track .is-big.is-today .amt { color: #2a1a02; }
.login-track .is-big.is-today .note-ico { background: #2a1a02; fill: #f3c64a; }
.login-note { margin: 0 !important; font-size: 0.88rem; }
.login-dialog #login-collect { width: 100%; margin-top: 4px; }
@keyframes drop-glow { 50% { box-shadow: 0 0 18px rgb(212 166 58 / 0.45); } }
@media (prefers-reduced-motion: reduce) { .login-track .is-today { animation: none; } }

/* ---------- name effects ---------- */
/* A username in a bought effect: .nfx-t is the lettering. Some effects add pieces of
   their own around it (a wave, a beam, a snow cap, a strand of lights, a pulse line),
   and some scatter particles: .nfx-p, each <i> placed along the name by --x, staggered
   by --d, with --r (0–2) for variety. Everything is sized in em, so an effect scales
   with the name. Pieces may rise above a name and spread past its ends; anything below
   it gets room of its own. 'static' names (the tightest spots) show only the lettering. */
.nfx { position: relative; display: inline-block; max-width: 100%; vertical-align: bottom; isolation: isolate; }
.nfx-t { position: relative; z-index: 1; display: block; min-width: 0; white-space: nowrap; }
.nfx-p { position: absolute; inset: -0.6em -0.3em 0; z-index: 2; pointer-events: none; }
.nfx-p i { position: absolute; left: var(--x); animation-delay: var(--d) !important; }
.nfx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Tight spots clip long names with an ellipsis, but keep the particles visible. */
.nm:has(> .nfx), .vs-name:has(> .nfx), .stand .nm:has(.nfx) { overflow: visible; }
/* The clip box is padded out (and pulled back in with margins) so glows aren't cut square. */
.lobby-players .nfx-t, .stand .nfx-t, .scoreboard .nfx-t { overflow: hidden; text-overflow: ellipsis; padding: 0.5em 0.55em; margin: -0.5em -0.55em; }

/* Liner Notes (Demo): typewriter lettering with a note badge. No motion. */
.nfx-liner-notes { display: inline-flex; align-items: center; gap: 0.3em; }
.nfx-liner-notes::before {
  content: '';
  flex: none;
  width: 0.72em;
  height: 0.72em;
  background: #a3a3b8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='17' r='4'/%3E%3Cpath d='M12 17 V4 q6 2 7 8' stroke='black' stroke-width='2.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='17' r='4'/%3E%3Cpath d='M12 17 V4 q6 2 7 8' stroke='black' stroke-width='2.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.nfx-liner-notes .nfx-t { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0; color: #c9c9d4; }

/* On Beat (Single): a blue glow kicks on every beat, like a kick drum. */
.nfx-on-beat .nfx-t { color: #f4f3ee; transform-origin: left center; animation: nfx-beat 0.9s ease-out infinite; }

/* Waveform (Single): a sound wave rolls along under the name, in room the name keeps. */
.nfx-waveform:not(.is-static) { padding-bottom: 0.5em; }
.nfx-waveform .nfx-t { color: #f4f3ee; }
.nfx-wave {
  position: absolute;
  inset: auto 0 0;
  height: 0.5em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 16'%3E%3Cpath d='M0 8 q10 -8 20 0 t20 0' stroke='%233D8BFF' stroke-width='2.5' fill='none'/%3E%3C/svg%3E") 0 50% / 1.33em 0.5em repeat-x;
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  animation: nfx-wave 0.8s linear infinite;
}

/* Gold Record (Gold): solid gold lettering with a light sweep, like a plaque. Midnight
   Drop's champagne gold is the same, quicker. */
.nfx-gold-record .nfx-t, .nfx-midnight-drop .nfx-t {
  background: linear-gradient(100deg, #b8862b 0%, #d4a63a 35%, #fff1c2 50%, #d4a63a 65%, #b8862b 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: nfx-shimmer 2.6s linear infinite;
}

/* Bounce Track (Gold): the letters hop one after another, like a bouncing-ball lyric. */
.nfx-bounce-track .nfx-t { color: #d4a63a; }
.nfx-bounce-track .nfx-t > [aria-hidden] > span { display: inline-block; white-space: pre; animation: nfx-hop 1.2s ease-in-out infinite; animation-delay: calc(var(--i) * 0.08s); }

/* Spotlight (Platinum): a platinum glow, with a stage light sweeping across. */
.nfx-spotlight .nfx-t { color: #e6ecf5; text-shadow: 0 0 0.45em rgb(230 236 245 / 0.5); }
.nfx-beam { position: absolute; inset: -0.3em -0.5em; z-index: 0; overflow: hidden; border-radius: 0.4em; pointer-events: none; }
.nfx-beam::before {
  content: '';
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -2.5em;
  width: 1.8em;
  background: linear-gradient(90deg, transparent, rgb(230 236 245 / 0.24) 30%, rgb(230 236 245 / 0.24) 70%, transparent);
  transform: rotate(18deg);
  animation: nfx-beam 2.8s ease-in-out infinite;
}

/* Bass Drop (Platinum): the name shakes and splits into red and cyan when the bass hits. */
.nfx-bass-drop .nfx-t { color: #f4f3ee; animation: nfx-split 1.4s linear infinite; }

/* Marquee (Diamond): the name in lights on a venue sign, with chasing bulbs, shifting
   colours and notes rising off the sides. Static names keep the lettering only. Each row
   of bulbs is whole tiles of two (round), lit in turn by --bulb-a and --bulb-b. */
@property --bulb-a { syntax: '<color>'; inherits: true; initial-value: #fff1c2; }
@property --bulb-b { syntax: '<color>'; inherits: true; initial-value: #fff1c2; }
.nfx-marquee:not(.is-static) { padding: 0.46em 0.6em; border: 0.07em solid #d4a63a; border-radius: 0.35em; animation: nfx-chase 0.8s steps(1) infinite; }
.nfx-marquee:not(.is-static)::before, .nfx-marquee:not(.is-static)::after {
  content: '';
  position: absolute;
  left: 0.4em;
  right: 0.4em;
  height: 0.2em;
  background:
    radial-gradient(circle at 25% 50%, var(--bulb-a) 0.07em, transparent 0.09em),
    radial-gradient(circle at 75% 50%, var(--bulb-b) 0.07em, transparent 0.09em);
  background-size: 0.8em 100%;
  background-repeat: round no-repeat;
  filter: drop-shadow(0 0 0.08em #ffd36b);
  pointer-events: none;
}
.nfx-marquee:not(.is-static)::before { top: 0.12em; }
.nfx-marquee:not(.is-static)::after { bottom: 0.12em; scale: -1 1; }
.nfx-marquee .nfx-t { font-family: var(--font-display); font-weight: 900; font-size: 0.8em; letter-spacing: 0.02em; text-transform: uppercase; animation: nfx-hue 3s linear infinite; }
.nfx-marquee .nfx-p { inset: -0.3em -0.4em 0; }
.nfx-marquee i {
  bottom: 0.2em;
  width: 0.42em;
  aspect-ratio: 1;
  background: #7fe3ff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 18.5a2.5 2.5 0 1 1-2.5-2.5c.5 0 1 .1 1.5.4V5l10-2v11.5a2.5 2.5 0 1 1-2.5-2.5c.5 0 1 .1 1.5.4V6.2L9 7.8z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 18.5a2.5 2.5 0 1 1-2.5-2.5c.5 0 1 .1 1.5.4V5l10-2v11.5a2.5 2.5 0 1 1-2.5-2.5c.5 0 1 .1 1.5.4V6.2L9 7.8z'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0;
  animation: nfx-rise 2.4s ease-out infinite;
}
.nfx-marquee i:nth-child(1) { left: 0; }
.nfx-marquee i:nth-child(2) { left: auto; right: 0; background: #ff7a1a; animation-delay: -1.2s !important; }

/* Haunted (Halloween): pumpkin-orange letters flicker like a dying bulb, and drip. */
.nfx-haunted .nfx-t { color: #ff7a1a; text-shadow: 0 0 0.38em rgb(155 123 255 / 0.8); animation: nfx-flicker 2s linear infinite; }
.nfx-haunted .nfx-p { inset: 0 0.1em; }
.nfx-haunted i { top: 74%; width: 0.12em; border-radius: 0 0 0.12em 0.12em; background: #ff7a1a; animation: nfx-drip 2.4s ease-in infinite; }

/* Night Shift (Halloween): bats sweep past a full moon rising behind a glowing name. */
.nfx-night-shift .nfx-t { color: #f4f3ee; text-shadow: 0 0 0.3em rgb(155 123 255 / 0.9); }
.nfx-night-shift::before { content: ''; position: absolute; right: 0.1em; top: -0.28em; z-index: 0; width: 0.95em; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 62%, #d9c99a 0 9%, transparent 10%), radial-gradient(circle at 64% 40%, #d9c99a 0 6%, transparent 7%), radial-gradient(circle at 38% 34%, #fffbea, #f2e2b0 55%, #b8a26a); box-shadow: 0 0 0.45em rgb(242 226 176 / 0.4); opacity: 0.85; }
.nfx-night-shift .nfx-p { inset: -0.35em -0.6em 0; overflow: hidden; }
.nfx-night-shift i {
  top: -0.05em;
  width: 0.85em;
  aspect-ratio: 2;
  background: #9b7bff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-11 -5 22 11'%3E%3Cpath d='M0 2 C-3 -3 -6 -4 -10 -2 C-8 0 -8 2 -9 4 C-6 2 -4 3 -3 5 C-2 3 -1 3 0 2 C1 3 2 3 3 5 C4 3 6 2 9 4 C8 2 8 0 10 -2 C6 -4 3 -3 0 2 Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-11 -5 22 11'%3E%3Cpath d='M0 2 C-3 -3 -6 -4 -10 -2 C-8 0 -8 2 -9 4 C-6 2 -4 3 -3 5 C-2 3 -1 3 0 2 C1 3 2 3 3 5 C4 3 6 2 9 4 C8 2 8 0 10 -2 C6 -4 3 -3 0 2 Z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: nfx-flyby 3.6s linear infinite, nfx-flap 0.3s ease-in-out infinite;
}
.nfx-night-shift i:nth-child(2) { top: 50%; width: 0.68em; background: #ff7a1a; animation-duration: 3.6s, 0.25s; animation-delay: -1.8s !important; }

/* String Lights (Christmas): a strand of bulbs twinkling above the name. */
.nfx-string-lights .nfx-t { color: #f4f3ee; }
.nfx-strand { position: absolute; left: -0.1em; right: -0.1em; bottom: calc(100% - 0.12em); height: 0.5em; pointer-events: none; }
.nfx-strand svg { position: absolute; inset: 0 0 auto; width: 100%; height: 0.4em; overflow: visible; fill: none; stroke: #2e9e6a; stroke-width: 1.5px; }
.nfx-strand i { --c: #e5484d; position: absolute; left: var(--x); top: 0.16em; width: 0.17em; height: 0.22em; border-radius: 45% 45% 50% 50%; translate: -50% 0; background: var(--c); box-shadow: 0 0 0.25em var(--c); animation: nfx-twinkle 1.2s ease-in-out infinite; animation-delay: var(--d); }
.nfx-strand i:nth-of-type(4n + 2) { --c: #d4a63a; }
.nfx-strand i:nth-of-type(4n + 3) { --c: #7fe3ff; }
.nfx-strand i:nth-of-type(4n) { --c: #4cc28a; }

/* Snowed In (Christmas): icy letters with snow piled on top, and flakes falling. */
.nfx-snowed-in .nfx-t { color: #bfe9ff; text-shadow: 0 0 0.32em rgb(127 227 255 / 0.6); }
.nfx-cap { position: absolute; left: -0.06em; right: -0.06em; top: -0.1em; height: 0.34em; z-index: 2; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 230 12'%3E%3Cpath d='M6 12 q6 -10 18 -8 q8 -6 18 0 q10 -5 16 2 q12 -8 22 -2 q10 -6 20 0 q10 -6 20 -1 q12 -7 22 1 q10 -6 18 0 q10 -6 20 0 q10 -5 18 2 q8 -4 12 6 z' fill='%23F4F3EE'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; pointer-events: none; }
.nfx-snowed-in i { top: 0; width: calc(0.12em + var(--r) * 0.02em); aspect-ratio: 1; border-radius: 50%; background: #f4f3ee; opacity: 0; animation: nfx-fall 3s linear infinite; }
.nfx-snowed-in i:nth-child(4n) { background: #7fe3ff; }

/* Midnight Drop (New Year's): champagne-gold lettering (above), with confetti raining. */
.nfx-midnight-drop .nfx-t { animation-duration: 1.8s; }
.nfx-midnight-drop i { --c: #d4a63a; top: 0; width: 0.19em; height: 0.31em; background: var(--c); opacity: 0; animation: nfx-confetti 2.6s linear infinite; }
.nfx-midnight-drop i:nth-child(6n + 2) { --c: #7fe3ff; }
.nfx-midnight-drop i:nth-child(6n + 3) { --c: #ff5c8a; }
.nfx-midnight-drop i:nth-child(6n + 4) { --c: #f4f3ee; }
.nfx-midnight-drop i:nth-child(6n) { --c: #9b7bff; }

/* Heartbeat (Valentine's): a heart thumps in time with a pulse line traced behind. */
.nfx-heartbeat { display: inline-flex; align-items: center; gap: 0.3em; }
.nfx-heartbeat::before {
  content: '';
  flex: none;
  width: 0.8em;
  height: 0.7em;
  background: #ff5c8a;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-1 0 26 22'%3E%3Cpath d='M12 21 C-6 9 4 -4 12 5 C20 -4 30 9 12 21 Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-1 0 26 22'%3E%3Cpath d='M12 21 C-6 9 4 -4 12 5 C20 -4 30 9 12 21 Z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: nfx-heart 1.6s ease-in-out infinite;
}
.nfx-heartbeat .nfx-t { color: #ffd6e2; }
.nfx-ekg { position: absolute; left: -0.4em; right: -0.4em; top: 50%; z-index: 0; height: 1.4em; translate: 0 -50%; opacity: 0.55; pointer-events: none; }
.nfx-ekg svg { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke: #ff5c8a; stroke-width: 2px; stroke-linejoin: round; animation: nfx-ekg 1.6s linear infinite; }

@keyframes nfx-beat { 0%, 100% { text-shadow: 0 0 0 rgb(61 139 255 / 0); transform: scale(1); } 8% { text-shadow: 0 0 0.66em #3d8bff; transform: scale(1.05); } 40% { text-shadow: 0 0 0.2em rgb(61 139 255 / 0.35); transform: scale(1); } }
@keyframes nfx-wave { to { background-position-x: -1.33em; } }
@keyframes nfx-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@keyframes nfx-hop { 0%, 50%, 100% { transform: translateY(0); } 25% { transform: translateY(-0.33em); } }
@keyframes nfx-beam { from { left: -2.5em; } to { left: calc(100% + 0.7em); } }
@keyframes nfx-split {
  0%, 30%, 100% { text-shadow: 0 0 0 #ff4d6d, 0 0 0 #5fd3ff; transform: translate(0, 0); }
  6% { text-shadow: -0.13em 0 0 #ff4d6d, 0.13em 0 0 #5fd3ff; transform: translate(0.03em, -0.03em); }
  12% { text-shadow: 0.1em 0 0 #ff4d6d, -0.1em 0 0 #5fd3ff; transform: translate(-0.03em, 0.03em); }
  18% { text-shadow: -0.03em 0 0 #ff4d6d, 0.03em 0 0 #5fd3ff; transform: translate(0, 0); }
}
@keyframes nfx-chase { 0% { --bulb-a: #fff1c2; --bulb-b: rgb(255 241 194 / 0.2); } 50% { --bulb-a: rgb(255 241 194 / 0.2); --bulb-b: #fff1c2; } }
@keyframes nfx-hue { 0%, 100% { color: #d4a63a; } 33% { color: #7fe3ff; } 66% { color: #ff7a1a; } }
@keyframes nfx-rise { 0% { transform: translateY(0.3em); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-1em); opacity: 0; } }
@keyframes nfx-flicker { 0%, 100% { opacity: 1; } 18% { opacity: 0.4; } 30% { opacity: 1; } 52% { opacity: 0.65; } 64% { opacity: 1; } 82% { opacity: 0.5; } }
@keyframes nfx-drip { 0% { height: 0; transform: translateY(0); opacity: 1; } 55% { height: 0.28em; transform: translateY(0); opacity: 1; } 100% { height: 0.28em; transform: translateY(0.24em); opacity: 0; } }
@keyframes nfx-flyby { 0% { left: -0.8em; translate: 0 0; } 50% { translate: 0 -0.3em; } 100% { left: 100%; translate: 0 0; } }
@keyframes nfx-flap { 50% { scale: 1 0.35; } }
@keyframes nfx-twinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes nfx-fall { 0% { transform: translateY(-0.2em); opacity: 0; } 15% { opacity: 0.9; } 85% { opacity: 0.7; } 100% { transform: translateY(1.1em); opacity: 0; } }
@keyframes nfx-confetti { 0% { transform: translateY(-0.2em) rotate(0deg); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(1.25em) rotate(540deg); opacity: 0; } }
@keyframes nfx-heart { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }
@keyframes nfx-ekg { 0% { clip-path: inset(0 100% 0 0); opacity: 1; } 70% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { clip-path: inset(0 0 0 0); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .nfx-p { display: none; }
  .nfx, .nfx *, .nfx::before, .nfx::after { animation: none !important; }
}

/* In the shop: your own name, previewed in each effect. */
.name-preview { display: grid; place-items: center; width: 100%; min-height: 84px; padding: 18px 6px; font: 900 1.05rem/1.1 var(--font-display); letter-spacing: -0.02em; overflow: hidden; }
.name-preview.xl { width: auto; min-width: 0; flex: 1 1 45%; min-height: 112px; font-size: 1.05rem; border-radius: 16px; background: var(--dusk); }
.shop-featured.is-name { flex-wrap: wrap; }
.shop-featured.is-name .what { flex-basis: 45%; }
.shop-items.is-names { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.shop-items.is-names .name-preview { border-radius: 12px; background: var(--dusk); }
.shop-item .blurb { font-size: 0.74rem; line-height: 1.35; color: var(--ash); padding: 0 4px; }
.shop-kinds { justify-self: start; }
/* Holiday drops, in their own colours (--drop for the name, --drop-accent for the dates). */
.shop-drops { display: grid; gap: 16px; }
.shop-drop {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid color-mix(in oklab, var(--drop-accent) 60%, transparent);
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in oklab, var(--drop) 14%, transparent), transparent 65%), var(--slab);
}
.drop-head { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.drop-head h2 { margin: 0; font: 900 1.35rem/1.1 var(--font-display); letter-spacing: -0.02em; color: var(--drop); }
.drop-dates { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--drop-accent); color: var(--drop-accent); font: 700 0.68rem/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.drop-palette { display: flex; gap: 5px; margin-left: auto; }
.drop-palette i { width: 12px; height: 12px; border-radius: 50%; }
.drop-left { margin: -4px 0 0; font-size: 0.85rem; color: var(--ash); }
.shop-drop .shop-item { background: var(--dusk); }
.tier-tag { font: 700 0.64rem/1 var(--font-mono); letter-spacing: 0.15em; text-transform: uppercase; color: var(--tier); }

/* ---------- player level ---------- */
.level-card { display: grid; gap: 12px; padding: 18px 20px; border-radius: 22px; border: 1px solid var(--torch); background: var(--slab); }
.level-head { display: flex; align-items: center; gap: 16px; }
.level-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--torch);
  color: var(--torch-ink);
  font: 900 1.6rem/1 var(--font-display);
  letter-spacing: -0.03em;
  transform: rotate(-6deg);
}
.level-id { display: grid; gap: 3px; min-width: 0; }
.level-id b { font: 900 1.25rem/1.1 var(--font-display); letter-spacing: -0.02em; }
.level-xp { font: 700 0.8rem/1.3 var(--font-mono); color: var(--ash); font-variant-numeric: tabular-nums; }
.level-next { margin: 0; font-size: 0.9rem; color: var(--ash); }
.level-next b { display: inline-flex; align-items: center; gap: 4px; color: var(--torch); font-family: var(--font-mono); }
.level-road { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.level-road li { display: grid; justify-items: center; gap: 6px; min-width: 0; text-align: center; }
.level-road .icon { --size: clamp(38px, 11vw, 54px); }
.level-road span { font: 700 0.6rem/1.2 var(--font-mono); letter-spacing: 0.06em; color: var(--ash); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.level-road .is-locked .icon { filter: grayscale(1) brightness(0.45); }
.level-road .is-locked .icon * { animation: none !important; }
.level-road .is-got span { color: var(--bone); }

.xp-chip { margin: 0; justify-self: start; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--edge-2); background: var(--slab-2); font: 700 0.82rem/1.2 var(--font-mono); color: var(--bone); font-variant-numeric: tabular-nums; }

.levelup-dialog .dialog-view { justify-items: center; text-align: center; gap: 12px; }
.levelup-num {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 4px 0;
  border-radius: 24px;
  background: var(--torch);
  color: var(--torch-ink);
  font: 900 2.6rem/1 var(--font-display);
  letter-spacing: -0.04em;
  transform: rotate(-6deg);
  box-shadow: 0 0 34px rgb(212 166 58 / 0.45);
  animation: levelup-pop 0.6s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.levelup-rewards { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 8px; }
.levelup-rewards li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--slab-2); text-align: left; }
.levelup-rewards .notes { justify-content: center; font: 700 1.2rem/1 var(--font-mono); color: var(--torch); }
.levelup-rewards .icon-reward > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.levelup-rewards .icon-reward b { font: 900 1rem/1.1 var(--font-display); }
.levelup-rewards .icon-reward .btn { min-height: 40px; flex: none; }
.levelup-dialog #levelup-ok { width: 100%; }
@keyframes levelup-pop { from { transform: rotate(-6deg) scale(0.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .levelup-num { animation: none; } }

/* ---------- profile: your collection ---------- */
.locker { display: grid; gap: 12px; }
.locker-note { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.88rem; color: var(--ash); }
.locker-note .link-btn { color: var(--torch); }
.locker-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.locker-grid.is-names { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.locker-tile {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  padding: 14px 8px 12px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: var(--slab);
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.locker-tile:hover { border-color: var(--edge-2); transform: translateY(-2px); }
.locker-tile .icon { --size: 64px; }
.locker-tile b { font-weight: 700; font-size: 0.8rem; line-height: 1.2; }
.locker-tile .tier { font: 700 0.6rem/1.2 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--tier, var(--ash)); }
.locker-tile .name-preview { min-height: 64px; padding: 10px 4px; border-radius: 12px; background: var(--dusk); font-size: 0.95rem; }
.locker-tile.is-plain .plain { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 1px dashed var(--edge-2); color: var(--ash); font-size: 0.75rem; }
.locker-tile[aria-pressed="true"] { border-color: var(--torch); }
.locker-tile[aria-pressed="true"]::after {
  content: 'Wearing';
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--torch);
  color: var(--torch-ink);
  font: 700 0.56rem/1.4 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (prefers-reduced-motion: reduce) { .locker-tile { transition: none; } }

/* ---------- party redesign (Oct 2026): lobby, round header, between-round standings ---------- */

/* Lobby */
.lobby.is-party { gap: 20px; padding-top: 8px; }
.lobby.is-party > .lobby-eyebrow { display: none; }
.party-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; }
.party-top[hidden] { display: none; }
.party-title { margin: 0; text-align: center; font: 700 1.15rem/1.2 var(--font-display); }
.round-btn {
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--edge); background: var(--slab); color: var(--bone);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.round-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.round-btn:hover, .round-btn.is-on { border-color: var(--torch); color: var(--torch); }

.code-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px 16px 20px; border-radius: 20px;
  border: 1px solid var(--torch); background: var(--slab);
}
.code-card[hidden] { display: none; }
.code-card-text { display: grid; gap: 6px; min-width: 0; }
.code-card .room-code { all: unset; display: flex; gap: 0.12em; font: 700 1.75rem/1 var(--font-mono); letter-spacing: 0.08em; color: var(--torch); }
.code-card .room-code::before { content: none; }
.code-card .btn { min-height: 44px; padding: 0 20px; flex: none; }
.code-lan { margin: -10px 0 0; font-size: 0.85rem; color: var(--ash); overflow-wrap: anywhere; }
.code-lan code { font-family: var(--font-mono); color: var(--bone); }

.lobby.is-party .lobby-players.is-grid { gap: 14px 8px; }

.party-summary { display: grid; padding: 4px 18px; border-radius: 20px; background: var(--slab); }
.party-summary[hidden] { display: none; }
.sum-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 0; border: 0; border-bottom: 1px solid var(--edge);
  background: none; text-align: left;
}
.sum-row:last-child { border-bottom: 0; }
.sum-row span { color: var(--ash); }
.sum-row b { font: 700 1rem/1 var(--font-mono); }
.sum-row:hover b { color: var(--torch); }
.lobby.is-party .party-settings { display: grid; gap: 14px; padding: 16px 18px; border-radius: 20px; background: var(--slab); border: 1px solid var(--edge); }
.lobby.is-party .party-settings[hidden] { display: none; }

.ballot-toggle {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; border-radius: 20px; border: 1px solid var(--edge); background: var(--slab);
  text-align: left;
}
.ballot-toggle:hover { border-color: var(--edge-2); }
.ballot-toggle-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ballot-toggle-text b { font: 700 0.95rem/1.3 var(--font-display); }
.ballot-toggle-text span { color: var(--torch); font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ballot-toggle .chev { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ash); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.ballot.is-open .ballot-toggle .chev { transform: rotate(180deg); }
.ballot-body { display: grid; gap: 14px; }
.ballot-body[hidden] { display: none; }
.ballot-body .ballot-help { margin: 0; }

.lineup { display: grid; gap: 10px; }
.lineup[hidden] { display: none; }
.lineup-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.lineup-tiles li {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px;
  border: 1px dashed var(--edge-2); font: 700 1rem/1 var(--font-mono); color: var(--ash);
}

.lobby.is-party .lobby-actions {
  position: sticky; bottom: 0; z-index: 2;
  display: grid; gap: 10px; margin-top: auto;
  padding: 16px 0 calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--ground) 22%);
}
.lobby.is-party #btn-start-duel { width: 100%; border-radius: 999px; }
.lobby.is-party .lobby-wait { text-align: center; font-size: 0.85rem; }
.lobby-actions .lockin { flex-basis: 100%; }

/* Party round: header, timer badge and the pick card. Scoreboard pills become rows. */
.party-hud { display: none; }
.play.is-party[data-mode="duel"] .party-hud { display: grid; gap: 12px; }
.play.is-party[data-mode="duel"] .hud-duel .hud-floor { display: none; }
.party-hud-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.party-clock {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--torch); color: var(--torch);
  font: 700 0.95rem/1 var(--font-mono); font-variant-numeric: tabular-nums;
}
.party-clock:empty { opacity: 0.35; }
.party-clock.is-low { border-color: var(--blood); color: var(--blood); }
.pick-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: 22px; background: var(--torch); color: var(--torch-ink);
}
.pick-art {
  width: 60px; height: 60px; flex: none; border-radius: 14px; overflow: hidden;
  display: flex; align-items: flex-end; padding: 6px; background: var(--torch-ink); color: var(--torch);
  font: 900 1.1rem/1 var(--font-display); position: relative;
}
.pick-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pick-text { display: grid; gap: 3px; min-width: 0; }
.pick-eyebrow { font: 700 0.66rem/1.2 var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; }
.pick-text b { font: 900 1.3rem/1.05 var(--font-display); overflow-wrap: anywhere; }
.pick-text > span:last-child { font-weight: 600; font-size: 0.85rem; }

.play.is-party[data-mode="duel"] .hud-duel.hud { display: block; }
.play.is-party .scoreboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; justify-content: stretch; }
.play.is-party .scoreboard li {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-rows: auto auto;
  column-gap: 8px; row-gap: 5px; align-items: center;
  padding: 7px 10px; border-radius: 14px; font-size: 0.85rem;
}
.play.is-party .scoreboard li .dot { grid-row: 1 / span 2; }
.play.is-party .scoreboard li .icon { grid-row: 1 / span 2; }
.play.is-party .scoreboard .nm { max-width: none; }
.play.is-party .scoreboard .bar { grid-column: 3 / -1; height: 4px; border-radius: 999px; background: var(--edge); overflow: hidden; }
.play.is-party .scoreboard .bar > i { display: block; height: 100%; background: var(--c, var(--torch)); transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.play.is-party .scoreboard li:first-child { border-color: color-mix(in oklab, var(--torch) 70%, var(--edge)); }
/* Multi-round parties: the bar narrows to make room for the overall total */
.play.is-party .scoreboard li:has(.ovr) .bar { grid-column: 3; }
/* A spectator's tag gets its own line under the bar, so their name isn't squeezed. */
.play.is-party .scoreboard .spec-tag { grid-column: 3 / -1; grid-row: 3; justify-self: start; margin-left: 0; }
.play.is-party .scoreboard .ovr { grid-column: 4; grid-row: 2; justify-self: end; font: 600 0.72rem/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ash); }
.party-gap { margin: 6px 0 0; font-size: 0.8rem; color: var(--ash); text-align: center; }
.party-gap[hidden] { display: none; }
.party-gap.is-lead { color: var(--torch); }
.play.is-party[data-mode="duel"] .disc { width: min(52vw, 220px); }

/* Between a party's rounds: podium first, the countdown card down by the actions. */
.stand-title { margin: 4px 0 0; }
.stand-title[hidden] { display: none; }
.over.is-between .next-set { order: 20; border-color: var(--torch); }
.over.is-between .over-actions { order: 21; margin-top: 0; }
.over.is-between #do-standings { padding: 0 16px; border-top: 0; border-radius: 20px; background: var(--slab); }
.over.is-between #do-standings li:last-child { border-bottom: 0; }

/* ---------- home redesign (Oct 2026) ----------
   Phones: one column in the target design's order: the hero, Quick play, the party
   card, Jump back in and the holiday vault (.home-side), then the search, playlist of
   the week, Trending and the decade and genre pills (.home-main). Computers (1080px and
   up): the page widens; the hero and .home-main make the left column, and .home-side
   is a column on the right that stays in view as you scroll. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dungeons[hidden] { display: none; }

.home { --home-gap: 40px; gap: var(--home-gap); }
.home-side, .home-main { display: grid; gap: var(--home-gap); align-content: start; min-width: 0; }
.home-side > *, .home-main > * { min-width: 0; }

.quick-play { border-radius: 22px; }

/* The Vault card: the solo mode, right under Quick play, with four vaults to open. */
.vault-card {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; width: min(100%, 420px); box-sizing: border-box;
  padding: 14px 14px 16px; border-radius: 22px;
  border: 1px solid color-mix(in oklab, var(--torch) 45%, var(--edge));
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in oklab, var(--torch) 13%, transparent), transparent 65%), var(--slab);
}
.vault-card > * { min-width: 0; }
.vault-card-head { display: flex; align-items: center; gap: 14px; }
.vault-wheel { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--torch); }
.vault-wheel svg { width: 26px; height: 26px; fill: none; stroke: var(--torch-ink); stroke-width: 2.2; stroke-linecap: round; }
.vault-card-text { display: grid; gap: 3px; min-width: 0; }
.vault-card-title { margin: 0; font: 900 clamp(1rem, 4.6vw, 1.15rem)/1 var(--font-display); letter-spacing: -0.02em; text-transform: uppercase; color: var(--torch); }
.vault-card-text > span { font-size: 0.85rem; font-weight: 600; color: var(--ash); }
.vault-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.vault-modes button { min-height: 38px; padding: 0 10px; font-size: 0.85rem; }
.vault-picks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.vault-picks:empty { display: none; }
.vault-picks button {
  display: grid; gap: 2px; width: 100%; padding: 0; border: 0; background: none; color: var(--bone); text-align: left; cursor: pointer;
}
.vault-picks img, .vault-picks .ph {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1; margin-bottom: 4px; border-radius: 12px; object-fit: cover;
  background: var(--vinyl); outline: 1px solid var(--edge); outline-offset: -1px; transition: outline-color 0.15s ease, transform 0.15s ease;
}
.vault-picks .ph { font: 900 1.1rem/1 var(--font-display); color: var(--torch); text-transform: uppercase; }
.vault-picks b { font-size: 0.78rem; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vault-picks button > span:last-child { font-size: 0.7rem; color: var(--ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vault-picks button:hover img, .vault-picks button:hover .ph { outline: 2px solid var(--torch); transform: translateY(-2px); }
.vault-picks button:hover b { color: var(--torch); }
.vault-card > .btn { width: 100%; min-height: 46px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .vault-picks img, .vault-picks .ph { transition: none; } }

.party-card {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: min(100%, 420px); box-sizing: border-box;
  padding: 16px 18px; border-radius: 20px;
  border: 1px solid var(--torch); background: var(--slab);
}
.party-card > * { min-width: 0; }
.party-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.party-card-title { margin: 0; font: 700 0.98rem/1.2 var(--font-display); }
.party-card .join-row { flex-wrap: nowrap; gap: 8px; }
.party-card .join-row input {
  flex: 1; min-width: 0; width: auto; min-height: 48px; border-radius: 14px;
  background: var(--ground); border-color: var(--edge-2); color: var(--torch);
  font: 700 1.25rem/1 var(--font-mono); letter-spacing: 0.3em;
}
.party-card .join-row .btn { min-height: 48px; border-radius: 999px; padding: 0 20px; }
.party-card > .btn { width: 100%; min-height: 48px; border-radius: 999px; }

.recent-list { list-style: none; margin: 0; padding: 4px 16px; display: grid; border-radius: 20px; background: var(--slab); }
.recent-list li + li { border-top: 1px solid var(--edge); }
.recent-list button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px;
  padding: 8px 0; border: 0; background: none; text-align: left;
}
.recent-list img, .recent-list .ph { width: 40px; height: 40px; flex: none; border-radius: 10px; object-fit: cover; background: var(--vinyl); }
.recent-list div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.recent-list b { font-weight: 700; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-list span { font-size: 0.82rem; color: var(--ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-list .chev { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ash); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.recent-list button:hover b { color: var(--torch); }
.recent-list button:hover .chev { stroke: var(--torch); }

.holiday-vault { border-radius: 20px; }
/* Decades and genres are the same pills. */
.decade-strip button { background: var(--slab); font: 700 0.9rem/1 var(--font-body); }

/* The / shortcut to the search, shown on computers while the box is empty-handed. */
.search-key { display: none; }
@media (hover: hover) and (pointer: fine) {
  .search-key { display: inline-block; flex: none; }
  .search-box:focus-within .search-key { display: none; }
}

@media (max-width: 640px) {
  .home { --home-gap: 20px; }
  /* The record sits top right, clear of the wordmark under it, with the VS badge just
     catching its edge: about 176px for the whole hero. */
  .hero { gap: 12px; }
  .hero .hero-deck { width: 150px; margin-bottom: -48px; }
  .wordmark { font-size: clamp(2.5rem, 14vw, 3.6rem); }
  .party-card, .vault-card { width: 100%; }
  .trending-row { grid-auto-columns: 128px; }
}

@media (min-width: 1080px) {
  .app { max-width: 1240px; padding-inline: 40px; }
  /* Every other screen keeps the column it was designed for. */
  .screen:not(.home) { width: 100%; max-width: 704px; margin-inline: auto; }
  .home {
    --home-gap: 32px;
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-rows: auto 1fr;
    column-gap: 56px;
    align-items: start;
  }
  .hero { grid-column: 1; grid-row: 1; }
  .home-main { grid-column: 1; grid-row: 2; }
  .home-side { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 24px; gap: 20px; }
  .home-side > * { width: 100%; }
  .hero .hero-deck { width: 300px; margin-bottom: -130px; }
  /* Trending as a grid you can see all at once, instead of a row to swipe. */
  .trending-row { margin: 0; padding: 0; grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
}

/* ---------- the end of a party: stickers and confetti ---------- */
.decals { position: relative; height: 80px; pointer-events: none; }
.decals[hidden] { display: none; }
.decal {
  position: absolute; width: var(--s); height: var(--s); overflow: visible;
  filter: drop-shadow(0 6px 10px rgb(0 0 0 / 0.55));
  transform: rotate(var(--r)) scale(0);
  animation: decal-pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) var(--d) forwards;
}
@keyframes decal-pop { to { transform: rotate(var(--r)) scale(1); } }
.confetti { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; }
.confetti i {
  position: absolute; top: -20px; width: var(--w); height: calc(var(--w) * 1.6); border-radius: 2px; opacity: 0.95;
  animation: confetti-fall var(--t) cubic-bezier(0.3, 0.2, 0.6, 1) var(--d) forwards;
}
@keyframes confetti-fall { to { transform: translate(var(--x), 110vh) rotate(540deg); opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) { .decal { animation: none; transform: rotate(var(--r)); } }

/* ---------- the host's menu for a player in the party lobby ---------- */
.player-btn { display: grid; justify-items: center; gap: 6px; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: center; border-radius: 12px; }
.player-btn:hover .icon { box-shadow: 0 0 0 3px var(--ground), 0 0 0 5px var(--torch); }
.player-dialog-head { display: flex; align-items: center; gap: 14px; }
.player-dialog-head h2 { min-width: 0; }
.player-dialog-actions { display: grid; gap: 10px; margin-top: 4px; }
.player-dialog-actions .btn { width: 100%; min-height: 48px; border-radius: 999px; }
.player-dialog-actions .link-btn { justify-self: center; }
.btn-outline.is-danger { border-color: color-mix(in oklab, var(--blood) 60%, var(--edge)); color: var(--blood); }
.btn-outline.is-danger:hover { background: color-mix(in oklab, var(--blood) 12%, transparent); }

/* ---------- the daily challenge: results ---------- */
.daily-over .over-head { text-align: center; justify-items: center; }
.daily-over .eyebrow { color: var(--daily); }
.daily-legend { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 0.78rem; color: var(--ash); }
.daily-legend .sq { display: inline-block; width: 12px; height: 12px; margin-right: 5px; border-radius: 3px; vertical-align: -2px; }
.daily-legend .sq.is-1 { background: var(--sq-1); }
.daily-legend .sq.is-2 { background: var(--sq-2); }
.daily-legend .sq.is-3 { background: var(--sq-3); }
.daily-legend .sq.is-miss { background: var(--sq-miss); }
.fact-tiles .is-streak dd { color: var(--orange); }
.daily-board-wrap { display: grid; gap: 10px; }
.daily-board .grid { font-size: 0.7rem; letter-spacing: -1px; white-space: nowrap; }
.daily-next { margin: 0; text-align: center; font: 600 0.9rem/1.4 var(--font-body); color: var(--ash); }
.daily-next b { color: var(--bone); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- player cards ---------- */
/* A player's card (on the versus screen and their profile): their background behind
   everything, the title under their name, and their career in a strip at the bottom.
   Backgrounds are drawn here (.pc-bg-<name>) and stay dark enough to read on; motion
   builds with the tier, like the icons. */
.pcard { position: relative; overflow: hidden; isolation: isolate; }
.pc-title { margin: -2px 0 0; padding: 3px 10px; border-radius: 999px; background: color-mix(in oklab, var(--torch) 16%, transparent); color: var(--torch-hi); font: 700 0.68rem/1.3 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; }
.pc-stats { list-style: none; margin: 6px 0 0; padding: 10px 0 0; width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; border-top: 1px solid color-mix(in oklab, var(--bone) 12%, transparent); }
.pc-stats li { display: grid; gap: 2px; min-width: 0; }
.pc-stats b { font: 700 0.95rem/1.1 var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-stats span { font-size: 0.62rem; line-height: 1.2; color: var(--ash); }

.pc-bg-liner { --pc-bg: repeating-linear-gradient(to bottom, transparent 0 21px, rgb(120 150 255 / 0.13) 21px 22px), linear-gradient(160deg, #1b1a16, #121117); }
.pc-bg-midnight { --pc-bg: radial-gradient(1px 1px at 20% 30%, #fff8 50%, transparent), radial-gradient(1px 1px at 70% 18%, #fff6 50%, transparent), radial-gradient(1.5px 1.5px at 40% 70%, #fff7 50%, transparent), radial-gradient(1px 1px at 85% 60%, #fff5 50%, transparent), radial-gradient(120% 80% at 50% 0%, #1b2a5c, #0a0d1f 70%); }
.pc-bg-cassette { --pc-bg: linear-gradient(to bottom, transparent 58%, rgb(61 139 255 / 0.32) 58% 63%, transparent 63% 66%, rgb(255 122 26 / 0.3) 66% 71%, transparent 71%), linear-gradient(170deg, #171c2b, #0f121b); }
.pc-bg-sunset { --pc-bg: linear-gradient(200deg, #3a1450, #7a2350 35%, #c4572d 70%, #1a0f19); --pc-size: 100% 200%; --pc-move: pc-drift 9s ease-in-out infinite alternate; }
.pc-bg-gold-record { --pc-bg: linear-gradient(110deg, transparent 40%, rgb(255 240 190 / 0.18) 50%, transparent 60%), repeating-conic-gradient(from 0deg at 50% 30%, rgb(212 166 58 / 0.22) 0 8deg, rgb(212 166 58 / 0.05) 8deg 16deg), radial-gradient(90% 70% at 50% 30%, #3b2c0e, #120e08); --pc-size: 250% 100%, auto, auto; --pc-move: pc-sweep 3.5s linear infinite; }
.pc-bg-stage-lights { --pc-bg: conic-gradient(from 160deg at 15% -10%, transparent 0 12deg, rgb(150 190 255 / 0.28) 18deg, transparent 26deg), conic-gradient(from 175deg at 85% -10%, transparent 0 12deg, rgb(255 190 140 / 0.24) 18deg, transparent 26deg), radial-gradient(100% 70% at 50% 100%, #2a1c3d, #0b0a12); --pc-move: pc-lights 6s ease-in-out infinite alternate; }
.pc-bg-holo { --pc-bg: linear-gradient(125deg, rgb(255 92 138 / 0.35), rgb(127 227 255 / 0.35), rgb(155 123 255 / 0.35), rgb(79 209 139 / 0.3), rgb(255 211 107 / 0.35), rgb(255 92 138 / 0.35)), linear-gradient(160deg, #1a1830, #0d0c18); --pc-size: 300% 300%, auto; --pc-move: pc-holo 7s linear infinite; }
.pc-bg-bedrock { --pc-bg: repeating-linear-gradient(176deg, #2a2420 0 14px, #1f1a17 14px 30px, #33291f 30px 38px, #17130f 38px 56px); }
.pc-bg-perfect-pitch { --pc-bg: radial-gradient(120% 60% at 50% 120%, rgb(79 209 139 / 0.35), transparent 60%), repeating-radial-gradient(circle at 50% 120%, transparent 0 18px, rgb(79 209 139 / 0.14) 18px 20px), #0d1712; --pc-move: pc-pulse 2.4s ease-in-out infinite; }
.pc-bg-flawless { --pc-bg: radial-gradient(60% 50% at 50% 0%, rgb(255 255 255 / 0.32), transparent 70%), linear-gradient(to bottom, #15151a, #050507); }
.pc-bg-streak { --pc-bg: radial-gradient(40% 50% at 20% 110%, rgb(255 122 26 / 0.6), transparent 70%), radial-gradient(35% 60% at 55% 115%, rgb(255 92 60 / 0.55), transparent 70%), radial-gradient(40% 50% at 85% 110%, rgb(255 190 60 / 0.5), transparent 70%), #160c08; --pc-size: 100% 120%; --pc-move: pc-flame 1.6s ease-in-out infinite alternate; }
.pc-bg-legend { --pc-bg: linear-gradient(90deg, transparent 0 4%, rgb(79 209 139 / 0.5) 4% 12%, transparent 12% 14%, rgb(79 209 139 / 0.5) 14% 22%, transparent 22% 24%, rgb(79 209 139 / 0.5) 24% 32%, transparent 32% 34%, rgb(79 209 139 / 0.5) 34% 42%, transparent 42% 44%, rgb(79 209 139 / 0.5) 44% 52%, transparent 52% 54%, rgb(79 209 139 / 0.5) 54% 62%, transparent 62% 64%, rgb(79 209 139 / 0.5) 64% 72%, transparent 72% 74%, rgb(79 209 139 / 0.5) 74% 82%, transparent 82% 84%, rgb(79 209 139 / 0.5) 84% 92%, transparent 92%) 0 92% / 100% 6% no-repeat, linear-gradient(125deg, rgb(127 227 255 / 0.22), rgb(79 209 139 / 0.28), rgb(255 211 107 / 0.22)), #0b1410; --pc-move: pc-pulse 2.8s ease-in-out infinite; }
/* Painted cards (public/cards, made on the PC with ComfyUI): the scenes. The frame, the
   scrim, the beams, the sheen and the bar come from the card's tier (below). */
.pc-bg-garage { --pc-bg: url(/cards/garage.jpg) 50% 35% / cover; }
.pc-bg-blue-room { --pc-bg: url(/cards/blue-room.jpg) 50% 40% / cover; --beam1: rgb(143 180 255 / 0.42); }
.pc-bg-gold-wall { --pc-bg: url(/cards/gold-wall.jpg) 50% 30% / cover; }
.pc-bg-graveyard-shift { --pc-bg: url(/cards/graveyard-shift.jpg) 50% 30% / cover; }
.pc-bg-arena-night { --pc-bg: url(/cards/arena-night.jpg) 50% 40% / cover; --beam1: rgb(201 210 255 / 0.45); --beam2: rgb(230 236 255 / 0.38); }
.pc-bg-crystal-stadium { --pc-bg: url(/cards/crystal-stadium.jpg) 50% 40% / cover; --beam1: rgb(255 122 200 / 0.45); --beam2: rgb(127 227 255 / 0.45); }

/* A skinned card ("Player card skins" design): the card sits in its tier's frame, over
   its scene, with a scrim that leaves the top of the scene bright and the text on solid
   ground, and the rarity bar along the bottom. The corner colour stays on top. Motion
   follows the icons: Demo still; Single sways one beam; Gold pans slowly with a sheen;
   Platinum adds a second beam and a glow; Diamond adds the holo frame. */
.pcard-frame { --acc: #8a94a8; position: relative; isolation: isolate; display: grid; border-radius: 24px; padding: 3px; background: var(--acc); }
.pcard-frame.t-single { --acc: #8fb4ff; }
.pcard-frame.t-gold { --acc: #ffd36b; }
.pcard-frame.t-platinum { --acc: #e6ecff; --bar-ink: #1a1640; animation: pc-glow 2.8s ease-in-out infinite; }
.pcard-frame.t-diamond { --acc: #7fe3ff; overflow: hidden; background: #1a0838; animation: pc-glow-holo 2.6s ease-in-out infinite; }
.pcard-frame.t-diamond::before { content: ''; position: absolute; inset: -60%; z-index: -1; background: conic-gradient(#7fe3ff, #b57bff, #ff7ac8, #ffd36b, #7fe3ff); animation: pc-spin 4s linear infinite; }
/* The card inside a frame is always shown; the frame is what slides in. */
.pcard-frame > .vs-card {
  opacity: 1;
  align-content: end;
  min-height: 500px;
  padding: 20px 18px 56px;
  border: 0;
  border-top: 6px solid var(--c, var(--edge));
  border-radius: 21px;
  background: var(--slab);
}
.pcard-frame .pc-art { position: absolute; inset: 0; z-index: 0; background: var(--pc-bg, transparent); background-size: var(--pc-size, cover); transform-origin: 50% 30%; animation: var(--pc-move, none); }
.pcard-frame.h-halloween .pc-art::after { content: ''; position: absolute; inset: 0 0 40% 0; background: rgb(90 43 168 / 0.4); mix-blend-mode: multiply; }
.pcard-frame .pc-scrim { position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgb(5 5 7 / 0.15) 0%, rgb(5 5 7 / 0.35) 28%, rgb(5 5 7 / 0.86) 52%, var(--slab) 74%); }
.pcard-frame .pc-beam { position: absolute; z-index: 1; top: -10%; left: 8%; width: 46%; height: 80%; transform-origin: 20% 0; background: linear-gradient(180deg, var(--beam1, rgb(143 180 255 / 0.42)), transparent); clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); pointer-events: none; animation: pc-sway 4.5s ease-in-out infinite; }
.pcard-frame .pc-beam.b2 { left: 46%; background: linear-gradient(180deg, var(--beam2, rgb(230 236 255 / 0.38)), transparent); animation: pc-sway2 4.6s ease-in-out infinite; }
.pcard-frame .pc-sheen { position: absolute; inset: -20% -60%; z-index: 1; background: linear-gradient(105deg, transparent 42%, rgb(255 255 255 / 0.22) 50%, transparent 58%); transform: translateX(-70%); pointer-events: none; animation: pc-sheen 3.6s ease-in-out infinite; }
.pcard-frame > .vs-card > :not(.pc-art, .pc-beam, .pc-sheen, .pc-scrim, .pc-bar), .pcard-frame .pc-txt > * { position: relative; z-index: 3; }
.pcard-frame:is(.t-gold, .t-platinum, .t-diamond) .pc-art { animation: pc-pan 14s ease-in-out infinite alternate; }
.pcard-frame.t-platinum .pc-art { animation-duration: 12s; }
.pcard-frame.t-platinum .pc-sheen { animation-duration: 3.2s; }
.pcard-frame.t-platinum .pc-beam { animation-duration: 3.8s; }
.pcard-frame.t-diamond .pc-art { animation-duration: 10s; }
.pcard-frame.t-diamond .pc-sheen { animation-duration: 2.8s; }
.pcard-frame.t-diamond .pc-beam { animation-duration: 3.4s; }
.pcard-frame.t-diamond .pc-beam.b2 { animation-duration: 4s; }
.pc-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  background: var(--acc);
  border-top: 2px solid rgb(0 0 0 / 0.55);
  color: var(--bar-ink, #0a0a10);
  font: 700 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pc-bar > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-bar .pips { display: flex; gap: 6px; flex: none; }
.pc-bar .pips i { width: 8px; height: 8px; border-radius: 1.5px; background: currentColor; transform: rotate(45deg); }
.pcard-frame.t-diamond .pc-bar { background: linear-gradient(90deg, #7fe3ff, #b57bff, #ff7ac8, #ffd36b); background-size: 300% 100%; animation: pc-holo-bar 3s linear infinite; }
.pcard-frame.h-halloween .pc-bar { background: linear-gradient(90deg, #ff7a1a, #ffd36b); }
.pcard-frame .pc-txt { display: contents; }
.pcard-frame .vs-corner { order: -1; }
.pcard-frame .vs-card .icon { filter: drop-shadow(2.5px 3px 0 rgb(0 0 0 / 0.55)); }
.pcard-frame .vs-fan { color: #d6d5da; }
.pcard-frame .vs-accolades li { background: rgb(14 14 20 / 0.9); }
@keyframes pc-pan { from { transform: scale(1.08) translate(-2%, 0); } to { transform: scale(1.14) translate(2%, -2%); } }
@keyframes pc-sway { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(12deg); } }
@keyframes pc-sway2 { 0%, 100% { transform: rotate(16deg); } 50% { transform: rotate(-10deg); } }
@keyframes pc-sheen { 0% { transform: translateX(-70%); } 55%, 100% { transform: translateX(70%); } }
@keyframes pc-spin { to { transform: rotate(360deg); } }
@keyframes pc-holo-bar { to { background-position: 300% 0; } }
@keyframes pc-glow { 0%, 100% { filter: drop-shadow(0 0 6px rgb(201 210 255 / 0.25)); } 50% { filter: drop-shadow(0 0 22px rgb(201 210 255 / 0.65)); } }
@keyframes pc-glow-holo { 0%, 100% { filter: drop-shadow(0 0 8px rgb(127 227 255 / 0.3)); } 50% { filter: drop-shadow(0 0 26px rgb(181 123 255 / 0.7)); } }
@media (prefers-reduced-motion: reduce) {
  .pcard-frame, .pcard-frame *, .pcard-frame::before, .pcard-frame .pc-art::after { animation: none !important; }
  .pcard-frame .pc-sheen { display: none; }
}
/* The versus screen on a phone: each card lies on its side, icon beside the text, with
   the accolades and stats left for the profile. */
@media (max-width: 600px) {
  .versus-screen .pcard-frame { border-radius: 22px; }
  .versus-screen .pcard-frame > .vs-card { min-height: 250px; grid-template-columns: auto minmax(0, 1fr); align-items: end; justify-items: start; gap: 12px; padding: 0 14px 44px; border-radius: 19px; border-top-width: 5px; text-align: left; }
  .versus-screen .pcard-frame .vs-card .icon { --size: 76px; }
  .versus-screen .pcard-frame .pc-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .versus-screen .pcard-frame .vs-accolades, .versus-screen .pcard-frame .pc-stats { display: none; }
  .versus-screen .pcard-frame .pc-scrim { background: linear-gradient(180deg, rgb(5 5 7 / 0.2) 0%, rgb(5 5 7 / 0.7) 45%, rgb(14 14 20 / 0.96) 78%); }
  .versus-screen .pc-bar { height: 32px; padding: 0 14px; font-size: 10px; }
}
@keyframes pc-drift { to { background-position: 0 100%; } }
@keyframes pc-sweep { from { background-position: 100% 0, 0 0, 0 0; } to { background-position: -150% 0, 0 0, 0 0; } }
@keyframes pc-lights { to { filter: hue-rotate(-25deg) brightness(1.15); } }
@keyframes pc-holo { to { background-position: 300% 300%, 0 0; } }
@keyframes pc-pulse { 50% { filter: brightness(1.25); } }
@keyframes pc-flame { to { background-position: 0 -14px; filter: brightness(1.15); } }

/* A card background in miniature, for the shop and your collection. */
.card-swatch { position: relative; display: grid; align-content: end; gap: 4px; width: 100%; max-width: 96px; aspect-ratio: 3 / 4; padding: 10px 9px; border-radius: 12px; border: 1px solid var(--edge); overflow: hidden; isolation: isolate; background: var(--slab); }
.card-swatch::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--pc-bg, transparent); background-size: var(--pc-size, auto); animation: var(--pc-move, none); }
.card-swatch i { display: block; height: 5px; border-radius: 3px; background: rgb(255 255 255 / 0.22); }
.card-swatch i:first-child { width: 60%; height: 7px; background: rgb(255 255 255 / 0.5); }
.card-swatch i:nth-child(2) { width: 40%; }
.card-swatch.md { max-width: 84px; }
.card-swatch.xl { max-width: 120px; }
.title-preview { display: grid; place-items: center; width: 100%; min-height: 64px; padding: 6px; color: var(--torch-hi); font: 700 0.72rem/1.3 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.locker-grid.is-cards, .locker-grid.is-titles { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
@media (prefers-reduced-motion: reduce) { .card-swatch::before { animation: none; } }

.profile-card { display: grid; gap: 12px; }
.profile-card .hint { font-size: 0.78rem; color: var(--ash); }
.profile-card-slot { display: grid; justify-items: center; }
.profile-card-slot > .vs-card, .profile-card-slot > .pcard-frame { width: min(100%, 380px); opacity: 1; }

/* ---------- achievements ---------- */
.achievements { display: grid; gap: 12px; }
.ach-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.ach { display: flex; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--edge); background: var(--slab); }
.ach.is-done { border-color: color-mix(in oklab, var(--torch) 55%, var(--edge)); background: radial-gradient(120% 140% at 0% 0%, color-mix(in oklab, var(--torch) 10%, transparent), transparent 60%), var(--slab); }
.ach-medal { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--slab-2); color: var(--ash); font-size: 1.1rem; }
.ach.is-done .ach-medal { background: var(--torch); color: var(--torch-ink); }
.ach.r-4.is-done .ach-medal { background: linear-gradient(135deg, var(--diamond), #9b7bff); }
.ach-body { display: grid; gap: 3px; min-width: 0; }
.ach-body b { font: 800 0.95rem/1.2 var(--font-display); letter-spacing: -0.01em; }
.ach:not(.is-done) .ach-body b { color: color-mix(in oklab, var(--bone) 80%, var(--ash)); }
.ach-text { font-size: 0.82rem; line-height: 1.35; color: var(--ash); }
.ach-progress { display: flex; align-items: center; gap: 8px; }
.ach-bar { flex: 1; height: 5px; border-radius: 999px; background: var(--edge); overflow: hidden; }
.ach-bar i { display: block; height: 100%; border-radius: 999px; background: var(--torch); }
.ach-progress small { font: 700 0.7rem/1 var(--font-mono); color: var(--ash); white-space: nowrap; }
.ach-reward { font: 600 0.72rem/1.4 var(--font-mono); color: var(--torch); }
.ach-reward .note-ico { width: 0.9em; height: 0.9em; vertical-align: -1px; fill: currentColor; }

/* Achievements just earned: a banner drops in at the top, one at a time. */
.unlock-stack { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 50%; z-index: 60; display: grid; gap: 8px; width: min(92vw, 420px); transform: translateX(-50%); pointer-events: none; }
.unlock { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--torch); background: color-mix(in oklab, var(--slab) 92%, var(--torch)); box-shadow: 0 16px 40px -12px #000; transform: translateY(-24px); opacity: 0; transition: transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1), opacity 0.25s ease; }
.unlock.is-on { transform: none; opacity: 1; }
.unlock-medal { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--torch); color: var(--torch-ink); font-size: 1.25rem; }
.unlock-text { display: grid; gap: 2px; min-width: 0; }
.unlock-text .eyebrow { color: var(--torch); }
.unlock-text b { font: 900 1.05rem/1.15 var(--font-display); }
.unlock-text span:last-child { font-size: 0.8rem; color: color-mix(in oklab, var(--bone) 85%, var(--ash)); }
@media (prefers-reduced-motion: reduce) { .unlock { transition: opacity 0.2s ease; transform: none; } }
