:root {
  color-scheme: dark;
  --sky: #101e2b;
  --ink: #09131d;
  --panel: #162739;
  --line: #355365;
  --paper: #fdf1d7;
  --mint: #a6e1b8;
  --muted: #bbcdd0;
  --gold: #ffd785;
  background: var(--sky);
  color: var(--paper);
  font-family: system-ui, sans-serif;
  line-height: 1.56;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--mint); text-underline-offset: .2em; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
img, canvas { image-rendering: pixelated; }

.top, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem max(1rem, calc((100vw - 1320px) / 2));
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--paper);
  font-family: ui-monospace, monospace;
  font-weight: 800;
  letter-spacing: .13em;
  text-decoration: none;
}
nav { display: flex; gap: clamp(.7rem, 3vw, 2rem); }
nav a, footer a {
  color: var(--paper);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}
nav a:hover, footer a:hover { color: var(--mint); }
@media (max-width: 380px) {
  .top { gap: .75rem; }
  nav { gap: .68rem; }
  nav a { font-size: .85rem; }
}
main { max-width: 1360px; margin-inline: auto; padding: 0 clamp(.75rem, 3vw, 1.25rem) 3rem; }
#play { margin-top: clamp(1rem, 3vw, 2.5rem); }
h1 { margin: 0; line-height: 1; width: 268px; max-width: 100%; }
h1 img { display: block; width: min(100%, 268px); height: auto; }
.cabinet { border: 1px solid var(--line); background: var(--ink); }
.screen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  overflow: hidden;
}
.screen:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; }
canvas { display: block; border: 0; outline-offset: -3px; }
canvas:focus { outline: none; }
.screen:has(.splash:not([hidden])) { aspect-ratio: auto; min-height: 0; }
.screen:has(.splash:not([hidden])) > #canvas { position: absolute; }
.cabinet:has(.splash:not([hidden])) .toolbar { display: none; }
.splash {
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(270px, .74fr) minmax(0, 1.6fr);
  background: var(--ink);
}
.launch-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(1.4rem, 3.6vw, 3.4rem);
  border-right: 1px solid var(--line);
}
.launch-description { max-width: 29ch; margin: 1.1rem 0 1.55rem; color: var(--muted); }
.alley-scene {
  position: relative;
  margin: 0;
  height: clamp(300px, 29vw, 390px);
  min-height: 100%;
  overflow: hidden;
  background: #abbecb;
}
#alley-walk { width: 100%; height: 100%; position: absolute; inset: 0; }
.alley-scene figcaption {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border-left: 3px solid var(--mint);
  padding: .4rem .7rem;
  background: #102030ee;
  font: 700 .82rem/1.35 ui-monospace, monospace;
  color: var(--paper);
}
.alley-scene figcaption span { display: block; color: var(--muted); font-size: .71rem; font-weight: 400; }
button {
  cursor: pointer;
  font: 700 1rem system-ui, sans-serif;
  border: 2px solid var(--line);
  color: var(--paper);
  background: var(--panel);
  padding: .55rem 1rem;
}
button:hover { border-color: var(--mint); }
#play-button {
  background: var(--mint);
  color: var(--ink);
  border-color: #d3ebca;
  box-shadow: 0 4px 0 #33675f;
  padding: .75rem 1.45rem;
}
#play-button:disabled { opacity: .65; cursor: progress; }
#game-status { margin: .75rem 0 0; color: var(--muted); font-size: .85rem; }
.toolbar {
  min-height: 3.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  padding: .55rem 1rem;
  color: var(--muted);
  font-size: .92rem;
}
.toolbar p { margin: 0; }
.info { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem 2rem; margin-top: 2.5rem; }
.info section { border-top: 2px solid var(--line); padding: .65rem 0 1rem; }
h2 { font-size: 1.35rem; margin: .35rem 0 .65rem; }
.info p { color: var(--muted); margin: .65rem 0; max-width: 65ch; }
.controls { margin-block: 1rem; }
.controls div { display: grid; grid-template-columns: minmax(8rem, 1fr) 2fr; gap: .55rem; padding-block: .25rem; }
dd { margin: 0; }
kbd {
  font-family: ui-monospace, monospace;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: .18rem .36rem;
  color: var(--paper);
}
.source-links { margin: .65rem 0; padding-left: 1.2rem; }
.info .disclaimer { color: var(--paper); }
footer {
  display: block;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--muted);
  font-size: .92rem;
}
.footer-item { white-space: nowrap; }
.privacy-page {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding-top: clamp(1.6rem, 4vw, 3rem);
}
.privacy-page h1 { width: auto; font-size: clamp(2rem, 5vw, 2.8rem); }
.privacy-page h2 { margin-top: 1.6rem; }
.privacy-page p { color: var(--muted); }
.privacy-page time { color: var(--paper); }

@media (max-width: 640px) {
  .info { grid-template-columns: 1fr; }
  .toolbar { padding-inline: .55rem; }
  .toolbar button { padding-inline: .5rem; }
}

@media (max-width: 720px) {
  .splash { grid-template-columns: 1fr; }
  .launch-copy { padding: 1.3rem 1.4rem; border: 0; }
  .launch-description { max-width: 46ch; margin: .7rem 0 1rem; }
  .alley-scene { grid-row: 1; height: clamp(180px, 46vw, 245px); }
  .alley-scene figcaption { top: .65rem; right: .65rem; }
}
.credit-roles { margin-block: .75rem; }
.credit-roles div + div { margin-top: .45rem; }
.credit-roles dt { font-weight: 700; }
.support-links { padding-left: 1.2rem; }
