﻿/* ============================================================
   .retouch.shock — app-specific styles
   Loads AFTER shock.css + suite-app.css. Reuses suite-app
   tokens (--app-bg / --app-surface / --app-line / --pick …).
   Only the canvas stage, tool list and slider rows live here.
   ============================================================ */

/* ── token aliases ───────────────────────────────────────── */
:root {
  --accent: var(--red);
  --accent-alpha: rgba(200,7,10,.12);
  /* semantic z-index scale */
  --z-sticky: 100;
  --z-dropdown: 300;
  --z-modal-back: 500;
  --z-modal: 600;
  --z-toast: 700;
  --z-overlay: 900;
}

/* ── global focus ring ───────────────────────────────────── */
*:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
*:focus:not(:focus-visible) { outline: none; }

/* ---- tool list (left rail) ---- */
.rt-tools .app-rail__item .kbd,
.rt-tools .app-rail__item .count { flex: 0 0 auto; }
.rt-tools .app-rail__item.is-active { background: var(--app-surface2); color: var(--text); border-left: 2px solid var(--red); padding-left: 8px; }

/* ---- slider rows ---- */
.rt-slider { margin-bottom: 12px; }
.rt-slider__top { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-bottom: 4px; }
.rt-slider__top .app-mono, .rt-slider__top span:last-child { color: var(--text); }
.rt-slider input[type=range] { width: 100%; accent-color: var(--red); }

/* ---- edit-mode toolbar cluster ---- */
.rt-edit-controls { display: inline-flex; align-items: center; gap: 6px; }
.rt-edit-controls .app-mono { color: var(--dim); font-size: 12px; padding: 0 2px; }

/* ---- canvas stage ---- */
.rt-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  height: 100%;
}
.rt-canvas-wrap {
  position: relative;
  line-height: 0;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  border: 1px solid var(--app-line);
  background:
    repeating-conic-gradient(#1a1a1e 0% 25%, #141417 0% 50%) 50% / 22px 22px;
  max-width: 100%;
  max-height: 100%;
}
.rt-canvas { display: block; max-width: 100%; max-height: calc(100vh - 180px); }
.rt-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  width: 100%; height: 100%;
}
.rt-canvas-wrap.tool-heal,
.rt-canvas-wrap.tool-smooth { cursor: crosshair; }
.rt-canvas-wrap.tool-crop { cursor: crosshair; }
.rt-canvas-wrap.tool-rotate { cursor: ew-resize; }

/* ---- inspector: history list ---- */
.rt-history { font-family: var(--font-mono); font-size: 12px; color: var(--dim); margin-top: 8px; }
.rt-history__row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--app-line); }
.rt-history__row .k { color: var(--faint); }
.rt-history__empty { color: var(--faint); padding: 10px 0; }

.rt-toolinfo { background: var(--app-surface2); border: 1px solid var(--app-line); border-radius: 5px; padding: 10px 12px; font-size: 13px; color: var(--dim); margin: 12px 0; }
.rt-toolinfo b { color: var(--text); }

/* edited badge on library thumbs */
.thumb.is-edited { border-color: var(--pick); }
.thumb__edited {
  position: absolute; top: 6px; right: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; background: var(--pick);
}

/* ============================================================
   Folder module (mirrors tag.shock), face panel, AI panel,
   icon buttons, view modes — added for the retouch overhaul.
   ============================================================ */

/* icon buttons in the topbar / rail */
.ab--icon { padding: 5px 7px; }
.ab--icon svg { display: block; }
.rt-icon-btn {
  background: none; border: 0; color: var(--dim); cursor: pointer;
  padding: 2px; border-radius: 4px; display: inline-flex; line-height: 0;
}
.rt-icon-btn:hover { color: var(--text); background: var(--app-surface2); }

/* tool icons */
.rt-tool-ico { width: 15px; height: 15px; flex: 0 0 auto; margin-right: 7px; opacity: .85; }
.rt-tools .app-rail__item { display: flex; align-items: center; }
.rt-tools .app-rail__item.is-active .rt-tool-ico { opacity: 1; color: var(--red); }

/* ---- folders ---- */
.rt-folders-title { display: flex; align-items: center; justify-content: space-between; }
.rt-folders-tools { display: inline-flex; gap: 2px; }
.rt-folder-list { display: flex; flex-direction: column; gap: 1px; padding: 2px 6px 4px; max-height: 220px; overflow-y: auto; }
.rt-folder {
  display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 5px;
  font-size: 13px; color: var(--dim); cursor: pointer; user-select: none; position: relative;
}
.rt-folder:hover { background: var(--app-surface2); color: var(--text); }
.rt-folder.is-active { background: var(--app-surface2); color: var(--text); box-shadow: inset 2px 0 0 var(--red); }
.rt-folder.is-sub { padding-left: 22px; }
.rt-folder.is-drop { background: color-mix(in srgb, var(--red) 22%, transparent); }
.rt-folder__chev { width: 12px; height: 12px; flex: 0 0 auto; transition: transform .12s; cursor: pointer; }
.rt-folder.is-collapsed .rt-folder__chev { transform: rotate(-90deg); }
.rt-folder.no-children .rt-folder__chev { visibility: hidden; }
.rt-folder__ico { width: 15px; height: 15px; flex: 0 0 auto; opacity: .8; }
.rt-folder__name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-folder__count { font-size: 11px; color: var(--faint); font-family: var(--font-mono); }
.rt-folder__act { opacity: 0; border: 0; background: none; color: var(--faint); cursor: pointer; padding: 1px 2px; border-radius: 3px; line-height: 0; }
.rt-folder:hover .rt-folder__act { opacity: 1; }
.rt-folder__act:hover { color: var(--text); }
.rt-folder__act.del:hover { color: var(--red); }

/* ---- collapsible panels (faces / ai) ---- */
.rt-collapse-head { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.rt-chev { transition: transform .2s cubic-bezier(0.22,0.61,0.36,1); flex: 0 0 auto; }
.rt-collapse-head.is-collapsed .rt-chev { transform: rotate(-90deg); }
.rt-collapse-body {
  display: block;
  overflow: hidden;
  max-height: 1400px;
  opacity: 1;
  padding: 2px 10px 6px;
  transition: max-height .25s cubic-bezier(0.22,0.61,0.36,1), opacity .18s, padding-top .2s, padding-bottom .2s;
}
.rt-collapse-body.is-hidden {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

/* ---- face panel (Capture One inspired layout) ---- */
.rt-faces-count { margin-left: auto; background: var(--app-surface2); border-radius: 9px; padding: 0 7px; font-size: 11px; color: var(--dim); }
.rt-faces-strip { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 0 8px; }
.rt-face-chip { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; position: relative; background: var(--app-surface2); }
.rt-face-chip.is-active { border-color: var(--red); }
.rt-face-chip img { width: 100%; height: 100%; object-fit: cover; }
.rt-face-chip__n { position: absolute; left: 2px; bottom: 1px; font-size: 9px; color: #fff; background: var(--red); border-radius: 3px; padding: 0 3px; }
.rt-detect { display: flex; align-items: center; }
.rt-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); padding: 4px 0 8px; cursor: pointer; }
/* A toggle whose behaviour is not wired yet. Kept visible on purpose (see the
   comment on the disabled inputs in suite/retouch/app/index.html) but it must
   never look operable — align-items:flex-start so the note can wrap. */
.rt-check--planned { cursor: not-allowed; opacity: .62; align-items: flex-start; }
.rt-check--planned input { cursor: not-allowed; margin-top: 2px; }
.rt-check--planned em { font-style: normal; opacity: .82; }
.rt-fslider { margin-bottom: 9px; }
.rt-fslider .rt-slider__top { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-bottom: 3px; }
.rt-fslider .rt-slider__top .app-mono { color: var(--text); }
.rt-fslider input[type=range] { width: 100%; accent-color: var(--red); }
.rt-subhead { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 10px 0 6px; }
.rt-face-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ---- ai panel ---- */
.rt-field-label, .rt-ai-keys label { display: block; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; margin: 6px 0 4px; }
.rt-select { width: 100%; background: var(--app-surface2); color: var(--text); border: 1px solid var(--app-line); border-radius: 5px; padding: 6px 8px; font-size: 13px; margin-bottom: 8px; }
.rt-ai .app-rail__item { display: flex; align-items: center; }
.rt-hint { font-size: 11px; color: var(--faint); line-height: 1.45; padding: 4px 0 0; }
.rt-hint b { color: var(--dim); }
.rt-muted { color: var(--faint); font-weight: 400; }
.rt-ai-keys { display: flex; flex-direction: column; gap: 4px; }
.rt-ai-keys input { width: 100%; background: var(--app-surface2); color: var(--text); border: 1px solid var(--app-line); border-radius: 5px; padding: 7px 9px; font-size: 13px; }

/* removal-tool cursor */
.rt-canvas-wrap.tool-removal { cursor: crosshair; }

/* ---- view modes: full screen ---- */
.app-body.is-fullscreen .app-topbar,
.app-body.is-fullscreen .app-rail,
.app-body.is-fullscreen .app-inspector,
.app-body.is-fullscreen .app-toolbar,
.app-body.is-fullscreen .app-footbar { display: none !important; }
.app-body.is-fullscreen .app-body-grid { grid-template-columns: 1fr; }
.app-body.is-fullscreen .rt-canvas { max-height: 100vh; }
.rt-fs-exit {
  position: fixed; top: 12px; right: 12px; z-index: 50; display: none;
}
.app-body.is-fullscreen .rt-fs-exit { display: inline-flex; }

/* ---- markup tool ---- */
.rt-swatches { display: flex; gap: 6px; }
.rt-swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--app-line); cursor: pointer; padding: 0; }
.rt-swatch.is-active { border-color: var(--text); box-shadow: 0 0 0 2px var(--app-bg), 0 0 0 3px var(--red); }
.rt-canvas-wrap.tool-markup { cursor: crosshair; }

/* ---- filters grid ---- */
.rt-filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rt-filter-chip { background: var(--app-surface2); border: 1px solid var(--app-line); border-radius: 6px; padding: 6px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--dim); }
.rt-filter-chip:hover { color: var(--text); }
.rt-filter-chip.is-active { border-color: var(--red); color: var(--text); }
.rt-filter-sw { width: 100%; height: 26px; border-radius: 4px; background: linear-gradient(135deg, #6a7cff, #ff7a59); opacity: .85; }
.rt-filter-nm { font-size: 10px; text-align: center; line-height: 1.1; }

/* ---- video editor ---- */
.rt-vstage { flex-direction: column; }
.rt-vwrap { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 1100px; }
.rt-video { width: 100%; max-height: calc(100vh - 320px); background: #000; border: 1px solid var(--app-line); border-radius: 6px; }
.rt-vbar { display: flex; align-items: center; gap: 12px; }
.rt-trim { position: relative; flex: 1 1 auto; height: 30px; background: var(--app-surface2); border-radius: 6px; border: 1px solid var(--app-line); }
.rt-trim__range { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--red) 26%, transparent); border-left: 2px solid var(--red); border-right: 2px solid var(--red); }
.rt-trim__handle { position: absolute; top: -3px; width: 12px; height: 36px; background: var(--red); border-radius: 3px; transform: translateX(-50%); cursor: ew-resize; }
.rt-trim__play { position: absolute; top: -2px; width: 2px; height: 34px; background: #fff; pointer-events: none; }
.rt-vtime { color: var(--dim); font-size: 12px; white-space: nowrap; }
.rt-vadjust { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.rt-vadj { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.rt-vadj input[type=range] { accent-color: var(--red); width: 90px; }

/* ============================================================
   Responsive layout — phone / tablet (clean, minimal, touch).
   Desktop (>960px) keeps the 3-column shell untouched.
   ============================================================ */
.rt-mob-menu { display: none; }
.rt-backdrop { display: none; }
.rt-mobile-bar { display: none; }

html.webmode {
  /* drawers slide in over the canvas with a backdrop. Driven by suite-device.js
     (phone/tablet any orientation, or a narrow ≤960 desktop window) via native
     CSS nesting — bare selectors below resolve under html.webmode. */
  .app-rail, .app-inspector {
    transition: transform .22s ease; will-change: transform;
    box-shadow: 0 0 40px rgba(0,0,0,.5);
    width: min(86vw, 320px) !important;
    overflow-y: auto;
  }
  .app-rail.is-open, .app-inspector.is-open { top: 52px; bottom: 0; }
  .rt-backdrop.is-on {
    display: block; position: fixed; inset: 52px 0 0; z-index: 35;
    background: rgba(0,0,0,.45); backdrop-filter: blur(1px);
  }
  .rt-mob-menu { display: inline-flex; }

  /* the icon-only bottom toolbar */
  .rt-mobile-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 38;
    background: var(--app-surface); border-top: 1px solid var(--app-line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); gap: 2px;
  }
  .rt-mb {
    flex: 1 1 0; min-width: 0; background: none; border: 0; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 2px; color: var(--dim); border-radius: 8px;
  }
  .rt-mb svg { width: 21px; height: 21px; }
  .rt-mb span { font-size: 10px; letter-spacing: .01em; }
  .rt-mb.is-active { color: var(--red); background: var(--app-surface2); }
  .rt-mb:active { background: var(--app-surface2); }

  /* keep content clear of the bottom bar */
  .app-scroll { padding-bottom: 64px; }
  .app-footbar { display: none !important; }     /* counts move to inspector on mobile */

  /* topbar trims to essentials */
  .app-crumbs { display: none; }
  .app-engine { display: none; }
  .app-topbar { padding-left: 6px; padding-right: 6px; gap: 4px; }
  #btn-export span, #btn-import span { display: none; }   /* icons only */

  /* canvas + library breathe on small screens */
  .rt-stage { padding: 8px; }
  .rt-canvas { max-height: calc(100vh - 190px); }
  .rt-vstage .rt-video { max-height: calc(100vh - 280px); }
}

@media (max-width: 600px) {
  /* denser, finger-friendly library grid regardless of the desktop size slider */
  #grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)) !important; }
  .rt-mb span { font-size: 9px; }
  .rt-face-actions .ab, .rt-vadjust .ab { flex: 1 1 auto; }
  /* larger touch targets for sliders */
  .rt-fslider input[type=range], .rt-slider input[type=range] { height: 26px; }
}

/* ---- crop aspect presets ---- */
.rt-ratios { display: flex; flex-wrap: wrap; gap: 5px; }
.rt-ratio { background: var(--app-surface2); border: 1px solid var(--app-line); color: var(--dim); border-radius: 5px; padding: 4px 9px; font-size: 12px; cursor: pointer; }
.rt-ratio:hover { color: var(--text); }
.rt-ratio.is-active { border-color: var(--red); color: var(--text); }

/* ---- settings options ---- */
.rt-opts { display: flex; flex-direction: column; gap: 8px; }
.rt-opts .rt-check { padding: 0; }

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

/* ---- export options + compliance ---- */
.rt-exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.rt-exp-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--dim); }
.rt-compliance { font-size: 12px; color: var(--dim); margin-top: 10px; min-height: 16px; }

/* ---- unified Suite library dialog ---- */
.app-dialog__panel--wide { max-width: 760px; width: min(760px, 94vw); }
.rt-lib-bar { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.rt-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; max-height: 56vh; overflow-y: auto; }
.rt-lib-cell { padding: 0; border: 1px solid var(--app-line); border-radius: 6px; overflow: hidden; cursor: pointer; background: var(--app-surface2); aspect-ratio: 1; }
.rt-lib-cell:hover { border-color: var(--red); }
.rt-lib-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* touch: don't let the page scroll/zoom while drawing on the canvas */
@media (pointer: coarse) {
  .rt-canvas, .rt-overlay { touch-action: none; }
}

/* ============================================================
   Extension Module 8 — new elements added in this round
   ============================================================ */

/* ---- per-colour HSL tab strip ---- */
.rt-hsl-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px;
}
.rt-hsl-tab {
  background: var(--app-surface2); border: 1px solid var(--app-line);
  color: var(--dim); border-radius: 5px; padding: 3px 8px;
  font-size: 11px; cursor: pointer; transition: none;
}
.rt-hsl-tab:hover { color: var(--text); }
.rt-hsl-tab.is-active { border-color: var(--red); color: var(--text); background: var(--app-surface); }
.rt-hsl-sliders { padding-top: 2px; }

/* ---- canvas cursor overrides for new tools ---- */
.rt-canvas-wrap.tool-eyedrop { cursor: crosshair; }
.rt-canvas-wrap.tool-spotfix { cursor: cell; }
.rt-canvas-wrap.tool-spotfix:active { cursor: wait; }

/* ---- before/after compare button active state ---- */
#btn-compare.is-active { background: var(--red); color: #fff; border-color: var(--red); }

/* ---- command palette dialog ---- */
.rt-cmd-panel {
  max-width: 520px; width: min(520px, 92vw);
  padding: 10px 0 14px; background: var(--app-surface); border-radius: 10px;
  border: 1px solid var(--app-line); box-shadow: 0 16px 56px rgba(0,0,0,.6);
}
.rt-cmd-input {
  width: 100%; padding: 12px 18px; background: transparent;
  border: 0; border-bottom: 1px solid var(--app-line);
  color: var(--text); font-size: 16px; outline: none;
  box-sizing: border-box;
}
.rt-cmd-input::placeholder { color: var(--faint); }
.rt-cmd-list {
  max-height: 320px; overflow-y: auto; padding: 6px 0;
}
.rt-cmd-list .rt-hint { padding: 0 18px; }
.rt-cmd-item {
  display: block; width: 100%; text-align: left;
  padding: 9px 18px; background: none; border: 0;
  color: var(--dim); font-size: 14px; cursor: pointer;
}
.rt-cmd-item:hover,
.rt-cmd-item.is-sel { background: var(--app-surface2); color: var(--text); }

/* ---- guided first-run onboarding ---- */
.rt-onboard {
  position: fixed; bottom: 20px; right: 20px; z-index: 60;
  max-width: 340px; pointer-events: auto;
}
.rt-onboard__body {
  background: var(--app-surface); border: 1px solid var(--app-line);
  border-radius: 10px; padding: 18px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.rt-onboard__title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.rt-onboard__step {
  display: flex; gap: 10px; margin-bottom: 10px;
  font-size: 13px; color: var(--dim); line-height: 1.4;
}
.rt-onboard__step b { color: var(--text); }
.rt-onboard__num {
  flex: 0 0 auto; width: 20px; height: 20px;
  border-radius: 50%; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.rt-onboard__actions { display: flex; gap: 8px; margin-top: 14px; }

/* ---- batch queue panel ---- */
.rt-batch-queue {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(420px, 96vw); z-index: 55;
  background: var(--app-surface); border: 1px solid var(--app-line);
  border-bottom: 0; border-radius: 10px 10px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.4);
}
.rt-batch-queue__head {
  display: flex; align-items: center; padding: 10px 14px;
  border-bottom: 1px solid var(--app-line);
}
.rt-batch-queue__title { font-size: 13px; font-weight: 600; color: var(--text); }
.rt-batch-queue__spacer { flex: 1; }
.rt-batch-list {
  max-height: 160px; overflow-y: auto; padding: 6px 0;
}
.rt-bq-row {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 14px; font-size: 12px;
}
.rt-bq-icon { font-size: 13px; flex: 0 0 auto; width: 18px; text-align: center; }
.rt-bq-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); }
.rt-bq-pending .rt-bq-icon { color: var(--faint); }
.rt-bq-running .rt-bq-icon { color: var(--red); }
.rt-bq-done .rt-bq-icon { color: var(--pick); }
.rt-bq-error .rt-bq-icon { color: var(--red); }
.rt-bq-error .rt-bq-name { color: var(--red); }

/* ---- per-image notes textarea ---- */
.rt-notes-field { margin-top: 10px; }
.rt-notes-ta {
  width: 100%; background: var(--app-surface2); color: var(--text);
  border: 1px solid var(--app-line); border-radius: 6px;
  padding: 8px 10px; font-size: 12px; font-family: inherit;
  resize: vertical; min-height: 60px; box-sizing: border-box;
}
.rt-notes-ta:focus { outline: none; border-color: var(--red); }

/* ---- quick retouch mode ---- */
.is-quickmode .app-rail,
.is-quickmode .app-inspector,
.is-quickmode .app-toolbar { display: none !important; }
.is-quickmode .app-body-grid { grid-template-columns: 1fr; }
.is-quickmode .rt-canvas { max-height: calc(100vh - 120px); }

/* ---- stock-ready button colour ---- */
#btn-stock-ready { color: var(--red); }
#btn-stock-ready svg { color: var(--red); }

/* ═══ EXT 9 — zoom + loupe · history · split-tone · channels · presence ═══ */

/* Loupe overlay */
#rt-loupe {
  position: fixed; z-index: 90; pointer-events: none; display: none;
  width: 200px; height: 200px; border-radius: 50%;
  border: 2px solid var(--app-line); box-shadow: 0 4px 18px rgba(0,0,0,.45);
  background: #000;
}

/* Zoom percentage chip in toolbar */
#zoom-pct { opacity: .7; min-width: 38px; text-align: center; }

/* History strip in inspector */
.rt-hist-panel h3 { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 6px; padding: 0 2px; }
.rt-hist-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.rt-hist-strip::-webkit-scrollbar { height: 3px; }
.rt-hist-thumb { flex: 0 0 80px; scroll-snap-align: start; cursor: pointer; border-radius: 4px; overflow: hidden; position: relative; border: 2px solid transparent; }
.rt-hist-thumb:hover, .rt-hist-thumb.is-active { border-color: var(--red); }
.rt-hist-thumb img { width: 80px; height: 53px; display: block; object-fit: cover; }
.rt-hist-label { position: absolute; bottom: 0; left: 0; right: 0; font-size: 9px; background: rgba(0,0,0,.6); color: #fff; padding: 2px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Split-tone channel tab colours */
#ch-tabs .rt-hsl-tab[data-ch="r"].is-active { border-color: #e55; }
#ch-tabs .rt-hsl-tab[data-ch="g"].is-active { border-color: #5b5; }
#ch-tabs .rt-hsl-tab[data-ch="b"].is-active { border-color: #55e; }

/* Presence avatars in topbar */
.rt-presence { display: flex; align-items: center; gap: 3px; margin-right: 4px; }
.rt-presence-avatar {
  width: 22px; height: 22px; border-radius: 50%; background: var(--app-surface2);
  border: 1.5px solid var(--app-line); display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--text); cursor: default;
}

/* Caption draft widget in inspector */
.rt-caption-result { margin-top: 14px; border-top: 1px solid var(--app-line); padding-top: 10px; }
.rt-caption-result h3 { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 6px; }
.rt-caption-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px; line-height: 1.3; }
.rt-caption-desc  { font-size: 12px; color: var(--dim); line-height: 1.5; }

/* ============================================================
   EXTENSION MODULE 10
   B&W Mixer · Geometry · Dodge/Burn · Virtual copies · Watermark
   AI grade transfer · Batch face · Crop suggestion · Smart export
   ============================================================ */

/* B&W Mixer section */
.rt-bwmix { }
#bwmix-body { }

/* Geometry section */
.rt-geometry { }
.rt-subhead { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase;
  letter-spacing: .05em; padding: 8px 10px 4px; }

/* Tilt-shift tab strip (reuses rt-hsl-tabs pattern) */
#tilt-tabs.rt-hsl-tabs { padding: 4px 10px 6px; }

/* Geometry controls transition */
#tilt-controls { padding: 0; }

/* Text input for AI crop prompt */
.rt-text-input {
  background: var(--app-surface2); border: 1px solid var(--app-line); border-radius: 5px;
  color: var(--text); padding: 5px 8px; font-size: 12px; outline: none;
  transition: border-color .15s;
}
.rt-text-input:focus { border-color: var(--accent); }
.rt-text-input::placeholder { color: var(--faint); }

/* Dodge / Burn tool buttons — warm/cool tint to distinguish */
[data-tool="dodge"] svg { stroke: #f5c842; }
[data-tool="burn"]  svg { stroke: #e0622a; }
[data-tool="dodge"].is-active { background: rgba(245,200,66,.12); border-color: #f5c842; }
[data-tool="burn"].is-active  { background: rgba(224,98,42,.12);  border-color: #e0622a; }

/* Virtual copies — badge on thumb cards */
.rt-vcopy-badge {
  position: absolute; top: 3px; left: 3px; background: rgba(0,0,0,.65);
  color: #fff; font-size: 9px; font-weight: 700; padding: 1px 4px;
  border-radius: 3px; letter-spacing: .03em; pointer-events: none;
}

/* Watermark controls panel */
#wm-controls .rt-fslider { padding: 4px 0; }
#wm-controls .rt-select  { width: 100%; margin-top: 6px; }

/* AI crop suggestion overlay drawn on the canvas overlay */
.rt-crop-overlay {
  position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 100vmax rgba(0,0,0,.35);
}

/* Smart export warning chip */
.rt-export-warn {
  display: flex; align-items: center; gap: 6px; padding: 7px 10px;
  background: rgba(220,120,20,.12); border: 1px solid rgba(220,120,20,.35);
  border-radius: 6px; margin: 8px 0; font-size: 12px; color: var(--text); line-height: 1.4;
}
.rt-export-warn svg { flex-shrink: 0; }

/* ============================================================
   EXTENSION MODULE 11
   Flag system · Shortcut overlay · Gradient/Radial filters
   Clone stamp · AI smart prompt · Scene preset · Proof sheet
   Watermark preview · Recipe quick slots · Session timer
   ============================================================ */

/* Keyboard shortcut overlay */
#dlg-shortcuts .app-dialog__panel { padding-bottom: 16px; }
.rt-shortcuts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; margin: 12px 0; }
@media (max-width: 480px) { .rt-shortcuts-grid { grid-template-columns: 1fr; } }
.rt-sc-group { }
.rt-sc-head {
  font-size: 10px; font-weight: 700; color: var(--faint); text-transform: uppercase;
  letter-spacing: .07em; padding-bottom: 5px; border-bottom: 1px solid var(--app-line); margin-bottom: 5px;
}
.rt-sc-row {
  display: flex; align-items: center; gap: 5px; padding: 3px 0;
  font-size: 12px; color: var(--dim);
}
.rt-sc-row kbd {
  display: inline-block; padding: 1px 5px; border: 1px solid var(--app-line);
  border-radius: 4px; background: var(--app-surface2); font-size: 10px;
  font-family: monospace; color: var(--text); white-space: nowrap; flex-shrink: 0;
}
.rt-sc-row span { flex: 1; }

/* Flag / reject badges */
.rt-flag-badge {
  position: absolute; bottom: 3px; right: 3px; width: 14px; height: 14px;
  border-radius: 50%; border: 1.5px solid rgba(255,255,255,.75);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 900; pointer-events: none; line-height: 1;
}
.rt-flag-badge--flagged  { background: #27ae60; color: #fff; }
.rt-flag-badge--rejected { background: #c0392b; color: #fff; }

/* Session timer chip */
.rt-session-timer {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  color: var(--faint); padding: 2px 7px; background: var(--app-surface2);
  border-radius: 10px; border: 1px solid var(--app-line);
}

/* Recipe quick-slot buttons (topbar inject) */
.rt-recipe-slots {
  display: flex; align-items: center; gap: 3px; padding: 0 8px;
  border-left: 1px solid var(--app-line); margin-left: 4px;
}
.rt-recipe-slot {
  width: 24px; height: 24px; border-radius: 5px; border: 1px solid var(--app-line);
  background: var(--app-surface2); color: var(--faint); font-size: 10px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  position: relative; transition: border-color .15s, color .15s; user-select: none;
}
.rt-recipe-slot:hover { border-color: var(--accent); color: var(--text); }
.rt-recipe-slot.is-saved { background: rgba(200,40,40,.1); border-color: var(--accent); color: var(--text); }
.rt-recipe-slot__dot {
  position: absolute; top: 2px; right: 2px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--accent);
}

/* Gradient/Radial filter sections (inherit existing rt-fslider pattern) */
.rt-gf { } .rt-rf { }

/* Clone stamp cursor hint */
[data-tool="stamp"] svg { stroke: #a8d8ea; }
[data-tool="stamp"].is-active { background: rgba(168,216,234,.12); border-color: #a8d8ea; }

/* Watermark preview canvas */
#wm-preview-canvas { display: block; width: 100%; border-radius: 5px; border: 1px solid var(--app-line); }

/* ============================================================
   EXT12 — Curves · Perspective · Batch · Pick/Reject · Mini-insp
   ============================================================ */

/* Tone curves canvas */
.rt-curves-canvas {
  display: block;
  width: 220px; height: 220px;
  border-radius: 5px;
  border: 1px solid var(--app-line);
  cursor: crosshair;
  margin: 6px auto 0;
  background: var(--app-surface);
}

/* Perspective tool highlight */
[data-tool="perspective"] svg { stroke: #f0c040; }
[data-tool="perspective"].is-active { background: rgba(240,192,64,.1); border-color: #f0c040; }

/* Export queue overlay */
.rt-eq-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
}
.rt-eq-inner {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 10px;
  padding: 24px 32px;
  min-width: 280px;
  text-align: center;
}
.rt-eq-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.rt-eq-bar {
  height: 6px; border-radius: 3px;
  background: var(--app-line);
  margin-bottom: 8px; overflow: hidden;
}
.rt-eq-bar-fill {
  height: 100%; width: 0%;
  background: var(--accent);
  border-radius: 3px;
  transition: width .25s;
}
.rt-eq-status { font-size: 12px; color: var(--faint); margin-bottom: 14px; }

/* Pick & reject session view */
.rt-pickview-overlay {
  position: fixed; inset: 0; z-index: 9990;
  background: var(--app-bg);
  display: flex; flex-direction: column;
}
.rt-pickview-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--app-line);
  font-weight: 600; font-size: 14px;
}
.rt-pickview-cols {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 1px; background: var(--app-line);
  flex: 1; overflow: hidden;
}
.rt-pickview-col { background: var(--app-bg); display: flex; flex-direction: column; overflow: hidden; }
.rt-pickview-col__head { padding: 8px 12px; font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--app-line); }
.rt-pickview-col__body { flex: 1; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; align-content: flex-start; }
.rt-pv-thumb { width: 100px; height: 72px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 2px solid transparent; }
.rt-pv-thumb:hover { border-color: var(--accent); }

/* Floating mini inspector */
.rt-mini-insp {
  position: fixed; z-index: 9980;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px; line-height: 1.5;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  max-width: 180px;
  transition: opacity .12s;
}
.rt-mini-insp__name { font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-mini-insp__row { display: flex; justify-content: space-between; gap: 12px; color: var(--faint); }
.rt-mini-insp__flag { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 3px; }

/* AI luminosity mask overlay */
.rt-lummask-notice {
  padding: 4px 10px 6px;
  font-size: 11px; color: var(--faint);
  font-style: italic;
}

/* Edit log in inspector */
.rt-editlog { padding: 4px 10px 8px; }
.rt-editlog__item { font-size: 11px; color: var(--faint); padding: 2px 0; border-bottom: 1px solid var(--app-line); }
.rt-editlog__item:last-child { border-bottom: none; }

/* Per-panel copy/paste context menu */
.rt-ctx-menu {
  position: fixed; z-index: 9995;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 7px;
  padding: 4px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  min-width: 160px;
}
.rt-ctx-menu__item {
  padding: 7px 14px;
  font-size: 12px; cursor: pointer;
}
.rt-ctx-menu__item:hover { background: var(--app-line); }

/* Metadata template dialog */
#dlg-meta-template .app-dialog__panel { padding: 20px 24px; }

/* Pick/reject topbar button */
#btn-pickview { margin-left: 4px; }

/* ============================================================
   EXTENSION MODULE 13
   ============================================================ */

/* R. Star rating badge on grid cards */
.rt-rating-badge {
  position: absolute; bottom: 28px; left: 5px;
  font-size: 10px; letter-spacing: -.5px;
  color: #f5c518; text-shadow: 0 1px 2px rgba(0,0,0,.8);
  pointer-events: none; line-height: 1;
}

/* P. Sort controls */
.rt-sort-ctrl {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--faint);
}
.rt-sort-ctrl select {
  font-size: 11px; padding: 2px 4px; border-radius: 4px;
  border: 1px solid var(--app-line); background: var(--app-surface);
  color: var(--text); cursor: pointer;
}

/* S. Timeline view — date group dividers */
.rt-timeline-divider {
  width: 100%; padding: 14px 12px 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--faint);
  border-top: 1px solid var(--app-line);
  box-sizing: border-box;
}
.rt-timeline-divider:first-child { border-top: none; }

/* I. Stack badge */
.rt-stack-badge {
  position: absolute; top: 5px; right: 5px;
  background: rgba(0,0,0,.65); color: #fff;
  font-size: 10px; border-radius: 9px;
  padding: 1px 5px; pointer-events: none;
}
.rt-stack-expand {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 4px; background: var(--app-surface);
  border: 1px solid var(--app-line); border-radius: 6px;
  margin-top: 4px;
}

/* F. A/B side-by-side overlay */
.rt-ab-overlay {
  position: fixed; inset: 0; z-index: 9200;
  background: #111; display: flex; flex-direction: column;
  align-items: stretch; overflow: hidden;
}
.rt-ab-panes {
  display: flex; flex: 1; overflow: hidden;
}
.rt-ab-pane {
  flex: 1; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.rt-ab-pane + .rt-ab-pane {
  border-left: 2px solid rgba(255,255,255,.12);
}
.rt-ab-label {
  position: absolute; top: 10px; left: 12px; z-index: 2;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: rgba(255,255,255,.6);
  background: rgba(0,0,0,.4); padding: 3px 8px; border-radius: 4px;
  pointer-events: none;
}
.rt-ab-canvas {
  width: 100%; height: 100%; object-fit: contain; display: block;
}

/* N. Color picker popover */
.rt-colorpicker {
  position: fixed; z-index: 9300;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 8px 10px; min-width: 170px;
  box-shadow: 0 4px 18px rgba(0,0,0,.4);
  pointer-events: none;
}
.rt-cp-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; line-height: 1.8;
}
.rt-cp-swatch {
  display: inline-block; width: 18px; height: 18px;
  border-radius: 3px; border: 1px solid rgba(255,255,255,.15);
  flex-shrink: 0;
}
.rt-cp-lbl {
  color: var(--faint); min-width: 26px; font-size: 10px;
}

/* G. Batch rename dialog */
#dlg-rename .app-dialog__panel { padding: 20px 24px; }
#rename-preview { min-height: 18px; }

/* J. Session restore toast */
.rt-restore-toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 9400; background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 10px; padding: 12px 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; max-width: 380px;
}
.rt-restore-toast__btns { display: flex; gap: 6px; }

/* H. Smart collections in folder list */
.rt-smartcol {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; font-size: 12px; cursor: pointer;
  color: var(--faint); border-bottom: 1px solid var(--app-line);
}
.rt-smartcol:hover { color: var(--text); background: var(--app-line); }
.rt-smartcol__icon { font-size: 13px; flex-shrink: 0; }
.rt-smartcol.is-active { color: var(--accent); }

/* O. Dust spot map overlay */
.rt-dust-map-badge {
  position: fixed; bottom: 60px; right: 16px; z-index: 8800;
  background: rgba(240,80,60,.88); color: #fff;
  border-radius: 8px; padding: 5px 10px; font-size: 11px;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3);
  display: none;
}

/* T. History strip preview thumbnail */
.rt-hist-preview {
  position: fixed; z-index: 9000;
  width: 160px; height: 107px; border-radius: 6px;
  overflow: hidden; pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.12);
}
.rt-hist-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Rating filter chips in toolbar */
.rt-rating-filter {
  display: inline-flex; gap: 3px; align-items: center;
  font-size: 11px;
}
.rt-rating-chip {
  padding: 2px 7px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--app-line); font-size: 11px;
  background: var(--app-surface); color: var(--faint);
  transition: background .12s, color .12s;
}
.rt-rating-chip.is-active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* Style match drop zone highlight */
.rt-style-drop-active {
  outline: 2px dashed var(--accent); outline-offset: -2px;
  border-radius: 4px;
}

/* =====================================================================
   EXT14 — Selective colour, lasso, colour labels, loupe, sessions
   ===================================================================== */

/* Selective colour panel tabs */
.rt-selcol-tabs14 {
  display: flex; gap: 2px; flex-wrap: wrap; padding: 0 2px 6px;
}
.rt-selcol-tab14 {
  flex: 1; min-width: 30px; padding: 3px 0; border-radius: 4px;
  border: 1px solid var(--app-line); font-size: 10px; font-weight: 600;
  cursor: pointer; text-align: center; background: var(--app-surface);
  color: var(--dim); transition: background .1s, color .1s;
}
.rt-selcol-tab14.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.rt-selcol-tab14[data-scband="reds"]    { border-left: 2px solid #e74c3c; }
.rt-selcol-tab14[data-scband="yellows"] { border-left: 2px solid #f1c40f; }
.rt-selcol-tab14[data-scband="greens"]  { border-left: 2px solid #27ae60; }
.rt-selcol-tab14[data-scband="cyans"]   { border-left: 2px solid #1abc9c; }
.rt-selcol-tab14[data-scband="blues"]   { border-left: 2px solid #2980b9; }
.rt-selcol-tab14[data-scband="magentas"]{ border-left: 2px solid #8e44ad; }
.rt-selcol-body14 { padding: 0 2px; }

/* Colour label border on grid cards */
.rt-grid-card.rt-cl-red    { box-shadow: 0 0 0 2px #e74c3c; }
.rt-grid-card.rt-cl-yellow { box-shadow: 0 0 0 2px #f1c40f; }
.rt-grid-card.rt-cl-green  { box-shadow: 0 0 0 2px #27ae60; }
.rt-grid-card.rt-cl-blue   { box-shadow: 0 0 0 2px #2980b9; }
.rt-grid-card.rt-cl-purple { box-shadow: 0 0 0 2px #8e44ad; }

/* Multi-select highlight */
.rt-grid-card.is-selected {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.rt-grid-card.is-selected::after {
  content: '✓';
  position: absolute; top: 4px; left: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center;
}

/* Multi-select toolbar chip */
.rt-ms-chip14 {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; border-radius: 12px; font-size: 11px;
  background: var(--accent); color: #fff; font-weight: 600;
  white-space: nowrap;
}
.rt-ms-chip14 button {
  background: none; border: none; color: #fff; cursor: pointer;
  font-size: 13px; line-height: 1; padding: 0 2px;
}

/* Magnetic lasso cursor when tool is active */
html.rt-tool-lasso { cursor: crosshair; }
html.rt-tool-lasso #canvas { cursor: crosshair; }
.rt-lasso-overlay14 {
  position: absolute; top: 0; left: 0; pointer-events: none;
  z-index: 30;
}

/* Loupe overlay */
.rt-loupe-overlay14 {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,.92);
  display: flex; flex-direction: column;
}
.rt-loupe-toolbar14 {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--app-line);
  flex-shrink: 0;
}
.rt-loupe-title14 { font-size: 13px; font-weight: 600; color: var(--fg); }
.rt-loupe-panes14 {
  flex: 1; display: flex; gap: 2px; overflow: hidden; padding: 4px;
}
.rt-loupe-pane14 {
  flex: 1; position: relative; overflow: hidden;
  border-radius: 4px; background: #000;
}
.rt-loupe-pane14 canvas {
  width: 100%; height: 100%; object-fit: none;
  cursor: grab; display: block;
}
.rt-loupe-pane14 canvas:active { cursor: grabbing; }
.rt-loupe-label14 {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.65); color: #fff; font-size: 10px;
  padding: 2px 8px; border-radius: 10px; pointer-events: none;
  white-space: nowrap;
}

/* Colour label picker popover */
.rt-clabel-picker14 {
  position: fixed; z-index: 9000;
  display: flex; gap: 5px; align-items: center;
  background: var(--app-surface); border: 1px solid var(--app-line);
  border-radius: 10px; padding: 6px 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.rt-clabel-swatch14 {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  transition: transform .12s; flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.rt-clabel-swatch14:hover { transform: scale(1.25); }
.rt-clabel-none14 {
  background: var(--app-bg); color: var(--faint);
  font-size: 13px; line-height: 22px; text-align: center;
  border: 1px solid var(--app-line);
}

/* Sessions list in modal */
.rt-session-row14 {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid var(--app-line);
  font-size: 12px;
}
.rt-session-row14:last-child { border-bottom: none; }
.rt-session-name14 { flex: 1; font-weight: 500; }
.rt-session-meta14 { color: var(--faint); font-size: 10px; white-space: nowrap; }

/* Undo history named panel */
.rt-undo-hist14 {
  max-height: 160px; overflow-y: auto; margin-top: 6px;
  font-size: 11px; line-height: 1.6;
}
.rt-undo-hist14__row {
  display: flex; gap: 6px; align-items: center;
  padding: 2px 4px; border-radius: 3px; cursor: pointer;
}
.rt-undo-hist14__row:hover { background: var(--app-line); }
.rt-undo-hist14__row.is-current { font-weight: 600; color: var(--accent); }
.rt-undo-hist14__op { flex: 1; }
.rt-undo-hist14__ts { color: var(--faint); font-size: 10px; white-space: nowrap; }

/* Folder stats panel */
.rt-folder-stats14 {
  padding: 8px 10px; background: var(--app-surface);
  border: 1px solid var(--app-line); border-radius: 6px;
  margin: 8px 0; font-size: 11px; line-height: 1.8;
}
.rt-folder-stats14 dt { color: var(--faint); display: inline; }
.rt-folder-stats14 dd { display: inline; font-weight: 600; margin-left: 4px; }

/* Export sharpen preview strip */
.rt-sharpen-strip14 {
  display: flex; gap: 4px; margin-top: 8px; overflow-x: auto;
}
.rt-sharpen-thumb14 {
  flex-shrink: 0; width: 150px; height: 100px;
  object-fit: cover; border-radius: 4px;
  border: 2px solid transparent; cursor: pointer;
}
.rt-sharpen-thumb14.is-active { border-color: var(--accent); }
.rt-sharpen-label14 {
  font-size: 10px; text-align: center; color: var(--faint);
  margin-top: 2px;
}

/* =====================================================================
   EXT15 — Inspector tabs · Grain · CA · Dehaze · Hints · Dupes · AI
   ===================================================================== */

/* Inspector tab strip */
.rt-insp-tabs15 {
  display: flex; gap: 2px; padding: 6px 8px 4px;
  border-bottom: 1px solid var(--app-line);
  flex-shrink: 0;
}
.rt-insp-tab15 {
  flex: 1; padding: 4px 0; border-radius: 5px; font-size: 11px;
  font-weight: 600; cursor: pointer; border: none;
  background: transparent; color: var(--dim);
  transition: background .1s, color .1s;
}
.rt-insp-tab15:hover { background: var(--app-line); color: var(--fg); }
.rt-insp-tab15.is-active { background: var(--accent); color: #fff; }

/* Hide inspector sections by tab — JS adds data-itab-section to each group */
.app-inspector [data-itab-section]:not(.is-itab-visible) { display: none !important; }

/* Contextual tool hint bar */
.rt-tool-hint15 {
  position: sticky; top: 0; z-index: 40;
  background: rgba(0,0,0,.72); color: rgba(255,255,255,.9);
  font-size: 11px; text-align: center; padding: 4px 12px;
  pointer-events: none; backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: opacity .2s;
}

/* Inline before/after hover reveal on grid cards */
.rt-grid-card { position: relative; overflow: hidden; }
.rt-grid-card__orig {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; pointer-events: none;
  transition: opacity .18s;
  clip-path: inset(0 50% 0 0);
}
.rt-grid-card:hover .rt-grid-card__orig { opacity: 1; }

/* Duplicate badge */
.rt-dupe-badge15 {
  position: absolute; top: 4px; right: 4px;
  background: #e67e22; color: #fff; font-size: 9px; font-weight: 700;
  padding: 1px 5px; border-radius: 8px; pointer-events: none; z-index: 5;
}

/* Rejection predictor bars */
.rt-reject-bars15 { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.rt-reject-bar15 { display: flex; flex-direction: column; gap: 3px; }
.rt-reject-bar15__label { display: flex; justify-content: space-between; font-size: 11px; }
.rt-reject-bar15__track {
  height: 8px; border-radius: 4px;
  background: var(--app-line); overflow: hidden;
}
.rt-reject-bar15__fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #27ae60, #f39c12, #e74c3c);
  background-size: 200% 100%; transition: width .4s ease;
}

/* Color range mask active indicator */
.rt-crm-active15 {
  outline: 2px solid var(--yellow,#D9A60A); outline-offset: -2px;
  border-radius: 4px;
}
[data-tool="color-range-mask"].is-active { background: rgba(217,166,10,.18); }

/* Agency preset list rows */
.rt-ap-row15 {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--app-line);
  font-size: 12px;
}
.rt-ap-row15:last-child { border-bottom: none; }
.rt-ap-name15 { flex: 1; font-weight: 600; }
.rt-ap-meta15 { color: var(--faint); font-size: 10px; }

/* Duplicate group in grid */
.rt-dupe-group15 {
  grid-column: 1 / -1;
  background: rgba(230,126,34,.08);
  border: 1px solid rgba(230,126,34,.3);
  border-radius: 6px; padding: 6px 8px; margin: 4px 0;
  font-size: 11px; color: var(--faint);
}

/* Metadata search highlight */
.rt-search-match15 { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Watchdog new-file badge */
.rt-new-badge15 {
  position: absolute; bottom: 4px; left: 4px;
  background: #27ae60; color: #fff; font-size: 9px; font-weight: 700;
  padding: 1px 5px; border-radius: 8px; z-index: 5; pointer-events: none;
}

/* GPU clarity upgrade note in settings */
.rt-gpu-note15 {
  font-size: 10px; color: var(--faint); padding: 2px 0;
  font-style: italic;
}

/* =====================================================================
   EXT16 — Moire · Shadow · HDR · Calibration · Carousel · Print · FTP
   ===================================================================== */

/* Colour calibration overlay */
.rt-calib-overlay16 {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(0,0,0,.55); cursor: crosshair;
  display: flex; align-items: flex-start; justify-content: center;
}
.rt-calib-info16 {
  margin-top: 24px; background: rgba(0,0,0,.8); color: #fff;
  padding: 10px 20px; border-radius: 8px; font-size: 14px;
  pointer-events: none;
}
.rt-calib-step16 { color: var(--accent); font-weight: 700; }

/* Stack comparison carousel */
.rt-stack-carousel16 {
  display: flex; gap: 4px; padding: 6px 0; overflow-x: auto;
  border-top: 1px solid var(--app-line); flex-shrink: 0;
  background: var(--app-bg);
}
.rt-stack-thumb16 {
  flex-shrink: 0; width: 80px; height: 53px; object-fit: cover;
  border-radius: 3px; cursor: pointer; border: 2px solid transparent;
  transition: border-color .12s;
}
.rt-stack-thumb16.is-active { border-color: var(--accent); }
.rt-stack-label16 {
  font-size: 9px; text-align: center; color: var(--faint);
  margin-top: 2px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; width: 80px;
}

/* Drag-reorder handle */
.rt-grid-card[draggable="true"] { cursor: grab; }
.rt-grid-card[draggable="true"]:active { cursor: grabbing; }
.rt-drag-handle16 {
  position: absolute; top: 4px; right: 26px; z-index: 6;
  width: 16px; height: 16px; opacity: 0; pointer-events: none;
  color: #fff; font-size: 13px; line-height: 16px; text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,.8); transition: opacity .12s;
}
.rt-grid-card:hover .rt-drag-handle16 { opacity: 1; pointer-events: auto; }
.rt-grid-card.rt-drag-over16 { outline: 2px dashed var(--accent); outline-offset: 2px; }

/* Edit-diff modified badge */
.rt-modified-badge16 {
  position: absolute; bottom: 4px; right: 4px; z-index: 6;
  background: var(--red,#c8070a); color: #fff; font-size: 9px; font-weight: 700;
  padding: 1px 5px; border-radius: 8px; pointer-events: none;
}

/* Recent sessions quick-launcher */
.rt-recent-sessions16 {
  margin-top: 12px; text-align: left;
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 10px;
}
.rt-recent-sessions16__label {
  font-size: 11px; color: var(--faint); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .05em;
}
.rt-recent-sessions16__row {
  display: flex; align-items: center; gap: 8px; padding: 4px 0;
  font-size: 12px;
}
.rt-recent-sessions16__name { flex: 1; font-weight: 500; }
.rt-recent-sessions16__meta { font-size: 10px; color: var(--faint); }

/* Print layout */
@media print {
  body > * { display: none !important; }
  #rt-print-frame16 { display: grid !important; }
}
#rt-print-frame16 {
  display: none; position: fixed; inset: 0; z-index: 99999;
  background: #fff; padding: 20mm;
  grid-template-columns: repeat(var(--print-cols, 2), 1fr);
  gap: 10mm; box-sizing: border-box;
}
.rt-print-cell16 { break-inside: avoid; text-align: center; }
.rt-print-cell16 img { width: 100%; height: auto; display: block; }
.rt-print-caption16 { font-size: 8pt; color: #444; margin-top: 2mm; }
.rt-print-bleed16::before {
  content: ''; display: block; width: 100%; height: 0;
  border-top: 0.5pt solid #aaa; margin-bottom: 5mm;
}

/* Keyboard focus ring */
.rt-kb-focus16 *:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px !important;
  border-radius: 3px !important;
}
input[type="range"]:focus-visible { outline: 2px solid var(--accent); }

/* FTP status states */
.rt-ftp-ok16   { color: #27ae60; }
.rt-ftp-err16  { color: #e74c3c; }
.rt-ftp-busy16 { color: var(--faint); }

/* =====================================================================
   EXT17 — Slideshow · Consistency · Panel Resize · Folder Badges
            Composition · Smart Paste · Conflict Merge
   ===================================================================== */

/* Small checkbox label variant */
.rt-check--sm { font-size: 11px; color: var(--dim); gap: 5px; }

/* Slideshow overlay */
.rt-slideshow17 {
  position: fixed; inset: 0; z-index: 9800;
  background: #000; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
}
.rt-slideshow__canvas17 {
  max-width: 100%; max-height: calc(100vh - 80px);
  object-fit: contain; transition: opacity .4s ease;
}
.rt-slideshow__controls17 {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,.65); padding: 8px 16px; border-radius: 24px;
  backdrop-filter: blur(8px);
}
.rt-slideshow__label17 {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.7); font-size: 13px; pointer-events: none;
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
}

/* Resizable panel handle */
.rt-resize-handle17 {
  width: 4px; background: transparent; cursor: col-resize;
  flex-shrink: 0; position: relative; z-index: 10;
  transition: background .12s; align-self: stretch;
}
.rt-resize-handle17:hover,
.rt-resize-handle17.is-dragging17 { background: var(--accent); }

/* Folder colour badges */
.rt-folder-badge17 {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; margin-right: 5px; flex-shrink: 0;
  vertical-align: middle;
}
.rt-folder-color-picker17 {
  position: absolute; z-index: 200; display: flex; gap: 6px;
  padding: 6px 8px; background: var(--app-panel);
  border-radius: 6px; border: 1px solid var(--app-line);
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.rt-folder-color-swatch17 {
  width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: border-color .1s;
}
.rt-folder-color-swatch17.is-selected17,
.rt-folder-color-swatch17:hover { border-color: #fff; }
/* Grid card left stripe by folder colour */
.rt-grid-card[data-folder-color="red"]    { border-left: 3px solid #e74c3c; }
.rt-grid-card[data-folder-color="orange"] { border-left: 3px solid #e67e22; }
.rt-grid-card[data-folder-color="yellow"] { border-left: 3px solid #f1c40f; }
.rt-grid-card[data-folder-color="green"]  { border-left: 3px solid #27ae60; }
.rt-grid-card[data-folder-color="blue"]   { border-left: 3px solid #2980b9; }
.rt-grid-card[data-folder-color="purple"] { border-left: 3px solid #8e44ad; }

/* Consistency score rows */
.rt-consistency-row17 {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid var(--app-line); font-size: 12px;
}
.rt-consistency-row17__name  { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-consistency-row17__bar   { width: 80px; height: 6px; background: var(--app-line); border-radius: 3px; overflow: hidden; }
.rt-consistency-row17__fill  { height: 100%; border-radius: 3px; transition: width .35s; }
.rt-consistency-row17__score { width: 32px; text-align: right; color: var(--faint); font-size: 11px; }

/* Composition critique block in inspector */
.rt-comp-critique17 {
  font-size: 12px; line-height: 1.55; padding: 8px 10px;
  background: var(--app-bg); border-radius: 6px; color: var(--dim);
  border-left: 3px solid var(--accent); margin: 6px 0;
}
.rt-comp-critique17 ul { margin: 4px 0 0 14px; padding: 0; }
.rt-comp-critique17 li { margin: 2px 0; }

/* Zone curves panel */
.rt-zone-curves17 { display: flex; gap: 6px; padding: 6px 0; }
.rt-zone-canvas17 {
  flex: 1; height: 70px; border-radius: 4px; cursor: crosshair;
  background: var(--app-bg); border: 1px solid var(--app-line);
}
.rt-zone-label17 { font-size: 9px; text-align: center; color: var(--faint); margin-top: 2px; }

/* ── EXT18 ──────────────────────────────────────────────────────────── */

/* Drop zones (layer + refmatch) */
.rt-dropzone18 {
  border: 2px dashed var(--app-line); border-radius: 8px;
  padding: 18px 12px; text-align: center; font-size: 12px; color: var(--dim);
  cursor: pointer; transition: border-color .18s, background .18s;
}
.rt-dropzone18.is-over18 { border-color: var(--accent); background: rgba(200,7,10,.06); }

/* Layer preview canvas */
.rt-layer-preview18 {
  display: block; width: 100%; max-height: 120px; object-fit: cover;
  border-radius: 6px; margin-bottom: 8px; background: var(--app-bg);
}

/* Agency preflight matrix */
.rt-preflight-matrix18 { overflow-x: auto; }
.rt-preflight-matrix18 table { border-collapse: collapse; width: 100%; font-size: 11px; }
.rt-preflight-matrix18 th { background: var(--app-surface); padding: 5px 8px; text-align: left; border-bottom: 1px solid var(--app-line); font-weight: 600; }
.rt-preflight-matrix18 td { padding: 5px 8px; border-bottom: 1px solid var(--app-line); }
.rt-pf-pass18 { color: #27ae60; font-weight: 700; }
.rt-pf-warn18 { color: #e67e22; font-weight: 700; }
.rt-pf-fail18 { color: #e74c3c; font-weight: 700; }

/* Auto-cull list */
.rt-autocull-row18 {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0; border-bottom: 1px solid var(--app-line);
}
.rt-autocull-row18__name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-autocull-row18__bar { width: 80px; height: 6px; background: var(--app-line); border-radius: 3px; overflow: hidden; }
.rt-autocull-row18__fill { height: 100%; border-radius: 3px; }
.rt-autocull-row18__score { width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.rt-autocull-row18__flag { font-size: 10px; color: #e74c3c; font-weight: 700; }

/* Collaboration status */
.rt-collab-status18 {
  font-size: 11px; padding: 6px 10px; border-radius: 6px;
  background: var(--app-bg); color: var(--dim); border: 1px solid var(--app-line);
  margin: 8px 0;
}
.rt-collab-peers18 { list-style: none; margin: 0; padding: 0; }
.rt-collab-peers18 li {
  display: flex; align-items: center; gap: 8px; padding: 4px 0;
  border-bottom: 1px solid var(--app-line); font-size: 11px;
}
.rt-collab-dot18 {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

/* Non-destructive heal spot overlay */
.rt-heal-spot18 {
  position: absolute; border-radius: 50%; border: 2px solid rgba(255,120,0,.7);
  pointer-events: none; transform: translate(-50%,-50%);
}

/* Analytics bar chart labels */
.rt-analytics-lbl18 {
  font-size: 9px; color: var(--faint); text-align: center; margin-top: 2px;
}

/* ── Ext19 ────────────────────────────────────────────────────────── */
/* Cinematic looks grid */
.rt-looks-grid19 {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px;
}
.rt-look-tile19 {
  cursor: pointer; border-radius: 6px; padding: 6px; text-align: center; font-size: 11px;
  background: var(--surface-inset, rgba(0,0,0,.08)); border: 2px solid transparent; transition: border-color .15s;
}
.rt-look-tile19:hover { border-color: var(--faint, #888); }
.rt-look-tile19--active { border-color: var(--accent, #c8070a); }
.rt-look-preview19 {
  width: 100%; height: 46px; border-radius: 4px; margin-bottom: 5px;
  background: linear-gradient(135deg, #3a2b1e 0%, #b8935a 50%, #5a7a5a 100%);
}
/* History tree */
.rt-history-tree19 { font-size: 12px; user-select: none; }
.rt-history-node19 {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 4px; cursor: pointer;
}
.rt-history-node19:hover { background: var(--surface-inset, rgba(0,0,0,.06)); }
.rt-history-node19--active { background: var(--accent-alpha, rgba(200,7,10,.1)); font-weight: 600; }
.rt-history-dot19 {
  width: 8px; height: 8px; border-radius: 50%; background: var(--faint, #aaa); flex-shrink: 0;
}
.rt-history-node19--active .rt-history-dot19 { background: var(--accent, #c8070a); }
/* Metadata autocomplete dropdown */
.rt-meta-ac-drop19 {
  position: fixed; z-index: 9999;
  background: var(--surface,var(--app-surface,#18181b)); border: 1px solid var(--border,var(--app-line,#2a2a31));
  border-radius: 6px; box-shadow: 0 4px 18px rgba(0,0,0,.18); overflow: hidden;
}
.rt-ac-item19 {
  padding: 8px 12px; font-size: 12px; cursor: pointer;
  border-bottom: 1px solid var(--border-faint, rgba(0,0,0,.06));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rt-ac-item19:last-child { border-bottom: none; }
.rt-ac-item19:hover { background: var(--surface-inset, rgba(0,0,0,.05)); }
/* Focus-stack / timeline scrub ghost canvas */
#canvas-scrub19 { position: absolute; top: 0; left: 0; pointer-events: none; opacity: .6; z-index: 9; }

/* ── Ext20 ────────────────────────────────────────────────────────── */
/* Shared field row (slider + label) */
.rt-field-row20 {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px;
}
.rt-field-row20 label { white-space: nowrap; width: 90px; flex-shrink: 0; }
/* Batch rename preview list */
.rt-rename-preview20 { font-size: 11px; font-family: monospace; border-radius: 6px; padding: 6px 8px; background: var(--surface-inset,rgba(0,0,0,.06)); }
.rt-rename-row20 { padding: 2px 0; display: flex; gap: 8px; }
.rt-rename-row20 .old20 { color: var(--faint); text-decoration: line-through; }
.rt-rename-row20 .new20 { color: var(--accent, #c8070a); }
/* Export preset list */
.rt-exp-preset20 {
  display: flex; align-items: center; padding: 7px 8px; border-radius: 5px; font-size: 12px;
  border-bottom: 1px solid var(--border-faint, rgba(0,0,0,.06)); gap: 4px;
}
.rt-exp-preset20:hover { background: var(--surface-inset, rgba(0,0,0,.04)); }
/* Batch queue */
.rt-bq-progress20 {
  height: 6px; background: var(--surface-inset, rgba(0,0,0,.08)); border-radius: 3px; overflow: hidden; margin-bottom: 8px;
}
#bq-progress-fill20 { height: 100%; background: var(--accent, #c8070a); width: 0%; transition: width .3s; border-radius: 3px; }
.rt-bq-list20 { max-height: 320px; overflow-y: auto; }
.rt-bq-item20 {
  display: flex; align-items: center; gap: 6px; padding: 5px 6px; font-size: 12px; border-radius: 4px;
}
.rt-bq-item20:nth-child(even) { background: var(--surface-inset, rgba(0,0,0,.03)); }
.rt-bq-badge20 {
  font-size: 10px; padding: 2px 6px; border-radius: 10px; flex-shrink: 0; font-weight: 600;
}
.rt-bq-badge20--pending  { background: var(--surface-inset,rgba(0,0,0,.08)); color: var(--faint); }
.rt-bq-badge20--active   { background: rgba(255,160,0,.18); color: #a06000; }
.rt-bq-badge20--done     { background: rgba(0,160,80,.15); color: #008040; }
.rt-bq-badge20--error    { background: rgba(200,0,0,.12); color: var(--accent,#c8070a); }
/* AI crop suggestion grid */
.rt-crop-grid20 { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.rt-crop-card20 {
  border-radius: 6px; overflow: hidden; border: 2px solid transparent; cursor: pointer; transition: border-color .15s;
  background: var(--surface-inset, rgba(0,0,0,.06));
}
.rt-crop-card20:hover { border-color: var(--accent, #c8070a); }
.rt-crop-canvas20 { width: 100%; height: 90px; display: block; object-fit: cover; background: var(--faint,#888); }
.rt-crop-label20 { font-size: 11px; padding: 5px 7px; }
/* Dodge & burn floating toolbar */
.rt-db-toolbar20 {
  position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%); z-index: 500;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--surface,var(--app-surface,#18181b)); border: 1px solid var(--border,var(--app-line,#2a2a31));
  border-radius: 10px; padding: 8px 14px; box-shadow: 0 4px 20px rgba(0,0,0,.22);
}
.rt-db-mode-btn20 { font-size: 10px; padding: 3px 8px; }
.rt-db-active20 { cursor: crosshair !important; }
/* Composite dialog */
.rt-comp-tab20 { font-size: 11px; }

/* ── Ext21 ─────────────────────────────────────────────────────────────── */
/* Clone stamp toolbar */
.rt-clone-toolbar21 {
  position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%); z-index: 500;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--surface,var(--app-surface,#18181b)); border: 1px solid var(--border,var(--app-line,#2a2a31));
  border-radius: 10px; padding: 8px 14px; box-shadow: 0 4px 20px rgba(0,0,0,.22);
}
.rt-clone-active21 { cursor: crosshair !important; }
/* Tone curve canvas */
.rt-curve-canvas21 {
  border: 1px solid var(--border,var(--app-line,#2a2a31)); border-radius: 6px;
  background: var(--surface2,var(--app-surface2,#1e1e24)); cursor: crosshair; display: block;
}
.rt-curve-tab21 {
  font-size: 10px; padding: 2px 8px; border: 1px solid var(--border,var(--app-line,#2a2a31));
  border-radius: 4px; background: transparent; cursor: pointer;
}
.rt-curve-tab-active21 {
  background: var(--accent,var(--red,#C8070A)); color: #fff; border-color: var(--accent,var(--red,#C8070A));
}
/* Watermark designer */
.rt-wm-grid21 {
  display: grid; grid-template-columns: repeat(3, 36px); gap: 4px;
}
.rt-wm-pos21 {
  width: 36px; height: 36px; border: 1px solid var(--border,var(--app-line,#2a2a31));
  border-radius: 6px; background: transparent; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.rt-wm-pos-active21 {
  background: var(--accent,var(--red,#C8070A)); color: #fff; border-color: var(--accent,var(--red,#C8070A));
}
.rt-wm-type21 {
  font-size: 11px; padding: 3px 9px; border: 1px solid var(--border,var(--app-line,#2a2a31));
  border-radius: 5px; background: transparent; cursor: pointer;
}
.rt-wm-type-active21 {
  background: var(--accent,var(--red,#C8070A)); color: #fff; border-color: var(--accent,var(--red,#C8070A));
}
/* Scene analysis */
.rt-scene-result21 { font-size: 12px; }
.rt-scene-row21 {
  display: flex; justify-content: space-between; padding: 5px 0;
  border-bottom: 1px solid var(--border,var(--app-line,#2a2a31));
}
.rt-scene-note21 { font-style: italic; opacity: .75; justify-content: flex-start; }
.rt-scene-chip21 {
  display: inline-block; font-size: 10px; padding: 1px 6px;
  border-radius: 10px; background: var(--surface2,var(--app-surface2,#1e1e24)); margin: 2px;
}
/* Storyboard */
.rt-sb-grid21 {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; flex-wrap: nowrap;
}
.rt-sb-item21 {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 72px;
}
.rt-sb-thumb21 {
  width: 64px; height: 48px; border-radius: 5px; border: 1px solid var(--border,var(--app-line,#2a2a31));
  background: #888; flex-shrink: 0; object-fit: cover;
}
.rt-sb-delta21 {
  font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 4px;
  background: var(--surface2,var(--app-surface2,#1e1e24)); white-space: nowrap;
}
.rt-sb-delta21--warn { color: var(--accent, #e44); background: rgba(220,50,50,.1); }
.rt-sb-name21 { font-size: 10px; opacity: .7; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Session list */
.rt-session-list21 { display: flex; flex-direction: column; gap: 5px; }
.rt-session-item21 {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border: 1px solid var(--border,var(--app-line,#2a2a31)); border-radius: 7px; font-size: 12px;
}
.rt-session-item21__info { flex: 1; }
.rt-session-item21__ts { font-size: 10px; opacity: .6; }
.rt-session-item21__restore { font-size: 11px; }

/* ── Ext22 ─────────────────────────────────────────────────────────────── */
/* HDR merge */
.rt-hdr-drop22 {
  border: 2px dashed var(--border,var(--app-line,#2a2a31)); border-radius: 8px; padding: 18px;
  text-align: center; font-size: 12px; cursor: pointer; margin-bottom: 8px;
  transition: border-color .15s;
}
.rt-hdr-drop22:hover { border-color: var(--accent,var(--red,#C8070A)); }
.rt-hdr-list22 { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.rt-hdr-item22 {
  display: flex; align-items: center; gap: 5px; font-size: 11px;
  background: var(--surface2,var(--app-surface2,#1e1e24)); border-radius: 5px; padding: 4px 8px;
}
.rt-hdr-thumb22 { width: 36px; height: 28px; object-fit: cover; border-radius: 3px; }
/* Annotation toolbar */
.rt-annot-toolbar22 {
  position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%); z-index: 520;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--surface,var(--app-surface,#18181b)); border: 1px solid var(--border,var(--app-line,#2a2a31));
  border-radius: 10px; padding: 8px 14px; box-shadow: 0 4px 20px rgba(0,0,0,.22);
}
.rt-annot-tool22 {
  width: 30px; height: 30px; border: 1px solid var(--border,var(--app-line,#2a2a31)); border-radius: 6px;
  background: transparent; font-size: 16px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
}
.rt-annot-active22 {
  background: var(--accent,var(--red,#C8070A)); color: #fff; border-color: var(--accent,var(--red,#C8070A));
}
/* Color harmony wheel */
.rt-harmony-wheel22 { width: 200px; height: 200px; flex-shrink: 0; }
/* Print output */
.rt-print-badge22 {
  display: inline-block; padding: 5px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600; margin: 4px 0;
}
.rt-print-badge22--ok  { background: rgba(40,200,80,.15); color: #1a8a40; }
.rt-print-badge22--warn{ background: rgba(220,160,0,.15);  color: #8a6000; }
.rt-print-badge22--err { background: rgba(220,50,50,.15);  color: #bb2020; }
/* Adj preset grid */
.rt-preset-grid22 { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-preset22 {
  width: 110px; border: 1px solid var(--border,var(--app-line,#2a2a31)); border-radius: 8px;
  overflow: hidden; cursor: pointer; font-size: 11px;
}
.rt-preset22:hover { border-color: var(--accent,var(--red,#C8070A)); }
.rt-preset-thumb22 {
  width: 110px; height: 70px; object-fit: cover; display: block;
  background: var(--surface2,var(--app-surface2,#1e1e24));
}
.rt-preset-name22 {
  padding: 4px 6px; font-weight: 600; font-size: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rt-preset-actions22 { display: flex; gap: 3px; padding: 3px 5px 5px; }
/* Frequency separation */
.rt-fs-canvas22 { border: 1px solid var(--border,var(--app-line,#2a2a31)); border-radius: 5px; display: block; }

/* ── Ext23 ─────────────────────────────────────────────────────────────── */
.rt-layer-list23 { display: flex; flex-direction: column; gap: 6px; min-height: 40px; }
.rt-layer23 {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border-radius: 6px; background: var(--surface2,var(--app-surface2,#1e1e24)); font-size: 12px;
}
.rt-layer23__vis { cursor: pointer; opacity: .7; width: 18px; text-align: center; }
.rt-layer23__swatch { width: 20px; height: 20px; border-radius: 4px; border: 1px solid rgba(0,0,0,.15); flex-shrink: 0; }
.rt-layer23__name { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-layer23__blend { font-size: 11px; border: 1px solid var(--border,var(--app-line,#2a2a31)); border-radius: 3px; padding: 1px 4px; background: none; }
.rt-layer23__opacity { width: 60px; }
.rt-layer23__del { cursor: pointer; opacity: .5; font-size: 14px; padding: 0 2px; }
.rt-layer23__del:hover { opacity: 1; color: var(--red,#e44); }
.rt-batch-drop23 {
  border: 2px dashed var(--border,var(--app-line,#2a2a31)); border-radius: 8px; padding: 24px;
  text-align: center; color: var(--text2,#888); font-size: 13px;
  transition: border-color .2s; margin-bottom: 8px; cursor: default;
}
.rt-batch-drop23.rt-drop-hover23 { border-color: var(--accent,var(--red,#C8070A)); color: var(--accent,var(--red,#C8070A)); }
.rt-batch-queue23 { max-height: 140px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.rt-batch-item23 {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px;
  border-radius: 5px; background: var(--surface2,var(--app-surface2,#1e1e24)); font-size: 11px;
}
.rt-batch-thumb23 { width: 36px; height: 24px; object-fit: cover; border-radius: 3px; }
.rt-batch-item23__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-batch-item23__state { font-size: 10px; opacity: .6; }
.rt-tc-grid23 { display: grid; grid-template-columns: repeat(auto-fill,minmax(110px,1fr)); gap: 8px; padding: 10px 0; }
.rt-tc-card23 { border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color .15s; background: var(--surface2,var(--app-surface2,#1e1e24)); }
.rt-tc-card23:hover { border-color: var(--accent,var(--red,#C8070A)); }
.rt-tc-preview23 { width: 100%; height: 56px; display: block; }
.rt-tc-name23 { padding: 5px 7px; font-size: 11px; font-weight: 600; }
.rt-history-list23 { display: flex; flex-direction: row; gap: 6px; overflow-x: auto; padding: 6px 0; max-height: 96px; }
.rt-hist-item23 { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; flex-shrink: 0; border-radius: 6px; padding: 4px; border: 2px solid transparent; transition: border-color .12s; }
.rt-hist-item23:hover, .rt-hist-active23 { border-color: var(--accent,var(--red,#C8070A)); }
.rt-hist-thumb23 { width: 60px; height: 40px; object-fit: cover; border-radius: 4px; background: var(--surface2,var(--app-surface2,#1e1e24)); display: block; }
.rt-hist-label23 { font-size: 9px; opacity: .65; white-space: nowrap; }
.rt-sc2-tab23 { border-radius: 4px; font-weight: 700; font-size: 11px; padding: 3px 8px; }
.rt-sc2-tab-active23 { box-shadow: 0 0 0 2px var(--accent,var(--red,#C8070A)); }

/* ── Ext24 ─────────────────────────────────────────────────────────────── */
.rt-stock-list24 { display: flex; flex-direction: column; gap: 5px; }
.rt-stock-row24 { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; background: var(--surface2,var(--app-surface2,#1e1e24)); font-size: 12px; }
.rt-stock-icon24 { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.rt-stock-row24__label { flex: 1; font-weight: 500; }
.rt-stock-row24__note { font-size: 10px; opacity: .6; }
.rt-stock-score24 { padding: 10px 12px; border-radius: 8px; text-align: center; font-weight: 700; font-size: 15px; }
.rt-stock-score24--pass { background: color-mix(in srgb, var(--green,#3fb950) 14%, transparent); color: var(--green,#3fb950); border: 1px solid color-mix(in srgb, var(--green,#3fb950) 30%, transparent); }
.rt-stock-score24--warn { background: color-mix(in srgb, var(--yellow,#d9a60a) 14%, transparent); color: var(--yellow,#d9a60a); border: 1px solid color-mix(in srgb, var(--yellow,#d9a60a) 30%, transparent); }
.rt-stock-score24--fail { background: color-mix(in srgb, var(--red,#c8070a) 14%, transparent); color: var(--red,#c8070a); border: 1px solid color-mix(in srgb, var(--red,#c8070a) 30%, transparent); }
.rt-ref-drop24--hover { border-color: var(--accent,var(--red,#C8070A)) !important; color: var(--accent,var(--red,#C8070A)) !important; }
#scope-panel24 canvas { display: block; }
.rt-lut-hint24 { font-size: 10px; opacity: .5; text-align: center; padding-top: 3px; }

/* ── Ext25 ─────────────────────────────────────────────────────────────── */
.rt-input25 { width: 100%; box-sizing: border-box; border: 1px solid var(--border,var(--app-line,#2a2a31)); border-radius: 5px; padding: 6px 9px; font-size: 12px; background: var(--surface,var(--app-surface,#18181b)); color: inherit; font-family: inherit; outline: none; transition: border-color .15s; }
.rt-input25:focus { border-color: var(--accent,#c8070a); }
textarea.rt-input25 { resize: vertical; }
.rt-kw-chips25 { display: flex; flex-wrap: wrap; gap: 4px; min-height: 24px; padding: 4px 0; }
.rt-kw-chip25 { display: inline-flex; align-items: center; gap: 3px; background: var(--accent-alpha,rgba(200,7,10,.12)); color: var(--accent,#c8070a); border-radius: 12px; padding: 2px 8px; font-size: 11px; font-weight: 500; }
.rt-kw-chip-del25 { cursor: pointer; opacity: .6; font-size: 13px; line-height: 1; }
.rt-kw-chip-del25:hover { opacity: 1; }
.rt-film-grid25 { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; padding: 6px 0; max-height: 220px; overflow-y: auto; }
.rt-film-card25 { padding: 8px 10px; border-radius: 6px; background: var(--surface2,var(--app-surface2,#1e1e24)); border: 2px solid transparent; cursor: pointer; transition: border-color .12s, background .12s; font-size: 11px; font-weight: 500; }
.rt-film-card25:hover { border-color: var(--accent,#c8070a); }
.rt-film-card25--active { border-color: var(--accent,#c8070a); background: var(--accent-alpha,rgba(200,7,10,.1)); color: var(--accent,#c8070a); }
.rt-film-name25 { display: block; line-height: 1.4; }
#split-overlay25 canvas { image-rendering: auto; }
.rt-mask-info25 { font-size: 10px; opacity: .5; padding: 3px 0; }

/* ── Ext26 ─────────────────────────────────────────────────────────────── */
.rt-compare-grid26 { display: grid; gap: 6px; }
.rt-compare-grid26 canvas { width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid var(--border,var(--app-line,#2a2a31)); }
.rt-version-strip26 { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; min-height: 100px; }
.rt-version-card26 { flex: 0 0 120px; background: var(--surface2,var(--app-surface2,#1e1e24)); border-radius: 8px; padding: 6px; font-size: 11px; border: 2px solid transparent; transition: border-color .15s; cursor: pointer; }
.rt-version-card26:hover { border-color: var(--accent,#c8070a); }
.rt-version-name26 { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.rt-sharp-profile-row26 { background: var(--surface2,var(--app-surface2,#1e1e24)); border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; }
.rt-dust-row26 { display: flex; align-items: center; gap: 8px; background: var(--surface2,var(--app-surface2,#1e1e24)); border-radius: 5px; padding: 4px 8px; font-size: 11px; }
.rt-swatch26 { width: 20px; height: 20px; border-radius: 4px; cursor: pointer; border: 1px solid rgba(0,0,0,.2); flex-shrink: 0; transition: transform .1s; }
.rt-swatch26:hover { transform: scale(1.2); }
.rt-grad-point26 { background: var(--surface2,var(--app-surface2,#1e1e24)); border-radius: 6px; padding: 8px 10px; }
.rt-grad-point26 label { font-size: 10px; opacity: .6; display: block; margin-bottom: 2px; }

/* ── Feature-strip topbar scroller ──────────────────────────────────────── */
.rt-feat-strip {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1 1 0;
  min-width: 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0px, #000 18px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0px, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.rt-feat-strip::-webkit-scrollbar { display: none; }
/* Override inline font-size:11px on all strip buttons — minimum 12px for legibility */
.rt-feat-strip .ab--sm { font-size: 12px !important; }
@media (max-width: 900px) {
  .rt-feat-strip { max-width: 60vw; }
}

/* Collapsed by default. Fifty-three tool chips open across the top bar of an
   empty project buried the one control that matters first — the drop zone.
   The strip is one click away and the choice is remembered per browser. */
.rt-feat-strip { display: none; }
.rt-feat-strip.is-open { display: flex; }
#rt-feat-toggle { flex: 0 0 auto; white-space: nowrap; }
#rt-feat-toggle[aria-expanded="true"] { color: var(--text); border-color: var(--red, #C8070A); }

/* ── Inspector panel scaffolding ─────────────────────────────────────────── */
.rt-insp-panel15 { padding: 10px; }
.rt-insp-histogram15 {
  display: block; width: 100%; height: 72px; border-radius: 4px;
  background: var(--app-surface2,#1e1e24); border: 1px solid var(--app-line,#2a2a31);
}
.rt-insp-history-list15 {
  display: flex; flex-direction: column; gap: 3px; max-height: 220px; overflow-y: auto;
}
.rt-insp-dl15 {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 8px;
  margin: 0 0 8px; font-size: 11px;
}
.rt-insp-dl15 dt { color: var(--faint,#56565f); white-space: nowrap; }
.rt-insp-dl15 dd { margin: 0; color: var(--text,#edecf2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-insp-compliance15 { display: flex; flex-direction: column; gap: 4px; }
.rt-insp-ai-results15 { display: flex; flex-direction: column; gap: 6px; font-size: 11px; }
.rt-insp-empty-state15 { font-size: 11px; color: var(--faint,#56565f); padding: 6px 0; }
