:root {
  --black: #06090d;
  --black-2: #0b1118;
  --panel: #121b24;
  --line: #33404b;
  --text: #f3f0df;
  --muted: #99a5ad;
  --cyan: #56c7d5;
  --cyan-dark: #1d7787;
  --orange: #e66b32;
  --orange-dark: #79371f;
  --yellow: #f1cc4e;
  --purple: #8f6fc7;
  --green: #74b86d;
  --max: 1320px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 18%, rgba(230, 107, 50, .15), transparent 29rem),
    radial-gradient(circle at 82% 31%, rgba(86, 199, 213, .12), transparent 31rem),
    radial-gradient(circle at 58% 90%, rgba(143, 111, 199, .07), transparent 36rem),
    var(--black);
  font-family: "Arial Narrow", "Roboto Condensed", "Liberation Sans Narrow", Arial, sans-serif;
  letter-spacing: .025em;
}

body.player-active { overflow: hidden; }

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

.grain,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.grain {
  z-index: 1000;
  opacity: .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='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.82'/%3E%3C/svg%3E");
}

.scanlines {
  z-index: 999;
  opacity: .055;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(255,255,255,.08) 4px
  );
  mix-blend-mode: overlay;
}

.topbar {
  width: min(calc(100% - 40px), var(--max));
  min-height: 78px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  justify-self: start;
  color: var(--text);
  text-decoration: none;
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -.07em;
  transform: skew(-6deg);
}

.wordmark b { color: var(--orange); }
.wordmark em { color: var(--cyan); font-style: normal; }

.top-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font: 700 .66rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .12em;
}

.status-light {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(241, 204, 78, .6);
}

.status-light.active {
  background: var(--green);
  box-shadow: 0 0 12px rgba(116, 184, 109, .75);
}

.status-light.error {
  background: var(--orange);
  box-shadow: 0 0 12px rgba(230, 107, 50, .75);
}

.topbar nav {
  justify-self: end;
  display: flex;
  gap: 26px;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .14em;
}

.topbar nav a:hover,
.topbar nav a:focus-visible { color: var(--text); }

.hero {
  position: relative;
  width: min(calc(100% - 40px), var(--max));
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  padding: 48px 0 64px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  justify-items: center;
  gap: 20px;
  overflow: hidden;
}

.eyebrow,
.section-heading > p {
  margin: 0 0 19px;
  color: var(--cyan);
  font: 700 .71rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .18em;
}

.hero h1 {
  margin: 0;
  line-height: .79;
  text-transform: uppercase;
}

.hero-small {
  display: block;
  margin: 0 0 20px 6px;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  letter-spacing: .24em;
}

.hero-main {
  display: block;
  font-size: clamp(4.4rem, 9vw, 7.9rem);
  font-weight: 900;
  letter-spacing: -.068em;
  text-shadow: 0 8px 0 rgba(0,0,0,.43);
  transform: skew(-4deg);
}

.hero-main::after {
  content: "";
  width: 58%;
  height: 8px;
  margin: 18px 0 0 10px;
  display: block;
  background: linear-gradient(90deg, var(--orange), var(--yellow), var(--cyan), transparent);
  transform: skew(4deg);
}

.lede {
  max-width: 760px;
  margin: 28px 0 26px;
  color: #c3cbd0;
  font-size: clamp(1.12rem, 2vw, 1.43rem);
  line-height: 1.52;
}

.lede strong { color: var(--text); }

.hero-status-grid {
  max-width: 700px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.hero-status-grid > div {
  min-height: 72px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 600 .6rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.hero-status-grid strong {
  color: var(--yellow);
  font-size: .65rem;
}

.hero-status-grid strong.ok { color: var(--green); }
.hero-status-grid strong.fail { color: var(--orange); }

.hero-copy {
  width: min(100%, 860px);
  justify-self: center;
}


.command-console {
  width: min(100%, 860px);
  margin-top: 6px;
  justify-self: center;
  border: 1px solid #465562;
  background: #101820;
  box-shadow: 14px 14px 0 rgba(0,0,0,.18);
  transform: none;
}

.console-header {
  min-height: 40px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #465562;
  color: #d8e0e3;
  background: #24313a;
  font: 700 .52rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .09em;
}

.console-body {
  min-height: auto;
  padding: 18px 18px 18px;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  column-gap: 24px;
  row-gap: 8px;
  align-items: center;
  color: #7ee1e4;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.15), rgba(0,0,0,.15) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle, rgba(86,199,213,.08), transparent 70%),
    #071116;
  font: 600 clamp(.62rem, .82vw, .74rem)/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-shadow: 0 0 8px rgba(126,225,228,.2);
}

.console-body p { margin: 0; grid-column: 2; }
.console-body strong { color: #e8fbfc; }

.pixel-helmet {
  position: relative;
  width: 116px;
  height: 102px;
  margin: 0 auto;
  grid-column: 1;
  grid-row: 1 / span 6;
  align-self: center;
}

.helmet-shell {
  position: absolute;
  left: 14px;
  top: 6px;
  width: 86px;
  height: 82px;
  background: var(--yellow);
  clip-path: polygon(18% 0, 82% 0, 100% 22%, 100% 78%, 84% 100%, 16% 100%, 0 77%, 0 23%);
  box-shadow: 0 0 27px rgba(241,204,78,.16);
}

.helmet-ear {
  position: absolute;
  left: 0;
  top: 34px;
  width: 28px;
  height: 40px;
  background: var(--orange);
  box-shadow: 88px 0 0 var(--orange);
}

.helmet-visor {
  position: absolute;
  left: 23px;
  top: 28px;
  width: 74px;
  height: 31px;
  border: 7px solid #101820;
  background: var(--cyan);
  transform: skew(-8deg);
}

.helmet-shine {
  position: absolute;
  left: 37px;
  top: 35px;
  width: 16px;
  height: 6px;
  background: #d5ffff;
  transform: skew(-8deg);
}

.console-meter {
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  grid-column: 2;
}

.console-meter span {
  height: 22px;
  background: var(--cyan-dark);
}

.console-meter span:nth-child(n+7) { background: var(--orange); }

.console-alert { grid-column: 2; animation: blink 1s steps(2, start) infinite; }

@keyframes blink { 50% { opacity: .28; } }

.hero-code {
  position: absolute;
  right: -1rem;
  top: 11%;
  z-index: -1;
  color: rgba(255,255,255,.016);
  font-size: clamp(12rem, 27vw, 27rem);
  font-weight: 900;
  line-height: .72;
  letter-spacing: -.08em;
}

.hazard-stripe {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(100%, 1180px);
  height: 14px;
  opacity: .55;
  background: repeating-linear-gradient(
    -45deg,
    var(--yellow),
    var(--yellow) 12px,
    #171d22 12px,
    #171d22 24px
  );
}

/* Compact mission cards embedded in the opening screen. */
.hero-episodes {
  width: 100%;
  max-width: 860px;
  margin-top: 16px;
  gap: 16px;
  align-items: stretch;
}

.hero-episodes .episode-card {
  display: grid;
  grid-template-rows: 176px minmax(0, 1fr);
  min-width: 0;
  background: rgba(9, 14, 19, .88);
  box-shadow: 0 13px 25px rgba(0,0,0,.28);
}

.hero-episodes .episode-art {
  min-height: 176px;
}

.hero-episodes .planet {
  right: 31px;
  top: 22px;
  width: 74px;
  height: 74px;
}

.hero-episodes .rocket {
  left: 24%;
  top: 30px;
  width: 86px;
  height: 146px;
  transform: rotate(10deg) scale(.76);
  transform-origin: top left;
}

.hero-episodes .moon {
  left: 31px;
  top: 24px;
  width: 60px;
  height: 60px;
}

.hero-episodes .oracle {
  top: 24px;
  transform: translateX(-50%) scale(.72);
  transform-origin: top center;
}

.hero-episodes .mars-ground,
.hero-episodes .oracle-ground {
  height: 58px;
}

.hero-episodes .episode-copy {
  padding: 19px 20px 20px;
  display: flex;
  flex-direction: column;
}

.hero-episodes .episode-index {
  margin-bottom: 13px;
  font-size: .52rem;
}

.hero-episodes .series {
  margin-bottom: 8px;
  font-size: .56rem;
}

.hero-episodes .episode-copy h3 {
  font-size: clamp(1.95rem, 2.3vw, 2.55rem);
  line-height: .9;
}

.hero-episodes .episode-copy > p:not(.series) {
  min-height: 46px;
  margin: 13px 0 13px;
  font-size: .8rem;
  line-height: 1.45;
}

.hero-episodes .episode-copy dl {
  margin-bottom: 14px;
}

.hero-episodes .episode-copy dl div {
  min-height: 27px;
  font-size: .5rem;
}
.hero-episodes .episode-copy dd {
  white-space: nowrap;
}


.hero-episodes .episode-actions {
  margin-top: auto;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.hero-episodes .launch-button,
.hero-episodes .fullscreen-button {
  min-height: 42px;
}

.hero-episodes .launch-button {
  padding: 0 13px;
  gap: 10px;
}

.hero-episodes .launch-button strong {
  font-size: .69rem;
}

.hero-episodes .launch-button small {
  margin-top: 3px;
  font-size: .47rem;
}

.hero-episodes .fullscreen-button {
  padding: 0 12px;
  font-size: .5rem;
}

.controls {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 108px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 44px;
}

.section-heading.compact { margin-bottom: 28px; }

.section-heading h2 {
  margin: 0;
  text-transform: uppercase;
  font-size: clamp(2.55rem, 6vw, 5.2rem);
  line-height: .9;
  letter-spacing: -.035em;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
}

.episode-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.018);
  overflow: hidden;
}

.episode-art {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.mars-art {
  background:
    radial-gradient(circle at 76% 24%, rgba(255,255,255,.13) 0 2px, transparent 3px),
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.13) 0 2px, transparent 3px),
    radial-gradient(circle at 43% 30%, rgba(255,255,255,.09) 0 1px, transparent 2px),
    linear-gradient(#161222, #3b1720 57%, #6f2b1d 58%, #b14d25);
}

.oracle-art {
  background:
    radial-gradient(circle at 73% 19%, rgba(255,255,255,.16) 0 2px, transparent 3px),
    radial-gradient(circle at 19% 26%, rgba(255,255,255,.12) 0 2px, transparent 3px),
    radial-gradient(circle at 46% 12%, rgba(255,255,255,.1) 0 1px, transparent 2px),
    linear-gradient(#11162b, #182f3d 59%, #1e544e 60%, #39735e);
}

.planet {
  position: absolute;
  right: 47px;
  top: 35px;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 36%, rgba(255,255,255,.18), transparent 16%),
    repeating-linear-gradient(13deg, #bd4f26 0 11px, #8d321f 12px 19px);
  box-shadow: 0 0 38px rgba(230,107,50,.2);
}

.rocket {
  position: absolute;
  left: 23%;
  top: 62px;
  width: 110px;
  height: 200px;
  transform: rotate(11deg);
}

.rocket-body {
  position: absolute;
  left: 31px;
  top: 0;
  width: 55px;
  height: 145px;
  background: #e9e4d3;
  clip-path: polygon(50% 0, 100% 27%, 100% 80%, 50% 100%, 0 80%, 0 27%);
}

.rocket-window {
  position: absolute;
  left: 45px;
  top: 43px;
  width: 27px;
  height: 22px;
  border: 6px solid #222b35;
  border-radius: 50%;
  background: var(--cyan);
}

.rocket-fin {
  position: absolute;
  top: 104px;
  width: 32px;
  height: 46px;
  background: var(--orange);
}

.rocket-fin.left {
  left: 8px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.rocket-fin.right {
  right: 0;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.rocket-flame {
  position: absolute;
  left: 42px;
  top: 138px;
  width: 32px;
  height: 54px;
  background: linear-gradient(var(--yellow), var(--orange));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.mars-ground,
.oracle-ground {
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: -12px;
  height: 80px;
}

.mars-ground {
  background: repeating-linear-gradient(-9deg, #5a2319 0 28px, #7f301e 29px 54px);
  clip-path: polygon(0 48%, 12% 26%, 25% 55%, 38% 17%, 54% 50%, 72% 20%, 100% 45%, 100% 100%, 0 100%);
}

.moon {
  position: absolute;
  left: 48px;
  top: 38px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: #9fbcd1;
  box-shadow: 0 0 34px rgba(159,188,209,.18);
}

.oracle {
  position: absolute;
  left: 50%;
  top: 42px;
  width: 160px;
  height: 230px;
  transform: translateX(-50%);
}

.oracle-head {
  position: absolute;
  left: 20px;
  top: 0;
  width: 120px;
  height: 145px;
  border-radius: 48% 48% 44% 44%;
  background: #9dd783;
  clip-path: polygon(21% 0, 79% 0, 100% 27%, 92% 78%, 69% 100%, 31% 100%, 8% 78%, 0 27%);
}

.oracle-eye {
  position: absolute;
  top: 54px;
  width: 31px;
  height: 38px;
  border: 8px solid #17242a;
  border-radius: 50%;
  background: var(--yellow);
}

.oracle-eye.left { left: 41px; }
.oracle-eye.right { right: 41px; }

.oracle-mouth {
  position: absolute;
  left: 60px;
  top: 111px;
  width: 40px;
  height: 13px;
  border-bottom: 7px solid #28402d;
}

.oracle-neck {
  position: absolute;
  left: 59px;
  top: 135px;
  width: 42px;
  height: 74px;
  background: #70b467;
}

.oracle-ground {
  background: repeating-linear-gradient(8deg, #17433f 0 28px, #256158 29px 54px);
  clip-path: polygon(0 48%, 12% 26%, 25% 55%, 38% 17%, 54% 50%, 72% 20%, 100% 45%, 100% 100%, 0 100%);
}

.episode-copy { padding: 31px; }

.episode-index {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
  color: var(--muted);
  font: 700 .61rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .12em;
}

.series {
  margin: 0 0 11px;
  color: var(--cyan);
  font: 700 .65rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .14em;
}

.episode-one .series { color: var(--orange); }

.episode-copy h3 {
  margin: 0;
  font-size: clamp(2.45rem, 5vw, 4.8rem);
  line-height: .83;
  letter-spacing: -.045em;
}

.episode-copy > p:not(.series) {
  min-height: 75px;
  margin: 25px 0;
  color: #bbc4ca;
  font-size: 1.02rem;
  line-height: 1.5;
}

.episode-copy dl {
  margin: 0 0 27px;
  border-top: 1px solid var(--line);
}

.episode-copy dl div {
  min-height: 36px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font: 700 .6rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.episode-copy dt { color: var(--muted); }
.episode-copy dd { margin: 0; color: var(--text); text-align: right; }

.episode-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.launch-button,
.fullscreen-button {
  min-height: 61px;
  cursor: pointer;
}

.launch-button {
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: white;
  border: 1px solid #278795;
  background: linear-gradient(135deg, #3bb3c2, #1a6070);
  text-align: left;
}

.episode-one .launch-button {
  border-color: #b94f25;
  background: linear-gradient(135deg, #dc632f, #78301d);
}

.launch-button strong,
.launch-button small { display: block; }

.launch-button strong {
  font-size: .9rem;
  letter-spacing: .12em;
}

.launch-button small {
  margin-top: 5px;
  opacity: .72;
  font: 600 .56rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.fullscreen-button {
  padding: 0 17px;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.launch-button:hover,
.launch-button:focus-visible,
.fullscreen-button:hover,
.fullscreen-button:focus-visible {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.launch-button:disabled,
.fullscreen-button:disabled {
  cursor: not-allowed;
  filter: grayscale(.6);
  opacity: .45;
  transform: none;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.control-grid article {
  min-height: 145px;
  padding: 25px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.012);
}

.control-grid article > p {
  margin: 0 0 23px;
  color: var(--muted);
  font: 700 .65rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .12em;
}

.control-grid article > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

kbd {
  min-width: 38px;
  padding: 9px 10px;
  border: 1px solid #53616d;
  border-bottom-width: 3px;
  border-radius: 3px;
  color: var(--text);
  background: #202a33;
  text-align: center;
  font: 700 .7rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.control-note {
  margin: 22px 0 0;
  color: var(--muted);
  font: .67rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.footer {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 38px 0 55px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 35px;
  border-top: 1px solid var(--line);
  color: #75818a;
  font: .64rem/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.footer p { max-width: 940px; margin: 0; }
.footer a { color: #aebac2; }

.player-view {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr) 35px;
  color: var(--text);
  background: #020304;
}

.player-view[hidden] { display: none; }

.player-toolbar,
.player-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #141b22;
}

.player-toolbar {
  padding: 0 13px 0 17px;
  border-bottom: 1px solid var(--line);
}

.player-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-brand strong {
  font-size: .82rem;
  letter-spacing: .12em;
}

.player-brand small {
  color: var(--muted);
  font: 600 .58rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.player-actions {
  display: flex;
  gap: 8px;
}

.player-actions button {
  padding: 8px 11px;
  border: 1px solid #4a5965;
  color: var(--text);
  background: #25313a;
  cursor: pointer;
  font: 700 .58rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.player-actions button:hover { border-color: var(--cyan); }

.player-shell {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
}

#game-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 30px;
  color: var(--text);
  background: #070b0f;
  text-align: center;
}

.player-cover.hidden { display: none; }

.player-cover p {
  margin: 0;
  font: 800 .76rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .13em;
}

.player-cover small {
  color: var(--muted);
  font: .64rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.loader {
  width: 44px;
  height: 44px;
  border: 3px solid #29343d;
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin .85s linear infinite;
}

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

.player-hint {
  padding: 0 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 600 .56rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .07em;
}

.error-dialog {
  max-width: 520px;
  padding: 28px;
  border: 1px solid #71402c;
  color: var(--text);
  background: #15110e;
}

.error-dialog::backdrop { background: rgba(0,0,0,.82); }

.error-dialog h2 {
  margin: 0 0 15px;
  color: var(--orange);
  font-size: 1.5rem;
}

.error-dialog p {
  color: var(--muted);
  line-height: 1.5;
}

.error-dialog > div {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.error-dialog a,
.error-dialog button {
  padding: 10px 13px;
  border: 1px solid var(--line);
  color: var(--text);
  background: #262b2f;
  text-decoration: none;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 800;
}

@media (max-width: 1040px) {
  .topbar { grid-template-columns: 1fr auto; }
  .top-status { display: none; }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 62px;
    padding-bottom: 84px;
  }

  .command-console {
    width: min(100%, 860px);
    max-width: 860px;
    margin-top: 0;
    justify-self: center;
  }

  .hero-episodes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


@media (max-width: 680px) {
  .topbar,
  .hero,
  .episodes,
  .controls,
  .footer {
    width: min(calc(100% - 28px), var(--max));
  }

  .topbar { min-height: 66px; }
  .wordmark { font-size: 1.62rem; }

  .topbar nav { gap: 12px; }
  .topbar nav a { font-size: .58rem; letter-spacing: .06em; }

  .hero {
    padding: 54px 0 92px;
    gap: 28px;
  }

  .hero-main { font-size: clamp(3.5rem, 20vw, 6rem); }

  .hero-status-grid { grid-template-columns: 1fr; }

  .hero-episodes {
    grid-template-columns: 1fr;
  }

  .command-console {
    width: 100%;
  }

  .console-body {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .pixel-helmet {
    grid-column: 1;
    grid-row: auto;
    margin-bottom: 8px;
  }

  .console-body p,
  .console-meter,
  .console-alert {
    grid-column: 1;
  }

  .hero-episodes .episode-card {
    grid-template-rows: 190px minmax(0, 1fr);
  }

  .hero-episodes .episode-art { min-height: 190px; }

  .command-console { transform: none; }
  .console-header { font-size: .49rem; }
  .console-body { min-height: 370px; padding: 22px; }

  .controls { padding: 80px 0; }

  .episode-art { min-height: 260px; }
  .episode-copy { padding: 24px; }

  .episode-actions { grid-template-columns: 1fr; }
  .fullscreen-button { min-height: 48px; }

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

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

  .player-brand small { display: none; }
  .player-actions button:first-child { display: none; }
  .player-hint { font-size: .49rem; }
  .player-hint span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .console-alert,
  .loader { animation: none; }
}
