:root {
  color: #fff4d7;
  background: #111016;
  font-family: "Courier New", Courier, monospace;
  font-synthesis: none;
  --cream: #fff0c2;
  --yellow: #ffd34d;
  --red: #ed4936;
  --ink: #15131b;
  --teal: #72e0d2;
}

* { box-sizing: border-box; }

html,
body,
#app,
.game-shell {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
}

button { font: inherit; }
button { min-height: 44px; }
button:focus-visible { outline: 4px solid var(--teal); outline-offset: 4px; }

.game-shell {
  position: relative;
  background: #111016;
  isolation: isolate;
}

.canvas-host,
.canvas-host canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.canvas-host canvas { image-rendering: pixelated; }

.crt-filter {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.17;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0, rgba(0,0,0,.22) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: multiply;
}

.top-actions {
  position: absolute;
  z-index: 6;
  top: max(12px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: flex;
  gap: 8px;
}

.icon-button,
.secondary-button {
  border: 2px solid rgba(255,240,194,.62);
  color: var(--cream);
  background: rgba(21,19,27,.78);
  padding: 8px 11px;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: .08em;
  cursor: pointer;
}

kbd {
  font: inherit;
  color: var(--yellow);
}

.hud {
  position: absolute;
  z-index: 5;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 330px));
  min-width: 440px;
  height: 78px;
  display: grid;
  grid-template-columns: 110px 1fr 110px;
  color: var(--cream);
  background: linear-gradient(180deg, rgba(17,16,22,.94), rgba(35,27,27,.9));
  border: 3px solid var(--cream);
  box-shadow: 0 5px 0 var(--red), 0 12px 24px rgba(0,0,0,.3);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%, 0 12px);
}

.hud[hidden] { display: none; }
.hud-block,
.hud-center { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hud-block span,
.hud-center span { color: var(--yellow); font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.hud-block strong { font-size: 35px; line-height: 1; }
.hud-block small { color: var(--teal); font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.hud-center { border-inline: 2px solid rgba(255,240,194,.3); }
.hud-center strong { font-size: 29px; line-height: 1.1; letter-spacing: .08em; }
.hud-center small { opacity: .78; font-size: 10px; }
.race-place { margin: 4px 0 8px; color: var(--teal); font-size: 18px; font-weight: 900; letter-spacing: .12em; }
.hud-combo strong.is-hot { color: var(--yellow); animation: combo-pulse .35s steps(2) infinite; }
.hud-time strong.is-low { color: var(--red); animation: timer-flash .5s steps(2) infinite; }
.speedometer {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--cream);
  background: rgba(21,19,27,.82);
  border: 2px solid var(--cream);
  padding: 4px 12px;
  font-weight: 900;
  font-size: 12px;
}

.boost-gauge {
  width: calc(100% - 8px);
  min-height: 17px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  color: var(--cream);
  background: rgba(21,19,27,.88);
  border: 1px solid var(--cream);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .08em;
}
.boost-gauge > span { color: var(--cream); font-size: 7px; letter-spacing: .05em; }
.boost-gauge > strong { min-width: 24px; color: var(--yellow); font-size: 8px; text-align: right; }
.boost-track { height: 7px; overflow: hidden; background: rgba(255,240,194,.15); box-shadow: inset 0 0 0 1px rgba(255,240,194,.24); }
.boost-track i { display: block; width: 100%; height: 100%; transform-origin: left center; background: linear-gradient(90deg, var(--teal), var(--yellow)); transition: transform .08s linear; }
.boost-gauge.is-active { border-color: var(--teal); box-shadow: 0 0 16px rgba(55,230,255,.48); }
.boost-gauge.is-active .boost-track i { background: var(--yellow); animation: boost-pulse .18s steps(2) infinite; }
.boost-gauge.is-empty { border-color: var(--red); }
.boost-gauge.is-locked { opacity: .58; border-style: dashed; }
.hud-combo > strong { font-size: 27px; }

.screen {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: radial-gradient(circle at 50% 45%, rgba(20,19,25,.15), rgba(12,11,16,.74));
  overflow: auto;
}

.screen[hidden] { display: none; }

.title-card,
.panel {
  width: min(610px, 92vw);
  text-align: center;
  padding: 24px 38px 28px;
  color: var(--cream);
  background: rgba(21,19,27,.93);
  border: 5px solid var(--cream);
  box-shadow: 0 8px 0 var(--red), 0 20px 60px rgba(0,0,0,.45);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  scrollbar-color: var(--teal) rgba(21,19,27,.8);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}

h1 {
  margin: 0;
  line-height: 1.15;
  filter: drop-shadow(5px 6px 0 #5a211c);
}

h1 span {
  display: block;
  color: var(--cream);
  font-size: clamp(42px, 10vw, 82px);
  letter-spacing: -.08em;
}

h1 em {
  display: inline-block;
  color: var(--red);
  font-size: clamp(58px, 13vw, 108px);
  font-style: normal;
}

.tagline {
  margin: 28px 0 14px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.arcade-button {
  min-width: 260px;
  border: 0;
  padding: 15px 20px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 6px 0 #8c521d;
  font-weight: 900;
  letter-spacing: .05em;
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}

.arcade-button:hover { background: #ffe37c; transform: translateY(-2px); box-shadow: 0 8px 0 #8c521d; }
.arcade-button:active { transform: translateY(5px); box-shadow: 0 1px 0 #8c521d; }

.best-line { margin: 18px 0 14px; font-size: 12px; letter-spacing: .13em; }
.best-line strong { color: var(--yellow); font-size: 16px; }

.instructions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.instructions div {
  min-height: 57px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,240,194,.24);
}

.instructions kbd { color: var(--yellow); font-weight: 900; }
.instructions span { font-size: 9px; margin-top: 4px; }
.instructions .control-locked { opacity: .52; border-style: dashed; }
.objective { margin: 15px auto 0; max-width: 510px; font-size: 11px; line-height: 1.45; opacity: .78; }
.menu-row { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.tutorial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; text-align: left; }
.tutorial-grid article { padding: 12px; border: 2px solid rgba(55,230,255,.32); background: rgba(55,230,255,.06); }
.tutorial-grid strong { color: var(--yellow); font-size: 11px; }
.tutorial-grid p { margin: 7px 0 0; font-size: 10px; line-height: 1.45; }
.cutscene { margin: 12px 0; border: 3px solid var(--cream); background: #090a0e; overflow: hidden; }
.cutscene img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.campaign-panel { width: min(1040px, 96vw); text-align: left; }
.campaign-panel > h2,
.campaign-panel > .eyebrow,
.campaign-panel > .campaign-intro { text-align: center; }
.campaign-intro { max-width: 760px; margin: 0 auto 16px; font-size: 11px; line-height: 1.5; opacity: .82; }
.garage-panel { width: min(980px, 96vw); text-align: left; }
.garage-header { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.garage-header h2 { margin: 0; font-size: clamp(28px, 5vw, 48px); }
.garage-header p:not(.eyebrow) { max-width: 650px; margin: 7px 0 0; font-size: 10px; line-height: 1.5; opacity: .8; }
.garage-wallet { min-width: 146px; padding: 12px 16px; border: 3px solid var(--yellow); background: rgba(255,211,77,.08); text-align: center; box-shadow: inset 0 0 18px rgba(255,211,77,.08); }
.garage-wallet span { display: block; color: var(--yellow); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.garage-wallet strong { display: block; margin-top: 4px; color: var(--cream); font-size: 32px; line-height: 1; }
.garage-filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; margin: 16px 0 8px; }
.garage-filter { min-width: 0; border: 2px solid rgba(255,240,194,.35); color: var(--cream); background: rgba(255,255,255,.025); padding: 8px 5px; font-size: 9px; font-weight: 900; text-transform: uppercase; cursor: pointer; }
.garage-filter.is-active { border-color: var(--teal); color: var(--ink); background: var(--teal); }
.garage-feedback { min-height: 31px; padding: 8px 10px; border-left: 4px solid var(--yellow); color: var(--yellow); background: rgba(255,211,77,.06); font-size: 9px; font-weight: 900; letter-spacing: .05em; }
.garage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 9px; }
.garage-card { display: grid; grid-template-columns: 72px minmax(0, 1fr) 112px; align-items: center; gap: 10px; min-height: 132px; padding: 10px; border: 2px solid rgba(255,240,194,.24); background: rgba(255,255,255,.025); }
.garage-card.is-owned { border-color: rgba(55,230,255,.45); }
.garage-card.is-equipped { border-color: var(--yellow); background: rgba(255,211,77,.07); box-shadow: inset 0 0 20px rgba(255,211,77,.06); }
.garage-swatch,
.garage-part-icon { width: 64px; height: 64px; display: block; border: 3px solid var(--cream); background: linear-gradient(135deg, var(--swatch-a) 0 47%, #17151a 48% 52%, var(--swatch-b) 53%); box-shadow: 4px 4px 0 rgba(0,0,0,.32); }
.garage-part-icon { position: relative; border-radius: 50%; background: repeating-radial-gradient(circle, #16171a 0 7px, #5b5e61 8px 12px, #111 13px 19px); }
.garage-part-icon-suspension { border-radius: 8px; background: repeating-linear-gradient(90deg, #ff9b32 0 7px, #202127 8px 13px); }
.garage-part-icon-exhaust { border-radius: 8px; background: linear-gradient(135deg, #dde2e3, #4e5358 48%, #17191c 50% 60%, #9aa0a2 62%); }
.garage-part-icon-boost { border-radius: 32px 32px 9px 9px; background: linear-gradient(90deg, #167c8b, #37e6ff 45%, #173844 55%, #ffd34d); }
.garage-part-icon-track { border-radius: 8px; background: radial-gradient(ellipse, transparent 0 35%, #70472a 37% 55%, #37e6ff 57% 62%, #17151a 64%); }
.garage-card-copy > span { color: var(--yellow); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.garage-card-copy h3 { margin: 3px 0 5px; color: var(--teal); font-size: 15px; text-transform: uppercase; }
.garage-card-copy p { margin: 0; font-size: 9px; line-height: 1.35; }
.garage-card-copy small { display: block; margin-top: 5px; color: var(--yellow); font-size: 8px; line-height: 1.35; }
.garage-card-action { display: grid; gap: 8px; text-align: center; }
.garage-card-action > strong { color: var(--cream); font-size: 9px; }
.garage-card-action button { min-width: 0; width: 100%; padding: 8px 5px; font-size: 8px; line-height: 1.2; }
.garage-card-action button:disabled { cursor: default; opacity: .6; box-shadow: none; transform: none; }
.track-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.track-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) 116px; align-items: center; gap: 10px; min-height: 116px; padding: 10px; border: 2px solid rgba(255,240,194,.24); background: rgba(255,255,255,.025); }
.track-card.is-current { border-color: var(--teal); background: rgba(55,230,255,.08); box-shadow: inset 0 0 24px rgba(55,230,255,.08); }
.track-card.is-locked { opacity: .58; }
.track-card-stage { display: flex; flex-direction: column; align-items: center; color: var(--yellow); font-size: 8px; letter-spacing: .12em; }
.track-card-stage strong { color: var(--cream); font-size: 30px; line-height: 1; }
.track-card-copy h3 { margin: 0; color: var(--teal); font-size: 15px; text-transform: uppercase; }
.track-card-copy p { margin: 5px 0; font-size: 9px; line-height: 1.4; }
.track-card-copy small { display: block; margin-top: 3px; color: var(--yellow); font-size: 8px; letter-spacing: .04em; }
.track-card button { min-width: 0; min-height: 44px; padding: 8px; font-size: 8px; line-height: 1.25; }
.locked-button { border: 2px solid rgba(255,240,194,.25); color: var(--cream); background: rgba(21,19,27,.7); }
.stage-intro-panel { width: min(720px, 94vw); }
.stage-intro-panel h2 { margin: 0; font-size: clamp(28px, 6vw, 48px); }
.stage-cutscene { position: relative; }
.lesson-card { margin: 12px 0; padding: 12px 14px; border-left: 5px solid var(--teal); background: rgba(55,230,255,.08); text-align: left; }
.lesson-card strong { color: var(--yellow); font-size: 10px; letter-spacing: .12em; }
.lesson-card p { margin: 6px 0; font-size: 13px; line-height: 1.45; }
.lesson-card small { font-size: 9px; opacity: .78; }
.track-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0; }
.track-facts span { padding: 8px 4px; border: 1px solid rgba(255,240,194,.25); color: var(--yellow); font-size: 9px; font-weight: 900; }
.setting-row { display: flex; align-items: center; justify-content: space-between; min-height: 52px; margin: 9px 0; padding: 8px 12px; border: 2px solid rgba(255,240,194,.26); font-size: 11px; font-weight: 900; text-align: left; }
.setting-row input { width: 28px; height: 28px; accent-color: var(--teal); }
.setting-row select { min-height: 34px; border: 2px solid rgba(255,240,194,.45); color: var(--cream); background: #17151a; padding: 4px 8px; font: inherit; }

.compact-panel { width: min(440px, 92vw); }
.compact-panel h2,
.results-panel h2 { margin: 0 0 22px; font-size: clamp(26px, 6vw, 42px); }
.compact-panel button { display: block; margin: 12px auto; }
.results-panel { width: min(520px, 92vw); }
.final-score { color: var(--yellow); font-size: clamp(58px, 13vw, 94px); font-weight: 900; line-height: 1; text-shadow: 5px 5px 0 #81351e; }
.results-panel > p:not(.eyebrow) { font-size: 12px; line-height: 1.5; }
.result-medal { margin: 8px auto; color: var(--yellow); font-size: 18px !important; font-weight: 900; letter-spacing: .09em; text-shadow: 2px 2px 0 #81351e; }

.contextual-tutorial {
  pointer-events: none;
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: max(34px, env(safe-area-inset-bottom));
  transform: translateX(-50%) rotate(-1deg);
  width: min(620px, calc(100% - 32px));
  padding: 11px 18px;
  border: 3px solid var(--cream);
  color: var(--ink);
  background: rgba(255,211,77,.94);
  font-size: clamp(11px, 2vw, 16px);
  font-weight: 900;
  letter-spacing: .05em;
  text-align: center;
  box-shadow: 5px 5px 0 rgba(23,21,26,.8);
}

.announcement {
  pointer-events: none;
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--yellow);
  font-size: clamp(90px, 20vw, 180px);
  font-weight: 900;
  text-shadow: 8px 8px 0 #9d2c22, 12px 12px 0 rgba(0,0,0,.5);
}

.score-pops {
  pointer-events: none;
  position: absolute;
  z-index: 7;
  inset: 0;
  display: grid;
  place-items: center;
}

.score-pop {
  grid-area: 1 / 1;
  margin-top: 90px;
  font-size: clamp(22px, 5vw, 40px);
  font-weight: 900;
  text-shadow: 3px 3px 0 #17151a;
  animation: score-rise .8s ease-out both;
}

.touch-controls {
  display: none;
  pointer-events: none;
  position: absolute;
  z-index: 7;
  inset: auto 0 max(18px, env(safe-area-inset-bottom));
  justify-content: space-between;
  padding: 0 max(18px, env(safe-area-inset-left));
  touch-action: none;
}

.touch-cluster { display: flex; gap: 10px; align-items: end; }
.touch-controls button {
  pointer-events: auto;
  width: 66px;
  height: 66px;
  border: 3px solid var(--cream);
  border-radius: 50%;
  color: var(--cream);
  background: rgba(21,19,27,.68);
  font-size: 25px;
  font-weight: 900;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.07);
}
.touch-controls button.is-pressed { transform: scale(.92); background: rgba(237,73,54,.82); }
.touch-controls .touch-go { width: 78px; height: 78px; color: var(--ink); background: rgba(255,211,77,.86); }
.touch-controls .touch-reset { width: 44px; height: 44px; font-size: 19px; align-self: center; }
.touch-controls .touch-handbrake,
.touch-controls .touch-boost,
.touch-controls .touch-pause { width: 52px; height: 52px; font-size: 13px; align-self: center; }
.touch-controls .touch-boost { color: var(--ink); background: rgba(55,230,255,.84); font-size: 11px; }
.touch-controls .touch-boost.is-locked-mechanic { color: var(--cream); background: rgba(21,19,27,.78); border-style: dashed; opacity: .66; }

[data-phase="title"] .top-actions,
[data-phase="track-select"] .top-actions,
[data-phase="garage"] .top-actions,
[data-phase="stage-intro"] .top-actions,
[data-phase="tutorial"] .top-actions,
[data-phase="settings"] .top-actions,
[data-phase="credits"] .top-actions,
[data-phase="results"] .top-actions,
[data-phase="gameover"] .top-actions { display: none; }

.orientation-fallback {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  color: var(--cream);
  background: radial-gradient(circle, #203f4a, #111016 68%);
  text-align: center;
}
.orientation-fallback[hidden] { display: none; }
.orientation-fallback strong { color: var(--yellow); font-size: clamp(28px, 10vw, 54px); text-transform: uppercase; }
.orientation-fallback span { max-width: 430px; line-height: 1.5; }

.runtime-performance-debugger,
.postprocessing-lab {
  position: fixed;
  z-index: 30;
  left: 10px;
  bottom: 10px;
  width: min(350px, calc(100vw - 20px));
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 10px;
  color: #e9fbff;
  background: rgba(8,12,18,.94);
  border: 1px solid #37e6ff;
  font: 11px/1.35 Consolas, monospace;
}
.runtime-performance-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.runtime-performance-row dt,
.runtime-performance-row dd { margin: 0; }
.runtime-performance-row[data-status="red"] { color: #ff6b7c; }
.runtime-performance-row[data-status="amber"] { color: #ffd34d; }
.postprocessing-lab { left: auto; right: 10px; }
.postprocessing-lab-controls { display: grid; gap: 7px; }
.postprocessing-lab label { display: grid; gap: 4px; }
.postprocessing-lab-label { display: flex; justify-content: space-between; }

@keyframes score-rise { from { opacity: 0; transform: translateY(25px) scale(.75); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-90px) scale(1.08); } }
@keyframes combo-pulse { 50% { transform: scale(1.12); } }
@keyframes boost-pulse { 50% { filter: brightness(1.65); } }
@keyframes timer-flash { 50% { opacity: .45; } }

@media (pointer: coarse), (max-width: 760px) {
  .touch-controls { display: flex; }
  [data-phase="title"] .touch-controls,
  [data-phase="track-select"] .touch-controls,
  [data-phase="garage"] .touch-controls,
  [data-phase="stage-intro"] .touch-controls,
  [data-phase="countdown"] .touch-controls,
  [data-phase="paused"] .touch-controls,
  [data-phase="tutorial"] .touch-controls,
  [data-phase="settings"] .touch-controls,
  [data-phase="credits"] .touch-controls,
  [data-phase="results"] .touch-controls,
  [data-phase="gameover"] .touch-controls { display: none; }
  .top-actions { top: auto; bottom: max(104px, calc(env(safe-area-inset-bottom) + 98px)); right: 12px; }
  .top-actions .icon-button { padding: 6px 8px; font-size: 9px; }
  .hud {
    top: max(8px, env(safe-area-inset-top));
    width: calc(100% - 16px);
    min-width: 0;
    height: 64px;
    grid-template-columns: 72px 1fr 72px;
    border-width: 2px;
  }
  .hud-block strong { font-size: 27px; }
  .hud-center strong { font-size: 23px; }
  .hud-center small { font-size: 8px; }
  .speedometer { top: calc(100% + 5px); }
  .title-card { padding: 19px 18px 22px; }
  .menu-row { max-width: 100%; flex-wrap: wrap; }
  .title-card .menu-row .secondary-button { flex: 1 1 105px; }
  .instructions { grid-template-columns: 1fr 1fr 1fr; }
  .instructions div { min-height: 48px; }
  .objective { font-size: 10px; }
  .tutorial-grid { grid-template-columns: 1fr 1fr 1fr; }
  .track-grid { grid-template-columns: 1fr; }
  .garage-header { grid-template-columns: 1fr auto; gap: 10px; }
  .garage-wallet { min-width: 105px; padding: 9px; }
  .garage-wallet strong { font-size: 25px; }
  .garage-filters { grid-template-columns: repeat(3, 1fr); }
  .garage-grid { grid-template-columns: 1fr; }
  .garage-card { grid-template-columns: 58px minmax(0, 1fr) 96px; min-height: 112px; padding: 8px; }
  .garage-swatch,
  .garage-part-icon { width: 50px; height: 50px; }
  .track-card { grid-template-columns: 46px minmax(0, 1fr) 92px; min-height: 104px; padding: 8px; }
  .track-card-stage strong { font-size: 24px; }
  .track-facts { grid-template-columns: repeat(2, 1fr); }
  .contextual-tutorial { bottom: max(98px, calc(env(safe-area-inset-bottom) + 90px)); width: min(470px, calc(100% - 190px)); padding: 8px 10px; font-size: 10px; }
}

@media (max-height: 640px) {
  .screen { align-items: start; }
  .title-card,
  .panel { padding-block: 14px 18px; }
  h1 span { font-size: clamp(32px, 8vw, 62px); }
  h1 em { font-size: clamp(42px, 10vw, 76px); }
  .tagline { margin-top: 18px; }
  .best-line { margin-block: 10px; }
  .tutorial-grid { margin-block: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .crt-filter { opacity: .08; }
}
