:root{color-scheme:light;--bg:#f5f7f8;--ink:#161b1d;--line:#d6dfe2;--cyan:#0e8aa0;--mono:'JetBrains Mono',monospace}
*{box-sizing:border-box}html,body{margin:0;width:100%;min-height:100%;color:var(--ink);background:var(--bg);font-family:var(--mono)}
body{background-image:linear-gradient(#161b1d0a 1px,transparent 1px),linear-gradient(90deg,#161b1d0a 1px,transparent 1px);background-size:96px 96px;min-height:100vh;padding:28px 16px 32px;display:flex;flex-direction:column;align-items:center}
header{width:100%;text-align:center}h1{font-size:clamp(24px,3vw,32px);font-weight:500;line-height:1.25;letter-spacing:-.04em;margin:0}
main{width:100%;max-width:900px;flex:1;display:flex;flex-direction:column;justify-content:center;margin:auto;min-width:0}
.art-stage{width:100%;height:min(72vh,650px);min-height:320px;position:relative}#scene{display:block;width:100%;height:100%;border:0;outline:0;cursor:grab;touch-action:none}#scene:active{cursor:grabbing}#scene:focus-visible{outline:2px solid var(--cyan);outline-offset:4px}
.art-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin-top:12px}
button{font:14px/1.4 var(--mono);border:1px solid var(--ink);color:var(--ink);background:transparent;border-radius:0;padding:10px 14px;min-height:44px;cursor:pointer}button:hover{background:var(--ink);color:var(--bg)}button:focus-visible{outline:2px solid var(--cyan);outline-offset:4px}
.load-status{position:absolute;inset:0;display:grid;place-items:center;font-size:14px;pointer-events:none}.load-status:empty{display:none}.error{position:absolute;inset:0;display:flex;gap:20px;flex-direction:column;align-items:center;justify-content:center;background:var(--bg);font-size:14px}.error[hidden]{display:none}.error p{margin:0}
#donor-canvas{position:absolute;left:-10000px;top:0;width:800px;height:800px;pointer-events:none}.sr-only{position:absolute;clip-path:inset(50%);height:1px;width:1px;overflow:hidden;white-space:nowrap}
body.embed{padding:0;background:transparent;min-height:0;height:100vh}body.embed header,body.embed .art-controls{display:none}body.embed main{max-width:none;height:100vh;flex:none}body.embed .art-stage{height:100vh;min-height:0}
@media(max-width:600px){body{padding:24px 12px} .art-stage{height:min(62vh,480px);min-height:300px}button{padding-inline:12px}}

.role-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 24px;font:14px/1.5 var(--mono);margin-top:10px}.role-legend span{display:inline-flex;align-items:center;gap:7px}.role-legend canvas{width:20px;height:20px;display:block}body.embed .role-legend{display:none}

html.embed,html:has(body.embed){background:transparent;min-height:0;height:100%;overflow:hidden;touch-action:pan-y!important;pointer-events:none!important}
body.embed,body.embed main,body.embed .art-stage,body.embed #scene{height:100%!important;min-height:0!important;overflow:hidden!important;touch-action:pan-y!important;pointer-events:none!important;user-select:none!important;-webkit-user-select:none!important}
