/* STILLROOM™ darkroom — scoped under .studio-root .sr-app (Cloud UI v2.7.16 tokens underneath).
   Neutral, photographic palette: charcoal/paper shells, a neutral canvas surround, restrained accent. */
.studio-root .sr-app {
  /* V2.0.1 tokens from STILLROOM_UI_All_In_One (light) — accent #FFC800 as a signal only */
  --sr-shell: #f7f8f6; --sr-panel: #ffffff; --sr-inset: #f1f4f0; --sr-line: #dde3dc; --sr-line-strong: #c9d1c8;
  --sr-ink: #202820; --sr-ink-2: #4c564e; --sr-ink-3: #626d64; --sr-surround: #e6e8e4; --sr-accent: #FFC800; --sr-accent-ink: #1a1600; --sr-accent-text: #805F00;
  --sr-sel: #202820; --sr-focus: #805F00; --sr-warn: #8a5a00; --sr-warn-bg: #fdf1d8; --sr-danger: #b42318; --sr-success: #1f7a3d;
  --sr-hist-bg: #eef1ec; --sr-hist-r: #d6453d; --sr-hist-g: #2f9e5b; --sr-hist-b: #3a62d6;
  --sr-track: #d3d9d1; --sr-thumb: #202820; --sr-radius: 16px; --sr-r-ctl: 11px; --sr-h: 44px;
  --sr-band-red: #d64541; --sr-band-orange: #e8873a; --sr-band-yellow: #e6c844; --sr-band-green: #52a85a; --sr-band-aqua: #3fb7b5; --sr-band-blue: #3f6fd6; --sr-band-purple: #8357c9; --sr-band-magenta: #c74aa5;
  color: var(--sr-ink); background: var(--sr-shell);
  display: flex; flex-direction: column; min-height: 0; height: 100%;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; font-variant-numeric: tabular-nums;
}
.studio-root .sr-app[data-theme="dark"] {
  --sr-shell: #0c0d0e; --sr-panel: #17191a; --sr-inset: #222527; --sr-line: #303435; --sr-line-strong: #424748;
  --sr-ink: #f2f5f0; --sr-ink-2: #c3c9c3; --sr-ink-3: #a2aaa3; --sr-surround: #101112; --sr-accent: #FFC800; --sr-accent-ink: #1a1600; --sr-accent-text: #FFC800;
  --sr-sel: #f2f5f0; --sr-focus: #FFC800; --sr-warn: #f5c46b; --sr-warn-bg: #3a2c0f; --sr-danger: #ff8a80; --sr-success: #5fd38d;
  --sr-hist-bg: #0f1011; --sr-hist-r: #ff6b62; --sr-hist-g: #4fd17f; --sr-hist-b: #6f93ff;
  --sr-track: #3a3f40; --sr-thumb: #f2f5f0;
}
.studio-root .sr-app[data-surround="grey"] { --sr-surround: #777777; }
.studio-root .sr-app :focus-visible { outline: 2px solid var(--sr-focus); outline-offset: 2px; }

/* The studio becomes a full-height app while the darkroom is open. */
/* The header stays; the darkroom takes the rest of the window edge to edge (no page scroll on desktop). */
.studio-root.studio-root--darkroom { height: 100vh; height: 100dvh; min-height: 0; display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
.studio-root.studio-root--darkroom .studio-main { flex: 1 1 auto; width: 100%; margin: 0; display: flex; flex-direction: column; min-height: 0; padding: 0; max-width: none; }
.studio-root.studio-root--darkroom .studio-main > .sr-app { flex: 1 1 auto; }
.studio-root .sr-app [hidden] { display: none !important; }
.studio-root .sr-app .sr-num.cloud-input { width: 64px; height: 24px; min-height: 0; padding: 0 6px; font-size: 12px; border-radius: 6px; text-align: right; }
.studio-root .sr-app .cloud-button--xs.cloud-button--icon { width: 24px; height: 24px; min-height: 0; padding: 0; }

.studio-root .sr-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--sr-line); background: var(--sr-panel); }
.studio-root .sr-where { min-width: 0; display: flex; gap: 6px; justify-content: center; font-size: 13px; color: var(--sr-ink-2); overflow: hidden; white-space: nowrap; }
.studio-root .sr-where__item { overflow: hidden; text-overflow: ellipsis; color: var(--sr-ink); }
.studio-root .sr-where__item::before { content: "›"; margin-right: 6px; color: var(--sr-ink-3); }
.studio-root .sr-top__end { justify-content: flex-end; }
.studio-root .sr-body { flex: 1; min-height: 0; display: grid; overflow: hidden; }
.studio-root .sr-hint { font-size: 12px; line-height: 1.45; color: var(--sr-ink-3); margin: 0; }
.studio-root .sr-tag { font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 4px; background: var(--sr-inset); color: var(--sr-ink-2); border: 1px solid var(--sr-line); white-space: nowrap; }
.studio-root .sr-tag--edit { color: var(--sr-ink); border-color: var(--sr-line-strong); }
.studio-root .sr-tag--rej { color: var(--sr-danger); }
.studio-root .sr-tag--warn { color: var(--sr-warn); background: var(--sr-warn-bg); border-color: transparent; }
.studio-root .sr-app .cloud-segmented__item[aria-selected="true"], .studio-root .sr-app .cloud-segmented__item[aria-pressed="true"] { background: var(--sr-accent); color: var(--sr-accent-ink); }
.studio-root .sr-app .cloud-chip[aria-checked="true"], .studio-root .sr-app .cloud-chip[aria-selected="true"] { background: var(--sr-accent); color: var(--sr-accent-ink); border-color: var(--sr-accent); }

/* ---------- Library ---------- */
.studio-root .sr-body--library { grid-template-columns: minmax(220px, 260px) 1fr; }
.studio-root .sr-lib-side { border-right: 1px solid var(--sr-line); background: var(--sr-panel); padding: 16px; display: flex; flex-direction: column; gap: 16px; overflow: auto; }
.studio-root .sr-lib-actions .cloud-button { width: 100%; justify-content: center; }
.studio-root .sr-folders { display: flex; flex-direction: column; gap: 2px; }
.studio-root .sr-folder { display: flex; align-items: center; gap: 2px; border-radius: 8px; }
.studio-root .sr-folder.is-active { background: var(--sr-inset); }
.studio-root .sr-folder__btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px; background: none; border: 0; color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; border-radius: 8px; }
.studio-root .sr-folder__btn span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-root .sr-lib-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.studio-root .sr-lib-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--sr-line); }
.studio-root .sr-lib-bar .cloud-input { max-width: 280px; }
.studio-root .sr-grid { flex: 1; overflow: auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; align-content: start; }
.studio-root .sr-cell { border-radius: 8px; border: 1px solid var(--sr-line); background: var(--sr-panel); cursor: pointer; overflow: hidden; display: flex; flex-direction: column; min-height: max-content; }
.studio-root .sr-cell[aria-selected="true"] { outline: 2px solid var(--sr-sel); outline-offset: 1px; }
.studio-root .sr-cell.is-missing { opacity: .55; }
.studio-root .sr-cell__img { aspect-ratio: 3 / 2; background: var(--sr-surround); display: grid; place-items: center; overflow: hidden; }
.studio-root .sr-cell__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.studio-root .sr-cell__ph { font-size: 11px; letter-spacing: .08em; color: var(--sr-ink-3); }
.studio-root .sr-cell__meta { padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.studio-root .sr-cell__name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-root .sr-cell__tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 18px; }
.studio-root .sr-stars { font-size: 11px; letter-spacing: 1px; color: var(--sr-ink-2); }
.studio-root .sr-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; padding: 64px 16px; text-align: center; color: var(--sr-ink-3); }
.studio-root .sr-empty .cloud-title-sm { color: var(--sr-ink); }

/* ---------- Edit ---------- */
.studio-root .sr-body--edit { grid-template-columns: minmax(0, 1fr) clamp(280px, 26vw, 360px); grid-template-rows: minmax(0, 1fr); }
.studio-root .sr-body--library { grid-template-rows: minmax(0, 1fr); }
.studio-root .sr-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--sr-surround); }
.studio-root .sr-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; background: var(--sr-panel); border-bottom: 1px solid var(--sr-line); }
.studio-root .sr-toolbar__sp { flex: 1; }
.studio-root .sr-stage { position: relative; flex: 1; min-height: 0; }
.studio-root .sr-viewport { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.studio-root .sr-viewport.is-100 { overflow: auto; place-items: start; }
.studio-root .sr-paper { position: relative; line-height: 0; margin: 12px; }
.studio-root .sr-canvas { display: block; max-width: none; image-rendering: auto; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.studio-root .sr-canvas--before { position: absolute; inset: 0; }
.studio-root .sr-stage__msg { position: absolute; inset: 0; display: none; place-items: center; align-content: center; gap: 12px; padding: 24px; text-align: center; color: var(--sr-ink-2); background: var(--sr-surround); }
.studio-root .sr-stage[data-state="loading"] .sr-stage__msg, .studio-root .sr-stage[data-state="error"] .sr-stage__msg { display: grid; }
.studio-root .sr-stage[data-state="error"] .sr-stage__msg .cloud-spinner { display: none; }
.studio-root .sr-stage__msg .cloud-alert { max-width: 520px; text-align: left; }
.studio-root .sr-split { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; }
.studio-root .sr-split-label { position: absolute; top: 12px; z-index: 3; font-size: 11px; padding: 3px 8px; border-radius: 4px; background: rgba(0, 0, 0, .55); color: #fff; }
.studio-root .sr-split-label--b { left: 16px; } .studio-root .sr-split-label--a { right: 16px; }

.studio-root .sr-crop { position: absolute; z-index: 2; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); outline: 1px solid rgba(255, 255, 255, .9); cursor: move; touch-action: none; }
.studio-root .sr-crop__grid { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(to right, transparent 33.2%, rgba(255,255,255,.45) 33.3%, transparent 33.4%, transparent 66.6%, rgba(255,255,255,.45) 66.7%, transparent 66.8%),
  linear-gradient(to bottom, transparent 33.2%, rgba(255,255,255,.45) 33.3%, transparent 33.4%, transparent 66.6%, rgba(255,255,255,.45) 66.7%, transparent 66.8%); }
.studio-root .sr-crop__h { position: absolute; width: 18px; height: 18px; border: 3px solid #fff; z-index: 1; }
.studio-root .sr-crop__h--nw { left: -3px; top: -3px; border-right: 0; border-bottom: 0; cursor: nwse-resize; }
.studio-root .sr-crop__h--ne { right: -3px; top: -3px; border-left: 0; border-bottom: 0; cursor: nesw-resize; }
.studio-root .sr-crop__h--sw { left: -3px; bottom: -3px; border-right: 0; border-top: 0; cursor: nesw-resize; }
.studio-root .sr-crop__h--se { right: -3px; bottom: -3px; border-left: 0; border-top: 0; cursor: nwse-resize; }

.studio-root .sr-strip { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; background: var(--sr-panel); border-top: 1px solid var(--sr-line); min-height: 76px; }
.studio-root .sr-strip__item { position: relative; flex: 0 0 auto; width: 84px; height: 58px; padding: 0; border: 1px solid var(--sr-line); border-radius: 6px; overflow: hidden; background: var(--sr-surround); cursor: pointer; display: grid; place-items: center; }
.studio-root .sr-strip__item[aria-selected="true"] { outline: 2px solid var(--sr-sel); outline-offset: 1px; }
.studio-root .sr-strip__item img { width: 100%; height: 100%; object-fit: cover; }
.studio-root .sr-strip__stars, .studio-root .sr-strip__flag { position: absolute; bottom: 2px; font-size: 9px; padding: 1px 3px; border-radius: 3px; background: rgba(0,0,0,.6); color: #fff; }
.studio-root .sr-strip__stars { left: 2px; } .studio-root .sr-strip__flag { right: 2px; }

/* ---------- Inspector ---------- */
.studio-root .sr-inspector { border-left: 1px solid var(--sr-line); background: var(--sr-panel); display: flex; flex-direction: column; min-height: 0; }
.studio-root .sr-insp-head { padding: 12px 16px 8px; border-bottom: 1px solid var(--sr-line); }
.studio-root .sr-hist { width: 100%; height: 70px; display: block; background: var(--sr-hist-bg); border-radius: 6px; }
.studio-root .sr-insp-tabs { padding: 0 8px; border-bottom: 1px solid var(--sr-line); }
.studio-root .sr-insp-pane { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 8px 16px 24px; }
.studio-root .sr-group { border-bottom: 1px solid var(--sr-line); padding: 4px 0 8px; }
.studio-root .sr-group > summary, .studio-root .sr-sub > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; padding: 10px 0; }
.studio-root .sr-group > summary::-webkit-details-marker, .studio-root .sr-sub > summary::-webkit-details-marker { display: none; }
.studio-root .sr-group[open] > summary .cloud-icon, .studio-root .sr-sub[open] > summary .cloud-icon { transform: rotate(180deg); }
.studio-root .sr-sub { margin: 4px 0; padding-left: 8px; border-left: 2px solid var(--sr-line); }
.studio-root .sr-sub > summary { padding: 6px 0; font-size: 13px; color: var(--sr-ink-2); }
.studio-root .sr-ctl { padding: 4px 0; }
.studio-root .sr-ctl__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.studio-root .sr-ctl__head label, .studio-root .sr-ctl__label { font-size: 13px; color: var(--sr-ink); }
.studio-root .sr-ctl__val { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--sr-ink-2); }
.studio-root .sr-range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer;
  --sr-default: 50%; }
.studio-root .sr-range::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(to right, transparent calc(var(--sr-default) - 1px), var(--sr-ink-3) calc(var(--sr-default) - 1px), var(--sr-ink-3) calc(var(--sr-default) + 1px), transparent calc(var(--sr-default) + 1px)) center / 100% 9px no-repeat, var(--sr-track); }
.studio-root .sr-range::-moz-range-track { height: 3px; border-radius: 2px; background: var(--sr-track); }
.studio-root .sr-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--sr-thumb); margin-top: -5.5px; border: 2px solid var(--sr-panel); box-shadow: 0 0 0 1px var(--sr-line-strong); }
.studio-root .sr-range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--sr-thumb); border: 2px solid var(--sr-panel); }
.studio-root .sr-range:disabled { opacity: .4; cursor: not-allowed; }
.studio-root .sr-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.studio-root .sr-auto { padding: 4px 0 8px; }
.studio-root .sr-auto__list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.studio-root .sr-auto__list li { display: flex; justify-content: space-between; }
.studio-root .sr-bands { display: flex; gap: 6px; padding: 6px 0; }
.studio-root .sr-band { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--sr-panel); box-shadow: 0 0 0 1px var(--sr-line-strong); cursor: pointer; padding: 0; }
.studio-root .sr-band[aria-checked="true"] { box-shadow: 0 0 0 2px var(--sr-sel); }
.studio-root .sr-band--red { background: #d64541; } .studio-root .sr-band--orange { background: #e8873a; } .studio-root .sr-band--yellow { background: #e6c844; } .studio-root .sr-band--green { background: #52a85a; }
.studio-root .sr-band--aqua { background: #3fb7b5; } .studio-root .sr-band--blue { background: #3f6fd6; } .studio-root .sr-band--purple { background: #8357c9; } .studio-root .sr-band--magenta { background: #c74aa5; }
.studio-root .sr-tools { padding: 4px 0 8px; }
.studio-root .sr-aspects, .studio-root .sr-look-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-root .sr-insp-foot { padding: 16px 0; }
.studio-root .sr-info { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 6px 12px; font-size: 13px; margin: 8px 0 16px; }
.studio-root .sr-info dt { color: var(--sr-ink-3); } .studio-root .sr-info dd { margin: 0; overflow-wrap: anywhere; }
.studio-root .sr-keys kbd { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 2px 6px; border: 1px solid var(--sr-line-strong); border-radius: 4px; background: var(--sr-inset); }

/* ---------- Film Lab ---------- */
.studio-root .sr-look-head { padding: 8px 0 12px; border-bottom: 1px solid var(--sr-line); margin-bottom: 12px; }
.studio-root .sr-look-opts { display: flex; flex-wrap: wrap; gap: 12px; padding: 6px 0; font-size: 13px; }
.studio-root .sr-look-groups { margin-bottom: 8px; }
.studio-root .sr-looks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.studio-root .sr-look { border: 1px solid var(--sr-line); border-radius: 10px; overflow: hidden; background: var(--sr-panel); display: flex; flex-direction: column; }
.studio-root .sr-look.is-on { outline: 2px solid var(--sr-sel); outline-offset: 1px; }
.studio-root .sr-look__apply { display: flex; flex-direction: column; gap: 4px; padding: 0 0 8px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.studio-root .sr-look__frame { aspect-ratio: 3 / 2; background: var(--sr-surround); display: block; overflow: hidden; }
.studio-root .sr-look__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.studio-root .sr-look__img:not([src]) { visibility: hidden; }
.studio-root .sr-look__name { font-size: 13px; font-weight: 600; padding: 0 8px; }
.studio-root .sr-look__desc { font-size: 11px; color: var(--sr-ink-3); padding: 0 8px; line-height: 1.35; }
.studio-root .sr-look__tools { display: flex; align-items: center; gap: 2px; padding: 0 4px 6px; margin-top: auto; }
.studio-root .sr-look__insp { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.studio-root .sr-fav { border: 0; background: none; color: var(--sr-ink-3); padding: 4px; cursor: pointer; border-radius: 4px; }
.studio-root .sr-fav[aria-pressed="true"] { color: var(--sr-ink); }
.studio-root .sr-fav[aria-pressed="true"] .cloud-icon { fill: currentColor; }

/* ---------- Export ---------- */
.studio-root .sr-export { max-width: 760px; width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: auto; }
.studio-root .sr-exp-tabs { margin: 0 0 16px; }
.studio-root .sr-pub-preview { max-height: 420px; overflow: auto; background: var(--sr-surround, #ddd); border-radius: 8px; line-height: 0; }
.studio-root .sr-pub-img { display: block; max-width: none; image-rendering: auto; }
.studio-root .sr-pub-img:not([src]) { display: none; }
.studio-root .sr-progress { width: 100%; height: 6px; }
.studio-root .sr-confirm { max-width: 440px; width: calc(100vw - 32px); padding: 24px; display: grid; gap: 12px; }
.studio-root .sr-confirm__acts { justify-content: flex-end; }

/* Category picker in the composer */
.studio-root .studio-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.studio-root .studio-chip { display: inline-flex; align-items: center; gap: 4px; }
.studio-root .studio-chip__x { border: 0; background: none; padding: 0 2px; cursor: pointer; color: inherit; display: inline-flex; }
.studio-root .studio-cat-list { max-height: 180px; overflow: auto; margin: 6px 0 0; padding: 4px; list-style: none; border: 1px solid var(--cloud-border-subtle); border-radius: 8px; }
.studio-root .studio-cat-list .cloud-option { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.studio-root .studio-cat-list .cloud-option:hover, .studio-root .studio-cat-list .cloud-option:focus { background: var(--cloud-bg-subtle); outline: none; }
.studio-root .studio-cat-check { width: 16px; display: inline-flex; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .studio-root .sr-body--edit { grid-template-columns: 1fr; grid-template-rows: minmax(300px, 58vh) auto; }
  .studio-root .sr-inspector { border-left: 0; border-top: 1px solid var(--sr-line); max-height: none; }
  .studio-root.studio-root--darkroom { height: auto; min-height: 100dvh; overflow: visible; }
  .studio-root .sr-body { overflow: visible; }
  .studio-root .sr-body--edit .sr-center { min-height: 360px; }
}
@media (max-width: 767px) {
  .studio-root .sr-body--library { grid-template-columns: 1fr; }
  .studio-root .sr-lib-side { border-right: 0; border-bottom: 1px solid var(--sr-line); }
  .studio-root .sr-top { grid-template-columns: 1fr auto; }
  .studio-root .sr-where { display: none; }
  .studio-root .sr-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding: 12px; }
  .studio-root .sr-looks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-root .sr-toolbar .cloud-button .label { display: none; }
}
@media (prefers-reduced-motion: reduce) { .studio-root .sr-app * { transition: none !important; animation: none !important; } }

/* Native selects inside the darkroom and its dialogs follow the theme tokens. */
.studio-root .sr-app select.cloud-select { -webkit-appearance: none; appearance: none; height: 36px; padding: 0 32px 0 10px; border-radius: 8px; border: 1px solid var(--sr-line-strong); color: var(--sr-ink); font: inherit; font-size: 14px; max-width: 100%;
  background: var(--sr-panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.studio-root .sr-app select.cloud-select:focus-visible { outline: 2px solid var(--sr-focus); outline-offset: 1px; }
.studio-root .sr-app .cloud-segmented__item { display: inline-flex; align-items: center; gap: 6px; }
.studio-root .sr-app .sr-export .cloud-field { min-width: 0; }
@media (max-width: 767px) {
  .studio-root .studio-tabs { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .studio-root .studio-tabs .cloud-tab { flex: 0 0 auto; }
}


/* ================= V2.0.1 components ================= */
.studio-root .sr-app { --sr-squircle: var(--sr-radius); }
@supports (corner-shape: squircle) { .studio-root .sr-app .sr-look, .studio-root .sr-app .sr-cell, .studio-root .sr-app .sr-tool, .studio-root .sr-app .sr-mask-row, .studio-root .sr-app .cloud-dialog { corner-shape: squircle; } }
.studio-root .sr-app .cloud-button--primary { background: var(--sr-accent); color: var(--sr-accent-ink); border-color: var(--sr-accent); }
.studio-root .sr-app .cloud-button--primary:hover { filter: brightness(.96); }
.studio-root .sr-app .cloud-button { border-radius: var(--sr-r-ctl); }
.studio-root .sr-app .cloud-segmented__item[aria-selected="true"], .studio-root .sr-app .cloud-segmented__item[aria-pressed="true"] { background: var(--sr-panel); color: var(--sr-ink); box-shadow: 0 0 0 1px var(--sr-line-strong), inset 0 -2px 0 var(--sr-accent); }
.studio-root .sr-app .cloud-chip[aria-checked="true"], .studio-root .sr-app .cloud-chip[aria-selected="true"] { background: var(--sr-inset); color: var(--sr-ink); border-color: var(--sr-accent); box-shadow: inset 0 0 0 1px var(--sr-accent); }
.studio-root .sr-hint { font-size: 12.5px; }
.studio-root .sr-eyebrow { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sr-ink-3); margin: 14px 0 8px; }
/* Top bar: one row, never stacked */
.studio-root .sr-top { min-height: 56px; padding: 6px 16px; position: relative; z-index: 3; }
/* Edit body: canvas | inspector(rail + panel) */
.studio-root .sr-body--edit { grid-template-columns: minmax(0, 1fr) clamp(330px, 26vw, 400px); }
.studio-root .sr-inspector { display: grid; grid-template-columns: 64px minmax(0, 1fr); min-height: 0; }
.studio-root .sr-rail { display: flex; flex-direction: column; gap: 4px; padding: 10px 6px; border-right: 1px solid var(--sr-line); background: var(--sr-shell); overflow-y: auto; }
.studio-root .sr-rail__btn { display: grid; justify-items: center; gap: 3px; padding: 8px 2px; border: 0; border-radius: 12px; background: none; color: var(--sr-ink-3); cursor: pointer; font: inherit; font-size: 10.5px; line-height: 1.1; position: relative; }
.studio-root .sr-rail__btn:hover { background: var(--sr-inset); color: var(--sr-ink); }
.studio-root .sr-rail__btn[aria-selected="true"] { background: var(--sr-inset); color: var(--sr-ink); }
.studio-root .sr-rail__btn[aria-selected="true"]::before { content: ""; position: absolute; left: -6px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--sr-accent); }
.studio-root .sr-rail__btn[aria-selected="true"] .cloud-icon { color: var(--sr-accent-text); }
.studio-root .sr-insp-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.studio-root .sr-insp-title { font-size: 15px; font-weight: 600; margin: 0; padding: 12px 16px 4px; }
.studio-root .sr-insp-pane { padding: 4px 16px 24px; }
/* Sliders: precise, colour only where meaningful, accent fill from the minimum */
.studio-root .sr-ctl { padding: 6px 0; }
.studio-root .sr-ctl__head label, .studio-root .sr-ctl__label { font-size: 13.5px; }
.studio-root .sr-range { --sr-fill: 50%; --sr-default: -10%; }
.studio-root .sr-range::-webkit-slider-runnable-track { height: 4px; border-radius: 3px; background:
  linear-gradient(to right, transparent calc(var(--sr-default) - 1px), var(--sr-ink-3) calc(var(--sr-default) - 1px), var(--sr-ink-3) calc(var(--sr-default) + 1px), transparent calc(var(--sr-default) + 1px)) center / 100% 10px no-repeat,
  linear-gradient(90deg, var(--sr-track) var(--sr-lo, 0%), var(--sr-accent) var(--sr-lo, 0%), var(--sr-accent) var(--sr-hi, var(--sr-fill)), var(--sr-track) var(--sr-hi, var(--sr-fill))); }
.studio-root .sr-range.sr-range--color::-webkit-slider-runnable-track { background:
  linear-gradient(to right, transparent calc(var(--sr-default) - 1px), rgba(0,0,0,.45) calc(var(--sr-default) - 1px), rgba(0,0,0,.45) calc(var(--sr-default) + 1px), transparent calc(var(--sr-default) + 1px)) center / 100% 10px no-repeat, var(--sr-track-bg); height: 6px; }
.studio-root .sr-range::-moz-range-progress { background: var(--sr-accent); height: 4px; border-radius: 3px; }
.studio-root .sr-range.sr-range--color::-moz-range-track { background: var(--sr-track-bg); height: 6px; }
.studio-root .sr-range::-webkit-slider-thumb { width: 16px; height: 16px; margin-top: -6px; background: var(--sr-panel); border: 2px solid var(--sr-ink); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.studio-root .sr-range.sr-range--color::-webkit-slider-thumb { margin-top: -5px; }
.studio-root .sr-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--sr-accent); }
.studio-root .sr-app .sr-num.cloud-input { width: 68px; height: 28px; font-size: 12.5px; margin-right: 6px; }
/* Tools + masks */
.studio-root .sr-tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.studio-root .sr-tool { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--sr-line); background: var(--sr-panel); color: var(--sr-ink); font: inherit; font-size: 12px; cursor: pointer; min-height: var(--sr-h); position: relative; }
.studio-root .sr-tool:hover { border-color: var(--sr-line-strong); background: var(--sr-inset); }
.studio-root .sr-tool.is-on { border-color: var(--sr-accent); box-shadow: inset 0 0 0 1px var(--sr-accent); }
.studio-root .sr-tool.is-on .cloud-icon { color: var(--sr-accent-text); }
.studio-root .sr-tool__note { font-size: 9.5px; color: var(--sr-ink-3); }
.studio-root .sr-mask-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
.studio-root .sr-mask-row { display: flex; align-items: center; gap: 4px; border: 1px solid var(--sr-line); border-radius: 12px; padding: 2px 4px 2px 2px; background: var(--sr-panel); }
.studio-root .sr-mask-row.is-on { border-color: var(--sr-accent); }
.studio-root .sr-mask-row__main { flex: 1; min-width: 0; display: grid; text-align: left; gap: 2px; padding: 8px 10px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.studio-root .sr-mask-row__name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-root .sr-mask-edit { border-top: 1px solid var(--sr-line); margin-top: 12px; padding-top: 12px; }
.studio-root .sr-mask-edit .sr-row .cloud-input { flex: 1; height: 36px; }
.studio-root .sr-maskpad { position: absolute; inset: 0; z-index: 2; display: none; cursor: crosshair; touch-action: none; }
.studio-root .sr-maskpad.is-on { display: block; }
.studio-root .sr-provisional { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: blur(.4px); opacity: .9; }
.studio-root .sr-stage[data-state="ready"] .sr-provisional { display: none; }
.studio-root .sr-stage[data-state="loading"] .sr-paper { min-width: 40%; min-height: 40%; }
/* Library: photograph-centric cards, cheap rendering for big folders */
.studio-root .sr-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; grid-auto-rows: max-content; }
.studio-root .sr-cell { content-visibility: auto; contain-intrinsic-size: 190px 180px; border-radius: 14px; }
.studio-root .sr-cell__img { aspect-ratio: 3 / 2; }
.studio-root .sr-cell__img img.sr-fade, .studio-root .sr-strip__media img.sr-fade { animation: srfade .25s ease; }
@keyframes srfade { from { opacity: 0 } to { opacity: 1 } }
.studio-root .sr-skeleton { background: linear-gradient(90deg, var(--sr-inset) 25%, var(--sr-line) 50%, var(--sr-inset) 75%); background-size: 200% 100%; animation: srshimmer 1.4s linear infinite; width: 100%; height: 100%; display: grid; place-items: center; }
@keyframes srshimmer { to { background-position: -200% 0 } }
.studio-root .sr-skel-stack { display: grid; gap: 12px; padding-top: 8px; } .studio-root .sr-skel-row { height: 34px; border-radius: 10px; }
.studio-root .sr-tag--prev { color: var(--sr-ink-2); border-style: dashed; }
.studio-root .sr-thumb-status { margin-left: auto; }
.studio-root .sr-strip__media { width: 100%; height: 100%; display: grid; place-items: center; }
.studio-root .sr-look-filter { gap: 8px; } .studio-root .sr-look-filter .cloud-input { flex: 1; }
.studio-root .sr-looks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.studio-root .sr-look { border-radius: 14px; contain: content; }
.studio-root .sr-exp-progress { display: grid; gap: 6px; }
.studio-root .sr-lib-tools { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .studio-root .sr-skeleton { animation: none; } }
@media (max-width: 1023px) {
  .studio-root .sr-inspector { grid-template-columns: 1fr; }
  .studio-root .sr-rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--sr-line); padding: 6px; }
  .studio-root .sr-rail__btn { min-width: 64px; }
  .studio-root .sr-rail__btn[aria-selected="true"]::before { left: 10px; right: 10px; top: auto; bottom: -6px; width: auto; height: 3px; }
}

.studio-root .sr-rail__btn .cloud-icon { width: 20px; height: 20px; }
.studio-root .sr-tool .cloud-icon { width: 20px; height: 20px; }
.studio-root .sr-mask-overlay { display: grid; gap: 8px; }
