:root {
  color-scheme: dark;
  --ink: #f3ebd8;
  --dim: #c7bfab;
  --background: #161913;
  --panel: #23291f;
  --accent: #f3cc82;
}
* { box-sizing: border-box; }
body { margin: 0; font: 1rem/1.65 system-ui, sans-serif; background: var(--background); color: var(--ink); }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
header, footer { padding: 1rem clamp(1rem, 5vw, 4rem); background: var(--panel); }
header { display: flex; flex-wrap: wrap; gap: 1.4rem; }
footer { color: var(--dim); }
main { width: min(64rem, 100% - 2rem); margin: 2.4rem auto 4rem; }
h1, h2, h3 { line-height: 1.12; }
h1 { font: 700 clamp(2.4rem, 7vw, 4.8rem)/1.04 Georgia, serif; margin: .35em 0; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; }
section { margin-top: 2rem; }
.action, button, select, input {
  border: 1px solid #76623d; border-radius: .35rem; padding: .5rem .85rem;
  background: var(--panel); color: var(--ink); font: inherit;
}
.action { display: inline-block; background: var(--accent); color: #202017; text-decoration: none; font-weight: 650; margin: .3rem .35rem .3rem 0; }
.action.secondary { background: var(--panel); color: var(--accent); }
button:not([disabled]) { cursor: pointer; }
button:disabled { opacity: .65; }
#game { width: min(100%, 768px); aspect-ratio: 8 / 7; background: #050705; border: 1px solid #76623d; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem; margin: .8rem 0; }
audio { max-width: 100%; }
#track { max-width: 100%; width: min(100%, 24rem); vertical-align: top; }
#steps article { border-left: 2px solid #76623d; padding: .2rem 1rem .7rem; margin: 1rem 0; }
button[aria-pressed="true"] { background: var(--accent); color: #202017; }

#images { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .75rem; }
#images button { display: grid; gap: .65rem; align-content: start; text-align: left; }
#images img { width: 100%; height: 9rem; object-fit: contain; background: #10120e; image-rendering: pixelated; }
dialog { max-width: min(95vw, 62rem); max-height: 92vh; color: var(--ink); background: var(--panel); border: 1px solid #76623d; }
dialog::backdrop { background: #000b; }
.image-viewport { max-width: 85vw; max-height: 62vh; overflow: auto; background: #10120e; }
#full { display: block; max-width: 100%; max-height: 60vh; image-rendering: pixelated; }
#full.native { max-width: none; max-height: none; }

