/* uberdesigner studios, the shared frame (24 Nov). On top of the "Tool workspace, second pass" block in shell.css,
   which draws the stage, the glass bar, the inspector and the strip. Everything here is under body.sx-page. */
body.sx-page { --sx-glass: #161617b8; --sx-line: #ffffff1a; --sx-ink-2: #8d8d90; --sx-ease: cubic-bezier(.22, 1, .36, 1); --sx-spring: cubic-bezier(.34, 1.4, .64, 1); }
body.sx-page .sx2.has-strip .st__view { padding-bottom: 152px; }
body.sx-page .sx2 .st__view { pointer-events: auto; }
body.sx-page .sx2 .st__view > canvas, body.sx-page .sx2 .st__view > .sx2__pic { grid-area: 1 / 1; }

/* the tabs on top: a white pill slides under the chosen one, for any number of tabs */
html body.ds.sx-page .sx2 .st__modes::before { width: calc((100% - 8px) / var(--n, 2)) !important; translate: calc(100% * var(--i, 0)) 0 !important; }

/* the inspector's head: undo, redo, compare, reset */
body.sx-page .sx2__hist { display: flex; align-items: center; gap: 2px; margin-right: -10px; }
body.sx-page .sx2__hist button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: #fff; cursor: pointer; transition: background-color .2s, opacity .2s, transform .3s var(--sx-spring); }
body.sx-page .sx2__hist button svg { width: 16px; height: 16px; }
body.sx-page .sx2__hist button:hover:not(:disabled) { background: #ffffff14; }
body.sx-page .sx2__hist button:active:not(:disabled) { transform: scale(.9); }
body.sx-page .sx2__hist button:disabled { opacity: .25; cursor: default; }
body.sx-page .sx2__hist #st-reset { width: auto; padding: 0 10px; margin: 0 0 0 4px; font: inherit; font-size: 14px; color: var(--sx-ink-2); }
body.sx-page .sx2__hist #st-reset:hover { color: #fff; }
body.sx-page .sx2.is-cmp #sx-cmp { background: #fff; color: #0a0a0b; }

/* groups of settings */
body.sx-page .sx2 .st__panel { gap: 0; padding-top: 4px; }
body.sx-page .sx2__g { display: flex; flex-direction: column; gap: 16px; padding: 20px 0; border-top: 1px solid #ffffff0f; }
body.sx-page .sx2__g:first-child { border-top: 0; padding-top: 8px; }
body.sx-page .sx2__gt { margin: 0; font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: .02em; color: #5c5c60; text-transform: none; }
body.sx-page .sx2 .ctl > span { align-items: center; gap: 8px; }
body.sx-page .sx2 .ctl > span em { margin-left: auto; }
body.sx-page .sx2__pro { display: inline-flex; align-items: center; height: 16px; padding: 0 6px; border-radius: 999px; background: #ffffff1f; font-size: 10px; line-height: 1; font-style: normal; letter-spacing: .02em; color: #fff; }
body.sx-page .chips3 button[aria-pressed="true"] .sx2__pro, body.sx-page .sx__strip [aria-pressed="true"] .sx2__pro { background: #0a0a0b1a; color: #0a0a0b; }
body.sx-page .sx__strip .sx2__pro { background: #ffffff24; }

/* a segmented switch whose white pill slides */
body.sx-page .sx2__seg { position: relative; isolation: isolate; }
body.sx-page .sx2__seg::before { content: ""; position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n, 2)); border-radius: 999px; background: #fff; translate: calc(100% * var(--i, 0)) 0; transition: translate .5s var(--sx-spring); }
body.sx-page .chips3.sx2__seg button[aria-pressed="true"] { background: transparent !important; color: #0a0a0b !important; }
body.sx-page .chips3.sx2__seg button { padding: 0 8px; transition: color .3s, background-color .2s; }
body.sx-page .chips3.sx2__seg button:not([aria-pressed="true"]):hover { background: #ffffff14 !important; }
html body.ds.sx-page .chips3.sx2__seg:has(> button:nth-child(4)) { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; padding: 4px; background: #ffffff0f; box-shadow: inset 0 0 0 1px #ffffff0f; }
html body.ds.sx-page .chips3.sx2__seg:has(> button:nth-child(4)) button { background: transparent !important; font-size: 13px; }
html body.ds.sx-page .chips3.sx2__seg:has(> button:nth-child(4)) button[aria-pressed="true"] { color: #0a0a0b !important; }
html body.ds.sx-page .sx2__sc .chips3.sx2__seg button { font-size: 14px; }

/* a switch */
body.sx-page .sx2__tog { flex-direction: row !important; align-items: center; justify-content: space-between; cursor: pointer; }
body.sx-page .sx2__tog > span { flex-direction: column; align-items: flex-start !important; gap: 0 !important; color: #fff !important; }
body.sx-page .sx2__tog > span small { font-size: 13px; line-height: 18px; color: var(--sx-ink-2); }
body.sx-page .sx2__tog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
body.sx-page .sx2__tog > i { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: #ffffff24; transition: background-color .3s; }
body.sx-page .sx2__tog > i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px #0006; transition: translate .4s var(--sx-spring); }
body.sx-page .sx2__tog input:checked + i { background: #fff; }
body.sx-page .sx2__tog input:checked + i::after { translate: 16px 0; background: #0a0a0b; }
body.sx-page .sx2__tog input:focus-visible + i { outline: 2px solid #fff; outline-offset: 3px; }

/* text fields */
body.sx-page .sx2__in { box-sizing: border-box; width: 100%; padding: 10px 14px; border: 0; border-radius: 12px; background: #ffffff0f; box-shadow: inset 0 0 0 1px #ffffff14; color: #fff; font: inherit; font-size: 15px; line-height: 22px; resize: vertical; outline: none; transition: box-shadow .2s, background-color .2s; }
body.sx-page .sx2__in:hover { background: #ffffff14; }
body.sx-page .sx2__in:focus { box-shadow: inset 0 0 0 1.5px #fff; background: #ffffff0a; }
body.sx-page .sx2__in::placeholder { color: #5c5c60; }

/* our own dropdown, never the system one */
body.sx-page .sx2__dd { position: relative; }
body.sx-page .sx2__ddb { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 12px 0 14px; border: 0; border-radius: 12px; background: #ffffff0f; box-shadow: inset 0 0 0 1px #ffffff14; color: #fff; font: inherit; font-size: 15px; text-align: left; cursor: pointer; transition: background-color .2s; }
body.sx-page .sx2__ddb:hover { background: #ffffff17; }
body.sx-page .sx2__ddb span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.sx-page .sx2__ddb svg { width: 14px; height: 14px; color: var(--sx-ink-2); transition: rotate .3s var(--sx-spring); }
body.sx-page .sx2__ddb[aria-expanded="true"] svg { rotate: 180deg; }
body.sx-page .sx2__ddl { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px; overflow-y: auto; padding: 6px; border-radius: 16px; background: #1b1b1c; box-shadow: inset 0 0 0 1px #ffffff1a, 0 24px 48px -16px #000; scrollbar-width: thin; scrollbar-color: #ffffff29 transparent; animation: sx2-pop .25s var(--sx-ease); }
body.sx-page .sx2__ddl button { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: #fff; font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
body.sx-page .sx2__ddl button:hover { background: #ffffff14; }
body.sx-page .sx2__ddl button[aria-selected="true"] { background: #fff; color: #0a0a0b; }
@keyframes sx2-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* the export menu */
body.sx-page .sx2__exp { position: relative; }
body.sx-page .sx2__menu { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: 288px; padding: 6px; border-radius: 20px; background: #1b1b1cf2; -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px #ffffff1a, 0 32px 64px -20px #000; transform-origin: top right; animation: sx2-pop .28s var(--sx-ease); }
body.sx-page .sx2__menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 14px; background: transparent; color: #fff; font: inherit; text-align: left; cursor: pointer; outline: none; transition: background-color .15s; }
body.sx-page .sx2__menu button:is(:hover, :focus-visible) { background: #ffffff14; }
body.sx-page .sx2__menu button:disabled { opacity: .35; cursor: default; }
body.sx-page .sx2__mi { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: #ffffff0f; }
body.sx-page .sx2__mi svg { width: 16px; height: 16px; }
body.sx-page .sx2__mt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
body.sx-page .sx2__mt b { font-size: 15px; line-height: 20px; font-weight: 400; }
body.sx-page .sx2__mt small { font-size: 13px; line-height: 18px; color: var(--sx-ink-2); }
body.sx-page .sx2__sep { display: block; height: 1px; margin: 6px 10px; background: #ffffff14; }

/* progress: a model downloading, heavy work */
body.sx-page .sx2__prog { position: absolute; z-index: 6; left: 50%; bottom: 24px; translate: -50% 0; display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: calc(100% - 48px); height: 48px; padding: 0 20px 0 16px; border-radius: 999px; overflow: hidden; background: var(--sx-glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px var(--sx-line), 0 24px 48px -24px #000; font-size: 14px; color: #fff; animation: sx2-up .4s var(--sx-ease); }
body.sx-page .sx2.has-strip .sx2__prog { bottom: 152px; }
body.sx-page .sx2__prog[hidden] { display: none; }
body.sx-page .sx2__prog::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--p, 0) * 100%); background: #fff; transition: width .3s ease; }
body.sx-page .sx2__prog i { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #ffffff40; border-top-color: #fff; animation: sx-spin .8s linear infinite; }
body.sx-page .sx2__prog span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.sx-page .sx2__prog em { font-style: normal; font-size: 13px; color: var(--sx-ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
@keyframes sx2-up { from { opacity: 0; translate: -50% 12px; } }
@keyframes sx-spin { to { transform: rotate(1turn); } }

/* the code sheet: slides in from the right, over the inspector */
body.sx-page .sx2__sheet { position: fixed; inset: 0; z-index: 10000; }
body.sx-page .sx2__sheet[hidden] { display: none; }
body.sx-page .sx2__sb { position: absolute; inset: 0; background: #0009; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity .35s; }
body.sx-page .sx2__sc { position: absolute; top: 16px; right: 16px; bottom: 16px; width: min(640px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 20px; padding: 24px; border-radius: 24px; background: #111112; box-shadow: inset 0 0 0 1px #ffffff1a, 0 48px 120px -32px #000; color: #fff; transform: translateX(24px); opacity: 0; transition: transform .5s var(--sx-ease), opacity .35s; }
body.sx-page .sx2__sheet.is-open .sx2__sb { opacity: 1; }
body.sx-page .sx2__sheet.is-open .sx2__sc { transform: none; opacity: 1; }
body.sx-page .sx2__sc header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
body.sx-page .sx2__sc header b { display: block; font-size: 32px; line-height: 36px; font-weight: 400; letter-spacing: -.03em; }
body.sx-page .sx2__sc header small { display: block; margin-top: 8px; max-width: 44ch; font-size: 14px; line-height: 20px; color: var(--sx-ink-2); }
body.sx-page .sx2__x { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #ffffff14; color: #fff; cursor: pointer; transition: background-color .2s, color .2s, transform .4s var(--sx-spring); }
body.sx-page .sx2__x svg { width: 16px; height: 16px; }
body.sx-page .sx2__x:hover { background: #fff; color: #0a0a0b; transform: rotate(90deg); }
body.sx-page .sx2__sc nav { flex: none; }
body.sx-page .sx2__tabs { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #ffffff29 transparent; }
body.sx-page .sx2__tabs section { display: flex; flex-direction: column; gap: 20px; animation: sx2-fade .35s var(--sx-ease); }
@keyframes sx2-fade { from { opacity: 0; transform: translateY(6px); } }
body.sx-page .sx2__codeb { border-radius: 16px; background: #0a0a0b; box-shadow: inset 0 0 0 1px #ffffff14; overflow: hidden; }
body.sx-page .sx2__codeh { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 8px 0 16px; border-bottom: 1px solid #ffffff0f; font-size: 13px; color: var(--sx-ink-2); }
body.sx-page .sx2__cp { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: #ffffff14; color: #fff; font: inherit; font-size: 14px; cursor: pointer; transition: background-color .2s, color .2s; }
body.sx-page .sx2__cp svg { width: 14px; height: 14px; }
body.sx-page .sx2__cp:hover, body.sx-page .sx2__cp.is-ok { background: #fff; color: #0a0a0b; }
body.sx-page .sx2__codeb pre { margin: 0; max-height: 320px; overflow: auto; padding: 16px; font: 12.5px/1.6 ui-monospace, "SF Mono", Menlo, monospace; color: #d6d6d8; white-space: pre; scrollbar-width: thin; scrollbar-color: #ffffff29 transparent; }
body.sx-page .sx2__steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
body.sx-page .sx2__steps li { counter-increment: s; position: relative; padding-left: 40px; font-size: 15px; line-height: 22px; color: #c9c9cc; }
body.sx-page .sx2__steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 0; font-size: 13px; color: #5c5c60; font-variant-numeric: tabular-nums; }
body.sx-page .sx2__steps code, body.sx-page .st__hint code { padding: 1px 6px; border-radius: 6px; background: #ffffff14; font: 13px ui-monospace, Menlo, monospace; color: #fff; }
body.sx-page .sx2__sc footer { flex: none; display: flex; align-items: center; gap: 16px; padding-top: 16px; border-top: 1px solid #ffffff0f; }
body.sx-page .sx2__sc footer p { margin: 0; font-size: 13px; line-height: 18px; color: var(--sx-ink-2); }
body.sx-page .sx2__sc footer .sx__dl { flex: none; }

/* the strip: presets or effects drawn on the photo */
body.sx-page .sx2 .sx__strip button[aria-pressed="true"] span { color: #fff; }

/* RELUMA: the light you can drag */
body.sx-page .rl__c { touch-action: none; cursor: crosshair; }
body.sx-page .rl__c:focus { outline: none; }
body.sx-page .rl__dot { position: absolute; z-index: 3; width: 28px; height: 28px; margin: -14px 0 0 -14px; padding: 0; border: 0; border-radius: 50%; background: var(--c, #ffd9a0); box-shadow: 0 0 0 3px #fff, 0 0 32px 8px color-mix(in srgb, var(--c, #ffd9a0) 70%, transparent), 0 8px 20px -6px #000; cursor: grab; touch-action: none; transition: transform .3s var(--sx-spring); }
body.sx-page .rl__dot:hover { transform: scale(1.12); }
body.sx-page .rl__dot.is-drag { cursor: grabbing; transform: scale(1.2); }
body.sx-page .rl__dot[hidden] { display: none; }

/* sources (ASCII): photo, video, camera, text */
body.sx-page .sx2__src { display: flex; align-items: center; gap: 4px; height: 40px; padding: 4px; border-radius: 999px; background: var(--sx-glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px var(--sx-line), 0 24px 48px -24px #000; }
body.sx-page .sx2__src button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: #fff; font: inherit; font-size: 14px; cursor: pointer; transition: background-color .2s, color .2s; }
body.sx-page .sx2__src button svg { width: 14px; height: 14px; }
body.sx-page .sx2__src button:hover { background: #ffffff14; }
body.sx-page .sx2__src button[aria-pressed="true"] { background: #fff; color: #0a0a0b; }

/* a queue of photos (enhancer, background remover) */
body.sx-page .sx2__q { display: flex; gap: 6px; }
body.sx-page .sx2__q button { position: relative; flex: none; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #1b1b1c; cursor: pointer; transition: transform .35s var(--sx-spring); }
body.sx-page .sx2__q button img { width: 100%; height: 100%; object-fit: cover; }
body.sx-page .sx2__q button::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px #ffffff1a; }
body.sx-page .sx2__q button[aria-pressed="true"]::after { box-shadow: inset 0 0 0 2px #fff; }
body.sx-page .sx2__q button:hover { transform: translateY(-2px); }
body.sx-page .sx2__q i { position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: #000c; }
body.sx-page .sx2__q i.is-done { background: #fff; color: #0a0a0b; }
body.sx-page .sx2__q i.is-done::after { content: ""; width: 7px; height: 4px; margin-top: -2px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; rotate: -45deg; }
body.sx-page .sx2__q i.is-run { border: 1.5px solid #ffffff40; border-top-color: #fff; background: #000c; animation: sx-spin .8s linear infinite; }
body.sx-page .sx2__q .sx2__qadd { display: grid; place-items: center; background: transparent; box-shadow: inset 0 0 0 1.5px #ffffff29; color: #fff; }
body.sx-page .sx2__q .sx2__qadd::after { display: none; }
body.sx-page .sx2__q .sx2__qadd svg { width: 18px; height: 18px; }

@media (max-width: 999px) {
  html body.ds.sx-page .sx2 .st__view { height: min(64svh, 640px) !important; min-height: 320px; display: grid; place-items: center; }
  body.sx-page .sx2__prog { position: fixed; bottom: 16px; }
  body.sx-page .sx2.has-strip .sx2__prog { bottom: 16px; }
  body.sx-page .sx2__menu { right: 0; width: min(288px, calc(100vw - 32px)); }
  body.sx-page .sx2__sc { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: calc(100svh - 80px); transform: translateY(24px); }
}
@media (max-width: 599px) {
  body.sx-page .sx2__src button span { display: none; }
  body.sx-page #sx-code span { display: none; }
  body.sx-page #sx-code { width: 40px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { body.sx-page .sx2 *, body.sx-page .sx2__sheet * { animation: none !important; transition: none !important; } }

/* Glass: the strip holds all 28 effects, with the group's name before each group */
body.sx-page .gx__gl { flex: none; align-self: stretch; display: flex; align-items: center; justify-content: center; width: 20px; margin: 0 2px 0 6px; font-size: 11px; font-style: normal; letter-spacing: .04em; color: #5c5c60; writing-mode: vertical-rl; transform: rotate(180deg); border-right: 1px solid #ffffff12; }
body.sx-page .gx__gl:first-child { margin-left: 0; }
body.sx-page .sx2 .sx__strip button span { gap: 4px; }
body.sx-page .gx__c { touch-action: pan-y; }

/* Image enhancer: the whole stage is one canvas (before | after), zoom in the corner, the queue along the bottom */
html body.ds.sx-page .sx2[data-tool="upscale"] .st__view { padding: 0 !important; display: block; }
body.sx-page .up2__c { position: absolute; inset: 0; display: block; border-radius: 0 !important; box-shadow: none !important; animation: none !important; touch-action: none; outline: none; }
body.sx-page .up2__z { position: absolute; z-index: 4; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 0; height: 40px; padding: 4px; border-radius: 999px; background: var(--sx-glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px var(--sx-line), 0 24px 48px -24px #000; }
body.sx-page .up2__z button { height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: #fff; font: inherit; font-size: 14px; cursor: pointer; transition: background-color .2s, color .2s; }
body.sx-page .up2__z button:hover { background: #ffffff14; }
body.sx-page .up2__z button[aria-pressed="true"] { background: #fff; color: #0a0a0b; }
body.sx-page .up2__z span { padding: 0 10px 0 8px; font-size: 13px; color: var(--sx-ink-2); font-variant-numeric: tabular-nums; }
body.sx-page .sx2.has-strip .up2__z { bottom: 136px; }
body.sx-page .up2__go { position: absolute; z-index: 4; left: calc(50% - 164px); bottom: 136px; translate: -50% 0; animation: sx2-up .4s var(--sx-ease); }
body.sx-page .up2__go[hidden] { display: none; }
body.sx-page .up2__go svg { width: 16px; height: 16px; }
body.sx-page .up2__tl, body.sx-page .up2__tr { position: absolute; z-index: 3; }
body.sx-page .up2__dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
body.sx-page .up2__dl div { padding: 12px 14px; border-radius: 14px; background: #ffffff0a; }
body.sx-page .up2__dl dt { font-size: 13px; color: var(--sx-ink-2); }
body.sx-page .up2__dl dd { margin: 2px 0 0; font-size: 15px; color: #fff; font-variant-numeric: tabular-nums; }
body.sx-page .up2__res { display: flex; flex-direction: column; gap: 12px; }
body.sx-page .up2__run, body.sx-page .up2__all { width: 100%; }
body.sx-page .up2__run:disabled, body.sx-page .up2__all:disabled { opacity: .45; pointer-events: none; }
body.sx-page .sx2[data-tool="upscale"] .sx__strip, body.sx-page .sx2[data-tool="remover"] .sx__strip { left: calc(50% - 164px); }
@media (max-width: 999px) {
  html body.ds.sx-page .sx2[data-tool="upscale"] .st__view { height: min(64svh, 640px) !important; position: relative; border-radius: 24px; overflow: hidden; }
  body.sx-page .up2__go { left: 50%; bottom: 16px; }
  body.sx-page .sx2.has-strip .up2__z { bottom: 16px; }
}

/* ASCII: the source laid over while you hold compare */
body.sx-page .as__o { position: absolute; z-index: 2; left: 50%; top: 50%; translate: -50% -50%; border-radius: 12px; pointer-events: none; }
body.sx-page .as__o[hidden] { display: none; }
body.sx-page .sx2 .st__view { position: relative; }
body.sx-page .as__c { touch-action: pan-y; }

/* tablets and phones: with sources (ASCII, text), the actions take a row of their own under the app's name */
@media (max-width: 999px) {
  html body.ds.sx-page .sx2:has(.sx2__src) .sx__acts { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: space-between; flex-wrap: wrap; }
  html body.ds.sx-page .sx2:has(.st__modes:not(:empty)) .st__modes { grid-row: 3; }
}

/* Background remover: the same one-canvas stage as the enhancer, with a brush ring on top */
html body.ds.sx-page .sx2[data-tool="remover"] .st__view { padding: 0 !important; display: block; }
body.sx-page .rm__ring { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
@media (max-width: 999px) { html body.ds.sx-page .sx2[data-tool="remover"] .st__view { height: min(64svh, 640px) !important; position: relative; border-radius: 24px; overflow: hidden; } }

/* Text animation: a section of a page as wide as the breakpoint; the effects strip plays each on hover */
body.sx-page .tx__frame { position: relative; width: min(var(--w, 100%), 100%); height: 100%; margin: 0 auto; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px #ffffff14, 0 40px 80px -40px #000; transition: width .6s var(--sx-ease); }
body.sx-page .tx__page { display: flex; align-items: center; height: 100%; padding: 6% 7%; box-sizing: border-box; overflow: hidden; transition: background-color .4s; }
body.sx-page .tx__t { margin: 0; width: 100%; font-kerning: normal; cursor: default; }
body.sx-page .tx__bp { position: absolute; left: 12px; top: 12px; height: 28px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; background: #000000a6; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 13px; color: #fff; }
body.sx-page .tx__replay { position: absolute; z-index: 4; left: calc(50% - 164px); bottom: 136px; translate: -50% 0; }
body.sx-page .tx__replay svg { width: 12px; height: 12px; }
body.sx-page .tx__tile .tx__tw { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 12px; background: #1b1b1c; box-shadow: inset 0 0 0 1px #ffffff1a; overflow: hidden; transition: box-shadow .25s; }
body.sx-page .tx__tile[aria-pressed="true"] .tx__tw { box-shadow: 0 0 0 2px #fff; }
body.sx-page .tx__tt { font-size: 30px; font-weight: 600; line-height: 1; color: #fff; }
body.sx-page .tx__ease { width: 100%; height: 80px; border-radius: 12px; background: #ffffff08; }
@media (max-width: 999px) { body.sx-page .tx__replay { left: 50%; bottom: 16px; } body.sx-page .tx__frame { height: 100%; } }

/* SVG to 3D: the scene fills the picture's box; a see-through swatch */
body.sx-page .s3__box { width: 100%; height: 100%; border-radius: 16px; overflow: hidden; touch-action: pan-y; }
body.sx-page .s3__box canvas { cursor: grab; }
body.sx-page .s3__box canvas:active { cursor: grabbing; }
body.sx-page .sw button.is-none { background: repeating-conic-gradient(#2a2a2c 0 25%, #1b1b1c 0 50%) 0 0 / 10px 10px !important; }
body.sx-page .s3__use { width: 100%; margin-top: 4px; }

/* ===================== polish pass (24 Nov, 17:00) ===================== */
/* one typeface everywhere in the studios (numbers included); code keeps its monospace, the text tiles their own font */
body.sx-page .sx2, body.sx-page .sx2__sheet, body.sx-page .sx2__menu { font-family: "Neue Montreal", "Helvetica Neue", Arial, sans-serif; }
body.sx-page .sx2 :is(dd, dt, em, small, b, span, button, input, textarea, label, p, h1, h2, i), body.sx-page .sx2__menu :is(b, small, span) { font-family: inherit; }
body.sx-page .sx2 :is(dd, em) { font-variant-numeric: normal; letter-spacing: 0; }

/* the inspector: one scroll for everything under its head; Try it on and the note sit at the end, never over the settings */
html body.ds.sx-page .sx2 .sx__insp { display: flex; flex-direction: column; }
html body.ds.sx-page .sx2 .st__panel { flex: 1 1 auto; min-height: 0; display: block !important; padding: 4px 24px 24px !important; overflow-y: auto !important; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #ffffff2e transparent; }
html body.ds.sx-page .sx2 .st__panel::-webkit-scrollbar { display: block; width: 6px; }
html body.ds.sx-page .sx2 .st__panel::-webkit-scrollbar-thumb { background: #ffffff2e; border-radius: 3px; }
html body.ds.sx-page .sx2 .sx2__groups { display: flex; flex-direction: column; }
html body.ds.sx-page .sx2 .st__panel .sx__ph { padding: 20px 0 0; border-top: 1px solid #ffffff0f; }
html body.ds.sx-page .sx2 .st__panel .st__note { margin: 16px 0 0; }
html body.ds.sx-page .sx2 .sx__ih { flex: none; padding-bottom: 8px; }

/* colour dots: always round, a little smaller, they wrap instead of squeezing */
html body.ds.sx-page .sx2 .sw { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 4px 4px 2px; }
html body.ds.sx-page .sx2 .sw > button, html body.ds.sx-page .sx2 .sw__any { flex: none !important; width: 26px !important; height: 26px !important; min-width: 26px; aspect-ratio: 1; border-radius: 50%; }
html body.ds.sx-page .sx2 .sw > button::after { inset: -4px; }
html body.ds.sx-page .sx2 .sw > button { box-shadow: inset 0 0 0 1px #ffffff1f; }

/* segmented switches (Look · Erase · Restore · Back to AI, 2× 4× 8×, the top tabs): equal cells, the white pill exactly under one */
html body.ds.sx-page .sx2 .chips3.sx2__seg { display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr) !important; gap: 0 !important; padding: 4px !important; flex-wrap: nowrap !important; border-radius: 999px; background: #ffffff0f !important; box-shadow: inset 0 0 0 1px #ffffff0f !important; }
html body.ds.sx-page .sx2 .chips3.sx2__seg > button { min-width: 0; height: 32px; padding: 0 6px !important; background: transparent !important; font-size: 13px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: center; }
html body.ds.sx-page .sx2 .chips3.sx2__seg > button[aria-pressed="true"] { background: transparent !important; color: #0a0a0b !important; }
html body.ds.sx-page .sx2 .chips3.sx2__seg::before { top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n, 2)) !important; }
html body.ds.sx-page .sx2 .st__modes { grid-auto-columns: minmax(0, 1fr) !important; }

/* the strips: wider tiles, labels on one line, Pro as a small tag on the picture, group names as quiet vertical words */
html body.ds.sx-page .sx2 .sx__strip { gap: 8px !important; padding: 10px 12px !important; }
html body.ds.sx-page .sx2 .sx__strip > button { position: relative; width: 92px !important; min-width: 92px; padding: 4px 2px 6px !important; gap: 8px !important; }
html body.ds.sx-page .sx2 .sx__strip > button > span:not(.tx__tw) { display: block !important; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 16px; text-align: center; }
html body.ds.sx-page .sx2 .sx__strip > button canvas, html body.ds.sx-page .sx2 .sx__strip .tx__tw { width: 76px !important; height: 76px !important; }
html body.ds.sx-page .sx2 .sx__strip > button .sx2__pro { position: absolute; top: 8px; right: 10px; height: 16px; padding: 0 6px; background: #000000b3 !important; color: #fff !important; font-size: 10px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
html body.ds.sx-page .sx2 .sx__strip .gx__gl { flex: none; width: 16px !important; height: auto !important; padding: 0 !important; margin: 0 4px 0 2px !important; background: none !important; border-radius: 0 !important; border: 0 !important; box-shadow: none !important; color: #5c5c60 !important; font-size: 11px !important; font-style: normal; letter-spacing: .06em; writing-mode: vertical-rl; transform: rotate(180deg); display: flex; align-items: center; justify-content: center; }
html body.ds.sx-page .sx2 .sx__strip .gx__gl + * { margin-left: 0; }

/* Text animation tiles: Aa exactly in the middle */
html body.ds.sx-page .sx2 .tx__tw { display: grid !important; place-items: center; }
html body.ds.sx-page .sx2 .tx__tt { display: block !important; width: 100% !important; max-width: none !important; margin: 0 !important; text-align: center !important; letter-spacing: 0 !important; line-height: 1 !important; }

/* the queue (enhancer, remover): plain square tiles; the + exactly in the middle */
html body.ds.sx-page .sx2 .sx__strip .sx2__q { gap: 8px; }
html body.ds.sx-page .sx2 .sx__strip .sx2__q > button { width: 64px !important; min-width: 64px; height: 64px; padding: 0 !important; display: block !important; gap: 0 !important; }
html body.ds.sx-page .sx2 .sx__strip .sx2__q > button.sx2__qadd { display: grid !important; place-items: center; }
html body.ds.sx-page .sx2 .sx__strip .sx2__q > button.sx2__qadd svg { display: block; width: 20px; height: 20px; }

/* Fit · 100% · zoom: in the bottom-left corner of the stage */
html body.ds.sx-page .sx2 .up2__z { left: 16px !important; bottom: 16px !important; }
@media (max-width: 999px) { html body.ds.sx-page .sx2 .up2__z { left: 12px !important; bottom: 12px !important; } }

html body.ds.sx-page .sx2 .sx__strip > button > .tx__tw { display: grid !important; place-items: center; padding: 0; line-height: 1; }
/* Replay, Upscale and the progress sit above the strip, never on it */
html body.ds.sx-page .sx2.has-strip :is(.tx__replay, .up2__go) { bottom: 156px !important; }
html body.ds.sx-page .sx2.has-strip .sx2__prog { bottom: 156px; }
html body.ds.sx-page .sx2.has-strip .st__view { padding-bottom: 168px; }
@media (max-width: 999px) { html body.ds.sx-page .sx2.has-strip :is(.tx__replay, .up2__go) { bottom: 16px !important; } html body.ds.sx-page .sx2.has-strip .st__view { padding-bottom: 16px; } }
/* numbers in the studios: the font's own figures, not the wide tabular ones */
html body.ds.sx-page .sx2 *, html body.ds.sx-page .sx2__menu * { font-variant-numeric: normal !important; }

body.sx-page .sx2__tog > span .sx2__pro { margin-left: 6px; vertical-align: 1px; }
body.sx-page .sx2__tog > span { flex-direction: row !important; flex-wrap: wrap; align-items: center !important; column-gap: 6px !important; }
body.sx-page .sx2__tog > span small { flex-basis: 100%; }
/* the studio is there at once: no fade-in that a background tab would hold at zero */
html body.ds.sx-page .sx2 :is(.st__stage, .sx__insp, .sx__strip) { animation: none !important; opacity: 1 !important; }
html body.ds.sx-page .sx2__seg[data-none]::before { opacity: 0 !important; }
/* the app pill never runs under the actions: it shrinks and the words end in … */
html body.ds.sx-page .sx__app { max-width: 100%; min-width: 0; overflow: hidden; }
html body.ds.sx-page .sx__app > span > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 599px) { html body.ds.sx-page .sx__app small { display: none; } }
/* phones: Fit · 100% stays bottom-left, the Upscale button moves to the bottom-right so the two never touch */
@media (max-width: 599px) {
  html body.ds.sx-page .sx2 .up2__z span { display: none; }
  html body.ds.sx-page .sx2 .up2__go, html body.ds.sx-page .sx2.has-strip .up2__go { left: auto !important; right: 12px !important; bottom: 12px !important; translate: none !important; }
}

/* ---------- polish (24 Nov, evening) ---------- */
/* colour swatches: no rule above or below them */
html body.ds.sx-page .sx2 .sw.sw { border: 0 !important; }
/* the group names in the strip: grey pills, still upright, so they read */
html body.ds.sx-page .sx2 .sx__strip .gx__gl.gx__gl { align-self: center; width: 24px !important; min-height: 64px; padding: 12px 0 !important; margin: 0 8px 0 4px !important; background: #ffffff14 !important; border-radius: 999px !important; color: #c9c9cc !important; font-size: 12px !important; letter-spacing: .02em; }
html body.ds.sx-page .sx2 .sx__strip .gx__gl.gx__gl:first-child { margin-left: 0 !important; }
/* the settings panel scrolls on its own, and never passes the scroll on to the page */
html body.ds.sx-page .sx2 .st__panel { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }

/* ---------- Steady panel (24 Nov, evening): nothing in the inspector moves unless it means to ----------
   the panel is patched in place now (core.js morph), so these transitions actually run */
html body.ds.sx-page .sx2 .st__panel { scrollbar-gutter: stable; }
/* sliders: the thumb never jumps in size; hover shows a soft halo, dragging a slightly bigger one */
html body.ds.sx-page .sx2 .ctl input[type=range]::-webkit-slider-thumb { transform: none !important; transition: box-shadow .25s var(--sx-ease) !important; }
html body.ds.sx-page .sx2 .ctl input[type=range]:hover::-webkit-slider-thumb { box-shadow: 0 2px 8px #0006, 0 0 0 6px #ffffff14 !important; }
html body.ds.sx-page .sx2 .ctl input[type=range]:active::-webkit-slider-thumb { box-shadow: 0 2px 8px #0006, 0 0 0 9px #ffffff1f !important; }
html body.ds.sx-page .sx2 .ctl input[type=range]::-moz-range-thumb { transform: none; transition: box-shadow .25s; }
html body.ds.sx-page .sx2 .ctl input[type=range]:hover::-moz-range-thumb { box-shadow: 0 2px 8px #0006, 0 0 0 6px #ffffff14; }
html body.ds.sx-page .sx2 .ctl input[type=range] { touch-action: pan-y; transition: background-size .08s linear; }
html body.ds.sx-page .sx2 .ctl > span em { min-width: 4ch; text-align: right; }
/* chips, tabs and list rows: colour changes ease, they never change size */
html body.ds.sx-page .sx2 :is(.chips3 button, .sx2__ddl button, .sx2__ddb, .sx2__hist button, .sx__strip button) { transition: background-color .25s var(--sx-ease), color .25s var(--sx-ease), box-shadow .25s var(--sx-ease), opacity .25s var(--sx-ease) !important; }
html body.ds.sx-page .sx2 .chips3 button:active { transform: none !important; }
html body.ds.sx-page .sx2 .sx2__seg::before { transition: translate .45s var(--sx-ease), opacity .2s !important; }
html body.ds.sx-page .sx2 .sw > button, html body.ds.sx-page .sx2 .sw__any { transition: transform .35s var(--sx-ease) !important; }
html body.ds.sx-page .sx2 .sw > button:hover, html body.ds.sx-page .sx2 .sw__any:hover { transform: scale(1.08); }
html body.ds.sx-page .sx2 .sw > button::after { transition: box-shadow .3s var(--sx-ease) !important; }
/* the dropdown: always above the rows under it (WebKit included), opens with a short fade */
html body.ds.sx-page .sx2 .ctl:has(> .sx2__dd), html body.ds.sx-page .sx2 .sx2__dd { position: relative; }
html body.ds.sx-page .sx2 .ctl:has(.sx2__ddb[aria-expanded="true"]), html body.ds.sx-page .sx2 .sx2__g:has(.sx2__ddb[aria-expanded="true"]) { position: relative; z-index: 60; }
html body.ds.sx-page .sx2 .sx2__ddl { z-index: 60; transform: translateZ(0); overscroll-behavior: contain; background: #1b1b1c !important; box-shadow: inset 0 0 0 1px #ffffff1a, 0 24px 48px -12px #000000cc !important; transform-origin: 50% 0; animation: sx-dd .22s var(--sx-ease) both; scrollbar-width: thin; scrollbar-color: #ffffff29 transparent; }
@keyframes sx-dd { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: translateZ(0); } }
html body.ds.sx-page .sx2 .sx2__ddl button { flex: none; }
/* strip tiles: the picture breathes on hover, the tile itself stays still */
html body.ds.sx-page .sx2 .sx__strip button canvas, html body.ds.sx-page .sx2 .sx__strip button img { transition: transform .45s var(--sx-ease), box-shadow .25s var(--sx-ease) !important; }
html body.ds.sx-page .sx2 .sx__strip button:hover :is(canvas, img) { transform: scale(1.03); }
/* touch screens: no hover growth (a tap would leave it stuck), bigger hit areas */
@media (hover: none) {
  html body.ds.sx-page .sx2 .sw > button:hover, html body.ds.sx-page .sx2 .sw__any:hover, html body.ds.sx-page .sx2 .sx__strip button:hover :is(canvas, img) { transform: none; }
  html body.ds.sx-page .sx2 .ctl input[type=range]:hover::-webkit-slider-thumb { box-shadow: 0 2px 8px #0006 !important; }
  html body.ds.sx-page .sx2 .ctl input[type=range] { height: 32px; }
  html body.ds.sx-page .sx2 .sw > button, html body.ds.sx-page .sx2 .sw__any { width: 30px !important; height: 30px !important; }
  html body.ds.sx-page .sx2 .chips3 button { height: 36px; }
}
@media (prefers-reduced-motion: reduce) { html body.ds.sx-page .sx2 .sx2__ddl { animation: none; } }
html body.ds.sx-page .sx2 .sx2__ddl { left: -6px; right: -6px; }
/* rows in the inspector never lean toward the cursor (the site's magnetic buttons, fx.js) */
html body.ds.sx-page .sx2 :is(.ctl, .chip, .tab, .btn--primary, .btn--secondary) { translate: none !important; }
html body.ds.sx-page .sx2 .ctl { transition: none !important; }

/* ---------- Timestack (25 Nov): the card in the middle of the stage; "In a page" puts words beside it ---------- */
html body.ds.sx-page .sx2 .tk { --side: 380px; position: absolute; inset: 0; display: grid; place-items: center; overflow: visible; }
html body.ds.sx-page .sx2 .st__view:has(.tk) { overflow: visible; }
html body.ds.sx-page .sx2 .tk__card { position: relative; z-index: 2; width: var(--side); aspect-ratio: 1; border-radius: 4px; outline: none; cursor: crosshair; transition: translate .7s cubic-bezier(.22, 1, .36, 1); }
html body.ds.sx-page .sx2 .tk__card:focus-visible { box-shadow: 0 0 0 2px #fff; }
html body.ds.sx-page .sx2 .tk__hint { position: absolute; left: 50%; bottom: 20px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; height: 32px; margin: 0; padding: 0 14px 0 10px; border-radius: 999px; font-size: 13px; color: #fff; background: #161617b8; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px #ffffff1a; translate: -50% 0; transition: opacity .4s, translate .5s cubic-bezier(.22, 1, .36, 1); pointer-events: none; }
html body.ds.sx-page .sx2 .tk__hint svg { width: 16px; height: 16px; }
html body.ds.sx-page .sx2 .tk.is-on .tk__hint, html body.ds.sx-page .sx2 .tk:has(.tk__card.is-open) .tk__hint { opacity: 0; translate: -50% 8px; }
html body.ds.sx-page .sx2.has-strip .tk__hint { bottom: 156px; }
/* the words: only in "In a page" */
html body.ds.sx-page .sx2 .tk__st { margin: 0; }
@media (max-width: 999px) {
  html body.ds.sx-page .sx2 .tk { position: relative; min-height: 64svh; }
      html body.ds.sx-page .sx2.has-strip .tk__hint { bottom: 16px; }
}
html body.ds.sx-page .sx2 .tk__card > canvas { grid-area: auto !important; max-width: none !important; max-height: none !important; width: 300% !important; height: 300% !important; border-radius: 0 !important; box-shadow: none !important; animation: none !important; }
@media (min-width: 1000px) {
  html body.ds.sx-page .sx2 .tk { padding: 72px 368px 24px 24px; }
  html body.ds.sx-page .sx2.has-strip .tk { padding-bottom: 168px; }
  html body.ds.sx-page .sx2 .tk__hint { left: calc((100% - 344px) / 2); }
}
@media (min-width: 1000px) {
    }
html body.ds.sx-page .sx2:has(#sx-prog:not([hidden])) .tk__hint { opacity: 0; }
html body.ds.sx-page .sx2 .tk.is-busy .tk__hint { opacity: 1 !important; translate: -50% 0 !important; }
@media (max-width: 999px) { html body.ds.sx-page .sx2 .tk { overflow: clip; } html body.ds.sx-page .sx2 .st__view:has(.tk) { overflow: clip; } }

/* Timestack looks strip: each look as a stack of the clip's frames, drawn at once */
html body.ds.sx-page .sx2 .sx__strip > button > .tk__lk.tsx { position: relative !important; inset: auto; display: grid !important; width: 76px !important; height: 76px; max-width: none; border-radius: 8px; overflow: hidden; perspective: 260px; animation: none; --tsx-gap: 5px; transition: --tsx-gap .5s cubic-bezier(.22, 1, .36, 1); }
html body.ds.sx-page .sx2 .sx__strip > button:is(:hover, [aria-pressed="true"]) > .tk__lk.tsx { --tsx-gap: 8px; }
html body.ds.sx-page .sx2 .sx__strip .tk__lk i { width: 50%; }
.tkl--deep i { transform: rotateY(-32deg) rotateX(18deg) translate3d(calc(var(--i) * var(--tsx-gap) * .8), calc(var(--i) * var(--tsx-gap) * -.5), calc(var(--i) * var(--tsx-gap) * -2)) !important; }
.tkl--ghost i { opacity: calc(.55 - var(--i) * .05) !important; filter: brightness(1.3) sepia(.4) !important; }
.tkl--ghost i:first-child { opacity: .15 !important; box-shadow: 0 0 0 1px #ffd9b855, 0 0 40px #ffd9b8aa !important; }
.tkl--glass i { opacity: calc(.42 - var(--i) * .03) !important; filter: brightness(1.15) contrast(.9) !important; box-shadow: 0 0 0 1px #ffffff40 !important; }
.tkl--glass i:first-child { opacity: .85 !important; }
.tkl--neon i:first-child { box-shadow: 0 0 0 1px #7aa2ff88, 0 0 40px #3d6bffcc !important; }
.tkl--neon i:not(:first-child) { filter: brightness(calc(1.1 - var(--i) * .05)) sepia(1) hue-rotate(185deg) saturate(3.5) !important; }
.tkl--ember i:first-child { box-shadow: 0 0 0 1px #ffb38a88, 0 0 40px #ff5a1fcc !important; }
.tkl--ember i:not(:first-child) { filter: brightness(calc(1.05 - var(--i) * .05)) sepia(1) hue-rotate(-25deg) saturate(3.5) !important; }
.tkl--tilt i { transform: rotateY(24deg) rotateX(18deg) rotateZ(-6deg) translate3d(calc(var(--i) * var(--tsx-gap) * -.4), calc(var(--i) * var(--tsx-gap) * -.4), calc(var(--i) * var(--tsx-gap) * -1.3)) !important; }
.tkl--monolith i { opacity: 1 !important; transform: rotateY(-30deg) rotateX(16deg) translate3d(calc(var(--i) * var(--tsx-gap) * .6), calc(var(--i) * var(--tsx-gap) * -.35), calc(var(--i) * var(--tsx-gap) * -2.2)) !important; }
.tkl--monolith i:first-child { box-shadow: 0 0 0 1px #ffffff40, 0 0 60px #ffe2ccdd !important; }
html body.ds.sx-page .sx2 .sx__strip .tk__lk.tsx i { padding: 0; border-radius: 2px; font-size: 0; background: var(--src) center / cover no-repeat; }
html body.ds.sx-page .sx2[data-tool="timestack"] .st__view, html body.ds.sx-page .sx2[data-tool="timestack"] .st__stage { background: #000 !important; }
html body.ds.sx-page .sx2 .sx__strip .tk__lk.tsx { background: #000; }
/* code sheet docked in the settings panel's place: same size, compact type, nothing under the site bar */
html body.ds.sx-page .sx2__sheet.is-docked .sx2__sb { background: #0006; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__sc { gap: 14px; padding: 16px; border-radius: 24px; transform: translateY(8px); }
html body.ds.sx-page .sx2__sheet.is-docked.is-open .sx2__sc { transform: none; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__sc header b { font-size: 20px; line-height: 24px; letter-spacing: -.02em; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__sc header small { margin-top: 4px; font-size: 13px; line-height: 18px; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__x { width: 32px; height: 32px; }
html body.ds.sx-page .sx2__sheet.is-docked .chips3.sx2__seg { display: flex !important; flex-wrap: wrap; gap: 6px; padding: 0; border-radius: 0; background: none !important; box-shadow: none !important; }
html body.ds.sx-page .sx2__sheet.is-docked .chips3.sx2__seg::-webkit-scrollbar { display: none; }
html body.ds.sx-page .sx2__sheet.is-docked .chips3.sx2__seg::before, html body.ds.sx-page .sx2__sheet.is-docked .chips3.sx2__seg::after { display: none !important; }
html body.ds.sx-page .sx2__sheet.is-docked .chips3.sx2__seg button { flex: none; height: 32px; padding: 0 12px !important; border-radius: 999px; font-size: 13px !important; white-space: nowrap; color: #fff; background: #ffffff0f !important; }
html body.ds.sx-page .sx2__sheet.is-docked .chips3.sx2__seg button[aria-pressed="true"] { background: #fff !important; color: #0a0a0b !important; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__tabs { display: flex; flex-direction: column; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__tabs > section:not([hidden]) { display: flex; flex-direction: column; gap: 14px; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__codeh { height: 40px; padding: 0 6px 0 12px; font-size: 12px; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__cp { height: 28px; padding: 0 10px; font-size: 13px; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__codeb pre { max-height: 260px; padding: 12px; font-size: 11px; line-height: 1.55; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__steps { gap: 8px; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__steps li { padding-left: 28px; font-size: 13px; line-height: 20px; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__steps li::before { font-size: 12px; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__steps code { font-size: 11.5px; padding: 1px 5px; word-break: break-all; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__sc footer { flex-direction: column; align-items: stretch; gap: 10px; padding-top: 12px; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__sc footer .sx__dl { justify-content: center; width: 100%; height: 44px; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__sc footer p { font-size: 12px; line-height: 16px; text-align: center; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__sc { background: #111112 !important; opacity: 1; }
html body.ds.sx-page .sx2__sheet.is-docked .chips3.sx2__seg { flex-wrap: wrap !important; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__steps li { overflow-wrap: anywhere; }
html body.ds.sx-page .sx2__sheet.is-docked .sx2__steps code { white-space: normal; overflow-wrap: anywhere; word-break: normal; }
/* ---------- studio tour (26 Nov) ---------- */
html body.ds.sx-page .sx__lead { justify-self: start; display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
html body.ds.sx-page .sx-tq { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--sx-glass, #161617cc); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px var(--sx-line, #ffffff1a); color: #c9c9cc; cursor: pointer; transition: background-color .2s, color .2s, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
html body.ds.sx-page .sx-tq svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
html body.ds.sx-page .sx-tq:hover { background: #fff; color: #0a0a0b; }
html body.ds.sx-page .sx-tq:active { transform: scale(.92); }
html body.ds.sx-page .sx-tq:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html body.ds.sx-page .sx-tq.is-new { animation: sx-tq-in .7s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes sx-tq-in { 0% { transform: scale(.6); box-shadow: inset 0 0 0 1px #fff6, 0 0 0 0 #ffffff55; } 60% { transform: scale(1.08); box-shadow: inset 0 0 0 1px #fff6, 0 0 0 10px #ffffff00; } 100% { transform: none; } }
.sx-tour { position: fixed; inset: 0; z-index: 10050; font-family: "Neue Montreal", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.sx-tour__hole { position: fixed; border-radius: 16px; box-shadow: 0 0 0 200vmax #000000c7, inset 0 0 0 1px #ffffff2e; opacity: 0; pointer-events: none; transition: left .6s cubic-bezier(.22, 1, .36, 1), top .6s cubic-bezier(.22, 1, .36, 1), width .6s cubic-bezier(.22, 1, .36, 1), height .6s cubic-bezier(.22, 1, .36, 1), border-radius .6s, opacity .4s; }
.sx-tour.is-on .sx-tour__hole { opacity: 1; }
.sx-tour__pop { position: fixed; left: 50%; top: 50%; width: 272px; padding: 14px 16px 12px; border-radius: 16px; background: #101011eb; -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%); box-shadow: inset 0 0 0 1px #ffffff14, 0 24px 64px -20px #000; color: #fff; opacity: 0; transform: translateY(6px); transition: left .6s cubic-bezier(.22, 1, .36, 1), top .6s cubic-bezier(.22, 1, .36, 1), opacity .3s, transform .6s cubic-bezier(.22, 1, .36, 1); }
.sx-tour.is-on .sx-tour__pop { opacity: 1; transform: none; }
.sx-tour.is-off .sx-tour__pop { opacity: 0; transition: transform .5s cubic-bezier(.55, 0, .3, 1), opacity .45s .05s; }
.sx-tour.is-off .sx-tour__hole { opacity: 0; }
.sx-tour__pop > b, .sx-tour__pop > p { transition: opacity .16s, transform .35s cubic-bezier(.22, 1, .36, 1); }
.sx-tour__pop.is-swap > b, .sx-tour__pop.is-swap > p { opacity: 0; transform: translateY(2px); }
.sx-tour__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sx-tour__n { font: 11px/14px ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; color: #6e6e72; font-variant-numeric: tabular-nums; }
.sx-tour__skip { padding: 0; border: 0; background: none; font: inherit; font-size: 12px; line-height: 14px; color: #6e6e72; cursor: pointer; transition: color .2s; }
.sx-tour__skip:hover { color: #fff; }
.sx-tour__pop > b { display: block; font-size: 15px; line-height: 20px; font-weight: 400; letter-spacing: -.01em; }
.sx-tour__pop > p { margin: 4px 0 14px; font-size: 13px; line-height: 18px; color: #8d8d90; text-wrap: pretty; }
.sx-tour__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid #ffffff0f; }
.sx-tour__dots { display: flex; gap: 3px; }
.sx-tour__dots i { width: 4px; height: 4px; border-radius: 2px; background: #ffffff24; transition: width .4s cubic-bezier(.22, 1, .36, 1), background-color .3s; }
.sx-tour__dots i.is-on { width: 12px; background: #fff; }
.sx-tour__btns { display: flex; align-items: center; gap: 4px; }
.sx-tour__btns button { height: 28px; padding: 0 12px; border: 0; border-radius: 999px; font: inherit; font-size: 13px; cursor: pointer; transition: background-color .2s, color .2s, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.sx-tour__btns button:active { transform: scale(.95); }
.sx-tour__back { background: none; color: #8d8d90; }
.sx-tour__back:hover { color: #fff; }
.sx-tour__back[hidden] { display: none; }
.sx-tour__next { background: #fff; color: #0a0a0b; }
.sx-tour__next:hover { background: #e6e6e8; }
.sx-tour button:focus-visible { outline: 1px solid #fff; outline-offset: 2px; }
@media (max-width: 699px) {
  .sx-tour__pop { left: 12px !important; right: 12px; top: auto !important; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; }
  .sx-tour__pop[data-side="top"] { top: calc(12px + env(safe-area-inset-top)) !important; bottom: auto; }
}
@media (prefers-reduced-motion: reduce) { .sx-tour *, html body.ds.sx-page .sx-tq { transition: none !important; animation: none !important; } }
html body.ds.sx-page a.sx__app > .sx__back { display: grid; place-items: center; flex: none; flex-direction: initial; }
html body.ds.sx-page a.sx__app > .sx__back svg { display: block; margin: 0; }
/* settings spacing, one system for every studio (26 Nov): group 20 top/bottom · title → first control 12 · control → control 16 · label → its input 8 */
html body.ds.sx-page .sx2 .sx2__g { gap: 16px; padding: 20px 0; }
html body.ds.sx-page .sx2 .sx2__g:first-child { padding-top: 8px; }
html body.ds.sx-page .sx2 .sx2__gt { margin: 0 0 -4px; }
html body.ds.sx-page .sx2 .ctl { gap: 8px; }
html body.ds.sx-page .sx2 .ctl > span:empty { display: none; }
/* top left: a plain round Back, the same size as the "?" next to it (26 Nov) */
html body.ds.sx-page a.sx__app.sx__bk { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; gap: 0; border-radius: 50%; background: var(--sx-glass, #161617cc) !important; -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px var(--sx-line, #ffffff1a) !important; color: #c9c9cc; transition: background-color .2s, color .2s, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
html body.ds.sx-page a.sx__app.sx__bk svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
html body.ds.sx-page a.sx__app.sx__bk:hover { background: #fff !important; color: #0a0a0b; }
html body.ds.sx-page a.sx__app.sx__bk:active { transform: scale(.92); }
html body.ds.sx-page .sx__sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* ---------- Pixel icons studio (26 Nov) ---------- */
html body.ds.sx-page .sx2[data-tool="pixel"] .st__view, html body.ds.sx-page .sx2[data-tool="pixel"] .st__stage { background: #0a0a0b; }
html body.ds.sx-page .sx2 .px { position: absolute; inset: 0; padding: 76px 368px 168px 88px; }
html body.ds.sx-page .sx2:not(.has-strip) .px { padding-bottom: 72px; }
html body.ds.sx-page .sx2 .px__cv { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; border-radius: 0 !important; box-shadow: none !important; touch-action: none; cursor: crosshair; animation: none !important; }
html body.ds.sx-page .sx2 .px__rail { position: absolute; z-index: 3; left: 16px; top: 50%; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 22px; background: var(--sx-glass, #161617cc); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px var(--sx-line, #ffffff1a), 0 24px 48px -24px #000; translate: 0 -50%; }
html body.ds.sx-page .sx2 .px__rail button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 14px; background: none; color: #a9a9ad; cursor: pointer; transition: background-color .2s, color .2s, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
html body.ds.sx-page .sx2 .px__rail button svg { width: 18px; height: 18px; }
html body.ds.sx-page .sx2 .px__rail button:hover { background: #ffffff14; color: #fff; }
html body.ds.sx-page .sx2 .px__rail button:active { transform: scale(.92); }
html body.ds.sx-page .sx2 .px__rail button[aria-pressed="true"] { background: #fff; color: #0a0a0b; }
html body.ds.sx-page .sx2 .px__rail button:focus-visible { outline: 1px solid #fff; outline-offset: 1px; }
html body.ds.sx-page .sx2 .px__div { display: block; height: 1px; margin: 4px 8px; background: #ffffff14; }
html body.ds.sx-page .sx2 .sx2__hud:has(.px__zoom) { position: absolute; z-index: 3; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 12px; pointer-events: none; }
html body.ds.sx-page .sx2.has-strip .sx2__hud:has(.px__zoom) { bottom: 168px; left: 88px; }
html body.ds.sx-page .sx2 .px__zoom { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--sx-glass, #161617cc); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px var(--sx-line, #ffffff1a); pointer-events: auto; }
html body.ds.sx-page .sx2 .px__zoom button { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border: 0; border-radius: 999px; background: none; color: #c9c9cc; font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .2s, color .2s; }
html body.ds.sx-page .sx2 .px__zoom button svg { width: 14px; height: 14px; }
html body.ds.sx-page .sx2 .px__zoom button:hover { background: #ffffff14; color: #fff; }
html body.ds.sx-page .sx2 .px__tag { font-size: 12px; color: #6e6e72; font-variant-numeric: tabular-nums; white-space: nowrap; }
html body.ds.sx-page .sx2 .px__starters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
html body.ds.sx-page .sx2 .px__starters button { aspect-ratio: 1; padding: 0; border: 0; border-radius: 12px; background: #ffffff0a; box-shadow: inset 0 0 0 1px #ffffff0f; cursor: pointer; transition: background-color .2s, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
html body.ds.sx-page .sx2 .px__starters button:hover { background: #ffffff17; }
html body.ds.sx-page .sx2 .px__starters button:active { transform: scale(.94); }
html body.ds.sx-page .sx2 .px__starters canvas { display: block; width: 100%; height: 100%; }
html body.ds.sx-page .sx2 .px__xf { display: flex; flex-wrap: wrap; gap: 6px; }
html body.ds.sx-page .sx2 .px__xf button { height: 32px; padding: 0 12px; }
html body.ds.sx-page .sx2 .px__out { font-variant-numeric: tabular-nums; }
@media (max-width: 999px) {
  html body.ds.sx-page .sx2[data-tool="pixel"] .st__view { display: block !important; width: 100%; }
  html body.ds.sx-page .sx2 .px { position: relative; width: 100%; height: min(64svh, 520px); padding: 12px 12px 56px 64px; }
  html body.ds.sx-page .sx2 .px__rail { left: 8px; padding: 4px; }
  html body.ds.sx-page .sx2 .px__rail button { width: 36px; height: 36px; }
  html body.ds.sx-page .sx2 .sx2__hud:has(.px__zoom), html body.ds.sx-page .sx2.has-strip .sx2__hud:has(.px__zoom) { left: 68px; bottom: 12px; }
  html body.ds.sx-page .sx2 .px__tag { display: none; }
}

/* Device mockups (27 Nov): the frame in the chosen proportions, the engine's canvas inside it, the transport on it */
html body.ds.sx-page .sx2[data-tool="mockup"] .st__view, html body.ds.sx-page .sx2[data-tool="mockup"] .st__stage { background: #000; }
html body.ds.sx-page .sx2[data-tool="mockup"] .st__view { display: grid; place-items: center; }
body.sx-page .mk__frame { position: relative; overflow: hidden; border-radius: 16px; background: #0a0a0b; box-shadow: 0 0 0 1px #ffffff14; touch-action: none; }
body.sx-page .mk__frame.is-alpha { background: repeating-conic-gradient(#1c1c1d 0 25%, #141415 0 50%) 0 0 / 20px 20px; }
body.sx-page .mk__gl { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; }
body.sx-page .mk__gl:active { cursor: grabbing; }
body.sx-page .mk__load { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 8px; background: #0a0a0b; color: #8d8d90; font-size: 14px; pointer-events: none; }
body.sx-page .mk__load b { font-weight: 400; color: #fff; font-variant-numeric: tabular-nums; }
body.sx-page .mk__tr { position: absolute; z-index: 3; left: 50%; bottom: 12px; display: flex; align-items: center; gap: 10px; width: min(360px, calc(100% - 24px)); height: 40px; padding: 4px 16px 4px 4px; border-radius: 999px; background: var(--sx-glass, #161617b8); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--sx-line, #ffffff1a); translate: -50% 0; }
body.sx-page .mk__tr[hidden] { display: none; }
body.sx-page .mk__pl { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #0a0a0b; cursor: pointer; transition: transform .3s var(--sx-spring); }
body.sx-page .mk__pl:active { transform: scale(.92); }
body.sx-page .mk__pl svg { width: 12px; height: 12px; }
body.sx-page .mk__sc { flex: 1; min-width: 0; height: 20px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
body.sx-page .mk__sc::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, #fff 0 var(--p, 0%), #ffffff24 var(--p, 0%) 100%); }
body.sx-page .mk__sc::-moz-range-track { height: 4px; border-radius: 4px; background: #ffffff24; }
body.sx-page .mk__sc::-moz-range-progress { height: 4px; border-radius: 4px; background: #fff; }
body.sx-page .mk__sc::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px #00000080; }
body.sx-page .mk__sc::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
body.sx-page .mk__t { flex: none; min-width: 72px; color: #a9a9ad; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.sx-page .mk__hint { position: absolute; z-index: 3; top: 12px; left: 50%; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--sx-glass, #161617b8); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--sx-line, #ffffff1a); color: #c9c9cc; font-size: 12px; line-height: 28px; white-space: nowrap; translate: -50% 0; pointer-events: none; transition: opacity .4s, translate .5s var(--sx-ease); }
body.sx-page .mk__frame.is-used .mk__hint { opacity: 0; translate: -50% -6px; }
@media (hover: none), (max-width: 699px) { body.sx-page .mk__hint { display: none; } }
body.sx-page .mk__btn { width: 100%; justify-content: center; }
body.sx-page .mk__src > span em { color: var(--sx-ink-2); font-style: normal; font-variant-numeric: tabular-nums; }
body.sx-page .mk__spec { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-size: 13px; }
body.sx-page .mk__spec dt { color: var(--sx-ink-2); }
body.sx-page .mk__spec dd { margin: 0; color: #fff; font-variant-numeric: tabular-nums; }
body.sx-page .mk__credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
body.sx-page .sx2[data-tool="mockup"] .st__hint b { font-weight: 400; color: #fff; }
body.sx-page .sw__any.is-on::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; }
html body.ds.sx-page .sx2[data-tool="mockup"] .st__modes button { white-space: nowrap; }
@media (max-width: 999px) { html body.ds.sx-page .sx2[data-tool="mockup"] .st__view { display: grid !important; } body.sx-page .mk__frame { touch-action: pan-y; } }
html body.ds.sx-page .sx2[data-tool="mockup"] .st__modes button { text-transform: none !important; }
html body.ds.sx-page .sx2[data-tool="mockup"] .st__modes button::first-letter { text-transform: none !important; }
@media (max-width: 599px) { html body.ds.sx-page .sx2[data-tool="mockup"] .st__modes button { font-size: 13px !important; padding: 0 4px !important; letter-spacing: -.01em; } }
@media (max-width: 699px) { body.sx-page .mk__tr { height: 32px; bottom: 8px; width: min(220px, calc(100% - 16px)); padding: 2px 12px 2px 2px; gap: 8px; } body.sx-page .mk__pl { width: 28px; height: 28px; } body.sx-page .mk__t { min-width: 0; font-size: 12px; } }
html body.ds.sx-page .sx2 .sx__insp .mk__btn span { display: inline !important; }
html body.ds.sx-page .sx2 .sx__insp .mk__btn { width: 100% !important; justify-content: center; gap: 8px; }
