:root {
  --bg: #06070a;
  --bg-soft: #0a0c10;
  --panel: rgba(13, 16, 20, 0.82);
  --panel-solid: #0d1014;
  --line: rgba(232, 226, 204, 0.12);
  --line-strong: rgba(232, 226, 204, 0.22);
  --text: #ece8dc;
  --muted: #8d918a;
  --dim: #626761;
  --gold: #d8b46c;
  --danger: #ff6478;
  --accent: #68f0b5;
  --accent-rgb: 104, 240, 181;
  --accent-deep: #1e8e68;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", "Noto Serif SC", serif;
  --font-ui: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", "Menlo", monospace;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  color-scheme: dark;
  background: var(--bg);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(ellipse 55% 45% at 18% -8%, rgba(var(--accent-rgb), 0.11), transparent 70%),
    radial-gradient(ellipse 45% 40% at 92% 10%, rgba(101, 75, 148, 0.11), transparent 72%),
    radial-gradient(ellipse 80% 65% at 50% 108%, rgba(16, 31, 27, 0.85), transparent 70%),
    linear-gradient(180deg, #07080c 0%, #06070a 55%, #050609 100%);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 30%);
}

.page-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

::selection {
  color: #07100c;
  background: var(--accent);
}

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

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55em;
  min-height: 1.55em;
  padding: 0.12em 0.38em;
  border: 1px solid rgba(232, 226, 204, 0.2);
  border-bottom-color: rgba(232, 226, 204, 0.1);
  border-radius: 4px;
  color: rgba(236, 232, 220, 0.72);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.app {
  position: relative;
  z-index: 2;
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 22px clamp(16px, 2.5vw, 34px) 28px;
}

/* ── topbar ───────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 48px;
  margin-bottom: clamp(18px, 2.4vh, 26px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand-sigil {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--accent);
  filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.22));
  transition: color 0.6s ease;
}

.brand-sigil svg {
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.brand-text small {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.25em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.best-stat {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-right: 10px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.best-stat span {
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.15em;
}

.best-stat strong {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.app-version {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.015);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
}

.icon-btn {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.07);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn .sound-off {
  display: none;
}

.icon-btn.is-muted .sound-on {
  display: none;
}

.icon-btn.is-muted .sound-off {
  display: block;
}

.icon-btn[hidden] {
  display: none;
}

/* ── layout ───────────────────────────────────────────── */

.layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(18px, 2vw, 28px);
}

.stage {
  width: min(calc((100dvh - 248px) * 25 / 18), 1010px);
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  margin: 0;
}

.hud {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
  padding: 0 3px;
}

.eyebrow {
  display: block;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.5;
  text-transform: uppercase;
}

.depth-line {
  display: flex;
  align-items: baseline;
  gap: 11px;
  margin-top: 1px;
}

.depth-line > strong {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.02em;
  line-height: 0.95;
  text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.22);
}

.depth-name {
  position: relative;
  padding-left: 12px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.12em;
}

.depth-name::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transform: translateY(-50%);
}

.run-stats {
  display: flex;
  align-items: flex-end;
  gap: clamp(20px, 4vw, 44px);
}

.score-block {
  text-align: right;
}

.score-block strong {
  display: block;
  min-width: 4ch;
  margin-top: 1px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.04em;
  line-height: 0.95;
}

.vitals-block {
  min-width: 108px;
}

.vitals-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 30px;
}

.hearts {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 22px;
}

.heart {
  color: #ff5d72;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 80, 102, 0.45);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.heart.is-empty {
  color: transparent;
  opacity: 0.55;
  text-shadow: none;
  transform: scale(0.9);
  -webkit-text-stroke: 1px rgba(255, 93, 114, 0.4);
}

.heart.is-gain {
  animation: heart-beat 0.6s var(--ease);
}

.shields {
  display: flex;
  align-items: center;
  gap: 3px;
}

.shield {
  color: #8edbff;
  font-size: 13px;
  line-height: 1;
  text-shadow: 0 0 10px rgba(108, 205, 255, 0.5);
}

@keyframes heart-beat {
  0% { transform: scale(1); }
  35% { transform: scale(1.55); }
  100% { transform: scale(1); }
}

/* ── canvas ───────────────────────────────────────────── */

.canvas-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 25 / 18;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: var(--radius);
  background: #05070a;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(255, 255, 255, 0.018) inset,
    0 0 60px rgba(var(--accent-rgb), 0.055);
  isolation: isolate;
  transition: border-color 0.8s ease, box-shadow 0.8s ease;
}

.canvas-shell::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 3;
  border: 1px solid rgba(236, 230, 209, 0.055);
  border-radius: 9px;
  pointer-events: none;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  background: #05070a;
  touch-action: none;
}

.canvas-grain,
.scanlines,
.damage-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.canvas-grain {
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.scanlines {
  opacity: 0.16;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0, 0, 0, 0.16) 3px 4px);
}

.damage-vignette {
  z-index: 4;
  opacity: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(255, 24, 52, 0.34) 100%);
  transition: opacity 0.5s ease;
}

.damage-vignette.is-active {
  opacity: 1;
  transition-duration: 0.08s;
}

.frame-corner {
  position: absolute;
  z-index: 5;
  width: 22px;
  height: 22px;
  pointer-events: none;
  opacity: 0.65;
}

.corner-tl {
  top: 10px;
  left: 10px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}

.corner-tr {
  top: 10px;
  right: 10px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}

.corner-bl {
  bottom: 10px;
  left: 10px;
  border-bottom: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}

.corner-br {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* ── overlays ─────────────────────────────────────────── */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.start-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: clamp(18px, 4vw, 42px);
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(var(--accent-rgb), 0.055), transparent 48%),
    linear-gradient(180deg, rgba(3, 5, 7, 0.74) 0%, rgba(3, 5, 7, 0.9) 64%, rgba(3, 5, 7, 0.96) 100%);
  backdrop-filter: blur(2px);
}

.start-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 580px;
  animation: rise-in 1.1s var(--ease) both;
}

.sigil-wrap {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  margin-bottom: 18px;
  place-items: center;
}

.sigil-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 50%;
}

.ring-a {
  border-top-color: var(--accent);
  border-right-color: rgba(var(--accent-rgb), 0.08);
  animation: spin 16s linear infinite;
}

.ring-b {
  inset: 8px;
  border-style: dashed;
  border-color: rgba(var(--accent-rgb), 0.2);
  animation: spin-reverse 22s linear infinite;
}

.sigil-ring::before,
.sigil-ring::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.ring-a::before { top: -2px; left: 50%; }
.ring-a::after { right: -2px; top: 50%; }
.ring-b::before { bottom: -2px; left: 50%; }
.ring-b::after { top: 50%; left: -2px; }

.sigil-core {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.55);
}

.start-kicker {
  color: var(--accent);
  opacity: 0.7;
}

.game-title {
  position: relative;
  margin: 10px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(46px, 6.8vw, 82px);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 0.98;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
}

.game-title span {
  position: relative;
  color: var(--accent);
  text-shadow: 0 0 42px rgba(var(--accent-rgb), 0.24);
}

.game-title span::after {
  content: "";
  position: absolute;
  right: 0.1em;
  bottom: -0.05em;
  left: 0.04em;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.65), transparent);
}

.start-lede {
  margin: 0 0 24px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: clamp(12px, 1.2vw, 15px);
  letter-spacing: 0.1em;
  line-height: 1.9;
}

.primary-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 15px;
  padding: 14px 25px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.72);
  border-radius: 3px;
  color: #06100b;
  background: var(--accent);
  box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease, filter 0.2s ease;
}

.primary-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.34) 48%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.primary-btn:hover {
  box-shadow: 0 0 44px rgba(var(--accent-rgb), 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.primary-btn:hover::before {
  transform: translateX(120%);
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn kbd {
  border-color: rgba(2, 12, 8, 0.24);
  color: rgba(2, 12, 8, 0.58);
  background: rgba(2, 12, 8, 0.09);
  box-shadow: none;
}

.primary-btn.compact {
  padding: 12px 21px;
}

.start-arena-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 5px 11px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-decoration: none;
  background: rgba(var(--accent-rgb), 0.025);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.start-arena-link em {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.06em;
}

.start-arena-link .arena-link-arrow {
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.start-arena-link:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.06);
}

.start-arena-link:hover .arena-link-arrow {
  transform: translateX(2px);
}

.start-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.start-meta b {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.start-meta i {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--dim);
}

.start-controls {
  position: absolute;
  right: 24px;
  bottom: 18px;
  left: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.start-controls kbd {
  margin-right: 2px;
}

.pause-overlay {
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 5, 7, 0.74);
  backdrop-filter: blur(7px);
}

.pause-card {
  max-width: 380px;
  text-align: center;
}

.pause-card h2 {
  margin: 8px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  letter-spacing: 0.14em;
}

.pause-card > p:not(.eyebrow) {
  margin: 0 0 22px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.pause-card .primary-btn {
  margin-bottom: 12px;
}

.text-btn {
  padding: 8px 12px;
  border: 0;
  color: var(--dim);
  background: transparent;
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.text-btn:hover {
  color: var(--text);
}

.toast {
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 200px;
  padding: 10px 20px 11px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 4px;
  opacity: 0;
  background: rgba(5, 9, 8, 0.82);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35), 0 0 28px rgba(var(--accent-rgb), 0.06);
  backdrop-filter: blur(8px);
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 0.35s ease, transform 0.45s var(--ease);
}

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

.toast-kicker {
  color: var(--accent);
  opacity: 0.65;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.24em;
}

.toast strong {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.13em;
}

/* ── bottom hud ───────────────────────────────────────── */

.bottom-hud {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  margin-top: 13px;
}

.objective {
  flex: 1;
  min-width: 0;
}

.objective-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.objective-head strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.objective-head .slash {
  margin: 0 3px;
  color: var(--dim);
}

.progress-track {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.07);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.5);
  transition: width 0.45s var(--ease), background 0.6s ease;
}

.progress-glint {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 14%;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: translateX(-100%);
}

.objective.is-complete .objective-head {
  color: var(--accent);
}

.objective.is-complete .progress-fill {
  background: linear-gradient(90deg, var(--gold), #fff0c2);
  box-shadow: 0 0 16px rgba(255, 213, 125, 0.6);
}

.objective.is-complete .progress-glint {
  opacity: 0.65;
  animation: glint 1.8s ease-in-out infinite;
}

@keyframes glint {
  0% { transform: translateX(-120%); }
  70%, 100% { transform: translateX(820%); }
}

.combo-hud {
  width: 144px;
  padding-left: 19px;
  border-left: 1px solid var(--line);
  opacity: 0.38;
  transition: opacity 0.25s ease;
}

.combo-hud.is-active {
  opacity: 1;
}

.combo-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.combo-copy span {
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.combo-copy strong {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.combo-track {
  height: 2px;
  overflow: hidden;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.combo-track i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #ffe7b1);
  transform-origin: left center;
  transition: transform 0.1s linear;
}

.touch-pad {
  display: none;
  grid-template-columns: repeat(3, 38px);
  grid-template-rows: repeat(2, 38px);
  gap: 5px;
}

.touch-pad[hidden] {
  display: none !important;
}

.touch-pad button {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  place-items: center;
  font-size: 16px;
  touch-action: manipulation;
  user-select: none;
}

.touch-pad button:active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
}

.touch-pad [data-dir="up"] { grid-column: 2; grid-row: 1; }
.touch-pad [data-dir="left"] { grid-column: 1; grid-row: 2; }
.touch-pad [data-dir="down"] { grid-column: 2; grid-row: 2; }
.touch-pad [data-dir="right"] { grid-column: 3; grid-row: 2; }

.controls-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  padding: 0 3px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.control-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.control-hint-muted {
  margin-left: auto;
  color: #535750;
}

/* ── sidebar ──────────────────────────────────────────── */

.sidebar {
  display: flex;
  flex: 0 0 306px;
  flex-direction: column;
  gap: 14px;
  width: 306px;
  position: sticky;
  top: 20px;
  align-self: flex-start;
}

.side-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), transparent 45%),
    var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.side-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 24px;
  left: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.32), transparent);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 17px 13px;
  border-bottom: 1px solid rgba(232, 226, 204, 0.07);
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.panel-count,
.panel-mark {
  display: grid;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
  place-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
}

.panel-mark {
  border-radius: 3px;
  color: var(--gold);
  border-color: rgba(216, 180, 108, 0.24);
  background: rgba(216, 180, 108, 0.04);
}

.relic-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 330px;
  padding: 7px;
  overflow-y: auto;
}

.relic-list::-webkit-scrollbar {
  width: 5px;
}

.relic-list::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
}

.empty-state {
  margin: 0;
  padding: 19px 13px 21px;
  color: var(--dim);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.9;
  text-align: center;
}

.relic-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.2s ease;
  animation: relic-in 0.45s var(--ease) both;
}

.relic-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.relic-glyph {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 7px;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.045);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  place-items: center;
}

.relic-item[data-rarity="rare"] .relic-glyph {
  border-color: rgba(107, 195, 255, 0.3);
  color: #7ecbff;
  background: rgba(107, 195, 255, 0.06);
}

.relic-item[data-rarity="legendary"] .relic-glyph {
  border-color: rgba(255, 208, 115, 0.38);
  color: var(--gold);
  background: rgba(255, 208, 115, 0.07);
  box-shadow: 0 0 18px rgba(255, 194, 91, 0.08);
}

.relic-item[data-rarity="curse"] .relic-glyph {
  border-color: rgba(255, 100, 120, 0.35);
  color: var(--danger);
  background: rgba(255, 100, 120, 0.06);
}

.relic-copy {
  min-width: 0;
  padding-top: 1px;
}

.relic-copy strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.relic-copy strong i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
}

.relic-copy p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--dim);
  font-size: 9px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@keyframes relic-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.law-list {
  margin: 0;
  padding: 9px 17px 15px;
  list-style: none;
}

.law-list li {
  display: flex;
  gap: 11px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(232, 226, 204, 0.055);
}

.law-list li:last-child {
  border-bottom: 0;
  padding-bottom: 3px;
}

.law-list li > span {
  padding-top: 2px;
  color: var(--accent);
  opacity: 0.55;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.law-list p {
  margin: 0;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.75;
}

.law-list strong {
  color: var(--muted);
  font-weight: 500;
}

.seed-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  color: #4f544e;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.seed-line code {
  color: #666c65;
  font-family: inherit;
  font-size: 9px;
  letter-spacing: 0.1em;
}

/* ── modals ───────────────────────────────────────────── */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 42px);
  overflow-y: auto;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-layer.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(var(--accent-rgb), 0.055), transparent 46%),
    rgba(3, 5, 7, 0.84);
  backdrop-filter: blur(11px);
}

.draft-panel,
.end-panel,
.help-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  animation: modal-in 0.55s var(--ease) both;
}

.draft-panel {
  max-width: 1010px;
  text-align: center;
}

.modal-head h2,
.end-panel h2 {
  margin: 8px 0 9px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 400;
  letter-spacing: 0.13em;
  line-height: 1.02;
}

.modal-head > p:last-child {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.draft-panel .eyebrow {
  color: var(--accent);
  opacity: 0.75;
}

.draft-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 20px);
  margin-top: clamp(24px, 4vh, 40px);
  text-align: left;
}

.draft-card {
  --rarity: #aeb7ae;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 286px;
  padding: 21px;
  overflow: hidden;
  border: 1px solid rgba(232, 226, 204, 0.14);
  border-radius: 12px;
  color: var(--text);
  text-align: left;
  background:
    radial-gradient(ellipse at 80% 0%, color-mix(in srgb, var(--rarity) 13%, transparent), transparent 52%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(8, 10, 13, 0.92) 55%);
  cursor: pointer;
  transition: transform 0.28s var(--ease), border-color 0.28s ease, box-shadow 0.28s ease;
}

@supports not (background: color-mix(in srgb, red 10%, blue)) {
  .draft-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(8, 10, 13, 0.94) 55%);
  }
}

.draft-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 20px;
  left: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rarity), transparent);
  opacity: 0.7;
}

.draft-card::after {
  content: attr(data-key);
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: rgba(255, 255, 255, 0.055);
  font-family: var(--font-display);
  font-size: 78px;
  line-height: 1;
  pointer-events: none;
}

.draft-card:hover,
.draft-card:focus-visible {
  z-index: 2;
  border-color: color-mix(in srgb, var(--rarity) 62%, transparent);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 34px color-mix(in srgb, var(--rarity) 9%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--rarity) 18%, transparent);
  transform: translateY(-7px);
}

.draft-card[data-rarity="common"] { --rarity: #a6b1a7; }
.draft-card[data-rarity="rare"] { --rarity: #71c8ff; }
.draft-card[data-rarity="legendary"] { --rarity: #ffd171; }
.draft-card[data-rarity="curse"] { --rarity: #ff6478; }

.draft-card[data-rarity="legendary"] {
  background:
    radial-gradient(ellipse at 72% 0%, rgba(255, 199, 97, 0.15), transparent 54%),
    linear-gradient(160deg, rgba(255, 224, 166, 0.04), rgba(10, 9, 7, 0.94) 58%);
}

.draft-card[data-rarity="curse"] {
  background:
    radial-gradient(ellipse at 72% 0%, rgba(255, 75, 100, 0.13), transparent 54%),
    linear-gradient(160deg, rgba(255, 100, 120, 0.035), rgba(12, 7, 9, 0.94) 58%);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.rarity-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rarity);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.rarity-tag::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rarity);
  box-shadow: 0 0 8px var(--rarity);
}

.card-glyph {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 22px 0 18px;
  border: 1px solid color-mix(in srgb, var(--rarity) 38%, transparent);
  border-radius: 50%;
  color: var(--rarity);
  background: color-mix(in srgb, var(--rarity) 7%, transparent);
  box-shadow: 0 0 30px color-mix(in srgb, var(--rarity) 8%, transparent), inset 0 0 18px rgba(0, 0, 0, 0.35);
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1;
  place-items: center;
}

.draft-card h3 {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.draft-card .card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.85;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.card-foot .choose {
  color: var(--rarity);
  opacity: 0.75;
}

.card-foot kbd {
  border-color: color-mix(in srgb, var(--rarity) 24%, transparent);
  color: var(--rarity);
  background: color-mix(in srgb, var(--rarity) 5%, transparent);
}

.draft-card.is-picked {
  pointer-events: none;
  animation: card-picked 0.45s var(--ease) forwards;
}

@keyframes card-picked {
  0% { transform: translateY(-7px) scale(1); opacity: 1; }
  100% { transform: translateY(-18px) scale(0.97); opacity: 0; }
}

.draft-hint {
  margin: 22px 0 0;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.draft-hint kbd {
  margin: 0 2px;
}

.end-panel {
  max-width: 560px;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 15px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(var(--accent-rgb), 0.08), transparent 52%),
    rgba(8, 11, 13, 0.94);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

.end-panel > .eyebrow {
  color: var(--accent);
  opacity: 0.7;
}

.end-panel.is-victory > .eyebrow,
.end-panel.is-victory h2 {
  color: var(--gold);
}

.end-panel.is-victory .primary-btn {
  border-color: rgba(255, 209, 113, 0.7);
  color: #171006;
  background: var(--gold);
  box-shadow: 0 0 34px rgba(255, 194, 91, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.end-sub {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1.8;
}

.end-score-block {
  margin: 25px 0 22px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.end-score-block span {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.end-score-block strong {
  display: block;
  margin: 3px 0 3px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 64px);
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
  text-shadow: 0 0 38px rgba(216, 180, 108, 0.16);
}

.end-score-block em {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.16em;
}

.end-score-block em:empty {
  display: none;
}

.end-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.end-stats > div {
  padding: 13px 8px;
  background: rgba(10, 12, 15, 0.92);
}

.end-stats span {
  display: block;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.end-stats strong {
  display: block;
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.end-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.help-panel {
  max-width: 760px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(var(--accent-rgb), 0.06), transparent 55%),
    rgba(8, 11, 13, 0.95);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
  margin: 27px 0;
}

.help-item {
  display: flex;
  gap: 13px;
}

.help-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 15px;
  place-items: center;
}

.help-item h3 {
  margin: 2px 0 6px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.help-item p {
  margin: 0;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.8;
}

.help-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.help-controls span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.help-panel > .primary-btn {
  display: flex;
  margin: 0 auto;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

/* ── responsive ───────────────────────────────────────── */

@media (max-width: 1120px) {
  .sidebar {
    flex-basis: 278px;
    width: 278px;
  }
}

@media (max-width: 940px) {
  .app {
    padding-top: 16px;
  }

  .layout {
    flex-direction: column;
    align-items: stretch;
  }

  .stage {
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
    width: 100%;
    flex-basis: auto;
  }

  .seed-line {
    grid-column: 1 / -1;
    padding: 0 4px 6px;
  }

  .relic-list {
    max-height: 275px;
  }
}

@media (max-width: 720px) {
  .app {
    padding: 12px 11px 22px;
  }

  .topbar {
    margin-bottom: 14px;
  }

  .brand-sigil {
    width: 32px;
    height: 32px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .best-stat {
    display: none;
  }

  .app-version {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.015);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
}

.icon-btn {
    width: 34px;
    height: 34px;
  }

  .hud {
    align-items: flex-end;
    gap: 12px;
  }

  .depth-line > strong,
  .score-block strong {
    font-size: 24px;
  }

  .depth-name {
    font-size: 12px;
  }

  .run-stats {
    gap: 16px;
  }

  .vitals-block {
    min-width: 0;
  }

  .vitals-row {
    height: 24px;
  }

  .heart {
    font-size: 16px;
  }

  .canvas-shell::after {
    inset: 7px;
  }

  .start-overlay {
    gap: 10px;
    padding: 16px;
  }

  .sigil-wrap {
    width: 52px;
    height: 52px;
    margin-bottom: 8px;
  }

  .sigil-core {
    font-size: 21px;
  }

  .game-title {
    margin: 6px 0 8px;
    font-size: clamp(40px, 12vw, 58px);
  }

  .start-lede {
    margin-bottom: 16px;
    font-size: 10px;
    line-height: 1.8;
  }

  .start-kicker {
    font-size: 7px;
  }

  .primary-btn {
    padding: 11px 18px;
    font-size: 11px;
  }

  .start-meta {
    margin-top: 14px;
    font-size: 7px;
  }

  .start-controls {
    bottom: 10px;
    gap: 10px;
    font-size: 8px;
  }

  .bottom-hud {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 14px;
    margin-top: 11px;
  }

  .objective {
    grid-column: 1 / -1;
    flex-basis: auto;
  }

  .combo-hud {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    padding-left: 0;
    border-left: 0;
  }

  .touch-pad {
    display: grid;
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .controls-row {
    display: none;
  }

  .toast {
    top: 12px;
    min-width: 0;
    max-width: calc(100% - 26px);
    padding: 7px 13px 8px;
  }

  .toast-kicker {
    font-size: 6px;
    white-space: nowrap;
  }

  .toast strong {
    font-size: 12px;
    white-space: nowrap;
  }

  .start-controls {
    display: none;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .relic-list {
    max-height: 220px;
  }

  .draft-cards {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  .draft-card {
    min-height: 0;
    padding: 15px 17px;
  }

  .card-glyph {
    width: 38px;
    height: 38px;
    margin: 12px 0 11px;
    font-size: 19px;
  }

  .draft-card h3 {
    font-size: 18px;
    margin-bottom: 5px;
  }

  .draft-card .card-desc {
    font-size: 10px;
    line-height: 1.7;
  }

  .card-foot {
    padding-top: 12px;
  }

  .draft-card::after {
    font-size: 56px;
  }

  .draft-hint {
    margin-top: 14px;
    font-size: 9px;
  }

  .end-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-layer {
    align-items: flex-start;
    padding-top: max(20px, 5vh);
    padding-bottom: 24px;
  }

  .help-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }
}

@media (max-width: 480px) {
  .brand-text small {
    display: none;
  }

  .start-overlay {
    gap: 4px;
    padding: 9px 12px;
  }

  .start-inner {
    max-width: 100%;
  }

  .sigil-wrap {
    display: none;
  }

  .start-kicker {
    font-size: 6px;
  }

  .game-title {
    margin: 4px 0 3px;
    font-size: clamp(36px, 11.5vw, 48px);
  }

  .start-lede {
    margin-bottom: 9px;
    font-size: 9px;
    line-height: 1.65;
  }

  .start-arena-link {
    margin-top: 6px;
    padding: 4px 9px;
    font-size: 8px;
  }

  .start-arena-link em {
    font-size: 6px;
  }

  .start-meta {
    gap: 6px;
    margin-top: 5px;
    font-size: 6px;
  }

  .hud {
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 14px;
  }

  .run-stats {
    flex: 1;
    justify-content: flex-end;
  }

  .score-block strong {
    font-size: 22px;
  }

  .depth-line > strong {
    font-size: 22px;
  }

  .vitals-block .eyebrow,
  .score-block .eyebrow {
    font-size: 7px;
  }

  .vitals-row {
    height: 22px;
    gap: 7px;
  }

  .start-lede br {
    display: none;
  }

  .start-controls span:last-child {
    display: none;
  }

  .bottom-hud {
    gap: 9px 10px;
  }

  .combo-hud {
    width: 100%;
  }

  .touch-pad {
    grid-template-columns: repeat(3, 35px);
    grid-template-rows: repeat(2, 35px);
  }

  .pause-card h2 {
    font-size: 32px;
  }

  .end-panel {
    padding: 24px 17px;
  }
}

@media (pointer: coarse) {
  .touch-pad {
    display: grid;
  }

  .controls-row .control-hint:nth-child(1),
  .controls-row .control-hint:nth-child(2) {
    display: none;
  }

  .control-hint-muted {
    margin-left: 0;
  }
}

@media (max-height: 760px) and (min-width: 941px) {
  .app {
    padding-top: 14px;
  }

  .topbar {
    margin-bottom: 14px;
  }

  .start-inner {
    transform: scale(0.92);
    transform-origin: center;
  }

  .start-controls {
    bottom: 10px;
  }
}

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