/* Opt-in presentation shell. Owns layers and chrome, never the 3D renderer. */
[data-nima-scene-layout]{
  --nima-scene-header-height:68px;
  --nima-scene-footer-height:0px;
  --nima-scene-top-offset:0px;
  --nima-scene-gutter:24px;
  --nima-scene-panel-width:480px;
  --nima-scene-panel-padding:24px;
  --nima-scene-radius:12px;
  --nima-scene-control-radius:6px;
  --nima-scene-control-height:44px;
  --nima-scene-blur:10px;
  color:var(--text);
  font-family:var(--font-family-sans,system-ui,sans-serif);
}
[data-nima-scene-layout] .nima-scene-stage{position:fixed;inset:0;z-index:0;overflow:hidden;background:var(--bg)}
[data-nima-scene-layout] .nima-scene-stage canvas{display:block;width:100%;height:100%}
[data-nima-scene-layout] .nima-scene-header{
  position:fixed;inset:0 0 auto;z-index:5;
  height:calc(var(--nima-scene-header-height) + env(safe-area-inset-top));
  box-sizing:border-box;padding:env(safe-area-inset-top) var(--nima-scene-gutter) 0;
  display:flex;align-items:center;justify-content:space-between;gap:24px;
  background-color:transparent;box-shadow:none;
  background-image:linear-gradient(180deg,color-mix(in srgb,var(--bg) 38%,transparent),transparent);
  backdrop-filter:blur(3px);pointer-events:none;
}
[data-nima-scene-layout] .nima-scene-header :is(a,button,nav){pointer-events:auto}
[data-nima-scene-layout] .nima-scene-header nav{display:flex;align-items:center;gap:24px}
[data-nima-scene-layout] .nima-scene-header nav :is(a,button){min-height:var(--nima-scene-control-height);font-family:inherit;font-size:12px;color:var(--text)}
[data-nima-scene-layout] .nima-scene-content{
  position:fixed;
  inset:calc(var(--nima-scene-header-height) + var(--nima-scene-top-offset) + env(safe-area-inset-top)) 0 calc(var(--nima-scene-footer-height) + env(safe-area-inset-bottom));
  height:auto;clip-path:inset(0);overflow-y:auto;overflow-x:hidden;
}
[data-nima-scene-layout] .nima-scene-content[data-nima-scene-axis=horizontal]{overflow-x:auto;overflow-y:hidden}
[data-nima-scene-layout] .nima-scene-panel{
  box-sizing:border-box;width:min(var(--nima-scene-panel-width),100%);
  padding:var(--nima-scene-panel-padding);
  border:1px solid var(--surface-border);border-radius:var(--nima-scene-radius);
  background-color:transparent;box-shadow:none;
  background-image:linear-gradient(125deg,color-mix(in srgb,var(--bg) 70%,transparent),color-mix(in srgb,var(--bg) 44%,transparent));
  backdrop-filter:blur(var(--nima-scene-blur));
}
[data-nima-scene-layout] .nima-scene-button{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  box-sizing:border-box;min-height:var(--nima-scene-control-height);padding:12px 16px;
  border:1px solid var(--nima-brand);border-radius:var(--nima-scene-control-radius);
  background:var(--nima-brand);color:var(--nima-on-brand);
  font:600 12px/1.25 var(--font-family-sans,system-ui,sans-serif);text-decoration:none;
  text-shadow:none;box-shadow:none;
}
[data-nima-scene-layout] .nima-scene-button:hover{background:color-mix(in srgb,var(--nima-brand) 88%,var(--text));color:var(--nima-on-brand)}
[data-nima-scene-layout] .nima-scene-button:disabled{opacity:.35;cursor:default}
[data-nima-scene-layout] :is(button,a,input,select,textarea):focus-visible{outline:2px solid var(--accent);outline-offset:4px}
[data-nima-scene-layout] .nima-scene-footer{
  position:fixed;inset:auto 0 0;z-index:4;background-color:transparent;box-shadow:none;
  background-image:linear-gradient(0deg,color-mix(in srgb,var(--bg) 38%,transparent),transparent);
  backdrop-filter:blur(3px);
}
[data-nima-scene-layout] .nima-scene-credit{font:400 10px/1.5 var(--font-family-sans,system-ui,sans-serif);color:var(--muted);margin:24px 0 0;padding:16px 0;background:transparent}
[data-nima-scene-layout] .nima-scene-menu-toggle{display:none}
[data-nima-scene-layout] [data-nima-scene-label=compact]{display:none}
[data-nima-scene-layout] :is([data-nima-scene-menu],[data-nima-scene-menu-toggle])[hidden]{display:none}
[data-nima-scene-layout] .nima-scene-header nav[data-nima-scene-menu][hidden]{display:none}
@media(max-width:759px){
  [data-nima-scene-layout]{--nima-scene-header-height:68px;--nima-scene-gutter:16px}
  [data-nima-scene-layout] .nima-scene-header{display:flex;align-items:center;gap:8px}
  [data-nima-scene-layout] .nima-scene-header>.nima-scene-brand{min-width:0;font-size:clamp(16px,4.4vw,18px);flex-shrink:1;white-space:nowrap}
  [data-nima-scene-layout] .nima-scene-header .brand-mark{width:24px;height:24px}
  [data-nima-scene-layout] [data-nima-scene-label=full]{display:none}
  [data-nima-scene-layout] [data-nima-scene-label=compact]{display:inline}
  [data-nima-scene-layout] .nima-scene-menu-toggle{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:10px;margin-left:auto;border:0;border-radius:var(--nima-scene-control-radius);background:transparent;color:var(--text);cursor:pointer}
  [data-nima-scene-layout] .nima-scene-menu-toggle svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}
  [data-nima-scene-layout] .nima-scene-header [data-nima-scene-header-action]{position:static;inset:auto;flex:0 0 auto;width:auto;max-width:none;margin:0 0 0 auto}
  [data-nima-scene-layout] .nima-scene-header [data-nima-scene-header-action]+.nima-scene-menu-toggle{margin-left:0}
  [data-nima-scene-layout] .nima-scene-header :is(.nima-scene-button[data-nima-scene-header-action],[data-nima-scene-header-action] .nima-scene-button){width:auto;height:44px;min-height:44px;padding:8px;gap:8px;font-size:11px;white-space:nowrap}
  [data-nima-scene-layout] .nima-scene-content[data-nima-scene-axis=horizontal]{--nima-scene-top-offset:0px}
  [data-nima-scene-layout] .nima-scene-header nav[data-nima-scene-menu]{position:fixed;top:calc(var(--nima-scene-header-height) + env(safe-area-inset-top));left:var(--nima-scene-gutter);right:var(--nima-scene-gutter);display:grid;gap:4px;width:auto;max-height:calc(100dvh - var(--nima-scene-header-height) - 24px);overflow-y:auto;padding:12px;border:1px solid var(--surface-border);border-radius:var(--nima-scene-radius);background:linear-gradient(125deg,color-mix(in srgb,var(--bg) 90%,transparent),color-mix(in srgb,var(--bg) 78%,transparent));backdrop-filter:blur(12px)}
  [data-nima-scene-layout] .nima-scene-header nav :is(a,button){font-size:13px;justify-content:flex-start;text-align:left;padding:10px 12px}
}
@media(prefers-reduced-motion:reduce){[data-nima-scene-layout] .nima-scene-content{scroll-behavior:auto}}
