/* The existing WebGL canvas draws the complete 3D model in fold mode. */
.fold-safe-probe { position:fixed; width:0; height:0; visibility:hidden; pointer-events:none; padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px); }
html[data-duo-embed] body {
  padding-top:calc(12px + var(--duo-chrome-top,0px));
  padding-right:calc(12px + var(--duo-chrome-right,0px));
  padding-bottom:calc(12px + var(--duo-chrome-bottom,0px));
  padding-left:calc(12px + var(--duo-chrome-left,0px));
}
html[data-fold] body { padding:0; overflow:hidden; }
html[data-fold] .workspace { position:fixed; inset:0; width:100%; height:100%; min-height:0; border:0; border-radius:0; overflow:visible; background:var(--paper); }
html[data-fold] #model-view { position:fixed; inset:0; width:100%; height:100%; margin:0; min-height:0; background:var(--paper); z-index:80; }
html[data-fold] #model-view canvas { position:absolute; inset:0; display:block; width:100%; height:100%; background:var(--paper); cursor:default; }
html[data-fold] #model-view,
#model-view canvas { -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
/* Hide siblings, never a canvas ancestor. The actual model keeps all input. */
html[data-fold] .workspace > :not(#model-view),
html[data-fold] #model-view > :not(canvas):not(.screen-fallback):not(.loading),
html[data-fold] .key-dock { display:none!important; }
.fold-controls { position:fixed; z-index:100; display:flex; align-items:center; gap:8px; width:96px; height:44px; opacity:var(--fold-progress,0); pointer-events:auto; }
.fold-controls[hidden] { display:none!important; }
.fold-controls button { display:grid; place-items:center; width:44px; height:44px; padding:0; border:1px solid var(--line); border-radius:50%; color:var(--soft-ink); background:var(--panel); -webkit-tap-highlight-color:transparent; touch-action:manipulation; transition:color 160ms ease,background 160ms ease,transform 160ms ease; }
.fold-controls button:hover { background:var(--soft); color:var(--ink); }
.fold-controls button:active { transform:scale(.94); }
.fold-controls button:focus-visible { outline:2px solid var(--ink); outline-offset:3px; }
.fold-controls svg { width:18px; height:18px; stroke-width:1.4; }
.fold-zoom[aria-pressed="false"] .fold-zoom-plus { display:none; }
.fold-power[aria-pressed="true"] { color:light-dark(#54764e,#a2c095); }
.fold-toast { position:fixed; left:50%; bottom:max(24px,env(safe-area-inset-bottom,0px)); z-index:110; transform:translateX(-50%); width:max-content; max-width:min(80%,420px); padding:9px 13px; border:1px solid var(--line); border-radius:7px; background:var(--panel); color:var(--soft-ink); font-size:12px; line-height:1.6; text-align:center; pointer-events:none; }
html[data-duo-embed] .fold-toast { display:none; }
@media(prefers-reduced-motion:reduce) { .fold-controls button { transition:none; } }
