/* SCENE01 INTEGRATION01. Only the background and an opt-in visitor drawer.
   All Atelier layout/content rules remain owned by assets/site.css. */
html body.aps-site.aps-scene-enabled {background:var(--aps-bg)!important;}
.aps-site.aps-scene-enabled>.aps-wrap {position:relative;z-index:1;background:transparent!important;}

#aps-scene-world {
  --paper:#dfe6e7;--paper-deep:#cedcde;--far-fill:#c1cfd5;--mid-fill:#a5b7bf;
  --near-fill:#91aab7;--line:#657d84;--ink-strength:.70;
  position:fixed;inset:0;overflow:hidden;z-index:0;pointer-events:none;
  background:var(--paper);isolation:isolate;
}
#aps-scene-world .aps-scene-layer{position:absolute;inset:0;overflow:hidden}
#aps-scene-world .aps-scene-layer svg{position:absolute;top:0;height:100%;width:auto;overflow:visible}
#aps-scene-world .aps-scene-far{opacity:.50}
#aps-scene-world .aps-scene-middle{opacity:.52}
#aps-scene-world .aps-scene-near{opacity:.51}
#aps-scene-bird-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:3}
#aps-scene-world .aps-scene-grain{
  position:absolute;inset:-10%;z-index:5;opacity:.25;mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.17' filter='url(%23noise)'/%3E%3C/svg%3E");
}
#aps-scene-world .aps-scene-vignette{
  position:absolute;inset:0;z-index:4;
  background:linear-gradient(90deg,color-mix(in srgb,var(--paper) 74%,transparent),transparent 38%,transparent 74%,color-mix(in srgb,var(--paper) 46%,transparent)),linear-gradient(to bottom,var(--paper) 0%,transparent 24%,transparent 72%,color-mix(in srgb,var(--paper) 60%,transparent));
}
#aps-scene-shockwave-layer{position:absolute;inset:0;z-index:6;overflow:hidden;pointer-events:none}
#aps-scene-shockwave-layer .aps-scene-shockwave{position:absolute;width:380px;height:380px;border:1.4px solid var(--line);border-radius:50%;opacity:0;transform:translate(-50%,-50%) scale(.06);animation:aps-scene-gust 1.5s ease-out forwards}
#aps-scene-shockwave-layer .aps-scene-shockwave:after{content:'';position:absolute;inset:24%;border:1px dashed var(--line);border-radius:50%;opacity:.48}
@keyframes aps-scene-gust{0%{opacity:.52;transform:translate(-50%,-50%) scale(.06)}25%{opacity:.35}100%{opacity:0;transform:translate(-50%,-50%) scale(1.25)}}

/* The scene entry lives at the very bottom of the existing "Alle" panel. */
.aps-site .aps-site-tree-scene{margin-top:20px;padding-top:17px;border-top:1px solid var(--aps-border)}
.aps-site .aps-site-tree-scene button{display:block;width:100%;min-height:44px;padding:10px 13px;text-align:left;border:1px solid var(--aps-border);background:var(--aps-panel);color:var(--aps-accent);font:700 13px var(--aps-font-body,system-ui,sans-serif);letter-spacing:.03em;cursor:pointer}
.aps-site .aps-site-tree-scene button:hover{border-color:var(--aps-accent)}

/* Scene controls never appear until a visitor explicitly opens the drawer. */
.aps-scene-panel{position:fixed;top:clamp(16px,8vh,86px);right:clamp(10px,2vw,28px);z-index:10010;width:min(330px,calc(100vw - 20px));max-height:calc(100dvh - 26px);overflow:auto;overscroll-behavior:contain;padding:23px;color:#302e2a;background:#f7f3ebf3;border:1px solid #887c69;box-shadow:0 15px 48px #24231c40;backdrop-filter:blur(12px);font:11px/1.5 ui-monospace,Consolas,monospace}
.aps-scene-panel[hidden]{display:none!important}
.aps-scene-panel *, .aps-scene-panel *:before,.aps-scene-panel *:after{box-sizing:border-box}
.aps-scene-panel button{cursor:pointer}
.aps-scene-panel button:focus-visible,.aps-scene-panel input:focus-visible,.aps-site .aps-site-tree-scene button:focus-visible{outline:2px solid #756443;outline-offset:3px}
.aps-scene-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;letter-spacing:.12em;margin-bottom:19px}
.aps-scene-panel-head strong{font-size:11px}
.aps-scene-panel-head button{border:0;background:transparent;color:inherit;font-size:26px;line-height:1;padding:0 4px}
.aps-scene-row{display:block;margin:17px 0}
.aps-scene-row>span{display:flex;justify-content:space-between;align-items:center;gap:10px;letter-spacing:.04em;margin-bottom:7px}
.aps-scene-row output{font-weight:bold;color:#826e4c}
.aps-scene-row input[type=text]{width:100%;padding:10px;background:#fffdf8;color:#302e2a;border:1px solid #ac9e89;font:12px ui-monospace,Consolas,monospace}
.aps-scene-row input[type=range]{width:100%;accent-color:#66745e}
.aps-scene-action{width:100%;min-height:40px;padding:10px;border:1px solid #978774;background:transparent;color:#302e2a;font:11px ui-monospace,Consolas,monospace;letter-spacing:.035em}
.aps-scene-action:hover{background:#e8e1d6}
.aps-scene-action-dark{margin-top:16px;background:#26382e;color:#fff8e9;border-color:#26382e}
.aps-scene-action-dark:hover{background:#3c5644}
.aps-scene-check{display:flex;gap:9px;align-items:flex-start;margin:15px 0;line-height:1.55}
.aps-scene-check input{accent-color:#61735e;margin:2px 0 0}
.aps-scene-palette{display:flex;gap:14px;margin:20px 0}
.aps-scene-palette-choice{width:32px;height:32px;border-radius:50%;border:1px solid #a39683;background:#eee7dc}
.aps-scene-palette-choice[data-palette=sage]{background:#dce2d6}
.aps-scene-palette-choice[data-palette=blue]{background:#dfe6e7}
.aps-scene-palette-choice.is-selected{outline:2px solid #64715e;outline-offset:3px}
.aps-scene-reset{width:100%;border:0;background:transparent;padding:13px 4px;color:#685e50;text-decoration:underline;font:11px ui-monospace,Consolas,monospace}
#aps-scene-engine-status{padding-top:11px;border-top:1px solid #c9bda9;color:#746f65;margin:10px 0 0;font-size:10px}
.aps-scene-credits{border-top:1px solid #c9bda9;margin-top:17px;padding-top:12px;color:#756c60;font-size:10px;line-height:1.65}
.aps-scene-credits p{margin:8px 0 0}
.aps-scene-panel .aps-scene-credits a,.aps-scene-panel .aps-scene-credits a:visited{color:#5b634d;text-decoration:underline}
.aps-site.aps-scene-stage-only #aps-main,.aps-site.aps-scene-stage-only .aps-footer{visibility:hidden;pointer-events:none}
@media(max-width:760px){.aps-scene-panel{top:12px;right:10px;max-height:calc(100dvh - 24px);padding:19px}}
@media(prefers-reduced-motion:reduce){#aps-scene-world .aps-scene-shockwave{animation-duration:.01ms!important}}
