/* ============================================================
   SCROLL MILL
   Interface chrome, Roblox-arcade energy, acid-lime accents.
   ============================================================ */

@font-face {
  font-family: "Barlow Condensed";
  src: url("./assets/fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("./assets/fonts/barlow-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("./assets/fonts/space-grotesk-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("./assets/fonts/space-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("./assets/fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #06060a;
  --ink-2: #0b0b12;
  --ink-3: #11111b;
  --cream: #f5f2e8;
  --lime: #c8ff2e;
  --pink: #ff2e88;
  --cyan: #2ee6ff;
  --orange: #ff8a2b;
  --violet: #9b7bff;
  --muted: rgba(245, 242, 232, 0.56);
  --dim: rgba(245, 242, 232, 0.32);
  --line: rgba(245, 242, 232, 0.14);
  --glass: rgba(10, 10, 17, 0.74);
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --pad: clamp(16px, 2.4vw, 34px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow: hidden;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  color: inherit;
}

#stage {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}

.is-hidden {
  display: none !important;
}

/* ============================================================
   FX overlays
   ============================================================ */

.fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.fx-grain {
  z-index: 5;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.fx-scan {
  z-index: 5;
  opacity: 0.2;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.42) 0px,
    rgba(0, 0, 0, 0.42) 1px,
    transparent 1px,
    transparent 4px
  );
}

.fx-doom {
  z-index: 3;
  opacity: 0;
  transition: opacity 0.35s ease;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(255, 16, 60, 0.34) 100%),
    linear-gradient(0deg, rgba(255, 16, 60, 0.12), transparent 30%);
  mix-blend-mode: screen;
}

.fx-grass {
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(48, 190, 80, 0.28) 100%),
    linear-gradient(180deg, rgba(50, 160, 70, 0.16), transparent 40%);
  mix-blend-mode: soft-light;
}

.fx-flash {
  z-index: 26;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.fx-flash.is-on {
  opacity: 1;
}
.fx-flash.flash--lime {
  background: radial-gradient(ellipse at center, rgba(200, 255, 46, 0.2), transparent 65%);
}
.fx-flash.flash--red {
  background: radial-gradient(ellipse at center, rgba(255, 46, 96, 0.26), transparent 65%);
}

/* ============================================================
   Buttons, type helpers
   ============================================================ */

.eyebrow {
  margin: 0 0 18px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--lime);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  cursor: pointer;
  padding: 18px 28px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn--primary {
  background: var(--lime);
  color: #0a0b05;
}
.btn--primary:hover {
  background: #ddff6c;
  transform: translateY(-2px);
}
.btn--ghost {
  background: rgba(245, 242, 232, 0.05);
  border: 1px solid var(--line);
  color: var(--cream);
}
.btn--ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.linkish {
  border: 0;
  background: none;
  padding: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.linkish:hover {
  color: var(--cream);
  border-color: var(--line);
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(245, 242, 232, 0.26);
  border-bottom-color: rgba(245, 242, 232, 0.42);
  border-radius: 4px;
  background: rgba(245, 242, 232, 0.07);
  color: var(--cream);
  font-family: var(--body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ============================================================
   HUD
   ============================================================ */

.hud {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  padding: var(--pad);
  transition: opacity 0.4s ease, filter 0.4s ease;
}
.hud.is-dimmed {
  opacity: 0.34;
  filter: blur(1.5px);
}

.hud__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.hud__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
  white-space: nowrap;
}
.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(200, 255, 46, 0.9);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
.brand-name {
  font-family: var(--display);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
}
.brand-name em {
  color: var(--lime);
  font-style: normal;
}
.brand-run {
  margin-left: 4px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 46, 136, 0.5);
  color: var(--pink);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: skewX(-8deg);
}

.goal {
  width: clamp(240px, 36vw, 520px);
  margin-top: 4px;
}

@media (min-width: 901px) {
  .goal {
    position: fixed;
    top: calc(var(--pad) - 2px);
    left: 50%;
    transform: translateX(-50%);
    width: min(480px, 36vw);
    margin: 0;
    padding: 0;
  }
  .goal__meta {
    margin-bottom: 6px;
  }
}
.goal__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}
.goal__meta b {
  color: var(--cream);
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.03em;
}
.goal__track {
  position: relative;
  height: 7px;
  background: rgba(245, 242, 232, 0.11);
  overflow: hidden;
  border: 1px solid rgba(245, 242, 232, 0.09);
}
.goal__track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(10% - 1px),
    rgba(6, 6, 10, 0.8) calc(10% - 1px),
    rgba(6, 6, 10, 0.8) 10%
  );
  pointer-events: none;
}
.goal__track i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--lime) 65%, var(--orange));
  box-shadow: 0 0 16px rgba(200, 255, 46, 0.55);
  transition: width 0.12s linear;
}
.goal__track i.is-near {
  animation: goal-throb 0.7s ease-in-out infinite alternate;
}

.hud__stats {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  pointer-events: auto;
}
.chip {
  min-width: 78px;
  padding: 9px 12px 8px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.chip span {
  display: block;
  margin-bottom: 3px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.chip b {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.chip.is-warning b {
  color: var(--pink);
  animation: pulse-soft 0.8s ease-in-out infinite alternate;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--cream);
  cursor: pointer;
  padding: 0;
  backdrop-filter: blur(10px);
  transition: border-color 0.16s ease, color 0.16s ease;
}
.icon-btn:hover {
  border-color: var(--lime);
  color: var(--lime);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.icon-btn.is-muted {
  color: var(--pink);
  border-color: rgba(255, 46, 136, 0.4);
}

.hud__side {
  position: absolute;
  top: clamp(110px, 15vh, 170px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: clamp(180px, 17vw, 238px);
}
.hud__side--left {
  left: var(--pad);
  align-items: flex-start;
}
.hud__side--right {
  right: var(--pad);
  align-items: flex-end;
  width: clamp(190px, 18vw, 250px);
}

.meters {
  width: 100%;
  padding: 14px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}
.meter {
  margin-bottom: 12px;
}
.meter__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.meter__head b {
  font-family: var(--display);
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--cream);
}
.meter__bar {
  height: 8px;
  background: rgba(245, 242, 232, 0.1);
  overflow: hidden;
}
.meter__bar i {
  display: block;
  height: 100%;
  width: 0%;
  transition: width 0.16s linear;
}
.meter--hype .meter__bar i {
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  box-shadow: 0 0 12px rgba(200, 255, 46, 0.38);
}
.meter--doom .meter__head b {
  color: var(--orange);
}
.meter--doom .meter__bar i {
  background: linear-gradient(90deg, var(--orange), var(--pink));
  box-shadow: 0 0 12px rgba(255, 46, 136, 0.4);
}
.combo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.combo b {
  font-family: var(--display);
  font-size: 23px;
  letter-spacing: 0.02em;
  color: var(--cream);
}
.combo b.is-hot {
  color: var(--lime);
  text-shadow: 0 0 18px rgba(200, 255, 46, 0.55);
}

.coach {
  max-width: 250px;
  padding: 9px 11px;
  background: rgba(200, 255, 46, 0.92);
  color: #0a0b05;
  font-size: 9.5px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.coach.is-on {
  opacity: 1;
  transform: translateY(0);
}
.coach.is-pop {
  animation: coach-pop 0.28s ease;
}

.speedo {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: end;
  column-gap: 6px;
  padding: 10px 14px 12px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  min-width: 150px;
}
.speedo span {
  grid-column: 1 / 3;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.speedo b {
  font-family: var(--display);
  font-size: clamp(46px, 5vw, 66px);
  line-height: 0.86;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--lime);
  text-shadow: 0 0 24px rgba(200, 255, 46, 0.3);
}
.speedo em {
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.15em;
  color: var(--muted);
  padding-bottom: 6px;
}

.leaderboard {
  width: 100%;
  padding: 11px 12px 12px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.leaderboard__head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.leaderboard__head b {
  color: var(--cream);
}
.leaderboard__rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 86px;
}
.lb-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  grid-template-rows: auto 3px;
  align-items: center;
  column-gap: 6px;
  row-gap: 3px;
  padding: 3px 0;
  font-size: 9px;
  color: var(--muted);
  transition: color 0.2s ease;
}
.lb-rank {
  font-family: var(--display);
  font-size: 12px;
  color: var(--dim);
}
.lb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.lb-dist {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.lb-bar {
  grid-column: 2 / 4;
  height: 3px;
  background: rgba(245, 242, 232, 0.09);
  overflow: hidden;
}
.lb-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: rgba(245, 242, 232, 0.26);
  transition: width 0.4s linear;
}
.lb-row--you {
  color: var(--cream);
}
.lb-row--you .lb-name {
  color: var(--lime);
  font-weight: 700;
}
.lb-row--you .lb-bar i {
  background: var(--lime);
  box-shadow: 0 0 8px rgba(200, 255, 46, 0.5);
}
.lb-row.is-done .lb-name::after {
  content: " ✓";
  color: var(--lime);
}

.score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  background: rgba(6, 6, 10, 0.55);
  border-left: 2px solid var(--pink);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.score b {
  font-family: var(--display);
  font-size: 27px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--cream);
}

.hud__bottom {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: max(var(--pad), env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.key-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 10px 12px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.key-hints span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.key-hints kbd {
  height: 21px;
  min-width: 22px;
  font-size: 9px;
}

.touch {
  display: none;
  gap: 8px;
  width: 100%;
  pointer-events: auto;
}
.touch__btn {
  flex: 1;
  min-height: 64px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 17, 0.82);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  touch-action: manipulation;
  transition: transform 0.1s ease, background 0.1s ease;
}
.touch__btn span {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.touch__btn em {
  font-size: 7px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--muted);
}
.touch__btn:active,
.touch__btn.is-active {
  transform: translateY(2px);
  background: rgba(200, 255, 46, 0.16);
}
.touch__btn--scroll {
  border-color: rgba(200, 255, 46, 0.35);
}
.touch__btn--scroll span {
  color: var(--lime);
}
.touch__btn--like {
  border-color: rgba(255, 46, 136, 0.32);
}
.touch__btn--like span {
  color: var(--pink);
}
.touch__btn--grass span {
  color: var(--cyan);
}
.touch__btn--grass.is-active {
  background: rgba(46, 230, 255, 0.16);
}

.mobile-card {
  display: none;
  width: 100%;
  padding: 9px 11px;
  background: rgba(6, 6, 10, 0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.mobile-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.mc-badge {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 3px 6px;
  background: rgba(245, 242, 232, 0.12);
  color: var(--cream);
}
.mc-badge--banger {
  background: var(--orange);
  color: #140a03;
}
.mc-badge--bait {
  background: var(--pink);
  color: #18020a;
}
.mc-badge--neutral {
  background: rgba(110, 231, 200, 0.9);
  color: #04130f;
}
.mc-likes {
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.mc-title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.01em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.mc-meta {
  margin-top: 2px;
  font-size: 8px;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-card.is-new {
  animation: card-in 0.3s ease;
}

.toasts {
  position: absolute;
  right: var(--pad);
  bottom: clamp(80px, 15vh, 140px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}
.toast {
  min-width: 190px;
  max-width: 290px;
  padding: 9px 12px;
  background: rgba(8, 8, 14, 0.92);
  border-left: 3px solid var(--cream);
  backdrop-filter: blur(10px);
  animation: toast-in 0.25s ease both;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.toast span {
  display: block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.toast b {
  display: block;
  margin-top: 2px;
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast--good {
  border-color: var(--lime);
}
.toast--good b {
  color: var(--lime);
}
.toast--bad {
  border-color: var(--pink);
}
.toast--bad b {
  color: var(--pink);
}
.toast--combo {
  border-color: var(--cyan);
}
.toast--combo b {
  color: var(--cyan);
}
.toast--rival {
  border-color: var(--violet);
}
.toast--rival b {
  color: var(--violet);
}

/* ============================================================
   Screens
   ============================================================ */

.screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  overflow: auto;
  overscroll-behavior: contain;
}

.screen--menu {
  flex-direction: column;
  background:
    linear-gradient(100deg, rgba(5, 5, 9, 0.99) 0%, rgba(5, 5, 9, 0.965) 40%, rgba(5, 5, 9, 0.82) 65%, rgba(5, 5, 9, 0.46) 100%),
    radial-gradient(ellipse at 76% 42%, rgba(155, 123, 255, 0.16), transparent 55%),
    radial-gradient(ellipse at 20% 10%, rgba(200, 255, 46, 0.08), transparent 40%);
  backdrop-filter: blur(5px);
}
.screen--menu::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(245, 242, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 242, 232, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 30% 40%, black, transparent 72%);
}
.menu__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(28px, 5vh, 64px) var(--pad) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
  flex: 1;
}
.menu__copy {
  padding-bottom: 24px;
}
.logo {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(92px, 14.5vw, 196px);
  line-height: 0.74;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--cream);
  text-shadow: 0 8px 60px rgba(0, 0, 0, 0.55);
}
.logo span {
  color: var(--lime);
  text-shadow: 0 0 42px rgba(200, 255, 46, 0.34);
}
.tagline {
  margin: 24px 0 0;
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0.005em;
  color: var(--cream);
  text-transform: uppercase;
}
.tagline em {
  font-style: normal;
  color: var(--pink);
  text-shadow: 0 0 24px rgba(255, 46, 136, 0.4);
}
.lede {
  max-width: 580px;
  margin: 22px 0 0;
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.65;
  color: var(--muted);
}
.menu__cta {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.menu__cta .btn {
  font-size: clamp(22px, 2vw, 28px);
  padding: 21px 34px;
}
.menu__meta {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}
.menu__meta i {
  color: var(--dim);
  padding: 0 3px;
}
.controls-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 610px;
  margin-top: 30px;
  background: var(--line);
  border: 1px solid var(--line);
}
.controls-grid > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 11px 12px;
  background: rgba(7, 7, 12, 0.9);
}
.controls-grid span {
  margin-left: 2px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.controls-grid em {
  flex-basis: 100%;
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.menu__note {
  max-width: 590px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.6;
  color: var(--dim);
}
.menu__note span {
  color: var(--lime);
  font-weight: 700;
  letter-spacing: 0.08em;
}
a {
  color: var(--cream);
  text-decoration-color: rgba(200, 255, 46, 0.45);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--lime);
}

.pitch-card {
  position: relative;
  background: rgba(9, 9, 15, 0.92);
  border: 1px solid rgba(245, 242, 232, 0.16);
  backdrop-filter: blur(18px);
  padding: clamp(20px, 2.2vw, 30px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.44);
}
.pitch-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 64px;
  height: 3px;
  background: var(--lime);
}
.pitch-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.pitch-card__head span {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.pitch-card__head b {
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 700;
}
.rules {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rules li {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 11px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.rules__num {
  grid-row: 1 / 3;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  color: var(--lime);
  line-height: 1;
}
.rules h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.rules p {
  margin: 5px 0 0;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--muted);
}
.pitch-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--dim);
}
.pitch-card__foot b {
  color: var(--lime);
  letter-spacing: 0.08em;
}
.menu__footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px var(--pad) 20px;
  font-size: 9px;
  line-height: 1.6;
  color: var(--dim);
  border-top: 1px solid rgba(245, 242, 232, 0.06);
}

/* ---------- end screen ---------- */

.screen--end {
  align-items: center;
  justify-content: center;
  padding: var(--pad);
  background: rgba(4, 4, 8, 0.66);
  backdrop-filter: blur(12px);
}
.end__card {
  position: relative;
  width: min(720px, 100%);
  max-height: 94vh;
  overflow: auto;
  padding: clamp(24px, 3.4vw, 44px);
  background: linear-gradient(150deg, rgba(14, 14, 22, 0.97), rgba(7, 7, 12, 0.97));
  border: 1px solid var(--line);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
  animation: end-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.end__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 38%;
  height: 3px;
  background: var(--pink);
}
.end__card .eyebrow {
  margin-bottom: 10px;
  color: var(--pink);
}
.end__title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(58px, 8vw, 104px);
  line-height: 0.82;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--pink);
  text-transform: uppercase;
}
.end__title.is-win {
  color: var(--lime);
  text-shadow: 0 0 50px rgba(200, 255, 46, 0.18);
}
.end__reason {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 470px;
}
.end__score {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 22px 0 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.end__score span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.end__score b {
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 82px);
  line-height: 0.8;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.end__score em {
  margin-left: auto;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--lime);
  text-align: right;
  max-width: 260px;
}
.end__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.end__stats > div {
  padding: 11px 12px;
  background: rgba(245, 242, 232, 0.035);
}
.end__stats span {
  display: block;
  margin-bottom: 4px;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.end__stats b {
  font-family: var(--display);
  font-size: 23px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.end__quote {
  margin: 22px 0 0;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--pink);
}
.end__quote span {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--pink);
}
.end__quote p {
  margin: 5px 0 0;
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.1;
  font-weight: 700;
  color: var(--cream);
}
.end__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.end__actions .btn {
  flex: 1;
  min-width: 170px;
}
.end__card .linkish {
  display: block;
}

/* ---------- pause ---------- */

.screen--pause {
  align-items: center;
  justify-content: center;
  background: rgba(4, 4, 8, 0.7);
  backdrop-filter: blur(10px);
}
.pause__card {
  width: min(430px, calc(100vw - 32px));
  padding: 32px;
  background: rgba(10, 10, 17, 0.97);
  border: 1px solid var(--line);
  text-align: left;
  animation: end-in 0.3s ease both;
}
.pause__card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 68px;
  line-height: 0.85;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--lime);
}
.pause__card p {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.pause__actions {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}
.pause__actions .btn {
  flex: 1;
  font-size: 18px;
  padding: 15px 18px;
}

/* ---------- loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--ink);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader__logo {
  font-family: var(--display);
  font-size: clamp(64px, 11vw, 120px);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.02em;
}
.loader__logo span {
  color: var(--lime);
}
.loader__bar {
  width: min(260px, 60vw);
  height: 4px;
  background: rgba(245, 242, 232, 0.12);
  overflow: hidden;
}
.loader__bar i {
  display: block;
  width: 45%;
  height: 100%;
  background: var(--lime);
  animation: loader-run 1.1s ease-in-out infinite;
}
.loader p {
  margin: 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}
.loader__error {
  color: var(--pink) !important;
}

/* ============================================================
   Animations
   ============================================================ */

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes pulse-soft {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}
@keyframes goal-throb {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.55);
  }
}
@keyframes coach-pop {
  0% {
    transform: translateY(3px) scale(0.98);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes card-in {
  from {
    opacity: 0.4;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes loader-run {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(330%);
  }
}
@keyframes end-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1180px) {
  .menu__inner {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
    gap: 28px;
  }
  .controls-grid {
    max-width: 100%;
  }
  .pitch-card__head b {
    display: none;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }
  .screen--menu {
    overflow-y: auto;
  }
  .menu__inner {
    grid-template-columns: 1fr;
    padding-top: 34px;
    gap: 22px;
    align-items: start;
  }
  .menu__copy {
    padding-bottom: 0;
  }
  .lede {
    max-width: 520px;
  }
  .pitch-card {
    max-width: 520px;
  }
  .menu__footer {
    position: static;
    padding-bottom: 26px;
  }
  .logo {
    font-size: clamp(84px, 20vw, 130px);
  }
  .tagline {
    font-size: 28px;
  }
  .controls-grid {
    grid-template-columns: 1fr;
    gap: 1px;
  }
  .controls-grid > div {
    padding: 9px 12px;
  }
  .controls-grid em {
    flex-basis: auto;
    margin-left: auto;
  }
  .hud__side {
    top: 128px;
  }
  .leaderboard,
  .score {
    display: none;
  }
  .hud__side--right {
    width: auto;
  }
  .speedo {
    min-width: 112px;
    padding: 8px 10px;
  }
  .speedo b {
    font-size: 46px;
  }
  .key-hints {
    display: none;
  }
  .hud__bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .touch {
    display: flex;
  }
  .mobile-card {
    display: block;
  }
  .toasts {
    right: 12px;
    left: 12px;
    bottom: auto;
    top: 28%;
    align-items: flex-end;
  }
  .hud__top {
    flex-wrap: wrap;
    row-gap: 10px;
  }
  .goal {
    position: static;
    order: 3;
    width: 100%;
    margin-top: 0;
    transform: none;
    padding: 0;
    background: none;
    border: 0;
    backdrop-filter: none;
  }
  .hud__brand {
    order: 1;
  }
  .hud__stats {
    order: 2;
    margin-left: auto;
  }
  .brand-run {
    display: none;
  }
  .hud__stats .chip {
    min-width: 60px;
    padding: 7px 8px;
  }
  .chip b {
    font-size: 20px;
  }
  .icon-btn {
    width: 38px;
    height: 38px;
  }
  .end__stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .end__score em {
    flex-basis: 100%;
    margin-left: 0;
    text-align: left;
  }
  .end__card {
    padding: 22px;
  }
}

@media (max-width: 560px) {
  :root {
    --pad: 12px;
  }
  .logo {
    font-size: clamp(52px, 16.6vw, 84px);
  }
  .tagline {
    font-size: 24px;
    margin-top: 18px;
  }
  .lede {
    font-size: 12px;
    line-height: 1.55;
    margin-top: 16px;
  }
  .menu__cta {
    gap: 12px;
    margin-top: 22px;
  }
  .menu__cta .btn {
    width: 100%;
    font-size: 24px;
    padding: 17px 22px;
  }
  .menu__meta {
    width: 100%;
  }
  .controls-grid {
    display: none;
  }
  .menu__note {
    display: none;
  }
  .pitch-card {
    padding: 18px;
  }
  .rules h2 {
    font-size: 18px;
  }
  .rules p {
    font-size: 10px;
  }
  .rules li {
    padding: 12px 0;
  }
  .menu__footer {
    font-size: 8px;
    gap: 8px;
  }
  .menu__footer span:last-child {
    display: none;
  }
  .hud__side {
    top: 118px;
  }
  .meters {
    width: 148px;
    padding: 10px;
  }
  .meter {
    margin-bottom: 9px;
  }
  .meter__head b {
    font-size: 17px;
  }
  .combo {
    padding-top: 7px;
  }
  .combo b {
    font-size: 19px;
  }
  .coach {
    max-width: 160px;
    font-size: 8px;
    padding: 7px 8px;
  }
  .speedo {
    min-width: 96px;
  }
  .speedo b {
    font-size: 39px;
  }
  .speedo span {
    font-size: 7px;
  }
  .hud__brand {
    gap: 6px;
  }
  .brand-name {
    font-size: 19px;
  }
  .hud__stats {
    gap: 5px;
  }
  .hud__stats .chip {
    min-width: 46px;
    padding: 6px 7px;
  }
  .hud__stats .chip span {
    font-size: 7px;
    letter-spacing: 0.12em;
  }
  .hud__stats .chip b {
    font-size: 18px;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
  }
  .icon-btn svg {
    width: 15px;
    height: 15px;
  }
  .mobile-card {
    padding: 7px 10px;
  }
  .mc-title {
    font-size: 18px;
  }
  .touch__btn {
    min-height: 58px;
  }
  .touch__btn span {
    font-size: 20px;
  }
  .end__title {
    font-size: 52px;
  }
  .end__reason {
    font-size: 11px;
  }
  .end__score b {
    font-size: 54px;
  }
  .end__actions {
    flex-direction: column;
  }
  .end__actions .btn {
    min-width: 0;
  }
  .pause__card {
    padding: 22px;
  }
  .pause__card h2 {
    font-size: 54px;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .mobile-card {
    display: none;
  }
  .hud__side {
    top: 92px;
  }
  .meters {
    padding: 9px;
  }
  .coach {
    display: none;
  }
  .menu__inner {
    padding-top: 20px;
  }
  .logo {
    font-size: clamp(70px, 10vw, 100px);
  }
  .lede,
  .menu__note,
  .controls-grid {
    display: none;
  }
}

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