/* ============================================================================
   Splash Rush — Web Lens interface
   Fonts are self-hosted because a Lens CSP blocks every external origin.
   ========================================================================== */
@font-face {
  font-family: 'Bungee';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/bungee-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./fonts/jetbrainsmono-latin.woff2') format('woff2');
}

:root {
  --abyss: #03060d;
  --deep: #081422;
  --ink: #0b1a2b;
  --foam: #eaf6ff;
  --muted: #8aa3be;
  --accent: #22d3ee;
  --accent-2: #34f5c5;
  --gold: #ffc53d;
  --danger: #ff3b5c;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --blur: blur(14px) saturate(1.15);

  --safe-t: max(env(safe-area-inset-top, 0px), 8px);
  --safe-b: max(env(safe-area-inset-bottom, 0px), 8px);
  --safe-l: max(env(safe-area-inset-left, 0px), 0px);
  --safe-r: max(env(safe-area-inset-right, 0px), 0px);
  --chrome: 46px; /* Snapchat draws a close control across the top: stay clear of it */
  --pad: clamp(16px, 5.2vw, 26px);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  overflow: hidden;
  background: var(--abyss);
}

body {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--foam);
  font-size: 14px;
  line-height: 1.45;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  isolation: isolate;
}

#stage {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  will-change: opacity;
  z-index: 6;
}

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background:
    radial-gradient(120% 78% at 50% 50%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.44) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 68%, rgba(0, 0, 0, 0.44) 100%);
}

.ic {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.ic-xs {
  width: 14px;
  height: 14px;
}

/* ============================== top HUD ============================== */
.hud {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 7;
  display: flex;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.34s var(--ease), transform 0.34s var(--ease);
}
.hud.is-open {
  opacity: 1;
  transform: none;
}
.hud-top {
  top: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: calc(var(--safe-t) + var(--chrome)) calc(var(--safe-r) + var(--pad)) 8px calc(var(--safe-l) + var(--pad));
}
.hud-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.stat-label {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-value {
  font-family: 'Bungee', 'Arial Black', system-ui, sans-serif;
  font-size: clamp(30px, 10.5vw, 46px);
  line-height: 1.06;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.45), 0 2px 0 rgba(0, 0, 0, 0.5);
}

.combo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  opacity: 0;
  transform: scale(0.9) translateY(-4px);
  transition: opacity 0.2s var(--ease), transform 0.26s var(--ease);
  width: max-content;
}
.combo[data-on='1'] {
  opacity: 1;
  transform: none;
}
.combo-mult {
  font-family: 'Bungee', system-ui, sans-serif;
  font-size: 17px;
  color: var(--accent-2);
  text-shadow: 0 0 12px rgba(52, 245, 197, 0.6);
}
.combo-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.combo-chain {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.combo-bar {
  display: block;
  width: 62px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.combo-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left center;
  transform: scaleX(0);
}

.lives {
  display: flex;
  gap: 5px;
}
.ic-life {
  width: 22px;
  height: 22px;
  fill: var(--danger);
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 8px rgba(255, 59, 92, 0.55));
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease), filter 0.24s var(--ease);
}
.ic-life.is-off {
  opacity: 0.24;
  fill: none;
  transform: scale(0.86);
  filter: none;
}

.icon-btn {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--foam);
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.icon-btn:hover {
  background: var(--glass-2);
  border-color: var(--line-2);
  transform: translateY(-2px);
}
.icon-btn:active {
  transform: scale(0.94);
}

/* ============================== bottom HUD ============================== */
.hud-bottom {
  bottom: 0;
  padding: 8px calc(var(--safe-r) + var(--pad)) calc(var(--safe-b) + 14px) calc(var(--safe-l) + var(--pad));
  transform: translateY(6px);
}
.meter {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.meter-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.meter-label .ic {
  color: var(--accent-2);
}
.meter-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.meter-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  overflow: hidden;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.meter-fill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2) 70%, #fff);
  transform-origin: left center;
  transform: scaleX(0);
  box-shadow: 0 0 14px rgba(52, 245, 197, 0.5);
}
.meter[data-full='1'] .meter-fill {
  animation: meterPulse 0.7s var(--ease) infinite;
}
.meter[data-full='1'] .meter-track {
  border-color: rgba(52, 245, 197, 0.6);
  box-shadow: 0 0 20px rgba(52, 245, 197, 0.35);
}

.banner {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--safe-t) + var(--chrome) + 92px);
  z-index: 8;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px) scale(0.95);
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
}
.banner.is-on {
  opacity: 1;
  transform: none;
}
.banner-text {
  font-family: 'Bungee', system-ui, sans-serif;
  font-size: clamp(15px, 4.6vw, 20px);
  letter-spacing: 0.06em;
  color: var(--accent-2);
  text-shadow: 0 0 22px rgba(52, 245, 197, 0.75), 0 2px 0 rgba(0, 0, 0, 0.6);
}
.banner-timer {
  font-size: 13px;
  font-weight: 700;
  color: var(--foam);
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

/* ============================== screens ============================== */
.screen {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none; /* empty space passes through, so the attract mode stays sliceable */
  padding: calc(var(--safe-t) + var(--chrome) + 6px) calc(var(--safe-r) + var(--pad)) calc(var(--safe-b) + 18px) calc(var(--safe-l) + var(--pad));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s var(--ease), visibility 0.32s;
}
.screen .btn,
.screen .panel,
.screen .skin,
.screen .icon-btn {
  pointer-events: auto;
}
.screen.is-open {
  opacity: 1;
  visibility: visible;
}
.screen-inner {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 3.4vh, 22px);
  padding-bottom: 4px;
}
.screen--modal {
  align-items: center;
  background: radial-gradient(120% 90% at 50% 40%, rgba(3, 6, 13, 0.62), rgba(3, 6, 13, 0.9));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - var(--safe-t) - var(--safe-b) - var(--chrome) - 46px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(18px, 5vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(14px) scale(0.985);
  transition: transform 0.34s var(--ease);
}
.screen.is-open .panel {
  transform: none;
}
.panel--center {
  align-items: stretch;
}
.panel--result {
  gap: 12px;
}
.panel-title {
  font-family: 'Bungee', system-ui, sans-serif;
  font-size: clamp(20px, 5.6vw, 26px);
  line-height: 1.1;
  color: #fff;
}
.panel-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: -8px;
}
.panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  z-index: 2;
}

/* ============================== brand ============================== */
.brand {
  position: relative;
  text-align: center;
  padding: clamp(18px, 5vh, 34px) 0 clamp(6px, 1.6vh, 12px);
}
.brand-splash {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(104%, 420px);
  aspect-ratio: 1;
  translate: -50% -50%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.26), rgba(34, 211, 238, 0.07) 42%, rgba(0, 0, 0, 0) 68%);
  animation: breathe 5.5s ease-in-out infinite;
}
.wordmark {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Bungee', system-ui, sans-serif;
  font-size: clamp(46px, 17.5vw, 82px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.wordmark span:first-child {
  color: #fff;
  text-shadow: 0 0 30px rgba(34, 211, 238, 0.55), 0 4px 0 rgba(0, 0, 0, 0.45);
}
.wordmark-2 {
  background: linear-gradient(96deg, var(--accent) 8%, var(--accent-2) 62%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 22px rgba(52, 245, 197, 0.4));
}
.tagline {
  position: relative;
  margin-top: 12px;
  font-size: clamp(11px, 3.1vw, 13px);
  letter-spacing: 0.06em;
  color: var(--muted);
}
.footnote {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(138, 163, 190, 0.62);
}

/* ============================== player card + avatar ============================== */
.player-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
}
.avatar {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.4);
}
.avatar img {
  width: 118%;
  height: 118%;
  object-fit: cover;
  object-position: 50% 12%;
}
.avatar-fallback {
  font-family: 'Bungee', system-ui, sans-serif;
  font-size: 19px;
  color: #04222b;
  letter-spacing: 0.02em;
}
.avatar[data-empty='0'] .avatar-fallback {
  display: none;
}
.avatar--sm {
  width: 44px;
  height: 44px;
}
.avatar--sm .avatar-fallback {
  font-size: 15px;
}

.player-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}
.pstat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pstat-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.pstat-value {
  font-family: 'Bungee', system-ui, sans-serif;
  font-size: clamp(15px, 4.6vw, 19px);
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* ============================== buttons ============================== */
.btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 18px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--foam);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transition: transform 0.18s var(--ease), box-shadow 0.24s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
  background: var(--glass-2);
  border-color: var(--line-2);
}
.btn:active {
  transform: scale(0.975);
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn-primary {
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  border-color: rgba(255, 255, 255, 0.35);
  color: #04222b;
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.32);
}
.btn-primary:hover {
  box-shadow: 0 18px 44px rgba(52, 245, 197, 0.42);
  background: linear-gradient(150deg, var(--accent-2), var(--accent));
}
.btn-xl {
  padding: 17px 22px;
  font-size: 15px;
  border-radius: 17px;
}
.btn-block {
  width: 100%;
}
.btn-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.btn-row--wide {
  grid-template-columns: repeat(2, 1fr);
}
.btn-row .btn {
  flex-direction: column;
  gap: 5px;
  padding: 11px 6px;
  font-size: 9.5px;
  letter-spacing: 0.1em;
}
.btn-row .btn .ic {
  width: 19px;
  height: 19px;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
}
.btn.is-off {
  opacity: 0.5;
}

/* ============================== rules / skins ============================== */
.rules {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rules li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.rules b {
  display: block;
  font-size: 13px;
  color: #fff;
  letter-spacing: 0.01em;
}
.rules p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}
.rule-ic {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}
.ic-cyan .ic {
  color: var(--accent);
}
.ic-aqua .ic {
  color: var(--accent-2);
}
.ic-gold .ic {
  color: var(--gold);
}
.ic-danger .ic {
  color: var(--danger);
}
.ic-pink .ic {
  color: #ff5fb4;
}

.skin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 9px;
}
.skin {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--foam);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.skin:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.075);
}
.skin.is-on {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 1px rgba(52, 245, 197, 0.4), 0 10px 26px rgba(52, 245, 197, 0.16);
}
.skin.is-locked {
  opacity: 0.62;
}
.skin-swatch {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 32% 28%, var(--c1), var(--c2) 52%, var(--c3));
  box-shadow: 0 0 14px -2px var(--c2), inset 0 0 0 1.5px var(--ca);
  color: #fff;
}
.skin-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.skin-text b {
  font-size: 12px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.skin-text i {
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================== result ============================== */
.badge-best {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #3a2500;
  background: linear-gradient(120deg, var(--gold), #ffe89a);
  box-shadow: 0 8px 24px rgba(255, 197, 61, 0.36);
  animation: popIn 0.5s var(--ease) both;
}
.eyebrow {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}
.result-score {
  text-align: center;
  font-family: 'Bungee', system-ui, sans-serif;
  font-size: clamp(52px, 19vw, 92px);
  line-height: 0.94;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px rgba(34, 211, 238, 0.42), 0 4px 0 rgba(0, 0, 0, 0.45);
}
.result-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.result-sub b {
  color: var(--foam);
  font-variant-numeric: tabular-nums;
}
.result-sub .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-2);
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.rcell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}
.rcell-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.rcell-value {
  font-family: 'Bungee', system-ui, sans-serif;
  font-size: 21px;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.result-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}
.result-player-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.result-player-text b {
  font-size: 13px;
  color: #fff;
}
.board-status {
  font-size: 10.5px;
  color: var(--muted);
}
.board-status[data-kind='good'] {
  color: var(--accent-2);
}
.board-status[data-kind='bad'] {
  color: #ff8fa3;
}

/* ============================== toast / boot ============================== */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-b) + 84px);
  z-index: 12;
  translate: -50% 0;
  max-width: min(86vw, 380px);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--foam);
  background: rgba(8, 20, 34, 0.86);
  border: 1px solid var(--line-2);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  pointer-events: none;
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
}
.toast.is-on {
  opacity: 1;
  transform: none;
}
.toast.good {
  border-color: rgba(52, 245, 197, 0.5);
  color: var(--accent-2);
}
.toast.bad {
  border-color: rgba(255, 59, 92, 0.5);
  color: #ff9bab;
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, #0a1e36, var(--abyss) 70%);
  transition: opacity 0.55s var(--ease);
}
.boot.is-gone {
  opacity: 0;
  pointer-events: none;
}
.boot-mark {
  font-family: 'Bungee', system-ui, sans-serif;
  font-size: clamp(24px, 8vw, 40px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: linear-gradient(96deg, var(--accent), var(--accent-2), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: breathe 1.9s ease-in-out infinite;
}

/* ============================== motion ============================== */
@keyframes breathe {
  0%, 100% { opacity: 0.72; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.045); }
}
@keyframes meterPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.55); }
}
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.7) translateY(6px); }
  60% { transform: scale(1.06); }
  100% { opacity: 1; transform: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.screen.is-open .screen-inner > * {
  animation: fadeUp 0.5s var(--ease) both;
}
.screen.is-open .screen-inner > *:nth-child(2) { animation-delay: 0.05s; }
.screen.is-open .screen-inner > *:nth-child(3) { animation-delay: 0.1s; }
.screen.is-open .screen-inner > *:nth-child(4) { animation-delay: 0.15s; }
.screen.is-open .screen-inner > *:nth-child(5) { animation-delay: 0.2s; }
.screen.is-open .screen-inner > *:nth-child(6) { animation-delay: 0.25s; }

#btn-play {
  animation: ctaPulse 2.6s var(--ease) infinite;
}
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 12px 34px rgba(34, 211, 238, 0.32); }
  50% { box-shadow: 0 16px 46px rgba(52, 245, 197, 0.5); }
}

@media (max-height: 700px) {
  .tagline { display: none; }
  .brand { padding-top: 4px; }
  :root { --chrome: 40px; }
}
@media (max-width: 340px) {
  .player-stats { gap: 6px; }
  .btn-row { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.14s !important;
  }
}
