/* Nov 10 UI fixes (t1677u–t1680u). Loaded last. */

/* t1677u: PXL GEN on a phone had two Full Screen buttons (header + preview). Keep the header's (#navFsBtn); the preview
   one only shows while the preview is already full screen (#fsBtn is then the Exit button). */
/* the header's #navFsBtn is the one Full Screen button at every size and in every view; the preview's #fsBtn is only the Exit
   control while full screen is on (there is no header then) */
html:not(.pxl-fs):not(.pxl-app-fs):not(.pxl-preview-fs) #fsBtn.fs-btn-view { display: none !important; }

/* t1678u: Presets panel Save / + New / ⋯ were 44px tall and bloated their rows. Compact; the tap target stays 44px via ::after. */
html.phone body .mp .mp-cur-v2 { padding: 7px 10px 7px 12px !important; gap: 8px !important; }
html.phone body .mp .mp-cur-v2 .mp-cur-save { min-height: 30px !important; height: 30px !important; padding: 0 11px !important; font-size: 12px !important; gap: 5px; position: relative; }
html.phone body .mp .mp-cur-v2 .mp-more { width: 30px !important; height: 30px !important; min-height: 30px !important; position: relative; }
html.phone body .mp .mp-cur-v2 .mp-cur-save::after,
html.phone body .mp .mp-cur-v2 .mp-more::after { content: ""; position: absolute; inset: -7px -3px; }
html.phone body .mp .mp-sec-list .mp-new:not(#_) { min-height: 28px !important; height: 28px !important; padding: 0 9px !important; font-size: 11.5px !important; position: relative; }
html.phone body .mp .mp-sec-list .mp-new::after { content: ""; position: absolute; inset: -8px -3px; }
html.phone body .mp .mp-sec-h, html.phone body .mp .mp-sec-head { min-height: 0 !important; padding-top: 6px !important; padding-bottom: 6px !important; }

/* t1679u: Playback More = a small panel that always fits the viewport, small X in the header, no big Close button. */
html.phone .mx-more-sheet.mx-more-side {
  display: flex !important; flex-direction: column; overflow: hidden;
  max-height: min(60dvh, calc(100dvh - 130px - env(safe-area-inset-bottom))) !important;
  padding-bottom: 0 !important;
}
html.phone .mx-more-sheet.mx-more-side .mx-act-head { position: relative; flex: none; padding: 10px 46px 8px 12px !important; }
html.phone .mx-more-sheet.mx-more-side .mx-more-list { flex: 1 1 auto; min-height: 0; max-height: none !important; overflow-y: auto; overscroll-behavior: contain; padding: 2px 0 6px !important; }
.mx-more-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; background: transparent; border: 1px solid rgb(255 255 255 / .22); color: #fff; border-radius: 2px; cursor: pointer; }
.mx-more-x svg { width: 10px; height: 10px; }
.mx-more-x::after { content: ""; position: absolute; inset: -8px; }
.mx-undo-row { display: flex; align-items: center; border-bottom: 1px solid rgb(255 255 255 / .05); }
.mx-undo-row .mx-act-item { flex: 1 1 auto; width: auto; border-bottom: 0; }
.mx-hist-link { flex: none; margin-right: 10px; padding: 4px 8px; background: transparent; border: 0; color: rgb(255 255 255 / .6); font: 500 11px var(--font-mono, monospace); letter-spacing: .06em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; position: relative; }
.mx-hist-link::after { content: ""; position: absolute; inset: -8px -2px; }
.mx-loop-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; border-bottom: 1px solid rgb(255 255 255 / .05); }
.mx-loop-row .mx-more-k { font: 500 12px var(--font-mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: rgb(255 255 255 / .6); }
.mx-loop-st { display: inline-flex; align-items: center; border: 1px solid rgb(255 255 255 / .2); }
.mx-loop-st button { width: 34px; height: 30px; background: transparent; border: 0; color: #fff; font: 600 16px/1 var(--font-sans, sans-serif); cursor: pointer; }
.mx-loop-st b { min-width: 46px; text-align: center; font-size: 13px; font-weight: 600; }

/* t1680u: Track sheet "frozen" bug. The Close button's tap-target ::after (mobilefit.css) is position:absolute, but the
   button was not positioned, so it stretched over the whole sheet and every tap closed it. Position the ring buttons. */
.trk .icon.ring, .pop .icon.ring, .mp-dialog .icon.ring { position: relative; }

/* t1680u: Song layer. Phones show the Song button on the main bar only while the Song layer is on. */
html.phone:not(.has-song-layer) .mx-song { display: none !important; }
html.phone:not(.land) .dock.is-slim > .mx-song:not(#_) { display: inline-grid !important; place-items: center; flex: none; width: 40px !important; height: 40px !important; margin: 0 !important; border: 1px solid rgb(255 255 255 / .22) !important; background: transparent !important; color: #fff; }
html.phone:not(.land):not(.has-song-layer) .dock.is-slim > .mx-song:not(#_) { display: none !important; }
.song-row { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 8px 6px 12px; border-bottom: 1px solid rgb(255 255 255 / .06); }
.song-row .sr-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; background: rgb(255 255 255 / .06); color: var(--accent, #fff); }
.song-row .sr-ic svg { width: 16px; height: 16px; }
.song-row .sr-main { flex: 1 1 auto; min-width: 0; text-align: left; background: none; border: 0; padding: 4px 0; color: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.song-row .sr-main b { font-size: 14px; font-weight: 600; }
.song-row .sr-main small { font: 400 10.5px var(--font-mono, monospace); letter-spacing: .04em; color: rgb(255 255 255 / .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-row .sr-x { flex: none; width: 28px; height: 28px; display: grid; place-items: center; background: transparent; border: 0; color: rgb(255 255 255 / .55); cursor: pointer; position: relative; }
.song-row .sr-x svg { width: 10px; height: 10px; }
.song-row .sr-x::after { content: ""; position: absolute; inset: -8px; }

/* Nov 10: Preset block above the Layer Stack on narrow desktop/tablet columns (~1024): the four tools (New blank look, Save as new
   preset, Rename, Random look) crowded the name dropdown down to "Reede…". Same height: the tools sit on the "Preset" label row as
   22px icon chips (tooltips kept), the name dropdown gets the full width underneath. */
@media (max-width: 1279.98px) {
  html:not(.phone) #presetPrimary.preset-primary { display: grid !important; grid-template-columns: minmax(0, 1fr) repeat(4, 22px); column-gap: 4px; row-gap: 3px; align-items: center; padding: 5px 10px 5px 12px; }
  html:not(.phone) #presetPrimary .preset-primary-k { grid-column: 1; grid-row: 1; }
  html:not(.phone) #presetPrimary #presetSel.pn-host:not(#_) { display: contents !important; }
  html:not(.phone) #presetPrimary #presetSel.pn-host > .pp-named { grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: 100%; min-width: 0; height: 23px !important; min-height: 23px !important; }
  html:not(.phone) #presetPrimary #presetSel.pn-host > .pn-new:not(.pn-ok):not(.pn-x) { grid-row: 1; width: 22px !important; height: 22px !important; min-height: 22px !important; min-width: 22px !important; padding: 0 !important; justify-self: end; }
  html:not(.phone) #presetPrimary #presetSel.pn-host > .pn-new:not(.pn-ic) { grid-column: 2; }
  html:not(.phone) #presetPrimary #presetSel.pn-host > .pn-save { grid-column: 3; }
  html:not(.phone) #presetPrimary #presetSel.pn-host > .pn-ren { grid-column: 4; }
  html:not(.phone) #presetPrimary #presetSel.pn-host > .pn-rand { grid-column: 5; }
  html:not(.phone) #presetPrimary #presetSel.pn-host > .pn-new svg { width: 12px; height: 12px; }
  html:not(.phone) #presetPrimary #presetSel.pn-host > .pn-new > span { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; }
  html:not(.phone) #presetPrimary #presetSel.pn-host > :is(.pn-ok, .pn-x) { grid-column: 1 / -1; grid-row: 3; }
}

/* ===== Nov 10: full-screen GEN = separate glass windows (Presets, Layers, Controls) floating over the stage ===== */
html.pxl-cine.cine-ui:not(.phone) body{--n10-glass:rgb(12 14 18 / .52);--n10-edge:rgb(255 255 255 / .12)}
/* the dock stays one inset bar, centered under the stage, never pushed sideways by the windows */
html.pxl-cine.cine-ui:not(.cine-compact){--cine-dock-l:calc(16px + var(--gen-safe-l));--cine-dock-r:calc(16px + var(--gen-safe-r))}
html.pxl-cine.cine-ui:not(.cine-compact):is(.cine-show-layers,.cine-show-controls){--cine-dock-l:calc(16px + var(--gen-safe-l));--cine-dock-r:calc(16px + var(--gen-safe-r))}
html.pxl-cine body #canvasWrap.fs-on #cinemaDock:not(#_){bottom:calc(14px + var(--gen-safe-b));max-width:1120px;margin-inline:auto;border-radius:4px;background:var(--n10-glass,rgb(12 14 18 / .52));-webkit-backdrop-filter:blur(14px) saturate(1.2);backdrop-filter:blur(14px) saturate(1.2);border:1px solid rgb(255 255 255 / .12)}
html.pxl-cine.cine-ui:not(.cine-compact) body #canvasWrap.fs-on #cinemaDock:not(#_){padding:6px 10px}
/* stage picker: small stage icon + breathing room, one line */
html.pxl-cine body #cinemaDock #stageBar .sbx-ss-trig:not(#_){display:inline-flex;align-items:center;gap:7px;padding:0 10px 0 9px;white-space:nowrap}
html.pxl-cine body #cinemaDock #stageBar .sbx-ss-k:not(#_){display:inline-flex;align-items:center;gap:6px}
html.pxl-cine body #cinemaDock #stageBar .sbx-ss-k:not(#_)::before{content:"";width:14px;height:14px;flex:none;background:currentColor;opacity:.85;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4'%3E%3Cpath d='M1.5 4h13M3 4v5.5h10V4M1.5 12.5h13M5 9.5v3M11 9.5v3'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4'%3E%3Cpath d='M1.5 4h13M3 4v5.5h10V4M1.5 12.5h13M5 9.5v3M11 9.5v3'/%3E%3C/svg%3E") center/contain no-repeat}
html.pxl-cine body #cinemaDock #stageBar .sbx-ss-cur:not(#_){margin-left:2px}
/* camera lock lives in Render Settings (Camera Lock row), not as a loose dock button */
html.pxl-cine body #cinemaDock .sbx-vo-drift:not(#_){display:none!important}
html.phone .cine-presets-btn{display:none!important}
/* Presets window: top-left, compact transparent glass, toggled by the Presets button */
@media (min-width:1px){
html.pxl-cine.cine-ui:not(.phone) body #layersPanel:not(#_){display:flex!important;flex-direction:column;overflow:visible!important;top:calc(64px + var(--gen-safe-t))!important;bottom:auto!important;height:auto!important;max-height:calc(100dvh - 64px - var(--gen-safe-t) - var(--cine-dock-h,120px) - 28px - var(--gen-safe-b))!important;background:var(--n10-glass)!important;border:1px solid var(--n10-edge)!important;border-radius:4px!important;-webkit-backdrop-filter:blur(14px) saturate(1.2)!important;backdrop-filter:blur(14px) saturate(1.2)!important;box-shadow:0 8px 28px rgb(0 0 0 / .35)!important;padding:0!important}
html.pxl-cine.cine-ui:not(.phone):not(.cine-show-layers):not(.cine-show-presets) body #layersPanel:not(#_){display:none!important}
html.pxl-cine.cine-ui:not(.phone):not(.cine-show-layers) body #layersPanel:not(#_){height:0!important;border:0!important;background:none!important;box-shadow:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;pointer-events:none}
html.pxl-cine.cine-ui:not(.phone):not(.cine-show-layers) body #layersPanel > :not(#presetPrimary):not(#_){display:none!important}
html.pxl-cine.cine-ui:not(.phone) body #layersPanel > #layerList:not(#_){flex:1 1 auto;min-height:0;overflow:auto}
html.pxl-cine.cine-ui:not(.phone) body #layersPanel :is(.desk-split,.desk-grab):not(#_){display:none!important}
html.pxl-cine.cine-ui:not(.phone) body #layersPanel > #presetPrimary:not(#_){position:absolute!important;left:0;bottom:calc(100% + 8px);top:auto;box-sizing:border-box;width:min(292px,calc(100vw - 32px));max-width:none;margin:0!important;padding:6px 8px!important;display:flex!important;align-items:center;background:var(--n10-glass)!important;border:1px solid var(--n10-edge)!important;border-radius:4px!important;-webkit-backdrop-filter:blur(14px) saturate(1.2);backdrop-filter:blur(14px) saturate(1.2);box-shadow:0 8px 28px rgb(0 0 0 / .35);pointer-events:auto}
html.pxl-cine.cine-ui:not(.phone):not(.cine-show-presets) body #layersPanel > #presetPrimary:not(#_){display:none!important}
html.pxl-cine.cine-ui:not(.phone) body #presetPrimary .preset-primary-k:not(#_){display:none!important}
html.pxl-cine.cine-ui:not(.phone) body #presetPrimary #presetSel:not(#_){margin:0!important}
/* Controls window: glass, no solid grey header strip, sized to its content */
html.pxl-cine.cine-ui:not(.phone) body #inspector:not([hidden]):not(#_){bottom:auto!important;height:auto!important;max-height:calc(100dvh - 116px - var(--gen-safe-t) - var(--cine-dock-h,120px) - 28px - var(--gen-safe-b))!important;background:var(--n10-glass)!important;border:1px solid var(--n10-edge)!important;border-radius:4px!important;-webkit-backdrop-filter:blur(14px) saturate(1.2)!important;backdrop-filter:blur(14px) saturate(1.2)!important;box-shadow:0 8px 28px rgb(0 0 0 / .35)!important}
html.pxl-cine.cine-ui:not(.phone) body #inspector .insp-head:not(#_){background:transparent!important;border-bottom:1px solid rgb(255 255 255 / .08)!important;box-shadow:none!important}
html.pxl-cine.cine-ui:not(.phone) body #inspector :is(.sec,.sec-title):not(#_){background:transparent!important}
}
html.pxl-cine.cine-ui:not(.phone) body #presetPrimary #presetSel:not(#_){display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:4px!important;width:100%!important}
html.pxl-cine.cine-ui:not(.phone) body #presetPrimary #presetSel > .sel-pill:not(#_){flex:1 1 auto;min-width:0!important;height:32px!important;width:auto!important}
html.pxl-cine.cine-ui:not(.phone) body #presetPrimary #presetSel > .pn-new:not(#_){flex:0 0 32px;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;margin:0!important}
html.pxl-cine.cine-ui:not(.phone) body #presetPrimary #presetSel > .pn-rand:not(#_){order:9}

/* Nov 10: "Still having issues?" popover: tips stay collapsed behind one "Try these tips" line */
.slowtip-pop .st-dd{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:calc(34px * var(--ui, 1));padding:0 10px;border:1px solid rgb(255 255 255/.18);border-radius:2px;background:rgb(255 255 255/.04);color:#fff;font:500 calc(12px * var(--ui, 1))/1 var(--font-sans,"DM Sans",system-ui,sans-serif);cursor:pointer}
.slowtip-pop .st-dd:hover{border-color:rgb(255 255 255/.4)}
.slowtip-pop .st-dd svg{transition:transform .2s}
.slowtip-pop .st-dd[aria-expanded=true] svg{transform:rotate(180deg)}
.slowtip-pop .st-dd + ol{margin-top:calc(10px * var(--ui, 1))}
.slowtip-pop ol[hidden]{display:none}
.slowtip-pop .st-dd:focus-visible{outline:2px solid #36f07a;outline-offset:2px}

/* ===== Nov 10b ===== */
/* 1a. Viewport top-right: Render Settings (sun) + Full Screen read as one joined pair, flush in the corner */
html:not(.phone):not(.pxl-cine) .canvas-wrap:not(.fs-on) .fs-btn.fs-btn-view,
html:not(.phone):not(.pxl-cine) .canvas-wrap:not(.fs-on) .sbx-vo-gear { top: 10px !important; width: 28px !important; height: 28px !important; background: rgb(8 9 10 / .72) !important; border: 1px solid rgb(255 255 255 / .22) !important; border-radius: 0 !important; backdrop-filter: blur(6px); }
html:not(.phone):not(.pxl-cine) .canvas-wrap:not(.fs-on) .fs-btn.fs-btn-view { right: 10px !important; }
html:not(.phone):not(.pxl-cine) .canvas-wrap:not(.fs-on) .sbx-vo-gear { right: 37px !important; } /* 10 + 28 - 1: borders overlap into one divider */
html:not(.phone):not(.pxl-cine) .canvas-wrap:not(.fs-on) .sbx-vo-drift { top: 41px !important; right: 37px !important; }

/* 1b. Right panel header (Effect · Finish / name / 03/03 / i / three tools): one tight labelled row */
html:not(.phone) .insp-head { display: grid !important; grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "ey n i acts" "t t t acts"; column-gap: 8px; row-gap: 2px; align-items: center; padding: 10px 12px 10px 14px !important; }
html:not(.phone) .insp-head .row1 { display: contents !important; }
html:not(.phone) .insp-head .row1 .eyebrow { grid-area: ey; margin: 0 !important; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px !important; }
html:not(.phone) .insp-head .acts { grid-area: acts; align-self: center; display: flex; gap: 4px !important; }
html:not(.phone) .insp-head .acts .icon { width: 26px !important; height: 26px !important; min-width: 0 !important; }
html:not(.phone) .insp-head .acts .icon svg { width: 12px !important; height: 12px !important; }
html:not(.phone) .insp-head .ttl { display: contents !important; }
html:not(.phone) .insp-head .ttl .t { grid-area: t; display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important; max-width: none !important; overflow-wrap: normal !important; font-size: 17px !important; }
html:not(.phone) .insp-head .ttl .n { grid-area: n; display: block; flex: none; font-size: 10px !important; margin: 0 !important; }
html:not(.phone) .insp-head .ttl .info-btn { grid-area: i; flex: none; align-self: center; }
html:not(.phone) .insp-head .row1 .eyebrow { grid-area: ey; }

/* 1c. Look Manager: save state sits beside Save in the header; the name row also carries Revert To Saved + last saved */
html:not(.phone):not(.pxl-cine) body .sp-bar.sp-v3 .sp-v3-right { gap: 8px !important; }
html:not(.phone):not(.pxl-cine) body .sp-v3-right .sp-stat { flex: none; display: inline-flex; align-items: center; gap: 6px; margin: 0 !important; font: 500 11px/1 "DM Sans", sans-serif; white-space: nowrap; }
html:not(.phone):not(.pxl-cine) body .sp-v3-right .sp-stat.dirty { color: #f2b441; }
html:not(.phone):not(.pxl-cine) body .sp-v3-right .sp-save.dirty { border-color: #f2b441 !important; color: #fff; }
html:not(.phone):not(.pxl-cine) body .sp-bar.sp-v3 .sp-v3-name { flex-wrap: nowrap !important; align-items: center !important; gap: 8px !important; }
html:not(.phone):not(.pxl-cine) body .sp-bar.sp-v3 .sp-v3-name .sp-hname b { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
html:not(.phone):not(.pxl-cine) body .sp-bar.sp-v3 .sp-v3-name .sp-revrow { display: inline-flex !important; align-items: center; flex: none !important; margin-left: auto; min-height: 0 !important; gap: 8px !important; }
html:not(.phone):not(.pxl-cine) body .sp-bar.sp-v3 .sp-v3-name .sp-revert { height: 24px !important; padding: 0 8px; }

/* Nov 11 (designer M4): Look Manager sync status never wraps; it ellipsizes inside the header cell */
html:not(.phone) body .sp-v3-right .sp-sync { white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 104px; flex: 0 1 auto; font: 500 11px/1 "DM Sans", sans-serif; }
