/* =============================================================
   GRAPH REFLEX — estilos
   ============================================================= */
:root {
  --ink: #eaf2ff;
  --muted: #a3b4dc;
  --faint: #6f80ab;
  --glass: rgba(10, 18, 56, 0.62);
  --glass-strong: rgba(9, 15, 46, 0.84);
  --line: rgba(140, 170, 255, 0.26);
  --cyan: #66e0ff;
  --magenta: #ff5fd2;
  --amber: #ffc05a;
  --lime: #8cff7a;
  --coral: #ff5f73;
  --violet: #b48cff;

  --ui: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --math: 'STIX Two Text', 'Cambria Math', Cambria, 'Times New Roman', serif;

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: #070c2a center / cover no-repeat fixed;
  color: var(--ink);
  font-family: var(--ui);
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#bg, #fx {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  display: block;
  pointer-events: none;
}
#bg { z-index: 0; opacity: 0; transition: opacity 1.2s ease; }
body.bg-ready #bg { opacity: 1; }
#fx { z-index: 50; }

#app {
  position: relative; z-index: 1;
  min-height: 100vh;
  padding: max(12px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
}

button { font-family: inherit; color: inherit; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.math {
  font-family: var(--math);
  font-style: italic;
  font-size: 1.12em;
  letter-spacing: 0.01em;
}
.dom {
  font-family: var(--math);
  color: var(--muted);
  font-size: 0.86em;
}

/* ---------- telas ---------- */
.screen { display: none; }
.screen.active { display: block; animation: screenIn .45s ease both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* =============================================================
   MENU
   ============================================================= */
#menu { max-width: 980px; margin: 0 auto; }

.menu-top { display: flex; justify-content: flex-end; }

.lang {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lang button {
  border: 0; background: transparent; cursor: pointer;
  padding: 6px 12px; border-radius: 999px;
  font-size: .8rem; font-weight: 500; color: var(--muted);
  transition: background .15s, color .15s;
}
.lang button[aria-pressed="true"] { background: var(--cyan); color: #061334; }
.lang button:hover:not([aria-pressed="true"]) { color: var(--ink); }

.brand { text-align: center; margin: 10px 0 28px; }
.title {
  font-family: var(--math);
  font-style: italic; font-weight: 600;
  font-size: clamp(2.8rem, 10vw, 5.6rem);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.01em;
  text-shadow: 0 0 28px rgba(102, 224, 255, .55), 0 2px 0 rgba(0, 0, 0, .35);
}
.title-wave {
  display: block; margin: 6px auto 0;
  width: min(420px, 80vw); height: 28px;
  overflow: visible;
}
.title-wave path {
  fill: none; stroke: var(--magenta); stroke-width: 3; stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(255, 95, 210, .8));
  stroke-dasharray: 520; stroke-dashoffset: 520;
  animation: waveDraw 1.6s .2s cubic-bezier(.6, .1, .2, 1) forwards;
}
@keyframes waveDraw { to { stroke-dashoffset: 0; } }
.tagline { margin: 12px auto 0; max-width: 46ch; color: var(--muted); font-size: 1rem; }

.menu-body {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.levels-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.levels-head h2 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.star-total { color: var(--amber); font-size: .9rem; }

.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}

.lv {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "num name" "num stars" "best best";
  column-gap: 10px; row-gap: 2px;
  align-items: center;
  text-align: left;
  padding: 12px 12px 10px;
  background: rgba(14, 26, 78, .55);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s, transform .15s, background .15s;
  animation: lvIn .5s calc(var(--i) * 40ms + .3s) both;
}
@keyframes lvIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.lv:hover:not(:disabled) { border-color: var(--cyan); background: rgba(20, 40, 110, .65); transform: translateY(-2px); }
.lv-num {
  grid-area: num;
  font-family: var(--math); font-style: italic; font-weight: 600;
  font-size: 2.1rem; line-height: 1; color: var(--cyan);
  min-width: 1.3em; text-align: center;
}
.lv-name { grid-area: name; font-weight: 500; font-size: .95rem; line-height: 1.2; }
.lv-stars { grid-area: stars; font-size: .95rem; letter-spacing: 1px; }
.lv-best { grid-area: best; margin-top: 6px; font-size: .74rem; color: var(--faint); display: flex; align-items: center; gap: 4px; }
.lv.gold { border-color: rgba(255, 192, 90, .55); box-shadow: inset 0 0 24px rgba(255, 192, 90, .08); }
.lv.locked { cursor: not-allowed; opacity: .55; }
.lv.locked .lv-num { color: var(--faint); }

.st { color: rgba(163, 180, 220, .3); }
.st.on { color: var(--amber); text-shadow: 0 0 8px rgba(255, 192, 90, .6); }

.endless-card {
  width: 100%;
  margin-top: 14px;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px;
  text-align: left;
  background: linear-gradient(100deg, rgba(255, 95, 210, .16), rgba(102, 224, 255, .10));
  border: 1px solid rgba(255, 95, 210, .4);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.endless-card:hover { border-color: var(--magenta); transform: translateY(-2px); }
.end-icon {
  font-family: var(--math); font-size: 2.6rem; line-height: 1;
  color: var(--magenta); text-shadow: 0 0 16px rgba(255, 95, 210, .7);
}
.end-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.end-text b { font-weight: 600; font-size: 1.05rem; }
.end-text small { color: var(--muted); font-size: .85rem; }
.end-rec { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.end-rec small { color: var(--faint); font-size: .72rem; }
.end-rec b { font-size: 1.3rem; font-weight: 600; color: var(--amber); }

.howto {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.howto summary { cursor: pointer; font-weight: 500; color: var(--cyan); }
.howto p { margin: 10px 0 0; color: var(--muted); font-size: .9rem; max-width: 72ch; }
.howto b { color: var(--ink); font-weight: 500; }

.link-btn {
  margin-top: 14px; padding: 4px 0;
  background: none; border: 0; cursor: pointer;
  color: var(--faint); font-size: .8rem; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--coral); }

/* =============================================================
   JOGO
   ============================================================= */
#game { max-width: 1000px; margin: 0 auto; }

.hud {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.icon-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, .12); }
.hud-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hud-name { font-weight: 600; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-round { font-size: .78rem; color: var(--muted); }
.hud-stats { display: flex; align-items: center; gap: 16px; }
.stat { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.stat small { font-size: .68rem; color: var(--faint); }
.stat b { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
#score { color: var(--lime); display: inline-block; }
#score.bump { animation: bump .45s ease; }
@keyframes bump { 40% { transform: scale(1.3); text-shadow: 0 0 14px rgba(140, 255, 122, .8); } }
#best { color: var(--amber); }

.lives { display: flex; gap: 3px; font-size: 1.15rem; }
.heart { color: var(--coral); text-shadow: 0 0 8px rgba(255, 95, 115, .7); display: inline-block; }
.heart.lost { color: rgba(163, 180, 220, .22); text-shadow: none; }
.heart.break { animation: heartBreak .7s ease; }
@keyframes heartBreak {
  0% { transform: scale(1); color: var(--coral); }
  30% { transform: scale(1.6) rotate(-12deg); color: var(--coral); }
  100% { transform: scale(1); }
}

.prompt {
  margin: 12px auto 6px;
  padding: 10px 18px;
  text-align: center;
  font-size: clamp(1rem, 3.4vw, 1.2rem);
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  min-height: 2.8em;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 8px;
  max-width: 760px;
}
.prompt .math { color: var(--amber); font-size: 1.25em; }
.prompt .dom { margin-left: 2px; }
.mode-ico {
  display: inline-grid; place-items: center;
  width: 1.7em; height: 1.7em; border-radius: 50%;
  background: rgba(102, 224, 255, .14); color: var(--cyan);
  font-family: var(--math); font-style: italic; font-size: .9em;
}

.timer { max-width: 760px; margin: 0 auto 10px; }
.timer-bar { height: 6px; background: rgba(255, 255, 255, .08); border-radius: 3px; overflow: hidden; }
#timerFill {
  height: 100%; width: 100%;
  transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--cyan), #8fb8ff);
  box-shadow: 0 0 10px rgba(102, 224, 255, .7);
  transition: background .2s;
}
#timerFill.warn { background: var(--amber); box-shadow: 0 0 10px rgba(255, 192, 90, .7); }
#timerFill.danger { background: var(--coral); box-shadow: 0 0 10px rgba(255, 95, 115, .8); }
.timer-text { text-align: right; font-size: .76rem; color: var(--muted); min-height: 1.1em; margin-top: 3px; font-variant-numeric: tabular-nums; }

.play {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 14px;
  align-items: start;
}

.stage {
  position: relative;
  background: rgba(7, 12, 40, .72);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 8px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35), inset 0 0 40px rgba(102, 224, 255, .05);
}
.stage.shake { animation: shake .45s ease; }
@keyframes shake {
  20% { transform: translateX(-8px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(3px); }
}

#board {
  display: block; width: 100%; height: auto;
  aspect-ratio: 560 / 420;
  touch-action: none;   /* só o canvas bloqueia o gesto; a página continua rolando */
  border-radius: var(--r-md);
}
.stage[data-mode="draw"] #board { cursor: crosshair; }
.stage[data-mode="pick"] #board { display: none; }
.stage:not([data-mode="pick"]) .pick-grid { display: none; }

.pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pick-card {
  position: relative;
  padding: 4px;
  background: rgba(14, 26, 78, .5);
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .12s, transform .12s, background .12s;
  animation: cardIn .45s calc(var(--i) * 70ms) both;
}
@keyframes cardIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.pick-card canvas { display: block; width: 100%; height: auto; aspect-ratio: 300 / 210; }
.pick-card:hover:not(.disabled) { border-color: var(--cyan); background: rgba(20, 40, 110, .6); transform: translateY(-2px); }
.pick-card kbd {
  position: absolute; top: 8px; right: 10px;
  font-family: var(--ui); font-size: .72rem; color: var(--muted);
  background: rgba(255, 255, 255, .07); border-radius: 5px; padding: 1px 6px;
}
.pick-card.disabled { pointer-events: none; }
.pick-card.correct { border-color: var(--lime); box-shadow: 0 0 18px rgba(140, 255, 122, .45); }
.pick-card.wrong { border-color: var(--coral); box-shadow: 0 0 18px rgba(255, 95, 115, .45); }

.banner {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 28px;
  background: rgba(9, 15, 46, .9);
  border: 1px solid rgba(102, 224, 255, .5);
  border-radius: var(--r-md);
  box-shadow: 0 0 40px rgba(102, 224, 255, .25);
  opacity: 0;
  white-space: nowrap;
}
.banner small { color: var(--muted); font-size: .8rem; }
.banner b { font-size: 1.3rem; font-weight: 600; }
.banner.show { animation: bannerShow 1.1s ease both; }
@keyframes bannerShow {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.03); }
  30% { transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -60%); }
}

/* ---------- lateral ---------- */
.side { display: flex; flex-direction: column; gap: 8px; }
.side[data-mode="pick"] { display: none; }
.play[data-mode="pick"] { grid-template-columns: minmax(0, 760px); justify-content: center; }

.choice {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 10px 12px 9px 34px;
  background: rgba(10, 18, 56, .78);
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: center;
  transition: border-color .12s, background .12s, transform .1s;
  animation: choiceIn .4s calc(var(--i) * 55ms) both;
}
@keyframes choiceIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.choice:hover:not(.disabled) { border-color: var(--cyan); background: rgba(20, 40, 110, .8); transform: translateX(-3px); }
.choice kbd {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--ui); font-size: .7rem; color: var(--muted);
  background: rgba(255, 255, 255, .07); border-radius: 5px; padding: 1px 6px;
}
.choice .math { font-size: 1.2rem; }
.choice.disabled { pointer-events: none; opacity: .45; }
.choice.disabled.correct, .choice.disabled.wrong { opacity: 1; }
.choice.correct { border-color: var(--lime); background: rgba(30, 80, 40, .55); box-shadow: 0 0 16px rgba(140, 255, 122, .4); animation: pop .4s ease; }
.choice.wrong { border-color: var(--coral); background: rgba(90, 20, 35, .55); box-shadow: 0 0 16px rgba(255, 95, 115, .4); animation: shake .4s ease; }
@keyframes pop { 50% { transform: scale(1.05); } }

.side-btn {
  padding: 11px 14px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: .95rem; font-weight: 500;
  transition: background .15s, border-color .15s;
}
.side-btn:hover { background: rgba(255, 255, 255, .13); }
.side-btn.primary { background: var(--cyan); color: #061334; border-color: var(--cyan); }
.side-btn.primary:hover { background: #8eeaff; }
.side-btn.ghost { background: transparent; }

.legend {
  padding: 10px 12px;
  background: rgba(10, 18, 56, .7);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: .8rem; color: var(--muted);
  display: flex; flex-direction: column; gap: 5px;
}
.sw { display: inline-block; width: 22px; height: 0; margin-right: 8px; vertical-align: middle; border-top: 3px solid; }
.sw.user { border-color: var(--magenta); }
.sw.ans { border-color: var(--lime); border-top-style: dashed; }
.tol { margin-top: 2px; color: var(--faint); }

.message {
  margin: 12px auto 0;
  max-width: 760px;
  min-height: 1.6em;
  text-align: center;
  font-size: .95rem;
  color: var(--muted);
}
.message.good { color: var(--lime); }
.message.bad { color: var(--coral); }

.float-text {
  position: fixed; z-index: 60;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-weight: 700; font-size: 1.6rem;
  animation: floatUp 1.2s ease-out forwards;
}
.float-text.good { color: var(--lime); text-shadow: 0 0 14px rgba(140, 255, 122, .8); }
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); }
  20% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -180%) scale(1); }
}

/* =============================================================
   OVERLAY / MODAIS
   ============================================================= */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(4, 8, 28, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.overlay[hidden] { display: none; }
.overlay.show { animation: fadeIn .3s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: min(460px, 100%);
  padding: 28px 24px 24px;
  text-align: center;
  background: var(--glass-strong);
  border: 1px solid rgba(102, 224, 255, .35);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(102, 224, 255, .12);
  animation: modalIn .5s cubic-bezier(.2, 1.3, .4, 1) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.9); } to { opacity: 1; transform: none; } }

/* intro do nível */
.intro-modal { cursor: pointer; }
.intro-badge { position: relative; width: 120px; height: 120px; margin: 0 auto 10px; }
.intro-badge svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.intro-badge circle {
  fill: none; stroke: var(--cyan); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327;
  filter: drop-shadow(0 0 6px rgba(102, 224, 255, .9));
  animation: ring 1.1s .15s cubic-bezier(.6, .1, .2, 1) forwards;
}
@keyframes ring { to { stroke-dashoffset: 0; } }
.intro-badge span {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--math); font-style: italic; font-weight: 600;
  font-size: 3.4rem; color: var(--ink);
  text-shadow: 0 0 20px rgba(102, 224, 255, .7);
  animation: numIn .7s .35s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes numIn { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
.intro-name {
  margin: 0 0 14px;
  font-size: 1.7rem; font-weight: 600;
  animation: slideUp .5s .55s ease both;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.intro-modes {
  list-style: none; padding: 0; margin: 0 auto 12px;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  font-size: .9rem; color: var(--muted);
}
.intro-modes li { animation: slideUp .4s both; }
.intro-modes li:nth-child(1) { animation-delay: .75s; }
.intro-modes li:nth-child(2) { animation-delay: .85s; }
.intro-modes li:nth-child(3) { animation-delay: .95s; }
.intro-modes i {
  display: inline-block; width: 1.6em; margin-right: 6px;
  font-family: var(--math); color: var(--cyan);
}
.intro-goals {
  display: flex; flex-direction: column; gap: 2px;
  margin: 0 0 10px; font-size: .8rem; color: var(--amber);
  animation: slideUp .4s 1.05s both;
}
.intro-tap { margin: 6px 0 0; font-size: .78rem; color: var(--faint); animation: blink 1.6s 1.3s infinite both; }
@keyframes blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* resultado */
.result h2 { margin: 2px 0 8px; font-size: 1.8rem; font-weight: 600; }
.result-kicker { margin: 0; color: var(--muted); font-size: .85rem; }
.result-sub { margin: 0 0 8px; color: var(--muted); }
.result-stars { display: flex; justify-content: center; gap: 8px; margin: 6px 0 4px; }
.big-star {
  font-size: 3.2rem; line-height: 1;
  color: rgba(163, 180, 220, .2);
  display: inline-block;
}
.big-star.on {
  color: var(--amber);
  text-shadow: 0 0 22px rgba(255, 192, 90, .9);
  animation: starPop .6s var(--d) cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes starPop {
  0% { transform: scale(0) rotate(-60deg); color: rgba(163, 180, 220, .2); text-shadow: none; }
  100% { transform: none; }
}
.result-score { margin: 6px 0; font-size: 1rem; color: var(--muted); }
.result-score b { font-size: 2.4rem; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.record {
  display: inline-block; margin: 0 0 6px;
  padding: 3px 12px; border-radius: 999px;
  background: rgba(255, 192, 90, .16); color: var(--amber);
  font-size: .85rem; font-weight: 500;
  animation: pop .6s 1.2s ease both;
}
.result-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.lose .result h2 { color: var(--coral); }

/* =============================================================
   RESPONSIVO
   ============================================================= */
@media (max-width: 860px) {
  .play { grid-template-columns: 1fr; }
  .side { display: grid; grid-template-columns: 1fr 1fr; }
  .side .legend { grid-column: 1 / -1; }
  .choice { padding-left: 30px; }
  .choice:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .choice:hover:not(.disabled) { transform: none; }
}
@media (max-width: 560px) {
  #app { padding-left: 8px; padding-right: 8px; }
  .hud { gap: 8px; padding: 6px 8px; }
  .hud-stats { gap: 10px; }
  .stat:nth-child(2) { display: none; }
  .menu-body { padding: 14px; }
  .level-grid { grid-template-columns: repeat(2, 1fr); }
  .endless-card { flex-wrap: wrap; }
  .end-rec { width: 100%; flex-direction: row; align-items: baseline; gap: 8px; justify-content: flex-start; }
  .pick-grid { gap: 6px; }
  .stage { padding: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .title-wave path { stroke-dashoffset: 0; }
  .intro-badge circle { stroke-dashoffset: 0; }
}
