/* ----------------------------------------------------------
   The Song Wars — ranker prototype (Phase 1)
   Shares the LMG Soundworks palette: cream ink on a deep
   cosmic ground, Cinzel for display, Newsreader for prose.
   ---------------------------------------------------------- */

:root {
  --ink:        #f4ead8;
  --ink-quiet:  rgba(244, 234, 216, 0.62);
  --ink-faint:  rgba(244, 234, 216, 0.35);
  --ink-line:   rgba(244, 234, 216, 0.12);

  --gold:       #f2b04a;
  --gold-deep:  #c8801a;
  --ember:      #c83a14;
  --violet:     #2a1a55;

  --card:       rgba(244, 234, 216, 0.04);
  --card-line:  rgba(244, 234, 216, 0.14);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 700px at 50% -10%, #3a1140 0%, rgba(58,17,64,0) 60%),
    radial-gradient(900px 600px at 80% 110%, #1a0a48 0%, rgba(26,10,72,0) 55%),
    linear-gradient(178deg, #170611 0%, #1a0a2a 38%, #160a34 64%, #100517 100%);
  background-attachment: fixed;
}

/* ---------- screens ---------- */
.screen { display: none; min-height: 100vh; }
.screen.is-active { display: block; }

.btn {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  border-radius: 999px;
  padding: 0.7em 1.3em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, opacity 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--gold {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #1c0c06;
  box-shadow: 0 6px 22px rgba(242, 176, 74, 0.25);
}
.btn--gold:hover { box-shadow: 0 8px 30px rgba(242, 176, 74, 0.4); }
.btn--ghost {
  background: transparent;
  color: var(--ink-quiet);
  border-color: var(--ink-line);
}
.btn--ghost:hover { color: var(--ink); border-color: var(--card-line); }
.btn--sm { font-size: 0.8rem; padding: 0.5em 0.95em; }

/* ---------- welcome ---------- */
.welcome {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(3rem, 10vh, 7rem) 1.5rem 4rem;
  text-align: center;
}
.kicker {
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--gold);
  margin: 0 0 0.6rem;
  padding-left: 0.42em;
}
.bigtitle {
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  line-height: 1.02;
  margin: 0 0 1.6rem;
  letter-spacing: 0.01em;
}
.welcome__prose { font-size: 1.12rem; color: var(--ink-quiet); text-align: left; }
.welcome__prose p { margin: 0 0 1rem; }
.welcome__rule {
  color: var(--ink) !important;
  font-style: italic;
  font-size: 1.18rem;
  text-align: center;
  margin-top: 1.6rem !important;
}

.join { margin-top: 2.4rem; }
.join__label {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
}
.join__row { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.join__input {
  font-family: "Newsreader", serif;
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 999px;
  padding: 0.7em 1.2em;
  min-width: 200px;
  text-align: center;
}
.join__input:focus { outline: none; border-color: var(--gold); }
.join__input::placeholder { color: var(--ink-faint); }
/* A real, noticeable secondary button — people were missing the old faint link. */
.join__google {
  display: flex; align-items: center; justify-content: center; gap: 0.55em;
  width: fit-content; max-width: 100%;
  margin: 1.4rem auto 0;
  background: rgba(244, 234, 216, 0.05);
  border: 1px solid var(--card-line);
  color: var(--ink-quiet);
  font-family: "Inter", sans-serif;
  font-size: 0.9rem; font-weight: 500;
  border-radius: 999px;
  padding: 0.65em 1.3em;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.join__google:hover { background: rgba(242, 176, 74, 0.14); border-color: rgba(242, 176, 74, 0.45); color: var(--ink); }
.join__google-g {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 1.4em; height: 1.4em; border-radius: 50%;
  background: #fff; color: #4285f4;
  font-family: "Inter", sans-serif; font-weight: 700; font-size: 0.85em;
}

/* Greeting for a returning visitor (this device has signed in before). */
.welcome-back[hidden] { display: none !important; }
.welcome-back {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem; line-height: 1.45;
  color: var(--gold);
  background: rgba(242, 176, 74, 0.10);
  border: 1px solid rgba(242, 176, 74, 0.3);
  border-radius: 14px;
  padding: 0.8em 1.1em;
  margin: 1.8rem auto 0;
  max-width: 460px;
}
.join__phase2 {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  color: var(--gold);
  margin-top: 0.6rem;
}

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.3rem;
  position: sticky; top: 0; z-index: 20;
  /* same blurred dark bar as the homepage's scrolled nav */
  background: rgba(8, 5, 12, 0.68);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid rgba(244, 234, 216, 0.08);
}
/* matches the homepage .topnav .wordmark exactly, for one cohesive site */
.wordmark {
  font-family: "Cinzel", "Newsreader", serif;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.82;
  background: none; border: none; cursor: pointer; padding: 0;
  text-decoration: none;
  transition: opacity 0.28s ease;
}
.wordmark:hover { opacity: 1; }
.topbar__here {
  font-family: "Inter", sans-serif;
  font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint);
}
.topbar__right { display: flex; align-items: center; gap: 0.8rem; }
.judged {
  font-family: "Inter", sans-serif;
  font-size: 0.74rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}

/* ---------- arena ---------- */
.arena { max-width: 620px; margin: 0 auto; padding: 1.6rem 1.2rem 3rem; }

.mode-banner { text-align: center; min-height: 1.6rem; margin-bottom: 0.5rem; }
.mode-banner__tag {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  padding: 0.35em 0.95em;
  display: inline-block;
}
.commentator {
  text-align: center;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-quiet);
  min-height: 2.6rem;
  margin: 0 0 0.6rem;
  transition: opacity 0.3s;
}

.fighter {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 18px;
  padding: 1.1rem 1.1rem 1.2rem;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s, opacity 0.25s;
}
.fighter--champ {
  border-color: rgba(242, 176, 74, 0.4);
  box-shadow: 0 0 0 1px rgba(242,176,74,0.08), 0 14px 40px rgba(0,0,0,0.35);
}
.fighter--loser {
  border-color: rgba(200, 58, 20, 0.35);
  box-shadow: 0 0 0 1px rgba(200,58,20,0.06), 0 14px 40px rgba(0,0,0,0.35);
}
.fighter__corner { position: absolute; top: 0.7rem; right: 0.9rem; }
.fighter__belt {
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.fighter__main { display: flex; gap: 0.95rem; align-items: center; }
.play {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--card-line);
  background: rgba(244,234,216,0.06);
  color: var(--ink);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
}
.play:hover { background: rgba(244,234,216,0.13); }
.play.is-playing {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: #1c0c06; border-color: transparent;
}
.play__icon { font-size: 1.1rem; line-height: 1; margin-left: 2px; }
.play.is-playing .play__icon { margin-left: 0; }
.fighter__body { flex: 1 1 auto; min-width: 0; }
.fighter__badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.3rem; }
.badge {
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  border: 1px solid var(--ink-line);
  color: var(--ink-quiet);
  white-space: nowrap;
}
.badge--gold { color: var(--gold); border-color: rgba(242,176,74,0.35); }
.badge--cool { color: #8fb6d6; border-color: rgba(143,182,214,0.3); }
.badge--duel { color: #1c0c06; background: linear-gradient(180deg, var(--gold), var(--gold-deep)); border-color: transparent; font-weight: 600; }
.badge--loser { color: #e6a892; border-color: rgba(200,58,20,0.45); background: rgba(200,58,20,0.10); }
.fighter__title {
  font-family: "Cinzel", serif;
  font-weight: 500;
  font-size: 1.32rem;
  line-height: 1.12;
  margin: 0.1rem 0 0.55rem;
}
.scrub {
  height: 6px; border-radius: 999px;
  background: rgba(244,234,216,0.1);
  cursor: pointer; position: relative;
}
.scrub__fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  border-radius: 999px;
  transition: width 0.2s linear;
}
.fighter__note {
  font-family: "Inter", sans-serif;
  font-size: 0.76rem;
  color: var(--ink-faint);
  margin: 0.5rem 0 0;
  min-height: 1rem;
}
.crown {
  margin-top: 0.95rem;
  width: 100%;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  background: rgba(244,234,216,0.05);
  border: 1px solid var(--card-line);
  border-radius: 12px;
  padding: 0.75em;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}
.crown:hover { background: rgba(242,176,74,0.14); border-color: rgba(242,176,74,0.5); }
.crown:active { transform: translateY(1px); }

.versus {
  text-align: center;
  font-family: "Cinzel", serif;
  font-size: 1.15rem;
  color: var(--ink-faint);
  margin: 0.85rem 0;
  letter-spacing: 0.2em;
}

.sc-host { height: 0; overflow: hidden; }
.sc-host iframe { width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.arena__foot {
  display: flex; justify-content: space-between; gap: 0.8rem;
  margin-top: 1.6rem; flex-wrap: wrap;
}

/* won/lost flash */
.fighter.flash-win {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(242,176,74,0.4), 0 14px 50px rgba(242,176,74,0.25);
}
.fighter.flash-lose { opacity: 0.45; }

/* ---------- ranking ---------- */
.ranking { max-width: 680px; margin: 0 auto; padding: 1.6rem 1.2rem 4rem; }
.gratitude {
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink);
  text-align: center;
  min-height: 2rem;
  margin: 0.4rem 0 1.6rem;
}
/* Prominent, always-reachable way back into the ring (sticks under the topbar
   as you scroll the list — people kept getting "stuck" on the rankings). */
.ranking__return {
  position: sticky; top: 52px; z-index: 16;
  text-align: center;
  margin: 0 -1.2rem 1.1rem; padding: 0.85rem 1.2rem 1rem;
  /* tinted to the page's own purple and faded at BOTH ends, so it reads as frosted
     glass rather than a hard black band; the blur keeps scrolled rows legible. */
  background: linear-gradient(180deg,
    rgba(26, 10, 42, 0) 0%,
    rgba(26, 10, 42, 0.88) 22%,
    rgba(26, 10, 42, 0.88) 74%,
    rgba(26, 10, 42, 0) 100%);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ranking__return .btn { padding-left: 1.7em; padding-right: 1.7em; }

.tabs {
  display: flex; gap: 0.4rem; justify-content: center;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  padding: 0.3rem;
  max-width: 420px; margin: 0 auto 1rem;
}
.tab {
  flex: 1;
  font-family: "Inter", sans-serif;
  font-size: 0.82rem; font-weight: 500;
  color: var(--ink-quiet);
  background: none; border: none; cursor: pointer;
  padding: 0.55em 0.4em;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.tab.is-active { background: rgba(242,176,74,0.16); color: var(--gold); }
.tab-note {
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 0 0 1.2rem;
  min-height: 1rem;
}

.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.rank-row {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.7rem 0.4rem;
  border-bottom: 1px solid var(--ink-line);
}
.rank-row--unseen { opacity: 0.5; }
/* Songs you've already heard get a quiet gold edge on the Most-Played / Everyone
   tabs, so they're easy to tell apart from the ones still up for judging. */
.rank-row--heard { box-shadow: inset 3px 0 0 rgba(242, 176, 74, 0.55); }
.heard-chip {
  font-family: "Inter", sans-serif;
  font-size: 0.68rem; letter-spacing: 0.02em;
  padding: 0.12em 0.55em; border-radius: 999px;
  color: var(--gold);
  border: 1px solid rgba(242, 176, 74, 0.4);
  background: rgba(242, 176, 74, 0.10);
  white-space: nowrap;
}
.rank-row__num {
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
  color: var(--ink-faint);
  width: 1.9rem; text-align: right; flex: 0 0 auto;
}
.rank-row__body { flex: 1 1 auto; min-width: 0; }
.rank-row__title {
  font-family: "Newsreader", serif;
  font-size: 1.08rem;
  margin: 0; line-height: 1.2;
}
.rank-row__meta {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-top: 0.15rem;
  display: flex; gap: 0.5rem; flex-wrap: wrap;
}
.rank-row__belt { color: var(--gold); }
.divider {
  font-family: "Inter", sans-serif;
  text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.68rem; color: var(--ink-faint);
  padding: 1rem 0.4rem 0.4rem;
}

.everyone-locked {
  text-align: center;
  border: 1px dashed var(--card-line);
  border-radius: 16px;
  padding: 2.4rem 1.5rem;
  color: var(--ink-quiet);
}
.everyone-locked h3 { font-family: "Cinzel", serif; font-weight: 500; margin: 0 0 0.6rem; }

.ranking__foot { text-align: center; margin-top: 2rem; }

/* ---------- save nudge (non-blocking sign-in prompt) ---------- */
.nudge[hidden] { display: none !important; }
.nudge {
  position: fixed; left: 50%; bottom: 1.4rem;
  transform: translateX(-50%) translateY(170%);
  z-index: 55;
  display: flex; align-items: center; gap: 0.7rem;
  background: rgba(20, 10, 26, 0.97);
  border: 1px solid var(--card-line); border-radius: 14px;
  padding: 0.6rem 0.65rem 0.6rem 1.05rem;
  max-width: 92vw;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5);
  transition: transform 0.42s var(--ease);
}
.nudge.is-up { transform: translateX(-50%) translateY(0); }
.nudge__text { font-family: "Inter", sans-serif; font-size: 0.85rem; color: var(--ink); line-height: 1.35; }
.nudge__cta {
  flex: 0 0 auto;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: #1c0c06; border: none; border-radius: 999px;
  padding: 0.5em 1em; font-family: "Inter", sans-serif; font-weight: 600; font-size: 0.82rem;
  cursor: pointer; white-space: nowrap;
}
.nudge__x {
  flex: 0 0 auto; background: none; border: none; color: var(--ink-faint);
  font-size: 1.25rem; line-height: 1; cursor: pointer; padding: 0 0.15em;
}
.nudge__x:hover { color: var(--ink); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.6rem;
  transform: translateX(-50%) translateY(140%);
  background: rgba(20, 10, 24, 0.96);
  border: 1px solid var(--card-line);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  padding: 0.8em 1.3em;
  border-radius: 12px;
  z-index: 60;
  max-width: 90vw; text-align: center;
  transition: transform 0.4s var(--ease);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.toast.is-up { transform: translateX(-50%) translateY(0); }

/* ---------- reactions ---------- */
.reacts {
  display: flex; gap: 0.5rem; justify-content: center;
  margin-top: 0.9rem; flex-wrap: wrap;
}
.react {
  font-size: 1.05rem; line-height: 1;
  background: rgba(244, 234, 216, 0.05);
  border: 1px solid var(--card-line);
  border-radius: 999px;
  padding: 0.4em 0.7em;
  cursor: pointer; color: var(--ink);
  display: inline-flex; align-items: center; gap: 0.35em;
  transition: transform 0.12s var(--ease), background 0.18s, border-color 0.18s;
}
.react:hover { background: rgba(244, 234, 216, 0.12); }
.react:active { transform: scale(0.88); }
.react__count {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem; font-weight: 600;
  color: var(--gold);
}
.float-emoji {
  position: fixed; pointer-events: none;
  font-size: 1.5rem; z-index: 70;
  will-change: transform, opacity;
  animation: floatUp 1s ease-out forwards;
}
@keyframes floatUp {
  0%   { opacity: 1; transform: translateY(0) scale(0.8) rotate(0deg); }
  100% { opacity: 0; transform: translateY(-100px) scale(1.6) rotate(12deg); }
}

/* ---------- knockout melodrama ---------- */
.ko {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-content: center; justify-items: center; gap: 0.7rem;
  pointer-events: none; opacity: 0;
  text-align: center;
}
.ko.is-on { animation: koShow 1.15s var(--ease) forwards; }
@keyframes koShow {
  0% { opacity: 0; } 9% { opacity: 1; } 76% { opacity: 1; } 100% { opacity: 0; }
}
.ko__burst {
  width: clamp(220px, 62vw, 360px); aspect-ratio: 1;
  display: grid; place-items: center;
  background: radial-gradient(circle at 42% 36%, #ffe39a 0%, var(--gold) 52%, var(--gold-deep) 100%);
  clip-path: polygon(50% 0%, 61% 17%, 79% 8%, 75% 28%, 95% 25%, 83% 41%, 100% 50%, 83% 59%,
                     95% 75%, 75% 72%, 79% 92%, 61% 83%, 50% 100%, 39% 83%, 21% 92%, 25% 72%,
                     5% 75%, 17% 59%, 0% 50%, 17% 41%, 5% 25%, 25% 28%, 21% 8%, 39% 17%);
  filter: drop-shadow(0 14px 40px rgba(242, 176, 74, 0.4));
}
.ko.is-on .ko__burst { animation: koPop 0.55s var(--ease) both; }
@keyframes koPop {
  0%   { transform: scale(0.2) rotate(-28deg); }
  60%  { transform: scale(1.1) rotate(-3deg); }
  100% { transform: scale(1) rotate(-6deg); }
}
.ko__word {
  font-family: "Cinzel", serif; font-weight: 700;
  font-size: clamp(2.2rem, 9vw, 3.8rem);
  color: #2a0e05; letter-spacing: 0.01em;
  transform: rotate(-5deg);
}
.ko__name {
  font-family: "Cinzel", serif; font-size: 1.25rem;
  color: var(--gold); margin: 0; max-width: 80vw;
}
.ko__lock {
  font-family: "Inter", sans-serif; font-size: 0.82rem;
  color: var(--ink-quiet); margin: 0;
}

/* ---------- send-to-ring (ranking rows) ---------- */
.rank-row__send {
  flex: 0 0 auto;
  background: rgba(244, 234, 216, 0.05);
  border: 1px solid var(--card-line);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.5em 0.7em; cursor: pointer;
  font-size: 0.95rem; line-height: 1;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}
.rank-row__send:hover { background: rgba(242, 176, 74, 0.16); border-color: rgba(242, 176, 74, 0.5); }
.rank-row__send:active { transform: translateY(1px); }

/* reorder controls (Your Verdict only) — nudge a heard song up or down your ranking */
.rank-row__move { flex: 0 0 auto; display: inline-flex; flex-direction: column; gap: 3px; }
.rank-row__move button {
  width: 28px; height: 19px; line-height: 1;
  background: rgba(244, 234, 216, 0.05);
  border: 1px solid var(--card-line);
  color: var(--ink-quiet);
  border-radius: 6px; cursor: pointer;
  font-size: 0.58rem;
  display: grid; place-items: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}
.rank-row__move button:hover { background: rgba(242, 176, 74, 0.16); border-color: rgba(242, 176, 74, 0.5); color: var(--ink); }
.rank-row__move button:active { transform: translateY(1px); }

/* ---------- exit links (back to main site) ---------- */
/* matches the homepage .topnav link style */
.exit-link {
  font-family: "Inter", sans-serif;
  font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink); opacity: 0.62; text-decoration: none;
  transition: opacity 0.28s ease;
}
.exit-link:hover { opacity: 1; }
.welcome .exit-link {
  display: inline-block; margin-bottom: 1.4rem;
}
.exit-link--bar { white-space: nowrap; }

/* ---------- sound toggle ---------- */
.sfx-toggle {
  position: relative;
  background: transparent; border: 1px solid var(--ink-line);
  border-radius: 999px; width: 34px; height: 34px;
  cursor: pointer; font-size: 0.95rem; line-height: 1;
  display: grid; place-items: center;
  transition: border-color 0.2s, background 0.2s;
}
.sfx-toggle:hover { border-color: var(--card-line); }
.sfx-toggle[aria-pressed="true"] {
  border-color: rgba(242,176,74,0.5);
  background: rgba(242,176,74,0.12);
}
/* when OFF, strike the speaker so it's clearly "sound effects off" */
.sfx-toggle[aria-pressed="false"]::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 24px; height: 2.5px; border-radius: 2px;
  background: var(--ember);
  box-shadow: 0 0 0 1.5px rgba(16, 6, 20, 0.7);
  transform: translate(-50%, -50%) rotate(-45deg);
  pointer-events: none;
}

/* ---------- save / google (ranking) ---------- */
.save-row {
  text-align: center; margin: 0 0 1.4rem;
}
.save-row__msg {
  display: block; font-family: "Inter", sans-serif;
  font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 0.5rem;
}
.save-row__google {
  background: rgba(244,234,216,0.05);
  border: 1px solid var(--card-line);
  color: var(--ink); cursor: pointer;
  font-family: "Inter", sans-serif; font-size: 0.85rem; font-weight: 500;
  border-radius: 999px; padding: 0.6em 1.2em;
  transition: background 0.18s, border-color 0.18s;
}
.save-row__google:hover { background: rgba(242,176,74,0.14); border-color: rgba(242,176,74,0.45); }

/* ---------- reaction timeline markers ---------- */
.scrub__marks { position: absolute; inset: 0; pointer-events: none; }
.scrub__mark {
  position: absolute; top: 50%; transform: translate(-50%, -52%);
  line-height: 1; pointer-events: none;
  transition: font-size 0.2s, filter 0.2s;
}
.float-emoji--ghost { font-size: 1.25rem; filter: drop-shadow(0 0 4px rgba(242,176,74,0.5)); }

@media (max-width: 480px) {
  .fighter__title { font-size: 1.18rem; }
  .arena__foot { justify-content: center; }
  .exit-link--bar { display: none; }
}

/* ---------- admin: set default order ---------- */
.admin { max-width: 680px; margin: 0 auto; padding: 1.4rem 1.2rem 4rem; }
.admin .kicker { text-align: left; padding-left: 0; }
.admin__title {
  font-family: "Cinzel", serif; font-weight: 500;
  font-size: clamp(1.8rem, 6vw, 2.6rem); margin: 0.2rem 0 0.8rem;
}
.admin__intro { color: var(--ink-quiet); margin: 0 0 1.4rem; }
.admin__bar {
  position: sticky; top: 64px; z-index: 10;
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.6rem 0; margin-bottom: 0.6rem;
  background: linear-gradient(180deg, rgba(16,6,20,0.95), rgba(16,6,20,0.0));
}
.admin__status { font-family: "Inter", sans-serif; font-size: 0.82rem; color: var(--ink-quiet); }
.admin-list { list-style: none; margin: 0; padding: 0; }
.admin-row {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0.3rem; border-bottom: 1px solid var(--ink-line);
}
.admin-row__title {
  flex: 1 1 auto; min-width: 0; margin: 0;
  font-family: "Newsreader", serif; font-size: 1.02rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-row__ctrls { flex: 0 0 auto; display: flex; gap: 0.3rem; }
.admin-move {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(244,234,216,0.05); border: 1px solid var(--card-line);
  color: var(--ink); cursor: pointer; font-size: 0.95rem; line-height: 1;
  transition: background 0.15s, border-color 0.15s;
}
.admin-move:hover { background: rgba(242,176,74,0.14); border-color: rgba(242,176,74,0.45); }
.admin-move:active { transform: translateY(1px); }

/* ---------- exit-intent "deputize a friend" prompt ---------- */
.exit-prompt[hidden] { display: none !important; } /* the hidden attribute must win over display:grid, or the invisible overlay eats every click */
.exit-prompt {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; padding: 1.4rem;
  background: rgba(8, 4, 12, 0.88); /* strong dim even where backdrop-blur isn't supported */
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.exit-prompt.is-on { opacity: 1; }
.exit-prompt__card {
  max-width: 420px; width: 100%; text-align: center;
  background: linear-gradient(180deg, #2a1632, #140a1a); /* fully opaque so it never shows through */
  border: 1px solid var(--card-line); border-radius: 18px;
  padding: 2rem 1.6rem 1.5rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.3s var(--ease);
}
.exit-prompt.is-on .exit-prompt__card { transform: none; }
.exit-prompt__kicker {
  font-family: "Inter", sans-serif; text-transform: uppercase;
  letter-spacing: 0.26em; font-size: 0.68rem; color: var(--gold); margin: 0 0 0.6rem;
}
.exit-prompt__title { font-family: "Cinzel", serif; font-weight: 500; font-size: 1.55rem; margin: 0 0 0.7rem; }
.exit-prompt__body { color: var(--ink-quiet); font-size: 1.02rem; line-height: 1.5; margin: 0 0 1.4rem; }
.exit-prompt .btn--gold { width: 100%; }
.exit-prompt__dismiss {
  display: block; margin: 0.9rem auto 0; background: none; border: none;
  color: var(--ink-faint); font-family: "Inter", sans-serif; font-size: 0.82rem;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.exit-prompt__dismiss:hover { color: var(--ink-quiet); }

/* respect users who prefer less motion: keep the meaning, drop the spin/launch */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ko.is-on .ko__burst { animation: none !important; transform: scale(1) rotate(-6deg); }
  .float-emoji { animation: floatUpReduced 0.5s ease-out forwards !important; }
}
@keyframes floatUpReduced {
  0% { opacity: 0.9; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-36px); }
}
