/* Pick One — game-show stage. Mobile first. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0b0818;
  --bg-2: #170f33;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-solid: #1a1237;
  --line: rgba(255, 255, 255, 0.12);
  --ink: #f8f6ff;
  --muted: #a79fd0;
  --pink: #ff3d7f;
  --amber: #ffc247;
  --cyan: #46e0ff;
  --green: #3ddc97;
  --violet: #8b5cff;
  --radius: 20px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 8% -10%, rgba(139, 92, 255, 0.42), transparent 62%),
    radial-gradient(900px 600px at 100% 0%, rgba(255, 61, 127, 0.28), transparent 58%),
    radial-gradient(1000px 800px at 50% 120%, rgba(70, 224, 255, 0.16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
  -webkit-tap-highlight-color: transparent;
}

body::after {
  /* faint stage floor */
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: 38vh;
  background: linear-gradient(to top, rgba(11, 8, 24, 0.92), transparent);
  pointer-events: none;
  z-index: 0;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  touch-action: manipulation;
}

a {
  color: var(--cyan);
}

.app {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: calc(20px + var(--safe-top)) 18px calc(40px + var(--safe-bottom));
  min-height: 100vh;
  min-height: 100dvh;
}

.app.app--wide {
  max-width: 1180px;
}

/* ------------------------------------------------------------------ type */

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

/* ------------------------------------------------------------------ home */

.hero {
  text-align: center;
  padding: 18px 0 26px;
}

.wordmark {
  font-size: clamp(44px, 13vw, 84px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.9;
  display: inline-flex;
  align-items: baseline;
  gap: 0.06em;
  filter: drop-shadow(0 10px 30px rgba(255, 61, 127, 0.35));
}

.wordmark span:first-child {
  background: linear-gradient(180deg, #fff 30%, #ffd9e6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wordmark span:last-child {
  background: linear-gradient(135deg, var(--pink), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 12px auto 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

.name-card {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);
  display: grid;
  gap: 8px;
}

.name-card label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.name-card .row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.name-card input {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(9, 6, 22, 0.6);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.name-card input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(70, 224, 255, 0.22);
}

.name-card.nudge {
  animation: nudge 0.4s ease;
  border-color: var(--amber);
}

@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  45% { transform: translateX(6px); }
  70% { transform: translateX(-3px); }
}

.cat-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .cat-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}

.cat-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 20px 18px 18px;
  min-height: 132px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 26%, transparent), transparent 62%),
    var(--panel-solid);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.cat-card::after {
  content: "";
  position: absolute;
  inset: -40% -30% auto auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}

.cat-card:hover,
.cat-card:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 70%, white 10%);
  box-shadow: 0 24px 50px -22px color-mix(in srgb, var(--accent) 60%, black);
  outline: none;
}

.cat-card:active {
  transform: scale(0.985);
}

.cat-card.wanted {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 194, 71, 0.28), var(--shadow);
}

.cat-emoji {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.cat-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cat-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.cat-play {
  margin-top: 8px;
  justify-self: start;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #150a24;
  background: linear-gradient(120deg, var(--accent), #fff 190%);
  padding: 8px 14px;
  border-radius: 999px;
}

.home-foot {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}

.ghost-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #180824;
  background: linear-gradient(120deg, var(--amber), var(--pink));
  box-shadow: 0 14px 30px -12px rgba(255, 61, 127, 0.75);
  transition: transform 0.14s ease, filter 0.14s ease;
}

.primary-btn:hover { filter: brightness(1.06); }
.primary-btn:active { transform: scale(0.97); }
.primary-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ------------------------------------------------------------------ play */

.play-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-size: 18px;
  font-weight: 700;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
.icon-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.play-cat {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-count {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.play-count b {
  color: var(--amber);
  font-size: 16px;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--pink), var(--amber));
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.question {
  margin: 22px auto 16px;
  text-align: center;
  font-size: clamp(19px, 4.6vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.question-note {
  margin: -8px auto 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  max-width: 40ch;
  line-height: 1.4;
}

.duel {
  display: grid;
  gap: 12px;
  align-items: stretch;
}

@media (min-width: 760px) {
  .duel {
    grid-template-columns: 1fr 64px 1fr;
    gap: 0;
    align-items: center;
  }
}

.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 168px;
  padding: 24px 18px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(165deg, #ffffff 0%, #efeaff 100%);
  color: #140b2b;
  box-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.85);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  overflow: hidden;
  text-align: center;
}

@media (min-width: 760px) {
  .choice { min-height: 320px; padding: 32px 24px; }
}

.choice:hover {
  transform: translateY(-4px);
  border-color: #fff;
  box-shadow: 0 28px 60px -22px rgba(139, 92, 255, 0.75), 0 0 0 2px rgba(70, 224, 255, 0.5);
}

.choice:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.choice:active { transform: scale(0.98); }

.choice-key {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #7a6f9e;
  border: 1px solid rgba(20, 11, 43, 0.14);
  border-radius: 8px;
  padding: 3px 6px;
}

.choice-name {
  font-size: clamp(20px, 5.2vw, 27px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.12;
  max-width: 15ch;
}

.choice-meta {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6d5f96;
}

.logo {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 16px;
  background: rgba(20, 11, 43, 0.06);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  display: block;
}

/* Raster brand plates are composed with their own background (see
   scripts/prepare-logos.py); SVG school marks sit on the white tile and need air. */
.logo img[src$=".svg"],
.champ-logo img[src$=".svg"],
.mini-dot img[src$=".svg"],
.match-row .dot img[src$=".svg"] {
  padding: 7px;
}

.logo .mono {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--violet), var(--pink));
}

.choice .logo {
  width: 78px;
  height: 78px;
  flex-basis: 78px;
  border-radius: 20px;
}

.vs {
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 6px 0;
}

@media (min-width: 760px) {
  .vs {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(11, 8, 24, 0.85);
    color: var(--amber);
    box-shadow: 0 0 30px rgba(255, 194, 71, 0.25);
  }
}

/* pick feedback */
.choice.chosen {
  animation: chosen 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.45), 0 26px 60px -20px rgba(61, 220, 151, 0.7);
}

.choice.chosen::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #06140d;
  font-size: 18px;
  font-weight: 900;
}

@keyframes chosen {
  0% { transform: scale(1); }
  45% { transform: scale(1.045); }
  100% { transform: scale(1); }
}

.choice.faded {
  opacity: 0.42;
  transform: scale(0.97);
  filter: saturate(0.4);
}

.duel.locked { pointer-events: none; }

.bracket-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(18px + var(--safe-bottom));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(23, 15, 51, 0.92);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 0 16px 36px -16px rgba(0, 0, 0, 0.95);
}

.bracket-fab:hover { border-color: var(--cyan); }
.bracket-fab:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.play-hint {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------ sheet */

.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6, 4, 14, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.18s ease;
}

.sheet-wrap[hidden] { display: none !important; }

@media (min-width: 760px) {
  .sheet-wrap { align-items: center; padding: 24px; }
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%;
  max-width: 1180px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #1b1239, #100a24);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
  animation: rise 0.22s cubic-bezier(0.2, 0.9, 0.25, 1);
  padding-bottom: var(--safe-bottom);
}

@media (min-width: 760px) {
  .sheet { border-radius: 24px; max-height: 88dvh; }
}

@keyframes rise { from { transform: translateY(28px); opacity: 0.6; } to { transform: none; opacity: 1; } }

.sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.sheet-head h2 {
  flex: 1;
  font-size: 18px;
  font-weight: 900;
}

.sheet-body {
  overflow: auto;
  padding: 16px 18px 26px;
  -webkit-overflow-scrolling: touch;
}

.rounds {
  display: flex;
  gap: 26px;
  overflow: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.round-col {
  position: relative;
  flex: 0 0 214px;
  width: 214px;
}

.round-col h3 {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #150e2e 70%, transparent);
  padding: 2px 0 6px;
  z-index: 2;
}

.round-canvas {
  position: relative;
}

.match {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
  font-size: 12px;
}

.match.current {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(255, 194, 71, 0.35), 0 0 22px rgba(255, 194, 71, 0.28);
  background: rgba(255, 194, 71, 0.1);
}

.match-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  min-height: 24px;
  color: var(--muted);
}

.match-row + .match-row {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.match-row .dot {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
}

.match-row .dot img { width: 100%; height: 100%; object-fit: contain; padding: 0; }

.match-row .nm {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.match-row.win { color: var(--ink); }
.match-row.win .nm { font-weight: 800; }
.match-row.win::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--green);
}
.match-row.win { position: relative; }
.match-row.lose { opacity: 0.5; }
.match-row.bye .nm { color: var(--muted); }
.match-tag {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  padding: 1px 4px;
}

.bracket-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 14px;
  letter-spacing: 0.04em;
}

.bracket-legend b { color: var(--ink); }

/* ------------------------------------------------------------------ results */

.champ-hero {
  position: relative;
  text-align: center;
  padding: 26px 18px 30px;
  border-radius: 26px;
  border: 1px solid rgba(255, 194, 71, 0.4);
  background:
    radial-gradient(600px 240px at 50% -20%, rgba(255, 194, 71, 0.35), transparent 70%),
    linear-gradient(180deg, rgba(255, 61, 127, 0.16), rgba(139, 92, 255, 0.1));
  overflow: hidden;
}

.champ-hero .crown {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}

.champ-logo {
  width: 106px;
  height: 106px;
  margin: 16px auto 12px;
  border-radius: 26px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 18px 44px -16px rgba(255, 194, 71, 0.85);
}

.champ-logo img { width: 100%; height: 100%; object-fit: contain; padding: 0; }
.champ-logo .mono { font-size: 34px; }

.champ-name {
  font-size: clamp(28px, 7.5vw, 42px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.champ-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

.question {
  text-wrap: balance;
}

.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti i {
  position: absolute;
  top: -14px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.9;
  animation: fall linear forwards;
}

@keyframes fall {
  from { transform: translateY(-10px) rotate(0deg); }
  to { transform: translateY(440px) rotate(520deg); }
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0 16px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.tab {
  flex: 1;
  min-height: 42px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.tab[aria-selected="true"] {
  color: #160a26;
  background: linear-gradient(120deg, var(--amber), #ffd98a);
}

.tab:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.panel {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
  margin-bottom: 16px;
}

.panel h3 {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
}

.stat {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
}

.stat b {
  display: block;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.path {
  display: grid;
  gap: 8px;
}

.path-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.path-item .rd {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.15;
  width: 78px;
  flex: 0 0 78px;
}

.path-item .w {
  font-weight: 800;
}

.path-item .l {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.25);
}

.mini-dot {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.mini-dot img { width: 100%; height: 100%; object-fit: contain; padding: 0; }
.mini-dot .mono { font-size: 9px; }

.comm-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.comm-head .big {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.comm-head .sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.comm-list {
  display: grid;
  gap: 6px;
}

.comm-row {
  display: grid;
  grid-template-columns: 26px 26px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid transparent;
  font-size: 13px;
}

.comm-row .rank {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  text-align: right;
}

.comm-row.mine {
  border-color: var(--amber);
  background: rgba(255, 194, 71, 0.12);
}

.comm-row .nm {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.comm-row .nm small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.comm-row .val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.comm-row .val b {
  display: block;
  font-size: 14px;
  color: var(--ink);
  font-weight: 900;
}

.method {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.method summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.04em;
  padding: 6px 0;
}

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 22px 10px;
  line-height: 1.5;
}

.result-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-top: 8px;
}

@media (min-width: 560px) {
  .result-actions { grid-template-columns: 1fr 1fr; }
}

.result-actions .primary-btn,
.result-actions .ghost-btn {
  width: 100%;
}

.brand-line {
  text-align: center;
  margin-top: 26px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(167, 159, 208, 0.6);
}

/* ------------------------------------------------------------------ toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + var(--safe-bottom));
  transform: translate(-50%, 20px);
  z-index: 90;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #140b2b;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  max-width: min(90vw, 460px);
  text-align: center;
}

.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------------ misc */

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--amber);
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-wrap {
  min-height: 60vh;
  display: grid;
  place-items: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
