:root {
  --bg: #0d0b10; --panel: #17131c; --line: #2c2433; --text: #e9e3ee; --dim: #9c90a8;
  --accent: #e0444f; --cool: #4fa3e0; --on: #f2c14e;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { padding: 18px 24px 6px; }
h1 { margin: 0 0 4px; font-size: 20px; letter-spacing: .02em; }
h2 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 600; }
h3 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 600; }
.about { margin: 0; color: var(--dim); max-width: 860px; }
main { display: grid; grid-template-columns: minmax(300px, 768px) minmax(300px, 1fr); gap: 20px; padding: 14px 24px 28px; }
@media (max-width: 980px) { main { grid-template-columns: 1fr; } }
.screen-wrap { position: relative; width: 100%; aspect-ratio: 240 / 224; background: #000; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.screen-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 8px; color: var(--dim); }
button, select { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 5px; padding: 5px 10px; font: inherit; cursor: pointer; }
button:hover { border-color: var(--dim); }
.speed button { margin-left: 4px; padding: 4px 8px; }
.speed button.on { border-color: var(--on); color: var(--on); }
.stats { display: flex; flex-wrap: wrap; gap: 6px 18px; font-variant-numeric: tabular-nums; }
.stats b { color: var(--text); font-weight: 600; }
.stats span { color: var(--dim); }
.legend { color: var(--dim); font-size: 12px; }
.sw { display: inline-block; width: 12px; height: 9px; border: 2px solid; margin: 0 4px 0 10px; vertical-align: -1px; }
.sw.ahead { border-color: var(--accent); } .sw.behind { border-color: var(--cool); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; }
.note { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 8px; }
.answer { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.pad { display: flex; gap: 18px; align-items: center; }
.dpad { display: grid; grid-template: 30px 30px 30px / 30px 30px 30px; }
.dpad span, .ab span { display: grid; place-items: center; background: #221c28; border: 1px solid var(--line); color: var(--dim); border-radius: 5px; transition: background .08s; }
.dpad span[data-b=UP] { grid-area: 1 / 2; } .dpad span[data-b=LEFT] { grid-area: 2 / 1; }
.dpad span[data-b=RIGHT] { grid-area: 2 / 3; } .dpad span[data-b=DOWN] { grid-area: 3 / 2; }
.ab { display: flex; gap: 10px; }
.ab span { width: 46px; height: 46px; border-radius: 50%; font-weight: 700; line-height: 1; flex-direction: column; }
.ab small { font-size: 9px; font-weight: 400; }
.pad span.lit { background: var(--accent); color: #fff; border-color: var(--accent); }
.slots { display: grid; gap: 6px; min-width: 220px; flex: 1; }
.slot { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.bars { display: flex; gap: 4px; }
.bar { flex: 1; height: 18px; background: #221c28; border-radius: 3px; position: relative; overflow: hidden; font-size: 10px; }
.bar i { position: absolute; left: 0; bottom: 0; top: 0; background: #5b4a68; }
.bar.win i { background: var(--accent); }
.bar em { position: relative; padding-left: 5px; font-style: normal; line-height: 18px; color: var(--text); }
.eyes, .regions { display: flex; flex-wrap: wrap; gap: 12px; }
figure { margin: 0; }
figure canvas { display: block; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 3px; background: #000; }
.eyes canvas { width: 128px; height: 96px; }
#r-module_0 { width: 128px; height: 128px; } #r-association, #r-prefrontal { width: 128px; height: 64px; }
figcaption { font-size: 11px; color: var(--dim); margin-top: 3px; }
figcaption small { opacity: .7; }
.readings { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 12px; color: var(--dim); }
.readings b { color: var(--text); font-weight: 500; }
.memory { display: flex; flex-wrap: wrap; gap: 3px; }
.memory i { width: 12px; height: 12px; border-radius: 2px; background: #221c28; border: 1px solid var(--line); }
.memory i.held { background: #6b5a7a; }
.memory i.read { background: var(--on); }
.memory p { width: 100%; margin: 6px 0 0; font-size: 12px; color: var(--dim); }
details summary { cursor: pointer; color: var(--dim); font-size: 13px; }
#about-brain { font-size: 13px; color: var(--dim); margin-top: 10px; }
#about-brain table { border-collapse: collapse; margin-top: 6px; }
#about-brain td { padding: 2px 10px 2px 0; }
.answer-card { margin-top: 14px; }
.brain-card canvas { display: block; width: 100%; height: auto; background: #0b090e; border-radius: 6px; }
.caption { color: var(--dim); font-size: 12px; margin: 10px 2px 0; }
main { grid-template-columns: minmax(300px, 640px) minmax(320px, 1fr); }
