/* t1375u: transport play / pause, redesigned to sit in the PXL GEN control family.
   Same 1px line, height and weight as BPM / seconds; crisp 9x9 pixel glyphs; green = playing. */
html body .dock > #playBtn.play{
  --pp-line:rgb(255 255 255/.22);
  position:relative;flex:none;display:grid;place-items:center;
  border-radius:2px!important;
  background:rgb(255 255 255/.03)!important;
  border:1px solid var(--pp-line)!important;
  color:#f4f4f0!important;
  box-shadow:none!important;
  transform:none;
  transition:background-color .15s,border-color .15s,color .15s,box-shadow .2s!important;
  -webkit-tap-highlight-color:transparent;cursor:pointer;
}
html body .dock > #playBtn.play svg{width:calc(13.5px * var(--ui, 1))!important;height:calc(13.5px * var(--ui, 1))!important;display:block}
/* playing: green line + faint green wash + green pause glyph */
html body .dock > #playBtn.play:not([aria-pressed="false"]){
  --pp-line:#36f07a;
  background:rgb(54 240 122/.10)!important;
  color:#36f07a!important;
  box-shadow:inset 0 0 0 1px rgb(54 240 122/.12),0 0 14px -4px rgb(54 240 122/.45)!important;
}
/* hover */
@media (hover:hover){
  html body .dock > #playBtn.play[aria-pressed="false"]:hover{--pp-line:rgb(255 255 255/.5);background:rgb(255 255 255/.08)!important;color:#fff!important}
  html body .dock > #playBtn.play:not([aria-pressed="false"]):hover{background:rgb(54 240 122/.18)!important;color:#5ef08a!important}
}
/* pressed */
html body .dock > #playBtn.play:active{background:rgb(255 255 255/.12)!important;transform:translateY(1px)}
html body .dock > #playBtn.play:not([aria-pressed="false"]):active{background:rgb(54 240 122/.24)!important}
/* keyboard focus */
html body .dock > #playBtn.play:focus{outline:none}
html body .dock > #playBtn.play:focus-visible{outline:2px solid #f4f4f0!important;outline-offset:2px}

/* sizes: match the neighbours on each layout */
html:not(.phone):not(.tablet) body .dock > #playBtn.play{width:calc(36px * var(--ui, 1))!important;height:calc(36px * var(--ui, 1))!important}
html.tablet body .dock > #playBtn.play{width:calc(44px * var(--ui, 1))!important;height:calc(44px * var(--ui, 1))!important}
html.tablet body .dock > #playBtn.play svg{width:calc(15px * var(--ui, 1))!important;height:calc(15px * var(--ui, 1))!important}
html.phone body .dock > #playBtn.play{width:calc(40px * var(--ui, 1))!important;height:calc(40px * var(--ui, 1))!important;margin:0 calc(4px * var(--ui, 1)) 0 2px!important}
html.phone body .dock > #playBtn.play svg{width:calc(13.5px * var(--ui, 1))!important;height:calc(13.5px * var(--ui, 1))!important}

/* timestamp reads with the timeline: current time bright + tabular, end time dim, same mono line */
html body .dock .scrub-meta .tc{font-variant-numeric:tabular-nums}
html body .dock .scrub-meta .tc:not(.dim){color:#f4f4f0!important}
html body .dock .scrub-meta .tc.dim{color:rgb(255 255 255/.45)!important}
/* tablet: play sits left of the timeline — centre the scrub block on the button */
html.tablet body .dock .scrub{align-self:center}

/* t1386u: "Running slow?" hint (next to the FPS readout) + tips popover (inside the preview, never over the controls) */
.hud .slowtip-btn{pointer-events:auto;flex:none;display:inline-flex;align-items:center;height:calc(18px * var(--ui, 1));margin-left:calc(4px * var(--ui, 1));padding:0 calc(7px * var(--ui, 1));
  border:1px solid #36f07a;border-radius:2px;background:rgb(54 240 122/.12);color:#36f07a;font:500 calc(9px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.1em;text-transform:uppercase;cursor:pointer;white-space:nowrap}
.hud .slowtip-btn[hidden]{display:none}
.hud .slowtip-btn:hover{background:rgb(54 240 122/.22)}
.hud .slowtip-btn:focus-visible{outline:2px solid #f4f4f0;outline-offset:2px}
.canvas-wrap .slowtip-pop{position:absolute;z-index:6;left:calc(12px * var(--ui, 1));top:calc(44px * var(--ui, 1));width:min(calc(300px * var(--ui, 1)),calc(100% - 24px));max-height:calc(100% - calc(56px * var(--ui, 1)));overflow:auto;overscroll-behavior:contain;
  border-radius:0;border:1px solid rgb(255 255 255/.18);background:rgb(8 8 10/.96);box-shadow:0 24px 60px -20px rgb(0 0 0/.9);padding:calc(12px * var(--ui, 1));
  line-height:1.35;font:400 calc(12px * var(--ui, 1))/1.4 var(--font-sans, system-ui);color:rgb(255 255 255/.85);text-transform:none;letter-spacing:normal;text-align:left;scrollbar-width:thin}
.canvas-wrap .slowtip-pop[hidden]{display:none}
.slowtip-pop .st-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:calc(8px * var(--ui, 1))}
.slowtip-pop .st-head b{font-weight:600;font-size:calc(13px * var(--ui, 1));color:#fff}
.slowtip-pop .st-x{display:grid;place-items:center;width:calc(28px * var(--ui, 1));height:calc(28px * var(--ui, 1));border:1px solid rgb(255 255 255/.18);border-radius:2px;background:none;color:rgb(255 255 255/.8);cursor:pointer;font-size:calc(11px * var(--ui, 1))}
.slowtip-pop .st-x:hover{border-color:rgb(255 255 255/.45);color:#fff}
.slowtip-pop ol{margin:0;padding:0;list-style:none;display:grid;gap:calc(7px * var(--ui, 1));counter-reset:st}
.slowtip-pop li{display:grid;grid-template-columns:auto 1fr;column-gap:8px;counter-increment:st}
.slowtip-pop li::before{content:counter(st);grid-row:span 2;font:500 calc(10px * var(--ui, 1))/1.6 var(--font-mono);color:#36f07a}
.slowtip-pop li b{font-weight:600;color:#fff}
.slowtip-pop li span{color:rgb(255 255 255/.55);font-size:calc(11px * var(--ui, 1))}
.slowtip-pop .st-note{margin:calc(10px * var(--ui, 1)) 0 0;font:400 calc(10px * var(--ui, 1))/1.4 var(--font-mono);letter-spacing:.06em;text-transform:uppercase;color:rgb(255 255 255/.5)}
.slowtip-pop .st-dismiss{margin-top:calc(10px * var(--ui, 1));width:100%;min-height:calc(36px * var(--ui, 1));border:1px solid rgb(255 255 255/.22);border-radius:2px;background:rgb(255 255 255/.04);color:#fff;font:500 calc(12px * var(--ui, 1))/1 var(--font-sans, system-ui);cursor:pointer}
.slowtip-pop .st-dismiss:hover{border-color:rgb(255 255 255/.5);background:rgb(255 255 255/.08)}
.slowtip-pop .st-x:focus-visible,.slowtip-pop .st-dismiss:focus-visible{outline:2px solid #36f07a;outline-offset:2px}
html.phone .hud .slowtip-btn{height:22px;font-size:9px}
html.phone .canvas-wrap .slowtip-pop{top:auto;bottom:8px;left:8px;width:calc(100% - 16px);max-height:calc(100% - 16px);padding:10px}

/* t1387u: New Preset / Rename Look prompts were see-through. Root cause: the container query added for the Preset row
   (oct30.css, container-type:inline-size on #presetSel) and contain:layout on #presetPrimary each create a stacking
   context, so the prompt's z-index:60 only counted inside the Preset block and the Layer Stack (painted later) covered it.
   Lift the Preset block above its siblings, size the prompt to the row (never wider than the panel), restyle the actions. */
html:not(.phone) #presetPrimary{position:relative;z-index:40}
#presetSel.pn-host > .pn-pop{left:0;right:0;width:auto;max-width:none;background:#0b0b0d;border:1px solid rgb(255 255 255/.2);border-radius:0;box-shadow:0 18px 44px rgb(0 0 0/.75);isolation:isolate}
#presetSel.pn-host > .pn-pop .pn-in{border-radius:0;background:#141416;border:1px solid rgb(255 255 255/.22);outline:none;width:100%;box-sizing:border-box;-webkit-appearance:none;appearance:none}
#presetSel.pn-host > .pn-pop .pn-in:focus,#presetSel.pn-host > .pn-pop .pn-in:focus-visible{outline:none;border-color:#36f07a;box-shadow:none}
#presetSel.pn-host > .pn-pop .pn-acts button{border-radius:2px!important;-webkit-appearance:none;appearance:none;font-family:inherit;min-width:0}
#presetSel.pn-host > .pn-pop .pn-ok{background:#36f07a;border:1px solid #36f07a;color:#04140a}
#presetSel.pn-host > .pn-pop .pn-ok:hover{background:#5ff596;border-color:#5ff596}
#presetSel.pn-host > .pn-pop .pn-x{background:rgb(255 255 255/.04);border:1px solid rgb(255 255 255/.22);color:#fff}
#presetSel.pn-host > .pn-pop .pn-x:hover{border-color:rgb(255 255 255/.5);background:rgb(255 255 255/.08)}
#presetSel.pn-host > .pn-pop .pn-ok:focus-visible,#presetSel.pn-host > .pn-pop .pn-x:focus-visible{outline:2px solid #36f07a;outline-offset:2px}
/* t1387u: Random look (dice) — a square icon button on the Browse line; New / Save / Rename keep their full labels below */
html:not(.phone) body #presetSel.pn-host > .sel-pill{flex:1 1 calc(100% - calc(40px * var(--ui, 1)))!important;width:auto!important}
html:not(.phone) body #presetSel.pn-host > .pn-new.pn-rand{height:auto!important;min-height:calc(32px * var(--ui, 1))!important;align-self:stretch}
html:not(.phone) body #presetSel.pn-host > .pn-new.pn-rand{flex:0 0 calc(34px * var(--ui, 1))!important;width:calc(34px * var(--ui, 1))!important;min-width:calc(34px * var(--ui, 1))!important;padding:0!important;gap:0!important;justify-content:center}
html:not(.phone) body #presetSel.pn-host > .pn-new.pn-rand span{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap}
#presetSel.pn-host > .pn-new.pn-rand:hover{border-color:#36f07a;color:#36f07a}

/* t1388u: Look Manager — the look's name was squeezed to "S.." (name, Delete and Undo Changes shared a 240px box and the chips
   took the rest). The name now gets its own full-width line: big, never ellipsized (wraps if it must); Delete / Undo Changes
   sit at the right end of that line; the look chips + Add wrap on the line below. */
html:not(.phone) .sp-bar.sp-v3 .sp-v3-body{align-items:flex-start}
html:not(.phone) body .sp-bar.sp-v3 .sp-v3-name{flex:1 1 100%!important;max-width:none!important;width:100%;height:auto!important;min-height:calc(30px * var(--ui, 1));flex-wrap:wrap;row-gap:calc(6px * var(--ui, 1))}
html:not(.phone) body .sp-bar.sp-v3 .sp-v3-name .sp-hname{flex:1 1 auto!important;min-width:0!important;max-width:100%;height:auto!important;min-height:calc(28px * var(--ui, 1));justify-content:flex-start;text-align:left}
html:not(.phone) body .sp-bar.sp-v3 .sp-v3-name .sp-hname b{font:600 calc(15px * var(--ui, 1))/1.2 var(--font-sans, sans-serif)!important;color:#fff!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;padding-left:0!important;letter-spacing:.01em}
html:not(.phone) body .sp-bar.sp-v3 .sp-v3-name .sp-hdel{flex:none!important;border-radius:2px!important}
html:not(.phone) body .sp-bar.sp-v3 .sp-v3-name .sp-meta{display:none}
html:not(.phone) body .sp-bar.sp-v3 .sp-v2-list{flex:1 1 calc(220px * var(--ui, 1))!important;min-width:0!important;flex-wrap:wrap!important;overflow:visible!important}
/* delete-confirm: danger button instead of plain white */
.sp-confirm .sp-btn{border-radius:2px!important}
.sp-confirm .sp-del{background:rgb(255 77 77/.12)!important;border:1px solid #ff4d4d!important;color:#ff6b6b!important}
.sp-confirm .sp-del:hover{background:#ff4d4d!important;color:#140303!important}
.sp-confirm .sp-del:focus-visible{outline:2px solid #ff4d4d;outline-offset:2px}

/* t1391u: Preset row = ONE row on every desktop / tablet width: Browse fills, then New (+), Save, Rename and Random as matching
   square icon buttons the same height as Browse (labels stay in the tooltip / aria-label). Grid, not flex-wrap: the old
   wrap rules let Safari squeeze New / Save into slivers and stretch Rename across a second line. */
html:not(.phone) body #presetSel.pn-host{--pnh:calc(32px * var(--ui, 1));display:grid!important;grid-template-columns:minmax(0,1fr) repeat(4,var(--pnh));grid-auto-flow:column;align-items:stretch;gap:calc(4px * var(--ui, 1))!important;flex-wrap:nowrap!important;height:auto!important}
html:not(.phone) body #presetSel.pn-host > .sel-pill{order:0;grid-column:1;width:auto!important;min-width:0!important;max-width:none!important;height:var(--pnh)!important;min-height:0!important;box-sizing:border-box;flex:none!important}
html:not(.phone) body #presetSel.pn-host > .pn-new,html:not(.phone) body #presetSel.pn-host > .pn-new.pn-ic,html:not(.phone) body #presetSel.pn-host > .pn-new.pn-rand{flex:none!important;width:var(--pnh)!important;min-width:0!important;max-width:none!important;height:var(--pnh)!important;min-height:0!important;padding:0!important;gap:0!important;justify-content:center;align-items:center;border-radius:2px!important;box-sizing:border-box;overflow:hidden}
html:not(.phone) body #presetSel.pn-host > .pn-new:not(.pn-ic){order:1;grid-column:2}
html:not(.phone) body #presetSel.pn-host > .pn-save{order:2;grid-column:3}
html:not(.phone) body #presetSel.pn-host > .pn-ren{order:3;grid-column:4}
html:not(.phone) body #presetSel.pn-host > .pn-rand{order:4;grid-column:5}
html:not(.phone) body #presetSel.pn-host > .pn-new span{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap}
html:not(.phone) body #presetSel.pn-host > .pn-new svg{width:calc(13px * var(--ui, 1));height:calc(13px * var(--ui, 1))}
html:not(.phone) body #presetSel.pn-host > .pn-new:not(.pn-ic):hover{border-color:#36f07a;color:#36f07a}
@container pnrow (max-width:250px){html:not(.phone) body #presetSel.pn-host > .sel-pill .k{display:none}}
/* t1392u: New Blank Preset prompt warning (unsaved edits / song) */
#presetSel.pn-host > .pn-pop .pn-warn{margin:0;padding:calc(8px * var(--ui, 1)) calc(10px * var(--ui, 1));border:1px solid rgb(255 196 61/.45);background:rgb(255 196 61/.08);color:#ffd36b;font-size:calc(11.5px * var(--ui, 1));line-height:1.4}
#presetSel.pn-host > .pn-pop .pn-warn[hidden]{display:none}
/* t1394u: Browse menu — My Presets first, Templates collapsed under a chevron header */
.menu.menu-presets{height:auto!important;max-height:min(calc(480px * var(--ui, 1)),calc(100vh - calc(140px * var(--ui, 1))))!important}
.menu .grp-tgl{display:flex!important;align-items:center;justify-content:space-between;width:calc(100% - calc(12px * var(--ui, 1)));margin:calc(8px * var(--ui, 1)) calc(6px * var(--ui, 1)) calc(2px * var(--ui, 1))!important;padding:calc(8px * var(--ui, 1)) calc(8px * var(--ui, 1))!important;min-height:0!important;border:1px solid rgb(255 255 255/.14)!important;border-radius:0!important;background:rgb(255 255 255/.03)!important;font:400 calc(9.5px * var(--ui, 1)) var(--font-mono)!important;letter-spacing:.14em;text-transform:uppercase;color:rgb(255 255 255/.7)!important;cursor:pointer;box-sizing:border-box}
.menu .grp-tgl:hover{border-color:rgb(255 255 255/.35)!important;color:#fff!important}
.menu .grp-tgl svg{width:calc(10px * var(--ui, 1));height:calc(10px * var(--ui, 1));transition:transform .15s}
.menu .grp-tgl.open svg{transform:rotate(180deg)}
.menu .grp-body[hidden]{display:none}
.menu .menu-empty{margin:calc(4px * var(--ui, 1)) calc(12px * var(--ui, 1)) calc(6px * var(--ui, 1));font-size:calc(12px * var(--ui, 1));color:rgb(255 255 255/.45)}
.menu.menu-presets{background:#101013!important}
/* t1397u: gradient stops sat 4-6px left of their real position (an old margin offset stacked on translate(-50%)): the stop's
   centre is now exactly its point on the bar, so grabbing / dragging no longer jumps. No page scroll while dragging on touch. */
html body .gx-bar .gx-stop{margin:0!important;top:50%!important;transform:translate(-50%,-50%)!important}
.gx-bar,.gx-bar .gx-stop,.gx-sv,.gx-hue,.cpop{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.cpop .cpop-hex{-webkit-user-select:text;user-select:text}
/* t1397u: phone colour popover — the 12 chips ran past the popover's right edge (phone chip min sizes); 6 per row, square */
html.phone .cpop .cpop-chips{grid-template-columns:repeat(6,minmax(0,1fr))!important}
.cpop .cpop-chips .gx-chip{width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;aspect-ratio:1!important}
/* t1401u: empty Layer Stack (blank preset) */
.layers-empty{list-style:none;display:flex;flex-direction:column;align-items:flex-start;gap:calc(6px * var(--ui, 1));margin:calc(8px * var(--ui, 1)) 0;padding:calc(14px * var(--ui, 1));border:1px dashed rgb(255 255 255/.18);border-radius:0;background:rgb(255 255 255/.02)}
.layers-empty b{font-size:calc(13px * var(--ui, 1));font-weight:600;color:#fff}
.layers-empty span{font-size:calc(11.5px * var(--ui, 1));color:rgb(255 255 255/.5)}
.layers-empty-add{display:inline-flex;align-items:center;gap:calc(6px * var(--ui, 1));margin-top:calc(4px * var(--ui, 1));min-height:calc(32px * var(--ui, 1));padding:0 calc(12px * var(--ui, 1));border:1px solid #36f07a;border-radius:2px!important;background:rgb(54 240 122/.1);color:#36f07a;font-size:calc(12px * var(--ui, 1));font-weight:600;cursor:pointer}
.layers-empty-add svg{width:calc(11px * var(--ui, 1));height:calc(11px * var(--ui, 1))}
.layers-empty-add span{color:inherit;font-size:inherit}

/* t1402u: + Start-blank confirm (in-app, never native) */
.pn-confirm{position:fixed;inset:0;z-index:2147482000;display:grid;place-items:center;padding:calc(16px * var(--ui, 1));background:rgb(0 0 0/.55)}
.pn-confirm[hidden]{display:none}
.pn-confirm-card{width:min(calc(340px * var(--ui, 1)),100%);display:grid;gap:calc(10px * var(--ui, 1));padding:calc(14px * var(--ui, 1));border:1px solid rgb(255 255 255/.2);border-radius:0;background:#0b0b0d;box-shadow:0 24px 60px rgb(0 0 0/.75)}
.pn-confirm .pn-l{margin:0;font:600 calc(11px * var(--ui, 1))/1 var(--mono, ui-monospace, monospace);letter-spacing:.14em;text-transform:uppercase;color:rgb(255 255 255/.75)}
.pn-confirm .pn-warn{margin:0;padding:calc(8px * var(--ui, 1)) calc(10px * var(--ui, 1));border:1px solid rgb(255 196 61/.45);background:rgb(255 196 61/.08);color:#ffd36b;font-size:calc(12px * var(--ui, 1));line-height:1.4}
.pn-confirm .pn-acts{display:flex;gap:calc(6px * var(--ui, 1))}
.pn-confirm .pn-acts button{flex:1;min-height:calc(34px * var(--ui, 1));border-radius:2px!important;font-size:calc(12px * var(--ui, 1));font-weight:600;cursor:pointer;font-family:inherit}
.pn-confirm .pn-go{background:#36f07a;border:1px solid #36f07a;color:#04140a}
.pn-confirm .pn-x{background:rgb(255 255 255/.04);border:1px solid rgb(255 255 255/.22);color:#fff}
html.phone .pn-confirm .pn-acts button{min-height:44px;font-size:14px}

/* t1399u QA fixes */
/* Browse pill: the section is already labelled "Preset", so the pill shows just "Browse" (was cut to "Bro…" at some widths) */
html:not(.phone) #presetSel.pn-host > .sel-pill .k{display:none!important}
/* preview Full Screen button: was position:relative at tablet sizes and phone landscape, so it fell outside the clipped
   preview (under the timeline / off the left edge) and could not be tapped */
html body .canvas-wrap:not(.fs-on) .fs-btn.fs-btn-view{position:absolute!important}
/* phone landscape: the tab bar was centred on a bad column centre and pushed Presets / Layers off the left edge */
html.phone.land .m-tabs{left:max(var(--m-col-c,50%),calc(min(calc(440px * var(--ui, 1)),var(--m-col-w,100%)) / 2 + 8px))!important}
/* square containers / 2px buttons where 8-10px corners were left */
.gx .gx-btn{border-radius:2px!important}
html.phone .mp-save .btn,html.phone .mp-save .mx-new-preset{border-radius:2px!important}
html.phone .mp-name{border-radius:0!important}
html.phone .ex-dd-grid,html.phone .ex-dd-sel{border-radius:0!important}
/* t1405u: background-safe export note, shown only while rendering */
/* t1399 QA: phone-specific rules (oct28) outranked the 2px/square fixes */
html body .gx.gx-v2 .gx-acts .gx-btn,html body .gx .gx-acts .gx-btn,html body .gx .gx-btn{border-radius:2px!important}
html.phone body .m-pane #exportPop.ex21.x28 .ex-dd-sel,html.phone body .m-pane #exportPop.ex21.x28 .ex-dd-grid,html.phone body #exportPop .ex-dd-sel,html.phone body #exportPop .ex-dd-grid{border-radius:0!important}
/* t1413u/t1414u: full screen = stage edge to edge; Look Manager + panels hidden, back as a dark-glass overlay via .cine-ui-btn */
html.pxl-cine header.nav, /* Exit + the overlay toggle (top right of the stage) stay the way out */
html.pxl-cine:not(.cine-ui) .sp-bar { display: none !important; }
.canvas-wrap .cine-ui-btn { display: none; }
html.pxl-cine .canvas-wrap.fs-on .fs-btn.cine-ui-btn:not([hidden]) {
  display: grid !important; place-items: center; position: absolute !important;
  top: calc(calc(12px * var(--ui, 1)) + calc(44px * var(--ui, 1)) + calc(8px * var(--ui, 1)) + env(safe-area-inset-top, 0px)) !important;
  right: calc(calc(12px * var(--ui, 1)) + env(safe-area-inset-right, 0px)) !important; left: auto !important; bottom: auto !important;
  width: calc(44px * var(--ui, 1)) !important; height: calc(44px * var(--ui, 1)) !important; min-width: 0 !important; padding: 0 !important;
  border-radius: 2px !important; z-index: 2147483002 !important; opacity: .72; pointer-events: auto !important;
  background: rgb(17 18 20 / .7) !important; border: 1px solid rgb(255 255 255 / .22) !important; color: rgb(255 255 255 / .85) !important; box-shadow: none !important;
  transition: opacity .2s, border-color .2s;
}
html.pxl-cine .canvas-wrap.fs-on .fs-btn.cine-ui-btn:hover { opacity: 1; border-color: rgb(255 255 255 / .5) !important; }
html.pxl-cine .canvas-wrap.fs-on .fs-btn.cine-ui-btn.is-on { opacity: 1; border-color: #36f07a !important; color: #36f07a !important; }
html.pxl-cine .canvas-wrap.fs-on .fs-btn.cine-ui-btn svg { width: calc(16px * var(--ui, 1)) !important; height: calc(16px * var(--ui, 1)) !important; }
html.pxl-cine .canvas-wrap.fs-on.fs-idle .fs-btn.cine-ui-btn:not(.is-on) { opacity: .28; }
/* overlay: header, both side panels and the Look Manager float over the stage as dark glass (the stage never reflows) */
html.pxl-cine.cine-ui:not(.phone) #layersPanel,
html.pxl-cine.cine-ui:not(.phone) #inspector:not([hidden]) {
  position: fixed !important; top: 8px !important; bottom: 8px !important; height: auto !important; max-height: none !important;
  z-index: 2147483003 !important; background: rgb(10 10 12 / .6) !important; -webkit-backdrop-filter: blur(16px) saturate(1.15); backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgb(255 255 255 / .12) !important; border-radius: 0 !important; overflow: auto !important;
}
html.pxl-cine.cine-ui:not(.phone) #layersPanel { left: 8px !important; right: auto !important; width: var(--cine-lw, 288px) !important; }
html.pxl-cine.cine-ui:not(.phone) #inspector:not([hidden]) { right: 8px !important; left: auto !important; width: var(--cine-rw, 336px) !important;
  top: calc(calc(12px * var(--ui, 1)) + calc(104px * var(--ui, 1)) + env(safe-area-inset-top, 0px)) !important; } /* starts under Exit + the toggle */
html.pxl-cine.cine-ui .sp-bar { z-index: 2147483004 !important; background: rgb(10 10 12 / .6) !important; -webkit-backdrop-filter: blur(16px) saturate(1.15); backdrop-filter: blur(16px) saturate(1.15); border: 1px solid rgb(255 255 255 / .12) !important;
  left: calc(var(--cine-lw, 288px) + 16px) !important; right: calc(var(--cine-rw, 336px) + 16px) !important; width: auto !important; bottom: 8px !important; }
html.phone.pxl-cine.cine-ui :is(.m-tabs, .m-sheet) { z-index: 2147483003 !important; background: rgb(10 10 12 / .62) !important; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
/* the cinema play / view buttons sit above the Look Manager when it's shown */
html.pxl-cine.cine-ui:not(.phone) .canvas-wrap.fs-on :is(.fs21-play, .pv-seg.vtog-ico) { left: calc(var(--cine-lw, 288px) + 24px + var(--o, 0px)) !important; bottom: calc(var(--cine-lmh, 140px) + 20px) !important; }
html.pxl-cine.cine-ui:not(.phone) .canvas-wrap.fs-on .pv-seg.vtog-ico { --o: calc(52px * var(--ui, 1)); }
/* t1413u phone: Exit top-right (was clipped at the left edge), toggle under it; play / view sit above the tab bar with the overlay */
html.phone.pxl-cine body .canvas-wrap.fs-on .fs-btn.fs-btn-view { position: absolute !important; z-index: 2147483002 !important; left: auto !important; right: calc(12px + env(safe-area-inset-right, 0px)) !important; top: calc(12px + env(safe-area-inset-top, 0px)) !important; width: auto !important; min-width: 44px !important; height: 44px !important; padding: 0 12px !important; }
html.phone.pxl-cine.cine-ui body .canvas-wrap.fs-on :is(.fs21-play, .pv-seg.vtog-ico) { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
/* t1417u: shared in-app confirm (pxlAsk) */
.pxl-ask{z-index:2147483600}
.pxl-ask .pxl-ask-msg{margin:0;color:rgb(255 255 255/.82);font-size:calc(13px * var(--ui, 1));line-height:1.45}
.pn-confirm .pn-go.is-danger{background:#e5484d;border-color:#e5484d;color:#fff;border-radius:2px!important}
.pn-confirm .pn-go.is-danger:hover{background:#f05a5f}
html.phone .pxl-ask .pxl-ask-msg{font-size:14px}
/* t1417u: the full-screen overlay toggle never shows outside full screen (a phone .fs-btn rule un-hid it next to Full Screen) */
html:not(.pxl-cine) .canvas-wrap .fs-btn.cine-ui-btn { display: none !important; }
/* t1417u: phone: "Running slow?" sits on its own line under the resolution / FPS readout, so it never covers the
   preview settings gear or the top bar (in and out of full screen) */
html.phone .hud.tl:has(.slowtip-btn:not([hidden])) { overflow: visible !important; }
html.phone .hud .slowtip-btn { position: absolute !important; left: 0; top: calc(100% + 4px); margin: 0 !important; height: 24px !important; padding: 0 8px !important; }
/* t1428u: Preset row = flex, not a fixed 5-column grid. Browse grows into every spare pixel, the icon buttons sit flush right
   at one size with one gap, and a missing / hidden button never leaves an empty slot. Narrow columns trim the Browse
   padding so the full "Browse" label fits before it ellipsizes. */
html:not(.phone) body #presetSel.pn-host{display:flex!important;flex-wrap:nowrap!important;align-items:stretch;gap:calc(4px * var(--ui, 1))!important;width:100%!important;min-width:0;box-sizing:border-box}
html:not(.phone) body #presetSel.pn-host > .sel-pill{flex:1 1 auto!important;min-width:0!important;width:auto!important;max-width:none!important}
html:not(.phone) body #presetSel.pn-host > .pn-new:not(.pn-ic),html:not(.phone) body #presetSel.pn-host > .pn-new.pn-ic,html:not(.phone) body #presetSel.pn-host > .pn-new.pn-rand{flex:0 0 var(--pnh)!important;width:var(--pnh)!important;min-width:var(--pnh)!important;height:var(--pnh)!important;align-self:center}
html:not(.phone) body #presetSel.pn-host > .pn-new[hidden]{display:none!important}
html:not(.phone) body #presetSel.pn-host > .sel-pill .v{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html:not(.phone) body #presetSel.pn-host > .sel-pill svg{flex:none}
@container pnrow (max-width:250px){html:not(.phone) body #presetSel.pn-host > .sel-pill{padding-left:calc(8px * var(--ui, 1))!important;padding-right:calc(6px * var(--ui, 1))!important;gap:calc(4px * var(--ui, 1))!important}}
/* t1432u: Custom Gradient Edit button. oct23's .gx-edit grid forced 2 columns (!important), so Edit wrapped to a new row
   inside the 40px swatch column and its text was clipped. Swatch | hex | Edit is one row again; Edit is a full 2px-corner
   button the same height as the hex field. */
.gx.gx-v2 .gx-edit{grid-template-columns:calc(40px * var(--ui, 1)) minmax(0,1fr) auto!important;grid-auto-flow:column}
html:not(.phone) .gx.gx-v2 .gx-edit{grid-template-columns:calc(30px * var(--ui, 1)) minmax(0,1fr) auto!important}
html.phone .gx.gx-v2 .gx-edit{grid-template-columns:calc(36px * var(--ui, 1)) minmax(0,1fr) auto!important}
.gx.gx-v2 .gx-edit > .gx-sw{grid-column:1;grid-row:1}
.gx.gx-v2 .gx-edit > .gx-hex{grid-column:2;grid-row:1}
.gx.gx-v2 .gx-edit > .gx-hex-ed{grid-column:3;grid-row:1;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:calc(58px * var(--ui, 1));height:calc(30px * var(--ui, 1));padding:0 calc(14px * var(--ui, 1));margin:0;border-radius:2px!important;border:1px solid rgb(255 255 255/.24);background:rgb(255 255 255/.04);color:#fff;font:600 calc(11px * var(--ui, 1))/1 var(--font-mono, ui-monospace, monospace);letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;overflow:visible;cursor:pointer;-webkit-appearance:none;appearance:none}
html.phone .gx.gx-v2 .gx-edit > .gx-hex-ed{height:calc(36px * var(--ui, 1))}
.gx.gx-v2 .gx-edit > .gx-hex-ed:hover{border-color:#36f07a;color:#36f07a}
.gx.gx-v2 .gx-edit > .gx-hex-ed:focus-visible{outline:2px solid #36f07a;outline-offset:2px}
/* while dragging a stop / the SV square / the hue strip nothing animates under the pointer */
.gx-stop.dragging,.gx-sv.dragging .gx-sv-dot,.gx-hue.dragging .gx-hue-dot{transition:none!important;cursor:grabbing}
.gx-sv-dot,.gx-hue-dot{will-change:left,top}
/* t1432u: narrow Inspector columns: the Custom Gradient head stays one line */
.gx.gx-v2 .gx-head{display:flex;align-items:baseline;gap:calc(8px * var(--ui, 1));white-space:nowrap;min-width:0}
.gx.gx-v2 .gx-head .gx-k{min-width:0;overflow:hidden;text-overflow:ellipsis}
.gx.gx-v2 .gx-head .gx-meta{flex:none;margin-left:auto}
/* t1437u: Text layer body — square, same field look as the rest of the Inspector; 16px floor on phones (no iOS zoom) */
.ctl .txt-body{display:block;width:100%;min-height:calc(76px * var(--ui, 1));resize:vertical;border:1px solid var(--line-2);border-radius:0;background:rgb(255 255 255/.04);color:var(--fg);font:500 calc(13px * var(--ui, 1))/1.45 var(--font-sans);padding:calc(9px * var(--ui, 1)) calc(11px * var(--ui, 1));outline:none;box-sizing:border-box;-webkit-appearance:none;appearance:none}
.ctl .txt-body:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-22)}
.ctl .txt-body::placeholder{color:var(--mute)}
html.phone .ctl .txt-body{font-size:max(16px, calc(13px * var(--ui, 1)))}
/* t1441u: Export panel — one status block (bar, frame line, % + time left, one muted line) inside the panel padding.
   While rendering, the settings dim, Render / Add To Queue step aside and Cancel is the one clear action. */
#exportPop.ex21 .ex-run { margin: calc(10px * var(--ui, 1)) calc(16px * var(--ui, 1)) 0; display: grid; gap: calc(6px * var(--ui, 1)); }
#exportPop.ex21 .ex-run > .prog, #exportPop.ex21 .ex-run > .status { margin: 0 !important; }
#exportPop.ex21 .ex-run .ex-run-meta, #exportPop.ex21 .ex-run .ex-run-hint { display: none; margin: 0; }
#exportPop.ex21.is-rendering .ex-run { padding: calc(12px * var(--ui, 1)); border: 1px solid rgb(255 255 255 / .16); background: rgb(255 255 255 / .03); border-radius: 0; }
#exportPop.ex21.is-rendering .ex-run .status { color: #fff; font: 500 calc(12.5px * var(--ui, 1))/1.35 var(--font-sans); margin: 0; }
#exportPop.ex21.is-rendering .ex-run .ex-run-meta { display: block; font: 500 calc(11px * var(--ui, 1))/1.3 var(--font-mono, ui-monospace, monospace); letter-spacing: .04em; color: rgb(255 255 255 / .8); font-variant-numeric: tabular-nums; }
#exportPop.ex21.is-rendering .ex-run .ex-run-hint { display: block; font-size: calc(11.5px * var(--ui, 1)); line-height: 1.35; color: rgb(255 255 255 / .5); }
#exportPop .ex-bgnote, #exportPop.is-rendering .ex-bgnote, #exportPop .ex-keep, #exportPop.is-rendering .ex-tip { display: none !important; }
#exportPop.ex21.is-rendering :is(.row:not(.spec), .ex-more, .ex-file, .ex-dd-grid, .x28-sec) { opacity: .45; pointer-events: none; }
#exportPop.ex21.is-rendering .ex-acts #exGo, #exportPop.ex21.is-rendering .ex-acts #exQueueAdd { display: none !important; }
#exportPop.ex21 .ex-acts #exCancel { border-color: rgb(255 255 255 / .45); color: #fff; }
#exportPop.ex21 .ex-acts .btn, #exportPop .exq-go, #exportPop .ex-retry { border-radius: 2px !important; }
#exportPop .ex-retry { margin: calc(8px * var(--ui, 1)) calc(16px * var(--ui, 1)) 0; min-height: calc(40px * var(--ui, 1)); width: calc(100% - calc(32px * var(--ui, 1))); }
/* queue: one control size, square rows, meta in one muted mono style */
#exportPop .ex-queue { border-radius: 0; margin-left: calc(16px * var(--ui, 1)); margin-right: calc(16px * var(--ui, 1)); padding: calc(10px * var(--ui, 1)) 0 0; background: none; border-top: 1px solid rgb(255 255 255 / .12); }
#exportPop .exq-i { border-radius: 0; }
#exportPop .exq-acts { gap: calc(4px * var(--ui, 1)); }
#exportPop .exq-acts .exq-b, #exportPop .exq-acts .exq-x, #exportPop .exq-up, #exportPop .exq-dn { min-width: 0 !important; width: calc(32px * var(--ui, 1)) !important; height: calc(32px * var(--ui, 1)) !important; padding: 0 !important; border-radius: 2px; border: 1px solid rgb(255 255 255 / .22); background: transparent; color: rgb(255 255 255 / .85); font-size: calc(11px * var(--ui, 1)) !important; line-height: 1; display: inline-grid; place-items: center; box-shadow: none; }
#exportPop .exq-acts .exq-get { width: auto !important; padding: 0 calc(10px * var(--ui, 1)) !important; }
#exportPop .exq-acts .exq-x { font-size: calc(15px * var(--ui, 1)) !important; }
#exportPop .exq-spec, #exportPop .exq-st { font: 400 calc(10.5px * var(--ui, 1))/1.45 var(--font-mono, ui-monospace, monospace); letter-spacing: .02em; text-transform: none; color: rgb(255 255 255 / .55); }
#exportPop .exq-i.run .exq-st { color: #fff; } #exportPop .exq-i.done .exq-st { color: #36f07a; } #exportPop .exq-i.fail .exq-st { color: #ff7b7b; }
#exportPop .exq-go.btn-ghost { min-height: calc(44px * var(--ui, 1)); background: transparent; color: #fff; border: 1px solid rgb(255 255 255 / .45); }
#exportPop .exq-go.btn-ghost:hover { border-color: #fff; }
#exportPop.ex21 .ex-run .status { min-height: 0 !important; }
/* phones: the Export pane lives in the bottom sheet (its own stacking context), so the freeze scrim covered Cancel too.
   Lift the sheet over the scrim while rendering; the tab bar and the rest of the app stay locked under it. */
html.phone.ex-frozen .m-sheet { z-index: 115 !important; }
/* the phone body is position:fixed (its own stacking context), so a scrim on html sat above everything in it, Cancel included:
   on phones the scrim moves inside body, under the lifted sheet */
html.phone.ex-frozen::before { content: none !important; }
html.phone.ex-frozen body::after { content: ""; position: fixed; inset: 0; z-index: 110; background: rgb(0 0 0 / .72); pointer-events: auto; }
/* t1443u: My Presets — an expanded group (base + its looks + Add look) was squeezed to 0-321 px: .mp-list is a flex column and
   the group (overflow:hidden, so min-height 0) shrank to fit the list's fixed scroll box. Rows never shrink now, and on the
   dialog the whole body scrolls (head + close stay put; the page behind never scrolls). Square containers, 2px buttons. */
html body .mp .mp-list > * { flex-shrink: 0 !important; }
html body .mp .mp-group { overflow: visible !important; border-radius: 0 !important; }
html body .mp-dialog .mp-dialog-card { display: flex !important; flex-direction: column !important; height: auto !important; max-height: min(calc(720px * var(--ui, 1)), calc(100dvh - calc(48px * var(--ui, 1)))) !important; overflow: hidden !important; border-radius: 0 !important; }
html.phone body .mp-dialog .mp-dialog-card { max-height: calc(100dvh - calc(24px * var(--ui, 1)) - var(--sat, 0px)) !important; min-height: 0 !important; }
html body .mp-dialog .mp-dialog-head { flex: none !important; }
html body .mp-dialog .mp-dialog-body { flex: 1 1 auto !important; min-height: 0 !important; display: block !important; overflow-y: auto !important; overflow-x: hidden !important; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .22) transparent; padding-bottom: calc(8px * var(--ui, 1)); }
html body .mp-dialog .mp-dialog-body .mp { display: flex !important; flex-direction: column; min-height: 0; }
html body .mp-dialog .mp-dialog-body .mp-list { flex: none !important; overflow: visible !important; max-height: none !important; height: auto !important; contain: none !important; }
html body .mp-dialog :is(.mp-dialog-card, .mp-row, .mp-group, .sp-row, .sp-n, .mp-name, .mp-this, .mp-thumb, .mp-empty, .mp-hint, .menu) { border-radius: 0 !important; }
html body .mp .mp-save { grid-template-columns: minmax(0, 1fr) auto !important; }
html body .mp .mp-save > .mp-name { border-radius: 0 !important; }
html body .mp .mp-save > .mp-save-btn { border-radius: 2px !important; padding: 0 calc(18px * var(--ui, 1)) !important; min-width: calc(96px * var(--ui, 1)); }
html body .mp :is(.mp-this .btn, .mp-act) { border-radius: 2px !important; }
/* t1444u: Preset button shows the loaded look; ellipsis only when it truly doesn't fit; small square dot = unsaved changes */
#presetSel .sel-pill { min-width: 0; }
#presetSel .sel-pill .v { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
#presetSel .sel-pill.pp-dirty .v::before { content: ""; display: inline-block; width: calc(6px * var(--ui, 1)); height: calc(6px * var(--ui, 1)); margin: 0 calc(7px * var(--ui, 1)) 0 0; background: var(--accent, #36f07a); vertical-align: middle; position: relative; top: -1px; }
/* t1446u: stack limits */
.stack-note { margin: calc(6px * var(--ui, 1)) calc(10px * var(--ui, 1)) 0; padding: calc(7px * var(--ui, 1)) calc(10px * var(--ui, 1)); border: 1px solid rgb(255 255 255 / .14); border-radius: 0; font-size: calc(11.5px * var(--ui, 1)); line-height: 1.4; color: rgb(255 255 255 / .62); background: rgb(255 255 255 / .03); }
.stack-note[hidden] { display: none; }
.stack-note.warn { border-color: rgb(255 196 0 / .45); color: rgb(255 226 160 / .92); }
.stack-note.cap { border-color: rgb(255 255 255 / .28); color: rgb(255 255 255 / .82); }
#addLayer.at-cap { opacity: .45; }
#addMenu .am-cap { margin: 0 0 calc(8px * var(--ui, 1)); padding: calc(8px * var(--ui, 1)) calc(10px * var(--ui, 1)); border: 1px solid rgb(255 196 0 / .45); border-radius: 0; font-size: calc(12px * var(--ui, 1)); color: rgb(255 226 160 / .95); }
#addMenu .am-tile:disabled { opacity: .3; cursor: not-allowed; }
