/* Sliver — gig-poster theme: cobalt page, crisp cards, sticker shadows. */
:root {
  /* Theme tokens. Each theme in themes.css overrides these. Default: Cobalt. */
  --page: #2336E6;          /* page background */
  --page-deep: #1426B8;     /* card shadows */
  --glow-a: rgba(255, 79, 154, .30);
  --glow-b: rgba(255, 212, 59, .20);
  --on-page: #FFFFFF;       /* text on the page */
  --on-page-2: #C7CDFF;
  --paper: #FBFAFF;         /* cards */
  --paper-2: #F1F0FB;       /* subtle fills inside cards */
  --surface: #FFFFFF;       /* inputs, chips, buttons */
  --ink: #14123A;           /* text on cards */
  --ink-2: #5E5B85;
  --line: #E2E0F2;
  --placeholder: #9895B8;
  --stroke: #14123A;        /* button outlines and hard shadows */
  --brand: #2336E6;         /* accent text on cards: room code, links */
  --accent: #FF4F9A;        /* main buttons, progress, heard waveform */
  --accent-hover: #FF63A7;
  --accent-strong: #D62F77; /* accent used as text */
  --accent-ink: #FFFFFF;    /* text on main buttons */
  --pop: #FFD43B;           /* play button, chosen mode, winner */
  --pop-soft: #FFE68A;
  --pop-ink: #14123A;
  --inverse: #14123A;       /* notices, chosen packs, twist banner */
  --inverse-ink: #FFFFFF;
  --inverse-2: #D6D4F0;
  --mint: #2FD6A0;
  --mint-ink: #0B7A57;
  --good-bg: #DDF8EE;
  --bad-bg: #FFE8EC;
  --bad-ink: #A3172C;
  --red: #F0445A;

  --r-card: 22px;
  --r-ctl: 12px;
  --shadow: 0 6px 0 var(--page-deep);

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--ink);
  transition: background-color .3s;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70vmax 45vmax at 105% -5%, var(--glow-a), transparent 70%),
    radial-gradient(60vmax 40vmax at -10% 105%, var(--glow-b), transparent 70%);
}
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--pop); outline-offset: 2px; }

#app { position: relative; max-width: 560px; margin: 0 auto; padding: 24px 16px 96px; }

/* Top bar: Leave room (left, only in a room) and Settings (right, always) */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; margin: -8px 0 6px; }
.leave, .gear {
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; color: var(--on-page);
  background: color-mix(in srgb, var(--on-page) 14%, transparent);
  border: 2px solid color-mix(in srgb, var(--on-page) 32%, transparent);
  border-radius: 99px; transition: background .15s;
}
.leave { padding: 6px 13px 6px 11px; }
.leave::before { content: "← "; }
.leave:hover, .gear:hover { background: color-mix(in srgb, var(--on-page) 24%, transparent); }
.leave.confirm { background: var(--pop); border-color: var(--stroke); color: var(--pop-ink); }
.leave.confirm::before { content: ""; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.gear { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; }
.end-game::before { content: "■ "; font-size: 11px; vertical-align: 1px; }
.gear svg { width: 20px; height: 20px; fill: currentColor; }
body.in-game .topbar { margin: -10px 0 4px; }

/* ---------- brand ---------- */
.brand { text-align: center; margin: 4px 0 22px; color: var(--on-page); }
.mark { display: inline-flex; align-items: center; gap: 4px; height: 40px; }
.mark i { display: block; width: 7px; border-radius: 4px; background: var(--on-page); }
.mark i:nth-child(1) { height: 14px; } .mark i:nth-child(2) { height: 26px; }
.mark i:nth-child(3) { height: 40px; } .mark i:nth-child(4) { height: 20px; } .mark i:nth-child(5) { height: 10px; }
.mark i.hot { background: var(--pop); }
.brand h1 { font-family: var(--display); font-weight: 800; font-size: 46px; letter-spacing: -1.5px; line-height: 1; margin: 8px 0 6px; }
.tag { margin: 0; color: var(--on-page-2); font-size: 16px; }

body.in-game .brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 14px; }
body.in-game .mark { height: 26px; gap: 3px; }
body.in-game .mark i { width: 5px; }
body.in-game .mark i:nth-child(1) { height: 9px; } body.in-game .mark i:nth-child(2) { height: 17px; }
body.in-game .mark i:nth-child(3) { height: 26px; } body.in-game .mark i:nth-child(4) { height: 13px; } body.in-game .mark i:nth-child(5) { height: 7px; }
body.in-game .brand h1 { font-size: 26px; margin: 0; letter-spacing: -.5px; }
body.in-game .tag { display: none; }

/* ---------- layout ---------- */
.screen { display: flex; flex-direction: column; gap: 16px; }
.card {
  background: var(--paper); border-radius: var(--r-card); padding: 20px;
  box-shadow: var(--shadow);
}
.center { text-align: center; }
h2 { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.3px; margin: 0 0 12px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.count { font-size: 14px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.hint { color: var(--ink-2); font-size: 14px; margin: 10px 0 0; line-height: 1.5; }
.hint.small { font-size: 14px; text-align: center; margin: 12px 0 0; }
.waiting { text-align: center; color: var(--on-page-2); margin: 4px 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- controls ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
input, select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--paper-2); border: 2px solid transparent; border-radius: var(--r-ctl);
  padding: 12px 14px; outline: none; transition: border-color .15s, background .15s;
}
input::placeholder { color: var(--placeholder); }
input:focus, select:focus { border-color: var(--brand); background: var(--surface); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2314123A' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.row { display: flex; gap: 10px; }
.row input { flex: 1; min-width: 0; }
.code-input { text-transform: uppercase; letter-spacing: 8px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 20px; }

.btn {
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
  border-radius: var(--r-ctl); border: 2px solid var(--stroke); background: var(--surface); color: var(--ink);
  padding: 11px 18px; box-shadow: 0 3px 0 var(--stroke);
  transition: transform .06s, box-shadow .06s, background .15s;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--stroke); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: 0 3px 0 var(--stroke); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--stroke); width: 100%; }
.btn.primary:hover { background: var(--accent-hover); filter: none; }
.btn.big { padding: 15px; font-size: 18px; font-family: var(--display); letter-spacing: -.2px; }
.btn.small { padding: 8px 13px; font-size: 14px; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); font-weight: 600; }
.btn.ghost:hover { color: var(--ink); background: var(--paper-2); filter: none; }
.btn.ghost:active { transform: none; }
.divider { text-align: center; color: var(--ink-2); font-size: 14px; margin: 18px 0 14px; position: relative; }
.divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--line); }
.divider span { background: var(--paper); padding: 0 12px; position: relative; }

/* ---------- lobby ---------- */
#btn-copy.copy { margin-top: 12px; }
.room-code { font-family: var(--display); font-weight: 800; font-size: 44px; letter-spacing: 6px; line-height: 1.05; color: var(--brand); }
.avatars { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.avatars li { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; background: var(--paper-2); font-weight: 600; font-size: 15px; }
.avatars .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 14px; color: var(--ink); }
.avatars .host-tag { font-size: 12px; font-weight: 700; color: var(--brand); }
.avatars li.offline { opacity: .45; }

.sources { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.sources:empty { display: none; }
.sources li { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 14px; background: var(--paper-2); border-radius: var(--r-ctl); }
.sources .s-main { flex: 1; min-width: 0; }
.sources .s-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sources .s-meta { font-size: 13px; color: var(--ink-2); }
.x { flex: none; width: 32px; height: 32px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer; }
.x:hover { background: var(--surface); color: var(--red); }

.packs { margin-top: 18px; }
.packs h3 { font-family: var(--display); font-weight: 700; font-size: 16px; margin: 16px 0 8px; }
.packs h3:first-child { margin-top: 0; }
.pack-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pack {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 8px 13px; border-radius: 99px; border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  transition: border-color .12s, background .12s;
}
.pack:hover { border-color: var(--brand); }
.pack.on { background: var(--inverse); border-color: var(--inverse); color: var(--inverse-ink); }
.pack.on::before { content: "✓ "; color: var(--pop); }
.pack.busy { opacity: .6; cursor: progress; }
#btn-clear { margin-top: 14px; }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.mode {
  font: inherit; text-align: left; cursor: pointer; color: var(--ink);
  border: 2px solid var(--line); background: var(--surface); border-radius: 16px; padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.mode b { font-family: var(--display); font-size: 18px; }
.mode span { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.mode em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent-strong); margin-top: auto; padding-top: 4px; }
.mode:hover { border-color: var(--brand); }
.mode.on { border-color: var(--stroke); background: var(--pop); box-shadow: 0 3px 0 var(--stroke); color: var(--pop-ink); }
.mode.on span, .mode.on em { color: var(--pop-ink); }
.settings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.waiting-card p { margin: 0; }
.waiting-card p:first-child { font-weight: 700; }

/* ---------- loading ---------- */
.loading-card { padding: 36px 20px; }
.loading-card p { margin: 14px 0 0; font-weight: 600; }
.eq { display: inline-flex; align-items: flex-end; gap: 4px; height: 22px; }
.eq i { display: block; width: 5px; height: 100%; border-radius: 3px; background: currentColor; animation: eq .9s ease-in-out infinite; transform-origin: bottom; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; } .eq i:nth-child(4) { animation-delay: -.15s; } .eq i:nth-child(5) { animation-delay: -.45s; }
.eq.big { height: 44px; gap: 6px; color: var(--brand); } .eq.big i { width: 9px; border-radius: 5px; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ---------- round ---------- */
.round-top { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; color: var(--on-page); font-weight: 700; }
.timer { font-family: var(--display); font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.timer.low { color: var(--pop); }
.stage { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 20px 18px; }
.twist { align-self: stretch; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; justify-content: center; background: var(--inverse); color: var(--inverse-ink); border-radius: var(--r-ctl); padding: 9px 14px; }
.twist b { font-family: var(--display); color: var(--pop); font-size: 17px; }
.twist span { font-size: 14px; color: var(--inverse-2); }
.play-wrap { position: relative; width: 116px; height: 116px; margin: 30px 0 24px; }
.viz { position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; max-width: none; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; transition: opacity .25s; }
.viz.on { opacity: 1; }
.play {
  position: relative; z-index: 1; width: 116px; height: 116px; border-radius: 50%; cursor: pointer;
  background: var(--pop); color: var(--pop-ink); border: 3px solid var(--stroke); box-shadow: 0 6px 0 var(--stroke);
  display: grid; place-items: center; transition: transform .06s, box-shadow .06s;
}
.play:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--stroke); }
.play svg.icon-play { width: 46px; height: 46px; fill: currentColor; margin-left: 5px; }
.play .eq { height: 34px; gap: 5px; } .play .eq i { width: 7px; }
.play .ring { position: absolute; inset: -11px; width: calc(100% + 22px); height: calc(100% + 22px); transform: rotate(-90deg); pointer-events: none; }
.ring circle { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: 289; }
.play.loading { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { background: var(--pop-soft); } }
.len-readout { text-align: center; }
.len { font-family: var(--display); font-weight: 800; font-size: 52px; letter-spacing: -1.5px; line-height: 1; font-variant-numeric: tabular-nums; }
.pts { color: var(--ink-2); margin-top: 6px; font-weight: 500; }
.pts b { color: var(--accent-strong); font-variant-numeric: tabular-nums; }

.scrubber { position: relative; width: 100%; padding-top: 6px; }
.wave { display: flex; align-items: center; gap: 2px; height: 44px; padding: 0 2px; }
.wave i { flex: 1; border-radius: 2px; background: var(--line); transition: background .1s; }
.wave i.lit { background: var(--brand); }
.wave i.heard { background: var(--accent); }
input[type=range] {
  -webkit-appearance: none; appearance: none; position: absolute; left: 0; right: 0; top: 6px;
  height: 44px; margin: 0; padding: 0; background: transparent; border: 0; cursor: pointer;
}
input[type=range]:focus { background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 44px; background: transparent; }
input[type=range]::-moz-range-track { height: 44px; background: transparent; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 56px; margin-top: -6px; border-radius: 6px; background: var(--ink); border: 2px solid var(--paper); box-shadow: 0 0 0 2px var(--ink); }
input[type=range]::-moz-range-thumb { width: 8px; height: 52px; border-radius: 6px; background: var(--ink); border: 2px solid var(--paper); }
.ticks { position: relative; height: 20px; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.ticks span:first-child { transform: none; }
.ticks span:last-child { transform: translateX(-100%); }

.guess-box { position: relative; display: flex; gap: 10px; }
.guess-box input { flex: 1; min-width: 0; }
.suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 10; list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 2px solid var(--stroke); border-radius: 16px; max-height: 320px; overflow-y: auto;
  box-shadow: 0 6px 0 var(--stroke);
}
.suggestions li { padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.suggestions li.active, .suggestions li:hover { background: var(--pop); color: var(--pop-ink); }
.suggestions .s-artist { color: var(--ink-2); font-size: 14px; font-weight: 500; }
.suggestions li.active .s-artist, .suggestions li:hover .s-artist { color: var(--pop-ink); }
.suggestions .empty { color: var(--ink-2); cursor: default; font-weight: 500; }
.suggestions .empty:hover { background: none; }
.suggestions li.group { cursor: default; padding: 12px 12px 4px; font-size: 13px; font-weight: 700; color: var(--brand); }
.suggestions li.group:hover { background: none; }
.my-guesses { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.my-guesses:empty { display: none; }
.my-guesses li { padding: 8px 12px; border-radius: 10px; font-size: 15px; background: var(--bad-bg); color: var(--bad-ink); text-decoration: line-through; text-decoration-thickness: 1px; }
.my-guesses li.ok { background: var(--good-bg); color: var(--mint-ink); text-decoration: none; font-weight: 700; }
#btn-giveup { margin-top: 10px; }
.done-card { text-align: center; }
.done-card .verdict { font-family: var(--display); font-weight: 800; font-size: 24px; }
.done-card .big-pts { font-family: var(--display); font-weight: 800; font-size: 48px; color: var(--accent); line-height: 1.1; font-variant-numeric: tabular-nums; }
.done-card p { margin: 6px 0 0; color: var(--ink-2); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 99px; background: var(--paper-2); }
.chips li.correct { background: var(--mint); color: #0B1F17; }
.chips li.out, .chips li.gave-up, .chips li.timeout { color: var(--ink-2); text-decoration: line-through; }
#btn-skip { margin-top: 10px; }

/* ---------- reveal / results ---------- */
.reveal-card { display: flex; gap: 18px; align-items: center; }
.cover { width: 112px; height: 112px; flex: none; border-radius: 14px; border: 3px solid var(--stroke); box-shadow: 5px 5px 0 var(--stroke); background: var(--brand) center / cover; background-image: linear-gradient(135deg, var(--brand), var(--accent)); }
.reveal-text { min-width: 0; }
.song-title { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1.12; margin-top: 2px; overflow-wrap: anywhere; }
.song-artist { color: var(--ink-2); font-weight: 600; margin-top: 2px; }
.reveal-mode { font-size: 13px; font-weight: 700; color: var(--brand); margin-top: 6px; }
.reveal-mode:empty { display: none; }
.link { display: inline-block; margin-top: 8px; color: var(--brand); font-weight: 700; font-size: 14px; }
.listen-card { padding: 14px; }
.btn.listen { width: 100%; }
.done-card .btn.listen { margin-top: 14px; }
.listen-bar { height: 5px; border-radius: 99px; background: var(--line); margin-top: 10px; overflow: hidden; }
.listen-bar span { display: block; height: 100%; width: 0; background: var(--accent); }
.results { list-style: none; padding: 0; margin: 0; }
.results li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 2px solid var(--paper-2); }
.results li:last-child { border-bottom: 0; }
.results .r-name { font-weight: 700; }
.results .r-sub { font-size: 13px; color: var(--ink-2); }
.results .r-pts { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.results .r-pts.zero { color: var(--ink-2); font-weight: 600; }
.winner-card { background: var(--pop); color: var(--pop-ink); }
.winner-card .label { color: var(--pop-ink); }
.winner { font-family: var(--display); font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin-top: 4px; }
.board { list-style: none; padding: 0; margin: 0; counter-reset: rank; }
.board li { counter-increment: rank; display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 2px solid var(--paper-2); font-size: 17px; font-weight: 600; }
.board li:last-child { border-bottom: 0; }
.board li::before { content: counter(rank); width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-family: var(--display); font-weight: 800; font-size: 15px; }
.board li:first-child::before { background: var(--pop); color: var(--pop-ink); }
.board .b-name { flex: 1; }
.board .b-score { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- toasts, confetti, motion ---------- */
.toasts { pointer-events: none; position: fixed; left: 50%; top: 64px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); z-index: 50; }
.toast { background: var(--inverse); color: var(--inverse-ink); border-radius: 14px; padding: 12px 16px; font-size: 15px; font-weight: 500; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); animation: up .2s ease-out; }
.toast.error { background: var(--red); color: #fff; }
.toast.good { background: var(--mint); color: #0B1F17; font-weight: 700; }
@keyframes up { from { opacity: 0; transform: translateY(-8px); } }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.confetti i { position: fixed; display: block; will-change: transform, opacity; }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--rot)); opacity: .9; } }

:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
:root[data-motion="reduce"] .confetti { display: none; }

@media (max-width: 480px) {
  .room-code { font-size: 36px; }
  .modes { grid-template-columns: 1fr; }
  .mode { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
  .mode span { flex-basis: 100%; }
  .mode em { margin: 0; padding: 0; }
  .settings { grid-template-columns: 1fr 1fr; }
  .settings .field:first-child { grid-column: 1 / -1; }
  .reveal-card { flex-direction: column; text-align: center; }
  .cover { width: 168px; height: 168px; }
  .len { font-size: 46px; }
}

/* ---------- "X got it" pop-ups ---------- */
.gotit { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 55; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: min(92vw, 440px); }
.gotit .pop-msg {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 12px; border-radius: 99px;
  font-weight: 700; font-size: 16px; color: #14123A; border: 2px solid #14123A; box-shadow: 0 4px 0 #14123A;
  animation: drop .45s cubic-bezier(.2, 1.6, .4, 1) both, fadeout .35s ease-in 2.6s forwards;
}
.gotit .pop-msg b { font-family: var(--display); font-weight: 800; }
.gotit .pop-msg .pts { margin: 0; font-family: var(--display); font-weight: 800; color: #14123A; opacity: .75; }
.gotit .pop-msg .dot { width: 26px; height: 26px; border-radius: 50%; background: #14123A; color: #fff; display: grid; place-items: center; font-size: 14px; }
@keyframes drop { from { opacity: 0; transform: translateY(-24px) scale(.9); } }
@keyframes fadeout { to { opacity: 0; transform: translateY(-10px); } }

/* ---------- kick ---------- */
.avatars .kick { border: 0; background: transparent; color: var(--ink-2); font-size: 17px; line-height: 1; cursor: pointer; padding: 0 2px; margin-left: -2px; border-radius: 6px; }
.avatars .kick:hover { color: var(--red); background: var(--surface); }
.avatars li.arm { background: var(--bad-bg); color: var(--bad-ink); }

/* ---------- settings sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; animation: fadein .15s ease-out; }
@keyframes fadein { from { opacity: 0; } }
.sheet { width: min(100%, 560px); background: var(--paper); color: var(--ink); border-radius: var(--r-card); padding: 20px; box-shadow: 0 8px 0 var(--page-deep); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; }
.sheet h3 { font-family: var(--display); font-size: 17px; margin: 16px 0 0; }
.sheet .hint { margin: 2px 0 12px; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.theme {
  font: inherit; cursor: pointer; text-align: left; padding: 8px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
}
.theme:hover { border-color: var(--brand); }
.theme.on { border-color: var(--stroke); box-shadow: 0 3px 0 var(--stroke); }
.theme .sw { display: block; position: relative; height: 66px; border-radius: 9px; overflow: hidden; }
.theme .sw-card { position: absolute; left: 10px; right: 10px; top: 14px; bottom: -6px; border-radius: 7px; }
.theme .sw-disc { position: absolute; left: 18px; top: 24px; width: 22px; height: 22px; border-radius: 50%; }
.theme .sw-bar { position: absolute; left: 48px; right: 18px; height: 6px; border-radius: 3px; }
.theme .name { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; font-weight: 700; font-size: 14px; }
.theme.on .name::after { content: "✓"; color: var(--brand); }
@media (max-width: 420px) { .theme-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- holiday decoration ---------- */
.tag::before { content: var(--deco, ""); }
.theme .sw-deco { position: absolute; margin: -58px 0 0 calc(100% - 44px); font-size: 20px; line-height: 1; pointer-events: none; }
.theme { position: relative; }
.theme .season { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--accent-strong); }

/* ---------- account box (home) ---------- */
.account-card { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }
.acct-row { display: flex; align-items: center; gap: 12px; }
.acct-av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--pop); color: var(--pop-ink); border: 2px solid var(--stroke); font-family: var(--display); font-weight: 800; font-size: 18px; }
.acct-main { min-width: 0; }
.acct-name { font-family: var(--display); font-weight: 800; font-size: 19px; line-height: 1.15; }
.acct-sub { font-size: 14px; color: var(--ink-2); }
.acct-sub b { color: var(--ink); }
.tag-no { font-family: var(--body); font-weight: 600; font-size: .78em; color: var(--ink-2); }
.acct-pitch { display: flex; flex-direction: column; gap: 2px; }
.acct-pitch b { font-family: var(--display); font-size: 18px; }
.acct-pitch span { color: var(--ink-2); font-size: 14px; }
.acct-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.primary-ish { background: var(--accent); color: var(--accent-ink); }

/* ---------- casual / ranked switch ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 14px; margin-bottom: 16px; }
.seg.small { margin: 4px 0 14px; }
.seg-btn { font: inherit; font-weight: 700; font-size: 15px; padding: 9px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; }
.seg-btn.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 0 var(--line), 0 0 0 2px var(--stroke); }
#seg-ranked::before { content: "🏆 "; }
h3.sub { font-family: var(--display); font-weight: 700; font-size: 16px; margin: 0 0 8px; }
.ranked-intro { margin: 0 0 14px; }
#ranked-panel { margin-bottom: 16px; }
.mode-mult { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: -8px 0 16px; }
.warn { background: var(--bad-bg); color: var(--bad-ink); border-radius: var(--r-ctl); padding: 10px 12px; font-size: 14px; font-weight: 600; margin: 0 0 12px; }
.ranked-only { margin: -4px 0 12px; }
.avatars .guest-tag { font-size: 12px; font-weight: 700; color: var(--bad-ink); }
#guest-login { margin-top: 12px; }
.settings { grid-template-columns: repeat(3, 1fr); }

/* ---------- artist suggestions in the add box ---------- */
.add-row { align-items: flex-start; }
.artist-box { position: relative; flex: 1; min-width: 0; }
.artist-sug { top: calc(100% + 6px); }
.artist-sug li.artist { display: flex; align-items: center; gap: 10px; }
.artist-sug img, .artist-sug .a-ph { width: 36px; height: 36px; flex: none; border-radius: 50%; object-fit: cover; background: var(--paper-2); display: grid; place-items: center; font-weight: 800; }

/* ---------- round / reveal extras ---------- */
.chips li button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: inherit; }
.chips li small { font-size: 11px; font-weight: 700; opacity: .7; }
.players-card .hint.small { margin-top: 10px; text-align: left; font-size: 13px; }
.bonus-note { font-size: 14px; font-weight: 700; color: var(--accent-strong); }
.first-tag { font-style: normal; font-family: var(--body); font-size: 11px; font-weight: 800; background: var(--pop); color: var(--pop-ink); border-radius: 99px; padding: 2px 7px; margin-right: 6px; vertical-align: 3px; }
.plays { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.plays::before { content: "▶ "; font-size: 11px; color: var(--mint-ink); }
.plays b { color: var(--ink); }

/* ---------- ranked result (end of a ranked game) ---------- */
.ranked-result { text-align: center; }
.rr-score { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.1; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.rr-score small { font-size: 18px; color: var(--accent-strong); }
.rr-line { margin: 4px 0; }
.rr-line .up { color: var(--mint-ink); font-weight: 800; }
.ranked-result .acct-actions { justify-content: center; margin-top: 12px; }

/* ---------- volume ---------- */
.volume { display: flex; align-items: center; gap: 12px; margin: 10px 0 10px; }
.vol-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.vol-icon svg { width: 22px; height: 22px; fill: currentColor; }
.vol-value { width: 56px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
#volume { position: static; flex: 1; height: 28px; --fill: 80%; }
#volume::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(to right, var(--accent) var(--fill), var(--line) var(--fill)); }
#volume::-moz-range-track { height: 8px; border-radius: 99px; background: var(--line); }
#volume::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--accent); }
#volume::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -7px; border-radius: 50%; background: var(--surface); border: 3px solid var(--stroke); box-shadow: none; }
#volume::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--stroke); }
#btn-test-sound { margin-bottom: 2px; }

/* ---------- sheets: log in, leaderboards, stats, players ---------- */
.sheet.narrow { width: min(100%, 440px); }
.sheet h3 + .hint { margin-top: 2px; }
.form-error { background: var(--bad-bg); color: var(--bad-ink); border-radius: var(--r-ctl); padding: 10px 12px; font-size: 14px; font-weight: 600; margin: 0 0 12px; }
#auth-form .btn.primary { margin-top: 4px; }
#auth-note { margin-top: 12px; }
.settings-account .hint { margin: 2px 0 10px; }
.settings-account { margin-bottom: 18px; }

.lb { list-style: none; padding: 0; margin: 4px 0 0; }
.lb li { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 2px solid var(--paper-2); }
.lb li:last-child { border-bottom: 0; }
.lb li.me { background: var(--pop-soft); color: var(--pop-ink); border-radius: 10px; }
.lb li.me .tag-no, .lb li.me small { color: var(--pop-ink); }
.lb-rank { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-family: var(--display); font-weight: 800; font-size: 14px; }
.lb li.top1 .lb-rank { background: #FFD43B; color: #14123A; }
.lb li.top2 .lb-rank { background: #D9DCE6; color: #14123A; }
.lb li.top3 .lb-rank { background: #F0B27A; color: #14123A; }
.lb-name { flex: 1; min-width: 0; text-align: left; font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name:hover { text-decoration: underline; }
.lb-val { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-val small { font-family: var(--body); font-weight: 600; font-size: 12px; color: var(--ink-2); }
.lb-empty { justify-content: center; color: var(--ink-2); }
.lb-me { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--paper-2); font-size: 14px; }

.pf-head { display: flex; gap: 28px; margin: 6px 0 14px; }
.pf-rating { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.pf-rank { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.2; }
.pf-rank small { font-family: var(--body); font-size: 14px; color: var(--ink-2); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: var(--paper-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.tile b { font-family: var(--display); font-size: 20px; font-variant-numeric: tabular-nums; }
.tile span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.pf-list { list-style: none; padding: 0; margin: 8px 0 0; }
.pf-list li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 2px solid var(--paper-2); }
.pf-list li:last-child { border-bottom: 0; }
.pf-genre { flex: 1; text-align: left; font: inherit; font-weight: 700; color: var(--brand); background: none; border: 0; padding: 0; cursor: pointer; }
.pf-genre-txt { flex: 1; font-weight: 700; display: flex; flex-direction: column; }
.pf-genre-txt small { font-weight: 500; font-size: 12px; color: var(--ink-2); }
.pf-genre-txt .mods { font-style: normal; font-size: 11px; font-weight: 800; color: var(--accent-strong); }
.pf-score { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-score small, .pf-pos small { font-family: var(--body); font-weight: 600; font-size: 12px; color: var(--ink-2); }
.pf-pos { width: 76px; text-align: right; font-weight: 800; white-space: nowrap; }

.pl-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.pl-list li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--paper-2); flex-wrap: wrap; }
.pl-list li.offline { opacity: .55; }
.pl-list .acct-av { width: 34px; height: 34px; font-size: 15px; }
.pl-main { flex: 1; min-width: 120px; display: flex; flex-direction: column; }
.pl-main small { color: var(--ink-2); font-size: 13px; }
.pl-actions { display: flex; gap: 6px; }
.btn.danger { color: var(--bad-ink); }
.btn.armed { background: var(--pop); color: var(--pop-ink); }
.btn.danger.armed { background: var(--red); color: #fff; }

@media (max-width: 480px) {
  .settings { grid-template-columns: 1fr 1fr; }
  .settings .field:first-child { grid-column: auto; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .pf-head { gap: 18px; }
  .pl-actions { width: 100%; justify-content: flex-end; }
}

/* ---------- email codes ---------- */
.auth-lead { margin: 0 0 14px; line-height: 1.5; }
.code-box { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: 10px; text-align: center; }
.form-ok { background: var(--good-bg); color: var(--mint-ink); border-radius: var(--r-ctl); padding: 10px 12px; font-size: 14px; font-weight: 600; margin: 0 0 12px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 12px; }
.auth-links:empty { display: none; }
.linkish { font: inherit; font-size: 14px; font-weight: 700; color: var(--brand); background: none; border: 0; padding: 4px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.pack.more { border-style: dashed; color: var(--brand); font-weight: 700; }

/* ---------- friends ---------- */
.gear { position: relative; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font: 700 11px/18px var(--body, sans-serif); text-align: center; border: 2px solid var(--page, #000); }
.fr-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--paper-2); }
.fr-mycode { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: 3px; }
.fr-add { display: flex; gap: 8px; margin: 10px 0 4px; }
.fr-add .input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 2px; }
.fr-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); opacity: .4; flex: none; }
.fr-dot.on { background: var(--mint); opacity: 1; }
.pl-list li .fr-st { color: var(--ink-2); font-size: 13px; }
.pl-list li .fr-st b { color: var(--ink); }
.invite-pop { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; width: min(92vw, 420px); background: var(--paper); color: var(--ink); border: 2px solid var(--stroke); border-radius: 18px; padding: 14px 16px; box-shadow: 0 6px 0 var(--page-deep); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; animation: up .2s ease-out; }
.invite-pop .ip-text { flex: 1; min-width: 160px; }
.invite-pop .ip-text small { display: block; color: var(--ink-2); }
.invite-pop .acct-actions { flex-wrap: nowrap; }
.badge.inline { position: static; display: inline-block; margin-left: 4px; border: 0; vertical-align: 1px; }
.pf-friend { margin: 10px 0 4px; align-items: center; }
.plus-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* songs card: artist mode + host-only */
.songs-opts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.mini-seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--paper-2); border-radius: 12px; }
.mini-label { font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 0 8px 0 6px; }
.mini-btn { font: inherit; font-weight: 700; font-size: 13px; padding: 6px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); cursor: pointer; }
.mini-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 2px var(--stroke); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }

/* ---------- holiday decorations (decor.js) ---------- */
.decor { position: fixed; pointer-events: none; overflow: hidden; }
#decor-back { inset: 0; z-index: 0; }
#decor-front { left: 0; right: 0; top: 0; height: 160px; z-index: 40; }
body.in-game #decor-front { display: none; }
#app { z-index: 1; }
.deco-item { position: absolute; will-change: transform; }
.deco-item svg { display: block; height: auto; overflow: visible; }
.deco-item .flake { display: block; border-radius: 50%; background: #FFFFFF; opacity: .85; box-shadow: 0 0 6px rgba(255,255,255,.7); }
@media (max-width: 640px) {
  #decor-back .fig.moon { width: 96px !important; }
  #decor-back .fig.pumpkin { max-width: 74px; }
  #decor-back .fig.tree { max-width: 76px; }
  #decor-back .fig.ghost { max-width: 40px; }
  #decor-back .fig.web { max-width: 96px; }
}
.a-float { animation: deco-float 6s ease-in-out infinite; }
.a-dangle { animation: deco-dangle 6s ease-in-out infinite; transform-origin: top center; }
.a-swing { animation: deco-swing 5s ease-in-out infinite; transform-origin: top center; }
.a-fly { animation: deco-fly 14s linear infinite; }
.a-fly .wing { animation: deco-flap .32s ease-in-out infinite alternate; transform-box: fill-box; }
.a-fly .wing-l { transform-origin: right center; }
.a-fly .wing-r { transform-origin: left center; }
.a-fall { animation: deco-fall 16s linear infinite; }
.a-rise { animation: deco-rise 16s linear infinite; }
.a-burst { animation: deco-burst 3s ease-out infinite; }
.a-twinkle { animation: deco-twinkle 2.4s ease-in-out infinite; }
.a-glow svg { animation: deco-moonglow 6s ease-in-out infinite; }
.a-flicker .pk-face { animation: deco-flicker 3s steps(1) infinite; }
@keyframes deco-float { 0%, 100% { transform: translate(0, 0) rotate(-3deg); } 50% { transform: translate(10px, -22px) rotate(4deg); } }
@keyframes deco-dangle { 0%, 100% { transform: translateY(-34px) rotate(-2deg); } 50% { transform: translateY(18px) rotate(2deg); } }
@keyframes deco-swing { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes deco-fly { 0% { transform: translate(0, 0); } 25% { transform: translate(28vw, 18px); } 50% { transform: translate(56vw, -10px); } 75% { transform: translate(84vw, 14px); } 100% { transform: translate(calc(100vw + 160px), 0); } }
@keyframes deco-flap { from { transform: scaleY(1) rotate(0deg); } to { transform: scaleY(.35) rotate(0deg); } }
@keyframes deco-fall { 0% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(var(--sway, 30px), 55vh) rotate(calc(var(--spin, 180deg) / 2)); } 100% { transform: translate(0, calc(100vh + 120px)) rotate(var(--spin, 180deg)); } }
@keyframes deco-rise { 0% { transform: translate(0, 0) rotate(-8deg); opacity: 0; } 10% { opacity: .9; } 50% { transform: translate(var(--sway, 30px), -55vh) rotate(8deg); } 100% { transform: translate(0, calc(-100vh - 120px)) rotate(-8deg); opacity: .3; } }
@keyframes deco-burst { 0% { transform: scale(.2); opacity: 0; } 15% { opacity: .95; } 70% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.12); opacity: 0; } }
@keyframes deco-twinkle { 0%, 100% { transform: scale(.7); opacity: .35; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes deco-moonglow { 0%, 100% { filter: drop-shadow(0 0 14px rgba(255,243,196,.45)); } 50% { filter: drop-shadow(0 0 30px rgba(255,243,196,.75)); } }
@keyframes deco-flicker { 0%, 100% { opacity: 1; } 12% { opacity: .65; } 16% { opacity: 1; } 55% { opacity: .82; } 60% { opacity: 1; } }
.decor.still .deco-item, .decor.still .deco-item * { animation: none !important; }
.decor.still .a-fall, .decor.still .a-rise, .decor.still .a-fly { display: none; }
@media print { .decor { display: none; } }

/* ---------- icons, eye buttons, custom theme ---------- */
.field > label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.name-row { display: flex; gap: 8px; align-items: stretch; }
.name-row input { flex: 1; min-width: 0; }
.icon-btn { flex: none; width: 52px; border-radius: var(--r-ctl); border: 2px solid var(--stroke); background: var(--pop); color: var(--pop-ink); font: 800 22px/1 var(--display); cursor: pointer; display: grid; place-items: center; box-shadow: 0 3px 0 var(--stroke); }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--stroke); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin: 8px 0 4px; }
.icon-grid button { aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; background: var(--paper-2); font-size: 22px; cursor: pointer; display: grid; place-items: center; padding: 0; color: var(--ink); font-family: var(--display); font-weight: 800; }
.icon-grid button[aria-checked="true"] { border-color: var(--stroke); background: var(--pop); box-shadow: 0 2px 0 var(--stroke); }
.icon-grid button:hover { border-color: var(--line); }
.av.emoji, .acct-av.emoji { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-weight: 400; }
.chip-icon { margin-right: 4px; }
.code-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.eye-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; padding: 0; }
.eye-btn svg { width: 22px; height: 22px; fill: currentColor; }
.eye-btn .eye-shut { display: none; }
.eye-btn[aria-pressed="true"] .eye-open { display: none; }
.eye-btn[aria-pressed="true"] .eye-shut { display: block; }
.eye-btn:hover { color: var(--ink); border-color: var(--stroke); }
.room-code.masked { letter-spacing: 10px; color: var(--ink-2); }
.field .pw-wrap { position: relative; display: block; font-size: inherit; font-weight: inherit; color: inherit; }
.pw-wrap input { width: 100%; padding-right: 52px; }
.eye-btn.in-field { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; }
.decor-toggle { margin: 12px 0 2px; }
.custom-theme { margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--paper-2); }
.custom-theme h4 { margin: 0 0 10px; font-family: var(--display); font-size: 16px; }
.ct-colors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ct-color { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.ct-color input[type="color"] { -webkit-appearance: none; appearance: none; width: 100%; max-width: 72px; height: 48px; padding: 0; border: 2px solid var(--stroke); border-radius: 12px; background: none; cursor: pointer; }
.ct-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.ct-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 8px; }
.ct-color input[type="color"]::-moz-color-swatch { border: 0; border-radius: 8px; }
.ct-share { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.ct-code-box code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: .5px; word-break: break-all; }
.ct-import { margin-top: 10px; }
.ct-import input { flex: 1; min-width: 0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; text-transform: uppercase; }
.warn.small { font-size: 13px; padding: 8px 10px; margin: 10px 0 0; }
@media (max-width: 420px) { .ct-colors { grid-template-columns: repeat(2, 1fr); } }
.privacy-row { margin: 6px 0 4px; align-items: flex-start; }
.privacy-row small { display: block; font-weight: 400; color: var(--ink-2); margin-top: 2px; }
.lb-name.hidden-player { cursor: default; color: var(--ink-2); font-style: italic; }
.lb-name.hidden-player:hover { text-decoration: none; }
#decor-back .fig.spider, #decor-front .fig.bat { filter: drop-shadow(0 0 2px rgba(255, 170, 90, .75)) drop-shadow(0 0 8px rgba(185, 140, 255, .35)); }

/* ---------- premium themes (fx.js draws the background; these are the extra touches) ---------- */
#fx-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: block; }
#fx-canvas[hidden] { display: none; }
:root[data-fx] body::before { opacity: .35; }
:root[data-fx=""] body::before { opacity: 1; }
@keyframes fx-shine { 0% { transform: translateX(-120%) skewX(-20deg); } 60%, 100% { transform: translateX(260%) skewX(-20deg); } }
@keyframes fx-hue { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
@keyframes fx-neon { 0%, 100% { text-shadow: 0 0 6px #FF2E97, 0 0 18px #FF2E97, 0 0 36px #C026D3; } 48% { text-shadow: 0 0 6px #FF2E97, 0 0 18px #FF2E97, 0 0 36px #C026D3; } 50% { text-shadow: none; } 52% { text-shadow: 0 0 6px #FF2E97, 0 0 14px #FF2E97; } }
@keyframes fx-breathe { 0%, 100% { box-shadow: var(--shadow), 0 0 0 0 transparent; } 50% { box-shadow: var(--shadow), 0 0 26px 2px var(--glow-a); } }
:root[data-fx="sakura"] .brand h1, :root[data-fx="cottoncandy"] .brand h1, :root[data-fx="lagoon"] .brand h1, :root[data-fx="aurora"] .brand h1 {
  background: linear-gradient(90deg, #fff, var(--pop), #fff, var(--accent), #fff); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-slide 6s linear infinite;
}
@keyframes fx-slide { from { background-position: 0% 50%; } to { background-position: 300% 50%; } }
:root[data-fx="aurora"] .brand h1 { background-image: linear-gradient(90deg, #34D399, #22D3EE, #A78BFA, #34D399); }
:root[data-fx="sakura"] .card, :root[data-fx="cottoncandy"] .card { box-shadow: 0 6px 0 var(--page-deep), 0 10px 40px rgba(255, 255, 255, .35); }
:root[data-fx="lagoon"] .card { box-shadow: 0 6px 0 var(--page-deep), 0 0 34px rgba(94, 234, 212, .25); }
:root[data-fx="nebula"] .card, :root[data-fx="aurora"] .card { background: color-mix(in srgb, var(--paper) 93%, transparent); animation: fx-breathe 6s ease-in-out infinite; } /* no backdrop blur: re-blurring a moving background every frame is heavy */
:root[data-fx="synthwave"] .brand h1 { color: #FFE4F3; animation: fx-neon 5s infinite; }
:root[data-fx="synthwave"] .card { border: 1.5px solid rgba(255, 46, 151, .6); box-shadow: 0 6px 0 #000, 0 0 22px rgba(255, 46, 151, .35), inset 0 0 22px rgba(34, 211, 238, .08); }
:root[data-fx="ember"] .btn.primary { animation: fx-ember 2.4s ease-in-out infinite; }
@keyframes fx-ember { 0%, 100% { box-shadow: 0 4px 0 var(--stroke), 0 0 10px rgba(249, 115, 22, .4); } 50% { box-shadow: 0 4px 0 var(--stroke), 0 0 26px rgba(251, 191, 36, .75); } }
:root[data-fx="ember"] .brand h1 { text-shadow: 0 0 12px rgba(249, 115, 22, .8), 0 0 30px rgba(234, 88, 12, .5); }
:root[data-fx="storm"] .brand h1 { text-shadow: 0 0 14px rgba(56, 189, 248, .55); }
:root.fx-flash .card { box-shadow: 0 6px 0 var(--page-deep), 0 0 60px rgba(186, 230, 253, .55); transition: box-shadow .05s; }
:root[data-fx="blackgold"] .card { border: 1px solid rgba(212, 175, 55, .45); }
:root[data-fx="blackgold"] .brand h1 { background: linear-gradient(100deg, #8C6A1C, #F5E6A8 40%, #D4AF37 55%, #8C6A1C); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-fx="blackgold"] .btn.primary, :root[data-fx="sakura"] .btn.primary, :root[data-fx="cottoncandy"] .btn.primary { position: relative; overflow: hidden; }
:root[data-fx="blackgold"] .btn.primary::after, :root[data-fx="sakura"] .btn.primary::after, :root[data-fx="cottoncandy"] .btn.primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: fx-shine 3.6s ease-in-out infinite;
}
:root[data-motion="reduce"][data-fx] *, :root[data-motion="reduce"][data-fx] .btn.primary::after { animation: none !important; }
.a-hop { animation: deco-hop 3s ease-in-out infinite; transform-origin: bottom center; }
.a-wobble { animation: deco-wobble 3s ease-in-out infinite; transform-origin: bottom center; }
@keyframes deco-hop { 0%, 70%, 100% { translate: 0 0; } 80% { translate: 0 -18px; } 90% { translate: 0 0; } }
@keyframes deco-wobble { 0%, 100% { rotate: -6deg; } 50% { rotate: 6deg; } }

/* ---------- photos, shop, slots, coffee, admin ---------- */
.av.photo, .acct-av.photo, .icon-btn.photo, .pic-preview.photo { padding: 0; overflow: hidden; }
.av img, .acct-av img, .icon-btn img, .pic-preview img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.chip-pic { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; vertical-align: -4px; margin-right: 5px; border: 1.5px solid var(--stroke); }
.pic-row { display: flex; align-items: center; gap: 14px; margin: 8px 0 6px; }
.pic-preview { width: 64px; height: 64px; flex: none; border-radius: 50%; border: 2px solid var(--stroke); background: var(--pop); color: var(--pop-ink); display: grid; place-items: center; font: 800 28px/1 var(--display); }
.pic-preview.emoji { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-weight: 400; }
.pic-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pic-actions label.btn { cursor: pointer; }
.hint.small-left { width: 100%; margin: 0; font-size: 13px; }
.shop { margin-top: 16px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--pop) 22%, var(--paper-2)), var(--paper-2)); }
.shop h4 { margin: 0 0 4px; font-family: var(--display); font-size: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price-tag { font: 700 13px var(--body); background: var(--inverse); color: var(--inverse-ink); border-radius: 999px; padding: 3px 10px; }
.shop-grid .theme.premium .season { color: var(--ink-2); }
.shop-grid .theme.premium.owned .season { color: var(--mint-ink); font-weight: 700; }
.premium-tag { color: var(--accent-strong) !important; font-weight: 700; }
.sw-fx { position: relative; overflow: hidden; }
.sw-fx::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); background-size: 250% 100%; animation: fx-slide 3s linear infinite; }
.shop-detail { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--surface); border: 2px solid var(--line); }
.shop-detail p { margin: 4px 0 10px; color: var(--ink-2); font-size: 14px; }
.shop-detail .acct-actions a.btn { text-decoration: none; }
.slot-seg { margin-bottom: 12px; }
.slot-seg small { font-weight: 500; opacity: .7; }
.slot-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; border: 1px solid var(--stroke); vertical-align: 0; }
.coffee-btn { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 16px; border-radius: 16px; background: #FFDD00; color: #1F1A00; text-decoration: none; border: 2px solid #1F1A00; box-shadow: 0 4px 0 #1F1A00; }
.coffee-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #1F1A00; }
.coffee-btn .cup { font-size: 26px; }
.coffee-btn b { display: block; font-family: var(--display); font-size: 16px; }
.coffee-btn small { display: block; font-size: 13px; opacity: .8; }
.coffee-btn.in-settings { margin-bottom: 14px; }
.name-change { margin: 6px 0 10px; }
.name-change input, .admin-panel input, .danger-zone input { flex: 1; min-width: 0; }
.danger-zone { margin: 10px 0 4px; }
.danger-zone summary { cursor: pointer; color: var(--bad-ink); font-weight: 700; font-size: 14px; }
.btn.danger { color: var(--bad-ink); }
.admin-panel { margin-top: 12px; padding: 12px; border: 2px dashed var(--line); border-radius: 14px; }
.admin-panel h3 { margin-top: 0; }
.admin-box { margin-top: 14px; padding: 12px; border: 2px dashed var(--line); border-radius: 14px; }
.admin-gift { margin: 6px 0 10px; }
.admin-gift select { flex: 1; min-width: 0; }
.bad { color: var(--bad-ink); }
.linkish.on { font-weight: 800; text-decoration: underline; }
.amode-box { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex: 1 1 100%; min-width: 0; }
.mini-label.hl { background: var(--pop); color: var(--pop-ink); border-radius: 8px; padding: 3px 8px; margin-right: 4px; }
.amode-note { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
:root[data-fx="sakura"] .brand h1, :root[data-fx="cottoncandy"] .brand h1, :root[data-fx="lagoon"] .brand h1, :root[data-fx="aurora"] .brand h1, :root[data-fx="blackgold"] .brand h1 { filter: drop-shadow(0 2px 0 rgba(40, 0, 30, .35)) drop-shadow(0 4px 14px rgba(40, 0, 30, .35)); }
:root[data-fx="sakura"] .brand h1 { background-image: linear-gradient(90deg, #FFFFFF, #FFE4EC, #FFFFFF, #FFD1DC, #FFFFFF); }

/* Settings tabs */
.seg.set-tabs { grid-template-columns: repeat(4, 1fr); position: sticky; top: -20px; z-index: 2; margin: 4px 0 6px; }
.set-tabs .seg-btn { font-size: 14px; padding: 9px 4px; white-space: nowrap; }
.set-panel > h3:first-child { margin-top: 10px; }
.set-panel { min-height: 160px; }
@media (max-width: 420px) { .set-tabs .seg-btn { font-size: 12px; } }

/* Folding pack categories */
.pack-cat { display: flex; align-items: center; gap: 8px; width: 100%; margin: 8px 0 0; padding: 11px 14px; font: inherit; font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--ink); background: var(--paper-2); border: 0; border-radius: var(--r-ctl); cursor: pointer; text-align: left; }
.pack-cat:first-child { margin-top: 0; }
.pack-cat span { flex: 1; }
.pack-cat em { font-style: normal; font-family: inherit; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--inverse); color: var(--inverse-ink); }
.pack-cat i { font-style: normal; transition: transform .2s; color: var(--ink-2); }
.pack-cat.open i { transform: rotate(180deg); }
.pack-cat + .pack-row { margin: 10px 0 6px; }

/* Speedrun */
.speedrun-opt { margin: 4px 0 14px; align-items: flex-start; }
.speedrun-opt span b { display: block; }
.speedrun-opt span { font-size: 14px; line-height: 1.4; }
.sr-answer { display: flex; align-items: center; gap: 12px; text-align: left; margin: 12px 0 4px; padding: 10px; border-radius: var(--r-ctl); background: var(--paper-2); }
.sr-answer .cov { width: 52px; height: 52px; border-radius: 10px; background: var(--accent) center/cover; flex: none; }
.sr-answer b { display: block; }
.sr-answer small { color: var(--ink-2); }
.sr-next { width: 100%; margin-top: 12px; }
.sr-wait { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; text-align: left; }
.sr-wait li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: var(--paper-2); font-weight: 700; }
.sr-wait li.fin { color: var(--mint-ink); background: var(--good-bg); }
.sr-songs h3 { font-family: var(--display); margin: 0 0 8px; font-size: 16px; }
.sr-songs ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.sr-songs small { color: var(--ink-2); }
#round-players .prog { font-size: 11px; opacity: .75; margin-left: 4px; }
.btn.armed { background: var(--bad-bg); color: var(--bad-ink); border-color: var(--bad-ink); }
.confetti i.g { width: auto !important; height: auto !important; background: none !important; line-height: 1; font-style: normal; text-shadow: 0 1px 2px rgba(0,0,0,.18); }

/* A card you're typing in (or with a dropdown open) always sits above the cards after it,
   even in themes whose cards blur/animate (which would otherwise cover the dropdown). */
.card:focus-within, .card:has(.suggestions:not([hidden])) { position: relative; z-index: 30; }

/* While drawing on the background (Sakura), don't select text or scroll. */
.fx-drawing, .fx-drawing body { user-select: none; -webkit-user-select: none; }
.fx-drawing body { touch-action: none; }

/* Themes tab: sections, favorites, arranging */
.th-seg { display: flex; width: 100%; margin: 12px 0 12px; }
.th-seg .mini-btn { flex: 1; }
.th-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.th-bar .hint { margin: 0; font-size: 13px; }
.th-group { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 4px 0 8px; }
.theme .fav { position: absolute; top: 4px; right: 4px; z-index: 2; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.38); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.theme .fav.on { background: var(--pop); color: var(--pop-ink); }
.theme .fav:hover { transform: scale(1.1); }
.arranging .theme { cursor: grab; animation: th-jiggle .35s ease-in-out infinite alternate; }
.arranging .theme:nth-child(2n) { animation-delay: .17s; }
@keyframes th-jiggle { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }
.arranging .theme.dragging { opacity: .4; }
.arranging .theme.drop-here { border-color: var(--accent); border-style: dashed; }
.theme .moves { display: none; position: absolute; left: 4px; top: 4px; z-index: 2; gap: 4px; }
.arranging .theme .moves { display: flex; }
.arranging .theme .fav { display: none; }
.theme .moves span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--inverse); color: var(--inverse-ink); font-weight: 800; cursor: pointer; }
#th-arrange[aria-pressed="true"] { background: var(--inverse); color: var(--inverse-ink); }
.shop h4, .custom-theme h4 { margin-top: 0; }
:root[data-motion="reduce"] .arranging .theme { animation: none; }
.theme .sw-deco { margin: -30px 0 0 6px; } /* bottom-left of the swatch, clear of the ☆ */

.hid-tag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: var(--inverse); color: var(--inverse-ink); vertical-align: middle; }

/* Animated themes: the front fx layer sits over the logo but under the cards and top bar. */
#fx-front { position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none; display: block; }
#fx-front[hidden] { display: none; }
#app > .brand { position: relative; z-index: 0; }
#app > .screen, #app > .topbar { position: relative; z-index: 2; }
:root[data-fx]:not([data-fx=""]) .brand { pointer-events: none; }

/* Quick clip lengths */
.jump-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 12px 0 2px; }
.jump { font: inherit; border: 2px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 6px 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.jump b { font-size: 14px; }
.jump small { font-size: 10.5px; color: var(--ink-2); font-weight: 600; }
.jump:hover { border-color: var(--accent); }
.jump.on { border-color: var(--stroke); box-shadow: 0 2px 0 var(--stroke); }
.jump.heard { background: var(--paper-2); }
@media (max-width: 420px) { .jump-row { gap: 4px; } .jump b { font-size: 13px; } .jump small { font-size: 9.5px; } }

/* Profile: a big picture in the top-right */
.pf-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pf-left { flex: 1; min-width: 0; }
.pf-big { flex: none; width: 140px !important; height: 140px !important; border-radius: 50%; overflow: hidden; display: grid !important; place-items: center; font-size: 64px !important; box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--line); margin: -6px 4px 8px 0; }
.pf-big img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 480px) { .pf-big { width: 88px !important; height: 88px !important; font-size: 40px !important; } }

.admin-search .artist-box { flex: 1; position: relative; }
.admin-list { max-height: 360px; }
.admin-list .acct-av { width: 34px; height: 34px; flex: none; }
.admin-list li.artist { display: flex; align-items: center; gap: 10px; }
.admin-list li.artist .acct-av { display: grid; place-items: center; border-radius: 50%; overflow: hidden; font-size: 16px; }
.admin-list li.artist .acct-av img { width: 100%; height: 100%; object-fit: cover; }

.pf-bigwrap { flex: 1; display: flex; justify-content: center; align-items: flex-start; min-width: 0; }
.pf-big { line-height: 1 !important; text-align: center; margin: -6px 0 8px !important; }
.pf-left { flex: 0 1 auto; }

/* Hide-interface toggle (animated themes only) */
#ui-toggle { position: fixed; right: 14px; bottom: 14px; z-index: 65; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 700; font-size: 12px; padding: 7px 10px; border-radius: 99px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.28); color: rgba(255,255,255,.75); cursor: pointer; backdrop-filter: blur(2px); opacity: .55; transition: opacity .2s; }
#ui-toggle:hover, #ui-toggle:focus-visible { opacity: 1; }
#ui-toggle b { display: none; }            /* computers: just a small icon until hovered */
#ui-toggle:hover b { display: inline; }
#ui-toggle[hidden] { display: none; }
body.ui-hidden #ui-toggle { opacity: 1; background: var(--inverse); color: var(--inverse-ink); }
body.ui-hidden #ui-toggle b { display: inline; }
@media (pointer: coarse), (max-width: 640px) { /* phones: an obvious pill */
  #ui-toggle { opacity: 1; font-size: 14px; padding: 10px 14px; background: var(--inverse); color: var(--inverse-ink); border: 2px solid var(--stroke); box-shadow: 0 3px 0 var(--stroke); bottom: 16px; right: 16px; }
  #ui-toggle b { display: inline; }
}
body.ui-hidden #app > *:not(#fx-front), body.ui-hidden .coffee-btn, body.ui-hidden #decor-front, body.ui-hidden .gotit, body.ui-hidden .invite-pop { visibility: hidden !important; }

/* Interface hidden: the screen is all game, so it never scrolls (free drawing / holding on phones). */
html:has(body.ui-hidden), body.ui-hidden { touch-action: none; overflow: hidden; overscroll-behavior: none; }

/* Profile picture: big and centred at the top */
.pf-bigwrap { display: flex; justify-content: center; width: 100%; margin: 2px 0 14px; flex: none; }
.pf-big { margin: 0 !important; display: flex !important; align-items: center; justify-content: center; padding: 0 !important; }
.pf-glyph { display: block; width: 100%; height: 100%; line-height: 140px; text-align: center; text-indent: 0; letter-spacing: 0; }
.pf-big.photo .pf-glyph { line-height: 0; }
.pf-glyph img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 480px) { .pf-glyph { line-height: 88px; } }

/* Invite friends (referrals) */
.invite-box { margin: 14px 0 6px; padding: 12px 14px; border-radius: 14px; background: var(--paper-2); border: 2px dashed var(--line); }
.invite-box h4 { margin: 0 0 4px; font-family: var(--display); font-size: 16px; }
.invite-box .hint { margin: 0 0 10px; }
.ref-pips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.ref-pips i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.ref-pips i.half { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 25%, var(--surface)); }
.ref-pips i.on { border-color: var(--stroke); background: var(--accent); box-shadow: 0 0 0 2px var(--pop) inset; }
.ref-pips span { margin-left: 4px; }
.ref-link { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ref-link code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }

/* Invite card (home + results): stands out without shouting */
.invite-card { border: 2px solid transparent; background: linear-gradient(var(--paper), var(--paper)) padding-box, linear-gradient(120deg, #FF8A3D, #FFD27A, #FF9EC7) border-box; }
.invite-card .invite-box { margin: 10px 0 0; background: transparent; border: 0; padding: 0; }
.invite-card .invite-box h4 { display: none; }
.invite-hero { display: flex; align-items: center; gap: 12px; }
.invite-hero > div { flex: 1; min-width: 0; }
.invite-hero b { display: block; font-family: var(--display); font-size: 17px; }
.invite-hero small { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.ih-fire { font-size: 30px; line-height: 1; animation: ih-flicker 1.6s ease-in-out infinite; }
@keyframes ih-flicker { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.12) rotate(3deg); } }
.invite-card.done .invite-hero b::after { content: " ✓"; color: var(--accent-strong); }
:root[data-motion="reduce"] .ih-fire { animation: none; }
.invite-card .invite-box > .hint { display: none; }
.invite-card .invite-box .ref-pips + .ref-link, .invite-card .invite-box .ref-pips { margin-top: 0; }

.motion-row { margin: 10px 0 4px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.motion-row .hint { margin: 0; font-size: 12.5px; }

/* Admin announcements */
#announce-bar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 95; width: min(94vw, 520px); display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--inverse); color: var(--inverse-ink); border: 2px solid var(--pop); box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.35); }
#announce-bar.in { animation: ab-in .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes ab-in { from { transform: translate(-50%, -30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
#announce-bar[hidden] { display: none; }
#announce-bar .ab-icon { font-size: 24px; line-height: 1.1; }
#announce-bar div { flex: 1; min-width: 0; }
#announce-bar b { display: block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--pop); }
#announce-bar span { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; word-wrap: break-word; }
#announce-bar .ab-x { font: inherit; font-size: 22px; line-height: 1; background: none; border: 0; color: inherit; cursor: pointer; opacity: .75; padding: 0 2px; }
.admin-announce { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.admin-announce label small { display: block; color: var(--ink-2); font-size: 12px; font-weight: 500; }
.admin-announce textarea { font: inherit; padding: 10px 12px; border-radius: var(--r-ctl); border: 0; background: var(--surface); color: var(--ink); resize: vertical; }
.admin-announce button { align-self: flex-start; }
#announce-bar { background: #14123A; color: #FFFFFF; border-color: #FFD43B; }
#announce-bar b { color: #FFD43B; }
