:root {
  --bg0: #0b0614;
  --bg1: #1a0a2e;
  --ink: #f4ecff;
  --muted: #b7a4d6;
  --cyan: #5ee7ff;
  --magenta: #ff4fd8;
  --orange: #ff7a18;
  --panel: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.14);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

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

body {
  color: var(--ink);
  font-family: "Rajdhani", system-ui, sans-serif;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(255, 79, 216, 0.22), transparent 55%),
    radial-gradient(700px 400px at 100% 20%, rgba(94, 231, 255, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg1), var(--bg0) 55%, #05030a);
}

a {
  color: inherit;
  text-decoration: none;
}

/* —— Landing —— */
body.landing {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px 16px calc(28px + var(--safe-bottom));
}

.landing-hit {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  justify-items: center;
  animation: fade-rise 700ms ease both;
}

.landing-logo {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(94, 231, 255, 0.25),
    0 24px 60px rgba(0, 0, 0, 0.55);
}

.landing-cta {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(94, 231, 255, 0.55);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* —— Home / app icons —— */
body.home {
  min-height: 100dvh;
  padding: 18px 18px calc(28px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-top {
  margin-bottom: 28px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.home-brand {
  display: block;
  text-decoration: none;
  color: inherit;
}

.home-brand h1 {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 15px;
  line-height: 1.4;
  color: var(--cyan);
  letter-spacing: 0.02em;
  text-align: center;
}

.pick-countdown {
  margin-top: 14px;
  text-align: center;
}

.pick-countdown-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.pick-countdown-clock {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 18px;
  line-height: 1.35;
  color: var(--magenta);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.pick-countdown-clock.locked {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--magenta);
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  justify-items: center;
}

.app-icon {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.app-glyph-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 20px;
  display: block;
  box-shadow:
    0 0 0 1px rgba(94, 231, 255, 0.22),
    0 10px 24px rgba(0, 0, 0, 0.4);
  transition: transform 160ms ease;
}

.app-icon:active .app-glyph-img {
  transform: scale(0.94);
}

.app-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.home-foot {
  margin: 36px auto 0;
  max-width: 420px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* —— Standings —— */
body.standings-page {
  min-height: 100dvh;
  padding-bottom: calc(24px + var(--safe-bottom));
}

.page-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(11, 6, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.page-bar h1 {
  margin: 0;
  text-align: center;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  line-height: 1.4;
  color: var(--cyan);
}

.back,
.bar-btn {
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  color: var(--cyan);
  background: transparent;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
}

.bar-btn {
  text-align: right;
  color: var(--magenta);
}

.status-line {
  margin: 10px 16px 0;
  min-height: 1.2em;
  color: var(--muted);
  font-size: 14px;
}

.status-line:empty {
  display: none;
}

.standings-wrap {
  padding: 10px 12px 0;
  overflow-x: auto;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.standings-table th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}

.standings-table td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.standings-table tbody tr:nth-child(-n + 3) td {
  background: rgba(94, 231, 255, 0.04);
}

.col-rank {
  width: 48px;
  color: var(--cyan);
  font-weight: 700;
}

.col-name {
  font-weight: 700;
}

.col-rec,
.col-pts {
  text-align: right;
  width: 56px;
  font-variant-numeric: tabular-nums;
}

.col-pts {
  color: var(--orange);
  font-weight: 800;
}

/* —— Weekly results —— */
body.weekly-page {
  min-height: 100dvh;
  padding-bottom: calc(20px + var(--safe-bottom));
}

.weekly-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 14px 0;
}

.weekly-toolbar .status-line {
  margin: 0;
  flex: 1 1 auto;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--magenta);
}

.weekly-scroll {
  margin-top: 8px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 12px;
  max-height: calc(100dvh - 140px);
}

.weekly-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  min-width: 100%;
}

.weekly-table th,
.weekly-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  text-align: center;
}

.weekly-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #140a24;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.weekly-table .sticky-col {
  position: sticky;
  left: 0;
  z-index: 3;
  text-align: left;
  min-width: 118px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #12091f;
  font-weight: 700;
  padding-left: 12px;
  box-shadow: 6px 0 10px rgba(0, 0, 0, 0.25);
}

.weekly-table thead .sticky-col {
  z-index: 4;
  background: #140a24;
}

.weekly-table .col-tot {
  font-weight: 800;
  color: var(--orange);
  min-width: 40px;
}

.weekly-table .col-week {
  min-width: 42px;
  font-variant-numeric: tabular-nums;
}

.weekly-table .col-week.best {
  color: var(--cyan);
  font-weight: 800;
  text-shadow: 0 0 10px rgba(94, 231, 255, 0.35);
}

.weekly-table .col-week.live-picks {
  outline: 1px solid rgba(255, 122, 24, 0.45);
  outline-offset: -2px;
  border-radius: 4px;
}

.weekly-table .live {
  color: var(--orange);
}

@media (min-width: 720px) {
  .icon-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* —— Join / Picks —— */
.join-main,
.picks-list {
  padding: 8px 16px 28px;
}

.join-lede {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1.05rem;
}

.join-form {
  display: grid;
  gap: 10px;
  max-width: 420px;
}

.join-form label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.join-form input {
  font: inherit;
  font-size: 1.15rem;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
}

.join-form button,
.primary-wide,
.bar-btn {
  font: inherit;
  font-weight: 800;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--cyan);
  color: #041018;
  cursor: pointer;
}

.picks-list {
  display: grid;
  gap: 12px;
  padding-bottom: 100px;
}

.pick-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  padding: 12px 14px;
}

.pick-card.locked {
  opacity: 0.72;
}

.pick-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.lock-tag {
  color: var(--orange);
  font-weight: 700;
}

.pick-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.team-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.team-btn.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(94, 231, 255, 0.45);
  background: rgba(94, 231, 255, 0.12);
}

.team-btn:disabled {
  cursor: default;
}

.pick-teams .at {
  color: var(--muted);
  font-weight: 700;
}

.tb-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.tb-field input {
  font: inherit;
  font-size: 1.1rem;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  max-width: 140px;
}

.final-line {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--cyan);
}

.picks-foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, rgba(11, 6, 20, 0.92) 30%, #0b0614);
}

.primary-wide {
  width: 100%;
  max-width: 480px;
  display: block;
  margin: 0 auto;
  padding: 16px;
  font-size: 1.05rem;
}

.app-glyph-fallback {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-family: "Press Start 2P", monospace;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #041018;
  background:
    linear-gradient(145deg, #5ee7ff, #ff4fd8 70%);
  box-shadow:
    0 0 0 1px rgba(94, 231, 255, 0.35),
    0 10px 24px rgba(0, 0, 0, 0.4);
}

.app-glyph-bank {
  background: linear-gradient(145deg, #7dffb3, #ffd38a 75%);
  color: #062416;
}

/* —— Lab preview —— */
.lab-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin: -18px -18px 18px;
  background: linear-gradient(90deg, rgba(255, 122, 24, 0.28), rgba(255, 79, 216, 0.18));
  border-bottom: 1px solid rgba(255, 122, 24, 0.45);
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffd7a8;
}

body.lab-preview:not(.home) .lab-banner {
  margin: 0 0 0;
}

.lab-banner a {
  color: var(--cyan);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.lab-join-hint {
  margin: 18px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.lab-join-hint a {
  color: var(--cyan);
  font-weight: 700;
}

.lab-sheet-wrap {
  padding: 8px 12px 28px;
}

.lab-sheet-img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: 8px;
}

.hidden {
  display: none !important;
}

@media (min-width: 720px) {
  body.home.lab-preview {
    display: grid;
    justify-items: center;
    padding-top: 28px;
  }

  .lab-phone {
    width: min(390px, 100%);
    min-height: 720px;
    padding: 18px 16px 28px;
    border-radius: 36px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.28);
    box-shadow:
      0 0 0 10px rgba(255, 255, 255, 0.04),
      0 30px 80px rgba(0, 0, 0, 0.55);
  }

  body.home.lab-preview .lab-banner {
    width: min(390px, 100%);
    margin: 0 0 14px;
    border-radius: 12px;
  }
}

/* —— Bank —— */
body.bank-page {
  min-height: 100dvh;
  padding-bottom: calc(28px + var(--safe-bottom));
}

.bank-lede {
  margin: 0 16px 14px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
}

.bank-list {
  display: grid;
  gap: 12px;
  padding: 0 16px 24px;
  max-width: 560px;
}

.bank-row {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  animation: bank-rise 420ms ease both;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.bank-row:nth-child(1) {
  animation-delay: 40ms;
}
.bank-row:nth-child(2) {
  animation-delay: 80ms;
}
.bank-row:nth-child(3) {
  animation-delay: 120ms;
}

@keyframes bank-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.bank-row-top {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
}

.bank-rank {
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bank-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-cash {
  font-weight: 800;
  font-size: 1.2rem;
  color: #7dffb3;
  font-variant-numeric: tabular-nums;
}

.bank-bar-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bank-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7dffb3, #ffd38a);
  box-shadow: 0 0 12px rgba(125, 255, 179, 0.35);
  min-width: 0;
  transition: width 600ms ease;
}

.bank-wins {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

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

.bank-row.open {
  border-color: rgba(125, 255, 179, 0.45);
  background: rgba(125, 255, 179, 0.06);
}

.bank-weeks {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.bank-weeks p {
  margin: 0;
  color: var(--cyan);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

/* —— Career earnings —— */
body.career-page {
  min-height: 100dvh;
  padding-bottom: calc(28px + var(--safe-bottom));
}

.career-lede {
  margin: 0 16px 8px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
  white-space: pre-line;
}

.career-note {
  margin: 0 16px 14px;
  color: rgba(255, 211, 138, 0.85);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.career-list {
  display: grid;
  gap: 12px;
  padding: 0 16px 24px;
  max-width: 560px;
}

.career-bar-fill {
  background: linear-gradient(90deg, #ffd38a, #7dffb3);
  box-shadow: 0 0 12px rgba(255, 211, 138, 0.35);
}

.career-detail p + p {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.career-page .bank-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.career-trophy-pip {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex-shrink: 0;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.career-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 28px;
  padding: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.career-legend .career-trophy-pip {
  width: 18px;
  height: 18px;
}

/* —— Missing picks —— */
body.missing-page {
  min-height: 100dvh;
  padding-bottom: calc(28px + var(--safe-bottom));
}

.missing-lede {
  margin: 0 16px 14px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
}

.missing-list {
  list-style: none;
  margin: 0;
  padding: 0 16px 24px;
  max-width: 560px;
  display: grid;
  gap: 10px;
}

.missing-row {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 79, 216, 0.35);
  background: rgba(255, 79, 216, 0.08);
  animation: bank-rise 420ms ease both;
}

.missing-row:nth-child(1) { animation-delay: 40ms; }
.missing-row:nth-child(2) { animation-delay: 80ms; }
.missing-row:nth-child(3) { animation-delay: 120ms; }
.missing-row:nth-child(4) { animation-delay: 160ms; }
.missing-row:nth-child(5) { animation-delay: 200ms; }

.missing-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text, #f3f7f4);
}

.missing-empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

/* —— Trophies / Hall of Champions —— */
body.trophies-page {
  min-height: 100dvh;
  padding-bottom: calc(28px + var(--safe-bottom));
}

.bar-spacer {
  width: 64px;
  flex-shrink: 0;
}

.trophies-hero {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 12px 16px 2px;
  animation: fade-rise 650ms ease both;
}

.trophies-hero-img {
  width: 120px;
  height: 120px;
  display: block;
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(94, 231, 255, 0.28),
    0 0 28px rgba(255, 79, 216, 0.25),
    0 18px 40px rgba(0, 0, 0, 0.45);
}

.trophies-lede {
  margin: 4px 16px 14px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
}

.trophies-list {
  margin: 0;
  padding: 0 16px 24px;
  max-width: 560px;
  margin-inline: auto;
  display: grid;
  gap: 12px;
}

/* Match .bank-row / .missing-row panel treatment on phone + desktop */
.trophies-row {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 211, 138, 0.42);
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(255, 211, 138, 0.1);
  animation: bank-rise 420ms ease both;
}

.trophies-row:nth-child(1) { animation-delay: 40ms; }
.trophies-row:nth-child(2) { animation-delay: 80ms; }
.trophies-row:nth-child(3) { animation-delay: 120ms; }
.trophies-row:nth-child(4) { animation-delay: 160ms; }
.trophies-row:nth-child(5) { animation-delay: 200ms; }

.trophies-row-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}

.trophies-rank {
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.trophies-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 6rem;
}

.trophies-count {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex: 0 1 auto;
  max-width: 100%;
}

.trophy-pip {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 0;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}

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

.trophies-seasons {
  margin: 8px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.02em;
}

.trophies-empty {
  margin: 8px 0 0;
  padding: 20px 16px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.trophies-empty code {
  font-size: 0.9em;
  color: var(--cyan);
}

/* —— Trophy Run —— */
body.trophy-run-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.tr-shell {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 12px 14px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.tr-hud {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.tr-hud-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tr-hud-best {
  text-align: right;
}

.tr-hud-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.tr-hud-value {
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
  color: var(--cyan);
  line-height: 1.3;
}

.tr-hud-best .tr-hud-value {
  color: #ffd36a;
}

.tr-stage-wrap {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(94, 231, 255, 0.35);
  box-shadow:
    0 0 0 1px rgba(255, 79, 216, 0.18),
    0 18px 40px rgba(0, 0, 0, 0.45);
  background: #05030a;
  aspect-ratio: 390 / 520;
}

.tr-stage-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  cursor: pointer;
}

.tr-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 20px;
  text-align: center;
  background: rgba(5, 3, 10, 0.62);
  backdrop-filter: blur(3px);
}

.tr-overlay.is-hidden {
  display: none;
}

.tr-title {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 16px;
  line-height: 1.45;
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(94, 231, 255, 0.35);
}

.tr-hint {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  max-width: 16rem;
}

.tr-btn {
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #0b0614;
  background: linear-gradient(135deg, var(--cyan), #ffd36a);
  border: 0;
  border-radius: 10px;
  padding: 14px 22px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(94, 231, 255, 0.35);
}

.tr-btn:active {
  transform: scale(0.97);
}

.tr-foot {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}
