/* PXLGEN layout pass (Oct 17, Camaron): section labels, Randomize + Export in the top bar, a solid inspector header, the
   custom palette gradient editor. Own file (loaded last) so editor.css / mobile.css stay as they were. White monochrome, square. */

/* ---------- section labels: the PXLGEN wordmark face (wide heavy display), beacon square, count after the label */
#layersPanel .panel-head .eyebrow,.sec-h,.sp-k{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)}
#layersPanel .panel-head .eyebrow b{margin-left:2px;font-family:var(--font-mono);font-stretch:100%;font-weight:500;font-size:calc(11px * var(--ui, 1));letter-spacing:.08em;color:var(--dim)}
.sec-h{display:flex;align-items:center;gap:calc(9px * var(--ui, 1));margin:0;white-space:nowrap}
.sec-h i{flex:none;width:calc(8px * var(--ui, 1));height:calc(8px * var(--ui, 1));
  background:linear-gradient(#fff,#fff) 0 0/3px 3px no-repeat,linear-gradient(#fff,#fff) 5px 5px/3px 3px no-repeat,
  linear-gradient(rgb(255 255 255/.22),rgb(255 255 255/.22)) 5px 0/3px 3px no-repeat,linear-gradient(rgb(255 255 255/.22),rgb(255 255 255/.22)) 0 5px/3px 3px no-repeat}
/* Preset Manager label carries the beacon square; Stage Settings label lives in the dropdown head (t1064u) */
.sp-k{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}
/* Editor: above the preview (app.js fitCanvas reserves its height and aligns it with the panels) */
#secEditor{position:absolute;z-index:4;height:calc(14px * var(--ui, 1));pointer-events:none}
html.phone #secEditor{display:none}
/* t1064u: Stage Settings label moved into the dropdown — no always-on ::before row */
html:not(.phone) .stage>.stage-bar::before{content:none;display:none}
/* Playback: first row of the transport, which is now one column-wide two-row panel */
.dock>.dk-h{display:none}
html:not(.phone):not(.tablet) .dock>.dk-h{display:flex;flex:0 0 100%;order:0!important;height:calc(14px * var(--ui, 1));margin:2px 0 0 calc(4px * var(--ui, 1))}
html:not(.phone):not(.tablet) .dock.dk-wrap{padding:calc(10px * var(--ui, 1)) calc(10px * var(--ui, 1)) calc(10px * var(--ui, 1));row-gap:calc(10px * var(--ui, 1))}
/* the dock without Randomize / Export: row 1 play · timeline · loop, row 2 BPM · length · Loop Quality (no leftover gaps) */
html:not(.phone):not(.tablet) .dock.dk-wrap .dsep:not(:first-of-type){display:none}
html:not(.phone):not(.tablet) .dock.dk-wrap .wm-up{order:21;margin-left:auto}
/* row 2 keeps BPM · length · Loop Quality · Go Pro on one line: the upsell shortens to its mark below 700px */
@media (max-width:1700px){html:not(.phone):not(.tablet) .dock.dk-wrap .wm-up{font-size:0;gap:0;padding:0 calc(6px * var(--ui, 1));height:calc(34px * var(--ui, 1));border:1px solid var(--line-2)}html:not(.phone):not(.tablet) .dock.dk-wrap .wm-up svg{width:calc(12px * var(--ui, 1));height:calc(12px * var(--ui, 1))}}
#qualitySel .sel-pill .k{font:400 calc(9.5px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.16em;color:var(--dim);margin-right:2px}
/* Preset Manager label sits in its header the same way */
.sp-k{display:inline-block;height:calc(14px * var(--ui, 1));line-height:calc(14px * var(--ui, 1))}

/* ---------- top bar: Randomize (ghost) + Export (primary white) at the far right, after Undo / Redo and Preset */
.nav .nav-rand,.nav .nav-export{flex:none;height:calc(38px * var(--ui, 1));padding:0 calc(14px * var(--ui, 1));gap:calc(8px * var(--ui, 1));font-size:calc(13px * var(--ui, 1))}
.nav .nav-rand{border:1px solid var(--line-2);background:rgb(255 255 255/.03);color:var(--fg)}
.nav .nav-rand:hover{border-color:var(--fg)}
.nav .nav-rand svg,.nav .nav-export svg{width:calc(13px * var(--ui, 1));height:calc(13px * var(--ui, 1))}
.nav .nav-export{background:#fff;color:#050505;box-shadow:0 0 22px -10px rgb(255 255 255/.6)}
.nav .nav-export.locked{background:rgb(255 255 255/.1);color:var(--fg);box-shadow:inset 0 0 0 1px var(--line-2)}
@media (max-width:1180px){html:not(.phone) .nav .nav-rand span{display:none}html:not(.phone) .nav .nav-rand{padding:0 calc(12px * var(--ui, 1))}}
/* the Export dialog opens under the top-bar button (app.js still toggles it; only its anchor moved) */
html:not(.phone) #exportPop{top:calc(var(--gap) + var(--nav-h) + calc(8px * var(--ui, 1)))!important;bottom:auto!important;left:auto!important;right:var(--gap)!important;max-height:calc(100vh - var(--nav-h) - var(--gap) * 2 - calc(16px * var(--ui, 1)));overflow-y:auto}
/* phone: icon-only in the top bar (the phone app's own Randomize button stays; the desktop one hides) */
html.phone .nav .nav-rand{display:none}
html.phone .nav .nav-export{order:7;width:calc(40px * var(--ui, 1));height:calc(36px * var(--ui, 1));padding:0;font-size:0;gap:0;margin-left:2px}
html.phone .nav .nav-export svg{width:calc(14px * var(--ui, 1));height:calc(14px * var(--ui, 1))}
html.phone .nav .mx-shuffle{order:6}

/* ---------- inspector header: solid (controls never show through), even rhythm kicker · title · counter · description */
.insp-head{background:rgb(14 14 16)!important;padding:calc(20px * var(--ui, 1)) calc(16px * var(--ui, 1)) calc(16px * var(--ui, 1)) calc(20px * var(--ui, 1));border-bottom:1px solid var(--line)}
.insp-head::after{display:none!important}
.insp-head .ttl{display:flex;flex-direction:column;align-items:flex-start;gap:calc(8px * var(--ui, 1));margin-top:calc(12px * var(--ui, 1));line-height:.92}
.insp-head .ttl .t{display:block;max-width:100%;overflow-wrap:anywhere}
.insp-head .ttl .n{display:block;margin:0;font-size:calc(10.5px * var(--ui, 1));line-height:1;letter-spacing:.14em;vertical-align:baseline;color:var(--dim)}
.insp-head .ttl .n:empty{display:none}
.insp-head .insp-desc{margin:calc(10px * var(--ui, 1)) 0 0;max-width:36ch}
.insp-head + *{margin-top:calc(12px * var(--ui, 1))}
html.phone .insp-head{background:#111214!important;padding-bottom:calc(14px * var(--ui, 1))}

/* ---------- custom palette: Randomize + gradient editor (editor/layout-oct17.js PXLGrad) */
.swatches .gx{order:99;grid-column:1/-1;display:grid;gap:calc(8px * var(--ui, 1));margin-top:2px}
.gx-acts{display:grid;grid-template-columns:1fr 1fr;gap:calc(6px * var(--ui, 1))}
.gx-acts.one{grid-template-columns:1fr}
.gx-btn{height:calc(30px * var(--ui, 1));display:flex;align-items:center;justify-content:center;gap:calc(7px * var(--ui, 1));padding:0 calc(10px * var(--ui, 1));border:1px solid var(--line-2);background:rgb(255 255 255/.03);color:var(--fg);font:500 calc(10.5px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.14em;text-transform:uppercase;cursor:pointer}
.gx-btn svg{width:calc(11px * var(--ui, 1));height:calc(11px * var(--ui, 1))}
.gx-btn:hover:not(:disabled){border-color:var(--fg)}
.gx-btn:disabled{opacity:.35;cursor:not-allowed}
.gx-bar{position:relative;height:calc(28px * var(--ui, 1));margin:calc(10px * var(--ui, 1)) calc(7px * var(--ui, 1)) calc(14px * var(--ui, 1));box-shadow:inset 0 0 0 1px rgb(255 255 255/.14);cursor:copy;touch-action:none}
.gx-stop{position:absolute;top:50%;width:calc(14px * var(--ui, 1));height:calc(36px * var(--ui, 1));margin:calc(-18px * var(--ui, 1)) 0 0 calc(-7px * var(--ui, 1));padding:0;border:2px solid #050505;box-shadow:0 0 0 1px rgb(255 255 255/.55);cursor:grab;touch-action:none}
.gx-stop.on{box-shadow:0 0 0 1px #050505,0 0 0 3px #fff;z-index:2}
.gx-stop.off{opacity:.25}
.gx-stop:active{cursor:grabbing}
.gx-sel{display:flex;align-items:center;gap:calc(6px * var(--ui, 1));min-width:0}
.gx-sw{position:relative;flex:none;width:calc(30px * var(--ui, 1));height:calc(30px * var(--ui, 1));box-shadow:inset 0 0 0 1px rgb(255 255 255/.2);overflow:hidden;cursor:pointer}
.gx-sw input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.gx-lab{flex:1;min-width:0;font:500 calc(10.5px * var(--ui, 1))/1.2 var(--font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gx-lab b{color:var(--fg);font-weight:500}
.gx-del{flex:none;width:calc(30px * var(--ui, 1));height:calc(30px * var(--ui, 1));display:grid;place-items:center;border:1px solid var(--line-2);background:none;color:var(--fg);cursor:pointer;font-size:calc(15px * var(--ui, 1));line-height:1}
.gx-del:hover:not(:disabled){background:#fff;color:#050505}
.gx-del:disabled{opacity:.3;cursor:not-allowed}
.gx-note{margin:0;font-size:calc(11px * var(--ui, 1));line-height:1.4;color:var(--dim)}
html.phone .gx-btn,html.phone .gx-sw,html.phone .gx-del{height:calc(40px * var(--ui, 1))}
html.phone .gx-sw,html.phone .gx-del{width:calc(40px * var(--ui, 1))}
html.phone .gx-bar{height:calc(34px * var(--ui, 1))}
html.phone .gx-stop{width:calc(18px * var(--ui, 1));height:calc(44px * var(--ui, 1));margin:calc(-22px * var(--ui, 1)) 0 0 calc(-9px * var(--ui, 1))}

/* ---------- free preview pulse (editor/layout-oct17.js): guest + free only, overlay above the 2D / 3D preview, never strobing */
.free-pulse{position:absolute;inset:0;z-index:5;pointer-events:none;opacity:0;background:rgb(232 28 36/var(--fp,0));box-shadow:inset 0 0 calc(60px + 80px * var(--fp,0)) rgb(255 40 48/calc(var(--fp,0) * 1.2))}
.free-pulse.on{opacity:1}
.free-pulse .fp-tag{position:absolute;left:50%;bottom:calc(14px * var(--ui, 1));transform:translateX(-50%);padding:calc(5px * var(--ui, 1)) calc(10px * var(--ui, 1));font:500 calc(10px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.18em;text-transform:uppercase;color:#fff;background:rgb(5 5 5/.6);box-shadow:inset 0 0 0 1px rgb(255 255 255/.25);opacity:calc(var(--fp,0) * 2.5);white-space:nowrap}
html.phone .free-pulse .fp-tag{bottom:calc(10px * var(--ui, 1));font-size:calc(9px * var(--ui, 1))}

/* =========== Oct 18 mobile pass 2 (Camaron: "tabs and buttons are so big", "no words cut off", dense pro-tool feel) ===========
   Phone tokens (same styles as desktop, one size step down): controls are 32–36px visually; hit areas stay 44px through
   transparent top/bottom borders (background-clip:padding-box, outline drawn with an inset shadow), never visual bulk.
   No ellipsis on any button, tab or chip: labels fit, rows scroll. Shared with the site: docs/MOBILE_QA.md. */
html.phone{--tk-h:calc(36px * var(--ui, 1));--tk-h-sm:calc(32px * var(--ui, 1));--tk-fs:calc(12px * var(--ui, 1));--tk-ico:calc(12px * var(--ui, 1));--tk-hit:calc(44px * var(--ui, 1));--m-tabs-h:48px;--m-pad-l:calc(var(--sal) + 16px);--m-pad-r:calc(var(--sar) + 16px)}
/* hit-pad helper: 44px box, 36px (or 32px) visual */
html.phone .m-home .btn,html.phone .m-look-acts .btn,html.phone .tp-type .btn,html.phone .m-pane #exportPop .btn:not(.wide),html.phone .sp-plus,html.phone .sp-manage,
html.phone .m-home .m-home-add{height:var(--tk-hit)!important;border:4px solid transparent!important;border-left-width:0!important;border-right-width:0!important;background-clip:padding-box!important;box-shadow:inset 0 0 0 1px var(--m-line)!important;font-size:var(--tk-fs)!important;padding:0 calc(12px * var(--ui, 1))!important;gap:calc(6px * var(--ui, 1))!important}
html.phone .m-home .btn svg,html.phone .m-look-acts .btn svg,html.phone .tp-type .btn svg,html.phone .sp-plus svg{width:var(--tk-ico)!important;height:var(--tk-ico)!important}
html.phone .m-home .btn-accent,html.phone .m-pane #exportPop .btn-accent{box-shadow:none!important}
/* top bar: 48px, compact controls */
html.phone .nav{height:calc(calc(48px * var(--ui, 1)) + var(--sat))}
html.phone .m-menu-btn{height:calc(32px * var(--ui, 1));padding:0 calc(10px * var(--ui, 1));font-size:calc(13px * var(--ui, 1));gap:calc(6px * var(--ui, 1));max-width:none;flex:none}
html.phone .m-menu-btn .m-mb-ar{display:none}
html.phone .nav .hist-b{width:calc(32px * var(--ui, 1));height:calc(32px * var(--ui, 1))}
html.phone .nav .nav-export{width:calc(36px * var(--ui, 1));height:calc(32px * var(--ui, 1))}
html.phone .nav .brand{flex:none}
/* bottom tabs: 48px bar (44px+ hits), 34px visual active block, inline 11.5px Title Case labels */
.m-tabs button{flex-direction:column!important;justify-content:center;gap:calc(3px * var(--ui, 1))!important;font-size:calc(11px * var(--ui, 1))!important;font-weight:500!important;letter-spacing:0!important;isolation:isolate}
.m-tabs button svg{width:calc(18px * var(--ui, 1))!important;height:calc(18px * var(--ui, 1))!important}
.m-tabs button span{overflow:visible!important;text-overflow:clip!important;max-width:none!important;line-height:1}
.m-tabs button[aria-selected=true]{background:none!important}
.m-tabs button[aria-selected=true]::after{content:"";position:absolute;inset:calc(4px * var(--ui, 1)) calc(6px * var(--ui, 1));z-index:-1;background:rgb(255 255 255/.06)}
/* transport row */
html.phone:not(.land) .dock{height:calc(48px * var(--ui, 1))}
/* sheet panes: tighter rhythm */
html.phone .m-grab{height:calc(18px * var(--ui, 1))}
.m-pane-head{padding:0 var(--m-pad-r) 2px var(--m-pad-l)}
.m-pane-head h3{font-size:calc(18px * var(--ui, 1))!important;margin-top:calc(4px * var(--ui, 1))!important}
.m-field{margin-top:calc(16px * var(--ui, 1))}
.m-presets button{min-height:calc(44px * var(--ui, 1));font-size:calc(13px * var(--ui, 1))}
.m-pal i{height:calc(28px * var(--ui, 1))}
.m-pal{font-size:calc(12px * var(--ui, 1));padding:calc(4px * var(--ui, 1)) calc(4px * var(--ui, 1)) calc(8px * var(--ui, 1));gap:calc(6px * var(--ui, 1))}
.m-pal span{overflow:visible!important;text-overflow:clip!important;white-space:normal!important;line-height:1.2}
.m-chip{height:calc(36px * var(--ui, 1))}
html.phone .sec{margin-bottom:calc(6px * var(--ui, 1))}

/* ---- peek (closed): the home strip fills the space under the pinned preview: Layers · chips · quick actions · tempo */
html.phone:not(.land) .m-sheet .m-home{flex-direction:column!important;align-items:stretch!important;height:auto!important;padding:2px 0 calc(12px * var(--ui, 1))!important;gap:calc(10px * var(--ui, 1))!important}
html.phone:not(.land) .m-home .m-home-head{order:1!important;display:flex;align-items:center;justify-content:space-between;padding:0 var(--m-pad-r) 0 var(--m-pad-l)!important}
html.phone:not(.land) .m-home .m-home-head .eyebrow{display:flex!important;margin:0}
html.phone:not(.land) .m-home .m-home-add{width:auto!important;padding:0 calc(12px * var(--ui, 1))!important}
html.phone:not(.land) .m-home .m-home-add span{display:inline!important}
html.phone:not(.land) .m-home .m-chips{order:2!important;flex:none!important;display:flex;scroll-padding-inline:16px;overflow-x:auto;scrollbar-width:none;padding:0 var(--m-pad-r) 0 var(--m-pad-l)!important;gap:calc(6px * var(--ui, 1))!important;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent)}
html.phone:not(.land) .m-home .m-chip-l{height:calc(36px * var(--ui, 1))!important;max-width:none!important;flex:none!important;padding:0 calc(12px * var(--ui, 1)) 0 0!important;font-size:calc(12.5px * var(--ui, 1))!important;gap:calc(8px * var(--ui, 1))!important}
html.phone:not(.land) .m-home .m-chip-l i{width:calc(36px * var(--ui, 1))!important;height:calc(36px * var(--ui, 1))!important}
html.phone:not(.land) .m-home .m-chip-l span{white-space:nowrap;overflow:visible;text-overflow:clip}
html.phone:not(.land) .m-home .m-home-acts{order:3!important;display:grid!important;grid-template-columns:repeat(3,1fr);gap:calc(6px * var(--ui, 1));padding:0 var(--m-pad-r) 0 var(--m-pad-l)}
html.phone:not(.land) .m-home .m-home-tempo{order:4!important;display:block!important;padding:0 var(--m-pad-r) 0 var(--m-pad-l)}

/* ---- Tap BPM (home strip + phone sheet): one column. Short wide pad, then Loop / Feel / BPM rows with equal segments */
html.phone .tp{display:flex!important;flex-direction:column;align-items:stretch!important;gap:calc(10px * var(--ui, 1));margin:0}
html.phone .tp-pad{aspect-ratio:auto!important;width:100%;height:calc(124px * var(--ui, 1));flex-direction:row;gap:calc(14px * var(--ui, 1))}
html.phone .tp-pad .tp-mark{grid-template-columns:repeat(3,calc(8px * var(--ui, 1)));grid-template-rows:repeat(3,calc(8px * var(--ui, 1)))}
html.phone .tp-pad .tp-bpm{font-size:calc(44px * var(--ui, 1))!important}
html.phone .tp-pad .tp-sub{position:absolute;left:0;right:0;bottom:calc(10px * var(--ui, 1));font-size:calc(10.5px * var(--ui, 1));letter-spacing:.12em;white-space:nowrap}
html.phone .tp-side{gap:calc(6px * var(--ui, 1))}
html.phone .tp-row{gap:calc(10px * var(--ui, 1))}
html.phone .tp-row>.eyebrow{width:calc(40px * var(--ui, 1));font-size:calc(10.5px * var(--ui, 1))}
html.phone .tp-row .seg{display:grid!important;grid-auto-flow:column;grid-auto-columns:1fr;gap:calc(4px * var(--ui, 1));flex:1}
html.phone .tp-row .seg button{height:calc(40px * var(--ui, 1))!important;border:4px solid transparent!important;border-left:0!important;border-right:0!important;background-clip:padding-box!important;box-shadow:inset 0 0 0 1px var(--m-line);font-size:calc(12px * var(--ui, 1))!important;white-space:nowrap;padding:0 2px!important}
html.phone .tp-row .seg button.on{box-shadow:none}
html.phone .tp-type input{flex:1;width:auto;height:calc(36px * var(--ui, 1))}
html.phone .tp-info{font-size:calc(12px * var(--ui, 1));line-height:1.35}
html.phone .m-home-tempo .tp-type,html.phone .m-home-tempo .tp-info{display:none}
html.phone .m-home-tempo .tp-pad{height:calc(96px * var(--ui, 1))}
html.phone .m-home-tempo .tp-bpm{font-size:calc(36px * var(--ui, 1))!important}
html.phone .m-home-tempo .tp-bars button:nth-child(5){display:block}
html.phone .tp-pop{max-height:min(60dvh,calc(520px * var(--ui, 1)))!important;padding:0 var(--m-pad-r) calc(var(--sab) + calc(14px * var(--ui, 1))) var(--m-pad-l)!important}
html.phone .tp-pop .pop-head{display:flex;align-items:center;justify-content:space-between;min-height:calc(48px * var(--ui, 1));margin:0}
html.phone .tp-pop .pop-head .eyebrow{display:none}
html.phone .tp-pop .pop-head h3{font-size:calc(16px * var(--ui, 1))!important;margin:0!important;letter-spacing:0}
html.phone .tp-pop .pop-head .icon{width:calc(44px * var(--ui, 1));height:calc(44px * var(--ui, 1));margin-right:calc(-12px * var(--ui, 1))}

/* ---- inspector header: one compact row of label + actions, then name + n/n + (i); no inline description */
.insp-head .ttl{flex-direction:row!important;flex-wrap:wrap;align-items:center!important;gap:calc(8px * var(--ui, 1))!important}
.insp-head .info-btn{position:relative;flex:none;width:calc(22px * var(--ui, 1));height:calc(22px * var(--ui, 1));display:inline-grid;place-items:center;border:1px solid var(--line-2);color:var(--mute);background:none;padding:0;cursor:pointer;align-self:center}
.insp-head .info-btn::after{content:"";position:absolute;inset:calc(-11px * var(--ui, 1))}
.insp-head .info-btn svg{width:calc(9px * var(--ui, 1));height:calc(9px * var(--ui, 1))}
.insp-head .info-btn:hover,.insp-head .info-btn.on{color:#fff;border-color:#fff;box-shadow:0 0 14px -6px rgb(255 255 255/.7)}
html.phone .insp-head{padding-top:0!important;padding-bottom:calc(10px * var(--ui, 1))!important}
html.phone .insp-head .row1{min-height:calc(44px * var(--ui, 1))}
html.phone .insp-head .acts{gap:2px!important}
html.phone .insp-head .icon:not(.info-btn){width:calc(44px * var(--ui, 1))!important;height:calc(44px * var(--ui, 1))!important;border:0!important;position:relative}
html.phone .insp-head .icon:not(.info-btn)::before{content:"";position:absolute;inset:calc(6px * var(--ui, 1));border:1px solid var(--line-2)}
html.phone .insp-head .icon:not(.info-btn) svg{width:calc(12px * var(--ui, 1))!important;height:calc(12px * var(--ui, 1))!important}
html.phone .insp-head .ttl{font-size:calc(22px * var(--ui, 1))!important;margin-top:0!important}
html.phone .insp-head .ttl .n{font-size:calc(10.5px * var(--ui, 1))}

/* ---- callout (PXLCallout, layout-oct17.js) */
.pxl-callout{position:fixed;z-index:200;max-width:calc(100vw - calc(24px * var(--ui, 1)));padding:calc(10px * var(--ui, 1)) calc(12px * var(--ui, 1)) calc(12px * var(--ui, 1));background:#111214;border:1px solid rgb(255 255 255/.18);box-shadow:0 0 0 1px rgb(0 0 0/.6),0 0 28px -10px rgb(255 255 255/.28),0 18px 50px -20px #000;color:var(--fg);border-radius:0}
.pxl-callout[hidden]{display:none}
.pxl-callout::before{content:"";position:absolute;top:calc(-5px * var(--ui, 1));left:calc(var(--pc-arrow,calc(24px * var(--ui, 1))) - calc(4px * var(--ui, 1)));width:calc(8px * var(--ui, 1));height:calc(8px * var(--ui, 1));background:#111214;border-left:1px solid rgb(255 255 255/.18);border-top:1px solid rgb(255 255 255/.18);transform:rotate(45deg)}
.pxl-callout.above::before{top:auto;bottom:calc(-5px * var(--ui, 1));transform:rotate(225deg)}
.pc-head{display:flex;align-items:center;justify-content:space-between;gap:calc(10px * var(--ui, 1));margin:calc(-4px * var(--ui, 1)) calc(-8px * var(--ui, 1)) calc(4px * var(--ui, 1)) 0}
.pc-t{font:600 calc(13px * var(--ui, 1))/1.2 var(--font-display,inherit);letter-spacing:.01em}
.pc-x{position:relative;width:calc(28px * var(--ui, 1));height:calc(28px * var(--ui, 1));display:grid;place-items:center;border:0;background:none;color:var(--mute);cursor:pointer;padding:0}
.pc-x::after{content:"";position:absolute;inset:calc(-8px * var(--ui, 1))}
.pc-x svg{width:calc(9px * var(--ui, 1));height:calc(9px * var(--ui, 1))}
.pc-x:hover{color:#fff}
.pc-body{margin:0;max-height:calc(1.45em * 4 + 2px);overflow:auto;font-size:calc(13px * var(--ui, 1));line-height:1.45;color:rgb(255 255 255/.75)}

/* ---- Preset Manager: compact head, one horizontal strip of looks (desktop + phone), phone disclosure */
.sp-head{height:auto;min-height:calc(28px * var(--ui, 1))}
.sp-hname b{overflow:visible!important;text-overflow:clip!important;white-space:normal!important;line-height:1.15}
.sp-list{display:flex!important;grid-template-columns:none!important;overflow-x:auto;scrollbar-width:none;gap:calc(4px * var(--ui, 1));padding-bottom:2px;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
.sp-cw{flex:none}
.sp-cw.on,.sp-cw.dirty{grid-column:auto}
.sp-sw{flex:none;height:calc(32px * var(--ui, 1));padding:0 calc(10px * var(--ui, 1)) 0 calc(8px * var(--ui, 1));font-size:calc(12.5px * var(--ui, 1))}
.sp-sw span{overflow:visible!important;text-overflow:clip!important;white-space:nowrap}
.sp-acts{grid-template-columns:auto auto 1fr!important}
.sp-manage{justify-self:end}
/* phone: one sticky strip at the top of the Layers pane (research: sticky chip row above the layer stack) */
/* t960u: phone mid strip disabled — was sticky flex Preset Manager above Layer Stack */
.m-pane .sp-bar.sp-phone{display:none!important}
html.phone .sp-bar.sp-phone .sp-head{display:flex;align-items:center;gap:calc(6px * var(--ui, 1));min-height:calc(44px * var(--ui, 1))}
html.phone .sp-bar .sp-k{display:none}
html.phone .sp-hname{height:calc(44px * var(--ui, 1));flex:1 1 auto;min-width:0;justify-content:flex-start;gap:calc(6px * var(--ui, 1))}
html.phone .sp-hname b{font-size:calc(15px * var(--ui, 1));font-weight:600}
html.phone .sp-hname svg{opacity:.5!important;width:calc(11px * var(--ui, 1));height:calc(11px * var(--ui, 1))}
html.phone .sp-bar.sp-phone .sp-meta{font:500 calc(11px * var(--ui, 1)) var(--font-mono);color:var(--mute);white-space:nowrap}
html.phone .sp-bar.sp-phone .sp-fade{height:calc(44px * var(--ui, 1))!important;flex:none;gap:0}
html.phone .sp-bar.sp-phone .sp-fade button{width:calc(32px * var(--ui, 1));height:calc(44px * var(--ui, 1))}
html.phone .sp-bar.sp-phone .sp-fade b{min-width:calc(32px * var(--ui, 1));font-size:calc(11px * var(--ui, 1));text-align:center}
html.phone .sp-bar.sp-phone .sp-manage-sm,html.phone .sp-bar.sp-phone .sp-plus-sm{flex:none;width:auto!important;padding:0 calc(10px * var(--ui, 1))!important}
html.phone .sp-bar.sp-phone .sp-list{display:flex!important;gap:calc(6px * var(--ui, 1));margin:0 calc(-1 * var(--m-pad-r)) 0 0;padding-right:var(--m-pad-r)}
html.phone .sp-bar.sp-phone .sp-sw{height:calc(44px * var(--ui, 1))!important;padding:0 calc(10px * var(--ui, 1)) 0 calc(8px * var(--ui, 1));font-size:calc(12.5px * var(--ui, 1));gap:calc(6px * var(--ui, 1));border:4px solid transparent!important;border-left:0!important;border-right:0!important;background-clip:padding-box!important;box-shadow:inset 0 0 0 1px var(--m-line)!important}
html.phone .sp-bar.sp-phone .sp-sw.on{box-shadow:inset 0 0 0 1px #fff!important}
html.phone .sp-bar.sp-phone .sp-sw i{font:500 calc(10.5px * var(--ui, 1)) var(--font-mono);opacity:.6}
html.phone .sp-bar.sp-phone .sp-cw{display:flex;align-items:center;gap:2px}
html.phone .sp-bar.sp-phone .sp-ia{display:none!important}
html.phone .sp-bar.sp-phone .sp-cw.on.dirty .sp-ia{display:flex!important}
html.phone .sp-bar.sp-phone .sp-ib{width:calc(32px * var(--ui, 1));height:calc(44px * var(--ui, 1))}
html.phone .sp-bar.sp-phone .sp-plus-chip{flex:none;width:auto!important;padding:0 calc(12px * var(--ui, 1))!important}

/* ---- pop sheets on phones (Export, Add Look, Loop Quality / pill menus): full width, no clipped rows */
html.phone .sp-pop{left:calc(8px * var(--ui, 1))!important;right:calc(8px * var(--ui, 1))!important;width:auto!important;max-width:none!important}
html.phone .sp-add-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;gap:calc(6px * var(--ui, 1))}
html.phone .sp-add-row input{min-width:0}
html.phone .sp-chips{display:flex;flex-wrap:wrap;gap:calc(6px * var(--ui, 1))}
html.phone .menu{left:0!important;right:0!important;width:auto!important;max-width:none!important}
html.phone .m-pane #exportPop .seg{flex-wrap:nowrap}
html.phone .m-pane #exportPop .seg button{min-width:0;white-space:nowrap;height:calc(40px * var(--ui, 1));border:4px solid transparent;border-left:1px solid var(--line-2);border-right:1px solid var(--line-2);background-clip:padding-box;font-size:calc(12px * var(--ui, 1))}

/* ---- Controls (research: 44px rows, label left / slider / value right, 4px track, 18px square thumb) */
html.phone .ctl:has(>.sl){display:grid;grid-template-columns:minmax(0,27%) minmax(0,1fr) auto auto auto;align-items:center;min-height:calc(44px * var(--ui, 1));margin-top:2px}
html.phone .ctl:has(>.sl):first-child{margin-top:0}
html.phone .ctl:has(>.sl)>.ctl-top{display:contents}
html.phone .ctl:has(>.sl) .lb{grid-area:1/1;font-size:calc(13px * var(--ui, 1));line-height:1.2;padding-right:calc(8px * var(--ui, 1));overflow-wrap:anywhere}
html.phone .ctl:has(>.sl)>.sl{grid-area:1/2;height:calc(44px * var(--ui, 1))}
html.phone .ctl:has(>.sl) .reset{grid-area:1/3;display:none}
html.phone .ctl.dirty:has(>.sl) .reset{display:grid}
html.phone .ctl:has(>.sl) .kf{grid-area:1/4}
html.phone .ctl:has(>.sl) .mini{width:calc(30px * var(--ui, 1));height:calc(44px * var(--ui, 1))}
html.phone .ctl:has(>.sl) .vt{grid-area:1/5;margin-left:2px;min-width:calc(48px * var(--ui, 1));height:calc(28px * var(--ui, 1));font-size:calc(12px * var(--ui, 1));padding:0 calc(6px * var(--ui, 1))}
html.phone .ctl:has(>.sl)>:not(.ctl-top):not(.sl){grid-column:1/-1}
html.phone .sl .kn{top:calc(13px * var(--ui, 1));width:calc(18px * var(--ui, 1));height:calc(18px * var(--ui, 1));margin-left:calc(-9px * var(--ui, 1));border-radius:0}
html.phone .ctl:has(>.sel-pill) .ctl-top{min-height:calc(32px * var(--ui, 1));font-size:calc(13px * var(--ui, 1))}
/* section group headers in the inspector: 11px Title Case, tight */
html.phone .sec-h{min-height:calc(44px * var(--ui, 1))}
/* layer rows (research: 56px rows, 40px thumbnails) */
html.phone .layer{min-height:calc(56px * var(--ui, 1))!important;gap:calc(10px * var(--ui, 1))!important}
html.phone .layer .thumb{width:calc(40px * var(--ui, 1))!important;height:calc(40px * var(--ui, 1))!important}
/* Tap BPM stepper (research: BPM field + − / + + Clear) */
.tp-step{flex:none;width:calc(32px * var(--ui, 1));height:calc(32px * var(--ui, 1));display:grid;place-items:center;border:1px solid var(--line-2);background:none;color:var(--fg);font:500 calc(15px * var(--ui, 1)) var(--font-mono);padding:0;cursor:pointer}
.tp-step:hover{border-color:#fff}
html.phone .tp-step{width:calc(40px * var(--ui, 1));height:calc(44px * var(--ui, 1));border:4px solid transparent;border-left:0;border-right:0;background-clip:padding-box;box-shadow:inset 0 0 0 1px var(--m-line)}
html.phone .tp-type{gap:calc(6px * var(--ui, 1))}
html.phone .tp-type input{min-width:0;text-align:center}
/* full sheet: the preview shrinks to a 64px strip above it; transport + HUD hide (the strip is a live thumbnail) */
html.phone.m-full:not(.land) .dock,html.phone.m-full:not(.land) .hud{visibility:hidden}

/* ---- Manage (My Presets): its own full sheet on phones (research), compact one-line rows, no ellipsis anywhere */
.sp-item b,.sp-item small{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere}
html.phone .mp-dialog{place-items:end stretch}
html.phone .mp-dialog .mp-dialog-card{width:100%!important;height:auto!important;max-height:calc(100dvh - calc(48px * var(--ui, 1)) - var(--sat))!important;min-height:60dvh;padding:calc(4px * var(--ui, 1)) var(--m-pad-r) calc(var(--sab) + calc(12px * var(--ui, 1))) var(--m-pad-l);border:0;border-top:1px solid var(--m-line);box-shadow:none}
html.phone .mp-dialog-head{align-items:center;margin-bottom:calc(8px * var(--ui, 1));min-height:calc(48px * var(--ui, 1))}
html.phone .mp-dialog-head .eyebrow{display:none}
html.phone .mp-dialog-head h3{font-size:calc(18px * var(--ui, 1))!important;margin:0!important}
html.phone .mp-dialog-head .icon{width:calc(44px * var(--ui, 1));height:calc(44px * var(--ui, 1));margin-right:calc(-12px * var(--ui, 1));border:0}
html.phone .sp-row{flex-wrap:nowrap!important;gap:2px;min-height:calc(48px * var(--ui, 1))}
html.phone .sp-row .sp-item{flex:1 1 auto!important;padding:calc(6px * var(--ui, 1)) calc(8px * var(--ui, 1));gap:calc(8px * var(--ui, 1))}
html.phone .sp-row .sp-item b{font-size:calc(13px * var(--ui, 1))}
html.phone .sp-row .sp-act{flex:none!important;width:calc(32px * var(--ui, 1))!important;height:auto!important;border:0;color:var(--mute)}
html.phone .sp-nest{margin-left:0!important;padding-left:calc(8px * var(--ui, 1))!important}
html .insp-head .ttl .info-btn{width:calc(22px * var(--ui, 1))!important;height:calc(22px * var(--ui, 1))!important;min-width:0!important;font-size:0!important;border-radius:0!important;margin:0 0 0 2px}
html .insp-head .ttl .info-btn svg{width:calc(9px * var(--ui, 1))!important;height:calc(9px * var(--ui, 1))!important}

/* ---- phone hit areas without visual bulk (qa:mobile) + 11px type floor */
html.phone:not(.land) .m-home .m-chip-l{height:calc(44px * var(--ui, 1))!important;border:4px solid transparent!important;border-left:0!important;border-right:0!important;background-clip:padding-box!important}
html.phone .m-home .m-chip-l.on{box-shadow:inset 0 -2px 0 #fff}
html.phone .m-menu-btn{height:calc(44px * var(--ui, 1))!important;border:6px solid transparent!important;border-left:0!important;border-right:0!important;background-clip:padding-box;box-shadow:inset 0 0 0 1px var(--m-line)}
html.phone[data-mtab=looks] .m-menu-btn{box-shadow:inset 0 0 0 1px #fff}
html.phone .nav .nav-export{height:calc(44px * var(--ui, 1))!important;border:6px solid transparent!important;border-left:0!important;border-right:0!important;background-clip:padding-box!important}
html.phone .nav .brand{height:calc(44px * var(--ui, 1))}
html.phone .tp-row .seg button{height:calc(44px * var(--ui, 1))!important;border-top-width:6px!important;border-bottom-width:6px!important}
html.phone #wmUp{position:relative} /* Oct 18: #fsBtn stays absolute (top-right of the preview); relative here had dropped it behind the play button */
html.phone #fsBtn::after{content:"";position:absolute;inset:calc(-10px * var(--ui, 1))}
html.phone #wmUp::after{content:"";position:absolute;inset:calc(-16px * var(--ui, 1)) calc(-12px * var(--ui, 1))}
html.phone .hud,html.phone .hud span,html.phone .scrub-meta .tc,html.phone .tp-btn,html.phone .tp-row>.eyebrow,html.phone .tp-pad .tp-sub{font-size:calc(11px * var(--ui, 1))!important}
/* Manage sheet at 375: nothing wider than the sheet; names wrap */
html.phone .mp-dialog-body .mp-list{display:grid;grid-template-columns:minmax(0,1fr)}
html.phone .mp-group,html.phone .mp-row,html.phone .sp-nest,html.phone .sp-row{min-width:0;max-width:100%}
html.phone .mp-item{min-width:0;flex:1 1 auto}
html.phone .mp-item b,html.phone .mp-item small{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere}
html.phone .mp-act{width:calc(40px * var(--ui, 1))!important;flex:none}
html.phone .mp-dialog-head{min-width:0}
/* top bar never truncates the Looks pill (375: everything shares 375px) */
html.phone .m-menu-btn{flex:none!important;min-width:max-content}
html.phone .m-menu-btn .m-mb-name{overflow:visible!important;text-overflow:clip!important;max-width:none!important}
@media (max-width:389px){html.phone .nav .brand .wm{font-size:.9em}html.phone .nav .hist-b{width:calc(30px * var(--ui, 1))}html.phone .nav .brand{gap:calc(6px * var(--ui, 1))}}
/* phone modals (Add Layer, Song, Stage…): 18px titles; Add Layer card descriptions wrap in full (no clamp) */
html.phone .m-modal h3.display,html.phone .m-modal h2.display,html.phone .m-pane h3.display{font-size:calc(18px * var(--ui, 1))!important;margin-top:calc(4px * var(--ui, 1))!important}
html.phone .am-desc{-webkit-line-clamp:unset!important;line-clamp:unset!important;display:block!important;overflow:visible!important;font-size:calc(12px * var(--ui, 1));line-height:1.35}
html.phone .trk-head h3.display,html.phone .pop-head h3.display,html.phone .mp-dialog-head h3.display{font-size:calc(18px * var(--ui, 1))!important;margin-top:calc(4px * var(--ui, 1))!important}

/* Oct 18: Pro export upsell banner (after generating, watermarked output only) */
.pxl-upsell { position: fixed; z-index: 60; left: 50%; bottom: calc(72px * var(--ui, 1)); transform: translateX(-50%); width: min(calc(560px * var(--ui, 1)), calc(100vw - calc(24px * var(--ui, 1)))); display: flex; align-items: center; gap: calc(12px * var(--ui, 1));
  padding: calc(10px * var(--ui, 1)) calc(6px * var(--ui, 1)) calc(10px * var(--ui, 1)) calc(14px * var(--ui, 1)); background: #111214; border: 1px solid rgb(54 240 122 / .45); box-shadow: 0 0 0 1px #000, 0 0 26px -10px rgb(54 240 122 / .55), 0 18px 40px -18px #000; color: #f4f4f0; }
.pxl-upsell .pu-dot { width: calc(8px * var(--ui, 1)); height: calc(8px * var(--ui, 1)); flex: none; background: #36f07a; box-shadow: 0 0 10px 2px rgb(54 240 122 / .6); }
.pxl-upsell .pu-t { flex: 1; min-width: 0; margin: 0; display: grid; gap: 2px; font-size: calc(13px * var(--ui, 1)); line-height: 1.35; }
.pxl-upsell .pu-t b { font-weight: 600; font-size: calc(14px * var(--ui, 1)); }
.pxl-upsell .pu-t span { color: rgb(255 255 255 / .62); }
.pxl-upsell .pu-go { flex: none; display: inline-flex; align-items: center; height: calc(36px * var(--ui, 1)); padding: 0 calc(14px * var(--ui, 1)); background: #fff; color: #050505; font-weight: 600; font-size: calc(13px * var(--ui, 1)); text-decoration: none; }
.pxl-upsell .pu-x { position: relative; flex: none; width: calc(32px * var(--ui, 1)); height: calc(32px * var(--ui, 1)); display: grid; place-items: center; border: 0; background: none; color: rgb(255 255 255 / .6); cursor: pointer; }
.pxl-upsell .pu-x::after { content: ""; position: absolute; inset: calc(-6px * var(--ui, 1)); }
html.phone .pxl-upsell { bottom: calc(var(--m-dock-h, calc(48px * var(--ui, 1))) + var(--safe-b, 0px) + calc(12px * var(--ui, 1))); padding: calc(8px * var(--ui, 1)) calc(4px * var(--ui, 1)) calc(8px * var(--ui, 1)) calc(12px * var(--ui, 1)); gap: calc(10px * var(--ui, 1)); }
html.phone .pxl-upsell .pu-go { height: calc(36px * var(--ui, 1)); border-top: 4px solid transparent; border-bottom: 4px solid transparent; background-clip: padding-box; height: calc(44px * var(--ui, 1)); }
html.phone .pxl-upsell .pu-x { width: calc(44px * var(--ui, 1)); height: calc(44px * var(--ui, 1)); }
html.phone .pxl-upsell .pu-x::after { display: none; }

/* Oct 18 Title Case UI: labels, buttons, tabs and eyebrows show their Title Case source text instead of forced caps.
   Display headings and the wordmark keep the brand caps. */
body :not(.display, .display *, .wm, .wm *, .brand *) { text-transform: none !important; }
html:not(.phone) .pxl-upsell { left: auto; right: calc(16px * var(--ui, 1)); bottom: calc(16px * var(--ui, 1)); transform: none; width: min(calc(520px * var(--ui, 1)), calc(100vw - calc(32px * var(--ui, 1)))); }

/* Oct 18 dock fix: the transport always paints above the stage view (z 1) on phones, so no part of it can be covered */
html.phone .dock{z-index:2}

/* Oct 18 qa:mobile state audit (Looks / Layers / Controls / Color / Export): phone controls follow the standard
   (visual 32 / 36 / 40 inside a 44px hit, text >= 11px). Hit pads are transparent borders or ::after, so visuals do not move. */
html.phone .mp-name{height:calc(44px * var(--ui, 1));border:4px solid transparent;border-left-width:0;border-right-width:0;background-clip:padding-box;box-shadow:inset 0 0 0 1px rgb(255 255 255/.14)}
html.phone .mp-name:focus{border-color:transparent;box-shadow:inset 0 0 0 1px var(--fg)}
html.phone .mp-save-btn{height:calc(44px * var(--ui, 1));border:2px solid transparent;border-left-width:0;border-right-width:0;background-clip:padding-box}
html.phone .mp-save-btn::before{inset:2px 0}
html.phone .sp-head .sp-hname{border-top-width:4px;border-bottom-width:4px}
html.phone #addLayer{position:relative}
html.phone #addLayer::after{content:"";position:absolute;inset:calc(-3px * var(--ui, 1)) -1px}
html.phone .m-pal-row .m-chip{height:calc(44px * var(--ui, 1));border:4px solid transparent;border-left-width:0;border-right-width:0;background-clip:padding-box;box-shadow:inset 0 0 0 1px rgb(255 255 255/.1)}
html.phone .m-pal-row .m-chip.on{border-color:transparent;box-shadow:inset 0 0 0 2px #fff}
html.phone .insp-head .ttl .info-btn{width:calc(24px * var(--ui, 1))!important;height:calc(24px * var(--ui, 1))!important;z-index:1}
html.phone .insp-head .info-btn::after{inset:calc(-12px * var(--ui, 1))}
html.phone #lockJoin,html.phone #lockSignin{height:calc(44px * var(--ui, 1));min-height:calc(44px * var(--ui, 1));border:2px solid transparent!important;border-left-width:0!important;border-right-width:0!important;background-clip:padding-box}
html.phone #lockSignin{box-shadow:inset 0 0 0 1px rgb(255 255 255/.14)}
html.phone small,html.phone .insp-head .ttl .n{font-size:calc(11px * var(--ui, 1))!important}
html.phone .tp-pop input{height:calc(44px * var(--ui, 1));border-top:4px solid transparent!important;border-bottom:4px solid transparent!important;background-clip:padding-box}

/* Oct 18 preview resize: the sheet handle is a 44px drag target with a slim 36x4 pill; it lights up (steady, no pulse) while dragging */
html.phone:not(.land) .m-grab{height:calc(10px * var(--ui, 1));touch-action:none;cursor:ns-resize;position:relative}
html.phone:not(.land) .m-handle{width:calc(36px * var(--ui, 1));height:calc(3px * var(--ui, 1));border-radius:0;background:rgb(255 255 255/.4);transition:background .15s,box-shadow .15s}
html.phone:not(.land) .m-sheet.dragging .m-handle,html.phone:not(.land) .m-sheet.resizing .m-handle,html.phone:not(.land) .m-grab:active .m-handle{background:#fff;box-shadow:0 0 10px rgb(255 255 255/.35)}
html.phone .m-sheet.resizing{transition:none!important}
html.phone.m-resizing .canvas-wrap,html.phone.m-resizing .dock,html.phone.m-resizing .stage-view{transition:none!important} /* the box follows the finger 1:1 while resizing */

/* Oct 23: Preset Manager phone — name / chips / Fade·Manage rows, identical chip heights */
html.phone .sp-bar.sp-phone{display:none!important}
html.phone .sp-bar.sp-phone .sp-head{display:flex;align-items:center;gap:calc(8px * var(--ui, 1));min-height:calc(40px * var(--ui, 1));margin:0}
html.phone .sp-bar.sp-phone .sp-hname{flex:1;min-width:0;height:calc(40px * var(--ui, 1));margin:0;padding:0}
html.phone .sp-bar.sp-phone .sp-hname b{font-size:calc(16px * var(--ui, 1));font-weight:600;line-height:1.2}
html.phone .sp-bar.sp-phone .sp-list{display:flex!important;align-items:stretch;gap:calc(6px * var(--ui, 1));margin:0;padding:0;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
html.phone .sp-bar.sp-phone .sp-list::-webkit-scrollbar{display:none}
html.phone .sp-bar.sp-phone .sp-sw,
html.phone .sp-bar.sp-phone .sp-plus-chip{height:calc(44px * var(--ui, 1))!important;min-height:calc(44px * var(--ui, 1));flex:none;box-sizing:border-box}
html.phone .sp-bar.sp-phone .sp-plus-chip{padding:0 calc(14px * var(--ui, 1))!important;display:inline-flex;align-items:center;justify-content:center;gap:calc(6px * var(--ui, 1));border:1px solid var(--line-2);background:rgb(255 255 255/.03);font-weight:600}
html.phone .sp-bar.sp-phone .sp-foot{display:grid;grid-template-columns:1fr 1fr;gap:calc(6px * var(--ui, 1));align-items:stretch}
html.phone .sp-bar.sp-phone .sp-foot .sp-fade,
html.phone .sp-bar.sp-phone .sp-foot .sp-manage-sm{height:calc(44px * var(--ui, 1))!important;min-height:calc(44px * var(--ui, 1));width:auto!important;margin:0}
html.phone .sp-bar.sp-phone .sp-foot .sp-manage-sm{display:flex;align-items:center;justify-content:center;padding:0 calc(12px * var(--ui, 1));border:1px solid var(--line-2);background:rgb(255 255 255/.03);font-weight:500}
html.phone .sp-bar.sp-phone .sp-fade{justify-content:center}

/* Oct 23b: Preset Manager foot — Fade and Manage equal cells, never floating mid-head */
html.phone .sp-bar.sp-phone .sp-foot{display:grid!important;grid-template-columns:1fr 1fr!important;gap:calc(6px * var(--ui, 1))!important;width:100%;align-items:stretch;margin:0}
html.phone .sp-bar.sp-phone .sp-foot .sp-fade,
html.phone .sp-bar.sp-phone .sp-foot .sp-manage,
html.phone .sp-bar.sp-phone .sp-foot .sp-manage-sm{width:100%!important;min-width:0!important;height:calc(44px * var(--ui, 1))!important;min-height:calc(44px * var(--ui, 1))!important;box-sizing:border-box;margin:0!important;justify-self:stretch}
html.phone .sp-bar.sp-phone .sp-foot .sp-manage-sm{display:flex!important;align-items:center;justify-content:center;padding:0 calc(12px * var(--ui, 1))!important}
html.phone .m-look-acts-top{margin:0 0 calc(14px * var(--ui, 1));display:grid;grid-template-columns:1fr 1fr;gap:calc(8px * var(--ui, 1))}
html.phone .m-look-acts-top .btn{min-height:calc(44px * var(--ui, 1))}

/* ---------- Oct 26: PXL GEN type hierarchy (Camaron) ----------
   Layer Stack / Editor / Playback read as the main landmarks.
   Stage Settings + Preset Manager stay quieter.
   Layer / effect inspector titles are no longer the largest page text. */
html:not(.phone) #layersPanel .panel-head .eyebrow,
html:not(.phone) .sec-h {
  font-size: calc(14px * var(--ui, 1)) !important;
  font-weight: 800;
  letter-spacing: .03em;
  color: #fff;
}
html:not(.phone) #layersPanel .panel-head .eyebrow b {
  font-size: calc(12px * var(--ui, 1)) !important;
  color: rgb(255 255 255 / .55);
}
html:not(.phone) #secEditor,
html:not(.phone):not(.tablet) .dock > .dk-h {
  height: calc(16px * var(--ui, 1));
}
/* Preset Manager: quieter (Stage Settings is a dropdown trigger now) */
html:not(.phone) .sp-k {
  font-size: calc(10.5px * var(--ui, 1)) !important;
  font-weight: 700;
  letter-spacing: .06em;
  color: rgb(255 255 255 / .55) !important;
}
/* Inspector layer/effect title — tone down from 26px display */
html:not(.phone) .insp-head .ttl {
  font-size: calc(17px * var(--ui, 1)) !important;
  font-stretch: 105%;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-top: calc(8px * var(--ui, 1)) !important;
  line-height: 1.15 !important;
  text-transform: none; /* product names stay Title Case, not shouty */
}
html:not(.phone) .insp-head .ttl .t {
  font-size: inherit;
}
html.phone .insp-head .ttl {
  font-size: calc(17px * var(--ui, 1)) !important;
}
html.phone .m-pane-head h3 {
  font-size: calc(16px * var(--ui, 1)) !important;
}

/* t951u: Presets full-surface frosted glass overlay */
html.phone .m-presets-glass {
  position: fixed; inset: 0; z-index: 80; display: none; pointer-events: none;
}
html.phone .m-presets-glass.open { display: block; pointer-events: auto; }
html.phone .m-presets-glass .m-pg-scrim {
  position: absolute; inset: 0; border: 0; padding: 0; margin: 0; cursor: pointer;
  background: rgb(5 5 5 / .42);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
html.phone .m-presets-glass .m-pg-sheet {
  position: absolute; inset: max(calc(8px * var(--ui, 1)), env(safe-area-inset-top)) calc(10px * var(--ui, 1)) max(calc(10px * var(--ui, 1)), calc(env(safe-area-inset-bottom) + calc(8px * var(--ui, 1))));
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  background: rgb(12 12 14 / .78); border: 1px solid rgb(255 255 255 / .16);
  box-shadow: 0 24px 80px -24px rgb(0 0 0 / .75), inset 0 1px 0 rgb(255 255 255 / .06);
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
}
html.phone .m-presets-glass .m-pg-head {
  flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: calc(12px * var(--ui, 1));
  padding: calc(16px * var(--ui, 1)) calc(16px * var(--ui, 1)) calc(12px * var(--ui, 1)); border-bottom: 1px solid rgb(255 255 255 / .1);
}
html.phone .m-presets-glass .m-pg-head .display { margin: 0; font-size: 1.55rem; line-height: 1; }
html.phone .m-presets-glass .m-pg-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(14px * var(--ui, 1)) calc(16px * var(--ui, 1)) calc(calc(18px * var(--ui, 1)) + env(safe-area-inset-bottom));
  /* t953u: stop nested focus from jumping the outer page */
  overflow-anchor: none;
}
html.phone.m-presets-on .m-tabs { pointer-events: none; opacity: .35; }

/* t952u: hide mid-page Preset Manager strip on phone */
html.phone .sp-bar.sp-phone,
html.phone .m-pane .sp-bar.sp-phone,
html.phone .m-home .sp-bar.sp-phone { display: none !important; }

/* t1048u: grab = 8–12px empty ink (was 52px — that was the thick band) */
html.phone:not(.land) .m-grab {
  height: calc(10px * var(--ui, 1)) !important; min-height: calc(10px * var(--ui, 1)) !important;
  touch-action: none; cursor: ns-resize; position: relative;
  margin-top: 0 !important; padding: 0 !important;
}
html.phone:not(.land) .m-handle {
  width: calc(36px * var(--ui, 1)) !important; height: calc(3px * var(--ui, 1)) !important; border-radius: 0 !important;
  background: rgb(255 255 255 / .4) !important;
  box-shadow: none !important;
}
html.phone:not(.land) .m-sheet.dragging .m-handle,
html.phone:not(.land) .m-sheet.resizing .m-handle,
html.phone:not(.land) .m-grab:active .m-handle {
  background: #fff !important;
  box-shadow: 0 0 8px rgb(255 255 255 / .35);
}

/* t955u: phone dock — primary play+scrub; secondary behind More */
html.phone:not(.land) .dock .mx-dock-more {
  flex: none; width: calc(40px * var(--ui, 1)); height: calc(40px * var(--ui, 1)); min-width: calc(40px * var(--ui, 1)); margin: 0 2px;
  display: grid; place-items: center; border: 1px solid rgb(255 255 255 / .22);
  background: rgb(255 255 255 / .05); color: #fff; border-radius: 0; padding: 0;
}
html.phone:not(.land) .dock .mx-dock-more[aria-expanded="true"] {
  border-color: #fff; background: rgb(255 255 255 / .12);
}
html.phone:not(.land) .dock.is-slim > :not(.play):not(.scrub):not(.mx-dock-more):not(.mx-dock-tray) {
  display: none !important;
}
html.phone:not(.land) .mx-dock-tray {
  position: fixed; z-index: 85; left: calc(10px * var(--ui, 1)); right: calc(10px * var(--ui, 1));
  bottom: calc(var(--m-tabs-h, calc(56px * var(--ui, 1))) + env(safe-area-inset-bottom) + calc(8px * var(--ui, 1)));
  display: none; flex-direction: column; gap: 0;
  background: rgb(12 12 14 / .92); border: 1px solid rgb(255 255 255 / .18);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 16px 48px -16px rgb(0 0 0 / .7);
  max-height: min(50vh, calc(360px * var(--ui, 1))); overflow: auto;
}
html.phone:not(.land) .mx-dock-tray.open { display: flex; }
html.phone:not(.land) .mx-dock-tray button,
html.phone:not(.land) .mx-dock-tray label,
html.phone:not(.land) .mx-dock-tray a,
html.phone:not(.land) .mx-dock-tray .stepper,
html.phone:not(.land) .mx-dock-tray .pill-select {
  display: flex !important; align-items: center; gap: calc(10px * var(--ui, 1));
  min-height: calc(48px * var(--ui, 1)); width: 100%; margin: 0; padding: 0 calc(14px * var(--ui, 1));
  border: 0; border-bottom: 1px solid rgb(255 255 255 / .08);
  background: transparent; color: #fff; font: 600 calc(14px * var(--ui, 1))/1.2 inherit; text-align: left;
  box-sizing: border-box;
}
html.phone:not(.land) .mx-dock-tray .dsep { display: none !important; }
html.phone:not(.land) .mx-dock-tray-scrim {
  position: fixed; inset: 0; z-index: 84; border: 0; padding: 0; margin: 0;
  background: rgb(5 5 5 / .35); display: none;
}
html.phone:not(.land) .mx-dock-tray-scrim.on { display: block; }

/* t960u: never show mid-page Preset Manager on phone (wins every prior !important) */
html.phone .sp-bar,
html.phone .sp-bar.sp-phone,
html.phone .sp-bar.sp-gone,
html.phone .m-pane .sp-bar,
html.phone .m-pane .sp-bar.sp-phone,
html.phone .m-home .sp-bar,
html.phone body > .sp-bar {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  pointer-events: none !important;
}


/* ---- oct27 tip: mobile presets quieter / denser; Controls Glow header; FS icon centered ---- */
html.phone .m-look-acts-top { margin-bottom: calc(8px * var(--ui, 1)); }
html.phone .m-look-acts-top .btn { min-height: calc(40px * var(--ui, 1)); width: 100%; }
html.phone .mp-save {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: calc(8px * var(--ui, 1)); align-items: stretch;
  margin: 0 0 calc(10px * var(--ui, 1)); padding: 0;
}
html.phone .mp-save .mp-name {
  min-height: calc(40px * var(--ui, 1)); height: calc(40px * var(--ui, 1)); margin: 0; padding: 0 calc(10px * var(--ui, 1));
  border: 1px solid rgb(255 255 255 / .22); background: #0b0c0d; color: #fff; border-radius: 0;
}
html.phone .mp-save .mp-save-btn {
  min-height: calc(40px * var(--ui, 1)); height: calc(40px * var(--ui, 1)); padding: 0 calc(12px * var(--ui, 1)); border-radius: 0;
  display: inline-flex; align-items: center; gap: calc(6px * var(--ui, 1));
}
html.phone .mp-save .mp-save-btn span { font-size: calc(13px * var(--ui, 1)); }
html.phone .mp-row { min-height: calc(48px * var(--ui, 1)); }
html.phone .mp-item small { opacity: .55; }
html.phone .mp-act { width: calc(40px * var(--ui, 1)); min-width: calc(40px * var(--ui, 1)); }
/* hide per-row + Add Sub / chevron clutter on phone list — Manage still in group */
html.phone .mp-row > .mp-act[title^="Add Sub"] { display: none; }
html.phone .m-presets { display: none; } /* Preset Templates demoted: Start a Look lives in nav Presets */

/* Designer: denser layer header — Label "03/03 · i", pad-block 8, 8 gap to next */
html.phone .insp-head {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: calc(8px * var(--ui, 1)) !important;
  padding: calc(8px * var(--ui, 1)) calc(12px * var(--ui, 1)) !important;
  overflow: visible;
}
html.phone .insp-head .row1 {
  order: 2; margin-left: auto; min-height: 0; gap: calc(4px * var(--ui, 1));
}
html.phone .insp-head .ttl {
  order: 1; display: flex !important; flex-direction: row !important;
  align-items: center !important; flex-wrap: nowrap !important;
  min-width: 0; margin: 0 !important; gap: calc(8px * var(--ui, 1)) !important;
  font-size: calc(15px * var(--ui, 1)) !important; font-weight: 600; line-height: 1.2;
  letter-spacing: 0; text-transform: none; font-stretch: 100%;
}
html.phone .insp-head .ttl .t {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
html.phone .insp-head .ttl .n {
  flex: none; margin: 0 !important; padding: 0 !important;
  font-family: var(--font-mono, ui-monospace) !important;
  font-size: calc(11px * var(--ui, 1)) !important; font-weight: 500; line-height: calc(16px * var(--ui, 1)) !important;
  letter-spacing: 0.12em !important;
  color: rgb(255 255 255 / .45); white-space: nowrap;
}
html.phone .insp-head .ttl .info-btn,
html.phone .insp-head .info-btn {
  width: calc(28px * var(--ui, 1)) !important; height: calc(28px * var(--ui, 1)) !important; min-width: calc(28px * var(--ui, 1)) !important;
  flex: none; margin: 0 !important; border: 1px solid rgb(255 255 255 / .22) !important;
  box-sizing: border-box;
}
html.phone .insp-head .ttl .info-btn svg { width: calc(9px * var(--ui, 1)) !important; height: calc(9px * var(--ui, 1)) !important; }
html.phone .insp-head .acts {
  flex: none; gap: calc(4px * var(--ui, 1)) !important; overflow: visible; flex-wrap: nowrap;
}
html.phone .insp-head .acts .icon {
  width: calc(40px * var(--ui, 1)) !important; height: calc(40px * var(--ui, 1)) !important; min-width: calc(40px * var(--ui, 1));
  flex: none; box-sizing: border-box;
}
html.phone .insp-head + * { margin-top: calc(8px * var(--ui, 1)) !important; }
html.phone .ctl { padding-top: calc(8px * var(--ui, 1)); padding-bottom: calc(8px * var(--ui, 1)); }
html.phone .ctl-top { min-height: calc(32px * var(--ui, 1)) !important; margin-bottom: 2px; }

/* FS icon centered in its square (phone preview chrome) */
html.phone .canvas-wrap .fs-btn,
html.phone #fsBtn {
  display: grid !important; place-items: center !important;
  padding: 0 !important; line-height: 0 !important;
}
html.phone .canvas-wrap .fs-btn svg,
html.phone #fsBtn svg {
  width: calc(14px * var(--ui, 1)); height: calc(14px * var(--ui, 1)); display: block; margin: 0;
}
html.phone #fsBtn::after { inset: calc(-8px * var(--ui, 1)); }
