* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: #fff1e4; background: #100e35 url('/brand/night.webp') center / cover fixed; font: 1rem system-ui, sans-serif; }
main { width: min(960px, 94%); margin: 1rem auto; padding: clamp(1rem, 4vw, 2rem); background: #171344f5; border: 2px solid #9470e6; border-radius: 14px; }
h1, h2 { font-family: ui-monospace, monospace; }
a { color: #dfc4ff; }
.controls, .actions, .frames { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); }
.controls label, .actions label { display: grid; gap: .3rem; }
input, select, button { min-height: 44px; max-width: 100%; padding: .4rem; font: inherit; }
input, select { background: #100d32; color: inherit; border: 1px solid #8868cf; border-radius: 5px; }
button { background: #ffc052; color: #241331; border: 0; border-radius: 5px; font-weight: 750; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
.preview, .frames article { background: repeating-conic-gradient(#21194c 0% 25%, #34285f 0% 50%) 0 / 24px 24px; border: 1px solid #8868cf; border-radius: 6px; padding: .7rem; text-align: center; }
canvas { image-rendering: pixelated; max-width: 100%; height: auto; }
.preview canvas { width: min(100%, 220px); max-height: 300px; object-fit: contain; }
.frames canvas { display: block; margin: 0 auto .5rem; max-height: 100px; object-fit: contain; }
.actions { margin-top: .7rem; }
:focus-visible { outline: 2px solid #ffd972; outline-offset: 3px; }
#art-builder { margin-top: 2rem; border-top: 1px solid #8868cf; }
.editor-preview { margin-top: .8rem; }
.editor-preview canvas { width: min(100%, 480px); max-height: none; touch-action: none; cursor: crosshair; vertical-align: middle; }
#edit-prepared { margin-top: .8rem; }
#source-preview { display: block; width: 100%; touch-action: none; cursor: crosshair; background: #100d32; margin-bottom: .8rem; }
#sample-bg[aria-pressed="true"] { outline: 3px solid white; outline-offset: 2px; }
.workshop-step { margin-block: 1rem; padding: clamp(.75rem, 3vw, 1.25rem); border: 1px solid #8868cf; border-radius: 10px; }
.workshop-step h2 { margin-top: 0; }
.workshop-step details { margin-top: .75rem; }
.workshop-step summary { cursor: pointer; padding-block: .65rem; font-weight: 700; }
.workshop-step [hidden] { display: none; }
#source-controls > p { margin-block: .75rem; }
#source-status:empty { display: none; }
