:root {
  color-scheme: dark;
  --ink: #e9eff2;
  --muted: #adbcc8;
  --paper: #0b131b;
  --panel: #111e29;
  --line: #344957;
  --accent: #93dbd1;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: var(--accent); }
.bar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1rem max(1rem, calc((100vw - 68rem) / 2)); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
main { width: min(68rem, calc(100% - 2rem)); margin: 0 auto 3rem; }
section { margin: 1.6rem 0; }
.hero { padding: clamp(1.35rem, 6vw, 5rem); background: radial-gradient(ellipse at 100% 10%, #213b45, transparent 67%), var(--panel); border: 1px solid var(--line); border-radius: 1rem; }
.eyebrow { color: var(--accent); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.kanji { font-size: clamp(1.4rem, 5vw, 2.5rem); color: var(--muted); margin: .3rem 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 7vw, 5.25rem); margin: .28em 0; letter-spacing: -.05em; }
p { max-width: 66ch; }
button, .button, input, select { font: inherit; }
button, .button, select { border: 1px solid var(--line); padding: .47rem .72rem; border-radius: .4rem; color: var(--ink); background: #182a36; }
button, .button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
.button { display: inline-block; text-decoration: none; }
.primary { color: #071818; background: var(--accent); font-weight: 700; }
:focus-visible { outline: .15rem solid var(--accent); outline-offset: .16rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: .8rem; }
.cards a, .panel { display: block; padding: 1.15rem; border-radius: .65rem; border: 1px solid var(--line); background: var(--panel); }
.cards a { text-decoration: none; }
.cards strong, .cards span { display: block; }
.cards span, .muted { color: var(--muted); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.panel h2:first-child { margin-top: 0; }
input[type="search"], input[type="text"] { min-width: 0; max-width: 100%; padding: .42rem .6rem; background: var(--paper); border: 1px solid var(--line); color: var(--ink); border-radius: .35rem; }
input[type="range"] { accent-color: var(--accent); }
kbd, code { color: var(--accent); }
[hidden] { display: none !important; }
#emulator { width: min(100%, 52rem); aspect-ratio: 4 / 3; min-height: 14rem; background: #080d12; margin: 1rem auto; }
.intro-caption { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); z-index: 12; margin: 0; padding: .35em .7em; max-width: 92%; width: max-content; white-space: pre-line; text-align: center; line-height: 1.35; font-size: clamp(.78rem, 2.3vw, 1.2rem); color: white; background: #000e; border-radius: .35rem; pointer-events: none; }
#assist-output { white-space: pre-line; min-height: 1.6em; }
#runtime-inputs label { display: block; margin-bottom: .7rem; }
#runtime-inputs input { display: block; max-width: 100%; }
.results { padding: 0; list-style: none; }
.results li { display: flex; align-items: center; gap: .7rem 1rem; flex-wrap: wrap; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.results li[aria-current="true"] > button { border-color: var(--accent); }
.results small { color: var(--muted); }
.results a { margin-left: auto; }
#seek { width: min(40rem, 80%); }
#images { list-style: none; padding: 0; }
#images button { width: 100%; text-align: left; }
#images img { display: block; width: 100%; height: 9rem; object-fit: contain; image-rendering: pixelated; background: var(--paper); }
dialog { color: var(--ink); background: var(--panel); border: 1px solid var(--line); width: min(55rem, 94vw); }
dialog::backdrop { background: #05090ddd; }
#image-window { max-height: 58vh; overflow: auto; margin-top: 1rem; }
#full-image { display: block; max-width: 100%; image-rendering: pixelated; }
#image-window.actual #full-image { max-width: none; }

