/* Oct 23 (Camaron): edge glow, preview 2D / 3D toggle, PXLGEN beacon, phone HUD, render queue v2 + lock overlay */
:root {
  --edge-line: rgb(255 255 255 / .34);
  --edge-line-hi: rgb(255 255 255 / .55);
  --edge-glow: 0 0 0 1px var(--edge-line), inset 0 1px 0 rgb(255 255 255 / .14), 0 0 22px rgb(255 255 255 / .08), 0 16px 36px rgb(0 0 0 / .5);
  --edge-glow-hi: 0 0 0 1px var(--edge-line-hi), inset 0 1px 0 rgb(255 255 255 / .18), 0 0 26px rgb(255 255 255 / .13), 0 18px 40px rgb(0 0 0 / .55);
}
/* one luxury edge: preview window, sheets, layer chips, queue, dialogs, tab bar (box-shadow only, square, no blur) */
.canvas-wrap, html.phone .m-sheet, .panel.glass, #exportPop, .q-card, html.phone .m-tabs, .m-chips .m-chip-l, #exportPop .ex-queue,
.edge-glow { box-shadow: var(--edge-glow); border-radius: 0; }
.m-chips .m-chip-l:hover, .m-chips .m-chip-l:focus-visible, .q-card:focus-within, #exportPop:focus-within { box-shadow: var(--edge-glow-hi); }
html.phone .m-sheet, html.phone .m-tabs { background-color: #111214; }
html.phone .m-tabs { border-top: 0; }

/* PXLGEN beacon by the wordmark (the menu's Gen green) — optically centered with the title */
.nav .brand { display: inline-flex; align-items: center; gap: calc(10px * var(--ui, 1)); }
.nav .brand .wm { line-height: 1; display: inline-block; }
.wm-beacon {
  width: calc(6px * var(--ui, 1)); height: calc(6px * var(--ui, 1)); flex: none; margin: 0; align-self: center;
  background: #36f07a; box-shadow: 0 0 8px #36f07a, 0 0 2px #36f07a;
  border-radius: 0;
}
html.phone .nav .brand { gap: calc(9px * var(--ui, 1)); }
html.phone .wm-beacon { width: calc(5px * var(--ui, 1)); height: calc(5px * var(--ui, 1)); box-shadow: 0 0 6px #36f07a, 0 0 2px #36f07a; }

/* 2D / 3D segmented toggle on the preview: same look as the site's Screen / Stage switch (mono caps, green dot when on) */
.stage3d-host[data-state=error]::after { content: none; } /* the 2D fallback takes over; no dead panel */

/* phone HUD: short line, wraps instead of cutting off */
html.phone .canvas-wrap .hud.tl {
  top: calc(22px * var(--ui, 1)) !important; left: calc(10px * var(--ui, 1));
  max-width: calc(100% - calc(120px * var(--ui, 1))); height: auto; min-height: calc(22px * var(--ui, 1));
  white-space: nowrap; line-height: 1.3; padding: calc(4px * var(--ui, 1)) calc(8px * var(--ui, 1));
  gap: calc(6px * var(--ui, 1));
}
html.phone .canvas-wrap .hud.tl .live {
  width: calc(5px * var(--ui, 1)); height: calc(5px * var(--ui, 1)); flex: none;
  box-shadow: 0 0 6px #36f07a, 0 0 2px #36f07a !important;
}
html.phone #hudRes { overflow-wrap: normal; min-width: 0; }

/* ---------- render queue v2 (export dialog) */
#exportPop .ex-queue { margin-top: calc(12px * var(--ui, 1)); padding: calc(10px * var(--ui, 1)); border-top: 0; background: #0b0c0d; }
#exportPop .ex-queue ul { max-height: calc(260px * var(--ui, 1)); gap: calc(6px * var(--ui, 1)); margin-top: calc(8px * var(--ui, 1)); }
#exportPop .exq-i, .q-list .exq-i { display: grid; grid-template-columns: calc(22px * var(--ui, 1)) minmax(0, 1fr) auto; align-items: center; gap: calc(8px * var(--ui, 1)); min-height: calc(52px * var(--ui, 1)); padding: calc(6px * var(--ui, 1)) calc(6px * var(--ui, 1)) calc(6px * var(--ui, 1)) calc(8px * var(--ui, 1)); border: 0 !important;
  background: #111214; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14); font-size: calc(12px * var(--ui, 1)); }
#exportPop .exq-i.run, .q-list .exq-i.run { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .55), 0 0 14px rgb(255 255 255 / .08); }
.exq-i.dragging { opacity: .45; } .exq-i.over { box-shadow: inset 0 2px 0 #fff, inset 0 0 0 1px rgb(255 255 255 / .4); }
.exq-drag { cursor: grab; color: rgb(255 255 255 / .45); font-size: calc(12px * var(--ui, 1)); letter-spacing: -2px; text-align: center; user-select: none; }
.exq-num { font: 500 calc(10px * var(--ui, 1)) var(--font-mono, monospace); color: rgb(255 255 255 / .45); text-align: center; }
.exq-body { display: grid; gap: calc(3px * var(--ui, 1)); min-width: 0; }
.exq-i .exq-name, #exportPop .exq-i .exq-name { color: #fff; font-weight: 600; font-size: calc(12.5px * var(--ui, 1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exq-spec { color: rgb(255 255 255 / .62); font: 400 calc(10.5px * var(--ui, 1))/1.4 var(--font-mono, monospace); }
.exq-i .exq-st, #exportPop .exq-i .exq-st { font: 500 calc(10px * var(--ui, 1))/1.3 var(--font-mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: rgb(255 255 255 / .6); overflow-wrap: anywhere; }
.exq-i.run .exq-st { color: #fff; } .exq-i.done .exq-st { color: #36f07a; } .exq-i.fail .exq-st { color: #ff7b7b; } .exq-i.cancel .exq-st { color: #ffc46b; }
.exq-bar { display: block; height: calc(3px * var(--ui, 1)); background: rgb(255 255 255 / .12); } .exq-bar i { display: block; height: 100%; background: #fff; transition: width .25s linear; }
.exq-i.done .exq-bar i { background: #36f07a; }
.exq-acts { display: flex; gap: calc(4px * var(--ui, 1)); align-items: center; }
.exq-b, #exportPop .exq-x { min-width: calc(44px * var(--ui, 1)); height: calc(44px * var(--ui, 1)); width: auto; padding: 0 calc(10px * var(--ui, 1)); border: 1px solid rgb(255 255 255 / .3); background: #0b0c0d; color: #fff; cursor: pointer;
  font: 600 calc(12px * var(--ui, 1))/1 var(--font, system-ui); }
.exq-b:hover { border-color: #fff; box-shadow: 0 0 12px rgb(255 255 255 / .18); }
.exq-b:disabled { opacity: .3; cursor: default; box-shadow: none; }
.exq-up, .exq-dn { font-size: calc(10px * var(--ui, 1)); padding: 0; }
.exq-get { border-color: #fff; }
.exq-x { font-size: calc(18px * var(--ui, 1)); font-weight: 400; }
.exq-foot { display: grid; gap: calc(8px * var(--ui, 1)); margin-top: calc(8px * var(--ui, 1)); }
.exq-foot:empty { display: none; }
.exq-undo { display: flex; align-items: center; justify-content: space-between; gap: calc(8px * var(--ui, 1)); margin: 0; padding: 0 0 0 calc(10px * var(--ui, 1)); min-height: calc(44px * var(--ui, 1)); background: #111214; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); font-size: calc(12px * var(--ui, 1)); color: rgb(255 255 255 / .85); }
.exq-go { min-height: calc(48px * var(--ui, 1)); width: 100%; }
@media (min-width: 640px) { .exq-up, .exq-dn { min-width: calc(32px * var(--ui, 1)); height: calc(32px * var(--ui, 1)); } }

/* ---------- lock overlay (and the start confirm) */
.q-lock { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: calc(16px * var(--ui, 1)); background: rgb(5 5 5 / .82); }
.q-lock[hidden] { display: none; }
.q-card { width: min(calc(560px * var(--ui, 1)), 100%); max-height: calc(100dvh - calc(32px * var(--ui, 1))); overflow: auto; padding: calc(18px * var(--ui, 1)); background: #111214; color: #fff; display: grid; gap: calc(12px * var(--ui, 1)); }
.q-card .eyebrow { margin: 0; font: 500 calc(11px * var(--ui, 1)) var(--font-mono, monospace); letter-spacing: .16em; text-transform: uppercase; color: #fff; }
.q-sub, .q-msg { margin: 0; color: rgb(255 255 255 / .78); font-size: calc(14px * var(--ui, 1)); line-height: 1.5; }
.q-msg { color: #fff; font-size: calc(16px * var(--ui, 1)); }
.q-all { height: calc(6px * var(--ui, 1)); background: rgb(255 255 255 / .12); } .q-all i { display: block; height: 100%; width: 0; background: #fff; box-shadow: 0 0 12px rgb(255 255 255 / .5); transition: width .25s linear; }
.q-list { list-style: none; margin: 0; padding: 0; display: grid; gap: calc(6px * var(--ui, 1)); }
.q-acts { display: grid; gap: calc(8px * var(--ui, 1)); } .q-acts.two { grid-template-columns: 1fr 1fr; }
.q-acts .btn { min-height: calc(48px * var(--ui, 1)); width: 100%; justify-content: center; }
html.q-locked body > :not(.q-lock):not(script) { pointer-events: none; user-select: none; }
/* Oct 23b (Camaron): phone HUD = one compact line, never wraps, clear of the gear / fullscreen buttons */
html.phone .hud.tl{display:flex;align-items:center;flex-wrap:nowrap;white-space:nowrap;gap:0;font-size:calc(10px * var(--ui, 1));letter-spacing:.08em;max-width:calc(100% - calc(112px * var(--ui, 1)));overflow:hidden}
html.phone .hud.tl #hudRes{white-space:nowrap;overflow:hidden;text-overflow:clip;min-width:0}
html.phone .hud.tl #fps{flex:none}


/* Oct 23b: ONE editor glyph button — monitor in 2D, cube in 3D (swap on tap) */
.pv-seg.vtog-ico { position: absolute; left: calc(12px * var(--ui, 1)); bottom: calc(12px * var(--ui, 1)); z-index: 6; display: inline-grid; place-items: center; width: calc(44px * var(--ui, 1)); height: calc(44px * var(--ui, 1)); padding: 0; border: 1px solid rgb(255 255 255 / .85); background: rgb(5 5 5 / .72); color: #fff; box-shadow: 0 0 0 1px rgb(255 255 255 / .1), 0 0 12px rgb(255 255 255 / .28); cursor: pointer; }
.pv-seg.vtog-ico svg { grid-area: 1 / 1; width: calc(14px * var(--ui, 1)); height: calc(14px * var(--ui, 1)); opacity: 0; }
.pv-seg.vtog-ico svg.is-on { opacity: 1; filter: drop-shadow(0 0 3px rgb(255 255 255 / .75)); }
.pv-seg.vtog-ico:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.canvas-wrap.fs-on .pv-seg { bottom: max(calc(12px * var(--ui, 1)), env(safe-area-inset-bottom)); }

/* Oct 24 (Camaron): never strobe the preview white on Tap BPM / beat — pad chrome only */
.tp-preview-flash, .tp-preview-flash.on { display: none !important; opacity: 0 !important; animation: none !important; }

/* Oct 24 (Camaron): PXL GEN preview HUD beacon = Gen green (glow like site beacons), not amber/white accent */
.hud .live {
  background: #36f07a !important;
  box-shadow: 0 0 10px #36f07a, 0 0 3px #36f07a !important;
}

/* Oct 24 (Camaron): desktop Palette / Custom Gradient — even 44px controls, clear gaps, sharp square */
html:not(.phone) .swatches .gx { gap: calc(12px * var(--ui, 1)); margin-top: calc(10px * var(--ui, 1)); }
html:not(.phone) .gx-acts.three { gap: calc(8px * var(--ui, 1)); }
html:not(.phone) .gx-acts .gx-btn {
  height: calc(44px * var(--ui, 1)); min-height: calc(44px * var(--ui, 1)); border-radius: 0;
  font: 600 calc(12px * var(--ui, 1))/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
}
html:not(.phone) .gx-head { margin-bottom: 2px; }
html:not(.phone) .gx-bar { height: calc(44px * var(--ui, 1)) !important; margin: calc(4px * var(--ui, 1)) 0 0 !important; border-radius: 0; }
html:not(.phone) .gx-edit {
  grid-template-columns: calc(44px * var(--ui, 1)) minmax(0, 1fr) auto;
  gap: calc(12px * var(--ui, 1)); min-height: calc(44px * var(--ui, 1)); margin-top: calc(10px * var(--ui, 1));
  padding: 0; align-items: center;
}
html:not(.phone) .gx-sw { width: calc(44px * var(--ui, 1)); height: calc(44px * var(--ui, 1)); border-radius: 0; }
html:not(.phone) .gx-hex { font: 600 calc(14px * var(--ui, 1))/1 var(--font-mono); letter-spacing: .06em; }
html:not(.phone) .gx-tip { font-size: calc(11px * var(--ui, 1)); letter-spacing: .04em; color: rgb(255 255 255 / .45); }

/* Oct 24 (Camaron): Tempo pop — Tempo stays, BPM is the hero on the pad; Clear never clips */
html:not(.phone) .tp-pop { width: min(calc(560px * var(--ui, 1)), calc(100vw - calc(24px * var(--ui, 1)))); }
html:not(.phone) .tp-pop .pop-head h3.display { font-size: calc(22px * var(--ui, 1)); letter-spacing: -.01em; }
html:not(.phone) .tp { grid-template-columns: calc(152px * var(--ui, 1)) minmax(0, 1fr); gap: calc(16px * var(--ui, 1)); }
html:not(.phone) .tp-pad { aspect-ratio: 1; gap: calc(8px * var(--ui, 1)); }
html:not(.phone) .tp-bpm { font-size: calc(48px * var(--ui, 1)); line-height: .9; }
html:not(.phone) .tp-sub { font-size: calc(10px * var(--ui, 1)); letter-spacing: .12em; }
html:not(.phone) .tp-row .seg button { height: calc(34px * var(--ui, 1)); font-size: calc(12px * var(--ui, 1)); }
html:not(.phone) .tp-type input, html:not(.phone) .tp-type .tp-step {
  height: calc(34px * var(--ui, 1)); min-height: calc(34px * var(--ui, 1)); border-radius: 0;
}
html:not(.phone) .tp-type .tp-step {
  width: calc(34px * var(--ui, 1)); flex: none; border: 1px solid var(--line-2); background: rgb(255 255 255 / .03);
  color: var(--fg); font-size: calc(16px * var(--ui, 1)); cursor: pointer;
}
html:not(.phone) .tp-type .tp-step:hover { border-color: #fff; }
html:not(.phone) .tp-type input { flex: 1; min-width: 0; width: auto; text-align: center; }
html:not(.phone) .tp-clear-row { margin-top: 2px; }
html:not(.phone) .tp-clear-row .tp-clear {
  width: 100%; height: calc(34px * var(--ui, 1)); min-height: calc(34px * var(--ui, 1)); justify-content: center;
  border: 1px solid var(--line-2); border-radius: 0; font-size: calc(12px * var(--ui, 1));
}
html:not(.phone) .tp-clear-row .tp-clear[hidden] { display: none !important; }

/* Oct 24 (Camaron): export modal polish + freeze while rendering */
html.ex-frozen, html.ex-frozen body { overflow: hidden !important; }
html.ex-frozen #exportPop { z-index: 120 !important; pointer-events: auto; }
html.ex-frozen::before {
  content: ""; position: fixed; inset: 0; z-index: 110;
  background: rgb(0 0 0 / .72); pointer-events: auto;
}
#exportPop.ex21 { width: min(calc(400px * var(--ui, 1)), calc(100vw - calc(24px * var(--ui, 1)))); }
#exportPop.ex21 .ex-acts {
  display: grid; grid-template-columns: 1fr 1fr; gap: calc(8px * var(--ui, 1)); margin-top: calc(12px * var(--ui, 1));
}
#exportPop.ex21 .ex-acts .btn { min-height: calc(44px * var(--ui, 1)); height: calc(44px * var(--ui, 1)); margin: 0; width: 100%; border-radius: 0; }
#exportPop.ex21 .ex-acts #exGo { grid-column: 1 / -1; }
#exportPop.ex21 .ex-acts #exQueueAdd { grid-column: 1 / -1; width: 100%; }
#exportPop.ex21 .ex-acts #exCancel { grid-column: 1 / -1; }
#exportPop.ex21 .prog { height: calc(6px * var(--ui, 1)); margin-top: calc(12px * var(--ui, 1)); background: rgb(255 255 255 / .08); }
#exportPop.ex21 .prog i { display: block; height: 100%; background: #fff; width: 0; }
#exportPop.ex21 .status { margin-top: calc(10px * var(--ui, 1)); font-size: calc(12.5px * var(--ui, 1)); line-height: 1.4; color: rgb(255 255 255 / .75); }
#exportPop.ex21 .spec { margin-top: calc(12px * var(--ui, 1)) !important; }
.ex-tip {
  display: grid; grid-template-columns: calc(28px * var(--ui, 1)) minmax(0, 1fr); gap: calc(8px * var(--ui, 1)) calc(10px * var(--ui, 1));
  align-items: start; margin: calc(12px * var(--ui, 1)) calc(16px * var(--ui, 1)) 0; padding: calc(10px * var(--ui, 1)) calc(12px * var(--ui, 1));
  border: 1px solid rgb(255 255 255 / .14); background: #0b0c0d;
}
.ex-tip-i {
  width: calc(28px * var(--ui, 1)); height: calc(28px * var(--ui, 1)); border: 1px solid rgb(255 255 255 / .35); background: transparent;
  color: #fff; font: 700 calc(12px * var(--ui, 1))/1 var(--font-mono, monospace); cursor: pointer; border-radius: 0;
}
.ex-tip-i.on, .ex-tip-i[aria-expanded="true"] { background: #fff; color: #050505; }
.ex-tip-line { margin: 0; font-size: calc(12.5px * var(--ui, 1)); line-height: 1.35; color: rgb(255 255 255 / .78); padding-top: calc(5px * var(--ui, 1)); }
.ex-tip-body { grid-column: 1 / -1; margin: 0; font-size: calc(12.5px * var(--ui, 1)); line-height: 1.4; color: rgb(255 255 255 / .62); }
.ex-tip-body b { color: #fff; font-weight: 600; }
.ex-keep {
  margin: calc(12px * var(--ui, 1)) calc(16px * var(--ui, 1)) 0; padding: calc(10px * var(--ui, 1)) calc(12px * var(--ui, 1)); border: 1px solid rgb(255 255 255 / .28);
  background: #0b0c0d; font-size: calc(12.5px * var(--ui, 1)); line-height: 1.4; color: #fff;
}
#exportPop.is-rendering .ex-acts #exGo,
#exportPop.is-rendering .ex-acts #exQueueAdd { opacity: .35; pointer-events: none; }
#exportPop.is-rendering .seg button,
#exportPop.is-rendering .ex-more { pointer-events: none; opacity: .55; }

/* Oct 24 (Camaron): Export actions — white glow outline / glassy depth on both premium CTAs.
   Keep differentiation: Render & Download = filled white; Add to Queue = clear glass + bright rim. Cancel stays quiet. */
#exportPop.ex21 .ex-acts #exGo.btn-accent,
#exportPop.ex21 .ex-acts #exQueueAdd.btn-ghost {
  position: relative;
  isolation: isolate;
  height: calc(44px * var(--ui, 1));
  min-height: calc(44px * var(--ui, 1));
  border-radius: 0 !important;
  transition: border-color .15s, box-shadow .15s, background-color .15s, color .15s;
}
/* primary: solid fill + liquid-glass rim light */
#exportPop.ex21 .ex-acts #exGo.btn-accent {
  background: #f4f4f2 !important;
  color: #050505 !important;
  border: 1px solid #fff !important;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .85),
    inset 0 -1px 0 rgb(0 0 0 / .12),
    0 0 0 1px rgb(255 255 255 / .35),
    0 0 18px rgb(255 255 255 / .28),
    0 0 36px rgb(255 255 255 / .12),
    0 14px 32px rgb(0 0 0 / .45) !important;
}
#exportPop.ex21 .ex-acts #exGo.btn-accent:hover {
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgb(0 0 0 / .1),
    0 0 0 1px #fff,
    0 0 22px rgb(255 255 255 / .4),
    0 0 44px rgb(255 255 255 / .18),
    0 16px 36px rgb(0 0 0 / .5) !important;
}
/* secondary: clear glass + same family of white outline glow */
#exportPop.ex21 .ex-acts #exQueueAdd.btn-ghost {
  background: linear-gradient(180deg, rgb(255 255 255 / .1), rgb(255 255 255 / .03)) !important;
  color: #fff !important;
  border: 1px solid rgb(255 255 255 / .55) !important;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .22),
    inset 0 -1px 0 rgb(0 0 0 / .35),
    0 0 0 1px rgb(255 255 255 / .2),
    0 0 16px rgb(255 255 255 / .2),
    0 0 32px rgb(255 255 255 / .08),
    0 12px 28px rgb(0 0 0 / .4) !important;
}
#exportPop.ex21 .ex-acts #exQueueAdd.btn-ghost:hover {
  border-color: #fff !important;
  background: linear-gradient(180deg, rgb(255 255 255 / .14), rgb(255 255 255 / .05)) !important;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .3),
    inset 0 -1px 0 rgb(0 0 0 / .3),
    0 0 0 1px rgb(255 255 255 / .45),
    0 0 22px rgb(255 255 255 / .32),
    0 0 40px rgb(255 255 255 / .12),
    0 14px 32px rgb(0 0 0 / .45) !important;
}
/* Cancel: quiet, no glow */
#exportPop.ex21 .ex-acts #exCancel {
  box-shadow: none !important;
  border: 1px solid rgb(255 255 255 / .22) !important;
  background: transparent !important;
}

/* Oct 24 (Camaron): fullscreen — Play and 2D/3D toggle side-by-side, never stacked */
.canvas-wrap.fs-on .fs21-play {
  left: calc(calc(16px * var(--ui, 1)) + env(safe-area-inset-left)) !important;
  bottom: calc(calc(18px * var(--ui, 1)) + env(safe-area-inset-bottom)) !important;
  width: calc(44px * var(--ui, 1)) !important;
  height: calc(44px * var(--ui, 1)) !important;
  z-index: 9 !important;
}
.canvas-wrap.fs-on .pv-seg.vtog-ico {
  left: calc(calc(16px * var(--ui, 1)) + calc(44px * var(--ui, 1)) + calc(10px * var(--ui, 1)) + env(safe-area-inset-left)) !important;
  bottom: calc(calc(18px * var(--ui, 1)) + env(safe-area-inset-bottom)) !important;
  width: calc(44px * var(--ui, 1)) !important;
  height: calc(44px * var(--ui, 1)) !important;
  z-index: 9 !important;
  background: rgb(17 18 20 / .82) !important;
  border: 1px solid rgb(255 255 255 / .3) !important;
  box-shadow: 0 0 14px -4px rgb(255 255 255 / .3) !important;
}
.canvas-wrap.fs-on.fs21-hide .pv-seg.vtog-ico { opacity: 0 !important; pointer-events: none !important; }

/* Oct 24 (Camaron): desktop desk layout — resizable columns + reorderable panels */
html:not(.phone):not(.tablet) .app.desk-lay {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: var(--gap);
}
html:not(.phone):not(.tablet) .app.desk-lay > .stack,
html:not(.phone):not(.tablet) .app.desk-lay > .inspector,
html:not(.phone):not(.tablet) .app.desk-lay > .stage {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  height: 100%;
  min-height: 0;
}
html:not(.phone):not(.tablet) .app.desk-lay > .stack {
  width: var(--left);
  flex: 0 0 var(--left);
  max-width: min(calc(480px * var(--ui, 1)), 40vw);
  min-width: calc(200px * var(--ui, 1));
}
html:not(.phone):not(.tablet) .app.desk-lay > .inspector {
  width: var(--right);
  flex: 0 0 var(--right);
  max-width: min(calc(520px * var(--ui, 1)), 42vw);
  min-width: calc(220px * var(--ui, 1));
}
html:not(.phone):not(.tablet) .app.desk-lay > .stage {
  flex: 1 1 auto;
  min-width: calc(280px * var(--ui, 1));
  width: auto;
}
html:not(.phone):not(.tablet) .app.desk-lay > .wall-panel {
  position: absolute !important; /* builder overlays inspector slot; leave absolute */
}
.desk-split {
  position: absolute;
  top: 0; bottom: 0;
  width: calc(10px * var(--ui, 1));
  margin-left: calc(-5px * var(--ui, 1));
  z-index: 12;
  cursor: col-resize;
  touch-action: none;
  background: transparent;
}
.desk-split::after {
  content: "";
  position: absolute;
  top: 12%; bottom: 12%;
  left: calc(4px * var(--ui, 1));
  width: 2px;
  background: rgb(255 255 255 / .14);
  opacity: 0;
  transition: opacity .15s, background-color .15s;
}
.desk-split:hover::after, .desk-split.is-drag::after {
  opacity: 1;
  background: rgb(255 255 255 / .55);
  box-shadow: 0 0 10px rgb(255 255 255 / .35);
}
.desk-split[data-edge="after"] { right: calc(-5px * var(--ui, 1)); left: auto; margin-left: 0; margin-right: calc(-5px * var(--ui, 1)); }
/* Oct 25 (Camaron): discrete corner grab — only this starts panel rearrange */
.desk-grab {
  position: absolute;
  z-index: 14;
  /* bottom-left: clear of panel close / tabs / inspector headers (was top-right over controls) */
  top: auto;
  right: auto;
  bottom: calc(6px * var(--ui, 1));
  left: calc(6px * var(--ui, 1));
  width: calc(18px * var(--ui, 1));
  height: calc(18px * var(--ui, 1));
  padding: 0;
  margin: 0;
  border: 1px solid rgb(255 255 255 / .14);
  background: rgb(12 12 14 / .72);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 0 0 1px rgb(0 0 0 / .35);
  cursor: grab;
  touch-action: none;
  display: grid;
  place-items: center;
  opacity: .55;
  transition: opacity .15s, border-color .15s, background .15s, box-shadow .15s;
}
.desk-grab:hover,
.desk-grab:focus-visible {
  opacity: 1;
  outline: none;
  border-color: rgb(255 255 255 / .38);
  background: rgb(18 18 20 / .9);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), 0 0 14px rgb(255 255 255 / .12);
}
.desk-grab.is-drag,
.desk-grab:active { cursor: grabbing; opacity: 1; border-color: rgb(255 255 255 / .55); }
.desk-grab i {
  display: block;
  width: calc(10px * var(--ui, 1));
  height: calc(10px * var(--ui, 1));
  background:
    radial-gradient(circle, rgb(255 255 255 / .72) 1.1px, transparent 1.25px) 0 0 / 5px 5px,
    radial-gradient(circle, rgb(255 255 255 / .72) 1.1px, transparent 1.25px) 5px 0 / 5px 5px,
    radial-gradient(circle, rgb(255 255 255 / .72) 1.1px, transparent 1.25px) 0 5px / 5px 5px,
    radial-gradient(circle, rgb(255 255 255 / .72) 1.1px, transparent 1.25px) 5px 5px / 5px 5px;
  background-repeat: no-repeat;
}
/* stage: sit under the Editor label, still clear of the canvas */
.app.desk-lay > .stage > .desk-grab { top: auto; right: auto; bottom: calc(10px * var(--ui, 1)); left: calc(10px * var(--ui, 1)); }
html.desk-resizing, html.desk-resizing * { cursor: col-resize !important; user-select: none !important; }
html.desk-moving, html.desk-moving * { cursor: grabbing !important; user-select: none !important; }
.desk-ghost {
  position: fixed; z-index: 200; pointer-events: none;
  border: 1px solid rgb(255 255 255 / .45);
  background: rgb(17 18 20 / .85);
  box-shadow: 0 0 20px rgb(255 255 255 / .15);
  padding: calc(10px * var(--ui, 1)) calc(14px * var(--ui, 1));
  font: 600 calc(12px * var(--ui, 1))/1 var(--font-mono, monospace);
  letter-spacing: .12em; text-transform: uppercase; color: #fff;
}
/* phone/tablet never show desk grabs */
html.phone .desk-grab, html.tablet .desk-grab { display: none !important; }
.app.desk-lay > .stack.desk-drop,
.app.desk-lay > .inspector.desk-drop,
.app.desk-lay > .stage.desk-drop {
  outline: 1px solid rgb(255 255 255 / .55);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .2), 0 0 22px rgb(255 255 255 / .12);
}

/* Oct 24: routed duplicate (view) in the layer stack */
.layer.route-view .nm small{color:rgb(54 240 122 / .85)}
.layer.route-view .thumb{outline:1px solid rgb(54 240 122 / .35)}

/* Oct 24 (Camaron): Playback strip — sharp square play, clearer scrub, less cramped chrome */
html:not(.phone) .dock .play{
  width:calc(44px * var(--ui, 1));height:calc(44px * var(--ui, 1));border-radius:0!important;
  background:#f4f4f2!important;color:#050505!important;
  border:1px solid #fff;
  box-shadow:inset 0 1px 0 rgb(255 255 255/.8),0 0 0 1px rgb(255 255 255/.2),0 0 18px rgb(255 255 255/.12),0 10px 24px rgb(0 0 0/.4);
  transition:background .15s,box-shadow .15s,transform .15s;
}
html:not(.phone) .dock .play:hover{transform:none;background:#fff!important;box-shadow:inset 0 1px 0 #fff,0 0 0 1px rgb(255 255 255/.35),0 0 22px rgb(255 255 255/.2),0 12px 28px rgb(0 0 0/.45)}
html:not(.phone) .dock .play:active{transform:translateY(1px)}
html:not(.phone) .dock .play svg{width:calc(16px * var(--ui, 1));height:calc(16px * var(--ui, 1))}
html:not(.phone) .dock .play[aria-pressed="false"]{background:rgb(255 255 255/.08)!important;color:#fff!important;border-color:rgb(255 255 255/.45)}
html:not(.phone) .dock .scrub{gap:calc(6px * var(--ui, 1));width:clamp(calc(180px * var(--ui, 1)),24vw,calc(340px * var(--ui, 1)));min-width:calc(180px * var(--ui, 1))}
html:not(.phone) .dock .timeline{height:calc(16px * var(--ui, 1));touch-action:none}
html:not(.phone) .dock .timeline::before{top:calc(6px * var(--ui, 1));height:calc(4px * var(--ui, 1));border-radius:0;background:rgb(255 255 255/.12)}
html:not(.phone) .dock .timeline .fillbar{top:calc(6px * var(--ui, 1));height:calc(4px * var(--ui, 1));border-radius:0}
html:not(.phone) .dock .timeline i{top:2px;width:2px;height:calc(12px * var(--ui, 1));margin-left:-1px;background:#fff;box-shadow:0 0 10px rgb(255 255 255/.45)}
html:not(.phone) .dock .timeline.has-wave{background-size:100% 10px;background-position:center;background-repeat:no-repeat}
html:not(.phone) .dock .scrub-meta{gap:calc(12px * var(--ui, 1));align-items:baseline}
html:not(.phone) .dock .scrub-meta .tc{font:500 calc(11px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.04em;min-width:4.5ch}
html:not(.phone) .dock .stepper{height:calc(36px * var(--ui, 1));border-radius:0;border:1px solid rgb(255 255 255/.22)}
html:not(.phone) .dock .stepper button{width:calc(32px * var(--ui, 1));border-radius:0}
html:not(.phone) .dock .stepper input{width:4.2em;text-align:center}
html:not(.phone) .dock .tp-btn{height:calc(36px * var(--ui, 1));border-radius:0;min-width:calc(64px * var(--ui, 1))}
html:not(.phone) .dock .pill-select.small{height:calc(36px * var(--ui, 1));border-radius:0}
html:not(.phone) .dock .chip-tgl{height:calc(36px * var(--ui, 1));border-radius:0}

/* Oct 24: song section markers on the playback timeline */
.timeline{overflow:visible}
.mk-rail{position:absolute;left:0;right:0;top:calc(-14px * var(--ui, 1));height:calc(14px * var(--ui, 1));pointer-events:none;z-index:3}
.mk-mark{pointer-events:auto;position:absolute;top:0;transform:translateX(-50%);width:calc(16px * var(--ui, 1));height:calc(14px * var(--ui, 1));padding:0;border:0;border-radius:0;font:700 calc(9px * var(--ui, 1))/calc(14px * var(--ui, 1)) var(--font-mono);letter-spacing:0;color:#050505;background:#9aa3ad;cursor:pointer}
.mk-mark.mk-verse{background:#7dd3fc}
.mk-mark.mk-chorus{background:#36f07a}
.mk-mark.mk-bridge{background:#f5a524}
.mk-mark.mk-intro,.mk-mark.mk-outro{background:#c4b5fd}
.mk-mark.mk-pre{background:#f9a8d4}
.mk-mark.has-look{box-shadow:0 0 0 1px #fff,0 0 10px rgb(255 255 255/.35)}
.mk-pop{position:fixed;z-index:80;width:calc(260px * var(--ui, 1));padding:calc(12px * var(--ui, 1)) calc(14px * var(--ui, 1));border:1px solid rgb(255 255 255/.2);background:#0e0f12;box-shadow:0 18px 48px rgb(0 0 0/.55)}
.mk-pop header{display:flex;align-items:baseline;gap:calc(8px * var(--ui, 1));margin-bottom:calc(10px * var(--ui, 1))}
.mk-pop header b{font:600 calc(13px * var(--ui, 1))/1.2 var(--font-sans);color:#fff}
.mk-pop header span{font:500 calc(11px * var(--ui, 1))/1 var(--font-mono);color:rgb(255 255 255/.45)}
.mk-pop .mk-x{margin-left:auto;width:calc(28px * var(--ui, 1));height:calc(28px * var(--ui, 1));border:1px solid rgb(255 255 255/.2);background:transparent;color:#fff;cursor:pointer}
.mk-row{display:flex;align-items:center;gap:calc(8px * var(--ui, 1));margin:calc(8px * var(--ui, 1)) 0;font:500 calc(11px * var(--ui, 1))/1 var(--font-mono);color:rgb(255 255 255/.65);text-transform:uppercase;letter-spacing:.08em}
.mk-row select,.mk-row input{flex:1;height:calc(34px * var(--ui, 1));border:1px solid rgb(255 255 255/.22);background:#050505;color:#fff;border-radius:0;padding:0 calc(8px * var(--ui, 1))}
.mk-row i{font-style:normal;opacity:.5}
.mk-note{margin:calc(8px * var(--ui, 1)) 0 0;font:400 calc(11px * var(--ui, 1))/1.35 var(--font-sans);color:rgb(255 255 255/.45)}
.timeline.mk-fire::before{background:rgb(54 240 122/.35)!important}

/* Oct 24: custom markers + Fade/Cut — + Marker is a dock sibling (never floats on stage).
   Scrub stays a COLUMN: track on top, current · duration under ends (never stacked / overlapping). */
.scrub{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:calc(6px * var(--ui, 1));min-width:0}
.scrub .timeline{flex:none;width:100%;min-width:calc(40px * var(--ui, 1))}
.scrub .scrub-meta{display:flex;justify-content:space-between;align-items:baseline;gap:calc(12px * var(--ui, 1));width:100%;flex:none}
.scrub .scrub-meta .tc{flex:0 0 auto;white-space:nowrap}
.scrub .scrub-meta #tc{text-align:left}
.scrub .scrub-meta #tcEnd{text-align:right;margin-left:auto}
.mk-add{
  flex:none; position:static; align-self:center;
  height:calc(28px * var(--ui, 1)); padding:0 calc(10px * var(--ui, 1)); margin:0;
  border:1px solid rgb(255 255 255/.28); background:rgb(255 255 255/.06); color:#fff;
  font:600 calc(10px * var(--ui, 1))/1 var(--font-mono); letter-spacing:.06em; text-transform:uppercase;
  border-radius:0; cursor:pointer; white-space:nowrap;
}
.mk-add:hover{background:rgb(255 255 255/.12);border-color:rgb(255 255 255/.45)}
.mk-add .mk-add-short{display:none}
.mk-mark.mk-manual{outline:1px solid #fff}
.mk-mark.mk-cut{opacity:.9}
.mk-pop{width:min(calc(280px * var(--ui, 1)), calc(100vw - calc(16px * var(--ui, 1)))); max-width:calc(100vw - calc(16px * var(--ui, 1)))}
.mk-pop .mk-name{flex:1;min-width:0;height:calc(30px * var(--ui, 1));border:1px solid rgb(255 255 255/.22);background:#050505;color:#fff;font:600 calc(13px * var(--ui, 1))/1 var(--font-sans);padding:0 calc(8px * var(--ui, 1));border-radius:0}
.mk-seg{display:flex;flex:1;border:1px solid rgb(255 255 255/.22)}
.mk-seg button{flex:1;height:calc(34px * var(--ui, 1));border:0;background:transparent;color:rgb(255 255 255/.55);font:600 calc(11px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.08em;text-transform:uppercase;cursor:pointer;border-radius:0}
.mk-seg button.on{background:#f4f4f2;color:#050505}
.mk-acts{display:flex;justify-content:flex-end;margin-top:calc(12px * var(--ui, 1))}
.mk-del{height:calc(32px * var(--ui, 1));padding:0 calc(12px * var(--ui, 1));border:1px solid rgb(255 80 80/.45);background:transparent;color:#ff8a8a;font:600 calc(11px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.06em;text-transform:uppercase;cursor:pointer;border-radius:0}
.mk-del:hover{background:rgb(255 80 80/.12)}
.mk-row[hidden]{display:none!important}

/* phone: compact Marker at end of scrub; rail on the timeline only */
html.phone .dock .mk-add{
  height:calc(30px * var(--ui, 1)); min-width:calc(34px * var(--ui, 1)); padding:0 calc(7px * var(--ui, 1)); margin:0;
  font-size:calc(9px * var(--ui, 1)); letter-spacing:.04em;
  border-color:rgb(255 255 255/.3); background:transparent;
  position:relative;
}
html.phone .dock .mk-add::before{
  content:""; position:absolute; left:-2px; right:-2px; top:50%; height:calc(44px * var(--ui, 1)); transform:translateY(-50%);
}
html.phone .dock .mk-add .mk-add-full{display:none}
html.phone .dock .mk-add .mk-add-short{display:inline}
html.phone .mk-rail{top:calc(-11px * var(--ui, 1));height:calc(11px * var(--ui, 1))}
html.phone .mk-mark{width:calc(13px * var(--ui, 1));height:calc(11px * var(--ui, 1));font:700 calc(8px * var(--ui, 1))/calc(11px * var(--ui, 1)) var(--font-mono)}
html.phone .mk-pop{width:min(calc(280px * var(--ui, 1)), calc(100vw - calc(16px * var(--ui, 1))))}
html:not(.phone) .dock .mk-add{height:calc(32px * var(--ui, 1));padding:0 calc(10px * var(--ui, 1))}

/* phone: one green live beacon (wordmark) — don't stack a second green in the preview HUD */
html.phone .hud.tl .live{display:none!important}
html.phone .canvas-wrap .hud.tl{top:calc(22px * var(--ui, 1))!important;gap:calc(5px * var(--ui, 1))}


/* Oct 26: presets-as-markers — drop target + color swatches */
.timeline.mk-drop{outline:1px solid #36f07a;box-shadow:0 0 0 2px rgb(54 240 122/.35)}
.mk-swatches{display:flex;flex:1;flex-wrap:wrap;gap:calc(6px * var(--ui, 1))}
.mk-swatch{width:calc(22px * var(--ui, 1));height:calc(22px * var(--ui, 1));border:1px solid rgb(255 255 255/.25);padding:0;cursor:pointer;border-radius:0}
.mk-swatch.on{outline:2px solid #fff;outline-offset:1px}
.sp-sw.sp-dragging{opacity:.55}
.sp-sw[draggable="true"]{cursor:grab}
.sp-sw[draggable="true"]:active{cursor:grabbing}
/* simpler preset manager actions */
.sp-acts .sp-plus,.sp-manage{min-height:calc(34px * var(--ui, 1));padding:0 calc(12px * var(--ui, 1));font:600 calc(11px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.06em;text-transform:uppercase}
.sp-list .sp-cw{min-width:0}

/* =====================================================================
   Oct 27 (Camaron t963–t965): classic desk chrome restore
   Match the older clean/premium 3-pane feel (Layer Stack | Preview | Effect
   editor, compact top bar, playback under preview, dense inspector) while
   keeping Presets glass/overlay, sub write-through, New Preset, More tray,
   Apply-to, grab/preventScroll, Base look hierarchy. Phone/tablet untouched.
   Soft Gen-green accent (beacon) on selection / Add / inspector identity.
   t970u hard squares; t972u accent back. Glows kept (t971).
   ===================================================================== */
html:not(.phone):not(.tablet) {
  /* t972u: Gen UI accent = nav beacon green (#36f07a / --bc-pxlgen) */
  --desk-ice: #36f07a;
  --desk-ice-ink: #04140a;
  --desk-ice-glow: rgb(54 240 122 / .32);
  --desk-ice-12: rgb(54 240 122 / .14);
  --desk-ice-22: rgb(54 240 122 / .28);
  --desk-accent: var(--desk-ice);
  --nav-h: calc(48px * var(--ui, 1));
  --gap: calc(10px * var(--ui, 1));
  --left: calc(268px * var(--ui, 1));
  --right: calc(320px * var(--ui, 1));
}

/* ---- hard square shell (site hard-edge + old refs): kill soft pill chrome ---- */
html:not(.phone):not(.tablet) .nav {
  height: var(--nav-h);
  border-radius: 0 !important;
  top: var(--gap); left: var(--gap); right: var(--gap);
  padding: 0 calc(8px * var(--ui, 1)) 0 calc(14px * var(--ui, 1));
  gap: calc(10px * var(--ui, 1));
  background: rgb(12 12 14 / .88);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgb(255 255 255 / .16);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 12px 40px -24px rgb(0 0 0 / .85);
}
html:not(.phone):not(.tablet) .nav::after { opacity: .35; }
html:not(.phone):not(.tablet) .brand .wm { font-size: calc(14px * var(--ui, 1)); letter-spacing: .02em; }
html:not(.phone):not(.tablet) .doc .eyebrow { font-size: calc(8.5px * var(--ui, 1)); letter-spacing: .16em; color: rgb(255 255 255 / .45); }
html:not(.phone):not(.tablet) .doc input { font-size: calc(13px * var(--ui, 1)); width: calc(190px * var(--ui, 1)); }
html:not(.phone):not(.tablet) .pill-select .sel-pill,
html:not(.phone):not(.tablet) .nav .nav-rand,
html:not(.phone):not(.tablet) .nav .nav-export,
html:not(.phone):not(.tablet) .hist,
html:not(.phone):not(.tablet) .hist-b {
  border-radius: 0 !important;
  height: calc(34px * var(--ui, 1));
}
html:not(.phone):not(.tablet) .nav .nav-rand,
html:not(.phone):not(.tablet) .nav .nav-export {
  height: calc(34px * var(--ui, 1)); padding: 0 calc(12px * var(--ui, 1)); font-size: calc(12.5px * var(--ui, 1)); gap: calc(6px * var(--ui, 1));
}
html:not(.phone):not(.tablet) .pill-select .sel-pill { min-width: calc(118px * var(--ui, 1)); height: calc(34px * var(--ui, 1)); font-size: calc(12.5px * var(--ui, 1)); }
html:not(.phone):not(.tablet) .hist-b { width: calc(34px * var(--ui, 1)); height: calc(34px * var(--ui, 1)); }

/* panels + preview: square, denser */
html:not(.phone):not(.tablet) .panel {
  border-radius: 0 !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .05), 0 18px 50px -28px rgb(0 0 0 / .9);
  border-color: rgb(255 255 255 / .14);
}
html:not(.phone):not(.tablet) .panel::before { border-radius: 0; opacity: .7; }
html:not(.phone):not(.tablet) .canvas-wrap {
  border-radius: 0 !important;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .14), 0 0 80px -24px var(--desk-ice-glow), 0 40px 100px -40px rgb(0 0 0 / .9);
}
html:not(.phone):not(.tablet) .dock {
  border-radius: 0 !important;
  background: rgb(12 12 14 / .9);
  border: 1px solid rgb(255 255 255 / .16);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .05), 0 16px 40px -20px rgb(0 0 0 / .9);
}

/* ---- quiet the Oct 26 shouty landmarks; old refs used tiny LAYER STACK labels ---- */
html:not(.phone):not(.tablet) #layersPanel .panel-head .eyebrow,
html:not(.phone):not(.tablet) .sec-h {
  font-size: calc(11px * var(--ui, 1)) !important;
  font-weight: 700 !important;
  letter-spacing: .14em !important;
  color: rgb(255 255 255 / .78) !important;
}
/* t1153u: count lives in .stack-add now (not inside eyebrow) */
html:not(.phone):not(.tablet) #layersPanel .panel-head .eyebrow b { display: none; }
/* Editor / Playback labels ate preview + dock space; old layout had none */
html:not(.phone):not(.tablet) #secEditor,
html:not(.phone):not(.tablet) .dock > .dk-h {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
}
html:not(.phone):not(.tablet) .sp-k {
  font-size: calc(10px * var(--ui, 1)) !important;
  font-weight: 600 !important;
  letter-spacing: .12em !important;
  color: rgb(255 255 255 / .42) !important;
}
/* t1064u: Stage Settings is a slim dropdown trigger under the preview */
html:not(.phone):not(.tablet) .stage > .stage-bar,
html:not(.phone):not(.tablet) #stageBar {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
html:not(.phone):not(.tablet) .stage > .stage-bar .sbx-ss-trig {
  border-radius: 0 !important;
}

/* ---- Layer Stack: clean left rail ---- */
html:not(.phone):not(.tablet) .stack .panel-head {
  padding: calc(12px * var(--ui, 1)) calc(12px * var(--ui, 1)) calc(8px * var(--ui, 1)) calc(14px * var(--ui, 1));
  align-items: center;
}
/* t1153u: 03 + Add as one flush control — same height, no step, 4-pt */
html:not(.phone):not(.tablet) .stack .stack-add {
  display: inline-flex;
  align-items: stretch;
  height: calc(28px * var(--ui, 1));
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: 0 0 18px -6px var(--desk-ice-glow);
}
html:not(.phone):not(.tablet) .stack .stack-count {
  display: inline-grid;
  place-items: center;
  min-width: calc(28px * var(--ui, 1));
  height: calc(28px * var(--ui, 1));
  margin: 0;
  padding: 0 calc(8px * var(--ui, 1));
  font-family: var(--font-mono);
  font-size: calc(11px * var(--ui, 1));
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: .08em;
  line-height: 1;
  color: var(--desk-ice-ink);
  background: color-mix(in oklab, var(--desk-ice) 82%, #04140a);
  border: 0;
  border-right: 1px solid rgb(4 20 10 / .22);
  border-radius: 0;
  box-sizing: border-box;
}
html:not(.phone):not(.tablet) .stack .stack-add .add-btn {
  height: calc(28px * var(--ui, 1));
  min-height: calc(28px * var(--ui, 1));
  margin: 0;
  padding: 0 calc(12px * var(--ui, 1)) 0 calc(10px * var(--ui, 1));
  border: 0;
  border-radius: 0 !important;
  background: var(--desk-ice);
  color: var(--desk-ice-ink);
  box-shadow: none;
  font-size: calc(11.5px * var(--ui, 1));
  font-weight: 700;
  line-height: 1;
  gap: calc(6px * var(--ui, 1));
}
html:not(.phone):not(.tablet) .stack .stack-add:hover {
  box-shadow: 0 0 0 3px var(--desk-ice-12), 0 0 22px -4px var(--desk-ice-glow);
}
html:not(.phone):not(.tablet) .stack .stack-add .add-btn:hover {
  box-shadow: none;
}
html:not(.phone):not(.tablet) .layer-list { padding: 2px calc(8px * var(--ui, 1)) calc(8px * var(--ui, 1)); }
html:not(.phone):not(.tablet) .layer {
  gap: calc(9px * var(--ui, 1)); padding: calc(5px * var(--ui, 1)) calc(6px * var(--ui, 1)) calc(5px * var(--ui, 1)) calc(5px * var(--ui, 1)); margin-bottom: 2px;
  border-radius: 0 !important;
}
html:not(.phone):not(.tablet) .layer .thumb {
  width: calc(52px * var(--ui, 1)); height: calc(34px * var(--ui, 1)); border-radius: 0 !important;
}
html:not(.phone):not(.tablet) .layer .nm { font-size: calc(12.5px * var(--ui, 1)); }
html:not(.phone):not(.tablet) .layer .nm small { font-size: calc(9px * var(--ui, 1)); letter-spacing: .1em; }
html:not(.phone):not(.tablet) .layer.sel {
  background: linear-gradient(100deg, var(--desk-ice-12), rgb(255 255 255 / .02) 70%);
  border-color: color-mix(in oklab, var(--desk-ice) 55%, transparent);
}
html:not(.phone):not(.tablet) .layer.sel::before {
  background: var(--desk-ice);
  box-shadow: 0 0 12px var(--desk-ice-glow);
  border-radius: 0; left: calc(-8px * var(--ui, 1)); width: 2px; height: calc(18px * var(--ui, 1)); margin-top: calc(-9px * var(--ui, 1));
}
html:not(.phone):not(.tablet) .layer.sel .nm small { color: color-mix(in oklab, var(--desk-ice) 75%, var(--mute)); }
html:not(.phone):not(.tablet) .hint {
  padding: calc(10px * var(--ui, 1)) calc(12px * var(--ui, 1)) calc(12px * var(--ui, 1)); font-size: calc(11px * var(--ui, 1));
}

/* ---- Playback: compact strip under preview (not a busy two-row chrome) ---- */
html:not(.phone):not(.tablet) .dock.dk-wrap {
  padding: calc(8px * var(--ui, 1)) calc(10px * var(--ui, 1)) !important;
  row-gap: calc(6px * var(--ui, 1)) !important;
  column-gap: calc(8px * var(--ui, 1));
  min-height: 0;
}
html:not(.phone):not(.tablet) .dock .play {
  width: calc(38px * var(--ui, 1)) !important; height: calc(38px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .dock .play svg { width: calc(14px * var(--ui, 1)) !important; height: calc(14px * var(--ui, 1)) !important; }
html:not(.phone):not(.tablet) .dock .scrub { min-width: calc(140px * var(--ui, 1)); }
html:not(.phone):not(.tablet) .dock .chip-tgl,
html:not(.phone):not(.tablet) .dock .stepper,
html:not(.phone):not(.tablet) .dock .tp-btn,
html:not(.phone):not(.tablet) .dock .pill-select.small {
  height: calc(32px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .dock .timeline { height: calc(14px * var(--ui, 1)); }
html:not(.phone):not(.tablet) .dock .timeline::before,
html:not(.phone):not(.tablet) .dock .timeline .fillbar { top: calc(5px * var(--ui, 1)); height: calc(3px * var(--ui, 1)); }
html:not(.phone):not(.tablet) .dock .timeline .fillbar {
  background: var(--desk-ice);
  box-shadow: 0 0 10px var(--desk-ice-glow);
}

/* ---- Inspector: dense numbered sections, thin lines, ice title ---- */
html:not(.phone):not(.tablet) .insp-head {
  padding: calc(14px * var(--ui, 1)) calc(14px * var(--ui, 1)) calc(12px * var(--ui, 1)) calc(16px * var(--ui, 1)) !important;
  background: #0e0e10 !important;
  border-bottom: 1px solid rgb(255 255 255 / .1);
}
html:not(.phone):not(.tablet) .insp-head .ttl {
  font-size: calc(18px * var(--ui, 1)) !important;
  font-stretch: 110% !important;
  font-weight: 800 !important;
  letter-spacing: -.015em !important;
  margin-top: calc(6px * var(--ui, 1)) !important;
  line-height: 1.05 !important;
  text-transform: uppercase !important;
  color: var(--desk-ice) !important;
  text-shadow: 0 0 18px var(--desk-ice-glow);
}
html:not(.phone):not(.tablet) .insp-head .ttl .t { color: inherit; }
html:not(.phone):not(.tablet) .insp-head .ttl .n {
  font-size: calc(10px * var(--ui, 1)) !important;
  letter-spacing: .12em !important;
  color: rgb(255 255 255 / .45) !important;
}
html:not(.phone):not(.tablet) .insp-head + * { margin-top: calc(8px * var(--ui, 1)); }
html:not(.phone):not(.tablet) .sec {
  margin: 0 calc(10px * var(--ui, 1)) 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgb(255 255 255 / .08) !important;
  border-radius: 0 !important;
  background: transparent !important;
}
html:not(.phone):not(.tablet) .sec:hover { border-color: transparent; border-bottom-color: rgb(255 255 255 / .14) !important; }
html:not(.phone):not(.tablet) .sec-title {
  padding: calc(10px * var(--ui, 1)) calc(4px * var(--ui, 1)) calc(8px * var(--ui, 1)) !important;
  gap: calc(8px * var(--ui, 1));
}
html:not(.phone):not(.tablet) .sec-title .ix {
  color: var(--desk-ice) !important;
  font-size: calc(10px * var(--ui, 1));
  letter-spacing: .14em;
  text-shadow: 0 0 10px var(--desk-ice-glow);
}
html:not(.phone):not(.tablet) .sec-title .tt { font-size: calc(12px * var(--ui, 1)); font-weight: 600; }
html:not(.phone):not(.tablet) .sec-title .pm {
  width: calc(22px * var(--ui, 1)); height: calc(22px * var(--ui, 1)); border-radius: 0 !important;
}
html:not(.phone):not(.tablet) .sec-body { padding: 0 calc(4px * var(--ui, 1)) calc(12px * var(--ui, 1)) !important; }
html:not(.phone):not(.tablet) .ctl { margin: calc(10px * var(--ui, 1)) 0 0; }
html:not(.phone):not(.tablet) .ctl-top { font-size: calc(12px * var(--ui, 1)); margin-bottom: calc(5px * var(--ui, 1)); color: rgb(255 255 255 / .7); }
html:not(.phone):not(.tablet) .ctl.dirty .ctl-top .lb::before {
  background: var(--desk-ice); box-shadow: 0 0 6px var(--desk-ice);
}
html:not(.phone):not(.tablet) .sl .fl {
  background: linear-gradient(90deg, color-mix(in oklab, var(--desk-ice) 40%, transparent), var(--desk-ice));
  filter: drop-shadow(0 0 3px var(--desk-ice-glow));
}
html:not(.phone):not(.tablet) .sl .kn {
  border-radius: 0 !important;
  width: calc(12px * var(--ui, 1)); height: calc(12px * var(--ui, 1)); top: calc(4px * var(--ui, 1)); margin-left: calc(-6px * var(--ui, 1));
  box-shadow: 0 0 0 2px rgb(6 6 7 / .9), 0 0 0 3px color-mix(in oklab, var(--desk-ice) 55%, transparent), 0 0 12px var(--desk-ice-glow);
}
html:not(.phone):not(.tablet) .sl.drag .kn { background: var(--desk-ice); }
html:not(.phone):not(.tablet) .ctl-top .mini.on {
  color: var(--desk-ice-ink); background: var(--desk-ice);
  box-shadow: 0 0 12px var(--desk-ice-glow); border-radius: 0;
}
html:not(.phone):not(.tablet) .hud .live {
  background: var(--desk-ice); box-shadow: 0 0 8px var(--desk-ice);
}

/* menus / add tiles stay square on desk */
html:not(.phone):not(.tablet) .menu,
html:not(.phone):not(.tablet) .add-menu,
html:not(.phone):not(.tablet) .add-menu button,
html:not(.phone):not(.tablet) .layer .ops {
  border-radius: 0 !important;
}
html:not(.phone):not(.tablet) .add-menu button:hover {
  border-color: var(--desk-ice);
  background: var(--desk-ice-12);
}
html:not(.phone):not(.tablet) .add-menu button svg { color: var(--desk-ice); }

/* t1066u: Looks/Effects add browser — reserve scrollbar gutter so the panel/grid
   does not shove sideways when the vertical scrollbar appears or hides */
html:not(.phone) .add-menu {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgb(255 255 255 / .22) transparent;
}
html:not(.phone) .add-menu::-webkit-scrollbar { width: calc(10px * var(--ui, 1)); }
html:not(.phone) .add-menu::-webkit-scrollbar-thumb {
  background: rgb(255 255 255 / .22);
  border: 2px solid transparent;
  background-clip: padding-box;
}
html:not(.phone) .add-menu::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 1280px) {
  html:not(.phone):not(.tablet) { --left: calc(240px * var(--ui, 1)); --right: calc(292px * var(--ui, 1)); }
}
@media (max-width: 1100px) {
  html:not(.phone):not(.tablet) { --left: calc(216px * var(--ui, 1)); --right: calc(268px * var(--ui, 1)); }
}


/* =====================================================================
   Oct 27 (Camaron t970u + t972u): hard square edges + Gen accent chrome
   Square rectangles everywhere in PXL GEN (no pill SaaS look). Gen green
   drives selection / primary rail actions / inspector identity; Export and
   white CTAs stay white. Background edge glows kept.
   ===================================================================== */
html, html *, html *::before, html *::after {
  border-radius: 0 !important;
}

/* Gen accent on root interactive tokens for desk (selection / focus), without
   flipping every white CTA — Export/.btn-accent keep white fill via explicit rules */
html:not(.phone):not(.tablet) {
  --accent: #36f07a;
  --accent-ink: #04140a;
  --accent-glow: rgb(54 240 122 / .32);
  --accent-12: rgb(54 240 122 / .14);
  --accent-22: rgb(54 240 122 / .28);
}
/* Keep Export / primary white CTAs white (premium tool, not green flood) */
html:not(.phone):not(.tablet) .nav .nav-export,
html:not(.phone):not(.tablet) .btn-accent,
html:not(.phone):not(.tablet) .pop .btn-accent,
html:not(.phone):not(.tablet) #exGo,
html:not(.phone):not(.tablet) .lock-btns .btn-accent {
  background: #fff !important;
  color: #050505 !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .85), 0 0 22px -10px rgb(255 255 255 / .45) !important;
}
html:not(.phone):not(.tablet) .nav .nav-export:hover,
html:not(.phone):not(.tablet) .btn-accent:hover {
  background: #fff !important;
  box-shadow: 0 0 0 1px #fff, 0 0 0 4px rgb(255 255 255 / .1), 0 0 28px -8px rgb(255 255 255 / .4) !important;
}
/* Play stays white square (readability on dark dock) */
html:not(.phone):not(.tablet) .dock .play {
  background: #f4f4f2 !important;
  color: #050505 !important;
}
/* Focus rings use Gen green */
html:not(.phone):not(.tablet) :focus-visible {
  outline-color: #36f07a;
}
/* Presets overlay / glass sheets stay square + keep soft edge glow */
html .m-presets-glass .m-pg-sheet,
html .mp-dialog .mp-dialog-card,
html .sp-pop,
html .menu,
html .pop {
  border-radius: 0 !important;
}


/* =====================================================================
   Oct 27 (Camaron t974u): View Settings — calm selection, not screaming white
   Selected segs use Gen green outline/tint (desk) or muted white outline.
   Done stays the one primary CTA. Square thumbs. Hard edges already global.
   ===================================================================== */
.sbx-rs-seg {
  border-radius: 0 !important;
  border-color: rgb(255 255 255 / .16) !important;
  background: rgb(255 255 255 / .02);
}
.sbx-rs-seg button {
  border-radius: 0 !important;
  background: transparent !important;
  color: rgb(255 255 255 / .55) !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
.sbx-rs-seg button:hover {
  color: #fff !important;
  background: rgb(255 255 255 / .05) !important;
}
/* selected: quiet outline + soft Gen accent tint — not billboard white */
.sbx-rs-seg button[aria-pressed="true"] {
  background: rgb(54 240 122 / .12) !important;
  color: #9bffc8 !important;
  font-weight: 600 !important;
  box-shadow: inset 0 0 0 1px rgb(54 240 122 / .55) !important;
  text-shadow: none !important;
}
html.phone .sbx-rs-seg button[aria-pressed="true"] {
  background: rgb(255 255 255 / .1) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .45) !important;
}
.sbx-rs-row input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 2px; background: rgb(255 255 255 / .18); border-radius: 0;
}
.sbx-rs-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: calc(14px * var(--ui, 1)); height: calc(14px * var(--ui, 1)); border-radius: 0 !important;
  background: #36f07a; border: 0;
  box-shadow: 0 0 0 2px #050505, 0 0 10px rgb(54 240 122 / .35);
  cursor: grab;
}
.sbx-rs-row input[type="range"]::-moz-range-thumb {
  width: calc(14px * var(--ui, 1)); height: calc(14px * var(--ui, 1)); border-radius: 0 !important;
  background: #36f07a; border: 0; cursor: grab;
}
.sbx-rs-row input[type="range"]::-webkit-slider-runnable-track {
  height: 2px; background: rgb(255 255 255 / .18); border-radius: 0;
}
/* Done / close primary — still white, but alone as the CTA */
.sbx-rs-panel .sbx-rs-done,
.sbx-rs-panel button.sbx-rs-done {
  background: #fff !important; color: #050505 !important;
  border: 1px solid #fff !important; border-radius: 0 !important;
  box-shadow: 0 0 18px -8px rgb(255 255 255 / .35) !important;
}
.sbx-rs-reset {
  background: transparent !important;
  color: rgb(255 255 255 / .65) !important;
  border: 1px solid rgb(255 255 255 / .2) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.sbx-rs-l { color: rgb(255 255 255 / .5) !important; }
.sbx-rs-l i { color: rgb(255 255 255 / .75) !important; font-weight: 500; }


/* =====================================================================
   Oct 27 (Camaron t975u + t976u): preview fill + UI color picker + cleanup
   - Keep background/UI edge glows (liked).
   - Stage preview near-full-bleed in center column (visualizer feel / hi-res).
   - Top-right UI color picker (Gen/Blue/Red/…); --desk-ice* follow --accent.
   - Quieter selected chips; clean nav/dock hierarchy; hard squares kept.
   ===================================================================== */

/* desk: tighter rails so the center stage can breathe */
html:not(.phone):not(.tablet) {
  --gap: calc(8px * var(--ui, 1));
  --left: calc(248px * var(--ui, 1));
  --right: calc(300px * var(--ui, 1));
  --nav-h: calc(46px * var(--ui, 1));
}
@media (max-width: 1280px) {
  html:not(.phone):not(.tablet) { --left: calc(228px * var(--ui, 1)); --right: calc(280px * var(--ui, 1)); }
}
@media (max-width: 1100px) {
  html:not(.phone):not(.tablet) { --left: calc(208px * var(--ui, 1)); --right: calc(260px * var(--ui, 1)); }
}

/* Stage column: preview is the hero — less floating inset */
html:not(.phone):not(.tablet) .app.desk-lay {
  gap: var(--gap);
}
html:not(.phone):not(.tablet) .app.desk-lay > .stage {
  min-width: calc(320px * var(--ui, 1));
}
html:not(.phone):not(.tablet) .canvas-wrap {
  box-shadow:
    0 0 0 1px rgb(255 255 255 / .14),
    0 0 100px -20px var(--desk-ice-glow, var(--accent-glow)),
    0 36px 90px -36px rgb(0 0 0 / .92);
}
/* keep aura glow alive behind UI (t975 keep) */
html:not(.phone):not(.tablet) .backdrop .aura {
  opacity: .28;
  background: radial-gradient(50% 50% at 50% 50%, var(--desk-ice-glow, var(--accent-glow)), transparent 70%);
  filter: blur(48px);
}

/* ---- Top-right UI color picker (square, matches hard-edge language) ---- */
html:not(.phone):not(.tablet) .accent-pick {
  position: relative;
  flex: none;
  order: 0;
}
html:not(.phone):not(.tablet) .accent-pick .cur {
  width: calc(34px * var(--ui, 1)); height: calc(34px * var(--ui, 1)); padding: 0;
  border: 1px solid rgb(255 255 255 / .2);
  background: rgb(12 12 14 / .72);
  display: grid; place-items: center;
  border-radius: 0 !important;
  transition: border-color .15s, box-shadow .15s;
}
html:not(.phone):not(.tablet) .accent-pick .cur:hover,
html:not(.phone):not(.tablet) .accent-pick .cur:focus-visible {
  border-color: var(--desk-ice, var(--accent));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--desk-ice, var(--accent)) 45%, transparent),
              0 0 16px -4px var(--desk-ice-glow, var(--accent-glow));
  outline: none;
}
html:not(.phone):not(.tablet) .accent-pick .cur i {
  width: calc(14px * var(--ui, 1)); height: calc(14px * var(--ui, 1)); border-radius: 0 !important;
  background: var(--desk-ice, var(--accent));
  box-shadow: 0 0 12px var(--desk-ice-glow, var(--accent-glow));
}
.accent-menu {
  display: flex; flex-wrap: wrap; gap: calc(6px * var(--ui, 1)); padding: calc(8px * var(--ui, 1)); max-width: calc(196px * var(--ui, 1));
  border-radius: 0 !important;
}
.accent-menu button {
  width: calc(28px * var(--ui, 1)); height: calc(28px * var(--ui, 1)); padding: 0;
  display: grid; place-items: center;
  border: 1px solid rgb(255 255 255 / .14);
  background: rgb(10 10 12 / .85);
  border-radius: 0 !important;
}
.accent-menu button i {
  width: calc(14px * var(--ui, 1)); height: calc(14px * var(--ui, 1)); border-radius: 0 !important;
}
.accent-menu button.on {
  box-shadow: inset 0 0 0 1.5px #fff;
  border-color: rgb(255 255 255 / .55);
}
.accent-menu button:hover {
  border-color: rgb(255 255 255 / .4);
}
/* phone: hide Gen UI color (desk chrome); keep site Accent elsewhere */
html.phone .accent-pick { display: none !important; }

/* ---- Nav action order: hist · Preset · UI color · Randomize · Export ---- */
html:not(.phone):not(.tablet) .nav {
  gap: calc(8px * var(--ui, 1));
  padding: 0 calc(8px * var(--ui, 1)) 0 calc(12px * var(--ui, 1));
}
html:not(.phone):not(.tablet) .nav .hist { order: 1; }
html:not(.phone):not(.tablet) .nav #presetSel { order: 2; }
html:not(.phone):not(.tablet) .nav #accentPick { order: 3; }
html:not(.phone):not(.tablet) .nav .nav-rand { order: 4; }
html:not(.phone):not(.tablet) .nav .nav-export { order: 5; }
html:not(.phone):not(.tablet) .nav .nav-sp { flex: 1 1 auto; order: 0; }
/* Randomize quieter secondary; Export alone as primary white CTA */
html:not(.phone):not(.tablet) .nav .nav-rand {
  color: rgb(255 255 255 / .78);
  border: 1px solid rgb(255 255 255 / .18);
  background: transparent;
  box-shadow: none;
}
html:not(.phone):not(.tablet) .nav .nav-rand:hover {
  color: #fff;
  border-color: rgb(255 255 255 / .4);
  background: rgb(255 255 255 / .04);
}

/* ---- Dock: calmer Loop-on (accent tint, not screaming white) ---- */
html:not(.phone):not(.tablet) .dock .chip-tgl:has(input:checked) {
  background: color-mix(in oklab, var(--desk-ice, var(--accent)) 22%, transparent) !important;
  color: #fff !important;
  border-color: color-mix(in oklab, var(--desk-ice, var(--accent)) 55%, transparent) !important;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--desk-ice, var(--accent)) 35%, transparent);
}
html:not(.phone):not(.tablet) .dock .chip-tgl {
  border-radius: 0 !important;
}
html:not(.phone):not(.tablet) .dock.dk-wrap {
  padding: calc(6px * var(--ui, 1)) calc(8px * var(--ui, 1)) !important;
  row-gap: calc(4px * var(--ui, 1)) !important;
}

/* Stage bar under preview: full width of frame, compact */
html:not(.phone):not(.tablet) .stage > .stage-bar,
html:not(.phone):not(.tablet) #stageBar {
  border-radius: 0 !important;
}

/* View Settings selected: follow live UI accent (not hardcoded Gen green) */
.sbx-rs-seg button[aria-pressed="true"] {
  background: color-mix(in oklab, var(--desk-ice, var(--accent)) 14%, transparent) !important;
  color: color-mix(in oklab, var(--desk-ice, var(--accent)) 70%, #fff) !important;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--desk-ice, var(--accent)) 55%, transparent) !important;
}
.sbx-rs-row input[type="range"]::-webkit-slider-thumb {
  background: var(--desk-ice, var(--accent));
  box-shadow: 0 0 0 2px #050505, 0 0 10px var(--desk-ice-glow, var(--accent-glow));
}
.sbx-rs-row input[type="range"]::-moz-range-thumb {
  background: var(--desk-ice, var(--accent));
}
html:not(.phone):not(.tablet) :focus-visible {
  outline-color: var(--desk-ice, var(--accent));
}


/* t977u: UI color picker only when signed-in full PXL GEN (host gets .is-on) */
html:not(.phone):not(.tablet) .accent-pick:not(.is-on),
html:not(.phone):not(.tablet) .accent-pick[hidden] {
  display: none !important;
}
html:not(.phone):not(.tablet) .accent-pick.is-on:not([hidden]) {
  display: block;
}


/* =====================================================================
   Oct 27 (Camaron t981u–t984u): desk fill, accent show, preview drag,
   calm playback, Loop removed, Stage FPS recovery
   ===================================================================== */

/* Accent picker: show whenever signed-in flag is on (belt over [hidden]) */
html.pxl-accent-on:not(.phone):not(.tablet) .accent-pick,
html:not(.phone):not(.tablet) .accent-pick.is-on {
  display: grid !important;
  place-items: center;
  visibility: visible !important;
  opacity: 1 !important;
}
html:not(.phone):not(.tablet) .accent-pick .cur {
  width: calc(34px * var(--ui, 1)); height: calc(34px * var(--ui, 1));
}

/* Loop toggle retired — always seamless */
.dock .loop-tgl,
#loopTglWrap { display: none !important; }

/* Preview drag handle (bottom edge of canvas) */
.pv-resize {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(10px * var(--ui, 1));
  z-index: 8;
  cursor: ns-resize;
  touch-action: none;
  background: transparent;
}
.pv-resize::after {
  content: "";
  position: absolute;
  left: 50%; top: calc(3px * var(--ui, 1));
  width: calc(48px * var(--ui, 1)); height: calc(3px * var(--ui, 1));
  margin-left: calc(-24px * var(--ui, 1));
  background: rgb(255 255 255 / .22);
  box-shadow: 0 0 10px var(--desk-ice-glow, var(--accent-glow));
  opacity: 0;
  transition: opacity .15s, background .15s;
}
.canvas-wrap:hover .pv-resize::after,
.pv-resize:hover::after,
.pv-resize.is-drag::after {
  opacity: 1;
  background: color-mix(in oklab, var(--desk-ice, var(--accent)) 70%, #fff);
}
html.phone .pv-resize, html.tablet .pv-resize { display: none !important; }

/* ---- Calm playback dock (t984u) ---- */
html:not(.phone):not(.tablet) .dock.dk-wrap,
html:not(.phone):not(.tablet) .dock {
  min-height: calc(48px * var(--ui, 1)) !important;
  height: auto !important;
  padding: calc(6px * var(--ui, 1)) calc(12px * var(--ui, 1)) !important;
  gap: calc(10px * var(--ui, 1)) !important;
  row-gap: calc(4px * var(--ui, 1)) !important;
  border-radius: 0 !important;
  background: rgb(10 10 12 / .92);
  border: 1px solid rgb(255 255 255 / .14);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .05), 0 12px 36px -18px rgb(0 0 0 / .9);
}
html:not(.phone):not(.tablet) .dock .play {
  width: calc(36px * var(--ui, 1)) !important;
  height: calc(36px * var(--ui, 1)) !important;
  border-radius: 0 !important;
  background: #f4f4f2 !important;
  color: #050505 !important;
  border: 1px solid rgb(255 255 255 / .55);
  box-shadow: none !important;
}
html:not(.phone):not(.tablet) .dock .play:hover {
  background: #fff !important;
  box-shadow: 0 0 0 1px #fff !important;
  transform: none !important;
}
html:not(.phone):not(.tablet) .dock .play svg { width: calc(13px * var(--ui, 1)) !important; height: calc(13px * var(--ui, 1)) !important; }
html:not(.phone):not(.tablet) .dock .scrub {
  flex: 1 1 auto;
  min-width: calc(160px * var(--ui, 1));
  max-width: none;
  width: auto !important;
  gap: calc(4px * var(--ui, 1));
}
html:not(.phone):not(.tablet) .dock .timeline {
  height: calc(18px * var(--ui, 1));
  cursor: pointer;
}
html:not(.phone):not(.tablet) .dock .timeline::before {
  top: calc(7px * var(--ui, 1)); height: 2px;
  border-radius: 0;
  background: rgb(255 255 255 / .14);
  -webkit-mask: none; mask: none;
}
html:not(.phone):not(.tablet) .dock .timeline .fillbar {
  top: calc(7px * var(--ui, 1)); height: 2px;
  border-radius: 0;
  background: var(--desk-ice, var(--accent));
  box-shadow: 0 0 8px var(--desk-ice-glow, var(--accent-glow));
  -webkit-mask: none; mask: none;
}
html:not(.phone):not(.tablet) .dock .timeline i {
  top: calc(3px * var(--ui, 1)); width: 2px; height: calc(12px * var(--ui, 1)); margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 8px rgb(255 255 255 / .35);
  border-radius: 0;
}
html:not(.phone):not(.tablet) .dock .scrub-meta {
  gap: calc(10px * var(--ui, 1));
}
html:not(.phone):not(.tablet) .dock .scrub-meta .tc {
  font: 500 calc(10px * var(--ui, 1))/1 var(--font-mono);
  letter-spacing: .06em;
  color: rgb(255 255 255 / .55);
}
html:not(.phone):not(.tablet) .dock .dsep {
  height: calc(20px * var(--ui, 1));
  background: rgb(255 255 255 / .1);
}
html:not(.phone):not(.tablet) .dock .tp-btn,
html:not(.phone):not(.tablet) .dock .stepper,
html:not(.phone):not(.tablet) .dock .pill-select.small {
  height: calc(30px * var(--ui, 1)) !important;
  border-radius: 0 !important;
  opacity: .9;
}
html:not(.phone):not(.tablet) .dock .tp-btn {
  min-width: calc(52px * var(--ui, 1));
  padding: 0 calc(8px * var(--ui, 1));
  font-size: calc(10px * var(--ui, 1));
}

/* Desk stage fills column — no orphan black band under dock */
html:not(.phone):not(.tablet) .app.desk-lay > .stage {
  min-height: 0;
}
html:not(.phone):not(.tablet) .app {
  /* keep inset; fill is via fitCanvas + parent iframe flex */
}


/* =====================================================================
   Oct 27 (Camaron t985u): View Settings — centered range thumbs, Done footer,
   Light Count breathing room. Square edges + accent tint kept.
   ===================================================================== */

/* Panel: flex column — head sticky, rows scroll, Done fixed foot (never covers Audience) */
.sbx-rs-panel:not([hidden]) {
  display: flex !important;
  flex-direction: column !important;
  max-height: min(calc(640px * var(--ui, 1)), calc(100dvh - calc(24px * var(--ui, 1)))) !important;
  overflow: hidden !important;
  padding: 0 !important;
  row-gap: 0 !important;
  gap: 0 !important;
}
.sbx-rs-panel .sbx-rs-head {
  flex: none;
  position: relative;
  z-index: 2;
}
.sbx-rs-panel .sbx-rs-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-auto-rows: max-content;
  row-gap: calc(12px * var(--ui, 1));
  padding: calc(12px * var(--ui, 1)) 0 calc(14px * var(--ui, 1));
  scrollbar-width: thin;
}
.sbx-rs-panel .sbx-rs-done,
.sbx-rs-panel button.sbx-rs-done {
  flex: none !important;
  position: relative !important; /* not sticky-over-content */
  bottom: auto !important;
  z-index: 2;
  margin: 0 !important;
  min-height: calc(44px * var(--ui, 1)) !important;
  width: 100% !important;
  border-radius: 0 !important;
  border: 0 !important;
  border-top: 1px solid rgb(255 255 255 / .14) !important;
  background: #fff !important;
  color: #050505 !important;
  font-weight: 600 !important;
  font-size: calc(13px * var(--ui, 1)) !important;
  box-shadow: 0 -10px 28px -12px rgb(0 0 0 / .75) !important;
  cursor: pointer;
}
.sbx-rs-panel .sbx-rs-reset {
  margin: calc(4px * var(--ui, 1)) calc(14px * var(--ui, 1)) 0 !important;
  justify-self: start;
}

/* Range: tall hit area; thumb vertically centered on 2px track (WebKit needs margin-top) */
.sbx-rs-row input[type="range"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100% !important;
  height: calc(18px * var(--ui, 1)) !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  accent-color: var(--desk-ice, var(--accent, #36f07a));
}
.sbx-rs-row input[type="range"]::-webkit-slider-runnable-track {
  height: 2px !important;
  background: rgb(255 255 255 / .2) !important;
  border-radius: 0 !important;
  border: 0 !important;
}
.sbx-rs-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: calc(14px * var(--ui, 1)) !important;
  height: calc(14px * var(--ui, 1)) !important;
  margin-top: calc(-6px * var(--ui, 1)) !important; /* (14 - 2) / 2 */
  border-radius: 0 !important;
  border: 0 !important;
  background: var(--desk-ice, var(--accent, #36f07a)) !important;
  box-shadow: 0 0 0 2px #050505, 0 0 10px var(--desk-ice-glow, var(--accent-glow, rgb(54 240 122 / .35))) !important;
  cursor: grab;
}
.sbx-rs-row input[type="range"]::-moz-range-track {
  height: 2px !important;
  background: rgb(255 255 255 / .2) !important;
  border-radius: 0 !important;
  border: 0 !important;
}
.sbx-rs-row input[type="range"]::-moz-range-thumb {
  width: calc(14px * var(--ui, 1)) !important;
  height: calc(14px * var(--ui, 1)) !important;
  border-radius: 0 !important;
  border: 0 !important;
  background: var(--desk-ice, var(--accent, #36f07a)) !important;
  box-shadow: 0 0 0 2px #050505 !important;
  cursor: grab;
}
/* Align label + control when range is present */
.sbx-rs-row:has(input[type="range"]) {
  align-items: center !important;
}

/* Light Count (4 segs): less cramped */
.sbx-rs-seg.sbx-rs-seg-4 button,
.sbx-rs-row-wide .sbx-rs-seg button {
  padding: 0 calc(4px * var(--ui, 1)) !important;
  font-size: calc(11px * var(--ui, 1)) !important;
  letter-spacing: 0 !important;
}
.sbx-rs-panel .sbx-rs-row {
  padding-left: calc(14px * var(--ui, 1));
  padding-right: calc(14px * var(--ui, 1));
}

/* Beat oct20 grid + sticky Done when foot layout is present */
.sbx-rs-panel:not([hidden]):has(.sbx-rs-scroll) {
  display: flex !important;
  flex-direction: column !important;
  grid-auto-rows: unset !important;
  row-gap: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
}
.sbx-rs-panel:has(.sbx-rs-scroll) .sbx-rs-done {
  position: relative !important;
  bottom: auto !important;
}


/* oct27 tip: Add to Queue = full-width twin of Render & Download (no orphan half-width) */
#exportPop.ex21 .ex-acts {
  grid-template-columns: 1fr;
}
#exportPop.ex21 .ex-acts #exQueueAdd.btn-ghost {
  width: 100% !important;
  justify-content: center;
}

/* =====================================================================
   t1048u: curated More sheet · larger scrub · grab 8–12 · 4-tab dock
   ===================================================================== */
html.phone .m-tabs { grid-template-columns: repeat(4, 1fr) !important; }
html.phone .m-tabs button[data-tab="looks"] { display: flex !important; }

/* Grab: hard override any leftover 44/52px rules */
html.phone:not(.land) .m-grab,
html.phone .m-grab {
  height: calc(10px * var(--ui, 1)) !important;
  min-height: calc(10px * var(--ui, 1)) !important;
  margin: 0 !important;
  padding: 0 !important;
}
html.phone:not(.land) .m-handle,
html.phone .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 / .42) !important;
  box-shadow: none !important;
}

/* Larger scrub / timeline hit target */
html.phone:not(.land) .dock {
  height: calc(56px * var(--ui, 1)) !important;
}
html.phone:not(.land) .dock .timeline {
  height: calc(36px * var(--ui, 1)) !important;
}
html.phone:not(.land) .dock .timeline::before,
html.phone:not(.land) .dock .timeline .fillbar {
  top: calc(14px * var(--ui, 1)) !important;
  height: calc(8px * var(--ui, 1)) !important;
  border-radius: 0 !important;
}
html.phone:not(.land) .dock .timeline i {
  top: calc(8px * var(--ui, 1)) !important;
  height: calc(20px * var(--ui, 1)) !important;
  width: calc(4px * var(--ui, 1)) !important;
  margin-left: -2px !important;
}

/* Hidden park — never paint the old jumbled tray */
html.phone .mx-dock-park,
html.phone .mx-dock-tray:not(.mx-more-list) {
  position: fixed !important;
  left: calc(-9999px * var(--ui, 1)) !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  display: block !important;
  visibility: hidden !important;
}
html.phone .mx-dock-tray-scrim { display: none !important; }

/* Curated More action sheet */
html.phone .mx-more-sheet {
  z-index: 90 !important;
  max-height: min(72dvh, calc(560px * var(--ui, 1)));
  background: #111214 !important;
  border: 1px solid rgb(255 255 255 / .16) !important;
  border-radius: 0 !important;
  box-shadow: 0 -24px 64px -20px rgb(0 0 0 / .75), 0 0 0 1px rgb(255 255 255 / .04), 0 0 40px -12px rgb(255 255 255 / .08) !important;
}
html.phone .mx-more-sheet .mx-act-head {
  padding: calc(16px * var(--ui, 1)) calc(16px * var(--ui, 1)) calc(12px * var(--ui, 1)) !important;
  border-bottom: 1px solid rgb(255 255 255 / .1);
}
html.phone .mx-more-sheet .mx-act-head h3 {
  margin: calc(4px * var(--ui, 1)) 0 0 !important;
  font-size: 1.35rem !important;
  letter-spacing: -.02em;
}
html.phone .mx-more-sheet .mx-act-head small {
  display: block;
  margin-top: calc(4px * var(--ui, 1));
  color: rgb(255 255 255 / .45);
  font: 400 calc(12px * var(--ui, 1))/1.3 inherit;
}
html.phone .mx-more-list {
  padding: calc(8px * var(--ui, 1)) 0 calc(4px * var(--ui, 1)) !important;
  max-height: min(52dvh, calc(420px * var(--ui, 1)));
  overflow-y: auto;
  overscroll-behavior: contain;
}
html.phone .mx-more-sec {
  margin: calc(12px * var(--ui, 1)) calc(16px * var(--ui, 1)) calc(6px * var(--ui, 1)) !important;
  padding: 0 !important;
  font: 600 calc(10px * var(--ui, 1))/1 var(--font-mono, ui-monospace, monospace) !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  color: rgb(255 255 255 / .42) !important;
}
html.phone .mx-more-sec:first-child { margin-top: calc(4px * var(--ui, 1)) !important; }
html.phone .mx-more-sheet .mx-act-item {
  min-height: calc(48px * var(--ui, 1)) !important;
  height: calc(48px * var(--ui, 1)) !important;
  padding: 0 calc(16px * var(--ui, 1)) !important;
  gap: calc(12px * var(--ui, 1)) !important;
  border-radius: 0 !important;
  border-bottom: 1px solid rgb(255 255 255 / .06) !important;
  font: 600 calc(15px * var(--ui, 1))/1.2 inherit !important;
}
html.phone .mx-more-sheet .mx-act-item svg {
  width: calc(16px * var(--ui, 1)) !important;
  height: calc(16px * var(--ui, 1)) !important;
  opacity: .85;
}
html.phone .mx-more-embed {
  display: grid;
  grid-template-columns: calc(112px * var(--ui, 1)) minmax(0, 1fr);
  align-items: center;
  gap: calc(12px * var(--ui, 1));
  min-height: calc(52px * var(--ui, 1));
  padding: calc(8px * var(--ui, 1)) calc(16px * var(--ui, 1));
  border-bottom: 1px solid rgb(255 255 255 / .06);
}
html.phone .mx-more-k {
  font: 600 calc(13px * var(--ui, 1))/1.2 inherit;
  color: rgb(255 255 255 / .72);
}
html.phone .mx-more-embed .stepper,
html.phone .mx-more-embed .pill-select {
  display: flex !important;
  width: 100% !important;
  min-height: calc(44px * var(--ui, 1)) !important;
  height: calc(44px * var(--ui, 1)) !important;
  margin: 0 !important;
  border: 1px solid rgb(255 255 255 / .2) !important;
  border-radius: 0 !important;
  background: rgb(255 255 255 / .04) !important;
  box-sizing: border-box;
}
html.phone .mx-more-embed .stepper button {
  width: calc(44px * var(--ui, 1)) !important;
  height: calc(44px * var(--ui, 1)) !important;
  display: grid !important;
  place-items: center;
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
}
html.phone .mx-more-embed .stepper input {
  flex: 1;
  min-width: 0;
  height: calc(44px * var(--ui, 1)) !important;
  text-align: center;
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font: 600 calc(15px * var(--ui, 1))/1 var(--font-mono, ui-monospace, monospace) !important;
}
html.phone .mx-more-embed .pill-select .sel-pill,
html.phone .mx-more-embed .pill-select button {
  min-height: calc(44px * var(--ui, 1)) !important;
  height: calc(44px * var(--ui, 1)) !important;
  width: 100% !important;
  border-radius: 0 !important;
  justify-content: space-between !important;
  padding: 0 calc(12px * var(--ui, 1)) !important;
}
html.phone .mx-more-hist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(8px * var(--ui, 1));
  padding: calc(8px * var(--ui, 1)) calc(16px * var(--ui, 1)) calc(12px * var(--ui, 1));
  border-bottom: 1px solid rgb(255 255 255 / .06);
}
html.phone .mx-more-hist .hist {
  display: contents !important;
}
html.phone .mx-more-hist .hist-b {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: calc(8px * var(--ui, 1));
  min-height: calc(48px * var(--ui, 1)) !important;
  height: calc(48px * var(--ui, 1)) !important;
  width: 100% !important;
  margin: 0 !important;
  border: 1px solid rgb(255 255 255 / .2) !important;
  border-radius: 0 !important;
  background: rgb(255 255 255 / .05) !important;
  color: #fff !important;
  box-shadow: none !important;
}
html.phone .mx-more-hist .hist-b svg {
  width: calc(16px * var(--ui, 1)) !important;
  height: calc(16px * var(--ui, 1)) !important;
}
html.phone .mx-more-sheet .mx-act-cancel {
  min-height: calc(48px * var(--ui, 1)) !important;
  margin: calc(8px * var(--ui, 1)) calc(16px * var(--ui, 1)) calc(calc(12px * var(--ui, 1)) + env(safe-area-inset-bottom)) !important;
  border: 1px solid rgb(255 255 255 / .18) !important;
  border-radius: 0 !important;
  background: rgb(255 255 255 / .06) !important;
  font: 600 calc(15px * var(--ui, 1))/1 inherit !important;
}

/* Undo/Redo get readable labels in curated More */
html.phone .mx-more-hist .hist-b[data-hist="undo"]::after { content: "Undo"; font: 600 calc(14px * var(--ui, 1))/1 inherit; }
html.phone .mx-more-hist .hist-b[data-hist="redo"]::after { content: "Redo"; font: 600 calc(14px * var(--ui, 1))/1 inherit; }

/* t1048u lean: inactive sheet panes skip layout/paint until selected */
html.phone .m-sheet .m-pane { content-visibility: hidden; contain-intrinsic-size: auto 240px; }
html.phone .m-sheet[data-pane="layers"] .m-pane[data-pane="layers"],
html.phone .m-sheet[data-pane="controls"] .m-pane[data-pane="controls"],
html.phone .m-sheet[data-pane="export"] .m-pane[data-pane="export"],
html.phone .m-sheet[data-pane="stage"] .m-pane[data-pane="stage"],
html.phone .m-sheet[data-pane="looks"] .m-pane[data-pane="looks"] {
  content-visibility: visible;
  contain: none;
}

/* =====================================================================
   t1055–t1056u: scrub width · More cleanup · orphan peek · compact chrome
   · GEN-green tab · Safari-safe custom gradient
   ===================================================================== */

/* ---- 1) Playback scrub stretches Play → ⋯ (width; height already 36/8) ---- */
html.phone:not(.land) .dock.is-slim,
html.phone:not(.land) .dock {
  display: flex !important;
  align-items: center !important;
  gap: calc(4px * var(--ui, 1)) !important;
  padding: 0 calc(4px * var(--ui, 1)) !important;
  height: calc(44px * var(--ui, 1)) !important; /* tighter chrome; hit stays via ::after */
}
html.phone:not(.land) .dock .play {
  width: calc(36px * var(--ui, 1)) !important;
  height: calc(36px * var(--ui, 1)) !important;
  flex: none !important;
}
html.phone:not(.land) .dock .play svg {
  width: calc(12px * var(--ui, 1)) !important;
  height: calc(12px * var(--ui, 1)) !important;
}
html.phone:not(.land) .dock .scrub,
html.phone .dock .scrub {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 calc(4px * var(--ui, 1)) 0 2px !important;
  gap: calc(6px * var(--ui, 1)) !important;
}
html.phone:not(.land) .dock .scrub .timeline,
html.phone .dock .scrub .timeline {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: calc(48px * var(--ui, 1)) !important;
  height: calc(28px * var(--ui, 1)) !important; /* compact visual; ::after keeps thumb hit */
}
html.phone:not(.land) .dock .timeline::before,
html.phone:not(.land) .dock .timeline .fillbar {
  top: calc(10px * var(--ui, 1)) !important;
  height: calc(6px * var(--ui, 1)) !important;
}
html.phone:not(.land) .dock .timeline i {
  top: calc(6px * var(--ui, 1)) !important;
  height: calc(16px * var(--ui, 1)) !important;
  width: calc(3px * var(--ui, 1)) !important;
  margin-left: -1.5px !important;
}
html.phone:not(.land) .dock .scrub-meta {
  flex: none !important;
  width: auto !important;
  margin: 0 !important;
}
html.phone:not(.land) .dock .scrub-meta .tc {
  font: 500 calc(10px * var(--ui, 1))/1 var(--font-mono, ui-monospace, monospace) !important;
  letter-spacing: .04em !important;
  min-width: 0 !important;
}
html.phone:not(.land) .dock .mx-dock-more {
  width: calc(36px * var(--ui, 1)) !important;
  height: calc(36px * var(--ui, 1)) !important;
  min-width: calc(36px * var(--ui, 1)) !important;
  margin: 0 2px !important;
}

/* ---- 2) No orphan Tap-BPM / Song mid-menu when no tab is active ---- */
html.phone:not(.land) .m-home .m-home-tempo,
html.phone:not(.land) .m-home .m-home-acts {
  display: none !important;
}
html.phone:not(.land) .m-sheet.closed .m-home {
  flex-direction: row !important;
  align-items: center !important;
  height: calc(48px * var(--ui, 1)) !important;
  min-height: 0 !important;
  padding: 0 0 calc(4px * var(--ui, 1)) !important;
  gap: 0 !important;
}
html.phone:not(.land) .m-sheet.closed .m-home .m-home-head {
  order: 2 !important;
  flex: none !important;
  padding: 0 calc(var(--sar) + calc(8px * var(--ui, 1))) 0 calc(4px * var(--ui, 1)) !important;
}
html.phone:not(.land) .m-sheet.closed .m-home .m-home-head .eyebrow {
  display: none !important;
}
html.phone:not(.land) .m-sheet.closed .m-home .m-chips {
  order: 1 !important;
  flex: 1 !important;
  min-width: 0 !important;
}

/* ---- 3) Compact Layer Stack rows + header ---- */
html.phone .m-pane[data-pane="layers"] .panel-head,
html.phone .stack .panel-head {
  min-height: calc(36px * var(--ui, 1)) !important;
  padding: calc(4px * var(--ui, 1)) var(--m-pad-r) calc(4px * var(--ui, 1)) var(--m-pad-l) !important;
  gap: calc(8px * var(--ui, 1)) !important;
}
html.phone .panel-head .eyebrow {
  font-size: calc(11px * var(--ui, 1)) !important;
}
html.phone .panel-head .stack-add,
html.phone .m-pane[data-pane="layers"] .stack-add {
  display: inline-flex;
  align-items: stretch;
  height: calc(32px * var(--ui, 1));
  flex: none;
  box-shadow: none;
}
html.phone .panel-head .stack-count,
html.phone .m-pane[data-pane="layers"] .stack-count {
  display: inline-grid;
  place-items: center;
  min-width: calc(28px * var(--ui, 1));
  height: calc(32px * var(--ui, 1));
  padding: 0 calc(8px * var(--ui, 1));
  font-family: var(--font-mono);
  font-size: calc(11px * var(--ui, 1));
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--desk-ice-ink, #04140a);
  background: color-mix(in oklab, var(--desk-ice, #36f07a) 82%, #04140a);
  border-right: 1px solid rgb(4 20 10 / .22);
}
html.phone .panel-head .add-btn,
html.phone .m-pane[data-pane="layers"] .add-btn,
html.phone .panel-head .stack-add .add-btn {
  height: calc(32px * var(--ui, 1)) !important;
  min-height: calc(32px * var(--ui, 1)) !important;
  padding: 0 calc(10px * var(--ui, 1)) !important;
  font-size: calc(12px * var(--ui, 1)) !important;
  gap: calc(4px * var(--ui, 1)) !important;
  border-radius: 0 !important;
  margin: 0;
  box-shadow: none;
}
html.phone .layer {
  min-height: calc(44px * var(--ui, 1)) !important;
  gap: calc(8px * var(--ui, 1)) !important;
  padding: calc(4px * var(--ui, 1)) calc(var(--sar) + calc(4px * var(--ui, 1))) calc(4px * var(--ui, 1)) 0 !important;
}
html.phone .layer .thumb {
  width: calc(32px * var(--ui, 1)) !important;
  height: calc(32px * var(--ui, 1)) !important;
}
html.phone .layer .nm {
  font-size: calc(13px * var(--ui, 1)) !important;
}
html.phone .layer .nm small {
  font-size: calc(10px * var(--ui, 1)) !important;
  margin-top: 2px !important;
}
html.phone .layer .eye,
html.phone .layer .mx-more {
  width: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
}
html.phone .layer .mx-more svg,
html.phone .layer .eye svg {
  width: calc(12px * var(--ui, 1)) !important;
  height: calc(12px * var(--ui, 1)) !important;
}

/* ---- 4) Smaller bottom dock tabs + premium GEN-green active ---- */
html.phone {
  --m-tabs-h: 48px !important;
}
html.phone:not(.land) .m-tabs {
  height: calc(calc(48px * var(--ui, 1)) + env(safe-area-inset-bottom)) !important;
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left) !important;
}
html.phone .m-tabs button {
  height: calc(48px * var(--ui, 1)) !important;
  min-height: calc(44px * var(--ui, 1)) !important;
  gap: 2px !important;
  font-size: calc(10px * var(--ui, 1)) !important;
  font-weight: 600 !important;
  letter-spacing: .02em !important;
  color: rgb(255 255 255 / .42) !important;
  background: none !important;
  box-shadow: none !important;
}
html.phone .m-tabs button svg {
  width: calc(14px * var(--ui, 1)) !important;
  height: calc(14px * var(--ui, 1)) !important;
  filter: none !important;
}
html.phone .m-tabs button[aria-selected="true"] {
  color: #fff !important;
  background: none !important;
  box-shadow: none !important;
}
html.phone .m-tabs button[aria-selected="true"] svg {
  color: #36f07a !important;
  filter: drop-shadow(0 0 4px rgb(54 240 122 / .55)) !important;
}
/* refined green underline — hard square language, soft glow */
html.phone .m-tabs button[aria-selected="true"]::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  width: calc(24px * var(--ui, 1)) !important;
  height: 2px !important;
  transform: translateX(-50%) !important;
  background: #36f07a !important;
  border-radius: 0 !important;
  box-shadow: 0 0 8px #36f07a, 0 0 2px #36f07a !important;
}
html.phone .m-tabs button[aria-selected="true"]::after {
  content: none !important;
}

/* ---- 5) Safari-safe custom gradient editor ---- */
html.phone .gx-edit.gx-safe {
  display: grid !important;
  grid-template-columns: calc(36px * var(--ui, 1)) minmax(0, 1fr) auto !important;
  gap: calc(8px * var(--ui, 1)) !important;
  align-items: center !important;
  min-height: calc(40px * var(--ui, 1)) !important;
}
html.phone .gx-edit.gx-safe .gx-sw {
  width: calc(36px * var(--ui, 1)) !important;
  height: calc(36px * var(--ui, 1)) !important;
  border: 1px solid rgb(255 255 255 / .28);
  box-shadow: inset 0 0 0 1px #050505;
}
html.phone .gx-edit.gx-safe .gx-hex {
  width: 100%;
  min-width: 0;
  height: calc(36px * var(--ui, 1));
  padding: 0 calc(10px * var(--ui, 1));
  border: 1px solid rgb(255 255 255 / .2);
  border-radius: 0;
  background: rgb(255 255 255 / .04);
  color: #fff;
  font: 600 calc(12px * var(--ui, 1))/1 var(--font-mono, ui-monospace, monospace);
  letter-spacing: .06em;
  text-transform: uppercase;
}
html.phone .gx-edit.gx-safe .gx-tip {
  font: 500 calc(9px * var(--ui, 1))/1.2 var(--font-mono, ui-monospace, monospace);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / .4);
  white-space: nowrap;
}
html.phone .gx-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: calc(6px * var(--ui, 1));
  padding: calc(8px * var(--ui, 1)) 0 calc(4px * var(--ui, 1));
}
html.phone .gx-chip {
  width: calc(28px * var(--ui, 1));
  height: calc(28px * var(--ui, 1));
  padding: 0;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 0;
  box-shadow: inset 0 0 0 1px #050505;
  cursor: pointer;
}
html.phone .gx-chip.on {
  box-shadow: inset 0 0 0 1px #050505, 0 0 0 2px #36f07a, 0 0 10px rgb(54 240 122 / .35);
}
html.phone .gx-hsl {
  display: grid;
  gap: calc(6px * var(--ui, 1));
  padding: calc(4px * var(--ui, 1)) 0 calc(8px * var(--ui, 1));
}
html.phone .gx-hsl-i {
  display: grid;
  grid-template-columns: calc(16px * var(--ui, 1)) minmax(0, 1fr);
  align-items: center;
  gap: calc(8px * var(--ui, 1));
  font: 600 calc(10px * var(--ui, 1))/1 var(--font-mono, ui-monospace, monospace);
  letter-spacing: .08em;
  color: rgb(255 255 255 / .5);
}
html.phone .gx-hsl-i input[type="range"] {
  width: 100%;
  height: calc(28px * var(--ui, 1));
  margin: 0;
  accent-color: #36f07a;
}
html.phone .color-pill-safe {
  gap: calc(8px * var(--ui, 1)) !important;
}
html.phone .color-pill-safe input[type="text"] {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  font: 600 calc(11px * var(--ui, 1))/1 var(--font-mono, ui-monospace, monospace);
  letter-spacing: .08em;
  text-transform: uppercase;
}


/* t1075u: Stage control in top bar beside Preset Browse */
html:not(.phone) .nav .stage-nav {
  display: flex;
  align-items: center;
  flex: none;
  min-width: 0;
  max-width: min(calc(220px * var(--ui, 1)), 28vw);
}
html:not(.phone) .nav .stage-nav .sbx-ss-trig {
  display: inline-flex;
  align-items: center;
  gap: calc(8px * var(--ui, 1));
  min-width: 0;
  max-width: 100%;
  height: calc(38px * var(--ui, 1));
  padding: 0 calc(10px * var(--ui, 1)) 0 calc(12px * var(--ui, 1));
  border: 1px solid var(--line-2);
  background: rgb(255 255 255 / .03);
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  border-radius: 0;
}
html:not(.phone) .nav .stage-nav .sbx-ss-trig:hover,
html:not(.phone) .nav .stage-nav .sbx-ss-trig[aria-expanded="true"] {
  border-color: var(--fg);
}
html:not(.phone) .nav .stage-nav .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);
}
html:not(.phone) .nav .stage-nav .sbx-ss-cur {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: calc(13px * var(--ui, 1));
  font-weight: 600;
}
html:not(.phone) .nav .stage-nav .sbx-ss-trig svg {
  flex: none;
  width: calc(9px * var(--ui, 1));
  height: calc(9px * var(--ui, 1));
  color: var(--mute);
}
html.phone .stage-nav { display: none !important; }
/* under-preview Stage bar hidden when hosted in nav (desk) */
html:not(.phone) .stage > .stage-bar.sbx-nav-hosted { display: none !important; }


/* t1076u: Markers enable + Place gated on song */
.mk-en{
  display:inline-flex;align-items:center;justify-content:center;
  height:calc(32px * var(--ui, 1));padding:0 calc(10px * var(--ui, 1));margin:0;border:1px solid rgb(255 255 255/.22);
  background:rgb(255 255 255/.04);color:rgb(255 255 255/.55);
  font:600 calc(10px * var(--ui, 1))/1 var(--font-mono);letter-spacing:.12em;text-transform:uppercase;
  cursor:pointer;border-radius:0;flex:none;
}
.mk-en.on{color:#fff;border-color:rgb(255 255 255/.5);background:rgb(255 255 255/.1)}
.mk-en:hover{border-color:rgb(255 255 255/.45);color:#fff}
.mk-add.mk-disabled,.mk-add:disabled{opacity:.38;cursor:not-allowed}
html.phone .dock .mk-en{height:calc(36px * var(--ui, 1));padding:0 calc(8px * var(--ui, 1));font-size:calc(9px * var(--ui, 1))}


/* t1080u/t1081u: Playback + Preset Manager — clear hierarchy, play on control row */
html:not(.phone):not(.tablet) .dock {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  align-content: center !important;
  gap: calc(8px * var(--ui, 1)) calc(10px * var(--ui, 1)) !important;
  padding: calc(10px * var(--ui, 1)) calc(12px * var(--ui, 1)) !important;
  min-height: 0 !important;
  height: auto !important;
}
/* Row 1: scrub / timeline full width */
html:not(.phone):not(.tablet) .dock > .scrub {
  order: 1 !important;
  flex: 1 1 100% !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  gap: calc(6px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .dock > .scrub .timeline {
  height: calc(16px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .dock > .scrub .timeline::before,
html:not(.phone):not(.tablet) .dock > .scrub .timeline .fillbar {
  top: calc(6px * var(--ui, 1)) !important;
  height: calc(4px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .dock > .scrub .timeline i {
  top: 2px !important;
  height: calc(12px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .dock > .scrub .scrub-meta {
  gap: calc(12px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .dock > .scrub .scrub-meta .tc {
  font: 500 calc(11px * var(--ui, 1))/1 var(--font-mono) !important;
  letter-spacing: .04em !important;
  min-width: 4.5ch !important;
}
/* Row 2: play flush with BPM / length / quality — same 36px control height */
html:not(.phone):not(.tablet) .dock > .play {
  order: 2 !important;
  width: calc(36px * var(--ui, 1)) !important;
  height: calc(36px * var(--ui, 1)) !important;
  margin: 0 !important;
  align-self: center !important;
  border-radius: 0 !important;
}
html:not(.phone):not(.tablet) .dock > .play svg {
  width: calc(14px * var(--ui, 1)) !important;
  height: calc(14px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .dock > .dsep {
  display: none !important;
}
html:not(.phone):not(.tablet) .dock > .tp-btn,
html:not(.phone):not(.tablet) .dock > .stepper,
html:not(.phone):not(.tablet) .dock > .pill-select.small,
html:not(.phone):not(.tablet) .dock > .chip-tgl,
html:not(.phone):not(.tablet) .dock > .mk-add,
html:not(.phone):not(.tablet) .dock > .mk-en,
html:not(.phone):not(.tablet) .dock > .hist {
  order: 3 !important;
  height: calc(36px * var(--ui, 1)) !important;
  align-self: center !important;
  margin: 0 !important;
}
html:not(.phone):not(.tablet) .dock > .wm-up {
  order: 4 !important;
  margin-left: auto !important;
  align-self: center !important;
}
html:not(.phone):not(.tablet) .dock.dk-wrap {
  padding: calc(10px * var(--ui, 1)) calc(12px * var(--ui, 1)) !important;
  row-gap: calc(8px * var(--ui, 1)) !important;
  column-gap: calc(10px * var(--ui, 1)) !important;
}
/* kill older wrap-order that put play beside scrub */
html:not(.phone):not(.tablet) .dock.dk-wrap > * { order: 3; }
html:not(.phone):not(.tablet) .dock.dk-wrap > .scrub { order: 1 !important; flex: 1 1 100% !important; }
html:not(.phone):not(.tablet) .dock.dk-wrap > .play { order: 2 !important; }
html:not(.phone):not(.tablet) .dock.dk-wrap > .dsep:first-of-type { display: none !important; }

/* LOOK MANAGER under dock — denser hierarchy (t1161u mock: eyebrow + name + meta + Add) */
html:not(.phone):not(.tablet) .sp-bar {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: calc(8px * var(--ui, 1)) !important;
  padding: calc(10px * var(--ui, 1)) calc(12px * var(--ui, 1)) !important;
  border: 1px solid rgb(255 255 255 / .16) !important;
  background: rgb(12 12 14 / .92) !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .05), 0 16px 40px -20px rgb(0 0 0 / .9) !important;
  border-radius: 0 !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-head {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: calc(8px * var(--ui, 1)) calc(10px * var(--ui, 1)) !important;
  min-height: calc(28px * var(--ui, 1)) !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-k {
  flex: none !important;
  font: 800 calc(11px * var(--ui, 1))/1 var(--font-display, var(--font-mono)) !important;
  font-stretch: 125% !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: #fff !important;
  padding-left: calc(17px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-hname {
  min-width: 0 !important;
  height: calc(28px * var(--ui, 1)) !important;
  padding: 0 calc(6px * var(--ui, 1)) !important;
  margin-left: calc(-6px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-hname b {
  font-size: calc(13.5px * var(--ui, 1)) !important;
  font-weight: 650 !important;
  color: #fff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-meta {
  margin-left: auto !important;
  font: 500 calc(10px * var(--ui, 1))/1 var(--font-mono) !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: rgb(255 255 255 / .38) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-acts {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: calc(8px * var(--ui, 1)) !important;
  grid-template-columns: none !important;
}
html:not(.phone):not(.tablet) .sp-bar.sp-single .sp-acts {
  display: flex !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-plus,
html:not(.phone):not(.tablet) .sp-bar .sp-manage {
  height: calc(32px * var(--ui, 1)) !important;
  min-height: calc(32px * var(--ui, 1)) !important;
  padding: 0 calc(12px * var(--ui, 1)) !important;
  font: 600 calc(11px * var(--ui, 1))/1 var(--font-mono) !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  border: 1px solid rgb(255 255 255 / .22) !important;
  background: rgb(255 255 255 / .04) !important;
  justify-content: flex-start !important;
  width: auto !important;
  max-width: none !important;
}
html:not(.phone):not(.tablet) .sp-bar.sp-single .sp-plus {
  flex: none !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-list {
  gap: calc(6px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-fade {
  height: calc(32px * var(--ui, 1)) !important;
}


/* t1083u/t1085u: Full Screen = entire PXL GEN UI (app shell), not preview-only */
html.pxl-app-fs,
html.pxl-app-fs body {
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  background: #060607 !important;
}
html.pxl-app-fs body.pxl-app-fs {
  /* fake iOS / no-API: pin the whole editor over the host page */
}
html.pxl-fs-fake body {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  background: #060607 !important;
}
html.pxl-app-fs .backdrop {
  position: fixed !important;
  inset: 0 !important;
}
html.pxl-app-fs header.nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  margin: 0 !important;
  border-radius: 0 !important;
  z-index: 40 !important;
  padding-left: max(calc(12px * var(--ui, 1)), env(safe-area-inset-left)) !important;
  padding-right: max(calc(12px * var(--ui, 1)), env(safe-area-inset-right)) !important;
  height: calc(var(--nav-h, calc(56px * var(--ui, 1))) + env(safe-area-inset-top)) !important;
  padding-top: env(safe-area-inset-top) !important;
}
html.pxl-app-fs main.app {
  position: fixed !important;
  top: calc(var(--nav-h, calc(56px * var(--ui, 1))) + env(safe-area-inset-top)) !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  border-radius: 0 !important;
  z-index: 20 !important;
  padding-left: env(safe-area-inset-left) !important;
  padding-right: env(safe-area-inset-right) !important;
  padding-bottom: env(safe-area-inset-bottom) !important;
}
/* Nav Full Screen control */
header.nav .fs-btn.nav-fs,
html.pxl-app-fs header.nav .fs-btn.nav-fs {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: calc(8px * var(--ui, 1));
  height: calc(38px * var(--ui, 1));
  padding: 0 calc(12px * var(--ui, 1));
  margin: 0 calc(4px * var(--ui, 1)) 0 0;
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: rgb(255 255 255 / .04);
  color: var(--fg);
  font: 600 calc(12px * var(--ui, 1))/1 var(--font-sans, sans-serif);
  cursor: pointer;
  flex: none;
}
header.nav .fs-btn.nav-fs svg { width: calc(12px * var(--ui, 1)); height: calc(12px * var(--ui, 1)); }
header.nav .fs-btn.nav-fs:hover,
header.nav .fs-btn.nav-fs.is-on {
  border-color: #fff;
  background: rgb(255 255 255 / .1);
}
header.nav .fs-btn.nav-fs span { letter-spacing: .02em; }
html.phone header.nav .fs-btn.nav-fs span { display: none; }
html.phone header.nav .fs-btn.nav-fs { width: calc(38px * var(--ui, 1)); padding: 0; }
/* Preview twin stays icon-only; same action as nav */
.canvas-wrap .fs-btn-view span { display: none !important; }


/* t1086u/t1087u: Stage 3D top-right cluster — gear + fullscreen on one row; drift under gear */
html:not(.phone) .canvas-wrap.stage-on .fs-btn.fs-btn-view,
html:not(.phone) .canvas-wrap:not(.fs-on) .fs-btn.fs-btn-view {
  top: calc(12px * var(--ui, 1)) !important;
  right: calc(12px * var(--ui, 1)) !important;
  bottom: auto !important;
  left: auto !important;
  width: calc(28px * var(--ui, 1)) !important;
  height: calc(28px * var(--ui, 1)) !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  z-index: 7 !important;
}
html:not(.phone) .sbx-vo-gear {
  top: calc(12px * var(--ui, 1)) !important;
  right: calc(44px * var(--ui, 1)) !important; /* 12 + 28 + 4 gap */
  width: 28px !important;
  height: calc(28px * var(--ui, 1)) !important;
  z-index: 7 !important;
}
html:not(.phone) .sbx-vo-drift {
  top: calc(44px * var(--ui, 1)) !important; /* 12 + 28 + 4 gap — flush under gear */
  right: 44px !important; /* same left edge as gear */
  width: 28px !important;
  height: calc(28px * var(--ui, 1)) !important;
  z-index: 7 !important;
}
html.phone .canvas-wrap .fs-btn.fs-btn-view {
  top: calc(8px * var(--ui, 1)) !important;
  right: calc(8px * var(--ui, 1)) !important;
  bottom: auto !important;
  width: calc(32px * var(--ui, 1)) !important;
  height: calc(32px * var(--ui, 1)) !important;
  padding: 0 !important;
  z-index: 7 !important;
}
html.phone .sbx-vo-gear {
  top: calc(8px * var(--ui, 1)) !important;
  right: calc(44px * var(--ui, 1)) !important;
  width: calc(32px * var(--ui, 1)) !important;
  height: calc(32px * var(--ui, 1)) !important;
}
html.phone .sbx-vo-drift {
  top: calc(44px * var(--ui, 1)) !important;
  right: calc(44px * var(--ui, 1)) !important;
  width: calc(32px * var(--ui, 1)) !important;
  height: calc(32px * var(--ui, 1)) !important;
}
/* kill conflicting oct20/stage absolute tops that staggered the cluster */
html:not(.phone) .canvas-wrap.stage-on .sbx-vo-gear,
html:not(.phone) .canvas-wrap.stage-on .sbx-vo-drift {
  /* keep above HUD strip — 12px is clear of Stage 3D label */
}


/* t1092u/t1093u: Custom Gradient — clear bar, solid hit targets, Save, no tip-over-hex */
.gx-acts.four { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: calc(6px * var(--ui, 1)) !important; }
.gx-acts .gx-btn { min-height: calc(36px * var(--ui, 1)) !important; height: calc(36px * var(--ui, 1)) !important; font-size: calc(11.5px * var(--ui, 1)) !important; }
.gx {
  display: grid !important;
  gap: calc(10px * var(--ui, 1)) !important;
  padding: calc(10px * var(--ui, 1)) !important;
  border: 1px solid rgb(255 255 255 / .16) !important;
  background: rgb(8 8 10 / .6) !important;
}
.gx-head { margin: 0 !important; }
.gx-bar {
  position: relative !important;
  height: calc(40px * var(--ui, 1)) !important;
  margin: calc(4px * var(--ui, 1)) 0 2px !important;
  cursor: copy !important;
  border: 1px solid rgb(255 255 255 / .28) !important;
  touch-action: none !important;
  user-select: none !important;
}
.gx-stop {
  position: absolute !important;
  top: 50% !important;
  width: calc(16px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  border: 2px solid #fff !important;
  border-radius: 0 !important;
  box-shadow: 0 0 0 1px #050505, 0 2px 8px rgb(0 0 0 / .5) !important;
  padding: 0 !important;
  cursor: grab !important;
  touch-action: none !important;
  z-index: 2 !important;
}
.gx-stop::before {
  content: "" !important;
  position: absolute !important;
  left: calc(-10px * var(--ui, 1)) !important;
  right: calc(-10px * var(--ui, 1)) !important;
  top: calc(-8px * var(--ui, 1)) !important;
  bottom: calc(-8px * var(--ui, 1)) !important;
}
.gx-stop.on {
  z-index: 3 !important;
  box-shadow: 0 0 0 1px #050505, 0 0 0 3px var(--desk-ice, #36f07a), 0 2px 12px rgb(0 0 0 / .55) !important;
}
.gx-stop.off { opacity: .35 !important; }
.gx-edit {
  display: grid !important;
  grid-template-columns: calc(40px * var(--ui, 1)) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: calc(10px * var(--ui, 1)) !important;
  min-height: calc(40px * var(--ui, 1)) !important;
}
.gx-sw { width: calc(40px * var(--ui, 1)) !important; height: calc(40px * var(--ui, 1)) !important; }
.gx-hex {
  font: 600 calc(14px * var(--ui, 1))/1.2 var(--font-mono) !important;
  letter-spacing: .04em !important;
  color: #fff !important;
  min-width: 0 !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  width: 100% !important;
}
.gx-tip {
  grid-column: 1 / -1 !important;
  margin: 0 !important;
  padding: 0 !important;
  font: 500 calc(10.5px * var(--ui, 1))/1.35 var(--font-mono) !important;
  letter-spacing: .04em !important;
  color: rgb(255 255 255 / .4) !important;
  text-align: left !important;
}
.gx-swatches { display: flex !important; flex-wrap: wrap !important; gap: calc(6px * var(--ui, 1)) !important; }
.gx-chip { width: calc(28px * var(--ui, 1)) !important; height: calc(28px * var(--ui, 1)) !important; border: 1px solid rgb(255 255 255 / .25) !important; padding: 0 !important; cursor: pointer !important; }
.gx-chip.on { box-shadow: 0 0 0 2px var(--desk-ice, #36f07a) !important; }
.gx-hsl { display: grid !important; gap: calc(6px * var(--ui, 1)) !important; }
.gx-hsl-i { display: grid !important; grid-template-columns: 1.2rem 1fr !important; align-items: center !important; gap: calc(8px * var(--ui, 1)) !important; font: 500 calc(10px * var(--ui, 1))/1 var(--font-mono) !important; color: rgb(255 255 255 / .5) !important; }
.pal-saved {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(calc(72px * var(--ui, 1)), 1fr)) !important;
  gap: calc(6px * var(--ui, 1)) !important;
  margin-top: calc(8px * var(--ui, 1)) !important;
}
.pal-saved .pal-sv {
  position: relative !important;
  height: calc(36px * var(--ui, 1)) !important;
  border: 1px solid rgb(255 255 255 / .18) !important;
  padding: 0 !important;
  cursor: pointer !important;
  overflow: hidden !important;
}
.pal-saved .pal-sv.on { border-color: var(--desk-ice, #36f07a) !important; box-shadow: 0 0 0 1px var(--desk-ice, #36f07a) !important; }
.pal-saved .pal-sv span {
  position: absolute !important; left: calc(6px * var(--ui, 1)) !important; bottom: calc(4px * var(--ui, 1)) !important;
  font: 600 calc(9px * var(--ui, 1))/1 var(--font-mono) !important; letter-spacing: .06em !important;
  text-transform: uppercase !important; color: #fff !important;
  text-shadow: 0 1px 2px #000 !important;
}
.pal-saved-h {
  margin: calc(10px * var(--ui, 1)) 0 calc(4px * var(--ui, 1)) !important;
  font: 500 calc(10px * var(--ui, 1))/1 var(--font-mono) !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  color: rgb(255 255 255 / .42) !important;
}


/* t1089u + t1156u: Preset Browse primary above Layer Stack (desktop); phone host hidden */
header.nav #presetSel { display: none !important; }
header.nav #shuffleAll[hidden] { display: none !important; }
header.nav .hist { order: 0; }
.preset-dock-host {
  display: flex;
  align-items: center;
  gap: calc(8px * var(--ui, 1));
  padding: 0 0 calc(8px * var(--ui, 1));
  margin: 0 0 calc(4px * var(--ui, 1));
  border-bottom: 1px solid rgb(255 255 255 / .1);
  min-width: 0;
}
.preset-dock-host .pill-select,
.preset-dock-host .sel-pill {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  height: calc(36px * var(--ui, 1));
}
.sp-bar > .preset-dock-host { grid-column: 1 / -1; }
html.phone .preset-dock-host { display: none !important; }
/* Ensure Stage + FS sit in nav after hist */
header.nav .stage-nav { flex: none; }
header.nav .fs-btn.nav-fs { flex: none; }


/* t1154u + t1126u: phone Looks/Effects — slim joined tabs, not chunky cream blocks */
html.phone .add-menu .am-tabs {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  border: 1px solid rgb(255 255 255 / .12);
  background: rgb(0 0 0 / .35);
}
html.phone .add-menu .am-tabs.seg button,
html.phone .add-menu .am-tabs button,
html.phone .add-menu .am-tabs .am-tab {
  flex: 1;
  min-height: 0 !important;
  height: calc(28px * var(--ui, 1)) !important;
  padding: 0 calc(8px * var(--ui, 1)) !important;
  font-size: calc(11px * var(--ui, 1)) !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  gap: calc(5px * var(--ui, 1)) !important;
  border-radius: 0 !important;
  border: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  color: rgb(255 255 255 / .48) !important;
  box-shadow: none !important;
}
html.phone .add-menu .am-tabs .am-tab + .am-tab,
html.phone .add-menu .am-tabs button + button {
  border-left: 1px solid rgb(255 255 255 / .1) !important;
}
html.phone .add-menu .am-tabs .am-tab.on,
html.phone .add-menu .am-tabs button.on {
  color: var(--desk-ice-ink, #04140a) !important;
  background: var(--desk-ice, #36f07a) !important;
  font-weight: 700 !important;
  box-shadow: 0 0 12px -4px var(--desk-ice-glow, rgb(54 240 122 / .32)) !important;
}
html.phone .add-menu .am-tabs .am-tab-ico {
  width: calc(10px * var(--ui, 1)) !important;
  height: calc(10px * var(--ui, 1)) !important;
  flex: none;
  opacity: 0.95;
}
html.phone .add-menu .am-tabs .am-tab-ico svg {
  width: calc(10px * var(--ui, 1)) !important;
  height: calc(10px * var(--ui, 1)) !important;
  color: currentColor;
}
html.phone .add-menu .am-tabs .am-tab-lab {
  line-height: 1 !important;
  display: inline-block;
}
/* scale the rest of the Add Layer sheet chrome slightly so tabs aren't the odd one out */
html.phone .add-menu .am-top {
  gap: calc(6px * var(--ui, 1));
  padding: calc(8px * var(--ui, 1)) calc(4px * var(--ui, 1)) calc(6px * var(--ui, 1));
}
html.phone .add-menu .am-search {
  height: calc(34px * var(--ui, 1)) !important;
  padding: 0 calc(8px * var(--ui, 1)) !important;
}
html.phone .add-menu .am-search input {
  font-size: calc(13px * var(--ui, 1)) !important;
}
html.phone .add-menu .am-tile {
  min-height: 0 !important;
  padding: calc(6px * var(--ui, 1)) calc(6px * var(--ui, 1)) calc(8px * var(--ui, 1)) !important;
  gap: calc(6px * var(--ui, 1)) !important;
  font-size: calc(12.5px * var(--ui, 1)) !important;
  border-radius: 0 !important;
}
html.phone .add-menu .am-nm {
  font-size: calc(12px * var(--ui, 1)) !important;
  line-height: 1.2 !important;
}
html.phone .add-menu .am-desc {
  font-size: calc(10.5px * var(--ui, 1)) !important;
  line-height: 1.3 !important;
}
html.phone .add-menu h6 {
  font-size: calc(10.5px * var(--ui, 1)) !important;
  margin: calc(10px * var(--ui, 1)) 2px calc(6px * var(--ui, 1)) !important;
  letter-spacing: 0.12em !important;
}

/* t1154u: Looks / Effects tabs — slim dark chrome, green active, distinct icons */
.am-tabs {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  padding: 0;
  border: 1px solid rgb(255 255 255 / .12);
  background: rgb(0 0 0 / .35);
}
.am-tabs .am-tab,
.am-tabs button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(6px * var(--ui, 1));
  height: calc(28px * var(--ui, 1));
  min-height: calc(28px * var(--ui, 1));
  padding: 0 calc(10px * var(--ui, 1));
  margin: 0;
  border: 0;
  border-radius: 0 !important;
  background: transparent;
  color: rgb(255 255 255 / .48);
  font-size: calc(11px * var(--ui, 1));
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.am-tabs .am-tab + .am-tab,
.am-tabs button + button {
  border-left: 1px solid rgb(255 255 255 / .1);
}
.am-tabs .am-tab:hover,
.am-tabs button:hover {
  color: rgb(255 255 255 / .82);
  background: rgb(255 255 255 / .04);
}
.am-tabs .am-tab.on,
.am-tabs button.on {
  color: var(--desk-ice-ink, #04140a);
  background: var(--desk-ice, #36f07a);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--desk-ice, #36f07a) 60%, transparent),
              0 0 14px -4px var(--desk-ice-glow, rgb(54 240 122 / .32));
  font-weight: 700;
}
.am-tabs .am-tab-ico {
  display: inline-flex;
  width: calc(11px * var(--ui, 1));
  height: calc(11px * var(--ui, 1));
  flex: none;
  opacity: .9;
}
.am-tabs .am-tab-ico svg {
  width: calc(11px * var(--ui, 1)) !important;
  height: calc(11px * var(--ui, 1)) !important;
  color: currentColor;
}
.am-tabs .am-tab.on .am-tab-ico svg {
  color: var(--desk-ice-ink, #04140a);
}
.am-tabs .am-tab-lab {
  line-height: 1;
  display: inline-block;
}
/* keep seasonal still badges on tiles if present */
.am-still .am-xmas-badge { position: absolute; right: calc(4px * var(--ui, 1)); top: calc(4px * var(--ui, 1)); left: auto; width: calc(11px * var(--ui, 1)); height: calc(11px * var(--ui, 1)); display: grid; place-items: center; z-index: 2; pointer-events: none; filter: drop-shadow(0 0 2px #000); }
.am-still .am-xmas-badge svg { position: static !important; width: calc(11px * var(--ui, 1)) !important; height: calc(11px * var(--ui, 1)) !important; color: #e8c050 !important; filter: none; }


/* =====================================================================
   t1124–t1127u tip (Oct 28): mobile chrome density + overlay parity
   Desktop ≥sm / not(.phone) untouched. Phone taps stay ~40–44px.
   ===================================================================== */

/* --- hide orphan mid-layer chips when no bottom tab is selected (peek/closed) --- */
html.phone:not(.land) .m-sheet.closed:not(.dragging) .m-home {
  display: none !important;
}
html.phone:not(.land).m-home-on .m-home {
  display: none !important;
}
/* peek strip = grab only (no chip orphan between dock and tabs) */
html.phone:not(.land) .m-sheet.closed .m-grab {
  height: calc(18px * var(--ui, 1));
}
html.phone:not(.land) .m-sheet.closed {
  /* keep a slim handle so the sheet can still be dragged up */
}

/* --- 2D/3D = same size as Render Settings gear + preview Full Screen --- */
html.phone .pv-seg.vtog-ico,
html.phone .canvas-wrap .fs-btn.fs-btn-view,
html.phone .sbx-vo-gear {
  width: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
  min-width: calc(40px * var(--ui, 1)) !important;
  min-height: calc(40px * var(--ui, 1)) !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
}
html.phone .pv-seg.vtog-ico { left: calc(8px * var(--ui, 1)) !important; bottom: calc(8px * var(--ui, 1)) !important; }
html.phone .canvas-wrap .fs-btn.fs-btn-view {
  top: calc(8px * var(--ui, 1)) !important;
  right: calc(8px * var(--ui, 1)) !important;
  bottom: auto !important;
}
html.phone .sbx-vo-gear {
  top: calc(8px * var(--ui, 1)) !important;
  right: calc(52px * var(--ui, 1)) !important; /* 8 + 40 + 4 */
}
html.phone .sbx-vo-drift {
  top: calc(52px * var(--ui, 1)) !important; /* 8 + 40 + 4 */
  right: 52px !important;
  width: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
}
html.phone .pv-seg.vtog-ico svg,
html.phone .canvas-wrap .fs-btn.fs-btn-view svg,
html.phone .sbx-vo-gear svg { width: calc(14px * var(--ui, 1)) !important; height: calc(14px * var(--ui, 1)) !important; }

/* --- top PXL GEN menu bar: denser, cleaner --- */
html.phone .nav {
  height: calc(calc(44px * var(--ui, 1)) + var(--sat)) !important;
  gap: calc(4px * var(--ui, 1)) !important;
  padding-top: var(--sat) !important;
  padding-left: calc(var(--sal) + calc(6px * var(--ui, 1))) !important;
  padding-right: calc(var(--sar) + calc(6px * var(--ui, 1))) !important;
}
html.phone .nav .brand { gap: calc(6px * var(--ui, 1)) !important; }
html.phone .nav .brand .word { font-size: calc(13px * var(--ui, 1)) !important; letter-spacing: 0.04em; }
html.phone .mx-site,
html.phone .mx-shuffle {
  width: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
}
html.phone header.nav .fs-btn.nav-fs {
  width: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
  margin: 0 2px 0 0 !important;
}
html.phone .nav .hist-b {
  width: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
}
html.phone .m-menu-btn {
  height: calc(40px * var(--ui, 1)) !important;
  min-height: calc(40px * var(--ui, 1)) !important;
  padding: 0 calc(10px * var(--ui, 1)) !important;
  font-size: calc(12.5px * var(--ui, 1)) !important;
  gap: calc(6px * var(--ui, 1)) !important;
  background: rgb(255 255 255 / .06) !important;
}
html.phone .nav .nav-export,
html.phone .nav #exportBtn {
  height: calc(40px * var(--ui, 1)) !important;
  min-height: calc(40px * var(--ui, 1)) !important;
  padding: 0 calc(10px * var(--ui, 1)) !important;
  font-size: calc(12px * var(--ui, 1)) !important;
}

/* --- global phone chrome: playback dock + tabs + sheets (scale down, keep taps) --- */
html.phone:not(.land) .dock {
  height: calc(48px * var(--ui, 1)) !important;
  padding: 0 2px !important;
  gap: 0 !important;
}
html.phone:not(.land) .dock .play {
  width: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
}
html.phone:not(.land) .dock .timeline { height: calc(32px * var(--ui, 1)) !important; }
html.phone:not(.land) .dock .timeline::before,
html.phone:not(.land) .dock .timeline .fillbar { top: calc(12px * var(--ui, 1)) !important; height: calc(6px * var(--ui, 1)) !important; }
html.phone:not(.land) .dock .timeline i { top: calc(6px * var(--ui, 1)) !important; height: calc(18px * var(--ui, 1)) !important; }
html.phone .dock .chip-tgl,
html.phone .dock .tp-btn,
html.phone .dock .mx-song {
  width: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
}
html.phone { --m-tabs-h: 52px; }
html.phone .m-tabs {
  height: calc(var(--m-tabs-h) + var(--sab)) !important;
  padding-bottom: var(--sab) !important;
}
html.phone .m-tabs button {
  min-height: calc(44px * var(--ui, 1)) !important;
  height: calc(44px * var(--ui, 1)) !important;
  font-size: calc(10.5px * var(--ui, 1)) !important;
  gap: calc(3px * var(--ui, 1)) !important;
}
html.phone .m-tabs button svg { width: calc(15px * var(--ui, 1)) !important; height: calc(15px * var(--ui, 1)) !important; }
html.phone .m-sheet .display,
html.phone .m-pane-head h3,
html.phone .m-modal-head h3 {
  font-size: calc(18px * var(--ui, 1)) !important;
  letter-spacing: -0.01em !important;
}
html.phone .m-pane-head .eyebrow,
html.phone .m-modal-head .eyebrow,
html.phone .m-pg-head .eyebrow {
  font-size: calc(10px * var(--ui, 1)) !important;
  letter-spacing: 0.12em !important;
}

/* --- Preset Manager glass: smaller UI --- */
html.phone .m-presets-glass .m-pg-head {
  padding: calc(12px * var(--ui, 1)) calc(14px * var(--ui, 1)) calc(10px * var(--ui, 1)) !important;
  gap: calc(10px * var(--ui, 1)) !important;
}
html.phone .m-presets-glass .m-pg-head .display {
  font-size: 1.25rem !important;
}
html.phone .m-presets-glass .m-pg-body {
  padding: calc(10px * var(--ui, 1)) calc(12px * var(--ui, 1)) calc(calc(14px * var(--ui, 1)) + env(safe-area-inset-bottom)) !important;
}
html.phone .m-presets-glass .m-x,
html.phone .m-presets-glass .icon.ring {
  width: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
  min-width: calc(40px * var(--ui, 1)) !important;
  min-height: calc(40px * var(--ui, 1)) !important;
}
html.phone .m-presets-glass .mp-save-btn,
html.phone .m-presets-glass .mp-name,
html.phone .m-presets-glass .mp-rename input {
  height: calc(40px * var(--ui, 1)) !important;
  min-height: calc(40px * var(--ui, 1)) !important;
  font-size: calc(14px * var(--ui, 1)) !important;
}
html.phone .m-presets-glass .mp-row {
  min-height: calc(48px * var(--ui, 1)) !important;
}
html.phone .m-presets-glass .mp-item {
  padding: calc(6px * var(--ui, 1)) calc(10px * var(--ui, 1)) !important;
  gap: calc(8px * var(--ui, 1)) !important;
}
html.phone .m-presets-glass .mp-item b { font-size: calc(13.5px * var(--ui, 1)) !important; }
html.phone .m-presets-glass .mp-act {
  width: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
  min-width: calc(40px * var(--ui, 1)) !important;
}
html.phone .m-presets-glass .m-look .seg button {
  height: calc(36px * var(--ui, 1)) !important;
  font-size: calc(12px * var(--ui, 1)) !important;
}
html.phone .m-presets-glass .m-field { margin-top: calc(14px * var(--ui, 1)) !important; }
html.phone .m-presets-glass .m-field > .eyebrow { margin-bottom: calc(6px * var(--ui, 1)) !important; font-size: calc(10px * var(--ui, 1)) !important; }
/* grab affordance for swipe-down */
html.phone .m-presets-glass .m-pg-head::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(6px * var(--ui, 1));
  width: calc(36px * var(--ui, 1));
  height: calc(4px * var(--ui, 1));
  transform: translateX(-50%);
  background: rgb(255 255 255 / .28);
  border-radius: 0;
  pointer-events: none;
}
html.phone .m-presets-glass .m-pg-head { position: relative; padding-top: calc(16px * var(--ui, 1)) !important; }

/* --- Export Loop mobile scale-down --- */
html.phone .m-pane #exportPop {
  padding: 2px calc(14px * var(--ui, 1)) calc(18px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .pop-head,
html.phone .m-pane #exportPop .ex-head {
  margin-bottom: calc(8px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .doc,
html.phone .m-pane #exportPop .ex-meta,
html.phone .m-pane #exportPop .spec {
  font-size: calc(11.5px * var(--ui, 1)) !important;
  line-height: 1.35 !important;
  gap: 2px !important;
}
html.phone .m-pane #exportPop .row {
  margin-top: calc(12px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .row > label,
html.phone .m-pane #exportPop .eyebrow {
  font-size: calc(10.5px * var(--ui, 1)) !important;
  margin-bottom: calc(6px * var(--ui, 1)) !important;
  letter-spacing: 0.1em !important;
}
html.phone .m-pane #exportPop input,
html.phone .m-pane #exportPop .stepper,
html.phone .m-pane #exportPop .pill-select,
html.phone .m-pane #exportPop .seg button {
  height: calc(40px * var(--ui, 1)) !important;
  min-height: calc(40px * var(--ui, 1)) !important;
  font-size: calc(13px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .seg { gap: calc(4px * var(--ui, 1)) !important; }
html.phone .m-pane #exportPop .seg button { font-size: calc(12px * var(--ui, 1)) !important; padding: 0 calc(6px * var(--ui, 1)) !important; }
html.phone .m-pane #exportPop .stepper button { width: calc(40px * var(--ui, 1)) !important; height: calc(40px * var(--ui, 1)) !important; }
html.phone .m-pane #exportPop.ex21 .ex-acts .btn {
  min-height: calc(44px * var(--ui, 1)) !important;
  height: calc(44px * var(--ui, 1)) !important;
  font-size: calc(13.5px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .exq-i {
  min-height: calc(44px * var(--ui, 1)) !important;
  padding: calc(4px * var(--ui, 1)) calc(6px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .exq-i .exq-name { font-size: calc(12px * var(--ui, 1)) !important; }

/* --- Add Layer sheet already scaled in t1126u; tighten modal head --- */
html.phone .m-modal-head { padding: 0 calc(12px * var(--ui, 1)) calc(10px * var(--ui, 1)) calc(16px * var(--ui, 1)) !important; }
html.phone .m-modal .m-x { width: calc(40px * var(--ui, 1)) !important; height: calc(40px * var(--ui, 1)) !important; }
html.phone .m-add #addMenu { padding: 0 calc(12px * var(--ui, 1)) calc(14px * var(--ui, 1)) !important; }


/* =====================================================================
   t1127–t1134u mobile/desk tip: density, ⋯ menus, side Playback, Export DDs,
   gradient stops, hist tips, Stage flat list, app-FS vs preview-FS
   ===================================================================== */

/* --- 1) Preset row ⋯ dropdown --- */
.mp-more-wrap { position: relative; flex: none; display: flex; align-items: stretch; }
.mp-act.mp-more { width: calc(40px * var(--ui, 1)); min-width: calc(40px * var(--ui, 1)); }
.mp-dd {
  position: absolute; right: 0; top: calc(100% + calc(4px * var(--ui, 1))); z-index: 40;
  min-width: calc(180px * var(--ui, 1)); padding: calc(4px * var(--ui, 1)) 0;
  background: #111214; border: 1px solid rgb(255 255 255 / .18);
  box-shadow: 0 16px 40px -16px rgb(0 0 0 / .7);
}
.mp-dd[hidden] { display: none !important; }
.mp-dd-i {
  display: flex; align-items: center; width: 100%; min-height: calc(40px * var(--ui, 1));
  padding: 0 calc(14px * var(--ui, 1)); border: 0; background: none; color: #fff;
  font: 600 calc(13px * var(--ui, 1))/1.2 var(--font-sans, sans-serif); text-align: left; cursor: pointer;
}
.mp-dd-i:hover, .mp-dd-i:focus-visible { background: rgb(255 255 255 / .08); outline: none; }
.mp-dd-i.danger { color: #ff6b61; }
html.phone .mp-row > .mp-act:not(.mp-more) { display: none !important; } /* only ⋯ on the row */

/* --- 2) New + Save compact row --- */
html.phone .mp-save.mp-save-with-new,
html.phone .m-mine .mp-save {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: calc(6px * var(--ui, 1)) !important; align-items: stretch !important;
  margin: 0 0 calc(10px * var(--ui, 1)) !important;
}
html.phone .mp-save .mx-new-preset {
  height: calc(36px * var(--ui, 1)) !important; min-height: calc(36px * var(--ui, 1)) !important;
  padding: 0 calc(10px * var(--ui, 1)) !important; font-size: calc(12.5px * var(--ui, 1)) !important; gap: calc(6px * var(--ui, 1)) !important;
  width: auto !important; margin: 0 !important;
}
html.phone .mp-save .mx-new-preset svg { width: calc(11px * var(--ui, 1)) !important; height: calc(11px * var(--ui, 1)) !important; }
html.phone .mp-save .mp-name { height: calc(36px * var(--ui, 1)) !important; min-height: calc(36px * var(--ui, 1)) !important; font-size: calc(13px * var(--ui, 1)) !important; }
html.phone .mp-save .mp-save-btn { height: calc(36px * var(--ui, 1)) !important; min-height: calc(36px * var(--ui, 1)) !important; padding: 0 calc(10px * var(--ui, 1)) !important; font-size: calc(12.5px * var(--ui, 1)) !important; }
html.phone .m-look-acts-top { display: none !important; } /* New moved into Save row */

/* --- 3) Controls denser (phone) — fix (s) wrap, tighter rows --- */
html.phone .ctl:has(>.sl) {
  grid-template-columns: minmax(0, 30%) minmax(0, 1fr) auto auto auto !important;
  min-height: calc(36px * var(--ui, 1)) !important; margin-top: 0 !important;
  padding-top: calc(4px * var(--ui, 1)) !important; padding-bottom: calc(4px * var(--ui, 1)) !important;
}
html.phone .ctl:has(>.sl) .lb {
  font-size: calc(12px * var(--ui, 1)) !important; line-height: 1.15 !important;
  white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
  padding-right: calc(6px * var(--ui, 1)) !important;
}
html.phone .ctl:has(>.sl)>.sl { height: calc(36px * var(--ui, 1)) !important; }
/* t1192u: center rail + knob on the 36px row (densify had kn@10 with rail still @21 → thumbs floated above tracks) */
html.phone .ctl:has(>.sl) .sl .rail,
html.phone .ctl:has(>.sl) .sl .fl { top: calc(16px * var(--ui, 1)) !important; height: calc(4px * var(--ui, 1)) !important; }
html.phone .ctl:has(>.sl) .sl .z { top: calc(12px * var(--ui, 1)) !important; height: calc(12px * var(--ui, 1)) !important; }
html.phone .ctl:has(>.sl) .sl .kn,
html.phone .sl .kn {
  top: calc(11px * var(--ui, 1)) !important; width: calc(14px * var(--ui, 1)) !important; height: calc(14px * var(--ui, 1)) !important; margin-left: calc(-7px * var(--ui, 1)) !important;
  border-radius: 0 !important;
}
html.phone .ctl:has(>.sl) .vt {
  min-width: calc(44px * var(--ui, 1)) !important; height: calc(26px * var(--ui, 1)) !important; font-size: calc(11.5px * var(--ui, 1)) !important; padding: 0 calc(5px * var(--ui, 1)) !important;
}
html.phone .ctl:has(>.sl) .mini { width: calc(28px * var(--ui, 1)) !important; height: calc(36px * var(--ui, 1)) !important; }
html.phone .insp-head .acts .icon:not(.insp-more) { display: none !important; } /* desk keeps them; phone uses ⋯ */
html.phone .insp-head .acts .insp-more { display: grid !important; width: calc(40px * var(--ui, 1)) !important; height: calc(40px * var(--ui, 1)) !important; place-items: center; }
.insp-dd {
  position: absolute; right: calc(8px * var(--ui, 1)); top: 100%; z-index: 30;
  min-width: calc(160px * var(--ui, 1)); padding: calc(4px * var(--ui, 1)) 0; background: #111214;
  border: 1px solid rgb(255 255 255 / .18);
}
.insp-dd[hidden] { display: none !important; }
.insp-dd-i {
  display: block; width: 100%; min-height: calc(40px * var(--ui, 1)); padding: 0 calc(12px * var(--ui, 1));
  border: 0; background: none; color: #fff; text-align: left;
  font: 600 calc(13px * var(--ui, 1))/1 var(--font-sans, sans-serif); cursor: pointer;
}
.insp-dd-i:active { background: rgb(255 255 255 / .08); }
html.phone .insp-head { position: relative; overflow: visible !important; }

/* --- 4/14) Export denser + compact dropdowns --- */
#exportPop .ex-seg-legacy { display: none !important; }
#exportPop .ex-dd-grid {
  display: grid; grid-template-columns: 1fr; gap: calc(8px * var(--ui, 1));
  margin: calc(10px * var(--ui, 1)) calc(16px * var(--ui, 1)) calc(4px * var(--ui, 1));
}
#exportPop .ex-dd {
  display: grid; grid-template-columns: calc(88px * var(--ui, 1)) minmax(0, 1fr);
  align-items: center; gap: calc(8px * var(--ui, 1)); margin: 0;
}
#exportPop .ex-dd-k {
  font: 600 calc(10.5px * var(--ui, 1))/1 var(--font-mono, ui-monospace, monospace);
  letter-spacing: .12em; text-transform: uppercase; color: rgb(255 255 255 / .5);
}
#exportPop .ex-dd-sel {
  height: calc(36px * var(--ui, 1)); min-height: calc(36px * var(--ui, 1)); width: 100%;
  padding: 0 calc(28px * var(--ui, 1)) 0 calc(10px * var(--ui, 1)); border: 1px solid rgb(255 255 255 / .22);
  border-radius: 0; background: #0b0c0d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23fff' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: #fff; font: 600 calc(13px * var(--ui, 1))/1 var(--font-sans, sans-serif);
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
html.phone #exportPop .ex-dd-grid { margin: calc(8px * var(--ui, 1)) calc(14px * var(--ui, 1)) 2px; gap: calc(6px * var(--ui, 1)); }
html.phone #exportPop .ex-dd { grid-template-columns: calc(78px * var(--ui, 1)) minmax(0, 1fr); }
html.phone #exportPop .ex-dd-sel { height: calc(36px * var(--ui, 1)) !important; min-height: calc(36px * var(--ui, 1)) !important; font-size: calc(12.5px * var(--ui, 1)) !important; }
html.phone .m-pane #exportPop .ex-acts .btn { min-height: calc(40px * var(--ui, 1)) !important; height: calc(40px * var(--ui, 1)) !important; font-size: calc(13px * var(--ui, 1)) !important; }
html.phone .m-pane #exportPop .ex-file { margin: calc(6px * var(--ui, 1)) calc(14px * var(--ui, 1)) !important; padding: calc(8px * var(--ui, 1)) calc(10px * var(--ui, 1)) !important; }
html.phone .m-pane #exportPop .row.spec { margin-top: calc(8px * var(--ui, 1)) !important; font-size: calc(11px * var(--ui, 1)) !important; }

/* --- 8) Playback More = small side panel (not full-screen cover) --- */
html.phone .mx-more-sheet.mx-more-side {
  left: auto !important; right: calc(8px * var(--ui, 1)) !important;
  bottom: calc(calc(56px * var(--ui, 1)) + env(safe-area-inset-bottom)) !important;
  width: min(calc(300px * var(--ui, 1)), calc(100vw - calc(20px * var(--ui, 1)))) !important;
  max-height: min(58dvh, calc(420px * var(--ui, 1))) !important;
  transform: translate3d(110%, 0, 0) !important;
  border: 1px solid rgb(255 255 255 / .18) !important;
  box-shadow: -18px 12px 48px -18px rgb(0 0 0 / .75) !important;
  padding-bottom: calc(8px * var(--ui, 1)) !important;
}
html.phone .mx-more-sheet.mx-more-side.open { transform: none !important; }
html.phone .mx-more-sheet.mx-more-side .mx-act-head { padding: calc(10px * var(--ui, 1)) calc(12px * var(--ui, 1)) calc(8px * var(--ui, 1)) !important; }
html.phone .mx-more-sheet.mx-more-side .mx-act-head h3 { font-size: 1.05rem !important; margin: 2px 0 0 !important; }
html.phone .mx-more-sheet.mx-more-side .mx-act-head small { display: none !important; }
html.phone .mx-more-sheet.mx-more-side .mx-more-list { max-height: min(42dvh, calc(300px * var(--ui, 1))) !important; padding: calc(4px * var(--ui, 1)) 0 !important; }
html.phone .mx-more-sheet.mx-more-side .mx-act-item { min-height: calc(40px * var(--ui, 1)) !important; height: calc(40px * var(--ui, 1)) !important; font-size: calc(13.5px * var(--ui, 1)) !important; padding: 0 calc(12px * var(--ui, 1)) !important; }
html.phone .mx-more-sheet.mx-more-side .mx-more-hist .hist-b { min-height: calc(40px * var(--ui, 1)) !important; height: calc(40px * var(--ui, 1)) !important; }
html.phone .mx-more-sheet.mx-more-side .mx-act-cancel { min-height: calc(40px * var(--ui, 1)) !important; margin: calc(6px * var(--ui, 1)) calc(12px * var(--ui, 1)) calc(8px * var(--ui, 1)) !important; font-size: calc(13px * var(--ui, 1)) !important; }
html.phone .mx-more-scrim { background: rgb(0 0 0 / .28) !important; } /* lighter — preview stays readable */

/* --- 9) Stage flat list head --- */
.sbx-menu .sbx-list-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px * var(--ui, 1)) calc(12px * var(--ui, 1)) calc(6px * var(--ui, 1)); border-bottom: 1px solid rgb(255 255 255 / .08);
}
.sbx-menu .sbx-list-head b { font: 700 calc(13px * var(--ui, 1))/1 var(--font-sans, sans-serif); }
.sbx-menu .sbx-list-x {
  width: calc(32px * var(--ui, 1)); height: calc(32px * var(--ui, 1)); border: 0; background: none; color: #fff;
  font-size: calc(18px * var(--ui, 1)); cursor: pointer; line-height: 1;
}
.sbx-menu .sbx-walls-opt { border-top: 1px solid rgb(255 255 255 / .08); }

/* --- 10) Desktop hist hover tip --- */
html:not(.phone) .hist-b.tip-on {
  position: relative; z-index: 50;
}
html:not(.phone) .hist-b.tip-on::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + calc(8px * var(--ui, 1))); left: 50%; transform: translateX(-50%);
  min-width: calc(180px * var(--ui, 1)); max-width: calc(260px * var(--ui, 1)); padding: calc(8px * var(--ui, 1)) calc(10px * var(--ui, 1));
  background: #111214; border: 1px solid rgb(255 255 255 / .2);
  color: #fff; font: 500 calc(11.5px * var(--ui, 1))/1.35 var(--font-sans, sans-serif);
  white-space: pre-line; text-align: left; pointer-events: none;
  box-shadow: 0 12px 32px -14px rgb(0 0 0 / .7);
}
html.phone .hist-b::after { display: none !important; }

/* --- 11/12) Gradient: shorter stop blocks + icon-only acts --- */
.gx-stop { width: calc(12px * var(--ui, 1)) !important; height: calc(22px * var(--ui, 1)) !important; margin: calc(-11px * var(--ui, 1)) 0 0 calc(-6px * var(--ui, 1)) !important; }
html.phone .gx-stop { width: calc(14px * var(--ui, 1)) !important; height: calc(26px * var(--ui, 1)) !important; margin: calc(-13px * var(--ui, 1)) 0 0 calc(-7px * var(--ui, 1)) !important; }
.gx-bar { height: calc(22px * var(--ui, 1)) !important; margin: calc(8px * var(--ui, 1)) calc(7px * var(--ui, 1)) calc(12px * var(--ui, 1)) !important; }
html.phone .gx-bar { height: calc(26px * var(--ui, 1)) !important; }
.gx-acts.four.gx-ico-row,
.gx-acts.gx-ico-row { grid-template-columns: repeat(4, calc(40px * var(--ui, 1))) !important; justify-content: start; gap: calc(6px * var(--ui, 1)) !important; }
.gx-btn.gx-ico {
  width: calc(36px * var(--ui, 1)) !important; height: calc(36px * var(--ui, 1)) !important; padding: 0 !important;
  display: grid !important; place-items: center !important;
  font-size: 0 !important; letter-spacing: 0 !important;
}
.gx-btn.gx-ico span { display: none !important; }
.gx-btn.gx-ico svg { width: calc(13px * var(--ui, 1)) !important; height: calc(13px * var(--ui, 1)) !important; margin: 0 !important; }
html.phone .gx-btn.gx-ico { width: calc(40px * var(--ui, 1)) !important; height: calc(40px * var(--ui, 1)) !important; }

/* --- 6) App shell FS vs preview cinema — keep distinct --- */
html.pxl-app-fs-lite:not(.cine-ui) .m-tabs { display: none !important; }
html.pxl-app-fs-lite:not(.cine-ui) .m-sheet { bottom: 0 !important; }
html.pxl-app-fs header.nav .fs-btn.nav-fs,
header.nav .fs-btn.nav-fs {
  position: static !important; inset: auto !important;
  flex: none !important;
}
/* never let old #fsBtn preview rules restyle the nav control */
header.nav #navFsBtn,
header.nav .nav-fs {
  position: relative !important; top: auto !important; right: auto !important; bottom: auto !important; left: auto !important;
}
html.pxl-app-fs:not(.pxl-preview-fs) .canvas-wrap { /* stay in editor layout */ }
html.pxl-preview-fs .canvas-wrap.fs-on { /* cinema path unchanged */ }

/* --- 15) Top bar order: Undo → Stage → Full Screen → Export --- */
html:not(.phone) header.nav .hist { order: 40; }
html:not(.phone) header.nav .stage-nav,
html:not(.phone) header.nav #stageNavHost { order: 41; }
html:not(.phone) header.nav #navFsBtn,
html:not(.phone) header.nav .nav-fs { order: 42; }
html:not(.phone) header.nav .nav-export,
html:not(.phone) header.nav #exportBtn { order: 43; }
html.phone header.nav .hist { order: 40; }
html.phone header.nav #navFsBtn,
html.phone header.nav .nav-fs { order: 42; }
html.phone header.nav .nav-export,
html.phone header.nav #exportBtn { order: 43; }
/* ensure nav is a flex row so order applies */
header.nav { display: flex; align-items: center; flex-wrap: nowrap; }

/* --- UX audit fixes --- */
/* (s) unit never wraps alone on phone labels */
html.phone .ctl .lb { word-break: keep-all; }
/* prevent New orphan when form not yet ready */
html.phone .m-mine > .mx-new-preset { margin-bottom: calc(8px * var(--ui, 1)); }
/* Stage menu readable on phone sheets */
html.phone .sbx-menu { max-width: min(calc(340px * var(--ui, 1)), calc(100vw - calc(16px * var(--ui, 1)))); }

/* =====================================================================
   t1149–t1152u: overlay size, layout stability, Rename/Delete chrome
   ===================================================================== */

/* --- A3: Stage 3D overlay cluster — 28px (4-pt), top-right, no overflow --- */
html.phone .canvas-wrap .fs-btn.fs-btn-view,
html.phone .sbx-vo-gear,
html.phone .sbx-vo-drift {
  width: calc(28px * var(--ui, 1)) !important;
  height: calc(28px * var(--ui, 1)) !important;
  min-width: calc(28px * var(--ui, 1)) !important;
  min-height: calc(28px * var(--ui, 1)) !important;
  padding: 0 !important;
}
html.phone .canvas-wrap .fs-btn.fs-btn-view {
  top: calc(8px * var(--ui, 1)) !important;
  right: calc(8px * var(--ui, 1)) !important;
}
html.phone .sbx-vo-gear {
  top: calc(8px * var(--ui, 1)) !important;
  right: calc(40px * var(--ui, 1)) !important; /* 8 + 28 + 4 */
}
html.phone .sbx-vo-drift {
  top: calc(40px * var(--ui, 1)) !important; /* 8 + 28 + 4 */
  right: 40px !important;
  width: calc(28px * var(--ui, 1)) !important;
  height: calc(28px * var(--ui, 1)) !important;
}
html.phone .canvas-wrap .fs-btn.fs-btn-view svg,
html.phone .sbx-vo-gear svg,
html.phone .sbx-vo-drift svg {
  width: calc(12px * var(--ui, 1)) !important;
  height: calc(12px * var(--ui, 1)) !important;
}
html:not(.phone) .canvas-wrap .fs-btn.fs-btn-view,
html:not(.phone) .sbx-vo-gear,
html:not(.phone) .sbx-vo-drift {
  width: calc(28px * var(--ui, 1)) !important;
  height: calc(28px * var(--ui, 1)) !important;
}

/* --- A1: stabilize playback + Preset Manager (no jump) --- */
html:not(.phone) .dock {
  min-height: calc(56px * var(--ui, 1));
  contain: layout style;
}
html:not(.phone) .sp-bar {
  min-height: calc(72px * var(--ui, 1));
  contain: layout style;
  transition: none !important;
}
html:not(.phone) .preset-dock-host,
html:not(.phone) #presetDockHost {
  min-height: calc(40px * var(--ui, 1));
  contain: layout;
}
html:not(.phone) .sp-bar .sp-list {
  min-height: calc(36px * var(--ui, 1));
}
/* hist tip is absolute — never push dock/nav */
html:not(.phone) .hist { position: relative; }
html:not(.phone) .hist-b.tip-on::after {
  z-index: 80;
  pointer-events: none;
}
/* prevent remount flicker on My Presets list */
.mp-list { min-height: calc(48px * var(--ui, 1)); contain: layout; }
.mp-save { min-height: calc(40px * var(--ui, 1)); }

/* --- t1182/t1183u: only ⋯ on the row (Rename/Delete live in the menu) --- */
html.phone .mp-row > .mp-act:not(.mp-more),
html.phone .m-presets-glass .mp-row > .mp-act:not(.mp-more) {
  display: none !important;
}
html.phone .mp-row > .mp-more-wrap,
html.phone .m-presets-glass .mp-row > .mp-more-wrap {
  display: flex !important;
}
html.phone .mp-act.mp-more {
  display: grid !important;
  width: calc(36px * var(--ui, 1)) !important;
  min-width: calc(36px * var(--ui, 1)) !important;
  height: calc(36px * var(--ui, 1)) !important;
  place-items: center;
}
.sp-hdel {
  display: inline-flex; align-items: center; gap: calc(6px * var(--ui, 1));
  height: calc(28px * var(--ui, 1)); padding: 0 calc(10px * var(--ui, 1)); margin-left: calc(8px * var(--ui, 1));
  border: 1px solid rgb(255 255 255 / .22); background: rgb(255 255 255 / .04);
  color: rgb(255 255 255 / .85); font: 600 calc(11px * var(--ui, 1))/1 var(--font-sans, sans-serif);
  cursor: pointer; border-radius: 0; flex: none;
}
.sp-hdel svg { width: calc(11px * var(--ui, 1)); height: calc(11px * var(--ui, 1)); }
.sp-hdel:hover { border-color: #ff6b61; color: #ff6b61; }
.sp-head { display: flex; align-items: center; flex-wrap: wrap; gap: calc(6px * var(--ui, 1)); }

/* Preview cinema fake: full viewport cover (t1151u / t1161u) — high z so Stage 3D stays covered;
   do not rely on html.pxl-fs-fake (app-shell only). */
html.pxl-preview-fs,
html.pxl-preview-fs body {
  overflow: hidden !important;
}
.canvas-wrap.fs-on.fs-fake,
html.pxl-preview-fs .canvas-wrap.fs-on.fs-fake {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  border-radius: 0 !important;
  background: #000 !important;
}
/* Keep preview FS control above the 3D canvas / VO cluster */
html.pxl-preview-fs .canvas-wrap .fs-btn.fs-btn-view {
  z-index: 8 !important;
}


/* =====================================================================
   t1156u: preset stop/pause done in JS; 2D/3D size; camera bottom-right;
   Preset primary above Layer Stack; Looks/Effects non-tree icons
   ===================================================================== */

/* A2: bottom-left 2D/3D toggle matches overlay control size (28 desktop / 40 phone) */
html:not(.phone) .pv-seg.vtog-ico {
  width: calc(28px * var(--ui, 1)) !important;
  height: calc(28px * var(--ui, 1)) !important;
  min-width: calc(28px * var(--ui, 1)) !important;
  min-height: calc(28px * var(--ui, 1)) !important;
  left: calc(12px * var(--ui, 1)) !important;
  bottom: calc(12px * var(--ui, 1)) !important;
  padding: 0 !important;
  border: 1px solid rgb(255 255 255 / .55) !important;
  background: rgb(5 5 5 / .72) !important;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 0 12px rgb(255 255 255 / .18) !important;
}
html:not(.phone) .pv-seg.vtog-ico svg {
  width: calc(12px * var(--ui, 1)) !important;
  height: calc(12px * var(--ui, 1)) !important;
}
/* FS mode: stay matched to fs21-play sibling (44) */
.canvas-wrap.fs-on .pv-seg.vtog-ico {
  width: calc(44px * var(--ui, 1)) !important;
  height: calc(44px * var(--ui, 1)) !important;
}
html.phone .pv-seg.vtog-ico {
  width: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
  min-width: calc(40px * var(--ui, 1)) !important;
  min-height: calc(40px * var(--ui, 1)) !important;
}

/* A3: camera drift control → bottom-right of preview; gear + FS stay top-right */
html:not(.phone) .sbx-vo-drift {
  top: auto !important;
  bottom: calc(12px * var(--ui, 1)) !important;
  right: calc(12px * var(--ui, 1)) !important;
  left: auto !important;
  width: calc(28px * var(--ui, 1)) !important;
  height: calc(28px * var(--ui, 1)) !important;
  z-index: 7 !important;
}
html.phone .sbx-vo-drift {
  top: auto !important;
  bottom: calc(8px * var(--ui, 1)) !important;
  right: calc(8px * var(--ui, 1)) !important;
  left: auto !important;
  width: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
  z-index: 7 !important;
}
/* keep gear flush next to FS top-right (no empty drift slot under gear) */
html:not(.phone) .sbx-vo-gear {
  top: calc(12px * var(--ui, 1)) !important;
  right: calc(44px * var(--ui, 1)) !important;
}
html.phone .sbx-vo-gear {
  top: calc(8px * var(--ui, 1)) !important;
  right: calc(52px * var(--ui, 1)) !important;
}

/* A4: Preset primary chrome above Layer Stack */
html:not(.phone) #layersPanel > .preset-primary,
html:not(.phone) #presetPrimary.preset-primary {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: calc(6px * var(--ui, 1));
  padding: calc(12px * var(--ui, 1)) calc(12px * var(--ui, 1)) calc(10px * var(--ui, 1)) calc(14px * var(--ui, 1));
  margin: 0;
  border-bottom: 1px solid rgb(255 255 255 / .12);
  background: linear-gradient(180deg, rgb(54 240 122 / .08), transparent 90%);
  min-height: 0;
  box-sizing: border-box;
}
html:not(.phone) .preset-primary-k {
  display: block;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: calc(10px * var(--ui, 1));
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--desk-ice, #36f07a) 70%, #fff);
}
html:not(.phone) .preset-primary .pill-select,
html:not(.phone) .preset-primary .sel-pill,
html:not(.phone) #presetPrimary .pill-select {
  flex: none;
  width: 100%;
  max-width: 100%;
  height: calc(40px * var(--ui, 1));
  border: 1px solid color-mix(in oklab, var(--desk-ice, #36f07a) 45%, transparent);
  background: rgb(0 0 0 / .45);
  box-shadow: 0 0 0 1px rgb(54 240 122 / .08), 0 0 18px -8px var(--desk-ice-glow, rgb(54 240 122 / .32));
}
html:not(.phone) .preset-primary .pill-select:hover,
html:not(.phone) #presetPrimary .pill-select:hover {
  border-color: var(--desk-ice, #36f07a);
  box-shadow: 0 0 0 3px var(--desk-ice-12, rgb(54 240 122 / .14));
}
html:not(.phone) .preset-primary .pill-select .k,
html:not(.phone) #presetPrimary .pill-select .k {
  color: rgb(255 255 255 / .45);
  font-size: calc(10px * var(--ui, 1));
  letter-spacing: .1em;
  text-transform: uppercase;
}
html:not(.phone) .preset-primary .pill-select .v,
html:not(.phone) #presetPrimary .pill-select .v {
  font-size: calc(13px * var(--ui, 1));
  font-weight: 700;
  color: #fff;
}
/* no duplicate under playback */
html:not(.phone) .sp-bar > .preset-dock-host:not(.preset-primary),
html:not(.phone) .sp-bar > #presetDockHost:not(.preset-primary) {
  display: none !important;
}
html.phone #presetPrimary,
html.phone .preset-primary {
  display: none !important;
}

/* A5: tab icons use currentColor (green when active) — never gold christmas tint */
.am-tabs .am-tab-ico svg,
.am-tabs .am-tab-xmas svg {
  color: currentColor !important;
}


/* =====================================================================
   t1161u: LOOK MANAGER rename + Stage 3D preview FS stay-open
   ===================================================================== */
/* Stage 3D: gear sits left of preview FS; drift stays bottom-right (A3) */
html:not(.phone) .canvas-wrap.stage-on .fs-btn.fs-btn-view {
  top: calc(12px * var(--ui, 1)) !important;
  right: calc(12px * var(--ui, 1)) !important;
  z-index: 8 !important;
  pointer-events: auto !important;
}
html.phone .canvas-wrap.stage-on .fs-btn.fs-btn-view {
  z-index: 8 !important;
  pointer-events: auto !important;
}

/* =====================================================================
   t1162/t1163: LOOK MANAGER — cooler, refined, denser (not default/big)
   4-pt: 4 / 8 / 12. Quiet mono eyebrow, compact Add, no full-bleed slab.
   ===================================================================== */
html:not(.phone):not(.tablet) .sp-bar {
  gap: calc(6px * var(--ui, 1)) !important;
  padding: calc(8px * var(--ui, 1)) !important;
  border: 1px solid rgb(255 255 255 / .10) !important;
  background: rgb(8 8 10 / .88) !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .04), 0 12px 28px -18px rgb(0 0 0 / .85) !important;
  min-height: 0 !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-head {
  gap: calc(6px * var(--ui, 1)) calc(8px * var(--ui, 1)) !important;
  min-height: calc(24px * var(--ui, 1)) !important;
  flex-wrap: nowrap !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-k {
  font: 600 calc(9px * var(--ui, 1))/1 var(--font-mono) !important;
  font-stretch: 100% !important;
  letter-spacing: .16em !important;
  color: rgb(255 255 255 / .38) !important;
  padding-left: calc(14px * var(--ui, 1)) !important;
  background-size: 6px 6px !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-hname {
  height: calc(24px * var(--ui, 1)) !important;
  padding: 0 calc(4px * var(--ui, 1)) !important;
  margin-left: calc(-4px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-hname b {
  font-size: calc(12px * var(--ui, 1)) !important;
  font-weight: 600 !important;
  color: rgb(255 255 255 / .92) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-hname svg {
  width: calc(9px * var(--ui, 1)) !important;
  height: calc(9px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-meta {
  font: 500 calc(9px * var(--ui, 1))/1 var(--font-mono) !important;
  letter-spacing: .1em !important;
  color: rgb(255 255 255 / .28) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-hdel {
  height: calc(24px * var(--ui, 1)) !important;
  padding: 0 calc(8px * var(--ui, 1)) !important;
  font-size: calc(10px * var(--ui, 1)) !important;
  gap: calc(4px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-hdel svg {
  width: calc(10px * var(--ui, 1)) !important;
  height: calc(10px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-acts {
  gap: calc(6px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-plus,
html:not(.phone):not(.tablet) .sp-bar .sp-manage {
  height: calc(28px * var(--ui, 1)) !important;
  min-height: calc(28px * var(--ui, 1)) !important;
  padding: 0 calc(10px * var(--ui, 1)) !important;
  font: 600 calc(10px * var(--ui, 1))/1 var(--font-mono) !important;
  letter-spacing: .08em !important;
  border: 1px solid rgb(255 255 255 / .14) !important;
  background: transparent !important;
  color: rgb(255 255 255 / .72) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-plus:hover,
html:not(.phone):not(.tablet) .sp-bar .sp-manage:hover {
  border-color: rgb(255 255 255 / .32) !important;
  color: #fff !important;
  background: rgb(255 255 255 / .04) !important;
}
html:not(.phone):not(.tablet) .sp-bar.sp-single .sp-plus {
  width: auto !important;
  flex: none !important;
  justify-content: flex-start !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-plus svg {
  width: calc(9px * var(--ui, 1)) !important;
  height: calc(9px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-fade {
  height: calc(28px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-list {
  gap: calc(4px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-sw {
  height: calc(28px * var(--ui, 1)) !important;
  padding: 0 calc(8px * var(--ui, 1)) 0 calc(8px * var(--ui, 1)) !important;
  font-size: calc(11.5px * var(--ui, 1)) !important;
  gap: calc(6px * var(--ui, 1)) !important;
}
html:not(.phone):not(.tablet) .sp-bar .sp-sw i {
  font-size: calc(9px * var(--ui, 1)) !important;
}

/* =====================================================================
   t1164u: Add Layer (Looks | Effects) — intentional 4-pt hierarchy
   Tabs → search → category → 2-col cards. Soft Snow / Snowflake / Knit / Candles.
   ===================================================================== */
html:not(.phone) #addMenu.add-menu,
html:not(.phone) .add-menu#addMenu {
  left: calc(8px * var(--ui, 1)) !important;
  right: calc(8px * var(--ui, 1)) !important;
  top: calc(52px * var(--ui, 1)) !important;
  max-height: calc(100% - calc(64px * var(--ui, 1))) !important;
  padding: 0 !important;
  border: 1px solid rgb(255 255 255 / .12) !important;
  background: rgb(10 10 12 / .97) !important;
  box-shadow: 0 24px 64px -24px rgb(0 0 0 / .95) !important;
}
html:not(.phone) .add-menu .am-top {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: calc(8px * var(--ui, 1)) !important;
  padding: calc(8px * var(--ui, 1)) !important;
  background: rgb(10 10 12 / .98) !important;
  border-bottom: 1px solid rgb(255 255 255 / .08) !important;
}
html:not(.phone) .add-menu .am-tabs {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0 !important;
  height: calc(28px * var(--ui, 1)) !important;
  border: 1px solid rgb(255 255 255 / .12) !important;
  background: rgb(0 0 0 / .4) !important;
}
html:not(.phone) .add-menu .am-tabs .am-tab,
html:not(.phone) .add-menu .am-tabs button {
  height: calc(28px * var(--ui, 1)) !important;
  min-height: calc(28px * var(--ui, 1)) !important;
  padding: 0 calc(8px * var(--ui, 1)) !important;
  gap: calc(6px * var(--ui, 1)) !important;
  font: 600 calc(10px * var(--ui, 1))/1 var(--font-mono) !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: rgb(255 255 255 / .42) !important;
  background: transparent !important;
  box-shadow: none !important;
}
html:not(.phone) .add-menu .am-tabs .am-tab.on,
html:not(.phone) .add-menu .am-tabs button.on {
  color: #04140a !important;
  background: var(--desk-ice, #36f07a) !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}
html:not(.phone) .add-menu .am-tabs .am-tab-ico {
  width: calc(10px * var(--ui, 1)) !important;
  height: calc(10px * var(--ui, 1)) !important;
}
html:not(.phone) .add-menu .am-tabs .am-tab-ico svg {
  width: calc(10px * var(--ui, 1)) !important;
  height: calc(10px * var(--ui, 1)) !important;
}
html:not(.phone) .add-menu .am-search {
  height: calc(28px * var(--ui, 1)) !important;
  gap: calc(6px * var(--ui, 1)) !important;
  padding: 0 calc(8px * var(--ui, 1)) !important;
  border: 1px solid rgb(255 255 255 / .12) !important;
  background: rgb(255 255 255 / .03) !important;
}
html:not(.phone) .add-menu .am-search svg {
  width: calc(10px * var(--ui, 1)) !important;
  height: calc(10px * var(--ui, 1)) !important;
  opacity: .55;
}
html:not(.phone) .add-menu .am-search input {
  font-size: calc(12px * var(--ui, 1)) !important;
}
html:not(.phone) .add-menu .am-list {
  padding: calc(4px * var(--ui, 1)) calc(8px * var(--ui, 1)) calc(8px * var(--ui, 1)) !important;
  display: flex;
  flex-direction: column;
  gap: 0;
}
html:not(.phone) .add-menu h6 {
  display: flex !important;
  align-items: center !important;
  gap: calc(8px * var(--ui, 1)) !important;
  margin: calc(10px * var(--ui, 1)) 0 calc(6px * var(--ui, 1)) !important;
  padding: 0 2px !important;
  font: 500 calc(9px * var(--ui, 1))/1 var(--font-mono) !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  color: rgb(255 255 255 / .34) !important;
}
html:not(.phone) .add-menu h6:first-child {
  margin-top: calc(4px * var(--ui, 1)) !important;
}
html:not(.phone) .add-menu h6 span {
  gap: calc(8px * var(--ui, 1)) !important;
}
html:not(.phone) .add-menu h6 span::after {
  background: rgb(255 255 255 / .08) !important;
}
html:not(.phone) .add-menu h6 b {
  margin-left: 0 !important;
  font: 500 calc(9px * var(--ui, 1))/1 var(--font-mono) !important;
  color: rgb(255 255 255 / .28) !important;
  letter-spacing: .06em;
}
html:not(.phone) .add-menu .tiles {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: calc(8px * var(--ui, 1)) !important; /* 4-pt */
  margin: 0 0 4px !important;
}
html:not(.phone) .add-menu .am-tile,
html:not(.phone) .add-menu button.am-tile {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: calc(6px * var(--ui, 1)) !important;
  min-height: 0 !important;
  padding: calc(4px * var(--ui, 1)) calc(4px * var(--ui, 1)) calc(6px * var(--ui, 1)) !important;
  border: 1px solid rgb(255 255 255 / .10) !important;
  background: rgb(255 255 255 / .02) !important;
  color: rgb(255 255 255 / .88) !important;
  font-size: calc(11.5px * var(--ui, 1)) !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
}
html:not(.phone) .add-menu .am-tile:hover,
html:not(.phone) .add-menu button.am-tile:hover {
  border-color: rgb(255 255 255 / .28) !important;
  background: rgb(255 255 255 / .04) !important;
  color: #fff !important;
}
html:not(.phone) .add-menu .am-tile:hover .am-still {
  border-color: rgb(255 255 255 / .2) !important;
}
html:not(.phone) .add-menu .am-still {
  aspect-ratio: 16 / 9 !important;
  border: 1px solid rgb(255 255 255 / .08) !important;
  background: #070708 !important;
}
html:not(.phone) .add-menu .am-nm {
  padding: 0 2px !important;
  font: 600 calc(11px * var(--ui, 1))/1.2 var(--font-sans, sans-serif) !important;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html:not(.phone) .add-menu .am-xmas-badge {
  right: calc(4px * var(--ui, 1)) !important;
  top: calc(4px * var(--ui, 1)) !important;
  width: calc(12px * var(--ui, 1)) !important;
  height: calc(12px * var(--ui, 1)) !important;
}
html:not(.phone) .add-menu .am-hint {
  min-height: calc(40px * var(--ui, 1)) !important;
  margin: 0 !important;
  padding: calc(8px * var(--ui, 1)) !important;
  font-size: calc(11px * var(--ui, 1)) !important;
  border-top: 1px solid rgb(255 255 255 / .08) !important;
  background: rgb(10 10 12 / .98) !important;
}
/* Layer Stack head + Add affordance — align with denser add browser */
html:not(.phone) #layersPanel .panel-head {
  min-height: calc(40px * var(--ui, 1)) !important;
  padding: calc(8px * var(--ui, 1)) calc(10px * var(--ui, 1)) !important;
  gap: calc(8px * var(--ui, 1)) !important;
  align-items: center !important;
}
html:not(.phone) #layersPanel .panel-head .eyebrow {
  font-size: calc(11px * var(--ui, 1)) !important;
  letter-spacing: .04em !important;
}
html:not(.phone) #layersPanel #addLayer.add-btn,
html:not(.phone) #layersPanel .add-btn {
  height: calc(28px * var(--ui, 1)) !important;
  min-height: calc(28px * var(--ui, 1)) !important;
  padding: 0 calc(10px * var(--ui, 1)) !important;
  gap: calc(6px * var(--ui, 1)) !important;
  font: 600 calc(10px * var(--ui, 1))/1 var(--font-mono) !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  border: 1px solid rgb(255 255 255 / .16) !important;
  background: transparent !important;
}
html:not(.phone) #layersPanel #addLayer.add-btn.open,
html:not(.phone) #layersPanel .add-btn.open {
  border-color: var(--desk-ice, #36f07a) !important;
  color: var(--desk-ice, #36f07a) !important;
  background: rgb(54 240 122 / .08) !important;
}
html:not(.phone) #layersPanel #addLayer svg {
  width: calc(10px * var(--ui, 1)) !important;
  height: calc(10px * var(--ui, 1)) !important;
}



/* =====================================================================
   t1181–t1183u: denser Pick a Preset / Look Manager on phone
   — New+Save one compact row, less jump, quieter hierarchy
   ===================================================================== */
html.phone .m-presets-glass .m-pg-head .display {
  font-size: 1.125rem !important; /* 18 */
  letter-spacing: 0.02em;
}
html.phone .m-presets-glass .m-pg-head {
  padding: calc(14px * var(--ui, 1)) calc(12px * var(--ui, 1)) calc(8px * var(--ui, 1)) !important;
  gap: calc(8px * var(--ui, 1)) !important;
}
html.phone .m-presets-glass .m-pg-body {
  padding: calc(8px * var(--ui, 1)) calc(12px * var(--ui, 1)) calc(calc(12px * var(--ui, 1)) + env(safe-area-inset-bottom)) !important;
}
/* New | name | Save — never a full-width New stack */
html.phone .m-mine > .mx-new-preset {
  display: none !important; /* only the in-form New */
}
html.phone .mp-save.mp-save-with-new,
html.phone .m-mine .mp-save,
html.phone .m-presets-glass .mp-save {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: calc(6px * var(--ui, 1)) !important;
  align-items: stretch !important;
  margin: 0 0 calc(8px * var(--ui, 1)) !important;
  min-height: calc(36px * var(--ui, 1)) !important;
}
html.phone .m-presets-glass .mp-save .mx-new-preset,
html.phone .mp-save .mx-new-preset {
  height: calc(36px * var(--ui, 1)) !important;
  min-height: calc(36px * var(--ui, 1)) !important;
  max-height: calc(36px * var(--ui, 1)) !important;
  padding: 0 calc(10px * var(--ui, 1)) !important;
  font-size: calc(12.5px * var(--ui, 1)) !important;
  width: auto !important;
  margin: 0 !important;
}
html.phone .m-presets-glass .mp-name,
html.phone .m-presets-glass .mp-save-btn,
html.phone .mp-save .mp-name,
html.phone .mp-save .mp-save-btn {
  height: calc(36px * var(--ui, 1)) !important;
  min-height: calc(36px * var(--ui, 1)) !important;
  max-height: calc(36px * var(--ui, 1)) !important;
  font-size: calc(13px * var(--ui, 1)) !important;
  border-top-width: 0 !important;
  border-bottom-width: 0 !important;
}
html.phone .m-presets-glass .mp-row {
  min-height: calc(44px * var(--ui, 1)) !important;
}
html.phone .m-presets-glass .mp-item {
  padding: calc(6px * var(--ui, 1)) calc(8px * var(--ui, 1)) !important;
  gap: calc(8px * var(--ui, 1)) !important;
}
html.phone .m-presets-glass .mp-item b { font-size: calc(13px * var(--ui, 1)) !important; }
html.phone .m-presets-glass .mp-item small { font-size: calc(10.5px * var(--ui, 1)) !important; }
/* rename / confirm inline denser */
html.phone .mp-rename,
html.phone .mp-confirm,
html.phone .m-presets-glass .mp-rename,
html.phone .m-presets-glass .mp-confirm {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  gap: calc(6px * var(--ui, 1)) !important;
  align-items: center !important;
  padding: calc(4px * var(--ui, 1)) 0 !important;
  min-height: calc(36px * var(--ui, 1));
}
html.phone .mp-rename input,
html.phone .mp-rename .btn,
html.phone .mp-confirm .btn {
  height: calc(36px * var(--ui, 1)) !important;
  min-height: calc(36px * var(--ui, 1)) !important;
  font-size: calc(13px * var(--ui, 1)) !important;
  padding-left: calc(10px * var(--ui, 1)) !important;
  padding-right: calc(10px * var(--ui, 1)) !important;
}
/* nested Look Manager under a group */
html.phone .sp-nest .sp-row { min-height: calc(40px * var(--ui, 1)) !important; gap: 2px !important; }
html.phone .sp-nest .sp-act { width: calc(32px * var(--ui, 1)) !important; min-width: calc(32px * var(--ui, 1)) !important; }
html.phone .sp-nest .sp-add {
  padding: calc(8px * var(--ui, 1)) !important;
  gap: calc(6px * var(--ui, 1)) !important;
}
html.phone .sp-nest .sp-add-name,
html.phone .sp-nest .sp-btn {
  height: calc(36px * var(--ui, 1)) !important;
  min-height: calc(36px * var(--ui, 1)) !important;
  font-size: calc(13px * var(--ui, 1)) !important;
}
/* Preview Quality + field rhythm */
html.phone .m-presets-glass .m-field { margin-top: calc(12px * var(--ui, 1)) !important; }
html.phone .m-presets-glass .m-field > .eyebrow { margin-bottom: calc(4px * var(--ui, 1)) !important; font-size: calc(10px * var(--ui, 1)) !important; }
html.phone .m-presets-glass .seg button {
  height: calc(32px * var(--ui, 1)) !important;
  min-height: calc(32px * var(--ui, 1)) !important;
  font-size: calc(12px * var(--ui, 1)) !important;
  padding: 0 calc(8px * var(--ui, 1)) !important;
}
html.phone .m-presets-glass .m-look .note { font-size: calc(11px * var(--ui, 1)) !important; margin-top: calc(4px * var(--ui, 1)) !important; }
/* reserve list band so New/edit forms don't yank Preview Quality as hard */
html.phone .m-mine .mp-list {
  min-height: calc(120px * var(--ui, 1));
  height: min(calc(280px * var(--ui, 1)), 40dvh) !important;
}


/* =====================================================================
   t1186u: Export panel mobile — denser, simpler; menu chrome fit
   ===================================================================== */
html.phone .m-pane #exportPop {
  padding: 0 calc(12px * var(--ui, 1)) calc(calc(12px * var(--ui, 1)) + env(safe-area-inset-bottom)) !important;
}
html.phone .m-pane #exportPop .pop-head,
html.phone .m-pane #exportPop .ex-head {
  margin-bottom: calc(6px * var(--ui, 1)) !important;
  min-height: calc(40px * var(--ui, 1)) !important;
  align-items: center !important;
}
html.phone .m-pane #exportPop .pop-head h3.display,
html.phone .m-pane #exportPop .ex-head h3.display {
  font-size: 1.05rem !important;
  margin: 0 !important;
}
html.phone .m-pane #exportPop .pop-head .eyebrow {
  font-size: calc(10px * var(--ui, 1)) !important;
  margin: 0 0 2px !important;
}
html.phone .m-pane #exportPop .row {
  margin-top: calc(8px * var(--ui, 1)) !important;
  gap: calc(6px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .row > label,
html.phone .m-pane #exportPop .eyebrow {
  font-size: calc(10px * var(--ui, 1)) !important;
  margin-bottom: calc(4px * var(--ui, 1)) !important;
  letter-spacing: 0.1em !important;
}
html.phone .m-pane #exportPop input,
html.phone .m-pane #exportPop .stepper,
html.phone .m-pane #exportPop .pill-select,
html.phone .m-pane #exportPop .seg button,
html.phone .m-pane #exportPop .ex-dd-sel {
  height: calc(36px * var(--ui, 1)) !important;
  min-height: calc(36px * var(--ui, 1)) !important;
  max-height: calc(36px * var(--ui, 1)) !important;
  font-size: calc(12.5px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .stepper button {
  width: calc(36px * var(--ui, 1)) !important;
  height: calc(36px * var(--ui, 1)) !important;
  min-width: calc(36px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .seg {
  gap: calc(3px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .seg button {
  font-size: calc(11.5px * var(--ui, 1)) !important;
  padding: 0 calc(6px * var(--ui, 1)) !important;
}
html.phone #exportPop .ex-dd-grid {
  margin: calc(6px * var(--ui, 1)) 0 0 !important;
  gap: calc(6px * var(--ui, 1)) !important;
}
html.phone #exportPop .ex-dd {
  grid-template-columns: calc(72px * var(--ui, 1)) minmax(0, 1fr) !important;
  gap: calc(6px * var(--ui, 1)) !important;
}
html.phone #exportPop .ex-dd-k {
  font-size: calc(10px * var(--ui, 1)) !important;
  letter-spacing: 0.1em !important;
}
html.phone .m-pane #exportPop.ex21 .ex-acts {
  gap: calc(6px * var(--ui, 1)) !important;
  margin-top: calc(10px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop.ex21 .ex-acts .btn {
  min-height: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
  font-size: calc(13px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .doc,
html.phone .m-pane #exportPop .ex-meta,
html.phone .m-pane #exportPop .spec,
html.phone .m-pane #exportPop .status {
  font-size: calc(11px * var(--ui, 1)) !important;
  line-height: 1.3 !important;
  margin-top: calc(6px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .prog {
  height: calc(4px * var(--ui, 1)) !important;
  margin-top: calc(8px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .exq-i {
  min-height: calc(40px * var(--ui, 1)) !important;
  padding: calc(3px * var(--ui, 1)) calc(4px * var(--ui, 1)) !important;
  gap: calc(6px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .ex-queue {
  margin-top: calc(8px * var(--ui, 1)) !important;
  padding: calc(8px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .ex-queue ul {
  max-height: calc(160px * var(--ui, 1)) !important;
  gap: calc(4px * var(--ui, 1)) !important;
  margin-top: calc(6px * var(--ui, 1)) !important;
}
/* File name / loop rows denser */
html.phone .m-pane #exportPop .m-proj,
html.phone .m-pane #exportPop .m-loop {
  margin-top: calc(8px * var(--ui, 1)) !important;
  gap: calc(4px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .m-proj input,
html.phone .m-pane #exportPop .m-loop input {
  height: calc(36px * var(--ui, 1)) !important;
  font-size: calc(13px * var(--ui, 1)) !important;
}

/* Header Presets menu pill — fits bar with logo (t1180/t1186) */
html.phone .nav .m-menu-btn {
  height: calc(36px * var(--ui, 1)) !important;
  min-height: calc(36px * var(--ui, 1)) !important;
  max-height: calc(36px * var(--ui, 1)) !important;
  padding: 0 calc(10px * var(--ui, 1)) !important;
  border: 1px solid var(--m-line) !important;
  box-shadow: none !important;
  font-size: calc(13px * var(--ui, 1)) !important;
  gap: calc(6px * var(--ui, 1)) !important;
  align-self: center !important;
  flex: 0 1 auto !important;
  max-width: min(46vw, 11rem) !important;
}
html.phone .nav .m-menu-btn .m-mb-name {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  white-space: nowrap !important;
}
html.phone .nav .brand {
  height: calc(36px * var(--ui, 1)) !important;
  align-self: center !important;
}
html.phone .nav .hist-b {
  width: calc(32px * var(--ui, 1)) !important;
  height: calc(32px * var(--ui, 1)) !important;
  align-self: center !important;
}
html.phone[data-mtab=looks] .m-menu-btn,
html.phone[data-mmodal=look] .m-menu-btn {
  border-color: #fff !important;
  box-shadow: none !important;
}

/* =====================================================================
   t1188–t1194u tip: Look Manager align+⋯, preview FS exit, Controls thumbs,
   Export custom menus (no native Apple pickers)
   ===================================================================== */

/* --- Look Manager: aligned look list + clearer ⋯ menus --- */
html.phone .sp-nest {
  margin-left: 0 !important;
  padding-left: calc(10px * var(--ui, 1)) !important;
  border-left: 1px solid rgb(255 255 255 / .16) !important;
  gap: 2px !important;
}
html.phone .sp-nest .sp-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  min-height: calc(40px * var(--ui, 1)) !important;
  gap: calc(4px * var(--ui, 1)) !important;
  padding: 0 !important;
  border-left: 0 !important; /* shared nest chrome only */
}
html.phone .sp-nest .sp-row.sp-base {
  padding-left: 0 !important;
  border-left: 0 !important;
}
html.phone .sp-nest .sp-item {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  gap: calc(8px * var(--ui, 1)) !important;
  padding: calc(4px * var(--ui, 1)) calc(8px * var(--ui, 1)) !important;
}
html.phone .sp-nest .sp-n {
  width: calc(22px * var(--ui, 1)) !important;
  height: calc(22px * var(--ui, 1)) !important;
  flex: none !important;
}
html.phone .sp-nest .sp-more-wrap { flex: none !important; align-self: stretch; }
html.phone .sp-nest .sp-act.sp-more {
  width: calc(40px * var(--ui, 1)) !important; min-width: calc(40px * var(--ui, 1)) !important; height: calc(40px * var(--ui, 1)) !important;
  opacity: 1 !important;
}
html.phone .mp-dd-i,
html.phone .sp-dd-i {
  min-height: calc(44px * var(--ui, 1)) !important;
  font-size: calc(14px * var(--ui, 1)) !important;
  letter-spacing: 0.01em;
}
html.phone .m-presets-glass .m-field-hint {
  margin: calc(4px * var(--ui, 1)) 0 0 !important;
  font-size: calc(11px * var(--ui, 1)) !important;
  line-height: 1.35 !important;
  color: rgb(255 255 255 / .5) !important;
}

/* --- Preview cinema FS: Exit always reachable + safe-area (t1189/t1190) --- */
html.pxl-preview-fs .canvas-wrap.fs-on .fs-btn.fs-btn-view,
html.pxl-preview-fs .canvas-wrap.fs-on.fs-fake .fs-btn.fs-btn-view {
  top: calc(calc(12px * var(--ui, 1)) + env(safe-area-inset-top, 0px)) !important;
  right: calc(calc(12px * var(--ui, 1)) + env(safe-area-inset-right, 0px)) !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 2147483002 !important;
  width: auto !important;
  min-width: calc(44px * var(--ui, 1)) !important;
  height: calc(44px * var(--ui, 1)) !important;
  padding: 0 calc(14px * var(--ui, 1)) !important;
  gap: calc(8px * var(--ui, 1)) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background: rgb(17 18 20 / .88) !important;
  border: 1px solid rgb(255 255 255 / .35) !important;
  box-shadow: 0 0 16px -4px rgb(255 255 255 / .35) !important;
  color: #fff !important;
  font: 600 calc(13px * var(--ui, 1))/1 var(--font-sans, sans-serif) !important;
}
html.pxl-preview-fs .canvas-wrap.fs-on .fs-btn.fs-btn-view span {
  display: inline !important;
  letter-spacing: .02em;
}
html.pxl-preview-fs .canvas-wrap.fs-on .fs-btn.fs-btn-view svg {
  width: calc(14px * var(--ui, 1)) !important;
  height: calc(14px * var(--ui, 1)) !important;
}
/* Exit never disappears when cinema chrome auto-hides */
html.pxl-preview-fs .canvas-wrap.fs-on.fs21-hide .fs-btn.fs-btn-view,
html.pxl-preview-fs .canvas-wrap.fs-on.fs-idle .fs-btn.fs-btn-view {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}
html.pxl-preview-fs .canvas-wrap.fs-on .fs21-play {
  left: calc(calc(16px * var(--ui, 1)) + env(safe-area-inset-left, 0px)) !important;
  bottom: calc(calc(18px * var(--ui, 1)) + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 2147483001 !important;
}
html.pxl-preview-fs .canvas-wrap.fs-on .pv-seg.vtog-ico {
  left: calc(calc(16px * var(--ui, 1)) + calc(52px * var(--ui, 1)) + env(safe-area-inset-left, 0px)) !important;
  bottom: calc(calc(18px * var(--ui, 1)) + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 2147483001 !important;
}
html.phone.pxl-preview-fs .canvas-wrap.fs-on .sbx-vo-gear {
  top: calc(calc(12px * var(--ui, 1)) + env(safe-area-inset-top, 0px)) !important;
  right: calc(calc(12px * var(--ui, 1)) + calc(108px * var(--ui, 1)) + env(safe-area-inset-right, 0px)) !important;
  z-index: 2147483001 !important;
}

/* --- Export: custom in-app menus (replace native <select>) + denser refresh --- */
#exportPop .ex-dd {
  position: relative;
  display: grid;
  grid-template-columns: calc(88px * var(--ui, 1)) minmax(0, 1fr);
  align-items: center;
  gap: calc(8px * var(--ui, 1));
}
#exportPop .ex-dd-sel {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: calc(8px * var(--ui, 1));
  width: 100%;
  height: calc(36px * var(--ui, 1));
  min-height: calc(36px * var(--ui, 1));
  padding: 0 calc(10px * var(--ui, 1));
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 0;
  background: #0b0c0d;
  color: #fff;
  font: 600 calc(13px * var(--ui, 1))/1 var(--font-sans, sans-serif);
  cursor: pointer;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}
#exportPop .ex-dd-sel.open,
#exportPop .ex-dd-sel:focus-visible {
  border-color: #fff;
  outline: none;
}
#exportPop .ex-dd-sel .ex-dd-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#exportPop .ex-dd-sel > i,
#exportPop .ex-dd-sel > i svg {
  flex: none;
  width: calc(10px * var(--ui, 1));
  height: calc(10px * var(--ui, 1));
  color: rgb(255 255 255 / .55);
  display: grid;
  place-items: center;
}
#exportPop .ex-dd-sel.open > i { transform: rotate(180deg); }
#exportPop .ex-dd-menu {
  position: absolute;
  left: calc(88px * var(--ui, 1));
  right: 0;
  top: calc(100% + calc(4px * var(--ui, 1)));
  z-index: 50;
  max-height: min(48dvh, calc(280px * var(--ui, 1)));
  overflow: auto;
  padding: calc(4px * var(--ui, 1)) 0;
  background: #111214;
  border: 1px solid rgb(255 255 255 / .2);
  box-shadow: 0 18px 48px -18px rgb(0 0 0 / .8);
}
#exportPop .ex-dd-menu[hidden] { display: none !important; }
#exportPop .ex-dd-opt {
  display: flex;
  align-items: center;
  gap: calc(10px * var(--ui, 1));
  width: 100%;
  min-height: calc(40px * var(--ui, 1));
  padding: 0 calc(12px * var(--ui, 1));
  border: 0;
  background: none;
  color: #fff;
  font: 600 calc(13.5px * var(--ui, 1))/1.2 var(--font-sans, sans-serif);
  text-align: left;
  cursor: pointer;
}
#exportPop .ex-dd-opt i {
  flex: none;
  width: calc(14px * var(--ui, 1));
  height: calc(14px * var(--ui, 1));
  display: grid;
  place-items: center;
}
#exportPop .ex-dd-opt i svg { width: calc(12px * var(--ui, 1)); height: calc(12px * var(--ui, 1)); }
#exportPop .ex-dd-opt:hover,
#exportPop .ex-dd-opt:focus-visible { background: rgb(255 255 255 / .08); outline: none; }
#exportPop .ex-dd-opt.on { background: rgb(255 255 255 / .1); }

html.phone #exportPop .ex-dd {
  grid-template-columns: calc(76px * var(--ui, 1)) minmax(0, 1fr) !important;
  gap: calc(6px * var(--ui, 1)) !important;
}
html.phone #exportPop .ex-dd-menu {
  left: calc(76px * var(--ui, 1)) !important;
  max-height: min(42dvh, calc(240px * var(--ui, 1))) !important;
}
html.phone #exportPop .ex-dd-opt { min-height: calc(44px * var(--ui, 1)) !important; font-size: calc(14px * var(--ui, 1)) !important; }
html.phone #exportPop .ex-dd-sel {
  height: calc(40px * var(--ui, 1)) !important;
  min-height: calc(40px * var(--ui, 1)) !important;
  font-size: calc(13.5px * var(--ui, 1)) !important;
  padding: 0 calc(12px * var(--ui, 1)) !important;
  border-color: rgb(255 255 255 / .28) !important;
}
/* Export sheet rhythm — file → loop → picks → target → go */
html.phone .m-pane #exportPop .ex-dd-grid {
  margin: calc(10px * var(--ui, 1)) 0 calc(4px * var(--ui, 1)) !important;
  gap: calc(8px * var(--ui, 1)) !important;
  padding: calc(10px * var(--ui, 1)) !important;
  border: 1px solid rgb(255 255 255 / .12) !important;
  background: rgb(255 255 255 / .03) !important;
}
html.phone .m-pane #exportPop .sp-ex {
  margin-top: calc(10px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .sp-ex-list {
  gap: calc(6px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .sp-chip {
  min-height: calc(36px * var(--ui, 1)) !important;
  padding: 0 calc(12px * var(--ui, 1)) !important;
  font-size: calc(12.5px * var(--ui, 1)) !important;
}
html.phone .m-pane #exportPop .ex-file,
html.phone .m-pane #exportPop .ex-meta,
html.phone .m-pane #exportPop .spec {
  margin-top: calc(10px * var(--ui, 1)) !important;
  padding: calc(10px * var(--ui, 1)) calc(12px * var(--ui, 1)) !important;
  border: 1px solid rgb(255 255 255 / .12) !important;
  background: rgb(8 8 10 / .55) !important;
  font-size: calc(11.5px * var(--ui, 1)) !important;
  line-height: 1.4 !important;
}


/* =====================================================================
   t1195–t1201u: Pick a Preset = looks only; denser Profile/Wedge selects;
   camera movement toggle hit + z; (StagePXLs hero chrome lives in oct27)
   ===================================================================== */

/* Pick a Preset sheet: only My Looks (+ New/Save / sub-presets / ⋯) */
html.phone .m-presets-glass .m-presets,
html.phone .m-presets-glass .m-look-acts,
html.phone .m-presets-glass .m-field:has(.m-presets),
html.phone .m-presets-glass .m-field:has(.seg),
html.phone .m-pane[data-pane="looks"] .m-presets,
html.phone .m-pane[data-pane="looks"] .m-look-acts,
html.phone .m-pane[data-pane="looks"] .m-field:has(.m-presets),
html.phone .m-pane[data-pane="looks"] .m-field:has(.seg) {
  display: none !important;
}
html.phone .m-presets-glass .m-field-hint,
html.phone .m-presets-glass .m-look > .m-field > .note {
  display: none !important;
}
html.phone .m-presets-glass .m-look > .m-field:first-child {
  margin-top: 0 !important;
}
html.phone .m-presets-glass .m-mine .mp-list {
  height: min(52dvh, calc(420px * var(--ui, 1))) !important;
  min-height: calc(180px * var(--ui, 1));
}

/* Controls: Profile→Wedge (and sibling) selects match 36px slider rows */
html.phone .ctl .sel-pill {
  height: calc(36px * var(--ui, 1)) !important;
  min-height: calc(36px * var(--ui, 1)) !important;
  max-height: calc(36px * var(--ui, 1)) !important;
  font-size: calc(13px * var(--ui, 1)) !important;
  padding: 0 calc(12px * var(--ui, 1)) !important;
  border-radius: 0 !important;
}
html.phone .ctl:has(>.sel-pill),
html.phone .ctl:has(.sel-pill.wide) {
  margin-top: 0 !important;
  padding-top: calc(4px * var(--ui, 1)) !important;
  padding-bottom: calc(4px * var(--ui, 1)) !important;
  min-height: calc(36px * var(--ui, 1)) !important;
}
html.phone .ctl:has(>.sel-pill) .ctl-top,
html.phone .ctl:has(.sel-pill.wide) .ctl-top {
  min-height: calc(28px * var(--ui, 1)) !important;
  margin-bottom: calc(4px * var(--ui, 1)) !important;
  font-size: calc(12px * var(--ui, 1)) !important;
}
html.phone .ctl .sel-pill .k { font-size: calc(10px * var(--ui, 1)) !important; }

/* Camera movement (drift) — reachable above FS stage-bar, denser hit */
html.phone .sbx-vo { z-index: 9 !important; }
html.phone .sbx-vo-drift {
  top: auto !important;
  bottom: calc(8px * var(--ui, 1)) !important;
  right: calc(8px * var(--ui, 1)) !important;
  left: auto !important;
  width: calc(40px * var(--ui, 1)) !important;
  height: calc(40px * var(--ui, 1)) !important;
  min-width: calc(40px * var(--ui, 1)) !important;
  min-height: calc(40px * var(--ui, 1)) !important;
  z-index: 10 !important;
  pointer-events: auto !important;
}
html.phone .sbx-vo-drift::before {
  content: "" !important;
  position: absolute !important;
  inset: calc(-6px * var(--ui, 1)) !important;
}
html:not(.phone) .sbx-vo-drift {
  top: auto !important;
  bottom: calc(12px * var(--ui, 1)) !important;
  right: calc(12px * var(--ui, 1)) !important;
  left: auto !important;
  z-index: 10 !important;
}
html.phone .canvas-wrap.fs-on .sbx-vo-drift {
  bottom: calc(calc(64px * var(--ui, 1)) + env(safe-area-inset-bottom, 0px)) !important;
}

/* t1205u: phone fullscreen — no ghost boxes, one clean Exit, no sheet/tab bar */
html.phone:is(.pxl-app-fs, .pxl-app-fs-lite, .pxl-preview-fs):not(.cine-ui) :is(.m-tabs, .m-sheet, .m-grab),
html.phone:not(.cine-ui) body.pxl-app-fs :is(.m-tabs, .m-sheet) { display: none !important; } /* t1413u: the overlay toggle brings them back */
html.phone.pxl-app-fs main.app { bottom: 0 !important; padding-bottom: 0 !important; }
html.phone header.nav button { overflow: hidden !important; }
html.phone header.nav button > span:empty { display: none !important; }
html.phone.pxl-app-fs header.nav .fs-btn.nav-fs {
  width: auto !important; min-width: calc(40px * var(--ui, 1)) !important; height: calc(40px * var(--ui, 1)) !important; padding: 0 calc(12px * var(--ui, 1)) !important;
  gap: calc(6px * var(--ui, 1)) !important; flex-direction: row !important; white-space: nowrap !important;
  font: 600 calc(12px * var(--ui, 1))/1 var(--font-sans, sans-serif) !important; color: #fff !important;
  border: 1px solid rgb(255 255 255 / .35) !important; background: rgb(17 18 20 / .88) !important;
}
html.phone.pxl-app-fs header.nav .fs-btn.nav-fs > span { display: inline !important; position: static !important; border: 0 !important; background: none !important; padding: 0 !important; margin: 0 !important; }
html.phone.pxl-preview-fs .canvas-wrap.fs-on > :is(div, button, span):empty:not(canvas) { display: none !important; }

/* t1205u: Pick a Preset — looks list fills the sheet and scrolls */
html.phone .m-presets-glass .m-pg-body { display: flex !important; flex-direction: column !important; overflow: hidden !important; }
html.phone .m-presets-glass .m-pg-body > :has(.m-mine) { flex: 1 1 auto !important; min-height: 0 !important; display: flex !important; flex-direction: column !important; }
html.phone .m-presets-glass .m-pg-body :has(> .m-mine) { flex: 1 1 auto !important; min-height: 0 !important; display: flex !important; flex-direction: column !important; }
html.phone .m-presets-glass .m-pg-body :has(> .m-mine) > :not(.m-mine) { flex: none !important; }
html.phone .m-presets-glass .m-mine { flex: 1 1 auto !important; min-height: 0 !important; display: flex !important; flex-direction: column !important; }
html.phone .m-presets-glass .m-mine > :not(.mp-list) { flex: none !important; }
html.phone .m-presets-glass .m-mine .mp-list { flex: 1 1 auto !important; height: auto !important; max-height: none !important; min-height: 0 !important; overflow-y: auto !important; }
