:root { color-scheme: dark; font: 14px/1.5 system-ui, sans-serif; background: #141f17; color: #e5d9c3; }
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; }
[hidden] { display: none !important; }
#scene { display: block; width: 100vw; height: 100vh; outline: none; image-rendering: pixelated; }
#loading, #pause { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; background: #141f17; z-index: 3; }
#loading { gap: 14px; }
#loading strong { font-size: 23px; font-weight: 500; }
progress { width: 280px; accent-color: #ab1319; }
#pause { background: transparent; pointer-events: none; }
#pause > div { pointer-events: auto; background: #141f17; border: 1px solid #79694d; padding: 24px 32px; }
h1 { font-size: 23px; font-weight: 500; margin: 0 0 16px; letter-spacing: .04em; }
p { margin-bottom: 0; color: #bbae97; }
button, select, input { font: inherit; }
button, select, input[type="number"] { background: #202b23; color: #e5d9c3; border: 1px solid #79694d; border-radius: 3px; padding: 5px 8px; }
button { cursor: pointer; }
button:hover { border-color: #e5d9c3; }
#debug { position: fixed; top: 12px; right: 12px; width: 278px; max-height: calc(100vh - 24px); overflow-y: auto; padding: 14px; background: #141f17; border: 1px solid #79694d; z-index: 4; font-size: 12px; }
#debug h2 { font-size: 14px; font-weight: 500; margin: 0 0 10px; }
#memory-controls { border-top: 1px solid #79694d; margin-top: 14px; padding-top: 10px; }
#memory-controls h3 { font-size: 14px; font-weight: 500; margin: 0; }
#debug label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }
#debug select { max-width: 148px; font-size: 12px; }
#debug input[type="range"] { width: 116px; accent-color: #ab1319; }
#debug input[type="number"] { width: 72px; }
#debug input[type="color"] { width: 64px; height: 25px; background: none; border: 0; padding: 0; }
#debug output { display: inline-block; min-width: 38px; text-align: right; }
#debug .meter { padding: 8px 0; color: #bbae97; }
#debug button { width: 100%; margin-top: 8px; }
#hint { position: fixed; bottom: 12px; left: 16px; font-size: 11px; color: var(--light-ink, #ab1319); background: var(--shadow-ink, #141f17); padding: 3px 7px; pointer-events: none; }

#audio-controls { border-top: 1px solid #79694d; margin-top: 14px; padding-top: 10px; }
#audio-controls h3 { font-size: 14px; font-weight: 500; margin: 0; }
#audio-controls input[type="range"] { width: 100px; min-width: 0; }
#audio-controls .audio-layers { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
