:root {
  color-scheme: dark;
  --ink: #16161d;
  --ink-soft: #24242f;
  --paper: #f2eee4;
  --paper-dim: #d7d2c7;
  --acid: #c9ff57;
  --violet: #8f74ff;
  --orange: #ff7a4e;
  --cyan: #59e1db;
  --line: rgba(242, 238, 228, 0.16);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
  font-family: "Arial Narrow", "Avenir Next Condensed", "DIN Condensed", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 72% 2%, rgba(143, 116, 255, 0.17), transparent 30rem),
    var(--ink);
  line-height: 1.45;
}

body.player-open {
  overflow: hidden;
}

button,
input,
a {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--acid);
  outline-offset: 4px;
}

a {
  color: inherit;
}

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

.site-header,
.site-footer,
.hero,
.library,
.system-notes {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  letter-spacing: 0.08em;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  margin-top: 5px;
  color: var(--paper-dim);
  font: 600 9px/1 Arial, sans-serif;
  letter-spacing: 0.25em;
}

.brand-mark {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 7px);
  grid-template-rows: repeat(2, 7px);
  gap: 3px;
  width: 25px;
  height: 25px;
  transform: rotate(45deg);
}

.brand-mark i {
  background: var(--acid);
}

.brand-mark i:nth-child(2),
.brand-mark i:nth-child(3) {
  opacity: 0.42;
}

.header-status,
.save-status {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--paper-dim);
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 0.14em;
}

.status-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 16px var(--acid);
}

.hero {
  min-height: 720px;
  padding: 84px 0 104px;
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: clamp(40px, 8vw, 110px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--acid);
  font: 800 11px/1 Arial, sans-serif;
  letter-spacing: 0.2em;
}

.hero h1 {
  max-width: 670px;
  margin: 0;
  font-size: clamp(62px, 8vw, 112px);
  font-weight: 900;
  line-height: 0.79;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.hero h1 em {
  color: var(--violet);
  font-style: normal;
}

.hero-lede {
  max-width: 500px;
  margin: 36px 0 30px;
  color: var(--paper-dim);
  font-family: Arial, sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

.hero-cta {
  display: inline-flex;
  gap: 24px;
  align-items: center;
  padding: 14px 0;
  color: var(--paper);
  border-bottom: 1px solid var(--paper);
  font: 800 12px/1 Arial, sans-serif;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.hero-cta span {
  color: var(--acid);
  font-size: 20px;
  transition: transform 180ms ease;
}

.hero-cta:hover span {
  transform: translateY(4px);
}

.hero-console {
  position: relative;
  width: min(100%, 570px);
  aspect-ratio: 1.37;
  justify-self: end;
  padding: 52px 54px 35px;
  color: #191922;
  border-radius: 38px 38px 70px 70px;
  background: #d7d2c7;
  box-shadow:
    inset 0 -13px 0 #aba69d,
    inset 0 3px 0 #f9f5eb,
    0 55px 100px rgba(0, 0, 0, 0.5);
  transform: rotate(2deg);
}

.console-edge--top {
  position: absolute;
  top: 20px;
  left: 44px;
  right: 44px;
  height: 10px;
  border-top: 2px solid #aaa69e;
  border-bottom: 2px solid #f9f5eb;
}

.console-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 13px solid #262630;
  border-radius: 14px;
  background: #b8ee4c;
  box-shadow: inset 0 0 30px rgba(22, 22, 29, 0.34);
}

.screen-scanlines,
.console-screen::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.screen-scanlines {
  opacity: 0.17;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, #16161d 4px);
}

.console-screen::after {
  background: radial-gradient(circle at 50% 40%, transparent 45%, rgba(22, 22, 29, 0.24));
}

.screen-copy {
  position: absolute;
  inset: 22px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  color: #1d2510;
  font-family: "Courier New", monospace;
}

.screen-copy span {
  align-self: start;
  font-size: 9px;
  letter-spacing: 0.15em;
}

.screen-copy strong {
  align-self: end;
  grid-column: 1;
  font-size: clamp(28px, 4.8vw, 58px);
  line-height: 0.82;
}

.screen-ship {
  grid-row: 1 / 3;
  grid-column: 2;
  font-size: clamp(26px, 4vw, 54px);
  transform: rotate(90deg);
}

.console-controls {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 12px 0;
}

.dpad {
  position: relative;
  width: 80px;
  height: 80px;
}

.dpad i {
  position: absolute;
  top: 27px;
  left: 0;
  width: 80px;
  height: 28px;
  border-radius: 5px;
  background: #292934;
  box-shadow: inset 0 -4px rgba(0, 0, 0, 0.28);
}

.dpad i:last-child {
  transform: rotate(90deg);
}

.speaker {
  display: flex;
  gap: 6px;
  transform: rotate(-12deg);
}

.speaker i {
  width: 4px;
  height: 38px;
  border-radius: 999px;
  background: #aaa59c;
}

.console-buttons {
  display: flex;
  gap: 13px;
  transform: rotate(-12deg);
}

.console-buttons b {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  color: #f2eee4;
  border-radius: 50%;
  background: #8f74ff;
  box-shadow: inset 0 -5px rgba(0, 0, 0, 0.2);
  font: 800 12px/1 Arial, sans-serif;
}

.console-label {
  margin-top: 17px;
  text-align: center;
  font: 700 8px/1 Arial, sans-serif;
  letter-spacing: 0.3em;
}

.library {
  padding: 100px 0 130px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
}

.section-heading h2,
.system-notes h2 {
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.section-heading > p {
  max-width: 300px;
  margin: 0 0 6px;
  color: var(--paper-dim);
  font: 13px/1.65 Arial, sans-serif;
}

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

.game-card {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  padding: 0;
  color: var(--paper);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--ink-soft);
  cursor: pointer;
  isolation: isolate;
}

.game-card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(150deg, transparent 40%, rgba(255, 255, 255, 0.04));
}

.game-card::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  content: "";
  border: 0 solid var(--game-accent);
  pointer-events: none;
  transition: border-width 180ms ease;
}

.game-card:hover::after,
.game-card:focus-visible::after {
  border-width: 5px;
}

.card-cover {
  position: relative;
  height: 245px;
  overflow: hidden;
  color: var(--ink);
  background: var(--game-accent);
}

.card-cover::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(22, 22, 29, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 22, 29, 0.25) 1px, transparent 1px);
  background-size: 16px 16px;
}

.cover-number {
  position: absolute;
  top: 23px;
  left: 26px;
  z-index: 2;
  font: 900 11px/1 Arial, sans-serif;
  letter-spacing: 0.15em;
}

.cover-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.game-card:hover .cover-art {
  transform: scale(1.06) rotate(-1deg);
}

.pixel-art {
  position: relative;
  width: 176px;
  height: 112px;
  filter: drop-shadow(13px 13px 0 rgba(22, 22, 29, 0.15));
}

.pixel-art span,
.pixel-art i,
.pixel-art b {
  position: absolute;
  display: block;
  background: var(--ink);
}

.art-microtd .tower {
  bottom: 9px;
  left: 21px;
  width: 32px;
  height: 68px;
  box-shadow: 64px 10px 0 var(--ink), 118px -9px 0 var(--ink);
}

.art-microtd .tower::before {
  position: absolute;
  top: -13px;
  left: -8px;
  width: 48px;
  height: 18px;
  content: "";
  background: var(--ink);
}

.art-microtd .path {
  left: 0;
  bottom: 0;
  width: 176px;
  height: 8px;
}

.art-microtd .enemy {
  top: 28px;
  left: 76px;
  width: 14px;
  height: 14px;
  box-shadow: 24px 34px 0 var(--ink), -4px 58px 0 var(--ink);
}

.art-evade .ship {
  top: 36px;
  left: 54px;
  width: 68px;
  height: 38px;
  clip-path: polygon(0 42%, 64% 42%, 64% 0, 100% 50%, 64% 100%, 64% 58%, 0 58%);
}

.art-evade .laser {
  top: 53px;
  left: 0;
  width: 44px;
  height: 5px;
  box-shadow: 122px -31px 0 var(--ink), 139px 39px 0 var(--ink);
}

.art-evade .star {
  top: 10px;
  left: 16px;
  width: 7px;
  height: 7px;
  box-shadow: 144px 12px 0 var(--ink), 22px 83px 0 var(--ink), 132px 76px 0 var(--ink);
}

.art-microcity .ground {
  bottom: 5px;
  left: 0;
  width: 176px;
  height: 9px;
}

.art-microcity .building-one {
  bottom: 14px;
  left: 17px;
  width: 48px;
  height: 68px;
  box-shadow: 96px 14px 0 var(--ink);
}

.art-microcity .building-two {
  bottom: 14px;
  left: 75px;
  width: 55px;
  height: 92px;
}

.art-microcity .windows {
  bottom: 28px;
  left: 28px;
  width: 8px;
  height: 9px;
  background: var(--game-accent);
  box-shadow:
    17px 0 0 var(--game-accent), 0 -22px 0 var(--game-accent), 17px -22px 0 var(--game-accent),
    59px 0 0 var(--game-accent), 76px 0 0 var(--game-accent), 59px -23px 0 var(--game-accent),
    76px -23px 0 var(--game-accent), 59px -46px 0 var(--game-accent), 76px -46px 0 var(--game-accent),
    113px 0 0 var(--game-accent), 130px 0 0 var(--game-accent), 113px -20px 0 var(--game-accent),
    130px -20px 0 var(--game-accent);
}

.art-dark .arch {
  bottom: 0;
  left: 32px;
  width: 112px;
  height: 105px;
  border-radius: 58px 58px 0 0;
}

.art-dark .door {
  bottom: 0;
  left: 53px;
  width: 70px;
  height: 78px;
  border-radius: 37px 37px 0 0;
  background: var(--game-accent);
}

.art-dark .eyes {
  top: 55px;
  left: 72px;
  width: 8px;
  height: 8px;
  background: var(--ink);
  box-shadow: 25px 0 0 var(--ink);
}

.card-body {
  padding: 23px 26px 26px;
}

.card-meta,
.dialog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  color: var(--paper-dim);
  font: 700 9px/1 Arial, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card-meta span:not(:last-child)::after,
.dialog-meta span:not(:last-child)::after {
  margin-left: 14px;
  color: var(--game-accent, var(--acid));
  content: "◆";
  font-size: 6px;
}

.card-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
}

.card-title-row h3 {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.card-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  color: var(--ink);
  border-radius: 50%;
  background: var(--game-accent);
  font-size: 18px;
  transition: transform 180ms ease;
}

.game-card:hover .card-arrow {
  transform: rotate(-35deg);
}

.system-notes {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 80px;
  padding: 100px 0 120px;
  border-top: 1px solid var(--line);
}

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

.note-grid article {
  min-height: 250px;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
}

.note-grid article:last-child {
  border-right: 0;
}

.note-grid span {
  color: var(--acid);
  font: 800 10px/1 Arial, sans-serif;
}

.note-grid h3 {
  margin: 90px 0 12px;
  font-size: 22px;
  text-transform: uppercase;
}

.note-grid p {
  margin: 0;
  color: var(--paper-dim);
  font: 12px/1.65 Arial, sans-serif;
}

.site-footer {
  min-height: 130px;
  display: flex;
  align-items: center;
  gap: 38px;
  border-top: 1px solid var(--line);
  color: var(--paper-dim);
  font: 10px/1.4 Arial, sans-serif;
  letter-spacing: 0.08em;
}

.site-footer p {
  margin-left: auto;
}

.site-footer > a {
  color: var(--acid);
  text-underline-offset: 4px;
}

.game-dialog {
  width: min(920px, calc(100% - 32px));
  max-height: min(720px, calc(100dvh - 32px));
  padding: 0;
  color: var(--paper);
  border: 1px solid rgba(242, 238, 228, 0.28);
  border-radius: 4px;
  background: #202029;
  box-shadow: var(--shadow);
}

.game-dialog[open] {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
}

.game-dialog::backdrop {
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(12px);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  width: 42px;
  height: 42px;
  color: var(--paper);
  border: 1px solid rgba(242, 238, 228, 0.35);
  border-radius: 50%;
  background: rgba(22, 22, 29, 0.6);
  cursor: pointer;
  font-size: 26px;
}

.dialog-cover {
  min-height: 570px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--game-accent);
}

.dialog-cover .pixel-art {
  transform: scale(1.5);
}

.dialog-content {
  padding: 64px 54px 50px;
  overflow: auto;
}

.dialog-content h2 {
  margin: 22px 0 5px;
  font-size: clamp(50px, 7vw, 84px);
  line-height: 0.85;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.dialog-subtitle {
  margin: 0;
  color: var(--game-accent);
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
}

.dialog-description {
  margin: 27px 0;
  color: var(--paper-dim);
  font: 14px/1.8 Arial, sans-serif;
}

.dialog-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dialog-facts div {
  min-width: 0;
}

.dialog-facts dt {
  color: var(--paper-dim);
  font: 700 8px/1 Arial, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dialog-facts dd {
  margin: 7px 0 0;
  font-size: 15px;
  font-weight: 800;
}

.dialog-actions {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 30px;
}

.primary-button,
.secondary-button,
.back-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  min-width: 190px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  color: var(--ink);
  background: var(--game-accent, var(--acid));
  font: 800 12px/1 Arial, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.text-link {
  color: var(--paper-dim);
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 0.08em;
  text-underline-offset: 5px;
}

.player-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: auto;
  color: var(--paper);
  background:
    radial-gradient(circle at 20% 0%, rgba(201, 255, 87, 0.08), transparent 28rem),
    #101016;
}

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

.player-header {
  position: sticky;
  top: 0;
  z-index: 8;
  min-height: 80px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 16, 22, 0.9);
  backdrop-filter: blur(14px);
}

.back-button {
  justify-self: start;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  color: var(--paper-dim);
  background: transparent;
  font: 800 10px/1 Arial, sans-serif;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.back-button span {
  color: var(--acid);
  font-size: 20px;
}

.player-heading {
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.player-heading span {
  color: var(--acid);
  font: 800 9px/1 Arial, sans-serif;
}

.player-heading h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.player-header .save-status {
  justify-self: end;
}

.player-layout {
  min-height: calc(100dvh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
}

.device-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 38px;
  overflow: auto;
}

.device-shell {
  max-width: 100%;
  padding: 27px 30px 20px;
  border: 1px solid rgba(242, 238, 228, 0.21);
  border-radius: 18px 18px 30px 30px;
  background: #25252f;
  box-shadow:
    inset 0 -7px 0 #18181f,
    0 30px 80px rgba(0, 0, 0, 0.43);
}

.device-brandline,
.device-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #777784;
  font: 800 8px/1 Arial, sans-serif;
  letter-spacing: 0.18em;
}

.device-brandline {
  margin-bottom: 15px;
}

.device-brandline span {
  color: var(--paper);
  font-size: 11px;
}

.screen-bezel {
  position: relative;
  width: min(var(--screen-width, 512px), calc(100vw - 420px));
  min-width: 256px;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 11px solid #09090d;
  border-radius: 9px;
  background: #050507;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.85);
  transition: width 180ms ease;
}

.screen-bezel iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #050507;
}

.player-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: #c9ff57;
  background: #10150b;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
}

.player-loading.is-hidden {
  display: none;
}

.player-loading b {
  font-size: 12px;
  letter-spacing: 0.1em;
}

.player-loading small {
  color: #7e9e3e;
  font-size: 9px;
}

.loading-pixels {
  display: flex;
  gap: 6px;
}

.loading-pixels i {
  width: 8px;
  height: 8px;
  background: #c9ff57;
  animation: loading 900ms steps(2, end) infinite;
}

.loading-pixels i:nth-child(2) {
  animation-delay: 150ms;
}

.loading-pixels i:nth-child(3) {
  animation-delay: 300ms;
}

@keyframes loading {
  50% { opacity: 0.15; }
}

.device-bottom {
  margin-top: 14px;
}

.focus-hint {
  margin: 22px 0 0;
  color: #777784;
  font: 9px/1.4 Arial, sans-serif;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.control-panel {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: #15151d;
}

.control-panel > section,
.panel-actions {
  padding: 27px 26px;
  border-bottom: 1px solid var(--line);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 23px;
  color: var(--paper);
  font: 800 10px/1 Arial, sans-serif;
  letter-spacing: 0.17em;
}

.panel-heading small,
.panel-heading output {
  color: var(--acid);
  font: inherit;
}

.key-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.direction-keys {
  width: 112px;
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 4px;
}

.direction-keys kbd:first-child {
  grid-column: 2;
}

.direction-keys kbd:nth-child(2) {
  grid-column: 1;
}

kbd {
  min-width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  color: var(--paper);
  border: 1px solid #41414f;
  border-radius: 4px;
  background: #282833;
  box-shadow: inset 0 -3px rgba(0, 0, 0, 0.28);
  font: 800 11px/1 Arial, sans-serif;
}

.action-keys {
  display: flex;
  gap: 13px;
}

.action-keys div {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
}

.action-keys kbd {
  width: 42px;
  height: 42px;
  color: var(--ink);
  border: 0;
  border-radius: 50%;
  background: var(--violet);
}

.action-keys span {
  color: #777784;
  font: 700 8px/1 Arial, sans-serif;
  letter-spacing: 0.08em;
}

.range-control {
  display: block;
  color: var(--paper-dim);
  font: 10px/1 Arial, sans-serif;
  letter-spacing: 0.08em;
}

.range-control > span:first-child {
  display: block;
  margin-bottom: 14px;
}

input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 0;
  appearance: none;
  border-radius: 999px;
  background: #3a3a46;
}

input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(201, 255, 87, 0.1);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: var(--acid);
  cursor: pointer;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: #777784;
}

.range-labels i {
  font-style: normal;
}

.secondary-button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding: 0 15px;
  color: var(--paper);
  border: 1px solid #41414f;
  background: transparent;
  font: 800 10px/1 Arial, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.secondary-button:hover {
  border-color: var(--acid);
}

.secondary-button b {
  color: var(--acid);
  font-size: 17px;
}

.panel-actions {
  margin-top: auto;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.panel-actions .secondary-button {
  margin-top: 0;
}

.panel-actions p {
  margin: 12px 0 0;
  color: #777784;
  font: 9px/1.6 Arial, sans-serif;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

  .system-notes {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .player-layout {
    grid-template-columns: 1fr;
  }

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

  .control-panel > section,
  .panel-actions {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .panel-actions {
    margin-top: 0;
  }

  .screen-bezel {
    width: min(var(--screen-width, 512px), calc(100vw - 100px));
  }
}

@media (max-width: 720px) {
  .site-header,
  .site-footer,
  .hero,
  .library,
  .system-notes {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    min-height: 74px;
  }

  .header-status {
    font-size: 8px;
  }

  .hero {
    min-height: auto;
    padding: 64px 0 86px;
  }

  .hero h1 {
    font-size: clamp(58px, 18vw, 92px);
  }

  .hero-console {
    padding: 40px 30px 28px;
    border-radius: 26px 26px 45px 45px;
  }

  .console-controls {
    transform: scale(0.82);
    margin: -3px -20px -8px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 20px;
  }

  .game-grid,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .note-grid article {
    min-height: 185px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .note-grid article:last-child {
    border-bottom: 0;
  }

  .note-grid h3 {
    margin-top: 56px;
  }

  .site-footer {
    padding: 35px 0;
    flex-wrap: wrap;
  }

  .site-footer p {
    width: 100%;
    margin: 0;
  }

  .game-dialog[open] {
    display: block;
  }

  .dialog-cover {
    min-height: 250px;
  }

  .dialog-cover .pixel-art {
    transform: scale(1.05);
  }

  .dialog-content {
    padding: 40px 28px;
  }

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

  .player-header {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .player-heading {
    display: none;
  }

  .save-status span:last-child {
    display: none;
  }

  .device-column {
    padding: 30px 12px;
  }

  .device-shell {
    padding: 20px 14px 17px;
  }

  .screen-bezel {
    min-width: 0;
    width: min(var(--screen-width, 512px), calc(100vw - 56px));
    border-width: 7px;
  }

  .control-panel {
    display: block;
  }

  .control-panel > section,
  .panel-actions {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@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;
  }
}
