/* PXLGEN stage preview + LED wall builder (editor/stage.js). Everything is inert until the Stage toggle is used,
   so the default desktop layout is unchanged apart from the Stage pill in the top bar. */
[data-only][hidden],#inspector[hidden],#wallPanel[hidden],.stage-view[hidden],.stage-view [hidden],#wallPanel [hidden],.wall-boxes[hidden]{display:none!important}

/* top-bar toggle */
.nav-stage{flex:none;height:calc(38px * var(--ui, 1));display:inline-flex;align-items:center;gap:calc(8px * var(--ui, 1));padding:0 calc(15px * var(--ui, 1)) 0 calc(13px * var(--ui, 1));border-radius:999px;border:1px solid var(--line-2);background:rgb(255 255 255/.03);font-size:calc(13px * var(--ui, 1));font-weight:600;letter-spacing:-.01em;color:var(--fg);transition:border-color .25s,background .25s,box-shadow .3s,color .25s}
.nav-stage svg{width:calc(12px * var(--ui, 1));height:calc(12px * var(--ui, 1));color:var(--accent)}
.nav-stage:hover{border-color:rgb(255 255 255/.28);background:rgb(255 255 255/.06)}
.nav-stage.on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);box-shadow:0 0 0 4px var(--accent-12),0 10px 40px -12px var(--accent-glow)}
.nav-stage.on svg{color:var(--accent-ink)}

/* stage view: replaces the plain preview inside the canvas frame (the composition keeps rendering underneath) */
.canvas-wrap.stage-on{background:radial-gradient(120% 90% at 50% 110%,rgb(255 255 255/.05),transparent 60%),#050506}
.canvas-wrap.stage-on #view{visibility:hidden}
.stage-view{position:absolute;inset:0;z-index:1;line-height:1.4}
.canvas-wrap.stage-on .hud,.canvas-wrap.stage-on .wm-lock{z-index:4}
#stage2d{position:absolute;inset:0;width:100%;height:100%;display:block}
.stage3d-host{position:absolute;inset:0;display:none}
.stage-view[data-view="3d"] .stage3d-host{display:block}
.stage-view[data-view="3d"] #stage2d{display:none}
.stage3d-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;cursor:grab}
.stage3d-canvas:active{cursor:grabbing}
.stage3d-host[data-state=loading]::after,.stage3d-host[data-state=error]::after{content:"Loading 3D stage…";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font:400 calc(11px * var(--ui, 1)) var(--font-mono);letter-spacing:.14em;text-transform:uppercase;color:var(--mute)}
.stage3d-host[data-state=error]::after{content:"3D preview unavailable"}

/* drag handles over the 2D raster (edit walls) */
.wall-boxes{position:absolute;inset:0;pointer-events:none}
.wbox{position:absolute;pointer-events:auto;cursor:grab;touch-action:none;border:1px dashed rgb(255 255 255/.55);border-radius:2px;background:hsl(var(--hue,190) 80% 60%/.06);transition:box-shadow .25s,background .25s}
.wbox::after{content:"";position:absolute;left:-2px;right:-2px;top:50%;height:max(100%,calc(30px * var(--ui, 1)));transform:translateY(-50%)} /* thin strips stay grabbable */
.wbox:hover{background:hsl(var(--hue,190) 80% 60%/.14)}
.wbox.sel{border:2px solid var(--accent);box-shadow:0 0 0 4px var(--accent-12),0 0 40px -8px var(--accent-glow)}
.wbox.drag{cursor:grabbing;background:hsl(var(--hue,190) 80% 60%/.18)}
.wbox:focus-visible{outline:2px solid var(--fg);outline-offset:2px}
.wb-lbl{position:absolute;left:calc(6px * var(--ui, 1));top:calc(6px * var(--ui, 1));max-width:calc(100% - calc(12px * var(--ui, 1)));overflow:hidden;display:flex;gap:calc(7px * var(--ui, 1));align-items:center;padding:calc(3px * var(--ui, 1)) calc(9px * var(--ui, 1));border-radius:999px;background:rgb(6 6 7/.72);font:500 calc(11px * var(--ui, 1))/1.3 var(--font-mono);letter-spacing:.04em;white-space:nowrap;color:#fff;pointer-events:none}
.wb-lbl b{font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis}
.wb-lbl i{flex:none;font-style:normal;color:var(--mute)}
.wbox.narrow .wb-lbl i{display:none}
.wbox.sel .wb-lbl{background:var(--accent);color:var(--accent-ink)}
.wbox.sel .wb-lbl i{color:inherit;opacity:.75}
.wbox.tiny .wb-lbl{display:none}

/* floating stage bar (desktop) */
.stage-bar{position:absolute;left:50%;bottom:calc(14px * var(--ui, 1));transform:translateX(-50%);z-index:3;display:flex;align-items:center;gap:calc(6px * var(--ui, 1));height:calc(50px * var(--ui, 1));padding:0 calc(7px * var(--ui, 1));border-radius:999px;white-space:nowrap;background:rgb(14 14 16/.78);box-shadow:0 24px 70px -24px rgb(0 0 0/.95)}
.sb-seg{display:flex;gap:2px;padding:calc(3px * var(--ui, 1));border-radius:999px;background:rgb(255 255 255/.04);border:1px solid var(--line)}
.sb-seg button{height:calc(32px * var(--ui, 1));padding:0 calc(12px * var(--ui, 1));border-radius:999px;display:inline-flex;align-items:center;gap:calc(7px * var(--ui, 1));font-size:calc(12.5px * var(--ui, 1));color:var(--mute);transition:background .25s,color .25s}
.sb-seg button svg{width:calc(11px * var(--ui, 1));height:calc(11px * var(--ui, 1))}
.sb-seg button:hover{color:var(--fg)}
.sb-seg button.on{background:var(--fg);color:#060607;font-weight:600}
.sb-cams button{padding:0 calc(10px * var(--ui, 1));font:400 calc(11px * var(--ui, 1)) var(--font-mono);letter-spacing:.08em;text-transform:uppercase}
.sb-chip{height:calc(32px * var(--ui, 1));padding:0 calc(12px * var(--ui, 1));border-radius:999px;border:1px solid var(--line-2);font:400 calc(11px * var(--ui, 1)) var(--font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--mute);transition:all .25s var(--ease-out-expo)}
.sb-chip:hover{color:var(--fg);border-color:rgb(255 255 255/.3)}
.sb-chip.on{color:var(--fg);border-color:color-mix(in oklab,var(--accent) 55%,transparent);background:var(--accent-12)}
.sb-sep{width:1px;height:calc(22px * var(--ui, 1));background:var(--line-2);margin:0 2px}
.sb-walls{height:calc(36px * var(--ui, 1));display:inline-flex;align-items:center;gap:calc(8px * var(--ui, 1));padding:0 calc(15px * var(--ui, 1)) 0 calc(13px * var(--ui, 1));border-radius:999px;background:var(--accent);color:var(--accent-ink);font-size:calc(12.5px * var(--ui, 1));font-weight:600;box-shadow:0 10px 30px -12px var(--accent-glow);transition:background .25s,color .25s}
.sb-walls svg{width:calc(11px * var(--ui, 1));height:calc(11px * var(--ui, 1))}
.sb-walls.on{background:rgb(255 255 255/.1);color:var(--fg);box-shadow:inset 0 0 0 1px var(--fg)}

/* ---------- LED wall builder (right column on desktop, Stage pane on phones) ---------- */
.wall-panel{padding-bottom:calc(16px * var(--ui, 1))}
.wb-preview{display:none}
.wb-banner{margin:0 calc(12px * var(--ui, 1)) calc(10px * var(--ui, 1));padding:calc(12px * var(--ui, 1)) calc(14px * var(--ui, 1));border-radius:16px;border:1px solid color-mix(in oklab,var(--accent) 45%,transparent);background:var(--accent-12);display:flex;align-items:center;gap:calc(10px * var(--ui, 1));font-size:calc(12.5px * var(--ui, 1))}
.wb-banner span{flex:1}
.wb-banner .btn{height:calc(32px * var(--ui, 1));font-size:calc(12px * var(--ui, 1))}
.wb-sum{margin:0 calc(12px * var(--ui, 1)) calc(10px * var(--ui, 1));padding:calc(14px * var(--ui, 1)) calc(16px * var(--ui, 1)) calc(12px * var(--ui, 1));border-radius:20px;border:1px solid var(--line-2);background:linear-gradient(160deg,var(--accent-12),transparent 70%)}
.wb-big b{display:block;margin-top:calc(6px * var(--ui, 1));font:800 calc(30px * var(--ui, 1))/1 var(--font-display);font-stretch:112%;letter-spacing:-.02em}
.wb-sum dl{display:grid;grid-template-columns:1fr 1fr;gap:calc(8px * var(--ui, 1)) calc(12px * var(--ui, 1));margin:calc(12px * var(--ui, 1)) 0 0}
.wb-sum dl div{min-width:0}
.wb-sum dl .wide{grid-column:1/-1}
.wb-sum dt{font:400 calc(9.5px * var(--ui, 1)) var(--font-mono);letter-spacing:.16em;text-transform:uppercase;color:var(--dim)}
.wb-sum dd{margin:2px 0 0;font:500 calc(12.5px * var(--ui, 1)) var(--font-mono);color:var(--fg)}
.wb-sec{margin:0 calc(12px * var(--ui, 1)) calc(10px * var(--ui, 1));padding:calc(14px * var(--ui, 1));border:1px solid var(--line);border-radius:20px;background:rgb(255 255 255/.018)}
.wb-sec>.eyebrow{margin-bottom:calc(10px * var(--ui, 1))}
.wb-sec>.note{margin:calc(10px * var(--ui, 1)) 2px 0;font-size:calc(11.5px * var(--ui, 1));color:var(--mute);line-height:1.45}
.wb-max{color:var(--dim)}
.wb-name{margin:0 calc(12px * var(--ui, 1)) calc(10px * var(--ui, 1))}
.wb-f{position:relative;display:flex;flex-direction:column;gap:calc(5px * var(--ui, 1));flex:1;min-width:0}
.wb-f>span{font:400 calc(9.5px * var(--ui, 1)) var(--font-mono);letter-spacing:.16em;text-transform:uppercase;color:var(--dim)}
.wb-f input{width:100%;height:calc(36px * var(--ui, 1));padding:0 calc(10px * var(--ui, 1));border-radius:12px;border:1px solid var(--line-2);background:rgb(255 255 255/.03);font:500 calc(13px * var(--ui, 1)) var(--font-mono);color:var(--fg);outline:none;-moz-appearance:textfield;appearance:textfield;transition:border-color .2s,box-shadow .2s}
.wb-f input::-webkit-inner-spin-button,.wb-f input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.wb-f input:focus{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-12)}
.wb-f em{position:absolute;right:calc(10px * var(--ui, 1));bottom:calc(10px * var(--ui, 1));font:400 calc(10.5px * var(--ui, 1)) var(--font-mono);font-style:normal;color:var(--dim);pointer-events:none}
.wb-name input,.wb-wbody .wb-name input{font:600 calc(13.5px * var(--ui, 1)) var(--font-sans)}
.wb-wbody .wb-name{margin:0}
.wb-add{display:grid;grid-template-columns:repeat(3,1fr);gap:calc(6px * var(--ui, 1))}
.wb-add button{height:calc(40px * var(--ui, 1));border-radius:14px;border:1px solid var(--line);background:rgb(255 255 255/.02);display:flex;align-items:center;justify-content:center;gap:calc(7px * var(--ui, 1));font-size:calc(12.5px * var(--ui, 1));font-weight:600;transition:border-color .2s,background .2s}
.wb-add button svg{width:calc(9px * var(--ui, 1));height:calc(9px * var(--ui, 1));color:var(--accent)}
.wb-add button:hover{border-color:var(--accent);background:var(--accent-12)}
.wb-add button:disabled{opacity:.4;pointer-events:none}
.wb-wall{border:1px solid var(--line);border-radius:16px;margin-top:calc(6px * var(--ui, 1));overflow:hidden;transition:border-color .25s,background .25s}
.wb-wall.open{border-color:color-mix(in oklab,var(--accent) 40%,transparent);background:rgb(255 255 255/.02)}
.wb-wtop{width:100%;display:flex;align-items:center;gap:calc(10px * var(--ui, 1));height:calc(44px * var(--ui, 1));padding:0 calc(12px * var(--ui, 1))}
.wb-dot{flex:none;width:calc(10px * var(--ui, 1));height:calc(10px * var(--ui, 1));border-radius:3px;background:hsl(var(--hue,190) 70% 52%);box-shadow:0 0 10px hsl(var(--hue,190) 70% 52%/.6)}
.wb-wn{flex:1;min-width:0;text-align:left;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wb-wr{font:500 calc(11px * var(--ui, 1)) var(--font-mono);color:var(--mute)}
.wb-wtop svg{width:calc(9px * var(--ui, 1));height:calc(9px * var(--ui, 1));color:var(--mute)}
.wb-wbody{padding:2px calc(12px * var(--ui, 1)) calc(12px * var(--ui, 1));display:flex;flex-direction:column;gap:calc(10px * var(--ui, 1))}
.wb-kinds{display:flex;flex-wrap:wrap;gap:calc(4px * var(--ui, 1))}
.wb-kinds button{height:calc(28px * var(--ui, 1));padding:0 calc(10px * var(--ui, 1));border-radius:999px;border:1px solid var(--line-2);font-size:calc(11.5px * var(--ui, 1));color:var(--mute);transition:all .2s}
.wb-kinds button:hover{color:var(--fg)}
.wb-kinds button.on{background:var(--fg);border-color:var(--fg);color:#060607;font-weight:600}
.wb-row{display:flex;align-items:flex-end;gap:calc(8px * var(--ui, 1))}
.wb-row+.wb-row{margin-top:calc(10px * var(--ui, 1))}
.wb-x{padding-bottom:calc(9px * var(--ui, 1));color:var(--dim);font-family:var(--font-mono)}
.wb-lab{margin:0 0 calc(-4px * var(--ui, 1));font:400 calc(9.5px * var(--ui, 1)) var(--font-mono);letter-spacing:.16em;text-transform:uppercase;color:var(--dim)}
.wb-fit{align-items:center}
.wb-fit .wb-lab{margin:0;width:calc(46px * var(--ui, 1))}
.wb-fit .seg{flex:1}
.wb-fit .seg button,.wb-psz button{height:calc(32px * var(--ui, 1));font-size:calc(12px * var(--ui, 1))}
.wb-psz button{font-family:var(--font-mono)}
.wb-pwh{display:none}
.wb-pwh.show,.wb-wall.custom .wb-pwh{display:flex}
.wb-meta{margin:0;font:400 calc(11px * var(--ui, 1))/1.4 var(--font-mono);color:var(--mute)}
.wb-ops{display:flex;gap:calc(6px * var(--ui, 1))}
.wb-ops .btn{flex:1;height:calc(34px * var(--ui, 1));font-size:calc(12px * var(--ui, 1))}
.wb-row .toggle{flex:none;height:calc(36px * var(--ui, 1))}
.wb-row>.btn{flex:none;height:calc(36px * var(--ui, 1));font-size:calc(12px * var(--ui, 1))}
.wb-act .btn+.btn{margin-top:calc(8px * var(--ui, 1))}
.wb-row2{display:flex;gap:calc(6px * var(--ui, 1));margin-top:calc(8px * var(--ui, 1))}
.wb-row2 .btn{flex:1;height:calc(36px * var(--ui, 1));font-size:calc(12px * var(--ui, 1));padding:0 calc(10px * var(--ui, 1))}
.wb-row2 .btn:disabled{opacity:.4;pointer-events:none}
.wb-save.saved{background:rgb(255 255 255/.06);color:var(--fg);box-shadow:none;border:1px solid var(--line-2)}
.wb-save.saved svg{color:var(--accent)}
.wb-status{min-height:calc(16px * var(--ui, 1));margin:calc(10px * var(--ui, 1)) 2px 0;font:400 calc(11px * var(--ui, 1))/1.5 var(--font-mono);color:var(--accent)}
.wb-status:empty{display:none}
.wb-status.warn{color:#ffb36b}

/* ---------- phones ---------- */
html.phone .stage-bar{display:none!important}
html.phone .m-pane #wallPanel{display:block!important}
html.phone .wb-preview{display:block;padding:calc(14px * var(--ui, 1)) calc(12px * var(--ui, 1)) calc(10px * var(--ui, 1))} /* clear the sticky head's 14px fade (.insp-head::after) so it never sits over the Off / Raster 2D / 3D row */
html.phone .wb-preview .seg button{height:calc(44px * var(--ui, 1));font-size:calc(14px * var(--ui, 1))}
html.phone .wb-tgls{display:flex;flex-wrap:wrap;gap:calc(6px * var(--ui, 1));margin-top:calc(8px * var(--ui, 1))}
html.phone .wb-tgls .sb-chip,html.phone .wb-cams .sb-chip{height:calc(40px * var(--ui, 1));font-size:calc(12px * var(--ui, 1));padding:0 calc(14px * var(--ui, 1))}
html.phone .wb-cams{display:flex;gap:calc(6px * var(--ui, 1))}
html.phone .wb-f>span,html.phone .wb-lab,html.phone .wb-sum dt{font-size:calc(12px * var(--ui, 1));letter-spacing:.1em}
html.phone .wb-f input{height:calc(44px * var(--ui, 1));font-size:calc(16px * var(--ui, 1));border-radius:14px}
html.phone .wb-f em{bottom:calc(14px * var(--ui, 1));font-size:calc(12px * var(--ui, 1))}
html.phone .wb-add button{height:calc(48px * var(--ui, 1));font-size:calc(14px * var(--ui, 1))}
html.phone .wb-wtop{height:calc(52px * var(--ui, 1));font-size:calc(15px * var(--ui, 1))}
html.phone .wb-wr,html.phone .wb-meta,html.phone .wb-status{font-size:calc(12px * var(--ui, 1))}
html.phone .wb-kinds button{height:calc(36px * var(--ui, 1));font-size:calc(13px * var(--ui, 1));padding:0 calc(12px * var(--ui, 1))}
html.phone .wb-fit .seg button,html.phone .wb-psz button{height:calc(44px * var(--ui, 1));font-size:calc(14px * var(--ui, 1))}
html.phone .wb-ops .btn,html.phone .wb-row2 .btn,html.phone .wb-row>.btn,html.phone .wb-row .toggle{height:calc(44px * var(--ui, 1));font-size:calc(13px * var(--ui, 1))}
html.phone .wb-sum dd{font-size:calc(13px * var(--ui, 1))}
html.phone .wb-sec>.note{font-size:calc(13px * var(--ui, 1))}
html.phone .wb-banner{font-size:calc(13px * var(--ui, 1))}
html.phone .wb-banner .btn{height:calc(40px * var(--ui, 1))}
html.phone .wb-lbl{font-size:calc(12px * var(--ui, 1))}

/* PXL SUPPLY v5: hard edges to match the 5-block mark (re-apply after sync-generator) */
*, *::before, *::after { border-radius: 0 !important; }

/* ---------- Oct 17: the standardized Stage Preview bar (same spec as the site's StageBar: dark glass, square, PXLGEN cyan) ----------
   desktop: its own row under the stage frame (app.js fitCanvas sizes + places it), wraps instead of overflowing */
.stage-bar,.sbx-menu,.sbx-rs-panel,.sbx-ss-panel{--sbx-acc:#f4f4f2}
html:not(.phone) .stage>.stage-bar{bottom:auto;transform:none;height:auto;min-height:calc(48px * var(--ui, 1));flex-wrap:wrap;align-items:center;gap:calc(6px * var(--ui, 1));padding:calc(6px * var(--ui, 1));white-space:nowrap;z-index:31;
  background:rgb(10 10 12/.92);border:1px solid rgb(255 255 255/.16);box-shadow:inset 0 1px 0 rgb(255 255 255/.06),0 20px 60px -30px #000;transition:top .35s var(--ease-out-expo)}
.stage-bar .sb-seg{padding:0;gap:0;border:1px solid rgb(255 255 255/.16);background:rgb(255 255 255/.03)}
.stage-bar .sb-seg button{height:calc(34px * var(--ui, 1));padding:0 calc(12px * var(--ui, 1));font-size:calc(12.5px * var(--ui, 1))}
.stage-bar .sb-seg button+button{border-left:1px solid rgb(255 255 255/.12)}
.stage-bar .sb-seg button.on{background:var(--sbx-acc);color:#050505;font-weight:600;box-shadow:inset 0 0 0 1px var(--sbx-acc),0 0 18px -8px rgb(255 255 255/.5)}
.stage-bar .sb-chip{height:calc(36px * var(--ui, 1));display:inline-flex;align-items:center;gap:calc(7px * var(--ui, 1))}
.stage-bar .sb-chip svg{width:calc(12px * var(--ui, 1));height:calc(12px * var(--ui, 1))}
.stage-bar .sb-chip.on,.stage-bar .sb-chip[aria-expanded="true"]{color:var(--sbx-acc);border-color:var(--sbx-acc);background:rgb(255 255 255/.1)}
.stage-bar .sb-walls{height:calc(36px * var(--ui, 1));margin-left:auto;background:var(--sbx-acc);color:#050507;box-shadow:0 0 22px -8px var(--sbx-acc)}
.stage-bar .sb-walls.on{background:rgb(255 255 255/.1);color:#fff;box-shadow:inset 0 0 0 1px #fff}
/* My Stage dropdown */
.sbx-stage,.sbx-rs{position:relative;display:flex}
.sbx-stage{flex:1 1 calc(190px * var(--ui, 1));min-width:0;max-width:calc(300px * var(--ui, 1))}
.sbx-trig{display:flex;align-items:center;gap:calc(9px * var(--ui, 1));width:100%;min-width:0;height:calc(36px * var(--ui, 1));padding:0 calc(10px * var(--ui, 1)) 0 calc(11px * var(--ui, 1));border:1px solid rgb(255 255 255/.22);background:rgb(255 255 255/.04);color:var(--fg);text-align:left}
.sbx-trig:hover,.sbx-trig[aria-expanded="true"]{border-color:var(--sbx-acc);box-shadow:0 0 16px -6px var(--sbx-acc)}
.sbx-k{flex:none;font:400 calc(9.5px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.16em;text-transform:uppercase;color:var(--dim)}
.sbx-cur{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:calc(12.5px * var(--ui, 1));font-weight:600}
.sbx-trig svg{flex:none;width:calc(9px * var(--ui, 1));height:calc(9px * var(--ui, 1));color:var(--mute)}
.sbx-menu,.sbx-rs-panel{position:fixed;z-index:95;overflow:auto;background:#0b0b0d;border:1px solid rgb(255 255 255/.2);box-shadow:0 30px 90px -20px #000,0 0 0 1px rgb(255 255 255/.06);scrollbar-width:thin;white-space:normal}
.sbx-menu{width:auto;min-width:calc(290px * var(--ui, 1));max-width:min(calc(380px * var(--ui, 1)),calc(100vw - calc(16px * var(--ui, 1))));padding:calc(6px * var(--ui, 1));display:grid;gap:calc(3px * var(--ui, 1))}
.sbx-menu[hidden],.sbx-rs-panel[hidden]{display:none}
.sbx-grp{margin:calc(6px * var(--ui, 1)) calc(6px * var(--ui, 1)) 2px;font:400 calc(9.5px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.18em;text-transform:uppercase;color:var(--dim)}
.sbx-empty{margin:0;padding:calc(6px * var(--ui, 1)) calc(8px * var(--ui, 1));font-size:calc(12px * var(--ui, 1));color:var(--dim)}
.sbx-opt{display:flex;align-items:center;gap:calc(10px * var(--ui, 1));min-height:calc(42px * var(--ui, 1));padding:calc(5px * var(--ui, 1)) calc(8px * var(--ui, 1));border:1px solid transparent;color:var(--mute);text-align:left}
.sbx-opt:hover,.sbx-opt:focus-visible{border-color:rgb(255 255 255/.22);color:var(--fg);outline:none}
.sbx-opt[aria-selected="true"]{border-color:var(--sbx-acc);color:var(--fg);background:rgb(255 255 255/.08)}
.sbx-opt:disabled{cursor:default}
.sbx-opt span{display:grid;gap:calc(3px * var(--ui, 1));min-width:0}
.sbx-opt b{font-size:calc(12.5px * var(--ui, 1));font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sbx-opt small{font:400 calc(9.5px * var(--ui, 1))/1.2 var(--font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--dim);white-space:nowrap}
.sbx-thumb{flex:none;width:calc(40px * var(--ui, 1));height:calc(22px * var(--ui, 1));border:1px solid rgb(255 255 255/.12);background:#050505}
.sbx-thumb rect{fill:rgb(255 255 255/.8)}
.sbx-opt[aria-selected="true"] .sbx-thumb rect{fill:var(--sbx-acc)}
.sbx-build{display:flex;align-items:center;gap:calc(10px * var(--ui, 1));min-height:calc(40px * var(--ui, 1));margin-top:calc(4px * var(--ui, 1));padding:0 calc(8px * var(--ui, 1));border:1px dashed rgb(255 255 255/.24);color:var(--fg);font-size:calc(12.5px * var(--ui, 1));font-weight:600;text-decoration:none}
.sbx-build i{display:grid;place-items:center;width:calc(22px * var(--ui, 1));height:calc(22px * var(--ui, 1));border:1px solid currentColor;font-style:normal}
.sbx-build:hover{border-color:var(--sbx-acc);color:var(--sbx-acc)}
/* Render Settings (same rows as the site's panel) */
.sbx-rs-panel{width:min(calc(340px * var(--ui, 1)),calc(100vw - calc(16px * var(--ui, 1))));padding:calc(12px * var(--ui, 1));display:grid;gap:calc(10px * var(--ui, 1))}
.sbx-rs-head{display:flex;align-items:center;gap:calc(10px * var(--ui, 1))}
.sbx-rs-head b{font-size:calc(13px * var(--ui, 1));font-weight:600}
.sbx-rs-stats{flex:1;font:400 calc(9.5px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.1em;color:var(--dim);text-align:right}
.sbx-x{width:calc(26px * var(--ui, 1));height:calc(26px * var(--ui, 1));border:1px solid rgb(255 255 255/.16);color:var(--mute);font-size:calc(15px * var(--ui, 1));line-height:1}
.sbx-x:hover{color:#fff;border-color:#fff}
.sbx-rs-row{display:grid;gap:calc(6px * var(--ui, 1))}
.sbx-rs-l{display:flex;justify-content:space-between;font:400 calc(9.5px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.14em;text-transform:uppercase;color:var(--mute)}
.sbx-rs-l i{font-style:normal;color:var(--fg)}
.sbx-rs-seg{display:flex;border:1px solid rgb(255 255 255/.16)}
.sbx-rs-seg button{flex:1 1 0;min-width:0;height:calc(28px * var(--ui, 1));padding:0 calc(6px * var(--ui, 1));font-size:calc(11.5px * var(--ui, 1));color:var(--mute)}
.sbx-rs-seg button+button{border-left:1px solid rgb(255 255 255/.12)}
.sbx-rs-seg button:hover{color:#fff}
.sbx-rs-seg button[aria-pressed="true"]{background:#fff;color:#050505}
.sbx-rs-row input[type=range]{width:100%;accent-color:var(--sbx-acc)}
.sbx-rs-ends{display:flex;justify-content:space-between;font:400 calc(9px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--dim)}
.sbx-rs-reset{height:calc(32px * var(--ui, 1));border:1px solid rgb(255 255 255/.18);color:var(--fg);font-size:calc(12px * var(--ui, 1));font-weight:600}
.sbx-rs-reset:hover{border-color:#fff}
/* narrow column: the dropdown takes a full row, the rest wraps under it */
html:not(.phone) .stage>.stage-bar.sbx-tight .sbx-stage{flex:1 1 100%;max-width:none}
html:not(.phone) .stage>.stage-bar.sbx-tight .sb-walls{margin-left:0}
html:not(.phone) .stage>.stage-bar.sbx-tight .sb-seg button{padding:0 calc(9px * var(--ui, 1))}
/* Oct 17: full screen: the Stage bar floats as a slim strip at the bottom of the screen; bar + exit button hide after 2.5 s idle */
html:not(.phone) .canvas-wrap>.stage-bar.sbx-fs{position:absolute;left:50%;right:auto;top:auto;bottom:calc(calc(18px * var(--ui, 1)) + env(safe-area-inset-bottom));transform:translateX(-50%);width:auto;max-width:calc(100% - calc(40px * var(--ui, 1)));height:auto;min-height:0;flex-wrap:wrap;justify-content:center;align-items:center;gap:calc(6px * var(--ui, 1));padding:calc(6px * var(--ui, 1));z-index:7;line-height:1.4;
  background:rgb(10 10 12/.84);border:1px solid rgb(255 255 255/.16);box-shadow:inset 0 1px 0 rgb(255 255 255/.06),0 20px 60px -20px #000;transition:opacity .35s}
.canvas-wrap.fs-on .stage-bar{transition:opacity .35s}
/* phones keep the Stage controls in the sheet; in full screen the bar comes back as a slim strip over the picture */
html.phone .canvas-wrap.fs-on .stage-bar{display:flex!important;position:absolute;left:calc(calc(10px * var(--ui, 1)) + env(safe-area-inset-left));right:calc(calc(10px * var(--ui, 1)) + env(safe-area-inset-right));bottom:calc(calc(12px * var(--ui, 1)) + env(safe-area-inset-bottom));top:auto;transform:none;width:auto;height:auto;min-height:0;flex-wrap:wrap;justify-content:center;gap:calc(6px * var(--ui, 1));padding:calc(6px * var(--ui, 1));z-index:7;line-height:1.4;background:rgb(10 10 12/.86);border:1px solid rgb(255 255 255/.16)}
html.phone .canvas-wrap.fs-on .stage-bar .sbx-stage,html.phone .canvas-wrap.fs-on .stage-bar .sb-walls,html.phone .canvas-wrap.fs-on .stage-bar .sbx-scale{display:none}
.canvas-wrap.fs-on.fs-idle .stage-bar,.canvas-wrap.fs-on.fs-idle .fs-btn{opacity:0!important;pointer-events:none}
.canvas-wrap.fs-on.fs-idle,.canvas-wrap.fs-on.fs-idle *{cursor:none!important}
/* the fullscreen button keeps clear of the frame's HUD in Stage view */
html:not(.phone) .canvas-wrap.stage-on .fs-btn{z-index:6}
/* Oct 17: Scale (Fill / Fit / Stretch / 1:1 Pixel) in the Stage Preview bar, same trigger spec as My Stage */
.sbx-scale{position:relative;display:flex;flex:none}
.sbx-scale-trig{width:auto;min-width:calc(118px * var(--ui, 1))}
.sbx-scale-trig .sbx-scale-cur{flex:none;font-size:calc(12.5px * var(--ui, 1));font-weight:600;white-space:nowrap}
.sbx-scale-ico{flex:none;width:calc(40px * var(--ui, 1));height:calc(22px * var(--ui, 1));border:1px solid rgb(255 255 255/.12);color:rgb(255 255 255/.8)}
.sbx-opt[aria-selected="true"] .sbx-scale-ico{color:var(--sbx-acc)}
html:not(.phone) .stage>.stage-bar.sbx-tight .sbx-scale{flex:1 1 auto}
html:not(.phone) .stage>.stage-bar.sbx-tight .sbx-scale-trig{width:100%}
/* Oct 20 condense pass: on-view gear + FPS readout in 3D (clear glass, no blur), matching the site's ViewOverlay */
.sbx-vo{position:absolute;inset:0;z-index:6;pointer-events:none}
.sbx-vo[hidden]{display:none!important}
.sbx-vo>*{pointer-events:auto}
/* t1080u: drift MUST be position:absolute (was missing → play/pause glyph floated top-left over Stage HUD) */
.sbx-vo-gear,.sbx-vo-fps,.sbx-vo-drift{position:absolute;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.22);color:rgba(255,255,255,.8);-webkit-backdrop-filter:none;backdrop-filter:none;border-radius:0;cursor:pointer;transition:color .2s,border-color .2s,background-color .2s}
.sbx-vo-gear,.sbx-vo-drift{top:calc(8px * var(--ui, 1));right:calc(8px * var(--ui, 1));width:calc(28px * var(--ui, 1));height:calc(28px * var(--ui, 1));display:grid;place-items:center;padding:0}
/* drift right/top overridden by oct23 cluster */
.sbx-vo-drift.on,.sbx-vo-drift[aria-pressed="true"]{color:#fff;border-color:rgba(255,255,255,.6);background:rgba(255,255,255,.1)}
.sbx-vo-drift svg{width:calc(12px * var(--ui, 1));height:calc(12px * var(--ui, 1))}
.sbx-vo-gear svg{width:calc(14px * var(--ui, 1));height:calc(14px * var(--ui, 1))}
.sbx-vo-gear:hover,.sbx-vo-gear[aria-expanded="true"],.sbx-vo-drift:hover{color:#fff;border-color:rgba(255,255,255,.6);background:rgba(255,255,255,.1)}
.sbx-vo-fps{top:calc(8px * var(--ui, 1));left:calc(8px * var(--ui, 1));height:calc(18px * var(--ui, 1));padding:0 calc(6px * var(--ui, 1));display:inline-flex;align-items:center;gap:.3em;font:500 calc(10px * var(--ui, 1))/1 var(--mono,ui-monospace,monospace);letter-spacing:.08em;font-variant-numeric:tabular-nums}
.sbx-vo-fps:hover{color:#fff;border-color:rgba(255,255,255,.5)}
.sbx-vo-gear:focus-visible,.sbx-vo-fps:focus-visible,.sbx-vo-drift:focus-visible{outline:1px solid #fff;outline-offset:2px}
html.phone .sbx-vo-gear,html.phone .sbx-vo-drift{width:calc(32px * var(--ui, 1));height:calc(32px * var(--ui, 1));display:grid;place-items:center}
/* phone cluster positions in oct23 */
html.phone .sbx-vo-gear::before,html.phone .sbx-vo-fps::before{content:"";position:absolute;left:calc(-4px * var(--ui, 1));right:calc(-4px * var(--ui, 1));top:50%;height:calc(40px * var(--ui, 1));transform:translateY(-50%)}
html.phone .sbx-vo-fps{top:calc(6px * var(--ui, 1));left:calc(6px * var(--ui, 1))}
.sbx-rs[hidden]{display:none!important}
/* clear of the editor's stage readout strip */
/* t1086u: desk tops/rights set in oct23 cluster (gear+fs row, drift under gear) */
html:not(.phone) .sbx-vo-fps{top:calc(12px * var(--ui, 1))}

/* Oct 24: Stage Settings lite — My Stage + Edit Walls (no Raster 2D/3D strip) */
html:not(.phone) .stage>.stage-bar{align-items:center}
html:not(.phone) .stage>.stage-bar .sbx-rs[hidden],html:not(.phone) .stage>.stage-bar .sbx-scale[hidden]{display:none!important}

/* t1064u: Stage Settings as closed-by-default dropdown under the preview */
html:not(.phone) .stage>.stage-bar{
  min-height:0;height:auto;padding:0;gap:0;border:0;background:transparent;box-shadow:none;
  justify-content:flex-start;flex-wrap:nowrap;width:auto!important;max-width:min(calc(320px * var(--ui, 1)),100%);
}
html:not(.phone) .stage>.stage-bar .sbx-ss-trig{
  display:inline-flex;align-items:center;gap:calc(8px * var(--ui, 1));min-width:0;max-width:100%;height:calc(36px * var(--ui, 1));padding:0 calc(10px * var(--ui, 1)) 0 calc(12px * var(--ui, 1));
  border:1px solid rgb(255 255 255/.22);background:rgb(10 10 12/.92);color:var(--fg);text-align:left;cursor:pointer;
  box-shadow:inset 0 1px 0 rgb(255 255 255/.06),0 12px 40px -24px #000;
}
html:not(.phone) .stage>.stage-bar .sbx-ss-trig:hover,
html:not(.phone) .stage>.stage-bar .sbx-ss-trig[aria-expanded="true"]{
  border-color:var(--sbx-acc);box-shadow:0 0 16px -6px var(--sbx-acc);
}
html:not(.phone) .stage>.stage-bar .sbx-ss-k{
  flex:none;font:400 calc(9.5px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.16em;text-transform:uppercase;color:var(--dim);
  padding-left:calc(17px * var(--ui, 1));
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect width='3' height='3' fill='%23fff'/%3E%3Crect x='5' y='5' width='3' height='3' fill='%23fff'/%3E%3Crect x='5' width='3' height='3' fill='%23fff' fill-opacity='.22'/%3E%3Crect y='5' width='3' height='3' fill='%23fff' fill-opacity='.22'/%3E%3C/svg%3E") 0 50%/8px 8px no-repeat;
}
html:not(.phone) .stage>.stage-bar .sbx-ss-cur{
  flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:calc(12.5px * var(--ui, 1));font-weight:600;
}
html:not(.phone) .stage>.stage-bar .sbx-ss-trig svg{flex:none;width:calc(9px * var(--ui, 1));height:calc(9px * var(--ui, 1));color:var(--mute)}
html:not(.phone) .stage>.stage-bar.sbx-ss-open .sbx-ss-trig svg{transform:rotate(180deg)}
.sbx-ss-panel{
  position:fixed;z-index:95;display:grid;gap:calc(8px * var(--ui, 1));width:min(calc(340px * var(--ui, 1)),calc(100vw - calc(16px * var(--ui, 1))));padding:calc(12px * var(--ui, 1));
  background:#0b0b0d;border:1px solid rgb(255 255 255/.2);
  box-shadow:0 30px 90px -20px #000,0 0 0 1px rgb(255 255 255/.06);white-space:normal;
}
.sbx-ss-panel[hidden]{display:none!important}
.sbx-ss-head{display:flex;align-items:center;gap:calc(8px * var(--ui, 1));min-height:calc(26px * var(--ui, 1))}
.sbx-ss-head b{
  flex:1;font-family:var(--font-display);font-stretch:125%;font-weight:800;font-size:calc(12px * var(--ui, 1));line-height:1;
  letter-spacing:.02em;text-transform:uppercase;color:var(--fg);padding-left:calc(17px * var(--ui, 1));
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect width='3' height='3' fill='%23fff'/%3E%3Crect x='5' y='5' width='3' height='3' fill='%23fff'/%3E%3Crect x='5' width='3' height='3' fill='%23fff' fill-opacity='.22'/%3E%3Crect y='5' width='3' height='3' fill='%23fff' fill-opacity='.22'/%3E%3C/svg%3E") 0 50%/8px 8px no-repeat;
}
.sbx-ss-panel .sbx-stage{flex:none;max-width:none;width:100%;display:flex}
.sbx-ss-panel .sbx-trig{width:100%}
.sbx-ss-panel .sb-walls{
  margin-left:0;width:100%;height:calc(36px * var(--ui, 1));display:inline-flex;align-items:center;justify-content:center;gap:calc(7px * var(--ui, 1));
  background:var(--sbx-acc);color:#050507;box-shadow:0 0 22px -8px var(--sbx-acc);border:0;cursor:pointer;font-size:calc(12.5px * var(--ui, 1));font-weight:600;
}
.sbx-ss-panel .sb-walls.on{background:rgb(255 255 255/.1);color:#fff;box-shadow:inset 0 0 0 1px #fff}
.sbx-ss-panel .sb-walls svg{width:calc(12px * var(--ui, 1));height:calc(12px * var(--ui, 1))}
/* full screen: Stage Settings trigger stays off (My Stage / Edit Walls were already hidden in FS) */
html:not(.phone) .canvas-wrap.fs-on>.stage-bar .sbx-ss-trig{display:none!important}
html.phone .canvas-wrap.fs-on .stage-bar .sbx-ss-trig{display:none!important}
