/*
 * shadcn/ui design tokens, shared by BOTH bundles.
 *
 * Split out of shadcn.css so the dashboard can reuse the tokens WITHOUT
 * `@tailwind base`. Preflight is a global reset (bare `*`, `body`, `h1`…`p`
 * selectors), so pulling shadcn.css into the dashboard bundle would reset the
 * whole wp-admin page, WordPress's own admin menu and admin bar included.
 * The composer bundle still loads preflight; it owns its panel.
 *
 * Deliberately UNLAYERED (the `@layer base { … }` wrapper was removed): an
 * unlayered rule beats every layered one regardless of source order, and
 * `@layer base` requires an `@tailwind base` for Tailwind to hoist it into –
 * which is exactly what the dashboard bundle omits. UiChemy's own brand.css
 * relies on the same unlayered-wins behaviour.
 *
 * Every declaration is scoped to `.uich-tw`, so these tokens only apply inside
 * a Tailwind island and never touch the host page.
 */
/*
 * shadcn/ui theme, zinc base, verbatim from the shadcn registry.
 * Variables are declared on `.uich-tw` (not :root) so the theme travels with
 * the composer host and portal roots without touching Elementor's document.
 * Dark mode: add `dark` to the same element (or any ancestor inside the scope).
 */
.uich-tw {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 0 0% 91%;              /* soft hairline, matches native rgba(0,0,0,.09) */
  /* Input/control outline. shadcn's stock 90% is nearly invisible on the
     white panel (inputs read as "unboxed" in light mode), so darken the
     control outline specifically, dividers keep the softer --border above. */
  --input: 240 5% 80%;
  --ring: 240 10% 3.9%;
  /* Corner rounding for shadcn controls (buttons, inputs, popovers, cards,
     segmented tabs). Kept tight/modern, rounded-lg≈6px, md≈4px, sm≈2px –
     rather than the earlier airy 0.8rem which read as over-rounded. */
  --radius: 6.4px;
  /* Semantic category colors (construct markers etc.), Tailwind palette
     hues at 600 for light backgrounds, per shadcn convention. */
  --status-data: 221 83% 53%;      /* blue-600 */
  --status-loop: 262 83% 58%;      /* violet-600 */
  --status-condition: 32 95% 44%;  /* amber-600 */
  --status-form: 142 76% 36%;      /* green-600 */
}

.uich-tw.dark,
.uich-tw .dark {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;
  --card: 240 10% 3.9%;
  --card-foreground: 0 0% 98%;
  /* Elevated above --background (240 10% 3.9%) so popovers, menus and the
     Add-class suggestion list read as a raised surface and are fully opaque
     over the tab row — matches the Elementor dark skin, which already lifts
     --popover off its background. (audit A10 / K7) */
  --popover: 240 3.7% 15.9%;
  --popover-foreground: 0 0% 98%;
  --primary: 0 0% 98%;
  --primary-foreground: 240 5.9% 10%;
  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;
  --accent: 240 3.7% 15.9%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 240 4.9% 83.9%;
  /* 500-grade hues read better on dark surfaces. */
  --status-data: 217 91% 60%;      /* blue-500 */
  --status-loop: 258 90% 66%;      /* violet-500 */
  --status-condition: 38 92% 50%;  /* amber-500 */
  --status-form: 142 71% 45%;      /* green-500 */
}

/*
 * Scoped replacement for Tailwind preflight (preflight is disabled globally
 * so it can't reset Elementor's editor DOM).
 */
.uich-tw,
.uich-tw *,
.uich-tw *::before,
.uich-tw *::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: hsl(var(--border));
}

.uich-tw {
  /* Unified with the dashboard shell: the island renders in the design-system
     font (Zalando Sans via --uc-font-sans), not its own Plus Jakarta Sans, so
     text looks the same across native and builder screens. The literal Zalando
     fallback keeps it correct even if the token isn't in scope. */
  font-family: var(--uc-font-sans, "Zalando Sans", ui-sans-serif, system-ui, sans-serif);
  --uich-ff: var(--uc-font-sans, "Zalando Sans", ui-sans-serif, system-ui, sans-serif);
  font-size: 13px;
  line-height: 1.45;
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
}

/* No semibold, for now: fold Tailwind's font-semibold utility to Medium so no
   text in the island renders at 600. Routed through the DS weight token, so
   flipping it back is a one-line change (see --uc-weight-semibold). */
.uich-tw .font-semibold {
  font-weight: var(--uc-weight-medium, 500) !important;
}

/* Elementor skin: match the Editor One panel type exactly, Roboto at 14px
   base (--e-one-typography-fontFamily / fontSize). Deliberately kept on Roboto
   (the editor panel stays as-is); only the Brand skin follows the unified font
   above. Higher specificity than the base .uich-tw rule. */

.uich-tw h1, .uich-tw h2, .uich-tw h3, .uich-tw h4, .uich-tw h5, .uich-tw h6,
.uich-tw p, .uich-tw ul, .uich-tw ol, .uich-tw figure, .uich-tw blockquote {
  margin: 0;
  padding: 0;
}

.uich-tw ul, .uich-tw ol {
  list-style: none;
}

/* `:not(:where([data-uc]))` leaves the UiChemy design-system controls (the
   right-side panel's components, see components/ui/ds/) to their own classes.
   `:where()` adds no specificity, so this rule stays (0,1,1) for everything
   else. Without it the reset's `background: transparent` and `font`/`color:
   inherit` beat every DS class (0,1,0). */
.uich-tw button:not(:where([data-uc])), .uich-tw input:not(:where([data-uc])), .uich-tw optgroup, .uich-tw select:not(:where([data-uc])), .uich-tw textarea:not(:where([data-uc])) {
  font: inherit;
  --uich-ff: inherit;
  color: inherit;
  margin: 0;
  /* NOTE: intentionally NOT zeroing `padding` here. This reset is (0,1,1)
     specificity, which beat every custom component class (`.gp-type-tab`,
     `.bp-dd-btn`, …) at (0,1,0) and silently stripped their left/right
     padding, controls looked cramped in many places. Tailwind utility
     buttons still get their padding (utilities are `.uich-tw`-scoped at
     (0,2,0) via `important:'.uich-tw'`), and fixed-size icon buttons use
     border-box + centered content, so leaving padding alone is safe. */
  background: transparent;
}

.uich-tw button, .uich-tw [role='button'] {
  cursor: pointer;
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
}

.uich-tw button:disabled:not(:where([data-uc])) {
  cursor: default;
}

.uich-tw img, .uich-tw svg, .uich-tw video, .uich-tw canvas {
  display: block;
  max-width: 100%;
}

.uich-tw a {
  color: inherit;
  text-decoration: inherit;
}

.uich-tw [hidden] {
  display: none;
}

/*
 * Composer THEME TOKENS — the single source of the palette.
 *
 * Imported by BOTH bundles: the composer panel (index.jsx) and the canvas
 * (canvas-entry.js, which PHP enqueues into the Elementor preview). That shared
 * import is the whole reason this file exists, and it replaces the old
 * composer-skin-tokens.css, which did the same job back when there were three
 * palettes. There is one palette now — UiChemy, light and dark — but the
 * sharing still matters, and for exactly the reason that file recorded:
 *
 *   The on-canvas toolbar used to hard-code this palette as literals, because
 *   it renders in a document these tokens never reached. Hand-copying is not the
 *   same as matching: alongside the real values it grew a dozen invented
 *   in-between shades that appear nowhere in the panel.
 *
 * That is not hypothetical. Deleting composer-skin-tokens.css took these
 * declarations out of the CANVAS bundle, and the box-handle toolbar
 * (composer-box-handles.js) resolves every colour through `var(--panel-bg)`,
 * `var(--text-hi)` and friends. With nothing declaring them it fell back to the
 * literals baked into its own `var()` fallbacks and stopped following the
 * light/dark toggle at all. Moved here verbatim out of composer.css; no value
 * was altered. Keep it imported by every entry that renders composer chrome.
 */

:root {
  --bg-canvas: #f4f4f6;
  --bg-canvas-ink: #15151a;
  --panel-bg: #15161a;
  --panel-bg-2: #1c1d22;
  --panel-bg-3: #24262c;
  --panel-bg-4: #2d2f37;
  --panel-line: #2a2c33;
  --panel-line-2: #34363f;
  /* DROP SHADOWS, as a colour and a strength rather than a literal per site.
     Every shadow in this file was written as rgba(0,0,0,α) against a near-black
     panel, where pure black at a heavy alpha is what reads as depth. On the
     white light panel the same values are black smudges, so light re-points the
     hue to the panel's ink and scales every alpha by --shadow-a in one place.
     Usage: rgba(var(--shadow-rgb), calc(<the original α> * var(--shadow-a))) —
     the geometry of each shadow is left exactly as it was. */
  --shadow-rgb: 0, 0, 0;
  --shadow-a: 1;
  /* Segmented controls — ONE language for every tabbing in the panel: a GREY
     track with a lighter GREY active chip on top of it. Both values are neutral
     overlays rather than ramp steps, so the track lifts off whatever panel it
     sits on (brand #15161a, Elementor #1f2124, Gutenberg #1e1e1e) and the chip
     lifts off the track by the same kind of step again, in every skin, without
     six per-skin copies. The light theme states its own pair below.
     The track was a black wash first (rgba(0,0,0,.28), recessed below the
     panel). On a near-black panel that made the whole control disappear —
     nothing to see until you found the one lit chip. A lift reads as a real
     surface holding the tabs, which is what the reference does too.
     Before this, the families disagreed: the Chat/Editor strip ran a GREY track
     with a near-black active tab (inverted), .seg / .state-tabs / .responsive-tabs
     ran a light wash track with a lighter chip, and .mode-seg filled the active
     half solid white. Three languages for the same control. */
  --seg-track: rgba(255, 255, 255, 0.06);
  /* NO BORDERS on this control, by decision — the track and the chip are told
     apart by tone alone. Both hairline tokens stay in place (and stay wired to
     the inset rings in composer-dock.css) so bringing an edge back is a value
     change here rather than an edit to nine selectors; `transparent` is the
     off switch. Track edges came off first: once the track went lighter than
     the panel it already had an edge of its own and the hairline drew a second
     one beside it. */
  --seg-track-line: transparent;
  --seg-thumb: rgba(255, 255, 255, 0.10);
  /* Off — see --seg-track-line. The chip is now read from its fill and the soft
     shadow under it, nothing drawn round the outside. */
  --seg-thumb-line: transparent;
  --seg-thumb-hover: rgba(255, 255, 255, 0.045);
  /* Softer than before: with a hairline doing the lifting, a heavy drop shadow
     doubles the edge and muddies it. */
  --seg-thumb-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  /* Segmented radii, deliberately softer than the panel's 6px/4px container
     scale — a tab track is a pill, not a card, and at 6px the track read as a
     small rectangle. The inner value keeps the classic 2px inset so the chip's
     arc sits concentric inside the track's. Skins whose host has its own
     geometry re-point these (see the Gutenberg block, which is WP's 4px/2px). */
  --seg-radius: 9px;
  --seg-radius-inner: 7px;
  /* MINIMAL surfaces. A control is defined by its FILL and by the space around
     it; a 1px line is the exception. Two values only:
       --min-line  the one line colour left, for a STRUCTURAL boundary against
                   something outside the panel (its own outer edge). Never for
                   internal chrome.
       --min-fill  what replaces a border on a control — a soft wash that reads
                   as a surface without drawing an edge.
     Both are neutral greys on purpose, the convention already used by --ctl-*
     further down: a mid grey at low alpha darkens a light panel and lightens a
     dark one, so one value is correct in both themes and every skin. That
     matters here because the OLD lines were a single token too (#e8e8e8 light /
     #27272a dark) and it did not carry — near-invisible on black, a hard rule on
     white. Light was the case that had never been checked. */
  /* The AI mark (the empty-state sparkle) is the ONE place a brand colour is
     wanted in the composer, and it follows the ACTIVE SKIN's own accent. This is
     the UiChemy skin's value: brand ORANGE. Elementor and Gutenberg re-point it
     to their own accents in composer-skin-tokens.css.
     Literal hexes, not rgba(var(--accent-rgb)): that token is white in this skin
     now (the chrome went monochrome), and a white sparkle is not a brand mark. */
  --ai-glyph-from: #FFC574;
  --ai-glyph-to: #FD6A35;
  --min-line: rgba(128, 128, 128, 0.16);
  --min-fill: rgba(128, 128, 128, 0.10);
  --min-fill-hover: rgba(128, 128, 128, 0.16);
  --text-hi: #f4f5f7;
  --uich-text: #d6d7dc;
  --text-mid: #9a9ca6;
  --text-dim: #6a6c76;
  --accent-2: hsl(var(--primary));
  /* legacy-only name, no shadcn collision */
  /* Interactive accent as an RGB triplet so translucent accent tints (borders,
     glows, hover fills) can be re-skinned in one place.
     MONOCHROME: this was UiChemy indigo (75, 34, 204), which put brand violet
     on every focus ring, selected chip and hover wash in the panel. The panel's
     shadcn layer right next door is already neutral (--primary is #fafafa dark /
     #18181b light, --ring likewise), so the indigo was the one thing making the
     chrome brand-coloured — it read as decoration on top of an otherwise
     black-and-white UI. Now white in dark, near-black in light (see the light
     block below, which must state its own value since it inherits this one).
     Platform skins still re-point it: Elementor keeps Elementor pink, Gutenberg
     keeps the wp-admin blue, because those are the host's accents, not ours. */
  --accent-rgb: 255, 255, 255;
  --accent-bg: rgba(var(--accent-rgb), 0.10);
  --brand-green: #E3ED5D;
  --uich-danger: #ff7a7a;
  --ok: #E3ED5D;
  --warn: var(--warn);
  /* No brand orange anywhere in the composer. These fed the Pro upsell surfaces
     (badge, lock icon, CTA, modal icon, the setup cards' hover border) and were
     the only orange left; they now follow the host skin's own accent, which is
     near-black in a light skin, near-white in a dark one, and the builder's own
     colour where a builder skin is active. Keep it that way: the composer uses
     black/white shades plus whatever the builder skin supplies. */
  --uich-pro-grad: currentColor;
  --uich-pro-tint: rgba(128, 128, 128, 0.10);
  /* Follows the skin rather than pinning a brand colour, for the same reason. */
  --uich-brand: currentColor;
  /* Corner rounding for legacy composer chrome (cards, inputs, chips,
     segmented controls). Tightened from 10/7, the airy rounding read as
     over-rounded, especially on tabs. Colors unchanged. */
  --radius: 6px;
  --radius-sm: 4px;
  --input-h: 30px;
  --row-h: 26px;
}

/* Theme tokens also apply when only the composer host carries data-theme (iframe mount). */
.uich-composer-host {
  color-scheme: dark;
}

.uich-composer-host[data-theme="light"],
[data-uich-composer-theme="light"],
body[data-theme="light"],
.panel[data-theme="light"] {
  color-scheme: light;
}

/* ===== Light theme overrides =====
   Also keyed on `data-uich-composer-theme` so the OUTER shell
   (`#uichemy-composer-floating-panel`, which only carries that attribute, not
   `data-theme`) picks up the light `--panel-line` etc. Otherwise its borders
   (e.g. the right-dock `border-left`) fall back to the dark `:root` tokens and
   render as a black edge in light mode. */
.uich-composer-host[data-theme="light"],
[data-uich-composer-theme="light"],
body[data-theme="light"],
.panel[data-theme="light"] {
  --bg-canvas: #f4f4f6;
  --bg-canvas-ink: #15151a;
  --panel-bg: #ffffff;
  --panel-bg-2: #f7f7fa;
  --panel-bg-3: #eeeef3;
  --panel-bg-4: #e3e3eb;
  --panel-line: #e3e4ec;
  --panel-line-2: #cdcfd8;
  /* Shadows: the panel's ink rather than pure black, at a little under half the
     dark theme's strength. See the note in :root. */
  --shadow-rgb: 15, 15, 21;
  --shadow-a: 0.45;
  /* Light segmented pair: a light-grey recessed track with a WHITE active chip
     that lifts above it (macOS / iOS / Claude-settings style), rather than a
     darker-grey active. A hairline + soft shadow give the white chip an edge so
     it reads on the pale track. */
  --seg-track: rgba(0, 0, 0, 0.06);
  --seg-track-line: transparent;
  --seg-thumb: #ffffff;
  --seg-thumb-line: rgba(15, 15, 21, 0.06);
  --seg-thumb-hover: rgba(0, 0, 0, 0.04);
  --seg-thumb-shadow: 0 1px 2px rgba(15, 15, 21, 0.10);
  --text-hi: #0f0f15;
  --uich-text: #2a2b33;
  --text-mid: #6a6c76;
  --text-dim: #9a9ca6;
  --accent-2: hsl(var(--primary));
  /* Light counterpart of the monochrome accent — see the note in :root. Without
     this the light panel would inherit white and every focus ring, selected
     chip and hover wash would disappear into the white surface. Matches
     --text-hi so accent and ink are the same black. */
  --accent-rgb: 15, 15, 21;
  --accent-bg: rgba(var(--accent-rgb), 0.07);
  --brand-green: #E3ED5D;
  --uich-danger: #d44a4a;
  --ok: #b3bf3e;
  --warn: #d49a3a;
}

/* =============================================================================
   UiChemy Create, Design System Tokens (Phase 1, isolated)
   -----------------------------------------------------------------------------
   SURFACE MODEL, components are surface-agnostic. They read semantic tokens
   (surfaces, text, borders, ring, per-family fg/soft) whose VALUES are set by
   the surface scope a component lives in:

     .uc-content            → light content   (current look, DEFAULT)
     .uc-content[data-theme="dark"] → dark content (future, token change only)
     .uc-chrome             → dark chrome     (fixed; sidebar/nav/rails)

   `.uc-scope` and `.uc-portal` behave as light content, so existing usage is
   unchanged and the light view is pixel-identical to before this restructure.

   ISOLATION: all tokens are scoped under these classes (NOT :root). Nothing
   here touches the existing globals/theme.
   ========================================================================== */

/* Brand typeface, bundled via webpack (relative paths resolve to
   ../fonts/, emitted into build/ and URL-rewritten at build time so the
   fonts load correctly from wp-content, not the server root). */
@font-face { font-family:"Zalando Sans"; font-style:normal; font-weight:400; font-display:swap; src:url(fonts/ZalandoSans-Regular.bcfcc767.ttf) format("truetype"); }
@font-face { font-family:"Zalando Sans"; font-style:normal; font-weight:500; font-display:swap; src:url(fonts/ZalandoSans-Medium.41051c31.ttf) format("truetype"); }
@font-face { font-family:"Zalando Sans"; font-style:normal; font-weight:600; font-display:swap; src:url(fonts/ZalandoSans-SemiBold.d690e087.ttf) format("truetype"); }
@font-face { font-family:"Zalando Sans"; font-style:normal; font-weight:700; font-display:swap; src:url(fonts/ZalandoSans-Bold.0ac5948b.ttf) format("truetype"); }

/* =============================================================================
   1. BASE, surface-INDEPENDENT tokens (identical on every surface).
      Applies to every surface scope so the values are always present.
   ========================================================================== */
/* `:root` added (AI-creator port) so DS token VALUES resolve app-wide for
   inline DS controls (buttons/inputs/triggers) WITHOUT importing the scope's
   font/color/box-sizing reset, that stays under `.uc-*` only. Nothing in the
   app references `--uc-*`, so these are inert for existing components. */
:root,
.uc-scope,
.uc-content,
.uc-chrome,
.uc-portal {
  /* ---- Brand + semantic SOLID fills + on-fill text (constant) ----------
     ORANGE is back on the SOLID brand fill only, this paints the primary /
     main-CTA buttons (tone="brand" solid). The brand -fg/-soft/-border/-glow
     below stay NEUTRAL, so soft/outline/ghost brand controls, icon tints and
     text remain monochrome. --uc-accent stays neutral (no purple). */
  --uc-brand:   #FD6A35;  --uc-brand-on:   #FFFFFF;
  --uc-success: #2EA343;  --uc-success-on: #FFFFFF;
  --uc-danger:  #F65258;  --uc-danger-on:  #FFFFFF;
  --uc-warning: #FFA940;  --uc-warning-on: #171717;
  --uc-accent:  var(--uc-inverse-bg);  --uc-accent-on:  var(--uc-inverse-fg);

  /* ---- Family hairline borders (translucent, work on any surface) ----- */
  --uc-brand-border:   var(--uc-border);
  --uc-success-border: rgba(46, 163, 67, 0.40);
  --uc-danger-border:  rgba(246, 82, 88, 0.40);
  --uc-warning-border: rgba(255, 169, 64, 0.42);
  --uc-accent-border:  var(--uc-border);

  /* ---- Hover / press glow washes (translucent, surface-agnostic) ------ */
  --uc-brand-glow-hover:   rgba(128, 128, 128, 0.10); --uc-brand-glow-press:   rgba(128, 128, 128, 0.18);
  --uc-success-glow-hover: rgba(46, 163, 67, 0.08);  --uc-success-glow-press: rgba(46, 163, 67, 0.16);
  --uc-danger-glow-hover:  rgba(246, 82, 88, 0.08);  --uc-danger-glow-press:  rgba(246, 82, 88, 0.16);
  --uc-warning-glow-hover: rgba(255, 169, 64, 0.10); --uc-warning-glow-press: rgba(255, 169, 64, 0.18);
  --uc-accent-glow-hover:  rgba(128, 128, 128, 0.10); --uc-accent-glow-press:  rgba(128, 128, 128, 0.18);

  /* ---- Inverse text (constant) ----------------------------------------- */
  --uc-text-inverse: #FFFFFF;

  /* ---- Semantic aliases (resolve per surface via the surface tokens) --- */
  --uc-bg:        var(--uc-surface-base);
  --uc-fg:        var(--uc-text-strong);
  --uc-fg-muted:  var(--uc-text-muted);
  --uc-card:      var(--uc-surface-raised);
  --uc-card-fg:   var(--uc-text-strong);
  --uc-muted:     var(--uc-surface-sunken);
  --uc-elevated:  var(--uc-surface-overlay);

  /* ---- Radius (UiChemy scale: name = pixel value; mirrors the styleguide
         corner-radius set). Semantic aliases below keep components working. -- */
  --uc-radius-0: 0;      --uc-radius-2: 2px;    --uc-radius-4: 4px;
  --uc-radius-6: 6px;    --uc-radius-8: 8px;    --uc-radius-12: 12px;
  --uc-radius-16: 16px;  --uc-radius-24: 24px;  --uc-radius-32: 32px;
  --uc-radius-infinite: 9999px;
  /* Semantic aliases → numeric scale (value-identical to before) */
  --uc-radius-xs: var(--uc-radius-4);   --uc-radius-sm: var(--uc-radius-6);
  --uc-radius-md: var(--uc-radius-8);   --uc-radius-lg: var(--uc-radius-12);
  --uc-radius-xl: var(--uc-radius-16);  --uc-radius-pill: var(--uc-radius-infinite);

  /* ---- Spacing (UiChemy scale: name = pixels) -------------------------- */
  --uc-space-0: 0;     --uc-space-1: 1px;   --uc-space-2: 2px;   --uc-space-3: 3px;
  --uc-space-4: 4px;   --uc-space-5: 5px;   --uc-space-6: 6px;   --uc-space-7: 7px;
  --uc-space-8: 8px;   --uc-space-9: 9px;   --uc-space-10: 10px; --uc-space-11: 11px;
  --uc-space-12: 12px; --uc-space-14: 14px; --uc-space-16: 16px; --uc-space-20: 20px;
  --uc-space-24: 24px; --uc-space-28: 28px; --uc-space-32: 32px; --uc-space-36: 36px;
  --uc-space-40: 40px; --uc-space-44: 44px; --uc-space-48: 48px;

  /* ---- Typography ------------------------------------------------------ */
  --uc-font-sans: "Zalando Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --uc-font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --uc-text-3xs: 8px;    --uc-text-2xs: 10px;  --uc-text-xs: 12px;
  /* 11px: compact meta / dense-panel text (list meta, inspector hints, code gutter). */
  --uc-text-11: 11px;
  --uc-text-sm: 13px;  --uc-text-base: 14px; --uc-text-md: 16px;
  --uc-text-lg: 18px;   --uc-text-xl: 20px;    --uc-text-2xl: 24px;
  --uc-text-3xl: 30px;
  /* --uc-weight-semibold is temporarily folded to Medium (500): no text renders
     at 600 for now. Flip back to 600 here to restore SemiBold everywhere it's
     used (Card / Alert / Dialog / Accordion titles, etc.). */
  --uc-weight-regular: 400; --uc-weight-medium: 500;  --uc-weight-semibold: 500;
  --uc-leading-tight: 1.2;  --uc-leading-snug: 1.35;  --uc-leading-normal: 1.5;
  --uc-tracking-tight: -0.01em; --uc-tracking-normal: 0; --uc-tracking-wide: 0.02em;

  /* ---- Elevation (neutral recipes; control-brand recolored to orange) --
     Resting + hover surfaces are FLAT (ElevenLabs-style): definition comes
     from the single hairline border, not a shadow. Only true overlays
     (popovers/menus/modals = shadow-3/4/5) still float. */
  --uc-shadow-1: none;
  --uc-shadow-2: none;
  --uc-shadow-3: 0 0 0 1px oklch(50% 0.01 285 / 0.06), 0 2px 4px -1px oklch(0% 0 0 / 0.05), 0 6px 14px -3px oklch(0% 0 0 / 0.08);
  --uc-shadow-4: 0 0 0 1px oklch(50% 0.01 285 / 0.06), 0 6px 12px -4px oklch(0% 0 0 / 0.06), 0 14px 28px -6px oklch(0% 0 0 / 0.10);
  --uc-shadow-5: 0 0 0 1px oklch(50% 0.01 285 / 0.06), 0 12px 24px -8px oklch(0% 0 0 / 0.08), 0 28px 56px -12px oklch(0% 0 0 / 0.14);
  /* Filled controls (solid buttons): light top highlight + one soft drop.
     Kept subtle, depth reads without heavy shadows. */
  --uc-shadow-control:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.18),
    0 1px 2px rgba(0, 0, 0, 0.07),
    0 2px 3px -1px rgba(0, 0, 0, 0.05);
  /* Colored solids (brand/success/danger): neutral dark inner edge so it suits
     any hue, plus a light top highlight and soft drop. */
  --uc-shadow-control-brand:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.24),
    inset 0 0 0 1px rgba(0, 0, 0, 0.14),
    0 1px 2px rgba(0, 0, 0, 0.09),
    0 2px 3px -1px rgba(0, 0, 0, 0.06);
  --uc-shadow-control-pressed: inset 0 1px 2px rgba(0, 0, 0, 0.14);
  --uc-shadow-input: inset 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  /* Raised secondary controls (outline buttons, select/menu triggers): a faint
     top highlight and a whisper of drop. Edge comes from the component border. */
  --uc-shadow-raised:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.10),
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 1px 3px -1px rgba(0, 0, 0, 0.04);
  /* Very subtle gloss: faint light top → faint dark bottom. */
  --uc-sheen: linear-gradient(to bottom, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.03));

  /* ---- Control sizing -------------------------------------------------- */
  --uc-control-h-sm: 28px; --uc-control-h-md: 32px; --uc-control-h-lg: 40px;

  /* ---- Motion ---------------------------------------------------------- */
  --uc-dur-fast: 160ms; --uc-dur-base: 240ms; --uc-dur-slow: 340ms;
  /* Appearance of popovers / overlays (tooltip, menu, select, dialog), a touch
     slower than base so things ease in gracefully instead of flashing on. */
  --uc-dur-enter: 300ms;
  --uc-ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --uc-ease-emphasized: cubic-bezier(0.3, 0, 0, 1);
  --uc-ease-exit: cubic-bezier(0.4, 0, 1, 1);

  /* ---- Z-index --------------------------------------------------------- */
  /* Dropdowns/selects/menus sit ABOVE dialogs (1250 > z-dialog 1200) so a Select
     opened inside a modal renders on top instead of behind it. Tooltip stays highest. */
  --uc-z-overlay: 1100; --uc-z-dialog: 1200; --uc-z-dropdown: 1250; --uc-z-tooltip: 1300;
}

/* =============================================================================
   2. SURFACE, CONTENT (light). DEFAULT. Values identical to pre-restructure,
      so the light view is unchanged. `.uc-scope` / `.uc-portal` map here too.
   ========================================================================== */
:root,
.uc-scope,
.uc-content,
.uc-portal {
  --uc-surface-sunken:  #EBEBEB;
  --uc-surface-base:    #F4F4F4;
  --uc-surface-raised:  #FFFFFF;
  --uc-surface-overlay: rgba(255, 255, 255, 0.10);
  --uc-surface-control: #FFFFFF;   /* secondary control fill (raised) */
  --uc-button-soft-neutral-bg: var(--uc-surface-sunken);
  --uc-button-soft-neutral-shadow: var(--uc-shadow-1);
  /* The hover / highlight wash (menu rows, the sliding pill in Select and
     Menu). SEPARATE from --uc-surface-control, which it used to borrow: that
     token is a RAISED FILL, and the two values only coincide on a dark surface
     where rgba(255,255,255,0.05) happens to read as both. On light, a raised
     control is #FFFFFF — a white pill on a white menu, i.e. invisible — while
     a hover wash has to be darker than what it sits on. Translucent so it
     composites over whatever surface the menu uses. */
  --uc-surface-hover: rgba(0, 0, 0, 0.04);

  --uc-text-strong: #0A0A0A;
  --uc-text:        #171717;
  --uc-text-muted:  #737373;
  --uc-text-subtle: #A3A3A3;

  /* high-contrast inverse fill (B&W primary): dark on light content */
  --uc-inverse-bg: #171717;
  --uc-inverse-fg: #FFFFFF;

  /* One soft, semi-transparent hairline (ElevenLabs uses rgba(0,0,0,0.1)).
     Translucent so it composites correctly over white AND grey tiles. */
  --uc-border-subtle: rgba(0, 0, 0, 0.055);
  --uc-border:        rgba(0, 0, 0, 0.09);
  --uc-border-strong: rgba(0, 0, 0, 0.14);
  /* The HOVER border on controls — one step above --uc-border-strong, and a
     BORDER value, not a text one. Every hover ring used --uc-text-subtle,
     which on dark is ALSO #525252 (the two coincide there, so the mistake was
     invisible — and the hover was in fact a no-op, resting and hover being the
     same colour) but on light is #A3A3A3: roughly 36% black against a 14%
     resting border, i.e. a hard outline snapping in instead of a step up. */
  --uc-border-hover:  rgba(0, 0, 0, 0.22);
  --uc-ring:          #737373;

  /* per-family foreground (readable on light). brand/accent = dark ink. */
  --uc-brand-fg:   #171717;
  --uc-success-fg: #0A842A;
  --uc-danger-fg:  #D12D37;
  --uc-warning-fg: #AA712B;
  --uc-accent-fg:  #171717;

  /* per-family soft tint backgrounds (opaque light tints). brand/accent = grey. */
  --uc-brand-soft:   #F0F0F0;
  --uc-success-soft: #E7FFE7;
  --uc-danger-soft:  #FFF2EF;
  --uc-warning-soft: #FFEDD8;
  --uc-accent-soft:  #F0F0F0;
}

/* =============================================================================
   3. SURFACE, CONTENT DARK (future). Token change only; no component rebuild.
      Slightly lighter than chrome so content sits "above" the fixed chrome.
   ========================================================================== */
.uc-content[data-theme="dark"] {
  --uc-surface-sunken:  #151515;
  --uc-surface-base:    #1C1C1C;
  --uc-surface-raised:  #242424;
  --uc-surface-overlay: #2A2A2A;
  --uc-surface-control: rgba(255, 255, 255, 0.05);  /* subtle lift, blends on dark */
  /* Muted neutral buttons use the secondary control recipe on dark surfaces. */
  --uc-button-soft-neutral-bg: var(--uc-surface-control);
  --uc-button-soft-neutral-shadow: var(--uc-shadow-raised);

  --uc-text-strong: #F5F5F5;
  --uc-text:        #E5E5E5;
  --uc-text-muted:  #A3A3A3;
  --uc-text-subtle: #737373;

  /* inverse flips to light-on-dark so the B&W primary stays high-contrast */
  --uc-inverse-bg: #F5F5F5;
  --uc-inverse-fg: #1C1C1C;

  --uc-border-subtle: #2E2E2E;
  --uc-border:        #3D3D3D;
  --uc-border-strong: #525252;
  /* Exactly what --uc-text-subtle resolves to here, so dark is unchanged. */
  --uc-border-hover:  #525252;
  --uc-ring:          #A3A3A3;

  --uc-brand-fg:   #EDEDED;
  --uc-success-fg: #A7EAAA;
  --uc-danger-fg:  #FDC9C6;
  --uc-warning-fg: #FFC680;
  --uc-accent-fg:  #EDEDED;

  --uc-brand-soft:   rgba(255, 255, 255, 0.12);
  --uc-success-soft: rgba(46, 163, 67, 0.20);
  --uc-danger-soft:  rgba(246, 82, 88, 0.20);
  --uc-warning-soft: rgba(255, 169, 64, 0.22);
  --uc-accent-soft:  rgba(255, 255, 255, 0.12);
}

/* =============================================================================
   4. SURFACE, CHROME (dark, fixed). Values from the existing app dark sidebar
      (#171717 / #202020, text-white / text-weakest, border-dark-weakest/default).
   ========================================================================== */
.uc-chrome {
  --uc-surface-sunken:  #101010;
  --uc-surface-base:    #171717;
  --uc-surface-raised:  #202020;
  --uc-surface-overlay: #242424;
  --uc-surface-control: rgba(255, 255, 255, 0.05);  /* subtle lift, blends on dark */
  --uc-button-soft-neutral-bg: var(--uc-surface-control);
  --uc-button-soft-neutral-shadow: var(--uc-shadow-raised);
  /* Same value --uc-surface-control had, so dark is unchanged by the split. */
  --uc-surface-hover: rgba(255, 255, 255, 0.05);

  --uc-text-strong: #FFFFFF;
  --uc-text:        #A3A3A3;
  --uc-text-muted:  #737373;
  --uc-text-subtle: #525252;

  /* inverse flips to light-on-dark so the B&W primary stays high-contrast */
  --uc-inverse-bg: #F5F5F5;
  --uc-inverse-fg: #171717;

  --uc-border-subtle: #333333;
  --uc-border:        #404040;
  --uc-border-strong: #525252;
  /* Exactly what --uc-text-subtle resolves to here, so dark is unchanged. */
  --uc-border-hover:  #525252;
  --uc-ring:          #A3A3A3;

  --uc-brand-fg:   #EDEDED;
  --uc-success-fg: #A7EAAA;
  --uc-danger-fg:  #FDC9C6;
  --uc-warning-fg: #FFC680;
  --uc-accent-fg:  #EDEDED;

  --uc-brand-soft:   rgba(255, 255, 255, 0.12);
  --uc-success-soft: rgba(46, 163, 67, 0.20);
  --uc-danger-soft:  rgba(246, 82, 88, 0.20);
  --uc-warning-soft: rgba(255, 169, 64, 0.22);
  --uc-accent-soft:  rgba(255, 255, 255, 0.12);
}

/* =============================================================================
   4b. POPOVER, fixed dark scope for dropdowns (Select / Menu). Always dark in
       every mode. Applied alongside `uc-portal` (base tokens + box-sizing).
   ========================================================================== */
.uc-pop-dark {
  --uc-surface-sunken:  #141414;
  --uc-surface-base:    #1A1A1A;
  --uc-surface-raised:  #242424;
  /* A dropdown must read as a LAYER above the panel. The old #1C1C1C sat
     between the panel chrome (#171717) and its field surfaces (#202020/#242424),
     so a dark list melted into the dark panel. #2E2E2E is clearly lighter than
     every panel surface, and the stronger shadow below (soft dark drops that
     actually show on dark, reused from the canvas dock bar) plus the .content
     border give it a crisp, floating edge. [ui-ux blend fix] */
  --uc-surface-overlay: #2E2E2E;
  --uc-surface-control: rgba(255, 255, 255, 0.08);
  --uc-button-soft-neutral-bg: var(--uc-surface-control);
  --uc-button-soft-neutral-shadow: var(--uc-shadow-raised);
  /* Same value --uc-surface-control had here; a pop-up is already a layer up,
     so its wash is a touch stronger than the panel's. */
  --uc-surface-hover: rgba(255, 255, 255, 0.08);
  --uc-shadow-4: 0 16px 44px -12px rgb(0 0 0 / 55%), 0 4px 12px -4px rgb(0 0 0 / 40%);

  --uc-text-strong: #FFFFFF;
  --uc-text:        #E5E5E5;
  --uc-text-muted:  #A3A3A3;
  --uc-text-subtle: #737373;

  --uc-inverse-bg: #F5F5F5;
  --uc-inverse-fg: #171717;

  --uc-border-subtle: #2E2E2E;
  --uc-border:        #3D3D3D;
  --uc-border-strong: #525252;
  /* Exactly what --uc-text-subtle resolves to here, so dark is unchanged. */
  --uc-border-hover:  #525252;
  --uc-ring:          #A3A3A3;

  --uc-brand-fg:   #EDEDED;  --uc-brand-soft:   rgba(255, 255, 255, 0.12);
  --uc-success-fg: #A7EAAA;  --uc-success-soft: rgba(46, 163, 67, 0.20);
  --uc-danger-fg:  #FDC9C6;  --uc-danger-soft:  rgba(246, 82, 88, 0.20);
  --uc-warning-fg: #FFC680;  --uc-warning-soft: rgba(255, 169, 64, 0.22);
  --uc-accent-fg:  #EDEDED;  --uc-accent-soft:  rgba(255, 255, 255, 0.12);

  color: var(--uc-text);
}

/* =============================================================================
   5. BASELINES, each surface paints its own background + text.
   ========================================================================== */
.uc-scope,
.uc-content,
.uc-chrome {
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-base);
  line-height: var(--uc-leading-normal);
  color: var(--uc-text);
  background: var(--uc-surface-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Portalled content mounts in <body>; carry font/tokens but no background. */
.uc-portal {
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-base);
  line-height: var(--uc-leading-normal);
  color: var(--uc-text);
  -webkit-font-smoothing: antialiased;
}
.uc-scope *, .uc-scope *::before, .uc-scope *::after,
.uc-content *, .uc-content *::before, .uc-content *::after,
.uc-chrome *, .uc-chrome *::before, .uc-chrome *::after,
.uc-portal *, .uc-portal *::before, .uc-portal *::after {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  .uc-scope *, .uc-content *, .uc-chrome *, .uc-portal * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================================================
   UiChemy Create, COMPONENT tokens (per-component knobs)
   -----------------------------------------------------------------------------
   Per-component sizing/shape variables, editable from the internal DS editor
   (tools/ds-editor). Each defaults to a GLOBAL token via var(), so out of the
   box a component still follows the global scale, overriding one here changes
   ONLY that component, not the whole system.

   Loaded right after tokens.css (src/index.js), same surface scopes, so the
   values resolve wherever the components render. The component CSS modules read
   these with the original value as a var() fallback, so a missing/av value can
   never break a component.
   ========================================================================== */
.uc-scope,
.uc-content,
.uc-chrome,
.uc-portal {
  /* ---- Button --------------------------------------------------------- */
  --uc-btn-radius: var(--uc-radius-md);
  --uc-btn-weight: var(--uc-weight-medium);
  --uc-btn-h:      var(--uc-control-h-md);
  --uc-btn-px:     var(--uc-space-16);

  /* ---- Input ---------------------------------------------------------- */
  --uc-input-radius: var(--uc-radius-md);
  --uc-input-h:      var(--uc-control-h-md);
  --uc-input-px:     var(--uc-space-12);

  /* ---- Card ----------------------------------------------------------- */
  --uc-card-radius: var(--uc-radius-lg);
  --uc-card-pad:    var(--uc-space-20);

  /* ---- Tabs (pill variant) -------------------------------------------- */
  --uc-tab-track-bg:     #F2F2F2;   /* lighter track (was --uc-surface-sunken #EBEBEB) */
  --uc-tab-track-stroke: none;      /* no hairline stroke around the track */
  --uc-tab-track-radius: var(--uc-radius-md);
  --uc-tab-track-pad:    3px;
  --uc-tab-radius:       var(--uc-radius-sm);
  --uc-tab-h:            26px;
  --uc-tab-px:           var(--uc-space-12);
}

/* FloatingToolbar shares the global palette in either theme. */
.uc-scope,
.uc-content,
.uc-chrome,
.uc-portal,
.uc-pop-dark {
  --uc-toolbar-bg: var(--uc-surface-raised);
  --uc-toolbar-hover-bg: var(--uc-surface-overlay);
  --uc-toolbar-fg: var(--uc-text);
  --uc-toolbar-border: var(--uc-border);
  --uc-toolbar-height: 48px;
  --uc-toolbar-action-size: 34px;
  --uc-toolbar-dismiss-size: 44px;
  --uc-toolbar-radius: var(--uc-radius-lg);
  --uc-toolbar-action-radius: var(--uc-btn-radius);
  --uc-toolbar-compact-height: var(--uc-space-40);
  --uc-toolbar-compact-action-size: var(--uc-control-h-md);
  --uc-toolbar-compact-radius: var(--uc-toolbar-radius);
  --uc-toolbar-shadow: var(--uc-shadow-4);
}

.uc-pop-dark {

  /* Pill tabs inside a dark pop-up (e.g. the model picker's CLI | WP Connectors
     strip). `.uc-portal` above pins the track to the light #F2F2F2, which
     beats anything inherited from a dark panel, so re-point it to the dark
     sunken well + hairline here. */
  --uc-tab-track-bg:     var(--uc-surface-sunken);
  --uc-tab-track-stroke: inset 0 0 0 1px var(--uc-border-subtle);
}

/* =============================================================================
   Design-system token overrides for the editor only
   -----------------------------------------------------------------------------
   The editor runs on the dashboard's design system (`@ds` →
   new-dashboard/src/design-system). This file holds the few token values the
   editor needs that the shared tokens do not set yet, so it only declares
   values for the editor's dark scopes and changes nothing in the dashboard.

   Import it immediately after `@ds/styles/component-tokens.css` so it lands
   later in the bundled stylesheet and wins at equal specificity (index.jsx).

   Keep this file SHORT. Each block says why it is here and what would let it
   be deleted, which is usually moving it into the shared tokens.
   ========================================================================== */

/* ---- Pill tabs and segmented controls on the dark surfaces -----------------
   `component-tokens.css` sets the pill track to a raw `#F2F2F2`, and the rule
   that sets it covers `.uc-chrome` and `.uc-portal` alongside the light
   surfaces. So a pill tab set or a segmented control on dark chrome drew a
   near-white tray with dark labels — the one component pair in the system that
   did not flip with its surface. In this editor that is the mode switch
   (Preview / Design / Code / Data / Motion), the breakpoint switch, the
   inspector's Design / Developer tabs and the add-section dialog.

   Upstream lives with it by patching each call site: the app's own
   `components/shared/BridgedTabs.tsx` sets exactly the two values below inline
   to get its dark editor-header switcher. The values here are lifted from it
   verbatim — back to the surface-aware `--uc-surface-sunken` that the
   component's own CSS already names as its fallback, with the hairline
   restored, because the flat-tray look the `none` was chosen for depends on
   the tray being LIGHTER than the surface behind it. On dark it is darker, so
   without an edge the track dissolves into the chrome.

   Light surfaces are untouched — this only adds dark scopes. `--uc-toggle-
   track-bg` / `--uc-toggle-track-stroke` are declared upstream as
   `var(--uc-tab-track-*)`, and `var()` resolves against the element rather than
   where it was written, so the segmented control follows automatically and the
   two keep rendering the same grey.

   The shared component-tokens.css already does this for `.uc-pop-dark`, not
   yet for `.uc-chrome` or dark `.uc-content`. DELETE THIS BLOCK once it does;
   nothing will flag that it has become a no-op. */
.uc-chrome,
.uc-content[data-theme="dark"],
.uc-pop-dark {
  --uc-tab-track-bg:     var(--uc-surface-sunken);
  --uc-tab-track-stroke: inset 0 0 0 1px var(--uc-border-subtle);
}

/* The Composer's selection colour (--uich-select-ink, pink by default): the
   UiChemy app's canvas-select blue, for any overlay drawn in the editor window.
   The canvas sets the same value on its own document (canvas.js). */
/* …and its hover / selection boxes jump to the next element, no slide. */
:root { --uich-select-ink: #0D99FF; --uich-ring-slide: opacity .1s ease; }

/* Pointer use has no focus outline, even when a menu restores :focus-visible.
 * Scope is UI chrome only, never visitor content or third-party WP controls.
 * Preserve base inset borders, elevation, hover, checked and invalid states.
 * Keyboard navigation removes this override and uses component focus styles.
 */
:root[data-uc-input-mode='pointer']
  :is(.uipb-studio, #uichemy-composer-floating-panel, #smart-html-floating-panel,
      .uich-composer-host, .uich-tw, .uich-rp, .uich-portal-root,
      .uc-scope, .uc-content, .uc-chrome, .uc-portal, .uc-pop-dark)
  :is(:focus, :focus-visible, :focus-within),
:root[data-uc-input-mode='pointer']
  :is(.uc-scope, .uc-content, .uc-chrome, .uc-portal, .uc-pop-dark):is(:focus, :focus-visible, :focus-within) {
  outline: none !important;
  --tw-ring-shadow: 0 0 #0000 !important;
  --tw-ring-offset-shadow: 0 0 #0000 !important;
}

/* Button, raised, physically-lit control on uc- tokens. */

.oDgO9tRe_mBUNaW0e6V8 {
  --_h: var(--uc-btn-h, var(--uc-control-h-md));
  --_px: var(--uc-btn-px, var(--uc-space-16));
  --_fs: var(--uc-text-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--uc-space-8);
  height: var(--_h);
  padding: 0 var(--_px);
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--_fs);
  font-weight: var(--uc-btn-weight, var(--uc-weight-medium));
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  border: none;
  border-radius: var(--uc-btn-radius, var(--uc-radius-md));
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  position: relative;
  isolation: isolate;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard),
    box-shadow var(--uc-dur-fast) var(--uc-ease-standard),
    transform var(--uc-dur-fast) var(--uc-ease-standard),
    color var(--uc-dur-fast) var(--uc-ease-standard);
}
.oDgO9tRe_mBUNaW0e6V8:focus:not(:focus-visible) { outline: none; }
.oDgO9tRe_mBUNaW0e6V8:focus-visible {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}
.oDgO9tRe_mBUNaW0e6V8:active:not(:disabled) {
  transform: translateY(0.5px);
}
.oDgO9tRe_mBUNaW0e6V8:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---- Sizes ---------------------------------------------------------------- */
.qLkzuQUQ_X4w0fceh2CB { --_h: var(--uc-control-h-sm); --_px: var(--uc-space-12); --_fs: var(--uc-text-sm); }
.NAPRKbEZKONQ8AdACBzs { --_h: var(--uc-btn-h, var(--uc-control-h-md)); --_px: var(--uc-btn-px, var(--uc-space-16)); --_fs: var(--uc-text-base); }
.qeRuCFz3SPTfPQEz8Eur { --_h: var(--uc-control-h-lg); --_px: var(--uc-space-20); --_fs: var(--uc-text-md); }

.GW0xiH4qJYyLFExAe7Cc { padding: 0; width: var(--_h); flex-shrink: 0; }
.GW0xiH4qJYyLFExAe7Cc > svg { display: block; flex-shrink: 0; }

/* ---- Variant: solid ------------------------------------------------------- */
.nx448XS4JGEoBYKJ_Xeh {
  color: var(--uc-brand-on);
  background: var(--_fill, var(--uc-brand));
  background-image: var(--uc-sheen);
  box-shadow: var(--_shadow, var(--uc-shadow-control-brand));
}
/* Keep the fill in every interactive state. The composer's host-theme reset
   (composer-isolation.css, (0,2,0) `background: none` on :hover/:focus/:active)
   outranks the lone `.solid` class, so a hovered or focused solid brand/danger
   button lost its fill and showed as an empty square. Same (0,2,0), later
   source order, so this wins. */
.nx448XS4JGEoBYKJ_Xeh:is(:hover, :focus, :focus-visible, :active) { background-color: var(--_fill, var(--uc-brand)); }
.nx448XS4JGEoBYKJ_Xeh:hover:not(:disabled) { background-image: linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)), var(--uc-sheen); }
.nx448XS4JGEoBYKJ_Xeh:active:not(:disabled) {
  background-image: linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12)), var(--uc-sheen);
  box-shadow: var(--uc-shadow-control-pressed);
}

/* neutral solid = the B&W PRIMARY: high-contrast inverse fill that flips per
   surface (dark on light content, light on dark chrome/content). */
.nx448XS4JGEoBYKJ_Xeh.P6iUGKQ9CuUmhTY4IDx4 {
  color: var(--uc-inverse-fg);
  background: var(--uc-inverse-bg);
  box-shadow: var(--uc-shadow-control);
}
/* grey wash nudges black->lighter and white->darker, so hover reads on both */
.nx448XS4JGEoBYKJ_Xeh.P6iUGKQ9CuUmhTY4IDx4:hover:not(:disabled) {
  background-image: linear-gradient(to bottom, rgba(128, 128, 128, 0.16), rgba(128, 128, 128, 0.16));
}
.nx448XS4JGEoBYKJ_Xeh.P6iUGKQ9CuUmhTY4IDx4:active:not(:disabled) {
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.14));
}

/* ---- Variant: soft -------------------------------------------------------- */
.lSxxR32yQ7uBGKoReA0d {
  color: var(--_fg, var(--uc-brand-fg));
  background: var(--_soft, var(--uc-brand-soft));
  background-image: var(--uc-sheen);
  box-shadow: inset 0 0 0 1px var(--_border, var(--uc-brand-border)), var(--_soft-shadow, var(--uc-shadow-1));
}
.lSxxR32yQ7uBGKoReA0d:hover:not(:disabled) { background-image: var(--uc-sheen), linear-gradient(var(--_glow, var(--uc-brand-glow-hover)), var(--_glow, var(--uc-brand-glow-hover))); }

/* ---- Variant: outline (raised secondary) ---------------------------------- */
.uEkFBKngy5ABC8BavrlF {
  color: var(--_fg, var(--uc-brand-fg));
  background: var(--uc-surface-control);
  background-image: var(--uc-sheen);
  box-shadow: inset 0 0 0 1px var(--_border, var(--uc-border-subtle)), var(--uc-shadow-raised);
}
.uEkFBKngy5ABC8BavrlF.P6iUGKQ9CuUmhTY4IDx4 { color: var(--uc-text-strong); }
.uEkFBKngy5ABC8BavrlF:hover:not(:disabled) { background-image: var(--uc-sheen), linear-gradient(var(--_glow, var(--uc-brand-glow-hover)), var(--_glow, var(--uc-brand-glow-hover))); }

/* ---- Variant: ghost ------------------------------------------------------- */
.ZShdqkg6btw_9kcxTgYx {
  color: var(--_fg, var(--uc-brand-fg));
  background: transparent;
}
.ZShdqkg6btw_9kcxTgYx.P6iUGKQ9CuUmhTY4IDx4 { color: var(--uc-text); }
/* The pointer target stays full size; only the wash is inset. This avoids a
   tall grey tile swallowing small chevrons and adjacent split controls. */
.ZShdqkg6btw_9kcxTgYx::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: max(2px, calc(var(--uc-btn-radius, var(--uc-radius-md)) - 2px));
  background: var(--_glow, var(--uc-brand-glow-hover));
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transition: opacity var(--uc-dur-fast) var(--uc-ease-standard);
}
.ZShdqkg6btw_9kcxTgYx:hover:not(:disabled) { background: transparent; color: var(--uc-text-strong); }
.ZShdqkg6btw_9kcxTgYx:is(:hover, [data-state="open"]):not(:disabled)::before { opacity: 1; }

/* ---- Hold the fill through hover / focus / press ---------------------------
   The dashboard's theme-isolation reset (composer-isolation.css) clears
   `background` on every link and button under the pointer or focus at (0,2,0),
   which outranks the single-class variant rules above. A Button rendered as a link
   (asChild, e.g. "Upgrade to Pro") then went transparent on hover: white text on
   white. These restate each variant's fill at (0,3,0)+ for those states. */
.nx448XS4JGEoBYKJ_Xeh:is(:hover, :focus, :focus-visible, :focus-within, :active):not(:disabled) { background-color: var(--_fill, var(--uc-brand)); }
.nx448XS4JGEoBYKJ_Xeh.P6iUGKQ9CuUmhTY4IDx4:is(:hover, :focus, :focus-visible, :focus-within, :active):not(:disabled) { background-color: var(--uc-inverse-bg); }
.lSxxR32yQ7uBGKoReA0d:is(:hover, :focus, :focus-visible, :focus-within, :active):not(:disabled) { background-color: var(--_soft, var(--uc-brand-soft)); }
.uEkFBKngy5ABC8BavrlF:is(:hover, :focus, :focus-visible, :focus-within, :active):not(:disabled) { background-color: var(--uc-surface-control); }
/* The same for a disabled button: its fill stays, dimmed by .button:disabled.
   Without these the reset left a disabled solid button (the chat's Send with
   nothing typed) transparent on hover, its white icon on the white panel. */
.nx448XS4JGEoBYKJ_Xeh:is(:hover, :focus, :focus-visible, :focus-within, :active):disabled { background-color: var(--_fill, var(--uc-brand)); }
.nx448XS4JGEoBYKJ_Xeh.P6iUGKQ9CuUmhTY4IDx4:is(:hover, :focus, :focus-visible, :focus-within, :active):disabled { background-color: var(--uc-inverse-bg); }
.lSxxR32yQ7uBGKoReA0d:is(:hover, :focus, :focus-visible, :focus-within, :active):disabled { background-color: var(--_soft, var(--uc-brand-soft)); }
.uEkFBKngy5ABC8BavrlF:is(:hover, :focus, :focus-visible, :focus-within, :active):disabled { background-color: var(--uc-surface-control); }

/* ---- Tones (feed the --_* channels the variants read) --------------------- */
.BDHV_0n6wKsmpw3p3s1i   { --_fill: var(--uc-brand);   --_fg: var(--uc-brand-fg);   --_soft: var(--uc-brand-soft);   --_border: var(--uc-brand-border);   --_glow: var(--uc-brand-glow-hover);   --_shadow: var(--uc-shadow-control-brand); }
.keLGBcvAq5oELzJZ2XbZ { --_fill: var(--uc-success); --_fg: var(--uc-success-fg); --_soft: var(--uc-success-soft); --_border: var(--uc-success-border); --_glow: var(--uc-success-glow-hover); --_shadow: var(--uc-shadow-control-brand); }
.qM62Gv6j4BSYSajMwnqk  { --_fill: var(--uc-danger);  --_fg: var(--uc-danger-fg);  --_soft: var(--uc-danger-soft);  --_border: var(--uc-danger-border);  --_glow: var(--uc-danger-glow-hover);  --_shadow: var(--uc-shadow-control-brand); }
.P6iUGKQ9CuUmhTY4IDx4 {
  --_fg: var(--uc-text-strong);
  --_soft: var(--uc-button-soft-neutral-bg, var(--uc-surface-sunken));
  --_soft-shadow: var(--uc-button-soft-neutral-shadow, var(--uc-shadow-1));
  --_border: var(--uc-border-strong);
  --_glow: rgba(128, 128, 128, 0.10);
}

/* ---- As a link (asChild <a>) --------------------------------------------- *
   wp-admin styles `a:hover, a:active` (blue text) and `a:focus` (blue text + a
   2px blue box-shadow) at 0,1,1, which out-ranks the variant colours and
   shadows above (0,1,0). Re-assert them for anchors so a link button looks
   exactly like the button it is in every state. */
a.nx448XS4JGEoBYKJ_Xeh:is(:hover, :focus, :active, :visited) { color: var(--uc-brand-on); }
a.nx448XS4JGEoBYKJ_Xeh.P6iUGKQ9CuUmhTY4IDx4:is(:hover, :focus, :active, :visited) { color: var(--uc-inverse-fg); }
a.lSxxR32yQ7uBGKoReA0d:is(:hover, :focus, :active, :visited),
a.uEkFBKngy5ABC8BavrlF:is(:hover, :focus, :active, :visited) { color: var(--_fg, var(--uc-brand-fg)); }
a.uEkFBKngy5ABC8BavrlF.P6iUGKQ9CuUmhTY4IDx4:is(:hover, :focus, :active, :visited) { color: var(--uc-text-strong); }
a.ZShdqkg6btw_9kcxTgYx:is(:focus, :active, :visited) { color: var(--_fg, var(--uc-brand-fg)); }
a.ZShdqkg6btw_9kcxTgYx.P6iUGKQ9CuUmhTY4IDx4:is(:focus, :active, :visited) { color: var(--uc-text); }
a.nx448XS4JGEoBYKJ_Xeh:focus { box-shadow: var(--_shadow, var(--uc-shadow-control-brand)); }
a.nx448XS4JGEoBYKJ_Xeh.P6iUGKQ9CuUmhTY4IDx4:focus { box-shadow: var(--uc-shadow-control); }
a.lSxxR32yQ7uBGKoReA0d:focus { box-shadow: inset 0 0 0 1px var(--_border, var(--uc-brand-border)), var(--_soft-shadow, var(--uc-shadow-1)); }
a.uEkFBKngy5ABC8BavrlF:focus { box-shadow: inset 0 0 0 1px var(--_border, var(--uc-border-subtle)), var(--uc-shadow-raised); }
a.ZShdqkg6btw_9kcxTgYx:focus { box-shadow: none; }

/* ---- Loading -------------------------------------------------------------- */
.pc70O1Y6HdzT607YK_OL { color: transparent !important; pointer-events: none; }
.rtWcge6eoBiDmFoHo4gD {
  position: absolute;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  color: var(--uc-brand-on);
  animation: qUXtsmRZhV0_Rb8A9qFD 0.6s linear infinite;
}
.lSxxR32yQ7uBGKoReA0d .rtWcge6eoBiDmFoHo4gD, .uEkFBKngy5ABC8BavrlF .rtWcge6eoBiDmFoHo4gD, .ZShdqkg6btw_9kcxTgYx .rtWcge6eoBiDmFoHo4gD { color: var(--uc-text); }
.nx448XS4JGEoBYKJ_Xeh.P6iUGKQ9CuUmhTY4IDx4 .rtWcge6eoBiDmFoHo4gD { color: var(--uc-inverse-fg); }
@keyframes qUXtsmRZhV0_Rb8A9qFD { to { transform: rotate(-360deg); } }

/* ---- Surface: dark -------------------------------------------------------- *
   `surface="dark"`, remaps the semantic tokens the variants read to the fixed
   dark-chrome values (mirrors `.uc-chrome` in tokens.css). Lets a single Button
   render correctly on the app's dark header / sidebar / rails WITHOUT needing a
   `.uc-chrome` ancestor (the app chrome is styled with UiChemy's own app tokens, not the
   DS scope). Orthogonal to variant + tone: every variant flips automatically,
   solid-neutral becomes a white B&W primary, outline/ghost go light-on-dark,
   brand stays orange. */
.VnThCro2n02iRphzomVo {
  --uc-surface-sunken:  #101010;
  --uc-surface-control: rgba(255, 255, 255, 0.05);
  --uc-button-soft-neutral-bg: var(--uc-surface-control);
  --uc-button-soft-neutral-shadow: var(--uc-shadow-raised);

  --uc-text-strong: #FFFFFF;
  --uc-text:        #A3A3A3;

  /* B&W primary flips to a light fill with dark ink on dark chrome */
  --uc-inverse-bg: #F5F5F5;
  --uc-inverse-fg: #171717;

  --uc-border-subtle: #333333;
  --uc-border:        #404040;
  --uc-border-strong: #525252;
  --uc-brand-border:  var(--uc-border);
  --uc-ring:          #A3A3A3;

  /* per-family fg/soft readable on dark */
  --uc-brand-fg:   #EDEDED;  --uc-brand-soft:   rgba(255, 255, 255, 0.12);
  --uc-success-fg: #A7EAAA;  --uc-success-soft: rgba(46, 163, 67, 0.20);
  --uc-danger-fg:  #FDC9C6;  --uc-danger-soft:  rgba(246, 82, 88, 0.20);
}

/* The always-dark chip: the floating canvas toolbar's standalone button as a
   reusable control. Reads the SAME --uc-toolbar tokens (with the same literal
   fallbacks), so the two stay identical; the component adds `uc-pop-dark`
   alongside this class, which is what scopes those tokens to dark values on
   any page theme. */
.cOkswkXgGqdwukDtzxre {
  background: var(--uc-toolbar-bg, var(--uc-surface-raised, #242424));
  color: var(--uc-toolbar-fg, var(--uc-text, #F5F5F5));
  box-shadow: inset 0 0 0 1px var(--uc-toolbar-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--uc-toolbar-radius, var(--uc-radius-lg, 12px));
}
.cOkswkXgGqdwukDtzxre:hover:not(:disabled) {
  background: var(--uc-toolbar-hover-bg, var(--uc-surface-overlay, #2E2E2E));
  color: var(--uc-toolbar-fg, var(--uc-text-strong, #FFFFFF));
}
.cOkswkXgGqdwukDtzxre:focus-visible {
  outline: 2px solid var(--uc-ring, rgba(245, 245, 245, 0.55));
  outline-offset: -2px;
}

/* The standalone dark chip already owns its hover fill. */
.cOkswkXgGqdwukDtzxre::before { content: none; }

/* Compact grouping adapted from Hirael; global radii, MIT notice in FloatingToolbar.tsx. */
.VDCgP2TXcbIH83qTz1iU {
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-8, 8px);
  font-family: var(--uc-font-sans, system-ui, sans-serif);
  --uich-ff: var(--uc-font-sans, system-ui, sans-serif);
  font-size: var(--uc-text-base, 14px);
  color-scheme: inherit;
  color: var(--uc-toolbar-fg, var(--uc-text, CanvasText));
  pointer-events: none;
}

/* uc-content supplies light tokens, not an extra rectangular wrapper surface. */
.VDCgP2TXcbIH83qTz1iU.VDCgP2TXcbIH83qTz1iU { background: transparent; }

.VDCgP2TXcbIH83qTz1iU[data-theme="dark"] { color-scheme: dark; }
.VDCgP2TXcbIH83qTz1iU[data-theme="light"] { color-scheme: light; }

/* Rebind to the current surface, not a computed dark toolbar token inherited
   from an ancestor. Light uses the DS content scope; inherit adds no scope. */
.VDCgP2TXcbIH83qTz1iU:not([data-theme="dark"]) {
  --uc-toolbar-bg: var(--uc-surface-raised, Canvas);
  --uc-toolbar-fg: var(--uc-text, CanvasText);
  --uc-toolbar-border: var(--uc-border, ButtonBorder);
  --uc-toolbar-hover-bg: var(--uc-surface-hover, ButtonFace);
}

.VDCgP2TXcbIH83qTz1iU.IdW9qftPRIpxufX1u1zB {
  --uc-toolbar-height: var(--uc-toolbar-compact-height, var(--uc-control-h-lg, 40px));
  --uc-toolbar-action-size: var(--uc-toolbar-compact-action-size, var(--uc-control-h-md, 32px));
  --uc-toolbar-dismiss-size: var(--uc-toolbar-compact-action-size, var(--uc-control-h-md, 32px));
  /* Compact changes density only. Surface/action radii stay global. */
}

.wcjtBjSJwTWRpPftzjvQ,
.Dki1FM4eHY9MKK_GAGym,
.j4Axbcky5LgpsKgn4WAb {
  background: var(--uc-toolbar-bg, var(--uc-surface-raised, Canvas));
  border: 1px solid var(--uc-toolbar-border, var(--uc-border, ButtonBorder));
  box-shadow: var(--uc-toolbar-shadow, 0 16px 44px -12px rgb(0 0 0 / 48%), 0 4px 12px -4px rgb(0 0 0 / 32%));
}

.wcjtBjSJwTWRpPftzjvQ {
  pointer-events: auto;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-4, 4px);
  height: var(--uc-toolbar-height, 48px);
  padding: 0 var(--uc-space-6, 6px);
  /* Compact and dock geometry share the global surface radius. */
  border-radius: var(--uc-toolbar-radius, var(--uc-radius-lg, 12px));
  overflow: visible;
}

.IdW9qftPRIpxufX1u1zB .wcjtBjSJwTWRpPftzjvQ { padding-inline: var(--uc-space-6, 6px); gap: var(--uc-space-6, 6px); }

.VDCgP2TXcbIH83qTz1iU.Ti6l0uHmIPYJMAFtJph6 { gap: 0; height: auto; padding: 0; border: 0; box-shadow: none; }
.VDCgP2TXcbIH83qTz1iU.Ti6l0uHmIPYJMAFtJph6 .wcjtBjSJwTWRpPftzjvQ {
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.Nt2ipeZvcBNJCdMb5cZ_,
.Dki1FM4eHY9MKK_GAGym {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font: inherit;
  --uich-ff: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
}

/* Actions share the global Button radius; the ✕ matches the bar beside it. */
.Nt2ipeZvcBNJCdMb5cZ_ { border-radius: var(--uc-toolbar-action-radius, var(--uc-btn-radius, var(--uc-radius-md, 8px))); }
.Dki1FM4eHY9MKK_GAGym { border-radius: var(--uc-toolbar-radius, var(--uc-radius-lg, 12px)); }

.Nt2ipeZvcBNJCdMb5cZ_ {
  position: relative;
  flex: none;
  /* Fixed size — the dock magnification was removed. */
  width: var(--uc-toolbar-action-size, 34px);
  height: var(--uc-toolbar-action-size, 34px);
  border: 0;
  background: transparent;
  color: var(--uc-toolbar-fg, var(--uc-text, CanvasText));
  /* The active pill slides between buttons on this transition. */
  transition: background-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
  /* Selected look = the DS dark gradient button: a dark fill with the sheen
     gradient on top and a hairline stroke + raised shadow. The gradient is a
     background-IMAGE, so it also survives the composer's theme button-paint
     guard (which only zeroes background-color). Defined once, reused by every
     :active rule below so the host-reset guards stay in sync. */
  --uc-tb-active-bg:
    var(--uc-sheen, linear-gradient(to bottom, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.03))),
    var(--uc-surface-sunken, ButtonFace);
  --uc-tb-active-ring:
    inset 0 0 0 1px var(--uc-border-strong, ButtonBorder),
    var(--uc-shadow-raised, 0 1px 2px rgba(0, 0, 0, 0.30));
}

.Nt2ipeZvcBNJCdMb5cZ_:hover,
.Dki1FM4eHY9MKK_GAGym:hover {
  background: var(--uc-toolbar-hover-bg, var(--uc-surface-hover, ButtonFace));
  border-color: var(--uc-toolbar-border, var(--uc-border, ButtonBorder));
  box-shadow: var(--uc-toolbar-shadow, 0 6px 16px -6px rgb(0 0 0 / 48%));
  color: var(--uc-text-strong, CanvasText);
}
/* An action sits inside the bar, so its hover is the wash alone: the bar's
   own float shadow on a 32px button read as a grey haze around it. The ✕
   and the handle's pill float by themselves and keep it. */
.Nt2ipeZvcBNJCdMb5cZ_:hover { box-shadow: none; }

.Nt2ipeZvcBNJCdMb5cZ_:focus-visible,
.Dki1FM4eHY9MKK_GAGym:focus-visible {
  outline: 2px solid var(--uc-ring, Highlight);
  outline-offset: -2px;
}

/* Selected = a dark, inset "stroked" button (the global dark icon button look),
   not a light disc. The stroke is the visible part; the fill sits a touch below
   the bar so it reads as pressed-in. */
.Nt2ipeZvcBNJCdMb5cZ_.fMofPR_paz4U2oqfg0QQ {
  background: var(--uc-tb-active-bg);
  box-shadow: var(--uc-tb-active-ring);
  color: var(--uc-text-strong, CanvasText);
}
.Nt2ipeZvcBNJCdMb5cZ_.fMofPR_paz4U2oqfg0QQ:hover {
  background: var(--uc-tb-active-bg);
}

/* A disabled action says so under the pointer. `default` read as "this button
   simply does nothing" — the arrow never changes, so a press that was ignored
   looked like a press that was missed. */
.Nt2ipeZvcBNJCdMb5cZ_:disabled,
.Nt2ipeZvcBNJCdMb5cZ_:disabled:hover {
  opacity: 1;
  color: var(--uc-text-muted, GrayText);
  background: transparent;
  cursor: not-allowed;
}

/* Active AND disabled is work in progress — Save during a flush is the case
   this exists for. `progress` was the old choice and it is the wrong signal
   here: it means "busy, but you may still interact", while the button is in
   fact refusing the click. Saves are also short, so a cursor that only reads
   as a brief flicker told the user nothing. */
.Nt2ipeZvcBNJCdMb5cZ_.fMofPR_paz4U2oqfg0QQ:disabled,
.Nt2ipeZvcBNJCdMb5cZ_.fMofPR_paz4U2oqfg0QQ:disabled:hover {
  background: var(--uc-tb-active-bg);
  box-shadow: var(--uc-tb-active-ring);
  color: var(--uc-text-strong, CanvasText);
  cursor: not-allowed;
}

.Nt2ipeZvcBNJCdMb5cZ_ svg,
.Dki1FM4eHY9MKK_GAGym svg {
  width: auto !important;
  height: auto !important;
  color: inherit !important;
  stroke: currentColor !important;
  fill: none !important;
  opacity: 1 !important;
  filter: none !important;
  max-width: none !important;
  max-height: none !important;
  display: block;
}

.Ra_BBvLLe4yROxlrLqYt {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--uc-space-6, 6px);
}

.vPZZP6vGHUVlSQhkRpOh {
  flex: 0 0 auto;
  width: 1px;
  height: 20px;
  margin: 0 var(--uc-space-4, 4px);
  background: var(--uc-toolbar-border, var(--uc-border, ButtonBorder));
}

.jLW95_rgGsGmyK7hLMfr::after {
  content: "";
  position: absolute;
  top: 5px;
  inset-inline-end: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--uc-toolbar-indicator, var(--uc-brand, #fd6a35));
  box-shadow: 0 0 0 1.5px var(--uc-toolbar-bg, var(--uc-surface-raised, Canvas));
  pointer-events: none;
}

.Dki1FM4eHY9MKK_GAGym {
  pointer-events: auto;
  flex: none;
  width: var(--uc-toolbar-dismiss-size, 44px);
  height: var(--uc-toolbar-dismiss-size, 44px);
  color: var(--uc-toolbar-fg, var(--uc-text, CanvasText));
  transition: background-color 150ms ease, color 150ms ease, transform 100ms ease;
}
.Dki1FM4eHY9MKK_GAGym:active { transform: scale(.94); }
/* The ✕ is a <button> that paints its own surface, and hosts reset button
   backgrounds above this module's weight (the composer's
   `.uich-tw [type='button']` is 0,2,0, its hover reset 0,3,0), which left it
   transparent: a white disc over a light canvas. Out-rank them so it stays the
   same dark surface as the bar. */
.VDCgP2TXcbIH83qTz1iU .Dki1FM4eHY9MKK_GAGym.Dki1FM4eHY9MKK_GAGym { background: var(--uc-toolbar-bg, var(--uc-surface-raised, Canvas)); }
.VDCgP2TXcbIH83qTz1iU .Dki1FM4eHY9MKK_GAGym.Dki1FM4eHY9MKK_GAGym:hover {
  background: var(--uc-toolbar-hover-bg, var(--uc-surface-hover, ButtonFace));
  border-color: var(--uc-toolbar-border, var(--uc-border, ButtonBorder));
  box-shadow: var(--uc-toolbar-shadow, 0 6px 16px -6px rgb(0 0 0 / 48%));
  color: var(--uc-text-strong, CanvasText);
}
/* Same guard for the actions: the host's hover/focus reset (0,3,0) cleared
   their hover wash and could clear the selected fill while focused. Disabled
   actions stay out of the hover rule, as in `.action:disabled:hover` above;
   `.active` comes last so a selected action keeps its fill under the pointer. */
.VDCgP2TXcbIH83qTz1iU .Nt2ipeZvcBNJCdMb5cZ_.Nt2ipeZvcBNJCdMb5cZ_:not(:disabled):hover {
  background: var(--uc-toolbar-hover-bg, var(--uc-surface-hover, ButtonFace));
  box-shadow: none;
  color: var(--uc-text-strong, CanvasText);
}
.VDCgP2TXcbIH83qTz1iU .Nt2ipeZvcBNJCdMb5cZ_.Nt2ipeZvcBNJCdMb5cZ_:disabled { color: var(--uc-text-muted, GrayText); }
.VDCgP2TXcbIH83qTz1iU .Nt2ipeZvcBNJCdMb5cZ_.Nt2ipeZvcBNJCdMb5cZ_.fMofPR_paz4U2oqfg0QQ,
.VDCgP2TXcbIH83qTz1iU .Nt2ipeZvcBNJCdMb5cZ_.Nt2ipeZvcBNJCdMb5cZ_.fMofPR_paz4U2oqfg0QQ:disabled:hover {
  background: var(--uc-tb-active-bg);
  box-shadow: var(--uc-tb-active-ring);
  color: var(--uc-text-strong, CanvasText);
}
.VDCgP2TXcbIH83qTz1iU .Nt2ipeZvcBNJCdMb5cZ_.Nt2ipeZvcBNJCdMb5cZ_.fMofPR_paz4U2oqfg0QQ:not(:disabled):hover {
  background: var(--uc-tb-active-bg);
  box-shadow: var(--uc-tb-active-ring);
}
.Dki1FM4eHY9MKK_GAGym svg { width: 16px !important; height: 16px !important; }

.j4Axbcky5LgpsKgn4WAb {
  pointer-events: none;
  z-index: var(--uc-z-tooltip, 1300);
  padding: 5px 9px;
  border-radius: var(--uc-radius-sm, 6px);
  color: var(--uc-text-strong, CanvasText);
  font-size: 11.5px;
  font-weight: var(--uc-weight-medium, 500);
}

@media (prefers-reduced-motion: reduce) {
  .Nt2ipeZvcBNJCdMb5cZ_,
  .Dki1FM4eHY9MKK_GAGym { transition: none; }
}

/* Key hint after a tooltip's label. */
.MYnwy7zbVSSeUTU2rBFv {
  margin-inline-start: var(--uc-space-8, 8px);
  color: var(--uc-text-muted, GrayText);
  font: inherit;
  --uich-ff: inherit;
  letter-spacing: 0.02em;
}

/* ---- FloatingToolbarHandle: what a hidden toolbar leaves behind -----------
   The button is a wide, short hit area; the drawn part is the grip inside it, a
   thin grey bar that grows into a chevron pill under the pointer or keyboard
   focus. At rest it is flat grey, not toolbar paint: a white pill with a soft
   shadow vanished on a white canvas. */
.dAZ_Hyxb_av0gx8pYP0u {
  display: inline-flex;
  pointer-events: none;
  color: var(--uc-toolbar-fg, var(--uc-text, CanvasText));
}
.dAZ_Hyxb_av0gx8pYP0u[data-theme="dark"] { color-scheme: dark; }
.dAZ_Hyxb_av0gx8pYP0u:not([data-theme="dark"]) {
  --uc-toolbar-bg: var(--uc-surface-raised, Canvas);
  --uc-toolbar-fg: var(--uc-text, CanvasText);
  --uc-toolbar-border: var(--uc-border, ButtonBorder);
  --uc-toolbar-hover-bg: var(--uc-surface-hover, ButtonFace);
}

.iNCSxA1uCZCOsraS6Mxg {
  pointer-events: auto;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 120px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  --uich-ff: inherit;
  cursor: pointer;
}
/* Hosts reset button paint above this module's weight (see .dismiss). */
.dAZ_Hyxb_av0gx8pYP0u .iNCSxA1uCZCOsraS6Mxg.iNCSxA1uCZCOsraS6Mxg,
.dAZ_Hyxb_av0gx8pYP0u .iNCSxA1uCZCOsraS6Mxg.iNCSxA1uCZCOsraS6Mxg:hover,
.dAZ_Hyxb_av0gx8pYP0u .iNCSxA1uCZCOsraS6Mxg.iNCSxA1uCZCOsraS6Mxg:focus { background: transparent; box-shadow: none; outline: none; }

.scu_7fKMexpFwEGrAuqU {
  position: relative;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--uc-toolbar-grip, var(--uc-text-subtle, GrayText));
  border: 1px solid transparent;
  box-shadow: none;
  transition: width 180ms cubic-bezier(0.22, 1, 0.36, 1), height 180ms cubic-bezier(0.22, 1, 0.36, 1), background-color 150ms ease, box-shadow 150ms ease;
}
.scu_7fKMexpFwEGrAuqU svg {
  width: 12px !important;
  height: 12px !important;
  color: inherit !important;
  stroke: currentColor !important;
  fill: none !important;
  max-width: none !important;
  max-height: none !important;
  display: block;
  opacity: 0 !important;
  transition: opacity 120ms ease;
}
.iNCSxA1uCZCOsraS6Mxg:hover .scu_7fKMexpFwEGrAuqU,
.iNCSxA1uCZCOsraS6Mxg:focus-visible .scu_7fKMexpFwEGrAuqU {
  width: 60px;
  height: 18px;
  background: var(--uc-toolbar-hover-bg, var(--uc-surface-hover, ButtonFace));
  border-color: var(--uc-toolbar-border, var(--uc-border, ButtonBorder));
  box-shadow: var(--uc-toolbar-shadow, 0 6px 16px -6px rgb(0 0 0 / 48%));
  color: var(--uc-text-strong, CanvasText);
}
.iNCSxA1uCZCOsraS6Mxg:hover .scu_7fKMexpFwEGrAuqU svg,
.iNCSxA1uCZCOsraS6Mxg:focus-visible .scu_7fKMexpFwEGrAuqU svg { opacity: 1 !important; }
.iNCSxA1uCZCOsraS6Mxg:focus-visible .scu_7fKMexpFwEGrAuqU { outline: 2px solid var(--uc-ring, Highlight); outline-offset: 2px; }

/* Same dot as an action's indicator, on the grip's corner. */
.t_O5riQZzA_vbD0v03im .scu_7fKMexpFwEGrAuqU::after {
  content: "";
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--uc-toolbar-indicator, var(--uc-brand, #fd6a35));
  box-shadow: 0 0 0 1.5px var(--uc-toolbar-bg, var(--uc-surface-raised, Canvas));
}

@media (prefers-reduced-motion: reduce) {
  .scu_7fKMexpFwEGrAuqU,
  .scu_7fKMexpFwEGrAuqU svg { transition: none; }
}

/* Badge, compact status/label pill on uc- tokens. */
.V_kpdXZsi07BrkW8mkNK {
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-4);
  height: 20px;
  padding: 0 var(--uc-space-8);
  border-radius: var(--uc-radius-pill);
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-xs);
  font-weight: var(--uc-weight-medium);
  line-height: 1;
  white-space: nowrap;
}
.uKPXqu7kkFVS2xBa9AEE { height: 24px; padding: 0 var(--uc-space-12); font-size: var(--uc-text-sm); }

.pCK7hwfFSalZodp5bh2z {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* variants read the --_* tone channels */
.LujE9zA0XWq7MG_G1pvY   { color: var(--_on, var(--uc-brand-on)); background: var(--_fill, var(--uc-brand)); background-image: var(--uc-sheen); box-shadow: var(--uc-shadow-1); }
.VHma2GbfXrG07eyZL1Df    { color: var(--_fg, var(--uc-brand-fg)); background: var(--_soft, var(--uc-brand-soft)); }
.yNf7ITzC0piY9ptVONoj { color: var(--_fg, var(--uc-brand-fg)); background: transparent; box-shadow: inset 0 0 0 1px var(--_border, var(--uc-brand-border)); }

.tUaDdUn93V7X81sgWiv7   { --_fill: var(--uc-brand);   --_on: var(--uc-brand-on);   --_fg: var(--uc-brand-fg);   --_soft: var(--uc-brand-soft);   --_border: var(--uc-brand-border); }
.mL3Idfa5m7lUfaPAG188 { --_fill: var(--uc-success); --_on: var(--uc-success-on); --_fg: var(--uc-success-fg); --_soft: var(--uc-success-soft); --_border: var(--uc-success-border); }
.NGzt4PZr82HJx6zD5oeP  { --_fill: var(--uc-danger);  --_on: var(--uc-danger-on);  --_fg: var(--uc-danger-fg);  --_soft: var(--uc-danger-soft);  --_border: var(--uc-danger-border); }
.VF30PpmNX8Fbve0UeM9T { --_fill: var(--uc-warning); --_on: var(--uc-warning-on); --_fg: var(--uc-warning-fg); --_soft: var(--uc-warning-soft); --_border: var(--uc-warning-border); }
.o39yUK028V2zERFldgoO  { --_fill: var(--uc-accent);  --_on: var(--uc-accent-on);  --_fg: var(--uc-accent-fg);  --_soft: var(--uc-accent-soft);  --_border: var(--uc-accent-border); }
/* Solid neutral uses the inverse pair, which every surface redefines. It was
   --uc-text on --uc-text-inverse, and --uc-text-inverse is #FFF everywhere, so
   on dark surfaces (where --uc-text is light) it drew white on near-white. In
   light the inverse pair is the same #171717 / #FFF it rendered before. */
.yP65shMRVToyLTvM480a { --_fill: var(--uc-inverse-bg); --_on: var(--uc-inverse-fg); --_fg: var(--uc-text-muted); --_soft: var(--uc-surface-sunken); --_border: var(--uc-border-strong); }

/* Chip, a compact 24px token (class, tag, filter) on uc- tokens.
   default: control fill · selected: inverse fill · global: brand dot + tint. */

.dkuafg1vJUVqJAA8prO1 {
  --_bg: var(--uc-surface-control);
  --_fg: var(--uc-text);
  --_bg-hover: var(--uc-accent-glow-press);
  --_fg-hover: var(--uc-text-strong);
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  height: 24px;
  padding: 0 var(--uc-space-6);
  gap: var(--uc-space-4);
  border-radius: var(--uc-radius-sm);
  background: var(--_bg);
  color: var(--_fg);
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-xs);
  font-weight: var(--uc-weight-medium);
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard),
    color var(--uc-dur-fast) var(--uc-ease-standard);
}
.EKxcdtpSMR8k2cwA3cy1 { padding: 0 var(--uc-space-6) 0 var(--uc-space-4); }

/* Hover only reads as "you can press this" on an interactive chip. */
.xOj45s6spWvhZhnGkRuH:hover:not(.MwZDAwgAq4mwAT97YYKm) {
  background: var(--_bg-hover);
  color: var(--_fg-hover);
}

/* Global: a site-wide item. Brand tint + brand text, light or dark to suit
   the surface. Brand-light text is only legible on the dark surfaces; on a
   light one it measured 1.65:1, so light surfaces take a darkened brand
   (about 6:1 on the tint). */
.G1683YigkGsqcE775uVk {
  --_bg: color-mix(in srgb, var(--uc-brand) 16%, transparent);
  --_fg: color-mix(in srgb, var(--uc-brand) 55%, #000000);
  --_bg-hover: color-mix(in srgb, var(--uc-brand) 24%, transparent);
  --_fg-hover: var(--_fg);
}
.uc-chrome .G1683YigkGsqcE775uVk,
.uc-content[data-theme="dark"] .G1683YigkGsqcE775uVk,
.uc-pop-dark .G1683YigkGsqcE775uVk {
  --_fg: var(--uc-brand-lighter, color-mix(in srgb, var(--uc-brand) 62%, #FFFFFF));
}

/* Selected: the one in use. Wins over tone (the dot keeps the brand). */
.wRcViTjkcDISfjPnGCjY {
  --_bg: var(--uc-inverse-bg);
  --_fg: var(--uc-inverse-fg);
  --_bg-hover: var(--uc-inverse-bg);
  --_fg-hover: var(--uc-inverse-fg);
}

.MwZDAwgAq4mwAT97YYKm { opacity: 0.5; }

/* Body: plain span, or a reset button filling the chip. */
.SLS9DjQ9FaEvVca0mwIQ {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-4);
  min-width: 0;
  height: 100%;
  color: inherit;
  font: inherit;
  --uich-ff: inherit;
  line-height: 1;
}
button.SLS9DjQ9FaEvVca0mwIQ { cursor: pointer; }
button.SLS9DjQ9FaEvVca0mwIQ:disabled { cursor: not-allowed; }

/* Keyboard focus on the body rings the whole chip, like DS Button. */
.dkuafg1vJUVqJAA8prO1:has(> .SLS9DjQ9FaEvVca0mwIQ:focus-visible) {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}

/* The body delegates its indicator to the chip; the remove action does not. */
.dkuafg1vJUVqJAA8prO1 > .SLS9DjQ9FaEvVca0mwIQ:focus-visible { outline: none; box-shadow: none; }

.KsPukWp_lS34bP9Bhvkk {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ZdJPimnPYuyPNaJrtdUw {
  display: inline-flex;
  align-items: center;
  flex: none;
}
.ZdJPimnPYuyPNaJrtdUw :where(svg) { width: 12px; height: 12px; }

.N14lWZIJ6G95w0Ct8fAd {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: var(--uc-radius-pill);
  background: var(--uc-brand);
}

/* The x: a 16px hit area, quiet until hovered. */
.AcH3FeQtLa6i3762DulQ {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: var(--uc-radius-xs);
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity var(--uc-dur-fast) var(--uc-ease-standard),
    background var(--uc-dur-fast) var(--uc-ease-standard);
}
.AcH3FeQtLa6i3762DulQ:hover:not(:disabled) {
  opacity: 1;
  background: var(--uc-accent-glow-hover);
}
.AcH3FeQtLa6i3762DulQ:focus-visible {
  opacity: 1;
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}
.AcH3FeQtLa6i3762DulQ:disabled { cursor: not-allowed; }


@media (forced-colors: active) {
  .dkuafg1vJUVqJAA8prO1:has(> .SLS9DjQ9FaEvVca0mwIQ:focus-visible),
  .AcH3FeQtLa6i3762DulQ:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* Select, Radix behavior, uc- token look. */
.e7F3s8Cpe8pIMhvl2kjH {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--uc-space-8);
  height: var(--uc-control-h-md);
  min-width: 180px;
  padding: 0 var(--uc-space-12);
  font-size: var(--uc-text-base);
  color: var(--uc-text-strong);
  background: var(--uc-surface-control);
  background-image: var(--uc-sheen);
  border-radius: var(--uc-radius-md);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle), var(--uc-shadow-raised);
  cursor: pointer;
  transition: box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
}
.e7F3s8Cpe8pIMhvl2kjH:hover:not(:focus-visible):not([data-state="open"]) { box-shadow: inset 0 0 0 1px var(--uc-border-hover, var(--uc-text-subtle)), var(--uc-shadow-raised); }
/* Open is a pressed state, not keyboard focus. Do not leave a halo around
   a select merely because its list is open. Keyboard focus remains explicit. */
.e7F3s8Cpe8pIMhvl2kjH[data-state="open"] {
  box-shadow: inset 0 0 0 1px var(--uc-border-hover), var(--uc-shadow-raised);
}
.e7F3s8Cpe8pIMhvl2kjH:focus:not(:focus-visible) { outline: none; }
.e7F3s8Cpe8pIMhvl2kjH:focus-visible {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}
.e7F3s8Cpe8pIMhvl2kjH[data-placeholder] { color: var(--uc-text-subtle); }
.e7F3s8Cpe8pIMhvl2kjH:disabled { opacity: 0.5; cursor: not-allowed; }
/* The chevron is the one DS icon that sits inside a WRAPPER (Radix renders
   SelectPrimitive.Icon as a <span>), so the svg inside it is inline and sits on
   that span's text baseline, which leaves descender space below it and pushes
   the glyph above the trigger's centre. `display: block` collapses that line box. */
.RXwx8sg3STq8XWcaRIiM { color: var(--uc-text-muted); flex: none; }
.RXwx8sg3STq8XWcaRIiM svg { display: block; }

/* trigger sizes (md is the base above) */
.A7XnIZMI5obBSBNATLZT { height: var(--uc-control-h-sm); font-size: var(--uc-text-sm); padding: 0 var(--uc-space-8); }
.O7fvjNbDZA9xW0hUSAKe { height: var(--uc-control-h-lg); font-size: var(--uc-text-md); padding: 0 var(--uc-space-16); }

.BZSeASQ2IO83EAmmFtBD {
  min-width: var(--radix-select-trigger-width);
  background: var(--uc-surface-overlay);
  border-radius: var(--uc-radius-md);
  /* Border + shadow so the list reads as its own floating layer and never
     blends into a same-tone (dark) panel behind it. */
  border: 1px solid var(--uc-border);
  box-shadow: var(--uc-shadow-4);
  padding: var(--uc-space-4);
  z-index: var(--uc-z-dropdown);
  overflow: hidden;
  /* Never taller than the room Radix measured beside the trigger (minus the
     collision padding), so a long list scrolls inside instead of running off
     the screen. The viewport is the flex child Radix scrolls. */
  max-height: var(--radix-select-content-available-height);
  animation: cdjUAFtyJ3yGS3rj5qO1 var(--uc-dur-enter) var(--uc-ease-emphasized);
}
.umOYcecNSay6i1GVC_Oi { position: relative; }
.w4hKpheBcjRW4WbnSQPQ {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  opacity: 0;
  border-radius: var(--uc-radius-sm);
  /* The HOVER wash, not a control fill — see --uc-surface-hover in tokens.css. */
  background: var(--uc-surface-hover, var(--uc-surface-control));
  /* transform is animated via the Web Animations API (see useSlidingHighlight);
     only width/height use a CSS transition. */
  transition: width var(--uc-dur-base) var(--uc-ease-emphasized),
    height var(--uc-dur-base) var(--uc-ease-emphasized);
  pointer-events: none;
  z-index: 0;
}
._veB6PGMKZWelgCoOwZH {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  /* min-height, not height: an option with a description line (chat scope
     "Widget / Page") was clipped to one row and overlapped the next. */
  min-height: var(--uc-control-h-md);
  padding: var(--uc-space-4, 4px) var(--uc-space-12) var(--uc-space-4, 4px) var(--uc-space-32);
  border-radius: var(--uc-radius-sm);
  font-size: var(--uc-text-base);
  color: var(--uc-text);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  position: relative;
  z-index: 1;
}
.lAdBRQUB75_wlMPT7wpF { min-height: var(--uc-control-h-sm); font-size: var(--uc-text-sm); }
.FRL9ZRUfTQvUhgXYhFjn { min-height: var(--uc-control-h-lg); font-size: var(--uc-text-md); }
._veB6PGMKZWelgCoOwZH[data-highlighted] { color: var(--uc-text-strong); }
._veB6PGMKZWelgCoOwZH[data-disabled] { color: var(--uc-text-subtle); pointer-events: none; }
.K4s2DAYWscSzIFHHt98g { position: absolute; left: var(--uc-space-12); display: inline-flex; color: var(--uc-text-strong); }

@keyframes cdjUAFtyJ3yGS3rj5qO1 { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Menu, Radix dropdown-menu behavior, uc- token look. Always-dark popover
   with a sliding highlight that follows the active item. */
.s3BFP6K6LYzVFAhoSOjx {
  position: relative;
  min-width: 200px;
  background: var(--uc-surface-overlay);
  border-radius: var(--uc-radius-md);
  /* Border + shadow so the popover reads as its own floating layer and never
     blends into a same-tone (dark) panel behind it. */
  border: 1px solid var(--uc-border);
  box-shadow: var(--uc-shadow-4);
  padding: var(--uc-space-4);
  z-index: var(--uc-z-dropdown);
  animation: kqSucFY5pNg8mWWYTGqA var(--uc-dur-enter) var(--uc-ease-emphasized);
}
.SwLQKRnMsenTHHPtphsk {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  opacity: 0;
  border-radius: var(--uc-radius-sm);
  /* The HOVER wash, not a control fill — see --uc-surface-hover in tokens.css. */
  background: var(--uc-surface-hover, var(--uc-surface-control));
  /* transform is animated via the Web Animations API (see useSlidingHighlight);
     only width/height use a CSS transition. */
  transition: width var(--uc-dur-base) var(--uc-ease-emphasized),
    height var(--uc-dur-base) var(--uc-ease-emphasized);
  pointer-events: none;
  z-index: 0;
}
.tPTLiYfuDUhQ80L7yDnk {
  all: unset;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--uc-space-8);
  height: var(--uc-control-h-md);
  padding: 0 var(--uc-space-12);
  border-radius: var(--uc-radius-sm);
  font-size: var(--uc-text-base);
  color: var(--uc-text);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.bBCXPgA12Rh98ObefXMJ { height: var(--uc-control-h-sm); font-size: var(--uc-text-sm); padding: 0 var(--uc-space-8); }
.UdzaD6XmSAvIuynP2LOO { height: var(--uc-control-h-lg); font-size: var(--uc-text-md); padding: 0 var(--uc-space-16); }
.tPTLiYfuDUhQ80L7yDnk[data-highlighted] { color: var(--uc-text-strong); }
.tPTLiYfuDUhQ80L7yDnk[data-disabled] { color: var(--uc-text-subtle); pointer-events: none; }
.I3TPCu8NiLZDfkHiNUct { color: var(--uc-danger-fg); }
.I3TPCu8NiLZDfkHiNUct[data-highlighted] { color: var(--uc-danger-fg); }
.QBoqQMo13ZJMyLxqxRts { margin-right: auto; font-size: var(--uc-text-xs); color: var(--uc-text-subtle); font-family: var(--uc-font-mono); --uich-ff: var(--uc-font-mono); }
.YEax7LE1yCq7o0eawNUV { padding: var(--uc-space-8) var(--uc-space-12) var(--uc-space-4); font-size: var(--uc-text-xs); font-weight: var(--uc-weight-medium); letter-spacing: var(--uc-tracking-wide); text-transform: uppercase; color: var(--uc-text-subtle); }
.bcfw649Ew7czzqqkT_G8 { height: 1px; background: var(--uc-border-subtle); margin: var(--uc-space-4) 0; }

@keyframes kqSucFY5pNg8mWWYTGqA { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }

/* Breadcrumb, a one-line path on uc- tokens. Folds the middle into "…". */

.fGmSJ5HIYlspfdvWSljx {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-xs);
  line-height: 16px;
}

.pt513ihn0bW4UIaIhPq3 {
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tIIwE00AlnH6G1H0ScDD {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-width: 0;
  margin: 0;
}
/* The outermost level gives way (truncates) before anything else. */
.xiBUVESeJuZt4uizOZtR { flex: 0 1 auto; }
.fIenfnGCBeClCczjIY_U { flex: none; }

.RLvwIRYHgDfAMUuukUPA {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 0 var(--uc-space-2);
  color: var(--uc-text-subtle);
}

.YrBwlMYp6KZPkbSefsXF {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-2);
  min-width: 0;
  max-width: 100%;
  padding: var(--uc-space-2) var(--uc-space-4);
  border-radius: var(--uc-radius-sm);
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-xs);
  font-weight: var(--uc-weight-regular);
  line-height: 16px;
  color: var(--uc-text-muted);
  white-space: nowrap;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard),
    color var(--uc-dur-fast) var(--uc-ease-standard);
}
button.YrBwlMYp6KZPkbSefsXF { cursor: pointer; }
button.YrBwlMYp6KZPkbSefsXF:hover:not(:disabled),
button.YrBwlMYp6KZPkbSefsXF[data-state="open"] {
  background: var(--uc-surface-control);
  color: var(--uc-text-strong);
}
button.YrBwlMYp6KZPkbSefsXF:disabled { cursor: default; }
button.YrBwlMYp6KZPkbSefsXF:focus-visible {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}
.YrBwlMYp6KZPkbSefsXF :where(svg) { flex: none; }

.rvpWB8OQLlL07rTK4eAW {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wjuYRop3OFfK200gdz7m {
  color: var(--uc-text-strong);
  font-weight: var(--uc-weight-medium);
}

.wsj7Z__MfXcwvAsPIFyz { padding: var(--uc-space-2) var(--uc-space-4); }

.TAE5h8Zh4DKgpjaWZBCp {
  display: inline-flex;
  align-items: center;
  flex: none;
}

/* Off-screen, out-of-flow copy used only for measuring. */
.PthUA855WhHTBupEyLYa {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
}
.PthUA855WhHTBupEyLYa > * { flex: none; }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  button.YrBwlMYp6KZPkbSefsXF:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* AgentThinking, pixel-glyph + rotating shimmer label on uc- tokens.
   Monochrome by default; `.brand` lights the glyph in brand orange. */

.Ruxou27KB2ffUChUVK9l {
  --_cell: 4px;
  --_gap: 2px;
  --_fs: var(--uc-text-base);
  --_glyph: var(--uc-text-muted);
  --_ink: var(--uc-text-muted);
  --_hi: var(--uc-text-strong);
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-10);
  min-width: 0;
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--_fs);
  font-weight: var(--uc-weight-medium);
  line-height: var(--uc-leading-snug);
  color: var(--_ink);
}
.VFbDU55AXu0UbJu2pt8g { --_cell: 3px; --_gap: 2px; --_fs: var(--uc-text-sm); gap: var(--uc-space-8); }
.JZHgZd3JBkPX2d7FAGKX { --_cell: 4px; --_gap: 2px; --_fs: var(--uc-text-base); }
.oGZvaE8n9VHVQJPDC01g { --_cell: 5px; --_gap: 3px; --_fs: var(--uc-text-md); gap: var(--uc-space-12); }

.jmXOk6lWhwNtl3iP49d0 { --_glyph: var(--uc-brand); }

/* ---- 3×3 pixel glyph ------------------------------------------------------ */
.UeduOQiV4A1t8ocLEW4k {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, var(--_cell));
  grid-auto-rows: var(--_cell);
  gap: var(--_gap);
}
.n2Npnap_KixC1WpYyRrq {
  border-radius: 1px;
  background: var(--_glyph);
  opacity: 0.14;
  animation: ENK02LXEiwJEdCIqqDAk 1.2s var(--uc-ease-standard) infinite;
  animation-delay: calc(var(--_d, 0) * 120ms);
}
@keyframes ENK02LXEiwJEdCIqqDAk {
  0%, 100% { opacity: 0.14; }
  35%      { opacity: 1; }
  60%      { opacity: 0.4; }
}

/* ---- Label ---------------------------------------------------------------- */
.VXY62ALYZACpx7ZixgvU {
  position: relative;
  display: inline-flex;
  min-width: 0;
  overflow: hidden;
}
.EGw2q3zOpCAzBBAay63j {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: oQbxKVPdIyuH3s62gi9x var(--uc-dur-slow) var(--uc-ease-emphasized) both;
}
@keyframes oQbxKVPdIyuH3s62gi9x {
  from { opacity: 0; transform: translateY(6px); filter: blur(3px); }
  to   { opacity: 1; transform: none;            filter: blur(0); }
}

/* Light sweep: a narrow highlight band slides across muted text. */
.UnnGImZUa828Da8pO1RA {
  color: transparent;
  background-image: linear-gradient(
    -100deg,
    var(--_ink) 0%,
    var(--_ink) 38%,
    var(--_hi) 50%,
    var(--_ink) 62%,
    var(--_ink) 100%
  );
  background-size: 250% 100%;
  background-position: 0% 0;
  -webkit-background-clip: text;
  background-clip: text;
  animation:
    oQbxKVPdIyuH3s62gi9x var(--uc-dur-slow) var(--uc-ease-emphasized) both,
    rKB3qYwKdxGzfOoqF5_o 2.2s linear infinite;
}
@keyframes rKB3qYwKdxGzfOoqF5_o {
  from { background-position: 0% 0; }
  to   { background-position: 250% 0; }
}

/* Reduced motion: static glyph (diagonal pattern), no sweep, no slide.
   `animation: none` (not a 0.01ms duration) so infinite loops don't flicker. */
@media (prefers-reduced-motion: reduce) {
  .n2Npnap_KixC1WpYyRrq, .EGw2q3zOpCAzBBAay63j, .UnnGImZUa828Da8pO1RA { animation: none !important; }
  .n2Npnap_KixC1WpYyRrq { opacity: 0.35; }
  .n2Npnap_KixC1WpYyRrq:nth-child(1), .n2Npnap_KixC1WpYyRrq:nth-child(5), .n2Npnap_KixC1WpYyRrq:nth-child(9) { opacity: 1; }
  .UnnGImZUa828Da8pO1RA { color: var(--_ink); background: none; }
}

/* AgentProgress, collapsible AI task list on uc- tokens.
   Chrome is monochrome; brand orange is reserved for the progress ring and the
   running spinner. Done / failed use the success / danger families. */

.VYgaFAoqHM3fvfC0MqmY {
  --_fs: var(--uc-text-base);
  --_fs-detail: var(--uc-text-xs);
  --_icon: 16px;
  --_row: 28px;
  --_pad: var(--uc-space-12);
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  padding: var(--uc-space-8) var(--_pad);
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--_fs);
  line-height: var(--uc-leading-snug);
  color: var(--uc-text);
  background: var(--uc-surface-raised);
  border-radius: var(--uc-card-radius, var(--uc-radius-lg));
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
}
.Tq2txU5So_VlPiKtW0h3 { --_fs: var(--uc-text-sm); --_fs-detail: var(--uc-text-2xs); --_icon: 14px; --_row: 24px; --_pad: var(--uc-space-10); }
.URmmVYEC5OTcMd_Gv_1H { --_fs: var(--uc-text-base); }

/* ---- Header --------------------------------------------------------------- */
.Cj_0umszAys8WcFJ0cf6 {
  display: flex;
  align-items: center;
  gap: var(--uc-space-8);
  min-height: var(--_row);
}
.a8izpO6Wfz31RRqmPHZi {
  flex: none;
  width: var(--_icon);
  height: var(--_icon);
  transform: rotate(90deg);
}
.a8izpO6Wfz31RRqmPHZi.aNJ5vl9zOqZafCcQRTeF { animation: cLfjTCMZVuKa2G49eilh 1.2s linear infinite; }
.iCNmw2Vz5E1_3VYz2Zrr { fill: none; stroke: var(--uc-border); stroke-width: 2.25; }
.PhTSTBA2P_q9bjwzx9Co {
  fill: none;
  stroke: var(--uc-brand);
  stroke-width: 2.25;
  stroke-linecap: round;
  transition: stroke-dasharray var(--uc-dur-slow) var(--uc-ease-emphasized);
}
.MjcQR6cz_38Cj1Dw93_s { color: var(--uc-success-fg); }
.vVTeHnjnh7tWQGbo7xpk { flex: 1; min-width: 0; display: flex; overflow: hidden; }
.q89u_ytvNrsZtJlYTErM {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--uc-text-muted);
  font-weight: var(--uc-weight-medium);
  animation: u7F0ywrl_p71XvtGyTGj var(--uc-dur-base) var(--uc-ease-emphasized) both;
}
@keyframes u7F0ywrl_p71XvtGyTGj {
  from { opacity: 0; transform: translateY(4px); filter: blur(2px); }
  to   { opacity: 1; transform: none;            filter: blur(0); }
}

.Ey0yXRTBQTLyy5SBSzTD {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--uc-control-h-sm);
  height: var(--uc-control-h-sm);
  margin-left: calc(var(--uc-space-4) * -1);
  padding: 0;
  border: none;
  border-radius: var(--uc-radius-sm);
  background: transparent;
  color: var(--uc-text-muted);
  cursor: pointer;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard),
    color var(--uc-dur-fast) var(--uc-ease-standard);
}
.Ey0yXRTBQTLyy5SBSzTD:hover { background: var(--uc-brand-glow-hover); color: var(--uc-text-strong); }
.Ey0yXRTBQTLyy5SBSzTD:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.HVCoF1pwO_OtMb9h4Pzw { transition: transform var(--uc-dur-base) var(--uc-ease-emphasized); transform: rotate(90deg); }
.Mtp7TzZZm4KZ4eXPIuA5 .HVCoF1pwO_OtMb9h4Pzw { transform: rotate(0deg); }

/* ---- Collapsible body (grid-rows 0fr → 1fr, no height measuring) --------- */
.taCmXnplSvoTmAahZcli {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows var(--uc-dur-slow) var(--uc-ease-emphasized),
    opacity var(--uc-dur-base) var(--uc-ease-standard),
    visibility 0s linear var(--uc-dur-slow);
}
.Mtp7TzZZm4KZ4eXPIuA5 .taCmXnplSvoTmAahZcli {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition: grid-template-rows var(--uc-dur-slow) var(--uc-ease-emphasized),
    opacity var(--uc-dur-base) var(--uc-ease-standard),
    visibility 0s;
}
.rffL9A1I8HNSQfoJj22L { min-height: 0; overflow: hidden; }

.VYgaFAoqHM3fvfC0MqmY .OtfqzXuHjBci7eGWjX70 {
  list-style: none;
  margin: 0;
  padding: var(--uc-space-8) 0 var(--uc-space-2);
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-8);
}

/* ---- Step row ------------------------------------------------------------- */
.SK6elGn5lBp9jjrQ_fb1 {
  display: flex;
  align-items: flex-start;
  gap: var(--uc-space-8);
  min-height: var(--_row);
  padding: calc((var(--_row) - var(--_icon)) / 2) 0;
  animation: MEVElb14VFvg87yd_h3V var(--uc-dur-enter) var(--uc-ease-emphasized) both;
}
@keyframes MEVElb14VFvg87yd_h3V {
  from { opacity: 0; transform: translateY(-4px); filter: blur(4px); }
  to   { opacity: 1; transform: none;             filter: blur(0); }
}

._2RHZiquFACCZe_VnXz5 {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--_icon);
  height: var(--_icon);
  animation: jMgCwYdRe71JJo1YmeHm var(--uc-dur-base) var(--uc-ease-emphasized) both;
}
._2RHZiquFACCZe_VnXz5 svg { display: block; }
@keyframes jMgCwYdRe71JJo1YmeHm {
  from { opacity: 0; transform: scale(0.7) rotate(15deg); }
  to   { opacity: 1; transform: none; }
}

.dDRK7Ec6F9VwFGZylusx {
  width: calc(var(--_icon) - 4px);
  height: calc(var(--_icon) - 4px);
  border-radius: var(--uc-radius-pill);
  box-shadow: inset 0 0 0 1.5px var(--uc-border-strong);
}
.W59ZJy97gG2m7bcjy8V9 {
  width: calc(var(--_icon) - 3px);
  height: calc(var(--_icon) - 3px);
  border-radius: var(--uc-radius-pill);
  border: 1.75px solid var(--uc-border);
  border-top-color: var(--uc-brand);
  border-left-color: var(--uc-brand);
  animation: cLfjTCMZVuKa2G49eilh 0.8s linear infinite;
}
@keyframes cLfjTCMZVuKa2G49eilh { to { transform: rotate(-360deg); } }

.XFpovdiu3bEgePu0I4Z9 { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.j_OIjg6D38gDYpeDmSRq { min-width: 0; overflow-wrap: anywhere; transition: color var(--uc-dur-base) var(--uc-ease-standard); }
.g4L6QzDFcC7MZScKix65 {
  font-size: var(--_fs-detail);
  color: var(--uc-text-subtle);
  overflow-wrap: anywhere;
}

.QxoyCzW1O9e6tdMDA9qF .j_OIjg6D38gDYpeDmSRq { color: var(--uc-text-muted); }
.wsOFOFmVKHOjCkJt_w15 .j_OIjg6D38gDYpeDmSRq { color: var(--uc-text-strong); font-weight: var(--uc-weight-medium); }
.pJzflIII9LIPni4QyYRI ._2RHZiquFACCZe_VnXz5         { color: var(--uc-success-fg); }
.pJzflIII9LIPni4QyYRI .j_OIjg6D38gDYpeDmSRq    { color: var(--uc-text-muted); }
.qAd3qOzEMHSz_39gC0iD ._2RHZiquFACCZe_VnXz5       { color: var(--uc-danger-fg); }
.qAd3qOzEMHSz_39gC0iD .j_OIjg6D38gDYpeDmSRq  { color: var(--uc-text-strong); }
.qAd3qOzEMHSz_39gC0iD .g4L6QzDFcC7MZScKix65     { color: var(--uc-danger-fg); }

/* ---- Running text --------------------------------------------------------- */
.tMTiQ9Lk0lSUQGfjfMtJ {
  color: var(--uc-text-strong) !important;
}
.q89u_ytvNrsZtJlYTErM.tMTiQ9Lk0lSUQGfjfMtJ {
  animation: u7F0ywrl_p71XvtGyTGj var(--uc-dur-base) var(--uc-ease-emphasized) both;
}

.vLCefXaCrRd1K0_Ub_8u {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reduced motion: no loops (animation:none, not 0.01ms, so they don't flicker),
   spinner becomes a static brand quarter-ring, collapse is instant. */
@media (prefers-reduced-motion: reduce) {
  .SK6elGn5lBp9jjrQ_fb1, ._2RHZiquFACCZe_VnXz5, .q89u_ytvNrsZtJlYTErM, .W59ZJy97gG2m7bcjy8V9, .a8izpO6Wfz31RRqmPHZi.aNJ5vl9zOqZafCcQRTeF { animation: none !important; }
  .taCmXnplSvoTmAahZcli, .Mtp7TzZZm4KZ4eXPIuA5 .taCmXnplSvoTmAahZcli, .HVCoF1pwO_OtMb9h4Pzw, .PhTSTBA2P_q9bjwzx9Co { transition: none; }
}


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .Ey0yXRTBQTLyy5SBSzTD:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* The light turns by animating the gradient's ANGLE, not the element: rotating
   the element spun the whole rectangle around its centre, so on a wide composer
   the outline swung off the box. Browsers without @property show a still light. */
@property --uc-loader-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.SwLkaegxMxOqXA8ts7t2 { --_radius: var(--uc-radius-xl); --_speed: 4s; position: relative; isolation: isolate; border-radius: var(--_radius); font-family: var(--uc-font-sans); --uich-ff: var(--uc-font-sans); }
.m3CqgIhWsihpUA_bhR9j { position: relative; z-index: 1; border-radius: inherit; }
/* Border light ONLY — no bloom outside the box (Jay, 2026-09-29): the light is
   masked to a 2px band on the edge and nothing paints beyond it. */
/* Literal mask colour: a var() in the `mask` shorthand is lost when the shadow root copies this CSS as text. */
.nO2G50fv0tAsRx59gLjB { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity var(--uc-dur-slow) var(--uc-ease-standard); z-index: 2; padding: 2px; background: conic-gradient(from var(--uc-loader-angle), transparent 0deg 205deg, var(--uc-brand-glow-hover) 225deg, var(--uc-brand) 275deg, var(--uc-brand-on) 288deg, var(--uc-brand) 298deg, transparent 322deg); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.WE1BzjxfZpSMBw3chEyI .nO2G50fv0tAsRx59gLjB { opacity: 1; animation: gFuY2iD0P0P2NTMIplz2 var(--_speed) linear infinite; }
@keyframes gFuY2iD0P0P2NTMIplz2 { to { --uc-loader-angle: 360deg; } }

/* Ring: overlays a box that already exists. Sits over the parent's border
   (inset by the measured border width) with the parent's own outer radius. */
.QFDuwsFZRgaJUo5pXokK { --_speed: 4s; --_radius: 0px; --_edge: 0px; position: absolute; inset: calc(var(--_edge) * -1); z-index: 3; border-radius: var(--_radius); pointer-events: none; }

@media (prefers-reduced-motion: reduce) { .nO2G50fv0tAsRx59gLjB { animation: none !important; transition: none; } }

/* ComposerAttachments, file / image tiles above the prompt, uc- tokens only.
   Surface-agnostic: reads semantic tokens so it works on .uc-content (light)
   and .uc-chrome / dark content alike. Brand orange = upload progress only. */

.XHbXFVM8mAj9MvyFKMpn {
  --_tile-h: 52px;
  --_icon-box: 36px;
  --_name-w: 148px;
  list-style: none;
  margin: 0;
  display: flex;
  gap: var(--uc-space-8);
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
}
/* Keep the attachment edge and the remove button's focus outline clear of the
   horizontally scrolling viewport. Doubled class beats the host list reset. */
.XHbXFVM8mAj9MvyFKMpn.XHbXFVM8mAj9MvyFKMpn {
  padding: var(--uc-space-10) var(--uc-space-2) var(--uc-space-2) var(--uc-space-10);
}
.XHbXFVM8mAj9MvyFKMpn::-webkit-scrollbar { display: none; }
.BpIVdgTZpiEQzqgKq3cG { --_tile-h: 44px; --_icon-box: 30px; --_name-w: 120px; }

/* ---- Tile ----------------------------------------------------------------- */
.zsawzVlkQXeF_UU8Muf7 {
  position: relative;
  flex: none;
  height: var(--_tile-h);
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-raised);
  box-shadow: inset 0 0 0 1px var(--uc-border);
  animation: a64ECf2Bms1O153dypC_ var(--uc-dur-slow) var(--uc-ease-emphasized) both;
  animation-delay: var(--_delay, 0ms);
  transition: box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
}
.zsawzVlkQXeF_UU8Muf7:hover { box-shadow: inset 0 0 0 1px var(--uc-border-strong); }
.dFuUUiw6mnWk1kDCAWz7 { width: var(--_tile-h); }

.mfBCoPNjKCk_5ETidUxg {
  animation: lqF7ND1uivmZJWlMAqql var(--uc-dur-base) var(--uc-ease-exit) both;
  animation-delay: 0ms;
  pointer-events: none;
}

@keyframes a64ECf2Bms1O153dypC_ {
  from { opacity: 0; transform: translateY(6px) scale(0.92); filter: blur(2px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes lqF7ND1uivmZJWlMAqql {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: scale(0.88); }
}

/* ---- Body (button when clickable, plain box otherwise) --------------------- */
.KAi8AUq4Hf5OD4nrKEz1 {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: var(--uc-space-8);
  height: 100%;
  width: 100%;
  padding: 0 var(--uc-space-8) 0 var(--uc-space-12);
  border-radius: inherit;
  overflow: hidden;
  position: relative;
}
.dFuUUiw6mnWk1kDCAWz7 .KAi8AUq4Hf5OD4nrKEz1 { padding: 0; }
.sLmXh0jjsJYpM2kX1e3i { cursor: pointer; }
.sLmXh0jjsJYpM2kX1e3i:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }

.V1fs3YomWrX1BqqTURwf {
  flex: none;
  width: var(--_icon-box);
  height: var(--_icon-box);
  display: grid;
  place-items: center;
  border-radius: var(--uc-radius-sm);
  background: var(--uc-surface-sunken);
  color: var(--uc-text-muted);
}
.V1fs3YomWrX1BqqTURwf svg { display: block; }

.h2PjKt5PNjtK1JlHtpga {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-2);
  min-width: 0;
  max-width: var(--_name-w);
}
.I3GYPlDdwHQ4z_3OkzkK {
  font-size: var(--uc-text-sm);
  font-weight: var(--uc-weight-medium);
  line-height: var(--uc-leading-tight);
  color: var(--uc-text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ey7ePQueHRHD3gdFyvhA {
  font-size: var(--uc-text-xs);
  line-height: var(--uc-leading-tight);
  color: var(--uc-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.BpIVdgTZpiEQzqgKq3cG .I3GYPlDdwHQ4z_3OkzkK { font-size: var(--uc-text-xs); }
.BpIVdgTZpiEQzqgKq3cG .ey7ePQueHRHD3gdFyvhA { font-size: var(--uc-text-2xs); }

/* ---- Image tile ----------------------------------------------------------- */
.qjsnsI1oRybcPnA1AeXd {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: inherit;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.dFuUUiw6mnWk1kDCAWz7::after {
  /* hairline drawn OVER the photo so light images keep an edge */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--uc-border);
  pointer-events: none;
}
.YsISbRyS56pL9rh0uDMA {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.48);
  color: var(--uc-text-inverse);
  font-size: var(--uc-text-xs);
  font-weight: var(--uc-weight-medium);
  font-variant-numeric: tabular-nums;
}

/* ---- Upload progress (brand = progress) ----------------------------------- */
.nHM00u9Rnv9OgvIWccHU {
  position: absolute;
  right: var(--uc-space-8);
  left: var(--uc-space-8);
  bottom: var(--uc-space-4);
  height: 2px;
  border-radius: var(--uc-radius-pill);
  background: var(--uc-border);
  overflow: hidden;
  pointer-events: none;
}
.dFuUUiw6mnWk1kDCAWz7 .nHM00u9Rnv9OgvIWccHU { right: var(--uc-space-4); left: var(--uc-space-4); background: rgba(255, 255, 255, 0.28); }
.RjSHr05QilO5RlIScuOQ {
  display: block;
  height: 100%;
  background: var(--uc-brand);
  transform-origin: right center;
  transition: transform var(--uc-dur-base) var(--uc-ease-standard);
}

/* ---- Error ---------------------------------------------------------------- */
.CnzVKC5hs_OgPvNdGHh6 { box-shadow: inset 0 0 0 1px var(--uc-danger-border); }
.CnzVKC5hs_OgPvNdGHh6:hover { box-shadow: inset 0 0 0 1px var(--uc-danger); }
.CnzVKC5hs_OgPvNdGHh6 .V1fs3YomWrX1BqqTURwf { background: var(--uc-danger-soft); color: var(--uc-danger-fg); }
.CnzVKC5hs_OgPvNdGHh6 .ey7ePQueHRHD3gdFyvhA { color: var(--uc-danger-fg); }
.CnzVKC5hs_OgPvNdGHh6.dFuUUiw6mnWk1kDCAWz7 .YsISbRyS56pL9rh0uDMA { background: rgba(0, 0, 0, 0.56); color: var(--uc-danger); }

/* ---- Remove × ------------------------------------------------------------- */
.pxdWVmbs6ykhk1YC6d1A {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: var(--uc-space-4);
  left: var(--uc-space-4);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: var(--uc-radius-pill);
  background: var(--uc-inverse-bg);
  color: var(--uc-inverse-fg);
  box-shadow: 0 0 0 2px var(--uc-surface-base);
  cursor: pointer;
  opacity: 1;
  transform: none;
  transition: opacity var(--uc-dur-fast) var(--uc-ease-standard),
    transform var(--uc-dur-fast) var(--uc-ease-standard);
}
.pxdWVmbs6ykhk1YC6d1A svg { display: block; }
.pxdWVmbs6ykhk1YC6d1A:hover { transform: scale(1.06); background-image: linear-gradient(rgba(128, 128, 128, 0.2), rgba(128, 128, 128, 0.2)); }
/* The remove control is always visible and gets a clear keyboard focus ring. */
.pxdWVmbs6ykhk1YC6d1A:focus,
.pxdWVmbs6ykhk1YC6d1A:focus-visible { opacity: 1; transform: none; transition: none; }
.pxdWVmbs6ykhk1YC6d1A:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .sLmXh0jjsJYpM2kX1e3i:focus-visible,
  .pxdWVmbs6ykhk1YC6d1A:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

.dq_fOJZpQP3V1PmUbHS6 { width: 100%; min-width: 0; padding: var(--uc-space-16); border: 1px solid var(--uc-border); border-radius: var(--uc-radius-lg); background: var(--uc-surface-raised); color: var(--uc-text); font: var(--uc-text-sm)/var(--uc-leading-normal) var(--uc-font-sans); --uich-ff: var(--uc-font-sans); }
.sS8FFn1Sz_oHQAFe5hwR { display: flex; align-items: center; gap: var(--uc-space-8); width: 100%; padding: 0; border: 0; background: transparent; color: var(--uc-text-strong); font: inherit; --uich-ff: inherit; text-align: right; cursor: pointer; }
.sS8FFn1Sz_oHQAFe5hwR strong { margin-right: auto; font-weight: var(--uc-weight-medium); white-space: nowrap; }
.sS8FFn1Sz_oHQAFe5hwR:focus-visible, .P4Sv8mBSTJ9BN3FrPqmq summary:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; border-radius: var(--uc-radius-sm); }
.BeaqPihgHPFqX0soev_8 { color: var(--uc-text-muted); transition: transform var(--uc-dur-fast); }
.kig_gfgNFXyxObkvtssV { transform: rotate(-180deg); }
.tLHnbZAvjYG9mz8FQOKP { color: var(--uc-text-muted); font-weight: var(--uc-weight-regular); }
.OOM2aReNFd3ii5TQBheO, .txLndy2oRQ4UL3wVNkr8 { display: flex; width: 100%; height: 8px; margin-top: var(--uc-space-10); overflow: hidden; border-radius: var(--uc-radius-pill); background: var(--uc-surface-sunken); }
.oNcXf0K_cqdHpgpkiR3A { min-width: 0; height: 100%; background: var(--uc-brand); }
.oNcXf0K_cqdHpgpkiR3A[data-tone="1"] { background: var(--uc-text-strong); }
.oNcXf0K_cqdHpgpkiR3A[data-tone="2"] { background: var(--uc-text-muted); }
.oNcXf0K_cqdHpgpkiR3A[data-tone="3"] { background: var(--uc-border-strong); }
.Gto0LFm4TYjpMKwSxOC_ { display: grid; gap: var(--uc-space-2); margin-top: var(--uc-space-12); padding-top: var(--uc-space-12); border-top: 1px solid var(--uc-border-subtle); }
.CXoX22ucIuEMeJq9jxuZ { display: grid; grid-template-columns: 1fr auto 52px; gap: var(--uc-space-12); align-items: center; min-height: 26px; }
.CXoX22ucIuEMeJq9jxuZ > :last-child { text-align: left; }
.jBaoVynA3TFyqj6rRvSe { display: inline-flex; align-items: center; gap: var(--uc-space-8); min-width: 0; }
.RWsQUMmv1NsPzNbJBvic { width: 7px; height: 7px; flex: none; border-radius: var(--uc-radius-pill); background: var(--uc-brand); }
.RWsQUMmv1NsPzNbJBvic[data-tone="1"] { background: var(--uc-text-strong); }
.RWsQUMmv1NsPzNbJBvic[data-tone="2"] { background: var(--uc-text-muted); }
.RWsQUMmv1NsPzNbJBvic[data-tone="3"], .RWsQUMmv1NsPzNbJBvic[data-deferred] { background: var(--uc-border-strong); }
.P4Sv8mBSTJ9BN3FrPqmq { border-top: 1px solid var(--uc-border-subtle); padding-top: var(--uc-space-8); }
.P4Sv8mBSTJ9BN3FrPqmq summary { cursor: pointer; color: var(--uc-text-strong); }
.P4Sv8mBSTJ9BN3FrPqmq summary span { float: left; color: var(--uc-text-muted); }
.e0jQt6MFNB9am0l0o2Co { display: flex; justify-content: space-between; padding: var(--uc-space-6) var(--uc-space-20) var(--uc-space-2) 0; color: var(--uc-text-muted); }
.kIK0qk3awsLrpfHfk7SK { display: grid; gap: var(--uc-space-12); margin-top: var(--uc-space-16); padding-top: var(--uc-space-16); border-top: 1px solid var(--uc-border); }
.GawNuQmGYmHdq1ay2Xhu { color: var(--uc-text-strong); font-weight: var(--uc-weight-medium); }
.bKDP6ocaVNyJ3iuxGX2u { display: flex; gap: var(--uc-space-6); align-items: baseline; }
.bKDP6ocaVNyJ3iuxGX2u .tLHnbZAvjYG9mz8FQOKP { margin-right: auto; font-size: var(--uc-text-xs); text-align: left; }
.bKDP6ocaVNyJ3iuxGX2u strong { font-weight: var(--uc-weight-medium); min-width: 32px; text-align: left; }
.txLndy2oRQ4UL3wVNkr8 { height: 5px; margin-top: var(--uc-space-6); }
.txLndy2oRQ4UL3wVNkr8 span { height: 100%; border-radius: inherit; background: var(--uc-brand); }
@media (max-width: 420px) { .bKDP6ocaVNyJ3iuxGX2u { flex-wrap: wrap; } .bKDP6ocaVNyJ3iuxGX2u .tLHnbZAvjYG9mz8FQOKP { width: 100%; order: 3; margin: 0; text-align: right; } }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .sS8FFn1Sz_oHQAFe5hwR:focus-visible, .P4Sv8mBSTJ9BN3FrPqmq summary:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

.z9I6_0fBleFO8KpAD1N_ { width: 100%; max-width: 560px; padding: var(--uc-space-20); border: 1px solid var(--uc-border); border-radius: var(--uc-radius-xl); background: var(--uc-surface-raised); color: var(--uc-text); font: var(--uc-text-base)/var(--uc-leading-normal) var(--uc-font-sans); --uich-ff: var(--uc-font-sans); }
.gIVJdx7SMgdyEIVfNdB8 { position: relative; margin-bottom: var(--uc-space-16); }
.Hvg74HVFMvznYyeahb5q { color: var(--uc-brand); font-size: var(--uc-text-xs); font-weight: var(--uc-weight-medium); }
.xwMnfA2Hb1z8_XNGv15J { margin: var(--uc-space-6) 0 0; color: var(--uc-text-strong); font-size: var(--uc-text-lg); font-weight: var(--uc-weight-semibold); line-height: var(--uc-leading-snug); }
.TvGJzDIlLBpFdq9hhUUf { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: var(--uc-radius-sm); background: transparent; color: var(--uc-text-muted); font-size: var(--uc-text-xl); cursor: pointer; }
.TvGJzDIlLBpFdq9hhUUf:hover { background: var(--uc-surface-base); }
.r77tlnmvrDoNq2XWX8QF { display: grid; gap: var(--uc-space-8); }
.CNZCkuzyQJH61lcDSP0q, .Vjv5mXkeX8qTsXIyLu5J { display: flex; align-items: center; gap: var(--uc-space-12); width: 100%; min-height: 52px; padding: var(--uc-space-10) var(--uc-space-12); border: 1px solid var(--uc-border); border-radius: var(--uc-radius-md); background: var(--uc-surface-base); color: var(--uc-text); font: inherit; --uich-ff: inherit; text-align: right; }
.CNZCkuzyQJH61lcDSP0q { cursor: pointer; }
.CNZCkuzyQJH61lcDSP0q:hover { border-color: var(--uc-border-strong); }
.Ymfh428zq7VIGnXbyrFZ { background: var(--uc-surface-raised); border-color: var(--uc-text-strong); }
.CNZCkuzyQJH61lcDSP0q:focus-visible, .TvGJzDIlLBpFdq9hhUUf:focus-visible, .t5BqedHoimvsjiDhPWEQ:focus-visible, .Vjv5mXkeX8qTsXIyLu5J:has(:focus-visible) { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.V3YIcrKcH9kLZx2qAJQ5 { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border: 1px solid var(--uc-border-strong); border-radius: var(--uc-radius-sm); color: var(--uc-inverse-fg); font-size: var(--uc-text-xs); }
.Ymfh428zq7VIGnXbyrFZ .V3YIcrKcH9kLZx2qAJQ5 { background: var(--uc-inverse-bg); border-color: var(--uc-inverse-bg); }
.dnIz2SLGrQaUtfjndeVI { border-radius: var(--uc-radius-md); color: var(--uc-text-muted); }
.Ymfh428zq7VIGnXbyrFZ .dnIz2SLGrQaUtfjndeVI { color: var(--uc-inverse-fg); }
.af9HvLoJYud5ct0B_NHH { display: grid; gap: var(--uc-space-2); }
.af9HvLoJYud5ct0B_NHH strong { color: var(--uc-text-strong); font-weight: var(--uc-weight-medium); }
.af9HvLoJYud5ct0B_NHH small { color: var(--uc-text-muted); font-size: var(--uc-text-xs); }
.Vjv5mXkeX8qTsXIyLu5J { flex-wrap: wrap; }
.Vjv5mXkeX8qTsXIyLu5J label { flex: none; font-weight: var(--uc-weight-medium); }
.Vjv5mXkeX8qTsXIyLu5J input { flex: 1; min-width: 120px; border: 0; background: transparent; color: var(--uc-text-strong); font: inherit; --uich-ff: inherit; outline: none; }
/* The labelled wrapper owns focus; keep the editable child ringless. */
.Vjv5mXkeX8qTsXIyLu5J[class] input:focus, .Vjv5mXkeX8qTsXIyLu5J[class] textarea:focus { outline: none; box-shadow: none; }
.Vjv5mXkeX8qTsXIyLu5J input::-moz-placeholder { color: var(--uc-text-subtle); }
.Vjv5mXkeX8qTsXIyLu5J input::placeholder { color: var(--uc-text-subtle); }
.DzKM_ukyGdRDYpqvxeRT { align-items: stretch; flex-direction: column; }
.Vjv5mXkeX8qTsXIyLu5J textarea { display: block; width: 100%; min-height: 94px; resize: vertical; border: 0; background: transparent; color: var(--uc-text-strong); font: inherit; --uich-ff: inherit; outline: none; }
.Vjv5mXkeX8qTsXIyLu5J textarea::-moz-placeholder { color: var(--uc-text-subtle); }
.Vjv5mXkeX8qTsXIyLu5J textarea::placeholder { color: var(--uc-text-subtle); }
.Bep6sVp7v786hhvepiIS { display: grid; gap: var(--uc-space-16); margin-top: var(--uc-space-20); padding-top: var(--uc-space-16); border-top: 1px solid var(--uc-border-subtle); }
.i1KFi51e9bEQ5q8tyP1S { display: flex; gap: var(--uc-space-6); flex-wrap: wrap; }
.t5BqedHoimvsjiDhPWEQ { padding: var(--uc-space-4) var(--uc-space-10); border: 1px solid var(--uc-border); border-radius: var(--uc-radius-pill); background: transparent; color: var(--uc-text-muted); font: var(--uc-text-xs) var(--uc-font-sans); --uich-ff: var(--uc-font-sans); cursor: pointer; }
.t5BqedHoimvsjiDhPWEQ.bXvQpiECQV0RSDc3pOT5 { color: var(--uc-text-strong); }
.t5BqedHoimvsjiDhPWEQ.gRstizjHYRrBwJqZI3kZ { color: var(--uc-inverse-fg); background: var(--uc-inverse-bg); border-color: var(--uc-inverse-bg); }
.lIfFm2QqMGgCS7GmnkGB { display: flex; justify-content: flex-end; gap: var(--uc-space-8); }
@media (max-width: 480px) { .z9I6_0fBleFO8KpAD1N_ { padding: var(--uc-space-16); } }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .CNZCkuzyQJH61lcDSP0q:focus-visible, .TvGJzDIlLBpFdq9hhUUf:focus-visible, .t5BqedHoimvsjiDhPWEQ:focus-visible, .Vjv5mXkeX8qTsXIyLu5J:has(:focus-visible) { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* FileUpload, drop zone + controlled per-file progress list on uc- tokens. */
.msU_6_J3YLQyAYKPSTCR {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-8);
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  min-width: 0;
}

/* ---- Drop zone ------------------------------------------------------------ */
.U1jJ1Q9nwbgHRq_ZDqKt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--uc-space-12);
  padding: var(--uc-space-28) var(--uc-space-20);
  text-align: center;
  border-radius: var(--uc-radius-lg);
  border: 1px dashed var(--uc-border-strong);
  background: var(--uc-surface-sunken);
  cursor: pointer;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard),
    border-color var(--uc-dur-fast) var(--uc-ease-standard);
}
.U1jJ1Q9nwbgHRq_ZDqKt:hover { border-color: var(--uc-border-hover, var(--uc-text-subtle)); }
.U1jJ1Q9nwbgHRq_ZDqKt:focus-within { border-color: var(--uc-text-muted); }

/* drag-over: the one place brand orange appears, it's the "drop target live" cue */
.dlgClP1umXRwX2vjuboM,
.dlgClP1umXRwX2vjuboM:hover {
  border-style: solid;
  border-color: var(--uc-brand);
  background: var(--uc-brand-soft);
}
.dlgClP1umXRwX2vjuboM .Rflf4tTUVzMoJtJnQWFH { color: var(--uc-brand); background: var(--uc-surface-raised); }
.Sj5D_pADZLmXkx2laU6f { border-color: var(--uc-danger-border); }
.NNJ5v8lXP4T_PTeMS0tg { opacity: 0.5; cursor: not-allowed; }
.NNJ5v8lXP4T_PTeMS0tg:hover { border-color: var(--uc-border-strong); }

.Rflf4tTUVzMoJtJnQWFH {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--uc-radius-pill);
  background: var(--uc-surface-raised);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
  color: var(--uc-text-muted);
  transition: color var(--uc-dur-fast) var(--uc-ease-standard);
}
.Rflf4tTUVzMoJtJnQWFH svg { display: block; }
.tWN94bq4sqhhM0lQOXiM { display: flex; flex-direction: column; gap: var(--uc-space-2); min-width: 0; }
.HPMBESrqe1dA9g4daFlB {
  font-size: var(--uc-text-base);
  font-weight: var(--uc-weight-medium);
  color: var(--uc-text-strong);
  line-height: var(--uc-leading-snug);
}
.pKp0j3J_gfeNBvSDN9qZ {
  font-size: var(--uc-text-xs);
  color: var(--uc-text-muted);
  line-height: var(--uc-leading-snug);
}
.xpBPTogCEFBGfYV1hLBW {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* compact: one row, icon · text · button */
.jbNiOeuqY43T9E8ubV1K .U1jJ1Q9nwbgHRq_ZDqKt {
  flex-direction: row;
  justify-content: flex-start;
  text-align: right;
  gap: var(--uc-space-12);
  padding: var(--uc-space-12);
  border-radius: var(--uc-radius-md);
}
.jbNiOeuqY43T9E8ubV1K .Rflf4tTUVzMoJtJnQWFH { width: 32px; height: 32px; }
.jbNiOeuqY43T9E8ubV1K .tWN94bq4sqhhM0lQOXiM { flex: 1; }
.jbNiOeuqY43T9E8ubV1K .HPMBESrqe1dA9g4daFlB { font-size: var(--uc-text-sm); }

/* ---- Validation errors ---------------------------------------------------- */
.cq095j8gtAEej5JrlVpX {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-4);
}
.TpXwK_eBQDJGnCmvF7tL {
  display: flex;
  align-items: center;
  gap: var(--uc-space-6);
  font-size: var(--uc-text-xs);
  color: var(--uc-danger-fg);
}
.TpXwK_eBQDJGnCmvF7tL svg { flex: none; }

/* ---- File list ------------------------------------------------------------ */
.ykBvbEsWoR5gIt49sWLm {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-6);
}
.F_Xozuhj17usruQfFt3T {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--uc-space-12);
  padding: var(--uc-space-10) var(--uc-space-12) var(--uc-space-10) var(--uc-space-8);
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-raised);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
}
.R694LZu5b5UuhMaJzrUA { box-shadow: inset 0 0 0 1px var(--uc-danger-border); }

.dLdB7eblI39oNrhlHMVw {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--uc-radius-sm);
  background: var(--uc-surface-sunken);
  color: var(--uc-text-muted);
}
.dLdB7eblI39oNrhlHMVw svg { display: block; }
.R694LZu5b5UuhMaJzrUA .dLdB7eblI39oNrhlHMVw { background: var(--uc-danger-soft); color: var(--uc-danger-fg); }

.qYh7r3nhieaf46FE0TwS { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--uc-space-2); }
.PzM9vjup5pIgU8duk1aU { display: flex; align-items: center; gap: var(--uc-space-8); min-width: 0; }
.pSbUI1Tzxh_dvFi0MSep {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--uc-text-sm);
  font-weight: var(--uc-weight-medium);
  color: var(--uc-text-strong);
}
.UQ0GaayxB1VRvcfmCwTs {
  flex: none;
  display: inline-flex;
  align-items: center;
  font-size: var(--uc-text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--uc-text-muted);
}
.UQ0GaayxB1VRvcfmCwTs svg { display: block; }
.wP8UoWtl2mKs5LgOoMx8 .UQ0GaayxB1VRvcfmCwTs { color: var(--uc-success-fg); }
.R694LZu5b5UuhMaJzrUA .UQ0GaayxB1VRvcfmCwTs { color: var(--uc-danger-fg); }
.ylW7Zb6ZY4tkbhc4KM7o { font-size: var(--uc-text-xs); color: var(--uc-text-muted); line-height: var(--uc-leading-snug); }
.R694LZu5b5UuhMaJzrUA .ylW7Zb6ZY4tkbhc4KM7o { color: var(--uc-danger-fg); }

.L6bQ8IOpwe6v8x8ZkmIk {
  position: relative;
  display: block;
  height: 4px;
  margin-top: var(--uc-space-4);
  border-radius: var(--uc-radius-pill);
  background: var(--uc-surface-sunken);
  overflow: hidden;
}
.CmIwEDTMwo0AhEdZ45Yf {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--uc-brand);
  transition: width var(--uc-dur-base) var(--uc-ease-standard);
}
.yL87FIKwLkOFNP2S6ABR .CmIwEDTMwo0AhEdZ45Yf {
  width: 35%;
  animation: gc4uv7AYi3UsaQGyBaKV 1.2s var(--uc-ease-standard) infinite;
}
@keyframes gc4uv7AYi3UsaQGyBaKV {
  from { transform: translateX(100%); }
  to   { transform: translateX(-300%); }
}
@media (prefers-reduced-motion: reduce) {
  .yL87FIKwLkOFNP2S6ABR .CmIwEDTMwo0AhEdZ45Yf { animation: none; width: 100%; opacity: 0.5; }
}

.u2YXhdhTRB1fZKeHG8ax { flex: none; display: flex; align-items: center; gap: var(--uc-space-2); color: var(--uc-text-muted); }

.b7uYFOYmMWXsyebyR_yr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Announcement, dismissible product-news banner on uc- tokens. */
.PstpQ1DA1wLxAGJfNwZv {
  --_bg: var(--uc-surface-raised);
  --_border: var(--uc-border-subtle);
  --_icon-bg: var(--uc-surface-sunken);
  --_icon-fg: var(--uc-text-muted);
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--uc-space-12);
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  color: var(--uc-text);
  background: var(--_bg);
  box-shadow: inset 0 0 0 1px var(--_border);
  border-radius: var(--uc-radius-lg);
  min-width: 0;
}

/* ---- Tones ---------------------------------------------------------------- */
.PsXLoRXApIizwXjG9VgY { /* defaults above */ }
/* brand: faint orange wash mixed from tokens, orange glyph. Chrome stays B&W. */
.aC1CJdWrNcDcYGq0K0zD {
  --_bg: color-mix(in srgb, var(--uc-brand) 7%, var(--uc-surface-raised));
  --_border: color-mix(in srgb, var(--uc-brand) 28%, transparent);
  --_icon-bg: color-mix(in srgb, var(--uc-brand) 14%, transparent);
  --_icon-fg: var(--uc-brand);
}

/* ---- Layout: banner (boxed) ----------------------------------------------- */
.H030Q74XFMUkbnSFiq4c { padding: var(--uc-space-16); }
.H030Q74XFMUkbnSFiq4c.lirdBEMMV41dxBb6WDHs { padding-left: var(--uc-space-44); }

.UcHFooVSCtW8kLov7tJn {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--uc-radius-md);
  background: var(--_icon-bg);
  color: var(--_icon-fg);
}
.UcHFooVSCtW8kLov7tJn svg { display: block; }

.zcGujxyF0PiWyrJQHmWY { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--uc-space-4); }
.zipddIiCYKTyK3F4tF0V { display: flex; align-items: center; flex-wrap: wrap; gap: var(--uc-space-8); min-height: 20px; }
.Pwd40KuaNkivPUA8GukI { flex: none; }
.QmXrnxKFe_hSvaLxJiwk {
  font-size: var(--uc-text-base);
  font-weight: var(--uc-weight-semibold);
  color: var(--uc-text-strong);
  line-height: var(--uc-leading-snug);
}
.lp6B7_SPG8Zt5iNXvuKc {
  margin: 0;
  font-size: var(--uc-text-sm);
  color: var(--uc-text-muted);
  line-height: var(--uc-leading-normal);
}
.PELryDn0wfLgMzYqLYP5 { display: flex; gap: var(--uc-space-8); margin-top: var(--uc-space-8); }
.ZtIlpLVeD_5kr8NsQ0wy { flex: none; }

.CPG8glEWSydwX17GvWHA { position: absolute; top: var(--uc-space-10); left: var(--uc-space-10); }

/* ---- Layout: bar (slim strip, one line) ----------------------------------- */
.uq4TMme0YSl0cC3N117P {
  align-items: center;
  gap: var(--uc-space-10);
  padding: var(--uc-space-6) var(--uc-space-12) var(--uc-space-6) var(--uc-space-8);
  border-radius: var(--uc-radius-md);
  min-height: var(--uc-control-h-lg);
}
.uq4TMme0YSl0cC3N117P .UcHFooVSCtW8kLov7tJn { width: auto; height: auto; background: none; }
.uq4TMme0YSl0cC3N117P .zcGujxyF0PiWyrJQHmWY { flex-direction: row; align-items: center; }
.uq4TMme0YSl0cC3N117P .zipddIiCYKTyK3F4tF0V { flex-wrap: nowrap; min-width: 0; }
.uq4TMme0YSl0cC3N117P .QmXrnxKFe_hSvaLxJiwk { font-size: var(--uc-text-sm); white-space: nowrap; }
.uq4TMme0YSl0cC3N117P .lp6B7_SPG8Zt5iNXvuKc {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uq4TMme0YSl0cC3N117P .CPG8glEWSydwX17GvWHA { position: static; flex: none; }

@media (max-width: 560px) {
  .uq4TMme0YSl0cC3N117P { flex-wrap: wrap; }
  .uq4TMme0YSl0cC3N117P .zcGujxyF0PiWyrJQHmWY { flex-basis: calc(100% - 40px); }
  .uq4TMme0YSl0cC3N117P .lp6B7_SPG8Zt5iNXvuKc { white-space: normal; }
}

/* StatCard, KPI tile on uc- tokens. */
.wTXfymiijXz5qS__cOLl {
  position: relative;
  --_pad: var(--uc-card-pad, var(--uc-space-20));
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  background: var(--uc-surface-raised);
  border-radius: var(--uc-card-radius, var(--uc-radius-lg));
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
  overflow: hidden;
}
.iaw6abx3aQKv6km_ai9_ { --_pad: var(--uc-space-16); }

.Dt9V6LkGqFg2UO_ySqwB { display: flex; flex-direction: column; gap: var(--uc-space-4); padding: var(--_pad); min-width: 0; }
.oe0DRKql2OJUrebfHCzM { display: flex; align-items: center; justify-content: space-between; gap: var(--uc-space-8); min-height: 20px; }
.mxzavouzzI9PWt1KlqQ7 {
  font-size: var(--uc-text-sm);
  font-weight: var(--uc-weight-medium);
  color: var(--uc-text-muted);
  line-height: var(--uc-leading-snug);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ziTtEgt70GeFCJD1Mj8S { flex: none; display: inline-flex; color: var(--uc-text-subtle); }
.ziTtEgt70GeFCJD1Mj8S svg { display: block; }

.XuCe0oEKCgoB9n19sNSa { display: flex; align-items: center; flex-wrap: wrap; gap: var(--uc-space-8); margin-top: var(--uc-space-4); }
.XjkL0eKqqJBF4Z19mJOY {
  font-size: var(--uc-text-3xl);
  font-weight: var(--uc-weight-semibold);
  line-height: var(--uc-leading-tight);
  letter-spacing: var(--uc-tracking-tight);
  font-variant-numeric: tabular-nums;
  color: var(--uc-text-strong);
}
.iaw6abx3aQKv6km_ai9_ .XjkL0eKqqJBF4Z19mJOY { font-size: var(--uc-text-2xl); }

/* delta chip: soft status pill */
.o8MpIAqBjyHr6EKUUfOK {
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-2);
  height: 20px;
  padding: 0 var(--uc-space-4) 0 var(--uc-space-6);
  border-radius: var(--uc-radius-pill);
  font-size: var(--uc-text-xs);
  font-weight: var(--uc-weight-medium);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}
.o8MpIAqBjyHr6EKUUfOK svg { display: block; }
.C680uOqvdkVsoqinDF5g { color: var(--uc-success-fg); background: var(--uc-success-soft); }
.fNXwv957Xe6LiO9Kt6k1  { color: var(--uc-danger-fg);  background: var(--uc-danger-soft); }
.iLC6zcjnQ3eln8zXYaWt { color: var(--uc-text-muted); background: var(--uc-surface-sunken); }

.cDEviRgxFnJOiAk93Q8Q { font-size: var(--uc-text-xs); color: var(--uc-text-muted); }

.E5u3QQcEyVB8HgScpONz { margin-top: var(--uc-space-12); min-width: 0; }

.IIUWBFMy_emvXSI8HEtc {
  display: flex;
  align-items: center;
  gap: var(--uc-space-8);
  padding: var(--uc-space-10) var(--_pad);
  border-top: 1px solid var(--uc-border-subtle);
  background: var(--uc-surface-base);
  font-size: var(--uc-text-sm);
  color: var(--uc-text-muted);
}

/* ---- Sparkline ------------------------------------------------------------ */
.lP6epHl82bpqJi9GOrx4 { display: block; width: 100%; overflow: visible; }
.vKM0KAgk4Vz3TNpwtQGx   { color: var(--uc-brand); }
.GkAKs68RXwFfm3lenoyw { color: var(--uc-text-strong); }
.i5rhHtnASxvjRW8GTlAr { color: var(--uc-success); }
.Be_gzy2qtVijiIRSJpgJ  { color: var(--uc-danger); }

.l0WpCxkwRdKNVWFjnRXc {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Checkbox, Radix behavior, uc- token look. */
.ZsR9sqwfzVcmwaXHIwSy {
  all: unset;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border-radius: var(--uc-radius-xs);
  background: var(--uc-surface-overlay);
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-input);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard),
    box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
  flex: none;
}
.ZsR9sqwfzVcmwaXHIwSy:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--uc-border-hover, var(--uc-text-subtle)), var(--uc-shadow-input); }

/* sizes (md is the base above) */
.vyVkHT0YI1gHMSVEHao4 { width: 16px; height: 16px; }
.vyVkHT0YI1gHMSVEHao4 .SwSppHLv4LP3zWjmqPow svg { width: 11px; height: 11px; }
.uKg1vRELSSRQZ7BboSMO { width: 22px; height: 22px; border-radius: var(--uc-radius-sm); }
.uKg1vRELSSRQZ7BboSMO .SwSppHLv4LP3zWjmqPow svg { width: 15px; height: 15px; }
.ZsR9sqwfzVcmwaXHIwSy[data-state="checked"],
.ZsR9sqwfzVcmwaXHIwSy[data-state="indeterminate"] {
  background: var(--uc-inverse-bg);
  box-shadow: var(--uc-shadow-control);
}
.ZsR9sqwfzVcmwaXHIwSy:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.ZsR9sqwfzVcmwaXHIwSy:disabled { opacity: 0.5; cursor: not-allowed; }

.SwSppHLv4LP3zWjmqPow { display: grid; place-items: center; color: var(--uc-inverse-fg); }
.SwSppHLv4LP3zWjmqPow svg { display: block; }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .ZsR9sqwfzVcmwaXHIwSy:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
  .ZsR9sqwfzVcmwaXHIwSy { forced-color-adjust: none; border: 1px solid ButtonText; background: Canvas; box-shadow: none; }
  .ZsR9sqwfzVcmwaXHIwSy[data-state="checked"], .ZsR9sqwfzVcmwaXHIwSy[data-state="indeterminate"] { background: Highlight; border-color: Highlight; box-shadow: none; }
  .SwSppHLv4LP3zWjmqPow { color: HighlightText; }
  .ZsR9sqwfzVcmwaXHIwSy:focus-visible { background: Canvas; }
  .ZsR9sqwfzVcmwaXHIwSy:focus-visible .SwSppHLv4LP3zWjmqPow { color: CanvasText; }
}

/* Skeleton, sunken base with a token-derived shimmer sweep. */
.zxxAPin_sfKRFpe7UiHV {
  background: var(--uc-surface-sunken);
  border-radius: var(--uc-radius-sm);
  position: relative;
  overflow: hidden;
}
.zxxAPin_sfKRFpe7UiHV::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(100%);
  background: linear-gradient(
    -90deg,
    transparent,
    color-mix(in oklab, var(--uc-surface-raised) 60%, transparent),
    transparent
  );
  animation: r0WdISumM1X5LyRmRtNw 1.5s infinite;
}
@keyframes r0WdISumM1X5LyRmRtNw { 100% { transform: translateX(-100%); } }

@media (prefers-reduced-motion: reduce) {
  .zxxAPin_sfKRFpe7UiHV::after { animation: none; }
}

.yEJs5QXPLapCPsshQBkk { min-width: 0; overflow: hidden; border: 1px solid var(--uc-border); border-radius: var(--uc-radius-lg); background: var(--uc-surface-raised); color: var(--uc-text); font: var(--uc-text-base)/var(--uc-leading-normal) var(--uc-font-sans); --uich-ff: var(--uc-font-sans); }
.aD0KgBd5020_t5Ry44HD { max-height: var(--_dt-max-h, none); overflow: auto; }
.P1iFPRfrn5mhmaT8I5fi { width: 100%; border-collapse: separate; border-spacing: 0; text-align: right; }
.p1OcIeEt04ODGPgSDiZu { position: sticky; top: 0; z-index: 1; height: 44px; padding: 0 var(--uc-space-16); border-bottom: 1px solid var(--uc-border); background: var(--uc-surface-base); color: var(--uc-text-muted); font-size: var(--uc-text-xs); font-weight: var(--uc-weight-medium); white-space: nowrap; }
.p1OcIeEt04ODGPgSDiZu[data-align="right"], .RSo5LcwISMAqjoLVrEdK[data-align="right"] { text-align: left; }
.p1OcIeEt04ODGPgSDiZu[data-align="center"], .RSo5LcwISMAqjoLVrEdK[data-align="center"] { text-align: center; }
.rc484h29ydinlvSFOI7o { display: inline-flex; align-items: center; gap: var(--uc-space-6); margin: 0 calc(var(--uc-space-6) * -1); padding: var(--uc-space-6); border: 0; border-radius: var(--uc-radius-sm); background: transparent; color: inherit; font: inherit; --uich-ff: inherit; cursor: pointer; }
.rc484h29ydinlvSFOI7o:hover, .rc484h29ydinlvSFOI7o[data-sorted] { color: var(--uc-text-strong); background: var(--uc-surface-control); }
.rc484h29ydinlvSFOI7o:focus-visible, .HTPa8bSzbgF95fmzuSEQ:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.DV3qSnxnWzisuybjmwLp { display: inline-flex; color: var(--uc-text-subtle); }
.HTPa8bSzbgF95fmzuSEQ { background: var(--uc-surface-raised); }
.HTPa8bSzbgF95fmzuSEQ:not(:last-child) .RSo5LcwISMAqjoLVrEdK { border-bottom: 1px solid var(--uc-border-subtle); }
.HTPa8bSzbgF95fmzuSEQ:hover, .HTPa8bSzbgF95fmzuSEQ[data-selected] { background: var(--uc-surface-base); }
.HTPa8bSzbgF95fmzuSEQ[data-clickable] { cursor: pointer; }
.RSo5LcwISMAqjoLVrEdK { height: 52px; padding: var(--uc-space-8) var(--uc-space-16); vertical-align: middle; color: var(--uc-text-strong); }
.xmta_yCnVH4uynSMwqTW .p1OcIeEt04ODGPgSDiZu { height: 36px; padding-inline: var(--uc-space-12); }
.xmta_yCnVH4uynSMwqTW .RSo5LcwISMAqjoLVrEdK { height: 42px; padding: var(--uc-space-6) var(--uc-space-12); font-size: var(--uc-text-sm); }
.TNS6pjkg9Faf828OO45O { width: 44px; padding-left: 0; }
.vAe12QDbXfZjIEufCr0D { vertical-align: middle; }
.M5vdoIiyc9PW08txIvvG { width: 48px; text-align: left; }
.BTTRqId2fZASftRecCzz { margin-right: auto; }
._YtbiIJZavYSsqTTTk_3 { width: var(--uc-control-h-sm); height: var(--uc-control-h-sm); }
.sEJgX7bVkoeehfhC5pbz { display: flex; align-items: end; flex-wrap: wrap; gap: var(--uc-space-12); padding: var(--uc-space-16); border-bottom: 1px solid var(--uc-border-subtle); }
.YeqfZRRFbFEI7ipZEGbQ { display: flex; flex-direction: column; gap: var(--uc-space-2); margin-left: auto; }
.bsPzHbijk9QkpQkTXIZ3 { color: var(--uc-text-muted); font-size: var(--uc-text-xs); }
.YRUjdwZHv556XUMducpD { color: var(--uc-text-strong); font-size: var(--uc-text-lg); font-weight: var(--uc-weight-semibold); }
.lgozRbeNpOWdiWdLjBc7 { display: flex; align-items: center; flex-wrap: wrap; gap: var(--uc-space-8); }
.fhXKmCeo6X7S0RXWsStS { max-width: 100%; }
.hKkCt_gy6JlxE7QoeNoL { display: flex; align-items: center; justify-content: space-between; gap: var(--uc-space-8); min-height: 44px; padding: var(--uc-space-6) var(--uc-space-16); border-bottom: 1px solid var(--uc-border); background: var(--uc-brand-soft); }
.HgrKC2Ct5qus7K0x29fA { font-weight: var(--uc-weight-medium); }
.vyoXz7jlZkrRsHvB0xBd { display: flex; align-items: center; gap: var(--uc-space-8); }
.dngagCL_FTcR_YBeYZb_ { padding: var(--uc-space-12) var(--uc-space-16); border-top: 1px solid var(--uc-border-subtle); }
.Qw2lZRHrWMlMBwtkf07n { padding: var(--uc-space-40) var(--uc-space-16); text-align: center; }
.u6XzbxPBqa4k9kVbCzmy { display: grid; justify-items: center; gap: var(--uc-space-8); }
.CTDiOvwaPKtYDk4hqcV6 { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--uc-radius-lg); background: var(--uc-surface-base); color: var(--uc-text-muted); }
.YAPmLwGruxVKxcvq4Xbg { color: var(--uc-text-strong); font-weight: var(--uc-weight-medium); }
.zxjh3K_KiERBdwUwK8bZ { color: var(--uc-text-muted); font-size: var(--uc-text-sm); }
.bv1MAbkCtghu1Wigb7nx { margin-top: var(--uc-space-4); }
.kUO4uLAAHL9YyegvEVHf { height: 16px; max-width: 100%; }
.WNY31xuZDQlt6ulq7BeL { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 620px) { .lgozRbeNpOWdiWdLjBc7 { width: 100%; } .P1iFPRfrn5mhmaT8I5fi { min-width: 600px; } }

/* Pagination, range summary + Previous / numbers / Next on uc- tokens.
   Monochrome: the current page is a raised chip (like a selected Tab), never
   brand orange, orange is reserved for brand marks and progress. */
.agtrpweUsQ0rZSyc2kQR {
  --_h: var(--uc-control-h-md);
  --_fs: var(--uc-text-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--uc-space-12);
  flex-wrap: wrap;
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
}
.wbUyJThECMtU9Sb2C7Lw { --_h: var(--uc-control-h-sm); --_fs: var(--uc-text-xs); }

.i9U3RMf3CL7uj5QPpZDp,
.Yob7U43_326lmww7ovdE {
  font-size: var(--uc-text-xs);
  color: var(--uc-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.koMUzIL5SmPeZ4Ooq2w5 {
  display: flex;
  align-items: center;
  gap: var(--uc-space-4);
  margin-right: auto;
}

.FIjhQdDoEE5n25FKqeZh {
  display: flex;
  align-items: center;
  gap: var(--uc-space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.FIjhQdDoEE5n25FKqeZh > li { margin: 0; }

/* shared button reset for step + page buttons */
.XJtaK82NzzZ1vOwQciiZ,
.tN1o4PixjbTLkx8najpK {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--uc-space-4);
  height: var(--_h);
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--_fs);
  font-weight: var(--uc-weight-medium);
  line-height: 1;
  color: var(--uc-text-muted);
  border-radius: var(--uc-radius-md);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  font-variant-numeric: tabular-nums;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard),
    color var(--uc-dur-fast) var(--uc-ease-standard),
    box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
}
.XJtaK82NzzZ1vOwQciiZ { padding: 0 var(--uc-space-8); }
.xvG8xsUI93_IatLdzFwx { padding-right: var(--uc-space-6); }
.bFzqFCxHrqPmNBq92FQ6 { padding-left: var(--uc-space-6); }
.tN1o4PixjbTLkx8najpK { min-width: var(--_h); padding: 0 var(--uc-space-6); }

.XJtaK82NzzZ1vOwQciiZ:hover:not(:disabled),
.tN1o4PixjbTLkx8najpK:hover:not(:disabled):not([data-active]) {
  background: var(--uc-surface-sunken);
  color: var(--uc-text-strong);
}
.XJtaK82NzzZ1vOwQciiZ:focus-visible,
.tN1o4PixjbTLkx8najpK:focus-visible {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}
.XJtaK82NzzZ1vOwQciiZ:disabled,
.tN1o4PixjbTLkx8najpK:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* current page: raised neutral chip */
.tN1o4PixjbTLkx8najpK[data-active] {
  background: var(--uc-surface-raised);
  color: var(--uc-text-strong);
  box-shadow: var(--uc-shadow-control);
  cursor: default;
}
.tN1o4PixjbTLkx8najpK[data-active]:disabled { opacity: 1; }

.qKcAQhrBJnUQSViU2HbT {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: calc(var(--_h) * 0.75);
  height: var(--_h);
  font-size: var(--_fs);
  color: var(--uc-text-subtle);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

/* Narrow viewports: keep the arrows, drop the words (buttons keep an
   aria-label, so the accessible name survives). */
@media (max-width: 480px) {
  .WroaF1AGrs5fF7KSEJPk { display: none; }
  .i9U3RMf3CL7uj5QPpZDp { flex-basis: 100%; }
}


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .XJtaK82NzzZ1vOwQciiZ:focus-visible,
.tN1o4PixjbTLkx8najpK:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

.sXE8s4ZjMrDiEVtOdc59 { position: fixed; inset: 0; z-index: var(--uc-z-overlay); background: rgba(0,0,0,.48); backdrop-filter: blur(3px); }
.H5sGA_SIeILO_YEf9BmA { position: fixed; z-index: var(--uc-z-dialog); top: 50%; right: 50%; transform: translate(50%, -50%); display: flex; flex-direction: column; width: min(760px, calc(100vw - 32px)); max-height: min(660px, calc(100vh - 32px)); overflow: hidden; border: 1px solid var(--uc-border); border-radius: var(--uc-radius-xl); background: var(--uc-surface-raised); color: var(--uc-text); box-shadow: var(--uc-shadow-5); font: var(--uc-text-base)/var(--uc-leading-normal) var(--uc-font-sans); --uich-ff: var(--uc-font-sans); }
.QHFed55WKF0niiH2OhJw { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 var(--uc-space-20); border-bottom: 1px solid var(--uc-border); }
.hGmBnNuFzeY49lKTwRgi { margin: 0; color: var(--uc-text-strong); font-size: var(--uc-text-md); font-weight: var(--uc-weight-semibold); }
.ukwllj8S9j0fMoTmoPMv { width: 28px; height: 28px; border: 0; border-radius: var(--uc-radius-sm); background: transparent; color: var(--uc-text-muted); font-size: var(--uc-text-xl); cursor: pointer; }
.ukwllj8S9j0fMoTmoPMv:hover { background: var(--uc-surface-base); }
.FxesF5DiwLpWw69_utw5 { display: grid; grid-template-columns: 180px minmax(0, 1fr); min-height: 0; flex: 1; }
.ukcwciyVp1TlW8ddmfEm { display: flex; flex-direction: column; gap: var(--uc-space-4); padding: var(--uc-space-16) var(--uc-space-10); border-left: 1px solid var(--uc-border); background: var(--uc-surface-base); }
.CWhnBvraxYIslBF4TTi0 { width: 100%; min-height: 36px; padding: 0 var(--uc-space-12); border: 0; border-radius: var(--uc-radius-md); background: transparent; color: var(--uc-text-muted); font: inherit; --uich-ff: inherit; text-align: right; cursor: pointer; }
.CWhnBvraxYIslBF4TTi0:hover { background: var(--uc-surface-control); color: var(--uc-text-strong); }
.CWhnBvraxYIslBF4TTi0.ZmuvZV141z8XAVs9KF4p { background: var(--uc-surface-raised); color: var(--uc-text-strong); font-weight: var(--uc-weight-medium); box-shadow: inset -3px 0 var(--uc-brand); }
.ukwllj8S9j0fMoTmoPMv:focus-visible, .CWhnBvraxYIslBF4TTi0:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.vZQ50m78TXFm4JqqDfDi { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: auto; }
.kf9Rl9dHvU9QOi0XR8mi { padding: var(--uc-space-24) var(--uc-space-24) var(--uc-space-16); border-bottom: 1px solid var(--uc-border-subtle); }
.kf9Rl9dHvU9QOi0XR8mi h2 { margin: 0 0 var(--uc-space-4); color: var(--uc-text-strong); font-size: var(--uc-text-xl); font-weight: var(--uc-weight-semibold); }
.kf9Rl9dHvU9QOi0XR8mi p { margin: 0; color: var(--uc-text-muted); }
.GpHZQnt1T1jaSAHMiOMg { display: grid; align-content: start; gap: var(--uc-space-16); flex: 1; padding: var(--uc-space-24); }
.ZUO5FCnI8pMlC8cdT2PA { display: flex; justify-content: flex-end; padding: var(--uc-space-16) var(--uc-space-24); border-top: 1px solid var(--uc-border-subtle); }
.vd4Lre4yQJ9ssRnkK9LL { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 600px) { .FxesF5DiwLpWw69_utw5 { grid-template-columns: minmax(0,1fr); } .ukcwciyVp1TlW8ddmfEm { flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--uc-border); } .CWhnBvraxYIslBF4TTi0 { width: auto; white-space: nowrap; } .kf9Rl9dHvU9QOi0XR8mi, .GpHZQnt1T1jaSAHMiOMg { padding: var(--uc-space-16); } }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .ukwllj8S9j0fMoTmoPMv:focus-visible, .CWhnBvraxYIslBF4TTi0:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* Tabs, Radix behavior, uc- token look. Two variants: pill and underline.
   The active marker is a single sliding indicator that animates between tabs. */
.yUbZ9JN8Q6q_cxttzVQf { display: flex; flex-direction: column; gap: var(--uc-space-16); min-width: 0; max-width: 100%; } /* can shrink so its list scrolls */

/* ---- pill (segmented) ----------------------------------------------------- */
.c5fOPZJlD5q2gHovvEQh {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: var(--uc-tab-track-pad, 3px);
  background: var(--uc-tab-track-bg, var(--uc-surface-sunken));
  border-radius: var(--uc-tab-track-radius, var(--uc-radius-md));
  box-shadow: var(--uc-tab-track-stroke, inset 0 0 0 1px var(--uc-border-subtle));
  width: -moz-max-content;
  width: max-content;
}

/* ---- sideways overflow (both variants) -------------------------------------
   Too many / too wide tabs for the space: the list scrolls sideways (wheel,
   trackpad, or the picked tab scrolling itself into view — Tabs.tsx) with NO
   visible scrollbar, and labels are never squashed or clipped. The edge fade
   widths are set from script only while there is more to scroll that way. */
.c5fOPZJlD5q2gHovvEQh,
.yhi1vngR1p2YuJVNnaDE {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--uc-tabs-fade-l, 0px), #000 calc(100% - var(--uc-tabs-fade-r, 0px)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--uc-tabs-fade-l, 0px), #000 calc(100% - var(--uc-tabs-fade-r, 0px)), transparent 100%);
}
.c5fOPZJlD5q2gHovvEQh::-webkit-scrollbar,
.yhi1vngR1p2YuJVNnaDE::-webkit-scrollbar { display: none; }
/* A tab never shrinks below its own label (callers that stretch tabs with
   flex:1 / min-width:0 still share the width when it fits). */
.c5fOPZJlD5q2gHovvEQh > [role="tab"],
.yhi1vngR1p2YuJVNnaDE > [role="tab"] { min-width: -moz-max-content !important; min-width: max-content !important; }
.IiPxNJwR_you4cvPsbWF {
  position: absolute;
  top: var(--uc-tab-track-pad, 3px);
  bottom: var(--uc-tab-track-pad, 3px);
  right: 0;
  width: 0;
  opacity: 0;
  border-radius: var(--uc-tab-radius, var(--uc-radius-sm));
  background: var(--uc-surface-raised);
  background-image: var(--uc-sheen);
  box-shadow: var(--uc-shadow-control);
  transition: transform var(--uc-dur-base) var(--uc-ease-emphasized),
    width var(--uc-dur-base) var(--uc-ease-emphasized);
  z-index: 0;
  pointer-events: none;
}
.NcCLOdesrW3h0feW8Cqd {
  all: unset;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  height: var(--uc-tab-h, 26px);
  padding: 0 var(--uc-tab-px, var(--uc-space-12));
  display: inline-flex;
  align-items: center;
  /* Centred, so a trigger stretched to share a full-width bar (flex: 1) keeps
     its label in the middle instead of against its left edge. No effect on a
     trigger sized to its content. */
  justify-content: center;
  gap: var(--uc-space-8);
  font-size: var(--uc-text-base);
  font-weight: var(--uc-weight-medium);
  /* One line always: a two-word label in a shared-width bar ("WP Connectors")
     wrapped and spilled out of the fixed-height trigger. */
  white-space: nowrap;
  color: var(--uc-text-muted);
  border-radius: var(--uc-tab-radius, var(--uc-radius-sm));
  cursor: pointer;
  transition: color var(--uc-dur-fast) var(--uc-ease-standard);
}
.NcCLOdesrW3h0feW8Cqd:hover { color: var(--uc-text-strong); }
.NcCLOdesrW3h0feW8Cqd[data-state="active"] { color: var(--uc-text-strong); }
.NcCLOdesrW3h0feW8Cqd:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.NcCLOdesrW3h0feW8Cqd:disabled { opacity: 0.5; cursor: not-allowed; }
.sa8wAhUubaDeDz9m2lSy { height: 22px; padding: 0 var(--uc-space-8); font-size: var(--uc-text-sm); }
.AXCzoGHV2zjSW04iuiPm { height: 32px; padding: 0 var(--uc-space-16); font-size: var(--uc-text-md); }
/* icon-only pill trigger, square (width tracks the size's height via
   aspect-ratio), no side padding, glyph centered. Pairs with `iconOnly` on
   TabsTrigger for segmented icon toggles (e.g. a light/dark switch). */
.e3ubPG9y4BJzwsrdHlEA { padding: 0; gap: 0; aspect-ratio: 1; justify-content: center; }

/* `solidActiveIcon` on TabsList: the active glyph goes heavier. It targets the
   shapes, not the <svg>, because Hugeicons writes stroke-width as an attribute
   on every path, and that attribute beats a value inherited from the svg (any
   CSS rule on the path itself still wins over it). */
.yEf7HfGTA0UzmBrIB_77 svg :is(path, line, polyline, circle, ellipse, rect, polygon) {
  transition: stroke-width var(--uc-dur-base) var(--uc-ease-standard);
}
.yEf7HfGTA0UzmBrIB_77 [data-state="active"] svg :is(path, line, polyline, circle, ellipse, rect, polygon) {
  stroke-width: 2.25;
}

/* ---- underline ------------------------------------------------------------ */
.yhi1vngR1p2YuJVNnaDE {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-20);
  /* drawn inside the box (was border-bottom) so the scrolling list doesn't clip
     the active underline sitting on it */
  box-shadow: inset 0 -1px 0 var(--uc-border);
}
.nAh0Gfr2zYUey0XGqts9 {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  opacity: 0;
  border-radius: 2px;
  background: var(--uc-text-strong); /* neutral underline, tab indicators aren't CTAs */
  transition: transform var(--uc-dur-base) var(--uc-ease-emphasized),
    width var(--uc-dur-base) var(--uc-ease-emphasized);
  pointer-events: none;
}
.cC9aL4ulO5rxAtpAr4A0 {
  all: unset;
  box-sizing: border-box;
  height: 34px;
  display: inline-flex;
  align-items: center;
  /* Centred, so a trigger stretched to share a full-width bar (flex: 1) keeps
     its label in the middle instead of against its left edge. No effect on a
     trigger sized to its content. */
  justify-content: center;
  gap: var(--uc-space-8);
  font-size: var(--uc-text-base);
  font-weight: var(--uc-weight-medium);
  color: var(--uc-text-muted);
  cursor: pointer;
  transition: color var(--uc-dur-fast) var(--uc-ease-standard);
}
.cC9aL4ulO5rxAtpAr4A0:hover { color: var(--uc-text-strong); }
.cC9aL4ulO5rxAtpAr4A0[data-state="active"] { color: var(--uc-brand-fg); }
.cC9aL4ulO5rxAtpAr4A0:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.cC9aL4ulO5rxAtpAr4A0:disabled { opacity: 0.5; cursor: not-allowed; }
.rkiDdr7DnTZzxeE4XWn2 { height: 30px; font-size: var(--uc-text-sm); }
.PlObOj8t3yHaJNy9nwoe { height: 40px; font-size: var(--uc-text-md); }

.DR_2eHes4dZNHfA9fRnL:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }

/* ── Preflight-proofing: PADDING ONLY ────────────────────────────────────────
   Tailwind's stock preflight ships inside the app's Tailwind root:

     .uich-tw button, .uich-tw input, ... { ... margin: 0; padding: 0; }

   That is (0,1,1); a CSS-module class is (0,1,0), so preflight strips the side
   padding off every trigger. The control keeps its height (preflight does not
   set height) and the labels end up touching — a half-styled strip.

   Re-stating ONLY padding at (0,2,0) is enough to beat it.

   Deliberately NOT doubling the whole rule: the base rules start with
   `all: unset`, and callers style these triggers with utility classes of their
   own (the Code tab's scopes use `flex-1 min-w-0 justify-center text-xs
   font-semibold`, all (0,1,0)). Lifting `all: unset` above those made it reset
   their `flex`, so four equal columns collapsed to content width and ran
   together. Specificity here has to be raised one property at a time, never
   across a rule that resets everything.
   ------------------------------------------------------------------------- */
.NcCLOdesrW3h0feW8Cqd.NcCLOdesrW3h0feW8Cqd { padding: 0 var(--uc-tab-px, var(--uc-space-12)); }
.sa8wAhUubaDeDz9m2lSy.sa8wAhUubaDeDz9m2lSy { padding: 0 var(--uc-space-8); }
.AXCzoGHV2zjSW04iuiPm.AXCzoGHV2zjSW04iuiPm { padding: 0 var(--uc-space-16); }
.e3ubPG9y4BJzwsrdHlEA.e3ubPG9y4BJzwsrdHlEA { padding: 0; }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .NcCLOdesrW3h0feW8Cqd:focus-visible,
  .cC9aL4ulO5rxAtpAr4A0:focus-visible,
  .DR_2eHes4dZNHfA9fRnL:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* Input, recessed field on uc- tokens.

   wp-admin hardening: WordPress's forms.css styles `input[type="text"]` (and
   every other type) at specificity (0,1,1) — border, 2px radius, 40px
   min-height, 0 8px padding and a blue :focus box-shadow — which beats a lone
   `.input` (0,1,0) whenever the field has a type attribute (the Combobox search,
   number/date fields…). Every field rule below therefore carries `[class]`
   (always true on these elements): +(0,1,0) on each one, so their order among
   themselves is unchanged but they now outrank wp-admin. margin, min-height and
   line-height are reset because wp-admin sets them and the DS did not. */
.gf6IRPe9LovRo8vS3IAl {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
}
.jvLYLaG45SNM0t7oug2a[class] {
  width: 100%;
  height: var(--uc-input-h, var(--uc-control-h-md));
  padding: 0 var(--uc-input-px, var(--uc-space-12));
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-base);
  font-weight: var(--uc-weight-regular);
  color: var(--uc-text-strong);
  background: var(--uc-surface-overlay);
  background-image: linear-gradient(to bottom, oklch(0% 0 0 / 0.02), transparent);
  margin: 0;
  min-height: 0;
  line-height: normal;
  border: none;
  border-radius: var(--uc-input-radius, var(--uc-radius-md));
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-input);
  transition: box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
  outline: none;
}
.jvLYLaG45SNM0t7oug2a[class]::-moz-placeholder { color: var(--uc-text-subtle); }
.jvLYLaG45SNM0t7oug2a[class]::placeholder { color: var(--uc-text-subtle); }
.jvLYLaG45SNM0t7oug2a[class]:hover:not(:disabled):not(:focus) { box-shadow: inset 0 0 0 1px var(--uc-border-hover, var(--uc-text-subtle)), var(--uc-shadow-input); }
/* A single stronger edge marks the caret, without a second brand halo.
   :focus-visible retains a compact, neutral indicator for keyboard editing. */
.jvLYLaG45SNM0t7oug2a[class]:focus {
  box-shadow: inset 0 0 0 1px var(--uc-ring), var(--uc-shadow-input);
  outline: none;
}
.jvLYLaG45SNM0t7oug2a[class]:focus-visible {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}
.jvLYLaG45SNM0t7oug2a[class]:disabled {
  color: var(--uc-text-subtle);
  background: var(--uc-surface-sunken);
  box-shadow: inset 0 0 0 1px var(--uc-border);
  cursor: not-allowed;
}

.haw52Sf_U1aNw5UG26i6[class] { height: var(--uc-control-h-sm); font-size: var(--uc-text-sm); padding: 0 var(--uc-space-8); }
.l_6Te8jk6g9i2OYGVJQK[class] { height: var(--uc-control-h-lg); font-size: var(--uc-text-md); padding: 0 var(--uc-space-16); }

.ssewu8L6FxnF8mjD_c_D[class] {
  box-shadow: inset 0 0 0 1px var(--uc-danger), var(--uc-shadow-input);
}
.ssewu8L6FxnF8mjD_c_D[class]:focus {
  box-shadow: inset 0 0 0 1px var(--uc-danger), var(--uc-shadow-input);
  outline: 2px solid var(--uc-danger);
  outline-offset: -2px;
}

/* icon adornments */
.fGN3tsXkL0HfDxLoHJ3b[class] { padding-right: var(--uc-space-32); }
.F7_NHLpEO7zGCxeHmEbl[class] { padding-left: var(--uc-space-32); }
.NPtEFuYEvwKDd0CQ2ZL4 {
  position: absolute;
  display: grid;
  place-items: center;
  color: var(--uc-text-subtle);
  pointer-events: none;
}
.Bcg2bwvX_INxmvsS4KTp { right: var(--uc-space-12); }
.oFadrtuqYdL1WAYq7mGM { left: var(--uc-space-12); }

/* ── Addons (BoardUI Input adornments) ────────────────────────────────────
   The shell is the field: same fill, inset ring, radius and heights as .input,
   with keyboard focus on the shell only while its bare input is focused. The inner input (.bare) is transparent.
   [class] keeps these above wp-admin's input[type=…] rules, as above. */
.D0Xdmp8POlPPHSzhzm9g[class] {
  display: flex;
  align-items: center;
  gap: var(--uc-space-8);
  width: 100%;
  height: var(--uc-input-h, var(--uc-control-h-md));
  padding: 0 var(--uc-input-px, var(--uc-space-12));
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-base);
  color: var(--uc-text-strong);
  background: var(--uc-surface-overlay);
  background-image: linear-gradient(to bottom, oklch(0% 0 0 / 0.02), transparent);
  border-radius: var(--uc-input-radius, var(--uc-radius-md));
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-input);
  transition: box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
  cursor: text;
}
.D0Xdmp8POlPPHSzhzm9g[class]:hover:not(:focus-within) { box-shadow: inset 0 0 0 1px var(--uc-border-hover, var(--uc-text-subtle)), var(--uc-shadow-input); }
.D0Xdmp8POlPPHSzhzm9g[class]:has(> .rqDSPev3xkBlb20ToTZX:focus-visible) { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.Xg64tHf4Kp4Noa25JH0b[class] { height: var(--uc-control-h-sm); font-size: var(--uc-text-sm); padding: 0 var(--uc-space-8); gap: var(--uc-space-6); }
.M5O1Ldpq66ff3nhO1rMQ[class] { height: var(--uc-control-h-lg); font-size: var(--uc-text-md); padding: 0 var(--uc-space-16); }
.ekm8tp1ZbcU5q1z1wOWS[class] { box-shadow: inset 0 0 0 1px var(--uc-danger), var(--uc-shadow-input); }
.ekm8tp1ZbcU5q1z1wOWS[class]:has(> .rqDSPev3xkBlb20ToTZX:focus-visible) { outline-color: var(--uc-danger); }
.sXdm39Z0ZiRwORSaPpZv[class] { color: var(--uc-text-subtle); background: var(--uc-surface-sunken); box-shadow: inset 0 0 0 1px var(--uc-border); cursor: not-allowed; }

.rqDSPev3xkBlb20ToTZX[class] {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  font: inherit;
  --uich-ff: inherit;
  font-weight: var(--uc-weight-regular);
  line-height: normal;
  color: inherit;
}
.rqDSPev3xkBlb20ToTZX[class]:focus { box-shadow: none; outline: none; }
.rqDSPev3xkBlb20ToTZX[class]::-moz-placeholder { color: var(--uc-text-subtle); }
.rqDSPev3xkBlb20ToTZX[class]::placeholder { color: var(--uc-text-subtle); }
.rqDSPev3xkBlb20ToTZX[class]:disabled { cursor: not-allowed; background: transparent; }

.Y3HnmS9EPQ7CMwpRJcPQ { flex: none; display: inline-flex; align-items: center; min-width: 0; }
.JY5ljlGXeMh2RPyRM1X1 { color: var(--uc-text-muted); white-space: nowrap; -webkit-user-select: none; -moz-user-select: none; user-select: none; }
.Q7QN4UqutcmDnCCw7QMY { flex: none; display: grid; place-items: center; color: var(--uc-text-subtle); }

/* field wrapper (label + hint) */
.XrLNCTYM8KNOcisy0k1u { display: flex; flex-direction: column; gap: var(--uc-space-8); width: 100%; }
._nx7MrQDNMenHelkZy99 { font-size: var(--uc-text-sm); font-weight: var(--uc-weight-medium); color: var(--uc-text-strong); }
.tmMcxsM0Zke7mcbuxgiI { font-size: var(--uc-text-xs); color: var(--uc-text-muted); }
.C1A65qwuRNgkck1QS09Q { color: var(--uc-danger-fg); }


@media (forced-colors: active) {
  .jvLYLaG45SNM0t7oug2a[class]:focus-visible,
  .ssewu8L6FxnF8mjD_c_D[class]:focus,
  .D0Xdmp8POlPPHSzhzm9g[class]:has(> .rqDSPev3xkBlb20ToTZX:focus-visible),
  .ekm8tp1ZbcU5q1z1wOWS[class]:has(> .rqDSPev3xkBlb20ToTZX:focus-visible) { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* Combobox, a searchable DS Select.
   Row metrics, colours and the tick mirror Select.module.css (.item / .indicator)
   so a searchable list reads exactly like a <Select> menu. Everything is token-
   driven, so inside <ComboboxContent> (the `uc-pop-dark` scope) it renders on the
   same dark surface as SelectContent. */

/* ── Trigger (layered on Select's .trigger) ── */
.TMt7KQ8qabQdlCprI12S { width: 100%; min-width: 0; text-align: right; }
.ZEtsbpSX6cU_Ed7QNcJN { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Menu surface (layered on Select's .content) ── */
.vY68I_p_LHjMh_G555yq {
  min-width: var(--radix-popover-trigger-width);
  max-width: calc(100vw - var(--uc-space-32));
  color: var(--uc-text);
}
.vY68I_p_LHjMh_G555yq:focus-visible { outline: none; }

.EQh1Zsx8SYfcUIJngYxf {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-4, 4px);
  min-height: 0;
  max-height: min(360px, var(--radix-popover-content-available-height, 360px));
}
.tQgk3IM_QGgqoNAzLwr4 {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--uc-border-strong) transparent;
}
.tQgk3IM_QGgqoNAzLwr4::-webkit-scrollbar { width: 3px; }
.tQgk3IM_QGgqoNAzLwr4::-webkit-scrollbar-thumb { background: var(--uc-border-strong); border-radius: 2px; }
.tQgk3IM_QGgqoNAzLwr4::-webkit-scrollbar-track { background: transparent; }

/* Group heading: a quiet label, sticky over the list on the menu's own surface. */
.FXycZdDhl9kJETbjUHFO {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: var(--uc-space-8, 8px);
  padding: var(--uc-space-8, 8px) var(--uc-space-12, 12px) var(--uc-space-4, 4px);
  background: var(--uc-surface-overlay, var(--uc-surface-raised));
  color: var(--uc-text-muted);
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-medium, 500);
}
.GgeQ5Hm142wabYznnqR_ { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.FGCG1SrRWYYTO8tUWYWH { flex: none; color: var(--uc-text-subtle); font-variant-numeric: tabular-nums; }

/* Option = Select .item: md height, base text, 12px left / 32px right (tick slot). */
.DbjLcjr6klrYFvEy6_vt {
  all: unset;
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--uc-space-8, 8px);
  width: 100%;
  min-height: var(--uc-control-h-md);
  padding: var(--uc-space-4, 4px) var(--uc-space-12, 12px) var(--uc-space-4, 4px) var(--uc-space-32, 32px);
  border-radius: var(--uc-radius-sm, 6px);
  color: var(--uc-text);
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-base);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.DbjLcjr6klrYFvEy6_vt:hover, .DbjLcjr6klrYFvEy6_vt:focus-visible, .ccE6nEQL6RNfxBJgRm5Q {
  background: var(--uc-surface-control);
  color: var(--uc-text-strong);
  outline: none;
}
.jjrrNWXXXL8tcadxilTQ { flex: none; display: grid; place-items: center; width: 14px; height: 14px; }
.k8LjJ_XHmpaDx7Qh3G_7 { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Right-hand note ("Pro", "Soon"); sits in the same slot the tick uses. */
.HKpAW1CbxoGEwI9fIDC8 {
  flex: none;
  color: var(--uc-text-subtle);
  font-size: var(--uc-text-xs, 12px);
}
/* Shown but not pickable (e.g. a Pro option on Free): muted, no hover fill. */
.DbjLcjr6klrYFvEy6_vt.GoruhHBwxRhs65oaecF5 { cursor: not-allowed; color: var(--uc-text-subtle); background: none; }
/* Tick = Select .indicator: pinned 12px from the right edge. */
.ikXlbGhcHwgPHhXRQEQ_ { position: absolute; left: var(--uc-space-12, 12px); color: var(--uc-text-strong); }
.nfdpgypdXHcVtNywkl0I { padding: var(--uc-space-12, 12px); color: var(--uc-text-muted); font-size: var(--uc-text-sm, 13px); text-align: center; }
/* Row sizes = Select .itemSm / .itemLg. */
.fABAXkznu7kklkD7DYei { min-height: var(--uc-control-h-sm); font-size: var(--uc-text-sm); }
.fR_WUaRhPJ2S0YU10YX5 { min-height: var(--uc-control-h-lg); font-size: var(--uc-text-md); }
/* Search field: it is auto-focused the moment the menu opens, so the Input's
   brand focus ring would always be on, which no Select menu has. Inside the
   list it keeps a quiet border instead; the open trigger already carries the
   ring. Parent-scoped to out-rank Input's own .shell[class]:focus-within. */
.EQh1Zsx8SYfcUIJngYxf .cd6b2KsxpSMWPJK50oS0[class]:focus-within,
.EQh1Zsx8SYfcUIJngYxf .cd6b2KsxpSMWPJK50oS0[class]:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--uc-border-strong);
}

/* Textarea, recessed multiline field on uc- tokens.
   wp-admin hardening (same as Input.module.css): WordPress's forms.css gives every `textarea`
   its own border, padding, radius, line-height and focus ring, which stacked on this field as a
   second frame. Every field rule carries `[class]` so it outranks wp-admin; margin is reset too. */
.Xqsy0_gRpA0dvKAZlYwM[class] {
  width: 100%;
  margin: 0;
  min-height: 84px;
  padding: var(--uc-space-8) var(--uc-space-12);
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-base);
  /* Explicit, like Input: Tailwind preflight sets `font-weight: inherit` on textarea, so without
     this the value took the weight of whatever wrapped it and read heavier than the inputs. */
  font-weight: var(--uc-weight-regular);
  line-height: var(--uc-leading-normal);
  color: var(--uc-text-strong);
  background: var(--uc-surface-overlay);
  background-image: linear-gradient(to bottom, oklch(0% 0 0 / 0.02), transparent);
  border: none;
  border-radius: var(--uc-radius-md);
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-input);
  transition: box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
  outline: none;
  resize: vertical;
}
.A1clwk8PZzsmTt4nBCfy[class] { min-height: 64px; padding: var(--uc-space-6) var(--uc-space-8); font-size: var(--uc-text-sm); }
.nVx7pbGGbpIdebBWF5zQ[class] { min-height: 104px; padding: var(--uc-space-10) var(--uc-space-16); font-size: var(--uc-text-md); }
.Xqsy0_gRpA0dvKAZlYwM[class]::-moz-placeholder { color: var(--uc-text-subtle); }
.Xqsy0_gRpA0dvKAZlYwM[class]::placeholder { color: var(--uc-text-subtle); }
.Xqsy0_gRpA0dvKAZlYwM[class]:hover:not(:disabled):not(:focus) { box-shadow: inset 0 0 0 1px var(--uc-border-hover, var(--uc-text-subtle)), var(--uc-shadow-input); }
/* A single stronger edge marks the caret, without a second brand halo.
   :focus-visible retains a compact, neutral indicator for keyboard editing. */
.Xqsy0_gRpA0dvKAZlYwM[class]:focus {
  box-shadow: inset 0 0 0 1px var(--uc-ring), var(--uc-shadow-input);
  outline: none;
}
.Xqsy0_gRpA0dvKAZlYwM[class]:focus-visible {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}
.Xqsy0_gRpA0dvKAZlYwM[class]:disabled {
  color: var(--uc-text-subtle);
  background: var(--uc-surface-sunken);
  box-shadow: inset 0 0 0 1px var(--uc-border);
  cursor: not-allowed;
}
.W9fQRV_wDrUOFRkjpGQu[class] { box-shadow: inset 0 0 0 1px var(--uc-danger), var(--uc-shadow-input); }
.W9fQRV_wDrUOFRkjpGQu[class]:focus {
  box-shadow: inset 0 0 0 1px var(--uc-danger), var(--uc-shadow-input);
  outline: 2px solid var(--uc-danger);
  outline-offset: -2px;
}

/* ── autoResize / showCount / resize (ported from BoardUI's Textarea) ──────── */
/* autoResize: height is set inline by the component (rows → maxRows), so the
   fixed min-height steps aside and the handle goes (it would fight the fit). */
.bX2w9x35ygzUvJ1Dscl2[class] { min-height: 0; overflow-y: hidden; }
.n00Ij5fjFCXcY_WwMjdU[class] { resize: none; }

/* Counter on its own row, right-aligned under the field (hint stays in Field). */
.JUQO0q7E0NLpfvNqJw7Z { display: flex; flex-direction: column; gap: var(--uc-space-4); width: 100%; }
.EfB4hZBAgC6fRUUtokch {
  align-self: flex-end;
  font-size: var(--uc-text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--uc-text-muted);
}
.HuvKETZwc0wgFBVafeEI { color: var(--uc-danger-fg); }


@media (forced-colors: active) {
  .Xqsy0_gRpA0dvKAZlYwM[class]:focus-visible,
  .W9fQRV_wDrUOFRkjpGQu[class]:focus { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* Radio, Radix radio-group behavior, uc- token look. */
.EHpEHlLUPuG0aN2_mP1X { display: flex; flex-direction: column; gap: var(--uc-space-12); }

.jV015zG6LdAhWdyDqBpi {
  all: unset;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--uc-surface-overlay);
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-input);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard),
    box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
  flex: none;
}
.jV015zG6LdAhWdyDqBpi:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--uc-border-hover, var(--uc-text-subtle)), var(--uc-shadow-input); }

/* sizes (md is the base above) */
.GAuTRizJXJviLrk00LIO { width: 16px; height: 16px; }
.GAuTRizJXJviLrk00LIO .KR2ebzsC5rVGUpZM7hbP::after { width: 6px; height: 6px; }
.LHEgjFoN6AvdlDSIH6dp { width: 22px; height: 22px; }
.LHEgjFoN6AvdlDSIH6dp .KR2ebzsC5rVGUpZM7hbP::after { width: 9px; height: 9px; }
.jV015zG6LdAhWdyDqBpi[data-state="checked"] {
  background: var(--uc-inverse-bg);
  box-shadow: var(--uc-shadow-control);
}
.jV015zG6LdAhWdyDqBpi:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.jV015zG6LdAhWdyDqBpi:disabled { opacity: 0.5; cursor: not-allowed; }

.KR2ebzsC5rVGUpZM7hbP { display: grid; place-items: center; }
.KR2ebzsC5rVGUpZM7hbP::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--uc-inverse-fg);
}

._eXXDl7uwGpETC1aX04q { display: flex; align-items: center; gap: var(--uc-space-12); }
.oo9fBIVe3BjRsI6nKrkV { font-size: var(--uc-text-base); color: var(--uc-text); cursor: pointer; }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .jV015zG6LdAhWdyDqBpi:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
  .jV015zG6LdAhWdyDqBpi { forced-color-adjust: none; border: 1px solid ButtonText; background: Canvas; box-shadow: none; }
  .jV015zG6LdAhWdyDqBpi[data-state="checked"] { background: Highlight; border-color: Highlight; box-shadow: none; }
  .KR2ebzsC5rVGUpZM7hbP::after { background: HighlightText; }
  .jV015zG6LdAhWdyDqBpi:focus-visible { background: Canvas; }
  .jV015zG6LdAhWdyDqBpi:focus-visible .KR2ebzsC5rVGUpZM7hbP::after { background: CanvasText; }
}

/* Switch, monochrome. Track = inverse fill (light on dark / dark on light),
   thumb = inverse foreground (dark on dark / light on light). OFF track is a
   dimmer version of ON; on/off also reads from thumb position. Radix behavior. */
.CQzrpEN2AiSHuCJwKJKR {
  all: unset;
  box-sizing: border-box;
  width: 36px;
  height: 20px;
  border-radius: var(--uc-radius-pill);
  background: color-mix(in oklab, var(--uc-inverse-bg) 30%, transparent);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  position: relative;
  cursor: pointer;
  transition: background var(--uc-dur-base) var(--uc-ease-standard);
  flex: none;
}
.CQzrpEN2AiSHuCJwKJKR[data-state="checked"] {
  background: var(--uc-inverse-bg);
}
.CQzrpEN2AiSHuCJwKJKR:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.CQzrpEN2AiSHuCJwKJKR:disabled { opacity: 0.5; cursor: not-allowed; }

.liwycOoSbQrPNLMN1Xcr {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--uc-inverse-fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.06);
  transform: translateX(-2px);
  transition: transform var(--uc-dur-base) var(--uc-ease-emphasized);
  will-change: transform;
}
.liwycOoSbQrPNLMN1Xcr[data-state="checked"] { transform: translateX(-18px); }

/* sizes (md is the base above) */
.ECEZNe88_62620l_tqt1 { width: 30px; height: 16px; }
.ECEZNe88_62620l_tqt1 .liwycOoSbQrPNLMN1Xcr { width: 12px; height: 12px; }
.ECEZNe88_62620l_tqt1 .liwycOoSbQrPNLMN1Xcr[data-state="checked"] { transform: translateX(-16px); }
.mlp2kErQ5pEV8gYtRfEi { width: 44px; height: 24px; }
.mlp2kErQ5pEV8gYtRfEi .liwycOoSbQrPNLMN1Xcr { width: 20px; height: 20px; }
.mlp2kErQ5pEV8gYtRfEi .liwycOoSbQrPNLMN1Xcr[data-state="checked"] { transform: translateX(-22px); }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .CQzrpEN2AiSHuCJwKJKR:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
  .CQzrpEN2AiSHuCJwKJKR { forced-color-adjust: none; border: 1px solid ButtonText; background: Canvas; box-shadow: none; }
  .CQzrpEN2AiSHuCJwKJKR[data-state="checked"] { background: Highlight; border-color: Highlight; }
  .liwycOoSbQrPNLMN1Xcr { background: ButtonText; box-shadow: none; }
  .liwycOoSbQrPNLMN1Xcr[data-state="checked"] { background: HighlightText; }
  .CQzrpEN2AiSHuCJwKJKR:focus-visible { background: Canvas; }
  .CQzrpEN2AiSHuCJwKJKR:focus-visible .liwycOoSbQrPNLMN1Xcr { background: CanvasText; }
}

/* SwitchCard, BoardUI's settings card on uc- tokens. card = bordered tile; row = list row. */
.lQh5Vu8MYxL4Okl_6gUR { min-width: 0; }

.jqBcqjCyY6vRjXVzGq4A {
  border-radius: var(--uc-radius-12);
  background: var(--uc-surface-raised);
  box-shadow: inset 0 0 0 1px var(--uc-border);
  transition: box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
}
.jqBcqjCyY6vRjXVzGq4A:hover { box-shadow: inset 0 0 0 1px var(--uc-border-strong); }

.XNxHsZLxPGAWaWzgzfDQ + .XNxHsZLxPGAWaWzgzfDQ { border-top: 1px solid var(--uc-border-subtle); }

.jq6asj7a92OA3e3lNa6A {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  -moz-column-gap: var(--uc-space-24);
       column-gap: var(--uc-space-24);
  padding: var(--uc-space-12) var(--uc-space-16);
  cursor: pointer;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard);
}
.jq6asj7a92OA3e3lNa6A:has(> .EX8CZe31UJHbZuOuXxe0) { grid-template-columns: auto minmax(0, 1fr) auto; -moz-column-gap: var(--uc-space-12); column-gap: var(--uc-space-12); }
.jqBcqjCyY6vRjXVzGq4A .jq6asj7a92OA3e3lNa6A { border-radius: var(--uc-radius-12); }
/* Hover tint only while the switch is off; a switched-on row stays flat. */
.jq6asj7a92OA3e3lNa6A:not(:has([data-state="checked"])):hover { background: var(--uc-surface-base); }
.jqBcqjCyY6vRjXVzGq4A:has(> .SpDJhaEfEPq4SKohdtid) .jq6asj7a92OA3e3lNa6A { border-radius: var(--uc-radius-12) var(--uc-radius-12) 0 0; }

.EX8CZe31UJHbZuOuXxe0 {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--uc-text-strong);
}
.EX8CZe31UJHbZuOuXxe0 :where(svg) { width: 16px; height: 16px; }

.ZSpYbdn0bakgODAnWpty { display: flex; flex-direction: column; gap: var(--uc-space-2); min-width: 0; }
.Zl7UEFyLJLXZGV3FOBwX { font-size: var(--uc-text-xs); font-weight: var(--uc-weight-medium); line-height: 1.35; color: var(--uc-text-strong); }
.xuu2HW7tYEqlBx6Z7Tgq { font-size: var(--uc-text-11); line-height: var(--uc-leading-snug); color: var(--uc-text-muted); }
.yfZxwXDJGfY5YhX1SnxF { justify-self: end; }

/* What the setting unlocks: recessed, so it reads as belonging to the row above. */
.SpDJhaEfEPq4SKohdtid {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-12);
  min-width: 0;
  margin: 0 var(--uc-space-16) var(--uc-space-12);
  padding: var(--uc-space-12);
  border-radius: var(--uc-radius-8);
  background: var(--uc-surface-base);
}
/* Nested rows inside an extra panel: no own padding box, hairline from the panel tone. */
.SpDJhaEfEPq4SKohdtid .XNxHsZLxPGAWaWzgzfDQ .jq6asj7a92OA3e3lNa6A { padding: var(--uc-space-10) 0; }
.SpDJhaEfEPq4SKohdtid .XNxHsZLxPGAWaWzgzfDQ .jq6asj7a92OA3e3lNa6A:hover { background: none; }
.SpDJhaEfEPq4SKohdtid .XNxHsZLxPGAWaWzgzfDQ .SpDJhaEfEPq4SKohdtid { margin: 0 0 var(--uc-space-10); background: var(--uc-surface-raised); }

.LROtETnc0Lr3x_vhJ8aD .jq6asj7a92OA3e3lNa6A { cursor: not-allowed; }
.LROtETnc0Lr3x_vhJ8aD .jq6asj7a92OA3e3lNa6A:hover { background: none; }
.LROtETnc0Lr3x_vhJ8aD .ZSpYbdn0bakgODAnWpty { opacity: 0.6; }

@media (max-width: 600px) {
  .jq6asj7a92OA3e3lNa6A { -moz-column-gap: var(--uc-space-12); column-gap: var(--uc-space-12); }
}

/* CheckboxCard, BoardUI's selectable card on uc- tokens. */
.mSV4Ocw1nx8WQCVf30Y5 {
  display: flex;
  align-items: flex-start;
  gap: var(--uc-space-10);
  min-width: 0;
  height: 100%;
  padding: var(--uc-space-10) var(--uc-space-12);
  border-radius: var(--uc-radius-12);
  background: var(--uc-surface-raised);
  box-shadow: inset 0 0 0 1px var(--uc-border);
  cursor: pointer;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard),
    box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
}
.mSV4Ocw1nx8WQCVf30Y5:hover { background: var(--uc-surface-base); }
.mSV4Ocw1nx8WQCVf30Y5:has(.OhkcyXyg3majenzeonx0[data-state="checked"]) { box-shadow: inset 0 0 0 1px var(--uc-border-strong); }
/* The card owns keyboard focus; the checkbox retains its selected state. */
.mSV4Ocw1nx8WQCVf30Y5:has(.OhkcyXyg3majenzeonx0:focus-visible) { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.mSV4Ocw1nx8WQCVf30Y5 .OhkcyXyg3majenzeonx0:focus-visible { outline: none; }

.OhkcyXyg3majenzeonx0 { flex: none; margin-top: 1px; }
.YLmt16KVnfhvADb8q3zk { display: flex; flex-direction: column; gap: var(--uc-space-2); min-width: 0; }
.qPgxqVTsiAPIUPXFdVnh { font-size: var(--uc-text-xs); font-weight: var(--uc-weight-medium); line-height: 1.35; color: var(--uc-text-strong); }
.qHxjQm0nCbZroGa8tyjQ { font-size: var(--uc-text-11); line-height: var(--uc-leading-snug); color: var(--uc-text-muted); }

.VHcB_4JeIrq5e2fFzbEy { cursor: not-allowed; }
.VHcB_4JeIrq5e2fFzbEy:hover { background: var(--uc-surface-raised); }
.VHcB_4JeIrq5e2fFzbEy .YLmt16KVnfhvADb8q3zk { opacity: 0.6; }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .mSV4Ocw1nx8WQCVf30Y5:has(.OhkcyXyg3majenzeonx0:focus-visible) { outline: 2px solid Highlight; outline-offset: -2px; }
  .mSV4Ocw1nx8WQCVf30Y5 { box-shadow: none; }
  .mSV4Ocw1nx8WQCVf30Y5 .OhkcyXyg3majenzeonx0:focus-visible { outline: none; }
}

/* Card, raised surface container on uc- tokens. */
.gT8W3wT5_Ba5VSUAbiaN {
  background: var(--uc-surface-raised);
  border-radius: var(--uc-card-radius, var(--uc-radius-lg));
  box-shadow: var(--uc-shadow-2);
  overflow: hidden;
}
.Oel1VBmZW4zbRXFpwMnS { background: var(--uc-surface-base); box-shadow: none; }
.PmYbFXpbOLRpe8xVBly7 { box-shadow: inset 0 0 0 1px var(--uc-border); }
.ajLMSKKPg9Hd3PPP8Dqu { --uc-card-pad: var(--uc-space-12); }
.vQwV7NnqcyxK5yGD3Kxk {
  cursor: pointer;
  transition: box-shadow var(--uc-dur-base) var(--uc-ease-standard),
    transform var(--uc-dur-base) var(--uc-ease-standard);
}
.vQwV7NnqcyxK5yGD3Kxk:hover { box-shadow: var(--uc-shadow-4); transform: translateY(-2px); }

.Ozaw2N7sweiJhCzrVH9V {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-4);
  padding: var(--uc-card-pad, var(--uc-space-20)) var(--uc-card-pad, var(--uc-space-20)) 0;
}
.e_JQ1Na16LbBnSYsOa8j { font-size: var(--uc-text-lg); font-weight: var(--uc-weight-semibold); color: var(--uc-text-strong); }
.C0gK2PdnQkSK0JKYxUkQ { font-size: var(--uc-text-base); color: var(--uc-text-muted); }
.WBt7GN5IgsrSw13Tt8PW { padding: var(--uc-card-pad, var(--uc-space-20)); display: flex; flex-direction: column; gap: var(--uc-space-12); }
.L7zeltlUg8v8lxbSyP31 {
  display: flex;
  align-items: center;
  gap: var(--uc-space-12);
  padding: var(--uc-space-16) var(--uc-space-20);
  border-top: 1px solid var(--uc-border-subtle);
  background: var(--uc-surface-base);
}
.thxpXRf3z2mbzRJMt6lb { display: block; width: 100%; aspect-ratio: 16 / 9; -o-object-fit: cover; object-fit: cover; background: var(--uc-surface-sunken); }

/* Shared inline notice: neutral surface with the status color on its icon. */
.IILYhd8ntsVVzoTtoCzS {
  display: flex;
  align-items: flex-start;
  gap: var(--uc-space-12);
  padding: var(--uc-space-16);
  border-radius: var(--uc-radius-xl);
  background: var(--uc-surface-raised);
  box-shadow: inset 0 0 0 1px var(--uc-border);
}
.iJqVR9yC7bJdPcF1H148 {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--uc-space-32);
  height: var(--uc-space-32);
  border-radius: var(--uc-radius-md);
  background: var(--_soft, var(--uc-accent-soft));
  color: var(--_fg, var(--uc-accent-fg));
}
.iJqVR9yC7bJdPcF1H148 svg { display: block; }
.fsL4LE6BWTWYXZx1XnR7 {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-self: center;
  gap: var(--uc-space-4);
  min-width: 0;
  overflow-wrap: anywhere;
}
.zdyHEULlvuONmATbuv0B { font-size: var(--uc-text-base); font-weight: var(--uc-weight-semibold); line-height: var(--uc-leading-normal); color: var(--uc-text-strong); }
.Dv0zeaJPLiT4cu2pTtos { font-size: var(--uc-text-sm); line-height: var(--uc-leading-normal); color: var(--uc-text-muted); }

.LFWCFHm_dE4h4xOD3l5b  { --_soft: var(--uc-accent-soft);  --_fg: var(--uc-accent-fg); }
.m17aruYIjxeq7f0zlcDu { --_soft: var(--uc-success-soft); --_fg: var(--uc-success-fg); }
.oP8lfcSNoJtz2jZNaCOS { --_soft: var(--uc-warning-soft); --_fg: var(--uc-warning-fg); }
.XJncEdRViBU7GBdse6PM  { --_soft: var(--uc-danger-soft);  --_fg: var(--uc-danger-fg); }

/* Tooltip, Radix behavior, uc- token look. */
.zL8PtLvN_qxmBr9JJpNb {
  background: var(--uc-text-strong);
  color: var(--uc-text-inverse);
  padding: var(--uc-space-5) var(--uc-space-12);
  border-radius: var(--uc-radius-sm);
  font-size: var(--uc-text-xs);
  font-weight: var(--uc-weight-medium);
  line-height: var(--uc-leading-tight);
  max-width: 240px;
  box-shadow: var(--uc-shadow-4);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  z-index: var(--uc-z-tooltip);
  animation: WoWiPylS53SgKPqicqzK var(--uc-dur-enter) var(--uc-ease-emphasized);
}
.z1QfDdwojgYdst1stf84 { fill: var(--uc-text-strong); }

@keyframes WoWiPylS53SgKPqicqzK {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Dialog, Radix behavior, uc- token look. */
.tLHpNm_FOBexXs6CBi96 {
  position: fixed;
  inset: 0;
  background: oklch(20% 0.01 285 / 0.44);
  backdrop-filter: blur(2px);
  z-index: var(--uc-z-overlay);
  animation: rg8F2pLnEEvaQ9SFhUDe var(--uc-dur-enter) var(--uc-ease-standard);
}
/* centers the dialog + hosts the outside close button */
.WPC3ZWEoy8l8FDXn6KM6 {
  position: fixed;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
  width: min(calc(100vw - var(--uc-space-32)), var(--uc-dialog-w, 480px));
  z-index: var(--uc-z-dialog);
}
.j_Fq8xzwnV0fZ3X6whIJ {
  position: relative;
  width: 100%;
  max-height: calc(100vh - var(--uc-space-48));
  overflow: auto;
  background: var(--uc-surface-base);      /* grey tray */
  border-radius: var(--uc-radius-xl);
  box-shadow: var(--uc-shadow-5);
  padding: var(--uc-space-4);
  animation: q2klsmdheEHvyti7wZU2 var(--uc-dur-enter) var(--uc-ease-emphasized);
}
/* white content card inside the tray, same radius as the dialog + full border */
.RV4l4TibrDbhnzu86BM5 {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-16);
  padding: var(--uc-space-20);           /* 20px equal on all 4 sides */
  background: var(--uc-surface-raised);
  border-radius: var(--uc-radius-xl);
  border: 1px solid var(--uc-border);
  overflow: hidden;
}
/* close button sits just outside the dialog's top-right corner.
   Radix disables pointer-events on the body while the modal is open and only
   re-enables them on its own Content, this button lives outside that Content,
   so it must opt back in explicitly or hover/click fall through to the overlay. */
.e784dW4AlZcPspGNMNkW {
  /* The dialog portals outside the dashboard root, so wp-admin's own button rules
     can reach it: reset what they would add to the glyph (padding, margin, line
     height, tap highlight) and show a focus ring for keyboard focus only. */
  padding: 0;
  margin: 0;
  line-height: 1;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  /* Fade in with the dialog. The dialog animates in (fade + settle) but its close
     button used to appear at once, so for a moment it floated by itself beside a
     half-faded dialog. Same keyframes and timing keep the two in step. */
  animation: q2klsmdheEHvyti7wZU2 var(--uc-dur-enter) var(--uc-ease-emphasized) backwards;
  pointer-events: auto;
  position: absolute;
  top: 0;
  right: calc(100% + var(--uc-space-8));
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  background: var(--uc-surface-raised);
  color: var(--uc-text-strong);
  border-radius: var(--uc-radius-md);
  box-shadow: var(--uc-shadow-control);
  cursor: pointer;
  transition:
    background var(--uc-dur-fast) var(--uc-ease-standard),
    box-shadow var(--uc-dur-fast) var(--uc-ease-standard),
    transform var(--uc-dur-fast) var(--uc-ease-standard),
    color var(--uc-dur-fast) var(--uc-ease-standard);
}
.e784dW4AlZcPspGNMNkW:hover {
  background: var(--uc-surface-sunken);
  color: var(--uc-text-strong);
  box-shadow: var(--uc-shadow-raised);
}
.e784dW4AlZcPspGNMNkW:active {
  transform: translateY(1px);
  box-shadow: var(--uc-shadow-1);
}
.e784dW4AlZcPspGNMNkW:focus-visible {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}
.q_8ukzAV3OUe2odpsEY5 { display: flex; flex-direction: column; gap: var(--uc-space-4); }
/* margin: 0 is load-bearing, the dialog portals to .uc-portal, OUTSIDE the
   #uich-new-dash scope that resets heading/paragraph margins, so without this
   the <h2> title / <p> description inherit the browser's default ~0.83em margin
   and the header reads loose and uneven. Spacing is owned by .header's gap. */
.UfyHB6eiwtZLSk7PepRg { font-size: var(--uc-text-xl); font-weight: var(--uc-weight-semibold); color: var(--uc-text-strong); margin: 0; }
.t_H6WjDbU6wwanCeDD5R { font-size: var(--uc-text-base); color: var(--uc-text-muted); margin: 0; }
.FyNDuWfZcvfpCUzp2FdK { min-width: 0; }
/* footer sits below the card on the grey tray */
.wCgH8U_27aKkRVUNBkwH {
  display: flex;
  justify-content: space-between;        /* secondary left, primary right */
  align-items: center;
  gap: var(--uc-space-16);
  padding: var(--uc-space-20);           /* 20px below/around the white card */
}

@keyframes rg8F2pLnEEvaQ9SFhUDe { from { opacity: 0; } to { opacity: 1; } }
@keyframes q2klsmdheEHvyti7wZU2 {
  from { opacity: 0; transform: translateY(4px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* Narrow screens: the positioner leaves only a 16px margin, so "just outside the corner" is off
   screen. Tuck the close button into the card's top-right corner instead, and keep the header
   text clear of it. */
@media (max-width: 600px) {
  .e784dW4AlZcPspGNMNkW {
    right: auto;
    left: var(--uc-space-12);
    top: var(--uc-space-12);
    z-index: 1;
  }
  .q_8ukzAV3OUe2odpsEY5 { padding-left: var(--uc-space-36); }
}


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .e784dW4AlZcPspGNMNkW:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* Toast, rebuilt on uc- tokens. ONE card — border, shadow and rounded corners
   live on the outer `.tray` only, `overflow: hidden` so the footer's own
   background is clipped to the same radius — with an internal divider line
   separating the icon/title/description row from the optional live
   "closes in N sec" countdown footer. Built on Sonner (see Toast.tsx). */

.uEgf7jDuE3sb8XIhVHwa {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden; /* clips .footer's background to the shared radius */
  border-radius: var(--uc-radius-xl);
  border: 1px solid var(--uc-border-subtle);
  background: var(--uc-surface-raised);
  box-shadow: var(--uc-shadow-4);
}

.HuoQe6UnXU7LEdxGlIFq {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: var(--uc-space-12);
  padding: var(--uc-space-16);
}
.QztwV7_WaaVeiJozwfKA {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: flex-start;
  gap: var(--uc-space-12);
}

.K52K3qbtIuEYY1Lp9HIS {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  /* The icon (24px) is taller than the title's line box (20px); top-aligning
     both leaves the icon sitting ~2px low against the title's optical
     center. Nudge up to match. */
  margin-top: -2px;
}
.K52K3qbtIuEYY1Lp9HIS svg { width: 24px; height: 24px; display: block; }
.KvDwwOF2QnEwXk3hh_7d { color: var(--uc-success); }
.eNw277BwbrUF3EAS8Hur { color: var(--uc-danger); }
.G_2Rr5fjKHGVLFqj6kVU,
.tkQqWV5W8gma_t54UXuK { color: var(--uc-text-strong); }
.xRajrFEIype8bQVnjHT3 { animation: zZ9uDvoK_jCS7GqG3lZA 0.6s linear infinite; }

.SBsc_b8Mbv6JaJMxtcnU {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: var(--uc-space-4);
}
.djBPnRO7iwu0STGhCPFR {
  margin: 0; /* <p> — kill the default block margin, or it stacks on .text's gap */
  font-size: var(--uc-text-base);
  line-height: 20px;
  font-weight: var(--uc-weight-medium);
  color: var(--uc-text-strong);
  word-break: break-word;
}
.eMFAMHuEEfPNU_chAKwC {
  margin: 0; /* <p> — same */
  font-size: var(--uc-text-base);
  line-height: 20px;
  color: var(--uc-text-muted);
  word-break: break-word;
}

.u23WgsL_rBCGJLTinAxB {
  flex-shrink: 0;
  align-self: flex-start;
  border-radius: var(--uc-radius-sm);
  border: 1px solid var(--uc-border-subtle);
  background: var(--uc-surface-raised);
  padding: 3px var(--uc-space-8);
  font-size: var(--uc-text-xs);
  line-height: 16px;
  color: var(--uc-text-strong);
  cursor: pointer;
  box-shadow: var(--uc-shadow-raised);
  transition:
    background var(--uc-dur-fast) var(--uc-ease-standard),
    box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
}
.u23WgsL_rBCGJLTinAxB:hover { background: var(--uc-surface-sunken); }
.u23WgsL_rBCGJLTinAxB:active { box-shadow: var(--uc-shadow-1); }
.u23WgsL_rBCGJLTinAxB:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }

._FghQMfCd6oqErra0P5K {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  padding: var(--uc-space-8) var(--uc-space-16);
  border-top: 1px solid var(--uc-border-subtle);
  background: var(--uc-surface-sunken);
}
.miqo6EOGNRDI4TqUYdZr {
  margin: 0; /* <p> — same default-margin fix as .title/.desc */
  font-size: var(--uc-text-sm);
  line-height: 16px;
  color: var(--uc-text-muted);
  text-align: right;
}
/* Emphasis, not alarm — danger-red on a routine countdown read as an error
   on an otherwise-successful toast. */
.bP11Yisq2h8m4KJ_hKBD { color: var(--uc-text-strong); font-weight: var(--uc-weight-medium); }

/* Sonner container: our card owns the look, we only set its width. */
.gIN5XjDE973nIqn0vJKg {
  width: 426px;
  max-width: calc(100vw - var(--uc-space-32));
}

@keyframes zZ9uDvoK_jCS7GqG3lZA { to { transform: rotate(-360deg); } }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .u23WgsL_rBCGJLTinAxB:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* Accordion, token-driven, chevron rotates, height animates via Radix var. */
.DFGr5k2eRrJnxwR8wIDu {
  border-bottom: 1px solid var(--uc-border-subtle);
}

.GFKvYR3a72nGoScN0tFW {
  margin: 0;
  display: flex;
}

.tvcRj9RnfQDkmcI1jqe4 {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--uc-space-12);
  padding: var(--uc-space-16) var(--uc-space-4);
  font-size: var(--uc-text-base);
  font-weight: var(--uc-weight-semibold);
  color: var(--uc-text-strong);
  cursor: pointer;
}

.tvcRj9RnfQDkmcI1jqe4:focus-visible {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
  border-radius: var(--uc-radius-sm);
}

.kEKgCi8RUSQAuVKmrOgo {
  flex: none;
  color: var(--uc-text-muted);
  transition: transform var(--uc-dur-base) var(--uc-ease-standard);
}

.tvcRj9RnfQDkmcI1jqe4[data-state="open"] .kEKgCi8RUSQAuVKmrOgo {
  transform: rotate(-180deg);
}

.Z8tltYrpVFnQ1kjmShck {
  overflow: hidden;
  font-size: var(--uc-text-base);
  color: var(--uc-text-muted);
}

.Z8tltYrpVFnQ1kjmShck[data-state="open"] {
  animation: C_plQPcmU7qNqKcQyRdB var(--uc-dur-base) var(--uc-ease-standard);
}

.Z8tltYrpVFnQ1kjmShck[data-state="closed"] {
  animation: phgHywz15_vr7TB8HfOi var(--uc-dur-base) var(--uc-ease-standard);
}

.FeUPu6HLKbMSpMC925mj {
  padding: 0 var(--uc-space-4) var(--uc-space-16);
  line-height: var(--uc-leading-normal);
}

@keyframes C_plQPcmU7qNqKcQyRdB {
  from {
    height: 0;
  }

  to {
    height: var(--radix-accordion-content-height);
  }
}

@keyframes phgHywz15_vr7TB8HfOi {
  from {
    height: var(--radix-accordion-content-height);
  }

  to {
    height: 0;
  }
}

/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .tvcRj9RnfQDkmcI1jqe4:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* Slider, monochrome: track = sunken, range = inverse fill, white thumb. */
.H5aErHl8N79x4jLsGaKH {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 20px;
  touch-action: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.mW86s6FpDTNgFoTOQlhK {
  position: relative;
  flex-grow: 1;
  height: 4px;
  border-radius: var(--uc-radius-pill);
  background: var(--uc-surface-sunken);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.XNUcunXw1kFSNjBNSUYp { position: absolute; height: 100%; border-radius: var(--uc-radius-pill); background: var(--uc-inverse-bg); }
.kx5WKhAYaB6fdNKGgc2p {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--uc-surface-raised);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--uc-border-strong);
  cursor: grab;
}
.kx5WKhAYaB6fdNKGgc2p:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.kx5WKhAYaB6fdNKGgc2p:active { cursor: grabbing; }
.H5aErHl8N79x4jLsGaKH[data-disabled] { opacity: 0.5; }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .kx5WKhAYaB6fdNKGgc2p:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
  .mW86s6FpDTNgFoTOQlhK { forced-color-adjust: none; background: CanvasText; box-shadow: none; }
  .XNUcunXw1kFSNjBNSUYp { forced-color-adjust: none; background: Highlight; }
  .kx5WKhAYaB6fdNKGgc2p { forced-color-adjust: none; box-sizing: border-box; border: 1px solid ButtonText; background: Canvas; box-shadow: none; }
}

/* Popover, light raised surface, soft elevation. */
.IgtxSpnrWCwpAiEUyVSV {
  min-width: 200px;
  background: var(--uc-surface-raised);
  color: var(--uc-text);
  border: 1px solid var(--uc-border-subtle);
  border-radius: var(--uc-radius-md);
  box-shadow: var(--uc-shadow-4);
  padding: var(--uc-space-16);
  font-size: var(--uc-text-base);
  z-index: var(--uc-z-dropdown);
  animation: IrisfxJ9u8Ano9jbOQyR var(--uc-dur-enter) var(--uc-ease-emphasized);
}
.IgtxSpnrWCwpAiEUyVSV:focus-visible { outline: none; }

@keyframes IrisfxJ9u8Ano9jbOQyR { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }

/* Separator, subtle hairline in either orientation. */
.R8avrtTyuO0UDSY9TLVT { background: var(--uc-border-subtle); flex: none; }
.R8avrtTyuO0UDSY9TLVT[data-orientation="horizontal"] { height: 1px; width: 100%; }
.R8avrtTyuO0UDSY9TLVT[data-orientation="vertical"] { width: 1px; height: 100%; align-self: stretch; }

/* Toggle, ghost by default, inverse fill when on. */
.sU0JLjylwFNHfT1l3y0v {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--uc-space-6);
  height: var(--uc-control-h-md);
  min-width: var(--uc-control-h-md);
  padding: 0 var(--uc-space-10);
  border-radius: var(--uc-radius-sm);
  font-size: var(--uc-text-base);
  color: var(--uc-text-muted);
  background: transparent;
  cursor: pointer;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard),
    color var(--uc-dur-fast) var(--uc-ease-standard);
}
.sU0JLjylwFNHfT1l3y0v:hover { background: var(--uc-surface-sunken); color: var(--uc-text-strong); }
.sU0JLjylwFNHfT1l3y0v:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.sU0JLjylwFNHfT1l3y0v[data-state="on"] { background: var(--uc-inverse-bg); color: var(--uc-inverse-fg); }
.sU0JLjylwFNHfT1l3y0v[data-disabled] { opacity: 0.5; cursor: not-allowed; }

.iXArTg5PgOy_bFknlxwp { height: var(--uc-control-h-sm); min-width: var(--uc-control-h-sm); font-size: var(--uc-text-sm); padding: 0 var(--uc-space-8); }
.ymjpn0oXx850od60T2Xh { height: var(--uc-control-h-lg); min-width: var(--uc-control-h-lg); font-size: var(--uc-text-md); padding: 0 var(--uc-space-12); }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .sU0JLjylwFNHfT1l3y0v:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* ToggleGroup, sunken tray; selected item lifts to a raised white pill. */
.RiaHcNaRvgF5_WF4Twlu {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-sunken);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
}
.cJtc7DytBy6twvBNrgYW {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--uc-space-6);
  height: calc(var(--uc-control-h-md) - 4px);
  min-width: calc(var(--uc-control-h-md) - 4px);
  padding: 0 var(--uc-space-12);
  border-radius: var(--uc-radius-sm);
  font-size: var(--uc-text-base);
  font-weight: var(--uc-weight-medium);
  color: var(--uc-text-muted);
  cursor: pointer;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard),
    color var(--uc-dur-fast) var(--uc-ease-standard),
    box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
}
.cJtc7DytBy6twvBNrgYW:hover { color: var(--uc-text-strong); }
.cJtc7DytBy6twvBNrgYW:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.cJtc7DytBy6twvBNrgYW[data-state="on"] { background: var(--uc-surface-raised); color: var(--uc-text-strong); box-shadow: var(--uc-shadow-1); }
.cJtc7DytBy6twvBNrgYW[data-disabled] { opacity: 0.5; cursor: not-allowed; }

.DbZTGhST2zu9kqObbddw { height: calc(var(--uc-control-h-sm) - 4px); font-size: var(--uc-text-sm); padding: 0 var(--uc-space-8); }
.zcrHMHPyeAgqN6i_TtjU { height: calc(var(--uc-control-h-lg) - 4px); font-size: var(--uc-text-md); padding: 0 var(--uc-space-16); }

/* ContextMenu, dark popover, item highlight follows the pointer/keys. */
.ObF2WajmmJIdcSbDcPA6 {
  min-width: 180px;
  background: var(--uc-surface-overlay);
  border-radius: var(--uc-radius-md);
  box-shadow: var(--uc-shadow-4);
  padding: var(--uc-space-4);
  z-index: var(--uc-z-dropdown);
  animation: KtINbZCxWPggCCFOcqVH var(--uc-dur-enter) var(--uc-ease-emphasized);
}
.joVkdb04kUqg2MfkTxh4 {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: var(--uc-space-8);
  height: var(--uc-control-h-md);
  padding: 0 var(--uc-space-12);
  border-radius: var(--uc-radius-sm);
  font-size: var(--uc-text-base);
  color: var(--uc-text);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.joVkdb04kUqg2MfkTxh4[data-highlighted] { background: var(--uc-surface-hover, var(--uc-surface-control)); color: var(--uc-text-strong); }
.joVkdb04kUqg2MfkTxh4[data-disabled] { color: var(--uc-text-subtle); pointer-events: none; }
.Uu01aIUKmmYABm_IsZN7 { color: var(--uc-danger-fg); }
.hAgu97V1LKZK2OyKpDG7 {
  padding: var(--uc-space-8) var(--uc-space-12) var(--uc-space-4);
  font-size: var(--uc-text-xs);
  font-weight: var(--uc-weight-medium);
  letter-spacing: var(--uc-tracking-wide);
  text-transform: uppercase;
  color: var(--uc-text-subtle);
}
.A_nxlFZ5ayD0PHwN8RmO { height: 1px; background: var(--uc-border-subtle); margin: var(--uc-space-4) 0; }

@keyframes KtINbZCxWPggCCFOcqVH { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: none; } }

/* Label, form label typography. */
.vuPUoTZPfAR5m6X8v_zh {
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-6);
  font-size: var(--uc-text-sm);
  font-weight: var(--uc-weight-medium);
  color: var(--uc-text-strong);
  line-height: var(--uc-leading-snug);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.vuPUoTZPfAR5m6X8v_zh[data-disabled] { color: var(--uc-text-subtle); cursor: not-allowed; }

/* TreeView, nested rows on uc- tokens. Indent = one 16px step per level,
   driven by --_level so a row never needs to know its depth in CSS. */
.O1Lm5zLRTkFTeFLZdPwg {
  --_row-h: 32px;
  --_indent: 16px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-sm);
}
.WN0LkPjcL9OL50i0ffhq { --_row-h: 26px; --_indent: 14px; font-size: var(--uc-text-xs); }

.JanLU7ieQhK3fUa9uqxS {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--uc-space-4);
  min-width: 0;
  height: var(--_row-h);
  padding: 0 calc(var(--uc-space-4) + var(--_level) * var(--_indent)) 0 var(--uc-space-6);
  border-radius: var(--uc-radius-sm);
  color: var(--uc-text);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  outline: none;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard), color var(--uc-dur-fast) var(--uc-ease-standard);
}
.JanLU7ieQhK3fUa9uqxS:hover { background: var(--uc-surface-control); color: var(--uc-text-strong); }
.JanLU7ieQhK3fUa9uqxS:focus-visible { box-shadow: inset 0 0 0 2px var(--uc-ring); }
.U1xBnaHeqwSiuRL73Hwh,
.U1xBnaHeqwSiuRL73Hwh:hover { background: var(--uc-inverse-bg); color: var(--uc-inverse-fg); }
.HrnlPiQdBhWzfcW6EXsz { opacity: 0.5; cursor: not-allowed; }

/* One line per ancestor level, drawn as a repeating background so it costs a
   single element however deep the row is. */
.djccq0p42XhaatJNuAiw {
  position: absolute;
  top: 0;
  bottom: 0;
  right: calc(var(--uc-space-4) + 9px);
  width: calc(var(--_level) * var(--_indent));
  background-image: linear-gradient(to left, var(--uc-border-subtle) 1px, transparent 1px);
  background-size: var(--_indent) 100%;
  pointer-events: none;
}
.U1xBnaHeqwSiuRL73Hwh .djccq0p42XhaatJNuAiw { opacity: 0; }

.GYzfu1rXE89DpYwvJvc0,
.YnsaDX8s4dF9C8IWMDo5 {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: var(--uc-radius-xs);
  color: var(--uc-text-muted);
}
.GYzfu1rXE89DpYwvJvc0:hover { background: var(--uc-surface-control); color: var(--uc-text-strong); }
.U1xBnaHeqwSiuRL73Hwh .GYzfu1rXE89DpYwvJvc0 { color: inherit; }
.GYzfu1rXE89DpYwvJvc0 svg { transition: transform var(--uc-dur-base) var(--uc-ease-emphasized); }
.S87D5020Ka6ROYS6WT1U svg { transform: rotate(-90deg); }

.E7Qh1g_buMB82tpL29JU { flex: none; display: grid; place-items: center; width: 16px; height: 16px; color: var(--uc-text-muted); }
.U1xBnaHeqwSiuRL73Hwh .E7Qh1g_buMB82tpL29JU { color: inherit; }

.i7iOjbAYHhrjhFw3uMfH { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.y8HoWv14WDguOg4huzhN {
  flex: none;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--uc-text-muted);
  font-family: var(--uc-font-mono, ui-monospace, monospace);
  --uich-ff: var(--uc-font-mono, ui-monospace, monospace);
  font-size: var(--uc-text-2xs, 11px);
}
.U1xBnaHeqwSiuRL73Hwh .y8HoWv14WDguOg4huzhN { color: inherit; }

/* Actions show on hover and keyboard focus only, so a resting tree is just names. */
.tmsKBhyR0BVwb7M6vLXZ { flex: none; display: none; align-items: center; gap: 2px; margin-left: calc(var(--uc-space-4) * -1); }
.JanLU7ieQhK3fUa9uqxS:hover .tmsKBhyR0BVwb7M6vLXZ,
.JanLU7ieQhK3fUa9uqxS:focus-within .tmsKBhyR0BVwb7M6vLXZ,
.JanLU7ieQhK3fUa9uqxS:focus-visible .tmsKBhyR0BVwb7M6vLXZ { display: inline-flex; }
.JanLU7ieQhK3fUa9uqxS:hover .y8HoWv14WDguOg4huzhN,
.JanLU7ieQhK3fUa9uqxS:focus-visible .y8HoWv14WDguOg4huzhN { display: none; }

@media (prefers-reduced-motion: reduce) {
  .JanLU7ieQhK3fUa9uqxS, .GYzfu1rXE89DpYwvJvc0 svg { transition: none; }
}

/* ScrollArea, thin token-styled scrollbars that fade in on hover. */
.S6t0k8vIF2BgEmWoruVS { overflow: hidden; }
.Ymb1tUEYhyCulKD4M2Kd { width: 100%; height: 100%; border-radius: inherit; }
.gub_S62WoZUYFrtXAsps {
  display: flex;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  touch-action: none;
  padding: 2px;
  background: transparent;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard);
}
.gub_S62WoZUYFrtXAsps:hover { background: var(--uc-surface-sunken); }
.gub_S62WoZUYFrtXAsps[data-orientation="vertical"] { width: 10px; }
.gub_S62WoZUYFrtXAsps[data-orientation="horizontal"] { flex-direction: column; height: 10px; }
.LRlTFNaG2bPn3AnQjljF {
  flex: 1;
  background: var(--uc-border-strong);
  border-radius: var(--uc-radius-pill);
  position: relative;
}
/* enlarge the invisible hit target so the thin thumb is easy to grab */
.LRlTFNaG2bPn3AnQjljF::before {
  content: "";
  position: absolute;
  inset: -4px;
}

/* TagInput, a token field on uc- tokens. The box copies Input's .shell (fill,
   inset ring, hover, neutral keyboard focus ring, radius) but grows in height so
   the chips can wrap. [class] keeps the inner input above wp-admin's
   input[type] rules, as in Input.module.css. */
.PNrZsWQDPgfpDFIQDdLH { display: flex; flex-direction: column; gap: var(--uc-space-8); width: 100%; min-width: 0; }

.sG8i2AKt656r9kdIRhPR {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--uc-space-4);
  width: 100%;
  min-height: var(--uc-input-h, var(--uc-control-h-md));
  padding: var(--uc-space-4) var(--uc-space-8);
  box-sizing: border-box;
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-base);
  color: var(--uc-text-strong);
  background: var(--uc-surface-overlay);
  background-image: linear-gradient(to bottom, oklch(0% 0 0 / 0.02), transparent);
  border-radius: var(--uc-input-radius, var(--uc-radius-md));
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-input);
  transition: box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
  cursor: text;
}
.sG8i2AKt656r9kdIRhPR:hover:not(:focus-within) { box-shadow: inset 0 0 0 1px var(--uc-text-subtle), var(--uc-shadow-input); }
.sG8i2AKt656r9kdIRhPR:has(.jPpldC2W869OWB3Qi7iE:focus-visible) { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.kyzpjDxK04uEFH0OXFan { min-height: var(--uc-control-h-sm); font-size: var(--uc-text-sm); padding: var(--uc-space-3) var(--uc-space-6); }
.DgKAk2c65Ltr3nMvn9_b { color: var(--uc-text-subtle); background: var(--uc-surface-sunken); box-shadow: inset 0 0 0 1px var(--uc-border); cursor: not-allowed; }

.Vpha_gjWolO_6QIAxpA1 { flex: none; display: grid; place-items: center; margin-left: var(--uc-space-2); color: var(--uc-text-subtle); }

.jPpldC2W869OWB3Qi7iE[class] {
  flex: 1 1 64px;
  min-width: 64px;
  height: 22px;
  min-height: 0;
  margin: 0;
  padding: 0 var(--uc-space-2);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  font: inherit;
  --uich-ff: inherit;
  font-weight: var(--uc-weight-regular);
  line-height: normal;
  color: inherit;
}
.jPpldC2W869OWB3Qi7iE[class]:focus { box-shadow: none; outline: none; }
.jPpldC2W869OWB3Qi7iE[class]::-moz-placeholder { color: var(--uc-text-subtle); }
.jPpldC2W869OWB3Qi7iE[class]::placeholder { color: var(--uc-text-subtle); }
.jPpldC2W869OWB3Qi7iE[class]:disabled { cursor: not-allowed; background: transparent; }

/* Added tags: the DS Chip on a grey fill. Chip's default fill is the white
   control surface, the same as this field, so it would read as bare text. */
.sG8i2AKt656r9kdIRhPR .hRxupUJSBLxIlTY07TF9 { --_bg: var(--uc-surface-sunken); --_fg: var(--uc-text-strong); --_bg-hover: var(--uc-surface-sunken); }

/* Suggestions: existing tags as one-click chips under the field. Outlined with
   a "+", so they read as "add this" rather than as tags already added. */
.DLdW_O2d4P1EMBWNaceT .LhXrdwMqopE6LpuwQyAh {
  --_bg: transparent;
  --_fg: var(--uc-text);
  --_bg-hover: var(--uc-surface-sunken);
  --_fg-hover: var(--uc-text-strong);
  box-shadow: inset 0 0 0 1px var(--uc-border-strong);
}
.DLdW_O2d4P1EMBWNaceT .LhXrdwMqopE6LpuwQyAh:hover { box-shadow: inset 0 0 0 1px var(--uc-text-subtle); }
.DLdW_O2d4P1EMBWNaceT { display: flex; flex-wrap: wrap; align-items: center; gap: var(--uc-space-4); }
.zaPIIqmmCwSjCoj9QksH { margin-left: var(--uc-space-2); font-size: var(--uc-text-xs); color: var(--uc-text-muted); }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .sG8i2AKt656r9kdIRhPR:has(.jPpldC2W869OWB3Qi7iE:focus-visible) { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* LinkButton, a text-only action on uc- tokens (BoardUI Link Button look).
   primary: ink · secondary: muted → ink on hover · disabled: subtle. */

.F3TffuAmG5ropBRI_sPr {
  --_fg: var(--uc-text-strong);
  --_fg-hover: var(--uc-text-strong);
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-4);
  max-width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--_fg);
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-weight: var(--uc-weight-medium);
  text-decoration: none;
  text-underline-offset: 3px;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  transition: color var(--uc-dur-fast) var(--uc-ease-standard);
}
.B4VIceu3ndNJ1GNJupPV {
  --_fg: var(--uc-text-muted);
  --_fg-hover: var(--uc-text-strong);
}

/* Sizes: Button's scale, line-height = the control's text box. */
.A4FxIVSomlGsL6P9FA56 { font-size: var(--uc-text-base); line-height: 20px; }
.CVrVPq4uhKdWJoANTfEP { font-size: var(--uc-text-sm);   line-height: 18px; }
.tu6uv4wksqk8_MdC2aEy { font-size: var(--uc-text-xs);   line-height: 16px; }

/* Underline sits on the label only, so an icon never gets a stray line. */
.AkUbZD5s9sdu22gDIZcQ { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.F3TffuAmG5ropBRI_sPr:hover:not(.ZPFdB1iXYP_FE2dRauOJ) { color: var(--_fg-hover); }
.F3TffuAmG5ropBRI_sPr:hover:not(.ZPFdB1iXYP_FE2dRauOJ) .AkUbZD5s9sdu22gDIZcQ { text-decoration: underline; text-decoration-thickness: 1px; }

.F3TffuAmG5ropBRI_sPr:focus-visible {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
  border-radius: var(--uc-radius-xs);
}

.ZPFdB1iXYP_FE2dRauOJ { --_fg: var(--uc-text-subtle); cursor: not-allowed; }

/* Icons follow the size: 16 / 14 / 12px, currentColor. */
.whjbd7LK38RZFapIzSAp { flex: none; display: inline-flex; }
.whjbd7LK38RZFapIzSAp > svg { display: block; }
.A4FxIVSomlGsL6P9FA56 .whjbd7LK38RZFapIzSAp > svg { width: 16px; height: 16px; }
.CVrVPq4uhKdWJoANTfEP .whjbd7LK38RZFapIzSAp > svg { width: 14px; height: 14px; }
.tu6uv4wksqk8_MdC2aEy .whjbd7LK38RZFapIzSAp > svg { width: 12px; height: 12px; }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .F3TffuAmG5ropBRI_sPr:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* CloseButton, a circular ✕ on uc- tokens (BoardUI Close Button look).
   rest: sunken fill + muted glyph · hover: ink glyph on a deeper fill. */

.QOTbMy4b_y0ucC5M9MA5 {
  all: unset;
  box-sizing: border-box;
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: var(--uc-radius-pill);
  background: var(--uc-surface-sunken);
  color: var(--uc-text-muted);
  cursor: pointer;
  transition: background var(--uc-dur-fast) var(--uc-ease-standard),
    color var(--uc-dur-fast) var(--uc-ease-standard);
}
.QOTbMy4b_y0ucC5M9MA5:hover:not(:disabled) {
  background: color-mix(in srgb, var(--uc-surface-sunken), var(--uc-text-strong) 8%);
  color: var(--uc-text-strong);
}
.QOTbMy4b_y0ucC5M9MA5:active:not(:disabled) {
  background: color-mix(in srgb, var(--uc-surface-sunken), var(--uc-text-strong) 14%);
}
.QOTbMy4b_y0ucC5M9MA5:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.QOTbMy4b_y0ucC5M9MA5:disabled { opacity: 0.5; cursor: not-allowed; }
.QOTbMy4b_y0ucC5M9MA5 > svg { display: block; }

/* Size classes can't start with a digit, hence the `size` prefix. */
.WHBVgcb71sx41ukmtx_L { width: 16px; height: 16px; }
.UEcQwCSg3YWnDDfAKPzE  { width: 20px; height: 20px; }
.BDOXAhByJuaA7L8n8wpi  { width: 24px; height: 24px; }
.JhTFTE5OcPS5hafm71v9  { width: 32px; height: 32px; }


/* System-colour focus remains visible when shadows and fills are suppressed. */
@media (forced-colors: active) {
  .QOTbMy4b_y0ucC5M9MA5:focus-visible { outline: 2px solid Highlight; outline-offset: -2px; }
}

.uiGA6MBvXHSXvJmdsPuK {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--uc-space-8);
  padding: var(--uc-space-8);
}

/* Tabs.indicatorPill owns the shared sheen, radius and motion treatment.
   The extra attribute keeps these overrides independent of stylesheet order. */
.fDnWj5RgvELiDo7CoRtS[data-slot="navigation-rail-indicator"] {
  top: 0;
  bottom: auto;
  right: 0;
  height: 0;
  width: 0;
  transition: transform var(--uc-dur-base) var(--uc-ease-emphasized),
    width var(--uc-dur-base) var(--uc-ease-emphasized),
    height var(--uc-dur-base) var(--uc-ease-emphasized);
}

/* Preserve each chrome surface's existing secondary selected finish. */
.uiGA6MBvXHSXvJmdsPuK[data-surface="light"] .fDnWj5RgvELiDo7CoRtS[data-slot="navigation-rail-indicator"] {
  background-color: var(--uc-surface-control);
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-raised);
}
.uiGA6MBvXHSXvJmdsPuK[data-surface="dark"] .fDnWj5RgvELiDo7CoRtS[data-slot="navigation-rail-indicator"] {
  background-color: var(--uc-surface-raised);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle), var(--uc-shadow-control);
}

.aRTFmUG1nCDUDyAa9KTy {
  position: relative;
  z-index: 1;
}

/* No stationary selected tile competes with the single travelling pill.
   Unselected ghost hover and native focus outlines remain owned by Button. */
.aRTFmUG1nCDUDyAa9KTy[aria-pressed="true"],
.aRTFmUG1nCDUDyAa9KTy[aria-pressed="true"]:is(:hover, :focus, :focus-visible, :active) {
  color: var(--uc-text-strong);
  background: transparent;
  box-shadow: none;
}
.aRTFmUG1nCDUDyAa9KTy[aria-pressed="true"]::before,
.aRTFmUG1nCDUDyAa9KTy[aria-pressed="true"]:is(:hover, :focus, :focus-visible, :active)::before { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .fDnWj5RgvELiDo7CoRtS[data-slot="navigation-rail-indicator"] { transition: none; }
}

/* composer-pro-upsell.css — the Free plan's Pro surfaces (composer-pro.jsx,
   chat-upsell.jsx): the PRO badge, the lock card, the upgrade modal and the
   locked AI Chat preview.

   One look for all of them, the panel's own card style: a dark grey box
   (--uc-surface-raised) holding darker cards (--uc-surface-base), hairline
   borders, and UiChemy orange (--uc-brand) as the only colour — on the badge
   and on the one Upgrade button. Every token has its dark value as a fallback,
   so a surface portalled outside `.uc-chrome` still reads right. Free only:
   none of this renders on a Pro site (each component returns null there). */

.uc-pro {
  --uc-pro-box: var(--uc-surface-raised, #202020);
  --uc-pro-card: var(--uc-surface-base, #171717);
  --uc-pro-line: var(--uc-border-subtle, #333333);
  --uc-pro-text: var(--uc-text, #a3a3a3);
  --uc-pro-strong: var(--uc-text-strong, #ffffff);
  --uc-pro-muted: var(--uc-text-muted, #737373);
  --uc-pro-brand: var(--uc-brand, #fd6a35);
  --uc-pro-brand-soft: rgba(253, 106, 53, 0.12);
  --uc-pro-brand-line: rgba(253, 106, 53, 0.32);
  font-family: var(--uc-font-sans, inherit);
  --uich-ff: var(--uc-font-sans, inherit);
  color: var(--uc-pro-text);
  box-sizing: border-box;
}
.uc-pro *, .uc-pro *::before, .uc-pro *::after { box-sizing: border-box; }

/* ---- PRO badge --------------------------------------------------------- */
.uc-pro-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 16px;
  margin-right: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(253, 106, 53, 0.12);
  box-shadow: inset 0 0 0 1px rgba(253, 106, 53, 0.32);
  color: var(--uc-brand, #fd6a35);
  font: 600 9.5px/1 var(--uc-font-sans, ui-sans-serif, system-ui, sans-serif);
  --uich-ff: var(--uc-font-sans, ui-sans-serif, system-ui, sans-serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---- Shell: the DS Dialog's card shell ---------------------------------
   Same build as the design system's Dialog (Dialog.module.css): a dark tray
   with a 4px inset holding one raised, bordered card, and the actions on the
   tray below the card — secondary left, Upgrade right. Used in the panel (the
   Chat tab, the Code lock) and as the upgrade modal. */
.uc-pro-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 4px;
  border-radius: 16px;
  background: var(--uc-surface-base, #171717);
  /* In the panel the tray sits on the panel's own colour, so it carries a
     hairline; the modal adds its shadow on top. */
  box-shadow: inset 0 0 0 1px var(--uc-pro-line);
  text-align: right;
}
.uc-pro-shell__card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 12px;
  background: var(--uc-surface-raised, #202020);
  border: 1px solid var(--uc-border, #404040);
}
.uc-pro-shell__head { display: flex; align-items: flex-start; gap: 12px; }
/* Icon tile: a darker square inside the card, the icon in orange. */
.uc-pro-shell__ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--uc-surface-base, #171717);
  box-shadow: inset 0 0 0 1px var(--uc-pro-line);
  color: var(--uc-pro-brand);
}
.uc-pro-shell__titles { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 1px; }
.uc-pro-shell__title {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--uc-pro-strong);
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
}
.uc-pro-shell__sub,
.uc-pro-shell__msg { margin: 0; color: var(--uc-pro-text); font-size: 12px; line-height: 17px; }

/* Benefits: rows inside the card, split by hairlines. */
.uc-pro-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.uc-pro-list__row { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 0; }
.uc-pro-list__row:first-child { padding-top: 0; }
.uc-pro-list__row:last-child { padding-bottom: 0; }
.uc-pro-list__row + .uc-pro-list__row { border-top: 1px solid var(--uc-pro-line); }
.uc-pro-list__ic { display: inline-flex; flex: none; margin-top: 1px; color: var(--uc-pro-strong); opacity: 0.85; }
.uc-pro-list__tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.uc-pro-list__t { color: var(--uc-pro-strong); font-size: 12.5px; font-weight: 500; line-height: 17px; }
.uc-pro-list__d { color: var(--uc-pro-muted); font-size: 11.5px; line-height: 16px; }

/* Actions on the tray: secondary left, Upgrade right. */
.uc-pro-shell__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 8px;
}
.uc-pro-shell__foot--end { justify-content: flex-end; gap: 8px; }
/* Modal: one full-width Upgrade, Maybe later centred under it. */
.uc-pro-shell__foot--stack { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 8px 8px; }
.uc-pro-shell__foot--stack > .uc-pro-cta { width: 100%; height: 36px; }
.uc-pro-shell__foot--stack > .uc-pro-link { align-self: center; }
.uc-pro-shell__note { color: var(--uc-pro-muted); font-size: 11.5px; line-height: 16px; }
/* Compare plans: the quiet second choice beside Upgrade. */
.uc-pro-sec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--uc-surface-raised, #202020);
  box-shadow: inset 0 0 0 1px var(--uc-border, #404040);
  color: var(--uc-pro-strong) !important;
  font: 500 12.5px/1 var(--uc-font-sans, inherit);
  --uich-ff: var(--uc-font-sans, inherit);
  text-decoration: none !important;
  white-space: nowrap;
}
.uc-pro-sec:hover { box-shadow: inset 0 0 0 1px var(--uc-border-strong, #525252); }
.uc-pro-sec:focus-visible { outline: 2px solid var(--uc-ring, currentColor); outline-offset: -2px; }

/* Modal header row: on the tray, above the card (Cofounder's upgrade sheet). */
.uc-pro-shell__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 10px 8px;
}
.uc-pro-shell__bar-title { color: var(--uc-pro-strong); font-size: 14px; font-weight: 600; line-height: 20px; }
.uc-pro-shell__x {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--uc-pro-muted);
  cursor: pointer;
}
.uc-pro-shell__x:hover { background: var(--uc-surface-hover, rgba(255, 255, 255, 0.05)); color: var(--uc-pro-strong); }
.uc-pro-shell__x:focus-visible { outline: 2px solid var(--uc-ring, currentColor); outline-offset: -2px; }
.uc-pro-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: none;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--uc-pro-brand);
  color: #fff !important;
  font: 600 12.5px/1 var(--uc-font-sans, inherit);
  --uich-ff: var(--uc-font-sans, inherit);
  text-decoration: none !important;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.uc-pro-cta:hover { filter: brightness(1.08); }
.uc-pro-cta:active { transform: translateY(1px); }
.uc-pro-cta:focus-visible { outline: 2px solid var(--uc-ring, currentColor); outline-offset: -2px; }
.uc-pro-link {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--uc-pro-muted) !important;
  font: 500 12px/1 var(--uc-font-sans, inherit);
  --uich-ff: var(--uc-font-sans, inherit);
  text-decoration: none !important;
  cursor: pointer;
}
.uc-pro-link:hover { color: var(--uc-pro-strong) !important; }

/* A lock standing in for a whole pane (Code tab): centred, capped width. */
.uc-pro-lock { display: flex; justify-content: center; width: 100%; padding: 12px; }
.uc-pro-lock > .uc-pro-shell { max-width: 360px; }

/* ---- Upgrade modal ------------------------------------------------------ */
.uc-pro-modal__overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  animation: uc-pro-fade 0.15s ease;
  /* Opened over a modal DS Dialog (the Globals window), it sits outside that
     dialog, where Radix sets pointer-events: none on <body>; inherited, it left
     the popup unclickable (no close, no outside click: the screen froze). */
  pointer-events: auto;
}
.uc-pro-modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  animation: uc-pro-rise 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.uc-pro-modal > .uc-pro-shell { box-shadow: inset 0 0 0 1px var(--uc-pro-line), 0 28px 64px -16px rgba(0, 0, 0, 0.75); }
@keyframes uc-pro-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes uc-pro-rise { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .uc-pro-modal__overlay, .uc-pro-modal { animation: none; }
}

/* ---- Locked AI Chat preview (chat-upsell.jsx) ---------------------------
   The Pro chat's own layout — mark, question, chips, prompt box — so Free
   shows what the feature is, with the unlock card above a locked prompt. */
/* `.chat2-wrap` (the Chat slot's wrapper, a grid in composer.css) is in the
   selector so this flex column wins whichever stylesheet loads last. */
.chat2-wrap.uc-fchat,
.uc-fchat {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  /* The Pro chat's own fill (.chat2-main), so the locked preview is the same
     grey as the real chat and the builder's rail. Inside the panel
     --uc-surface-base is a step darker. */
  background: var(--panel-bg, var(--uc-surface-base, #171717));
}
.uc-fchat__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
}
.uc-fchat__mark { display: inline-flex; line-height: 0; }
.uc-fchat__head { display: flex; flex-direction: column; gap: 4px; }
.uc-pro .uc-fchat__title { margin: 0; color: var(--uc-pro-strong); font-size: 15px; font-weight: 600; line-height: 20px; }
.uc-pro .uc-fchat__note { margin: 0; color: var(--uc-pro-muted); font-size: 12px; line-height: 17px; }
.uc-fchat__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-pro .uc-fchat__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--uc-pro-box);
  box-shadow: inset 0 0 0 1px var(--uc-pro-line);
  color: var(--uc-pro-text);
  font: 500 12px/1 var(--uc-font-sans, inherit);
  --uich-ff: var(--uc-font-sans, inherit);
  cursor: pointer;
}
.uc-fchat__chip:hover { color: var(--uc-pro-strong); box-shadow: inset 0 0 0 1px var(--uc-border, #404040); }
.uc-fchat__foot { display: flex; flex-direction: column; flex: none; padding: 0 12px 12px; }
/* The prompt box, locked: same frame as the real one, reads as unavailable. */
.uc-pro .uc-fchat__prompt {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-height: 92px;
  padding: 12px;
  border: 0;
  border-radius: 16px;
  background: var(--uc-pro-box);
  box-shadow: inset 0 0 0 1px var(--uc-pro-line);
  text-align: right;
  cursor: pointer;
}
.uc-fchat__placeholder { flex: 1; color: var(--uc-pro-muted); font: 400 13px/18px var(--uc-font-sans, inherit); --uich-ff: var(--uc-font-sans, inherit); }
.uc-fchat__promptbar { display: flex; align-items: center; justify-content: space-between; color: var(--uc-pro-muted); }
.uc-fchat__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--uc-pro-card);
  color: var(--uc-pro-muted);
}
/* The prompt sits over the tray's tucked top edge. */
.uc-fchat__prompt { position: relative; z-index: 1; }
.uc-fchat__plus { display: inline-flex; color: var(--uc-pro-muted); }
/* The tray under the prompt box: where the Pro chat keeps its Widget / Page
   row (composer-dock.css .chat-status), same 12px tuck and grey wash. */
.uc-fchat__tray {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -12px 10px 0;
  padding: 18px 10px 6px 6px;
  border-radius: 0 0 12px 12px;
  background: rgba(128, 128, 128, 0.12);
}
.uc-fchat__tray-text { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--uc-pro-text); font-size: 11.5px; line-height: 16px; }
.uc-fchat__tray-text > svg { flex: none; }
.uc-pro .uc-fchat__tray-cta { height: 24px; padding: 0 10px; border-radius: 6px; font-size: 11.5px; font-weight: 600; }
.uc-fchat__prompt:hover { box-shadow: inset 0 0 0 1px var(--uc-border, #404040); }
.uc-fchat__prompt:focus-visible,
.uc-fchat__chip:focus-visible { outline: 2px solid var(--uc-ring, currentColor); outline-offset: -2px; }

/* composer-isolation.css clears the background of every link and button on
   hover / focus / active (it shields the panel from theme styles). These
   controls paint their own fill, so they keep it in those states. The modal
   focuses its Upgrade button on open, which is how the reset first showed. */
.uc-pro .uc-pro-cta:is(:hover, :focus, :focus-visible, :focus-within, :active) { background: var(--uc-pro-brand); }
.uc-pro .uc-fchat__chip:is(:hover, :focus, :focus-visible, :focus-within, :active),
.uc-pro .uc-fchat__prompt:is(:hover, :focus, :focus-visible, :focus-within, :active) { background: var(--uc-pro-box); }
.uc-pro .uc-pro-sec:is(:hover, :focus, :focus-visible, :focus-within, :active) { background: var(--uc-surface-raised, #202020); }
.uc-pro .uc-pro-shell__x:is(:hover, :focus, :focus-visible, :focus-within, :active) { background: var(--uc-surface-hover, rgba(255, 255, 255, 0.05)); }
.uc-pro .uc-pro-link:is(:hover, :focus, :focus-visible, :focus-within, :active) { background: none; }
/* A <button> Upgrade (the chat tray's) also meets the isolation reset's
   resting button rules, so its fill is pinned at the same strength. */
.uc-pro .uc-pro-cta { background: var(--uc-pro-brand); color: #fff; }

/* The Composer Builder scopes Tailwind's preflight to its panels (.uich-tw),
   and there it loads after this file: `.uich-tw [type="button"]` clears a
   button's fill at the same weight as the rules above, which left Upgrade
   white on the grey tray and the chips and prompt box unfilled. One class
   more keeps the fills wherever the preflight lands. (The title, note, chip
   and prompt rules carry `.uc-pro` for the same reason: `.uich-tw h3` / `p` /
   `button` reset their font.) */
.uc-pro.uc-fchat .uc-pro-cta { background: var(--uc-pro-brand); }
.uc-pro.uc-fchat :is(.uc-fchat__chip, .uc-fchat__prompt) { background: var(--uc-pro-box); }
/* The same on hover / focus, where composer.css's `.uich-tw` button reset
   (0,3,0, loaded later) clears the fill and colour of any button without a
   `bg-` class: Upgrade went blank under the pointer. */
.uc-pro.uc-fchat .uc-pro-cta:is(:hover, :focus, :focus-visible) { background: var(--uc-pro-brand); color: #fff; }
.uc-pro.uc-fchat :is(.uc-fchat__chip, .uc-fchat__prompt):is(:hover, :focus, :focus-visible) { background: var(--uc-pro-box); }
.uc-pro.uc-fchat .uc-fchat__chip:is(:hover, :focus, :focus-visible) { color: var(--uc-pro-strong); }

/* Tabs and Combobox retain their shared design-system styling. */
.cpicker-global-tabs { min-width: 0; gap: var(--uc-space-12, 12px); }
.cpicker-global-tabs > [role="tablist"] { width: 100%; }
.cpicker-global-tabs > [role="tablist"] > [role="tab"] { flex: 1; min-width: 0; }
.cpicker-global-tabs > [role="tabpanel"] { margin: 0; min-width: 0; }
.cpicker-global-swatch {
  display: block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--uc-border-subtle);
  border-radius: var(--uc-radius-xs);
}

/* Legacy composer form rules can force a light field to keep white glyphs,
   particularly WebKit autofill. Bridge only this editable picker to its DS
   surface's semantic foreground, including the Global search field. */
.cpicker-popover {
  --text-hi: var(--uc-text-strong);
  --uich-text: var(--uc-text-strong);
}
.uich-tw .cpicker-popover input[data-uc="input"] {
  color: var(--uc-text-strong) !important;
  -webkit-text-fill-color: var(--uc-text-strong) !important;
  caret-color: var(--uc-text-strong);
}
.uich-tw .cpicker-popover input[data-uc="input"]::-moz-placeholder {
  color: var(--uc-text-muted) !important;
  -webkit-text-fill-color: var(--uc-text-muted) !important;
}
.uich-tw .cpicker-popover input[data-uc="input"]::placeholder {
  color: var(--uc-text-muted) !important;
  -webkit-text-fill-color: var(--uc-text-muted) !important;
}

.uipb-tb__screen{--accent: var(--uc-inverse-bg);--accent-dark: #000000;--accent-2: #404040;--accent-wash: var(--uc-brand-glow-hover);--accent-soft: var(--uc-brand-soft);--accent-soft2: var(--uc-brand-glow-press);--accent-mid: var(--uc-brand-border);--accent-line: var(--uc-inverse-bg);--secondary: var(--uc-accent);--secondary-dark: #000000;--secondary-btn: var(--uc-accent-soft);--secondary-btn-dark: #E5E5E5;--ink: var(--uc-text-strong);--ink-2: var(--uc-text);--ink-3: var(--uc-text-muted);--ink-4: var(--uc-text-subtle);--ghost-ink: var(--uc-text);--paper: var(--uc-surface-base);--paper-2: var(--uc-surface-sunken);--card: var(--uc-surface-raised);--tray: color-mix(in srgb, var(--card) 55%, var(--paper));--paper-light: var(--uc-surface-base);--line: var(--uc-border);--line-2: var(--uc-border-subtle);--hover-fill: var(--uc-surface-sunken);--ghost-fill: var(--uc-surface-sunken);--code-bg: #171717;--code-fg: #E5E5E5;--code-key: #D4D4D4;--status-ok: var(--uc-success);--status-ok-bg: var(--uc-success-soft);--status-warn: var(--uc-danger);--status-warn-bg: var(--uc-danger-soft);--status-err: var(--uc-danger);--status-err-bg: var(--uc-danger-soft);--ring-ok: var(--uc-success-border);--ring-err: var(--uc-danger-border);--premium: var(--uc-brand);--premium-2: #000000;--lime: var(--uc-accent);--violet-700: var(--uc-brand);--violet-50: var(--uc-brand-soft);--r-btn: var(--uc-radius-6);--r-ctl: var(--uc-radius-4);--r-sm: var(--uc-radius-4);--r-card: var(--uc-radius-12);--r-lg: var(--uc-radius-16);--r-pill: var(--uc-radius-6);--sh-rest: var(--uc-shadow-1);--sh-50: var(--uc-shadow-1);--sh-100: var(--uc-shadow-2);--sh-pop: var(--uc-shadow-4);--focus-ring: 0 0 0 3px var(--uc-brand-glow-press);--sh-card: var(--uc-shadow-1);--sh-pop-legacy: var(--uc-shadow-4);--sh-accent: var(--uc-shadow-2);--shadow-brand-sm: none;--t: var(--uc-dur-fast);--ease: var(--uc-ease-standard);--spring: cubic-bezier(.34, 1.56, .64, 1);--press: scale(.9);--press-lg: scale(.97);--font-display: var(--uc-font-sans);--font-body: var(--uc-font-sans);--font-mono: var(--uc-font-mono);--fs-h1: 18px;--lh-h1: 24px;--fs-h2: 16px;--lh-h2: 24px;--fs-h3: 14px;--lh-h3: 21px;--fs-h4: 12px;--lh-h4: 18px;--fs-h5: 10px;--lh-h5: 15px}.uipb-tb__screen .tb-viewtoggle{display:inline-flex;gap:2px;padding:3px;border:1px solid var(--line);border-radius:var(--r-btn);background:var(--paper-2)}.uipb-tb__screen .tb-viewtoggle button{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border:0;background:none;border-radius:calc(var(--r-btn) - 2px);font-family:var(--font-body);font-size:12px;font-weight:500;color:var(--ink-3);cursor:pointer}.uipb-tb__screen .tb-viewtoggle button[data-state=on]{background:var(--card);color:var(--ink);box-shadow:var(--sh-rest)}.uipb-tb__screen .tb-body{margin-top:22px;display:flex;flex-direction:column;gap:18px}.uipb-tb__screen .tb-alert{margin:0}.uipb-tb__screen .tb-grid-wrap{display:flex;flex-direction:column;gap:16px}.uipb-tb__screen .tb-toolbar{display:flex;align-items:center;gap:12px}.uipb-tb__screen .tb-hint{margin:0;font-size:12px;color:var(--ink-4)}.uipb-tb__screen .tb-typetabs{display:flex;gap:8px;flex:1 1 auto;min-width:0;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}.uipb-tb__screen .tb-typetabs::-webkit-scrollbar{display:none}.uipb-tb__screen .tb-typetab{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;white-space:nowrap;padding:5px 13px;border:1px solid var(--line);border-radius:999px;background:var(--card);font-family:var(--font-body);font-size:12px;color:var(--ink-3);cursor:pointer;transition:background .12s ease,color .12s ease,border-color .12s ease}.uipb-tb__screen .tb-typetab:hover{color:var(--ink);border-color:var(--line-2)}.uipb-tb__screen .tb-typetab.is-on{background:var(--ink);border-color:var(--ink);color:var(--card)}.uipb-tb__screen .tb-typetab__crown{color:inherit}.uipb-tb__screen .tb-lockpanel{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:16px 18px;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--paper-2)}.uipb-tb__screen .tb-lockpanel__ic{flex:0 0 auto;width:40px;height:40px;display:grid;place-items:center;border-radius:var(--r-card);background:var(--card);border:1px solid var(--line);color:var(--ink)}.uipb-tb__screen .tb-lockpanel__body{flex:1 1 220px;min-width:0}.uipb-tb__screen .tb-lockpanel__body b{font-size:14px;font-weight:500;color:var(--ink)}.uipb-tb__screen .tb-lockpanel__body p{margin:3px 0 0;font-size:12.5px;line-height:1.5;color:var(--ink-3)}.uipb-tb__screen .tb-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));gap:16px}.uipb-tb__screen .tb-card{display:flex;flex-direction:column;gap:10px;padding:10px;background:var(--tray)}.uipb-tb__screen .tb-card__inner{display:flex;flex-direction:column;gap:12px;padding:14px;background:var(--card);border-radius:var(--r-card);border:1px solid var(--line)}.uipb-tb__screen .tb-card__top{display:flex;align-items:center;gap:10px}.uipb-tb__screen .tb-card__avatar{flex:0 0 auto;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--paper-2);color:var(--ink)}.uipb-tb__screen .tb-card__titles{flex:1 1 auto;min-width:0}.uipb-tb__screen .tb-card__title{margin:0;font-size:14px;font-weight:500;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uipb-tb__screen .tb-status-switch{flex:0 0 auto;display:inline-flex;align-items:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.uipb-tb__screen .tb-card__thumb{position:relative;overflow:hidden;border:1px solid var(--line);border-radius:var(--r-card)}.uipb-tb__screen .tb-card__foot{display:flex;gap:6px;margin-top:2px}.uipb-tb__screen .tb-card__foot>*{flex:1 1 auto;min-width:0}.uipb-tb__screen .tb-card__fbtn{width:100%;justify-content:center;gap:6px;padding-inline:10px;white-space:nowrap}.uipb-tb__screen .tb-card__fbtn svg{flex:none}.uipb-tb__screen .tb-card__foot>.tb-card__fbtn--icon{flex:none;width:auto;aspect-ratio:1;padding-inline:0}.uipb-tb__screen .tb-card__fbtn-label{min-width:0;overflow:hidden;text-overflow:ellipsis}.uipb-tb__screen .tb-thumb{position:relative;height:150px;width:100%;overflow:hidden;background:var(--paper-2)}.uipb-tb__screen .tb-thumb__fade{pointer-events:none;position:absolute;inset-inline:0;bottom:0;height:72px;background:linear-gradient(to top, var(--card), transparent)}.uipb-tb__screen .tb-thumb__empty{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--ink-4);font-size:11px;font-weight:500}.uipb-tb__screen .tb-thumb__ic{display:inline-flex;width:44px;height:44px;align-items:center;justify-content:center;border-radius:var(--r-card);background:var(--card);border:1px solid var(--line);color:var(--ink)}.uipb-tb__screen .tb-card--skel{gap:10px}.uipb-tb__screen .tb-skel-thumb{height:176px;width:100%;border-radius:var(--r-card)}.uipb-tb__screen .tb-skel-line{height:12px;width:60%;border-radius:6px}.uipb-tb__screen .tb-skel-line--sm{width:40%}.uipb-tb__screen .tb-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;padding:56px 24px;border:1px dashed var(--line-2);border-radius:var(--r-lg)}.uipb-tb__screen .tb-empty__ic{width:46px;height:46px;display:grid;place-items:center;border-radius:999px;background:var(--paper-2);color:var(--ink-4);margin-bottom:8px}.uipb-tb__screen .tb-empty__title{margin:0;font-size:14px;font-weight:500;color:var(--ink)}.uipb-tb__screen .tb-empty__sub{margin:2px 0 0;max-width:360px;font-size:12.5px;line-height:1.5;color:var(--ink-3)}.uipb-tb__screen .tb-cv{position:relative;flex:1 1 auto;width:100%;min-height:560px;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:grab;border:1px solid var(--line);border-radius:var(--r-lg);background:radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--line-2), transparent 30%) 1px, transparent 0) 0 0/26px 26px,var(--tray)}.uipb-tb__screen .tb-cv--grabbing{cursor:grabbing}.uipb-tb__screen .tb-cv--fs{border-radius:0;background-color:var(--tray)}.uipb-tb__screen .tb-cv__loading,.uipb-tb__screen .tb-cv__error{position:absolute;z-index:5;font-size:13px}.uipb-tb__screen .tb-cv__loading{inset:0;display:grid;place-items:center;color:var(--ink-3)}.uipb-tb__screen .tb-cv__error{inset-inline:12px;top:12px;padding:8px 14px;border-radius:var(--r-card);border:1px solid var(--uc-danger-border);background:var(--uc-danger-soft);color:var(--uc-danger-fg)}.uipb-tb__screen .tb-cv__world{position:absolute;right:0;top:0;transform-origin:top right}.uipb-tb__screen .tb-cv__edges{position:absolute;right:0;top:0;overflow:visible;pointer-events:none}.uipb-tb__screen .tb-cv__hub{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 14px;text-align:center;border-radius:var(--r-card);background:var(--uc-brand);color:var(--uc-brand-on);box-shadow:var(--uc-shadow-3)}.uipb-tb__screen .tb-cv__hub-name{max-width:100%;font-size:13px;font-weight:600}.uipb-tb__screen .tb-cv__hub-url,.uipb-tb__screen .tb-cv__hub-gaps{max-width:100%;font-size:10px;opacity:.8}.uipb-tb__screen .tb-cv__hub-name,.uipb-tb__screen .tb-cv__hub-url,.uipb-tb__screen .tb-cv__hub-gaps{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uipb-tb__screen .tb-cv__cat{position:absolute;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--line);border-radius:var(--r-card);background:var(--card);box-shadow:var(--uc-shadow-1)}.uipb-tb__screen .tb-cv__cat-ic{flex:0 0 auto;width:26px;height:26px;display:grid;place-items:center;border-radius:var(--r-sm);background:var(--uc-brand);color:var(--uc-brand-on)}.uipb-tb__screen .tb-cv__cat-label{flex:1 1 auto;min-width:0;font-size:13px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uipb-tb__screen .tb-cv__cat-count,.uipb-tb__screen .tb-cv__cat-pro{flex:0 0 auto}.uipb-tb__screen .tb-cv__cat-pro{gap:2px}.uipb-tb__screen .tb-cv__card{position:absolute;display:flex;flex-direction:column;cursor:grab;border:1px solid var(--line);border-radius:var(--r-card);background:var(--card);box-shadow:var(--uc-shadow-1);transition:box-shadow var(--t) var(--ease),border-color var(--t) var(--ease)}.uipb-tb__screen .tb-cv__card:hover{box-shadow:var(--uc-shadow-3);border-color:var(--line-2)}.uipb-tb__screen .tb-cv__card:active{cursor:grabbing}.uipb-tb__screen .tb-cv__card{box-shadow:none}.uipb-tb__screen .tb-cv__card:hover{box-shadow:0 1px 2px rgba(16,18,32,.04),0 10px 22px -16px rgba(16,18,32,.26)}.uipb-tb__screen .tb-cv__edge{display:none}.uipb-tb__screen .tb-cv__flag{position:absolute;left:0;top:0;width:30px;height:30px;overflow:hidden;border-top-left-radius:var(--r-card);pointer-events:none;display:grid;place-items:start end;color:#fff}.uipb-tb__screen .tb-cv__flag::before{content:"";position:absolute;inset:0;clip-path:polygon(100% 0, 0 0, 100% 100%)}.uipb-tb__screen .tb-cv__flag>svg{position:relative;margin:4px 0 0 4px}.uipb-tb__screen .tb-cv__flag--active::before{background:var(--uc-ok, #0a875a)}.uipb-tb__screen .tb-cv__flag--missing::before{background:var(--uc-danger, #cf4f4f)}.uipb-tb__screen .tb-cv__handle{position:absolute;right:50%;top:-4px;width:8px;height:8px;transform:translateX(50%);border:1px solid var(--line-2, var(--line));border-radius:999px;background:var(--card);pointer-events:none}.uipb-tb__screen .tb-cv__handle--out{top:auto;bottom:-4px}.uipb-tb__screen .tb-cv__handle--on-brand{background:var(--uc-brand);border-color:color-mix(in srgb, var(--uc-brand-on), transparent 60%)}.uipb-tb__screen .tb-cv__edge--active{background:var(--uc-ok, #0a875a)}.uipb-tb__screen .tb-cv__edge--inactive{background:#c9922f}.uipb-tb__screen .tb-cv__edge--missing{background:#cf4f4f}.uipb-tb__screen .tb-cv__edge--empty{background:var(--line)}.uipb-tb__screen .tb-cv__edge--pro{background:var(--uc-brand-soft)}.uipb-tb__screen .tb-cv__glyph{flex:0 0 auto;display:grid;place-items:center;width:20px;height:20px;color:var(--muted)}.uipb-tb__screen .tb-cv__card-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:12px 16px 0;padding:14px 0 16px;border-top:1px solid var(--line)}.uipb-tb__screen .tb-cv__act{display:inline-flex;align-items:center;gap:6px;min-width:0;font-size:14px;font-weight:500;letter-spacing:-0.35px;line-height:17.5px;color:var(--uc-brand)}.uipb-tb__screen .tb-cv__act-n{flex:0 0 auto;font-family:var(--uc-font-mono);font-style:normal;font-size:12px;color:var(--faint, var(--muted))}.uipb-tb__screen .tb-cv__card-head{display:flex;align-items:center;gap:8px;padding:16px 16px 0 30px}.uipb-tb__screen .tb-cv__card .tb-cv__card-title{margin:0;font-size:16px;font-weight:500;letter-spacing:-0.4px;line-height:20px;color:var(--ink);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uipb-tb__screen .tb-cv__card .tb-cv__card-sub{margin:8px 16px 0;font-size:14px;font-weight:500;line-height:17.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uipb-tb__screen .tb-cv__sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.uipb-tb__screen .tb-cv__card--pro{opacity:.9}.uipb-tb__screen .tb-cv__pro{display:grid;place-items:center;color:var(--uc-brand)}.uipb-tb__screen .tb-cv__scrim{position:absolute;inset:0;z-index:30;display:grid;place-items:center;padding:16px;background:rgba(0,0,0,.44);backdrop-filter:blur(2px)}.uipb-tb__screen .tb-cv__modal{position:relative;display:flex;flex-direction:column;width:min(560px,94%);height:-moz-fit-content;height:fit-content;max-height:86%;align-self:center;justify-self:center;border-radius:var(--uc-radius-xl, 16px);background:var(--uc-surface-base, #f4f4f4);box-shadow:var(--uc-shadow-5);padding:var(--uc-space-4, 4px)}.uipb-tb__screen .tb-cv__modal-close{position:absolute;top:0;right:calc(100% + 8px);width:32px;height:32px;display:grid;place-items:center;border:0;padding:0;cursor:pointer;background:var(--uc-surface-raised, #fff);color:var(--ink);border-radius:var(--r-md, 8px);box-shadow:var(--uc-shadow-control);transition:background .12s ease,box-shadow .12s ease,transform .12s ease}.uipb-tb__screen .tb-cv__modal-close:hover{background:var(--uc-surface-sunken, #ebebeb);box-shadow:var(--uc-shadow-raised)}.uipb-tb__screen .tb-cv__modal-close:active{transform:translateY(1px);box-shadow:var(--uc-shadow-1)}.uipb-tb__screen .tb-cv__modal-close:focus-visible{outline:2px solid var(--uc-ring);outline-offset:2px}.uipb-tb__screen .tb-cv__modal-card{display:flex;flex-direction:column;gap:16px;min-height:0;padding:20px;background:var(--uc-surface-raised, #fff);border:1px solid var(--uc-border, var(--line));border-radius:var(--uc-radius-xl, 16px);overflow:hidden}.uipb-tb__screen .tb-cv__modal-head{display:flex;flex-direction:column;gap:4px}.uipb-tb__screen .tb-cv__modal-titlerow{display:flex;align-items:center;gap:8px}.uipb-tb__screen .tb-cv__modal-title{margin:0;font-size:18px;font-weight:600;letter-spacing:-0.01em;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uipb-tb__screen .tb-cv__modal-sub{margin:0;font-size:13px;color:var(--ink-3)}.uipb-tb__screen .tb-cv__modal-body{flex:1 1 auto;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:8px}.uipb-tb__screen .tb-cv__modal-foot{display:flex;justify-content:flex-start;padding:14px 12px 4px}.uipb-tb__screen .tb-cv__row{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--line);border-radius:var(--r-card);background:var(--paper)}.uipb-tb__screen .tb-cv__row--off{opacity:.8}.uipb-tb__screen .tb-cv__row-main{flex:1 1 auto;min-width:0}.uipb-tb__screen .tb-cv__row-title{display:block;font-size:13px;font-weight:500;color:var(--ink);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uipb-tb__screen .tb-cv__row-title:hover{text-decoration:underline}.uipb-tb__screen .tb-cv__row-meta{font-size:11px;color:var(--ink-3)}.uipb-tb__screen .tb-cv__row-act{flex:0 0 auto;display:grid;place-items:center;width:26px;height:26px;border:0;padding:0;background:none;cursor:pointer;border-radius:var(--r-sm);color:var(--ink-3)}.uipb-tb__screen .tb-cv__row-act:hover{background:var(--paper-2);color:var(--ink)}.uipb-tb__screen .tb-cv__row-act--danger:hover{color:var(--uc-danger-fg)}.uipb-tb__screen .tb-cv__empty{display:flex;flex-direction:column;align-items:center;gap:12px;padding:30px 16px;text-align:center;border:1px dashed var(--line-2);border-radius:var(--r-card)}.uipb-tb__screen .tb-cv__empty p{margin:0;font-size:13px;color:var(--ink-3)}.uipb-tb__screen .tb-cv__lock{display:flex;flex-direction:column;align-items:center;gap:8px;padding:26px 18px;text-align:center;border:1px dashed var(--line-2);border-radius:var(--r-card)}.uipb-tb__screen .tb-cv__lock-ic{width:42px;height:42px;display:grid;place-items:center;border-radius:var(--r-card);background:var(--uc-brand-soft);color:var(--uc-brand)}.uipb-tb__screen .tb-cv__lock b{font-size:14px;font-weight:600;color:var(--ink)}.uipb-tb__screen .tb-cv__lock p{margin:0;max-width:380px;font-size:12.5px;line-height:1.55;color:var(--ink-3)}.uipb-tb__screen .tb-cv__fs{position:absolute;left:12px;top:12px;z-index:10;display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 10px;border:1px solid var(--line);border-radius:var(--r-card);background:var(--paper);color:var(--ink);font-size:12px;font-weight:500;cursor:pointer;box-shadow:var(--uc-shadow-1)}.uipb-tb__screen .tb-cv__fs:hover{background:var(--paper-2)}.uipb-tb__screen .tb-cv__zoom{position:absolute;right:12px;bottom:12px;z-index:10;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line);border-radius:var(--r-card);background:var(--paper);box-shadow:var(--uc-shadow-1)}.uipb-tb__screen .tb-cv__zoom button{width:32px;height:32px;display:grid;place-items:center;border:0;background:none;color:var(--ink);cursor:pointer}.uipb-tb__screen .tb-cv__zoom button+button{border-top:1px solid var(--line)}.uipb-tb__screen .tb-cv__zoom button:hover{background:var(--paper-2)}.uipb-tb__screen .tb-cv__mini{position:absolute;left:12px;bottom:12px;z-index:10;overflow:hidden;border:1px solid var(--line);border-radius:var(--r-card);background:color-mix(in srgb, var(--paper) 90%, transparent);box-shadow:var(--uc-shadow-1)}.uipb-tb__screen{font-family:var(--font-body);color:var(--ink)}.uipb-tb__screen .dash{width:100%;padding:20px 24px 32px;font-size:14px;line-height:1.6}.uipb-tb__screen .dash__head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}.uipb-tb__screen .dash__head h1{margin:0;font-size:18px;line-height:26px;font-weight:500;color:var(--ink)}.uipb-tb__screen .dash__head p{margin:4px 0 0;font-size:12px;line-height:1.5;font-weight:400;color:var(--ink-3)}.uipb-tb__screen .tb-body{margin-top:16px}
/**
 * Display-conditions dialog — the rules that belong to ThemeBuilderConditions.jsx.
 *
 * Imported by the component rather than kept in the dashboard's app.scss, so
 * the dialog is styled wherever it is mounted: the Theme Builder screens, and
 * the Composer Builder's screen, which opens it from Publish and does not load
 * the dashboard's stylesheet.
 *
 * DS Dialog/Select render at document.body, so these are global and read the
 * --uc-* tokens the .uc-portal wrapper resolves.
 */
/* --wide unified to the global 480px (was 680). */
.uc-portal:has(.tb-dlg--wide) { width: min(calc(100vw - 32px), 480px); }

/* Conditions dialog: the whole dialog used to be the scroller, so a long list
   of rules pushed the title and the Save button out of sight. Now only the rule
   list scrolls and the header + footer stay put. */
.tb-dlg:has(.tb-cond) { display: flex; flex-direction: column; overflow: hidden; }
.tb-dlg:has(.tb-cond) .tb-dlg__card { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.tb-dlg:has(.tb-cond) .tb-cond {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  /* Scroll after ~5 rules instead of letting the dialog grow to 90vh first: the
     list is meant to stay a small, fixed panel, not fill the screen. */
  max-height: min(46vh, 300px);
}

.tb-cond { display: flex; flex-direction: column; gap: 8px; }
/* One bordered group holding the rows + the Add-condition button, so the whole
   conditions list reads as a single card (rows separated by hairline dividers,
   add-condition as the last in-group row). */
.tb-cond__group {
  border: 1px solid var(--uc-border); border-radius: 10px; overflow: hidden;
  /* Never shrink: the body is the scroller, and a squeezed group would clip its
     own last rows (and the Add button) out of reach, since it hides overflow to
     keep the rounded corners. */
  flex: 0 0 auto;
}
.tb-cond__group .tb-rule { border: 0; border-radius: 0; border-bottom: 1px solid var(--uc-border); }
.tb-cond__add {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 10px 12px; border: 0; background: none; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--uc-text-strong);
  transition: background var(--uc-dur-fast) var(--uc-ease-standard);
}
.tb-cond__add:hover { background: var(--uc-surface-sunken); }
.tb-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--uc-border); border-radius: 10px; }
/* The selects SHRINK to share the row. They used to keep the design system's
   180px min-width, so as soon as anything narrowed the row (the scrollbar that
   appears once the list is long) the remove button wrapped onto a line of its
   own and every rule grew from ~48px to ~95px — which is what made the dialog
   balloon with many conditions. Two classes here to outrank the DS `.trigger`. */
.tb-rule .tb-sel { flex: 1 1 140px; min-width: 0; }
.tb-rule .tb-sel--sm { flex: 0 1 112px; min-width: 0; }
/* The value takes its own full-width line below the selects, so the remove
   button sits inline top-right instead of being pushed onto its own row. Scopes
   that need no value render nothing, and an empty line would still cost the
   row's 8px gap, so it is removed outright. */
.tb-rule__val { flex: 1 1 100%; order: 1; display: flex; align-items: center; min-width: 0; }
.tb-rule__val:empty { display: none; }
.tb-rule__tax { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tb-rule__any { font-size: 12px; color: var(--uc-text-muted); }
/* Row remove, a premium icon button aligned top-right with the selects. */
.tb-rule__x {
  order: 0; margin-right: auto; flex: none;
  width: 30px; height: 30px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--uc-border); border-radius: 8px;
  background: var(--uc-surface-raised); color: var(--uc-text-muted);
  font-size: 15px; line-height: 1; cursor: pointer;
  transition: color var(--uc-dur-fast) var(--uc-ease-standard), border-color var(--uc-dur-fast) var(--uc-ease-standard), background var(--uc-dur-fast) var(--uc-ease-standard);
}
.tb-rule__x:hover { color: var(--uc-danger); border-color: var(--uc-danger); background: var(--uc-surface-sunken); }
/* Chip remove (taxonomy chips) keeps the small bare glyph. */
.tb-chip__x { border: 0; background: none; cursor: pointer; color: var(--uc-text-muted); font-size: 15px; line-height: 1; padding: 2px 6px; }
.tb-chip__x:hover { color: var(--uc-danger); }
.tb-sel { min-width: 150px; }
.tb-sel--sm { min-width: 104px; }

/* Rule-type dropdown. It carries ~20 entries now, so it is capped to the room
   Radix measured below the trigger (minus the content's own 4px padding) and
   scrolls inside instead of running off the bottom of the screen. */
.tb-typelist [data-radix-select-viewport] {
  max-height: min(340px, calc(var(--radix-select-content-available-height, 340px) - 8px));
}
.tb-typelist__head {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--uc-text-subtle);
  pointer-events: none;
  position: relative;
  z-index: 1;
}
/* The sliding-highlight <span> is the viewport's first child, so the first
   heading is the first div, not the first child. */
.tb-typelist__head:first-of-type { padding-top: 4px; }
.tb-search { position: relative; min-width: 180px; flex: 1 1 auto; }
.tb-search__pop { position: absolute; z-index: 50; margin-top: 4px; max-height: 200px; width: 100%; overflow: auto; border: 1px solid var(--uc-border); background: var(--uc-surface-raised, #fff); border-radius: 8px; box-shadow: var(--uc-shadow-4); padding: 4px; }
.tb-search__opt { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 0; background: none; cursor: pointer; border-radius: 6px; text-align: right; font-size: 13px; color: var(--uc-text); }
.tb-search__opt:hover { background: rgba(0, 0, 0, .05); }
.tb-search__opt-k { flex: 0 0 auto; font-size: 11px; color: var(--uc-text-muted); }
.tb-chip { gap: 4px; }
/* A "Particular Post / Page" rule can name several pages: the chosen ones stack
   above the search field rather than replacing it. */
.tb-search-multi { display: flex; min-width: 180px; flex: 1 1 auto; flex-direction: column; gap: 6px; }
.tb-search-multi__chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* The card gutter every Theme Builder dialog uses (app.scss has it for the
   others). Parent-scoped: a bare `.tb-dlg__card` ties with Dialog.module.css's
   own `.card` and would win or lose on stylesheet order. */
.tb-dlg .tb-dlg__card { padding: 20px; gap: 12px; }
/* The searchable select renders an absolutely-positioned dropdown; the card's
   default overflow:hidden would cut it off mid-list. */
.tb-dlg .tb-dlg__card--flow { overflow: visible; }

/*
 * Fonts bundled locally instead of loaded from Google Fonts, so the plugin
 * makes no external request. These @font-face rules also serve the React
 * composer build (index.css), which is always enqueued alongside this
 * stylesheet in the editor.
 *
 * - Plus Jakarta Sans — variable (400–700), SIL Open Font License 1.1.
 *   See assets/fonts/plus-jakarta-sans/OFL.txt
 * - Roboto — variable (400–700), Apache License 2.0.
 *   See assets/fonts/roboto/LICENSE.txt
 */
@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(fonts/plus-jakarta-sans-latin.463dfad0.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Plus Jakarta Sans';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(fonts/plus-jakarta-sans-latin-ext.0a7ba6e2.woff2) format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(fonts/roboto-latin.8cccfdd7.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(fonts/roboto-latin-ext.8d93aa6d.woff2) format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	--uichemy-composer-panel-bg: #f7f8f9;
	--uichemy-composer-header-bg: #ffffff;
	--uichemy-composer-tab-bg: #eceef0;
	--uichemy-composer-tab-active-bg: #ffffff;
	--uichemy-composer-input-bg: #ffffff;
	--uichemy-composer-border-color: #d5dadf;
	--uichemy-composer-text-color: #556068;
	--uichemy-composer-text-muted: #000000;
	--uichemy-composer-accent-color: #6a7380;
	--uichemy-composer-header-text: #556068;
	--uichemy-composer-col-bg: #ffffff;
	--uichemy-composer-resizer-bg: #d5dadf;
	--uichemy-composer-resizer-handle: #a4afb7;
	--uichemy-composer-active-indicator: #6a7380;
	--uichemy-composer-code-tabs-bg: #eceef0;
	--uichemy-composer-code-tab-bg: #ffffff;
	--uichemy-composer-code-tab-border: #d5dadf;
	--uichemy-composer-code-tab-color: #556068;
	--uichemy-composer-code-tab-hover-bg: #f7f8f9;
	--uichemy-composer-code-tab-active-bg: #ffffff;
	--uichemy-composer-code-tab-active-border: #6a7380;
	--uichemy-composer-code-tab-active-color: #6a7380;
	--uichemy-composer-tooltip-bg: #111317;
	--uichemy-composer-tooltip-color: #d9dee6;
	--uichemy-composer-tooltip-border: #3a4048;
	--uichemy-composer-globals-root-bg: #ffffff;
	--uichemy-composer-globals-status-bg: #f7f8f9;
	--uichemy-composer-globals-status-text: #8a93a0;
	--uichemy-composer-chip-bg: #eceef0;
	--uichemy-composer-chip-border: #d5dadf;
	--uichemy-composer-chip-color: #556068;
	--uichemy-composer-chip-hover-bg: #e4e7ea;
	--uichemy-composer-popover-bg: #ffffff;
	--uichemy-composer-popover-border: #d5dadf;
	--uichemy-composer-popover-shadow: rgba(0, 0, 0, 0.12);
	--uichemy-composer-cm-bg: #ffffff;
	--uichemy-composer-cm-color: #556068;
	--uichemy-composer-cm-gutter-bg: #f7f8f9;
	--uichemy-composer-cm-gutter-border: #d5dadf;
	--uichemy-composer-cm-gutter-color: #a4afb7;
	--uichemy-composer-cm-cursor: #556068;
	--uichemy-composer-cm-selected: rgba(106, 115, 128, 0.15);
	--uichemy-composer-cm-active-line: rgba(106, 115, 128, 0.05);
	--uichemy-composer-cm-comment: #7f8b99;
	--uichemy-composer-cm-string: #448c27;
	--uichemy-composer-cm-number: #d9b37a;
	--uichemy-composer-cm-keyword: #770088;
	--uichemy-composer-cm-tag: #e06c4a;
	--uichemy-composer-cm-attribute: #c9b37d;
	--uichemy-composer-cm-property: #569cd6;
	--uichemy-composer-cm-variable: #556068;
	--uichemy-composer-cm-error: rgba(198, 80, 80, 0.1);
	--uichemy-composer-color-scheme: light;
}

#smart-html-floating-panel[data-uich-composer-theme="light"],
.smart-html-floating-panel[data-uich-composer-theme="light"],
#uichemy-composer-floating-panel[data-uich-composer-theme="light"],
.uichemy-composer-floating-panel[data-uich-composer-theme="light"],
body[data-uich-composer-theme="light"] {--uichemy-composer-panel-bg: #f7f8f9;
	--uichemy-composer-header-bg: #ffffff;
	--uichemy-composer-tab-bg: #eceef0;
	--uichemy-composer-tab-active-bg: #ffffff;
	--uichemy-composer-input-bg: #ffffff;
	--uichemy-composer-border-color: #d5dadf;
	--uichemy-composer-text-color: #556068;
	--uichemy-composer-text-muted: #000000;
	--uichemy-composer-accent-color: #6a7380;
	--uichemy-composer-header-text: #556068;
	--uichemy-composer-col-bg: #ffffff;
	--uichemy-composer-resizer-bg: #d5dadf;
	--uichemy-composer-resizer-handle: #a4afb7;
	--uichemy-composer-active-indicator: #6a7380;
	--uichemy-composer-code-tabs-bg: #eceef0;
	--uichemy-composer-code-tab-bg: #ffffff;
	--uichemy-composer-code-tab-border: #d5dadf;
	--uichemy-composer-code-tab-color: #556068;
	--uichemy-composer-code-tab-hover-bg: #f7f8f9;
	--uichemy-composer-code-tab-active-bg: #ffffff;
	--uichemy-composer-code-tab-active-border: #6a7380;
	--uichemy-composer-code-tab-active-color: #6a7380;
	--uichemy-composer-tooltip-bg: #111317;
	--uichemy-composer-tooltip-color: #d9dee6;
	--uichemy-composer-tooltip-border: #3a4048;
	--uichemy-composer-globals-root-bg: #ffffff;
	--uichemy-composer-globals-status-bg: #f7f8f9;
	--uichemy-composer-globals-status-text: #8a93a0;
	--uichemy-composer-chip-bg: #eceef0;
	--uichemy-composer-chip-border: #d5dadf;
	--uichemy-composer-chip-color: #556068;
	--uichemy-composer-chip-hover-bg: #e4e7ea;
	--uichemy-composer-popover-bg: #ffffff;
	--uichemy-composer-popover-border: #d5dadf;
	--uichemy-composer-popover-shadow: rgba(0, 0, 0, 0.12);
	--uichemy-composer-cm-bg: #ffffff;
	--uichemy-composer-cm-color: #556068;
	--uichemy-composer-cm-gutter-bg: #f7f8f9;
	--uichemy-composer-cm-gutter-border: #d5dadf;
	--uichemy-composer-cm-gutter-color: #a4afb7;
	--uichemy-composer-cm-cursor: #556068;
	--uichemy-composer-cm-selected: rgba(106, 115, 128, 0.15);
	--uichemy-composer-cm-active-line: rgba(106, 115, 128, 0.05);
	--uichemy-composer-cm-comment: #7f8b99;
	--uichemy-composer-cm-string: #448c27;
	--uichemy-composer-cm-number: #d9b37a;
	--uichemy-composer-cm-keyword: #770088;
	--uichemy-composer-cm-tag: #e06c4a;
	--uichemy-composer-cm-attribute: #c9b37d;
	--uichemy-composer-cm-property: #569cd6;
	--uichemy-composer-cm-variable: #556068;
	--uichemy-composer-cm-error: rgba(198, 80, 80, 0.1);
	--uichemy-composer-color-scheme: light;
	--uichemy-composer-preview-checker: #f2f2f2;
}

#smart-html-floating-panel[data-uich-composer-theme="dark"],
.smart-html-floating-panel[data-uich-composer-theme="dark"],
#uichemy-composer-floating-panel[data-uich-composer-theme="dark"],
.uichemy-composer-floating-panel[data-uich-composer-theme="dark"],
body[data-uich-composer-theme="dark"] {
	--uichemy-composer-panel-bg: #181a1f;
	--uichemy-composer-header-bg: #25282c;
	--uichemy-composer-tab-bg: #23262b;
	--uichemy-composer-tab-active-bg: #1e2125;
	--uichemy-composer-input-bg: #1b1e22;
	--uichemy-composer-border-color: #343941;
	--uichemy-composer-text-color: #d4d4d4;
	--uichemy-composer-text-muted: #ffffff;
	--uichemy-composer-accent-color: #6a7380;
	--uichemy-composer-header-text: #a0aab2;
	--uichemy-composer-col-bg: #1e2125;
	--uichemy-composer-resizer-bg: #2b3037;
	--uichemy-composer-resizer-handle: #596273;
	--uichemy-composer-active-indicator: #ffffff;
	--uichemy-composer-code-tabs-bg: #1b1e22;
	--uichemy-composer-code-tab-bg: #23262b;
	--uichemy-composer-code-tab-border: #343941;
	--uichemy-composer-code-tab-color: #aab3bf;
	--uichemy-composer-code-tab-hover-bg: #2a2e35;
	--uichemy-composer-code-tab-active-bg: #2a2e35;
	--uichemy-composer-code-tab-active-border: #6a7380;
	--uichemy-composer-code-tab-active-color: #ffffff;
	--uichemy-composer-tooltip-bg: #111317;
	--uichemy-composer-tooltip-color: #d9dee6;
	--uichemy-composer-tooltip-border: #3a4048;
	--uichemy-composer-globals-root-bg: #1b1e22;
	--uichemy-composer-globals-status-bg: #1e2125;
	--uichemy-composer-globals-status-text: #8a93a0;
	--uichemy-composer-chip-bg: #2a2e35;
	--uichemy-composer-chip-border: #3d434c;
	--uichemy-composer-chip-color: #d8dee9;
	--uichemy-composer-chip-hover-bg: rgba(255, 255, 255, 0.08);
	--uichemy-composer-popover-bg: #1e2125;
	--uichemy-composer-popover-border: #3d434c;
	--uichemy-composer-popover-shadow: rgba(0, 0, 0, 0.35);
	--uichemy-composer-cm-bg: #1e2125;
	--uichemy-composer-cm-color: #d8dee9;
	--uichemy-composer-cm-gutter-bg: #1a1d22;
	--uichemy-composer-cm-gutter-border: #2b3138;
	--uichemy-composer-cm-gutter-color: #6f7b87;
	--uichemy-composer-cm-cursor: #d8dee9;
	--uichemy-composer-cm-selected: rgba(88, 110, 130, 0.35);
	--uichemy-composer-cm-active-line: rgba(53, 60, 71, 0.45);
	--uichemy-composer-cm-comment: #7f8b99;
	--uichemy-composer-cm-string: #a8c98f;
	--uichemy-composer-cm-number: #d9b37a;
	--uichemy-composer-cm-keyword: #8fb7d9;
	--uichemy-composer-cm-tag: #89b4d9;
	--uichemy-composer-cm-attribute: #c9b37d;
	--uichemy-composer-cm-property: #a6c8de;
	--uichemy-composer-cm-variable: #d8dee9;
	--uichemy-composer-cm-error: rgba(198, 80, 80, 0.16);
	--uichemy-composer-color-scheme: dark;
	--uichemy-composer-preview-checker: #22252a;
}

.uichemy-composer-floating-panel {
	position: fixed;
	bottom: 0;
	right: 0;
	left: 0;
	height: 430px;
	min-height: 48px;
	max-height: 85vh;
	background: var(--uichemy-composer-panel-bg);
	z-index: 9999;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	transform: translateY(100%);
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--uich-ff: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	/* Pixels, not inherited: on the live page the shell inherits from the page's
	   own <html>/<body>, and a design that sets `html { font-size: 62.5% }` would
	   hand the shell 10px. */
	font-size: 16px;
	line-height: 1.5;
	color-scheme: var(--uichemy-composer-color-scheme);
}

/* Elementor's top-bar Publish split-button (and other @elementor/ui menus)
   open an MUI Menu that portals to <body> at MUI's default z-index:1300 —
   below this panel (9999) — so the dropdown opens hidden behind the composer.
   Lift Elementor's popover menus above the panel. Scoped to the Elementor
   editor body so the front-end preview is untouched, and to .MuiPopover-root
   (menus / selects / poppers) so Elementor dialogs (z-index 100000+) keep
   their own stacking. */
body.elementor-editor-active .MuiPopover-root {
	z-index: 10000 !important;
}
.uichemy-composer-floating-panel * {
	font-family: inherit;
	--uich-ff: inherit;
}
.uichemy-composer-floating-panel input,
.uichemy-composer-floating-panel textarea,
.uichemy-composer-floating-panel select {
	color-scheme: var(--uichemy-composer-color-scheme);
}
/* The shell's field skin below skips the right panel's UiChemy design-system
   fields (`data-uc`, stamped by the DS Input / Textarea): they draw their own
   inset border, fill, focus ring and placeholder, and these !important rules
   would otherwise flatten every one of them. :where() keeps each selector at
   its old specificity, so nothing changes for any other field. */
.uichemy-composer-floating-panel input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])),
.uichemy-composer-floating-panel textarea:not(:where([data-uc])),
.uichemy-composer-floating-panel select {
	background-color: var(--uichemy-composer-input-bg) !important;
	color: var(--uichemy-composer-text-color) !important;
	-webkit-text-fill-color: var(--uichemy-composer-text-color);
	border: 1px solid var(--uichemy-composer-border-color) !important;
	box-shadow: none !important;
}
.uichemy-composer-floating-panel input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])):hover,
.uichemy-composer-floating-panel textarea:not(:where([data-uc])):hover,
.uichemy-composer-floating-panel select:hover {
	border-color: var(--uichemy-composer-accent-color) !important;
}
/* Composer panel owns its own input styling */
.uichemy-composer-floating-panel .uich-composer-host input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])) {
	background-color: transparent !important;
	border: 1px solid transparent !important;
	outline: none !important;
	box-shadow: none !important;
	min-height: unset;
}

/* Same exemption, for a <select> that sits INSIDE a bordered wrapper.
   The React panel draws a field as a framed <div class="… border-input …"> with
   a transparent control inside it (see FRAME_CLS in composer-construct-tab.jsx
   and the wrapper in composer-inputs.jsx) — that shape exists precisely because
   the rules above style bare `input, textarea, select` with !important, so a
   frame drawn on the control itself is overwritten.

   The exemption above covers `input` but was never extended to `select`, so a
   framed select painted the shell's own box INSIDE the wrapper's box: in the
   Loop panel that read as selects carrying a hard box while the text fields
   beside them were flattened to invisible, and a column of controls that never
   lined up.

   Deliberately scoped to `.border-input select` and not to every select: a
   select that carries its own frame (composer-deps.jsx's SELECT_CLS puts
   `border border-input` on the element) is NOT a descendant of a .border-input
   wrapper, so it keeps its border exactly as before. */
.uichemy-composer-floating-panel .uich-composer-host .border-input select {
	background-color: transparent !important;
	border: 1px solid transparent !important;
	outline: none !important;
	box-shadow: none !important;
	min-height: unset;
}
.uichemy-composer-floating-panel .uich-composer-host .add-class-inline input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])),
.uichemy-composer-floating-panel .uich-composer-host .add-class-inline input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])):hover,
.uichemy-composer-floating-panel .uich-composer-host .add-class-inline input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])):focus,
.uichemy-composer-floating-panel .uich-composer-host .add-class-inline input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])):focus-visible {
	background-color: transparent !important;
}
.uichemy-composer-floating-panel .uich-composer-host input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])):focus,
.uichemy-composer-floating-panel .uich-composer-host input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])):focus-visible {
	/* The shell's `…floating-panel input:focus` rule below paints
	   --uichemy-composer-input-bg (#1b1e22 dark) on focus. Inside the composer
	   the field BOX (.lin-box, .swatch-input, .sb-quad-cell) owns the fill, so
	   the bare input painted a navy block over the left of the box. */
	background-color: transparent !important;
	border: 1px solid transparent !important;
	outline: none !important;
	box-shadow: none !important;
}
.uichemy-composer-floating-panel .uich-composer-host .add-class-inline input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])):hover {
	border: 1px dashed var(--panel-line) !important;
}
.uichemy-composer-floating-panel .uich-composer-host .add-class-inline input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])):focus,
.uichemy-composer-floating-panel .uich-composer-host .add-class-inline input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])):focus-visible {
	border: 1px solid var(--accent) !important;
	outline: none !important;
	box-shadow: 0 0 0 2px rgba(75,34,204,0.18) !important;
}
.uichemy-composer-floating-panel input:not(:where([data-uc]))::-moz-placeholder, .uichemy-composer-floating-panel textarea:not(:where([data-uc]))::-moz-placeholder {
	color: var(--uichemy-composer-text-muted) !important;
	opacity: 0.58;
}
.uichemy-composer-floating-panel input:not(:where([data-uc]))::placeholder,
.uichemy-composer-floating-panel textarea:not(:where([data-uc]))::placeholder {
	color: var(--uichemy-composer-text-muted) !important;
	opacity: 0.58;
}
.smart-html-floating-panel input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])):focus,
.uichemy-composer-floating-panel input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])):focus,
.uichemy-composer-floating-panel textarea:not(:where([data-uc])):focus,
.uichemy-composer-floating-panel select:focus {
	background-color: var(--uichemy-composer-input-bg) !important;
	border-color: var(--uichemy-composer-accent-color) !important;
	outline: none !important;
	box-shadow: none !important;
}
.smart-html-floating-panel input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])):disabled,
.uichemy-composer-floating-panel input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc])):disabled,
.uichemy-composer-floating-panel textarea:not(:where([data-uc])):disabled,
.uichemy-composer-floating-panel select:disabled {
	border-color: var(--uichemy-composer-border-color) !important;
}
.smart-html-floating-panel input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc]))[readonly],
.uichemy-composer-floating-panel input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(:where([data-uc]))[readonly] {
	border-color: var(--uichemy-composer-border-color) !important;
	background-color: var(--uichemy-composer-input-bg) !important;
}
.uichemy-composer-floating-panel input[type="checkbox"],
.uichemy-composer-floating-panel input[type="radio"] {
	accent-color: var(--uichemy-composer-accent-color);
}
.uichemy-composer-floating-panel select option {
	font-family: inherit;
	--uich-ff: inherit;
	background-color: var(--uichemy-composer-input-bg) !important;
	color: var(--uichemy-composer-text-color) !important;
}
.uichemy-composer-floating-panel label {
	color: inherit;
}
.uichemy-composer-panel-resizer {
	height: 8px;
	cursor: ns-resize;
	background: var(--uichemy-composer-resizer-bg);
	border-bottom: 1px solid var(--uichemy-composer-border-color);
	flex: 0 0 8px;
	touch-action: none;
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
}
.uichemy-composer-panel-resizer::before {
	content: '';
	display: block;
	width: 44px;
	height: 3px;
	border-radius: 999px;
	margin: 2px auto 0;
	background: var(--uichemy-composer-resizer-handle);
}
.uichemy-composer-floating-panel.active {
	transform: translateY(0);
}
.uichemy-composer-floating-panel.minimized {
	transform: translateY(calc(100% - 50px));
}
.uichemy-composer-panel-header {
	height: 40px;
	background: var(--uichemy-composer-header-bg);
	display: flex;
	align-items: center;
	padding: 0 13.5px;
	color: var(--uichemy-composer-header-text);
	justify-content: space-between;
	cursor: pointer;
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	border-bottom: 1px solid var(--uichemy-composer-border-color);
}
.uichemy-composer-panel-header-left {
	display: flex;
	align-items: center;
	gap: 13.5px;
	min-width: 0;
}
.uichemy-composer-panel-logo {
	font-weight: 600;
	font-size: 13px;
	color: var(--uichemy-composer-text-color);
}
.uichemy-composer-panel-logo span {
	color: var(--uichemy-composer-active-indicator);
	margin-left: 5px;
}
.uichemy-composer-panel-badge {
	background: var(--uichemy-composer-border-color);
	color: var(--uichemy-composer-text-color);
	font-size: 10px;
	padding: 3px 6px;
	border-radius: 3px;
	font-weight: 600;
	text-transform: uppercase;
}
.uichemy-composer-panel-header-right {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 600;
}
.uichemy-composer-header-tabs {
	display: flex;
	gap: 0;
	align-items: center;
}
.uichemy-composer-tab-btn {
	flex: 0 0 auto;
	background: var(--uichemy-composer-tab-bg);
	color: var(--uichemy-composer-text-muted);
	border: 1px solid var(--uichemy-composer-border-color);
	border-bottom-color: var(--uichemy-composer-border-color);
	border-radius: 0;
	padding: 12px 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	cursor: pointer;
	margin-bottom: -1px;
}
.uichemy-composer-tab-btn + .uichemy-composer-tab-btn {
	border-right: none;
}
.uichemy-composer-tab-btn.is-active {
	background: var(--uichemy-composer-tab-active-bg);
	border-bottom: 2px solid var(--uichemy-composer-active-indicator);
	color: var(--uichemy-composer-active-indicator);
}
.uichemy-composer-panel-panels {
	flex: 1;
	min-height: 0;
	position: relative;
}
.uichemy-composer-panel-tab {
	display: none;
	height: 100%;
	min-height: 0;
}
.uichemy-composer-panel-tab.is-active {
	display: block;
}
.uichemy-composer-panel-toggle {
	background: none;
	border: none;
	color: var(--uichemy-composer-text-muted);
	cursor: pointer;
	padding: 0;
	outline: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	transition: color 0.2s ease;
}
.uichemy-composer-panel-toggle svg {
	display: block;
	width: 14px;
	height: 14px;
}
.uichemy-composer-panel-toggle:hover {
	color: var(--uichemy-composer-text-color);
}
.uichemy-composer-panel-hover-toggle {
	background: var(--uichemy-composer-input-bg);
	border: 1px solid var(--uichemy-composer-border-color);
	color: #999;
	border-radius: 4px;
	padding: 0 10px;
	cursor: pointer;
	font-size: 11px;
	font-weight: 700;
	width: auto;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	transition: all 0.2s ease;
}
.uichemy-composer-panel-hover-toggle svg {
	display: block;
}
.uichemy-composer-panel-hover-toggle:hover,
.uichemy-composer-panel-hover-toggle.is-active {
	color: #3895ff;
	border-color: rgba(56, 149, 255, 0.4);
}
.uichemy-composer-panel-body {
	display: flex;
	height: 100%;
	padding: 10px;
	gap: 10px;
	min-height: 0;
	min-width: 0;
}
.uichemy-composer-code-layout {
	display: grid;
	grid-template-columns: 52px 1fr;
	height: 100%;
	min-height: 0;
}
.uichemy-composer-code-row-tabs {
	background: var(--uichemy-composer-code-tabs-bg);
	border-left: 1px solid var(--uichemy-composer-border-color);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 10px 6px;
}
.uichemy-composer-code-row-tab {
	width: 38px;
	height: 38px;
	border-radius: 8px;
	border: 1px solid var(--uichemy-composer-code-tab-border);
	background: var(--uichemy-composer-code-tab-bg);
	color: var(--uichemy-composer-code-tab-color);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	position: relative;
}
.uichemy-composer-code-row-tab svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
}
.uichemy-composer-code-row-tab i {
	font-size: 15px;
	line-height: 1;
}
.uichemy-composer-code-row-tab:hover {
	border-color: var(--uichemy-composer-code-tab-active-border);
	background: var(--uichemy-composer-code-tab-hover-bg);
	color: var(--uichemy-composer-code-tab-active-color);
}
.uichemy-composer-code-row-tab.is-active {
	background: var(--uichemy-composer-code-tab-active-bg);
	border-color: var(--uichemy-composer-code-tab-active-border);
	color: var(--uichemy-composer-code-tab-active-color);
	box-shadow: inset 0 0 0 1px var(--uichemy-composer-cm-selected);
}
.uichemy-composer-code-row-tab::after {
	content: attr(data-tooltip);
	position: absolute;
	right: calc(100% + 10px);
	top: 50%;
	transform: translateY(-50%);
	background: var(--uichemy-composer-tooltip-bg);
	color: var(--uichemy-composer-tooltip-color);
	border: 1px solid var(--uichemy-composer-tooltip-border);
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.01em;
	padding: 5px 8px;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.12s ease;
	z-index: 20;
}
.uichemy-composer-code-row-tab::before {
	content: '';
	position: absolute;
	right: calc(100% + 5px);
	top: 50%;
	transform: translateY(-50%) rotate(-45deg);
	width: 8px;
	height: 8px;
	background: var(--uichemy-composer-tooltip-bg);
	border-right: 1px solid var(--uichemy-composer-tooltip-border);
	border-top: 1px solid var(--uichemy-composer-tooltip-border);
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.12s ease;
	z-index: 19;
}
.uichemy-composer-code-row-tab:hover::after,
.uichemy-composer-code-row-tab:hover::before,
.uichemy-composer-code-row-tab:focus-visible::after,
.uichemy-composer-code-row-tab:focus-visible::before {
	opacity: 1;
	visibility: visible;
}
.uichemy-composer-code-row-panels {
	min-height: 0;
	height: 100%;
	min-width: 0;
	overflow: hidden;
}
.uichemy-composer-code-row-panel {
	display: none;
	height: 100%;
	min-height: 0;
	min-width: 0;
}
.uichemy-composer-code-row-panel.is-active {
	display: block;
}
.uichemy-composer-globals-root {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	background: var(--uichemy-composer-globals-root-bg);
	border-radius: 4px;
	border: 1px solid var(--uichemy-composer-border-color);
	overflow: hidden;
}
.uichemy-composer-globals-status {
	flex: 0 0 auto;
	padding: 6px 10px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--uichemy-composer-globals-status-text);
	border-bottom: 1px solid var(--uichemy-composer-border-color);
	background: var(--uichemy-composer-globals-status-bg);
}
.uichemy-composer-globals-toolbar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 10px;
	border-bottom: 1px solid var(--uichemy-composer-border-color);
	background: var(--uichemy-composer-globals-status-bg);
}
.uichemy-composer-globals-toolbar-label {
	font-size: 11px;
	font-weight: 600;
	color: #a0aab2;
}
.uichemy-composer-globals-scroll {
	flex: 1;
	min-height: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	overflow: hidden;
	padding: 10px;
	gap: 10px;
}
.uichemy-composer-globals-column {
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: var(--uichemy-composer-globals-status-bg);
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 4px;
	overflow: hidden;
}
.uichemy-composer-globals-editor-wrap {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.uichemy-composer-globals-editor-wrap > textarea {
	flex: 1;
	min-height: 120px;
	background: var(--uichemy-composer-cm-bg) !important;
	color: var(--uichemy-composer-cm-color) !important;
	border: none;
	padding: 12px 14px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	--uich-ff: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 12px;
	line-height: 1.45;
	resize: none;
	outline: none;
	white-space: pre;
}
.uichemy-composer-globals-editor-wrap .CodeMirror {
	flex: 1;
	height: 100%;
	min-height: 120px;
	font-size: 12px;
	line-height: 1.45;
	background: var(--uichemy-composer-cm-bg);
	color: var(--uichemy-composer-cm-color);
}
.uichemy-composer-globals-editor-wrap .CodeMirror-gutters {
	background: var(--uichemy-composer-cm-gutter-bg);
	border-left: 1px solid var(--uichemy-composer-cm-gutter-border);
	color: var(--uichemy-composer-cm-gutter-color);
}
.uichemy-composer-globals-editor-wrap .CodeMirror-cursor {
	border-right-color: var(--uichemy-composer-cm-cursor);
}
.uichemy-composer-globals-editor-wrap .CodeMirror-selected {
	background: var(--uichemy-composer-cm-selected) !important;
}
.uichemy-composer-globals-editor-wrap .CodeMirror-activeline-background {
	background: var(--uichemy-composer-cm-active-line);
}
.uichemy-composer-globals-editor-wrap .CodeMirror .cm-comment {
	color: var(--uichemy-composer-cm-comment);
}
.uichemy-composer-globals-editor-wrap .CodeMirror .cm-string,
.uichemy-composer-globals-editor-wrap .CodeMirror .cm-string-2 {
	color: var(--uichemy-composer-cm-string);
}
.uichemy-composer-globals-editor-wrap .CodeMirror .cm-number,
.uichemy-composer-globals-editor-wrap .CodeMirror .cm-atom {
	color: var(--uichemy-composer-cm-number);
}
.uichemy-composer-globals-editor-wrap .CodeMirror .cm-keyword,
.uichemy-composer-globals-editor-wrap .CodeMirror .cm-def,
.uichemy-composer-globals-editor-wrap .CodeMirror .cm-operator {
	color: var(--uichemy-composer-cm-keyword);
}
.uichemy-composer-globals-editor-wrap .CodeMirror .cm-property {
	color: var(--uichemy-composer-cm-property);
}
.uichemy-composer-globals-editor-wrap .CodeMirror .cm-variable,
.uichemy-composer-globals-editor-wrap .CodeMirror .cm-variable-2,
.uichemy-composer-globals-editor-wrap .CodeMirror .cm-variable-3 {
	color: var(--uichemy-composer-cm-variable);
}
.uichemy-composer-panel-col {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	background: var(--uichemy-composer-col-bg);
	border-radius: 4px;
	overflow: hidden;
	border: 1px solid var(--uichemy-composer-border-color);
}
.uichemy-composer-panel-col-header {
	background: var(--uichemy-composer-header-bg);
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--uichemy-composer-border-color);
}
.uichemy-composer-col-title.html { color: var(--uichemy-composer-cm-tag); }
.uichemy-composer-col-title.css { color: var(--uichemy-composer-cm-property); }
.uichemy-composer-col-title.js { color: var(--uichemy-composer-text-color); }

.uichemy-composer-col-actions {
	display: flex;
	gap: 6px;
}
.uichemy-composer-btn {
	background: transparent;
	border: 1px solid var(--uichemy-composer-border-color);
	color: var(--uichemy-composer-text-muted);
	padding: 3px 8px;
	border-radius: 3px;
	font-size: 10px;
	cursor: pointer;
}
.uichemy-composer-btn.primary {
	background: var(--uichemy-composer-accent-color);
	color: #ffffff;
	border-color: var(--uichemy-composer-accent-color);
	font-weight: bold;
}

.uichemy-composer-panel-col > textarea {
	flex: 1;
	background: var(--uichemy-composer-col-bg) !important;
	color: var(--uichemy-composer-text-color) !important;
	border: none;
	padding: 15px;
	font-family: inherit;
	--uich-ff: inherit;
	font-size: 13px;
	line-height: 1.5;
	resize: none;
	outline: none;
	white-space: pre;
}
.uichemy-composer-panel-col .CodeMirror {
	flex: 1;
	height: 100%;
	font-size: 13px;
	line-height: 1.5;
	background: var(--uichemy-composer-cm-bg);
	color: var(--uichemy-composer-cm-color);
}
.uichemy-composer-panel-col .CodeMirror-gutters {
	background: var(--uichemy-composer-cm-gutter-bg);
	border-left: 1px solid var(--uichemy-composer-cm-gutter-border);
	color: var(--uichemy-composer-cm-gutter-color);
}
.uichemy-composer-panel-col .CodeMirror-cursor {
	border-right-color: var(--uichemy-composer-cm-cursor);
}
.uichemy-composer-panel-col .CodeMirror-selected {
	background: var(--uichemy-composer-cm-selected) !important;
}
.uichemy-composer-panel-col .CodeMirror-activeline-background {
	background: var(--uichemy-composer-cm-active-line);
}
.uichemy-composer-panel-col .CodeMirror-matchingbracket {
	color: var(--uichemy-composer-cm-color) !important;
	border-bottom: 1px solid var(--uichemy-composer-border-color);
}
.uichemy-composer-panel-col .CodeMirror-nonmatchingbracket {
	color: var(--uichemy-composer-cm-error) !important;
}
/* Calmer syntax palette for readability across HTML/CSS/JS */
.uichemy-composer-panel-col .CodeMirror .cm-comment {
	color: var(--uichemy-composer-cm-comment);
}
.uichemy-composer-panel-col .CodeMirror .cm-string,
.uichemy-composer-panel-col .CodeMirror .cm-string-2 {
	color: var(--uichemy-composer-cm-string);
}
.uichemy-composer-panel-col .CodeMirror .cm-number,
.uichemy-composer-panel-col .CodeMirror .cm-atom {
	color: var(--uichemy-composer-cm-number);
}
.uichemy-composer-panel-col .CodeMirror .cm-keyword,
.uichemy-composer-panel-col .CodeMirror .cm-def,
.uichemy-composer-panel-col .CodeMirror .cm-operator {
	color: var(--uichemy-composer-cm-keyword);
}
.uichemy-composer-panel-col .CodeMirror .cm-tag {
	color: var(--uichemy-composer-cm-tag);
}
.uichemy-composer-panel-col .CodeMirror .cm-attribute {
	color: var(--uichemy-composer-cm-attribute);
}
.uichemy-composer-panel-col .CodeMirror .cm-property {
	color: var(--uichemy-composer-cm-property);
}
.uichemy-composer-panel-col .CodeMirror .cm-variable,
.uichemy-composer-panel-col .CodeMirror .cm-variable-2,
.uichemy-composer-panel-col .CodeMirror .cm-variable-3,
.uichemy-composer-panel-col .CodeMirror .cm-type,
.uichemy-composer-panel-col .CodeMirror .cm-builtin {
	color: var(--uichemy-composer-cm-variable);
}
.uichemy-composer-panel-col .CodeMirror .cm-qualifier,
.uichemy-composer-panel-col .CodeMirror .cm-meta {
	color: var(--uichemy-composer-text-muted);
}
.uichemy-composer-panel-col .CodeMirror .cm-error {
	background: var(--uichemy-composer-cm-error);
	color: #ffb0b0;
}
.uichemy-composer-panel-col .CodeMirror textarea {
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
}
.uichemy-composer-direct-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 10px;
	height: 100%;
	padding: 10px;
}
.uichemy-composer-direct-list,
.uichemy-composer-direct-editor {
	background: var(--uichemy-composer-col-bg);
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 4px;
	overflow: hidden;
	min-height: 0;
}
.uichemy-composer-direct-list {
	display: flex;
	flex-direction: column;
}
.uichemy-composer-direct-list-header,
.uichemy-composer-direct-editor-header {
	padding: 8px 12px;
	background: var(--uichemy-composer-header-bg);
	border-bottom: 1px solid var(--uichemy-composer-border-color);
	font-size: 12px;
	font-weight: 700;
	color: var(--uichemy-composer-text-color);
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.uichemy-composer-direct-list-body {
	padding: 8px;
	overflow: auto;
	flex: 1;
}
.uichemy-composer-direct-empty {
	padding: 12px;
	font-size: 12px;
	color: var(--uichemy-composer-text-muted);
	line-height: 1.5;
}
.uichemy-composer-direct-item {
	width: 100%;
	text-align: right;
	background: var(--uichemy-composer-tab-bg);
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 4px;
	padding: 6px 8px;
	margin-bottom: 4px;
	color: var(--uichemy-composer-text-color);
	cursor: pointer;
	font-family: inherit;
	--uich-ff: inherit;
	font-size: inherit;
	box-sizing: border-box;
}
.uichemy-composer-direct-item:focus-visible {
	outline: 2px solid var(--uichemy-composer-accent-color);
	outline-offset: 1px;
}
.uichemy-composer-direct-item.is-active {
	border-color: var(--uichemy-composer-accent-color);
	box-shadow: inset 0 0 0 1px var(--uichemy-composer-cm-selected);
}
.uichemy-composer-direct-item-depth {
	display: block;
	padding-right: calc(var(--uichemy-composer-layer-depth, 0) * 12px);
}
.uichemy-composer-direct-item-title-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	min-width: 0;
}
.uichemy-composer-layer-menu-btn {
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	padding: 0;
	border-radius: 4px;
	border: 1px solid transparent;
	background: transparent;
	color: var(--uichemy-composer-text-muted);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.15s ease;
}
.uichemy-composer-direct-item:hover .uichemy-composer-layer-menu-btn,
.uichemy-composer-layer-menu-btn:hover {
	opacity: 1;
}
.uichemy-composer-layer-menu-btn:hover {
	background: var(--uichemy-composer-input-bg);
	border-color: var(--uichemy-composer-border-color);
	color: var(--uichemy-composer-text-color);
}
.uichemy-composer-direct-layer-menu {
	min-width: 156px;
	padding: 4px;
	background: var(--uichemy-composer-col-bg);
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 6px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}
.uichemy-composer-direct-layer-menu-item {
	display: block;
	width: 100%;
	text-align: right;
	padding: 8px 10px;
	font-size: 12px;
	color: var(--uichemy-composer-text-color);
	background: transparent;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	font-family: inherit;
	--uich-ff: inherit;
}
.uichemy-composer-direct-layer-menu-item:hover:not(:disabled) {
	background: var(--uichemy-composer-tab-bg);
}
.uichemy-composer-direct-layer-menu-item:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.uichemy-composer-layer-left {
	display: flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
	flex: 1;
}
.uichemy-composer-layer-toggle,
.uichemy-composer-layer-toggle-spacer {
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.uichemy-composer-direct-item.is-layer-draggable {
	cursor: grab;
	-webkit-user-drag: element;
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	transition: background 0.12s ease, box-shadow 0.12s ease;
}
.uichemy-composer-direct-item.is-layer-draggable:hover:not(.is-layer-drag-source) {
	background: rgba(127, 127, 127, 0.12);
}
.uichemy-composer-direct-item.is-layer-draggable:active {
	cursor: grabbing;
}
.uichemy-composer-direct-list-body.is-layer-dragging .uichemy-composer-direct-item:not(.is-layer-drag-source) {
	opacity: 0.48;
	filter: grayscale(0.12);
	transition: opacity 0.15s ease, filter 0.15s ease;
	cursor: default;
}
.uichemy-composer-direct-item.is-layer-drag-source {
	opacity: 0.36;
	transform: scale(0.985);
	filter: grayscale(0.2);
	box-shadow: inset 0 0 0 2px var(--uichemy-composer-accent-color);
	background: var(--uichemy-composer-input-bg);
	transition: opacity 0.12s ease, transform 0.12s ease, filter 0.12s ease;
}
.uichemy-composer-direct-item.is-layer-drop-target.is-layer-drop-before {
	box-shadow: inset 0 3px 0 0 var(--uichemy-composer-accent-color), 0 0 0 1px var(--uichemy-composer-cm-selected);
}
.uichemy-composer-direct-item.is-layer-drop-target.is-layer-drop-after {
	box-shadow: inset 0 -3px 0 0 var(--uichemy-composer-accent-color), 0 0 0 1px var(--uichemy-composer-cm-selected);
}
body > .is-layer-drag-ghost-float {
	opacity: 1;
	box-shadow:
		0 16px 40px rgba(0, 0, 0, 0.3),
		0 0 0 1px var(--uichemy-composer-border-color),
		0 0 0 2px var(--uichemy-composer-accent-color);
	border-radius: 4px;
	background: var(--uichemy-composer-tab-bg);
	cursor: grabbing;
	filter: none;
	transform: none;
}
.uichemy-composer-layer-toggle {
	background: var(--uichemy-composer-input-bg);
	border: 1px solid var(--uichemy-composer-border-color);
	color: var(--uichemy-composer-text-muted);
	border-radius: 3px;
	font-size: 10px;
	line-height: 1;
	padding: 0;
	cursor: pointer;
}
.uichemy-composer-layer-toggle:hover {
	border-color: var(--uichemy-composer-active-indicator);
	color: var(--uichemy-composer-active-indicator);
}
.uichemy-composer-direct-item-title {
	display: block;
	font-size: 12px;
	font-weight: 400;
	font-family: inherit;
	--uich-ff: inherit;
	margin-bottom: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.uichemy-composer-direct-item-content {
	opacity: 0.55;
}
.uichemy-composer-direct-editor {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.uichemy-composer-direct-editor-body {
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}
.uichemy-composer-direct-meta {
	font-size: 12px;
	line-height: 1.5;
	color: var(--uichemy-composer-text-muted);
}
.uichemy-composer-direct-field label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--uichemy-composer-text-muted) !important;
	margin-bottom: 6px;
}
.uichemy-composer-direct-field-input > label,
.uichemy-composer-direct-section-title {
	color: var(--uichemy-composer-text-muted) !important;
}
.uichemy-composer-direct-field textarea,
.uichemy-composer-direct-field input[type="text"],
.uichemy-composer-direct-field input[type="url"],
.uichemy-composer-direct-field input[type="search"],
.uichemy-composer-direct-field input[type="number"],
.uichemy-composer-direct-field select,
.uichemy-composer-direct-control input[type="text"],
.uichemy-composer-direct-control input[type="number"],
.uichemy-composer-direct-control select,
.uichemy-composer-direct-color-text {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	background: var(--uichemy-composer-input-bg) !important;
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 4px;
	color: var(--uichemy-composer-text-color);
	padding: 10px 12px;
	font-size: 13px;
	line-height: 1.5;
	outline: none;
	color-scheme: var(--uichemy-composer-color-scheme);
	-webkit-appearance: none;
	-moz-appearance: none;
	     appearance: none;
}
.uichemy-composer-direct-field select option,
.uichemy-composer-direct-control select option {
	background: var(--uichemy-composer-input-bg);
	color: var(--uichemy-composer-text-color);
}
.uichemy-composer-direct-field textarea {
	min-height: 120px;
	resize: vertical;
}
.uichemy-composer-direct-link-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.uichemy-composer-direct-typography-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.uichemy-composer-direct-field-input {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
	min-width: 0;
	max-width: 200px;
}

.uichemy-composer-direct-field-input label{
	font-size: 12px;
}
.uichemy-composer-direct-field-input.has-global-source > label::after {
	content: ' •';
	color: var(--uichemy-composer-global-dot-color, #7dd3fc);
	font-weight: 700;
}
/* When the clickable Style Origin dot is present, suppress the older passive ::after dot so the
   user never sees two indicators next to the same label. */
.uichemy-composer-direct-field-input.has-global-source:has(> .uichemy-composer-direct-style-origin-dot) > label::after {
	content: '';
	display: none;
}
.uichemy-composer-direct-field-input > label:has(> .uichemy-composer-direct-style-origin-dot),
.uichemy-composer-direct-sides-header > label:has(> .uichemy-composer-direct-style-origin-dot) {
	display: inline-flex;
	align-items: center;
}
.uichemy-composer-direct-style-origin-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	margin: 0 6px 0 0;
	cursor: pointer;
	background: #7dd3fc;
	vertical-align: middle;
	flex: 0 0 auto;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
	transition: transform 120ms ease, box-shadow 120ms ease;
}
.uichemy-composer-direct-style-origin-dot:hover,
.uichemy-composer-direct-style-origin-dot:focus-visible {
	transform: scale(1.25);
	outline: none;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}
.uichemy-composer-direct-style-origin-popover {
	position: fixed;
	z-index: 99999;
	min-width: 220px;
	max-width: 320px;
	background: #000;
	color: #e8eaed;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 6px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
	padding: 0;
	font-size: 12px;
	line-height: 1.4;
}
.uichemy-composer-direct-style-origin-popover[hidden] {
	display: none;
}
.uichemy-composer-direct-style-origin-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.uichemy-composer-direct-style-origin-title {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--uichemy-composer-text-muted, #9aa0a6);
}
.uichemy-composer-direct-style-origin-close {
	border: 0;
	background: transparent;
	color: var(--uichemy-composer-text-muted, #9aa0a6);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 2px 6px;
	border-radius: 4px;
}
.uichemy-composer-direct-style-origin-close:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--uichemy-composer-text-color, #e8eaed);
}
.uichemy-composer-direct-style-origin-list {
	list-style: none;
	margin: 0;
	padding: 6px 0;
}
.uichemy-composer-direct-style-origin-item {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
}
.uichemy-composer-direct-style-origin-item.is-overridden {
	opacity: 0.55;
}
.uichemy-composer-direct-style-origin-item.is-overridden .uichemy-composer-direct-style-origin-token,
.uichemy-composer-direct-style-origin-item.is-overridden .uichemy-composer-direct-style-origin-value {
	text-decoration: line-through;
}
.uichemy-composer-direct-style-origin-token {
	font-weight: 600;
	color: var(--uichemy-composer-text-color, #e8eaed);
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	--uich-ff: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 11px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.uichemy-composer-direct-style-origin-value {
	color: var(--uichemy-composer-text-muted, #9aa0a6);
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	--uich-ff: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 11px;
}
.uichemy-composer-direct-classes-wrap {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.uichemy-composer-direct-classes-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	min-height: 28px;
	align-items: center;
}
.uichemy-composer-direct-classes-empty {
	font-size: 12px;
	color: var(--uichemy-composer-text-muted);
	font-style: italic;
}
.uichemy-composer-class-chip-breakpoint-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 12px;
	height: 12px;
	color: var(--uichemy-composer-chip-color);
	flex: 0 0 auto;
	opacity: 0.85;
}
.uichemy-composer-class-chip-breakpoint-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}
.uichemy-composer-floating-panel.uichemy-composer-direct-readonly-breakpoint .uichemy-composer-direct-typography-section input:disabled,
.uichemy-composer-floating-panel.uichemy-composer-direct-readonly-breakpoint .uichemy-composer-direct-typography-section select:disabled,
.uichemy-composer-floating-panel.uichemy-composer-direct-readonly-breakpoint .uichemy-composer-direct-layout-section input:disabled,
.uichemy-composer-floating-panel.uichemy-composer-direct-readonly-breakpoint .uichemy-composer-direct-layout-section select:disabled {
	opacity: 0.55;
	font-style: italic;
	cursor: not-allowed;
	background: repeating-linear-gradient(
		-135deg,
		rgba(125, 211, 252, 0.05),
		rgba(125, 211, 252, 0.05) 6px,
		transparent 6px,
		transparent 12px
	);
}
.uichemy-composer-floating-panel.uichemy-composer-direct-readonly-breakpoint .uichemy-composer-direct-typography-section::before,
.uichemy-composer-floating-panel.uichemy-composer-direct-readonly-breakpoint .uichemy-composer-direct-layout-section::before {
	content: 'Read-only. Switch Elementor to this breakpoint to edit';
	display: block;
	font-size: 11px;
	color: var(--uichemy-composer-text-muted);
	background: rgba(125, 211, 252, 0.08);
	border: 1px dashed var(--uichemy-composer-chip-border);
	border-radius: 4px;
	padding: 6px 8px;
	margin-bottom: 8px;
	font-style: italic;
}
.uichemy-composer-class-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: 100%;
	min-height: 26px;
	padding: 3px 10px 3px 6px;
	border-radius: 4px;
	background: var(--uichemy-composer-chip-bg);
	border: 1px solid var(--uichemy-composer-chip-border);
	font-size: 11px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	--uich-ff: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	color: var(--uichemy-composer-chip-color);
	cursor: pointer;
	box-sizing: border-box;
}
.uichemy-composer-class-chip.is-selected {
	border-color: var(--uichemy-composer-accent-color);
	box-shadow: 0 0 0 1px var(--uichemy-composer-cm-selected) inset;
}
.uichemy-composer-class-chip-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 200px;
}
.uichemy-composer-class-chip-global-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--uichemy-composer-global-dot-color, #7dd3fc);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
	flex: 0 0 auto;
}
.uichemy-composer-class-chip-remove {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 3px;
	background: transparent;
	color: #9aa5b1;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}
.uichemy-composer-class-chip-remove:hover {
	background: var(--uichemy-composer-chip-hover-bg);
	color: var(--uichemy-composer-text-color);
}
.uichemy-composer-class-chip--readonly {
	padding: 3px 10px;
	opacity: 0.85;
}
.uichemy-composer-direct-class-input-row {
	position: relative;
}
.uichemy-composer-direct-class-suggestions {
	position: absolute;
	right: 0;
	left: 0;
	top: 100%;
	margin: 4px 0 0;
	padding: 4px 0;
	list-style: none;
	background: var(--uichemy-composer-popover-bg);
	border: 1px solid var(--uichemy-composer-popover-border);
	border-radius: 4px;
	box-shadow: 0 8px 24px var(--uichemy-composer-popover-shadow);
	z-index: 30;
	max-height: 200px;
	overflow-y: auto;
}
.uichemy-composer-direct-class-suggestions[hidden] {
	display: none !important;
}
.uichemy-composer-direct-class-suggestion {
	padding: 8px 12px;
	font-size: 12px;
	line-height: 1.35;
	cursor: pointer;
	color: var(--uichemy-composer-text-color);
}
.uichemy-composer-direct-class-suggestion:hover,
.uichemy-composer-direct-class-suggestion.is-active {
	background: var(--uichemy-composer-tab-active-bg);
}
.uichemy-composer-direct-class-suggestion-title {
	font-weight: 600;
	color: var(--uichemy-composer-text-color);
}
.uichemy-composer-direct-class-suggestion-meta {
	display: block;
	font-size: 10px;
	color: var(--uichemy-composer-cm-property);
	margin-top: 2px;
}
.uichemy-composer-direct-typography-section {
	background: var(--uichemy-composer-tab-bg);
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 4px;
	padding: 15px;
}
.uichemy-composer-direct-layout-groups {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.uichemy-composer-direct-layout-group {
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 4px;
	padding: 10px;
	background: var(--uichemy-composer-panel-bg);
}
.uichemy-composer-direct-layout-group-flat {
	border: 0;
	border-radius: 0;
	padding: 0;
	background: transparent;
}
/* 4-side inputs */
.uichemy-composer-direct-sides-field {
	margin-bottom: 15px;
	grid-column: 1 / -1;
}
.uichemy-composer-direct-sides-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}
.uichemy-composer-direct-sides-header label {
	margin-bottom: 0 !important;
	font-size: 12px;
	font-weight: 400;
	text-transform: uppercase;
	color: var(--uichemy-composer-panel-text-muted) !important;
}
.uichemy-composer-unit-selector {
	display: flex;
	background: var(--uichemy-composer-panel-input-bg);
	border: 1px solid var(--uichemy-composer-panel-input-border);
	border-radius: 3px;
	overflow: hidden;
}
.uichemy-composer-sides-unit {
	background: transparent;
	border: none;
	color: var(--uichemy-composer-text-color);
	font-size: 10px;
	padding: 2px 6px;
	cursor: pointer;
	outline: none;
}
.uichemy-composer-direct-sides-inputs {
	display: flex;
	align-items: center;
	gap: 0;
}
.uichemy-composer-side-input-group {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}
.uichemy-composer-side-input-group input {
	width: 100%;
	text-align: center;
	padding: 4px 0;
	border-radius: 0;
	border-left: none;
}
.uichemy-composer-side-input-group:first-child input {
	border-top-right-radius: 3px;
	border-bottom-right-radius: 3px;
}
.uichemy-composer-side-input-group span {
	font-size: 10px;
	color: var(--uichemy-composer-text-muted);
}
.uichemy-composer-dimension-link {
	flex: 0 0 28px;
	display: flex;
	justify-content: center;
	align-items: stretch;
	align-self: stretch;
}
.uichemy-composer-sides-link-btn {
	width: 100%;
	background: var(--uichemy-composer-panel-input-bg);
	border: 1px solid var(--uichemy-composer-panel-input-border);
	border-right: none;
	border-top-left-radius: 3px;
	border-bottom-left-radius: 3px;
	color: var(--uichemy-composer-text-muted);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin-bottom: 15px; /* match the input height gap */
}
.uichemy-composer-sides-link-btn.is-active {
	background: var(--uichemy-composer-accent-color);
	border-color: var(--uichemy-composer-accent-color);
	color: #fff;
}
.uichemy-composer-sides-link-btn i {
	font-size: 12px;
}
.uichemy-composer-direct-subsection-title {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--uichemy-composer-text-muted);
	margin-bottom: 12px;
}
.uichemy-composer-direct-sections-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 10px;
	align-items: start;
}
.uichemy-composer-direct-section-title {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--uichemy-composer-text-muted);
	margin-bottom: 20px;
}
.uichemy-composer-direct-control {
	display: flex;
	align-items: center;
	gap: 8px;
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 3px;
	background: var(--uichemy-composer-input-bg);
}
.uichemy-composer-direct-control label {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 600;
	color: var(--uichemy-composer-text-muted);
	margin: 0;
	text-transform: none;
	letter-spacing: 0;
}
.uichemy-composer-direct-control input,
.uichemy-composer-direct-control select {
	flex: 1;
	background: transparent;
	border: none;
	padding: 0;
	color: var(--uichemy-composer-text-color);
	font-size: 13px;
	line-height: 1.4;
	outline: none;
}
.uichemy-composer-direct-color-picker {
	flex: none !important;
	width: 22px;
	height: 22px;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
}
.uichemy-composer-direct-color-inline {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--uichemy-composer-input-bg);
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 4px;
	padding: 6px 8px;
}
.uichemy-composer-direct-color-global-btn {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 4px;
	background: var(--uichemy-composer-tab-bg);
	color: var(--uichemy-composer-text-muted);
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.uichemy-composer-direct-color-global-btn i {
	font-size: 14px;
	line-height: 1;
}
.uichemy-composer-direct-color-global-btn:hover {
	color: var(--uichemy-composer-accent-color);
	border-color: var(--uichemy-composer-accent-color);
}
.uichemy-composer-direct-color-text {
	flex: 1;
	border: none;
	background: transparent;
	color: var(--uichemy-composer-text-color);
	font-size: 13px;
	line-height: 1.4;
	outline: none;
	padding: 0;
}
.uichemy-composer-direct-global-color-chip {
	display: none !important;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	padding: 3px 8px;
	border-radius: 999px;
	border: 1px solid var(--uichemy-composer-border-color);
	background: var(--uichemy-composer-tab-bg);
	color: var(--uichemy-composer-text-color);
	font-size: 11px;
	line-height: 1.2;
}
.uichemy-composer-direct-global-color-chip[hidden] {
	display: none !important;
}
.uichemy-composer-direct-global-color-chip-close {
	display: none;
	width: 16px;
	height: 16px;
	padding: 0;
	border: none;
	background: transparent;
	color: #a5b4c3;
	border-radius: 3px;
	cursor: pointer;
	font-size: 12px;
	line-height: 1;
}
.uichemy-composer-direct-global-color-chip:hover .uichemy-composer-direct-global-color-chip-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.uichemy-composer-direct-global-color-popover {
	position: fixed;
	z-index: 200000;
	width: 300px;
	max-height: 220px;
	overflow: auto;
	background: var(--uichemy-composer-popover-bg);
	border: 1px solid var(--uichemy-composer-popover-border);
	border-radius: 6px;
	box-shadow: 0 12px 28px var(--uichemy-composer-popover-shadow);
	padding: 8px;
}
.uichemy-composer-direct-global-color-popover[hidden] {
	display: none !important;
}
.uichemy-composer-direct-global-color-group-title {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #8a93a0;
	margin: 6px 4px;
}
.uichemy-composer-direct-global-color-option {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 7px 8px;
	border: none;
	border-radius: 4px;
	background: transparent;
	color: var(--uichemy-composer-text-color);
	text-align: right;
	cursor: pointer;
}
.uichemy-composer-direct-global-color-option:hover {
	background: var(--uichemy-composer-tab-bg);
}
.uichemy-composer-direct-global-color-swatch {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 1px solid var(--uichemy-composer-border-color);
	flex: 0 0 auto;
}
.uichemy-composer-direct-global-color-option-meta {
	display: block;
	font-size: 10px;
	color: var(--uichemy-composer-text-muted);
}
.uichemy-composer-direct-control--full {
	grid-column: 1 / -1;
}
.uichemy-composer-direct-link-group {
	background: var(--uichemy-composer-col-bg);
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 4px;
	padding: 10px;
}
.uichemy-composer-direct-link-group input[type="url"],
.uichemy-composer-direct-link-group textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	background: var(--uichemy-composer-input-bg) !important;
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 4px;
	color: var(--uichemy-composer-text-color);
	padding: 10px 12px;
	font-size: 13px;
	line-height: 1.5;
	outline: none;
	color-scheme: var(--uichemy-composer-color-scheme);
}
.uichemy-composer-direct-link-group textarea {
	min-height: 96px;
	resize: vertical;
}
.uichemy-composer-direct-link-group input[type="url"]:focus,
.uichemy-composer-direct-link-group textarea:focus {
	border-color: var(--uichemy-composer-active-indicator);
	box-shadow: 0 0 0 2px var(--uichemy-composer-focus-ring);
}
.uichemy-composer-direct-link-group .uichemy-composer-direct-link-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	font-size: 12px;
	color: var(--uichemy-composer-text-color);
}
.uichemy-composer-direct-link-group .uichemy-composer-direct-link-row label {
	color: var(--uichemy-composer-text-color) !important;
	font-size: 12px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	margin: 0;
}

/* Custom checkbox styles for the React Composer App to override WordPress admin defaults and prevent system theme interference */
.uichemy-composer-floating-panel .element-editor-check input[type="checkbox"],
#uichemy-composer-floating-panel .element-editor-check input[type="checkbox"],
.uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"] {
	-moz-appearance: none !important;
	     appearance: none !important;
	-webkit-appearance: none !important;
	width: 14px !important;
	height: 14px !important;
	margin: 0 !important;
	border-radius: 3px !important;
	border: 1px solid var(--uichemy-composer-border-color) !important;
	background: var(--uichemy-composer-input-bg) !important;
	position: relative !important;
	cursor: pointer !important;
	transition: border-color .15s ease, background-color .15s ease !important;
}

.uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"] {
	width: 16px !important;
	height: 16px !important;
}

.uichemy-composer-floating-panel .element-editor-check input[type="checkbox"]::before,
#uichemy-composer-floating-panel .element-editor-check input[type="checkbox"]::before {
	content: none !important;
	display: none !important;
}

.uichemy-composer-floating-panel .element-editor-check input[type="checkbox"]:focus,
#uichemy-composer-floating-panel .element-editor-check input[type="checkbox"]:focus,
.uichemy-composer-floating-panel .element-editor-check input[type="checkbox"]:focus-visible,
#uichemy-composer-floating-panel .element-editor-check input[type="checkbox"]:focus-visible,
.uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:focus,
.uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

.uichemy-composer-floating-panel .element-editor-check input[type="checkbox"]:not(:checked):focus,
#uichemy-composer-floating-panel .element-editor-check input[type="checkbox"]:not(:checked):focus,
.uichemy-composer-floating-panel .element-editor-check input[type="checkbox"]:not(:checked):focus-visible,
#uichemy-composer-floating-panel .element-editor-check input[type="checkbox"]:not(:checked):focus-visible,
.uichemy-composer-floating-panel .element-editor-check input[type="checkbox"]:not(:checked):active,
#uichemy-composer-floating-panel .element-editor-check input[type="checkbox"]:not(:checked):active,
.uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:not(:checked):focus,
.uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:not(:checked):focus-visible,
.uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:not(:checked):active {
	background: var(--uichemy-composer-input-bg) !important;
	border-color: var(--uichemy-composer-border-color) !important;
}

/* ------------------- Light Mode Checked Checkbox ------------------- */
#uichemy-composer-floating-panel[data-uich-composer-theme="light"] .element-editor-check input[type="checkbox"]:checked,
.uichemy-composer-floating-panel[data-uich-composer-theme="light"] .element-editor-check input[type="checkbox"]:checked,
.uichemy-composer-floating-panel[data-uich-composer-theme="light"] .uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:checked {
	background: #d004d4 !important;
	border-color: #d004d4 !important;
}

#uichemy-composer-floating-panel[data-uich-composer-theme="light"] .element-editor-check input[type="checkbox"]:checked:focus,
.uichemy-composer-floating-panel[data-uich-composer-theme="light"] .element-editor-check input[type="checkbox"]:checked:focus,
#uichemy-composer-floating-panel[data-uich-composer-theme="light"] .element-editor-check input[type="checkbox"]:checked:focus-visible,
.uichemy-composer-floating-panel[data-uich-composer-theme="light"] .element-editor-check input[type="checkbox"]:checked:focus-visible,
#uichemy-composer-floating-panel[data-uich-composer-theme="light"] .element-editor-check input[type="checkbox"]:checked:active,
.uichemy-composer-floating-panel[data-uich-composer-theme="light"] .element-editor-check input[type="checkbox"]:checked:active,
.uichemy-composer-floating-panel[data-uich-composer-theme="light"] .uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:checked:focus,
.uichemy-composer-floating-panel[data-uich-composer-theme="light"] .uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:checked:focus-visible,
.uichemy-composer-floating-panel[data-uich-composer-theme="light"] .uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:checked:active {
	background: #d004d4 !important;
	border-color: #d004d4 !important;
}

#uichemy-composer-floating-panel[data-uich-composer-theme="light"] .element-editor-check input[type="checkbox"]:checked::after,
.uichemy-composer-floating-panel[data-uich-composer-theme="light"] .element-editor-check input[type="checkbox"]:checked::after {
	content: '' !important;
	position: absolute !important;
	right: 4px !important;
	top: 1px !important;
	width: 3px !important;
	height: 7px !important;
	border: solid #fff !important;
	border-width: 0 0 2px 2px !important;
	transform: rotate(-45deg) !important;
}

.uichemy-composer-floating-panel[data-uich-composer-theme="light"] .uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:checked::after {
	content: '' !important;
	position: absolute !important;
	right: 5px !important;
	top: 2px !important;
	width: 4px !important;
	height: 8px !important;
	border: solid #fff !important;
	border-width: 0 0 2px 2px !important;
	transform: rotate(-45deg) !important;
}

/* ------------------- Dark Mode Checked Checkbox ------------------- */
#uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .element-editor-check input[type="checkbox"]:checked,
.uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .element-editor-check input[type="checkbox"]:checked,
.uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:checked {
	background: #f0abfc !important;
	border-color: #f0abfc !important;
}

#uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .element-editor-check input[type="checkbox"]:checked:focus,
.uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .element-editor-check input[type="checkbox"]:checked:focus,
#uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .element-editor-check input[type="checkbox"]:checked:focus-visible,
.uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .element-editor-check input[type="checkbox"]:checked:focus-visible,
#uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .element-editor-check input[type="checkbox"]:checked:active,
.uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .element-editor-check input[type="checkbox"]:checked:active,
.uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:checked:focus,
.uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:checked:focus-visible,
.uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:checked:active {
	background: #f0abfc !important;
	border-color: #f0abfc !important;
}

#uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .element-editor-check input[type="checkbox"]:checked::after,
.uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .element-editor-check input[type="checkbox"]:checked::after {
	content: '' !important;
	position: absolute !important;
	right: 4px !important;
	top: 1px !important;
	width: 3px !important;
	height: 7px !important;
	border: solid #181a1f !important; /* Dark checkmark on light pink background */
	border-width: 0 0 2px 2px !important;
	transform: rotate(-45deg) !important;
}

.uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .uichemy-composer-direct-link-group .uichemy-composer-direct-link-row input[type="checkbox"]:checked::after {
	content: '' !important;
	position: absolute !important;
	right: 5px !important;
	top: 2px !important;
	width: 4px !important;
	height: 8px !important;
	border: solid #181a1f !important; /* Dark checkmark on light pink background */
	border-width: 0 0 2px 2px !important;
	transform: rotate(-45deg) !important;
}

/* Premium checkerboard grid for media previews (to clearly show transparent SVGs and images) */
.uichemy-composer-floating-panel .element-editor-media-preview,
#uichemy-composer-floating-panel .element-editor-media-preview {
	background-image: linear-gradient(-45deg, var(--uichemy-composer-preview-checker) 25%, transparent 25%),
	                  linear-gradient(45deg, var(--uichemy-composer-preview-checker) 25%, transparent 25%),
	                  linear-gradient(-45deg, transparent 75%, var(--uichemy-composer-preview-checker) 75%),
	                  linear-gradient(45deg, transparent 75%, var(--uichemy-composer-preview-checker) 75%) !important;
	background-size: 10px 10px !important;
	background-position: 100% 0, 100% 5px, 5px -5px, -5px 0 !important;
	background-color: var(--uichemy-composer-panel-bg) !important;
	border: 1px solid var(--uichemy-composer-border-color) !important;
}

/* Premium styled hover overlay buttons for media preview */
.uichemy-composer-floating-panel .element-editor-media-overlay,
#uichemy-composer-floating-panel .element-editor-media-overlay {
	background: rgba(15, 17, 23, 0.75) !important;
}

.uichemy-composer-floating-panel .element-editor-media-overlay-btn,
#uichemy-composer-floating-panel .element-editor-media-overlay-btn {
	-webkit-appearance: none !important;
	   -moz-appearance: none !important;
	        appearance: none !important;
	border: 1px solid rgba(255, 255, 255, 0.25) !important;
	background: rgba(255, 255, 255, 0.1) !important;
	color: #fff !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	letter-spacing: 0.04em !important;
	cursor: pointer !important;
	padding: 6px 14px !important;
	border-radius: 4px !important;
	margin-bottom: 4px !important;
	transition: all 0.2s ease !important;
}

/* Hover highlights matching Light/Dark active accent colors */
#uichemy-composer-floating-panel[data-uich-composer-theme="light"] .element-editor-media-overlay-btn:not(.is-remove):hover,
.uichemy-composer-floating-panel[data-uich-composer-theme="light"] .element-editor-media-overlay-btn:not(.is-remove):hover {
	background: #d004d4 !important;
	border-color: #d004d4 !important;
	color: #fff !important;
}

#uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .element-editor-media-overlay-btn:not(.is-remove):hover,
.uichemy-composer-floating-panel[data-uich-composer-theme="dark"] .element-editor-media-overlay-btn:not(.is-remove):hover {
	background: #f0abfc !important;
	border-color: #f0abfc !important;
	color: #181a1f !important;
}

/* Red color for remove action to distinguish clearly */
.uichemy-composer-floating-panel .element-editor-media-overlay-btn.is-remove,
#uichemy-composer-floating-panel .element-editor-media-overlay-btn.is-remove {
	border: none !important;
	background: transparent !important;
	color: #ff4d4f !important;
	font-weight: 500 !important;
	font-size: 10.5px !important;
	opacity: 0.95 !important;
	margin-top: 2px !important;
}

.uichemy-composer-floating-panel .element-editor-media-overlay-btn.is-remove:hover,
#uichemy-composer-floating-panel .element-editor-media-overlay-btn.is-remove:hover {
	color: #ff7875 !important;
	background: transparent !important;
	text-decoration: underline !important;
}

.uichemy-composer-direct-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}
.uichemy-composer-direct-image-preview-wrap {
	margin-top: 0;
	display: flex;
	justify-content: flex-start;
}
.uichemy-composer-direct-media-left {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.uichemy-composer-direct-media-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
	margin-top: 10px;
	align-items: start;
}
.uichemy-composer-direct-media-grid.is-svg {
	grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
}
.uichemy-composer-direct-svg-code-wrap {
	display: none;
}
.uichemy-composer-direct-media-grid.is-svg .uichemy-composer-direct-svg-code-wrap {
	display: block;
}
.uichemy-composer-direct-svg-code-wrap label {
	display: block;
	margin-bottom: 6px;
}
.uichemy-composer-direct-svg-mode-wrap {
	margin: 0;
}
.uichemy-composer-direct-svg-mode-wrap .uichemy-composer-header-tabs {
	display: inline-flex;
	margin: 0;
	width: auto;
}
.uichemy-composer-direct-svg-mode-wrap .uichemy-composer-tab-btn {
	padding: 6px 10px;
}
.uichemy-composer-direct-svg-code-wrap textarea {
	min-height: 138px;
	resize: vertical;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	--uich-ff: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 12px;
	line-height: 1.45;
}
.uichemy-composer-direct-image-preview {
	position: relative;
	width: 86px;
	height: 86px;
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 4px;
	background: var(--uichemy-composer-panel-bg);
	overflow: hidden;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.15s ease;
}
.uichemy-composer-direct-image-preview:hover {
	border-color: var(--uichemy-composer-accent-color);
}
.uichemy-composer-direct-typography-section.is-svg-layer .uichemy-composer-direct-section-title {
	display: none;
}
.uichemy-composer-direct-typography-section.is-svg-layer {
	padding-top: 0;
	padding-right: 0;
}
.uichemy-composer-direct-typography-section.is-svg-layer .uichemy-composer-direct-media-grid {
	margin-top: 0;
}
.uichemy-composer-direct-typography-section.is-svg-layer .uichemy-composer-direct-media-left {
	padding-right: 10px;
	padding-top: 8px;
}
.uichemy-composer-direct-typography-section.is-svg-layer .uichemy-composer-direct-svg-code-wrap label {
	display: none;
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror {
	min-height: 138px;
	height: auto;
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 4px;
	background: var(--uichemy-composer-input-bg);
	color: var(--uichemy-composer-cm-color);
	font-size: 12px;
	line-height: 1.45;
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror-gutters {
	background: var(--uichemy-composer-cm-gutter-bg);
	border-left: 1px solid var(--uichemy-composer-cm-gutter-border);
	color: var(--uichemy-composer-cm-gutter-color);
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror-cursor {
	border-right-color: var(--uichemy-composer-cm-cursor);
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror-selected {
	background: var(--uichemy-composer-cm-selected) !important;
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror-activeline-background {
	background: var(--uichemy-composer-cm-active-line);
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror-matchingbracket {
	color: var(--uichemy-composer-cm-color) !important;
	border-bottom: 1px solid var(--uichemy-composer-border-color);
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror-nonmatchingbracket {
	color: var(--uichemy-composer-cm-error) !important;
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-comment {
	color: var(--uichemy-composer-cm-comment);
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-string,
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-string-2 {
	color: var(--uichemy-composer-cm-string);
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-number,
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-atom {
	color: var(--uichemy-composer-cm-number);
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-keyword,
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-def,
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-operator {
	color: var(--uichemy-composer-cm-keyword);
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-tag {
	color: var(--uichemy-composer-cm-tag);
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-attribute {
	color: var(--uichemy-composer-cm-attribute);
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-property {
	color: var(--uichemy-composer-cm-property);
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-variable,
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-variable-2,
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-variable-3,
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-type,
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-builtin {
	color: var(--uichemy-composer-cm-variable);
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-qualifier,
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-meta {
	color: var(--uichemy-composer-text-muted);
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror .cm-error {
	background: var(--uichemy-composer-cm-error);
	color: #ffb0b0;
}
.uichemy-composer-direct-svg-code-wrap .CodeMirror textarea {
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
}
.uichemy-composer-direct-image-preview:focus-visible {
	outline: 2px solid var(--uichemy-composer-accent-color);
	outline-offset: 0;
}
.uichemy-composer-direct-image-preview img {
	width: 100%;
	height: 100%;
	-o-object-fit: contain;
	   object-fit: contain;
	display: block;
	background: var(--uichemy-composer-panel-bg);
}
.uichemy-composer-direct-image-empty {
	font-size: 11px;
	color: var(--uichemy-composer-text-muted);
	pointer-events: none;
	text-align: center;
	padding: 0 6px;
}
.uichemy-composer-direct-image-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 12, 15, 0.55);
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	opacity: 0;
	transition: opacity 0.15s ease;
	pointer-events: none;
}
.uichemy-composer-direct-image-preview:hover .uichemy-composer-direct-image-overlay,
.uichemy-composer-direct-image-preview:focus-visible .uichemy-composer-direct-image-overlay {
	opacity: 1;
}
.uichemy-composer-direct-image-preview:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}
.uichemy-composer-direct-status {
	font-size: 11px;
	color: var(--uichemy-composer-text-muted);
}
/* Accordion Styles */
.uichemy-composer-accordion {
	border: 1px solid var(--uichemy-composer-border-color);
	border-radius: 4px;
	margin-bottom: 10px;
	overflow: hidden;
	background: var(--uichemy-composer-col-bg);
}
.uichemy-composer-accordion-header {
	display: flex;
	align-items: center;
	padding: 10px 12px;
	cursor: pointer;
	background: var(--uichemy-composer-header-bg);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--uichemy-composer-text-muted);
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	border-bottom: 1px solid transparent;
	transition: background 0.2s ease;
}
.uichemy-composer-accordion-header:hover {
	background: var(--uichemy-composer-tab-bg);
}
.uichemy-composer-accordion.is-active .uichemy-composer-accordion-header {
	border-bottom-color: var(--uichemy-composer-border-color);
}
.uichemy-composer-accordion-icon {
	margin-left: 10px;
	font-size: 10px;
	transition: transform 0.3s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 12px;
}
.uichemy-composer-accordion.is-active .uichemy-composer-accordion-icon {
	transform: rotate(-90deg);
}
.uichemy-composer-accordion-content {
	display: none;
	padding: 15px;
	background: var(--uichemy-composer-panel-bg);
}
.uichemy-composer-accordion.is-active .uichemy-composer-accordion-content {
	display: block;
}
.uichemy-composer-direct-layout-groups {
	display: flex;
	flex-direction: column;
	gap: 0;
}
.uichemy-composer-btn.ghost {
	background: transparent;
	border-color: var(--uichemy-composer-border-color);
	color: var(--uichemy-composer-text-color);
}
.uichemy-composer-btn:disabled,
.uichemy-composer-direct-field textarea:disabled,
.uichemy-composer-direct-field input:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* CodeMirror Search Dialog Styling */
.CodeMirror-dialog {
	position: absolute;
	right: 0;
	left: 0;
	background: var(--uichemy-composer-panel-bg, #1a1a1a) !important;
	color: var(--uichemy-composer-text-color, #ffffff) !important;
	z-index: 100002 !important;
	padding: 8px 12px !important;
	border-bottom: 1px solid var(--uichemy-composer-border-color, #2d2d2d) !important;
	font-family: inherit !important;
	--uich-ff: inherit !important;
	font-size: 12px !important;
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
	box-sizing: border-box !important;
}
.CodeMirror-dialog-top {
	top: 0;
	border-top: none !important;
}
.CodeMirror-dialog-bottom {
	bottom: 0;
	border-bottom: none !important;
	border-top: 1px solid var(--uichemy-composer-border-color, #2d2d2d) !important;
}
.CodeMirror-dialog input {
	border: 1px solid var(--uichemy-composer-border-color, #2d2d2d) !important;
	background: var(--uichemy-composer-input-bg, #262626) !important;
	color: var(--uichemy-composer-text-color, #ffffff) !important;
	padding: 4px 8px !important;
	border-radius: 4px !important;
	font-family: inherit !important;
	--uich-ff: inherit !important;
	font-size: 12px !important;
	outline: none !important;
	width: 140px !important;
	box-shadow: none !important;
	margin: 0 !important;
}
.CodeMirror-dialog input:focus {
	border-color: var(--uichemy-composer-accent-color, #3895ff) !important;
}
.CodeMirror-dialog button {
	background: var(--uichemy-composer-accent-color, #3895ff) !important;
	color: #ffffff !important;
	border: none !important;
	padding: 4px 10px !important;
	border-radius: 4px !important;
	cursor: pointer !important;
	font-family: inherit !important;
	--uich-ff: inherit !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	transition: background 0.2s ease !important;
}
.CodeMirror-dialog button:hover {
	background: #2b7cd1 !important;
}
.CodeMirror-dialog .CodeMirror-search-hint {
	display: none !important; /* Hide redundant instructions */
}

/* Autocomplete suggestions dropdown styling */
.CodeMirror-hints {
	position: absolute;
	z-index: 100000 !important;
	background: var(--uichemy-composer-col-bg, #1a1a1a) !important;
	border: 1px solid var(--uichemy-composer-border-color, #2d2d2d) !important;
	border-radius: 6px !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
	padding: 4px 0 !important;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
	--uich-ff: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
	font-size: 11px !important;
	max-height: 200px !important;
	overflow-y: auto !important;
	box-sizing: border-box !important;
}
.CodeMirror-hint {
	color: var(--uichemy-composer-text-muted, #888888) !important;
	padding: 6px 12px !important;
	cursor: pointer !important;
	border-radius: 3px !important;
	margin: 0 4px !important;
}
.CodeMirror-hint-active {
	background: var(--uichemy-composer-accent-color, #3895ff) !important;
	color: #ffffff !important;
}

/* Custom styling for the UiChemy Composer edit/style controls in Elementor panel */
.elementor-control-style_layers_edit .elementor-control-title,
.elementor-control-style_code_edit .elementor-control-title,
.elementor-control-style_chat_edit .elementor-control-title {
	font-weight: 500 !important;
}

.elementor-control-style_layers_edit button,
.elementor-control-style_layers_edit .elementor-button,
.elementor-control-style_code_edit button,
.elementor-control-style_code_edit .elementor-button,
.elementor-control-style_chat_edit button,
.elementor-control-style_chat_edit .elementor-button {
	padding-top: 4px !important;
	padding-bottom: 4px !important;
	width: 65px !important;
}

/* Hide the collapsable section header for UiChemy Composer style controls so they show directly */
.elementor-control-section_style {
	display: none !important;
}

/* Custom "Composer" widget icon shown in the Elementor widget panel.
   Uses the current UiChemy app mark (rounded square with the monogram knocked
   out)
   via a CSS mask so it inherits Elementor's default / hover / active icon colors. */
.uichemy-composer-icon::before {
	content: '';
	display: inline-block;
	width: 1em;
	height: 1em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2040%2040%27%3E%3Cpath%20d=%27M29.9051%2021.3778V24.409C29.9028%2025.8619%2029.3149%2027.2547%2028.2694%2028.2821C27.2239%2029.3094%2025.8065%2029.8872%2024.328%2029.8895H20.7909C21.1677%2029.5927%2021.4973%2029.2425%2021.7694%2028.8504C22.6079%2027.6333%2022.7157%2026.2714%2022.7157%2025.2235L22.7264%2021.3778H29.9051Z%27%20fill=%27black%27/%3E%3Cpath%20fill-rule=%27evenodd%27%20clip-rule=%27evenodd%27%20d=%27M4.19223%204.19223C9.78187%20-1.39741%2030.2178%20-1.39741%2035.8075%204.19223C41.3971%209.78187%2041.3971%2030.2178%2035.8075%2035.8075C30.2178%2041.3971%209.78187%2041.3971%204.19223%2035.8075C-1.39741%2030.2178%20-1.39741%209.78187%204.19223%204.19223ZM9.32797%209.33383V24.495C9.32797%2026.124%209.98678%2027.6868%2011.159%2028.8387C12.3312%2029.9904%2013.9213%2030.6375%2015.5789%2030.6375H15.5877C16.0116%2030.6768%2016.4383%2030.6768%2016.8622%2030.6375H24.328C26.0077%2030.6375%2027.6188%2029.9814%2028.8065%2028.8143C29.9941%2027.6472%2030.6609%2026.0643%2030.661%2024.4139V20.6414H21.9774L21.9579%2025.2225C21.9579%2025.2225%2018.0147%2025.4457%2018.0145%2022.4627V14.8553C18.0145%2014.1301%2017.8692%2013.412%2017.5868%2012.742C17.3043%2012.072%2016.89%2011.4628%2016.368%2010.95C15.8462%2010.4374%2015.2265%2010.0312%2014.5448%209.75375C13.8628%209.47629%2013.1315%209.33371%2012.3934%209.33383H9.32797ZM27.0282%209.33383C25.6876%209.33384%2024.402%209.8566%2023.4539%2010.7879C22.506%2011.7193%2021.9729%2012.9825%2021.9725%2014.2997V17.2782H30.659V9.33383H27.0282Z%27%20fill=%27black%27/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2040%2040%27%3E%3Cpath%20d=%27M29.9051%2021.3778V24.409C29.9028%2025.8619%2029.3149%2027.2547%2028.2694%2028.2821C27.2239%2029.3094%2025.8065%2029.8872%2024.328%2029.8895H20.7909C21.1677%2029.5927%2021.4973%2029.2425%2021.7694%2028.8504C22.6079%2027.6333%2022.7157%2026.2714%2022.7157%2025.2235L22.7264%2021.3778H29.9051Z%27%20fill=%27black%27/%3E%3Cpath%20fill-rule=%27evenodd%27%20clip-rule=%27evenodd%27%20d=%27M4.19223%204.19223C9.78187%20-1.39741%2030.2178%20-1.39741%2035.8075%204.19223C41.3971%209.78187%2041.3971%2030.2178%2035.8075%2035.8075C30.2178%2041.3971%209.78187%2041.3971%204.19223%2035.8075C-1.39741%2030.2178%20-1.39741%209.78187%204.19223%204.19223ZM9.32797%209.33383V24.495C9.32797%2026.124%209.98678%2027.6868%2011.159%2028.8387C12.3312%2029.9904%2013.9213%2030.6375%2015.5789%2030.6375H15.5877C16.0116%2030.6768%2016.4383%2030.6768%2016.8622%2030.6375H24.328C26.0077%2030.6375%2027.6188%2029.9814%2028.8065%2028.8143C29.9941%2027.6472%2030.6609%2026.0643%2030.661%2024.4139V20.6414H21.9774L21.9579%2025.2225C21.9579%2025.2225%2018.0147%2025.4457%2018.0145%2022.4627V14.8553C18.0145%2014.1301%2017.8692%2013.412%2017.5868%2012.742C17.3043%2012.072%2016.89%2011.4628%2016.368%2010.95C15.8462%2010.4374%2015.2265%2010.0312%2014.5448%209.75375C13.8628%209.47629%2013.1315%209.33371%2012.3934%209.33383H9.32797ZM27.0282%209.33383C25.6876%209.33384%2024.402%209.8566%2023.4539%2010.7879C22.506%2011.7193%2021.9729%2012.9825%2021.9725%2014.2997V17.2782H30.659V9.33383H27.0282Z%27%20fill=%27black%27/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Live-page editor only: lift the editor above the page's own layers.
   A design's sticky header or preloader (z-index 9999-99999, sometimes the
   maximum) covered the panel, which sat at 9999. The order is kept:
   panel < admin bar < the panel's pop-ups (composer-right-panel.css) <
   legacy pop-overs < CodeMirror hints < canvas chrome (2147482300+) <
   the media library, opened from the panel, which must cover everything. */
body.uichemy-frontend-editor .uichemy-composer-floating-panel {
	z-index: 2147481000;
}
body.uichemy-frontend-editor #wpadminbar {
	z-index: 2147481050;
}
body.uichemy-frontend-editor .uichemy-composer-direct-style-origin-popover,
body.uichemy-frontend-editor .uichemy-composer-direct-global-color-popover {
	z-index: 2147481400;
}
body.uichemy-frontend-editor .CodeMirror-hints,
body.uichemy-frontend-editor .CodeMirror-dialog {
	z-index: 2147481500 !important;
}
body.uichemy-frontend-editor .media-modal-backdrop {
	z-index: 2147482980;
}
body.uichemy-frontend-editor .media-modal {
	z-index: 2147482990;
}

/*
 * Tailwind for the DASHBOARD bundle, utilities only, no preflight.
 *
 * `@tailwind base` is deliberately absent. It emits a global reset that would
 * restyle every element on the wp-admin page (including WordPress's admin menu
 * and admin bar) the moment this stylesheet loads. Utilities are already scoped
 * by `important: '.uich-tw'` in tailwind.config.js, so omitting base is all it
 * takes to confine Tailwind to the island.
 *
 * The handful of preflight rules the shadcn components genuinely depend on are
 * re-stated below, scoped to the island. Everything else preflight does is
 * either irrelevant here or already handled by wp-admin's own stylesheet.
 */
.uich-tw .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.uich-tw .pointer-events-none {
  pointer-events: none;
}
.uich-tw .pointer-events-auto {
  pointer-events: auto;
}
.uich-tw .visible {
  visibility: visible;
}
.uich-tw .invisible {
  visibility: hidden;
}
.uich-tw .collapse {
  visibility: collapse;
}
.uich-tw .static {
  position: static;
}
.uich-tw .fixed {
  position: fixed;
}
.uich-tw .absolute {
  position: absolute;
}
.uich-tw .relative {
  position: relative;
}
.uich-tw .sticky {
  position: sticky;
}
.uich-tw .inset-0 {
  inset: 0px;
}
.uich-tw .inset-\[2px\] {
  inset: 2px;
}
.uich-tw .inset-x-0 {
  right: 0px;
  left: 0px;
}
.uich-tw .inset-y-0 {
  top: 0px;
  bottom: 0px;
}
.uich-tw .inset-y-2 {
  top: 8px;
  bottom: 8px;
}
.uich-tw .-bottom-1 {
  bottom: -4px;
}
.uich-tw .-right-6 {
  left: -24px;
}
.uich-tw .-top-1 {
  top: -4px;
}
.uich-tw .-top-8 {
  top: -32px;
}
.uich-tw .bottom-3 {
  bottom: 12px;
}
.uich-tw .bottom-6 {
  bottom: 24px;
}
.uich-tw .left-0 {
  right: 0px;
}
.uich-tw .left-1\/2 {
  right: 50%;
}
.uich-tw .left-2 {
  right: 8px;
}
.uich-tw .left-3 {
  right: 12px;
}
.uich-tw .left-\[50\%\] {
  right: 50%;
}
.uich-tw .right-0 {
  left: 0px;
}
.uich-tw .right-1 {
  left: 4px;
}
.uich-tw .right-2 {
  left: 8px;
}
.uich-tw .right-3 {
  left: 12px;
}
.uich-tw .right-4 {
  left: 16px;
}
.uich-tw .right-6 {
  left: 24px;
}
.uich-tw .top-0 {
  top: 0px;
}
.uich-tw .top-1 {
  top: 4px;
}
.uich-tw .top-3 {
  top: 12px;
}
.uich-tw .top-4 {
  top: 16px;
}
.uich-tw .top-6 {
  top: 24px;
}
.uich-tw .top-\[50\%\] {
  top: 50%;
}
.uich-tw .top-full {
  top: 100%;
}
.uich-tw .isolate {
  isolation: isolate;
}
.uich-tw .z-10 {
  z-index: 10;
}
.uich-tw .z-30 {
  z-index: 30;
}
.uich-tw .z-50 {
  z-index: 50;
}
.uich-tw .z-\[2147483646\] {
  z-index: 2147483646;
}
.uich-tw .z-\[2147483647\] {
  z-index: 2147483647;
}
.uich-tw .z-\[2\] {
  z-index: 2;
}
.uich-tw .z-\[99999\] {
  z-index: 99999;
}
.uich-tw .col-span-2 {
  grid-column: span 2 / span 2;
}
.uich-tw .m-0 {
  margin: 0px;
}
.uich-tw .m-3 {
  margin: 12px;
}
.uich-tw .m-4 {
  margin: 16px;
}
.uich-tw .m-auto {
  margin: auto;
}
.uich-tw .-mx-1 {
  margin-right: -4px;
  margin-left: -4px;
}
.uich-tw .-mx-2 {
  margin-right: -8px;
  margin-left: -8px;
}
.uich-tw .mx-auto {
  margin-right: auto;
  margin-left: auto;
}
.uich-tw .my-1 {
  margin-top: 4px;
  margin-bottom: 4px;
}
.uich-tw .my-3 {
  margin-top: 12px;
  margin-bottom: 12px;
}
.uich-tw .my-3\.5 {
  margin-top: 14px;
  margin-bottom: 14px;
}
.uich-tw .my-auto {
  margin-top: auto;
  margin-bottom: auto;
}
.uich-tw .-mb-2 {
  margin-bottom: -8px;
}
.uich-tw .-mb-px {
  margin-bottom: -1px;
}
.uich-tw .-ml-1 {
  margin-right: -4px;
}
.uich-tw .-mr-1 {
  margin-left: -4px;
}
.uich-tw .-mt-1 {
  margin-top: -4px;
}
.uich-tw .mb-1 {
  margin-bottom: 4px;
}
.uich-tw .mb-1\.5 {
  margin-bottom: 6px;
}
.uich-tw .mb-2 {
  margin-bottom: 8px;
}
.uich-tw .mb-2\.5 {
  margin-bottom: 10px;
}
.uich-tw .mb-3 {
  margin-bottom: 12px;
}
.uich-tw .mb-4 {
  margin-bottom: 16px;
}
.uich-tw .ml-1 {
  margin-right: 4px;
}
.uich-tw .ml-1\.5 {
  margin-right: 6px;
}
.uich-tw .ml-2 {
  margin-right: 8px;
}
.uich-tw .ml-auto {
  margin-right: auto;
}
.uich-tw .mr-1 {
  margin-left: 4px;
}
.uich-tw .mr-2 {
  margin-left: 8px;
}
.uich-tw .mt-0\.5 {
  margin-top: 2px;
}
.uich-tw .mt-1 {
  margin-top: 4px;
}
.uich-tw .mt-1\.5 {
  margin-top: 6px;
}
.uich-tw .mt-2 {
  margin-top: 8px;
}
.uich-tw .mt-2\.5 {
  margin-top: 10px;
}
.uich-tw .mt-3 {
  margin-top: 12px;
}
.uich-tw .mt-3\.5 {
  margin-top: 14px;
}
.uich-tw .mt-4 {
  margin-top: 16px;
}
.uich-tw .mt-5 {
  margin-top: 20px;
}
.uich-tw .mt-6 {
  margin-top: 24px;
}
.uich-tw .mt-auto {
  margin-top: auto;
}
.uich-tw .mt-px {
  margin-top: 1px;
}
.uich-tw .\!block {
  display: block !important;
}
.uich-tw .block {
  display: block;
}
.uich-tw .inline-block {
  display: inline-block;
}
.uich-tw .\!inline {
  display: inline !important;
}
.uich-tw .inline {
  display: inline;
}
.uich-tw .flex {
  display: flex;
}
.uich-tw .inline-flex {
  display: inline-flex;
}
.uich-tw .table {
  display: table;
}
.uich-tw .table-cell {
  display: table-cell;
}
.uich-tw .table-row {
  display: table-row;
}
.uich-tw .flow-root {
  display: flow-root;
}
.uich-tw .grid {
  display: grid;
}
.uich-tw .inline-grid {
  display: inline-grid;
}
.uich-tw .contents {
  display: contents;
}
.uich-tw .list-item {
  display: list-item;
}
.uich-tw .\!hidden {
  display: none !important;
}
.uich-tw .hidden {
  display: none;
}
.uich-tw .aspect-\[16\/10\] {
  aspect-ratio: 16/10;
}
.uich-tw .size-1\.5 {
  width: 6px;
  height: 6px;
}
.uich-tw .size-11 {
  width: 44px;
  height: 44px;
}
.uich-tw .size-12 {
  width: 48px;
  height: 48px;
}
.uich-tw .size-16 {
  width: 64px;
  height: 64px;
}
.uich-tw .size-2 {
  width: 8px;
  height: 8px;
}
.uich-tw .size-3 {
  width: 12px;
  height: 12px;
}
.uich-tw .size-3\.5 {
  width: 14px;
  height: 14px;
}
.uich-tw .size-4 {
  width: 16px;
  height: 16px;
}
.uich-tw .size-5 {
  width: 20px;
  height: 20px;
}
.uich-tw .size-6 {
  width: 24px;
  height: 24px;
}
.uich-tw .size-7 {
  width: 28px;
  height: 28px;
}
.uich-tw .size-8 {
  width: 32px;
  height: 32px;
}
.uich-tw .size-9 {
  width: 36px;
  height: 36px;
}
.uich-tw .size-\[18px\] {
  width: 18px;
  height: 18px;
}
.uich-tw .\!h-4 {
  height: 16px !important;
}
.uich-tw .h-0 {
  height: 0px;
}
.uich-tw .h-1 {
  height: 4px;
}
.uich-tw .h-1\.5 {
  height: 6px;
}
.uich-tw .h-10 {
  height: 40px;
}
.uich-tw .h-2 {
  height: 8px;
}
.uich-tw .h-2\.5 {
  height: 10px;
}
.uich-tw .h-3 {
  height: 12px;
}
.uich-tw .h-3\.5 {
  height: 14px;
}
.uich-tw .h-4 {
  height: 16px;
}
.uich-tw .h-44 {
  height: 176px;
}
.uich-tw .h-5 {
  height: 20px;
}
.uich-tw .h-6 {
  height: 24px;
}
.uich-tw .h-7 {
  height: 28px;
}
.uich-tw .h-8 {
  height: 32px;
}
.uich-tw .h-9 {
  height: 36px;
}
.uich-tw .h-\[1px\] {
  height: 1px;
}
.uich-tw .h-\[320px\] {
  height: 320px;
}
.uich-tw .h-\[70vh\] {
  height: 70vh;
}
.uich-tw .h-\[var\(--radix-select-trigger-height\)\] {
  height: var(--radix-select-trigger-height);
}
.uich-tw .h-auto {
  height: auto;
}
.uich-tw .h-full {
  height: 100%;
}
.uich-tw .h-px {
  height: 1px;
}
.uich-tw .max-h-52 {
  max-height: 208px;
}
.uich-tw .max-h-96 {
  max-height: 384px;
}
.uich-tw .max-h-\[140px\] {
  max-height: 140px;
}
.uich-tw .max-h-\[220px\] {
  max-height: 220px;
}
.uich-tw .max-h-\[280px\] {
  max-height: 280px;
}
.uich-tw .max-h-\[300px\] {
  max-height: 300px;
}
.uich-tw .max-h-\[380px\] {
  max-height: 380px;
}
.uich-tw .max-h-\[52vh\] {
  max-height: 52vh;
}
.uich-tw .max-h-\[86\%\] {
  max-height: 86%;
}
.uich-tw .max-h-\[min\(360px\2c 60vh\)\] {
  max-height: min(360px, 60vh);
}
.uich-tw .min-h-0 {
  min-height: 0px;
}
.uich-tw .min-h-8 {
  min-height: 32px;
}
.uich-tw .min-h-\[420px\] {
  min-height: 420px;
}
.uich-tw .min-h-\[520px\] {
  min-height: 520px;
}
.uich-tw .min-h-\[60px\] {
  min-height: 60px;
}
.uich-tw .min-h-\[90px\] {
  min-height: 90px;
}
.uich-tw .\!w-7 {
  width: 28px !important;
}
.uich-tw .w-0 {
  width: 0px;
}
.uich-tw .w-0\.5 {
  width: 2px;
}
.uich-tw .w-1 {
  width: 4px;
}
.uich-tw .w-1\.5 {
  width: 6px;
}
.uich-tw .w-10 {
  width: 40px;
}
.uich-tw .w-2 {
  width: 8px;
}
.uich-tw .w-2\.5 {
  width: 10px;
}
.uich-tw .w-20 {
  width: 80px;
}
.uich-tw .w-24 {
  width: 96px;
}
.uich-tw .w-3\.5 {
  width: 14px;
}
.uich-tw .w-32 {
  width: 128px;
}
.uich-tw .w-36 {
  width: 144px;
}
.uich-tw .w-4 {
  width: 16px;
}
.uich-tw .w-44 {
  width: 176px;
}
.uich-tw .w-48 {
  width: 192px;
}
.uich-tw .w-5 {
  width: 20px;
}
.uich-tw .w-52 {
  width: 208px;
}
.uich-tw .w-56 {
  width: 224px;
}
.uich-tw .w-6 {
  width: 24px;
}
.uich-tw .w-60 {
  width: 240px;
}
.uich-tw .w-64 {
  width: 256px;
}
.uich-tw .w-7 {
  width: 28px;
}
.uich-tw .w-72 {
  width: 288px;
}
.uich-tw .w-8 {
  width: 32px;
}
.uich-tw .w-9 {
  width: 36px;
}
.uich-tw .w-\[104px\] {
  width: 104px;
}
.uich-tw .w-\[150px\] {
  width: 150px;
}
.uich-tw .w-\[176px\] {
  width: 176px;
}
.uich-tw .w-\[184px\] {
  width: 184px;
}
.uich-tw .w-\[190px\] {
  width: 190px;
}
.uich-tw .w-\[1px\] {
  width: 1px;
}
.uich-tw .w-\[200px\] {
  width: 200px;
}
.uich-tw .w-\[300px\] {
  width: 300px;
}
.uich-tw .w-\[320px\] {
  width: 320px;
}
.uich-tw .w-\[34\%\] {
  width: 34%;
}
.uich-tw .w-\[380px\] {
  width: 380px;
}
.uich-tw .w-\[92vw\] {
  width: 92vw;
}
.uich-tw .w-\[min\(640px\2c 94\%\)\] {
  width: min(640px, 94%);
}
.uich-tw .w-auto {
  width: auto;
}
.uich-tw .w-full {
  width: 100%;
}
.uich-tw .w-max {
  width: -moz-max-content;
  width: max-content;
}
.uich-tw .min-w-0 {
  min-width: 0px;
}
.uich-tw .min-w-10 {
  min-width: 40px;
}
.uich-tw .min-w-4 {
  min-width: 16px;
}
.uich-tw .min-w-8 {
  min-width: 32px;
}
.uich-tw .min-w-9 {
  min-width: 36px;
}
.uich-tw .min-w-\[10rem\] {
  min-width: 160px;
}
.uich-tw .min-w-\[150px\] {
  min-width: 150px;
}
.uich-tw .min-w-\[160px\] {
  min-width: 160px;
}
.uich-tw .min-w-\[168px\] {
  min-width: 168px;
}
.uich-tw .min-w-\[16px\] {
  min-width: 16px;
}
.uich-tw .min-w-\[180px\] {
  min-width: 180px;
}
.uich-tw .min-w-\[190px\] {
  min-width: 190px;
}
.uich-tw .min-w-\[240px\] {
  min-width: 240px;
}
.uich-tw .min-w-\[84px\] {
  min-width: 84px;
}
.uich-tw .min-w-\[8rem\] {
  min-width: 128px;
}
.uich-tw .min-w-\[var\(--radix-select-trigger-width\)\] {
  min-width: var(--radix-select-trigger-width);
}
.uich-tw .min-w-full {
  min-width: 100%;
}
.uich-tw .max-w-2xl {
  max-width: 672px;
}
.uich-tw .max-w-5xl {
  max-width: 1024px;
}
.uich-tw .max-w-\[180px\] {
  max-width: 180px;
}
.uich-tw .max-w-\[240px\] {
  max-width: 240px;
}
.uich-tw .max-w-\[280px\] {
  max-width: 280px;
}
.uich-tw .max-w-\[640px\] {
  max-width: 640px;
}
.uich-tw .max-w-\[90vw\] {
  max-width: 90vw;
}
.uich-tw .max-w-\[min\(340px\2c 90vw\)\] {
  max-width: min(340px, 90vw);
}
.uich-tw .max-w-full {
  max-width: 100%;
}
.uich-tw .max-w-lg {
  max-width: 512px;
}
.uich-tw .max-w-md {
  max-width: 448px;
}
.uich-tw .max-w-sm {
  max-width: 384px;
}
.uich-tw .max-w-xs {
  max-width: 320px;
}
.uich-tw .flex-1 {
  flex: 1 1 0%;
}
.uich-tw .flex-shrink {
  flex-shrink: 1;
}
.uich-tw .shrink {
  flex-shrink: 1;
}
.uich-tw .shrink-0 {
  flex-shrink: 0;
}
.uich-tw .flex-grow {
  flex-grow: 1;
}
.uich-tw .grow {
  flex-grow: 1;
}
.uich-tw .border-collapse {
  border-collapse: collapse;
}
.uich-tw .origin-top-left {
  transform-origin: top right;
}
.uich-tw .-translate-x-1\/2 {
  --tw-translate-x: -50%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw .translate-x-0 {
  --tw-translate-x: 0px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw .translate-x-3 {
  --tw-translate-x: 12px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw .translate-x-4 {
  --tw-translate-x: 16px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw .translate-x-\[-50\%\] {
  --tw-translate-x: -50%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw .translate-x-\[110\%\] {
  --tw-translate-x: 110%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw .translate-y-\[-50\%\] {
  --tw-translate-y: -50%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw .rotate-90 {
  --tw-rotate: 90deg;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw .transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
@keyframes pulse {
  50% {
    opacity: .5;
  }
}
.uich-tw .animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.uich-tw .cursor-default {
  cursor: default;
}
.uich-tw .cursor-grab {
  cursor: grab;
}
.uich-tw .cursor-not-allowed {
  cursor: not-allowed;
}
.uich-tw .cursor-pointer {
  cursor: pointer;
}
.uich-tw .touch-none {
  touch-action: none;
}
.uich-tw .select-none {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.uich-tw .select-all {
  -webkit-user-select: all;
     -moz-user-select: all;
          user-select: all;
}
.uich-tw .resize-none {
  resize: none;
}
.uich-tw .resize-y {
  resize: vertical;
}
.uich-tw .resize {
  resize: both;
}
.uich-tw .grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.uich-tw .grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.uich-tw .grid-cols-\[repeat\(auto-fill\2c minmax\(44px\2c 1fr\)\)\] {
  grid-template-columns: repeat(auto-fill,minmax(44px,1fr));
}
.uich-tw .flex-col {
  flex-direction: column;
}
.uich-tw .flex-col-reverse {
  flex-direction: column-reverse;
}
.uich-tw .flex-wrap {
  flex-wrap: wrap;
}
.uich-tw .place-items-center {
  place-items: center;
}
.uich-tw .items-start {
  align-items: flex-start;
}
.uich-tw .items-center {
  align-items: center;
}
.uich-tw .justify-start {
  justify-content: flex-start;
}
.uich-tw .justify-center {
  justify-content: center;
}
.uich-tw .justify-between {
  justify-content: space-between;
}
.uich-tw .gap-0 {
  gap: 0px;
}
.uich-tw .gap-0\.5 {
  gap: 2px;
}
.uich-tw .gap-1 {
  gap: 4px;
}
.uich-tw .gap-1\.5 {
  gap: 6px;
}
.uich-tw .gap-2 {
  gap: 8px;
}
.uich-tw .gap-2\.5 {
  gap: 10px;
}
.uich-tw .gap-3 {
  gap: 12px;
}
.uich-tw .gap-4 {
  gap: 16px;
}
.uich-tw .gap-6 {
  gap: 24px;
}
.uich-tw .gap-7 {
  gap: 28px;
}
.uich-tw .gap-x-2\.5 {
  -moz-column-gap: 10px;
       column-gap: 10px;
}
.uich-tw .gap-x-4 {
  -moz-column-gap: 16px;
       column-gap: 16px;
}
.uich-tw .gap-x-5 {
  -moz-column-gap: 20px;
       column-gap: 20px;
}
.uich-tw .gap-x-6 {
  -moz-column-gap: 24px;
       column-gap: 24px;
}
.uich-tw .gap-y-1 {
  row-gap: 4px;
}
.uich-tw .gap-y-2 {
  row-gap: 8px;
}
.uich-tw .gap-y-2\.5 {
  row-gap: 10px;
}
.uich-tw .gap-y-3 {
  row-gap: 12px;
}
.uich-tw :is(.space-y-0\.5 > :not([hidden]) ~ :not([hidden])) {
  --tw-space-y-reverse: 0;
  margin-top: calc(2px * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(2px * var(--tw-space-y-reverse));
}
.uich-tw :is(.space-y-1\.5 > :not([hidden]) ~ :not([hidden])) {
  --tw-space-y-reverse: 0;
  margin-top: calc(6px * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(6px * var(--tw-space-y-reverse));
}
.uich-tw :is(.space-y-2 > :not([hidden]) ~ :not([hidden])) {
  --tw-space-y-reverse: 0;
  margin-top: calc(8px * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(8px * var(--tw-space-y-reverse));
}
.uich-tw :is(.space-y-5 > :not([hidden]) ~ :not([hidden])) {
  --tw-space-y-reverse: 0;
  margin-top: calc(20px * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(20px * var(--tw-space-y-reverse));
}
.uich-tw :is(.divide-y > :not([hidden]) ~ :not([hidden])) {
  --tw-divide-y-reverse: 0;
  border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
  border-bottom-width: calc(1px * var(--tw-divide-y-reverse));
}
.uich-tw :is(.divide-border\/60 > :not([hidden]) ~ :not([hidden])) {
  border-color: hsl(var(--border) / 0.6);
}
.uich-tw .self-start {
  align-self: flex-start;
}
.uich-tw .self-end {
  align-self: flex-end;
}
.uich-tw .self-center {
  align-self: center;
}
.uich-tw .overflow-auto {
  overflow: auto;
}
.uich-tw .overflow-hidden {
  overflow: hidden;
}
.uich-tw .overflow-visible {
  overflow: visible;
}
.uich-tw .overflow-x-auto {
  overflow-x: auto;
}
.uich-tw .overflow-y-auto {
  overflow-y: auto;
}
.uich-tw .overflow-x-hidden {
  overflow-x: hidden;
}
.uich-tw .truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uich-tw .whitespace-nowrap {
  white-space: nowrap;
}
.uich-tw .whitespace-pre-wrap {
  white-space: pre-wrap;
}
.uich-tw .break-all {
  word-break: break-all;
}
.uich-tw .rounded {
  border-radius: 4px;
}
.uich-tw .rounded-2xl {
  border-radius: 16px;
}
.uich-tw .rounded-\[10px\] {
  border-radius: 10px;
}
.uich-tw .rounded-\[15px\] {
  border-radius: 15px;
}
.uich-tw .rounded-\[3px\] {
  border-radius: 3px;
}
.uich-tw .rounded-\[inherit\] {
  border-radius: inherit;
}
.uich-tw .rounded-full {
  border-radius: 9999px;
}
.uich-tw .rounded-lg {
  border-radius: var(--radius);
}
.uich-tw .rounded-md {
  border-radius: calc(var(--radius) - 2px);
}
.uich-tw .rounded-none {
  border-radius: 0px;
}
.uich-tw .rounded-sm {
  border-radius: calc(var(--radius) - 4px);
}
.uich-tw .rounded-xl {
  border-radius: 12px;
}
.uich-tw .rounded-r {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}
.uich-tw .rounded-r-md {
  border-top-left-radius: calc(var(--radius) - 2px);
  border-bottom-left-radius: calc(var(--radius) - 2px);
}
.uich-tw .rounded-tr-\[10px\] {
  border-top-left-radius: 10px;
}
.uich-tw .border {
  border-width: 1px;
}
.uich-tw .border-0 {
  border-width: 0px;
}
.uich-tw .border-2 {
  border-width: 2px;
}
.uich-tw .border-y {
  border-top-width: 1px;
  border-bottom-width: 1px;
}
.uich-tw .border-b {
  border-bottom-width: 1px;
}
.uich-tw .border-l {
  border-right-width: 1px;
}
.uich-tw .border-l-\[3px\] {
  border-right-width: 3px;
}
.uich-tw .border-t {
  border-top-width: 1px;
}
.uich-tw .border-dashed {
  border-style: dashed;
}
.uich-tw .border-\[\#0E7C6B\]\/45 {
  border-color: rgb(14 124 107 / 0.45);
}
.uich-tw .border-\[\#0e7c6b\]\/20 {
  border-color: rgb(14 124 107 / 0.2);
}
.uich-tw .border-\[\#171717\]\/20 {
  border-color: rgb(23 23 23 / 0.2);
}
.uich-tw .border-\[\#b4603a\]\/20 {
  border-color: rgb(180 96 58 / 0.2);
}
.uich-tw .border-border {
  border-color: hsl(var(--border));
}
.uich-tw .border-destructive\/20 {
  border-color: hsl(var(--destructive) / 0.2);
}
.uich-tw .border-destructive\/30 {
  border-color: hsl(var(--destructive) / 0.3);
}
.uich-tw .border-destructive\/45 {
  border-color: hsl(var(--destructive) / 0.45);
}
.uich-tw .border-foreground {
  border-color: hsl(var(--foreground));
}
.uich-tw .border-input {
  border-color: hsl(var(--input));
}
.uich-tw .border-muted-foreground\/60 {
  border-color: hsl(var(--muted-foreground) / 0.6);
}
.uich-tw .border-primary {
  border-color: hsl(var(--primary));
}
.uich-tw .border-primary-foreground\/40 {
  border-color: hsl(var(--primary-foreground) / 0.4);
}
.uich-tw .border-primary\/50 {
  border-color: hsl(var(--primary) / 0.5);
}
.uich-tw .border-transparent {
  border-color: transparent;
}
.uich-tw .border-l-foreground\/40 {
  border-right-color: hsl(var(--foreground) / 0.4);
}
.uich-tw .border-l-transparent {
  border-right-color: transparent;
}
.uich-tw .border-t-transparent {
  border-top-color: transparent;
}
.uich-tw .bg-\[\#0E7C6B\] {
  --tw-bg-opacity: 1;
  background-color: rgb(14 124 107 / var(--tw-bg-opacity, 1));
}
.uich-tw .bg-\[\#0e7c6b\]\/10 {
  background-color: rgb(14 124 107 / 0.1);
}
.uich-tw .bg-\[\#0e7c6b\]\/\[0\.06\] {
  background-color: rgb(14 124 107 / 0.06);
}
.uich-tw .bg-\[\#171717\] {
  --tw-bg-opacity: 1;
  background-color: rgb(23 23 23 / var(--tw-bg-opacity, 1));
}
.uich-tw .bg-\[\#171717\]\/10 {
  background-color: rgb(23 23 23 / 0.1);
}
.uich-tw .bg-\[\#171717\]\/\[0\.07\] {
  background-color: rgb(23 23 23 / 0.07);
}
.uich-tw .bg-\[\#BDEFE7\]\/50 {
  background-color: rgb(189 239 231 / 0.5);
}
.uich-tw .bg-\[\#fbe0d0\]\/40 {
  background-color: rgb(251 224 208 / 0.4);
}
.uich-tw .bg-\[color\:var\(--panel-bg-4\2c \2026\)\] {
  background-color: var(--panel-bg-4,…);
}
.uich-tw .bg-\[color\:var\(--rp-surface-raised\2c hsl\(var\(--muted\)\/0\.3\)\)\] {
  background-color: var(--rp-surface-raised,hsl(var(--muted)/0.3));
}
.uich-tw .bg-\[var\(--uc-surface-overlay\)\] {
  background-color: var(--uc-surface-overlay);
}
.uich-tw .bg-accent {
  background-color: hsl(var(--accent));
}
.uich-tw .bg-background {
  background-color: hsl(var(--background));
}
.uich-tw .bg-background\/60 {
  background-color: hsl(var(--background) / 0.6);
}
.uich-tw .bg-black\/80 {
  background-color: rgb(0 0 0 / 0.8);
}
.uich-tw .bg-border {
  background-color: hsl(var(--border));
}
.uich-tw .bg-card {
  background-color: hsl(var(--card));
}
.uich-tw .bg-card\/90 {
  background-color: hsl(var(--card) / 0.9);
}
.uich-tw .bg-destructive {
  background-color: hsl(var(--destructive));
}
.uich-tw .bg-destructive\/10 {
  background-color: hsl(var(--destructive) / 0.1);
}
.uich-tw .bg-destructive\/5 {
  background-color: hsl(var(--destructive) / 0.05);
}
.uich-tw .bg-foreground {
  background-color: hsl(var(--foreground));
}
.uich-tw .bg-foreground\/40 {
  background-color: hsl(var(--foreground) / 0.4);
}
.uich-tw .bg-input {
  background-color: hsl(var(--input));
}
.uich-tw .bg-muted {
  background-color: hsl(var(--muted));
}
.uich-tw .bg-muted-foreground {
  background-color: hsl(var(--muted-foreground));
}
.uich-tw .bg-muted-foreground\/15 {
  background-color: hsl(var(--muted-foreground) / 0.15);
}
.uich-tw .bg-muted\/20 {
  background-color: hsl(var(--muted) / 0.2);
}
.uich-tw .bg-muted\/30 {
  background-color: hsl(var(--muted) / 0.3);
}
.uich-tw .bg-muted\/40 {
  background-color: hsl(var(--muted) / 0.4);
}
.uich-tw .bg-muted\/50 {
  background-color: hsl(var(--muted) / 0.5);
}
.uich-tw .bg-popover {
  background-color: hsl(var(--popover));
}
.uich-tw .bg-primary {
  background-color: hsl(var(--primary));
}
.uich-tw .bg-primary-foreground\/10 {
  background-color: hsl(var(--primary-foreground) / 0.1);
}
.uich-tw .bg-primary\/20 {
  background-color: hsl(var(--primary) / 0.2);
}
.uich-tw .bg-secondary {
  background-color: hsl(var(--secondary));
}
.uich-tw .bg-transparent {
  background-color: transparent;
}
.uich-tw .bg-white {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}
.uich-tw .bg-gradient-to-br {
  background-image: linear-gradient(to bottom left, var(--tw-gradient-stops));
}
.uich-tw .bg-gradient-to-l {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}
.uich-tw .bg-gradient-to-r {
  background-image: linear-gradient(to left, var(--tw-gradient-stops));
}
.uich-tw .from-\[\#171717\]\/\[0\.07\] {
  --tw-gradient-from: rgb(23 23 23 / 0.07) var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(23 23 23 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.uich-tw .from-card {
  --tw-gradient-from: hsl(var(--card)) var(--tw-gradient-from-position);
  --tw-gradient-to: hsl(var(--card) / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.uich-tw .via-card {
  --tw-gradient-to: hsl(var(--card) / 0)  var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), hsl(var(--card)) var(--tw-gradient-via-position), var(--tw-gradient-to);
}
.uich-tw .to-card {
  --tw-gradient-to: hsl(var(--card)) var(--tw-gradient-to-position);
}
.uich-tw .to-transparent {
  --tw-gradient-to: transparent var(--tw-gradient-to-position);
}
.uich-tw .fill-current {
  fill: currentColor;
}
.uich-tw .object-cover {
  -o-object-fit: cover;
     object-fit: cover;
}
.uich-tw .p-0 {
  padding: 0px;
}
.uich-tw .p-1 {
  padding: 4px;
}
.uich-tw .p-1\.5 {
  padding: 6px;
}
.uich-tw .p-2 {
  padding: 8px;
}
.uich-tw .p-2\.5 {
  padding: 10px;
}
.uich-tw .p-3 {
  padding: 12px;
}
.uich-tw .p-3\.5 {
  padding: 14px;
}
.uich-tw .p-4 {
  padding: 16px;
}
.uich-tw .p-5 {
  padding: 20px;
}
.uich-tw .p-6 {
  padding: 24px;
}
.uich-tw .p-\[1px\] {
  padding: 1px;
}
.uich-tw .px-0 {
  padding-right: 0px;
  padding-left: 0px;
}
.uich-tw .px-1 {
  padding-right: 4px;
  padding-left: 4px;
}
.uich-tw .px-1\.5 {
  padding-right: 6px;
  padding-left: 6px;
}
.uich-tw .px-2 {
  padding-right: 8px;
  padding-left: 8px;
}
.uich-tw .px-2\.5 {
  padding-right: 10px;
  padding-left: 10px;
}
.uich-tw .px-3 {
  padding-right: 12px;
  padding-left: 12px;
}
.uich-tw .px-4 {
  padding-right: 16px;
  padding-left: 16px;
}
.uich-tw .px-5 {
  padding-right: 20px;
  padding-left: 20px;
}
.uich-tw .px-6 {
  padding-right: 24px;
  padding-left: 24px;
}
.uich-tw .px-7 {
  padding-right: 28px;
  padding-left: 28px;
}
.uich-tw .px-8 {
  padding-right: 32px;
  padding-left: 32px;
}
.uich-tw .py-0\.5 {
  padding-top: 2px;
  padding-bottom: 2px;
}
.uich-tw .py-1 {
  padding-top: 4px;
  padding-bottom: 4px;
}
.uich-tw .py-1\.5 {
  padding-top: 6px;
  padding-bottom: 6px;
}
.uich-tw .py-10 {
  padding-top: 40px;
  padding-bottom: 40px;
}
.uich-tw .py-16 {
  padding-top: 64px;
  padding-bottom: 64px;
}
.uich-tw .py-2 {
  padding-top: 8px;
  padding-bottom: 8px;
}
.uich-tw .py-2\.5 {
  padding-top: 10px;
  padding-bottom: 10px;
}
.uich-tw .py-3 {
  padding-top: 12px;
  padding-bottom: 12px;
}
.uich-tw .py-3\.5 {
  padding-top: 14px;
  padding-bottom: 14px;
}
.uich-tw .py-4 {
  padding-top: 16px;
  padding-bottom: 16px;
}
.uich-tw .py-5 {
  padding-top: 20px;
  padding-bottom: 20px;
}
.uich-tw .py-6 {
  padding-top: 24px;
  padding-bottom: 24px;
}
.uich-tw .py-8 {
  padding-top: 32px;
  padding-bottom: 32px;
}
.uich-tw .pb-0\.5 {
  padding-bottom: 2px;
}
.uich-tw .pb-1 {
  padding-bottom: 4px;
}
.uich-tw .pb-1\.5 {
  padding-bottom: 6px;
}
.uich-tw .pb-2 {
  padding-bottom: 8px;
}
.uich-tw .pb-2\.5 {
  padding-bottom: 10px;
}
.uich-tw .pb-24 {
  padding-bottom: 96px;
}
.uich-tw .pb-4 {
  padding-bottom: 16px;
}
.uich-tw .pb-5 {
  padding-bottom: 20px;
}
.uich-tw .pb-8 {
  padding-bottom: 32px;
}
.uich-tw .pl-2 {
  padding-right: 8px;
}
.uich-tw .pl-2\.5 {
  padding-right: 10px;
}
.uich-tw .pl-4 {
  padding-right: 16px;
}
.uich-tw .pl-6 {
  padding-right: 24px;
}
.uich-tw .pl-8 {
  padding-right: 32px;
}
.uich-tw .pr-0\.5 {
  padding-left: 2px;
}
.uich-tw .pr-1 {
  padding-left: 4px;
}
.uich-tw .pr-2 {
  padding-left: 8px;
}
.uich-tw .pr-4 {
  padding-left: 16px;
}
.uich-tw .pr-7 {
  padding-left: 28px;
}
.uich-tw .pr-8 {
  padding-left: 32px;
}
.uich-tw .pr-9 {
  padding-left: 36px;
}
.uich-tw .pt-0 {
  padding-top: 0px;
}
.uich-tw .pt-0\.5 {
  padding-top: 2px;
}
.uich-tw .pt-1 {
  padding-top: 4px;
}
.uich-tw .pt-2 {
  padding-top: 8px;
}
.uich-tw .pt-3 {
  padding-top: 12px;
}
.uich-tw .pt-3\.5 {
  padding-top: 14px;
}
.uich-tw .text-left {
  text-align: right;
}
.uich-tw .text-center {
  text-align: center;
}
.uich-tw .align-top {
  vertical-align: top;
}
.uich-tw .align-middle {
  vertical-align: middle;
}
.uich-tw .font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --uich-ff: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.uich-tw .font-sans {
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --uich-ff: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
.uich-tw .text-2xl {
  font-size: 24px;
  line-height: 32px;
}
.uich-tw .text-3xl {
  font-size: 30px;
  line-height: 36px;
}
.uich-tw .text-\[10px\] {
  font-size: 10px;
}
.uich-tw .text-\[11\.5px\] {
  font-size: 11.5px;
}
.uich-tw .text-\[11px\] {
  font-size: 11px;
}
.uich-tw .text-\[12px\] {
  font-size: 12px;
}
.uich-tw .text-\[13px\] {
  font-size: 13px;
}
.uich-tw .text-\[14px\] {
  font-size: 14px;
}
.uich-tw .text-\[15px\] {
  font-size: 15px;
}
.uich-tw .text-\[16px\] {
  font-size: 16px;
}
.uich-tw .text-\[9px\] {
  font-size: 9px;
}
.uich-tw .text-base {
  font-size: 16px;
  line-height: 24px;
}
.uich-tw .text-lg {
  font-size: 18px;
  line-height: 28px;
}
.uich-tw .text-sm {
  font-size: 14px;
  line-height: 20px;
}
.uich-tw .text-xl {
  font-size: 20px;
  line-height: 28px;
}
.uich-tw .text-xs {
  font-size: 12px;
  line-height: 16px;
}
.uich-tw .font-bold {
  font-weight: 700;
}
.uich-tw .font-medium {
  font-weight: 500;
}
.uich-tw .font-normal {
  font-weight: 400;
}
.uich-tw .font-semibold {
  font-weight: 600;
}
.uich-tw .uppercase {
  text-transform: uppercase;
}
.uich-tw .lowercase {
  text-transform: lowercase;
}
.uich-tw .capitalize {
  text-transform: capitalize;
}
.uich-tw .italic {
  font-style: italic;
}
.uich-tw .ordinal {
  --tw-ordinal: ordinal;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.uich-tw .tabular-nums {
  --tw-numeric-spacing: tabular-nums;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}
.uich-tw .leading-\[17\.5px\] {
  line-height: 17.5px;
}
.uich-tw .leading-none {
  line-height: 1;
}
.uich-tw .leading-relaxed {
  line-height: 1.625;
}
.uich-tw .leading-snug {
  line-height: 1.375;
}
.uich-tw .tracking-\[-0\.35px\] {
  letter-spacing: -0.35px;
}
.uich-tw .tracking-\[-0\.4px\] {
  letter-spacing: -0.4px;
}
.uich-tw .tracking-tight {
  letter-spacing: -0.025em;
}
.uich-tw .tracking-wide {
  letter-spacing: 0.025em;
}
.uich-tw .tracking-wider {
  letter-spacing: 0.05em;
}
.uich-tw .tracking-widest {
  letter-spacing: 0.1em;
}
.uich-tw .text-\[\#0E7C6B\] {
  --tw-text-opacity: 1;
  color: rgb(14 124 107 / var(--tw-text-opacity, 1));
}
.uich-tw .text-\[\#0e7c6b\] {
  --tw-text-opacity: 1;
  color: rgb(14 124 107 / var(--tw-text-opacity, 1));
}
.uich-tw .text-\[\#171717\] {
  --tw-text-opacity: 1;
  color: rgb(23 23 23 / var(--tw-text-opacity, 1));
}
.uich-tw .text-\[\#171717\]\/\[0\.06\] {
  color: rgb(23 23 23 / 0.06);
}
.uich-tw .text-\[\#b4603a\] {
  --tw-text-opacity: 1;
  color: rgb(180 96 58 / var(--tw-text-opacity, 1));
}
.uich-tw .text-\[var\(--uc-text\)\] {
  color: var(--uc-text);
}
.uich-tw .text-\[var\(--uc-text-muted\)\] {
  color: var(--uc-text-muted);
}
.uich-tw .text-\[var\(--uc-text-subtle\)\] {
  color: var(--uc-text-subtle);
}
.uich-tw .text-accent-foreground {
  color: hsl(var(--accent-foreground));
}
.uich-tw .text-background {
  color: hsl(var(--background));
}
.uich-tw .text-card-foreground {
  color: hsl(var(--card-foreground));
}
.uich-tw .text-current {
  color: currentColor;
}
.uich-tw .text-destructive {
  color: hsl(var(--destructive));
}
.uich-tw .text-destructive-foreground {
  color: hsl(var(--destructive-foreground));
}
.uich-tw .text-foreground {
  color: hsl(var(--foreground));
}
.uich-tw .text-input {
  color: hsl(var(--input));
}
.uich-tw .text-muted-foreground {
  color: hsl(var(--muted-foreground));
}
.uich-tw .text-muted-foreground\/50 {
  color: hsl(var(--muted-foreground) / 0.5);
}
.uich-tw .text-muted-foreground\/60 {
  color: hsl(var(--muted-foreground) / 0.6);
}
.uich-tw .text-popover-foreground {
  color: hsl(var(--popover-foreground));
}
.uich-tw .text-primary {
  color: hsl(var(--primary));
}
.uich-tw .text-primary-foreground {
  color: hsl(var(--primary-foreground));
}
.uich-tw .text-primary-foreground\/70 {
  color: hsl(var(--primary-foreground) / 0.7);
}
.uich-tw .text-primary-foreground\/80 {
  color: hsl(var(--primary-foreground) / 0.8);
}
.uich-tw .text-secondary-foreground {
  color: hsl(var(--secondary-foreground));
}
.uich-tw .text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.uich-tw .underline {
  text-decoration-line: underline;
}
.uich-tw .overline {
  text-decoration-line: overline;
}
.uich-tw .line-through {
  text-decoration-line: line-through;
}
.uich-tw .underline-offset-2 {
  text-underline-offset: 2px;
}
.uich-tw .underline-offset-4 {
  text-underline-offset: 4px;
}
.uich-tw .opacity-0 {
  opacity: 0;
}
.uich-tw .opacity-100 {
  opacity: 1;
}
.uich-tw .opacity-50 {
  opacity: 0.5;
}
.uich-tw .opacity-60 {
  opacity: 0.6;
}
.uich-tw .opacity-70 {
  opacity: 0.7;
}
.uich-tw .opacity-75 {
  opacity: 0.75;
}
.uich-tw .opacity-80 {
  opacity: 0.8;
}
.uich-tw .opacity-90 {
  opacity: 0.9;
}
.uich-tw .shadow {
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.uich-tw .shadow-\[0_4px_16px_rgba\(0\2c 0\2c 0\2c 0\.06\)\] {
  --tw-shadow: 0 4px 16px rgba(0,0,0,0.06);
  --tw-shadow-colored: 0 4px 16px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.uich-tw .shadow-lg {
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.uich-tw .shadow-md {
  --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.uich-tw .shadow-none {
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.uich-tw .shadow-sm {
  --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.uich-tw .shadow-xl {
  --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.uich-tw .outline-none {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.uich-tw .\!outline {
  outline-style: solid !important;
}
.uich-tw .outline {
  outline-style: solid;
}
.uich-tw .\!ring {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important;
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important;
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) !important;
}
.uich-tw .ring {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.uich-tw .ring-0 {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.uich-tw .ring-1 {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.uich-tw .ring-border {
  --tw-ring-color: hsl(var(--border));
}
.uich-tw .ring-ring {
  --tw-ring-color: hsl(var(--ring));
}
.uich-tw .ring-offset-background {
  --tw-ring-offset-color: hsl(var(--background));
}
.uich-tw .blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.uich-tw .grayscale {
  --tw-grayscale: grayscale(100%);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.uich-tw .invert {
  --tw-invert: invert(100%);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.uich-tw .sepia {
  --tw-sepia: sepia(100%);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.uich-tw .filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.uich-tw .transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.uich-tw .transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.uich-tw .transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.uich-tw .transition-opacity {
  transition-property: opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.uich-tw .transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.uich-tw .duration-150 {
  transition-duration: 150ms;
}
.uich-tw .duration-200 {
  transition-duration: 200ms;
}
.uich-tw .duration-300 {
  transition-duration: 300ms;
}
.uich-tw .ease-in {
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
.uich-tw .ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.uich-tw .ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
@keyframes enter {
  from {
    opacity: var(--tw-enter-opacity, 1);
    transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));
  }
}
@keyframes exit {
  to {
    opacity: var(--tw-exit-opacity, 1);
    transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));
  }
}
.uich-tw .animate-in {
  animation-name: enter;
  animation-duration: 150ms;
  --tw-enter-opacity: initial;
  --tw-enter-scale: initial;
  --tw-enter-rotate: initial;
  --tw-enter-translate-x: initial;
  --tw-enter-translate-y: initial;
}
.uich-tw .fade-in {
  --tw-enter-opacity: 0;
}
.uich-tw .fade-in-0 {
  --tw-enter-opacity: 0;
}
.uich-tw .fade-in-80 {
  --tw-enter-opacity: 0.8;
}
.uich-tw .zoom-in {
  --tw-enter-scale: 0;
}
.uich-tw .zoom-in-95 {
  --tw-enter-scale: .95;
}
.uich-tw .zoom-out {
  --tw-exit-scale: 0;
}
.uich-tw .slide-in-from-top-1 {
  --tw-enter-translate-y: -4px;
}
.uich-tw .duration-150 {
  animation-duration: 150ms;
}
.uich-tw .duration-200 {
  animation-duration: 200ms;
}
.uich-tw .duration-300 {
  animation-duration: 300ms;
}
.uich-tw .ease-in {
  animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
.uich-tw .ease-in-out {
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.uich-tw .ease-out {
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
.uich-tw .\!running {
  animation-play-state: running !important;
}
.uich-tw .running {
  animation-play-state: running;
}
.uich-tw .paused {
  animation-play-state: paused;
}
.uich-tw .\[-ms-overflow-style\:none\] {
  -ms-overflow-style: none;
}
.uich-tw .\[scrollbar-width\:none\] {
  scrollbar-width: none;
}

.uich-tw,
.uich-tw *,
.uich-tw *::before,
.uich-tw *::after {
  box-sizing: border-box;
  /* Tailwind's border utilities set width only and assume this default. Without
     it `border` / `border-t` produce no visible line. */
  border-width: 0;
  border-style: solid;
  border-color: hsl(var(--border));

  /* Initialise Tailwind's transform vars. Preflight normally does this on `*`;
     this island omits preflight, so a utility like `translate-x-4` sets only
     --tw-translate-x, leaving --tw-translate-y empty → `translate(1rem, )` is
     invalid and the browser drops the whole transform. That silently froze the
     Switch thumb (and any transform utility) in place. Seeding all seven makes
     translate/rotate/skew/scale compose correctly. */
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
}

/* `:not(:where([data-uc]))` leaves design-system controls marked `data-uc` (DS
   Button, Switch, Select trigger, Input, Textarea in Settings) to their own classes, as shadcn-tokens.css does for the
   composer. `:where()` adds no specificity, so everything else still gets the reset. */
.uich-tw button:not(:where([data-uc])),
.uich-tw [type='button']:not(:where([data-uc])),
.uich-tw [type='reset']:not(:where([data-uc])),
.uich-tw [type='submit']:not(:where([data-uc])) {
  background-color: transparent;
  background-image: none;
}

.uich-tw button:not(:where([data-uc])),
.uich-tw input:not(:where([data-uc])),
.uich-tw optgroup,
.uich-tw select:not(:where([data-uc])),
.uich-tw textarea:not(:where([data-uc])) {
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

.uich-tw h1,
.uich-tw h2,
.uich-tw h3,
.uich-tw h4,
.uich-tw p {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.uich-tw ol,
.uich-tw ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.uich-tw svg {
  display: block;
  vertical-align: middle;
}

/* WordPress core forms.css styles text-like inputs and textareas at (0,1,1), and
   their :focus at (0,2,1): a grey 1px border, 2px radius, 0 12px padding, 40px
   min-height and a blue focus ring. That beats a DS field's single class, so in
   Settings the DS Input / Textarea lost their look (and the search icon sat on
   top of the text). Restate the DS field look for DS fields (`data-uc`) there.
   Hover keeps working: the DS hover rule is (0,4,0). Settings only uses the sm
   size, hence the 8px side padding. */
.uich-tw .set-root input[data-uc],
.uich-tw .set-root textarea[data-uc] {
  border: 0;
  border-radius: var(--uc-input-radius, var(--uc-radius-md));
  background-color: var(--uc-surface-overlay);
  color: var(--uc-text-strong);
}
.uich-tw .set-root input[data-uc] { min-height: 0; padding: 0 var(--uc-space-8); }
/* The browser's blue × clear button isn't part of the DS field. */
.uich-tw .set-root input[data-uc][type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
/* A left icon renders before the input inside the DS wrapper. */
.uich-tw .set-root input[data-uc]:not(:first-child) { padding-right: var(--uc-space-32); }
.uich-tw .set-root input[data-uc]:not(:disabled),
.uich-tw .set-root textarea[data-uc]:not(:disabled) {
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-input);
}
.uich-tw .set-root input[data-uc]:focus,
.uich-tw .set-root textarea[data-uc]:focus {
  border-color: transparent;
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-input);
  outline: 2px solid var(--uc-ring, currentColor);
  outline-offset: -2px;
}
.uich-tw .file\:border-0::file-selector-button {
  border-width: 0px;
}
.uich-tw .file\:bg-transparent::file-selector-button {
  background-color: transparent;
}
.uich-tw .file\:text-sm::file-selector-button {
  font-size: 14px;
  line-height: 20px;
}
.uich-tw .file\:font-medium::file-selector-button {
  font-weight: 500;
}
.uich-tw .file\:text-foreground::file-selector-button {
  color: hsl(var(--foreground));
}
.uich-tw .placeholder\:text-muted-foreground::-moz-placeholder {
  color: hsl(var(--muted-foreground));
}
.uich-tw .placeholder\:text-muted-foreground::placeholder {
  color: hsl(var(--muted-foreground));
}
.uich-tw .last\:border-0:last-child {
  border-width: 0px;
}
.uich-tw .focus-within\:ring-1:focus-within {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.uich-tw .focus-within\:ring-ring:focus-within {
  --tw-ring-color: hsl(var(--ring));
}
.uich-tw .hover\:bg-accent:hover {
  background-color: hsl(var(--accent));
}
.uich-tw .hover\:bg-accent\/50:hover {
  background-color: hsl(var(--accent) / 0.5);
}
.uich-tw .hover\:bg-destructive\/80:hover {
  background-color: hsl(var(--destructive) / 0.8);
}
.uich-tw .hover\:bg-destructive\/90:hover {
  background-color: hsl(var(--destructive) / 0.9);
}
.uich-tw .hover\:bg-foreground\/\[0\.06\]:hover {
  background-color: hsl(var(--foreground) / 0.06);
}
.uich-tw .hover\:bg-muted:hover {
  background-color: hsl(var(--muted));
}
.uich-tw .hover\:bg-muted\/40:hover {
  background-color: hsl(var(--muted) / 0.4);
}
.uich-tw .hover\:bg-muted\/50:hover {
  background-color: hsl(var(--muted) / 0.5);
}
.uich-tw .hover\:bg-primary\/80:hover {
  background-color: hsl(var(--primary) / 0.8);
}
.uich-tw .hover\:bg-primary\/90:hover {
  background-color: hsl(var(--primary) / 0.9);
}
.uich-tw .hover\:bg-secondary\/80:hover {
  background-color: hsl(var(--secondary) / 0.8);
}
.uich-tw .hover\:text-\[\#171717\]:hover {
  --tw-text-opacity: 1;
  color: rgb(23 23 23 / var(--tw-text-opacity, 1));
}
.uich-tw .hover\:text-\[var\(--uc-text-strong\)\]:hover {
  color: var(--uc-text-strong);
}
.uich-tw .hover\:text-accent-foreground:hover {
  color: hsl(var(--accent-foreground));
}
.uich-tw .hover\:text-destructive:hover {
  color: hsl(var(--destructive));
}
.uich-tw .hover\:text-foreground:hover {
  color: hsl(var(--foreground));
}
.uich-tw .hover\:text-muted-foreground:hover {
  color: hsl(var(--muted-foreground));
}
.uich-tw .hover\:text-primary-foreground:hover {
  color: hsl(var(--primary-foreground));
}
.uich-tw .hover\:underline:hover {
  text-decoration-line: underline;
}
.uich-tw .hover\:no-underline:hover {
  text-decoration-line: none;
}
.uich-tw .hover\:opacity-100:hover {
  opacity: 1;
}
.uich-tw .hover\:shadow-md:hover {
  --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.uich-tw .focus\:bg-accent:focus {
  background-color: hsl(var(--accent));
}
.uich-tw .focus\:text-accent-foreground:focus {
  color: hsl(var(--accent-foreground));
}
.uich-tw .focus\:text-destructive:focus {
  color: hsl(var(--destructive));
}
.uich-tw .focus\:text-foreground:focus {
  color: hsl(var(--foreground));
}
.uich-tw .focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.uich-tw .focus\:ring-1:focus {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.uich-tw .focus\:ring-ring:focus {
  --tw-ring-color: hsl(var(--ring));
}
.uich-tw .focus\:ring-offset-0:focus {
  --tw-ring-offset-width: 0px;
}
.uich-tw .focus-visible\:opacity-100:focus-visible {
  opacity: 1;
}
.uich-tw .focus-visible\:outline-none:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.uich-tw .focus-visible\:ring-0:focus-visible {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.uich-tw .focus-visible\:ring-1:focus-visible {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.uich-tw .focus-visible\:ring-ring:focus-visible {
  --tw-ring-color: hsl(var(--ring));
}
.uich-tw .focus-visible\:ring-offset-0:focus-visible {
  --tw-ring-offset-width: 0px;
}
.uich-tw .focus-visible\:ring-offset-background:focus-visible {
  --tw-ring-offset-color: hsl(var(--background));
}
.uich-tw .active\:cursor-grabbing:active {
  cursor: grabbing;
}
.uich-tw .disabled\:pointer-events-none:disabled {
  pointer-events: none;
}
.uich-tw .disabled\:cursor-not-allowed:disabled {
  cursor: not-allowed;
}
.uich-tw .disabled\:opacity-50:disabled {
  opacity: 0.5;
}
.uich-tw :is(.group:hover .group-hover\:-translate-y-0\.5) {
  --tw-translate-y: -2px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw :is(.group:hover .group-hover\:translate-x-0\.5) {
  --tw-translate-x: 2px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw :is(.group:hover .group-hover\:bg-foreground\/20) {
  background-color: hsl(var(--foreground) / 0.2);
}
.uich-tw :is(.group:hover .group-hover\:opacity-100) {
  opacity: 1;
}
.uich-tw :is(.peer:disabled ~ .peer-disabled\:cursor-not-allowed) {
  cursor: not-allowed;
}
.uich-tw :is(.peer:disabled ~ .peer-disabled\:opacity-70) {
  opacity: 0.7;
}
.uich-tw .data-\[disabled\]\:pointer-events-none[data-disabled] {
  pointer-events: none;
}
.uich-tw .data-\[side\=bottom\]\:translate-y-1[data-side="bottom"] {
  --tw-translate-y: 4px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw .data-\[side\=left\]\:-translate-x-1[data-side="left"] {
  --tw-translate-x: -4px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw .data-\[side\=right\]\:translate-x-1[data-side="right"] {
  --tw-translate-x: 4px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw .data-\[side\=top\]\:-translate-y-1[data-side="top"] {
  --tw-translate-y: -4px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw .data-\[state\=checked\]\:translate-x-4[data-state="checked"] {
  --tw-translate-x: 16px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw .data-\[state\=unchecked\]\:translate-x-0[data-state="unchecked"] {
  --tw-translate-x: 0px;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
@keyframes accordion-up {
  from {
    height: var(--radix-accordion-content-height);
  }
  to {
    height: 0;
  }
}
.uich-tw .data-\[state\=closed\]\:animate-accordion-up[data-state="closed"] {
  animation: accordion-up 0.2s ease-out;
}
@keyframes accordion-down {
  from {
    height: 0;
  }
  to {
    height: var(--radix-accordion-content-height);
  }
}
.uich-tw .data-\[state\=open\]\:animate-accordion-down[data-state="open"] {
  animation: accordion-down 0.2s ease-out;
}
.uich-tw .data-\[state\=unchecked\]\:border-muted-foreground\/40[data-state="unchecked"] {
  border-color: hsl(var(--muted-foreground) / 0.4);
}
.uich-tw .data-\[state\=checked\]\:bg-primary[data-state="checked"] {
  background-color: hsl(var(--primary));
}
.uich-tw .data-\[state\=on\]\:bg-accent[data-state="on"] {
  background-color: hsl(var(--accent));
}
.uich-tw .data-\[state\=open\]\:bg-accent[data-state="open"] {
  background-color: hsl(var(--accent));
}
.uich-tw .data-\[state\=unchecked\]\:bg-input[data-state="unchecked"] {
  background-color: hsl(var(--input));
}
.uich-tw .data-\[placeholder\]\:text-muted-foreground[data-placeholder] {
  color: hsl(var(--muted-foreground));
}
.uich-tw .data-\[state\=active\]\:text-foreground[data-state="active"] {
  color: hsl(var(--foreground));
}
.uich-tw .data-\[state\=checked\]\:text-primary-foreground[data-state="checked"] {
  color: hsl(var(--primary-foreground));
}
.uich-tw .data-\[state\=on\]\:text-accent-foreground[data-state="on"] {
  color: hsl(var(--accent-foreground));
}
.uich-tw .data-\[state\=open\]\:text-accent-foreground[data-state="open"] {
  color: hsl(var(--accent-foreground));
}
.uich-tw .data-\[state\=open\]\:text-muted-foreground[data-state="open"] {
  color: hsl(var(--muted-foreground));
}
.uich-tw .data-\[disabled\]\:opacity-50[data-disabled] {
  opacity: 0.5;
}
.uich-tw .data-\[state\=open\]\:animate-in[data-state="open"] {
  animation-name: enter;
  animation-duration: 150ms;
  --tw-enter-opacity: initial;
  --tw-enter-scale: initial;
  --tw-enter-rotate: initial;
  --tw-enter-translate-x: initial;
  --tw-enter-translate-y: initial;
}
.uich-tw .data-\[state\=closed\]\:animate-out[data-state="closed"] {
  animation-name: exit;
  animation-duration: 150ms;
  --tw-exit-opacity: initial;
  --tw-exit-scale: initial;
  --tw-exit-rotate: initial;
  --tw-exit-translate-x: initial;
  --tw-exit-translate-y: initial;
}
.uich-tw .data-\[state\=closed\]\:fade-out-0[data-state="closed"] {
  --tw-exit-opacity: 0;
}
.uich-tw .data-\[state\=open\]\:fade-in-0[data-state="open"] {
  --tw-enter-opacity: 0;
}
.uich-tw .data-\[state\=closed\]\:zoom-out-95[data-state="closed"] {
  --tw-exit-scale: .95;
}
.uich-tw .data-\[state\=open\]\:zoom-in-95[data-state="open"] {
  --tw-enter-scale: .95;
}
.uich-tw .data-\[side\=bottom\]\:slide-in-from-top-2[data-side="bottom"] {
  --tw-enter-translate-y: -8px;
}
.uich-tw .data-\[side\=left\]\:slide-in-from-right-2[data-side="left"] {
  --tw-enter-translate-x: 8px;
}
.uich-tw .data-\[side\=right\]\:slide-in-from-left-2[data-side="right"] {
  --tw-enter-translate-x: -8px;
}
.uich-tw .data-\[side\=top\]\:slide-in-from-bottom-2[data-side="top"] {
  --tw-enter-translate-y: 8px;
}
.uich-tw .data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state="closed"] {
  --tw-exit-translate-x: -50%;
}
.uich-tw .data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state="closed"] {
  --tw-exit-translate-y: -48%;
}
.uich-tw .data-\[state\=open\]\:slide-in-from-left-1\/2[data-state="open"] {
  --tw-enter-translate-x: -50%;
}
.uich-tw .data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state="open"] {
  --tw-enter-translate-y: -48%;
}
@media (min-width: 640px) {
  .uich-tw .sm\:ml-12 {
    margin-right: 48px;
  }
  .uich-tw .sm\:max-w-2xl {
    max-width: 672px;
  }
  .uich-tw .sm\:max-w-md {
    max-width: 448px;
  }
  .uich-tw .sm\:shrink-0 {
    flex-shrink: 0;
  }
  .uich-tw .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .uich-tw .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .uich-tw .sm\:flex-row {
    flex-direction: row;
  }
  .uich-tw .sm\:items-center {
    align-items: center;
  }
  .uich-tw .sm\:justify-end {
    justify-content: flex-end;
  }
  .uich-tw .sm\:justify-between {
    justify-content: space-between;
  }
  .uich-tw :is(.sm\:space-x-2 > :not([hidden]) ~ :not([hidden])) {
    --tw-space-x-reverse: 0;
    margin-left: calc(8px * var(--tw-space-x-reverse));
    margin-right: calc(8px * calc(1 - var(--tw-space-x-reverse)));
  }
  .uich-tw .sm\:rounded-lg {
    border-radius: var(--radius);
  }
  .uich-tw .sm\:p-6 {
    padding: 24px;
  }
  .uich-tw .sm\:p-8 {
    padding: 32px;
  }
  .uich-tw .sm\:px-6 {
    padding-right: 24px;
    padding-left: 24px;
  }
  .uich-tw .sm\:text-left {
    text-align: right;
  }
}
@media (min-width: 768px) {
  .uich-tw .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  .uich-tw .md\:grid {
    display: grid;
  }
  .uich-tw .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .uich-tw .lg\:w-\[38\%\] {
    width: 38%;
  }
  .uich-tw .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .uich-tw .lg\:flex-row {
    flex-direction: row;
  }
  .uich-tw :is(.lg\:divide-x > :not([hidden]) ~ :not([hidden])) {
    --tw-divide-x-reverse: 0;
    border-left-width: calc(1px * var(--tw-divide-x-reverse));
    border-right-width: calc(1px * calc(1 - var(--tw-divide-x-reverse)));
  }
  .uich-tw :is(.lg\:divide-y-0 > :not([hidden]) ~ :not([hidden])) {
    --tw-divide-y-reverse: 0;
    border-top-width: calc(0px * calc(1 - var(--tw-divide-y-reverse)));
    border-bottom-width: calc(0px * var(--tw-divide-y-reverse));
  }
}
@media (min-width: 1280px) {
  .uich-tw .xl\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.uich-tw .\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar {
  display: none;
}
.uich-tw :is(.\[\&\>\[data-state\=checked\]\]\:\!translate-x-3>[data-state=checked]) {
  --tw-translate-x: 12px !important;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important;
}
.uich-tw :is(.\[\&\>\[data-state\=unchecked\]\]\:bg-muted-foreground>[data-state=unchecked]) {
  background-color: hsl(var(--muted-foreground));
}
.uich-tw :is(.\[\&\>span\]\:line-clamp-1>span) {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.uich-tw :is(.\[\&\>span\]\:\!size-3>span) {
  width: 12px !important;
  height: 12px !important;
}
.uich-tw :is(.\[\&\>svg\]\:size-4>svg) {
  width: 16px;
  height: 16px;
}
.uich-tw :is(.\[\&\>svg\]\:shrink-0>svg) {
  flex-shrink: 0;
}
.uich-tw :is(.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg) {
  --tw-rotate: 180deg;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.uich-tw :is(.\[\&_svg\]\:pointer-events-none svg) {
  pointer-events: none;
}
.uich-tw :is(.\[\&_svg\]\:size-3\.5 svg) {
  width: 14px;
  height: 14px;
}
.uich-tw :is(.\[\&_svg\]\:size-36 svg) {
  width: 144px;
  height: 144px;
}
.uich-tw :is(.\[\&_svg\]\:size-4 svg) {
  width: 16px;
  height: 16px;
}
.uich-tw :is(.\[\&_svg\]\:size-5 svg) {
  width: 20px;
  height: 20px;
}
.uich-tw :is(.\[\&_svg\]\:size-8 svg) {
  width: 32px;
  height: 32px;
}
.uich-tw :is(.\[\&_svg\]\:size-\[18px\] svg) {
  width: 18px;
  height: 18px;
}
.uich-tw :is(.\[\&_svg\]\:shrink-0 svg) {
  flex-shrink: 0;
}

/*
 * Isolation — keep the host page's CSS out of the composer's UI.
 * ════════════════════════════════════════════════════════════════════════════
 * The panel does not render in a page of its own. It mounts inside whatever
 * WordPress, the theme and every other active plugin have already styled, and
 * those stylesheets load with no knowledge of us. Two things leak across that
 * boundary, and both have produced "a colour I never chose appeared on hover /
 * on the active tab" reports:
 *
 *   1. CUSTOM PROPERTIES. Ours and theirs share one inheritance tree. A theme
 *      that sets `--primary` or `--accent` on `:root` reaches every one of our
 *      elements unless we redeclare that name closer to them. We DO redeclare
 *      the shadcn set on `.uich-tw`, so those are covered — but a name we only
 *      ever CONSUME (always with a `var(--x, fallback)`) has no declaration of
 *      ours anywhere, so the page's value is the one that wins.
 *
 *      Verified in the wild: a site's own UiChemy Globals print ~70 variables
 *      onto `:root` — among them `--primary`, `--secondary`, `--accent` and a
 *      whole `--uc-*` family, which is the design system's own prefix.
 *
 *   2. ELEMENT SELECTORS. A rule like `a:hover { color: #ff5a6e }` in a theme
 *      reset carries specificity (0,1,1) and matches our markup directly. Any
 *      bare element we render inherits it.
 *
 * Both are closed below. Nothing here changes how the panel looks on its own;
 * it only stops someone else's stylesheet from changing it.
 */

/* ── 1 · Custom properties we consume but never declare ────────────────────
 *
 * `initial` on a custom property is the precise tool for this: it makes the
 * name "guaranteed-invalid", i.e. exactly as if nobody had ever declared it.
 * So `var(--x, fallback)` still resolves to its authored fallback — every one
 * of these is always read WITH a fallback — while the page's value can no
 * longer reach us. Setting a real value instead would have silently become a
 * second source of truth for each of them.
 *
 * Deliberately NOT reset here:
 *   · --radix-*            Radix writes these inline on its own content.
 *   · --wp-admin-theme-color   borrowed from WP core on purpose.
 *   · --uich-dock-w, --uich-gb-dock-w/-top, --uich-bricks-dock-w, --uich-mtl-h,
 *     --uich-sx, --uich-tools-w
 *                          the panel's own JS writes these on <html>/<body>,
 *                          ABOVE this scope — they have to inherit inwards.
 *   · --uichemy-composer-*  declared by our own editor-panel stylesheet.
 */
:is(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp
) {
  /* Single letters and bare words — the likeliest collisions of all. */
  --c: initial;
  --x: initial;
  --hc: initial;
  --gw-c: initial;
  --token: initial;
  --text-strong: initial;
  --cafe-espresso: initial;

  /* Per-element animation/measurement values, written inline by our own JS.
     Inline still wins for the element that owns it; this only stops a page
     value standing in for the frame before that JS runs. */
  --_d: initial;
  --_delay: initial;
  --_dt-max-h: initial;
  --seg-h: initial;
  --seg-o: initial;
  --seg-w: initial;
  --seg-x: initial;
  --tab-bar-o: initial;
  --tab-bar-w: initial;
  --tab-bar-x: initial;
  --rp-box-gap: initial;
  --rp-box-pad: initial;

  /* Design-system names we read but define elsewhere (or not at all). The
     `--uc-` prefix is NOT ours alone — UiChemy Globals emit `--uc-*` too. */
  --uc-brand-lighter: initial;
  --uc-control-h-xs: initial;
  --uc-focus-ring: initial;
  --uc-global: initial;
  --uc-tabs-fade-l: initial;
  --uc-tabs-fade-r: initial;
  --uc-text-default: initial;
}

/* ── 2 · Element-selector leaks ("button:hover") ───────────────────────
 *
 * The one that reaches furthest. Nexter prints this INLINE (handle
 * `nexter-style-inline-css`, which is why it never turns up in a file scan):
 *
 *     button:hover, button:focus, input[type="submit"]:hover, .button:focus, …
 *       { background: var(--nxt-link-hover-color, #ff5a6e);
 *         border-color: var(--nxt-link-hover-color, #ff5a6e); }
 *
 * `button:hover` is (0,1,1) and matches every button we render. Our Tailwind
 * utilities compile to `.uich-tw .bg-x` → (0,2,0) and already outrank it, and so
 * do our own `.thing:hover` rules — but a design-system component styled by a
 * single CSS-module class is (0,1,0), so the theme wins and the control turns
 * red under the pointer.
 *
 * SPECIFICITY IS THE WHOLE DESIGN HERE. This block is pinned to exactly (0,2,0):
 * the host list is `:is()` (0,1,0), the elements are `:where()` (0,0,0), and the
 * state is `:is()` (0,1,0). That lands it
 *
 *     above  the theme at (0,1,1)                        → the red is gone
 *     level  with our own `.thing:hover` rules (0,2,0)   → a TIE
 *
 * and a tie is decided by source order. This file is imported before every
 * component stylesheet, so each component keeps its own hover look and only the
 * controls that never asked for one are reset. Adding a class to the selector,
 * or swapping a `:where()` for an `:is()`, would push this to (0,2,1) and start
 * flattening our own hover states — don't. The host list is classes ONLY for the
 * same reason: `:is()` takes the HIGHEST specificity of its arguments, so one id
 * in there (`#uichemy-composer-floating-panel`) would silently make the whole
 * rule (1,1,0). The drawer shell is covered anyway — the panel it wraps carries
 * `.uich-composer-host` and `.uich-tw`.
 *
 * A CHECKED radio / checkbox (Radix `data-state="checked"` / "indeterminate") is
 * left out of the reset: its fill IS its state, and wiping it on :hover / :focus
 * turned the control into an empty ring (the dot / tick is drawn in the inverse
 * colour, so it vanished too) the moment it was clicked. Its own rule
 * (`.root[data-state='checked']`, (0,2,0)) already outranks the theme's (0,1,1).
 * The `:not()` sits inside `:where()`, so the block stays at (0,2,0).
 *
 * Only the two properties the theme actually sets are reverted. `color` is left
 * alone for buttons (reverting it would hand them the UA's `buttontext` on a
 * dark panel) and taken back only on links, where a themed hover colour is the
 * other classic leak.
 */
:is(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp
)
  :where(a, button:not([data-state='checked'], [data-state='indeterminate']), input, select, textarea, .button, .menu-toggle):is(:hover, :focus, :focus-visible, :focus-within, :active) {
  background: none;
  border-color: revert;
}

/* Links additionally take their colour back — `a:hover { color: … }` sits in
   almost every theme reset. Same (0,2,0), same tie-break. */
:is(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp
)
  :where(a):is(:hover, :focus, :focus-visible, :active) {
  color: inherit;
  text-decoration: none;
}

/* ── 3 · Inherited text properties from the page's <body> ──────────────────
 *
 * Every UI root of ours is a child of the page's <body>, so whatever the design
 * puts on body (letter-spacing, an uppercase transform, a light 300 weight,
 * centred text, a text-shadow) is inherited by the whole panel and toolbar. Our
 * components set font-size, line-height and colour explicitly but rely on
 * inheritance for these, so they are reset to their initial values on the
 * roots. Specificity (0,1,0) and this file is imported first, so any root
 * class of ours that sets one of them (the canvas bar's weight) still wins.
 */
:is(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp,
  .uichemy-composer-floating-panel,
  [id="uichemy-motion-timeline-root"]
) {
  letter-spacing: normal;
  word-spacing: normal;
  text-transform: none;
  text-indent: 0;
  text-align: start;
  text-shadow: none;
  font-style: normal;
  font-weight: 400;
  font-variant: normal;
  font-feature-settings: normal;
}

/* ── 4 · Styles a page FORCES on every element (`* { … !important }`) ──────
 *
 * No ordinary rule of ours can beat `* { font-family: X !important }` or
 * `* { transition: all .6s !important }`. The editor guard
 * (assets/js/uichemy-editor-guard.js) probes for them once the page has
 * loaded and only then sets these classes on <html>, so a normal page is never
 * touched. Fonts go back to each element's own family through `--uich-ff`, a
 * copy of every font-family the build writes next to it (postcss.config.js).
 * Transitions are switched off inside our UI: snappier than a 0.6s fade on
 * every hover, and the page's own elements keep theirs.
 */
html.uich-guard-ff :is(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp,
  .uichemy-composer-floating-panel,
  [id="uichemy-motion-timeline-root"]
),
html.uich-guard-ff :is(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp,
  .uichemy-composer-floating-panel,
  [id="uichemy-motion-timeline-root"]
) :where(*, *::before, *::after) {
  font-family: var(--uich-ff, "Zalando Sans", ui-sans-serif, system-ui, sans-serif) !important;
}
html.uich-guard-tr :is(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp,
  .uichemy-composer-floating-panel,
  [id="uichemy-motion-timeline-root"]
),
html.uich-guard-tr :is(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp,
  .uichemy-composer-floating-panel,
  [id="uichemy-motion-timeline-root"]
) :where(*, *::before, *::after) {
  transition: none !important;
}

/* ── 5 · Page-wide resets of bare elements ─────────────────────────────────
 *
 * Rules a page writes against EVERY element or every <div> with no class at
 * all: `* { scrollbar-width: none }`, `::-webkit-scrollbar { display: none }`.
 * They reached our scroll areas, so the panel had no scrollbar (I12). Each
 * rule below puts back the browser default, at a specificity just above a
 * bare-element rule (0,0,1 / 0,0,2) and below any class of ours (0,1,0), so a
 * scrollbar we hide on purpose (the scope lane, the tab strips) stays hidden.
 */
:where(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp,
  .uichemy-composer-floating-panel,
  [id="uichemy-motion-timeline-root"]
) :is(div, textarea, ul, ol, pre, nav, section, aside):not(svg):not(math) {
  scrollbar-width: auto;
}
:where(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp,
  .uichemy-composer-floating-panel,
  [id="uichemy-motion-timeline-root"]
) :is(div, textarea, ul, ol, pre, nav, section, aside):not(svg):not(math)::-webkit-scrollbar {
  display: block;
}

/* `* { user-select: none }` + `::selection { background: transparent }` (an
 * anti-copy reset): text could not be selected in our fields, and what was
 * selected did not show (I13). Fields only: labels and buttons stay as they
 * are. All type selectors, so this stays below any class of ours. */
:where(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp,
  .uichemy-composer-floating-panel,
  [id="uichemy-motion-timeline-root"]
) :is(input, textarea):not(svg) {
  -webkit-user-select: text;
  -moz-user-select: text;
       user-select: text;
}
:where(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp,
  .uichemy-composer-floating-panel,
  [id="uichemy-motion-timeline-root"]
) :is(div, span, p, a, button, label, li, pre, code, input, textarea):not(svg)::-moz-selection {
  background-color: Highlight;
  color: HighlightText;
}
:where(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp,
  .uichemy-composer-floating-panel,
  [id="uichemy-motion-timeline-root"]
) :is(div, span, p, a, button, label, li, pre, code, input, textarea):not(svg)::selection {
  background-color: Highlight;
  color: HighlightText;
}

/* `div { overflow: hidden }` clipped our menus, focus rings and anything
 * positioned outside its box (I14). A div of ours that needs a different
 * overflow says so with a class, which outranks this. */
:where(
  .uich-tw,
  .uich-composer-host,
  .uich-canvas-toolbar-host,
  .uich-portal-root,
  .uich-rp,
  .uichemy-composer-floating-panel,
  [id="uichemy-motion-timeline-root"]
) div:not(svg) {
  overflow: visible;
}

/*
 * 'Plus Jakarta Sans' and 'Roboto' are bundled locally and declared via
 * @font-face in assets/css/uichemy-composer-editor-panel.css, which is always
 * enqueued alongside this composer build in the editor. They are NOT imported
 * from Google Fonts here, so the plugin makes no external network request for
 * fonts. (Roboto is used only by the Elementor skin so the composer's type
 * matches the Elementor editor panel exactly.)
 */


.uich-composer-host[data-theme="light"] .code2-body,
body[data-theme="light"] .code2-body,
.panel[data-theme="light"] .code2-body,
.uich-composer-host[data-theme="light"] .chat2-main,
body[data-theme="light"] .chat2-main,
.panel[data-theme="light"] .chat2-main {
  background: var(--panel-bg-2);
}

/* Scoped light theme overrides for portaled elements.
   These popups portal to document.body, which carries data-uich-composer-theme
   (set by applyTheme) rather than data-theme, so match on both attributes. */
body[data-theme="light"] .suggest,
body[data-theme="light"] .cpicker,
body[data-uich-composer-theme="light"] .suggest,
body[data-uich-composer-theme="light"] .cpicker {
  --bg-canvas: #f4f4f6;
  --bg-canvas-ink: #15151a;
  --panel-bg: #ffffff;
  --panel-bg-2: #f7f7fa;
  --panel-bg-3: #eeeef3;
  --panel-bg-4: #e3e3eb;
  --panel-line: #e3e4ec;
  --panel-line-2: #cdcfd8;
  --text-hi: #0f0f15;
  --uich-text: #2a2b33;
  --text-mid: #6a6c76;
  --text-dim: #9a9ca6;
  --accent-2: hsl(var(--primary));
  --accent-bg: rgba(var(--accent-rgb), 0.10);
  --brand-green: #E3ED5D;
  --uich-danger: #d44a4a;
  --ok: #b3bf3e;
  --warn: #d49a3a;
  color-scheme: light;
}

/* Every builder, not only Gutenberg (Jay 2026-09-30: no "LINK"-style capitals
   anywhere; skins may differ only in colour). Covers the panel, the toolbar,
   layers, and everything portalled out of it (.uc-portal: menus, Globals, the
   sync / import dialogs). A preview that SHOWS a text-transform the user set
   (typography previews carry it inline) is left alone. */
:is(.uich-composer-host, .uich-portal-root, .uc-portal, #uichemy-composer-floating-panel) *:not([style*="text-transform"]):not(.color-hex-display):not([data-uc-caps]) {
  text-transform: none !important;
}
/* Hex codes are the one place caps genuinely help, they read as values, not
   prose, and mixed-case hex looks like a typo. Opt them back in — but ONLY for
   pure hex values (the .color-hex-display class, added in composer-color-picker
   only when the field holds a #hex). A global token reference like
   var(--cafe-espresso) must NOT be shouted — VAR(--CAFE-ESPRESSO) reads like a
   broken value, and CSS custom-property names are case-sensitive. */
/* Every skin: uppercase the hex value only (never var()/global names). */
.uich-composer-host .swatch-input input.color-hex-display {
  text-transform: uppercase;
}

/* (DS fields, `data-uc`, draw their frame with an inset shadow and have their
   own hover/disabled states, so they are skipped here.) */

/* Everything in the row keeps its natural width, without this, `nowrap` squashes
   the buttons instead of scrolling. The spacer is exempt: absorbing the leftover
   space is its whole job, and it must still collapse to 0 when the row fills. */

/* ── Front-end theme button-colour leak (the stray pink) ─────────────────────
   The live site's theme styles bare <button> :hover/:focus/:active backgrounds,
   and the composer runs with bare Tailwind preflight, so those colours leak onto
   plain composer buttons, the pink on the segmented tab controls. A plain reset
   lost the cascade to the theme (it out-orders/out-specifies ours), so pin it
   HARD with !important, scoped to `.section-tabs` where ONLY these seg tabs live
   (no shadcn buttons, so nothing intended is harmed). Inactive tabs stay
   transparent over the muted track; the active one keeps its white surface –
   its re-assert block is ordered AFTER so it wins the tie for `bg-background`
   buttons. Covers the HTML/CSS/JS/Globals code-scope row. */
.uich-composer-host .section-tabs button:hover,
.uich-composer-host .section-tabs button:focus,
.uich-composer-host .section-tabs button:active {
  background-color: transparent !important;
}
.uich-composer-host .section-tabs button[class*="bg-background"],
.uich-composer-host .section-tabs button[class*="bg-background"]:hover,
.uich-composer-host .section-tabs button[class*="bg-background"]:focus,
.uich-composer-host .section-tabs button[class*="bg-background"]:active {
  background-color: hsl(var(--background)) !important;
}

/* Layers toggle injected into WP's settings-sidebar header (Page/Block + ✕ row).
   The node sits outside the composer host. `margin-left:auto` pushes it to the
   right edge of the flex row so it hugs the close button (the injection code also
   zeroes the close button's own auto margin, so the two sit flush with just this
   4px gap between them). */
.uich-gb-header-slot {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  margin-left: 4px;
}

* {
  box-sizing: border-box;
}

/*
 * wp-admin forms.css neutraliser (Gutenberg editor).
 *
 * WordPress loads wp-admin/css/forms.css via load-styles.php in the block
 * editor. Its bare attribute selectors, `input[type=text], select, textarea`
 * (specificity 0,1,1), force a grey `border:1px solid #949494`,
 * `min-height:40px`, `padding:0 12px` and `border-radius:2px` onto the
 * composer's shadcn inputs. Two-part fix:
 *   1. tailwind.config `important:'.uich-tw'` raises every utility to 0,2,0 so
 *      the shadcn controls that DO carry their own frame (standalone <Input> /
 *      <Textarea> / <Select>, incl. per-instance h-7/px-2 overrides) win.
 *   2. This reset (specificity 0,1,2 via `body … :is()`) sits ABOVE wp-admin
 *      (0,1,1) but BELOW those utilities (0,2,0). It strips wp-admin's chrome
 *      from the wrapper-pattern inner inputs (which are meant to be unstyled –
 *      their frame lives on a parent .border-input wrapper) without touching
 *      controls that style themselves through utilities.
 * Scoped to `.uich-tw`, so nothing outside the composer surface is affected.
 */
body .uich-tw :is(input, select, textarea):not(:where([data-uc])) {
  min-height: 0;
  border-width: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  background-color: transparent;
}
/*
 * wp-admin's focus rule `input[type=text]:focus { border-color:#2271b1;
 * box-shadow:0 0 0 1px #2271b1; outline:… }` (specificity 0,2,1) even outranks
 * the important-scoped utilities (0,2,0), so a focused inner input shows a stray
 * blue WordPress ring. This override (0,2,2 via `body … :focus`) clears it so the
 * shadcn ring shows instead, for the wrapper-pattern inputs that comes from the
 * parent's `focus-within:ring-*`; the standalone <Input>'s own `focus-visible:
 * ring-*` (0,3,0) still outranks this and is left intact.
 */
body .uich-tw :is(input, select, textarea):not(:where([data-uc])):focus,
body .uich-tw :is(input, select, textarea):not(:where([data-uc])):focus-visible {
  outline: 2px solid transparent;
  outline-offset: -2px;
  box-shadow: none;
  border-color: transparent;
}

/*
 * The same wp-admin forms.css problem, for the UiChemy design-system fields.
 *
 * The two resets above now skip controls marked `data-uc` (the DS components in
 * components/ui), because stripping them is the opposite of what a DS field
 * wants. But a DS class is (0,1,0), and forms.css (0,1,1) — `input[type=text]
 * { border; padding: 0 8px; min-height: 30px; background: #fff }` and its
 * (0,2,1) blue focus ring — would then repaint them in the block editor.
 *
 * So the DS values are restated here at (0,2,2) and up, token for token from
 * design-system/components/Input/Input.module.css and Textarea.module.css,
 * including every size, icon and state variant. input.jsx stamps
 * `data-uc-size` / `data-uc-left` / `data-uc-right` so these rules can see the
 * variant. Keep the two in step if the DS Input changes. A Tailwind height
 * utility on an <Input> (0,2,0) loses to this; pass `inputSize` instead.
 */
body .uich-tw :is(input[data-uc='input'], textarea[data-uc='textarea']) {
  border: 0;
  background-color: var(--uc-surface-overlay);
  color: var(--uc-text-strong);
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-input);
}
body .uich-tw input[data-uc='input'] {
  min-height: 0;
  height: var(--uc-input-h, var(--uc-control-h-md));
  padding: 0 var(--uc-input-px, var(--uc-space-12));
  line-height: normal;
  border-radius: var(--uc-input-radius, var(--uc-radius-md));
}
body .uich-tw textarea[data-uc='textarea'] { border-radius: var(--uc-radius-md); }
/* Size and icon variants — Input.module.css .sm / .lg / .hasLeft / .hasRight. */
body .uich-tw input[data-uc='input'][data-uc-size='sm'] { height: var(--uc-control-h-sm); padding: 0 var(--uc-space-8); }
body .uich-tw input[data-uc='input'][data-uc-size='lg'] { height: var(--uc-control-h-lg); padding: 0 var(--uc-space-16); }
body .uich-tw input[data-uc='input'][data-uc-left] { padding-right: var(--uc-space-32); }
body .uich-tw input[data-uc='input'][data-uc-right] { padding-left: var(--uc-space-32); }
/* States, restated because this rule outranks the DS's own state classes. */
body .uich-tw :is(input[data-uc='input'], textarea[data-uc='textarea']):hover:not(:disabled):not(:focus) {
  box-shadow: inset 0 0 0 1px var(--uc-border-hover, var(--uc-text-subtle)), var(--uc-shadow-input);
}
body .uich-tw input[data-uc='input']:focus {
  border-color: transparent;
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-input);
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}
/* Textarea focus = the Input's offset brand ring (Textarea.module.css). */
body .uich-tw textarea[data-uc='textarea']:focus {
  border-color: transparent;
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-input);
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}
body .uich-tw :is(input[data-uc='input'], textarea[data-uc='textarea'])[aria-invalid='true'] {
  box-shadow: inset 0 0 0 1px var(--uc-danger), var(--uc-shadow-input);
}
body .uich-tw :is(input[data-uc='input'], textarea[data-uc='textarea'])[aria-invalid='true']:focus { outline-color: var(--uc-danger); }
body .uich-tw :is(input[data-uc='input'], textarea[data-uc='textarea']):disabled {
  color: var(--uc-text-subtle);
  background-color: var(--uc-surface-sunken);
  box-shadow: inset 0 0 0 1px var(--uc-border);
  cursor: not-allowed;
}

/* Standalone stage page ONLY, the dev harness that opens the panel on its own
   page (see the body[data-panel-only] block further down). Nothing the plugin
   ships sets that attribute, so none of this applies in a builder or on the
   front end.

   These were bare `html, body` rules until now, which meant the composer
   stylesheet repainted the HOST PAGE: on the front end `body` picked up the
   panel's canvas background and ink (a dark page under the dark theme) and,
   worse, `overflow: hidden`, which stops the page scrolling anywhere the
   front-end composer loads. The panel itself is position:fixed and needs none
   of it. */
body[data-panel-only] {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --uich-ff: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg-canvas);
  color: var(--bg-canvas-ink);
  -webkit-font-smoothing: antialiased;
  font-size: 13px;
  overflow: hidden;
}

/* ------- Stage shell so the panel sits in context ------- */
.stage {
  height: 100vh;
  display: grid;
  grid-template-rows: 44px 1fr auto;
  grid-template-columns: 240px 1fr;
  grid-template-areas:
    "topbar topbar"
    "sidebar canvas"
    "panel panel";
  background: var(--bg-canvas);
}

.topbar {
  grid-area: topbar;
  background: #0f1014;
  border-bottom: 1px solid #000;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  color: #6b6d77;
  font-size: 12px;
}

.topbar .logo {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(-135deg, #2a2c33, var(--panel-bg));
  display: grid;
  place-items: center;
  color: #4a4c55;
  font-weight: 700;
}

.topbar .crumb {
  color: #9a9ca6;
}

.topbar .crumb .sep {
  color: #3a3c45;
  margin: 0 8px;
}

.topbar-spacer {
  flex: 1;
}

.topbar .pill {
  border: 1px solid #2a2c33;
  border-radius: 999px;
  padding: 4px 10px;
  color: #8a8c95;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.topbar .pill.brand {
  border-color: rgba(var(--accent-rgb), 0.5);
  color: hsl(var(--primary));
  background: rgba(var(--accent-rgb), 0.08);
}

.sidebar {
  grid-area: sidebar;
  background: #fff;
  border-left: 1px solid #e5e6eb;
  padding: 14px 14px;
  font-size: 12px;
  color: #6a6c76;
}

.sidebar h4 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: #9a9ca6;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar .nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar .nav a {
  text-decoration: none;
  color: #3a3b44;
  padding: 6px 8px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.sidebar .nav a.active {
  background: #f0eefb;
  color: hsl(var(--primary));
}

.sidebar .nav .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #cdcfd6;
}

.sidebar .nav a.active .dot {
  background: hsl(var(--primary));
}

.canvas-wrap {
  grid-area: canvas;
  overflow: auto;
  padding: 28px 32px;
}

.doc {
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e5e6eb;
  border-radius: 10px;
  padding: 56px 64px;
  color: var(--panel-bg);
  min-height: 100%;
  box-shadow: 0 2px 24px rgba(20, 21, 26, 0.04);
}

.doc h1 {
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  font-weight: 700;
}

.doc h1 .sel {
  background: rgba(var(--accent-rgb), 0.14);
  outline: 1.5px solid var(--accent-2);
  border-radius: 2px;
  padding: 0 4px;
}

.doc p {
  color: #5b5d66;
  max-width: 60ch;
  line-height: 1.55;
  margin: 0 0 18px;
}

.doc .row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.doc .btn-p {
  background: var(--panel-bg);
  color: white;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
}

.doc .btn-s {
  background: white;
  color: var(--panel-bg);
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid #d9dade;
}

.doc .ph {
  margin-top: 32px;
  height: 220px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(-135deg, #f3f3f6 0 14px, #ececf1 14px 28px);
  display: grid;
  place-items: center;
  color: #9a9ca6;
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 12px;
}

/* ============================================================ */
/*                  THE COMPOSER PANEL ITSELF                   */
/* ============================================================ */
.panel {
  grid-area: panel;
  background: var(--panel-bg);
  color: var(--uich-text);
  color-scheme: inherit;
  height: 420px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--panel-line);
  position: relative;
  box-shadow: 0 -14px 44px rgba(var(--shadow-rgb), calc(0.30 * var(--shadow-a)));
}

.uich-composer-host[data-theme="light"] .panel,
.uich-composer-host[data-theme="light"] .panel {
  box-shadow: 0 -8px 28px rgba(15, 15, 21, 0.1);
}

.panel-resize {
  position: absolute;
  top: -3px;
  right: 0;
  left: 0;
  height: 6px;
  cursor: row-resize;
}

.panel-resize::after {
  content: '';
  position: absolute;
  right: 50%;
  top: 50%;
  transform: translate(50%, -50%);
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: var(--panel-line-2);
}

/* ---- tab bar ---- */
.panel-tabs {
  display: flex;
  align-items: stretch;
  background: linear-gradient(-180deg, var(--panel-bg-2), var(--panel-bg));
  border-bottom: 1px solid var(--panel-line);
  min-height: 48px;
  padding-left: 0;
}

/* Editor / Chat / Code tabs, a full-width row directly below the top
   Design/Developer switcher bar. Elementor-style: icon stacked above the label,
   small text, equal-width columns. The active indicator points down toward the
   content (default direction). */
.panel-brand {
  width: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--panel-line);
  color: hsl(var(--primary));
}

.panel-brand .mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(-135deg, hsl(var(--primary)), hsl(var(--primary)));
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 0 0 1px var(--min-line) inset, 0 4px 10px rgba(var(--accent-rgb), 0.35);
}

.tab-tools {
  flex-shrink: 0;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}

/* Collapse / close, separate group so dock layouts can position it apart
   from the tools. In the bottom dock it flows right after .tab-tools. */
.tab-winctl {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 4px;
}

.panel-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: none;
  border: 0;
  color: var(--text-mid);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.panel-icon-btn:hover {
  background: var(--panel-bg-3);
  color: var(--text-hi);
}

.panel-icon-btn.live {
  color: hsl(var(--primary));
}

/* ---- body layout: Layers (left) + Inspector (right) ---- */
.panel-body {
  flex: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 0;
  /* Prevent page scroll-hijack libraries from capturing wheel events
     anywhere inside the panel. */
  overscroll-behavior: contain;
}

.layers-col {
  border-left: 1px solid var(--panel-line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel-bg-2);
}

.layers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  gap: 8px;
}

.layers-head-left {
  display: inline-flex;
  align-items: center;
  gap: 4px; /* back arrow ↔ title in the History view */
  min-width: 0;
}

.layers-head h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-hi);
  line-height: 20px;
}

/* History tab body + rows. */
.layers-history-body { flex: 1; min-height: 0; overflow-y: auto; }
.layers-history-row {
  display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: right;
  padding: 7px 14px; border: 0; background: transparent; cursor: pointer; color: var(--text-hi);
}
.layers-history-row:hover { background: var(--surface-2, rgba(128,128,128,0.10)); }
.layers-history-row.is-current { background: var(--rp-press, rgba(236,8,104,0.16)); }
.layers-history-row .lh-dot {
  width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; margin-top: 5px;
  background: var(--text-lo, rgba(150,150,160,0.5));
}
.layers-history-row .lh-dot.is-current { background: var(--rp-text-strong, #EC0868); }
.layers-history-row .lh-body { flex: 1; min-width: 0; }
.layers-history-row .lh-label {
  display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.layers-history-row.is-current .lh-label { font-weight: 600; }
.layers-history-row .lh-meta { display: block; font-size: 11px; color: var(--text-lo, rgba(150,150,160,0.7)); }
/* Scope badge (element name / Page / Site) before the label. */
.layers-history-row .lh-scope {
  display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px;
  font-size: 10px; font-weight: 600; line-height: 15px; vertical-align: 1px;
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--rp-press, rgba(120,120,140,0.22)); color: var(--text-hi);
}
/* View-only rows: another element's history — can't restore until it's selected. */
.layers-history-row.is-viewonly { cursor: default; opacity: 0.72; }
.layers-history-row.is-viewonly:hover,
.layers-history-row.is-viewonly.is-current { background: transparent; }
.layers-history-row.is-viewonly.is-current .lh-label { font-weight: 400; }
.layers-history-row.is-viewonly .lh-scope { background: var(--rp-hover, rgba(120,120,140,0.14)); }

/* "Clear history" bar pinned under the rows. */
.layers-history-clearbar {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  margin-top: 4px; padding: 8px 14px 6px;
  border-top: 1px solid var(--rp-border-subtle, var(--border, rgba(128,128,140,0.18)));
}
.layers-history-clearbar .lh-clear-ask {
  flex: 1; min-width: 0; font-size: 12px; color: var(--text-lo, rgba(150,150,160,0.9));
}
.layers-search {
  /* Breathing room between the "Layers" head and the search field. */
  padding: 8px 14px 10px;
}

/* The search field is a DS Input (`data-uc`) now, which brings its own frame,
   focus ring and type, so the bare-input resets below skip it. The old
   `.layers-search .input` wrapper frame is gone from the markup. */
.layers-search input:not(:where([data-uc])),
.layers-search input:not(:where([data-uc])):focus,
.layers-search input:not(:where([data-uc])):focus-visible {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.layers-search input:not(:where([data-uc])) {
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
  background: none;
  border: none !important;
  color: var(--uich-text);
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 12px;
  width: 100%;
}

.layers-search input:not(:where([data-uc]))::-moz-placeholder {
  color: var(--text-dim);
}

.layers-search input:not(:where([data-uc]))::placeholder {
  color: var(--text-dim);
}

.layers-tree {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 14px 8px;
  /* Keep scroll contained so page-level smooth-scroll libraries (Lenis,
     GSAP ScrollSmoother) can’t hijack wheel events from the tree. */
  overscroll-behavior: contain;
}

.layer-row {
  display: flex;
  align-items: center;
  gap: 3px;
  height: var(--row-h);
  padding: 0 2px 0 4px;
  color: var(--uich-text);
  font-size: 12px;
  border-radius: 5px;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  position: relative;
}

.layer-row:hover {
  background: var(--panel-bg-3);
}

.layer-row.selected {
  background: var(--panel-bg-4);
  color: var(--text-hi);
  box-shadow: inset 0 0 0 1px var(--panel-line-2);
}

.layer-row.selected .ltag {
  color: var(--uich-text);
}

/* Hidden layer (HTML `hidden` attribute): dim the name + icon so the row still
   reads as "there but off". The eye toggle stays full-strength so it's easy to
   bring back. */
.layer-row.is-hidden .licon,
.layer-row.is-hidden .lname,
.layer-row.is-hidden .ltag { opacity: 0.45; }

/* Keyboard focus ring for the DS Tree (arrow-key navigation lands here). Kept
   distinct from the filled selection so you can see focus move independently. */
.layer-row:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px hsl(var(--ring));
}

/* Row action buttons (eye · ⋯): bare icons, no heavy hover/pressed chip — just a
   quiet brighten, Figma-style, so a dense row stays calm. Overrides the DS ghost
   IconButton fill (which read as a grey box in the row). */
.layer-row .layer-act,
.layer-row .layer-act:hover,
.layer-row .layer-act:focus-visible,
.layer-row .layer-act[aria-pressed="true"] {
  background: transparent !important;
  box-shadow: none !important;
}
.layer-row .layer-act { color: var(--text-lo); }
.layer-row .layer-act:hover,
.layer-row .layer-act:focus-visible { color: var(--text-hi); }

.layer-row .lcaret {
  width: 10px;
  height: 14px;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  opacity: .9;
  flex-shrink: 0;
}

.layer-row .lcaret.empty {
  display: none;
}

.layer-row .licon {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  color: var(--text-mid);
  flex-shrink: 0;
}

.layer-row .ltag {
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-mid);
  flex-shrink: 0;
  margin-left: 6px;
  line-height: 1.4;
  padding-bottom: 2px;
}

.layer-row .lname {
  color: var(--uich-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  line-height: 1.4;
  padding-bottom: 2px;
}

/* Dynamic-data markers on a layer row (data / loop / condition / form). Each is
   a small coloured dot; click removes that construct. Was previously unstyled
   (0×0, invisible), these rules make the indicator actually show. */
.layer-row .ldots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 6px;
  flex-shrink: 0;
}
.layer-row .ldot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  border-radius: 9999px;
  transition: background-color .12s;
}
.layer-row .ldot:hover {
  background: var(--rp-hover, var(--muted, rgba(127, 127, 127, .18)));
}
.layer-row .ldot-core {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
}

.layer-row.hidden .lname,
.layer-row.hidden .ltag {
  opacity: .45;
}

.layers-foot {
  padding: 8px 14px;
  border-top: 1px solid var(--panel-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 11px;
  flex-shrink: 0;
}

.layers-foot .btn {
  font-size: 11px;
}

/* "Used only" sits with the Outline button, not opposite the count — the
   footer is space-between, so a third child would otherwise be pushed into the
   middle and read as unrelated to either side. */
.layers-used-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  margin-left: 10px;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  white-space: nowrap;
  color: var(--text-dim);
  font-size: 11px;
}

.layers-used-toggle input {
  width: 13px;
  height: 13px;
  margin: 0;
  cursor: pointer;
  accent-color: currentColor;
}

.layers-used-toggle:hover { color: var(--text-hi, inherit); }

/* ---- Layers panel redesign (Jay 2026-09-29, from Mobbin: Webflow Navigator,
   Figma, Wix, Rive) — composer-layers.jsx.
   · name first (text / class / id), tag as a dim hint on the right
   · indent guides, the selected element's branch brighter
   · one clear selected fill, no inset ring
   · collapsed rows show how many children they hold
   · footer: two toggle chips instead of checkbox + ghost button */
/* Leaf rows keep the caret's slot (invisible) so every sibling's icon lines up
   — the old `display:none` + a guessed +10px pad missed the row gap by 4px. */
.layer-row .lcaret.empty {
  display: grid;
  visibility: hidden;
  /* a global `.empty { padding: 40px; margin: auto }` also matches this class */
  padding: 0;
  margin: 0;
}
.layer-row .lguide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--panel-line, rgba(128, 128, 128, 0.18));
  pointer-events: none;
}
.layer-row .lguide.is-active {
  background: var(--text-dim, rgba(160, 160, 160, 0.5));
}
.layer-row .lname.is-name {
  color: var(--text-hi, var(--uich-text));
}
/* A name the user gave the row reads as the strongest label it can have. */
.layer-row .lname.is-custom {
  color: var(--text-hi, var(--uich-text));
  font-weight: 500;
}
/* Rename in place: the field takes the label's slot, same height and size. */
.layer-row .lname-input {
  flex: 1;
  min-width: 0;
  height: 20px;
  margin: 0;
  padding: 0 4px;
  border: 1px solid var(--ring-color, hsl(var(--ring)));
  border-radius: 4px;
  background: var(--panel-bg, hsl(var(--background)));
  color: var(--text-hi, var(--uich-text));
  font: inherit;
  --uich-ff: inherit;
  outline: none;
}
.layer-row .lname.is-tag {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  --uich-ff: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-mid);
}
.layer-row .ltag {
  order: 2;
  margin: 0 6px 0 0;
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.8;
}
.layer-row.is-root .lname {
  font-weight: 500;
}
.layer-row .lcount {
  order: 3;
  flex: none;
  margin-right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--panel-bg-3, rgba(128, 128, 128, 0.14));
  color: var(--text-dim);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}
.layer-row .ldots { order: 4; }
.layer-row > [aria-label='Layer actions'] { order: 5; }
.layer-row:hover {
  background: color-mix(in srgb, var(--text-hi, #fff) 5%, transparent);
}
/* One clear fill (Wix/Figma): text colour at 11%, so it reads in both themes. */
.layer-row.selected,
.layer-row.selected:hover {
  box-shadow: none;
  background: color-mix(in srgb, var(--text-hi, #fff) 11%, transparent);
}
.layer-row.selected .lname { color: var(--text-hi); }
.layer-row.selected .ltag { color: var(--text-mid); }

.layers-foot-chips {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}
.layers-chip {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--uc-dur-fast, 120ms), color var(--uc-dur-fast, 120ms);
}
.layers-chip:hover { color: var(--text-hi); background: var(--panel-bg-3); }
.layers-chip[aria-pressed='true'] {
  background: var(--panel-bg-4, var(--panel-bg-3));
  color: var(--text-hi);
}
.layers-chip:focus-visible { outline: 1px solid var(--uc-ring, currentColor); }

/* ---- inspector ---- */
.inspector {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--panel-bg);
}

.inspector-head {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Carries the element's identity and actions: the tag selector, Attributes
     and Mark as. Three controls fit a 320px dock, but a long custom tag
     (`<blockquote>`) next to a Loop / Form badge can exceed it — wrap rather
     than let the row set a floor on the panel's width. */
  flex-wrap: wrap;
  row-gap: 6px;
  min-width: 0;
  padding: 7px 14px;
  border-bottom: 1px solid var(--panel-line);
}

/* Right dock: the Design/Developer tabs take row 1 on their own, and row 2
   carries the tag selector on the left with Mark as pushed to the right edge,
   so the two sit at opposite ends of the row instead of riding the tab row.
   Scoped with :has() to the dock that actually has tabs — in the bottom dock
   `modeSwitch` is null, there is no tab row, and the strip keeps its original
   single-line order (which is already tag-then-Mark-as in source order). */
.inspector-head__tabs {
  flex: 0 0 100%;
  min-width: 0;
}
.inspector-head:has(.inspector-head__tabs) .insp-head-tag {
  order: 1;
  margin-left: auto;
}
.inspector-head:has(.inspector-head__tabs) .insp-head-mark { order: 2; }

.inspector-head .target {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
}

.target .swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(-135deg, hsl(var(--primary)), hsl(var(--primary)));
  flex-shrink: 0;
}

.target .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-hi);
}

.target .tag {
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-mid);
  background: var(--panel-bg-2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--panel-line);
}

/* Tag modify, pencil button + inline input */
.tag-modify-dd {
  position: relative;
  flex-shrink: 0;
}

/* Breakpoint dropdown (single button + menu) */

.inspector-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ---- Section tab strip (Typography / Layout / Spacing / …) ---- */
.section-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px 0;
  /* FLAT panel colour, not `linear-gradient(180deg, --panel-bg-2, --panel-bg)`.
     The gradient was decorative — the hairline below is what separates this
     sticky strip from the rows scrolling under it (see the note on it). On dark
     it was invisible anyway, #202020 fading into #171717, but in light mode the
     two tokens are #F4F4F4 and #FFFFFF, so the strip rendered as a grey band
     sitting above a white panel: the Code tab's Standard · Page · Site · Globals
     row, and the inspector's section tabs, were the only grey things on the
     screen. Flat --panel-bg makes both read as part of the panel in either
     theme, and the hairline still does the separating. */
  background: var(--panel-bg);
  position: sticky;
  top: 0;
  z-index: 2;
  /* Hairline under the sticky strip so scrolled property rows meet a clean
     edge instead of appearing to slice against the tabs. The gradient above is
     already fully opaque (all --panel-bg tokens are solid), so this is the
     scroll-separation cue, matching .inspector-top. (audit J1) */
  border-bottom: 1px solid var(--panel-line);
}

/* Inspector section tabs: show every label by default (not just on hover),
   and wrap gracefully if the row is narrower than the tabs. */
.section-tabs.stabs-labeled {
  flex-wrap: wrap;
  row-gap: 6px;
}

/* ---- A section: vertical flow of rows + a separate add-prop card ---- */
.section {
  padding: 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prop-rows {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.prop-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  row-gap: 15px;
  -moz-column-gap: 14px;
       column-gap: 14px;
  align-items: start;
}

.prop-cell {
  min-width: 0;
  position: relative;
}

.section.is-locked,
.prop-cell.is-locked {
  cursor: not-allowed !important;
}

.section.is-locked>*,
.prop-cell.is-locked>* {
  pointer-events: none !important;
  opacity: 0.65;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.prop-cell:focus-within {
  z-index: 4;
}

.prop-cell .select,
.prop-cell .input,
.prop-cell .swatch-input,
.prop-cell .seg,
.prop-cell .combo {
  width: 100%;
}

/* Inside the inspector prop-cell column, let color-input fill the full
     column width (same as every other input). The 200px cap in
     .swatch-input.color-input applies elsewhere (gradient stop pickers etc.)
     and is left intact. */
.prop-cell .swatch-input.color-input {
  max-width: none;
}

/* ---- prop-cell: force all inputs to 30px height & 12px font ---- */

.prop-cell .seg button {
  height: 26px;
  font-size: 12px;
}

/* Subsection header, design-conscious rule line */
.subsec {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.subsec-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.subsec-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to left, var(--panel-line), transparent);
}

/* Animation section headings are centred between two rules, so a scope heading
   ("Whole section") reads as a divider across the panel rather than as a label
   sitting on top of the fields that follow it.

   The shared `.subsec-rule` gradient fades left-to-right, which is right for the
   rule AFTER the title. The one before it is mirrored, so both fade away from
   the title instead of one pointing into it. */
.subsec.uich-motion-subsec {
  justify-content: center;
  margin-top: 10px;
}

.uich-motion-subsec .subsec-rule:first-child {
  background: linear-gradient(to right, var(--panel-line), transparent);
}

/* A motion variable's `help` line. Sits under its control, always readable,
   because the one-liner explains what the value MEANS and a reader who has to
   discover it by hovering mostly never does. */
.uich-motion-help {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--text-dim);
}
.uich-motion-help.is-unused { color: var(--uc-warning-fg, #AA712B); overflow-wrap: anywhere; }

/* ---- Dynamic construct accordion (Loop / Form / …) ----
   Collapsible section pinned to the bottom of the inspector scroll flow,
   replacing the old dedicated construct tab. */
.construct-accordion {
  border-top: 1px solid var(--panel-line);
  background: var(--panel-bg-2);
}

.construct-accordion-head {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-hi);
  transition: background 0.2s ease;
}

.construct-accordion-head:hover {
  background: var(--panel-bg-3);
}

.construct-accordion-title {
  flex: 1 1 auto;
  text-align: right;
}

.construct-accordion-chevron {
  flex-shrink: 0;
  color: var(--text-dim);
  transition: transform 0.2s ease;
}

.construct-accordion.is-open .construct-accordion-chevron {
  transform: rotate(-180deg);
}

.construct-accordion-body {
  border-top: 1px solid var(--panel-line);
  padding-bottom: 8px;
}

/* ── Construct panels (Loop / Form / Condition / Data) ────────────────────────
   Redesigned inspector-style layout. Overrides the legacy 2-column grid and
   non-token chrome from assets/css/uich-dd.css; scoped under `.uich-tw` so the
   override always wins on specificity. One clean vertical rhythm, stacked
   full-width fields (no cramped side-by-side controls), grouped sections,
   comfortable checkbox rows, and token-driven colors that track light/dark. */
.uich-tw .uich-construct-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 16px 16px;
  font-family: inherit;
  --uich-ff: inherit;
}

/* Info bar showing the Twig this construct emits, a quiet, code-flavored strip
   rather than plain floating text. */
.uich-tw .uich-construct-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: hsl(var(--muted) / 0.4);
  border: 1px solid hsl(var(--border));
  font-size: 11.5px;
  color: hsl(var(--muted-foreground));
}

.uich-tw .uich-construct-head code {
  font-family: ui-monospace, Menlo, monospace;
  --uich-ff: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: hsl(var(--foreground));
}

/* Fields keep the shared `.field.pf` label-above-control chrome so labels and
   inputs sit on one clean axis. Two balanced columns in the wide bottom dock
   (matches the Inspector above it, uses the horizontal space); a single
   full-width column in the narrow right dock, where two columns would cram the
   controls and misalign the ragged select / entity-picker mix. */
.uich-tw .uich-construct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.uich-tw .panel.dock-right .uich-construct-grid {
  grid-template-columns: 1fr;
}

.uich-tw .uich-construct-grid .field.pf {
  margin: 0;
}

/* Label sits ABOVE its control on the stacked surfaces (bottom dock, Gutenberg
   inspector), so it keeps the 4px it used to carry as an inline style. The right
   dock lays the same field out as a centre-aligned label-left row and drops this
   again — see the construct-panel block at the end of composer-dock.css. */
.uich-tw .uich-construct-body .field.pf > .pf-label {
  padding: 0 0 4px;
}

/* Section dividers (Filtering / Published date / …), tie tightly to the fields
   that follow, with clear separation from the group above. */
.uich-tw .subsection.uich-construct-sub {
  margin: 2px 0 -2px;
}

/* Checkbox rows: comfortable >=32px targets, related options stacked tight. */
.uich-tw .uich-construct-checks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 !important;
}

.uich-tw .uich-construct-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  margin: 0 !important;
  padding: 3px 0;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.35;
  color: hsl(var(--foreground));
  cursor: pointer;
}



/* ── Loop query builder ──────────────────────────────────────────────────────
   Normal / Advanced tabs, the rule cards Advanced adds, and the raw query
   editor. Everything here is drawn from the same tokens as the rest of the
   panel — no second palette, no second control chrome. */

/* Why a tab is unavailable, or why the fields are frozen. */
.uich-tw .uich-loop-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: hsl(var(--muted) / 0.4);
  font-size: 11.5px;
  line-height: 1.5;
  color: hsl(var(--muted-foreground));
}
/* Its one action (the loop's leftover copies: Remove them). */
.uich-tw .uich-loop-note__action { margin-top: 6px; }

/* One-line note under a control. Deliberately rare — it is on the dozen or so
   options whose label cannot carry their meaning (a comma-separated list, an ID
   field, AND vs OR), not on every field, so the notes stay short enough to
   actually be read instead of becoming a second wall of text.

   It sits in the CONTROL's column, not the label's: in the right dock a field is
   a `96px | 1fr` grid and everything that is not `.pf-label` lands in column 2,
   so the note lines up under the thing it describes. */
.uich-tw .uich-field-desc {
  margin: 2px 0 0;
  font-size: 10.5px;
  line-height: 1.45;
  color: hsl(var(--muted-foreground));
}

/* The same note for a whole group, pulled up under its divider so it reads as
   part of the heading rather than as a floating first row. */
.uich-tw .uich-sec-desc {
  margin: -8px 0 0;
  font-size: 10.5px;
  line-height: 1.45;
  color: hsl(var(--muted-foreground));
}

/* One clause. A hairline card so a list of rules reads as a list of things
   rather than one long run of fields. */
.uich-tw .uich-rule {
  border: 1px solid hsl(var(--border) / 0.8);
  border-radius: 8px;
  padding: 10px;
  background: hsl(var(--muted) / 0.22);
}

.uich-tw .uich-rule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.uich-tw .uich-rule-n {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

/* Incomplete, not wrong: nothing has been written to the template yet. */
.uich-tw .uich-loop-rawbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: -4px;
}

.uich-tw .uich-loop-rawstate {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
}

/* Helper text: quiet notes, with inline code chips that match the code editor. */
.uich-tw .uich-dd-hint {
  margin: -4px 0 0 !important;
  font-size: 11px;
  line-height: 1.55;
  color: hsl(var(--muted-foreground));
}

.uich-tw .uich-dd-hint code {
  font-family: ui-monospace, Menlo, monospace;
  --uich-ff: ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: hsl(var(--muted) / 0.6);
  color: hsl(var(--foreground));
}

/* ── Construct panel: collapsible sub-sections + progressive disclosure ───────
   The Form panel groups its options into lightweight collapsible sections so it
   reads as a few named groups instead of one long scroll; optional and advanced
   fields live behind toggles/reveals. The `--sectioned` body drops the flat
   14px gap so each section owns its own spacing (divider + head/body padding). */
.uich-tw .uich-construct-body--sectioned {
  gap: 0;
}

.uich-tw .uich-construct-section-sum {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-weight: 400;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
}

.uich-tw .uich-construct-section-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 0 14px;
}

/* On/off switch rows. */
.uich-tw .uich-construct-switches {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.uich-tw .uich-construct-switchrow {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
}

.uich-tw .uich-construct-switchrow-label {
  flex: 1 1 auto;
  font-size: 12.5px;
  color: hsl(var(--foreground));
  cursor: pointer;
}

/* Fields revealed by a switch/choice sit in an indented, ruled group so the
   dependency on the control above is obvious. */
.uich-tw .uich-construct-nest {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 2px 0 6px;
  padding-right: 12px;
  border-right: 2px solid hsl(var(--border));
}

/* Header Remove action, demoted to a quiet icon; destructive only on hover. */
.uich-tw .uich-construct-head-sp {
  flex: 1 1 auto;
}

/* Security footnote. */
.uich-tw .uich-construct-foot {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 2px !important;
}

/* The note is one run of text with a <code> in it: as bare flex children the
   text, the code and the tail each became a column. */
.uich-tw .uich-construct-foot-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.uich-tw .uich-construct-foot svg {
  flex: 0 0 auto;
  margin-top: 2px;
}

/* ---- Element header refinements ---- */
.target .slot {
  margin-right: 4px;
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--panel-bg-2);
  border: 1px solid var(--panel-line);
  text-transform: lowercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.target {
  flex-wrap: nowrap;
  min-width: 0;
}

.target .tag,
.target>span {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Inspector top (element tag · classes · pseudo-state) ----
   Pinned to the top of the scrolling .inspector-body so the "what am I editing"
   context stays visible while the section list scrolls beneath it. Sticky needs
   an opaque background or scrolled content shows through. */
.inspector-top {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--panel-line);
  background: var(--panel-bg);
  flex-shrink: 0;
}

/* APPLIED CLASSES row, label · scrollable chips/add · scope hint */
.applied-compact {
  display: flex;
  /* Two lines: the scopes (tag · Local · classes) on one strip that never
     wraps, and the add field + pseudo-state below it. Splitting them is what
     frees the strip to use the panel's full width. */
  flex-direction: column;
  align-items: stretch;
  /* Never let this row set the panel's width — it's the widest thing in the
     inspector and the panel's host may size itself to its content. */
  min-width: 0;
  padding: 8px 14px;
  /* now also carries the pseudo-state dropdown on its right, so it's the whole
     scope/state header row — close it with a solid hairline. [ui-ux] */
  border-bottom: 1px solid var(--panel-line);
  position: relative;
}

/* ── Line 1 · the scope strip ────────────────────────────────────────────
   Holds the tag selector, `Local` and every applied class on exactly ONE
   line. Wrapping was rejected because the row's height then changes as you
   move between elements; clipping was rejected because a chip cut mid-word
   reads as a rendering bug. Instead JS folds whatever doesn't fit into the
   `.scope-more` counter, which unlocks horizontal scrolling when clicked. */
.scope-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.scope-lane {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  /* Folded chips are positioned out of flow against this box. */
  position: relative;
  /* The chips must never be able to widen the panel. Without this, a host
     that sizes the panel to its content (Gutenberg's sidebar does) grows to
     fit the whole strip, which changes the width we measure against, which
     changes what we fold — a loop that reads on screen as a flicker. */
  contain: inline-size;
  /* Vertical room for the selected chip's ring, handed straight back to the
     row so the strip's height is unchanged. */
  padding-block: 3px;
  margin-block: -3px;
  padding-inline: 2px;
}

/* `Local` and the first scope chip are never folded away, so on a very narrow
   panel they have to be able to give ground. Only these two may shrink — the
   label inside already truncates — while every chip after them keeps its full
   width and folds into the counter instead. Once the strip is expanded it
   scrolls, so nothing needs to shrink there. */
.scope-lane:not(.is-open) > :nth-child(-n+2) {
  min-width: 0;
  flex-shrink: 1;
}

.scope-lane.is-open {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}
.scope-lane.is-open > * {
  scroll-snap-align: start;
}
/* No visible bar — it read as a stray underline beneath the chips. */
.scope-lane::-webkit-scrollbar {
  display: none;
}

/* An edge fades only while there really is more content past it, so a
   half-visible chip reads as "keep scrolling" instead of as damage. */
.scope-lane.can-r {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
}
.scope-lane.can-l {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 100%);
}
.scope-lane.can-l.can-r {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

/* One control, two jobs: "+3" while folded, a back-chevron once expanded. */
.scope-more {
  flex: none;
  height: 24px;
  min-width: 28px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--panel-line);
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  --uich-ff: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
}
.scope-more:hover {
  color: var(--text-hi);
  border-color: hsl(var(--foreground) / 0.32);
}
.scope-more[aria-expanded="true"] {
  border-style: solid;
}
/* The scope currently being edited is one of the folded chips — carry the
   selected chip's ring so the row never looks like it's editing nothing. */
.scope-more[data-holds-active="true"] {
  border-style: solid;
  border-color: transparent;
  box-shadow: 0 0 0 1px hsl(var(--ring));
  color: var(--text-hi);
}

/* Away from the base breakpoint the Local chip carries "→ class": an inline
   `style` has no @media, so a value typed there is moved onto a per-element
   class. Saying so on the chip is what stops the edit reading as a failure. */
.scope-chip-note {
  margin-right: 2px;
  font-size: 9px;
  line-height: 1;
  letter-spacing: .01em;
  opacity: .62;
  white-space: nowrap;
}

/* ── Line 2 · add a class, and the pseudo-state ──────────────────────── */
.scope-line-2 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--panel-line);
}

/* TEXT toggle pill at the end of applied row */
.text-toggle {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  cursor: pointer;
  background: var(--panel-bg-2);
  border: 1px solid var(--panel-line);
  border-radius: 5px;
  color: var(--text-mid);
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 11.5px;
  font-weight: 500;
  height: 24px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  line-height: 1;
}

.text-toggle:hover {
  color: var(--text-hi);
  background: var(--panel-bg-3);
  border-color: var(--panel-line-2);
}

.text-toggle.on {
  color: var(--text-hi);
  background: var(--panel-bg-3);
  border-color: var(--panel-line-2);
}

.dot-cls {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.dot-cls.typo {
  background: hsl(var(--status-loop));
  box-shadow: 0 0 0 2px hsl(var(--status-loop) / 0.2);
}

.dot-cls.atomic {
  background: hsl(var(--status-data));
  box-shadow: 0 0 0 2px hsl(var(--status-data) / 0.2);
}

.dot-cls.global {
  background: var(--rp-text-strong, rgba(124, 58, 237, 0.95));
  box-shadow: 0 0 0 2px var(--rp-press, rgba(124, 58, 237, 0.2));
}

/* ── Global marker (icon, optionally with a text label) ─────────────────
     Subdued look, the marker should hint, not shout. Color tints are
     applied at low alpha; the icon stays uppercase-quiet against the
     surrounding panel chrome. */
.uich-global-marker {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 1;
  gap: 4px;
}

/* Icon color stays uniform across v3 / v4, uses --text-dim so it blends
     into surrounding panel chrome and reads as a hint, not a callout. The
     pill background still carries a subtle version tint (see .has-label
     rules below) for at-a-glance v3 vs v4 distinction. */
.uich-global-marker-icon {
  display: inline-flex;
  align-items: center;
  color: var(--text-dim);
  opacity: 1;
}

/* Labeled marker, used in Applied Class chips. Just icon + uppercase
     mini-label, no chip background or border. */
.uich-global-marker.has-label {
  padding: 0 2px 0 0;
  background: transparent;
  border: 0;
}

.uich-global-marker-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  --uich-ff: 'Plus Jakarta Sans', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1;
  white-space: nowrap;
}

/* Suggest dropdown anchored to the inline add-class input */
.suggest {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 260px;
  white-space: nowrap;
  background: var(--panel-bg-3);
  border: 1px solid var(--panel-line-2);
  border-radius: 6px;
  padding: 4px;
  z-index: 10;
  box-shadow: var(--rp-shadow-4, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1));
}

/* TEXT row, label inline with textarea, vertically centered */
.text-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 14px;
}

/* Header line: TEXT label left, dynamic-value icon pushed to the right edge,
   both aligned on the same baseline above the full-width textarea. */
.text-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ── TEXT field: the dynamic trigger lives INSIDE the textarea ─────────────── */
/* The icon used to sit on a header line above the field, beside a "Text" label.
   Both are gone: the label restated the section it sat in (Content, one field,
   placeholder "Inner content of this element…"), and an action floating above a
   field reads as belonging to the section rather than to the input. It is now
   pinned to the textarea's own bottom-right corner.

   Three consequences handled here:
     · the corner is reserved with padding-RIGHT, not padding-bottom. Bottom
       padding in a textarea is trailing space after the last line, so it only
       holds the corner clear while the value is short — the moment the value
       scrolls, lines pass straight under the button. A right gutter takes the
       button's column out of the text measure entirely, at every scroll
       position;
     · the scrollbar shares that gutter, so it is thinned to 3px here (the width
       the panel's own menus already use) rather than sitting 8px wide under the
       icon;
     · `resize-y` is dropped in the JSX, because the native resize grip occupies
       exactly this corner — two controls stacked in the same 16px. The field
       keeps its min-h 60 / max-h 140 range and scrolls beyond that. */
.text-row-area {
  position: relative;
  display: flex;
  width: 100%;
}

/* `.uich-tw` prefix required, not decoration: the textarea carries Tailwind's
   `px-2.5`, emitted as `.uich-tw .px-2\.5` (0,2,0), which outranks a bare
   `.text-row-area > textarea` (0,1,1) — one class plus an element loses to two
   classes. The unprefixed copy covers any host that isn't inside .uich-tw. */
.text-row-area > textarea,
.uich-tw .text-row-area > textarea {
  padding-left: 34px;
}

/* No `scrollbar-width: thin` here. Chrome now implements the standard property
   and, once it is set, ignores the ::-webkit-scrollbar pseudo-elements — and
   `thin` resolves to ~11px, wider than the 3px this panel uses everywhere else.
   The webkit rules alone give the 3px bar (same approach as the menu scrollbars
   further down this file); Firefox keeps its default, which is already narrow. */
.text-row-area > textarea::-webkit-scrollbar {
  width: 3px;
}

.text-row-area > textarea::-webkit-scrollbar-thumb {
  background: var(--rp-border, rgba(128, 128, 128, 0.45));
  border-radius: 3px;
}

.text-row-area > textarea::-webkit-scrollbar-track {
  background: transparent;
}

.text-row-area-dyn {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: inline-flex;
  /* The span is only as large as the button, so the textarea keeps every click
     that isn't on the icon itself. */
  z-index: 1;
}

.text-row-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
  width: 38px;
}

.text-row-input {
  flex: 1;
  font-family: 'Plus Jakarta Sans', sans-serif;
  --uich-ff: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  line-height: 1.45;
  min-height: 50px;
  max-height: 90px;
  padding: 6px 10px;
  resize: vertical;
}

/* ---- Cascade: applied vs scope-own ---- */
.prop-applied-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
}

/* NOTE: the `.uich-tw` prefix is load-bearing, not cosmetic. The dot is a
   <button>, and Tailwind's preflight resets `.uich-tw button { background:
   transparent }`, specificity (0,1,1), which BEATS a bare `.prop-applied-dot`
   (0,1,0). The bare rule below only won on `:hover` ((0,2,0) > (0,1,1)), so the
   dot was transparent by default and only appeared once you hovered. Prefixing
   with `.uich-tw` lifts the base rule to (0,2,0) so the accent fill wins at rest
   too, and the dot is visible without hovering. */
.uich-tw .prop-applied-dot {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  padding: 0;
  margin: 0 2px;
  border: 0;
  border-radius: 50%;
  /* Accent + full opacity so an inherited/applied property is flagged at a
     glance, always visible (no hover needed); hovering the dot then reveals
     the source in a tooltip. */
  background: var(--accent-2);
  opacity: 1;
  cursor: pointer;
  vertical-align: middle;
  transition: opacity .12s, background .12s;
}

.uich-tw .prop-applied-dot:hover {
  opacity: 1;
  background: var(--accent-2);
}

.prop-applied-tip-global {
  flex-shrink: 0;
}

.prop-global-color-wrap {
  position: relative;
  /* anchor for the absolutely-positioned tip */
  display: inline-flex;
  align-items: center;
  margin-right: 2px;
}

.prop-global-color-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
  transition: transform 120ms ease;
  flex-shrink: 0;
}

.prop-global-color-dot:hover,
.prop-global-color-dot:focus-visible {
  transform: scale(1.25);
  outline: none;
}

/* Pure-CSS hover tooltip, no JS state, no portal. Stays a sibling of
     the dot inside .prop-global-color-wrap so :hover toggles its
     visibility deterministically. */
.prop-input-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.prop-scope-own {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--text-dim);
  opacity: 0.75;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field.inherited .inh {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: hsl(var(--primary));
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
}

.inherited-input input,
.panel .inherited-input.input,
.panel .inherited-input.select,
.uich-composer-host .inherited-input.input,
.uich-composer-host .inherited-input.select {
  font-style: italic;
  color: var(--text-mid);
}

/* Align's inherited option (composer-inspector-align.jsx): the value that
   renders with nothing set here, marked as the canvas toolbar marks it —
   strong ink and a hairline ring, no fill, quieter than the sliding chip. */
[role="tab"].uc-seg-inherited:not([data-state="active"]) {
  color: var(--uc-text-strong);
  box-shadow: inset 0 0 0 1px var(--uc-border-strong);
}

.inherited-input input::-moz-placeholder {
  color: var(--text-dim);
  font-style: italic;
  opacity: 0.85;
}

.inherited-input input::placeholder,
.select.inherited-input option[value=""] {
  color: var(--text-dim);
  font-style: italic;
  opacity: 0.85;
}

/* ====================  GLOBAL TOKENS  ==================== */

/* ===== Form inputs, base styles ===== */
.panel .input,
.panel .select,
.panel .textarea,
.uich-composer-host .input,
.uich-composer-host .select,
.uich-composer-host .textarea,
.input,
.select,
.textarea {
  background-color: var(--panel-bg-2);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  color: var(--uich-text);
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 12px;
  height: var(--input-h);
  padding: 0 9px;
  outline: none;
  width: 100%;
  transition: border-color .12s, background-color .12s, color .12s;
}

.panel .input:hover,
.panel .select:hover,
.uich-composer-host .input:hover,
.uich-composer-host .select:hover,
.input:hover,
.select:hover {
  border-color: var(--panel-line-2);
}

.panel .input:focus,
.panel .select:focus,
.panel .textarea:focus,
.uich-composer-host .input:focus,
.uich-composer-host .select:focus,
.uich-composer-host .textarea:focus,
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--panel-line-2);
  background-color: var(--panel-bg-3);
  color: var(--text-hi);
}

.panel .input::-moz-placeholder, .panel .textarea::-moz-placeholder, .uich-composer-host .input::-moz-placeholder, .uich-composer-host .textarea::-moz-placeholder, .input::-moz-placeholder, .textarea::-moz-placeholder {
  color: var(--text-dim);
  opacity: 1;
}

.panel .input::placeholder,
.panel .textarea::placeholder,
.uich-composer-host .input::placeholder,
.uich-composer-host .textarea::placeholder,
.input::placeholder,
.textarea::placeholder {
  color: var(--text-dim);
  opacity: 1;
}

.panel .input.mono,
.uich-composer-host .input.mono,
.input.mono {
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 11.5px;
}

/* ---- Opacity step-button input ---- */

.panel .select,
.uich-composer-host .select,
.select {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  background-color: var(--panel-bg-2);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%2710%27 viewBox=%270 0 10 10%27><path fill=%27%239a9ca6%27 d=%27M5 7L1 3h8z%27/></svg>");
  background-repeat: no-repeat;
  background-position: left 9px center;
  padding-left: 26px;
  cursor: pointer;
}

.uich-composer-host[data-theme="light"] .panel .select,
.uich-composer-host[data-theme="light"] .uich-composer-host .select,
.uich-composer-host[data-theme="light"] .select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%2710%27 viewBox=%270 0 10 10%27><path fill=%27%236a6c76%27 d=%27M5 7L1 3h8z%27/></svg>");
}

/* Native form controls (select/input/textarea) need an explicit
     color-scheme in light mode. Without this, Chromium can keep painting
     the <select> control with its dark UA chrome even though the CSS
     background-color resolves to the light variable, the visible result
     is a stubbornly dark select sitting in an otherwise-light panel. */
.uich-composer-host[data-theme="light"] .panel .select,
.uich-composer-host[data-theme="light"] .panel .input,
.uich-composer-host[data-theme="light"] .panel .textarea,
.uich-composer-host[data-theme="light"] .uich-composer-host .select,
.uich-composer-host[data-theme="light"] .uich-composer-host .input,
.uich-composer-host[data-theme="light"] .uich-composer-host .textarea,
.uich-composer-host[data-theme="light"] .select,
.uich-composer-host[data-theme="light"] .input,
.uich-composer-host[data-theme="light"] .textarea {
  color-scheme: light;
  background-color: var(--panel-bg-2);
}

.uich-composer-host .select,
.uich-composer-host .input,
.uich-composer-host .textarea {
  color-scheme: dark;
}

.uich-composer-host[data-theme="light"] .panel .inherited-input.select,
.uich-composer-host[data-theme="light"] .panel .inherited-input.input,
.uich-composer-host[data-theme="light"] .inherited-input.select,
.uich-composer-host[data-theme="light"] .inherited-input.input,
.uich-composer-host[data-theme="light"] .panel .inherited-input.select,
.uich-composer-host[data-theme="light"] .panel .inherited-input.input,
.uich-composer-host[data-theme="light"] .uich-composer-host .inherited-input.select,
.uich-composer-host[data-theme="light"] .uich-composer-host .inherited-input.input {
  color-scheme: light;
  background-color: var(--panel-bg-2);
}

/* Override an outer plugin rule (`.uichemy-composer-floating-panel select`)
     that forces a hardcoded dark background / border on every <select>
     with !important. Re-assert the theme variables at equal weight so
     our selects track Light/Dark mode instead of being pinned dark. */
.prop-input-stack select.select,
.uich-composer-host .prop-input-stack select.select,
#uichemy-composer-floating-panel .prop-input-stack select.select {
  background-color: var(--panel-bg-2) !important;
  border: 1px solid var(--panel-line) !important;
  color: var(--uich-text) !important;
}

/* Override outer plugin rules (`.smart-html-floating-panel textarea`)
     that force a hardcoded dark background / border on every <textarea>
     with !important. Re-assert the theme variables so our textareas
     track Light/Dark mode instead of being pinned dark. */
.uich-composer-host .textarea,
.uich-composer-host textarea:not([data-uc]),
#smart-html-floating-panel .uich-composer-host .textarea,
#smart-html-floating-panel .uich-composer-host textarea:not([data-uc]),
#uichemy-composer-floating-panel .uich-composer-host .textarea,
#uichemy-composer-floating-panel .uich-composer-host textarea:not([data-uc]) {
  background-color: var(--panel-bg-2) !important;
  border: 1px solid var(--panel-line) !important;
  color: var(--uich-text) !important;
  color-scheme: inherit !important;
}

/* (Placeholder and disabled fill skip DS Textareas, `data-uc`, like the rule
   above: the DS draws its own.) */
.uich-composer-host .textarea::-moz-placeholder, .uich-composer-host textarea:not(:where([data-uc]))::-moz-placeholder {
  color: var(--text-dim) !important;
}
.uich-composer-host .textarea::placeholder,
.uich-composer-host textarea:not(:where([data-uc]))::placeholder {
  color: var(--text-dim) !important;
}

.uich-composer-host textarea:not(:where([data-uc])):disabled,
.uich-composer-host .textarea:disabled {
  background-color: var(--panel-bg) !important;
}

.panel .select option,
.uich-composer-host .select option,
.select option {
  background-color: var(--panel-bg);
  color: var(--uich-text);
}

/* Prevent WebKit autofill from forcing light-yellow / wrong contrast */
.panel .input:-webkit-autofill,
.panel .select:-webkit-autofill,
.panel .textarea:-webkit-autofill,
.panel .swatch-input input:-webkit-autofill,
.uich-composer-host .input:-webkit-autofill,
.uich-composer-host .select:-webkit-autofill,
.uich-composer-host .textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--uich-text) !important;
  caret-color: var(--uich-text);
  -webkit-transition: background-color 99999s ease-out;
  transition: background-color 99999s ease-out;
  box-shadow: 0 0 0 1000px var(--panel-bg-2) inset !important;
}

.panel .input:-webkit-autofill:focus,
.panel .select:-webkit-autofill:focus,
.uich-composer-host .input:-webkit-autofill:focus,
.uich-composer-host .select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-hi) !important;
  box-shadow: 0 0 0 1000px var(--panel-bg-3) inset !important;
}

.textarea {
  height: auto;
  padding: 8px 10px;
  line-height: 1.45;
  resize: vertical;
}

.input-group {
  display: flex;
  align-items: stretch;
  background: var(--panel-bg-2);
  border: 1px solid var(--panel-line);
  border-radius: 5px;
  height: var(--input-h);
  overflow: hidden;
  transition: border-color .12s;
}

.input-group:hover {
  border-color: var(--panel-line-2);
}

.input-group:focus-within {
  border-color: var(--panel-line-2);
  background: var(--panel-bg-3);
}

.input-group .ico {
  width: 26px;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  border-left: 1px solid var(--panel-line);
  background: var(--panel-bg);
}

.input-group input {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  color: var(--uich-text);
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 12px;
  padding: 0 9px;
  min-width: 0;
}

.input-group input::-moz-placeholder {
  color: var(--text-dim);
}

.input-group input::placeholder {
  color: var(--text-dim);
}

.input-group .suffix {
  padding: 0 8px;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  border-right: 1px solid var(--panel-line);
  background: var(--panel-bg);
}

/* Colour field = ONE field with a small rounded swatch chip inside it (Jay
   2026-09-30: every colour field looks like the right panel's). This used to be
   a 30px full-height swatch fused to the field with a divider; the chip style
   lived only in `#uichemy-composer-floating-panel .panel.dock-right` rules
   (composer-dock.css), so the Globals manager, the motion dock and any panel
   outside that wrapper still drew the old one. It is the base style now. */
.swatch-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 5px 0 8px;
  background: var(--panel-bg-2);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  height: var(--input-h);
  overflow: hidden;
  transition: border-color .12s;
}

/* ColorInput specifically, cap at 200px so it doesn't span the whole
     inspector cell. The plain .swatch-input (used elsewhere, e.g. gradient
     stop pickers) keeps its previous fluid width. */
.swatch-input.color-input {
  max-width: 200px;
  width: 100%;
}

/* Globals / Theme Sync manager, breathing room between the swatch and its hex.
   In that table the colour box sits almost flush against the hex code; the 9px
   the field carries by default reads as cramped at this size. A wider left pad
   sets the code clear of the box. Scoped to the variables table (.var-value-cell
   wraps each value editor), so the inspector's own colour fields keep their
   tighter spacing. */
.var-value-cell .swatch-input input {
  padding-right: 0; /* the chip's gap already clears the hex */
}

/* ── Globals manager: Webflow-style borderless variable list ────────────────
   Replaces the old boxed <table>. The `g-var-*` class names appear only inside
   the Globals dialog, so these rules are effectively scoped to it; the --uc-*
   tokens resolve against the dialog's dark surface. Three columns
   (name · value · actions); the actions column is reserved so revealing it on
   hover never shifts the row. */
.g-var-head,
.g-var-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 52px;
  align-items: center;
  gap: 8px;
}
.g-var-head {
  padding: 4px 8px 6px;
  font-size: var(--uc-text-2xs, 10px);
  font-weight: var(--uc-weight-medium, 500);
  letter-spacing: var(--uc-tracking-wide, 0.02em);
  text-transform: uppercase;
  color: var(--uc-text-muted);
}
.g-var-row {
  padding: 2px 8px;
  border-radius: var(--uc-radius-md, 8px);
}
.g-var-row + .g-var-row { position: relative; }
/* Hairline between rows, inset to the text — not a box around each. */
.g-var-row + .g-var-row::before {
  content: "";
  position: absolute;
  right: 8px; left: 8px; top: -1px;
  height: 1px;
  background: var(--uc-border-subtle);
}
.g-var-row:hover {
  background: var(--uc-surface-control);
}
.g-var-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.g-var-glyph { color: var(--uc-text-subtle); flex: 0 0 auto; }

/* Inline-edit: name and value fields are borderless at rest, and only show a
   field on row hover or while focused. The `.uich-tw` prefix is needed to beat
   the DS Input's own resting rule (`body .uich-tw input[data-uc='input']`). */
.uich-tw .g-var-row .g-var-name input[data-uc='input'],
.uich-tw .g-var-row .var-value-cell input[data-uc='input'],
.uich-tw .g-var-row .var-value-cell .swatch-input {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}
.uich-tw .g-var-row:hover .g-var-name input[data-uc='input'],
.uich-tw .g-var-row:hover .var-value-cell input[data-uc='input'],
.uich-tw .g-var-row:hover .var-value-cell .swatch-input,
.uich-tw .g-var-name input[data-uc='input']:focus,
.uich-tw .g-var-row .var-value-cell input[data-uc='input']:focus,
.uich-tw .g-var-row .var-value-cell .swatch-input:focus-within {
  background: var(--uc-surface-control);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
}

/* Actions reserved in their column, revealed on hover / keyboard focus. */
.g-var-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--uc-dur-fast, 120ms) var(--uc-ease-standard, ease);
}
.g-var-row:hover .g-var-actions,
.g-var-row:focus-within .g-var-actions {
  opacity: 1;
}

/* Ghost add-row: quiet affordance, not a filled button. */
.g-var-add {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  margin-top: 2px;
  border: 0;
  border-radius: var(--uc-radius-md, 8px);
  background: transparent;
  color: var(--uc-text-muted);
  font: inherit;
  --uich-ff: inherit;
  font-size: var(--uc-text-xs, 12px);
  cursor: pointer;
  text-align: right;
}
.g-var-add:hover {
  background: var(--uc-surface-control);
  color: var(--uc-text-strong);
}

.swatch-input:hover {
  border-color: var(--panel-line-2);
}

.swatch-input:focus-within {
  border-color: var(--panel-line-2);
  /* No background swap on focus: it switched to the darker panel-bg-3, which
     read as an ugly dark box appearing when the field became active (Jay). The
     field keeps its resting fill; the border/ring is the focus cue. */
}

.swatch-input.is-global-linked {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.06);
}

.swatch-input.is-global-linked:focus-within {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.1);
}

.swatch-input .sw,
.swatch-input .swatch-trigger {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  padding: 0;
  cursor: pointer;
  /* tighter checker so transparency still reads at 18px */
  background:
    linear-gradient(-45deg, var(--panel-bg-4) 25%, transparent 25%, transparent 75%, var(--panel-bg-4) 75%) 0 0 / 6px 6px,
    linear-gradient(-45deg, var(--panel-bg-4) 25%, transparent 25%, transparent 75%, var(--panel-bg-4) 75%) 3px 3px / 6px 6px,
    var(--panel-bg-3);
}

.swatch-input .sw::before,
.swatch-input .swatch-trigger::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: var(--c, transparent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.swatch-input > input { padding-right: 0; }

.swatch-input.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.swatch-input .swatch-trigger:disabled {
  cursor: not-allowed;
}

/* ---- Floating color picker panel ---- */
.cpicker {
  width: 240px;
  padding: 10px;
  border-radius: 8px;
  background: var(--panel-bg-3);
  border: 1px solid var(--panel-line-2);
  box-shadow: var(--rp-shadow-4, 0 8px 28px rgba(0, 0, 0, 0.32));
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
}

/* Simple picker, the surrounding shadcn Popover supplies the surface
   (bg-popover, border, shadow), so the picker body itself is chromeless:
   full width, no card background/border/shadow, just the surface + fields. */
.cpicker.cpicker-simple {
  width: 100%;
  padding: 0;
  gap: 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  pointer-events: auto;
}

.cpicker.cpicker-compact {
  padding-top: 6px;
}

.cpicker.cpicker-simple.cpicker-compact {
  padding-top: 0;
}

/* New Style */

.cpicker-sv-wrap {
  position: relative;
  width: 100%;
}

/* ── react-colorful overrides ─────────────────────────────────────────
     The library ships with sensible defaults but a fixed 200×200 footprint
     and chunky sliders. We override the geometry so the picker fills the
     panel width and matches the composer's pill-slider visual language. */
.cpicker-sv-wrap .react-colorful {
  width: 100%;
  height: auto;
  gap: 10px;
  display: flex;
  flex-direction: column;
}

.cpicker-sv-wrap .react-colorful__saturation {
  border-radius: 8px;
  height: 152px;
  /* react-colorful ships a `border-bottom: 12px solid #000` on the
       saturation panel by default (it visually separates the SV plane
       from the hue lane below). We don't want that strip, kill it
       explicitly so all four corners look the same. */
  border: 0;
  box-shadow: inset 0 0 0 1px var(--panel-line);
}

.cpicker.cpicker-compact .react-colorful__saturation {
  height: 88px;
}

.cpicker-sv-wrap .react-colorful__hue,
.cpicker-sv-wrap .react-colorful__alpha {
  height: 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

/* The checkered backdrop on the alpha lane uses our panel palette so
     the underlay reads consistently with the rest of the picker. */
.cpicker-sv-wrap .react-colorful__alpha {
  background:
    linear-gradient(-45deg, var(--panel-bg-4) 25%, transparent 25%, transparent 75%, var(--panel-bg-4) 75%) 0 0 / 8px 8px,
    linear-gradient(-45deg, var(--panel-bg-4) 25%, transparent 25%, transparent 75%, var(--panel-bg-4) 75%) 4px 4px / 8px 8px,
    var(--panel-bg-2);
}

.cpicker-sv-wrap .react-colorful__last-control {
  border-radius: 999px;
}

/* All three pointers (SV plane, hue, alpha) share one ring-thumb look. */
.cpicker-sv-wrap .react-colorful__pointer {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.cpicker-sv-wrap .react-colorful__pointer-fill {
  box-shadow: none;
}

/* Light theme, soften the pointer's outer ring so it reads on light bg. */
.uich-composer-host[data-theme="light"] .cpicker-sv-wrap .react-colorful__pointer,
.uich-composer-host[data-theme="light"] .cpicker-sv-wrap .react-colorful__pointer {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.uich-composer-host[data-theme="light"] .cpicker-sv-wrap .react-colorful__saturation,
.uich-composer-host[data-theme="light"] .cpicker-sv-wrap .react-colorful__hue,
.uich-composer-host[data-theme="light"] .cpicker-sv-wrap .react-colorful__alpha,
.uich-composer-host[data-theme="light"] .cpicker-sv-wrap .react-colorful__alpha {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* Globals group, title (e.g. "Elementor Atomic" / "Elementor Globals")
     sits on its OWN single line; the swatch row drops directly below it.
     `nowrap` on the title prevents the longer labels from spilling onto
     a second line at narrow widths. */

.cpicker-globals-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  max-height: 120px;
  overflow-y: auto;
}

/* Inline color field */

.swatch-input input {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  color: var(--uich-text);
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  padding: 0 9px;
  min-width: 0;
  text-transform: uppercase;
}

.swatch-input input.color-field-linked-input {
  color: var(--text-hi);
  font-weight: 600;
  letter-spacing: 0.02em;
  /* Token names are identifiers, not hex: keep their case ("cafe-cream", not
     "CAFE-CR") and show a clean ellipsis when the field is narrow. */
  text-transform: none;
  text-overflow: ellipsis;
}

.swatch-input input::-moz-placeholder {
  text-transform: none;
}

.swatch-input input::placeholder {
  text-transform: none;
}

/* Global color linked, show name + hex inside the input area */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field>label {
  font-size: 11px;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field>label .unit {
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
}

/* segmented (text align, etc.) */
.seg {
  display: inline-flex;
  background: var(--panel-bg-2);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 2px;
  width: 100%;
}

.seg button {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--text-mid);
  flex: 1;
  height: 26px;
  border-radius: calc(var(--radius) - 2px);
  display: grid;
  place-items: center;
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 11.5px;
}

.seg button:hover {
  color: var(--uich-text);
}

.seg button.on {
  background: var(--panel-bg-4);
  color: var(--text-hi);
  box-shadow: 0 1px 0 rgba(var(--shadow-rgb), calc(0.2 * var(--shadow-a)));
}

.uich-composer-host[data-theme="light"] .seg button.on,
.uich-composer-host[data-theme="light"] .seg button.on {
  box-shadow: 0 1px 0 rgba(15, 15, 21, 0.08);
}

/* Inherited-from-breakpoint hint, dim, not fully active */
.seg button.inh-on {
  color: var(--text-dim);
  opacity: 0.6;
}

/* generic buttons */
.btn {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  cursor: pointer;
  background: var(--panel-bg-2);
  border: 1px solid var(--panel-line);
  border-radius: 5px;
  color: var(--uich-text);
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 12px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  background: var(--panel-bg-3);
  border-color: var(--panel-line-2);
}

.btn.primary {
  background: var(--text-hi);
  border-color: var(--text-hi);
  color: var(--panel-bg);
}

.btn.primary:hover {
  background: var(--uich-text);
  border-color: var(--uich-text);
}

.btn.ghost {
  background: none;
  border-color: transparent;
  color: var(--text-mid);
}

.btn.ghost:hover {
  color: var(--uich-text);
  background: var(--panel-bg-3);
}

.btn.sm {
  padding: 3px 8px;
  font-size: 11px;
}

/* ---- CODE tab (4 scopes, side-by-side editor panes) ---- */
.code2 {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.code-scope-tabs {
  /* inherits .section-tabs (no bottom padding, no bottom divider) */
}
/* Drop the line-variant baseline border on the scope row (Standard · Page ·
   Site · Globals). Scoped to this instance — the shared DS `.listLine` keeps its
   border everywhere else. The active-tab slider is the only line here. */
.code-scope-tabs [role='tablist'] {
  border-bottom: 0;
}

.code2-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  background: var(--panel-bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Full-width code editor tabs (PaneTabs): one editor at a time, the tab strip
   pinned above it, so HTML/CSS/JS (and Head/Footer) are readable in the narrow
   floating panel instead of squeezed into columns. */
.code2-panes {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.code2-panes .code-pane-tabs {
  flex-shrink: 0;
}
.code2-panes .ed-pane {
  flex: 1;
  min-height: 0;
}

.ed-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel-bg);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  overflow: hidden;
}

.ed-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: linear-gradient(-180deg, var(--panel-bg-2), var(--panel-bg));
  border-bottom: 1px solid var(--panel-line);
  gap: 8px;
}

.ed-pane-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ed-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-pane-tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

/* CSS / JS tabs inside the assets panel. */

.ed-pane-body {
  flex: 1;
  overflow: auto;
  padding: 8px 0;
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.55;
  color: var(--uich-text);
  background: var(--panel-bg);
}

.editor {
  flex: 1;
  overflow: auto;
  padding: 12px 0 12px 0;
  background: var(--panel-bg);
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--uich-text);
}

/* ---- CHAT tab ---- */

.chat-side {
  border-left: 1px solid var(--panel-line);
  background: var(--panel-bg-2);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-side .ctile {
  height: auto;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 6px;
  color: var(--text-mid);
}

.chat-side .ctile:hover {
  background: var(--panel-bg-3);
  color: var(--uich-text);
}

.chat-side .ctile.on {
  background: var(--panel-bg-3);
  color: var(--text-hi);
}

.chat-msgs {
  flex: 1;
  overflow: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.msg {
  display: flex;
  gap: 12px;
  max-width: 720px;
}

.msg .body {
  flex: 1;
  min-width: 0;
}

.msg .who {
  font-size: 11px;
  color: var(--text-mid);
  margin-bottom: 4px;
}

.msg .who b {
  color: var(--text-hi);
  font-weight: 600;
  margin-left: 6px;
}

.msg .actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.composer {
  border-top: 1px solid var(--panel-line);
  padding: 10px 14px;
  background: var(--panel-bg-2);
}

.composer .ctx {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--text-mid);
}

.composer .ctx .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--panel-bg-3);
  color: var(--uich-text);
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.composer .ctx .chip .x {
  color: var(--text-dim);
  cursor: pointer;
}

.composer .box {
  background: var(--panel-bg-2);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.composer .box:focus-within {
  border-color: var(--panel-line-2);
}

.composer textarea {
  background: none;
  border: 0;
  outline: none;
  color: var(--uich-text);
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 13px;
  resize: none;
  width: 100%;
  height: 42px;
}

.composer textarea::-moz-placeholder {
  color: var(--text-dim);
}

.composer textarea::placeholder {
  color: var(--text-dim);
}

.composer .tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.composer .tools .spacer {
  flex: 1;
}

/* ---- empty/locked state for content tab ---- */
.empty {
  margin: auto;
  text-align: center;
  color: var(--text-mid);
  padding: 40px;
}

.empty h3 {
  color: var(--text-hi);
  margin: 8px 0 6px;
  font-size: 14px;
}

.empty p {
  margin: 0;
  font-size: 12px;
  max-width: 320px;
  line-height: 1.5;
}

/* tiny utility */
.row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================ */
/*           NEW: schema-driven fields & UX components          */
/* ============================================================ */

/* ---- Compact unit pill inside length inputs ---- */

.panel .inherited-input.input,
.panel .inherited-input.select,
.panel .select.inherited-input,
.uich-composer-host .inherited-input.input,
.uich-composer-host .inherited-input.select {
  color: var(--text-mid);
  background-color: var(--panel-bg-2);
}

.panel .inherited-input.input:focus,
.panel .inherited-input.select:focus,
.uich-composer-host .inherited-input.input:focus,
.uich-composer-host .inherited-input.select:focus {
  color: var(--text-hi);
  background-color: var(--panel-bg-3);
}

/* ---- PropField, robust 52px-tall field with corner × on hover ---- */
.field.pf {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  min-width: 0;
}

.field.pf .pf-label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-mid);
  min-height: 14px;
  gap: 6px;
  line-height: 1.25;
}

.field.pf .pf-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}

.field.pf .pf-name-text {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}

.field.pf .pf-name>.uich-global-marker {
  align-self: center;
}

/* Text shadow, offsets + color picker */
.shadow-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 10px;
  width: 100%;
  min-width: 0;
}

.shadow-field-dim {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.shadow-field-dim>span {
  font-size: 9.5px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shadow-field-color {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.shadow-field-color-label {
  font-size: 9.5px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shadow-field-color .swatch-input {
  width: 100%;
  max-width: none;
}

.field.pf .pf-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.field.pf .pf-remove {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  height: 22px;
  padding: 0 7px;
  line-height: 0;
  border-radius: 5px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 1;
  transition: color .12s, background .12s, border-color .12s;
  flex-shrink: 0;
}

.field.pf .pf-remove svg {
  display: block;
}

.field.pf .pf-remove:hover {
  color: var(--uich-danger, #e05555);
  background: var(--rp-danger-soft, rgba(255, 122, 122, 0.12));
  border-color: var(--rp-danger-soft, rgba(255, 122, 122, 0.35));
}

/* ── Visual position inset editor (top/right/bottom/left offsets) ──────────── */

.inset-top {
  top: 8px;
  right: 50%;
  transform: translateX(50%);
}

.inset-bottom {
  bottom: 8px;
  right: 50%;
  transform: translateX(50%);
}

.inset-left {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.inset-right {
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.custom-css-field .pf-label {
  justify-content: flex-start;
  align-items: center;
}

.custom-css-field .pf-meta {
  gap: 8px;
  flex-shrink: 0;
}

.custom-css-field .pf-name {
  flex-wrap: nowrap;
  max-width: 100%;
}

.custom-css-field .pf-name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
}

.custom-css-field .gp-gradient-remove-btn {
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s, color .12s;
}

.custom-css-field .pf-label:hover .gp-gradient-remove-btn,
.custom-css-field .pf-label:focus-within .gp-gradient-remove-btn,
.custom-css-field .gp-gradient-remove-btn:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Editable combobox (Font Family etc.) ---- */
.combo {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  background: var(--panel-bg-2);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  overflow: visible;
  min-height: var(--input-h);
}

.combo.open {
  border-color: var(--panel-line-2);
}

.combo .combo-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 2147483645;
  max-height: 240px;
  overflow-y: auto;
  background: var(--panel-bg-2);
  border: 1px solid var(--panel-line-2);
  border-radius: 6px;
  box-shadow: var(--rp-shadow-4, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1));
  padding: 4px;
}

/* ---- Section empty state ---- */
.section-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-mid);
  font-size: 12px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-empty b {
  color: var(--text-hi);
}

.section-empty-hint {
  color: var(--text-dim);
  font-size: 11px;
}

/* ---- Subsection separator ---- */
.subsection {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 -2px;
  padding-top: 8px;
  border-top: 1px dashed var(--panel-line);
}

.subsection-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================ */
/*           Spacing widget (Webflow/Framer-style)              */
/* ============================================================ */
.sb {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 16px;
  padding: 0 2px;
}

.sb-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sb-label-inner {
  color: var(--text-mid);
}

.sb-tools {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---- Spacing cross (.sb-cross) ---------------------------------------------
   The page builder's box-model control, same to same: a three-by-three grid,
   top/bottom in the middle column over and under a hollow core, the side
   letter inside each field. Styled from the same DS tokens the builder's
   `.uipb-box` reads, so the two panels stay identical. */
.sb-cross {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--uc-space-4, 4px);
  width: 100%;
}
.sb-x-cell { position: relative; display: block; min-width: 0; }
.sb-x-cell:nth-child(1) { grid-area: 1 / 2; }  /* top */
.sb-x-cell:nth-child(2) { grid-area: 2 / 1; }  /* left */
.sb-x-cell:nth-child(4) { grid-area: 2 / 3; }  /* right */
.sb-x-cell:nth-child(5) { grid-area: 3 / 2; }  /* bottom */

/* The input is the builder's: borderless fill, room reserved for the letter.
   Beats the shared `.sb-cell` look from the nested box below. */
.sb-cross .sb-cell {
  width: 100%;
  height: var(--uc-control-h-sm, 26px);
  padding: 0 var(--uc-space-10, 10px) 0 var(--uc-space-20, 20px);
  border: 0;
  border-radius: var(--uc-radius-md, 8px);
  /* Dressed like the panel's DS Input (surface-overlay fill + 1px inset border),
     so the cells read as fields — the old surface-control fill is only 5% white
     on the dark panel and barely showed. */
  background: var(--uc-surface-overlay, rgba(128, 128, 128, 0.14));
  box-shadow: inset 0 0 0 1px var(--uc-border-strong, rgba(128, 128, 128, 0.3)), var(--uc-shadow-input);
  color: var(--uc-text-strong, inherit);
  font-size: var(--uc-text-xs, 12px);
  text-align: right;
}
.sb-cross .sb-cell:hover { background: var(--uc-surface-raised, rgba(128, 128, 128, 0.2)); }
.sb-cross .sb-cell:focus,
.sb-cross .sb-cell:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--uc-border-strong, rgba(128, 128, 128, 0.5));
}
.sb-cross .sb-cell::-moz-placeholder { color: var(--uc-text-subtle, rgba(128, 128, 128, 0.7)); }
.sb-cross .sb-cell::placeholder { color: var(--uc-text-subtle, rgba(128, 128, 128, 0.7)); }
.sb-x-side {
  position: absolute;
  top: 50%;
  left: var(--uc-space-8, 8px);
  transform: translateY(-50%);
  font-size: var(--uc-text-2xs, 10px);
  color: var(--uc-text-subtle, var(--uc-text-muted, rgba(128, 128, 128, 0.7)));
  pointer-events: none;
}
.sb-x-core {
  grid-area: 2 / 2;
  height: var(--uc-control-h-sm, 26px);
  border-radius: var(--uc-radius-md, 8px);
  background: var(--uc-surface-overlay, rgba(128, 128, 128, 0.08));
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle, rgba(128, 128, 128, 0.2));
}
.sb-mar,
.sb-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--panel-bg-2);
  border: 1px solid var(--panel-line);
  border-radius: 5px;
  padding: 5px 8px;
  gap: 3px;
}

.sb-pad {
  background: var(--panel-bg-3);
  padding: 5px;
}

.sb-mar-mid,
.sb-pad-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.sb-pad-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sb-pad-row {
  padding: 0 2px;
}

.sb-cell {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  /* Input-like fill (DS surface-overlay + inset border), with legacy fallbacks
     for any context outside the .uc-chrome scope. Was transparent, which read as
     "no field". */
  background: var(--uc-surface-overlay, var(--panel-bg-3, rgba(128, 128, 128, 0.14)));
  box-shadow: inset 0 0 0 1px var(--uc-border-strong, var(--panel-line, rgba(128, 128, 128, 0.3)));
  border: 0;
  color: var(--uich-text);
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  width: 40px;
  height: 18px;
  text-align: center;
  outline: none;
  border-radius: 4px;
  padding: 0 3px;
}

.sb-cell::-moz-placeholder {
  color: var(--text-dim);
}

.sb-cell::placeholder {
  color: var(--text-dim);
}

.sb-cell:hover {
  background: var(--panel-bg-3);
}

.sb-mar>.sb-cell:hover {
  background: var(--panel-bg-3);
}

.sb-pad>.sb-cell:hover {
  background: var(--panel-bg-4);
}

.sb-cell:focus {
  background: var(--panel-bg-4);
  box-shadow: 0 0 0 1px var(--panel-line-2) inset;
  color: var(--text-hi);
}

/* Design mode's single-row sides field (SidesBox): four filled cells, told
   apart by the side letter under each, no box around the row. */
.sides-box-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.sides-box-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

/* Same neutral scrim the right dock paints on every other field (see the
   "controls MUST stay visible" note in composer-dock.css): a panel token can
   resolve to the panel's own colour and make the cell vanish. */
.sides-box-cell .sb-cell {
  width: 100%;
  height: var(--input-h, 28px);
  /* Same DS Input dressing as the cross cells: overlay fill + inset border. */
  background: var(--uc-surface-overlay, var(--rp-surface-control, rgba(128, 128, 128, 0.1)));
  box-shadow: inset 0 0 0 1px var(--uc-border-strong, rgba(128, 128, 128, 0.3)), var(--uc-shadow-input);
}

.sides-box-cell .sb-cell:hover,
.sides-box-cell .sb-cell:focus {
  background: var(--uc-surface-raised, var(--rp-press, rgba(128, 128, 128, 0.18)));
}

.sides-box-side {
  font-size: 10px;
  color: var(--text-dim);
}

/* ---- Spacing sides (.sb-quad, QuadBox) -------------------------------------
   Padding / Margin as four equal fields, each with an arrow into the edge it
   sets. Replaces the plus-shaped CrossBox, whose three-column grid left each
   cell ~38px at the panel's 280px minimum, so the number was clipped to half a
   glyph ("0" printed as "C").
   Two columns when narrow, one row of four when there is room. The container
   query sits on `.sb-quad` — a leaf wrapper holding no popover, so containment
   cannot re-anchor a floating menu (putting `container` on the panel itself did
   exactly that). Layout lives here, not in the DS-scoped file, so it holds in
   the Gutenberg host and the harness too, neither of which carries
   `uc-chrome`. */
.sb-quad {
  container: uich-quad / inline-size;
  min-width: 0;
}
.sb-quad-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--uc-space-6, 6px);
}
@container uich-quad (min-width: 300px) {
  .sb-quad-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* The cell IS a `lin-box`, so it inherits every number-field state (border,
   hover, focus ring, the wp-admin input reset). Only the side icon and the
   input's own padding are new here. */
.sb-quad-cell {
  padding-left: var(--uc-space-4, 4px);
  cursor: text;
  min-width: 0;
}
.sb-quad-icon {
  display: flex;
  align-items: center;
  flex: none;
  padding-right: var(--uc-space-8, 8px);
  color: var(--text-dim);
  pointer-events: none;
}
/* Beats the generic `.sb-cell` dressing: inside the box the input is bare. */
.sb-quad-input {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  padding: 0 var(--uc-space-6, 6px);
  text-align: right;
}

.sb-content {
  flex: 1;
  min-height: 24px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-hi);
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 10px;
}

.sb-content .sb-x {
  color: var(--text-dim);
}

/* Compact single-ring variant used by the position Inset control, one box,
   shorter centre, slightly tighter cells than the nested margin/padding box. */
.sb-inset {
  gap: 6px;
}

.sb-inset .sb-pad {
  padding: 8px 10px;
}

.sb-inset .sb-content {
  min-height: 26px;
  font-size: 10.5px;
}

.sb-inset .sb-cell {
  width: 52px;
  height: 20px;
  font-size: 11.5px;
}

/* ============================================================ */
/*           Dependencies bar (Code tab)                         */
/* ============================================================ */
.deps-bar {
  margin-bottom: 2px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  overflow: visible;
}

.dep {
  display: grid;
  /* toggle | name | settings (pencil) | remove. Everything else — kind, version, URL,
     load order, injection point — moved into the settings modal, because in the
     narrow dock the nine-column row truncated every field including the name. */
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-top: 1px solid var(--panel-line);
  color: var(--uich-text);
  font-size: 12px;
}

.dep:hover {
  background: var(--rp-hover, rgba(255, 255, 255, 0.015));
}

/* A disabled row reads as disabled through its dimmed name; the switch is
   exempt because it is the one control that has to stay clickable AND legible
   from that state — .45 on top of an already-low-contrast OFF switch was most
   of why it looked like an empty pill in dark mode. */
.dep.disabled {
  opacity: .6;
}

.dep.disabled [role='switch'] {
  opacity: 1;
}

/* Read-only metadata chip used on the dep DISPLAY row (attrs summary,
     location summary). Visually matches the interactive button shape so
     the layout doesn't jump between display ↔ edit, but the cursor and
     hover states make it clear it isn't clickable, editing happens
     through the Edit (pencil) button. */

.dep-name {
  font-weight: 600;
  color: var(--text-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Dependency settings dropdown ──────────────────────────────────────────
   Opened by the row's pencil and anchored to it by computePickerPosition, so it
   reads as "settings for THIS row" instead of a centred dialog that dims the
   very list you are working through. Fixed + portalled for the same reason
   .dep-add-float is: inside the narrow dock an absolutely positioned panel gets
   squeezed down to the column's width. */
.dep-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 12px 8px 8px;
  border-bottom: 1px solid var(--panel-line);
}

.dep-settings-head strong {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-hi);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* One field per row. Two columns fit the width but leave every label clipped;
   the panel scrolls instead. */
.dep-settings-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px;
}

.dep-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dep-field-check {
  flex-direction: row;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--panel-line);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.dep-field-check:hover {
  border-color: var(--panel-line-2);
  background: var(--panel-bg-3);
}

/* Drawn from scratch rather than left native. The panel inherits Tailwind's
   preflight (`border-width: 0` on every element) and sits inside WP admin,
   whose own input styles also land here — between the two, a native checkbox
   rendered as an unlabelled, borderless blank that read as empty space whether
   it was ticked or not. `accent-color` can't fix that: it only tints a control
   that is still drawing itself. appearance:none + our own box and tick makes
   the state legible in both skins. */
.dep-field-check input[type='checkbox'] {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  position: relative;
  margin: 1px 0 0;
  width: 15px;
  height: 15px;
  border: 1px solid var(--panel-line-2);
  border-radius: 4px;
  background: var(--panel-bg);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.dep-field-check input[type='checkbox']:hover {
  border-color: hsl(var(--primary));
}

.dep-field-check input[type='checkbox']:focus-visible {
  outline: 2px solid var(--uc-ring, currentColor);
  outline-offset: -2px;
}

.dep-field-check input[type='checkbox']:checked {
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
}

/* The tick itself — a rotated L, so it needs no icon font or background image. */
.dep-field-check input[type='checkbox']::after {
  content: '';
  position: absolute;
  right: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid hsl(var(--primary-foreground));
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) scale(0.6);
  opacity: 0;
  transition: opacity 0.12s, transform 0.12s;
}

.dep-field-check input[type='checkbox']:checked::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

.dep-field-check-name {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-hi);
}

.dep-field-check-hint {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
}

.dep-settings-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  padding: 8px 12px;
  border-top: 1px solid var(--panel-line);
}

/* The open row stays lit while its dropdown is up, so it is obvious which
   library the floating panel belongs to. */
.dep.dep-open {
  background: rgba(var(--accent-rgb), 0.06);
}

.deps-foot {
  padding: 8px 12px;
  border-top: 1px solid var(--panel-line);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-bg);
  border-bottom-right-radius: 7px;
  border-bottom-left-radius: 7px;
}

/* Attributes dropdown (replaces pill chips) */
.dep-attrs-name {
  flex: 1;
}

.dep-attrs-hint {
  font-size: 10.5px;
  color: var(--text-dim);
  font-family: 'Plus Jakarta Sans', sans-serif;
  --uich-ff: 'Plus Jakarta Sans', sans-serif;
}

.dep-add {
  position: relative;
  /* Span the footer width so the anchored popover's `max-width: 100%` is
     measured against the panel, not the button, keeps it from overflowing
     (and being clipped) in the narrow right dock. */
  flex: 1 1 auto;
  min-width: 0;
}

/* Library catalog search + list inside the popover */

.lib-list {
  overflow-y: auto;
  flex: 1;
  padding: 6px;
  min-height: 0;
}
/* An already-added entry stays readable but stops advertising itself as an
   action — the tick is the affordance, not the dimming alone. */
.lib-row-added {
  flex: 0 0 auto;
  color: var(--status-ok, #3fb950);
}

/* Inside the Custom URL popover's foot row the dropdown sits at the LEFT
     edge, anchor it leftward there so the menu can grow rightward into
     the popover's body. (This selector is also reasserted in the
     drop-up rules under `.dep-add-custom-foot`.) */
.dep-add-custom {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dep-add-custom label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-mid);
  /* Grid children default to min-width:auto and can overflow the popover when a
     value/option is long — clamp so fields always shrink to their column. */
  min-width: 0;
}

/* Width clamp for every field; the hand-drawn frame and mono type only for a
   non-DS field (the Name / Version / URL fields are DS Inputs, `data-uc`). */
.dep-add-custom label input,
.dep-add-custom label select {
  width: 100%;
  min-width: 0;
}
.dep-add-custom label input:not(:where([data-uc])),
.dep-add-custom label select:not(:where([data-uc])) {
  background: var(--panel-bg-2);
  border: 1px solid var(--panel-line);
  border-radius: 5px;
  color: var(--uich-text);
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 6px 10px;
  outline: none;
}

/* The Type dropdown shows human labels ("JavaScript (.js)"), not code — a
   monospace face made them too wide to fit the narrow column and clipped to
   "JavaScrip". Use the UI sans face so every option reads in full. */
.dep-add-custom label select {
  font-family: inherit;
  --uich-ff: inherit;
}

.dep-add-custom label input:not(:where([data-uc])):focus,
.dep-add-custom label select:not(:where([data-uc])):focus {
  border-color: var(--panel-line-2);
}

.dep-add-float-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
  flex: 0 0 auto;
  padding: var(--uc-space-8) var(--uc-space-8) var(--uc-space-4);
  background: var(--uc-surface-base);
}

/* The location menu portals outside the tray, so it can open near the bottom
   without being clipped by this compact popover. */
.dep-add-row-2 {
  display: grid;
  /* Two-up when the popover is wide enough, but stack to one column in the
     narrow right dock so Version and Type each get their full width (the Type
     dropdown was clipping otherwise). */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.dep-add-hint {
  font-size: 10.5px;
  color: var(--text-dim);
  font-family: 'Plus Jakarta Sans', sans-serif;
  --uich-ff: 'Plus Jakarta Sans', sans-serif;
  flex: 1;
  min-width: 0;
}

/* ============================================================ */
/*               CHAT TAB v2, multi-state design               */
/* ============================================================ */
.chat2-wrap {
  flex: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-width: 0;
  min-height: 0;
}

/* Sidebar collapsed by default, chat takes the full width. */
.chat2-wrap.side-closed {
  grid-template-columns: 1fr;
}

/* Free build: the whole Chat tab body is the Pro upsell card, centred in the
   panel instead of the grid the real chat uses. */
.chat2-wrap--locked {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
}
.chat2-wrap--locked .pro-lock {
  width: 100%;
  max-width: 320px;
}

/* Sidebar header row: New chat + a close button. */
.chat-side-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.chat2-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  background: var(--panel-bg);
  height: 100%;
}

.chat2-body {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.chat-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-mid);
  font-size: 12px;
}

/* ---- Top status bar ---- */
.chat-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  /* Was `linear-gradient(--panel-bg-2, --panel-bg)`, but those two tokens
     resolve to the SAME colour (see the bridge note by --panel-bg-2), so the
     gradient was flat and the bar read as the panel itself. A neutral grey
     scrim lifts it off the panel and works in both themes — it lightens a dark
     panel and darkens a light one — rather than depending on a surface token.
     The scrim is written literally for exactly that reason. It was briefly
     `var(--rp-surface-raised, …)`, which put the bar back where it started: in
     the right panel that token is #202020 on dark (a lift, so it looked fixed)
     but #FFFFFF on light, i.e. the panel colour — a white strip on a white
     panel, with the grey only ever reachable as a fallback that never fired. */
  background: rgba(128, 128, 128, 0.12);
  border-bottom: 1px solid var(--panel-line);
  flex-wrap: wrap;
}

.chat-status-spacer {
  flex: 1;
}

/* ---- Empty state ---- */
.empty-onboarding {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
}

.empty-hero {
  text-align: center;
  padding-top: 12px;
}

.empty-mark {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--panel-bg-4);
  color: var(--text-hi);
  box-shadow: inset 0 0 0 1px var(--panel-line-2);
}

.empty-hero h3 {
  margin: 0 0 6px;
  color: var(--text-hi);
  font-size: 18px;
  font-weight: 600;
}

.empty-hero p {
  margin: 0;
  color: var(--text-mid);
  font-size: 13px;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
}

.empty-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* The two cards are ALTERNATIVES. They used to be numbered 1 and 2, which reads
   as a sequence — do this, then that — when the point is that you pick one. */
/* The two DS Separators either side of "or" draw the lines now, so the old
   ::before / ::after rules are gone (they doubled the lines). */
.empty-cards-or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--rp-text-muted, var(--text-dim));
  font-size: var(--uc-text-2xs, 10px);
  font-weight: var(--uc-weight-medium, 500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-foot {
  text-align: center;
  color: var(--text-dim);
  font-size: 11.5px;
  padding-top: 20px;
  margin-top: 4px;
  border-top: 1px solid var(--panel-line);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Wrap instead of clip: at a narrow panel the row breaks between its pieces
     ("Need help?" / "View docs" / "Contact support"), never inside one. */
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}

.empty-foot > * {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.empty-foot-sep {
  opacity: 0.4;
}

/* Composer Builder, no AI connected: centred hero + one compact row per way
   in (BuilderConnectState in the Pro chat). */
.empty-connect {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 24px 16px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.empty-connect-hero {
  text-align: center;
}

.empty-connect-hero > svg {
  margin-inline: auto;
}

.empty-connect-hero h3 {
  margin: 10px 0 4px;
  color: var(--text-hi);
  font-size: 15px;
  font-weight: 600;
}

.empty-connect-hero p {
  margin: 0;
  color: var(--uich-text);
  font-size: 13px;
  line-height: 1.5;
}

.empty-connect-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-connect-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 10px 10px;
  border: 1px solid var(--panel-line);
  border-radius: 10px;
}

.empty-connect-ico {
  flex: none;
  display: grid;
  place-items: center;
  color: var(--text-mid);
}

.empty-connect-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.empty-connect-title {
  color: var(--text-hi);
  font-size: 13px;
  font-weight: 500;
  /* One line, like the sub-line under it ("AI on this computer" wrapped to
     two beside the Connect button). */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-connect-row > button { flex: none; }

.empty-connect-sub {
  color: var(--uich-text);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Setup card ---- */
/* ── AI welcome / new-chat state (Figma-Make style) ─────────────────────────
   Centered mark + "What do you want to do?" + full-width suggestion cards. */
/* Minimal "quiet list" empty state. Top-aligned (not vertically centred) so the
   suggestions sit close under the prompt and the composer bar stays at the
   bottom — no floating mark, no big empty gap. Borderless rows: whitespace and a
   soft hover fill do the work. All colours are tokens so every skin stays right. */
.ai-setup {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* Centre the cluster in the space between the tabs and the composer bar so it
     reads as balanced, not stuck at the top with a void below. The composer bar
     is a separate element pinned at the bottom, so centring here never moves it
     — the empty→conversation transition stays jump-free. */
  justify-content: center;
  flex: 1 1 auto;
  padding: 16px;
  /* Even vertical rhythm between the mark, the prompt and the list. Replaces the
     per-element margins so the spacing stays consistent. */
  gap: 16px;
  text-align: right;
}

/* Context line: names what's selected ("Editing Heading") so the suggestions
   read as targeted rather than generic. */
.ai-setup-ctx {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  font-size: 11.5px;
  color: var(--text-dim);
}

.ai-setup-ctx-ico {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--text-mid);
}

/* The AI glyph is the mark for this empty state on EVERY skin. Both marks are
   still rendered by the Pro chat bundle; CSS decides which one shows.
   The Elementor skin used to swap in Elementor's own logo here. That broke the
   house rule that skins differ in COLOUR only, never in iconography — and it put
   the builder's badge on a panel that is about AI, not about Elementor. */
.ai-setup-ctx-ico .ai-setup-ico {
  display: inline-flex;
  line-height: 0;
}

.ai-setup-ctx-ico .ai-setup-ico-el {
  display: none;
}

/* Recolour the glyph's gradient PER SKIN. `stop-color` is a real CSS property,
   so the stops inside the Pro bundle's inline <svg> can be restyled from here —
   a CSS-only change in this repo, where the rest of the chat's styling already
   lives, with no Pro-side edit or rebuild. (A CSS rule also beats an SVG
   presentation attribute, so the markup's own #FFC574 / #FD6A35 attributes stay
   in place and lose.)

   This used to be pinned to ONE pink pair for every skin, which was wrong: it
   put ELEMENTOR's colour on the UiChemy skin. The mark now follows whichever
   skin is active — UiChemy orange (:root, above), Elementor pink and Gutenberg
   blue (composer-skin-tokens.css). Custom properties inherit, so the skin
   attribute on the host reaches these <stop> elements even though they sit
   several levels down inside the SVG's <defs>. */
#uich-ai-glyph-grad stop:first-child {
  stop-color: var(--ai-glyph-from);
}

#uich-ai-glyph-grad stop:last-child {
  stop-color: var(--ai-glyph-to);
}

.ai-setup-title {
  margin: 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-hi);
}

.ai-setup-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- Empty state, option B "three chips" (Jay 2026-09-29: very simple) -----
   Mark, one question with a quiet "Editing <element>" note, three pill chips. */
.ai-setup--simple { gap: 14px; }
.ai-setup--simple .ai-setup-mark { display: inline-flex; align-self: flex-start; line-height: 0; margin: 0; }
.ai-setup-head { display: flex; flex-direction: column; gap: 4px; }
.ai-setup-note {
  margin: 0 8px;
  font-size: 12px;
  color: var(--text-dim);
}
.ai-setup-note b { font-weight: 500; color: var(--text-mid); }
.ai-setup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 8px;
}
.ai-setup-chips .ai-setup-chip { border-radius: 999px; }
/* One left edge for mark, question, note and chips (the shared .ai-setup rules
   inset some of them by 8px and not others). */
.ai-setup--simple > *,
.ai-setup--simple .ai-setup-head > * { margin-right: 0; margin-left: 0; }

.ai-guide-review > p {
  margin: 0 8px;
  color: var(--text-mid);
  font-size: 12px;
}
.ai-guide-review textarea { width: 100%; }
.ai-guide-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* Tailwind preflight resets `.uich-tw button { background: transparent }`, which
   outranks the plain selector — reassert the card fill under the host scope. */

.ai-setup-row-ico {
  display: inline-flex;
  flex: 0 0 auto;
  width: 18px;
  justify-content: center;
  color: var(--text-mid);
}

.ai-setup-row-label {
  flex: 1 1 auto;
  min-width: 0;
}

.ai-setup-row-go {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--text-dim);
  opacity: 0;
  transform: translateX(3px);
  transition: opacity 0.13s ease, transform 0.13s ease;
}

/* ---- Model picker ---- */
.model-dd {
  position: relative;
  display: inline-block;
}

.model-dd.full {
  display: block;
}

/* The open menu. These rules went missing in a CSS consolidation, and without
   them the menu (plain `<div class="model-menu">`) rendered in the flow — under
   the prompt box and off the bottom of the panel in every builder. Restored
   from the last copy that carried them. */
.model-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  width: 260px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
/* SetupCard's picker: full width, opening downward. */
.model-dd.full .model-menu { width: 100%; }
.model-dd.drop-down .model-menu { top: calc(100% + 6px); bottom: auto; }
/* In the prompt box the menu measures against the BOX, not the small model
   button, and pins to both its edges — a fixed width hung off one side or the
   other depending on where the button sat, and the panel clipped the overhang.
   It then fits at any panel width and opens just above the prompt. */
.chat-composer { position: relative; }
.chat-composer .model-dd { position: static; }
.chat-composer .model-menu { right: 12px; left: 12px; width: auto; }
/* A site with every model connected lists dozens; the list scrolls. */
.model-list { overflow-y: auto; max-height: 300px; }

/* ---- Widget / Page scope chip (the chat's status row) ----
   Lost in the same consolidation as the model menu: as a bare <button> it fell
   back to `display: block` and stacked its icon, label and chevron. */
.scope-dd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: hsl(var(--foreground));
  font: inherit;
  --uich-ff: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.scope-dd > svg:last-child { color: hsl(var(--muted-foreground)); }
/* In the status row it is a fixed-width chip in the right corner (order: 1
   sorts it after the flex spacer, the history button stays left). */
.chat-status .scope-dd {
  order: 1;
  width: 118px;
  padding: 0 10px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px hsl(var(--border));
}
.chat-status .scope-dd:hover { box-shadow: inset 0 0 0 1px hsl(var(--foreground) / 0.32); }
.chat-status .scope-dd > svg:last-child { margin-right: auto; }

/* Inside the DS ghost Button trigger: the Button sets the text colour. */
.model-name {
  font-weight: var(--uc-weight-medium, 500);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Empty-tab connect-help panel ─────────────────────────────────────
     Shown inside the model dropdown when the active tab has no models.
     Wording mirrors the empty-state cards (function EmptyState). */
.model-connect {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.model-connect-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-hi);
}

.model-connect-body {
  margin: 0;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Globals summary card — per-collection preview rows (swatch strip / type
   specimen / value) instead of bare count chips. Whole row opens the collection.
   Minimal / borderless: no dividers, muted labels, tight rhythm. */
.glob-rows { display: flex; flex-direction: column; gap: 2px; }
.glob-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 4px;
  margin: 0 -4px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  color: var(--text-hi);
  font: inherit;
  --uich-ff: inherit;
  text-align: right;
  cursor: pointer;
}
.glob-row:hover { background: rgba(128, 128, 128, 0.08); }
.glob-row-ico { color: var(--text-lo); flex: 0 0 auto; opacity: 0.75; }
.glob-row-label { flex: 0 0 auto; width: 52px; font-size: 12px; color: var(--text-lo); }
.glob-row-preview { flex: 1; min-width: 0; display: flex; align-items: center; overflow: hidden; }
.glob-sws { display: flex; align-items: center; gap: 3px; }
.glob-sw {
  width: 14px; height: 14px; flex: 0 0 auto;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.35);
}
.glob-more { margin-right: 2px; font-size: 11px; color: var(--text-lo); }
.glob-fonts { display: flex; gap: 10px; min-width: 0; }
.glob-font {
  max-width: 108px;
  font-size: 13px; color: var(--text-hi);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.glob-val {
  font-size: 12px; color: var(--text-lo);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- Messages ---- */
.chat-msgs {
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.msg2 {
  display: flex;
  gap: 12px;
  max-width: 820px;
}

.msg2-body {
  flex: 1;
  min-width: 0;
}

/* User turns read as a right-aligned bubble (Gemini / Base44 pattern): no avatar
   or name, text in a subtle rounded chip. AI turns stay full-width with an
   avatar + tools, so the two speakers are instantly distinguishable. CSS-only —
   the markup already tags .msg2.user vs .msg2.ai. */
.msg2.user {
  justify-content: flex-end;
}
.msg2.user .msg2-meta {
  display: none;
}
.msg2.user .msg2-body {
  flex: 0 1 auto;
  max-width: 82%;
}
.msg2.user .msg2-text {
  padding: 7px 11px;
  border-radius: var(--uc-radius-lg, 12px);
  background: var(--rp-surface-raised, var(--panel-bg-3));
  border: 1px solid var(--rp-border-subtle, var(--panel-line-2));
  color: var(--rp-text-strong, var(--text-hi));
}

.msg2-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.msg2-meta b {
  color: var(--text-hi);
  font-weight: 600;
  font-size: 12.5px;
}

.msg2-text {
  color: var(--rp-text-strong, var(--uich-text));
  font-size: var(--uc-text-sm, 13px);
  line-height: 1.55;
  white-space: pre-wrap;
}

/* Markdown styling inside chat message bubbles */
.msg2-text pre {
  background: var(--panel-bg-3);
  border: 1px solid var(--panel-line-2);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 8px 0;
  overflow-x: auto;
}

.msg2-text code {
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--uich-text);
}

.msg2-text p {
  margin: 0 0 8px 0;
}

.msg2-text p:last-child {
  margin-bottom: 0;
}

.msg2-text .uich-md-h {
  color: var(--text-hi);
  font-weight: 600;
  margin: 14px 0 6px 0;
}

.msg2-text .uich-md-ul,
.msg2-text .uich-md-ol {
  padding-right: 20px;
  margin: 8px 0;
}

.msg2-text li {
  margin-bottom: 4px;
}

/* Inline code format inside message lines */
.msg2-text :not(pre)>code {
  background: var(--panel-bg-3);
  border: 1px solid var(--panel-line);
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 11.5px;
}

/* ── UI/UX redesign: message surfaces ─────────────────────────────────────
   The JSX sets the bubble fill inline via Tailwind (user = bg-primary, a loud
   high-contrast block; ai = bg-muted). These higher-specificity rules re-skin
   colour + radius only — no markup change, all handlers intact.
   • User turn  → a soft raised surface instead of a bright slab.
   • AI turn    → a bordered result card so long answers read as content.
   The sharper top-left corner anchors each bubble to its avatar/meta. */
.msg2.user .msg2-text {
  background: var(--rp-surface-raised, var(--panel-bg-3));
  color: var(--rp-text-strong, var(--text-hi));
  border: 1px solid var(--rp-border-subtle, var(--panel-line-2));
  border-radius: var(--uc-radius-lg, 12px) var(--uc-radius-sm, 6px) var(--uc-radius-lg, 12px) var(--uc-radius-lg, 12px);
  padding: 9px 12px;
}

.msg2.ai .msg2-text {
  background: var(--rp-surface-base, var(--panel-bg-2));
  color: var(--rp-text-strong, var(--uich-text));
  border: 1px solid var(--rp-border-subtle, var(--panel-line));
  border-radius: var(--uc-radius-lg, 12px) var(--uc-radius-sm, 6px) var(--uc-radius-lg, 12px) var(--uc-radius-lg, 12px);
  padding: 10px 13px;
}

.msg2-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

/* ── Elementor Globals toggle ──────────────────────────────────────────── */
/* Used in two places:                                                       */
/*   .var-pill , compact pill in the composer footer beside ModelPicker     */

/* Targeting / taken-over banner. The row is now a DS Alert plus a DS button,
   so this wrapper is layout only: the Alert draws its own frame, fill, icon
   colour and text. The picked selector keeps a mono face, at the DS weight. */
.picked-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
}

.picked-banner b {
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-weight: var(--uc-weight-medium, 500);
}

/* Picking overlay (when "Pick" mode is active, chat content fades; canvas takes focus) */
.chat2-main.picking .chat2-body {
  opacity: 0.25;
  pointer-events: none;
}

.pick-overlay {
  /* Pick mode = compact TOP BANNER (Jay), not a full-panel takeover: a dim scrim
     over the chat with a brand-tinted bar pinned at the top. */
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  /* Dim the chat behind (~55% visible) so the banner is the active thing. */
  background: rgba(23, 23, 23, 0.45);
  background: color-mix(in srgb, var(--panel-bg) 45%, transparent);
  z-index: 100;
  pointer-events: all;
}
.pick-overlay-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: color-mix(in srgb, var(--uc-brand, #FD6A35) 14%, var(--panel-bg));
  border-bottom: 1px solid color-mix(in srgb, var(--uc-brand, #FD6A35) 35%, transparent);
  pointer-events: all;
}
.pick-overlay-cursor {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--uc-brand, #FD6A35) 22%, transparent);
  color: var(--uc-brand, #FD6A35);
}
.pick-overlay-msg {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--uc-text-xs, 12px);
  line-height: 1.3;
  color: var(--text-hi);
  text-align: right;
}

/* Done, accent colour */

.chat2-main {
  position: relative;
}

.msg2-images {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

/* Sent images use the DS ComposerAttachments tiles (read-only). The list
   carries its own top/right room for the × it no longer shows. */
.msg2-attachments {
  margin: 0 0 var(--uc-space-8, 8px);
}

.msg2-image {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--rp-text-strong, white);
  font-size: 11.5px;
  font-weight: 500;
  box-shadow: 0 0 0 1px var(--rp-border-subtle, rgba(255, 255, 255, 0.08)) inset;
}

.msg2-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ── UI/UX redesign: per-message hover tools (AI replies) ─────────────────
   A quiet action row that fades in on hover, so common actions (copy) are
   one reach away without cluttering the reply. */
.msg2-tools {
  display: flex;
  gap: 2px;
  margin-top: 5px;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.msg2:hover .msg2-tools,
.msg2-tools:focus-within {
  opacity: 1;
}

/* ── UI/UX redesign: follow-up chips after a settled AI turn ──────────────
   Quick next-steps that reuse the composer's real send path. Aligned to the
   message body (avatar 24 + gap 12). */
.chat-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-right: 36px;
}

/* Retry action under a failed process/step block (composer-chat.jsx ProcessSteps). */
.chat-retry {
  display: flex;
  margin-top: 8px;
}

/* Scope dropdown options: a bold label line + a quiet one-line explanation of
   what each scope lets the AI see and edit. */
.scope-opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.scope-opt-desc {
  font-size: 11px;
  line-height: 1.4;
  color: var(--rp-text-muted, var(--text-dim));
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  max-width: 240px;
}
/* QA: the two-line description was cut off and set at 10px. The list is wide
   enough to read it, and each row grows to fit both lines. */
[role="listbox"]:has(.scope-opt) {
  min-width: 240px;
}
[role="listbox"] [role="option"]:has(.scope-opt) {
  height: auto;
  min-height: 0;
  padding-block: 6px;
}

/* ---- Process / thinking block ---- */
/* Inside the DS AccordionTrigger now: the title takes the trigger's own type
   and colour; the time is DS meta text. */
.process-time {
  margin-right: 8px;
  color: var(--rp-text-muted, var(--text-dim));
  font-size: var(--uc-text-2xs, 10px);
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 4px;
  border-right: 1.5px solid rgba(var(--accent-rgb), 0.35);
  margin-right: 5px;
}

.process-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 0;
  color: var(--text-mid);
  font-size: 12px;
}

.process-step-marker {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
}

/* A completed step gets a quiet filled check-disc so the eye can scan the
   run down the list; the accent tint ties it to the spine above. */
.process-step.status-done .process-step-marker {
  color: var(--text-hi);
  background: var(--accent-bg);
}

.process-step.status-done .process-step-name {
  color: var(--uich-text);
}

.process-step.status-run .process-step-marker {
  color: var(--text-hi);
}

.process-step.status-run .process-step-name {
  color: var(--text-hi);
}

.process-step.status-wait .process-step-marker {
  color: var(--text-dim);
}

.process-step.status-err .process-step-marker {
  color: var(--uich-danger);
}

.process-step .dash {
  color: var(--text-dim);
  font-size: 10px;
}

.process-step-name {
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 11.5px;
}

.process-step-detail {
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  margin-right: 4px;
}

.spin {
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(-360deg);
  }
}

/* ---- Auth error toast ---- */
/* ---- Unified error toast ---- */
/* The wrapper is a position hook only: the DS Alert inside draws the card, and
   the dismiss IconButton is absolutely placed in its corner. */
.err-toast {
  margin: 0 12px 8px;
  flex-shrink: 0;
}

/* ---- Composer ----
   A rounded input card floating above the panel floor (Gemini / Copilot
   pattern) instead of a flat full-width bar welded to the bottom edge. */
.chat-composer {
  margin: 10px;
  border: 1px solid var(--panel-line-2);
  border-radius: var(--radius);
  background: var(--panel-bg-3);
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 16px -10px rgba(var(--shadow-rgb), calc(0.5 * var(--shadow-a)));
}
.chat-composer:focus-within {
  border-color: var(--panel-line-2);
  box-shadow: 0 6px 20px -10px rgba(var(--shadow-rgb), calc(0.6 * var(--shadow-a)));
}

.composer-images {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

/* Fade what is inside, not the card: the status tray tucks under the card's
   bottom edge (composer-dock.css), and a see-through card showed it on top. */
.chat-composer.disabled > * {
  opacity: 0.55;
}

.composer-ctx {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
}

/* A DS Label now: its type and colour come from the DS. Spacing only. */
.composer-ctx-label {
  margin-left: 2px;
}

.composer-ctx-spacer {
  flex: 1;
}

.composer-images {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.composer-image {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 4px;
  background: var(--panel-bg-3);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
}

.composer-image-thumb {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: var(--rp-text-strong, white);
  box-shadow: 0 0 0 1px var(--rp-border-subtle, rgba(255, 255, 255, 0.06)) inset;
}

.composer-image-meta {
  display: flex;
  flex-direction: column;
  padding-left: 6px;
}

.composer-image-name {
  font-size: 12px;
  color: var(--text-hi);
  font-weight: 500;
  line-height: 1.2;
}

.composer-image-size {
  font-size: 10.5px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
}

.composer-image-x:not(:where([data-uc])) {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: 0;
  cursor: pointer;
  background: none;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  color: var(--text-dim);
  display: grid;
  place-items: center;
}

.composer-image-x:not(:where([data-uc])):hover {
  color: var(--uich-danger);
  background: var(--rp-danger-soft, rgba(255, 122, 122, 0.12));
}

.composer-drop {
  position: absolute;
  inset: 4px;
  background: var(--panel-bg-3);
  border: 2px dashed var(--panel-line-2);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--uich-text);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  z-index: 5;
}

/* Unified prompt box, the textarea AND the toolbar (attach · model · Send)
   live inside ONE bordered container, like a modern AI composer. */
.composer-input {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-line-2);
  border-radius: 10px;
  padding: 12px 12px 10px 12px;
  transition: border-color 0.12s, box-shadow 0.12s;
}

/* A clear accent focus ring — the composer is the primary action in this
   panel, so it should visibly light up when active. */
.composer-input:focus-within {
  border-color: rgba(var(--accent-rgb), 0.90);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.35);
}

.composer-input textarea,
.chat-composer .composer-input textarea {
  width: 100%;
}
.composer-input textarea:not(:where([data-uc])),
.chat-composer .composer-input textarea:not(:where([data-uc])) {
  background: transparent;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  color: var(--rp-text-strong, var(--uich-text));
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 13px;
  padding: 2px 2px 0;
  outline: none !important;
  resize: none;
  min-height: 72px;
}

.chat-composer .composer-input textarea:not(:where([data-uc])):focus,
.chat-composer .composer-input textarea:not(:where([data-uc])):focus-visible {
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.composer-input textarea:not(:where([data-uc])):disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.composer-foot {
  display: flex;
  align-items: center;
  gap: 6px;
}

.composer-foot-spacer {
  flex: 1;
}

/* Let the model picker give up width first (its name truncates via the
   ellipsis it already has) before the Send button has to, so both stay
   readable as the panel narrows. Scoped to the chat footer, the published
   page uses this same markup, so it's fixed there too, and no other model
   picker (or the .full variant) is affected. */
.composer-foot .model-dd {
  display: flex;
  min-width: 0;
  flex-shrink: 3;
}

.composer-foot .model-name {
  min-width: 0;
}

/* Stop button, shown in place of Send while AI is working */
.composer-stop:not(:where([data-uc])) {
  background: var(--rp-danger-soft, rgba(220, 60, 60, 0.12));
  border-color: var(--rp-danger-soft, rgba(220, 60, 60, 0.35));
  color: var(--rp-danger, #e05555);
  gap: 5px;
}

.composer-stop:not(:where([data-uc])):hover {
  background: var(--rp-danger-soft, rgba(220, 60, 60, 0.22));
  border-color: var(--rp-danger, rgba(220, 60, 60, 0.55));
  color: var(--rp-danger-fg, #f06060);
}

/* Solid square stop icon */
.stop-icon {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 1px;
  flex-shrink: 0;
}

/* ---- Side panel ---- */
.chat-side {
  border-left: 1px solid var(--panel-line);
  background: var(--panel-bg-2);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

/* A DS Label now (Label asChild): type and colour come from the DS. */
.chat-side-section {
  padding: 6px 0 4px;
}

.chat-side-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  font-size: 11.5px;
  color: var(--text-dim);
  opacity: 0.8;
}

.chat-side .ctile {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-mid);
  position: relative;
}

.chat-side .ctile:hover {
  background: var(--panel-bg-3);
  color: var(--uich-text);
}

.chat-side .ctile.on {
  background: var(--panel-bg-3);
  color: var(--text-hi);
  box-shadow: inset 0 0 0 1px var(--panel-line-2);
}

/* ── Left-edge status indicator (dots column) ───────────────────────────
     Fixed 14px wide so the tile body never shifts regardless of state.
     3 dots (2.5px × 3) + gaps (2px × 2) = 11.5px, 14px gives breathing room.
     Height matches the title row (18px) so the dot centres on the title text. */
.ctile-indicator {
  flex-shrink: 0;
  width: 14px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Single solid dot, shown when the tile is active/selected but idle */
.ctile-dot-single {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: hsl(var(--primary));
  flex-shrink: 0;
}

/* Unread dot, conversation got an AI response the user hasn't viewed yet */
.ctile-dot-unread {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: hsl(var(--primary));
  flex-shrink: 0;
  animation: ctile-dot-unread-pulse 2.4s ease-in-out infinite;
}

@keyframes ctile-dot-unread-pulse {

  0%,
  60%,
  100% {
    opacity: 0.55;
    transform: scale(0.85);
  }

  30% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* Body (title row + preview) fills the remaining width */
.ctile-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* Title row: flex so timestamp sits inline, title truncates.
     NOTE: overflow stays `visible` here so the kebab popover can escape
     the row. The title still truncates because `.ctile-t` has its own
     `overflow: hidden` + `text-overflow: ellipsis`. */
.ctile-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.ctile-t {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-hi);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.4;
  padding-bottom: 2px;
}

/* ── Right-edge slot (time / kebab share the same position) ─────────── */
.ctile-end {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-width: 22px;
  min-height: 18px;
  margin-right: auto;
}

.ctile-when {
  font-size: 10px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  white-space: nowrap;
  line-height: 1;
  transition: opacity 120ms ease;
}

.chat-side .ctile:hover .ctile-when,
.chat-side .ctile.menu-open .ctile-when {
  opacity: 0;
}

/* ── Kebab button ───────────────────────────────────────────────────────*/

/* Preview: single line, no raw markdown bleed */
.ctile-s {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  padding-bottom: 2px;
}

/* ── Three-dot indicator (running / queued) ─────────────────────────────
     Running  → animated orange dots  (warm, draws the eye → "work in progress")
     Queued   → static gray dots      (muted → "waiting its turn") */
.ctile-dots {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.ctile-dots span {
  display: block;
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: var(--rp-brand, #f97316);
  animation: ctile-dot-pulse 1.3s ease-in-out infinite;
  opacity: 0.5;
}

.ctile-dots span:nth-child(1) {
  animation-delay: 0s;
}

.ctile-dots span:nth-child(2) {
  animation-delay: 0.22s;
}

.ctile-dots span:nth-child(3) {
  animation-delay: 0.44s;
}

@keyframes ctile-dot-pulse {

  0%,
  70%,
  100% {
    opacity: 0.4;
    transform: scale(0.8);
    background: var(--rp-brand, #f97316);
  }

  35% {
    opacity: 1;
    transform: scale(1.1);
    background: var(--rp-brand-lighter, #fb923c);
  }
}

/* Queued = slower, dimmer pulse in gray, animated but clearly different from running */
.ctile-dots.queued span {
  background: var(--rp-text-muted, #9e9ea8);
  animation: ctile-dot-queue 2s ease-in-out infinite;
}

.ctile-dots.queued span:nth-child(1) {
  animation-delay: 0s;
}

.ctile-dots.queued span:nth-child(2) {
  animation-delay: 0.35s;
}

.ctile-dots.queued span:nth-child(3) {
  animation-delay: 0.7s;
}

@keyframes ctile-dot-queue {

  0%,
  60%,
  100% {
    opacity: 0.2;
    transform: scale(0.8);
    background: var(--rp-text-muted, #9e9ea8);
  }

  30% {
    opacity: 0.6;
    transform: scale(1);
    background: var(--rp-text, #c4c4cb);
  }
}

/* ---- Gradient builder (gp) ---- */
.gp {
  display: flex;
  flex-direction: column;
  background: var(--panel-bg-2);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
}

/* header, full-width type selector */
.gp-header {
  display: flex;
  padding: 8px 10px;
}

/* ── type-specific settings block ── */
.gp-settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--panel-line);
}

.gp-set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
}

.gp-set-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Toolbar actions sit beside 28px fields; the shared outlined IconButton is
   too prominent here. Keep these controls compact and quiet. */
.gp .gp-action-btn {
  --_h: 24px;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 6px;
  color: var(--uc-text, var(--text-mid));
}

.gp .gp-action-btn:hover:not(:disabled) {
  color: var(--uc-text-strong, var(--text-hi));
}

/* divider between solid color field and gradient builder inside Color tab */
/* Background ▸ Color tab. Capped at half-width in the wide bottom dock so the
   color swatch + gradient builder don't stretch across the whole panel. The
   narrow right dock has no width to spare, so let it fill fully (see the
   dock-right override in composer-dock.css). */
.bg-color-rows {
  max-width: 50%;
}

.gp-section-divider {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 0px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* background color label styled to match the gradient label exactly */
.pf-background-bgColor .pf-name-text {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* …but only inside the Background section, where it sits under that label.
   Design mode lists the same field as "Fill" among ordinary fields, so it reads
   like its neighbours there. */
.design-style-section .pf-background-bgColor .pf-name-text {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  text-transform: none;
  letter-spacing: inherit;
}

/* Remove button inside the Gradient divider row.
   Spacing applies to every remove button; the look (16px ghost glyph, dim
   colour, danger hover) only to a hand-built one. The inspector now renders
   these as DS IconButtons (`data-uc`), which bring their own size, radius and
   colours. :where() keeps the selector at (0,1,0), as before. */
.gp-gradient-remove-btn {
  margin-right: 2px;
  flex-shrink: 0;
}
.gp-gradient-remove-btn:not(:where([data-uc])) {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: none;
  cursor: pointer;
  background: transparent;
  border-radius: 0;
  color: var(--text-dim);
  width: 16px;
  height: 16px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .12s;
}

.gp-gradient-remove-btn:not(:where([data-uc])):hover {
  color: var(--uich-danger, #e05555);
}

/* Remove btns, visible only on hover when value is set. Also shown while
   focus is in the row, or on the button itself, so a keyboard user who Tabs
   onto one can see what they are about to press. */
.pf-background-bgColor .gp-gradient-remove-btn,
.gp-section-divider .gp-gradient-remove-btn {
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s, color .12s;
}

.pf-background-bgColor:hover .gp-gradient-remove-btn,
.gp-section-divider:hover .gp-gradient-remove-btn,
.pf-background-bgColor:focus-within .gp-gradient-remove-btn,
.gp-section-divider:focus-within .gp-gradient-remove-btn,
.pf-background-bgColor .gp-gradient-remove-btn:focus-visible,
.gp-section-divider .gp-gradient-remove-btn:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

/* generated css preview row */
.gp-css-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--panel-line);
}

/* preview bar (horizontal) */
.gp-bar-wrap {
  position: relative;
  height: 36px;
  margin: 10px 10px 16px;
  border-radius: 6px;
  border: 1px solid var(--panel-line);
}

.gp-bar-checker {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background:
    linear-gradient(-45deg, var(--panel-bg-4) 25%, transparent 25%, transparent 75%, var(--panel-bg-4) 75%) 0 0 / 10px 10px,
    linear-gradient(-45deg, var(--panel-bg-4) 25%, transparent 25%, transparent 75%, var(--panel-bg-4) 75%) 5px 5px / 10px 10px,
    var(--panel-bg-3);
}

.gp-bar-fill {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  cursor: crosshair;
}

.gp--simple .gp-row { cursor: default; }

.gp-handle {
  position: absolute;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  transform: translateX(50%);
  background: var(--hc, #888);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 2px 4px rgba(0, 0, 0, 0.4);
  cursor: grab;
  touch-action: none;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  transition: transform .1s, box-shadow .1s;
  z-index: 2;
}

.gp-handle::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 50%;
  transform: translateX(50%);
  border: 4px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.9);
  border-bottom: none;
}

.gp-handle:active {
  cursor: grabbing;
}

.gp-handle:hover {
  transform: translateX(50%) scale(1.1);
}

.gp-handle.active {
  transform: translateX(50%) scale(1.15);
  border-color: #fff;
  box-shadow: 0 0 0 2px hsl(var(--primary)), 0 2px 6px rgba(0, 0, 0, 0.5);
}

.gp-handle.active::after {
  border-top-color: #fff;
}

/* angle row */

.gp-unit {
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  flex-shrink: 0;
  pointer-events: none;
}

/* stops block */
.gp-stops-block {
  border-top: 1px solid var(--panel-line);
}

.gp-stops-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px 5px;
}

.gp-stops-list {
  display: flex;
  flex-direction: column;
  padding: 0 0 6px;
}

/* stop row */
.gp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background .1s;
}

.gp-row:hover {
  background: rgba(var(--accent-rgb), 0.05);
}

.gp-row.active {
  background: rgba(var(--accent-rgb), 0.10);
}

.uich-composer-host[data-theme="light"] .gp-row:hover,
.uich-composer-host[data-theme="light"] .gp-row:hover {
  background: rgba(var(--accent-rgb), 0.05);
}

.uich-composer-host[data-theme="light"] .gp-row.active,
.uich-composer-host[data-theme="light"] .gp-row.active {
  background: rgba(var(--accent-rgb), 0.08);
}

/* cells */
.gp-pos-cell {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  /* 3 digits + input padding + "%" (was 44px: "100" rendered as "10") */
  width: 72px;
  flex-shrink: 0;
}

.gp-color-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
}


/* column-header row, labels aligned to cells below */
.gp-stops-cols-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px;
  /* match gp-row side-padding so labels sit directly above their inputs */
}

.gp-col-label-pos {
  width: 72px;
  flex-shrink: 0;
}
/* Every caption in the gradient editor (Angle, Shape, Position, Reverse,
   Stops, CSS, the column heads, the "Gradient" divider) uses the one field
   label, like the rest of the panel. */
.gp :is(.gp-set-row, .gp-stops-head, .gp-css-row) > label,
.gp-section-divider > span:first-child,
.gp-stops-cols-header :is(.gp-col-label-pos, .gp-col-label-color) {
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-regular, 400);
  color: var(--uc-text, var(--text-mid));
  letter-spacing: normal;
}

.gp-col-label-color {
  flex: 1;
  min-width: 0;
  padding-right: 10px;
}

/* remove button */
.panel ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.panel ::-webkit-scrollbar-thumb {
  background: var(--panel-line-2);
  border-radius: 4px;
}

.panel ::-webkit-scrollbar-track {
  background: transparent;
}

/* ===== Panel-only canvas mode ===== */
body[data-panel-only] {
  background: var(--panel-bg);
}

body[data-panel-only] .stage {
  grid-template-rows: 1fr;
  grid-template-columns: 1fr;
  grid-template-areas: "panel";
  height: 100vh;
}

body[data-panel-only] .topbar,
body[data-panel-only] .sidebar,
body[data-panel-only] .canvas-wrap {
  display: none !important;
}

body[data-panel-only] .panel {
  height: 100vh !important;
  border-top: 0;
  box-shadow: none;
}

body[data-panel-only] .panel-resize {
  display: none;
}

/* --- Live code editor (wp.codeEditor / CodeMirror) integration --- */

/* CodeMirror 5 hides the scroller's native scrollbars by sizing it 50px past
   its box (padding + negative margin), which only works in content-box. The
   global border-box resets (`*`, `.uich-tw *`, `.uc-content *`) tie on
   specificity with codemirror.css and load after it, so they won: the native
   bar came into view under CodeMirror's own one, two horizontal scrollbars at
   the foot of every editor (QA). Restore CodeMirror's own sizing. */
:is(.uich-tw, .uc-content, .uc-scope, body) .CodeMirror-scroll,
:is(.uich-tw, .uc-content, .uc-scope, body) .CodeMirror-sizer,
:is(.uich-tw, .uc-content, .uc-scope, body) .CodeMirror-gutter,
:is(.uich-tw, .uc-content, .uc-scope, body) .CodeMirror-gutters,
:is(.uich-tw, .uc-content, .uc-scope, body) .CodeMirror-linenumber {
  box-sizing: content-box;
}

.ed-pane-live {
  display: flex;
  flex-direction: column;
}

.ed-pane-body-live {
  flex: 1;
  min-height: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* Empty state, shown centered over the (disabled) editor when no widget is
   selected. Lives in the body, not the header, so it never overlaps the
   Format/Copy tools in the narrow right dock. */
.ed-pane-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  --uich-ff: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  color: var(--text-dim);
  pointer-events: none;
}

.ed-pane-body-live .uich-cm-textarea {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--uich-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  --uich-ff: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  resize: none;
  outline: none;
  padding: 8px 10px;
  box-sizing: border-box;
}

.ed-pane-body-live .CodeMirror {
  height: 100% !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  --uich-ff: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: transparent;
  border: 0;
}

.ed-pane-body-live .CodeMirror-gutters {
  background: var(--panel-bg-2, rgba(255, 255, 255, 0.04));
  border-left: 1px solid var(--panel-line, rgba(255, 255, 255, 0.08));
}

.ed-pane-body-live .CodeMirror {
  color: var(--uich-text);
}

.ed-pane-body-live .CodeMirror-gutter-wrapper,
.ed-pane-body-live .CodeMirror-linenumber {
  color: var(--text-mid);
  opacity: 0.8;
  padding: 0 6px 0 8px;
}

.uich-composer-host[data-theme="light"] .ed-pane-body-live .CodeMirror-gutters,
body[data-theme="light"] .ed-pane-body-live .CodeMirror-gutters,
.panel[data-theme="light"] .ed-pane-body-live .CodeMirror-gutters {
  background: var(--panel-bg-2) !important;
  border-left-color: var(--panel-line) !important;
}

.uich-composer-host[data-theme="light"] .ed-pane-body-live .CodeMirror,
body[data-theme="light"] .ed-pane-body-live .CodeMirror,
.panel[data-theme="light"] .ed-pane-body-live .CodeMirror {
  background-color: var(--panel-bg) !important;
  color: var(--uich-text) !important;
}

.uich-composer-host[data-theme="light"] .ed-pane-body-live .CodeMirror-linenumber,
body[data-theme="light"] .ed-pane-body-live .CodeMirror-linenumber,
.panel[data-theme="light"] .ed-pane-body-live .CodeMirror-linenumber {
  color: var(--text-mid) !important;
}

.ed-pane-body-live .CodeMirror-cursor {
  /* Set the full border shorthand, not just the color: Tailwind's scoped
     preflight (`.uich-tw *{ border-width:0 }`) zeroes the cursor's border-left
     width at equal specificity and wins on source order, leaving a 0px-wide –
     i.e. invisible, caret. Restating width + style here (higher specificity)
     restores the blinking cursor in the HTML/CSS/JS editors. */
  border-right: 1px solid var(--uich-text);
  border-left: none;
  width: 0;
}

.ed-pane-body-live .CodeMirror-selected,
.ed-pane-body-live .CodeMirror-focused .CodeMirror-selected {
  background: rgba(var(--accent-rgb), 0.28);
}

/* The little square where the horizontal and vertical scrollbars meet.
   CodeMirror paints it its default white, which shows as a bright white block
   in the dark panel skin — blend it into the editor surface instead. */
.ed-pane-body-live .CodeMirror-scrollbar-filler,
.ed-pane-body-live .CodeMirror-gutter-filler {
  background: transparent;
}

.ed-pane-body-live .CodeMirror-activeline-background {
  background: var(--rp-surface-control, rgba(255, 255, 255, 0.03));
}

.ed-pane-body-live .CodeMirror-matchingbracket {
  color: var(--warn) !important;
  border-bottom: 1px solid var(--warn);
}

/* Reuse the design's syntax token palette so CodeMirror feels native
   in dark mode (overrides the default light-theme blue). */
.ed-pane-body-live .cm-s-default .cm-keyword,
.ed-pane-body-live .cm-s-default .cm-atom,
.ed-pane-body-live .cm-s-default .cm-builtin,
.ed-pane-body-live .cm-s-default .cm-def {
  color: hsl(var(--primary) / 0.35);
}

.ed-pane-body-live .cm-s-default .cm-tag,
.ed-pane-body-live .cm-s-default .cm-bracket {
  color: #ff9ec6;
}

.ed-pane-body-live .cm-s-default .cm-attribute,
.ed-pane-body-live .cm-s-default .cm-property,
.ed-pane-body-live .cm-s-default .cm-qualifier {
  color: var(--warn);
}

.ed-pane-body-live .cm-s-default .cm-string,
.ed-pane-body-live .cm-s-default .cm-string-2 {
  color: #9bdc9e;
}

.ed-pane-body-live .cm-s-default .cm-variable,
.ed-pane-body-live .cm-s-default .cm-variable-2,
.ed-pane-body-live .cm-s-default .cm-variable-3 {
  color: var(--uich-text);
}

.ed-pane-body-live .cm-s-default .cm-number {
  color: #ffd6a5;
}

.ed-pane-body-live .cm-s-default .cm-comment {
  color: #6a6c76;
  font-style: italic;
}

.ed-pane-body-live .cm-s-default .cm-operator,
.ed-pane-body-live .cm-s-default .cm-punctuation {
  color: #b8bac4;
}

.ed-pane-body-live .cm-s-default .cm-meta {
  color: #9ccfff;
}

.ed-pane-body-live .cm-s-default .cm-link {
  color: #9ccfff;
  text-decoration: underline;
}

/* Light theme: leave CodeMirror defaults alone, but tone down the
   blue-on-white that's too saturated for the panel chrome. */
.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-keyword,
.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-atom,
.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-builtin,
.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-def {
  color: hsl(var(--primary));
}

.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-tag,
.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-bracket {
  color: #be185d;
}

.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-attribute,
.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-property {
  color: var(--warn);
}

.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-string,
.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-string-2 {
  color: #166534;
}

.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-number {
  color: var(--warn);
}

.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-comment {
  color: #6b7280;
  font-style: italic;
}

.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-meta {
  color: #1d4ed8;
}

.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-qualifier {
  color: var(--warn);
}

.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-operator,
.uich-composer-host[data-theme="light"] .ed-pane-body-live .cm-s-default .cm-punctuation {
  color: #374151;
}

.uich-composer-host[data-theme="light"] .ed-pane-body-live .CodeMirror-activeline-background {
  background: rgba(var(--accent-rgb), 0.04);
}

.uich-composer-host[data-theme="light"] .ed-pane-body-live .CodeMirror-matchingbracket {
  color: var(--warn) !important;
  border-bottom-color: var(--warn);
}

.ed-pane-disabled .ed-pane-body-live {
  opacity: 0.55;
  pointer-events: none;
}

/* --- Editor tab additions --- */
.layers-empty {
  padding: 14px 12px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ── Empty layers state ─────────────────────────────────────────────────
   Centered hint + primary "Add Layer" CTA shown when the active widget
   has no HTML yet. Fills the entire layers-tree height so the message
   sits VERTICALLY CENTERED instead of stuck at the top. */
.layers-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 16px 16px 40px;
  /* `min-height: 100%` makes the state expand to fill its scroll parent
     (`.layers-tree { flex: 1 }`), so vertical centering actually has
     room to work even on tall panels. */
  min-height: 100%;
  box-sizing: border-box;
}

.layers-empty-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--panel-bg-3);
  display: grid;
  place-items: center;
  color: var(--text-mid);
  margin-bottom: 4px;
}

.layers-empty-msg {
  font-size: 13px;
  font-weight: 600;
  color: var(--uich-text);
}

.layers-empty-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.45;
  max-width: 200px;
}

.layers-empty-cta {
  margin-top: 6px;
}

/* ── Add-layer dropdown ─────────────────────────────────────────────────
   The menu is portaled to <body> via React.createPortal so it floats above
   the layers-tree's scrolling container, never inflates its scrollHeight,
   never gets clipped by ancestor overflow. Positioning is computed in JS
   from the trigger's bounding rect (see computeAddMenuPos in composer-
   layers.jsx); these CSS rules just style the menu chrome. */
.layer-add {
  position: relative;
  display: inline-flex;
}

/* Compact "+" trigger used next to the Layers title. Borderless and
   transparent by default, it should feel like an unobtrusive affordance
   sitting next to the heading. Only the hover state adds a soft bg so
   the trigger reveals itself when the user reaches for it. */

.btn.on {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: hsl(var(--primary));
  color: var(--uich-text);
}

/* --- Layer drag indicators --- */
.layer-row {
  position: relative;
}

.layer-row.is-dragging {
  opacity: 0.45;
}

.layer-row.drop-before::before,
.layer-row.drop-after::after {
  content: "";
  position: absolute;
  right: 4px;
  left: 4px;
  height: 2px;
  background: hsl(var(--primary));
  border-radius: 2px;
  pointer-events: none;
  z-index: 2;
}

.layer-row.drop-before::before {
  top: -1px;
}

.layer-row.drop-after::after {
  bottom: -1px;
}

.layer-row.drop-inside {
  background: rgba(var(--accent-rgb), 0.16);
  outline: 1px dashed rgba(var(--accent-rgb), 0.55);
  outline-offset: -2px;
}

/* --- Panel resize handle (top edge) --- */
.panel-resize {
  z-index: 5;
}

.panel-resize:hover::after,
.panel-resize:active::after {
  background: hsl(var(--primary));
  width: 60px;
  height: 4px;
}

/* --- Make the resize handle easier to find and grab --- */
.panel-resize {
  top: -6px;
  height: 12px;
}

.panel-resize::after {
  width: 48px;
  height: 4px;
  border-radius: 3px;
  background: var(--panel-line-2, #3b3d47);
  transition: background-color 120ms, width 120ms, height 120ms;
}

.panel-resize:hover::after {
  background: hsl(var(--primary));
  width: 80px;
  height: 5px;
}

.panel-resize:active::after {
  background: hsl(var(--primary));
  width: 96px;
  height: 5px;
}

/* --- Strong resize handle to ensure it's grabbable in the iframe --- */
.panel-resize {
  top: -8px;
  height: 16px;
  z-index: 2147483647;
  cursor: ns-resize;
  touch-action: none;
  pointer-events: auto;
}

.panel-resize::after {
  content: '';
  position: absolute;
  right: 50%;
  top: 50%;
  transform: translate(50%, -50%);
  width: 80px;
  height: 5px;
  border-radius: 3px;
  background: var(--panel-line-2, #3b3d47);
  transition: background-color 120ms, width 120ms, height 120ms;
}

.panel-resize:hover::after {
  background: hsl(var(--primary));
  width: 110px;
  height: 6px;
}

.panel-resize:active::after {
  background: hsl(var(--primary));
  width: 130px;
  height: 6px;
}

.panel {
  overflow: visible !important;
}

/* --- Fill the outer floating-panel container so its height drives ours --- */
.uichemy-composer-floating-panel,
#uichemy-composer-floating-panel {
  display: flex;
  flex-direction: column;
}

.uichemy-composer-floating-panel .uich-composer-host,
#uichemy-composer-floating-panel .uich-composer-host {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.uich-composer-host>.panel {
  flex: 1;
  min-height: 0;
  height: auto !important;
}

/* --- Globals, single, uniform treatment --- */

/* --- Specialized element editors (img / svg) --- */
.element-editor {
  border-bottom: 1px dashed var(--panel-line);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.element-editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* Image Content block, big preview (Jay, option A). No extra box or dashed
   rule: it lines up with the section's other fields. */
.element-editor.uc-img-src {
  padding: 0;
  border: 0;
  gap: 8px;
}
.uc-img-src__preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--uc-radius-md, 8px);
  overflow: hidden;
  cursor: pointer;
  background: var(--uc-surface-overlay, var(--panel-bg-2));
}
.uc-img-src__preview img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}
.uc-img-src__preview video {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
  pointer-events: none; /* a click on the well = Replace, never the player */
}
.uc-img-src__preview.is-empty {
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle, var(--panel-line));
}
.uc-img-src__preview.is-dynamic { cursor: default; }
.uc-img-src__preview:focus-visible {
  outline: 2px solid var(--uc-focus-ring, hsl(var(--ring)));
  outline-offset: -2px;
}
.uc-img-src__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: var(--uc-text-xs, 12px);
  color: var(--uc-text-muted, var(--text-lo));
}
.uc-img-src__preview.is-empty:not(.is-dynamic):hover .uc-img-src__empty {
  color: var(--uc-text-strong, var(--text-hi));
}
/* Replace / Remove: dark chips on the image's bottom-right corner, always
   visible so clients don't have to discover a hover state. */
.uc-img-src__actions {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  gap: 6px;
}
.uc-img-src__url {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.uc-img-src__url input { color: var(--uc-text, var(--text-mid)); }
.uc-img-src__url input:focus { color: inherit; }
.uc-img-src__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  min-width: 0;
}
/* Icon variant: the SVG sits centred at icon scale (a stretched arrow reads as
   clip-art), on a checkerboard so black AND white icons both stay visible. */
.uc-img-src__preview.is-icon {
  aspect-ratio: auto;
  height: 112px;
  background:
    repeating-conic-gradient(rgba(128, 128, 128, 0.16) 0% 25%, rgba(128, 128, 128, 0.08) 0% 50%) 50% / 12px 12px;
}
.uc-img-src__preview.is-icon img {
  width: 56px;
  height: 56px;
  -o-object-fit: contain;
     object-fit: contain;
}
.uc-img-src__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 2px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
[data-theme="light"] .uc-img-src__preview.is-icon,
.uich-composer-host[data-theme="light"] .uc-img-src__preview.is-icon {
  background:
    repeating-conic-gradient(rgba(0, 0, 0, 0.07) 0% 25%, rgba(0, 0, 0, 0.02) 0% 50%) 50% / 12px 12px;
}
.uc-img-src__toggle:hover { color: var(--uc-text-strong, var(--text-hi)); }
/* Same label as every other field in the panel ("Width", "Fit"). */
.uc-img-src__label,
.uc-field-label {
  margin: 0;
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-regular, 400);
  line-height: 1.4;
  color: var(--uc-text, var(--text-mid));
}

/* Audio / embed / font-icon wells (Design-mode Content editors). */
.uc-img-src__preview.is-static { cursor: default; }
/* Audio has no picture: plain surface, not the icon checkerboard. */
.uc-img-src__preview.is-audio { background: var(--uc-surface-overlay, var(--panel-bg-2)); }
.uc-img-src__preview.is-audio .uc-img-src__empty { color: var(--uc-text, var(--text-mid)); max-width: calc(100% - 24px); }
.uc-img-src__preview.is-audio:hover .uc-img-src__empty { color: var(--uc-text-strong, var(--text-hi)); }
.uc-img-src__fname { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-img-src__preview.is-icon > i { color: var(--uc-text-strong, var(--text-hi)); }
/* Dropdown choices: one row per choice, then a quiet "Add choice". */
.uc-opt-list { display: flex; flex-direction: column; gap: 6px; }
.uc-opt-add { align-self: flex-start; gap: 6px; padding-inline: 6px; }

/* ── Assets (section-root Content replacement) ──────────────────────────────
   One card per kind (Images, Icons) holding a thumbnail grid. Tiles are square
   and fixed-size so a section with twenty icons still reads as a grid rather
   than as a ragged list. */
.uich-assets {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Each kind is its own bordered card. The DS AccordionItem only draws a bottom
   divider, so the full border replaces it; the trigger gets the same side
   padding as the grid so title and tiles line up. */
.uich-assets .uich-asset-group {
  border: 1px solid var(--uc-border, rgba(255, 255, 255, 0.10));
  border-radius: var(--uc-radius-md, 8px);
  overflow: hidden;
}

.uich-assets .uich-asset-group__trigger {
  padding: 10px 12px;
}

/* Small fixed tiles. Pinned with a two-class selector and explicit
   width/height so host button styles (wp-admin forms.css, Elementor) can't
   stretch them back up. */
.uich-assets .uich-asset-grid {
  grid-template-columns: repeat(auto-fill, 44px);
  gap: 6px;
}

.uich-assets .uich-asset-tile {
  width: 44px;
  height: 44px;
  min-width: 0;
  min-height: 0;
  max-width: 44px;
  margin: 0;
  border-radius: 6px;
}

.uich-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 44px);
  gap: 6px;
  padding: 0 12px 12px;
}

.uich-asset-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.10));
  border-radius: 6px;
  background: var(--rp-surface-control, rgba(255, 255, 255, 0.04));
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s ease, background-color .15s ease;
}

.uich-asset-tile:hover { border-color: var(--rp-border-strong, rgba(255, 255, 255, 0.35)); }
.uich-asset-tile:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }

/* Images fill the tile; an icon must not, or a 24px glyph blown up to 62px
   turns into a blurry smear. `contain` with padding keeps both honest. */
.uich-asset-thumb {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}

/* Icons only. An icon is authored at ~24px and its data: URI renders with
   `currentColor` resolved to black, so it needs a light ground and room to
   breathe — `cover` would crop a glyph and blow it up into a smear. */
.uich-asset-thumb--contain {
  -o-object-fit: contain;
     object-fit: contain;
  padding: 10px;
}

/* Inline-SVG icon: its shape as a mask, painted in the panel text colour, so
   the tile stays dark (light in the light theme) like every other tile. */
.uich-asset-mask {
  width: 100%;
  height: 100%;
  background-color: var(--uc-text-strong, currentColor);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 20px 20px;
  mask-size: 20px 20px;
}

.uich-asset-empty {
  font-size: 9px;
  opacity: 0.55;
  text-align: center;
  padding: 4px;
}

/* A WebGL / 3D "object" tile has no thumbnail — it shows a centred glyph. */
.uich-asset-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

/* ── Text list (section-root, Design mode) ──────────────────────────────────
   A compact, read-only inventory. Each item opens the selected text element's
   Content panel, where its wording can be edited. */
.uich-texts {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.panel.dock-right.uc-chrome .rp-sec__content > .section.uich-texts {
  gap: 0;
}

.uich-texts__box {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--uc-border, rgba(255, 255, 255, 0.10));
  border-radius: var(--uc-radius-md, 8px);
}

.uich-texts .uich-texts__row {
  display: grid;
  grid-template-columns: minmax(0, 82px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--uc-border-subtle, rgba(255, 255, 255, 0.10));
  border-radius: 0;
  background: transparent;
  color: var(--uc-text-strong, var(--text-hi));
  text-align: right;
  cursor: pointer;
  min-width: 0;
}

.uich-texts .uich-texts__row:hover {
  background: var(--rp-surface-control, rgba(255, 255, 255, 0.04));
}

.uich-texts .uich-texts__row:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

.uich-texts .uich-texts__row:last-child {
  border-bottom: 0;
}

.uich-texts__role {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.uich-texts__label {
  flex: 1 1 auto;
}

.uich-texts__edit {
  flex: none;
  color: var(--uc-text, var(--text-mid));
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}

.uich-texts__row:hover .uich-texts__edit,
.uich-texts__row:focus-visible .uich-texts__edit {
  opacity: 1;
}

.uich-texts__label,
.uich-texts__preview {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uich-texts__preview {
  font-size: var(--uc-text-sm, 14px);
  line-height: 1.4;
}

.uich-texts .uich-texts__more {
  width: 100%;
  min-height: 36px;
  margin: 0;
  border-radius: 0;
  color: var(--uc-text, var(--text-mid));
  font-size: var(--uc-text-xs, 12px);
}

/* ONE field-label look for the whole composer — the settings panel's own row
   label ("Width", "Fit"): 12px regular, the mid text colour, sentence case, no
   tracking. Used by the Text list, the media blocks (Alt text, Poster image,
   Placeholder), Link / URL / Attributes captions, gradient column heads, the
   typography editor and the asset dialog. */
.uc-field-label,
.uich-texts__label {
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-regular, 400);
  line-height: 1.4;
  color: var(--uc-text, var(--text-mid));
}

.element-editor-media-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.element-editor-media-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.element-editor-field-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.element-editor-media-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 8px;
  background: var(--panel-bg-2);
  overflow: hidden;
}

/* Filled: the image drives the height off the panel width so it sits flush,
   edge to edge, with no empty side bars — minimal and well-fitted. Borderless. */
.element-editor-media-preview:not(.is-empty) {
  cursor: pointer;
}

/* Empty: a compact, lightly outlined well so it still reads as clickable. */
.element-editor-media-preview.is-empty {
  min-height: 84px;
  border: 1px dashed var(--panel-line);
}

.element-editor-media-preview img {
  width: 100%;
  height: auto;
  max-height: 200px;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}

.element-editor-media-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--rp-scrim, rgba(0, 0, 0, 0.45));
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.element-editor-media-preview:hover .element-editor-media-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Compact media (Jay / BoardUI): a 44px thumbnail that opens the picker, sitting
   inline with the URL/SOURCE field + Media button instead of a full-width well. */
.element-editor-media-thumb {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  color: var(--uc-text-muted, #888);
  background: var(--uc-surface-overlay, var(--panel-bg-2));
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle, var(--panel-line));
}
.element-editor-media-thumb.is-empty {
  background:
    repeating-conic-gradient(var(--uc-surface-raised, #2a2a2a) 0% 25%, var(--uc-surface-overlay, #202020) 0% 50%) 50% / 12px 12px;
}
.element-editor-media-thumb img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  display: block;
}
/* The image editor lays its COMPACT thumb beside the SOURCE field stack. Scoped
   with :has() so the Background-image field (big preview, no thumb) keeps its
   original stacked column layout — a plain rule here broke it. */
.element-editor-media-left:has(.element-editor-media-thumb) {
  flex-direction: row;
  align-items: flex-start;
}
.element-editor-media-left:has(.element-editor-media-thumb) .element-editor-field-stack { flex: 1 1 auto; }

/* SVG-code disclosure header: the "SVG Code" toggle on the left, Reset on the right. */
.element-editor-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.element-editor-code-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--uc-text-muted, #888);
}
.element-editor-code-toggle:hover { color: var(--uc-text-strong, #fff); }

.element-editor-media-code {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.element-editor-media.is-svg .element-editor-media-code {
  min-width: 0;
}

.element-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.element-editor-link-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-right: 0;
}

/* Custom 3px scrollbar width for all dropdowns and popover menus.
   Every scrolling pane in a float belongs here — a popover whose one tab
   scrolls with this bar and whose next tab scrolls with the browser default
   is the inconsistency this list exists to prevent. */
.combo-menu::-webkit-scrollbar,
.suggest::-webkit-scrollbar,
.layers-tree::-webkit-scrollbar,
.layers-history-body::-webkit-scrollbar,
.tag-menu-list::-webkit-scrollbar,
.lib-list::-webkit-scrollbar,
.dep-add-custom::-webkit-scrollbar,
.dep-settings-body::-webkit-scrollbar,
.cpicker-globals-list::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

.combo-menu::-webkit-scrollbar-thumb,
.suggest::-webkit-scrollbar-thumb,
.layers-tree::-webkit-scrollbar-thumb,
.layers-history-body::-webkit-scrollbar-thumb,
.tag-menu-list::-webkit-scrollbar-thumb,
.lib-list::-webkit-scrollbar-thumb,
.dep-add-custom::-webkit-scrollbar-thumb,
.dep-settings-body::-webkit-scrollbar-thumb,
.cpicker-globals-list::-webkit-scrollbar-thumb {
  background: var(--panel-line-2);
  border-radius: 2px;
}

.combo-menu::-webkit-scrollbar-track,
.suggest::-webkit-scrollbar-track,
.layers-tree::-webkit-scrollbar-track,
.layers-history-body::-webkit-scrollbar-track,
.tag-menu-list::-webkit-scrollbar-track,
.lib-list::-webkit-scrollbar-track,
.dep-add-custom::-webkit-scrollbar-track,
.dep-settings-body::-webkit-scrollbar-track,
.cpicker-globals-list::-webkit-scrollbar-track {
  background: transparent;
}

/* Layers column width resizer */
.layers-resize-handle {
  position: absolute;
  top: 0;
  left: -3px;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 100;
}

/* ── Floating "Navigator", detached Layers window ────────────────────────── */
.layers-float {
  display: flex;
  flex-direction: column;
  background: var(--panel-bg-2);
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  box-shadow: var(--rp-shadow-4, 0 8px 24px rgba(0, 0, 0, 0.14), 0 1px 4px rgba(0, 0, 0, 0.10));
  overflow: hidden;
}

/* The pane fills the floating window; its own chrome (border/bg) is dropped
   because the window frame provides it. */
.layers-float .layers-col {
  height: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
  border-radius: inherit;
}

/* Header doubles as the window's drag handle. */
.layers-float .layers-head.is-drag-handle {
  cursor: move;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  border-bottom: 1px solid var(--panel-line);
}

/* Bottom-right resize grip. */
.layers-float-resize {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  cursor: nesw-resize;
  z-index: 101;
}

.layers-float-resize::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  border-left: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  border-bottom-left-radius: 3px;
  opacity: 0.6;
}

/* ── Agent pairing panel (password handshake) ─────────────────────────────── */
.btn.xs {
  padding: 3px 9px;
  font-size: 10.5px;
  border-radius: var(--radius-sm);
}

.btn.xs:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ── Local network access gate ──────────────────────────────────────────────
   Rendered by the PRO chat bundle (LocalAccessGate in composer-chat.jsx) but
   styled here for the same reason every other chat class is: Pro ships no CSS,
   and Tailwind's JIT only scans this plugin's src, so a utility class written in
   Pro's source would never be generated. Semantic classes only.

   No border or panel of its own: this sits INSIDE .empty-card, and a second
   bordered box within it produced the nested-frame look that made the step hard
   to read. A hairline underneath separates it from the command block instead. */
.agent-access {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  text-align: center;
}

/* Capped and centred, not full-bleed. Uncapped, this mock browser prompt drew
   at the card's full width (~400px) and read as the real permission UI rather
   than a preview of it. Keep in step with the inline width LocalAccessArt sets
   on the <svg> itself — see the note there for why the art carries its own
   size rather than trusting this rule to be present. */
.agent-access-art {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
}

.agent-access-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-hi);
}

/* One short line. `text-wrap: balance` keeps a two-line wrap even rather than
   leaving one orphan word centred under a full line, which is most of what made
   the old three-line paragraph look misaligned. */
.agent-access-body {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-dim);
  text-wrap: balance;
}

/* ── Gate motion ────────────────────────────────────────────────────────────
   One 4s loop told from three parts that share a clock: signal leaves the globe,
   the cursor travels to Allow and presses it, the button flashes. The point is
   rehearsal — the real browser prompt shows up somewhere the user is not looking,
   so seeing the action first is what stops them reflexively clicking Block.
   SVG children need `transform-box: fill-box` or a CSS transform resolves
   against the whole viewBox and the pieces fly off. */
.agent-access-art .lna-ring,
.agent-access-art .lna-ripple,
.agent-access-art .lna-cursor,
.agent-access-art .lna-allow,
.agent-access-art .lna-dialog {
  transform-box: fill-box;
  transform-origin: center;
}

.agent-access-art .lna-dialog {
  animation: lna-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.agent-access-art .lna-ring {
  animation: lna-ring 2.6s ease-out infinite;
}

.agent-access-art .lna-ring-2 {
  animation-delay: 0.9s;
}

.agent-access-art .lna-cursor {
  /* Scale is about the tip, not the middle, so the press reads as a press. */
  transform-origin: top right;
  animation: lna-cursor 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.agent-access-art .lna-allow {
  animation: lna-allow 4s linear infinite;
}

.agent-access-art .lna-ripple {
  animation: lna-ripple 4s ease-out infinite;
}

@keyframes lna-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

@keyframes lna-ring {
  0%        { opacity: 0.5; transform: scale(0.6); }
  70%, 100% { opacity: 0;   transform: scale(1.75); }
}

@keyframes lna-cursor {
  0%, 8%    { opacity: 0; transform: translate(-44px, 20px); }
  20%       { opacity: 1; }
  45%       { opacity: 1; transform: translate(0, 0) scale(1); }
  52%       { transform: translate(0, 0) scale(0.86); }
  60%       { transform: translate(0, 0) scale(1); }
  86%       { opacity: 1; transform: translate(0, 0); }
  100%      { opacity: 0; transform: translate(-44px, 20px); }
}

@keyframes lna-allow {
  0%, 49%   { opacity: 1; }
  54%       { opacity: 0.5; }
  62%, 100% { opacity: 1; }
}

@keyframes lna-ripple {
  0%, 50%   { opacity: 0;    transform: scale(0.18); }
  56%       { opacity: 0.32; }
  78%, 100% { opacity: 0;    transform: scale(1); }
}

/* The card itself arrives rather than appearing. */
.agent-access {
  animation: lna-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Waiting step: the prompt is open somewhere they are not looking ──────── */
.agent-access-point {
  display: flex;
  justify-content: center;
  color: rgb(var(--accent-rgb));
  animation: lna-point 1.3s ease-in-out infinite;
}

@keyframes lna-point {
  0%, 100% { transform: translateY(2px);  opacity: 0.55; }
  50%      { transform: translateY(-3px); opacity: 1; }
}

.agent-access-body strong {
  color: var(--text-hi);
  font-weight: 700;
}

@keyframes lna-halo {
  0%        { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.30); }
  70%, 100% { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); }
}


/* The AI-assistant route. Wrapped and selectable — this one is read before it is
   copied, unlike the command, so it is not allowed to clip. */
.uconnect-prompt {
  max-height: 132px;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--panel-bg);
  border: 1px solid var(--panel-line-2);
  color: var(--text-mid);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  --uich-ff: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  -webkit-user-select: text;
     -moz-user-select: text;
          user-select: text;
}

.uconnect-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.uconnect-hint {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
}

.uconnect-link:not(:where([data-uc])) {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.uconnect-link:not(:where([data-uc])):hover {
  color: var(--text-hi);
}

.uconnect-foot-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Progress rail ─────────────────────────────────────────────────────────
   Three beads with the track drawn between them, so "where am I / how much is
   left" is answered before any of the step content is read. The steps are
   derived from real connection state, never from a counter we increment, so a
   bead can only be ticked by something that actually happened. */
.uconnect-rail {
  display: flex;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--panel-line);
  background: var(--panel-bg);
}

/* Each step is a DS Button now (ghost, or soft on the current step): it keeps
   the equal-width cell; its look comes from the DS. The current step is
   aria-current="step" and a finished one carries data-done, replacing the old
   .is-on / .is-done classes. The pseudo-element track between beads assumed
   the old stacked bead-over-label node, so it is gone with that node. */
.uconnect-rail > [data-uc] {
  flex: 1 1 0;
  min-width: 0;
}

/* The connecting track: drawn by each node except the first, reaching back to
   the previous bead. Doing it with a pseudo-element rather than separate divider
   elements keeps the flex maths to one child per step. */

.uconnect-bead {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--panel-bg-3);
  border: 1.5px solid var(--panel-line-2);
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 700;
  position: relative;
  z-index: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.uconnect-rail > [aria-current='step'] .uconnect-bead {
  background: rgb(var(--accent-rgb));
  border-color: rgb(var(--accent-rgb));
  color: var(--panel-bg);
}

.uconnect-rail > [data-done] .uconnect-bead {
  background: transparent;
  border-color: rgba(var(--accent-rgb), 0.55);
  color: rgb(var(--accent-rgb));
}

.uconnect-node-label {
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.uconnect-rail > [aria-current='step'] .uconnect-node-label,
.uconnect-rail > [data-done] .uconnect-node-label {
  color: var(--text-hi);
}

/* ── Step panes ── */
.uconnect-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: uconnect-step 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.uconnect-lead {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-mid);
}

/* Step 2 finishes without the user telling us, so it says so — otherwise a
   correctly-working screen looks like a screen that has stalled. */
.uconnect-listen {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 9px 12px;
  border-radius: var(--radius);
  background: hsl(var(--primary));
  border: 0;
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--primary-foreground));
}

/* Spinner track has to be drawn against the banner's own fill, not the panel's —
   `--panel-line-2` is a dark hairline and vanished on the light banner. */
.uconnect-spin {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid hsl(var(--primary-foreground) / 0.25);
  border-top-color: hsl(var(--primary-foreground));
  animation: uconnect-spin 0.7s linear infinite;
}

.uconnect-done {
  align-items: center;
  text-align: center;
  padding: 8px 0 4px;
}

.uconnect-tick {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: hsl(var(--primary));
  border: 0;
  color: hsl(var(--primary-foreground));
  animation: uconnect-pop 0.34s cubic-bezier(0.22, 1.4, 0.4, 1) both;
}

/* Waiting for a prompt answer, with the escape hatch beside it once offered. */
.uconnect-wait {
  display: flex;
  align-items: center;
  gap: 12px;
}

@keyframes uconnect-step {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: none; }
}

@keyframes uconnect-spin {
  to { transform: rotate(-360deg); }
}

@keyframes uconnect-pop {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes uconnect-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes uconnect-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

/* ── Inline launcher ────────────────────────────────────────────────────────
   All that is left in the panel: one way in. */
.agent-launch {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--text-mid);
}

/* Motion is the teaching aid, not the content — the card reads identically
   without it, so honour the preference completely rather than partially. */
@media (prefers-reduced-motion: reduce) {

  .agent-access,
.agent-access-point,
.uconnect-spin,
.agent-access-art .lna-dialog,
.agent-access-art .lna-ring,
.agent-access-art .lna-cursor,
.agent-access-art .lna-allow,
.agent-access-art .lna-ripple {
    animation: none;
  }

  .agent-access-art .lna-ring {
    opacity: 0;
  }
}

/* Terminal-style command card */
.agent-cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-line-2);
  border-radius: var(--radius);
  padding: 8px 11px 8px 8px;
}

.agent-cmd code {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-hi);
  scrollbar-width: none;
}

.agent-cmd code::-webkit-scrollbar {
  display: none;
}

/* ── Connect progress rail: 1 ─── 2 ─── 3 ─────────────────────────────────
   The beads-and-track header the dialog had before the checklist, back, in DS
   tokens. Each step is a bead over its label, the track is drawn from every
   step but the first back to the previous bead, and the step in view opens
   below it as the only pane. The state is on the <li> (data-state, data-current,
   data-reached) so the markup stays plain. Doubled class: the global
   `.uich-tw ol` reset (0,1,1) otherwise zeroes the padding and margin. */
.uconnect-progress.uconnect-progress {
  list-style: none;
  margin: 0 0 12px;
  padding: 4px 0 0;
  display: flex;
  align-items: flex-start;
}

.uconnect-progress__item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

.uconnect-progress__node {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--uc-text-muted);
  font: inherit;
  --uich-ff: inherit;
}

.uconnect-progress__node:disabled {
  cursor: default;
}

.uconnect-progress__node:focus-visible {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
  border-radius: var(--uc-radius-sm);
}

/* The track: each step but the first draws it back to the previous bead. */
.uconnect-progress__item + .uconnect-progress__item::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 50%;
  right: -50%;
  height: 2px;
  margin: 0 18px;
  border-radius: 2px;
  background: var(--uc-border);
}

.uconnect-progress__item[data-reached] + .uconnect-progress__item[data-reached]::before {
  background: var(--uc-brand);
}

.uconnect-progress__bead {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--uc-surface-raised);
  box-shadow: inset 0 0 0 1.5px var(--uc-border-strong, var(--uc-border));
  color: var(--uc-text-muted);
  font-size: 11px;
  font-weight: 700;
  transition: background 0.15s, box-shadow 0.15s, color 0.15s;
}

.uconnect-progress__item[data-current] .uconnect-progress__bead {
  background: var(--uc-brand);
  box-shadow: none;
  /* The ink paired with --uc-brand: white on UiChemy orange, dark where a
     builder makes the brand the theme's inverse (white in the dark theme). */
  color: var(--uc-brand-on, #fff);
}

.uconnect-progress__item[data-state='done']:not([data-current]) .uconnect-progress__bead {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--uc-brand);
  color: var(--uc-brand);
}

.uconnect-progress__item[data-state='problem'] .uconnect-progress__bead {
  background: var(--uc-warning);
  box-shadow: none;
  color: #171717;
}

.uconnect-progress__label {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.uconnect-progress__item[data-current] .uconnect-progress__label,
.uconnect-progress__item[data-state='done'] .uconnect-progress__label {
  color: var(--uc-text-strong);
}

.uconnect-pane__title {
  margin: 0;
}

/* ── Connect checklist (redesign, 2026-09-30) ──────────────────────────────
   Replaces the bead rail + one-pane-per-step layout (Stripe "local listener"
   pattern): three numbered rows, the mark on the left carries the status, and
   only the step in view opens its body. DS tokens, so it follows the white DS
   dialog it sits in. The old .uconnect-rail / -pane / -listen / -tick rules
   above are left in place on purpose: this markup ships in Pro and this sheet
   in Free, and they update separately. */
/* The steps sit on one grey panel (the dialog frame's own grey,
   --uc-surface-base). It bleeds 16px out each side with 16px padding in, so the
   step marks still line up under the dialog title, and it sits the same 25px
   from both card edges. Doubled class: the global `.uich-tw ol` reset (0,1,1)
   otherwise zeroes the padding and margin. */
.uconnect-steps.uconnect-steps {
  list-style: none;
  margin: 0 -16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--uc-surface-base);
  border-radius: var(--uc-radius-lg);
}

.uconnect-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* A thin line joins each mark to the next (Clerk / Browserbase), so the three
   rows read as one sequence. It runs from under this mark to 4px above the
   next one: mark is 22px, list gap is 18px. */
.uconnect-step:not(:last-child)::before {
  content: '';
  position: absolute;
  right: 10.5px;
  top: 26px;
  bottom: -14px;
  width: 1px;
  background: var(--uc-border-subtle);
}

/* The "$" in front of a command: says "terminal", never copied. */
.uconnect-sign {
  color: var(--uc-text-subtle);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

/* The "this finishes on its own" line, inside the step next to the command. */
.uconnect-waiting {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--uc-warning-fg);
}

.uconnect-spinner {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--uc-warning-soft);
  border-top-color: var(--uc-warning-fg);
  animation: uconnect-spin 0.8s linear infinite;
}

.uconnect-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--uc-border);
  /* White on the grey panel so an empty (todo) mark doesn't fade into it. */
  background: var(--uc-surface-raised);
  font-size: 11px;
  font-weight: 600;
  color: var(--uc-text-subtle);
}

.uconnect-step[data-state='active'] .uconnect-mark {
  background: var(--uc-text-strong);
  border-color: var(--uc-text-strong);
  color: var(--uc-text-inverse);
}

.uconnect-step[data-state='done'] .uconnect-mark {
  background: var(--uc-success-soft);
  border-color: transparent;
  color: var(--uc-success-fg);
}

.uconnect-step[data-state='problem'] .uconnect-mark {
  background: var(--uc-warning-soft);
  border-color: transparent;
  color: var(--uc-warning-fg);
}

.uconnect-step-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.uconnect-step-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
}

/* A finished step's head re-opens its instructions. `data-uc` keeps the
   composer resets off it, so the reset is done here. */
.uconnect-step-head.is-button {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 22px;
  cursor: pointer;
}

.uconnect-step-head.is-button:focus-visible,
.uconnect-textbtn:focus-visible {
  outline: 2px solid var(--uc-ring, currentColor);
  outline-offset: -2px;
  border-radius: 3px;
}

.uconnect-step-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--uc-text-strong);
}

.uconnect-step[data-state='todo'] .uconnect-step-title,
.uconnect-step[data-state='done'] .uconnect-step-title {
  font-weight: 500;
  color: var(--uc-text-muted);
}

.uconnect-step-head.is-button:hover .uconnect-step-title {
  color: var(--uc-text-strong);
}

.uconnect-step-aside {
  margin-right: auto;
  font-size: 11px;
  color: var(--uc-success-fg);
}

.uconnect-step-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: uconnect-fade 0.2s ease both;
}

.uconnect-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--uc-text-muted);
}

.uconnect-text strong {
  font-weight: 600;
  color: var(--uc-text);
}

.uconnect-num {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--uc-surface-control);
  font-size: 10px;
  font-weight: 600;
  color: var(--uc-text);
  vertical-align: 1px;
}

.uconnect-kbd {
  font-family: var(--uc-font-mono);
  --uich-ff: var(--uc-font-mono);
  font-size: 10.5px;
  padding: 0 4px;
  border: 1px solid var(--uc-border);
  border-radius: 4px;
  background: var(--uc-surface-raised);
  color: var(--uc-text);
  white-space: nowrap;
}

.uconnect-textbtn {
  all: unset;
  cursor: pointer;
  font-weight: 600;
  color: var(--uc-text-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.uconnect-textbtn:hover {
  color: var(--uc-text);
}

.uconnect-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.uconnect-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--uc-radius-pill);
  border: 1px solid var(--uc-border-subtle);
  background: var(--uc-surface-raised);
  font-size: 11px;
  color: var(--uc-text-subtle);
}

.uconnect-chip[data-on] {
  border-color: var(--uc-success-border);
  background: var(--uc-success-soft);
  color: var(--uc-success-fg);
}

/* Inside a step the command wraps instead of scrolling: the step column is
   ~250px wide and the one-line version cut the command off mid-flag
   ("--pas…"), hiding that there is a password at all. */
.uconnect-step .agent-cmd code {
  white-space: normal;
  overflow-wrap: anywhere;
  overflow-x: visible;
}

.uconnect-word {
  white-space: nowrap;
}

/* The permission rehearsal art, capped so it sits inside a step. */
.uconnect-art {
  max-width: 220px;
}

/* Footer status: one quiet line instead of the old black banner. */
.uconnect-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--uc-text-muted);
}

.uconnect-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--uc-text-subtle);
}

.uconnect-status[data-tone='wait'] .uconnect-dot {
  background: var(--uc-brand);
  animation: uconnect-pulse 1.4s ease-in-out infinite;
}

.uconnect-status[data-tone='ok'] {
  color: var(--uc-success-fg);
}

.uconnect-status[data-tone='ok'] .uconnect-dot {
  background: var(--uc-success-fg);
}

.uconnect-status[data-tone='warn'] .uconnect-dot {
  background: var(--uc-warning-fg);
}

@keyframes uconnect-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .uconnect-dot,
  .uconnect-spinner,
  .uconnect-step-body {
    animation: none !important;
  }
}

/* Compact connect checklist. Cards, Badges, Buttons and AgentThinking own
   their appearance; these rules only arrange them and format command text.
   The previous checklist rules stay for independently updated Pro builds. */
.uconnect-dialog-heading {
  display: flex;
  align-items: flex-start;
  gap: var(--uc-space-12);
}

.uconnect-dialog-heading > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.uconnect-dialog-heading > button {
  flex: none;
}

.uconnect-checklist.uconnect-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-12);
}

.uconnect-item {
  min-width: 0;
}

.uconnect-item-heading {
  display: flex;
  align-items: center;
  gap: var(--uc-space-8);
  min-width: 0;
}

.uconnect-item-title,
.uconnect-reopen.uconnect-reopen {
  flex: 1 1 auto;
  min-width: 0;
}

.uconnect-reopen.uconnect-reopen {
  justify-content: flex-start;
  white-space: normal;
  text-align: right;
}

.uconnect-item-heading > :last-child:not(.uconnect-item-title):not(.uconnect-reopen) {
  flex: none;
}

.uconnect-command-row.uconnect-command-row {
  flex-direction: row;
  align-items: center;
}

.uconnect-command-code {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--uc-font-mono);
  --uich-ff: var(--uc-font-mono);
  font-size: var(--uc-text-sm);
  line-height: var(--uc-leading-normal);
  white-space: normal;
  overflow-wrap: anywhere;
}

.uconnect-command-code .uconnect-word {
  white-space: normal;
}

.uconnect-command-row > button {
  flex: none;
}

.uconnect-tool-badges,
.uconnect-recovery-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--uc-space-6);
}

.uconnect-account-help {
  border-top: 1px solid var(--uc-border-subtle, #e5e7eb);
  padding-top: var(--uc-space-8);
}

.uconnect-account-help summary {
  color: var(--uc-text-muted, #6b7280);
  cursor: pointer;
  font-size: var(--uc-text-xs);
  font-weight: var(--uc-weight-medium);
}

.uconnect-account-help > .uconnect-text {
  margin-top: var(--uc-space-8);
}

@media (max-width: 480px) {
  .uconnect-command-row.uconnect-command-row {
    flex-direction: column;
    align-items: stretch;
  }

  .uconnect-command-row > button {
    align-self: flex-end;
  }
}

/* ── Globals value picker (globe on each property field) ─────────────────── */
.pr-gpick {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pr-gpick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--rp-border, rgba(128, 128, 128, .30));
  border-radius: 5px;
  background: transparent;
  color: var(--text-dim, #9aa2b1);
  cursor: pointer;
}

.pr-gpick-btn:hover,
.pr-gpick.is-open .pr-gpick-btn {
  color: var(--text-hi);
  border-color: rgba(var(--accent-rgb), .55);
}

.pr-gpick-pop {
  position: absolute;
  left: 0;
  top: calc(100% + 5px);
  z-index: 2147483646;
  min-width: 220px;
  max-width: 300px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--rp-surface-overlay, #1e1e2e);
  border: 1px solid var(--rp-border, rgba(255, 255, 255, .14));
  border-radius: 9px;
  padding: 6px;
  box-shadow: var(--rp-shadow-4, 0 16px 40px rgba(0, 0, 0, .5));
}

/* Globe picker sits inside the input row, on the right of the field's input. */
.prop-input-stack .pf-input-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.prop-input-stack .pf-input-main {
  flex: 1 1 auto;
  min-width: 0;
}

.prop-input-stack .pf-input-row>.pr-gpick {
  flex: 0 0 auto;
}

/* ── CSS-editor "/" globals picker (grouped + collapsible) ──────────────── */
.pr-cm-globals {
  position: absolute;
  z-index: 2147483647;
  width: 280px;
  max-width: 90vw;
  background: var(--rp-surface-overlay, #1e1e2e);
  border: 1px solid var(--rp-border, rgba(255, 255, 255, .14));
  border-radius: 9px;
  box-shadow: var(--rp-shadow-4, 0 16px 44px rgba(0, 0, 0, .55));
  padding: 6px;
  box-sizing: border-box;
}

.pr-cm-globals-search {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 6px;
  background: var(--rp-surface-control, rgba(255, 255, 255, .06));
  border: 1px solid var(--rp-border, rgba(255, 255, 255, .14));
  color: var(--rp-text-strong, #e8e8f0);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  outline: none;
}

.pr-cm-globals-search:focus {
  border-color: rgba(var(--accent-rgb), .55);
}

.pr-cm-globals-list {
  max-height: 300px;
  overflow-y: auto;
}

.pr-cm-globals-group {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  text-align: right;
  border: 0;
  background: transparent;
  color: var(--rp-text, #cbd0dd);
  cursor: pointer;
  padding: 6px 6px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pr-cm-globals-group:hover {
  background: var(--rp-hover, rgba(255, 255, 255, .05));
}

.pr-cm-caret {
  width: 10px;
  opacity: .7;
}

.pr-cm-gname {
  flex: 1 1 auto;
}

.pr-cm-count {
  opacity: .5;
  font-weight: 600;
}

.pr-cm-globals-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: right;
  border: 0;
  background: transparent;
  color: var(--rp-text-strong, #e8e8f0);
  cursor: pointer;
  padding: 6px 22px 6px 8px;
  border-radius: 6px;
}

.pr-cm-globals-item:hover {
  background: rgba(var(--accent-rgb), .16);
}

.pr-cm-sw {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, .2);
}

.pr-cm-sw-txt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: var(--text-hi);
  background: rgba(var(--accent-rgb), .12);
}

.pr-cm-name {
  flex: 1 1 auto;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pr-cm-var {
  flex: 0 0 auto;
  font-size: 10.5px;
  opacity: .5;
  font-family: ui-monospace, Menlo, monospace;
  --uich-ff: ui-monospace, Menlo, monospace;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pr-cm-globals-empty {
  padding: 10px;
  text-align: center;
  opacity: .5;
  font-size: 12px;
}

/* ── Annotate (Draw) overlay ──────────────────────────────────────────────── */
.annotate-root {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  pointer-events: none;
}

.annotate-svg {
  position: fixed;
  pointer-events: auto;
  cursor: crosshair;
  touch-action: none;
  z-index: 2147483601;
}

.annotate-bar {
  position: fixed;
  /* Centre over the CANVAS, not the viewport. A docked-open panel reserves
     `--uich-dock-w`, so a plain `left: 50%` put the bar half the panel's width
     right of where the drawing actually is. Same correction the canvas toolbar
     pill already makes (see .canvas-toolbar-wrap); falls back to 0 when the
     panel is closed, and eases with the drawer so the two stay in step. */
  right: calc(50% - var(--uich-dock-w, 0px) / 2);
  /* Lifted clear of the scroll timeline, which docks along the bottom edge at
     exactly this spot. `--uich-mtl-h` is the dock's live height (0 when it is
     closed), published on <body> by MotionTimelinePanel — the vertical twin of
     `--uich-dock-w` above. */
  bottom: calc(24px + var(--uich-mtl-h, 0px));
  transform: translateX(50%);
  transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1), bottom 0.2s ease;
  z-index: 2147483602;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 16px 40px rgba(var(--shadow-rgb), calc(0.28 * var(--shadow-a)));
  backdrop-filter: blur(8px);
  color: hsl(var(--popover-foreground));
}

/* The bar is built from DS components (Badge · Input · IconButton · Button), so
   they carry their own look + global tokens. These rules only place them in the
   bar — no re-styling of borders/fills/type. */

/* Leading "Draw" mode chip + the "N marks" count chip pick up the icon inline. */
.annotate-mode,
.annotate-count { flex: 0 0 auto; }
.annotate-mode svg { margin-left: 4px; }

/* DS Input sizes itself; the bar only sets how wide the note field grows. */
.annotate-note {
  width: 300px;
  max-width: 40vw;
  flex: 1 1 auto;
  min-width: 180px;
}

/* Undo · redo grouped between hairline dividers (Option 1). */
.annotate-tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  border-right: 1px solid hsl(var(--border));
  border-left: 1px solid hsl(var(--border));
}

.annotate-err {
  color: var(--uc-danger, #e5484d);
  font-size: var(--uc-text-xs, 12px);
  white-space: nowrap;
}

.annotate-cancel,
.annotate-send { flex: 0 0 auto; }

/* ═══════════════════════════════════════════════════════════════════════
   shadcn token bridge (redesign, 2026-07)
   Every legacy design token now resolves to the shadcn/ui theme variables
   defined in shadcn.css, so the whole panel renders in the shadcn palette
   while components are migrated file-by-file. Light/dark flips via the
   `dark` class on the host, the [data-theme] blocks above are superseded
   (these selectors are ≥ specificity and later in source order).
   Delete this block once the legacy classes are fully removed.
   ═══════════════════════════════════════════════════════════════════════ */
.uich-tw,
.uich-composer-host.uich-tw,
.uich-tw .panel[data-theme] {
  /* Pro-upsell surfaces follow the host skin's accent — near-black in a light
     skin, near-white in a dark one, the builder's own colour where a builder
     skin is active. Declared HERE, not at :root: a custom property substitutes
     at its declaration scope, and --primary only exists from .uich-tw down, so
     the :root copies resolve to nothing (they carry neutral fallbacks). */
  --uich-pro-grad: hsl(var(--primary));
  --uich-pro-tint: hsl(var(--primary) / 0.10);
  --uich-brand: hsl(var(--primary));
  --bg-canvas: hsl(var(--background));
  --bg-canvas-ink: hsl(var(--foreground));
  --panel-bg: hsl(var(--background));
  /* NOTE: -2 and -3 deliberately equal --panel-bg. They read as "raised"
     surfaces by name, but the composer's surfaces are flat here and dozens of
     elements paint themselves with them, so giving them a real grey (--muted /
     --accent) washes the whole panel — chat, side panel, composer, pills — in
     grey. Tried that; it was wrong.
     -3 previously held `hsl(hsl(var(--primary)))`, a doubled hsl() that is
     invalid CSS and therefore resolved to nothing; this keeps the same
     appearance with valid syntax.
     Anything that must stand out against the panel (input borders and fills)
     uses explicit neutrals in composer-dock.css rather than these tokens. */
  --panel-bg-2: hsl(var(--background));
  --panel-bg-3: hsl(var(--background));
  --panel-bg-4: hsl(var(--secondary));
  --panel-line: hsl(var(--border));
  --panel-line-2: hsl(var(--input));
  --text-hi: hsl(var(--foreground));
  --uich-text: hsl(var(--foreground));
  --text-mid: hsl(var(--muted-foreground));
  --text-dim: hsl(var(--muted-foreground));
  --accent-2: hsl(var(--primary));
  --accent-bg: hsl(var(--primary) / 0.1);
  --brand-green: hsl(var(--primary));
  --uich-danger: hsl(var(--destructive));
  --ok: hsl(142.1 70.6% 45.3%);
  --warn: hsl(38 92% 50%);
  --radius-sm: calc(var(--radius) - 4px);
}

/* ============================================================================
   Gutenberg skin, native-WP polish pass (audit fixes).
   Legacy composer.css rules load after the Tailwind utilities and win at equal
   specificity, so several controls kept non-WP radii / fonts / shadows / accents
   under this skin. These attribute-scoped overrides reset them to the block
   editor's look: 2px radius, #949494 (--input) outlines, #3858e9 (--primary)
   focus, subtle popover shadows, and the system font. Gated to gutenberg, so
   Elementor/Bricks are untouched; shadcn tokens keep light + dark correct.
   ============================================================================ */

/* 1, prompt input: WP text-field frame + accent focus ring (most prominent control) */

/* 7, empty-state logo mark: WP square-ish tile, not a 12px rounded card */

/* 7, empty-state logo mark: WP square-ish tile, not a 12px rounded card */

/* ── Pro gating (badge / lock card / upsell modal) ─────────────────────────
   Shared look for every Free→Pro surface. See composer-pro.jsx. The AI gradient
   (indigo→purple→pink) marks anything Pro so it reads consistently. */
.pro-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .5px;
  line-height: 1;
  padding: 2px 6px;
  margin-right: 6px;
  border-radius: 999px;
  color: hsl(var(--primary-foreground));
  background: var(--uich-pro-grad);
  text-transform: uppercase;
  vertical-align: middle;
}
.pro-badge--sm { font-size: 8px; padding: 1px 5px; margin-right: 5px; }

/* Card that replaces a locked feature body (e.g. CSS/JS editor in Free). */
.pro-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  min-height: 160px;
  padding: 28px 24px;
  border: 1px dashed var(--panel-bg-4);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 100% at 50% 0%, var(--uich-pro-tint), transparent 60%),
    var(--panel-bg-2);
  color: var(--text-mid);
}
.pro-lock__ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: hsl(var(--primary-foreground));
  background: var(--uich-pro-grad);
}
.pro-lock__title {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-hi);
}
.pro-lock__msg {
  margin: 0;
  max-width: 280px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-mid);
}
/* Rich upsell: header (icon/title/subtitle) stays centred; the benefit list is a
   left-aligned, grouped block — the Grok / Character AI paywall structure. */
.pro-lock--rich { gap: 6px; padding: 26px 22px 22px; }
.pro-lock__sub {
  margin: 0 0 4px;
  max-width: 300px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-mid);
}
.pro-lock__feats {
  list-style: none;
  width: 100%;
  box-sizing: border-box;
  /* !important: this is a <ul>, and the composer renders inside the host theme,
     whose `ul { padding / margin }` (and WP core / Tailwind preflight resets)
     otherwise flatten the box's inner spacing. Same defensive intent as the
     theme button-paint guard. */
  margin: 4px 0 2px !important;
  padding: 16px !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: right;
  border: 1px solid var(--panel-line-2);
  border-radius: var(--radius);
  background: var(--rp-surface-control, rgba(255, 255, 255, 0.02));
}
.pro-lock__feats > .pro-lock__feat { margin: 0 !important; }
.pro-lock__feat { display: flex; align-items: flex-start; gap: 10px; }
.pro-lock__feat-ic {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius);
  color: hsl(var(--primary));
  background: var(--uich-pro-tint);
  box-shadow: inset 0 0 0 1px hsl(var(--primary) / 0.22);
}
/* The glyph is drawn with stroke/fill: currentColor, so pin BOTH to the brand
   colour, defending against any host-theme `svg` paint reaching the panel. */
.pro-lock__feat-ic svg { color: hsl(var(--primary)); stroke: currentColor; }
.pro-lock__feat-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pro-lock__feat-t { font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--text-hi); }
.pro-lock__feat-d { font-size: 11.5px; line-height: 1.45; color: var(--text-mid); }
.pro-lock--rich .pro-lock__cta { width: 100%; justify-content: center; margin-top: 10px; }
.pro-lock__cta,
.pro-modal__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  /* !important: this is an <a>, and the composer renders inside the host theme,
     whose `a { color }` / `a:hover` rules otherwise repaint the label a muted
     link colour (looked washed-out on the orange fill). Same defensive intent as
     the theme button-paint guard below. */
  color: hsl(var(--primary-foreground)) !important;
  text-decoration: none !important;
  background: var(--uich-pro-grad);
  transition: filter .15s ease, transform .15s ease;
}
.pro-lock__cta:hover,
.pro-lock__cta:focus,
.pro-modal__cta:hover,
.pro-modal__cta:focus { color: hsl(var(--primary-foreground)) !important; text-decoration: none !important; filter: brightness(1.08); transform: translateY(-1px); }

/* Global upsell modal (fired when a Free limit is hit). */
.pro-modal__overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rp-scrim, rgba(0, 0, 0, 0.55));
  backdrop-filter: blur(2px);
}
.pro-modal {
  position: relative;
  width: min(360px, calc(100vw - 40px));
  padding: 26px 26px 24px;
  text-align: center;
  border: 1px solid var(--panel-bg-4);
  border-radius: 12px;
  background: var(--panel-bg-2);
  box-shadow: var(--rp-shadow-4, 0 20px 60px rgba(0, 0, 0, 0.4));
}
.pro-modal__x {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
}
.pro-modal__x:hover { background: var(--panel-bg-3); color: var(--text-hi); }
.pro-modal__ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 2px auto 12px;
  border-radius: 999px;
  color: hsl(var(--primary-foreground));
  background: var(--uich-pro-grad);
}
.pro-modal__title { margin: 0 0 8px; font-size: 16px; font-weight: 800; color: var(--text-hi); }
.pro-modal__msg { margin: 0 0 18px; font-size: 12.5px; line-height: 1.55; color: var(--text-mid); }

/* ── Theme button-paint guard ────────────────────────────────────────────────
   The composer renders inside the previewed PAGE, the live page on the front
   end, the preview iframe in the editor, so the active theme's CSS reaches it.
   Themes routinely paint EVERY button, e.g.

     [type=button]:focus, [type=button]:hover, button:focus, button:hover {
       background-color: #c36; color: #fff; text-decoration: none;
     }

   which turned the panel's tabs and icon buttons the site's accent colour on
   hover and focus.

   Neutralised only for buttons that do not declare their own background (or
   text colour). That `:not([class*="bg-"])` guard is deliberate: it excludes
   exactly the buttons the composer styles itself, so `hover:bg-accent` and
   friends keep working instead of being flattened along with the theme's rule.
   Specificity lands at (0,3,0), above the theme's (0,1,1), and these rules are
   unlayered so they also outrank Tailwind's layered utilities, which is why the
   guard rather than the weight has to do the excluding.

   DS components (`[data-uc]`, the right-side panel) are excluded too: they
   style themselves through CSS-module classes, not `bg-`/`text-` utilities,
   so this reset was flattening them on hover/focus — a selected segment lost
   its fill, the active tab dimmed. Their own state rules (0,2,0) already
   out-rank a theme's `button:hover` (0,1,1). */
.uich-tw :where(button, [type="button"], [type="submit"], [type="reset"]):not([class*="bg-"]):not(:where([data-uc])):is(:hover, :focus, :focus-visible) {
  background-color: transparent;
  background-image: none;
  text-decoration: none;
}
.uich-tw :where(button, [type="button"], [type="submit"], [type="reset"]):not([class*="text-"]):not(:where([data-uc])):is(:hover, :focus, :focus-visible) {
  color: inherit;
}
/* Inputs are deliberately NOT reset the same way. Their focus treatment is a
   box-shadow ring the composer draws itself (focus:ring-*, and the canvas
   toolbar's purple ring); an unlayered `box-shadow: none` here ties on
   specificity and, being unlayered, wins, so it would erase the composer's own
   focus indicator, not the theme's. If a theme is ever found painting inputs,
   guard it the way the button rules above do rather than blanket-resetting. */

/* ══════════════════════════════════════════════════════════════════════════
   MINIMAL SKIN — editor panel (Framer-inspired · cosmetic layer)      [ui-ux]
   ---------------------------------------------------------------------------
   Chrome/typography only. NO colour-token VALUES change — every colour below
   references an existing token (--panel-bg-*, --panel-line*, --ring, --text-*).
   Applies to EVERY editor dock/surface (right dock, bottom sheet, Gutenberg /
   Bricks inspector) by targeting the composer's own field classes (.prop-cell,
   .prop-input-stack, .simple-content-section) instead of a single dock. Chrome
   only — borderless soft-fill pills, 8px radius, one comfortable height, sans
   values, sentence-case labels. Label-left stays native to the right dock.
   Delete this block to revert.
   ────────────────────────────────────────────────────────────────────────── */

/* 1 · Borderless soft-fill inputs. The --panel-bg-2 fill already exists; we
       only drop the RESTING 1px border and show a ring on focus instead. */
.prop-cell .input,
.prop-cell .select,
.prop-cell .textarea,
.prop-input-stack .input,
.prop-input-stack .select,
.prop-input-stack .textarea {
  border-color: transparent;
}

.prop-cell .input:hover,
.prop-cell .select:hover,
.prop-input-stack .input:hover,
.prop-input-stack .select:hover {
  border-color: transparent;
  background-color: var(--panel-bg-3);
}

.prop-cell .input:focus,
.prop-cell .select:focus,
.prop-cell .textarea:focus,
.prop-input-stack .input:focus,
.prop-input-stack .select:focus,
.prop-input-stack .textarea:focus {
  border-color: hsl(var(--ring));
  box-shadow: inset 0 0 0 2px var(--uc-ring, hsl(var(--ring)));
  background-color: var(--panel-bg-2);
}

/* 3 · Subsection titles: sentence-case sans, not UPPERCASE mono. */
.subsec-title,
.subsection-title {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

/* 4 · Segment track borderless, to match the borderless inputs. The active
       chip (.seg button.on) is unchanged — nothing removed, nothing added. */
.prop-cell .seg,
.prop-input-stack .seg {
  border-color: transparent;
}

/* NOTE: the "Add property" ghost + is a Tailwind-classed button, restyled in
   composer-fields.jsx / composer-inspector.jsx (ADD_TRIGGER_CLS). */

/* 5 · Content section (the prose TEXT field). The textarea is a Tailwind-classed
       control (TEXTAREA_CLS, shared with the mono code editors, so scoped here
       rather than at the constant). Match the borderless soft-fill inputs, and
       drop the uppercase on its micro-label ("Text", set sentence-case in JSX).
       The textarea rules here skip DS Textareas (`data-uc`), which carry their
       own inset border, fill, radius and focus ring. */
.simple-content-section textarea:not(:where([data-uc])) {
  border-color: transparent;
  background-color: var(--panel-bg-2);
  box-shadow: none;
}

.simple-content-section textarea:not(:where([data-uc])):hover {
  background-color: var(--panel-bg-3);
}

.simple-content-section textarea:not(:where([data-uc])):focus,
.simple-content-section textarea:not(:where([data-uc])):focus-visible {
  border-color: hsl(var(--ring));
  box-shadow: inset 0 0 0 2px var(--uc-ring, hsl(var(--ring)));
  background-color: var(--panel-bg-2);
  outline: none;
}

.simple-content-section .text-row-head span {
  text-transform: none;
  letter-spacing: normal;
}

/* 6 · Framer input feel: softer 8px pills, one comfortable height, a touch more
       padding, crisper value text, and a soft focus halo. Controls only. */
.prop-cell .input,
.prop-cell .select,
.prop-cell .seg,
.prop-input-stack .input,
.prop-input-stack .select,
.prop-input-stack .seg,
.simple-content-section textarea:not(:where([data-uc])) {
  border-radius: 8px;
}

/* one comfortable height, matching the dock's 36px .linput */
.prop-cell .input,
.prop-cell .select,
.prop-input-stack .input,
.prop-input-stack .select {
  height: 36px;
}

/* a touch more horizontal padding for the pill feel */
.prop-cell .input,
.prop-cell .select,
.prop-input-stack .input,
.prop-input-stack .select {
  padding-right: 11px;
  padding-left: 11px;
}

/* soft Framer-style focus halo instead of a hard 1px ring */
.prop-cell .input:focus,
.prop-cell .select:focus,
.prop-cell .textarea:focus,
.prop-input-stack .input:focus,
.prop-input-stack .select:focus,
.prop-input-stack .textarea:focus,
.simple-content-section textarea:not(:where([data-uc])):focus,
.simple-content-section textarea:not(:where([data-uc])):focus-visible {
  border-color: hsl(var(--ring));
  box-shadow: inset 0 0 0 2px var(--uc-ring, hsl(var(--ring)));
  background-color: var(--panel-bg-2);
  outline: none;
}

/* 7 · Shadcn-framed controls. The Layout/Typography/etc. dropdowns render as a
       custom combobox (SelectCustomInput) and the mono/attribute boxes use
       Tailwind `border border-input bg-transparent shadow-sm` — NOT the composer
       .input/.select classes — so parts 1–6 never reached them. Bring that shared
       frame to the same borderless 8px soft-fill pill. */
.prop-cell .border-input,
.prop-input-stack .border-input {
  border-color: transparent;
  background-color: var(--panel-bg-2);
  box-shadow: none;
  border-radius: 8px;
  min-height: 36px;
}

.prop-cell .border-input:hover,
.prop-input-stack .border-input:hover {
  background-color: var(--panel-bg-3);
}

.prop-cell .border-input:focus-within,
.prop-input-stack .border-input:focus-within {
  background-color: var(--panel-bg-2);
  box-shadow: inset 0 0 0 2px var(--uc-ring, hsl(var(--ring)));
}

/* 8 · Segmented icon/label toggles (seg-align: text-align etc.) render as a
       Tailwind `bg-muted p-0.5` button group — a third control family, distinct
       from .input/.select and .border-input. `:has(button)` keeps this to real
       toggles (not bare bg-muted chips). Match the Framer pill: 8px soft-fill
       track, comfortable height, raised lighter active chip (--panel-bg-4, like
       the composer's own .seg active). */
.field.pf .bg-muted:has(button) {
  border-radius: 8px;
  background-color: var(--panel-bg-2);
  min-height: 36px;
  padding: 3px;
}

.field.pf .bg-muted:has(button) button {
  height: 30px;
  border-radius: 6px;
}

.field.pf .bg-muted:has(button) button.bg-background {
  background-color: var(--panel-bg-4);
  box-shadow: 0 1px 0 rgba(var(--shadow-rgb), calc(0.2 * var(--shadow-a)));
}

/* 9 · NO resting stroke — specificity fix. The frame border compiles as a
       Tailwind utility `.uich-tw .border-input` (0,2,0), which TIED parts 1/7
       above so the stroke survived on source order. Re-assert borderless at
       (0,3,x) with the `.uich-tw` prefix, and cover .swatch-input (the colour
       field) which the earlier parts missed. Border/ring shows on FOCUS only. */
.uich-tw .prop-cell .select,
.uich-tw .prop-cell .input,
.uich-tw .prop-cell .textarea,
.uich-tw .prop-cell .border-input,
.uich-tw .prop-cell .swatch-input,
.uich-tw .prop-input-stack .select,
.uich-tw .prop-input-stack .input,
.uich-tw .prop-input-stack .textarea,
.uich-tw .prop-input-stack .border-input,
.uich-tw .prop-input-stack .swatch-input {
  border-color: transparent;
  box-shadow: none;
}

.uich-tw .prop-cell .select:focus,
.uich-tw .prop-cell .input:focus,
.uich-tw .prop-cell .textarea:focus,
.uich-tw .prop-cell .border-input:focus-within,
.uich-tw .prop-cell .swatch-input:focus-within,
.uich-tw .prop-input-stack .select:focus,
.uich-tw .prop-input-stack .input:focus,
.uich-tw .prop-input-stack .textarea:focus,
.uich-tw .prop-input-stack .border-input:focus-within,
.uich-tw .prop-input-stack .swatch-input:focus-within {
  border-color: hsl(var(--ring));
  box-shadow: inset 0 0 0 2px var(--uc-ring, hsl(var(--ring)));
}
/* ───────────────────────── end MINIMAL SKIN ─────────────────────────────── */

/* Length-input −/+ steppers. Hidden by default so the bottom dock and the
   Gutenberg inspector keep their current field width; the right dock opts in
   (see composer-dock.css), where the Framer-style layout has room for them. */
.lin-step {
  display: none;
}

/* Outside the right dock the stepper stays hidden, so the length field keeps
   its previous width; the row wrapper must not change that layout. */
.lin-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.lin-row > * {
  min-width: 0;
}

/* ---- Sliding tab underline (TabsList variant="line") ----------------------
   One shared bar drawn by the list, positioned from the custom properties the
   TabsList layout effect publishes for the active trigger. Animating transform
   + width makes it travel between tabs; a per-trigger pseudo-element could only
   cross-fade, which reads as two bars blinking. Sits at bottom:-1px so it lands
   ON the rule below it rather than stacking a second line above it. */
.uich-tabs-line::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: 0;
  height: 2px;
  width: var(--tab-bar-w, 0px);
  transform: translateX(var(--tab-bar-x, 0px));
  opacity: var(--tab-bar-o, 0);
  border-radius: 999px;
  background: hsl(var(--foreground));
  pointer-events: none;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
  .uich-tabs-line::after { transition: none; }
}

/* ---- AI turns: no avatar, full width ---------------------------------------
   AI replies and step cards carry no speaker mark (removed 2026-09-29): the
   "Composer" name row says who is speaking. Block layout so the reply takes the
   panel's full width instead of sitting in a flex row beside an avatar column. */
.msg2.ai,
.msg2.ai-process {
  position: relative;
  display: block;
}

/* Follow-up suggestion chips sit against the right edge, under the reply they
   belong to. The old `margin-left: 36px` indented them past the avatar column
   that no longer exists, which left them floating in the middle of the panel. */
.chat-followups {
  justify-content: flex-end;
  align-items: flex-end;
  margin-right: 0;
}

/* ---- Sliding segmented pill (.seg-slide) ---------------------------------
   One chip drawn by the wrapper, positioned from the custom properties
   useSlidingSeg publishes for the active item, so the chip travels between
   items instead of one vanishing as the next appears. Items sit above it.
   Sized from the active item, so a control whose items differ in width (the
   Code scope tabs: one labelled item, the rest icon-only) animates its width
   as well as its position. */
.seg-slide {
  position: relative;
}

.seg-slide > * {
  position: relative;
  z-index: 1;
}

.seg-slide::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 0;
  width: var(--seg-w, 0px);
  height: var(--seg-h, 0px);
  transform: translate(var(--seg-x, 0px), 50%);
  opacity: var(--seg-o, 0);
  /* The segmented colour system's own tokens, not hsl(var(--background)) and a
     hand-rolled shadow. Every track, chip and hover wash in the panel is drawn
     from --seg-*, and this pill IS the chip now, so it has to come from the same
     place or it drifts from them the moment a skin changes one. --seg-radius-inner
     is also the concentric-radius value the segments themselves use, so the pill
     and the item it sits under share a corner. */
  border-radius: var(--seg-radius-inner, calc(var(--radius) - 2px));
  background: var(--seg-thumb, hsl(var(--background)));
  box-shadow: inset 0 0 0 1px var(--seg-thumb-line, transparent),
              var(--seg-thumb-shadow, 0 1px 2px rgba(0, 0, 0, 0.18));
  pointer-events: none;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
  .seg-slide::before { transition: none; }
}

/* ---- Chat history: overlay drawer, above the conversation -----------------
   .chat2-wrap is a `220px 1fr` grid, so opening the history left the chat
   ~200px in a 420px panel. Its bubbles overflow that column and — being later
   in the DOM — paint straight over the sidebar, so the history appeared to sit
   BEHIND the conversation.

   The drawer now floats over the chat instead of splitting the row: the
   conversation keeps its full width, and an opened drawer sits on top where it
   belongs. Only rendered while open (composer-chat.jsx renders it behind
   `sideOpen &&`), so there is nothing to hide when closed. */
.chat2-wrap {
  position: relative;
}

.chat2-wrap.side-open {
  grid-template-columns: 1fr;
}

.chat2-wrap.side-open > .chat-side {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 6;
  width: 240px;
  max-width: 84%;
  overflow-y: auto;
  /* Must be opaque: --panel-bg-2 resolves to --panel-bg, so a token-only
     surface let the conversation show through. Panel colour plus a grey scrim
     lifts the drawer in both skins. */
  background-color: var(--panel-bg);
  background-image: linear-gradient(var(--rp-surface-raised, rgba(128, 128, 128, 0.07)), var(--rp-surface-raised, rgba(128, 128, 128, 0.07)));
  box-shadow: -8px 0 24px -10px rgba(var(--shadow-rgb), calc(0.55 * var(--shadow-a)));
}

/* ── Canvas inline text toolbar (.ctb) ───────────────────────────────────────
   Floating light pill that appears above a text/heading element being edited on
   the canvas. It overlays the user's page (not the dark panel), so it carries its
   own light surface + neutral tokens rather than the panel skin's. The AI action
   is the one accent; character formatting uses a neutral pressed state so the bar
   stays calm. Built as a visual component first — see composer-text-toolbar.jsx. */
.ctb-root {
  position: absolute;
  z-index: 40;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --uich-ff: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ctb {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  background: #ffffff;
  border: 0.5px solid rgba(15, 15, 21, 0.10);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 15, 21, 0.14), 0 1px 2px rgba(15, 15, 21, 0.06);
}

.ctb-slot {
  position: relative;
  display: inline-flex;
}

.ctb-btn {
  height: 32px;
  min-width: 32px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #1a1b20;
  font-family: inherit;
  --uich-ff: inherit;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

/* A host action that needs selected text, on a bare caret (setCanvasTextActions). */
.ctb-btn:disabled { opacity: 0.4; cursor: default; }
.ctb-btn:hover,
.ctb-btn.is-open {
  background: #f1f1f4;
}

/* Neutral pressed state for character formatting (Bold/Italic/…). */
.ctb-btn.on {
  background: #e9e9ee;
  color: #0f0f15;
}

.ctb-caret {
  color: #9a9ca6;
}

/* The one accent: Ask AI. */
.ctb-btn.ctb-ai {
  color: #d8541f;
  background: rgba(232, 97, 60, 0.10);
}

.ctb-btn.ctb-ai:hover,
.ctb-btn.ctb-ai.is-open {
  background: rgba(232, 97, 60, 0.16);
}

.ctb-grip {
  display: inline-flex;
  align-items: center;
  padding: 0 2px;
  color: #b7b8c0;
  cursor: grab;
}

.ctb-grip:active {
  cursor: grabbing;
}

.ctb-block {
  font-size: 13px;
  font-weight: 500;
  padding: 0 8px;
  white-space: nowrap;
}

.ctb-block svg {
  color: #9a9ca6;
}

.ctb-div {
  width: 0.5px;
  align-self: stretch;
  background: rgba(15, 15, 21, 0.10);
  margin: 3px 4px;
}

.ctb-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px #ffffff, 0 0 0 2.5px rgba(15, 15, 21, 0.18);
}

/* Text-label button (the "Aa" letter-case control). */
.ctb-btn-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ── Menus ──────────────────────────────────────────────────────────────── */
.ctb-menu {
  position: absolute;
  top: calc(100% + 7px);
  background: #ffffff;
  border: 0.5px solid rgba(15, 15, 21, 0.10);
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 12px 32px rgba(15, 15, 21, 0.16), 0 1px 2px rgba(15, 15, 21, 0.06);
}

.ctb-mlabel {
  font-size: 11px;
  color: #9a9ca6;
  padding: 6px 9px 4px;
}

.ctb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  color: #1a1b20;
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 13px;
  text-align: right;
  cursor: pointer;
  white-space: nowrap;
}

.ctb-item:hover {
  background: #f4f4f6;
}

.ctb-item.on {
  color: #0f0f15;
  font-weight: 500;
}

.ctb-item-ico {
  display: inline-flex;
  width: 18px;
  justify-content: center;
  flex: 0 0 auto;
  color: #6a6c76;
}

.ctb-item-ai {
  color: #d8541f;
}

.ctb-item-chev {
  margin-right: auto;
  color: #b7b8c0;
}

.ctb-item.on .ctb-item-chev {
  color: #d8541f;
}

.ctb-item-kbd {
  margin-right: auto;
  font-size: 11px;
  color: #b7b8c0;
  font-family: 'JetBrains Mono', monospace;
  --uich-ff: 'JetBrains Mono', monospace;
}

.ctb-sep {
  height: 0.5px;
  background: rgba(15, 15, 21, 0.10);
  margin: 5px 6px;
}

/* Embedded mode: the toolbar is injected into the editor's own selection toolbar
   (which supplies the pill, grip and Ask AI), so drop our own pill chrome and let
   the controls sit bare in that shell. */
.ctb.ctb-embedded {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.ctb-oncanvas {
  display: inline-flex;
  align-items: center;
}

/* ── Add-library floating panel ───────────────────────────────────────────────
   Not a modal. It was a centred dialog with a dimming scrim, which for a
   six-field form read as far too much ceremony — and it covered the canvas it
   is meant to sit beside. It is a small panel anchored just LEFT of the dock
   instead, bottom-aligned to its trigger so it grows upward over empty canvas.

   Still portalled out of the panel: the original problem was that
   `.dep-add-popover` was position:absolute with max-width:100%, so in the narrow
   dock it shrank to the footer's width. Out here it keeps its own size.

   Every value is a shared token — same palette, radius and face as the panel,
   the dock and the on-canvas toolbar. */
.uc-pop-dark.dep-add-float {
  padding: var(--uc-space-4);
  border: 0;
  border-radius: var(--uc-radius-xl);
  background: var(--uc-surface-base);
  box-shadow: var(--uc-shadow-5);
}

.dep-add-float-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--uc-border);
  border-radius: var(--uc-radius-xl);
  background: var(--uc-surface-raised);
  overflow: hidden;
}

.dep-add-float-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 12px 8px 8px;
  border-bottom: 1px solid var(--panel-line);
}
.dep-add-float-head strong { font-size: 12.5px; font-weight: 650; color: var(--text-hi); }
/* ── The chat never scrolls sideways ──────────────────────────────────────────
   Content that does not fit wraps onto the next line instead.

   The trigger was tool names in the process list — `mcp__playwright__browser_
   take_screenshot` is ONE unbreakable token, far wider than a 330px dock, so it
   pushed a horizontal scrollbar across the whole transcript.

   `overflow-wrap: anywhere` and not `break-word`: break-word refuses to split a
   long word when that word is the only thing on its line, which is precisely
   this case. `anywhere` also lets the container shrink below the word's width,
   which is what stops the scrollbar appearing at all. */
.chat2-body .process-steps,
.chat2-body .process-step,
.chat2-body .msg2-text,
.chat2-body .msg2 { min-width: 0; }

.process-step-name,
.process-title,
.msg2-text,
.msg2-text p,
.msg2-text li,
.msg2-text code,
.msg2-text a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Code blocks wrap as well. In a dock this narrow, a scrolling <pre> means
   dragging a 3px bar to read one line — wrapped code is taller but readable. */
.msg2-text pre {
  overflow-x: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Attached image thumbnails move to the next row rather than off the side. */
.composer-images {
  flex-wrap: wrap;
  overflow-x: visible;
}

/* Backstop: whatever else lands in the transcript, it cannot introduce a
   sideways scrollbar. The transcript already sets overflow-x: hidden on itself;
   this stops a CHILD from growing one of its own. */
.chat2-body > *,
.chat2-body .process-steps { overflow-x: clip; }


/* Scroll timeline
   ==============
   The live-page timeline uses the same fixed UiChemy dark chrome as the
   inspector. Map its older local names to DS semantic tokens in one place;
   the timeline geometry can keep its existing rules while Elementor and
   Gutenberg skins no longer recolor it. */
/* ───────────────────────────────────────────────────────────────────────────
   Scroll timeline — a bottom-docked strip, shaped after Figma's motion timeline.

   Docked rather than floating: a timeline is read WHILE scrolling the page, and
   a floating box has to be dragged out of the way of the very thing it measures.
   Pinned to the bottom edge it behaves like the page's own transport — always in
   the same place, never over the content being watched.

   Greyscale on purpose. Every bar here is the same kind of object, so colour
   would carry no information; what distinguishes a bar is where it starts, how
   long it runs, and whether the page is inside it right now — position, width
   and contrast. The playhead is the strongest ink on the panel rather than a
   second hue, so the panel never competes with the design being previewed.

   Two custom properties drive the geometry:
     --uich-n  the name column's width, shared by the strip, the grid and the rows
     --uich-z  the ruler's zoom, set inline from React
   ─────────────────────────────────────────────────────────────────────────── */

.uich-mtl,
.uich-mtl-launch {
  --panel-bg: var(--uc-surface-base);
  --panel-bg-2: var(--uc-surface-raised);
  --panel-bg-3: var(--uc-surface-overlay);
  --panel-bg-4: color-mix(in srgb, var(--uc-surface-raised) 70%, var(--uc-border-strong));
  --panel-line: var(--uc-border-subtle);
  --panel-line-2: var(--uc-border);
  --text-hi: var(--uc-text-strong);
  --uich-text: var(--uc-text);
  --text-mid: var(--uc-text);
  --text-dim: var(--uc-text-muted);
  --text-lo: var(--uc-text-muted);
  --uich-danger: var(--uc-danger);
  --radius: var(--uc-radius-md);
  --radius-sm: var(--uc-radius-sm);
  --input-h: var(--uc-control-h-md);
  position: fixed;
  /* Above the previewed page, below every composer overlay — including
     `.uich-canvas-toolbar-host` (2147482500), because a text toolbar is a
     transient control the user has just aimed at and the dock is ambient
     chrome. It was 2147483000, which both buried that toolbar and TIED with
     the history panel's own 2147483000, leaving DOM order to decide which of
     the two won. */
  z-index: 2147482400;
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  isolation: isolate;
  box-sizing: border-box;
}

.uich-mtl *,
.uich-mtl *::before,
.uich-mtl *::after { box-sizing: border-box; }

/* ---- collapsed launcher ---- */
.uich-mtl-launch {
  left: calc(16px + var(--uich-dock-w, 0px));
  bottom: 16px;
  transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 13px;
  border: 1px solid var(--panel-line, #2a2d33);
  border-radius: var(--uc-radius-md);
  background: var(--panel-bg, #1f2124);
  color: var(--text-mid, #b6bcc6);
  font-size: var(--uc-text-sm);
  font-weight: var(--uc-weight-medium);
  line-height: 1;
  box-shadow: 0 6px 22px rgba(var(--shadow-rgb), calc(0.28 * var(--shadow-a)));
  cursor: pointer;
}

.uich-mtl-launch:hover {
  border-color: var(--panel-line-2, #3a3d44);
  background: var(--panel-bg-2, #313336);
  color: var(--text-hi, #f5f6f8);
}


/* ---- the dock ----
   Full-bleed along the bottom: the ruler spans a whole page's scroll, and every
   pixel of width is a pixel of resolution. Only the top edge is drawn, because
   the other three sit against the viewport. */
.uich-mtl {
  /* 224, not 208: the column now carries a twist, a kind icon and a name, and
     at 208 the longest real name still lost its last characters — which is the
     one thing the column exists to show. */
  --uich-n: 224px;
  /* Air between the name column and where the ruler begins. Zero read as the
     scale being welded to the panel edge, with 0px sitting on the divider
     itself. A fixed number rather than a share of the ruler, so it stays the
     same gap at every zoom. */
  --uich-pad: 14px;
  --uich-z: 1;
  right: 0;
  /* Stop at the drawer's edge instead of sliding under it. The right dock is
     `right: 0; bottom: 0`, so a full-bleed dock covered the bottom third of the
     panel — including its own scrolling content — and `body { margin-right }`
     does not help, because a fixed element is laid out against the viewport,
     not the body box. `--uich-dock-w` is set on <body> while the drawer is open
     and removed when it closes; the same correction `.canvas-toolbar-wrap` and
     `.annotate-bar` already make, eased on the drawer's own curve so the two
     move as one. */
  left: var(--uich-dock-w, 0px);
  bottom: 0;
  transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  width: auto;
  height: min(38vh, 360px);
  min-height: 44px;
  display: flex;
  flex-direction: column;
  border: 0;
  border-top: 1px solid var(--panel-line, #2a2d33);
  border-radius: 0;
  background: var(--panel-bg, #1f2124);
  color: var(--text-hi, #f5f6f8);
  /* No lift shadow. A 30px spread of black at 30% read as a grey wash bleeding
     up over the page — worst on a light page, where it dirtied the footer above
     the dock. The dock is docked, not floating: the 1px top border is the whole
     edge it needs. */
  box-shadow: none;
}

/* Collapsed is the strip alone. Set here rather than by clearing the inline
   height, so the height the user dragged to survives and returns on expand. */
.uich-mtl.is-collapsed { height: 44px; }
.uich-mtl.is-collapsed .uich-mtl-body { margin-left: var(--uich-tools-w, 0px); }

/* ---- while a bar editor is open ----
   The dock deliberately sits BELOW `.uich-canvas-toolbar-host` (2147482500), so
   a text toolbar the user just aimed at is never buried by ambient chrome. But
   the bar editor is itself a transient control the user just opened, and it
   cannot win on its own: it lives inside this element's stacking context, so its
   `z-index: 5` is relative to the dock, not to the page. The toolbar therefore
   drew straight over the popover.

   Raising the whole dock for as long as an editor is open is what fixes it
   without giving up the ordering the rest of the time — closed, the toolbar
   wins again. Above the toolbar, still below every composer overlay
   (dep floats 2147483200, annotate 2147483600+, menus and modals 2147483645+). */
.uich-mtl.has-editor { z-index: 2147482600; }

/* ---- page push ----
   The dock is fixed over the previewed page, so the page's last section ended
   up sliced off behind it and the only way to read it was to collapse the dock.
   Reserving the dock's height at the foot of the document lets the page scroll
   clear of it instead — the vertical twin of the right dock's
   `body { margin-right }` push, and it eases on the same kind of curve so the
   page and the dock move as one.

   `padding-bottom` rather than `margin-bottom`: it extends the body's own
   background, so a page with a dark or coloured body does not show a strip of
   canvas under the last section while the dock is open.

   The class is added by MotionTimelinePanel only while the dock is on screen,
   and `--uich-mtl-h` is its live height — so a collapse shrinks the reservation
   to the 44px strip rather than dropping it entirely. */
body.uich-mtl-open {
  padding-bottom: var(--uich-mtl-h, 0px);
  transition: padding-bottom 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  body.uich-mtl-open { transition-duration: 0.01ms; }
}

/* ---- resize grip ----
   One edge, because one edge is all that is exposed. It overhangs the border by
   a couple of pixels, which is what makes a 1px line realistically grabbable,
   and `touch-action: none` is what lets the drag work on a touch screen at all —
   without it the browser claims the gesture for scrolling. */
.uich-mtl-grip {
  position: absolute;
  top: -3px;
  right: 0;
  left: 0;
  z-index: 7;
  height: 7px;
  cursor: ns-resize;
  touch-action: none;
}

.uich-mtl-grip::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 50%;
  width: 44px;
  height: 2px;
  margin-right: -22px;
  border-radius: 999px;
  background: var(--text-dim, #7c8290);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.uich-mtl-grip:hover::after { opacity: 0.6; }

/* ---- fixed tools, over the strip's right end ----
   Absolute rather than in the strip's flow: the strip scrolls sideways when the
   ruler is zoomed, and Close must not scroll away with it. The opaque backing is
   what lets the ruler pass underneath instead of colliding with it. */
/* The dock's control row.
   The cluster used to be pinned over the strip's right edge, and the scroll
   viewport was pulled in by its width so the ruler could not slide underneath —
   a gutter reserved down the WHOLE dock to protect one 44px band of it, which
   cost a fifth of every row. Expanded, it now has a line of its own and the
   rows run full width. */
.uich-mtl-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: none;
  height: 36px;
  border-bottom: 1px solid var(--panel-line, #2a2d33);
  background: var(--panel-bg, #1f2124);
}

/* Collapsed there are no rows to pay for a gutter, and a second line would
   double the height of the one state whose whole point is to be one line — so
   here it goes back over the strip, exactly as it always did. */
.uich-mtl.is-collapsed .uich-mtl-head {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  height: 44px;
  border-bottom: 0;
  border-right: 1px solid var(--panel-line, #2a2d33);
}

.uich-mtl-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 0 8px;
  background: var(--panel-bg, #1f2124);
}

.uich-mtl-i { width: 15px; height: 15px; display: block; }

/* ---- body: the single scroll container ----
   The strip and the rows scroll together, vertically and horizontally, which is
   what keeps a tick and the bar it labels on the same pixel at every zoom. Two
   scrollers would need syncing, and any drift between them is a timeline that
   lies. */
.uich-mtl-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  /* A column, so `.uich-mtl-rows` can take the height left over below the
     strip. Without it the rows box is only as tall as its own content, and the
     grid lines and playhead — absolutely positioned INSIDE it — stop dead at
     the last row. Drag the dock taller and the lines no longer reach the
     bottom, which is the one thing a timeline's guides have to do. */
  display: flex;
  flex-direction: column;
  /* Stop the scroll viewport before the tools cluster — WHILE COLLAPSED ONLY.
     Collapsed, the cluster is pinned over the dock's right edge, so without
     this the ruler and the playhead scroll underneath it and the end of the
     timeline is unreachable. Reserving the gutter on the SCROLLER rather than
     on the ruler alone is what keeps ticks aligned with the bars they label:
     one shared viewport, just narrower. Expanded, the cluster has its own row,
     overlaps nothing, and the rows keep the full width — which is a fifth of
     the dock that used to be permanently blank. */
  margin-left: 0;
  background: var(--panel-bg, #1f2124);
  scrollbar-width: thin;
  scrollbar-color: var(--panel-line-2, #3a3d44) transparent;
}

.uich-mtl-body::-webkit-scrollbar { width: 8px; height: 8px; }
.uich-mtl-body::-webkit-scrollbar-track { background: none; }

.uich-mtl-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
  background-color: var(--panel-line-2, #3a3d44);
}

.uich-mtl-body::-webkit-scrollbar-thumb:hover { background-color: var(--text-dim, #7c8290); }
.uich-mtl-body::-webkit-scrollbar-corner { background: none; }

/* Both the strip and the row field stretch with the zoom. `min-width: 100%`
   keeps 1x exactly as wide as the dock rather than a hair narrower. */
.uich-mtl-strip,
.uich-mtl-rows {
  width: calc(var(--uich-n) + (100% - var(--uich-n)) * var(--uich-z));
  min-width: 100%;
}

.uich-mtl-strip {
  position: sticky;
  top: 0;
  /* Above the sticky row names (5) and the name gutter (4): the rows scroll up
     under this strip, and at 4 every name slid OVER the play button and the
     time readout, hiding both as soon as the list was scrolled. */
  z-index: 6;
  display: flex;
  align-items: stretch;
  height: 44px;
  border-bottom: 1px solid var(--panel-line, #2a2d33);
  background: var(--panel-bg, #1f2124);
}

/* Sticky at the left for the same reason the tools are pinned at the right:
   transport and time readout stay put while the ruler slides under them. */
.uich-mtl-lead {
  position: sticky;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 var(--uich-n);
  width: var(--uich-n);
  padding: 0 9px 0 12px;
  border-left: 1px solid var(--panel-line, #2a2d33);
  background: var(--panel-bg, #1f2124);
}

/* The strip's half of the same mask. The lead is already sticky, so a child
   pinned just past its edge rides along and keeps the ruler from showing
   through the gap when it scrolls underneath. */
.uich-mtl-lead::after {
  content: '';
  position: absolute;
  right: 100%;
  top: 0;
  bottom: 0;
  width: var(--uich-pad);
  background: var(--panel-bg, #1f2124);
}

.uich-mtl-time {
  display: inline-flex;
  align-items: baseline;
  font-size: var(--uc-text-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.uich-mtl-now { color: var(--text-hi, #f5f6f8); }

/* The total is context for the live figure, not a peer of it — stated after a
   divider and in the quieter ink, the way Figma reads current-of-duration. */
.uich-mtl-total {
  margin-right: 5px;
  color: var(--text-dim, #7c8290);
  font-weight: 500;
}

.uich-mtl-total::before {
  content: '/';
  margin-left: 5px;
  opacity: 0.55;
}

.uich-mtl-unit {
  color: var(--text-dim, #7c8290);
  font-size: 10px;
  font-weight: 500;
}

/* The tally doubles as the place a failed drag reports itself: it is the one
   line of text already in the strip, and a toast over a timeline would cover
   the bars the message is about. */
.uich-mtl-tally.is-warn {
  color: var(--text-hi, #f5f6f8);
  font-size: 9px;
  letter-spacing: 0;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uich-mtl-tally {
  margin-right: auto;
  color: var(--text-dim, #7c8290);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---- ruler ---- */
.uich-mtl-scale {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  margin-right: var(--uich-pad);
}

.uich-mtl-tick {
  position: absolute;
  bottom: 6px;
  padding-top: 9px;
  color: var(--uc-text);
  font-size: var(--uc-text-xs);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  --uich-stem: 50%;
}

/* Centred label → stem under its middle; a label pinned to an edge → stem at
   that edge, which is where the value actually is. */
.uich-mtl-tick::before {
  content: '';
  position: absolute;
  top: 0;
  right: var(--uich-stem);
  width: 1px;
  height: 6px;
  background: var(--panel-line-2, #3a3d44);
}

/* ---- playhead ----
   The panel's strongest ink, not a second hue: it is the one thing on the strip
   that has to be findable in a glance, and contrast does that without adding a
   colour the design under it has to compete with. */
.uich-mtl-cap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-right: -0.5px;
  background: var(--text-hi, #f5f6f8);
  pointer-events: none;
  /* Above the readout block, which is `z-index: 2` and opaque.
     At scroll 0 the playhead sits exactly on the ruler's origin — the same x
     where that block ends — so its dot straddled the boundary and the left half
     was painted over, leaving a half-circle that read as a clipping bug. The
     playhead is the one thing in a timeline that belongs on top of everything;
     the `pointer-events: none` above keeps it from swallowing clicks meant for
     what it now covers. */
  z-index: 3;
}

.uich-mtl-cap::before {
  content: '';
  position: absolute;
  /* Clear of the dock's own top edge.
     At `top: 0` the knob starts exactly where the strip does, which is the
     dock's boundary — so its top few pixels were sliced off and it read as a
     half-drawn stub rather than a playhead handle. */
  top: 3px;
  /* A round dot, centred on the line.
     It was a 9x8 box with 2-3px corners, which at this size reads as a clipped
     stub rather than a deliberate handle — square enough to look like a
     rendering fault. A circle is unambiguous: `left` is half the width negative
     so it centres on the 1px line whatever the ruler's zoom. */
  right: -4.5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-hi, #f5f6f8);
}


.uich-mtl-head-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-right: -0.5px;
  background: var(--text-hi, #f5f6f8);
  opacity: 0.55;
  pointer-events: none;
}

.uich-mtl-empty {
  margin: 0;
  padding: 30px 20px;
  color: var(--text-dim, #7c8290);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

/* ---- rows ---- */
.uich-mtl-rows {
  position: relative;
  padding: 6px 0 12px;
  /* Claim the space under the last row so the guides run the full depth. */
  flex: 1 0 auto;
}

/* The ruler's ticks, continued down through the rows. Without them a bar's
   position has to be judged against a tick several rows away, which is the
   difference between reading a timeline and estimating one. */
.uich-mtl-gridfield,
.uich-mtl-playfield {
  position: absolute;
  right: calc(var(--uich-n) + var(--uich-pad));
  left: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
}

.uich-mtl-gridfield { z-index: 0; }
.uich-mtl-playfield { z-index: 3; }

/* The name column's curtain. Absolute for its height — top/bottom span the
   padding box, the same ground the two fields cover — and translated by the
   dock's own scrollLeft for its stickiness, which is what the fields lack and
   the names have. Sits above both fields and below the names. */
.uich-mtl-gutter {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: calc(var(--uich-n) + var(--uich-pad));
  z-index: 4;
  background: var(--panel-bg, #1f2124);
  transform: translateX(var(--uich-sx, 0px));
  pointer-events: none;
}

.uich-mtl-grid {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--panel-line, #2a2d33);
  opacity: 0.55;
}

.uich-mtl-row {
  position: relative;
  display: flex;
  align-items: center;
  height: 32px;
  min-height: 0;
  margin: 0;
  padding: 0;
  line-height: 1.25;
}

/* The section row and its own name share the hover, because the name column is
   sticky and paints its own background over the row's. */
.uich-mtl-row:hover { background: var(--panel-bg-2, #313336); }
.uich-mtl-row:hover .uich-mtl-name { background: var(--panel-bg-2, #313336); }

/* A little air above each section, so groups read as blocks. */
.uich-mtl-row.is-group { margin-top: 5px; }

/* ---- name column ----
   A real column, sticky at the left edge so it survives a horizontal zoom. It
   was absolutely positioned once, and the day the row became `position:
   relative` its containing block changed underneath it: `left: 0` stopped
   meaning the panel's left edge and started meaning the row's, past the name
   gutter — so every name landed on top of its own bar. A sticky flex column
   cannot drift like that. */
.uich-mtl-name {
  position: sticky;
  right: 0;
  /* Above the curtain, which is above the grid and the playhead. The row
     deliberately sets no z-index of its own: a stacking context there would
     trap this number inside it and no value could clear the curtain. */
  z-index: 5;
  flex: 0 0 var(--uich-n);
  width: var(--uich-n);
  height: 100%;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  overflow: hidden;
  background: var(--panel-bg, #1f2124);
}

/* The tree elbow Figma draws from a layer to its properties. Purely a rule and
   a corner, so it costs no markup. */
/* 26px, not 32: the indent is the last thing between a name and its column, and
   at 32 the longest real name still lost its final characters. The connector
   below moves with it. */
.uich-mtl-row.is-child .uich-mtl-name { padding-right: 26px; }

.uich-mtl-row.is-child .uich-mtl-name::before {
  content: '';
  position: absolute;
  right: 12px;
  top: -1px;
  bottom: 50%;
  width: 8px;
  border-right: 1px solid var(--panel-line-2, #3a3d44);
  border-bottom: 1px solid var(--panel-line-2, #3a3d44);
  border-bottom-right-radius: 3px;
}

.uich-mtl-name-main,
.uich-mtl-name-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uich-mtl-name-main {
  color: var(--text-mid, #b6bcc6);
  font-size: var(--uc-text-sm);
  line-height: 1.25;
}

/* The section names itself once, above the rows it owns, so it earns the
   stronger ink; the rows below only have to say WHICH element. */
.uich-mtl-name-main.is-group {
  color: var(--text-hi, #f5f6f8);
  font-weight: 600;
}

.uich-mtl-name-sub {
  color: var(--text-dim, #7c8290);
  font-size: var(--uc-text-xs);
  line-height: 1.2;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  --uich-ff: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Under a section heading the selector IS the row's name, so it reads at the
   weight a name deserves rather than as a footnote. */
.uich-mtl-name-sub.is-lead {
  color: var(--text-mid, #b6bcc6);
  font-size: var(--uc-text-xs);
}

/* While a drag is live the cursor belongs to the dock, not to whatever the
   pointer happens to be over. Pointer capture keeps the EVENTS coming here, but
   not the cursor: without this it flickers to a text caret over the bar's own
   label and to the default arrow the moment the drag leaves the bar, which
   reads as the grip having been lost. `user-select` is the same story for the
   row labels the pointer sweeps across. */
.uich-mtl.is-sizing,
.uich-mtl.is-sizing * {
  cursor: ew-resize !important;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

/* ---- bars ----
   The lane is left open: the grid lines behind it are what give a bar its
   position, and a filled lane would bury them. */
.uich-mtl-track {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 22px;
  /* Matched to .uich-mtl-scale exactly. These two are what keep a tick and the
     bar it labels on the same pixel; an inset applied to one and not the other
     is a ruler that lies. */
  margin-right: var(--uich-pad);
}

/* An outlined capsule with a tick at each end — Figma's keyframe span. The
   outline is what makes the bar's EDGES the precise thing about it: a solid
   block reads as a mass, and the two moments that matter are where it begins
   and where it stops. */
.uich-mtl-bar {
  position: absolute;
  top: 0;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  overflow: hidden;
  border: 1px solid var(--panel-line-2, #3a3d44);
  border-radius: 5px;
  background: var(--panel-bg-2, #313336);
  color: var(--text-mid, #b6bcc6);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* The end ticks. They used to sit on every bar as decoration; now they are the
   resize handles, and so they appear ONLY where a resize can actually be
   written back to the code. A tick on a bar whose timing is a literal would
   promise an edit that cannot happen. */
.uich-mtl-grab {
  position: absolute;
  top: 0;
  bottom: 0;
  /* The grab area, not the mark. The mark stays a 1px tick 4px in; this is how
     far either side of it counts as "the edge", and it is deliberately much
     wider than it looks — an edge you have to hunt for reads as an edge that
     does not work. Kept to a third of the bar in JS so a short bar still has a
     middle. */
  width: 60px;
  max-width: 40%;
  z-index: 1;
}

/* Only the end this bar can actually rewrite is a handle. The other is drawn
   for the shape and does nothing, which the cursor is left to say. */
.uich-mtl-grab.is-live { cursor: ew-resize; }

.uich-mtl-grab.is-l { right: 0; }
.uich-mtl-grab.is-r { left: 0; }

.uich-mtl-grab::after {
  content: '';
  position: absolute;
  top: 5px;
  bottom: 5px;
  width: 1px;
  background: var(--text-dim, #7c8290);
  opacity: 0.7;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.uich-mtl-grab.is-l::after { right: 4px; }
.uich-mtl-grab.is-r::after { left: 4px; }


/* Brighter under the pointer that is about to take hold of it. The tick widens
   as well as lights up, so the hover answers "am I on the handle or on the
   body?" before the drag rather than after it. */
.uich-mtl-grab.is-live:hover::after,
.uich-mtl-bar.is-dragging .uich-mtl-grab.is-live::after {
  width: 2px;
  background: var(--text-hi, #f5f6f8);
  opacity: 1;
}

.uich-mtl-bar.is-dragging {
  border-color: var(--text-mid, #b6bcc6);
  background: var(--panel-bg-3, #3a3d44);
  color: var(--text-hi, #f5f6f8);
  /* The inline left/width ARE the drag; a transition on them would put the bar
     a frame and a half behind the cursor. */
  transition: none;
}

/* An instant trigger has no length to cap. The two marks are 8px apart at rest
   and the bar is drawn at its 0.6% minimum, so they met in the middle and the
   bar read as a solid blob rather than as a moment. */
.uich-mtl-bar.is-instant::before,
.uich-mtl-bar.is-instant::after { content: none; }

.uich-mtl-bar:hover {
  border-color: var(--text-dim, #7c8290);
  background: var(--panel-bg-3, #3a3d44);
  color: var(--text-hi, #f5f6f8);
}

/* Running right now. Stated as contrast rather than a tint, so it stays legible
   in both themes and stays out of the design's way. */
.uich-mtl-bar.is-active {
  border-color: var(--text-mid, #b6bcc6);
  background: var(--panel-bg-3, #3a3d44);
  color: var(--text-hi, #f5f6f8);
}

/* The section's envelope — the union of its rows. Quieter than a real bar, and
   not clickable, because there is nothing to edit at the section level. */
.uich-mtl-bar.is-envelope {
  height: 20px;
  top: 1px;
  border-style: dashed;
  background: none;
  cursor: default;
}

.uich-mtl-bar.is-envelope:hover {
  border-color: var(--panel-line-2, #3a3d44);
  background: none;
}

/* A trigger with no scroll length is a single moment, not a span. Drawn as a
   solid marker so it can never be mistaken for a very short scrub. */
.uich-mtl-bar.is-instant {
  min-width: 5px;
  padding: 0;
  border-radius: 2px;
  border-color: var(--text-mid, #b6bcc6);
  background: var(--text-mid, #b6bcc6);
}

.uich-mtl-bar.is-instant .uich-mtl-grab { display: none; }

.uich-mtl-bar.is-instant:hover {
  border-color: var(--text-hi, #f5f6f8);
  background: var(--text-hi, #f5f6f8);
}

/* Plain text inside the bar, the way Figma names a property track — chips with
   their own fills would put a third surface inside a 22px box. */
.uich-mtl-barlabel {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  font-size: var(--uc-text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.uich-mtl-chip {
  padding: 0;
  background: none;
  color: inherit;
  line-height: 1.4;
  white-space: nowrap;
}

/* The length is the bar's own measurement, not a property of it — stated plainly
   rather than competing with pin and scrub. */
.uich-mtl-chip.is-quiet {
  font-weight: 500;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
  .uich-mtl { --uich-n: clamp(170px, 48vw, 224px); --uich-pad: 10px; height: min(50vh, 320px); }
  .uich-mtl-lead { gap: 6px; padding: 0 5px 0 8px; }
  .uich-mtl-tally { display: none; }
  .uich-mtl-row.is-child .uich-mtl-name { padding-right: 26px; }
  .uich-mtl-row.is-child .uich-mtl-name::before { right: 12px; }
  .uich-mtl-row:not(.is-group) { height: 44px; }
}

/* ---- bar editor popover ────────────────────────────────────────────────────
   Shaped after Figma Motion's animation popover: a titled card, then one field
   per row with the LABEL ON THE LEFT and the control on the right.

   The controls are not bespoke. They reuse the composer's own recipe — the
   `.input` / `.select` / `.linput` fill, `--radius`, `--input-h` height, 12px
   type, and the minimal skin's transparent border + `hsl(var(--ring))` focus —
   so a field here is the same object as a field in the right-dock inspector.
   Restated against `.uich-mtl-pop` rather than inherited, because those rules
   are scoped to `.panel.dock-right` and this popover lives outside it.

   Like the DS Dialog, a raised inner card holds the title and fields on a
   darker tray, with actions below it. Only the field list scrolls. */
.uich-mtl-pop {
  position: absolute;
  /* Above the sticky name column (z=5); otherwise it paints through the
     editor footer on narrow viewports and covers the change count. */
  z-index: 10;
  width: min(340px, calc(100% - 16px), calc(100vw - 24px));
  --rp-field-bg: #1A1A1A;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: var(--uc-space-4);
  border-radius: var(--uc-radius-xl);
  background: var(--uc-surface-base);
  color: var(--uc-text);
  box-shadow: var(--uc-shadow-5);
  overflow: hidden;
}

/* Light timeline (`.uich-mtl.uc-content`, see mtlScope in the panel): the
   #1A1A1A recess above is the DARK field fill, and left in place it painted
   every input black on a light card. Use the light panel's own field fill
   (composer-right-panel.css: --rp-field-bg → --uc-surface-base). */
.uc-content .uich-mtl-pop {
  --rp-field-bg: var(--uc-surface-base, #F4F4F4);
}

.uich-mtl-pop-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--uc-border);
  border-radius: var(--uc-radius-xl);
  background: var(--uc-surface-raised);
  overflow: hidden;
}

.uich-mtl-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  padding: var(--uc-space-10) var(--uc-space-12) var(--uc-space-10) var(--uc-space-8);
  background: var(--uc-surface-raised);
}

/* Sentence case, not UPPERCASE + letterspacing — the same call the composer's
   own `.subsec-title` already made in the minimal skin. */
.uich-mtl-pop-title {
  overflow: hidden;
  color: var(--uc-text-strong);
  font-size: var(--uc-text-sm);
  font-weight: var(--uc-weight-semibold);
  letter-spacing: 0;
  text-transform: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uich-mtl-pop-body {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-10);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--uc-space-12);
  scrollbar-width: thin;
  scrollbar-color: var(--panel-line-2, #cdcfd8) transparent;
}

.uich-mtl-pop-body::-webkit-scrollbar { width: 8px; }
.uich-mtl-pop-body::-webkit-scrollbar-track { background: none; }

.uich-mtl-pop-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
  background-color: var(--panel-line-2, #cdcfd8);
}

/* Label left, control right — the composer's `.field.pf` grid, at the width
   this card can afford. */
.uich-mtl-pop-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: center;
  gap: var(--uc-space-10);
  min-height: var(--uc-control-h-sm);
}

.uich-mtl-pop-label {
  overflow: hidden;
  color: var(--uc-text);
  font-size: var(--uc-text-xs);
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Match the Inspector's small DS inputs, including its recessed #1A1A1A fill
   and thin neutral focus border. The actual Input renders numbers and text;
   composite controls below use the same token recipe. */
.uich-mtl-pop-value,
.uich-mtl-pop-color,
.uich-mtl-pop-combo {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.uich-mtl-pop .uich-mtl-pop-input {
  width: 100%;
  height: var(--uc-control-h-sm);
  padding: 0 var(--uc-space-8);
  border: 0;
  border-radius: var(--uc-input-radius, var(--uc-radius-md));
  background: var(--rp-field-bg);
  background-image: none;
  color: var(--uc-text-strong);
  font-size: var(--uc-text-sm);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle), var(--uc-shadow-input);
}
.uich-mtl-pop .uich-mtl-pop-input:hover:not(:focus) {
  background: var(--rp-field-bg);
  box-shadow: inset 0 0 0 1px var(--uc-border-hover, var(--uc-text-subtle)), var(--uc-shadow-input);
}
.uich-mtl-pop .uich-mtl-pop-input:focus {
  background: var(--rp-field-bg);
  box-shadow: inset 0 0 0 1px var(--uc-ring), var(--uc-shadow-input);
  outline: none;
}

/* The unit is the field's own annotation, not a value competing with it. */
.uich-mtl-pop-unit {
  color: var(--uc-text-muted);
  font-size: var(--uc-text-xs);
}

/* ---- dropdown ----
   Replaces the native `<select>` and `<datalist>` popups. Those are drawn by
   the OS: they arrive in the system font with a blue system highlight, ignore
   every token here, and cannot be styled at all — so in a greyscale panel they
   were the one surface that refused to join in.

   Built to the composer's OWN menu recipe: `.suggest` for the card (that fill,
   that border, that radius, that shadow) and `.upill-row` for the rows.

   The card is positioned `fixed` from the trigger's rect, NOT absolutely: this
   popover is `overflow: hidden` and its field list scrolls, so an absolute menu
   would be clipped by whichever of the two it grew past. */
.uich-mtl-dd {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
}

/* The closed trigger is the same object as a text field — same fill, height and
   radius — so a row with a dropdown and a row with an input read as one form. */
.uich-mtl-dd-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  height: var(--uc-control-h-sm);
  margin: 0;
  padding: 0 var(--uc-space-8);
  border: 0;
  border-radius: var(--uc-input-radius, var(--uc-radius-md));
  background: var(--rp-field-bg);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle), var(--uc-shadow-input);
  color: var(--uc-text-strong);
  font: inherit;
  --uich-ff: inherit;
  font-size: var(--uc-text-sm);
  text-align: right;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s, background-color 0.12s;
}

.uich-mtl-dd-btn:hover {
  background: var(--rp-field-bg);
  box-shadow: inset 0 0 0 1px var(--uc-border-hover, var(--uc-text-subtle)), var(--uc-shadow-input);
}

.uich-mtl-dd-btn:focus-visible,
.uich-mtl-dd-btn[aria-expanded="true"] {
  box-shadow: inset 0 0 0 1px var(--uc-ring), var(--uc-shadow-input);
  outline: none;
}

.uich-mtl-dd-val {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* One caret, drawn as a rotated corner so it needs no glyph and no SVG, and
   inherits its weight from the ink around it. */
.uich-mtl-dd-caret {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin: -3px 0 0 2px;
  border: 0;
  border-left: 1.3px solid var(--text-dim, #9da5ae);
  border-bottom: 1.3px solid var(--text-dim, #9da5ae);
  background: none;
  transform: rotate(-45deg);
  pointer-events: none;
}

/* In the ease combo the caret needs a real hit area, so the BUTTON is its own
   element and the caret sits inside it. Padding the caret itself does not work:
   its shape is two borders on a 7px box, and content-box padding grows the box
   the borders are drawn on — the corner scales up with the hit area and lands
   as a chevron three times the intended size, hanging off the field. */
.uich-mtl-dd-more {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: var(--uc-control-h-sm);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--uc-radius-md) 0 0 var(--uc-radius-md);
  background: none;
  cursor: pointer;
}

.uich-mtl-pop .uich-mtl-pop-combo-input,
.uich-mtl-pop .uich-mtl-pop-input.is-color { padding-left: 32px; }

.uich-mtl-dd-more .uich-mtl-dd-caret { margin: -3px 0 0 0; }

.uich-mtl-dd-btn:hover .uich-mtl-dd-caret,
.uich-mtl-dd-more:hover .uich-mtl-dd-caret {
  border-left-color: var(--text-hi, #0f0f15);
  border-bottom-color: var(--text-hi, #0f0f15);
}

.uich-mtl-dd-menu {
  position: fixed;
  z-index: 6;
  padding: 4px;
  border: 1px solid var(--uc-border-subtle);
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-overlay);
  box-shadow: var(--uc-shadow-4);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--panel-line-2, #cdcfd8) transparent;
}

.uich-mtl-dd-menu::-webkit-scrollbar { width: 8px; }
.uich-mtl-dd-menu::-webkit-scrollbar-track { background: none; }

.uich-mtl-dd-menu::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
  background-color: var(--panel-line-2, #cdcfd8);
}

.uich-mtl-dd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 5px 8px;
  border: 0;
  border-radius: var(--radius-sm, 4px);
  background: none;
  color: var(--uc-text);
  font: inherit;
  --uich-ff: inherit;
  font-size: 12px;
  text-align: right;
  cursor: pointer;
}

.uich-mtl-dd-row:hover { background: var(--uc-surface-raised); color: var(--uc-text-strong); }

/* The current choice, as a wash plus a tick.
   NOT `.upill-row.on`'s recipe: that uses `hsl(var(--primary))`, which is
   `.uich-tw`-scoped and would not resolve in this panel at all, over
   `rgba(var(--accent-rgb), .16)` — and --accent-rgb is re-pointed per platform
   skin, so it would put the host builder's pink or blue back into a panel that
   exists to be without it. */
.uich-mtl-dd-row.is-on {
  background: var(--uc-surface-raised);
  color: var(--uc-text-strong);
  font-weight: 600;
}

.uich-mtl-dd-txt {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uich-mtl-dd-tick {
  flex: 0 0 auto;
  color: var(--uc-text-strong);
  font-size: 11px;
  line-height: 1;
}

/* Boolean uses the same DS switch and On/Off hint as Motion in the Inspector. */
.uich-mtl-pop-boolean {
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-8);
  color: var(--uc-text);
  font-size: var(--uc-text-xs);
}

/* The color swatch shares the field's frame with the literal value, just as it
   does in the Composer inspector. Keep its hit target square at every width. */
.uich-mtl-pop-color input.uich-mtl-pop-swatch {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 20px;
  height: 20px;
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  border: 1px solid var(--uc-border-subtle);
  border-radius: var(--uc-radius-xs);
  background: none;
  cursor: pointer;
}

.uich-mtl-pop-swatch::-webkit-color-swatch-wrapper { padding: 0; }
.uich-mtl-pop-swatch::-webkit-color-swatch { border: 0; border-radius: 2px; }

.uich-mtl-pop-note,
.uich-mtl-pop-err {
  margin: 0;
  padding: 12px 13px;
  font-size: 12px;
  line-height: 1.55;
}

.uich-mtl-pop-note {
  min-height: 0;
  overflow-y: auto;
  color: var(--text-mid, #69727d);
}

.uich-mtl-pop-err {
  padding-top: 0;
  color: var(--uich-danger, #d44a4a);
}

.uich-mtl-pop-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: var(--uc-space-8) var(--uc-space-8) var(--uc-space-4);
  background: var(--uc-surface-base);
}

.uich-mtl-pop-count {
  margin-left: auto;
  color: var(--uc-text-muted);
  font-size: var(--uc-text-xs);
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════════════
   Scroll timeline — UX pass
   ═══════════════════════════════════════════════════════════════════════ */

/* Bars were outlined in a grey that survives a dark dock and disappears on a
   light one — pale capsules on white. At a glance the track area read as empty,
   which is how a working timeline gets reported as broken. */
.uich-mtl-bar {
  border-color: var(--text-mid, #9a9ca6);
  background: color-mix(in srgb, var(--text-mid, #9a9ca6) 8%, transparent);
}

.uich-mtl-bar.is-active {
  border-color: var(--uc-border-strong);
  background: var(--uc-surface-overlay);
  color: var(--uc-text-strong);
}

.uich-mtl-row.is-active .uich-mtl-name-main { color: var(--uc-text-strong); }

.uich-mtl-bar.is-envelope {
  background: none;
  border-color: var(--panel-line-2, #34363f);
}

/* The zoom control: a bigger target and a visible value.
   68x12px for a 1–6x range in 0.25 steps is 21 stops on a slider narrower than
   a word, with its value only in a tooltip. */
.uich-mtl-zoom { gap: 6px; }
.uich-mtl-zoom input[type="range"] { width: 104px; height: 16px; }

.uich-mtl-zoom-val {
  min-width: 30px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  --uich-ff: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: var(--text-mid, #9a9ca6);
  text-align: left;
}

/* Group heading inside the bar editor. Same small wide-tracked label the
   picker's groups use, so the two popovers read as one family. */
.uich-mtl-pop-group {
  margin: 10px 0 4px;
  padding: 0 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-mid, #9a9ca6);
}

.uich-mtl-pop-body > .uich-mtl-pop-group:first-child { margin-top: 2px; }

/* The bar editor's fold for the section's other values (editorFromJs). */
.uich-mtl-pop-more {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 8px 0 2px;
  padding: 6px 2px;
  border: 0;
  border-top: 1px solid var(--panel-line, #2a2d33);
  background: none;
  font: inherit;
  --uich-ff: inherit;
  font-size: 11px;
  color: var(--text-mid, #9a9ca6);
  cursor: pointer;
  text-align: right;
}
.uich-mtl-pop-more:hover { color: var(--text-hi, #f5f6f8); }
.uich-mtl-pop-more svg { width: 12px; height: 12px; transition: transform 0.15s ease; }
.uich-mtl-pop-more[aria-expanded="true"] svg { transform: rotate(-90deg); }
.uich-mtl-pop-note.is-inline { padding: 4px 2px; }

/* The ruler is a scrub track: click anywhere to jump, drag to scrub.
   `col-resize` rather than `pointer` says "this moves horizontally", which is
   what the gesture actually is. `touch-action: none` is what lets the drag work
   on a trackpad/touch screen at all — without it the browser claims the gesture
   for panning before the pointer handlers ever see it. */
.uich-mtl-scale.is-scrubbable {
  cursor: col-resize;
  touch-action: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

/* The dot grows a little under the pointer, so the ruler reads as grabbable
   before you try it. The playhead ignores pointer events itself — the ruler
   beneath handles the drag — so this keys off the ruler's own hover. */
.uich-mtl-scale.is-scrubbable:hover .uich-mtl-cap::before {
  transform: scale(1.25);
}

.uich-mtl-cap::before { transition: transform 0.12s ease; }

/* ═══════════════════════════════════════════════════════════════════════
   Timeline rows — the layers column
   ───────────────────────────────────────────────────────────────────────
   A row is a NAME and nothing else until you are on it. The twist, the kind
   icon and the name are always there; the actions fade in on hover or focus,
   which is what keeps a dense column quiet. Modelled on Lottie Creator, where
   a layer collapses to a triangle, an icon and a name, and reveals its
   controls only on the row you are working in.
   ═══════════════════════════════════════════════════════════════════════ */

.uich-mtl-twist {
  display: grid;
  place-items: center;
  flex: none;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-lo, #5b5f6b);
  cursor: pointer;
  transition: transform 0.14s ease, color 0.14s ease;
}

.uich-mtl-row.is-open .uich-mtl-twist { transform: rotate(-90deg); color: var(--text-mid, #9a9ca6); }
.uich-mtl-row:hover .uich-mtl-twist { color: var(--text-mid, #9a9ca6); }

.uich-mtl-kind {
  display: grid;
  place-items: center;
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--text-mid, #9a9ca6);
}

/* The one state that must never be mistaken for a name. */
.uich-mtl-name-main.is-unnamed { color: var(--text-mid, #9a9ca6); font-style: italic; }

/* The kind is carried by the ICON alone, named in its tooltip.
   It was also spelled out as a word, which cost ~60px of a 208px column and
   truncated every name to "Four da…" — the one thing the column exists to
   show. An icon plus a tooltip says the same thing for 14px. */

/* Over the name's tail, not beside it.
   Laid out in flow, these two 20px buttons plus their gaps took ~45px off every
   name — invisibly, since they sit at opacity 0 until you are on the row. A
   224px column became 89px of usable name and "Four days, three decisions"
   truncated to "Four days, thr…", which is exactly the cost that got the kind
   WORD removed a round earlier. Taking them out of flow gives the name the
   whole column at rest; on hover they cover its last few characters, which is
   the row you are already looking at. */
.uich-mtl-rowacts {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 2px;
  flex: none;
  opacity: 0;
  pointer-events: none;
  padding-right: 10px;
  transition: opacity 0.12s ease;
  /* So the covered characters fade out rather than being chopped. */
  background: linear-gradient(to left, transparent, var(--panel-bg, #1f2124) 10px);
}

.uich-mtl-row.is-active .uich-mtl-rowacts,
.uich-mtl-row:hover .uich-mtl-rowacts { background: linear-gradient(to left, transparent, var(--panel-bg-2, #1c1d22) 10px); }

/* The actions are positioned against the NAME column, not the row: pinned to
   the row they would sit at the far end of the ruler. */
.uich-mtl-row > .uich-mtl-name { position: relative; }

.uich-mtl-row:hover .uich-mtl-rowacts,
.uich-mtl-row:focus-within .uich-mtl-rowacts { opacity: 1; pointer-events: auto; }

.uich-mtl-rowact {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm, 4px);
  background: none;
  color: var(--text-mid, #9a9ca6);
  cursor: pointer;
}

.uich-mtl-rowact:hover { background: var(--panel-bg-3, #24262c); color: var(--text-hi, #f4f5f7); }
.uich-mtl-rowact:focus-visible { outline: 1px solid var(--panel-line-2, #34363f); outline-offset: -1px; }

/* The open track is marked by an edge, not a fill: a fill is the loudest way
   to say something this quiet. */
.uich-mtl-row.is-open { box-shadow: inset -2px 0 0 var(--text-hi, #f4f5f7); }

/* ---- value rows ---- */

.uich-mtl-vrow {
  display: flex;
  align-items: center;
  height: 26px;
  position: relative;
}

/* Banding, not lines. Across a wide ruler the eye needs help staying on one
   row; a hairline per row would be six more borders in a borderless panel. */
.uich-mtl-vrow.is-band { background: var(--panel-bg-2, #1c1d22); }

/* A value row reads LEFT TO RIGHT — label, then value.
   `.uich-mtl-name` is a column (a track row stacks its name over its selector),
   so inheriting it stacked the label above the value and overflowed a 26px row
   into the one beneath it. */
.uich-mtl-vrow .uich-mtl-name {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 46px 0 12px;
}

/* A track row is left-to-right too: twist, kind, name, actions.
   `justify-content` has to be restated, not inherited: the base sets `center`
   to centre a COLUMN vertically, and in row direction that same value centres
   the name horizontally — so each row's name began at a different x depending
   on how long it was. It went unnoticed while the actions held `margin-left:
   auto` and absorbed the slack. */
.uich-mtl-row:not(.is-group) > .uich-mtl-name {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
}

.uich-mtl-row:not(.is-group) > .uich-mtl-name > .uich-mtl-name-main {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .uich-mtl-row:not(.is-group) > .uich-mtl-name > .uich-mtl-name-main {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.2;
    white-space: normal;
  }
}

.uich-mtl-vlabel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--text-mid, #9a9ca6);
}

.uich-mtl-vval {
  margin-right: auto;
  flex: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  --uich-ff: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--text-hi, #f4f5f7);
}

.uich-mtl-vval em { margin-right: 2px; font-style: normal; color: var(--text-mid, #9a9ca6); }
.uich-mtl-vnote { font-size: 11px; color: var(--text-mid, #9a9ca6); font-style: italic; }

/* The value's reach: a hairline across the range it governs, with a mark where
   it takes effect. */
/* Centred on the row's own middle line.
   With no `top` it resolved to the top of the track box, so the hairline hugged
   the row above and every value appeared to belong to the row before it. */
.uich-mtl-vspan {
  position: absolute;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  transform: translateY(-50%);
  background: var(--panel-line-2, #34363f);
}


/* ---- bar kinds ---- */

/* A pinned scrub holds the page still while it runs — a longer, heavier thing
   than a reveal, and weighted to say so. */
.uich-mtl-bar.is-pinned {
  background: color-mix(in srgb, var(--text-mid, #9a9ca6) 18%, transparent);
  border-color: var(--text-mid, #9a9ca6);
}

/* Runs past the furthest the page can scroll, so it never finishes. Faded at
   the end rather than cut, which would read as a bar that simply stops. */
.uich-mtl-bar.is-overrun {
  border-left-color: transparent;
  -webkit-mask-image: linear-gradient(90deg, #000 76%, transparent);
  mask-image: linear-gradient(90deg, #000 76%, transparent);
}

/* ---- detecting ---- */

.uich-mtl-skel { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }

.uich-mtl-skel span {
  height: 9px;
  border-radius: 3px;
  background: var(--panel-bg-3, #24262c);
  animation: uich-mtl-pulse 1.4s ease-in-out infinite;
}

.uich-mtl-skel span:nth-child(2) { width: 46%; animation-delay: 0.15s; }
.uich-mtl-skel span:nth-child(1) { width: 72%; }
.uich-mtl-skel span:nth-child(3) { width: 58%; animation-delay: 0.3s; }

@keyframes uich-mtl-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

@media (prefers-reduced-motion: reduce) {
  .uich-mtl-skel span { animation: none; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Chat QA fixes (2026-09-29). Grouped here so they can be reviewed as one set.
   Pairs with uichemy-pro editor/src/composer-chat.jsx of the same date.
   ════════════════════════════════════════════════════════════════════════════ */

/* Lists: a reset set list-style:none, so "1. 2. 3." rendered as plain lines. */
/* The marker has to be set on the <li> itself: Elementor's editor.min.css sets
   list-style:none on every li, which beats anything inherited from the list. */
.chat-msgs .msg2-text ol.uich-md-ol > li { list-style: decimal outside !important; }
.chat-msgs .msg2-text ul.uich-md-ul > li { list-style: disc outside !important; }
.chat-msgs .msg2-text li > ul.uich-md-ul > li { list-style-type: circle !important; }
.chat-msgs .msg2-text li::marker { color: hsl(var(--muted-foreground)); }
.chat-msgs .msg2-text li > ol.uich-md-ol,
.chat-msgs .msg2-text li > ul.uich-md-ul { margin: 4px 0; }

/* Links, tables, quotes emitted by renderMarkdown. */
.chat-msgs .msg2-text a.uich-md-a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.chat-msgs .uich-md-table-wrap { overflow-x: auto; margin: 8px 0; }
.chat-msgs .uich-md-table { border-collapse: collapse; font-size: 12px; width: 100%; }
.chat-msgs .uich-md-table th,
.chat-msgs .uich-md-table td {
  border: 1px solid var(--rp-border-subtle, var(--panel-line-2));
  padding: 4px 8px;
  text-align: right;
  vertical-align: top;
}
.chat-msgs .uich-md-table th { font-weight: 600; background: var(--rp-surface-raised, var(--panel-bg-3)); }
.chat-msgs .uich-md-quote {
  margin: 8px 0;
  padding: 2px 10px 2px 0;
  border-right: 2px solid var(--rp-border-subtle, var(--panel-line-2));
  color: hsl(var(--muted-foreground));
}

/* Code blocks: language label + Copy button. */
.chat-msgs .uich-md-code {
  margin: 8px 0;
  border: 1px solid var(--rp-border-subtle, var(--panel-line-2));
  border-radius: 8px;
  overflow: hidden;
}
.chat-msgs .uich-md-code > pre { margin: 0 !important; border: 0 !important; border-radius: 0 !important; }
.chat-msgs .uich-md-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 10px 2px 4px;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  background: var(--rp-surface-raised, var(--panel-bg-3));
  border-bottom: 1px solid var(--rp-border-subtle, var(--panel-line-2));
}
.chat-msgs .uich-md-lang { text-transform: lowercase; letter-spacing: 0.02em; }
.chat-msgs .uich-md-copy {
  min-height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  --uich-ff: inherit;
  cursor: pointer;
}
.chat-msgs .uich-md-copy:hover,
.chat-msgs .uich-md-copy:focus-visible {
  background: var(--ctl-card, rgba(128, 128, 128, 0.15));
  color: var(--rp-text-strong, var(--text-hi));
}
.chat-msgs .uich-md-copy.is-copied { color: hsl(142 71% 45%); }

/* Tools row (Copy / Edit) on the user's own bubble sits under it, right-aligned. */
.chat-msgs .msg2.user .msg2-tools { justify-content: flex-end; }
/* Touch users could not see the tools at all (opacity 0 until hover). */
@media (hover: none) { .chat-msgs .msg2-tools { opacity: 1; } }

/* Live narration under "Thinking…", and the Stopped marker. */
.chat-msgs .msg2-live-text {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: hsl(var(--muted-foreground));
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chat-msgs .msg2-stopped {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}
.chat-msgs .msg2.ai-process.is-stopped .chat-retry { margin-top: 6px; }

/* "Jump to latest" floats at the bottom of the scroll area. */
.chat-msgs .chat-jump {
  position: sticky;
  bottom: 8px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
/* Solid, elevated pill so the transcript never shows through it, plus room for
   the leading down-to-line icon. Neutral surface — chrome stays black/white. */
.chat-msgs .chat-jump > * {
  pointer-events: auto;
  background: hsl(var(--popover)) !important;
  border: 1px solid hsl(var(--border)) !important;
  color: var(--text-hi) !important;
  box-shadow: 0 4px 16px rgba(var(--shadow-rgb), calc(0.35 * var(--shadow-a)));
}
.chat-msgs .chat-jump > * svg { flex: 0 0 auto; }

/* Prompt box hint ("Enter to send · Shift+Enter for a new line") — hidden per
   Jay 2026-09-29. The text is rendered from the Pro repo's chat, so it is
   suppressed here in CSS. The attachment notice (.composer-note) is separate and
   still shows. */
.chat-composer .composer-hint {
  display: none;
}
.chat-composer .composer-hint kbd {
  font: inherit;
  --uich-ff: inherit;
  padding: 0 4px;
  border: 1px solid var(--ctl-line, var(--panel-line-2));
  border-radius: 4px;
}
.chat-composer .composer-note {
  padding: 6px 12px 0;
  font-size: 12px;
  line-height: 1.4;
  color: hsl(38 92% 55%);
}

/* Attachment remove ×: invisible until hover and 14px wide. Show it on keyboard
   focus and on touch screens, and give it a 24px hit area.
   Do NOT set `position` here: the DS `.remove` is position:absolute (pinned to the
   tile's top-right corner and already the containing block for the ::after hit
   area). A `position: relative` rule at this specificity out-ranked it and dropped
   the × into the tile's flow, off the corner.
   Focus reveal is instant (transition: none) and covers :focus as well as
   :focus-visible, so a focused × is fully opaque the moment it is focused instead
   of fading in over --uc-dur-fast, and does not depend on the browser's
   keyboard-modality heuristic. */
.chat-composer button[aria-label^="Remove "]::after { content: ""; position: absolute; inset: -5px; }
.chat-composer button[aria-label^="Remove "]:focus,
.chat-composer button[aria-label^="Remove "]:focus-visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none;
}
@media (hover: none) { .chat-composer button[aria-label^="Remove "] { opacity: 1 !important; transform: none !important; } }

/* Attachment remove × (QA "Cross sign issue"): it was a 22px transparent button with a grey glyph sitting over the
   picture, so on a light or busy thumbnail it could not be seen and covered half of the 44px tile. Now a small solid
   badge in the tile's corner, white × on dark with a thin light ring so it reads on any picture, and always visible.
   Only the attachment tiles (inside a list item); the picked-element chip's × is a different control. */
.chat-composer li button[aria-label^="Remove "] {
  width: 18px;
  height: 18px;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.72) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);
  opacity: 1 !important;
}

/* Prompt text colour (QA "Prompt color"): what you type must use the same colour as the messages above it
   (--rp-text-strong). Two !important rules (the editor panel's and the host's, both for `textarea:not([data-uc])`) pinned
   the typed text to the muted --uich-text grey, so the prompt looked dimmer than the content. Specificity is raised
   above both. */
#uichemy-composer-floating-panel .uich-composer-host .chat-composer .composer-input textarea:not([data-uc]),
.uich-composer-host .chat-composer .composer-input textarea:not([data-uc]) {
  color: var(--rp-text-strong, var(--uich-text)) !important;
}

/* Contrast: placeholder and the empty-state note measured 2.29:1, inactive
   panel tabs 4.01:1. --muted-foreground is ~7:1 on the dark panel and ~4.8:1 on
   the light one. */
#uichemy-composer-floating-panel .chat-composer textarea::-moz-placeholder, .uich-composer-host .chat-composer textarea::-moz-placeholder {
  color: hsl(var(--muted-foreground)) !important;
  opacity: 1 !important;
}
#uichemy-composer-floating-panel .chat-composer textarea::placeholder,
.uich-composer-host .chat-composer textarea::placeholder {
  color: hsl(var(--muted-foreground)) !important;
  opacity: 1 !important;
}
#uichemy-composer-floating-panel .ai-setup-note,
.uich-composer-host .ai-setup-note { color: hsl(var(--muted-foreground)); }
/* The emphasised part ("empty block") took --text-mid, #737373 = 4.01:1 on the dark
   panel, so the key word was the lowest-contrast text in the sentence. */
#uichemy-composer-floating-panel .ai-setup-note b,
.uich-composer-host .ai-setup-note b { color: var(--rp-text, hsl(var(--muted-foreground))); }
#uichemy-composer-floating-panel [role="tablist"][aria-label="Panel"] > [role="tab"][data-state="inactive"] {
  color: hsl(var(--muted-foreground));
}
/* Panel tabs were 22px tall; 24px is the minimum target size. */
#uichemy-composer-floating-panel [role="tablist"][aria-label="Panel"] > [role="tab"] { min-height: 24px; }

/* Scope button: the trigger reuses the menu item markup, so the one-line
   description meant for the open menu printed inside the 118px button. */
button[role="combobox"] .scope-opt-desc { display: none !important; }

/* Model menu: it had no shadow or border and blended into the chat behind it. */
.uc-chrome [role="menu"]:has([role="menuitemradio"]) {
  box-shadow: 0 10px 30px rgba(var(--shadow-rgb), calc(0.45 * var(--shadow-a))), 0 0 0 1px var(--ctl-line, var(--min-line));
}

/* ---- Chat target chips, inside the prompt box (Jay 2026-09-29, option C) ----
   Picked elements show as chips above the text (Pro composer-chat.jsx
   `.composer-targets`), replacing the "Targeting …" banner. One line per chip,
   long selectors cut with an ellipsis; the full text is in the title. */
.composer-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
  min-width: 0;
}
.composer-target-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 24px;
  padding: 0 8px 0 2px;
  border-radius: var(--uc-radius-sm, 6px);
  background: var(--uc-surface-overlay, var(--panel-bg-3));
  color: var(--uc-text-muted, var(--text-dim));
  font-size: 12px;
  line-height: 1;
}
.composer-target-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--uc-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  --uich-ff: var(--uc-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  color: var(--uc-text-strong, var(--text-hi));
}
.composer-target-x {
  all: unset;
  box-sizing: border-box;
  /* `all: unset` resets `position`, and the design-system button gives every [data-uc] button a ::after that extends its
     hit area by 5px (position: absolute; inset: -5px). Without a positioned button, that ::after is measured from the
     prompt box instead, so it covered the whole box and any click in it removed the picked element (QA: "property is
     auto removed when we click on the prompt box"). */
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  color: var(--uc-text-muted, var(--text-dim));
  cursor: pointer;
  transition: background var(--uc-dur-fast, 120ms), color var(--uc-dur-fast, 120ms);
}
.composer-target-x:hover {
  background: var(--uc-surface-raised, var(--panel-bg-4));
  color: var(--uc-text-strong, var(--text-hi));
}
.composer-target-x:focus-visible {
  outline: 1px solid var(--uc-ring, currentColor);
}

/* ---- Composite-field inner inputs never paint their own fill ---------------
   uichemy-composer-editor-panel.css (real editor only) sets
   `.uichemy-composer-floating-panel input:focus { background-color:
   var(--uichemy-composer-input-bg) !important }` (#1b1e22 dark). Inside a
   length / colour / spacing box the BOX owns the fill, so the focused bare
   input painted a navy block over the left of it (Jay 2026-09-29). Its own
   exemption there needs a `.uich-composer-host` ancestor, which the docked
   panel doesn't always have — so this rule carries ID weight via :is() (the
   highest argument counts even when a class arm matches) and !important, and
   wins wherever the panel is mounted. */
:is(#uichemy-composer-floating-panel, #smart-html-floating-panel, .uich-composer-host, .uich-tw, .panel)
  :is(.lin-box, .swatch-input, .sb-quad-cell, .sb-cell, .input-group) input:not([type='checkbox']):not([type='radio']):not([type='color']),
:is(#uichemy-composer-floating-panel, #smart-html-floating-panel, .uich-composer-host, .uich-tw, .panel)
  :is(.lin-box, .swatch-input, .sb-quad-cell, .sb-cell, .input-group) input:not([type='checkbox']):not([type='radio']):not([type='color']):is(:hover, :focus, :focus-visible, :active) {
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* ---- One focus-ring weight everywhere (Jay 2026-09-29) ----------------------
   Every keyboard focus ring follows the shared 2px neutral inset convention.
   The DS modules (Button, Tabs, Switch, Checkbox, Select…) and older composer
   rules each set their own 2px ring with a 1–2px gap; rather than fork ~30
   module files that are shared with the other repos, the width and offset are
   pinned here for composer surfaces only (panel, toolbar, dock, their pop-ups).
   Colour is left to each rule. Soft 2–3px halos were cut to 1px at source. */
:is(.uich-composer-host, .uich-tw, .uich-rp, .panel) :is(:focus, :focus-visible),
:is(.uich-composer-host, .uich-tw, .uich-rp, .panel):is(:focus, :focus-visible) {
  outline-width: 2px !important;
  outline-offset: -2px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Chat history: a full-panel list, not a drawer beside the chat
   ─────────────────────────────────────────────────────────────────────────────
   It used to open as a 240px column pinned to the left of `.chat2-wrap`. In the
   ~320-400px dock that leaves ~100px of conversation showing down the right
   edge — clipped mid-word — and the list itself had no room for titles. The
   Gutenberg inspector host already forced it full-width for exactly this
   reason; this does the same for the floating dock, so there is ONE behaviour.

   Full width makes it a place you navigate to, so the header leads with a back
   arrow. Markup: Pro's `ChatSide` (composer-chat.jsx) — see the chat-lives-in-
   the-Pro-repo split.
   ═══════════════════════════════════════════════════════════════════════════ */
.chat2-wrap.side-open > .chat-side {
  width: 100%;
  left: 0;
  border-left: 0;
  max-width: none;
  box-shadow: none;
}
/* Header and search are fixed; only the list scrolls. `.chat-side` itself had
   `overflow-y: auto`, which scrolled the header away with the list. */
.chat2-wrap.side-open > .chat-side,
.panel.dock-right .chat2-wrap.side-open .chat-side {
  padding: 0;
  gap: 0;
  overflow: hidden;
  /* ONE horizontal gutter for the header, the search box, the date headings and
     the rows, so every edge in the list lines up. The rows used to sit at 6px
     while the search box sat at 10px, which read as a ragged left edge with the
     rows nearly touching the panel on the right (Jay). */
  --chat-side-gutter: 12px;
}

/* Header: back · title · new chat. Same height and gutter as the panel's own
   section headings so the list doesn't read as a different surface. */
.chat-side-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 8px var(--chat-side-gutter, 12px);
  border-bottom: 1px solid var(--panel-line);
}
.chat-side-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-hi);
}
/* Which chats the list is showing ("Widget" / "Page"). A caption, not a
   control — the scope itself is switched on the status bar below the chat, and
   a second switch here would be two places to change one thing. */
.chat-side-scope {
  font-size: 11px;
  font-weight: 400;
  color: var(--rp-chat-dim, var(--text-dim));
  white-space: nowrap;
}

/* Search appears only past CHAT_SEARCH_MIN chats (composer-chat.jsx): under
   that you can read every title without it. */
.chat-side-search {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  margin: 10px var(--chat-side-gutter, 12px) 2px;
  padding: 0 8px;
  height: 30px;
  border-radius: var(--radius, 8px);
  background: var(--panel-bg-2);
  box-shadow: inset 0 0 0 1px var(--panel-line);
  color: var(--text-dim);
}
.chat-side-search:focus-within {
  box-shadow: inset 0 0 0 1px var(--ctl-ring, var(--text-dim));
}
.chat-side-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: var(--text-hi);
}
.chat-side-search input::-moz-placeholder { color: var(--text-dim); }
.chat-side-search input::placeholder { color: var(--text-dim); }

.chat-side-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px var(--chat-side-gutter, 12px) 12px;
}
/* Date headings (Today / Yesterday / Previous 7 days / Earlier).
   Indented to line up with the row TITLES, not with the row boxes. A row's text
   starts 30px inside its box (10px padding + the 14px status-dot column + its
   6px gap), and that column is empty unless a chat is running or unread — so a
   heading flush to the box edge read as hanging off the left of the list (Jay).
   Kept as a variable because the three parts live on `.ctile`. */
.chat-side-list { --chat-row-text-inset: 30px; }
.chat-side-section {
  padding-right: var(--chat-row-text-inset, 30px);
}
/* The first heading sits tight under the search; later ones get air above. */
.chat-side-group + .chat-side-group .chat-side-section { margin-top: 8px; }

/* ── Globals manager, 2026-09-29 pass ──────────────────────────────────────
   Denser list + a rail without icons (Jay, after Mobbin: Webflow Variables and
   Lovable's theme manager). What changed and why:
   · the per-row palette glyph is gone (see renderVarRow) — the value's own
     swatch is the colour, so the icon was a repeated nothing;
   · rows lose ~40% of their height, so twice as many fit;
   · the value column moves in from 160px, because a hex three inches from its
     name is a row you have to read twice;
   · the `--` prefix hugs the name instead of floating as its own word.
   ═══════════════════════════════════════════════════════════════════════════ */
.g-var-head,
.g-var-row {
  grid-template-columns: minmax(0, 1fr) 148px 48px;
  gap: 6px;
}
.g-var-row {
  padding: 0 6px;
  min-height: 30px;
}
.g-var-head { padding: 2px 6px 4px; }
.g-var-row + .g-var-row::before { right: 6px; left: 6px; }

/* The `--` prefix is the DS Input's leftIcon: absolutely positioned at 12px,
   with the input's own padding clearing it by a wide margin — so `--` and the
   name read as two words. Move the prefix in to the row's own inset and let the
   text start ~2px after it, so `--cafe-espresso` reads as ONE token, the way it
   is written in CSS. The wrapper carries a hashed module class, so it is
   addressed structurally: it is the container's first child (the input is not a
   span). 17px is the `--` at this size; the +6 is its inset plus the gap. */
.uich-tw .g-var-row .g-var-name > span > span:first-child { right: 4px; }
.uich-tw .g-var-row .g-var-name input[data-uc='input'] {
  padding-right: 23px;
}

/* Builder-owned vs project variables. The heading only renders when BOTH
   groups exist (composer-variables.jsx), so a list of one kind stays flat. */
.g-var-group-head {
  padding: 10px 6px 3px;
  font-size: var(--uc-text-2xs, 10px);
  font-weight: var(--uc-weight-medium, 500);
  letter-spacing: var(--uc-tracking-wide, 0.02em);
  text-transform: uppercase;
  color: var(--uc-text-muted);
}
/* The first group sits tight under the NAME/VALUE header. */
.g-var-list > .g-var-group:first-child > .g-var-group-head { padding-top: 2px; }
/* The divider is drawn by `.g-var-row + .g-var-row`, which does not see across
   group boundaries — restore it on the first row of a later group. */
.g-var-group + .g-var-group > .g-var-row:first-child { position: relative; }
.g-var-group + .g-var-group > .g-var-row:first-child::before {
  content: "";
  position: absolute;
  right: 6px; left: 6px; top: -1px;
  height: 1px;
  background: var(--uc-border-subtle);
}

/* Collection title: editable in place, no chrome until you touch it. It used
   to be a full-width bordered box beside an icon chip, which read as a search
   field rather than the collection's name. */
.g-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
/* `.g-col-name` is set ON the input (not a wrapper), so it is addressed
   directly. `width: auto` lets it size to its own text-box default instead of
   stretching the dialog, which is what made it read as a search field. */
.uich-tw input.g-col-name[data-uc='input'] {
  width: auto;
  min-width: 0;
  max-width: 260px;
  padding-right: 4px;
  font-size: var(--uc-text-sm, 13px);
  font-weight: var(--uc-weight-medium, 500);
  color: var(--uc-text-strong);
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}
.uich-tw input.g-col-name[data-uc='input']:hover,
.uich-tw input.g-col-name[data-uc='input']:focus {
  background: var(--uc-surface-control);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
}
.g-col-count { font-size: var(--uc-text-xs, 12px); color: var(--uc-text-muted); }

/* Header search. A bare input inside a styled shell, so it matches the dialog
   rather than inheriting the DS Input's heavier resting border. */
.g-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  max-width: 220px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--uc-radius-md, 8px);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
  color: var(--uc-text-muted);
}
.g-search:focus-within { box-shadow: inset 0 0 0 1px var(--uc-ring); }
.uich-tw .g-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: none;
  box-shadow: none;
  padding: 0;
  font-size: var(--uc-text-xs, 12px);
  color: var(--uc-text-strong);
}
.g-search input::-moz-placeholder { color: var(--uc-text-muted); }
.g-search input::placeholder { color: var(--uc-text-muted); }

/* Rail headings ("Variables" / "Classes") replace the per-item icons. */
.g-rail-head {
  padding: 10px 8px 3px;
  font-size: var(--uc-text-2xs, 10px);
  font-weight: var(--uc-weight-medium, 500);
  letter-spacing: var(--uc-tracking-wide, 0.02em);
  text-transform: uppercase;
  color: var(--uc-text-muted);
}
.g-rail-head:first-child { padding-top: 2px; }

/* ── "+ Add property" dropdown (Jay, option A: command list) ─────────────────
   Portalled, so these are global. Same width as its trigger (the section's
   content column), capped height that also respects the space Radix measures,
   so it flips up near the bottom of the screen instead of being cut off. */
.uc-addprop.uc-addprop {
  width: var(--radix-popper-anchor-width, 300px);
  min-width: 240px;
  max-width: calc(100vw - 16px);
  max-height: min(360px, var(--radix-popover-content-available-height, 360px));
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px !important;
  overflow: hidden;
}
.uc-addprop__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 -2px;
  padding: 0 2px;
}
.uc-addprop__group {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 8px 4px;
  font-size: var(--uc-text-2xs, 11px);
  font-weight: var(--uc-weight-regular, 400);
  color: var(--uc-text-muted, #8a8a8a);
  background: var(--uc-surface-raised, #2a2a2a);
}
.uc-addprop__item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--uc-radius-sm, 6px);
  font-size: var(--uc-text-xs, 12px);
  color: var(--uc-text-strong, #f5f5f5);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.uc-addprop__item[data-active='true'] {
  background: var(--uc-surface-hover, rgba(255, 255, 255, 0.07));
}
.uc-addprop__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uc-addprop__css {
  margin-right: auto;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  --uich-ff: 'JetBrains Mono', ui-monospace, monospace;
  font-size: var(--uc-text-2xs, 11px);
  color: var(--uc-text-muted, #737373);
  background: none;
  padding: 0;
}
.uc-addprop__empty {
  padding: 16px 8px;
  text-align: center;
  font-size: var(--uc-text-xs, 12px);
  color: var(--uc-text-muted, #8a8a8a);
}
.uc-addprop__foot {
  display: flex;
  gap: 12px;
  padding: 6px 8px 0;
  border-top: 1px solid var(--uc-border-subtle, rgba(255, 255, 255, 0.08));
  font-size: var(--uc-text-2xs, 11px);
  color: var(--uc-text-muted, #737373);
}

/* ── Usage-limit notice (Jay, option A, floating) ────────────────────────────
   Rendered INSIDE `.chat-composer` (position: relative) and lifted just above
   it, over the transcript, so it never pushes the chat or the prompt box. Same
   width as the prompt card; panel card surface + hairline, amber bolt only. */
.chat-composer > .chat-limit-notice,
#uichemy-composer-floating-panel .panel.dock-right .chat-composer > .chat-limit-notice {
  position: absolute;
  right: -1px;
  left: -1px;
  bottom: calc(100% + 8px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--ctl-line, var(--panel-line-2));
  border-radius: 14px;
  background: var(--uc-surface-raised, var(--rp-surface-raised, var(--panel-bg-3)));
  color: var(--uc-text-strong, var(--text-hi));
  box-shadow: 0 8px 24px -8px rgba(var(--shadow-rgb), calc(0.45 * var(--shadow-a)));
  animation: uc-limit-in 0.18s ease-out;
}
@keyframes uc-limit-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-composer > .chat-limit-notice { animation: none; }
}
.chat-limit-ico {
  flex: 0 0 auto;
  color: #EF9F27;
}
.chat-limit-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.chat-limit-title {
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-medium, 500);
  line-height: 1.35;
}
.chat-limit-text {
  font-size: var(--uc-text-2xs, 11px);
  line-height: 1.35;
  color: var(--uc-text, var(--text-mid));
}
/* The failed turn in the conversation: one quiet line (the notice explains). */
.chat-limit-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--uc-text-2xs, 11px);
  color: var(--uc-text, var(--text-mid));
}

/* ── Code › Globals summary (Jay, option B) ──────────────────────────────────
   Type rows (Colors / Text / Sizes / Classes), each opening the Globals window
   on that section. Same grey boxes as the panel's sections; no big button. */
.glob-sum { display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.glob-sum__head { display: flex; flex-direction: column; gap: 2px; padding: 2px 2px 4px; }
.glob-sum__title { font-size: 13px; font-weight: 500; color: var(--uc-text-strong, var(--text-hi)); }
.glob-sum__meta { font-size: 12px; color: var(--uc-text-muted, var(--text-lo)); }
.glob-sum__rows { display: flex; flex-direction: column; gap: 6px; }
.glob-sum__row {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px 0 10px;
  border-radius: var(--uc-radius-md, 8px);
  background: var(--uc-surface-raised, var(--panel-bg-2));
  font-size: 13px;
  color: var(--uc-text-strong, var(--text-hi));
  cursor: pointer;
}
.glob-sum__row:hover { background: var(--uc-surface-overlay, var(--panel-bg-3)); }
.glob-sum__row:focus-visible { box-shadow: inset 0 0 0 1px var(--uc-ring, rgba(245, 245, 245, 0.55)); }
.glob-sum__row .glob-sws { flex: 0 0 auto; gap: 2px; }
.glob-sum__row .glob-sw { width: 12px; height: 12px; border-radius: 3px; }
.glob-sum__ico { flex: 0 0 auto; color: var(--uc-text-muted, var(--text-lo)); }
.glob-sum__label { flex: 0 0 auto; }
.glob-sum__val {
  margin-right: auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--uc-text-muted, var(--text-lo));
}
.glob-sum__chev { flex: 0 0 auto; color: var(--uc-text-muted, var(--text-lo)); }
.glob-sum__hint { margin: 2px 2px 0; font-size: 11px; color: var(--uc-text-muted, var(--text-lo)); }
.glob-sum__sync {
  all: unset;
  box-sizing: border-box;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--uc-text, var(--text-mid));
  cursor: pointer;
}
.glob-sum__sync:hover:not(:disabled) { background: var(--uc-surface-hover, rgba(255, 255, 255, 0.07)); color: var(--uc-text-strong, var(--text-hi)); }
.glob-sum__sync:disabled { opacity: 0.6; cursor: default; }

/* ── WP media library picker: get the composer chrome out of the way ──────────
   The composer panel, its portals and the canvas chrome sit at the very top of
   the z-index range (up to the 32-bit max), far above the WP media modal's own
   z-index (~160000). Left alone, clicking "Choose image / video / poster" opens
   the modal BEHIND the panel, so the button looked dead. openWpMediaLibrary()
   puts `uich-media-picking` on <html> while the frame is open; hide the chrome
   (NOT the modal — it lives directly under <body>, outside these nodes) so the
   picker is visible and clickable, then it all returns on close. */
html.uich-media-picking #uichemy-composer-floating-panel,
html.uich-media-picking .uichemy-composer-floating-panel,
html.uich-media-picking .uich-composer-host,
html.uich-media-picking .uich-portal-root,
html.uich-media-picking .uichemy-fab,
html.uich-media-picking .uich-canvas-toolbar-host,
html.uich-media-picking .uich-box-handles,
html.uich-media-picking #uich-box-handles,
html.uich-media-picking .annotate-bar {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HORIZONTAL OVERFLOW RESCUE  (Jay, 2026-10-02)
   ───────────────────────────────────────────────────────────────────────────
   A toolbar row that runs out of width used to CLIP. `.ed-pane-head` is the
   case that showed it: a title on the left, `.ed-pane-tools` on the right at
   `flex-shrink: 0`, and in the narrow right dock the CSS pane's extra "Assets"
   button pushed "Copy" past the edge — half a word visible, the button
   unreachable, and no way to get at it. Nothing was scrollable, so the content
   was simply gone.

   Every row below is a non-wrapping flex row holding a label plus a fixed
   button cluster, i.e. the same failure. The list was derived, not guessed:
   flex rows with no `flex-wrap: wrap` and no overflow handling whose name reads
   as a toolbar. The two harness-only rows in that set (`.topbar`, `.sidebar`)
   are left out — no JSX renders them.

   The scrollbar is hidden: a 15px native bar inside a 33px toolbar costs more
   than it gives, and composer-xscroll.js lets a plain mouse wheel drive the row,
   so a visible bar is not the only way to reach the far end.

   The one hazard is that `overflow-x: auto` makes a row a scroll CONTAINER,
   which also pins `overflow-y` — an absolutely-positioned CHILD would be cut
   off vertically. Every selector here was checked for one and none has any;
   the DS menus these rows open mount in `.uc-portal`, outside the row. Check
   the same thing before adding a row to this list. */
.annotate-bar,
.chat-side-head,
.construct-accordion-head,
.dep-add-float-head,
.dep-settings-head,
.deps-bar--tabs,
.ed-pane-head,
.ed-pane-tools,
.element-editor-actions,
.element-editor-code-head,
.g-col-head,
.g-var-actions,
.gp-header,
.gp-stops-cols-header,
.gp-stops-head,
.gw-head,
.gw-import__actions,
.gw-insp__head,
.gw-list__head,
.inspector-head,
.layers-head,
.msg2-tools,
.pick-overlay-bar,
.rp-el-headtools,
.rp-id__actions,
.tab-tools,
.text-row-head,
.uc-img-src__actions,
.uconnect-dialog-heading,
.uconnect-item-heading,
.uconnect-step-head,
.uich-construct-head,
.uich-loop-rawbar,
.uich-md-code-bar,
.uich-mtl-head,
.uich-mtl-pop-head,
.uich-mtl-tools,
.uich-rule-head {
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  /* Don't let a row that has hit its end start scrolling the pane behind it. */
  overscroll-behavior-x: contain;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* old Edge */
}

.annotate-bar::-webkit-scrollbar,
.chat-side-head::-webkit-scrollbar,
.construct-accordion-head::-webkit-scrollbar,
.dep-add-float-head::-webkit-scrollbar,
.dep-settings-head::-webkit-scrollbar,
.deps-bar--tabs::-webkit-scrollbar,
.ed-pane-head::-webkit-scrollbar,
.ed-pane-tools::-webkit-scrollbar,
.element-editor-actions::-webkit-scrollbar,
.element-editor-code-head::-webkit-scrollbar,
.g-col-head::-webkit-scrollbar,
.g-var-actions::-webkit-scrollbar,
.gp-header::-webkit-scrollbar,
.gp-stops-cols-header::-webkit-scrollbar,
.gp-stops-head::-webkit-scrollbar,
.gw-head::-webkit-scrollbar,
.gw-import__actions::-webkit-scrollbar,
.gw-insp__head::-webkit-scrollbar,
.gw-list__head::-webkit-scrollbar,
.inspector-head::-webkit-scrollbar,
.layers-head::-webkit-scrollbar,
.msg2-tools::-webkit-scrollbar,
.pick-overlay-bar::-webkit-scrollbar,
.rp-el-headtools::-webkit-scrollbar,
.rp-id__actions::-webkit-scrollbar,
.tab-tools::-webkit-scrollbar,
.text-row-head::-webkit-scrollbar,
.uc-img-src__actions::-webkit-scrollbar,
.uconnect-dialog-heading::-webkit-scrollbar,
.uconnect-item-heading::-webkit-scrollbar,
.uconnect-step-head::-webkit-scrollbar,
.uich-construct-head::-webkit-scrollbar,
.uich-loop-rawbar::-webkit-scrollbar,
.uich-md-code-bar::-webkit-scrollbar,
.uich-mtl-head::-webkit-scrollbar,
.uich-mtl-pop-head::-webkit-scrollbar,
.uich-mtl-tools::-webkit-scrollbar,
.uich-rule-head::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ── Right-dock mode ─────────────────────────────────────────────────────────
   The composer can dock to the RIGHT side of the preview as a vertical panel
   (Elementor-panel-like) instead of the default bottom sheet. The outer shell
   `#uichemy-composer-floating-panel` gets `.uich-dock-right` (from React), the
   inner <section> gets `.panel.dock-right`. Everything vertical-specific lives
   in this file so the bottom-dock design stays untouched. */

/* ---- Outer shell: right sidebar instead of bottom sheet ---- */
#uichemy-composer-floating-panel.uich-dock-right,
.uichemy-composer-floating-panel.uich-dock-right {
  top: 47px;
  bottom: 0;
  right: auto;
  left: 0;
  /* Default 332px, drag-resizable between DOCK_MIN (280) and DOCK_MAX (720)
     in composer-app.jsx. `width` here is just the initial value — the resize
     handle drives it afterwards via an inline style on this element, which
     wins over this rule. min/max-width must stay in step with the JS
     constants or the handle will visibly stop working before its intended
     limit. */
  width: 332px;
  min-width: 280px;
  max-width: 720px;
  height: auto !important;
  /* beats legacy 430px + any stale inline height */
  min-height: 0;
  max-height: none !important;
  border-right: 1px solid var(--panel-line, #2a2c33);
  /* Flat canvas-facing (left) edge: the right dock reads as a flush sidebar
     (just the left border), so no corner rounding. */
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  transform: translateX(-105%);
  /* Slide the drawer in/out smoothly. Only `transform` transitions, the
     width-drag resize changes `width` (not transform) so it stays lag-free, and
     this eases in lockstep with the front-end page-push (body margin-right). */
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {

  #uichemy-composer-floating-panel.uich-dock-right,
  .uichemy-composer-floating-panel.uich-dock-right {
    transition-duration: 0.01ms;
  }
}

/* Front end (live preview): the WordPress admin bar is fixed over the top of
   the viewport, so a top:0 drawer gets its titlebar clipped underneath it.
   Start the drawer below the admin bar. Scoped to body.admin-bar so it never
   affects the Elementor editor (which has no admin bar). */
body.admin-bar #uichemy-composer-floating-panel.uich-dock-right,
body.admin-bar .uichemy-composer-floating-panel.uich-dock-right {
  top: 32px;
}

@media screen and (max-width: 782px) {

  body.admin-bar #uichemy-composer-floating-panel.uich-dock-right,
  body.admin-bar .uichemy-composer-floating-panel.uich-dock-right {
    top: 46px;
  }
}

#uichemy-composer-floating-panel.uich-dock-right.active,
.uichemy-composer-floating-panel.uich-dock-right.active {
  transform: translateX(0);
}

#uichemy-composer-floating-panel.uich-dock-right.minimized,
.uichemy-composer-floating-panel.uich-dock-right.minimized {
  transform: translateX(calc(-1*(100% - 50px)));
}

/* Let the edge toggle stick out of the drawer. */
#uichemy-composer-floating-panel.uich-dock-right,
.uichemy-composer-floating-panel.uich-dock-right {
  overflow: visible !important;
}

/* Collapsed = drawer slides fully off-screen (Elementor-style); only the
   edge toggle (left: -22px) stays visible to reopen it. */
#uichemy-composer-floating-panel.uich-dock-right.active.uich-dock-slid,
.uichemy-composer-floating-panel.uich-dock-right.active.uich-dock-slid {
  transform: translateX(-100%);
}

/* Elementor's OWN editor dropdowns/popovers (e.g. the Publish "save options"
   menu beside the Publish button) open at the top-right, right where the docked
   composer panel (z-index:9999) sits, so the panel covers them and they look
   like they never open. Lift Elementor's menu containers above the panel.
   Scoped to Elementor's edit mode and to Elementor's own menu classes only, so
   it never affects composer UI (which uses .uich-tw, not these). */
body.elementor-editor-active .elementor-panel-saver-menu,
body.elementor-editor-active #elementor-panel-saver-menu,
body.elementor-editor-active .elementor-panel-footer-sub-menu-wrapper,
body.elementor-editor-active .MuiPopover-root,
body.elementor-editor-active .MuiMenu-root,
body.elementor-editor-active .MuiModal-root {
  z-index: 100050 !important;
}

/* Inner panel: match the shell's flush (square) left edge. */
.panel.dock-right {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  /* The bottom-sheet dock's upward drop-shadow (base `.panel` rule) has a wide
     44px blur that bleeds leftward onto the canvas when the panel is docked
     right. The right dock reads as a flat sidebar (just the left border), so
     drop the shadow here. Bottom-dock keeps its shadow. */
  box-shadow: none;
}

/* Light theme re-adds a panel drop-shadow through a higher-specificity host
   rule (`.uich-composer-host[data-theme="light"] .panel`, 0-3-0) that beats the
   `.panel.dock-right` (0-2-0) removal above, so the shadow reappears and bleeds
   onto the canvas in right-dock mode. Override it with matching specificity. */
.uich-composer-host[data-theme="light"] .panel.dock-right,
[data-uich-composer-theme="light"] .panel.dock-right,
.panel.dock-right[data-theme="light"] {
  box-shadow: none;
}

/* ---- Minimal edge toggle on the drawer's left edge ----
   No box: just a faint chevron flush to the panel edge (minimal/borderless
   composer rule). It is invisible until the panel is hovered, so it doesn't read
   as a heavy dark tab against the canvas. WHEN COLLAPSED it is the only way to
   pull the drawer back, so `.closed` forces it fully visible regardless of hover. */
.panel.dock-right .dock-edge-toggle {
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 7;
  box-shadow: none;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}

/* Reveal on panel hover or when focused for keyboard users. */
.panel.dock-right:hover .dock-edge-toggle,
.panel.dock-right .dock-edge-toggle:hover,
.panel.dock-right .dock-edge-toggle:focus-visible {
  opacity: 1;
}

.panel.dock-right .dock-edge-toggle:hover {
  color: var(--text-strong);
}

/* The tab wears the PANEL's own surface. Transparent, the canvas behind it
   showed through — a light box on the edge of a dark panel — and after a click
   the browser's default focus ring (white/blue double ring) drew round it.
   --panel-bg / --panel-line follow the theme, so it is dark in dark mode and
   light in light mode. */
.panel.dock-right .dock-edge-toggle {
  background: var(--panel-bg);
  border: 1px solid var(--panel-line);
  border-left: 0;
  border-radius: 0 6px 6px 0;
}
.panel.dock-right .dock-edge-toggle:focus { outline: none; }
.panel.dock-right .dock-edge-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--panel-line-2, var(--panel-line));
}

/* Collapsed drawer: the chevron is the reopen affordance, so keep it visible. */
.panel.dock-right .dock-edge-toggle.closed {
  opacity: 1;
}

/* AI still running while the drawer is hidden: a brand-orange dot on the
   tab's top-right corner, so the run stays visible from the canvas. */
.panel.dock-right .dock-edge-toggle.is-busy {
  opacity: 1;
}
.panel.dock-right .dock-edge-toggle .dock-edge-busy-dot {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--uc-brand, #FD6A35);
  box-shadow: 0 0 0 2px var(--panel-bg);
  pointer-events: none;
  animation: uich-dock-busy-pulse 1.6s ease-in-out infinite;
}
@keyframes uich-dock-busy-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.8); }
}
@media (prefers-reduced-motion: reduce) {
  .panel.dock-right .dock-edge-toggle .dock-edge-busy-dot { animation: none; }
}

.panel.dock-right .dock-edge-toggle .chev {
  display: inline-flex;
  transform: rotate(90deg);
  /* chevron points right = "close towards the edge" */
  transition: transform 0.2s ease;
}

.panel.dock-right .dock-edge-toggle.closed .chev {
  transform: rotate(-90deg);
  /* points left = "pull the drawer back open" */
}

/* ---- Resize handle: left edge, width drag (vertical grip pill) ---- */
.panel.dock-right .panel-resize {
  top: 0;
  bottom: 0;
  right: -8px;
  left: auto;
  width: 16px;
  height: auto;
  cursor: ew-resize;
}

.panel.dock-right .panel-resize::after,
.panel.dock-right .panel-resize:hover::after {
  width: 4px !important;
  height: 48px !important;
}

/* ---- Header: structured two-row layout for the narrow panel.
   Row 1 (title bar): logo · EDITOR/CODE/CHAT · collapse/close pinned right.
   Row 2 (toolbar):   Simple|Developer left · dock + theme right. ---- */
.panel.dock-right .panel-tabs {
  flex-wrap: wrap;
  padding-left: 0;
}

/* The narrow title row doesn't need the brand logo. */
.panel.dock-right .panel-brand {
  display: none;
}

/* ---- Full tab bar: Editor/Chat/Code tabs + Layers/skin/Developer tools all
   share ONE row (no separate "Edit" title bar). Tabs flex to fill; the tools
   pin to the right edge and stay on the same line. ---- */
.panel.dock-right .tab-tools {
  display: flex;
  align-items: center;
  /* Fill the whole top bar so the Design/Developer switcher can stretch across
     it (the Editor/Chat/Code tabs live in their own row below). */
  flex: 1;
  margin-right: 0;
  padding-right: 12px;
  padding-left: 8px;
}

/* The navigator icon + switcher wrapper spans the full width; the layers icon
   keeps its size and the switcher grows to fill the rest. */
.panel.dock-right .tab-tools>div:first-child {
  flex: 1;
  display: flex;
  align-items: center;
}

/* Elementor-style stacked tabs, icon above, label below, equal width. */
.panel.dock-right .panel-tabs {
  flex-wrap: nowrap;
  min-height: 58px;
  background: var(--panel-bg-2);
}

/* Top bar (Designer/Developer + History): equal padding on all four sides. The
   58px min-height above is meant for the stacked tab STRIP, on this row it just
   inflated the vertical space (content centered, not evenly padded), and
   .tab-tools carried an asymmetric 12/8 left/right. Pin uniform padding on the
   bar itself and let tab-tools sit flush. Scoped :not(.panel-tabs-strip) so the
   tab row below keeps its 58px. */
.panel.dock-right .panel-tabs:not(.panel-tabs-strip) {
  min-height: 0;
  padding: 12px;
}
.panel.dock-right .panel-tabs:not(.panel-tabs-strip) .tab-tools {
  padding: 0;
}

/* ---- Inspector: accordions (rendered by JSX) ---- */
.panel.dock-right .acc-list {
  display: flex;
  flex-direction: column;
}

/* Section headers stay quiet (no filled header bar — the name is plain text and
   the +/− carries the state), but every section is separated by a hairline so
   the list reads as distinct rows rather than floating labels. No rule after the
   last one, which would leave a stray line above the empty space below. */

.panel.dock-right .acc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(var(--primary));
  flex: 0 0 auto;
}

/* The dynamic-construct (Loop / Form …) accordion has its own markup but must look
   IDENTICAL to the native section accordions (Layout / Spacing / …) in the right
   dock. Mirror the `.acc` / `.acc-head` chrome above EXACTLY, keep these values in
   sync with it. Switching to the section's border-BOTTOM model also removes the old
   double-border with the last section, so the previous top-border hack is gone. */
.panel.dock-right .construct-accordion {
  border-top: 0;
  border-bottom: 1px solid var(--panel-line);
  background: transparent;
}

.panel.dock-right .construct-accordion-head {
  gap: 9px;
  padding: 13px 16px;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--text-mid);
}

.panel.dock-right .construct-accordion-head:hover,
.panel.dock-right .construct-accordion.is-open>.construct-accordion-head {
  color: var(--text-hi);
  background: var(--panel-bg-2);
}

.panel.dock-right .construct-accordion-chevron {
  color: inherit;
  opacity: 0.6;
}

.panel.dock-right .construct-accordion-body {
  border-top: 0;
  background: var(--panel-bg);
  padding-bottom: 0;
}

/* ---- Fields go one-by-one: every prop spans the full 12-col row.
       (!important beats the inline gridColumn span set per-field.) ---- */
.panel.dock-right .prop-row>* {
  grid-column: 1 / -1 !important;
}

/* ---- Webflow-style rows: label on the LEFT, control on the RIGHT.
       The label cell is col 1; every other child (input stack, hints,
       applied-from notes) stacks in col 2. ---- */
.panel.dock-right .field.pf {
  display: grid;
  /* Label column measured off the reference design (Figma, panel ≈260px wide,
     label column ≈99px ≈ 38%). An earlier pass cut this to 70px, which crowded
     the labels — "Font Wei…" truncated on a field that had room. */
  grid-template-columns: var(--pf-label-w, 80px) minmax(0, 1fr);
  align-items: center;
  -moz-column-gap: 10px;
       column-gap: 10px;
  row-gap: 4px;
}

.panel.dock-right .field.pf>.pf-label {
  margin: 0;
  grid-column: 1;
  min-width: 0;
  /* Don't clip the label as a whole, that hid the trailing "applied-from"
     dot (and global markers) in the narrow label column, so the indicator
     only appeared to show up when its hover tooltip did. Truncate the label
     TEXT instead (below) and keep the dot/markers always visible. */
  overflow: visible;
  white-space: nowrap;
}

.panel.dock-right .field.pf>.pf-label .pf-name {
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
}

.panel.dock-right .field.pf>.pf-label .pf-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.panel.dock-right .field.pf>*:not(.pf-label) {
  grid-column: 2;
  min-width: 0;
}

/* The visual inset editor is a box, give it the full width (label above it)
   instead of squeezing it into the right control column. */
.panel.dock-right .field.pf.pf-layout-inset {
  grid-template-columns: 1fr;
}

.panel.dock-right .field.pf.pf-layout-inset>.pf-label,
.panel.dock-right .field.pf.pf-layout-inset>*:not(.pf-label) {
  grid-column: 1;
}

/* Design mode's four-sides row (SidesBox) is the same kind of wide control:
   label + link/unit on one line, the four cells full width under it. */
.panel.dock-right .field.pf.sides-box {
  grid-template-columns: 1fr;
}

.panel.dock-right .field.pf.sides-box>.pf-label,
.panel.dock-right .field.pf.sides-box>*:not(.pf-label) {
  grid-column: 1;
}

.panel.dock-right .field.pf.sides-box>.pf-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Airier, minimal inspector density (right dock only) ─────────────────────
   The compact controls read too small in the wider right panel. Bump control
   heights + breathing room for a calmer, Framer-like feel, without adding any
   new chrome. Scoped to .dock-right so the bottom sheet stays dense. */

/* Section body: more inner padding + vertical rhythm between fields. */
.panel.dock-right .section {
  padding: 16px 16px 20px;
  gap: 18px;
}
/* The Content section already gets that 16px inset from the rule above, but the
   TEXT field's own .text-row adds another 8px/14px on top, so the field floated
   in an oversized double-padded box (unlike the other sections, which have no
   inner .text-row). Drop the inner padding here so the field sits flush at the
   section's 16px, matching Typography / Layout / etc. */
.panel.dock-right .simple-content-section .text-row {
  padding: 0;
}
.panel.dock-right .prop-rows { gap: 18px; }
.panel.dock-right .prop-row { row-gap: 18px; }

/* Field label ↔ control: a little more air, slightly larger label. */
.panel.dock-right .field.pf {
  row-gap: 7px;
  -moz-column-gap: 12px;
       column-gap: 12px;
}

.panel.dock-right .field.pf .pf-label {
  font-size: 11.5px;
  min-height: 16px;
}

/* Controls: taller so they don't feel cramped. Design fields wrap shadcn
   controls, h-8 (32px) input/select shells and bg-muted segmented rows with
   h-6 (24px) buttons. Bump both inside right-dock fields only. */
.panel.dock-right .field.pf .h-8 {
  height: 36px;
}

.panel.dock-right .field.pf .bg-muted {
  padding: 3px;
}

.panel.dock-right .field.pf .bg-muted button.h-6 {
  height: 30px;
}

/* Legacy CSS-field controls (Developer mode) if any render here. */

.panel.dock-right .prop-cell .seg button {
  height: 32px;
}

/* ---- Background ▸ Color tab: fill the panel instead of the bottom-dock 50%
   cap, so the gradient builder isn't squished into the left half. ---- */
.panel.dock-right .bg-color-rows {
  max-width: 100%;
}

/* ---- Developer Editor: Layers stack ABOVE the inspector, both inside the
   right panel (no separate side panel). ---- */
.panel.dock-right .layers-col {
  max-height: 240px;
  min-height: 0;
  overflow-y: auto;
  border-left: 0;
  border-bottom: 1px solid var(--panel-line);
}

.panel.dock-right .layers-resize-handle {
  display: none;
}

/* ---- Code tab: editors stack vertically ---- */

.panel.dock-right .ed-pane {
  min-height: 200px;
}

.panel.dock-right .code-scope-tabs {
  flex-wrap: wrap;
  row-gap: 6px;
}

/* Drop the full-width divider under the Standard/Page/Site/Globals tab row
   (the DS line-variant's inset bottom line). The moving active-tab underline
   is a separate element and stays. Scoped to these tabs only. */
.panel.dock-right .code-scope-tabs [role="tablist"] {
  box-shadow: none;
}

/* ---- Chat: history sidebar overlays instead of splitting the width ---- */
.panel.dock-right .chat2-wrap {
  position: relative;
}

.panel.dock-right .chat2-wrap.side-open {
  grid-template-columns: 1fr;
}
/* The history opens FULL-WIDTH over the chat, in every host. It used to be a
   240px column pinned left, which the Gutenberg inspector already had to
   override: at ~320-400px it left the conversation (and the Send button)
   bleeding through on the right, clipped mid-word, while the list itself had no
   room for titles. One behaviour now — the back arrow returns to the chat.
   `.chat-side` is opaque, so it covers cleanly. Layout of its contents lives
   with the rest of the chat styling in composer.css. */
.panel.dock-right .chat2-wrap.side-open .chat-side {
  position: absolute;
  right: 0;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  z-index: 6;
  border-left: 0;
  box-shadow: none;
}

/* ---- Globals / variables panel: card layout instead of the wide table ---- */

/* ---- Deps/assets rows wrap in the narrow panel ---- */
.panel.dock-right .dep {
  flex-wrap: wrap;
  row-gap: 6px;
}

/* Canvas placement only. The dark toolbar's visuals and controls live in the
   global design system FloatingToolbar component. */
.uich-canvas-toolbar-host {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2147482500;
}

.canvas-toolbar-wrap {
  --uc-toolbar-indicator: var(--uich-pro-grad, var(--uc-brand, #fd6a35));
  position: fixed;
  right: calc(50% - var(--uich-dock-w, 0px) / 2);
  bottom: calc(24px + var(--uich-mtl-h, 0px));
  transform: translateX(50%);
  transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1), bottom 0.2s ease;
  animation: uich-toolbar-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes uich-toolbar-in {
  from { transform: translateX(50%) translateY(calc(100% + 40px)); opacity: 0; }
  to { transform: translateX(50%) translateY(0); opacity: 1; }
}

/* Hidden to its handle (CanvasToolbarContent `collapsible`, the Composer
   Builder): the pill drops out the way it came in, and coming back replays
   `uich-toolbar-in` above. 'still' is a toolbar that starts the page hidden. */
.canvas-toolbar-wrap[data-collapsed] {
  animation: uich-toolbar-out 0.2s cubic-bezier(0.4, 0, 1, 1) both;
  pointer-events: none;
}
.canvas-toolbar-wrap[data-collapsed='still'] { animation-duration: 0.01ms; }

@keyframes uich-toolbar-out {
  from { transform: translateX(50%) translateY(0); opacity: 1; visibility: visible; }
  to { transform: translateX(50%) translateY(calc(100% + 40px)); opacity: 0; visibility: hidden; }
}

/* The handle it leaves: same centre as the pill, at the very foot. */
.canvas-toolbar-handle {
  position: fixed;
  right: calc(50% - var(--uich-dock-w, 0px) / 2);
  bottom: calc(4px + var(--uich-mtl-h, 0px));
  transform: translateX(50%);
  transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1), bottom 0.2s ease;
}
/* Shown once the pill is on its way out, not under it. */
.canvas-toolbar-handle.is-entering { animation: uich-toolbar-handle-in 0.24s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both; }

@keyframes uich-toolbar-handle-in {
  from { transform: translateX(50%) translateY(8px); opacity: 0; }
  to { transform: translateX(50%) translateY(0); opacity: 1; }
}

/* ---- The canvas pill in LIGHT mode (Jay, 2026-10-02) ----------------------
   The pill is a DS FloatingToolbar, and that component puts `uc-pop-dark` on its
   own root (FloatingToolbar.tsx). In the DS, `.uc-pop-dark` is the fixed dark
   scope for DROPDOWNS — "Select / Menu, always dark in every mode" (tokens.css
   §4b) — so the toolbar and every dropdown in the product read their surfaces
   from the same class. Re-pointing `.uc-pop-dark` would therefore have turned
   every Select and Menu light, which is the one thing light mode must not do.

   So nothing here touches that class. The toolbar is lit by overriding the
   tokens it resolves, on `.canvas-toolbar-wrap` only — (0,2,0) with the theme
   attribute, against `.uc-pop-dark`'s (0,1,0), so it wins on the same element
   and no other consumer of the dark scope is affected. The host carrying the
   attribute is `#uich-composer-canvas-toolbar`, which composer-app.jsx keeps
   theme-synced alongside the panel.

   Values are the DS LIGHT base (tokens.css `:root, .uc-scope, .uc-content`),
   not invented greys. The one deliberate departure is the border: `--uc-border`
   (rgba 0,0,0,.09) is the DS hairline, but this pill floats over the user's
   page, which is usually white — at .09 a white pill on white has no edge at
   all, so it takes the .14 border-strong step instead. */
:is([data-uich-composer-theme="light"], [data-theme="light"]) :is(.canvas-toolbar-wrap, .canvas-toolbar-handle) {
  color-scheme: light;

  /* the four the component's own stylesheet reads by name */
  --uc-toolbar-bg: #ffffff;
  --uc-toolbar-hover-bg: #ebebeb;
  --uc-toolbar-fg: #171717;
  --uc-toolbar-border: rgba(0, 0, 0, 0.14);

  /* the shared DS tokens it also reads: active chip, disabled, focus ring */
  --uc-text-strong: #0a0a0a;
  --uc-text-muted: #737373;
  --uc-surface-sunken: #ebebeb;
  --uc-border-strong: rgba(0, 0, 0, 0.14);
  --uc-ring: rgba(23, 23, 23, 0.40);
  /* The active chip's sheen is a white-to-black wash built for a dark chip; on a
     pale chip the white half does nothing and the black half dirties it. */
  --uc-sheen: linear-gradient(to bottom, rgba(255, 255, 255, 0.65), rgba(0, 0, 0, 0.02));
  --uc-shadow-raised: 0 1px 2px rgba(15, 15, 21, 0.10);
}

/* The bar, the ✕ and the tooltip share one hard-coded drop shadow in the DS
   module (48%/32% black) — correct over a dark canvas, a smudge on a white page.
   They are the root's only children, so one rule re-shadows all three without
   reaching into the CSS module's hashed class names. */
:is([data-uich-composer-theme="light"], [data-theme="light"]) .canvas-toolbar-wrap > * {
  box-shadow:
    0 16px 44px -12px rgba(15, 15, 21, 0.18),
    0 4px 12px -4px rgba(15, 15, 21, 0.10);
}

/* The handle has no drop shadow rule above (its button is a wide, clear hit
   area); its grip reads the shadow token instead. */
:is([data-uich-composer-theme="light"], [data-theme="light"]) .canvas-toolbar-handle {
  --uc-toolbar-shadow: 0 4px 12px -4px rgba(15, 15, 21, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  .canvas-toolbar-wrap,
  .canvas-toolbar-wrap[data-collapsed],
  .canvas-toolbar-handle.is-entering { animation-duration: 0.01ms; animation-delay: 0s; }
}

/* ── Gutenberg: dock in-flow instead of overlaying the editor ────────────────
   In the block editor the drawer's `position: fixed; right: 0` shell would sit
   ON TOP of the editor header, covering Saved / Publish / the settings toggle
  , and the admin bar (z-index 99999) would in turn cover the drawer's own
   titlebar. Gutenberg's whole layout root `.interface-interface-skeleton` is
   itself `position: fixed` with `right: 0`, so shrinking its right edge by the
   drawer's visible width pushes the ENTIRE editor (header included) clear of
   the drawer, no z-index war, nothing overlaps, and the header stays usable.

   Both custom properties are written by the dock sync in
   assets/js/uichemy-composer-gutenberg-adapter.js:
     --uich-gb-dock-w    the drawer's currently visible width (0 when closed,
                         ~50px when minimized, its dragged width when open)
     --uich-gb-dock-top   the skeleton's viewport top, so the drawer starts
                         below the admin bar (or at 0 in fullscreen mode)
   `body.uich-gb-dock` is added once on init and never removed, the width var
   alone drives open/close, so `right` can transition both ways instead of
   snapping back when a class disappears. Defaulting the var to 0px keeps this
   byte-identical to stock Gutenberg until the drawer is actually opened. */
body.uich-gb-dock .interface-interface-skeleton {
  left: var(--uich-gb-dock-w, 0px);
  /* Eases in lockstep with the drawer's own translateX transition (same
     duration + curve), so the editor and the drawer move as one. */
  transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  body.uich-gb-dock .interface-interface-skeleton { transition-duration: 0.01ms; }
}
/* Mid width-drag the easing would leave the editor edge trailing the handle;
   the drag adds this class so the push tracks the pointer 1:1 (mirrors
   `.uich-dock-resizing` on Elementor's preview). */
body.uich-gb-dock.uich-gb-dock-resizing .interface-interface-skeleton {
  transition: none;
}

/* ── Bricks: push the builder aside instead of covering it ──────────────────
   Bricks has no single `position: fixed; right: 0` layout root to shrink like
   Gutenberg's skeleton. Its builder is a flex row `.brx-body.main`
   (`#bricks-panel` · `#bricks-preview` · `#bricks-structure`) plus a separate
   fixed full-width `#bricks-toolbar`. Both carry `margin: 0 auto`, so shrinking
   their WIDTH would CENTRE the narrower box, splitting the reserved strip in
   half and leaving the right edge overlapping the drawer. So instead we inset
   from the right with `padding-right` (box-sizing: border-box keeps the outer
   box full-width and left-anchored, exactly like the Elementor `#elementor-
   preview` carve): the flex children reflow into the reduced content box, the
   canvas shrinks, panel + structure stay put, and the toolbar's right-hand
   Save/settings controls (justify-content: space-between) slide left, clear of
   the drawer. `--uich-bricks-dock-w` (written by the push effect in
   composer-app.jsx) is the drawer's visible width, 0 when closed; the
   `body.uich-bricks-dock` class is added once and the var alone drives
   open/close so the inset eases both ways. The selectors carry an id/class +
   element, out-specifying Bricks' own `#bricks-toolbar` / `.brx-body` rules. */
body.uich-bricks-dock .brx-body.main,
body.uich-bricks-dock #bricks-toolbar {
  box-sizing: border-box;
  padding-left: var(--uich-bricks-dock-w, 0px);
  /* Eases in lockstep with the drawer's own translateX transition. */
  transition: padding-left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  body.uich-bricks-dock .brx-body.main,
  body.uich-bricks-dock #bricks-toolbar { transition-duration: 0.01ms; }
}
/* Mid width-drag: track the pointer 1:1 instead of trailing behind the easing
   (mirrors the Gutenberg + Elementor resize guards). */
body.uich-bricks-dock.uich-bricks-dock-resizing .brx-body.main,
body.uich-bricks-dock.uich-bricks-dock-resizing #bricks-toolbar {
  transition: none;
}

/* ── Gutenberg: composer inside the Block tab (InspectorControls) ───────────
   A second, independent surface from the drawer above. WordPress's sidebar owns
   the position, width, scrolling and close button here, so the whole fixed-
   drawer model has to stand down: the panel becomes an ordinary in-flow block
   that fills the sidebar column. Everything is scoped to `.uich-inspector-host`
   (set by the mount in composer/src/index.jsx), so the drawer, in Gutenberg,
   Elementor, Bricks and the front end alike, is untouched. */
.uich-inspector-host {
  display: block;
  width: 100%;
  /* Makes the host a query container so the field rows below can respond to the
     ACTUAL width the composer ends up with, rather than to a hardcoded
     assumption. Change --uichemy-gb-sidebar-w and the rows re-layout on their
     own, no breakpoint to keep in sync. */
  container-type: inline-size;
}

/* Sidebar width. WordPress ships 280px, which fits but forces every control
   onto its own row; this widens it just while a UiChemy block owns the
   inspector (via :has() on our host), so ordinary blocks keep the stock width
   and Page/Block are only ever affected while you're editing a composer block.
   One number to tune, it's a custom property for exactly that reason. */
/* Desktop only: below 782px WordPress's sidebar is a full-width overlay. */
@media (min-width: 782px) {
body[data-uich-builder="gutenberg"] .interface-complementary-area:has(.uich-inspector-host),
body[data-uich-builder="gutenberg"] .interface-interface-skeleton__sidebar:has(.uich-inspector-host) {
  --uichemy-gb-sidebar-w: 320px;
  /* !important because WP's own `.interface-complementary-area{width:280px}`
     lives inside a `@media (min-width:782px)` block. Our selector is more
     specific so it should win on cascade order alone, but if it doesn't, the
     failure mode is a dead strip beside the panel (the skeleton sidebar is
     `width:auto` and stretches, while the 280px scroll container inside it does
     not), which is exactly the gap this pins shut. */
  width: var(--uichemy-gb-sidebar-w) !important;
  max-width: var(--uichemy-gb-sidebar-w) !important;
}
}
/* Minimised inspector: hide the sidebar column in place (CSS only, so the panel and its toolbar stay mounted). */
body[data-uich-builder="gutenberg"] .interface-interface-skeleton__sidebar:has(.uich-inspector-host > .panel.inspector-min) {
  display: none !important;
}
/* Fill the column all the way. The sidebar is a CHAIN of wrappers, skeleton
   sidebar → complementary area (the `overflow:auto` scroll container, also
   carrying `.editor-sidebar__panel`) → its fill → the block inspector, and any
   one of them stopping short of the new width leaves white space to the right of
   the panel while the panel's own dividers stop short of the edge. Stretching
   the whole chain is cheaper than depending on which single link is the culprit. */
body[data-uich-builder="gutenberg"] .interface-complementary-area:has(.uich-inspector-host) .interface-complementary-area__fill,
body[data-uich-builder="gutenberg"] .editor-sidebar__panel:has(.uich-inspector-host),
body[data-uich-builder="gutenberg"] .block-editor-block-inspector:has(.uich-inspector-host) {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
/* Hide WordPress's block card, the icon + "UiChemy Composer" + description
   header at the top of the Block tab. The composer panel carries its own
   identity and the description is static boilerplate, so the card is pure
   vertical cost in a 280px column. Scoped with :has() to the inspector that
   actually contains our host, so every OTHER block keeps its card. */
.block-editor-block-inspector:has(.uich-inspector-host) .block-editor-block-card {
  display: none;
}
.uich-inspector-host .panel,
.uich-inspector-host .panel.dock-right {
  position: static;
  width: 100%;
  max-width: 100%;
  /* min-width: 0 defeats the drawer shell's 320px floor, which would otherwise
     overflow WordPress's 280px sidebar and spill a horizontal scrollbar. */
  min-width: 0;
  height: auto;
  min-height: 0;
  max-height: none;
  transform: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
/* ...but transparent only holds up while the composer's theme matches the
   WordPress admin chrome behind it, which is light. In dark mode WP's white
   sidebar showed straight through the panel, and the Chat / Editor / Code strip
   sits directly on it: its track is a translucent WHITE wash (`--seg-track` is
   `rgba(255,255,255,.06)` in dark, meant to lift off a dark panel) and its
   labels are dim greys tuned for the same. Over white that is a white row with
   near-invisible text. Paint the panel in dark so every child has the ground it
   was designed against. */
.uich-inspector-host .panel[data-theme="dark"],
.uich-inspector-host .panel.dock-right[data-theme="dark"] {
  background: var(--panel-bg);
}
/* ...and that ground has to reach the bottom of the sidebar. Every wrapper from
   WordPress's scroll container down to the panel sized to its content, so a short
   tab (Design with one element selected, an empty Code pane) ended mid-column and
   WP's white sidebar showed under a dark panel. The whole chain becomes a column
   that grows to fill: `1 0 auto` keeps the content's own height as the floor, so
   a long field list still overflows and scrolls with the sidebar exactly as
   before. The Chat tab is left out: it has its own fixed-height chain (below).

   The chain is "every element between WordPress's scroll container and our
   host" (`.interface-complementary-area :has(…)`), not a list of WordPress's
   wrapper classes: those have changed between releases (the sidebar moved
   packages, the tab panels were rebuilt), and a list stops matching the day a
   wrapper is renamed or added, while the path always holds. */
body[data-uich-builder="gutenberg"] .interface-complementary-area:has(.uich-inspector-host > .panel:not(.tab-chat)) {
  display: flex;
  flex-direction: column;
}
body[data-uich-builder="gutenberg"] .interface-complementary-area :has(.uich-inspector-host > .panel:not(.tab-chat)),
body[data-uich-builder="gutenberg"] .uich-inspector-host:has(> .panel:not(.tab-chat)) {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}
body[data-uich-builder="gutenberg"] .uich-inspector-host > .panel:not(.tab-chat) {
  flex: 1 0 auto;
}
/* Drawer-only chrome: WordPress already provides every one of these. The close
   button and tab row are the sidebar's own; dragging the width is the sidebar's
   job; and an off-canvas collapse makes no sense for in-flow content. */
.uich-inspector-host .panel-resize,
.uich-inspector-host .dock-edge-toggle {
  display: none !important;
}
/* The drawer's body scrolls itself against a fixed 100vh shell. In the sidebar
   the scroll container is WordPress's, so let the content size naturally and
   scroll with the rest of the inspector, otherwise it becomes a nested
   scroll area with its own stranded scrollbar. */
.uich-inspector-host .panel-body,
.uich-inspector-host .panel.dock-right .panel-body {
  overflow: visible;
  max-height: none;
  height: auto;
}

/* `.panel-editor-stack` is the grid item inside `.panel-body`'s `1fr` track,
   and it gets its `min-width: 0` guard only from a rule scoped to
   `#uichemy-composer-floating-panel` — an ancestor that doesn't exist in this
   surface, where the host is `#uichemy-composer-inspector-host` instead. Left
   at `min-width: auto`, a grid item's automatic minimum size is its MIN-CONTENT
   width, so the widest row in the inspector became a hard floor on the panel's
   width and the sidebar grew to fit it. Anything that measures its own width to
   decide what to render then oscillates: it widens the panel, re-measures
   wider, renders more, widens again. */
.uich-inspector-host .panel-editor-stack {
  min-width: 0;
}

/* Chat transcript. `.chat2-body` is the scroll container that wraps the message
   list, and its base rule is `flex: 1 1 0` + `min-height: 0` + `overflow-y: auto`
  , built for a panel with a DEFINITE height, where it fills the leftover space.
   The inspector body is `height: auto` (above), so there is no leftover space to
   distribute: it collapsed to its zero basis and clipped the messages inside it.
   The prompt box is a SIBLING of this element, which is why that kept rendering
   while the conversation appeared to vanish.
   Sized to content (basis auto, so it can't collapse) and capped, so a long
   conversation scrolls here instead of pushing the prompt box off the end of an
   ever-growing sidebar. */
.uich-inspector-host .chat2-body {
  flex: 0 1 auto;
  max-height: none;
  overflow: visible;
}
/* …and the message list inside it must NOT be a capped scroll area either. With
   the prompt bar pinned (below), WordPress's sidebar is the single scroller: the
   transcript simply grows and the sidebar scrolls, instead of a short inner pane
   with its own stranded scrollbar. */
.uich-inspector-host .chat-msgs {
  flex: 0 1 auto;
  max-height: none;
  overflow: visible;
}

/* ---- Sticky prompt bar ----------------------------------------------------
   Pin the CONTEXT row + prompt box to the bottom of the sidebar so it stays
   reachable however long the conversation gets.
   The prerequisite is that NOTHING between the composer and WordPress's sidebar
   is itself a scroll container, or the composer sticks to that inner box instead
   of the sidebar viewport. `.chat2-main` looked innocent with only
   `overflow-x: hidden`, but per spec a hidden axis forces the other axis from
   `visible` to `auto`, so it was silently a scroller. Both wrappers are opened
   up here, and their `height: 100%` is dropped since it resolves against an
   auto-height parent in the sidebar anyway. */
.uich-inspector-host .chat2-wrap,
.uich-inspector-host .chat2-main {
  overflow: visible;
  height: auto;
  min-height: 0;
}
.uich-inspector-host .chat-composer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  /* Opaque: the transcript scrolls UNDER this, so a translucent bar would show
     message text through the prompt box. */
  background: var(--panel-bg);
  /* Sits in place of the base rule's border-top, which would scroll away with
     the element's own box, this reads as an edge against the scrolling content. */
  box-shadow: 0 -1px 0 var(--panel-line);
  /* Nudge the whole bar 30px further down. Only has an effect on a SHORT
     conversation, where the bar rests at the end of the content with panel space
     left below it; once the chat is long enough to scroll, the bar is pinned to
     the bottom edge and this is ignored. Applied as top margin (not a transform
     or offset) so the bar keeps its real position in the layout, nothing ends up
     overlapping it or sliding underneath. */
  margin-top: 30px;
}

/* The Code tab's panes have the identical defect from the identical cause:
   `flex: 1` with an explicit `min-height: 0` (and `overflow-y: auto` on the
   body), so they also floor at zero once the parent stops having a definite
   height. Given a FLOOR rather than sized to content, because CodeMirror needs a
   real height to lay its editor out, sizing to content would leave it 0 tall
   even after this. */
.uich-inspector-host .code2,
.uich-inspector-host .code2-body {
  min-height: 240px;
}
/* Each code editor takes the space left in the sidebar and scrolls inside it.
   CodeMirror is height:100% of .ed-pane-body-live, so a content-sized box grew
   to show every line and a long HTML/CSS/JS file ballooned the whole sidebar.
   This used to be fixed at 280px, which stopped that but left the editor
   ending a third of the way down an otherwise empty, full-height pane. The pane
   above it already fills the sidebar (the full-height chain near the top of
   this section), so a zero basis lets the editor take exactly what is left and
   never what its content asks for; long files scroll inside. The floor keeps it
   usable on short screens, where the sidebar scrolls instead. Same model as the
   drawer, which fills its own shell. */
.uich-inspector-host .ed-pane-body-live {
  flex: 1 1 0;
  height: auto;
  min-height: 240px;
}
/* Pane header. The CSS and JS panes carry three tools (Assets, Format, Copy),
   ~253px at the drawer's button padding, which leaves the title ~8px in the
   sidebar column: its icon collapsed to nothing and "CSS" plus the placement
   button slid under "Assets". The title keeps its size, the tools take the
   compact padding, and if a translation still does not fit they drop to their
   own row instead of overlapping. */
.uich-inspector-host .ed-pane-head {
  flex-wrap: wrap;
  row-gap: 6px;
}
.uich-inspector-host .ed-pane-title {
  flex-shrink: 0;
}
.uich-inspector-host .ed-pane-tools {
  margin-right: auto;
}
.uich-inspector-host .ed-pane-tools > button {
  padding: 0 6px;
  gap: 4px;
}
/* Match the Gutenberg-native 2px radius on the code editor panes (they ship at
   8px), same treatment as the prompt box, so the composer reads the same across
   surfaces. Applies everywhere: .uich-composer-host is on both the Gutenberg
   inspector AND the Elementor/Bricks/front-end drawer. */
.uich-composer-host .ed-pane {
  border-radius: 2px;
}

/* ── Chat tab: dock the compose bar at the foot of the sidebar ───────────────
   The rules above deliberately let the inspector flow at content height and
   scroll with WordPress's sidebar, right for the Editor/Code field lists.
   Chat wants the opposite: the message history fills the middle and the compose
   bar is pinned to the bottom (the drawer's model). So, ONLY while the Chat tab
   is active, the composer marks its shell `.panel.tab-chat`, a class the Editor
   and Code tabs never carry, so nothing here leaks onto them, rebuild a
   fill-height flex column from WordPress's inspector down through our host and
   panel. .chat2-wrap is already flex:1, so once its ancestors fill, the existing
   .chat2-main → .chat2-body (scroll) → .chat-composer (foot) layout resolves
   exactly as it does in the drawer. The sticky bottom on the compose bar is the
   fallback for any WordPress wrapper that still refuses to fill. */
body[data-uich-builder="gutenberg"] .block-editor-block-inspector:has( .uich-inspector-host .panel.tab-chat ),
body[data-uich-builder="gutenberg"] .block-editor-block-inspector:has( .uich-inspector-host .panel.tab-chat ) [role="tabpanel"] {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.uichemy-composer-inspector-host:has( .panel.tab-chat ),
.uich-inspector-host:has( .panel.tab-chat ),
.uich-inspector-host .panel.tab-chat {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
}
/* Prompt box: pinned to the bottom of the sidebar, and aligned to the panel's
   horizontal rhythm.

   Sticky is safe here now, and it wasn't before. WordPress's sidebar scrolls past
   the bottom of our panel, its Advanced panel and "Skip to the selected block"
   button live down there, so without this the prompt box scrolls away with the
   rest of the content. `bottom: 0` keeps it against the scrollport while
   `.chat2-main` still overlaps it.
   The reason this was removed earlier: sticky pins by LIFTING an element off its
   real position, and back when the pick notice was in normal flow the box would
   ride up on top of it. The notice is `position: absolute` now and can't be
   pushed into, so the failure mode is gone. The opaque background is what makes
   the lift read correctly, the transcript scrolls underneath, and without a
   paint the messages ghost through.

   Padding: the box shipped at `8px 12px` while `.chat-status` and `.chat-msgs`
   are both `14px`, so the prompt box hung 2px wider on each side than the
   messages directly above it, two stray vertical edges in a 320px column. 14px
   puts left, right, the transcript and the scope row on one shared edge. Only the
   inline padding is set, so the compose bar keeps its own tighter 8px block
   rhythm. */
.uich-inspector-host .panel.tab-chat .chat-composer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--panel-bg);
  padding-inline: 14px;
}
/* Chat tab: fill the sidebar height, EXACTLY. The panel takes the sidebar's own
   height through a flex column from WordPress's scroll container down (the same
   chain the other tabs use above, but able to shrink: `1 1 0` + `min-height: 0`,
   since the transcript scrolls inside rather than the sidebar). The flex column
   inside the panel then divides that up on its own, scope pill and compose bar at
   their natural heights, transcript taking everything left over.

   This replaced `height: calc(100vh - 116px)`, a guess at the chrome above the
   panel that only held with no admin bar: in the normal (non-fullscreen) editor
   it came up 68px short and left a white strip under a dark panel. The 360px
   floor is for very short viewports, where the sidebar scrolls instead. */
body[data-uich-builder="gutenberg"] .interface-complementary-area:has(.uich-inspector-host > .panel.tab-chat) {
  display: flex;
  flex-direction: column;
}
/* Every element on the path, as above, rather than WordPress's class names. */
body[data-uich-builder="gutenberg"] .interface-complementary-area :has(.uich-inspector-host > .panel.tab-chat) {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
}
.uich-inspector-host .panel.tab-chat {
  flex: 1 1 0;
  height: auto;
  min-height: 360px;
  max-height: none;
}
/* THE reason the compose bar drifted down on every send.
   `.chat2-wrap` is `display: grid`, and with no `grid-template-rows` its single
   row is `auto`, content-sized. `.chat2-main` is `height: 100%`, which resolves
   against that auto row, so it too collapsed to content height: the transcript
   never got a bounded box, never scrolled, and the whole column simply grew taller
   with each message, pushing the prompt box down with it. Sticky can't fix that –
   the box genuinely IS at the end of ever-growing content.
   `minmax(0, 1fr)` pins the row to the container's (already fixed) height, and the
   `min-height: 0` chain lets the boxes inside shrink below content so the
   transcript's own `overflow-y: auto` can finally engage. Now the transcript
   scrolls internally and the prompt box holds the bottom edge, unmoved by sends. */
.uich-inspector-host .panel.tab-chat .chat2-wrap {
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
}
.uich-inspector-host .panel.tab-chat .chat2-main {
  min-height: 0;
}
/* The transcript takes the slack and owns the scrolling.
   This box holds BOTH chat states, the "What do you want to do?" setup card AND
   the message list, and must be the same height for either, so the panel reads
   identically whether the chat is empty or full and the compose bar never moves
   when you send. It used to be pinned with `height: calc(100vh - 470px)`, an
   estimate of everything else in the column, because the parent chain gave it
   no definite height to fill. The chain above now does (the panel is exactly
   the sidebar's height), so it simply takes what is left: `flex: 1 1 0` sizes
   it from the slack and never from its content, and `overflow-y` scrolls a
   long conversation inside it. The floor keeps a few lines of transcript on a
   very short screen. */
.uich-inspector-host .panel.tab-chat .chat2-body {
  flex: 1 1 0;
  height: auto;
  min-height: 120px;
  max-height: none;
  overflow-y: auto;
}
/* Empty state: CENTER it in the slack instead of letting it hug the top.
   The transcript is now viewport-tall even with no messages, and the setup deck
   (sparkles disc, "What do you want to do?", suggestion cards) is content-height
  , top-aligned it reads as a stack with dead space under it, which is exactly
   the "unfilled panel" look this layout exists to kill. `margin: auto 0` centres
   it in whatever slack the screen provides, so the empty state reads as a
   composed welcome screen at 700px and at 1200px alike, same idiom as every
   chat product's zero state. `auto` margins collapse to 0 when space runs out,
   so on short screens it degrades to exactly the current top-aligned flow.
   On the empty-state WRAPPER, not `.ai-setup` itself: `.ai-setup` also renders
   inside the drawer (content-height there), where an auto margin is a no-op
   anyway, but scoping to the inspector keeps intent readable. */
.uich-inspector-host .panel.tab-chat .chat2-body > .ai-setup {
  margin-top: auto;
  margin-bottom: auto;
}
/* Message list fills the screen-sized transcript instead of hugging the top.
   The inspector rule further up sets `flex: 0 1 auto` on `.chat-msgs` to stop it
   being a second scroll area (the parent `.chat2-body` owns the scrolling, two
   nested scrollbars otherwise). But `flex-grow: 0` also means it never claims the
   slack, so with a short conversation the list ends where the last message ends
   and the rest of the transcript is dead space.
   `flex: 1 0 auto` restores just the growth:
     grow   1 → takes the leftover height, so the list is always as tall as the
                visible transcript, at any window size;
     shrink 0 → never compresses the messages to make room, once the thread is
                taller than the screen it keeps its natural height and the parent
                scrolls, which is what keeps the single-scrollbar behaviour;
     basis auto → still sized from content, so nothing collapses if the height
                above is ever missing.
   Messages stay top-aligned inside it, so new ones fill downward toward the
   prompt box the way every chat thread does. */
.uich-inspector-host .panel.tab-chat .chat-msgs {
  flex: 1 0 auto;
}
/* Match WordPress's native control radius (2px) on the compose box so the prompt
   bar reads consistently across surfaces. Applies everywhere: .uich-composer-host
   is on both the Gutenberg inspector AND the Elementor/Bricks/front-end drawer. */
.uich-composer-host .composer-input {
  border-radius: 2px;
}

/* WordPress's sidebar keeps its native 280px, the composer adapts to it rather
   than the other way round, so a UiChemy block never resizes the sidebar out
   from under Page/Block.
   To actually FIT 280px, the field rows stop being two columns. The drawer lays
   them out Webflow-style (92px label column + control), which inside 280px –
   ~248px once WP's 16px gutters are removed, leaves ~146px for the control:
   too narrow for a select plus its dynamic-value button. Stacking label ABOVE a
   full-width control is also exactly what the block editor does at this width
   (see its own "FONT SIZE" over the S/M/L/XL row), so this lands closer to
   native, not further from it. */
/* Compaction. The control HEIGHT stays at WordPress's own 36px (`controlHeight`
   in its components theme), that's the size we're matching, and shrinking it
   would make the panel look less native, not more. What made this feel oversized
   was the vertical rhythm BETWEEN fields: the drawer's 18px row gaps were tuned
   for a 420px panel with two-column rows, and once rows stack each gap is paid
   twice as often. 12px keeps fields clearly separated at a third less height. */
.uich-inspector-host .panel.dock-right .prop-rows { gap: 12px; }
.uich-inspector-host .panel.dock-right .prop-row { row-gap: 12px; }

/* Not inside `.rp-insp`: the right panel's inspector keeps its own two-column
   grid (`.panel.dock-right.uc-chrome .rp-insp .field.pf`, more specific than
   anything here), so stacking only the CHILDREN there pushed every control into
   the 80px label column while the 190px control column sat empty — font size,
   colour and select values were clipped to a few pixels. Those fields now get the
   same label + control row the Elementor and Bricks drawer shows. */
@container (max-width: 359px) {
  .uich-inspector-host .panel.dock-right .field.pf:not(.rp-insp .field.pf) {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    -moz-column-gap: 0;
         column-gap: 0;
    row-gap: 4px;
  }
  .uich-inspector-host .panel.dock-right .field.pf:not(.rp-insp .field.pf) > .pf-label {
    grid-column: 1;
    /* The label owns a full row now, so it no longer needs to be squeezed into a
       fixed column, let long names wrap instead of truncating with an ellipsis. */
    white-space: normal;
  }
  /* Anything that was pinned to the control column (input stacks, hints,
     applied-from notes) now follows the label in the single column. */
  .uich-inspector-host .panel.dock-right .field.pf:not(.rp-insp .field.pf) > *:not(.pf-label) {
    grid-column: 1;
  }
}
/* Start the drawer below the admin bar. wp-admin gets no `admin-bar` body class
   (that one is front-end only), so the base `body.admin-bar` rule above never
   matches here, hence this Gutenberg-specific offset, measured from the
   skeleton so fullscreen mode and the 782px breakpoint both come out right. */
body.uich-gb-dock #uichemy-composer-floating-panel.uich-dock-right,
body.uich-gb-dock .uichemy-composer-floating-panel.uich-dock-right {
  top: var(--uich-gb-dock-top, 0px);
}

/* ---- Control surfaces (dock-right only) ------------------------------------
   Scoped to the floating right dock so the bottom dock and the Gutenberg
   inspector keep their existing chrome.

   Every control gets a VISIBLE edge and a fill. The shadcn recipes these
   controls share (`border border-input bg-transparent` — LengthInput,
   SelectCustomInput and INPUT_CLS all use it) render as an unfilled box with a
   very low-contrast outline, which in the dark panel reads as no field at all:
   a bare "px − +" floating with nothing around it. Painting both the border and
   the surface from the panel's own tokens makes each field an obvious target in
   every skin. Colours are existing tokens — nothing new is introduced. */
.panel.dock-right .field.pf .border-input,
.panel.dock-right .field.pf .input,
.panel.dock-right .field.pf .select,
.panel.dock-right .field.pf .textarea,
.panel.dock-right .field.pf .swatch-input,
.panel.dock-right .field.pf .combo,
.panel.dock-right .field.pf .seg {
  /* Controls MUST stay visible in every skin. Measured in a browser: inside the
     panel `--panel-bg-2` computes to the SAME white as `--panel-bg` (the source
     file says #f7f7fa, but something later in the cascade overrides it), so a
     token-based fill painted nothing and the field vanished. Twice.

     These two neutrals are deliberately theme-agnostic instead of tokens: a
     mid-grey at low alpha darkens a light panel and lightens a dark one, so the
     control cannot disappear no matter how the tokens resolve. Not a new brand
     colour — a neutral scrim over whatever the panel already is. */
  /* No resting border — the field reads from its faint fill alone; the border
     appears only on hover / focus (rules below). */
  border-color: transparent;
  background-color: var(--rp-surface-control, rgba(128, 128, 128, 0.1));
}

/* One height for every control. The components hard-code Tailwind `h-8` (32px)
   while the panel token says 30px, so the two systems disagreed and rows sat at
   different heights. The token wins here. */
.panel.dock-right .field.pf .border-input,
.panel.dock-right .field.pf .input,
.panel.dock-right .field.pf .select,
.panel.dock-right .field.pf .swatch-input,
.panel.dock-right .field.pf .combo {
  height: var(--input-h);
  min-height: var(--input-h);
}

.panel.dock-right .field.pf .border-input:hover,
.panel.dock-right .field.pf .input:hover,
.panel.dock-right .field.pf .select:hover,
.panel.dock-right .field.pf .textarea:hover,
.panel.dock-right .field.pf .swatch-input:hover,
.panel.dock-right .field.pf .combo:hover,
.panel.dock-right .field.pf .seg:hover,
.panel.dock-right .field.pf .border-input:focus-within,
.panel.dock-right .field.pf .input:focus,
.panel.dock-right .field.pf .select:focus,
.panel.dock-right .field.pf .textarea:focus,
.panel.dock-right .field.pf .swatch-input:focus-within,
.panel.dock-right .field.pf .combo:focus-within {
  border-color: var(--rp-border-strong, rgba(128, 128, 128, 0.75));
  background-color: var(--rp-press, rgba(128, 128, 128, 0.18));
}

/* The inner <input>/<select> inside a bordered wrapper must stay transparent,
   otherwise it paints a second, slightly different box inside the first. */
.panel.dock-right .field.pf .border-input input,
.panel.dock-right .field.pf .border-input select {
  background-color: transparent;
}

/* ---- Framer-style −/+ steppers on length fields (dock-right only) ---------
   The value could already be stepped with ArrowUp/Down or an alt-drag scrub;
   these buttons make that discoverable. Quiet by default so 40+ fields don't
   turn into chrome — they pick up a fill on hover. */
/* The stepper is its own filled box beside the field (reference design), not a
   pair of glyphs crowded inside it. */
.panel.dock-right .lin-step {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: var(--input-h);
  padding: 0 2px;
  /* Same theme-agnostic neutrals as the fields above, for the same reason. */
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--rp-surface-control, rgba(128, 128, 128, 0.1));
}

/* The length field is the row's only child now (the −/+ stepper was removed —
   it ate the control column at narrow panel widths), so no gap to reserve. */
.panel.dock-right .field.pf .lin-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.panel.dock-right .field.pf .lin-row > .border-input {
  flex: 1 1 auto;
  min-width: 0;
}

/* The colour field carries a 200px cap for use in gradient-stop pickers. Inside
   an inspector row that made it visibly shorter than every other control, so
   let it fill the column like the rest. */
.panel.dock-right .field.pf .swatch-input.color-input {
  max-width: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTROL STATES  ·  right dock only
   ───────────────────────────────────────────────────────────────────────────
   Every control in the panel — select, length, number, text, colour, segmented,
   spacing cell, unit pill — reads from one state matrix:

     empty       quiet border, placeholder at --text-dim
     filled      same box, value at --text-hi
     hover       border lifts, fill warms slightly
     focus       brand ring + brand border  ← was identical to hover before
     active      fill deepens on press
     disabled    45% opacity, not-allowed, hover suppressed
     inherited   value dimmed (cascade), unchanged from today
     invalid     danger border + danger ring

   The neutral greys stay rgba(128,128,128,…) on purpose: a mid-grey at low
   alpha darkens a light panel and lightens a dark one, so a control cannot
   vanish however the tokens resolve (see the note above about that happening
   twice). Only the focus ring is branded, via --accent-rgb, which each skin
   already re-points — so focus reads Elementor-pink under the Elementor skin.

   Geometry, colour language and layout are untouched; this only adds states.
   Self-contained: delete from this banner to the end of the file to revert.
   ═══════════════════════════════════════════════════════════════════════════ */

.panel.dock-right {
  --ctl-line: rgba(128, 128, 128, 0.45);
  --ctl-line-hover: rgba(128, 128, 128, 0.70);
  --ctl-fill: rgba(128, 128, 128, 0.10);
  --ctl-fill-hover: rgba(128, 128, 128, 0.16);
  --ctl-fill-active: rgba(128, 128, 128, 0.24);
  /* ONE ring, not three. The previous version stacked a solid accent border, a
     near-opaque grey hairline and a 3px accent glow — 4px of chrome around
     every focused field, which read as a fat blurry band. It passed a contrast
     check and looked wrong; the number was not the goal.
     Now: neutral border at hover strength, plus a single 2px accent ring.

     TWO alphas since the accent went monochrome. A chromatic accent survives a
     mid alpha — 45% indigo still reads as indigo. White at 45% does not read as
     a white ring, it reads as a grey haze, and the same at black on the light
     panel. So the ring splits by JOB:
       --ctl-ring       the stroke that IS the focus indicator (a 2px solid
                        outline on fields, steppers, pills, icon buttons) —
                        near-opaque, so white stays a crisp hairline;
       --ctl-ring-soft  the 3px lift that sits OUTSIDE an already-solid focus
                        border on the prompt box — a whisper, because the border
                        beside it is doing the work. */
  --ctl-ring: rgba(var(--accent-rgb), 0.85);
  --ctl-ring-soft: rgba(var(--accent-rgb), 0.14);
  --ctl-line-focus: var(--ctl-line-hover);
  /* FLUSH with the panel, on request: the prompt box carries no fill step at
     all, and its 1px --ctl-line border is the only thing stating the shape.
     This is the same figure/ground the light theme already used (a #ffffff box
     on a white panel), so both themes now describe the box the same way.

     History, so nobody "fixes" this back: it was a raised surface first
     (translucent grey — read as a stray patch), then pure #000 to look recessed.
     Recessed did not survive contact with the real skins. Against the Elementor
     dark panel (#1f2124) black separates by 1.30:1 and against the shadcn dark
     panel (#09090b) by ~1.13:1 — far too little to read as a deliberate well,
     so it just looked like the same surface with a border on it.

     `var(--panel-bg)`, NOT a hardcoded #1f2124: this block is skin-agnostic, and
     the dark panel is #1f2124 on Elementor but #1e1e1e on Gutenberg. Hardcoding
     either one leaves the other a hair off, which is worse than flush — a
     mismatch too small to look intentional. The token keeps it exactly flush in
     every skin and theme (Elementor dark #1f2124, Gutenberg dark #1e1e1e, both
     lights #ffffff). --panel-bg is declared on the [data-uich-composer-skin]
     ancestor, so it is in scope here — verified resolving, not assumed. */
  --ctl-card: var(--panel-bg);
}

.uich-composer-host[data-theme="light"] .panel.dock-right,
[data-uich-composer-theme="light"] .panel.dock-right,
.panel.dock-right[data-theme="light"] {
  /* --ctl-card is NOT re-stated here any more. It is `var(--panel-bg)` in the
     block above, which already resolves to #ffffff on this theme — so the box
     stays flush with the white panel exactly as before, with its 1px --ctl-line
     border stating the shape. Repeating the literal here only gave the two
     themes a way to drift apart. */
  /* Lighter line in light mode. The shared 0.45 grey renders as #c6c6c6 on
     white — 1.71:1, which is a hard rule, and it became the loudest thing in the
     panel the moment the prompt box went white and the border started carrying
     the shape on its own. 0.28 renders #dbdbdb at 1.38:1: still unmistakably a
     line, no longer a rule. Dark is untouched — the same 0.45 grey lands at
     #3f3f40 there, which is already quiet against a near-black panel. */
  --ctl-line: rgba(128, 128, 128, 0.28);
  /* Kept proportional. Left at 0.70 the hover would jump from #dbdbdb to
     ~#6f6f6f — a step three times the size of the resting line, which would read
     as a different control rather than the same one hovered. 0.42 keeps a clear
     step (1.66:1) at the new scale. --ctl-line-focus follows this. */
  --ctl-line-hover: rgba(128, 128, 128, 0.42);
}

/* ── hover: lift the border, warm the fill ────────────────────────────────── */
.panel.dock-right .field.pf .border-input:hover,
.panel.dock-right .field.pf .input:hover,
.panel.dock-right .field.pf .select:hover,
.panel.dock-right .field.pf .textarea:hover,
.panel.dock-right .field.pf .swatch-input:hover,
.panel.dock-right .field.pf .combo:hover,
.panel.dock-right .field.pf .seg:hover {
  border-color: var(--ctl-line-hover);
  background-color: var(--ctl-fill-hover);
}

/* ── focus: a brand ring, unmistakably different from hover ───────────────── */
/* This is the fix. Before, :hover and :focus-within shared one rule, so a
   focused field looked exactly like a hovered one and you could not tell where
   the keyboard was. */
.panel.dock-right .field.pf .border-input:focus-within,
.panel.dock-right .field.pf .input:focus,
.panel.dock-right .field.pf .select:focus,
.panel.dock-right .field.pf .textarea:focus,
.panel.dock-right .field.pf .swatch-input:focus-within,
.panel.dock-right .field.pf .combo:focus-within {
  border-color: var(--ctl-line-focus);
  background-color: var(--ctl-fill-hover);
  /* `outline` rather than a spread box-shadow. A spread shadow draws its outer
     corner at (radius + spread), so on a 6.4px field the ring's arc is 8.4px
     while the field's own corner stays 6.4px — the two arcs don't coincide and
     the corners read as fat blobs. An outline at offset 0 follows the border
     box exactly, so the stroke is uniform all the way round. */
  outline: 2px solid var(--ctl-ring);
  outline-offset: 0;
  box-shadow: none;
}

/* ── active: press feedback on anything clickable ─────────────────────────── */
.panel.dock-right .field.pf .select:active,
.panel.dock-right .field.pf .swatch-input:active,
.panel.dock-right .field.pf .combo:active {
  background-color: var(--ctl-fill-active);
}

/* ── Colour field: no fill, ever ──────────────────────────────────────────────
   The swatch chip already carries the colour, so the wrapper and its hex input
   stay transparent in every state — no filled bar behind the value (Jay:
   "don't add bg in color input style"). Borders and the focus ring are
   unchanged. Wins over the generic control fills above by the extra
   `.color-input` class. The inner <input> override is !important because WP
   admin's forms.css paints inputs and would otherwise show a solid dark bar the
   offline harness can't reproduce. */
.panel.dock-right .field.pf .swatch-input.color-input,
.panel.dock-right .field.pf .swatch-input.color-input:hover,
.panel.dock-right .field.pf .swatch-input.color-input:focus-within,
.panel.dock-right .field.pf .swatch-input.color-input:active {
  background-color: transparent;
}
#uichemy-composer-floating-panel .panel.dock-right .swatch-input.color-input > input,
#uichemy-composer-floating-panel .panel.dock-right .swatch-input.color-input input:not(.sw):not(.swatch-trigger) {
  background-color: transparent !important;
}

/* ── disabled: one treatment, and hover must not fight it ─────────────────── */
.panel.dock-right .field.pf :disabled,
.panel.dock-right .field.pf .is-disabled,
.panel.dock-right .field.pf [aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.panel.dock-right .field.pf .border-input:has(:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}

.panel.dock-right .field.pf .border-input:has(:disabled):hover,
.panel.dock-right .field.pf .select:disabled:hover,
.panel.dock-right .field.pf .input:disabled:hover {
  border-color: var(--ctl-line);
  background-color: var(--ctl-fill);
}

/* ── empty vs filled ──────────────────────────────────────────────────────── */
/* A placeholder must read as absent, a real value as present. They were the
   same weight, which is why an empty Display select and a set one looked alike. */
.panel.dock-right .field.pf input:not(:where([data-uc]))::-moz-placeholder, .panel.dock-right .field.pf textarea:not(:where([data-uc]))::-moz-placeholder {
  color: var(--text-dim);
  opacity: 1;
}
.panel.dock-right .field.pf input:not(:where([data-uc]))::placeholder,
.panel.dock-right .field.pf textarea:not(:where([data-uc]))::placeholder {
  color: var(--text-dim);
  opacity: 1;
}

/* DS fields (`data-uc`) own their value and placeholder colours. */
.panel.dock-right .field.pf input:not(:where([data-uc])),
.panel.dock-right .field.pf select:not(:where([data-uc])),
.panel.dock-right .field.pf textarea:not(:where([data-uc])) {
  color: var(--text-hi);
}

/* A select showing no value (empty option) sits at placeholder weight. */
.panel.dock-right .field.pf select:invalid,
.panel.dock-right .field.pf select.is-empty {
  color: var(--text-dim);
}

/* ── invalid ──────────────────────────────────────────────────────────────── */
.panel.dock-right .field.pf [aria-invalid='true'] {
  border-color: var(--uich-danger);
}

.panel.dock-right .field.pf [aria-invalid='true']:focus,
.panel.dock-right .field.pf [aria-invalid='true']:focus-within {
  border-color: var(--uich-danger);
  box-shadow: 0 0 0 1px var(--rp-danger-soft, rgba(255, 122, 122, 0.30));
}

/* ── keyboard focus on the panel's bare buttons ───────────────────────────── */
/* Steppers, unit pills, chain toggles and section heads had no visible focus at
   all — tabbing through the panel was invisible. :focus-visible keeps the ring
   off mouse clicks. */
.panel.dock-right .sb-cell:focus-visible,
.panel.dock-right .seg button:focus-visible {
  outline: 2px solid var(--ctl-ring);
  outline-offset: 0;
  border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPACING + TYPE SCALE  ·  right dock only
   ───────────────────────────────────────────────────────────────────────────
   Driven by variables so the scale can be tuned live (see panel-scale.html)
   and then baked in — no hunting through rules to change a gap.

   Fixes a genuine inversion in the previous values: rows sat 18px apart while a
   section header sat only 16px from its own content, so every row read as
   separate as a whole section. Spacing should widen outwards:

       within a row  <  between rows  <  section to section

   Type gains a real step too. A 13px title against an 11.5px label is a 1.5px
   difference — not enough to register as hierarchy.

   Self-contained: delete from this banner to the end of the file to revert.
   ═══════════════════════════════════════════════════════════════════════════ */

.panel.dock-right {
  /* type */
  --pf-sec-fs: 14px;        /* section title  (was 13)   */
  --pf-sec-fw: 600;
  --pf-label-fs: 12px;      /* field label    (was 11.5) */
  --pf-value-fs: 12px;      /* control value             */

  /* spacing, narrowest to widest */
  --pf-label-gap: 6px;      /* label → control, inside one row  (was 7)  */
  --pf-row-gap: 12px;       /* row → row                        (was 18) */
  --pf-sec-head-gap: 14px;  /* section title → first row        (was 16) */
  --pf-sec-pad-x: 16px;
  --pf-sec-pad-b: 18px;     /* section bottom                   (was 20) */
  --pf-label-w: 80px;
}

/* ── section body ─────────────────────────────────────────────────────────── */
.panel.dock-right .section {
  padding: var(--pf-sec-head-gap) var(--pf-sec-pad-x) var(--pf-sec-pad-b);
  gap: var(--pf-row-gap);
}

.panel.dock-right .prop-rows { gap: var(--pf-row-gap); }
.panel.dock-right .prop-row { row-gap: var(--pf-row-gap); }

/* ── one row ──────────────────────────────────────────────────────────────── */
.panel.dock-right .field.pf {
  grid-template-columns: var(--pf-label-w) minmax(0, 1fr);
  row-gap: var(--pf-label-gap);
  -moz-column-gap: 12px;
       column-gap: 12px;
}

.panel.dock-right .field.pf .pf-label {
  font-size: var(--pf-label-fs);
}

/* ── control values ───────────────────────────────────────────────────────── */
/* DS fields (`data-uc`) keep their own per-size font size. */
.panel.dock-right .field.pf input:not(:where([data-uc])),
.panel.dock-right .field.pf select:not(:where([data-uc])),
.panel.dock-right .field.pf textarea:not(:where([data-uc])) {
  font-size: var(--pf-value-fs);
}

/* ── one corner radius for every control ──────────────────────────────────────
   The panel was mixing two radii: `.select` takes var(--radius) (6.4px) while
   anything using Tailwind's `rounded-md` gets calc(var(--radius) - 2px) =
   4.4px. Side by side in the same row that reads as a mistake, and it also made
   the focus ring's corner disagree with the field's own. One value, everywhere. */
.panel.dock-right .field.pf .border-input,
.panel.dock-right .field.pf .input,
.panel.dock-right .field.pf .select,
.panel.dock-right .field.pf .textarea,
.panel.dock-right .field.pf .swatch-input,
.panel.dock-right .field.pf .combo,
.panel.dock-right .field.pf .seg,
.panel.dock-right .lin-step {
  border-radius: var(--radius);
}

/* The inner input must not paint its own, smaller corner inside the wrapper. */
.panel.dock-right .field.pf .border-input > input,
.panel.dock-right .field.pf .border-input > select {
  border-radius: inherit;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHAT  ·  right dock only
   ───────────────────────────────────────────────────────────────────────────
   The CSS half of the minimal chat pass. Numbers are measured off shadcn/ui's
   own chat components (Bubble + MessageScroller, June 2026), whose scroller is
   384px against our 420px dock, so they transfer nearly 1:1:

       turn gap 32   ·   content padding 20   ·   text 14 / 22.75
       composer radius 18

   NOT reachable from this repo: the message and bubble elements themselves.
   `.chat-msgs` is the only message-level hook here — the individual turns are
   rendered AND styled by the Pro bundle, so the user-bubble geometry (10/12
   padding, r22, max-width 80%) and the ghost assistant treatment have to be
   done there. Same for removing the sidebar, the follow-up chips and the
   status bar, which are Pro markup.

   Also fixes four surfaces that are currently INVISIBLE: .chat-composer,
   .chat-side, .chat-followup and .chat-status paint with --panel-bg-2/-3,
   which commit a94f4dc pointed at --panel-bg. A gradient between two identical
   colours is flat; a fill equal to its parent is nothing. They use the same
   neutral scrim the panel controls use, so they cannot vanish again whatever
   the tokens resolve to.

   Self-contained: delete from this banner to the end of the file to revert.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── message stream ───────────────────────────────────────────────────────── */
.panel.dock-right .chat-msgs {
  padding: 20px;
  gap: 32px;
}

/* ── composer ─────────────────────────────────────────────────────────────── */
.panel.dock-right .chat-composer {
  margin: 0 16px 16px;
  border-radius: 18px;
  /* Solid --ctl-card, not the old rgba(128,128,128,0.10): the translucent grey
     let the panel show through, which is what read as a patch instead of a
     surface. See the token for why this one is solid. */
  background: var(--ctl-card);
  /* Back to the lighter line now that --ctl-card carries the card: a solid fill
     AND a 0.70-alpha border together read as a heavy slab. The fill does the
     separating, the hairline just finishes the edge. */
  border: 1px solid var(--ctl-line);
  padding: 8px 14px 8px 8px;
  box-shadow: none;
}

/* Focus can no longer just darken the border (it is already at hover strength),
   so it lights the accent ring instead — one ring, on the outer card only. */
.panel.dock-right .chat-composer:focus-within {
  border: 1px solid var(--ctl-line);
  box-shadow: none;
}

.panel.dock-right .chat-composer .composer-input textarea:not(:where([data-uc])) {
  font-size: 14px;
  line-height: 22.75px;
}

/* ── sidebar ──────────────────────────────────────────────────────────────── */
/* Kept, not hidden — it is Pro markup. Given a real surface so the split reads
   as intentional rather than as a stray border.

   OPAQUE, not the 6% wash this used to carry. The history panel is an OVERLAY:
   `position: absolute; inset: 0 auto 0 0` over the conversation (see the
   .side-open rule earlier in this file, whose comment already assumed "an opaque
   bg covers everything cleanly"). At 6% it did not — measured in the editor, the
   messages read straight through the New chat button and the Recent list, which
   is what made the panel look broken rather than layered. */
.panel.dock-right .chat-side {
  background: var(--panel-bg-2);
  /* It floats above the conversation, so it needs its own edge. */
  box-shadow: inset 1px 0 0 var(--panel-line);
}

/* ── follow-up chips ──────────────────────────────────────────────────────── */
/* Quietened rather than removed: weight 600 at full text colour made three
   suggestions shout louder than the reply above them. */
.panel.dock-right .chat-followups {
  gap: 6px;
  /* margin-left is deliberately NOT touched. The 36px in the base rule aligns
     the chips past the assistant avatar, which is Pro markup I cannot see from
     this repo — zeroing it here would have knocked them out of alignment with
     the message text above. */
}

/* ── status bar ───────────────────────────────────────────────────────────── */
/* The gradient ran between two colours that now resolve identically, i.e. no
   gradient at all. One flat scrim plus a hairline does the separating.
   Literal grey, not `var(--rp-surface-raised, …)`: in this panel that token is
   #FFFFFF in light mode, so the strip under the composer painted itself the
   same colour as the panel and vanished (it only ever looked right on dark,
   where the token is #202020). A neutral wash darkens a light panel and
   lightens a dark one, which is what this bar wants in both. */
.panel.dock-right .chat-status {
  background: rgba(128, 128, 128, 0.12);
  border-bottom-color: var(--panel-line);
  padding: 7px 16px;
  font-size: 11.5px;
}

/* ── thinking / loading ───────────────────────────────────────────────────── */
.panel.dock-right .chat-loading {
  font-size: 14px;
  line-height: 22.75px;
  color: var(--text-dim);
}

/* ── composer: one card, not eight boxes ─────────────────────────────────────
   The composer was drawing eight nested frames: the outer .chat-composer, then
   .composer-input with its OWN border, radius and background inside it, then a
   bordered box around each of the four icon buttons, the chevron, and the send
   pill. Reference composers draw one card and put exactly two shapes in it.

   Everything below removes a frame rather than adding one. */

/* 2 → the inner frame goes. .composer-input becomes a plain stack; the outer
   .chat-composer is the only box, so focus rings once instead of twice. */
.panel.dock-right .chat-composer .composer-input {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  gap: 8px;
}

.panel.dock-right .chat-composer .composer-ctx { gap: 4px; }

/* 8 → send keeps its fill, since it is the one action in the card that should
   read as primary, but loses the extra height and squares off to a pill. */

.panel.dock-right .chat-composer .composer-foot {
  gap: 4px;
  padding-top: 2px;
}

/* The textarea now sits directly on the card.
   `background: transparent !important` is not decoration: a global
   `.uich-composer-host textarea { background: var(--panel-bg-2) !important }`
   was overriding the composer's own transparent, and since --panel-bg-2 now
   resolves to the panel colour it painted a solid rectangle inside the card —
   the third frame. Only !important beats !important here. */
.panel.dock-right .chat-composer .composer-input textarea:not(:where([data-uc])) {
  background: transparent !important;
  font-size: 14px;
  line-height: 22.75px;
  min-height: 56px;
  padding: 0;
}

/* ── the context row is a duplicate ───────────────────────────────────────────
   Pick and Draw render twice: once as labelled buttons in the .composer-ctx row
   above the field, and again as icon buttons in .composer-foot below it. Same
   two actions, two places. The foot row is the better home — it sits with the
   other tools, and it keeps the card to a single column of content.

   Hiding the row also removes the "CONTEXT" label, which was a 10px/700
   uppercase micro-heading over a field that already says what it wants in its
   placeholder.

   CAVEAT: this hides Pro markup from CSS, which is a blunt instrument. If a
   selection hint (.composer-scope-hint) is rendered inside this row rather than
   beside it, it disappears with it — worth one look in the real editor. The
   proper fix is deleting the duplicate in the Pro bundle; this is the version
   reachable from here. */
.panel.dock-right .chat-composer .composer-ctx {
  display: none;
}

/* ── foot row: nothing should truncate ───────────────────────────────────────
   The model dropdown was rendering as "Cl…" — clipped mid-word. The tools sit
   left, the model and send sit right, and the row wraps rather than shaving
   characters off a control. */
/* NOT flex-wrap. The foot has a `flex: 1` spacer between the tools and the
   model/send cluster; on a wrapping row that spacer expands to fill line one
   and shoves Send onto a second line, which is what made the composer look
   broken with a longer model name ("Claude Opus 4.7").
   One row, and the model name is what yields if space runs out. */
.panel.dock-right .chat-composer .composer-foot {
  flex-wrap: nowrap;
  min-width: 0;
}

.panel.dock-right .chat-composer .composer-foot select,
.panel.dock-right .chat-composer .composer-foot .combo {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 132px;
}
.panel.dock-right .chat-composer .composer-foot select:not(:where([data-uc])),
.panel.dock-right .chat-composer .composer-foot .combo {
  height: 28px;
  border-radius: 999px;
  font-size: 12px;
  text-overflow: ellipsis;
}

/* ── composer: no inner focus ring, no inner fill ────────────────────────────
   Two things were still drawing a box inside the card.

   1. `.composer-input:focus-within` paints `box-shadow: 0 0 0 3px accent/.16`.
      Setting `border: 0` on that element earlier removed its border but did
      nothing to the shadow, so a 3px accent glow still outlined the inner
      wrapper the moment the field was focused — a second ring inside the card's
      own one.

   2. The textarea kept a fill from the global
      `.uich-composer-host textarea { background: var(--panel-bg-2) !important }`.
      That is overridden above, but the focused state re-asserted a surface, so
      it is pinned here for every state.

   Focus belongs to the card, once. Everything inside it is flat. */
.panel.dock-right .chat-composer .composer-input,
.panel.dock-right .chat-composer .composer-input:focus-within {
  box-shadow: none;
  border: 0;
  background: transparent;
}

/* Scoped to `.chat-composer textarea`, NOT `.composer-input textarea`: the
   earlier rule assumed the field is always wrapped in `.composer-input`, and if
   Pro renders it as a direct child the selector never matches — leaving the
   global `.uich-composer-host textarea { background: var(--panel-bg-2)
   !important }` to paint the dark rectangle. Matching on the composer itself
   covers both shapes. */
.panel.dock-right .chat-composer textarea:not(:where([data-uc])),
.panel.dock-right .chat-composer textarea:not(:where([data-uc])):focus,
.panel.dock-right .chat-composer textarea:not(:where([data-uc])):focus-visible,
.panel.dock-right .chat-composer textarea:not(:where([data-uc])):hover {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  outline: none !important;
}

/* Third copy of this selector in this file — see the two above. All three must
   agree or whichever lands last reinstates the grey fill. Focus lights the
   accent ring; the resting border is already at hover strength, so a border
   shift alone would be invisible. */
.panel.dock-right .chat-composer:focus-within {
  border-color: rgba(var(--accent-rgb), 0.90);
  background: var(--ctl-card);
  box-shadow: 0 0 0 1px var(--ctl-ring-soft);
}

/* ── portalled menus must stay inside the dock ────────────────────────────────
   The model picker opens past the panel's right edge, clipping its second tab.
   Its markup lives in the Pro bundle, but every portal-bearing component in the
   composer renders into `.uich-portal-root` (see components/ui/portal-context),
   which IS ours — so a width cap can be applied there even though the menu
   itself cannot be targeted directly.

   This is a guard, not the real fix. A menu anchored to a trigger near the
   panel's right edge will still be anchored there; capping the width only stops
   it running off. Genuine centring is `align="center"` plus a collision
   boundary on the Pro component — CSS cannot move a Radix-positioned popper
   without fighting its inline transform, which would break every other menu.

   UNVERIFIED: I cannot see the model picker render from here, so I cannot
   confirm it uses this portal. Worth one look in the editor. */
.uich-portal-root [role='listbox'],
.uich-portal-root [role='menu'],
.uich-portal-root [data-radix-popper-content-wrapper] > * {
  max-width: min(320px, calc(var(--uich-dock-w, 420px) - 24px));
}

/* ── the composer field is flat — beating an ID selector ─────────────────────
   Inspected in the real Elementor editor rather than guessed at. Three earlier
   attempts failed for one reason: the dark fill comes from rules carrying an
   **ID**, in the separately-enqueued panel stylesheet
   (uichemy-composer/assets/css/uichemy-composer-editor-panel.css):

     #uichemy-composer-floating-panel .uich-composer-host textarea
         background: var(--panel-bg-2) !important
     .uichemy-composer-floating-panel input…, textarea, select
         background-color: var(--uichemy-composer-input-bg) !important
         border: 1px solid var(--uichemy-composer-border-color) !important

   `!important` on both sides means specificity decides, and (1,2,1) with an ID
   beats (0,4,1) of classes however many classes are stacked. Adding the same ID
   here takes it to (1,5,1), which wins without touching that stylesheet — it
   styles every other panel input and must keep doing so.

   Scoped to `.chat-composer` so only the chat field is affected. */
#uichemy-composer-floating-panel .panel.dock-right .chat-composer textarea:not(:where([data-uc])),
#uichemy-composer-floating-panel .panel.dock-right .chat-composer textarea:not(:where([data-uc])):hover,
#uichemy-composer-floating-panel .panel.dock-right .chat-composer textarea:not(:where([data-uc])):focus,
#uichemy-composer-floating-panel .panel.dock-right .chat-composer textarea:not(:where([data-uc])):focus-visible {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

/* ── prompt box: a DS Textarea stays flush too ───────────────────────────────
   The three textarea rules above skip DS controls (`data-uc`). If the prompt
   field is ever a DS Textarea, it must still look exactly like today's bare
   field: no frame, no fill, no shadow and no DS brand focus ring, inside the
   one prompt-box frame. composer.css restates the DS field look at
   `body .uich-tw textarea[data-uc='textarea']` (0,2,2), up to (0,3,2) on
   :focus / :disabled and (0,5,2) on hover, and those do not use !important.
   So the flush properties are !important here, at (0,4,1)+ / (1,4,1)+. The
   geometry and type below match the bare field's right-dock values. */
.panel.dock-right .chat-composer textarea[data-uc='textarea'],
.panel.dock-right .chat-composer textarea[data-uc='textarea']:hover,
.panel.dock-right .chat-composer textarea[data-uc='textarea']:focus,
.panel.dock-right .chat-composer textarea[data-uc='textarea']:focus-visible,
.panel.dock-right .chat-composer textarea[data-uc='textarea']:disabled,
#uichemy-composer-floating-panel .panel.dock-right .chat-composer textarea[data-uc='textarea'],
#uichemy-composer-floating-panel .panel.dock-right .chat-composer textarea[data-uc='textarea']:hover,
#uichemy-composer-floating-panel .panel.dock-right .chat-composer textarea[data-uc='textarea']:focus,
#uichemy-composer-floating-panel .panel.dock-right .chat-composer textarea[data-uc='textarea']:focus-visible,
#uichemy-composer-floating-panel .panel.dock-right .chat-composer textarea[data-uc='textarea']:disabled {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.panel.dock-right .chat-composer textarea[data-uc='textarea'] {
  width: 100%;
  min-height: 56px;
  padding: 0;
  border-radius: 0;
  resize: none;
  color: var(--uich-text);
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 14px;
  line-height: 22.75px;
}

.panel.dock-right .chat-composer textarea[data-uc='textarea']::-moz-placeholder {
  color: var(--rp-chat-placeholder, var(--text-dim));
}

.panel.dock-right .chat-composer textarea[data-uc='textarea']::placeholder {
  color: var(--rp-chat-placeholder, var(--text-dim));
}

.panel.dock-right .chat-composer textarea[data-uc='textarea']:disabled {
  color: var(--uich-text);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Same treatment for the structural wrappers around the field. */
#uichemy-composer-floating-panel .panel.dock-right .chat-composer > div:not(.chat-limit-notice),
#uichemy-composer-floating-panel .panel.dock-right .chat-composer .composer-input,
#uichemy-composer-floating-panel .panel.dock-right .chat-composer .composer-input:focus-within {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* The card is defined by its BORDER, not a fill. Mirrors the class-scoped rule
   above — this copy exists only to carry the ID needed to outrank the legacy
   input stylesheet described at the top of this block, so the two must agree or
   the grey comes back through this one. */
#uichemy-composer-floating-panel .panel.dock-right .chat-composer {
  background: var(--ctl-card) !important;
  border: 1px solid var(--ctl-line) !important;
}

/* Focus: the ID copy above pins the resting border with !important, so the
   accent ring from the class-scoped :focus-within rule must be restated here
   at the same weight or keyboard focus is invisible (QA CLI-027). */
#uichemy-composer-floating-panel .panel.dock-right .chat-composer:focus-within {
  background: var(--ctl-card) !important;
  border-color: rgba(var(--accent-rgb), 0.90) !important;
  box-shadow: 0 0 0 1px var(--ctl-ring-soft) !important;
}

/* ── foot row: one height, one corner ────────────────────────────────────────
   Inspected in the running editor. The three tool buttons are shadcn Buttons
   carrying Tailwind utility classes, not `.composer-iconbtn` — so they are
   targeted structurally here. They were already ghost (transparent, no border),
   which is why they looked right; the earlier `.composer-iconbtn` rules simply
   never matched anything in the chat composer.

   Two real mismatches remained:
     · `.model-dd` renders 32px tall against 28px buttons — a 4px step in the row
     · the tool buttons sit at radius 4 while send is now a circle */
#uichemy-composer-floating-panel .panel.dock-right .composer-foot > button:not(:where([data-uc])):not(.composer-send) {
  border-radius: 999px;
}

#uichemy-composer-floating-panel .panel.dock-right .composer-foot > button:not(:where([data-uc])):not(.composer-send):hover {
  background: var(--rp-hover, rgba(128, 128, 128, 0.16));
}

/* Match the button height so the row sits on one baseline.
   Scoped to `.model-btn`, NOT `> *`. The open `.model-menu` is also a direct
   child of `.model-dd`, so the wildcard was pinning the MENU to 28px as well —
   and the menu is `overflow: hidden`, so it clipped to its tab row and nothing
   below it ever rendered. The dropdown looked broken rather than short. */
#uichemy-composer-floating-panel .panel.dock-right .composer-foot .model-dd {
  height: 28px;
  min-height: 28px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RADIUS SCALE  ·  right dock only
   ───────────────────────────────────────────────────────────────────────────
   Audited in the running editor: 62 rounded shapes across the panel used FIVE
   different radii —

     6px  ×41   fields, inputs, the mode switch      ← the panel's own --radius
     4px  ×16   icon buttons, chips, a textarea shell
     2px  ×2    segmented items
     5px  ×2    the spacing box (.sb-mar / .sb-pad)
     8px  ×1    a segmented track

   6px is what the panel already declares and what 2/3 of the shapes use, so
   everything lines up on the existing two-step token scale rather than a new
   value:

     --radius     6px   every container, field, track and box
     --radius-sm  4px   small items INSIDE one of those (≤24px tall)

   The strays come from Tailwind's rounded-sm/md/lg resolving off shadcn's own
   --radius (which is 0.4rem here, so rounded-md = 4.4px, not 6px) plus a few
   hand-written 5px/8px. Mapping the utilities onto our scale fixes all of them
   in one place instead of chasing each component.

   rounded-full / 999px is deliberately untouched — pills and circles stay round.

   Self-contained: delete from this banner to the end of the file to revert.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Containers, fields, tracks, boxes. */
#uichemy-composer-floating-panel .panel.dock-right .rounded,
#uichemy-composer-floating-panel .panel.dock-right .rounded-md,
#uichemy-composer-floating-panel .panel.dock-right .rounded-lg,
#uichemy-composer-floating-panel .panel.dock-right .rounded-xl,
#uichemy-composer-floating-panel .panel.dock-right .sb-mar,
#uichemy-composer-floating-panel .panel.dock-right .sb-pad {
  border-radius: var(--radius);
}

/* Small items sitting inside a container — segmented buttons, the drag handle,
   the unit pill, spacing cells. One step tighter so they nest visually.
   NOT var(--radius-sm): measured in the editor, that token resolves to
   `calc(6px - 4px)` = 2px inside the panel, not the 4px the base file declares
   — shadcn's own --radius is re-derived there. Using it produced ten 2px cells.
   4px is written literally so the step is what it says. */
#uichemy-composer-floating-panel .panel.dock-right .rounded-sm,
#uichemy-composer-floating-panel .panel.dock-right .lin-glyph,
#uichemy-composer-floating-panel .panel.dock-right .seg button,
#uichemy-composer-floating-panel .panel.dock-right .sb-cell {
  border-radius: 4px;
}

/* Pills and circles keep their shape. */
#uichemy-composer-floating-panel .panel.dock-right .rounded-full,
#uichemy-composer-floating-panel .panel.dock-right .composer-foot > button:not(:where([data-uc])) {
  border-radius: 999px;
}

/* ── the Chat tab, on the same scale ────────────────────────────────────────
   The Editor tab came down to 4px / 6px, but Chat has its own set: 12px on
   .empty-mark, 7px on .empty-card-step, 2px on the copy buttons, and 18px on
   the composer card. Audited in the editor, same as above.

   Rather than force everything to 6px — which would flatten the composer card
   and the empty-state cards into looking like fields — the scale gets a third
   step for large containers:

     4px   items inside a control
     6px   controls, fields, boxes
     12px  large containers (composer card, empty-state cards)

   Each step is roughly a doubling, so the three read as deliberate levels
   rather than near-misses like 5/6/7/8. */

/* Large containers. The composer card was 18px, taken from the shadcn chat
   reference, which sat oddly next to 6px fields — 12px keeps it soft without
   breaking the ladder. */
#uichemy-composer-floating-panel .panel.dock-right .chat-composer,
#uichemy-composer-floating-panel .panel.dock-right .empty-mark {
  border-radius: 12px;
}

/* The re-homed mode switch sits as a quiet row above the inspector. */
#uichemy-composer-floating-panel .panel.dock-right .panel-mode-row {
  display: flex;
  align-items: center;
  padding: 10px 16px 0;
}

/* ── colour field: an inset chip, not a fused block ──────────────────────────
   Ours renders the swatch as a 30px full-height cell with `border-right` acting
   as a divider, so the field reads as two boxes welded together and the swatch
   corners fight the field's own radius.

   The reference treats it as a small rounded chip floating inside one field:
   inset from every edge, its own 4px corner, no divider, hex text beside it.

   `.sw` and `.swatch-trigger` are both used (different call sites), so both are
   matched — same as the base rule. */
#uichemy-composer-floating-panel .panel.dock-right .swatch-input,
/* The Globals editor (composer-globals-workspace) is portalled OUTSIDE the
   floating panel, so it is named here too: same chip-in-field colour input. */
.gw .gw-insp.panel.dock-right .swatch-input {
  align-items: center;
  gap: 8px;
  padding: 0 5px 0 8px;
  overflow: visible;
}

#uichemy-composer-floating-panel .panel.dock-right .swatch-input .sw,
#uichemy-composer-floating-panel .panel.dock-right .swatch-input .swatch-trigger,
.gw .gw-insp.panel.dock-right .swatch-input .sw,
.gw .gw-insp.panel.dock-right .swatch-input .swatch-trigger {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-left: 0;
  border-radius: 4px;
  overflow: hidden;
  /* Tighter checker so the transparency pattern still reads at 18px — the 8px
     squares of the full-height version showed barely one tile in a chip. */
  background:
    linear-gradient(-45deg, var(--panel-bg-4) 25%, transparent 25%, transparent 75%, var(--panel-bg-4) 75%) 0 0 / 6px 6px,
    linear-gradient(-45deg, var(--panel-bg-4) 25%, transparent 25%, transparent 75%, var(--panel-bg-4) 75%) 3px 3px / 6px 6px;
}

/* The colour itself sits inside the chip, so it picks up the chip's corner. */
#uichemy-composer-floating-panel .panel.dock-right .swatch-input .sw::before,
#uichemy-composer-floating-panel .panel.dock-right .swatch-input .swatch-trigger::before,
.gw .gw-insp.panel.dock-right .swatch-input .sw::before,
.gw .gw-insp.panel.dock-right .swatch-input .swatch-trigger::before {
  border-radius: 4px;
}

/* The hex no longer needs the left padding that cleared the old divider. */
#uichemy-composer-floating-panel .panel.dock-right .swatch-input > input,
.gw .gw-insp.panel.dock-right .swatch-input > input {
  padding-right: 0;
  background: transparent;
}

/* ── chat status becomes a drawer under the composer ─────────────────────────
   Mechanism measured off ChatGPT's cowork tray (768px card, radius 28):

     tray  728 wide · inset 20px each side · radius 0 0 16 16
           bg black @ 3% · margin-top -20px · padding-top 20px · overflow clip

   The negative top margin slides the tray's box UNDER the card by exactly its
   own top padding, so the content lands below the card with no gap at all and
   the hidden top edge is clipped. That is the whole trick — not a sibling
   sitting below with the gap tuned to zero.

   Ours: `.chat2-main` is already a flex column holding
   `.chat-status → .chat2-body → .chat-composer`, so `order` moves the status
   row beneath the composer without touching the Pro markup. It carries the
   history button, the connection chip and the Widget/Page selector — the same
   class of content the reference tray holds. Scaled to our 12px card radius and
   16px side margins: the tray shares those 16px margins (flush with the card,
   QA: the 6px inset read as misalignment) and a 12px tuck. */
#uichemy-composer-floating-panel .panel.dock-right .chat2-main > .chat2-body { order: 1; }

#uichemy-composer-floating-panel .panel.dock-right .chat2-main > .chat-composer {
  order: 2;
  margin-bottom: 0;
  /* the card must paint over the drawer's hidden top edge */
  position: relative;
  z-index: 1;
}

/* DISABLED card (chat not connected / no widget). `.chat-composer.disabled` dims
   the WHOLE card with `opacity: .55`, which makes the card's solid fill
   translucent, and the status drawer is tucked 12px UNDER the card's bottom
   edge (the -12px margin above). So the drawer's top edge and fill showed
   through the card exactly where the toolbar row (+ · model · send) sits, and
   the row looked overlapped by the strip below. Keep the card itself opaque and
   dim what is INSIDE it instead: the same disabled look, but the card still
   hides the drawer's tucked top edge, so the toolbar row sits on one clean
   surface and the strip starts below the card. */
#uichemy-composer-floating-panel .panel.dock-right .chat2-main > .chat-composer.disabled {
  opacity: 1;
}
#uichemy-composer-floating-panel .panel.dock-right .chat2-main > .chat-composer.disabled > * {
  opacity: 0.55;
}

#uichemy-composer-floating-panel .panel.dock-right .chat2-main > .chat-status {
  order: 3;
  /* Same left/right edges as the card (16px margins), and the card's own
     inset (1px border + 14px / 8px padding) so the history button and the
     scope select line up with the + and Send buttons above. (QA overlap) */
  margin: -12px 16px 16px;
  padding: 19px 15px 7px 9px;
  border: 0;
  border-radius: 0 0 12px 12px;
  /* Literal grey — see the two rules above. This selector carries an ID, so it
     outranks both of them and is the one that actually paints the tray in the
     drawer; leaving the token here would have kept the strip white on a white
     panel even after the other two were fixed. */
  background: rgba(128, 128, 128, 0.12);
  overflow: clip;
  position: relative;
  z-index: 0;
  gap: 8px;
  font-size: 11.5px;
}

/* One row. The base `.chat-status` is `flex-wrap: wrap` and the Widget/Page
   selector sits in a `w-full` wrapper, so it dropped to a second line and made
   the drawer twice as tall as the reference's. */
#uichemy-composer-floating-panel .panel.dock-right .chat-status {
  flex-wrap: nowrap;
}

#uichemy-composer-floating-panel .panel.dock-right .chat-status > div {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  margin-right: auto;
}

/* ── Editor body: switch at its natural height, inspector takes the rest ─────
   `.panel-body` is a single-cell grid (`grid-template-rows: 1fr`). The
   re-homed mode switch and the Inspector share that one cell via this flex
   column, so the switch stays 32px instead of being stretched by the 1fr row —
   which is what put 147px of dead space above the inspector. */
#uichemy-composer-floating-panel .panel.dock-right .panel-editor-stack {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

#uichemy-composer-floating-panel .panel.dock-right .panel-editor-stack > .panel-mode-row {
  flex: 0 0 auto;
}

/* The Inspector's own wrapper must be the part that scrolls. */
#uichemy-composer-floating-panel .panel.dock-right .panel-editor-stack > *:not(.panel-mode-row) {
  flex: 1 1 auto;
  min-height: 0;
}

#uichemy-composer-floating-panel .panel.dock-right .panel-mode-row {
  padding: 10px 16px 2px;
}

/* Belt and braces: the drawer must never clip its own contents, whatever ends
   up in it. The selector yields before anything gets cut. */
#uichemy-composer-floating-panel .panel.dock-right .chat-status {
  overflow-x: clip;
}

/* ── connect flow, layout B ──────────────────────────────────────────────────
   Markup lives in the Pro bundle (editor/src/composer-chat.jsx, AgentPairing);
   the styles live here because every other chat class does.

   Replaces two expanded setup blocks and an "or" divider with one action and
   one status line. Measured before: 898px of content in a ~600px panel, the
   command clipped to 147px, and no feedback that anything was happening. */

/* The command wraps in full — it carries a password, so it has to be readable
   before anyone pastes it. */
#uichemy-composer-floating-panel .panel.dock-right .agent-cmd {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px 8px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--ctl-line);
  background: var(--rp-surface-sunken, rgba(128, 128, 128, 0.10));
}

#uichemy-composer-floating-panel .panel.dock-right .agent-cmd code {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-hi);
  white-space: pre-wrap;
  word-break: break-all;
}

#uichemy-composer-floating-panel .panel.dock-right .agent-cmd-secret {
  color: var(--text-dim);
}

/* One status line, swapping between hint and live wait. */

@keyframes uich-pair-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

/* Prefers-reduced-motion: the pulse is decorative, so it stops. */


/* ═══════════════════════════════════════════════════════════════════════════
   ONE TABBING LANGUAGE
   ───────────────────────────────────────────────────────────────────────────
   Every segmented control in the panel — the Chat/Editor/Code strip, the
   Design/Developer switch, the state and breakpoint tabs, the inline .seg
   toggles, the section-tab chips, the Pro bundle's Widget/Page pill — now reads
   the same way: a GREY track with a lighter GREY active chip sitting on it.

   The three languages this replaces:
     · Chat/Editor/Code   grey track (rgba(128,128,128,.14)), near-black active
                          tab (--panel-bg). Inverted: the ACTIVE tab was the
                          darkest thing in the row, so the row read as a hole
                          with two lit shoulders. This is the one that prompted
                          the change.
     · .seg / .state-tabs / .responsive-tabs / .field.pf .bg-muted
                          light-wash track (--panel-bg-2) with a lighter chip
                          (--panel-bg-4) — right direction, wrong ground: the
                          track sat ABOVE the panel instead of below it.
     · .mode-seg           active half filled solid --foreground with inverted
                          ink. A different figure/ground from both of the above.

   Colours come from --seg-track / --seg-track-line / --seg-thumb /
   --seg-thumb-hover / --seg-thumb-shadow (composer.css, dark in :root and light
   in the theme block below it), so a skin can re-point the language in one place.

   The hairline is an INSET box-shadow, never a border: several of these tracks
   already have a border contributing to their layout, and swapping its colour
   keeps the geometry identical — adding a border where there wasn't one would
   move every tab strip 2px.

   Geometry, radii, sizes and type are untouched. This is colour only.
   Self-contained: delete from this banner to the end of the file to revert.
   Last import in index.jsx, so it needs no !important except where a Tailwind
   utility class is the thing being overridden.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1 · tracks ───────────────────────────────────────────────────────────── */
.seg,
.iv2 .iv2-tablist,
.field.pf .bg-muted:has(button),
.uich-tw .bg-muted.rounded-lg:has(> button) {
  background: var(--seg-track);
  background-color: var(--seg-track);
  border-color: transparent;
  border-radius: var(--seg-radius);
  box-shadow: inset 0 0 0 1px var(--seg-track-line);
}

/* ── 2 · active chip ──────────────────────────────────────────────────────── */
.seg button.on,
.iv2 .iv2-tab[data-state='active'],
.field.pf .bg-muted:has(button) button.bg-background,
.uich-tw .bg-muted.rounded-lg:has(> button) > button.bg-background {
  background: var(--seg-thumb);
  background-color: var(--seg-thumb);
  color: var(--text-hi);
  border-color: transparent;
  border-radius: var(--seg-radius-inner);
  /* Hairline FIRST, drop shadow second: the inset ring draws the chip's edge and
     the shadow only separates it from the track. One box-shadow list, because a
     border would change the chip's box and shift the label by a pixel. */
  box-shadow: inset 0 0 0 1px var(--seg-thumb-line), var(--seg-thumb-shadow);
}

/* ── 3 · hover on the inactive segments ───────────────────────────────────── */
/* A wash at a third of the chip's weight: enough to answer the pointer, not
   enough to be mistaken for the active tab. */
.seg button:not(.on):hover,
.iv2 .iv2-tab:not([data-state='active']):hover,
.uich-tw .bg-muted.rounded-lg:has(> button) > button:not(.bg-background):hover {
  background: var(--seg-thumb-hover);
  background-color: var(--seg-thumb-hover);
  color: var(--text-hi);
  border-radius: var(--seg-radius-inner);
}

/* ── 4 · section-tab chips ────────────────────────────────────────────────── */

/* ── 5 · .mode-seg loses its inverted ink ─────────────────────────────────── */

/* ── 6 · concentric radii ─────────────────────────────────────────────────── */
/* Every segment takes the inner radius whether it is active or not. Without
   this only the active chip is rounded, so the moment you switch tabs the
   corner shape jumps from square to round — visible as a flicker on the tab you
   just left. The track's own radius is set alongside its fill in 1 · above,
   except for these families whose radius is declared on a different rule. */
.seg button,
.iv2 .iv2-tab,
.uich-tw .bg-muted.rounded-lg:has(> button) > button {
  border-radius: var(--seg-radius-inner);
}

.seg,
.iv2 .iv2-tablist,
.field.pf .bg-muted:has(button) {
  border-radius: var(--seg-radius);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STOP  ·  icon only, same circle as send
   ───────────────────────────────────────────────────────────────────────────
   Stop replaces Send in the same slot while the agent is working, so it has to
   be the same shape. It was a labelled pill ("■ Stop"), which meant the footer
   row changed width the moment a message was sent, and put a second piece of
   text in a row that is otherwise four glyphs.

   Right dock only, exactly like the send treatment above it — the bottom dock
   keeps both buttons labelled, so the pair stays consistent in each layout.

   Carries #uichemy-composer-floating-panel for the same reason send does: the
   panel's own stylesheet styles buttons through that ID, and a class-only
   selector loses to it however many classes are stacked.
   ═══════════════════════════════════════════════════════════════════════════ */
/* Stop is a DS Button (outline, sm) now. The square icon-only geometry still
   applies to it so it matches the DS IconButtons beside it; the pill radius and
   the danger colours below are for the old non-DS button only. */
#uichemy-composer-floating-panel .panel.dock-right .composer-stop {
  flex: 0 0 auto;
  width: 28px;
  min-width: 28px;
  height: 28px;
  /* !important because the button carries Tailwind's `px-2.5`. */
  padding: 0 !important;
  gap: 0;
}
#uichemy-composer-floating-panel .panel.dock-right .composer-stop:not(:where([data-uc])) {
  border-radius: 999px;
}

#uichemy-composer-floating-panel .panel.dock-right .composer-stop .composer-stop-label {
  display: none !important;
}

/* The red hover has to survive the generic foot-button hover
   (`.composer-foot > button:not(.composer-send):hover`, grey). That one is
   (1,5,1) — the extra point is its `button` ELEMENT — so a class-only match at
   (1,5,0) loses no matter that this block sits later in the file. Measured, not
   assumed: with `.composer-stop:hover` the border and text went red and the
   background stayed grey, because background was the only property the two
   rules both declared. Naming `button` here levels it at (1,5,1), and source
   order then decides. */
#uichemy-composer-floating-panel .panel.dock-right .composer-foot > button.composer-stop:not(:where([data-uc])):hover {
  background: var(--rp-danger-soft, rgba(220, 60, 60, 0.22));
  border-color: var(--rp-danger, rgba(220, 60, 60, 0.55));
  color: var(--rp-danger, #f06060);
}

/* A touch larger with no label beside it to balance against. */
#uichemy-composer-floating-panel .panel.dock-right .composer-stop .stop-icon {
  width: 9px;
  height: 9px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SLIDING PILL  ·  tool tab strip (Chat / Editor / Code)
   ───────────────────────────────────────────────────────────────────────────
   The active state used to be a background on the tab itself, so switching tabs
   made the chip vanish in one cell and appear in another — two things blinking
   rather than one thing moving.

   The pill itself comes from `.seg-slide` (composer.css), the same travelling
   chip every other segmented control in the composer uses, measured by
   useSlidingSeg. All that is left here is what the strip needs on top of it:
   the tabs stop drawing chips of their own, and the pill's corner is squared up
   with the tabs'. Everything else — fill, hairline, shadow, easing — is shared,
   so the strip cannot drift from the rest of the panel.

   Self-contained: delete from this banner to the end of the file to revert, and
   drop `seg-slide` + the ref + the data-state props in composer-app.jsx.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   MINIMAL  ·  surfaces, not boxes
   ───────────────────────────────────────────────────────────────────────────
   Standing direction: the panel is minimal in BOTH themes — controls are read
   from their fill and from the space around them, not from a 1px line.

   Measured before writing this (a light + dark panel rendered against the built
   stylesheet, then every element with a visible computed border enumerated).
   Six sources, structurally identical in the two themes:

     .acc            ×4  section dividers
     textarea        ×1  the Content field shell, all four sides
     .chat-composer  ×1  the prompt box, all four sides
     .model-btn      ×1  the model picker, all four sides
     .chat-status    ×1  bottom
     .panel          ×1  the dock's own outer edge

   Only the last of those is a structural boundary — it separates the panel from
   the host editor's chrome. It keeps a line, softened to --min-line. Every other
   one becomes a fill or nothing.

   Why light was the trigger: all of these drew ONE token, #e8e8e8 in light and
   #27272a in dark. On near-black that is invisible and the panel looked clean;
   on white the same line is a hard rule, so the light panel read as a stack of
   boxes. The replacements are neutral-grey alphas, which resolve correctly on
   either ground.

   Self-contained: delete from this banner to the end of the file to revert.
   ═══════════════════════════════════════════════════════════════════════════ */

/* 2 · the Content field: a soft-filled well, no outline. `border-color`, not
       `border: 0`, so the 1px stays in the box model and the field does not
       shift by a pixel. Beats Tailwind's `.uich-tw .border-input` (0,2,0). */
/*     (Hand-built textareas only: the DS Textarea, `data-uc`, draws its own
       inset border and fill.) */
#uichemy-composer-floating-panel .panel.dock-right .text-row-area > textarea:not(:where([data-uc])) {
  border-color: transparent !important;
  background-color: var(--min-fill) !important;
  box-shadow: none !important;
}

#uichemy-composer-floating-panel .panel.dock-right .text-row-area > textarea:not(:where([data-uc])):hover {
  background-color: var(--min-fill-hover) !important;
}

/* 4 · the prompt box is the ONE exception to this block — it keeps its
       `--ctl-card` fill AND its `--ctl-line` border, in both states. It was
       stripped like everything else at first, which was wrong: this is the
       panel's primary input, and it is the one surface where the outline is the
       point rather than clutter. Nothing to declare here — the pre-existing
       resting and :focus-within rules further up already state that look, and
       they already agree with each other, so both states match by default. */

/* 5 · the status strip under the composer. The Widget/Page pill inside it is a
       filled track and defines itself; the rule under it separated nothing. */
.chat-status {
  border-bottom: 0;
}

/* 6 · the one line that stays: the dock's own edge against the host editor.
       Softened from the shared panel-line token to --min-line. */
.panel.dock-right {
  border-color: var(--min-line);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONSTRUCT PANEL  ·  right dock only
   ───────────────────────────────────────────────────────────────────────────
   The Loop / Form panel is the one part of the inspector that was still drawn
   in a second design system. It is built from the shadcn recipes
   (`border border-input`, `h-8`, `rounded-md`, `hsl(var(--muted))`) while every
   other section in this dock is drawn from the panel's own `--ctl-*` / `--pf-*`
   tokens. Side by side in one scroll that reads as two panels stitched together:

     · the accordion head sat at 13px against the section heads' 14px, in
       --text-mid against their --text-hi, and kept a divider the sections
       dropped in the MINIMAL pass;
     · the body used its own 4/16/16 padding and 14px gap instead of the
       section rhythm (14/16/18, 12px);
     · selects painted a shadcn box while text inputs painted nothing, so a
       column of controls read as ragged even though the grid had them on one
       axis;
     · every label carried 4px of bottom padding — correct when the label is
       ABOVE its control (bottom dock), 4px off-axis when it sits BESIDE it on
       this dock's centre-aligned row.

   Nothing new is introduced here: every value below is the token or the literal
   the equivalent native rule already uses. Keep them in sync with
   `.acc-head` / `.section` / `.field.pf .border-input` above.

   Self-contained: delete from this banner to the end of the file to revert.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1 · accordion head: identical to a section head ───────────────────────── */
/* `.acc` loses its divider in the MINIMAL block; this must lose it too, or Loop
   is the only row in the scroll still drawing a line. */
.panel.dock-right .construct-accordion {
  border-bottom: 0;
}

/* Mirrors `.acc-head`: 18px above the label (space between this section and the
   one closing above it), 12px below, and the same type scale and full-contrast
   ink whether the section is open or closed. */
.panel.dock-right .construct-accordion-head {
  padding: 18px var(--pf-sec-pad-x) 12px;
  font-size: var(--pf-sec-fs);
  font-weight: var(--pf-sec-fw);
  color: var(--text-hi);
}

/* `.acc-head` keeps its background transparent in both states — the caret and
   the body carry the open/closed signal, a filled bar would make this row the
   only highlighted section in the list. */
.panel.dock-right .construct-accordion-head:hover,
.panel.dock-right .construct-accordion.is-open > .construct-accordion-head {
  color: var(--text-hi);
  background: transparent;
}

/* ── 2 · body rhythm: identical to `.section` ──────────────────────────────── */
.panel.dock-right .uich-construct-body {
  padding: var(--pf-sec-head-gap) var(--pf-sec-pad-x) var(--pf-sec-pad-b);
  gap: var(--pf-row-gap);
}

.panel.dock-right .construct-accordion-body {
  padding-bottom: 0;
}

/* One column of full-width rows, at the section row-gap. The 1fr 1fr grid is a
   bottom-dock layout; the reset to a single column already exists above, this
   only brings the gap onto the shared scale. */
.panel.dock-right .uich-construct-grid {
  gap: var(--pf-row-gap) 12px;
}

/* Sub-heads (Filtering / Published date / …) sit flush in the gutter the body
   already provides, on the same left edge as the labels below them. */
.panel.dock-right .uich-construct-body .subsection.uich-construct-sub {
  margin-right: 0;
  margin-left: 0;
  padding-right: 0;
  padding-left: 0;
}

/* ── 3 · rows: label beside its control, on one axis ───────────────────────── */
/* The dock lays `.field.pf` out as `96px | 1fr`, centre-aligned. A label with
   bottom padding is no longer centred against its control, which is what tilted
   every row. */
.panel.dock-right .uich-construct-body .field.pf > .pf-label {
  padding: 0;
}

/* ── 4 · controls ──────────────────────────────────────────────────────────
   Deliberately empty. The panel's controls are styled by
   `.panel.dock-right .field.pf .border-input` above, and the construct tab now
   builds its fields the same way every other field in the panel is built —
   frame on a wrapper <div class="… border-input …">, transparent control
   inside (see FRAME_CLS in composer-construct-tab.jsx). So it inherits the
   fill, height, radius, hover and focus states with no rules of its own; a
   second definition here would be one more place to drift out of sync. */

/* Checkbox rows and switches line up on the same left edge as the fields. */
.panel.dock-right .uich-construct-body .uich-construct-check,
.panel.dock-right .uich-construct-body .uich-construct-switchrow {
  padding-right: 0;
  padding-left: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Animation panel — the stepper inside the field                     [ui-ux]

   The two-box layout above is right for a length row, where the value is one of
   forty and the stepper is a shared affordance. It is wrong for the Animation
   panel: there the value loses width to a box beside it, and Ease — which has no
   stepper — ends up WIDER than every field above it, so the column of controls
   runs down the panel with a ragged right edge.

   `inset` (composer-inputs.jsx) puts the value, the unit pill and the stepper in
   ONE box, so every row in the panel ends on the same edge, Ease included. These
   rules just undo the standalone box's own chrome — it is a divider now, not a
   container.
   ═══════════════════════════════════════════════════════════════════════════ */

.panel.dock-right .lin-step.is-inset {
  height: auto;
  align-self: stretch;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--panel-line);
  border-radius: 0;
  background: none;
  /* Hidden at rest so a panel of eight values reads as eight values, not as
     sixteen buttons — but it still occupies its width, so nothing shifts when
     it appears. Revealed on hover AND focus-within, so it is reachable by
     keyboard and not only by mouse. */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.panel.dock-right .lin-ig:hover .lin-step.is-inset,
.panel.dock-right .lin-ig:focus-within .lin-step.is-inset {
  opacity: 1;
  pointer-events: auto;
}

/* ---- group heading: left-aligned, not centred ----
   Centred small caps between two tinted rules reads as SELECTED text — in the
   panel it genuinely looked like a highlighted word. Dropping the leading rule
   turns the same parts into a heading, with the trailing rule fading out to the
   right the way `.subsec` already draws it elsewhere. */
.panel.dock-right .subsec.uich-motion-subsec {
  justify-content: flex-start;
  margin-top: 16px;
}

.panel.dock-right .uich-motion-subsec .subsec-rule:first-child { display: none; }

/* ---- values in the UI sans ----
   Mono is right in the code view; in a property panel it makes every number
   look like a token rather than something you can change. The same call the
   minimal skin already made for `.prop-input-stack .linput input`, which does
   not reach these because the motion fields render LengthInput's own markup.

   Matched on the `pf-motion-` prefix that MotionField puts on every one of its
   fields (`pf-motion-${v.name}`), so no other length row is touched. */
.panel.dock-right .field.pf[class*="pf-motion-"] .lin-ig input {
  font-family: inherit;
  --uich-ff: inherit;
  font-variant-numeric: tabular-nums;
}

/*
 * The RIGHT-SIDE PANEL on the UiChemy design system.
 *
 * Jay (2026-09-28): the composer panel docked right should look exactly like
 * the UiChemy page builder's style panel — UiChemy DS colours and components,
 * in every skin — and NOTHING else in the composer changes (canvas toolbar,
 * selection outline, admin screens keep their own look).
 *
 * That line originally read "in every skin, ALWAYS DARK whatever the light/dark
 * toggle says". The clause was about SKINS: the panel must not pick up
 * Elementor's or Gutenberg's palette. Read literally it also opted the panel out
 * of the composer's own toggle, which is not what was meant — there is one
 * UiChemy DS with a dark mode and a light mode, and the panel has both as of
 * 2026-10-02. The dark palette is the block below; the light one follows it.
 * Dropdowns are the exception and stay dark — see the scope note on that block.
 *
 * Two elements carry the scope, both given `uc-chrome` by composer-app.jsx:
 *   .panel.dock-right   the panel itself
 *   .uich-rp            the shared portal root while the panel is docked right —
 *                       every pop-up opened from the panel (menus, colour picker,
 *                       Globals / Sync / Import dialogs, the floating Layers
 *                       window) mounts there, outside the panel's DOM.
 *
 * Everything below is a token override. The panel's rules read these tokens, so
 * re-pointing them here re-colours the panel without touching a rule that the
 * rest of the composer shares. The selector weight (0,4,0) beats the skin and
 * bridge blocks that match the same elements (`.uich-tw .panel[data-theme]` and
 * `.uich-tw.skin-elementor.dark` are 0,3,0; `.panel.dock-right` is 0,2,0).
 *
 * Values: design-system/styles/tokens.css `.uc-chrome` — the page builder's
 * panel. shadcn tokens are HSL triplets, converted exactly (e.g. 92.16% for
 * #EBEBEB; 92.2% rounds to #ECECEC). No composited or in-between greys.
 *
 * `--rp-*` ROLE TOKENS exist ONLY in this scope. A rule shared with the rest of
 * the composer writes its colour as `var(--rp-<role>, <its old literal>)`:
 * outside the panel the token is undefined and the old literal renders exactly
 * as before; inside, the DS value does.
 */

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome {
  /* ---- shadcn layer ---------------------------------------------------- */
  --background: 0 0% 9.02%;             /* #171717 surface-base */
  --foreground: 0 0% 100%;              /* #FFFFFF text-strong */
  --card: 0 0% 9.02%;
  --card-foreground: 0 0% 100%;
  --popover: 0 0% 14.12%;               /* #242424 surface-overlay */
  --popover-foreground: 0 0% 100%;
  --primary: 0 0% 96.08%;               /* #F5F5F5 inverse-bg */
  --primary-foreground: 0 0% 9.02%;     /* #171717 inverse-fg */
  --secondary: 0 0% 12.55%;             /* #202020 surface-raised */
  --secondary-foreground: 0 0% 100%;
  --muted: 0 0% 12.55%;
  --muted-foreground: 0 0% 60.39%;      /* #9A9A9A text-muted: 6.8:1 on #101010, 6.4:1 on #171717, 5.8:1 on #202020 (#737373 was 4.01:1 on #101010) */
  --accent: 0 0% 14.12%;                /* #242424 */
  --accent-foreground: 0 0% 100%;
  --destructive: 357.8 90.1% 64.3%;     /* #F65258 danger */
  --destructive-foreground: 0 0% 100%;
  --border: 0 0% 20%;                   /* #333333 border-subtle */
  --input: 0 0% 25.1%;                  /* #404040 border */
  --ring: 0 0% 63.92%;                  /* #A3A3A3 */
  /* construct / status markers (Jay: loop = orange, form = green) */
  --status-data: 205.3 100% 52.5%;      /* #0D99FF canvas-select */
  --status-loop: 15.9 98% 60%;          /* #FD6A35 brand */
  --status-condition: 33 100% 62.5%;    /* #FFA940 warning */
  --status-form: 130.8 56% 41%;         /* #2EA343 success */
  --status-ok: #2EA343;

  /* ---- legacy composer layer -------------------------------------------- */
  --panel-bg: #171717;
  --panel-bg-2: #202020;
  --panel-bg-3: #242424;
  --panel-bg-4: #242424;
  --panel-line: #333333;
  --panel-line-2: #404040;
  --text-hi: #FFFFFF;
  --uich-text: #A3A3A3;
  --text-mid: #737373;
  --text-dim: #525252;
  --accent-rgb: 255, 255, 255;
  --accent-2: #F5F5F5;
  --accent-bg: rgba(255, 255, 255, 0.10);
  --bg-canvas: #101010;
  --bg-canvas-ink: #A3A3A3;
  --uich-danger: #F65258;
  --ok: #2EA343;
  --warn: #FFA940;
  --brand-green: #2EA343;
  --ai-glyph-from: #FFC574;             /* the AI mark is UiChemy orange */
  --ai-glyph-to: #FD6A35;

  /* controls (composer-dock.css) — DS control fill / hover / press washes */
  --ctl-line: #404040;                  /* border */
  --ctl-line-hover: #525252;            /* border-strong */
  --ctl-line-focus: #525252;
  --ctl-fill: rgba(255, 255, 255, 0.05);          /* surface-control */
  --ctl-fill-hover: rgba(128, 128, 128, 0.10);    /* glow-hover */
  --ctl-fill-active: rgba(128, 128, 128, 0.18);   /* glow-press */
  --ctl-ring: rgba(245, 245, 245, 0.55);          /* ring */
  --ctl-ring-soft: rgba(255, 255, 255, 0.12);     /* brand-soft on dark */

  /* the composer's own segmented controls, on the DS pill-tab look */
  --seg-track: #101010;                 /* surface-sunken */
  --seg-track-line: #333333;            /* border-subtle hairline, as the DS track */
  --seg-thumb: #202020;                 /* surface-raised */
  --seg-thumb-line: transparent;
  --seg-thumb-hover: rgba(128, 128, 128, 0.10);
  --seg-thumb-shadow: var(--uc-shadow-control, 0 1px 2px rgba(0, 0, 0, 0.22));

  /* minimal-surface washes */
  --min-line: #333333;
  --min-fill: rgba(255, 255, 255, 0.05);
  --min-fill-hover: rgba(128, 128, 128, 0.10);

  /* undefined tokens the panel's rules reference (their fallbacks rendered) */
  --text-lo: #9A9A9A;                   /* was #737373: 4.01:1 on #101010 */
  --surface-2: rgba(128, 128, 128, 0.10);
  --panel-border: #333333;
  --panel-line-3: #525252;
  --border-subtle: #333333;
  --border-mid: #404040;

  /* the pill tab track, which the DS leaves at a raw light #F2F2F2 */
  --uc-tab-track-bg: var(--uc-surface-sunken);
  --uc-tab-track-stroke: inset 0 0 0 1px var(--uc-border-subtle);

  /* The DS `.uc-chrome` value (#737373) is 4.01:1 on the #101010 pill track and
     3.44:1 on #202020. Re-pointed here, in the panel scope only, so the DS page
     builder and the admin screens keep theirs. */
  --uc-text-muted: #9A9A9A;

  /* ---- --rp-* role tokens (this scope only; see the header) ------------ */
  --rp-surface-sunken: #101010;
  --rp-surface-base: #171717;
  --rp-surface-raised: #202020;
  --rp-surface-overlay: #242424;
  --rp-surface-control: rgba(255, 255, 255, 0.05);
  --rp-hover: rgba(128, 128, 128, 0.10);
  --rp-press: rgba(128, 128, 128, 0.18);
  --rp-text-strong: #FFFFFF;
  --rp-text: #A3A3A3;
  --rp-text-muted: #9A9A9A;             /* was #737373: 4.01:1 on #101010, 3.44:1 on #202020 */
  --rp-text-subtle: #525252;
  --rp-border-subtle: #333333;
  --rp-border: #404040;
  --rp-border-strong: #525252;
  --rp-inverse-bg: #F5F5F5;
  --rp-inverse-fg: #171717;
  --rp-ring: rgba(245, 245, 245, 0.55);
  --rp-brand: #FD6A35;
  --rp-brand-lighter: #FFB89A;
  --rp-brand-soft: rgba(253, 106, 53, 0.16);
  --rp-success: #2EA343;
  --rp-success-fg: #A7EAAA;
  --rp-success-soft: rgba(46, 163, 67, 0.20);
  --rp-warning: #FFA940;
  --rp-warning-fg: #FFC680;
  --rp-warning-soft: rgba(255, 169, 64, 0.22);
  --rp-warning-border: rgba(255, 169, 64, 0.42);
  --rp-danger-border: rgba(246, 82, 88, 0.40);
  --rp-success-border: rgba(46, 163, 67, 0.40);
  --rp-danger: #F65258;
  --rp-danger-fg: #FDC9C6;
  --rp-danger-soft: rgba(246, 82, 88, 0.20);
  --rp-select: #0D99FF;
  --rp-scrim: oklch(20% 0.01 285 / 0.44);   /* DS Dialog overlay */
  --rp-shadow-control: var(--uc-shadow-control);
  --rp-shadow-3: var(--uc-shadow-3);
  --rp-shadow-4: var(--uc-shadow-4);
  --rp-shadow-5: var(--uc-shadow-5);

  /* DS layer order, lifted above the docked panel (z-index 9999) and the WP
     admin bar (99999) — the DS defaults (1100–1300) would open every menu,
     select and dialog UNDER the panel. Kept below the canvas selection chrome
     (2147482500+). Only the portal root and the panel carry this scope. */
  --uc-z-overlay: 100100;
  --uc-z-dialog: 100200;
  --uc-z-dropdown: 100250;
  --uc-z-tooltip: 100300;

  /* the DS typeface, as in the page builder (the Elementor skin sets Roboto
     on the host; declaring it here is what stops that inheriting) */
  font-family: var(--uc-font-sans, "Zalando Sans", ui-sans-serif, system-ui, sans-serif);
  --uich-ff: var(--uc-font-sans, "Zalando Sans", ui-sans-serif, system-ui, sans-serif);
}

/* ---- The same panel in LIGHT mode (Jay, 2026-10-02) ----------------------
   The block above is the UiChemy DS dark palette, and the note at the top of
   this file ("ALWAYS DARK whatever the toggle says") was about SKINS: the panel
   must not pick up Elementor's or Gutenberg's colours. It was never meant to
   opt the panel out of the composer's own light/dark toggle, so light mode now
   re-points the same three layers — shadcn, legacy and --rp-* — to the DS LIGHT
   values (tokens.css `.uc-content`), exactly as `.uc-dialog-light` does below.

   SCOPED TO THE PANEL ONLY, deliberately. The dark block above matches two
   elements, `.panel.dock-right` AND `.uich-rp` (the portal root every menu,
   select, colour picker and dialog mounts into). BOTH are listed: pop-ups
   follow the theme now, so a lit panel gets lit menus. (They were deliberately
   left dark at first; the portal root was added to this list when that changed.)
   `uc-dialog-light` still exists for a dialog that wants light on a dark panel.

   SPECIFICITY: the dark block is (0,4,0), so a plain `[data-…-theme="light"]`
   (0,1,0) could never reach it — that is the whole reason the panel ignored the
   toggle. The first two selectors below are (0,5,0) and win outright; the last
   three are (0,4,0) and win on order, being later in the same file. The theme
   attribute is written to several hosts by applyTheme (composer-app.jsx) — the
   composer host, the panel itself and the owning document's body, under both
   `data-theme` and `data-uich-composer-theme` — so each is matched here. */
:is(.uich-composer-host, .uich-tw, body)[data-uich-composer-theme="light"] .panel.dock-right.uc-chrome,
:is(.uich-composer-host, .uich-tw, body)[data-theme="light"] .panel.dock-right.uc-chrome,
.panel.dock-right.uc-chrome[data-uich-composer-theme="light"],
.panel.dock-right.uc-chrome[data-theme="light"],
[data-uich-composer-theme="light"] .panel.dock-right.uc-chrome,
/* The portal root joins the panel now that pop-ups follow the theme: it owns
   the shadcn (--popover, --border) and legacy (--panel-*) layers every menu,
   select, colour picker and dialog reads. The --uc-* layer is handled by the
   shared rule at the end of this file, which also reaches `.uc-pop-dark`. */
:is(.uich-composer-host, .uich-tw, body) .uich-rp.uc-chrome[data-uich-composer-theme="light"],
:is(.uich-composer-host, .uich-tw, body) .uich-rp.uc-chrome[data-theme="light"] {
  color-scheme: light;

  /* ---- shadcn layer (exact HSL of the DS light values) ----------------- */
  --background: 0 0% 100%;              /* #FFFFFF surface-raised */
  --foreground: 0 0% 3.92%;             /* #0A0A0A text-strong */
  --card: 0 0% 100%;
  --card-foreground: 0 0% 3.92%;
  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 3.92%;
  --primary: 0 0% 9.02%;                /* #171717 inverse-bg */
  --primary-foreground: 0 0% 100%;
  --secondary: 0 0% 95.69%;             /* #F4F4F4 surface-base */
  --secondary-foreground: 0 0% 3.92%;
  --muted: 0 0% 95.69%;
  --muted-foreground: 0 0% 45.1%;       /* #737373 text-muted */
  --accent: 0 0% 92.16%;                /* #EBEBEB surface-sunken */
  --accent-foreground: 0 0% 3.92%;
  --border: 0 0% 90.98%;                /* border (rgba .09 on white) */
  --input: 0 0% 85.88%;                 /* border-strong (rgba .14 on white) */
  --ring: 0 0% 45.1%;

  /* ---- legacy composer layer ------------------------------------------- */
  --panel-bg: #FFFFFF;
  --panel-bg-2: #F4F4F4;
  --panel-bg-3: #EBEBEB;
  --panel-bg-4: #EBEBEB;
  --panel-line: rgba(0, 0, 0, 0.09);
  --panel-line-2: rgba(0, 0, 0, 0.14);
  --panel-line-3: rgba(0, 0, 0, 0.22);
  --panel-border: rgba(0, 0, 0, 0.09);
  --border-subtle: rgba(0, 0, 0, 0.055);
  --border-mid: rgba(0, 0, 0, 0.14);
  --text-hi: #0A0A0A;
  --uich-text: #171717;
  --text-mid: #737373;
  --text-dim: #A3A3A3;
  --text-lo: #737373;
  --accent-rgb: 23, 23, 23;
  --accent-2: #171717;
  --accent-bg: rgba(0, 0, 0, 0.06);
  --surface-2: rgba(128, 128, 128, 0.10);
  /* The outer canvas behind the panel, and its ink. Not in `.uc-dialog-light`
     (a dialog has no canvas) — taken from the same DS ramp: sunken + text. */
  --bg-canvas: #EBEBEB;
  --bg-canvas-ink: #171717;

  /* controls */
  --ctl-line: rgba(0, 0, 0, 0.14);
  --ctl-line-hover: rgba(0, 0, 0, 0.22);
  --ctl-line-focus: rgba(0, 0, 0, 0.22);
  --ctl-fill: #FFFFFF;
  --ctl-fill-hover: rgba(128, 128, 128, 0.10);
  --ctl-fill-active: rgba(128, 128, 128, 0.18);
  --ctl-ring: rgba(23, 23, 23, 0.40);
  --ctl-ring-soft: rgba(0, 0, 0, 0.06);

  /* Segmented controls. The track is `surface-base`, NOT `surface-sunken`:
     sunken (#EBEBEB) is an 8% step below the white card these now sit on, and
     on a light surface that reads as a grey slab — dark's equivalent step
     (#202020 card → #101010 track) is about half that perceptually, so light
     came out heavier than dark rather than matching it. #F4F4F4 is the 4% step
     that does match. The thumb stays white and keeps its shadow, which is what
     separates it from the track at this contrast.
     --uc-tab-track-bg does the same for the DS pill Tabs (Chat | Editor |
     Code), whose track defaults to --uc-surface-sunken; it is set here rather
     than on .rp-insp because that bar sits on the panel, above the inspector. */
  --seg-track: var(--uc-surface-base);
  --uc-tab-track-bg: var(--uc-surface-base);
  --seg-track-line: rgba(0, 0, 0, 0.055);
  --seg-thumb: #FFFFFF;

  /* minimal-surface washes */
  --min-line: rgba(0, 0, 0, 0.09);
  --min-fill: rgba(0, 0, 0, 0.03);
  --min-fill-hover: rgba(128, 128, 128, 0.10);

  /* ---- --rp-* role tokens ---------------------------------------------- */
  --rp-surface-sunken: #EBEBEB;
  --rp-surface-base: #F4F4F4;
  --rp-surface-raised: #FFFFFF;
  --rp-surface-overlay: #FFFFFF;
  --rp-surface-control: #FFFFFF;
  --rp-text-strong: #0A0A0A;
  --rp-text: #171717;
  --rp-text-muted: #737373;
  --rp-text-subtle: #A3A3A3;
  --rp-border-subtle: rgba(0, 0, 0, 0.055);
  --rp-border: rgba(0, 0, 0, 0.09);
  --rp-border-strong: rgba(0, 0, 0, 0.14);
  --rp-inverse-bg: #171717;
  --rp-inverse-fg: #FFFFFF;
  --rp-ring: rgba(23, 23, 23, 0.40);
  --rp-brand-soft: #F0F0F0;
  --rp-success-fg: #0A842A;
  --rp-success-soft: #E7FFE7;
  --rp-warning-fg: #AA712B;
  --rp-warning-soft: #FFEDD8;
  --rp-danger-fg: #D12D37;
  --rp-danger-soft: #FFF2EF;
  /* Field wells. The dark value is hardcoded in two places
     (composer-right-panel-layout.css and composer.css) with no light answer, so
     without this every field in the panel stays a near-black slab. A light grey
     well (DS surface-base, #F4F4F4) rather than white, so inputs, selects, length
     and colour boxes read as fields against the white section boxes. */
  --rp-field-bg: var(--uc-surface-base, #F4F4F4);

  /* Brand, status and selection hues (--rp-brand, --rp-select, --uich-danger,
     --ok, --warn, --ai-glyph-*) are the same in both themes and are inherited
     from the dark block above, as are the raised z-index scale and the DS
     typeface. --rp-scrim stays dark: a dialog overlay dims in both themes. */

}

/* An open library row in the Code tab used a raw white wash
   (rgba(255,255,255,.06), composer.css `.dep.dep-open`) — the DS hover wash. */
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep.dep-open {
  background: var(--rp-hover);
}

/* Gradient builder uses the same DS inner surface as media and content wells. */
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .gp {
  background: var(--uc-surface-base);
}

/* ---- Pop-ups must open ABOVE the docked panel ------------------------------
   The z-index tokens above are set on the portal root, but every DS pop-up
   (menu, select, popover, tooltip, dialog) carries the DS's own `.uc-portal`
   scope class, and tokens.css re-declares the whole token set — the 1100–1300
   z-index scale included — on `.uc-portal`. So each pop-up reset itself to
   z 1250 and opened UNDER the panel (z-index 9999): the trigger toggled, the
   menu rendered, and nothing could be seen. Re-declare the raised scale on the
   pop-ups themselves, inside the right panel's portal root only. */
:is(.uich-composer-host, .uich-tw, body) .uich-rp.uc-chrome :is(.uc-portal, .uc-pop-dark, [data-radix-popper-content-wrapper]) {
  --uc-z-overlay: 100100;
  --uc-z-dialog: 100200;
  --uc-z-dropdown: 100250;
  --uc-z-tooltip: 100300;
}

/* The canvas portal root (the floating text toolbar's menus: Font, Weight,
   colour and dynamic pickers) kept the DS default 1250. The selection overlay
   with its resize dots sits at 9998 on the front end and ~2147482100 inside
   the Elementor preview, so the dots drew across an open Font list (QA). Lift
   that root's pop-ups above the overlay, the box handles and the toolbar host
   (2147482500), and below nothing but the toolbar tooltips. */
.uich-portal-root-canvas,
.uich-portal-root-canvas :is(.uc-portal, .uc-pop-dark, [data-radix-popper-content-wrapper]) {
  --uc-z-overlay: 2147482800;
  --uc-z-dialog: 2147482900;
  --uc-z-dropdown: 2147482950;
  --uc-z-tooltip: 2147483000;
}

/* ---- Dialogs are LIGHT (Jay, 2026-09-29: "I don't want dark popups") -----
   Dialogs only: menus, popovers, tooltips and pickers stay dark. The DS
   Dialog's positioner carries `uc-portal` (DS light tokens) + `uc-dialog-light`
   instead of `uc-pop-dark` (components/ui/ds/dialog.jsx). It still mounts in
   the dark portal root above, and every token that root declares is
   inherited, so the shadcn, legacy and --rp-* layers are re-pointed here to
   the DS LIGHT values (tokens.css `.uc-content`), or the content inside the
   white card would keep white text. Declared on the positioner itself, so it
   wins over the inherited values whatever the selector weight. */
:is(.uich-composer-host, .uich-tw, body) .uich-rp.uc-chrome .uc-dialog-light,
.uc-dialog-light {
  color-scheme: light;
  color: var(--uc-text);

  /* shadcn layer (exact HSL of the DS light values) */
  --background: 0 0% 100%;              /* #FFFFFF surface-raised */
  --foreground: 0 0% 3.92%;             /* #0A0A0A text-strong */
  --card: 0 0% 100%;
  --card-foreground: 0 0% 3.92%;
  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 3.92%;
  --primary: 0 0% 9.02%;                /* #171717 inverse-bg */
  --primary-foreground: 0 0% 100%;
  --secondary: 0 0% 95.69%;             /* #F4F4F4 surface-base */
  --secondary-foreground: 0 0% 3.92%;
  --muted: 0 0% 95.69%;
  --muted-foreground: 0 0% 45.1%;       /* #737373 text-muted */
  --accent: 0 0% 92.16%;                /* #EBEBEB surface-sunken */
  --accent-foreground: 0 0% 3.92%;
  --border: 0 0% 90.98%;                /* border (rgba .09 on white) */
  --input: 0 0% 85.88%;                 /* border-strong (rgba .14 on white) */
  --ring: 0 0% 45.1%;

  /* legacy composer layer */
  --panel-bg: #FFFFFF;
  --panel-bg-2: #F4F4F4;
  --panel-bg-3: #EBEBEB;
  --panel-bg-4: #EBEBEB;
  --panel-line: rgba(0, 0, 0, 0.09);
  --panel-line-2: rgba(0, 0, 0, 0.14);
  --panel-line-3: rgba(0, 0, 0, 0.22);
  --panel-border: rgba(0, 0, 0, 0.09);
  --border-subtle: rgba(0, 0, 0, 0.055);
  --border-mid: rgba(0, 0, 0, 0.14);
  --text-hi: #0A0A0A;
  --uich-text: #171717;
  --text-mid: #737373;
  --text-dim: #A3A3A3;
  --text-lo: #737373;
  --accent-rgb: 23, 23, 23;
  --accent-2: #171717;
  --accent-bg: rgba(0, 0, 0, 0.06);
  --surface-2: rgba(128, 128, 128, 0.10);
  --ctl-line: rgba(0, 0, 0, 0.14);
  --ctl-line-hover: rgba(0, 0, 0, 0.22);
  --ctl-line-focus: rgba(0, 0, 0, 0.22);
  --ctl-fill: #FFFFFF;
  --ctl-fill-hover: rgba(128, 128, 128, 0.10);
  --ctl-fill-active: rgba(128, 128, 128, 0.18);
  --ctl-ring: rgba(23, 23, 23, 0.40);
  --ctl-ring-soft: rgba(0, 0, 0, 0.06);
  --seg-track: #EBEBEB;
  --seg-track-line: rgba(0, 0, 0, 0.055);
  --seg-thumb: #FFFFFF;
  --min-line: rgba(0, 0, 0, 0.09);
  --min-fill: rgba(0, 0, 0, 0.03);
  --min-fill-hover: rgba(128, 128, 128, 0.10);

  /* --rp-* roles */
  --rp-surface-sunken: #EBEBEB;
  --rp-surface-base: #F4F4F4;
  --rp-surface-raised: #FFFFFF;
  --rp-surface-overlay: #FFFFFF;
  --rp-surface-control: #FFFFFF;
  --rp-text-strong: #0A0A0A;
  --rp-text: #171717;
  --rp-text-muted: #737373;
  --rp-text-subtle: #A3A3A3;
  --rp-border-subtle: rgba(0, 0, 0, 0.055);
  --rp-border: rgba(0, 0, 0, 0.09);
  --rp-border-strong: rgba(0, 0, 0, 0.14);
  --rp-inverse-bg: #171717;
  --rp-inverse-fg: #FFFFFF;
  --rp-ring: rgba(23, 23, 23, 0.40);
  --rp-brand-soft: #F0F0F0;
  --rp-success-fg: #0A842A;
  --rp-success-soft: #E7FFE7;
  --rp-warning-fg: #AA712B;
  --rp-warning-soft: #FFEDD8;
  --rp-danger-fg: #D12D37;
  --rp-danger-soft: #FFF2EF;
}

/* ---- Chat transcript: WHITE canvas in light mode --------------------------
   `.chat2-main` is `var(--panel-bg)` by default, but composer.css pins it to
   `--panel-bg-2` for every light host — a grey wash written for the old drawer.
   In the right panel that read as a grey slab behind white message bubbles.

   Making the canvas white is only half of it: the user bubble is
   `--rp-surface-raised` (#FFFFFF) with a 5.5% hairline, so on a white canvas it
   would all but disappear. Canvas and bubble SWAP — white thread, tinted user
   bubble, the arrangement every chat product uses — and the bubble's hairline
   steps up from `--rp-border-subtle` to `--rp-border` so its edge still reads.

   SPECIFICITY: composer.css's override is `.panel[data-theme="light"]
   .chat2-main` (0,2,1); adding `.dock-right` makes these (0,3,1) and they win
   on their own, not on load order. Both theme attributes are matched because
   applyTheme writes both to the panel. */
:is(.uich-composer-host, .uich-tw, body)[data-uich-composer-theme="light"] .panel.dock-right .chat2-main,
:is(.uich-composer-host, .uich-tw, body)[data-theme="light"] .panel.dock-right .chat2-main,
.panel.dock-right[data-uich-composer-theme="light"] .chat2-main,
.panel.dock-right[data-theme="light"] .chat2-main {
  background: var(--rp-surface-raised);
}

.panel.dock-right[data-uich-composer-theme="light"] .msg2.user .msg2-text,
.panel.dock-right[data-theme="light"] .msg2.user .msg2-text {
  background: var(--rp-surface-base);
  border-color: var(--rp-border);
}

/* ---- Inspector surface ladder in light ------------------------------------
   The identity block and every section card fill with
   `color-mix(var(--uc-surface-raised), #fff var(--rp-box-lift))`
   (composer-right-panel-layout.css), and `.rp-insp` carries no background of
   its own, so the cards sit directly on the panel. That relationship INVERTS
   between themes: in dark the raised surface (#202020) is lighter than the
   panel base (#171717) and the cards read; in light the raised surface IS
   #FFFFFF and so is the panel, so every card dissolved into one flat sheet.

   Light runs the ladder the other way round from dark — there the card is the
   lighter element, here the tray is:

     tray  #F4F4F4  surface-base     the page behind the cards
     card  #FFFFFF  surface-raised   white, a 4% step up, no border needed
     well  #F4F4F4  surface-base     one step back down, inside a card

   All three come off the DS ramp rather than new hex, so the steps stay in
   proportion if the palette moves. The well lands on the tray's own tone,
   which is right: it is a hole in the card, not a surface above it.
   `--rp-box-lift` is untouched (it mixes toward white — a no-op on white).
   Scoped to `.rp-insp`, so the Chat transcript and the Code tab are untouched. */
.panel.dock-right[data-uich-composer-theme="light"] .rp-insp,
.panel.dock-right[data-theme="light"] .rp-insp {
  /* Grey tray, white boxes — the same direction as the dashboard, and the
     reverse of dark (where the CARD is the lighter element). */
  background: var(--uc-surface-base);
  /* THE knob, if the separation ever wants tuning. The boxes are white against
     a 4% tray, so the tray is what carries the contrast and the cards need no
     border. One value: the wells follow through --rp-well-fill. */
  --rp-box-fill: var(--uc-surface-raised);
  --rp-well-fill: var(--uc-surface-base);
}

.panel.dock-right[data-uich-composer-theme="light"] .rp-insp :is(.rp-id, .rp-sec, .rp-el-plain),
.panel.dock-right[data-theme="light"] .rp-insp :is(.rp-id, .rp-sec, .rp-el-plain) {
  background: var(--rp-box-fill);
}

.panel.dock-right[data-uich-composer-theme="light"] .rp-insp :is(
  .uc-img-src__preview:not(.is-icon),
  .uc-img-src__preview.is-audio,
  .element-editor-media-preview,
  .sb-pad,
  .uich-texts__box,
  .uich-asset-group
),
.panel.dock-right[data-theme="light"] .rp-insp :is(
  .uc-img-src__preview:not(.is-icon),
  .uc-img-src__preview.is-audio,
  .element-editor-media-preview,
  .sb-pad,
  .uich-texts__box,
  .uich-asset-group
) {
  background: var(--rp-well-fill);
}

/* ---- design-system layer (--uc-*) in light --------------------------------
   THREE scopes share this one rule, which is why it is not part of the panel
   block above: the panel itself, the portal root every pop-up mounts into
   (`.uich-rp`), and `.uc-pop-dark`.

   That last one is why dropdowns stayed dark whatever the portal root said:
   the DS pop-up components hardcode `uc-pop-dark` in their className
   (ds/select.jsx, ds/popover.jsx, ds/context-menu.jsx) and tokens.css
   re-declares the WHOLE dark token set on that element — a declaration on the
   element beats anything inherited from an ancestor, however specific the
   ancestor's selector. Naming it here re-points those same tokens instead.

   The panel keeps its `.uc-chrome` class in light mode (hundreds of layout
   rules are scoped to it), and tokens.css declares `.uc-chrome` as a FIXED
   dark surface with no light variant — so without this every DS component
   inside a lit panel kept reading dark values (an outline button is
   `color: var(--uc-text-strong)`, i.e. white text on a white panel).

   These are the 25 surface/text/border tokens `.uc-chrome` and `.uc-pop-dark`
   set, re-pointed to the light values tokens.css gives `.uc-content`. Base
   tokens (type scale, spacing, radii, z-index, solid brand fills) are
   surface-independent and are left alone. Keep in sync with tokens.css. */
:is(.uich-composer-host, .uich-tw, body)[data-uich-composer-theme="light"] .panel.dock-right.uc-chrome,
:is(.uich-composer-host, .uich-tw, body)[data-theme="light"] .panel.dock-right.uc-chrome,
.panel.dock-right.uc-chrome[data-uich-composer-theme="light"],
.panel.dock-right.uc-chrome[data-theme="light"],
:is(.uich-composer-host, .uich-tw, body) .uich-rp.uc-chrome[data-uich-composer-theme="light"],
:is(.uich-composer-host, .uich-tw, body) .uich-rp.uc-chrome[data-theme="light"],
:is(.uich-composer-host, .uich-tw, body) .uich-rp.uc-chrome[data-uich-composer-theme="light"] :is(.uc-portal, .uc-pop-dark),
:is(.uich-composer-host, .uich-tw, body) .uich-rp.uc-chrome[data-theme="light"] :is(.uc-portal, .uc-pop-dark) {
  --uc-surface-sunken:  #EBEBEB;
  --uc-surface-base:    #F4F4F4;
  --uc-surface-raised:  #FFFFFF;
  --uc-surface-overlay: rgba(255, 255, 255, 0.10);
  --uc-surface-control: #FFFFFF;
  /* The hover / highlight wash, which is NOT the control fill on light: the
     sliding pill in Select and Menu paints --uc-surface-hover, and a #FFFFFF
     pill on a white menu is invisible. Dark scopes keep their white wash, so
     this only re-points the light side. */
  --uc-surface-hover: rgba(0, 0, 0, 0.04);

  --uc-text-strong: #0A0A0A;
  --uc-text:        #171717;
  --uc-text-muted:  #737373;
  --uc-text-subtle: #A3A3A3;

  --uc-inverse-bg: #171717;
  --uc-inverse-fg: #FFFFFF;

  --uc-border-subtle: rgba(0, 0, 0, 0.055);
  --uc-border:        rgba(0, 0, 0, 0.09);
  --uc-border-strong: rgba(0, 0, 0, 0.14);
  /* Hover border on controls. See the note in tokens.css: it must come off the
     BORDER ramp, not --uc-text-subtle (#A3A3A3 here), which snapped a hard
     outline in on hover instead of stepping up from the 14% resting border. */
  --uc-border-hover:  rgba(0, 0, 0, 0.22);
  --uc-ring:          rgba(23, 23, 23, 0.40);

  --uc-brand-fg:   #171717;
  --uc-success-fg: #0A842A;
  --uc-danger-fg:  #D12D37;
  --uc-warning-fg: #AA712B;
  --uc-accent-fg:  #171717;

  --uc-brand-soft:   #F0F0F0;
  --uc-success-soft: #E7FFE7;
  --uc-danger-soft:  #FFF2EF;
  --uc-warning-soft: #FFEDD8;
  --uc-accent-soft:  #F0F0F0;
}

/* A pop-up's own surface sits ABOVE the panel, so in light it is the raised
   white, not the translucent `--uc-surface-overlay` the dark scope uses (that
   value is a wash meant to sit on something dark). Without this a lit menu
   rendered as a near-transparent sheet over the canvas. */
:is(.uich-composer-host, .uich-tw, body) .uich-rp.uc-chrome[data-uich-composer-theme="light"] :is(.uc-portal, .uc-pop-dark),
:is(.uich-composer-host, .uich-tw, body) .uich-rp.uc-chrome[data-theme="light"] :is(.uc-portal, .uc-pop-dark) {
  --uc-surface-overlay: #FFFFFF;
  --uc-shadow-4: 0 16px 44px -12px rgb(0 0 0 / 18%), 0 4px 12px -4px rgb(0 0 0 / 12%);
}

/* ---- Tooltips contrast with the panel (QA "Tooltip color issue") ---------
   The DS tooltip paints --uc-text-strong, and `.uc-portal` pins the DS LIGHT
   tokens on it, so it is #0A0A0A in both themes: fine on the light panel,
   near-invisible on the dark #171717 one. On the dark panel it flips to a light
   chip with dark text; the light rule below restores the DS default. */
:is(.uich-composer-host, .uich-tw, body) .uich-rp.uc-chrome .uc-portal[role="tooltip"] {
  background: #F5F5F5;
  color: #0A0A0A;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 6px 16px -4px rgb(0 0 0 / 50%);
}
:is(.uich-composer-host, .uich-tw, body)[data-uich-composer-theme="light"] .uich-rp.uc-chrome .uc-portal[role="tooltip"],
:is(.uich-composer-host, .uich-tw, body)[data-theme="light"] .uich-rp.uc-chrome .uc-portal[role="tooltip"],
:is(.uich-composer-host, .uich-tw, body) .uich-rp.uc-chrome[data-uich-composer-theme="light"] .uc-portal[role="tooltip"],
:is(.uich-composer-host, .uich-tw, body) .uich-rp.uc-chrome[data-theme="light"] .uc-portal[role="tooltip"] {
  background: var(--uc-text-strong);
  color: var(--uc-text-inverse);
  box-shadow: var(--uc-shadow-4);
}

/* ---- Tracks step down from whatever they sit ON ---------------------------
   The panel sets the segmented / pill-tab track to `surface-base` (#F4F4F4),
   which is the right 4% step below the WHITE surfaces it was tuned against —
   the inspector cards and the panel chrome.

   The Code tab is the exception: `.code2-body` is itself `--panel-bg-2`
   (#F4F4F4) in light, so the HTML | CSS | JS strip was painting its track the
   same colour as its own background and vanished. Inside that pane the track
   drops one more step to `surface-sunken` (#EBEBEB), keeping the same
   one-step-down relationship rather than a fixed colour.

   Set on `.code2-body` rather than the strip: custom properties resolve from
   the NEAREST ancestor that declares them, so this beats the panel-level value
   for everything in the pane without needing to out-specify it. */
.panel.dock-right[data-uich-composer-theme="light"] .code2-body,
.panel.dock-right[data-theme="light"] .code2-body {
  --uc-tab-track-bg: var(--uc-surface-sunken);
  --seg-track: var(--uc-surface-sunken);
}

/* ---- Design | Developer strip ---------------------------------------------
   The strip fills with `--uc-surface-base` so it matches the Chat | Editor |
   Code bar above it (composer-right-panel-layout.css says so in as many
   words). In DARK those agree — both are #171717. In LIGHT they stopped
   agreeing: the bar above sits on the white panel while surface-base is
   #F4F4F4, so the strip read as a grey band between two white surfaces.
   White here keeps the original intent rather than overriding it. */
/* `.uc-chrome` is in the selector to BREAK A TIE, not for scoping: the base
   rule is `.panel.dock-right.uc-chrome .rp-insp .rp-tabs--mode`, also (0,5,0),
   and composer-right-panel-layout.css loads after this file — so without it
   the override lost on order and the strip stayed grey. */
.panel.dock-right.uc-chrome[data-uich-composer-theme="light"] .rp-insp .rp-tabs--mode,
.panel.dock-right.uc-chrome[data-theme="light"] .rp-insp .rp-tabs--mode {
  background: var(--uc-surface-raised);
}

/* ---- Code › Globals rows: a hover that exists in light --------------------
   The rows are white (`--uc-surface-raised`) on the grey Code pane, and their
   hover paints `--uc-surface-overlay`. In DARK that is #242424 over a #202020
   row — a lift, which is the intent. In LIGHT the same token is
   `rgba(255,255,255,0.10)`: a white wash over a white row, so hovering did
   nothing at all.

   Light has to go DOWN instead of up, and it has to clear the pane as well as
   the row: `--uc-surface-hover` over white lands on ~#F5F5F5, which is the
   pane's own #F4F4F4 — the row would dissolve into its background rather than
   highlight. `surface-sunken` is the first step that reads against both. */
.panel.dock-right[data-uich-composer-theme="light"] .glob-sum__row:hover,
.panel.dock-right[data-theme="light"] .glob-sum__row:hover {
  background: var(--uc-surface-sunken);
}

/* ---- Live-page editor: the whole editor sits above the page's own layers ----
   On the live page the panel shares the document with the design, and sticky
   headers and preloaders routinely use z-index 9999-99999 or more. With the
   panel at 9999 such a header covered the panel's top tabs. On the front end
   only (body.uichemy-frontend-editor) the panel goes to 2147481000
   (uichemy-composer-editor-panel.css) and its pop-ups move up with it, in the
   same order, still below the canvas chrome (2147482300+). The Elementor,
   Gutenberg and Bricks editors keep the values above. */
body.uichemy-frontend-editor :is(.panel.dock-right, .uich-rp).uc-chrome,
body.uichemy-frontend-editor .uich-rp.uc-chrome :is(.uc-portal, .uc-pop-dark, [data-radix-popper-content-wrapper]) {
  --uc-z-overlay: 2147481100;
  --uc-z-dialog: 2147481200;
  --uc-z-dropdown: 2147481250;
  --uc-z-tooltip: 2147481300;
}

/* ==========================================================================
 * RIGHT PANEL LAYOUT — the page builder's style panel, same to same.
 *
 * Layout and spacing only (colours come from composer-right-panel.css, which
 * re-points every token to the UiChemy DS on this same scope). Mirrors
 * uichemy-pagebuilder/app/src/shell/studio.css `.uipb-panel*` / `.uipb-sec*` /
 * `.uipb-fields*` / `.uipb-field*` / `.uipb-crumb*`:
 *
 *   gutter 12 · label column 96 · field gap 10 · fields 0/12/12, row gap 10
 *   section: 12px on all four sides (title and fields), full-width divider
 *   identity block 10/12/12, gap 8, raised surface, bottom border
 *
 * EVERY rule is scoped to `.panel.dock-right.uc-chrome .rp-insp` — the markup
 * the Inspector renders only when docked right — so nothing else changes, and
 * at (0,4,0)+ it outranks the older `.panel.dock-right …` density rules in
 * composer-dock.css (0,2,x–0,4,0) without editing them.
 * ======================================================================== */

.panel.dock-right.uc-chrome .rp-insp {
  /* 16px left and right (Jay, 2026-09-29: "equal spacing"): the same inset as
     the Chat / Editor / Code strip above (`m-4`), so every row's edge lines up
     with it. Was 12, which sat 4px outside the header's edge. */
  /* 12px box padding (Jay 2026-09-29: "all boxes padding 12 instead of 16"). */
  --rp-gutter: var(--uc-space-12, 12px);
  /* ONE label column for Design and Developer (Jay 2026-09-30): 80px fits
     every Design label (Attachment, Blend mode, Text color) and leaves the
     Size box room on the 280px panel. Was 96 (Developer) / 60 (Design). */
  --rp-label-w: 80px;
  --rp-unit-w: 64px;
  /* The older right-dock density block (composer-dock.css) reads these; point
     them at the builder's numbers so any rule still using them agrees. */
  --pf-label-w: 80px;
  --pf-row-gap: 10px;
  --pf-label-gap: 4px;
  --pf-sec-pad-x: 12px;
  --pf-label-fs: 12px;
  --pf-value-fs: 12px;
  /* Control height the old field shells read (was 30–36): DS sm. */
  --input-h: var(--uc-control-h-sm, 28px);

  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

/* ---- Chat | Editor | Code bar -------------------------------------------- */
/* The panel gutter (12px) on all four sides, so the bar's edges line up with
   the identity block and sections below, plus a full-width divider under it. */
.panel.dock-right.uc-chrome .rp-panel-tabsrow {
  margin: 0;
  padding: var(--uc-space-12, 12px);
  border-bottom: 1px solid var(--uc-border-subtle);
}
/* The row owns the padding and divider; the tabs fill its width. */
.panel.dock-right.uc-chrome .rp-panel-tabsrow .rp-panel-tabs {
  margin: 0;
  padding: 0;
  border-bottom: 0;
}

/* ---- Identity block (pinned) --------------------------------------------- */
/* Box darkness knob (Jay: "make it darker") — how far every card is mixed toward
   white off the panel base. 0% = the plain raised surface (#202020, darker);
   raise for lighter. Inherited by the identity box and the section boxes. */
.panel.dock-right.uc-chrome .rp-insp { --rp-box-lift: 0%; }

.panel.dock-right.uc-chrome .rp-insp .rp-id {
  flex: none;
  display: flex;
  flex-direction: column;
  /* Breathing room (Jay, 2026-09-29: "too congested"): 16px top/bottom and
     12px between the mode, path and class rows — was 10/12 and 8. */
  gap: var(--uc-space-12, 12px);
  padding: var(--uc-space-12, 12px) var(--rp-gutter);
  /* Same lifted grey as the section boxes (uses the shared --rp-box-lift knob). */
  background: color-mix(in srgb, var(--uc-surface-raised), #fff var(--rp-box-lift, 5%));
  /* A grey card like the section boxes below (Jay): inset from the panel edges,
     rounded, no bottom divider — the gap to the first section separates them. */
  margin: var(--rp-box-gap, 6px) var(--rp-box-pad, 6px) 0;
  border-radius: var(--uc-radius-md, 8px);
  min-width: 0;
}

/* Row 1: the element path, its badges, the state select and Mark as (at the
   end; it moved down here when Design / Developer became its own strip). */
.panel.dock-right.uc-chrome .rp-insp .rp-id__where {
  display: flex;
  align-items: center;
  gap: var(--uc-space-6, 6px);
  min-height: 24px;
  min-width: 0;
}
.panel.dock-right.uc-chrome .rp-insp .rp-id__where > [class] { flex-shrink: 0; }
/* The element path is the DS Breadcrumb; it takes the row's free width and
   folds levels into its own "..." menu, so it must be allowed to shrink. */
.panel.dock-right.uc-chrome .rp-insp .rp-id__where > .rp-path {
  flex: 1 1 0;
  min-width: 0;
}
.panel.dock-right.uc-chrome .rp-insp .rp-path__tag { display: inline-flex; }
.panel.dock-right.uc-chrome .rp-insp .rp-id__actions {
  display: flex;
  align-items: center;
  gap: var(--uc-space-6, 6px);
  flex: none;
}

/* ---- Option A header (Webflow style, Jay 2026-09-29) ----------------------
   Row 1 is a TITLE: type icon, path with the current element as the heading,
   badges, Mark as. Row 2 labels what the edits apply to and holds the state.
   Row 3 is the class field, full width. */
.panel.dock-right.uc-chrome .rp-insp .rp-id__title { gap: var(--uc-space-8, 8px); min-height: 28px; }
/* The path hugs its text (still shrinks and folds when crowded), so the
   badges sit right beside the name; Mark as is pushed to the far edge. */
.panel.dock-right.uc-chrome .rp-insp .rp-id__title > .rp-path { flex: 0 1 auto; }
.panel.dock-right.uc-chrome .rp-insp .rp-id__title > .rp-id__actions { margin-right: auto; }
.panel.dock-right.uc-chrome .rp-insp .rp-id__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: var(--uc-radius-md, 8px);
  background: var(--uc-surface-control);
  color: var(--uc-text);
}
/* The current element reads as the heading; ancestors stay small and muted. */
.panel.dock-right.uc-chrome .rp-insp .rp-id__title .rp-path [aria-current],
.panel.dock-right.uc-chrome .rp-insp .rp-id__title .rp-path [aria-current] span {
  font-size: var(--uc-text-base, 14px);
  font-weight: var(--uc-weight-medium, 500);
  color: var(--uc-text-strong);
}
.panel.dock-right.uc-chrome .rp-insp .rp-id__selector {
  display: flex;
  align-items: center;
  gap: var(--uc-space-8, 8px);
  min-width: 0;
  /* Title and selector belong together less than selector and classes:
     a touch more room above than below. */
  margin-top: var(--uc-space-2, 2px);
  margin-bottom: calc(var(--uc-space-4, 4px) * -1);
}
.panel.dock-right.uc-chrome .rp-insp .rp-id__label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--uc-text-xs, 12px);
  /* --uc-text (#A3A3A3, 7.1:1 on #171717), not --uc-text-muted
     (#737373, 3.8:1 — fails WCAG AA at this size). The set/unset
     distinction is kept by --uc-text-strong on [data-set] below. */
  color: var(--uc-text);
}

/* The state select: fixed width, right-aligned on the selector row. */
.panel.dock-right.uc-chrome .rp-insp .rp-state { flex: 0 0 auto; width: 104px; }
.panel.dock-right.uc-chrome .rp-insp .rp-state > button { width: 100%; min-width: 0; }

/* The Entrance select fills its input column. The DS Select trigger's own
   180px minimum is wider than that column in this dock, so it ran past the
   section's edge and cut its chevron off. */
.panel.dock-right.uc-chrome .rp-insp .rp-entrance .prop-input-stack > button { flex: 1 1 auto; width: 100%; min-width: 0; }

/* Row 2: the class chips and the field that adds one share a wrapping row. */
.panel.dock-right.uc-chrome .rp-insp .rp-id__classes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--uc-space-4, 4px);
  min-width: 0;
}
.panel.dock-right.uc-chrome .rp-insp .rp-addclass { flex: 1 1 96px; min-width: 88px; }

/* Class chips are DS Chips; only the Local chip's "-> class" note is ours. */
.panel.dock-right.uc-chrome .rp-insp .rp-scope-chip .scope-chip-note { margin-right: var(--uc-space-4, 4px); opacity: 0.7; }

/* The 5px "holds a value" dot — sections, tabs, set labels, the state select. */
.panel.dock-right.uc-chrome .rp-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: var(--uc-radius-infinite, 999px);
  background: var(--uc-brand-fg);
}

/* ---- Property tabs: Content · Style · Layout · Effects ------------------- */
.panel.dock-right.uc-chrome .rp-insp .rp-tabs {
  flex: none;
  padding: 0 var(--rp-gutter);
  /* Full-width divider on the OUTER wrapper — edge to edge, past the gutter. */
  border-bottom: 1px solid var(--uc-border-subtle);
}
/* Kill the underline variant's own inset baseline on the INNER tablist, so the
   only line is the full-width one above (the active-tab underline still shows). */
.panel.dock-right.uc-chrome .rp-insp .rp-tabs [role='tablist'] {
  border-bottom: 0;
}
.panel.dock-right.uc-chrome .rp-insp .rp-tabs [role='tab'] {
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-4, 4px);
  /* 40px strip (was 31): the tabs get the same air as the rows around them. */
  height: 40px;
}

/* ---- Mode tabs: Design · Developer --------------------------------------- */
/* The property strip's look (it carries `.rp-tabs` too), heading the identity
   block (same raised fill), and full width: each mode gets half the strip. */
/* No full-width divider under the Design/Developer strip — only the moving
   active-mode underline (Jay). Overrides the generic .rp-tabs border on the
   same element (both classes are on this strip; this rule comes later). */
.panel.dock-right.uc-chrome .rp-insp .rp-tabs--mode {
  /* Same dark base as the Chat/Editor/Code bar above (Jay), not the lighter
     raised fill — so the two top strips share one background. */
  background: var(--uc-surface-base);
  /* Full-width divider OUTSIDE the tabs, edge to edge like the Chat/Editor/
     Code bar above (Jay 2026-09-30); the inset track INSIDE the tab list is
     removed, so only the active underline sits on this line. */
  border-bottom: 1px solid var(--uc-border-subtle);
}
.panel.dock-right.uc-chrome .rp-insp .rp-tabs--mode [role='tablist'] {
  display: flex;
  width: 100%;
  gap: 0;
  border-bottom: 0;
  box-shadow: none;
}
.panel.dock-right.uc-chrome .rp-insp .rp-tabs--mode [role='tab'] { flex: 1 1 0; min-width: 0; }

/* ---- Body (scrolls under the pinned block) ------------------------------- */
.panel.dock-right.uc-chrome .rp-insp .rp-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ---- Sections: Rive-style grey boxes ------------------------------------
   No tabs — every section stacks in one scroll as its own grey card, inset a
   few px from the panel edges with a small gap between cards. */
.panel.dock-right.uc-chrome .rp-insp .rp-body__inner { padding: var(--rp-box-pad, 6px); }
.panel.dock-right.uc-chrome .rp-insp .rp-secs {
  display: flex;
  flex-direction: column;
  gap: var(--rp-box-gap, 6px);
}
.panel.dock-right.uc-chrome .rp-sec {
  border-bottom: 0;
  position: relative;
  /* Lift the box a little off the panel so it doesn't read as near-black
     (Jay: "too dark, a little bit grey"). color-mix toward white only lightens
     the dark raised surface; in light mode the raised surface is white, so it
     stays white. --rp-box-lift is the knob (raise for greyer, lower for darker). */
  background: color-mix(in srgb, var(--uc-surface-raised), #fff var(--rp-box-lift, 5%));
  border-radius: var(--uc-radius-md, 8px);
  overflow: hidden;
}
/* The old full-width divider between sections is replaced by the gap above. */
.panel.dock-right.uc-chrome .rp-sec + .rp-sec::before { display: none; }

/* Inner wells sit one surface below the section card for gentle separation. */
.panel.dock-right.uc-chrome .rp-insp :is(
  .uc-img-src__preview:not(.is-icon),
  .uc-img-src__preview.is-audio,
  .element-editor-media-preview,
  .sb-pad,
  .uich-texts__box,
  .uich-asset-group
) {
  background: var(--uc-surface-base);
}

.panel.dock-right.uc-chrome .ed-pane-body-live .uich-cm-textarea,
#uichemy-composer-floating-panel .panel.dock-right.uc-chrome .ed-pane-body-live .uich-cm-textarea,
#smart-html-floating-panel .panel.dock-right.uc-chrome .ed-pane-body-live .uich-cm-textarea {
  /* The host applies an important fill to all textareas, including editors. */
  background: var(--uc-surface-base) !important;
}

.panel.dock-right.uc-chrome .rp-sec__trigger {
  gap: var(--uc-space-8, 8px);
  /* 16px above and below the name (was the 12px gutter): a 47px row that
     reads as a heading, not a list item. Sides keep the panel gutter. */
  padding: var(--uc-space-12, 12px) var(--rp-gutter);
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-medium, 500);
  line-height: 1.4;
  color: var(--uc-text-strong);
  transition: background var(--uc-dur-fast, 120ms) var(--uc-ease-standard, ease);
}
/* No hover background on the section header, in any state (Jay): the boxes keep
   their own colour — no lightening on hover. The chevron + cursor signal it's
   clickable. */
.panel.dock-right.uc-chrome .rp-sec__trigger:hover { background: transparent; }
.panel.dock-right.uc-chrome .rp-sec__name {
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-6, 6px);
  flex: 1;
  min-width: 0;
  text-align: right;
}
/* The rows bring their own gutter. */
.panel.dock-right.uc-chrome .rp-sec__content {
  padding: 0;
  font-size: var(--uc-text-xs, 12px);
  line-height: 1.4;
}
/* Radix measures the content once on open, before the rows settle (selects
   and length inputs lay out late) — the builder's fix: no height animation. */
.panel.dock-right.uc-chrome .rp-sec > [role='region'][data-state='open'] {
  height: auto !important;
  overflow: visible;
  animation: none !important;
}

/* ---- "Element" section (identity as an accordion) ------------------------ */
/* A quiet name chip next to the "Element" heading, so you still see what you're
   editing (Section · root, Heading, Image…) when the section is collapsed. */
.panel.dock-right.uc-chrome .rp-insp .rp-el-chip {
  flex: 0 1 auto;
  min-width: 0;
  font-size: var(--uc-text-2xs, 10px);
  font-weight: var(--uc-weight-regular, 400);
  color: var(--uc-text-muted, var(--uc-text-subtle));
  background: var(--uc-surface-sunken, rgba(128, 128, 128, 0.12));
  padding: 2px 7px;
  border-radius: var(--uc-radius-sm, 5px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Body: compact (Jay 2026-09-29). The tag/path and Mark as share one line;
   then the state select and the classes editor. Tight 8px rows; the panel
   gutter lives here (rp-sec__content itself is padding:0). */
.panel.dock-right.uc-chrome .rp-insp .rp-el-body {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-8, 8px);
  padding: 0 var(--rp-gutter) var(--uc-space-12, 12px);
  min-width: 0;
}
/* Keep every control in the box small and quiet whatever the host page tries. */
.panel.dock-right.uc-chrome .rp-insp .rp-el-body,
.panel.dock-right.uc-chrome .rp-insp .rp-el-body :is(button, [role='combobox'], input, a, span) {
  font-size: var(--uc-text-xs, 12px);
  line-height: 1.4;
}
/* Row 1: tag / path on the left, Mark as pushed to the right. */
.panel.dock-right.uc-chrome .rp-insp .rp-el-toprow {
  display: flex;
  align-items: center;
  gap: var(--uc-space-8, 8px);
  min-width: 0;
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-path {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-path .rp-path :is(button, a, span) {
  font-weight: var(--uc-weight-regular, 400);
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-mark {
  flex: 0 0 auto;
  margin-right: auto;
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-state {
  min-width: 0;
}
/* Mark as + the state select: bare text + chevron, 28px tall, surfacing a fill
   only on hover / focus / open — matching the breadcrumb's quiet look. */
.panel.dock-right.uc-chrome .rp-insp .rp-el-mark :is(button, [data-uc]),
.panel.dock-right.uc-chrome .rp-insp .rp-el-state :is(button, [data-uc]) {
  height: var(--uc-control-h-sm, 28px);
  background: transparent;
  box-shadow: none;
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-state :is(button, [data-uc]) {
  width: 100%;
  justify-content: space-between;
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-mark :is(button, [data-uc]):hover,
.panel.dock-right.uc-chrome .rp-insp .rp-el-state :is(button, [data-uc]):hover,
.panel.dock-right.uc-chrome .rp-insp .rp-el-mark :is(button, [data-uc]):focus-visible,
.panel.dock-right.uc-chrome .rp-insp .rp-el-state :is(button, [data-uc]):focus-visible,
.panel.dock-right.uc-chrome .rp-insp .rp-el-state [data-uc][data-state='open'] {
  background: var(--uc-surface-overlay);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
}

/* ---- Element card, UX pass (Jay 2026-09-29) ------------------------------
   Three questions, in order of how often they matter:
   1 what did I pick (title + path), 2 what will my edit change (Editing +
   the scope note), 3 which version (State — quiet at Default, loud else). */
.panel.dock-right.uc-chrome .rp-insp .rp-el-title { gap: var(--uc-space-6, 6px); }
.panel.dock-right.uc-chrome .rp-insp .rp-el-ico {
  display: inline-flex;
  color: var(--uc-text-muted);
  flex: none;
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-tagchip {
  flex: none;
  font-family: var(--uc-font-mono, ui-monospace, monospace);
  --uich-ff: var(--uc-font-mono, ui-monospace, monospace);
  font-size: var(--uc-text-2xs, 10px);
  font-weight: var(--uc-weight-regular, 400);
  color: var(--uc-text-muted);
  background: var(--uc-surface-sunken, rgba(128, 128, 128, 0.12));
  padding: 2px 6px;
  border-radius: var(--uc-radius-sm, 5px);
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-parent {
  flex: none;
  margin-right: auto;
  color: var(--uc-text-muted);
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-parent + .rp-el-mark { margin-right: 0; }

/* Label-left rows, like every other field in the panel. */
.panel.dock-right.uc-chrome .rp-insp .rp-el-field {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: var(--uc-space-8, 8px);
  min-width: 0;
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-field__label {
  line-height: var(--uc-control-h-sm, 28px);
  color: var(--uc-text-muted);
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-field__control {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-6, 6px);
  min-width: 0;
}

/* The scope note: neutral when only this element changes, amber when the
   edit reaches other elements — the mistake this card exists to prevent. */
.panel.dock-right.uc-chrome .rp-insp .rp-el-scopehint {
  display: flex;
  align-items: flex-start;
  gap: var(--uc-space-6, 6px);
  font-size: var(--uc-text-2xs, 11px);
  line-height: 1.4;
  color: var(--uc-text-muted);
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-scopehint__dot {
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--uc-text-muted);
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-scopehint.is-safe .rp-el-scopehint__dot { background: var(--uc-success-fg, #A7EAAA); }
.panel.dock-right.uc-chrome .rp-insp .rp-el-scopehint.is-warn { color: var(--uc-warning-fg, #FFC680); }
.panel.dock-right.uc-chrome .rp-insp .rp-el-scopehint.is-warn .rp-el-scopehint__dot { background: var(--uc-warning-fg, #FFC680); }

/* State: a quiet select at Default; any other state tints the row so you
   can't forget you're styling Hover, with a one-click way back. */
.panel.dock-right.uc-chrome .rp-insp .rp-el-state {
  flex-direction: row;
  align-items: center;
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-state .rp-state { width: 112px; }
.panel.dock-right.uc-chrome .rp-insp .rp-el-field.is-state-on .rp-el-field__label { color: var(--uc-warning-fg, #FFC680); }
.panel.dock-right.uc-chrome .rp-insp .rp-el-field.is-state-on .rp-state :is(button, [data-uc]) {
  background: var(--uc-warning-soft, rgba(255, 169, 64, 0.22));
  box-shadow: none;
  color: var(--uc-warning-fg, #FFC680);
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-state .rp-el-state-reset {
  all: unset;
  box-sizing: border-box;
  width: auto;
  height: auto;
  font-size: var(--uc-text-2xs, 11px);
  color: var(--uc-text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-state .rp-el-state-reset:hover { color: var(--uc-text-strong); text-decoration: underline; }

/* ---- Fields list --------------------------------------------------------- */
.panel.dock-right.uc-chrome .rp-sec__content > .section {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-12, 12px);
  padding: var(--uc-space-4, 4px) var(--rp-gutter) var(--uc-space-12, 12px);
}
/* A body that is not a `.section` (Animation's empty state) gets the same
   inset, so no section's content sits off the gutter. */
.panel.dock-right.uc-chrome .rp-insp .rp-sec__content > div:not(.section) {
  padding: var(--uc-space-4, 4px) var(--rp-gutter) var(--uc-space-12, 12px);
}
.panel.dock-right.uc-chrome .rp-insp .rp-sec__content > div:not(.section) > .section-empty { padding: 0; }
/* Design mode's style rows: 12px apart, the same rhythm as Developer's fields
   (breathing-room pass, 2026-09-29; was 10). */
.panel.dock-right.uc-chrome .rp-insp .prop-rows { gap: var(--uc-space-12, 12px); }
.panel.dock-right.uc-chrome .rp-insp .prop-row { row-gap: var(--uc-space-12, 12px); -moz-column-gap: var(--uc-space-10, 10px); column-gap: var(--uc-space-10, 10px); }

/* (Design mode used to narrow the label column to 60px; both modes now share
   the one 80px column above, so a long label is never cut in one mode only.) */

/* One property per row: label column 96, control fills the rest, gap 10.
   (Grid, not flex, so the full-width exceptions below keep working.) */
.panel.dock-right.uc-chrome .rp-insp .field.pf {
  display: grid;
  grid-template-columns: var(--rp-label-w) minmax(0, 1fr);
  align-items: center;
  -moz-column-gap: var(--uc-space-10, 10px);
       column-gap: var(--uc-space-10, 10px);
  row-gap: var(--uc-space-4, 4px);
  margin: 0;
  min-width: 0;
}
.panel.dock-right.uc-chrome .rp-insp .field.pf.pf-layout-inset,
.panel.dock-right.uc-chrome .rp-insp .field.pf.sides-box {
  grid-template-columns: minmax(0, 1fr);
}
.panel.dock-right.uc-chrome .rp-insp .field.pf > .pf-label {
  display: flex;
  align-items: center;
  gap: var(--uc-space-4, 4px);
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 1px 0;
  font-family: inherit;
  --uich-ff: inherit;
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-regular, 400);
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  /* --uc-text (#A3A3A3, 7.1:1 on #171717), not --uc-text-muted
     (#737373, 3.8:1 — fails WCAG AA at this size). The set/unset
     distinction is kept by --uc-text-strong on [data-set] below. */
  color: var(--uc-text);
}
.panel.dock-right.uc-chrome .rp-insp .field.pf > .pf-label .pf-name {
  display: flex;
  align-items: center;
  gap: var(--uc-space-4, 4px);
  min-width: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.panel.dock-right.uc-chrome .rp-insp .field.pf > .pf-label .pf-name-text {
  order: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* One label style for every row — Background's Color label used to be a
     10px uppercase caption (composer.css .pf-background-bgColor). */
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}
/* Background's "Gradient" caption reads as a sub-group header. */
.panel.dock-right.uc-chrome .rp-insp .gp-section-divider {
  font-size: var(--uc-text-2xs, 10px);
  font-weight: var(--uc-weight-medium, 500);
  letter-spacing: var(--uc-tracking-wide, 0.02em);
  color: var(--uc-text-subtle, var(--uc-text-muted));
}
/* A property the scope being edited sets: brighter label + the 5px dot
   straight after the name (before any markers), never eaten by the ellipsis. */
.panel.dock-right.uc-chrome .rp-insp [data-set] > .field.pf > .pf-label { color: var(--uc-text-strong); }
.panel.dock-right.uc-chrome .rp-insp [data-set] > .field.pf > .pf-label .pf-name > :not(.pf-name-text) { order: 2; }
.panel.dock-right.uc-chrome .rp-insp [data-set] > .field.pf > .pf-label .pf-name::after {
  content: '';
  order: 1;
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: var(--uc-radius-infinite, 999px);
  background: var(--uc-brand-fg);
}

/* Opacity: its control stacks a slider ABOVE a number box, so the cell is two
   rows tall. With the row centred, "Opacity" floated in the middle and the
   slider looked orphaned at the top. Top-align the row and lift the label + the
   dynamic (globe) button onto the slider's line, so the label sits beside the
   slider and the number box drops beneath it (Jay). */
.panel.dock-right.uc-chrome .rp-insp .field.pf.pf-effects-opacity {
  align-items: start;
}
.panel.dock-right.uc-chrome .rp-insp .field.pf.pf-effects-opacity > .pf-label {
  align-self: start;
  /* Optical centre of the ~20px slider row (thumb is 16px). */
  padding-top: 3px;
}
/* The dynamic-value button, if the field carries one, rides the slider row too. */
.panel.dock-right.uc-chrome .rp-insp .field.pf.pf-effects-opacity > .pf-dyn,
.panel.dock-right.uc-chrome .rp-insp .field.pf.pf-effects-opacity > .pf-meta {
  align-self: start;
  padding-top: 1px;
}

/* Upstream's sub-grouping (Flex Container, Gaps, Grid…). */
.panel.dock-right.uc-chrome .rp-insp .subsec {
  display: block;
  margin-top: var(--uc-space-6, 6px);
}
.panel.dock-right.uc-chrome .rp-insp .subsec-title {
  font-size: var(--uc-text-2xs, 10px);
  font-weight: var(--uc-weight-medium, 500);
  letter-spacing: var(--uc-tracking-wide, 0.02em);
  text-transform: uppercase;
  color: var(--uc-text-subtle, var(--uc-text-muted));
}
.panel.dock-right.uc-chrome .rp-insp .subsec-rule { display: none; }

/* ---- Controls: DS size sm (28px) ---------------------------------------- */
/* The old right-dock density pass bumped shells to 36px; the builder's rows
   are 28 (--uc-control-h-sm). */
.panel.dock-right.uc-chrome .rp-insp .field.pf .h-8,
.panel.dock-right.uc-chrome .rp-insp .prop-cell .linput {
  height: var(--uc-control-h-sm, 28px);
}
.panel.dock-right.uc-chrome .rp-insp .prop-cell .seg button {
  height: calc(var(--uc-control-h-sm, 28px) - 4px);
}

/* ---- "Add property": the builder's "+ N more" text button -- */
.panel.dock-right.uc-chrome .rp-insp .rp-sec__content .section > .mt-3.w-full {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.panel.dock-right.uc-chrome .rp-insp .rp-sec__content .section > .w-full > button.justify-start {
  align-self: flex-start;
  width: auto;
  height: auto;
  min-height: 0;
  /* Pull back by its own padding so the "+" lines up with the field labels
     and the text ends the section's 12px from the divider; only the hover
     fill reaches into the gutter. */
  margin: 0 calc(-1 * var(--uc-space-8, 8px)) calc(-1 * var(--uc-space-4, 4px)) 0;
  padding: var(--uc-space-4, 4px) var(--uc-space-8, 8px);
  border: 0;
  border-radius: var(--uc-radius-sm, 6px);
  background: none;
  box-shadow: none;
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-regular, 400);
  line-height: 1.4;
  /* --uc-text (#A3A3A3, 7.1:1 on #171717), not --uc-text-muted
     (#737373, 3.8:1 — fails WCAG AA at this size). The set/unset
     distinction is kept by --uc-text-strong on [data-set] below. */
  color: var(--uc-text);
  gap: var(--uc-space-6, 6px);
}
.panel.dock-right.uc-chrome .rp-insp .rp-sec__content .section > .w-full > button.justify-start:hover {
  background: var(--uc-surface-control);
  color: var(--uc-text-strong);
}
.panel.dock-right.uc-chrome .rp-insp .custom-css-section > .w-full > button.justify-start .ml-auto { margin-right: 0; }

/* (Section + dot rules above apply to every `.rp-sec` in the right panel —
   the settings panel and the Code tab's library groups share them.) */

/* ---- Composite fields on the DS Input look --------------------------------
   The length field (LengthInput: text + unit pill + optional stepper) and the
   colour field (ColorInput: swatch + hex text) are composites — their dragging,
   unit and picker behaviour lives in their own markup, so they are not swapped
   for a DS <Input>. Their OUTER BOX is dressed as one instead, token for token
   from design-system/components/Input/Input.module.css at size sm, so every row
   in the panel reads as the same control. */
/* `.field.pf` copies out-rank composer-dock.css's `.field.pf .border-input`
   (fill rgba(255,255,255,.05), hover rgba(128,128,128,.10)), which made these
   boxes a different grey from every DS input/select next to them. */
.panel.dock-right.uc-chrome .lin-box,
.panel.dock-right.uc-chrome .swatch-input.color-input,
.panel.dock-right.uc-chrome .field.pf .lin-box,
.panel.dock-right.uc-chrome .field.pf .swatch-input.color-input {
  height: var(--uc-control-h-sm, 28px);
  min-height: 0;
  border: 0;
  border-radius: var(--uc-input-radius, var(--uc-radius-md));
  background: var(--uc-surface-overlay);
  background-image: linear-gradient(to bottom, oklch(0% 0 0 / 0.02), transparent);
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-input);
  transition: box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
}
.panel.dock-right.uc-chrome .lin-box:hover:not(:focus-within),
.panel.dock-right.uc-chrome .swatch-input.color-input:hover:not(:focus-within),
.panel.dock-right.uc-chrome .field.pf .lin-box:hover:not(:focus-within),
.panel.dock-right.uc-chrome .field.pf .swatch-input.color-input:hover:not(:focus-within) {
  box-shadow: inset 0 0 0 1px var(--uc-border-hover, var(--uc-text-subtle)), var(--uc-shadow-input);
  background: var(--uc-surface-overlay); /* hover = border only, like DS inputs */
}
/* The `.field.pf` copies out-rank composer-dock.css's
   `.panel.dock-right .field.pf .border-input:focus-within` (2px outline, no
   shadow), which otherwise won on every length / spacing / colour box. */
.panel.dock-right.uc-chrome .lin-box:focus-within,
.panel.dock-right.uc-chrome .swatch-input.color-input:focus-within,
.panel.dock-right.uc-chrome .field.pf .lin-box:focus-within,
.panel.dock-right.uc-chrome .field.pf .swatch-input.color-input:focus-within {
  /* Minimal focus (Jay 2026-09-29): a thin 1px line ON the box edge instead of
     the 2px ring floating 2px outside it. */
  box-shadow: inset 0 0 0 1px var(--uc-ring), var(--uc-shadow-input);
  /* Keep the resting fill on focus — no background swap (a legacy rule flipped
     the colour field to a darker/lighter grey when it became active). */
  background: var(--uc-surface-overlay);
  /* Neutral ring, not brand orange: the panel chrome is black/white, and an
     orange focus ring on a greyscale panel read as a validation error. Panel
     scope only — the shared DS Input/Select modules keep their brand ring
     everywhere else. */
  outline: none;
}
/* Same neutral-ring rule for the DS field controls (Input / Textarea / Select
   trigger) while they live in the right panel. Overrides only the colour of the
   module's `outline` shorthand, so width / style / offset are unchanged. */
.panel.dock-right.uc-chrome [data-uc='input']:focus,
.panel.dock-right.uc-chrome [data-uc='textarea']:focus,
.panel.dock-right.uc-chrome [data-uc]:focus-visible,
.panel.dock-right.uc-chrome [data-uc][data-state='open'] {
  outline-color: var(--uc-ring);
}

/* Minimal resting borders (Jay 2026-09-29): the DS input/textarea resting border
   is border-strong (#525252) — too bright on the dark panel. Dim the RESTING
   state to border-subtle (#333); selects already use it. Hover and focus keep
   their brighter ring, so interaction still stands out. Covers the composite
   fields (LengthInput / ColorInput) and the spacing cells too. */
.panel.dock-right.uc-chrome [data-uc='input']:not(:focus):not(:hover),
.panel.dock-right.uc-chrome [data-uc='textarea']:not(:focus):not(:hover),
.panel.dock-right.uc-chrome .lin-box:not(:focus-within):not(:hover),
.panel.dock-right.uc-chrome .swatch-input.color-input:not(:focus-within):not(:hover),
.panel.dock-right.uc-chrome .sb-cell:not(:focus):not(:hover) {
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle), var(--uc-shadow-input);
}
.panel.dock-right.uc-chrome .lin-box input,
.panel.dock-right.uc-chrome .swatch-input.color-input input,
/* the PHP-enqueued editor-panel.css styles inputs through the shell's ID */
#uichemy-composer-floating-panel .panel.dock-right.uc-chrome .lin-box input,
#uichemy-composer-floating-panel .panel.dock-right.uc-chrome .swatch-input.color-input input,
#smart-html-floating-panel .panel.dock-right.uc-chrome .lin-box input,
#smart-html-floating-panel .panel.dock-right.uc-chrome .swatch-input.color-input input {
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 var(--uc-space-8);
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-sm);
  font-style: normal;
  color: var(--uc-text-strong);
  /* Let the value input yield width. Without it the input keeps its content
     width and shoves the unit pill (px) and the −/+ stepper past the box edge,
     so they overlap — worst on rows that also carry the globe column (Font
     Size). The pill (shrink-0) and stepper (flex:none below) keep their size;
     the input absorbs the shrink instead. */
  min-width: 0;
  flex: 1 1 0;
}
/* The −/+ stepper and unit pill never shrink or overlap; only the input flexes. */
.panel.dock-right.uc-chrome .lin-box > .lin-step { flex: none; }
.panel.dock-right.uc-chrome .lin-box input::-moz-placeholder, .panel.dock-right.uc-chrome .swatch-input.color-input input::-moz-placeholder {
  color: var(--uc-text-subtle);
  font-style: normal;
}
.panel.dock-right.uc-chrome .lin-box input::placeholder,
.panel.dock-right.uc-chrome .swatch-input.color-input input::placeholder {
  color: var(--uc-text-subtle);
  font-style: normal;
}
.panel.dock-right.uc-chrome .swatch-input.color-input.disabled,
.panel.dock-right.uc-chrome .lin-box.cursor-not-allowed {
  background: var(--uc-surface-sunken);
  box-shadow: inset 0 0 0 1px var(--uc-border);
}

/* ---- The spacing (box-model) editor on the DS scale ------------------------
   A bespoke control (margin/padding frames with a value in each side), kept as
   is — only its sizes move onto the DS scale: 5px frames → --uc-radius-sm,
   bold 700 labels → medium, 11px values → 12px. */
.panel.dock-right.uc-chrome .rp-insp :is(.sb-mar, .sb-pad) {
  border-radius: var(--uc-radius-sm, 6px);
}
.panel.dock-right.uc-chrome .rp-insp .sb-label {
  font-weight: var(--uc-weight-medium, 500);
}
.panel.dock-right.uc-chrome .rp-insp .sb-cell {
  font-size: var(--uc-text-xs, 12px);
}

/* ---- Chat history rows: the ⋮ menu appears on hover, as it did before ----
   The row's kebab is a DS IconButton (Pro composer-chat.jsx, `.ctile-kebab`).
   Hidden at rest so a list of chats reads as titles, shown on row hover, while
   its menu is open, and whenever it has keyboard focus. */
.panel.dock-right.uc-chrome .ctile .ctile-kebab {
  opacity: 0;
  transition: opacity var(--uc-dur-fast, 120ms) var(--uc-ease-standard, ease);
}
.panel.dock-right.uc-chrome .ctile:hover .ctile-kebab,
.panel.dock-right.uc-chrome .ctile.menu-open .ctile-kebab,
.panel.dock-right.uc-chrome .ctile .ctile-kebab:focus-visible {
  opacity: 1;
}

/* ---- Code tab: Assets, option B "CSS | JS tabs" (Jay, 2026-09-29) --------
   One flat surface: no card, no lines between rows. The DS pill tabs pick the
   list, rows are 32px with the panel's hover wash, each row notes where the
   file loads, and one full-width Add button names the open kind. Text sits on
   the section's own inset; a row's hover wash reaches 8px past it, so the
   switch and the last icon get the same 8px inside the wash (QA: 6px read as
   the switch touching the wash's left edge). */
.panel.dock-right.uc-chrome .deps-bar--tabs {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-8, 8px);
  margin: 0;
  padding: var(--uc-space-4, 4px) 0 var(--uc-space-8, 8px);
  background: transparent;
  border: 0;
  border-radius: 0;
}
.panel.dock-right.uc-chrome .deps-bar--tabs .deps-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 calc(-1 * var(--uc-space-8, 8px));
}
.panel.dock-right.uc-chrome .deps-bar--tabs .dep {
  display: flex;
  align-items: center;
  gap: var(--uc-space-8, 8px);
  height: 32px;
  padding: 0 var(--uc-space-8, 8px);
  border: 0;
  border-radius: var(--uc-radius-sm, 6px);
  font-size: var(--uc-text-xs, 12px);
  color: var(--uc-text);
}
.panel.dock-right.uc-chrome .deps-bar--tabs .dep:hover,
.panel.dock-right.uc-chrome .deps-bar--tabs .dep.dep-open {
  background: var(--uc-brand-glow-hover, rgba(128, 128, 128, .10));
}
.panel.dock-right.uc-chrome .deps-bar--tabs .dep-name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--uc-text-strong);
  font-weight: var(--uc-weight-medium, 500);
}
.panel.dock-right.uc-chrome .deps-bar--tabs .dep-where {
  flex: none;
  font-size: 11px;
  color: var(--uc-text-muted);
}
.panel.dock-right.uc-chrome .deps-bar--tabs .deps-empty {
  padding: var(--uc-space-8, 8px);
  font-size: var(--uc-text-xs, 12px);
  line-height: 1.5;
  color: var(--uc-text-muted);
}
.panel.dock-right.uc-chrome .deps-bar--tabs .deps-foot {
  padding: 0;
  border: 0;
  background: transparent;
}
/* The button spans the section; its popover keeps its own 320px. */
.panel.dock-right.uc-chrome .deps-bar--tabs .dep-add > button { width: 100%; }

/* The Assets heading's count: "1 on", "2 of 3 on". */
.panel.dock-right.uc-chrome .assets-count {
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-regular, 400);
  color: var(--uc-text-muted);
}

/* ---- Code tab: the Assets accordion in a box (Jay, 2026-09-29) -----------
   The same card as the code editor below it (.ed-pane: --panel-line border,
   --panel-bg fill, radius-4), so the two read as a pair. Inside the box the
   accordion item drops its own divider, and the header and body share one
   12px inset. */
.panel.dock-right.uc-chrome .assets-box {
  margin-bottom: var(--uc-space-8, 8px);
  /* Match the panel accordion boxes (.rp-sec) EXACTLY. Those live inside
     .rp-insp where --rp-box-lift is 0%, so their fill resolves to plain
     --uc-surface-raised. This box is in the Code tab (outside .rp-insp), so the
     color-mix would fall back to the 5% default and read a shade lighter — use
     the raised token directly, and pin the knob to 0% for anything nested. */
  --rp-box-lift: 0%;
  background: var(--uc-surface-raised);
  border: 0;
  border-radius: var(--uc-radius-md, 8px);
  overflow: hidden;
}
.panel.dock-right.uc-chrome .assets-box > * { border: 0; }
.panel.dock-right.uc-chrome .assets-box :is(h3, [data-radix-collection-item]) > button,
.panel.dock-right.uc-chrome .assets-box > * > h3 > button {
  padding: var(--uc-space-12, 12px);
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-medium, 500);
  color: var(--uc-text-strong);
}
/* Like .rp-sec: the box keeps its own colour, no hover lightening. */
.panel.dock-right.uc-chrome .assets-box :is(h3, [data-radix-collection-item]) > button:hover {
  background: transparent;
}
.panel.dock-right.uc-chrome .assets-box [role='region'] > * {
  padding: 0 var(--uc-space-12, 12px) var(--uc-space-12, 12px);
}
/* The box's inset is the only padding: 12px under the Add button, not 8 + 16. */
.panel.dock-right.uc-chrome .assets-box .deps-bar--tabs { padding: 0; }

/* ── Spacing sides (QuadBox): DS dressing ──────────────────────────────────
   The LAYOUT lives in composer.css so it also holds in the Gutenberg host and
   the harness (neither carries `uc-chrome`). Only the token-driven colours and
   the label-drag affordance are scoped here. */
.panel.dock-right.uc-chrome .sb-quad-icon {
  color: var(--uc-text-subtle, rgba(128, 128, 128, 0.7));
}
.panel.dock-right.uc-chrome .sb-quad-input,
#uichemy-composer-floating-panel .panel.dock-right.uc-chrome .sb-quad-input,
#smart-html-floating-panel .panel.dock-right.uc-chrome .sb-quad-input {
  font-family: var(--uc-font-sans);
  --uich-ff: var(--uc-font-sans);
  font-size: var(--uc-text-sm);
  color: var(--uc-text-strong);
}
.panel.dock-right.uc-chrome .sb-quad-input::-moz-placeholder {
  color: var(--uc-text-subtle);
}
.panel.dock-right.uc-chrome .sb-quad-input::placeholder {
  color: var(--uc-text-subtle);
}

/* Drag a row's label sideways to change its number (LengthInput binds this
   only on rows holding exactly one length field). The resize cursor is the
   affordance; the label text must not select while dragging. */
.panel.dock-right.uc-chrome .rp-insp .field.pf > .pf-label.pf-label-scrub {
  cursor: ew-resize;
  -webkit-user-select: none;
  -moz-user-select: none;
       user-select: none;
}
.panel.dock-right.uc-chrome .rp-insp .field.pf > .pf-label.pf-label-scrub:hover .pf-name-text {
  color: var(--uc-text-strong);
}

/* ── Globals picker button (the globe on each property row) ────────────────
   The DS `outline` variant paints a filled control (surface-control + sheen +
   raised shadow). On the Border section that stacks four filled chips into a
   dark column that outweighs the values beside them (Jay). Keep the outline —
   the button must stay findable, it is the only way to reach a global — but
   make it an OUTLINE: no fill, no sheen, no lift, and a muted glyph, so the
   row reads value-first.
   The DS class names are CSS-module hashes, so the fill is unset through the
   wrapper (`.pr-gpick > button`) rather than by naming the variant. */
.panel.dock-right.uc-chrome .pr-gpick > button {
  background: none;
  background-image: none;
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
  /* `muted`, not `subtle`: subtle (#525252) sits at 2.3:1 on the panel, under
     the 3:1 a control's glyph needs to stay findable. muted (#737373) reads at
     3.8:1 and is still a step quieter than the row's label. */
  color: var(--uc-text-muted);
}
/* Reachable states get the contrast back: hover, keyboard focus, while the
   popover is open, and on a row whose value already resolves to a global
   (`.applied-global`, set by the field) — there the globe is status, not just
   an affordance, so it stays legible without being hovered. */
.panel.dock-right.uc-chrome .pr-gpick > button:hover,
.panel.dock-right.uc-chrome .pr-gpick > button:focus-visible,
.panel.dock-right.uc-chrome .pr-gpick.is-open > button,
.panel.dock-right.uc-chrome .field.pf.applied-global .pr-gpick > button {
  background: none;
  box-shadow: inset 0 0 0 1px var(--uc-border-strong);
  color: var(--uc-text-strong);
}
/* The lift the DS adds on press would reintroduce the chip look. */
.panel.dock-right.uc-chrome .pr-gpick > button:active:not(:disabled) {
  transform: none;
}

/* ---- One look for every panel input (Jay 2026-09-29) ------------------------
   The input-states gallery (tools/harness/input-states.js) showed four fields
   still drawn their own way. All now follow the field pattern:
   fill #242424 · border #333 · hover #525252 · focus 1px ring ON the edge. */

/* 1. DS Input / Textarea (also every dropdown: they are an Input + chevron)
   focused with a 1px outline just OUTSIDE the edge, so they looked 1px bigger
   than the length / colour / spacing boxes, whose line sits on the edge. */
.panel.dock-right.uc-chrome [data-uc='input']:focus,
.panel.dock-right.uc-chrome [data-uc='textarea']:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--uc-ring), var(--uc-shadow-input);
}

/* 2. LengthInput's keyword hint ("unitless", "auto") was italic monospace
   (composer-inputs.jsx `.lin-keyword`); every other hint is the panel sans in
   the placeholder colour. */
.panel.dock-right.uc-chrome .lin-keyword {
  font-family: var(--uc-font-sans, "Zalando Sans", ui-sans-serif, system-ui, sans-serif);
  --uich-ff: var(--uc-font-sans, "Zalando Sans", ui-sans-serif, system-ui, sans-serif);
  font-style: normal;
  font-size: 13px;
  color: var(--uc-text-subtle);
}

/* 3. Icon segmented rows (Text Align) — DS Tabs pill inside a property row.
   Was a near-black sunken strip whose hover only lit the icon. Scoped to
   `.field.pf .prop-input-stack`, so the Color/Image and Solid/Gradient tabs
   (not property rows) keep their sunken track. */
.panel.dock-right.uc-chrome .field.pf .prop-input-stack [role='tablist'] {
  --uc-tab-track-bg: var(--uc-surface-overlay);
  --uc-tab-track-stroke: inset 0 0 0 1px var(--uc-border-subtle);
  transition: box-shadow var(--uc-dur-fast) var(--uc-ease-standard);
}
.panel.dock-right.uc-chrome .field.pf .prop-input-stack [role='tablist']:hover:not(:focus-within) {
  --uc-tab-track-stroke: inset 0 0 0 1px var(--uc-border-hover, var(--uc-text-subtle));
}
.panel.dock-right.uc-chrome .field.pf .prop-input-stack [role='tablist']:focus-within {
  --uc-tab-track-stroke: inset 0 0 0 1px var(--uc-ring);
}
/* the track now shows focus, so the trigger's own ring would double it */
.panel.dock-right.uc-chrome .field.pf .prop-input-stack [role='tablist'] [role='tab']:focus-visible {
  outline: none;
}

/* 4. Slider (Opacity): hover looked identical to rest. Hovering the slider now
   lifts the empty track to the resting-border grey and the knob's ring to
   text-muted, one step, like the fields' border. */
.panel.dock-right.uc-chrome .field.pf span[dir][data-orientation='horizontal'][aria-disabled] > span:first-child {
  transition: background-color var(--uc-dur-fast) var(--uc-ease-standard);
}
.panel.dock-right.uc-chrome .field.pf span[dir][data-orientation='horizontal'][aria-disabled]:hover > span:first-child {
  background-color: var(--uc-border-subtle);
}
.panel.dock-right.uc-chrome .field.pf span[dir][data-orientation='horizontal'][aria-disabled]:hover [role='slider'] {
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), calc(0.25 * var(--shadow-a))), 0 0 0 1px var(--uc-text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Field fill: a recessed well, not a raised chip (Jay, Rive reference)
   ─────────────────────────────────────────────────────────────────────────────
   The panel's ladder ran base #171717 → box #202020 → field #242424, so every
   input sat LIGHTER than the card holding it and read as a raised chip. Rive
   (and Figma) go the other way: the field is darker than its container, so it
   reads as a hole you type into. #1A1A1A is a touch under the panel base, dark
   enough to sink without going pure black on a #202020 card.

   The hairline stays: at the 280px width two spacing cells sit side by side,
   and without an edge they merge into one dark band.

   Applies to every input surface in the panel — length + spacing boxes, the
   colour field, the DS Input (which also backs the combobox selects like Border
   Style) and the DS Textarea. Not the colour SWATCH button: that chip previews
   the value, so its fill is data, not chrome.

   These rules are appended deliberately — the resting/hover/focus trio above
   re-asserts `--uc-surface-overlay` at each state, and `:hover:not(:focus-within)`
   out-ranks a plain selector, so each state is restated here rather than edited
   in place (leaving that block to keep owning the borders and the focus ring).

   `--rp-field-bg` is the knob: set it to `var(--uc-surface-overlay)` to get the
   old raised chip back.
   ═══════════════════════════════════════════════════════════════════════════ */
.panel.dock-right.uc-chrome { --rp-field-bg: #1A1A1A; }

.panel.dock-right.uc-chrome .lin-box,
.panel.dock-right.uc-chrome .field.pf .lin-box,
.panel.dock-right.uc-chrome .swatch-input.color-input,
.panel.dock-right.uc-chrome .field.pf .swatch-input.color-input,
.panel.dock-right.uc-chrome .lin-box:hover:not(:focus-within),
.panel.dock-right.uc-chrome .field.pf .lin-box:hover:not(:focus-within),
.panel.dock-right.uc-chrome .swatch-input.color-input:hover:not(:focus-within),
.panel.dock-right.uc-chrome .field.pf .swatch-input.color-input:hover:not(:focus-within),
.panel.dock-right.uc-chrome .lin-box:focus-within,
.panel.dock-right.uc-chrome .field.pf .lin-box:focus-within,
.panel.dock-right.uc-chrome .swatch-input.color-input:focus-within,
.panel.dock-right.uc-chrome .field.pf .swatch-input.color-input:focus-within {
  background: var(--rp-field-bg);
  /* The 2%-black top gradient was there to shade a LIGHTER fill; on a dark well
     it only muddies the top edge. */
  background-image: none;
}

/* DS Input / Textarea (the Style, Font and other comboboxes run on Input). The
   `#…floating-panel` copy matches the PHP-enqueued editor-panel.css, which
   styles inputs through the shell's ID and would otherwise win. */
.panel.dock-right.uc-chrome [data-uc='input'],
.panel.dock-right.uc-chrome [data-uc='textarea'],
.panel.dock-right.uc-chrome [data-uc='input']:hover,
.panel.dock-right.uc-chrome [data-uc='textarea']:hover,
.panel.dock-right.uc-chrome [data-uc='input']:focus,
.panel.dock-right.uc-chrome [data-uc='textarea']:focus,
.panel.dock-right.uc-chrome .sb-cell,
.panel.dock-right.uc-chrome .sb-cell:hover,
.panel.dock-right.uc-chrome .sb-cell:focus,
#uichemy-composer-floating-panel .panel.dock-right.uc-chrome [data-uc='input'],
#uichemy-composer-floating-panel .panel.dock-right.uc-chrome [data-uc='textarea'],
#smart-html-floating-panel .panel.dock-right.uc-chrome [data-uc='input'],
#smart-html-floating-panel .panel.dock-right.uc-chrome [data-uc='textarea'] {
  background: var(--rp-field-bg);
  background-image: none;
}

/* Segmented controls inside a property row (Text Align and friends — a DS Tabs
   used as a segment group) take the same well. Their selected thumb keeps the
   raised `--uc-surface-raised` fill, so darkening the TRACK actually widens the
   gap between selected and unselected instead of flattening it. Scoped to
   `.field.pf` so the panel's own Chat/Editor/Code and Design/Developer tabs,
   which are chrome rather than fields, are untouched. */
.panel.dock-right.uc-chrome .field.pf [role='tablist'] {
  background: var(--rp-field-bg);
  background-image: none;
}

/* ── Focus ring belongs to the FIELD BOX, never the inner input ────────────
   A composite field (length, colour, spacing cell) is a wrapper that paints
   the border and the focus ring, with a bare <input> and a unit pill inside it.
   wp-admin's forms.css rings the INPUT instead —
     input[type="text"]:focus { box-shadow: 0 0 0 1.5px var(--wp-admin-theme-color) }
   — and because the input is only the left part of the box (the pill and the
   spacing cell's side icon take the rest), that ring stops mid-field and reads
   as a broken, offset rectangle (Jay). Elementor's editor CSS rings inputs the
   same way.

   So: no ring, border or outline on any input that sits inside a wrapper, at
   every state. `:not([data-uc])` spares the DS Input/Textarea, which ARE the
   control and draw their own (correct, full-width) ring.

   `!important` and the `#…floating-panel` copies are deliberate: this defeats
   wp-admin core CSS, which is the established pattern for this panel — see the
   search-icon padding fix. A later "remove the hacks" pass will regress it. */
.panel.dock-right .lin-box :is(input, textarea):not([data-uc]),
.panel.dock-right .swatch-input :is(input, textarea):not([data-uc]),
.panel.dock-right .lin-box :is(input, textarea):not([data-uc]):focus,
.panel.dock-right .swatch-input :is(input, textarea):not([data-uc]):focus,
.panel.dock-right .lin-box :is(input, textarea):not([data-uc]):focus-visible,
.panel.dock-right .swatch-input :is(input, textarea):not([data-uc]):focus-visible,
#uichemy-composer-floating-panel .panel.dock-right .lin-box :is(input, textarea):not([data-uc]):focus,
#uichemy-composer-floating-panel .panel.dock-right .swatch-input :is(input, textarea):not([data-uc]):focus,
#smart-html-floating-panel .panel.dock-right .lin-box :is(input, textarea):not([data-uc]):focus,
#smart-html-floating-panel .panel.dock-right .swatch-input :is(input, textarea):not([data-uc]):focus {
  box-shadow: none !important;
  border-color: transparent !important;
  outline: none !important;
}

/* The box itself carries the ring, so a click anywhere in the field — the
   number, the pill, the side icon — shows one unbroken 1px edge. Restated here
   with the `.field.pf` copies so it out-ranks the resting border rule above. */
.panel.dock-right.uc-chrome .lin-box:focus-within,
.panel.dock-right.uc-chrome .field.pf .lin-box:focus-within,
.panel.dock-right.uc-chrome .sb-quad-cell:focus-within,
.panel.dock-right.uc-chrome .swatch-input.color-input:focus-within,
.panel.dock-right.uc-chrome .field.pf .swatch-input.color-input:focus-within {
  box-shadow: inset 0 0 0 1px var(--uc-ring), var(--uc-shadow-input);
}

/* Standalone DS controls (Input, Textarea — the comboboxes run on Input too)
   ARE the control, so their ring is correct in shape; what wp-admin adds is a
   BLUE 1.5px box-shadow on top of the panel's own neutral outline, giving two
   rings in two colours. Hold the resting border and let the outline (1px,
   `--uc-ring`, set above) be the only focus mark. */
.panel.dock-right.uc-chrome [data-uc='input']:focus,
.panel.dock-right.uc-chrome [data-uc='textarea']:focus,
#uichemy-composer-floating-panel .panel.dock-right.uc-chrome [data-uc='input']:focus,
#uichemy-composer-floating-panel .panel.dock-right.uc-chrome [data-uc='textarea']:focus,
#smart-html-floating-panel .panel.dock-right.uc-chrome [data-uc='input']:focus,
#smart-html-floating-panel .panel.dock-right.uc-chrome [data-uc='textarea']:focus {
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle), var(--uc-shadow-input) !important;
  border-color: transparent !important;
}

/* Design mode's breadcrumb: a plain row above the section stack, no card and no
   chevron. Its only content is the path, so the accordion chrome the Developer
   Element section needs would be a heading and a toggle wrapped around one line
   (Jay). Side padding matches `.rp-sec__trigger` so the crumb lines up with the
   section headings below it. */
/* Design mode's path row sits in its own grey box, like the sections below
   (Jay 2026-09-29) — same fill, radius, 12px padding and gap. Not an
   accordion: one line doesn't need a heading or a chevron. */
.panel.dock-right.uc-chrome .rp-insp .rp-el-plain {
  padding: var(--uc-space-12, 12px) var(--rp-gutter);
  margin-bottom: var(--rp-box-gap, 6px);
  background: color-mix(in srgb, var(--uc-surface-raised), #fff var(--rp-box-lift, 5%));
  border-radius: var(--uc-radius-md, 8px);
  min-width: 0;
}

/* ── Element section: plain labels + segmented controls (Jay, 2026-09-30) ───
   The block answered three questions with three different control shapes — a
   dropdown, a chip row and a select — so nothing lined up and each row had to
   be read separately. Now the two decisions that matter ("where do my styles
   land" and "when do they apply") are both segment tracks, and the labels name
   the consequence rather than the CSS term.
   ═══════════════════════════════════════════════════════════════════════════ */

/* The scope chips ARE the segments: one track, the active scope highlighted,
   with "+ Add class" trailing it as an action rather than a peer option. The
   chips are DS Chips (AppliedClasses, variant="rp"), so the track is drawn by
   the row around them. */
.panel.dock-right.uc-chrome .rp-insp .rp-id__classes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--uc-space-4, 4px);
  padding: 2px;
  border-radius: var(--uc-radius-md, 8px);
  background: var(--rp-field-bg, var(--uc-surface-overlay));
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
}
/* "+ Add class" is the one child that is not a scope — keep it quiet so the
   track reads as "these are your options, and here is how to add one". */
.panel.dock-right.uc-chrome .rp-insp .rp-id__classes .rp-addclass {
  margin-right: auto;
}

/* ── Element card rows ─────────────────────────────────────────────────────
   One label column, one control column, every control 28px. Label is 86px so
   "Save styles to" stays on one line — the widest label decides the column. */
.panel.dock-right.uc-chrome .rp-insp .rp-el-field {
  grid-template-columns: 86px minmax(0, 1fr);
}

/* Path above the card: context for the whole panel, so it reads as a caption,
   not a field. The parent button sits at the far end. */
.panel.dock-right.uc-chrome .rp-insp .rp-el-plain {
  display: flex;
  align-items: center;
  gap: var(--uc-space-6, 6px);
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-plain > .rp-path { min-width: 0; flex: 1 1 auto; }

/* Tag row: the tag picker, with Mark as pushed to the end. */
.panel.dock-right.uc-chrome .rp-insp .rp-el-tagrow {
  display: flex;
  align-items: center;
  gap: var(--uc-space-6, 6px);
  min-width: 0;
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-tag-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-4, 4px);
  height: var(--uc-control-h-sm, 28px);
  min-width: 0;
  padding: 0 var(--uc-space-8, 8px);
  border: 0;
  border-radius: var(--uc-radius-md, 8px);
  background: var(--rp-field-bg, var(--uc-surface-overlay));
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
  color: var(--uc-text-strong);
  font-family: var(--uc-font-mono, monospace);
  --uich-ff: var(--uc-font-mono, monospace);
  font-size: var(--uc-text-xs, 12px);
  cursor: pointer;
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-tag-trigger:hover {
  box-shadow: inset 0 0 0 1px var(--uc-border-strong);
}
.panel.dock-right.uc-chrome .rp-insp .rp-el-tagrow > .rp-el-mark { margin-right: auto; }

/* ── Scope track: chips that READ as segments but WRAP ─────────────────────
   A strict equal-width segmented control only survives two options. With three
   or four classes every segment shrinks until no name is legible, and there is
   nowhere to put the × that removes a class. So: one track, options at their
   natural width, wrapping to a second line rather than squeezing. Long names
   truncate (the full name is the chip's title). "+ Add class" trails the last
   option — an action, not a peer choice. Holds identically at 280px, where it
   simply wraps sooner. */
.panel.dock-right.uc-chrome .rp-insp .rp-id__classes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--uc-space-4, 4px);
  padding: 2px;
  /* `.rp-el-field__control` is a flex row, so the track is a flex ITEM in it:
     without this it sized to its own content (150px of a 190px column) and only
     one chip fitted per line. */
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  border-radius: var(--uc-radius-md, 8px);
  background: var(--rp-field-bg, var(--uc-surface-overlay));
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
}
/* Cap each class at half the track so TWO fit per line. Left uncapped, a chip
   sized to its own text ("text-cafe-display" is 124px of a 190px track) pushed
   every neighbour onto its own row, and five classes became a five-row stack.
   Capping costs an ellipsis on the longest names — the full name stays in the
   title, and the row below already names the consequence — and buys back half
   the height. The FIRST chip ("This element") is exempt: it is the default
   scope and the one label that must never be guessed at. */
.panel.dock-right.uc-chrome .rp-insp .rp-id__classes .rp-scope-chip {
  max-width: calc(50% - 2px);
  min-width: 0;
}
.panel.dock-right.uc-chrome .rp-insp .rp-id__classes .rp-scope-chip:first-child {
  max-width: 100%;
}
/* The chip's own label is what overflows on a long class name. */
.panel.dock-right.uc-chrome .rp-insp .rp-scope-chip > :is(span, .chip-label) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* "Add class" is an ACTION, not a fifth option, so at rest it is a 26px `+`
   that trails the last chip — a full-width text input there pushed the track to
   two rows even with one class, and read as another thing to choose between.
   Clicking it focuses the input underneath, which widens the box; blurring
   collapses it. No JS: the input already owns the focus state. */
.panel.dock-right.uc-chrome .rp-insp .rp-id__classes .rp-addclass {
  position: relative;
  flex: 0 0 auto;
  width: var(--uc-control-h-xs, 26px);
  min-width: 0;
  /* Trails the LAST chip, not the right edge: `margin-left: auto` pushed it
     onto a line of its own as soon as the chips wrapped. */
  transition: width var(--uc-dur-fast, 120ms) var(--uc-ease-standard, ease);
}
.panel.dock-right.uc-chrome .rp-insp .rp-id__classes .rp-addclass::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: var(--uc-text-sm, 13px);
  color: var(--uc-text-muted);
  pointer-events: none;
}
.uich-tw .panel.dock-right.uc-chrome .rp-insp .rp-addclass input[data-uc='input'] {
  width: 100%;
  min-width: 0;
  padding: 0;
  opacity: 0;
}
.panel.dock-right.uc-chrome .rp-insp .rp-id__classes .rp-addclass:focus-within {
  width: 124px;
}
.panel.dock-right.uc-chrome .rp-insp .rp-id__classes .rp-addclass:focus-within::after { content: none; }
.uich-tw .panel.dock-right.uc-chrome .rp-insp .rp-addclass:focus-within input[data-uc='input'] {
  padding: 0 var(--uc-space-8, 8px);
  opacity: 1;
}

/* ── State segments ────────────────────────────────────────────────────────
   Three fit beside the label at 280px; the rest live under the overflow, and
   StateSegments keeps the CURRENT state on the track so going back is never a
   menu trip. One row only — the pill variant's active marker is a single
   JS-positioned slider that tracks x, so a wrapped row would strand it. */
/* `.rp-el-field__control` is itself a flex row, so the wrap is a flex ITEM in
   it: without `flex: 1 1 auto` it sized to its content and left the track with
   no room at all (the three tabs collapsed to 8px and overlapped). */
/* GRID, not flex. The tabs carry `min-width: 0` so their labels can ellipsize,
   which also means the track's content can shrink to nothing — under flex the
   whole segmented control duly collapsed to 8px and the labels overlapped. A
   grid column is sized by the TRACK, not by its content, so `minmax(0, 1fr)`
   hands the segments the row's real width and the overflow button takes only
   what it needs. */
.panel.dock-right.uc-chrome .rp-insp .rp-state-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--uc-space-5, 5px);
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
/* `flex: 1 1 0`, not `auto`: with an auto basis the track sizes to its own
   content, and inside a flex row that let the three tabs collapse onto each
   other until the labels overlapped. A zero basis makes the track take the row
   and share it equally between the tabs. */
.panel.dock-right.uc-chrome .rp-insp .rp-state-seg {
  min-width: 0;
  width: 100%;
}
.panel.dock-right.uc-chrome .rp-insp .rp-state-seg [role='tablist'] {
  width: 100%;
  min-width: 0;
}
.panel.dock-right.uc-chrome .rp-insp .rp-state-seg [role='tab'] {
  flex: 1 1 0;
  min-width: 0;
  padding-right: var(--uc-space-4, 4px);
  padding-left: var(--uc-space-4, 4px);
  font-size: var(--uc-text-2xs, 11px);
}
.panel.dock-right.uc-chrome .rp-insp .rp-state-more { flex: none; }

/* Marks a state that already carries styles, so you can see Hover has been
   styled without visiting it — on a segment, and on the overflow button. */
.rp-seg-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.75;
  vertical-align: middle;
}
/* Shown in place of the segments while the scope is `local`, where no state is
   reachable — the old Select sat there permanently disabled, explaining
   nothing. */
.rp-el-state-na {
  font-size: var(--uc-text-xs, 12px);
  color: var(--uc-text-muted);
  line-height: 1.45;
}

/* ---- Colour fields: one look everywhere (Jay 2026-09-30) -----------------
   A linked global's NAME ("cafe-cream") was the only value in the panel drawn
   bold with extra tracking (composer.css `.color-field-linked-input`), so a
   gradient stop linked to a global read unlike every other colour field and
   clipped to "cafe-…" first. Same weight and tracking as a hex value now; the
   globe button already marks the link. */
:is(.uich-composer-host, .uich-tw, body) .panel.dock-right.uc-chrome .swatch-input.color-input input.color-field-linked-input {
  font-weight: inherit;
  letter-spacing: normal;
}
/* Gradient stops: the position box takes only what "100 %" needs, so the
   colour field — the same ColorInput as every other colour field — gets the
   rest of the row instead of ~100px in a narrow panel. */
.panel.dock-right.uc-chrome .gp-pos-cell { width: 66px; } /* "100" needs 54px of input + the % */
/* Design-mode gradient: "From" / "To" labels sit where the position cells were. */
.panel.dock-right.uc-chrome .gp--simple .gp-simple-label { width: 66px; flex: 0 0 66px; font-size: 12px; color: var(--uc-text, var(--text-mid)); }
/* The X/Y pair needs the full card width in the narrow right dock. */
.panel.dock-right.uc-chrome .gp-set-row--position { flex-direction: column; align-items: stretch; gap: 6px; }
.panel.dock-right.uc-chrome .gp-position-fields { width: 100%; min-width: 0; }
.panel.dock-right.uc-chrome .gp-position-fields > span { flex: 1 1 0; width: auto; min-width: 0; }
.panel.dock-right.uc-chrome .gp-position-fields input { min-width: 0; }
/* Stop selection is shown on the preview handles, not in the colour rows. */
:is(.uich-composer-host,.uich-tw,body) .panel.dock-right.uc-chrome .gp--simple .gp-row,
:is(.uich-composer-host,.uich-tw,body) .panel.dock-right.uc-chrome .gp--simple .gp-row.active { background: transparent; box-shadow: none; }
.panel.dock-right.uc-chrome .gp-color-cell { flex: 1 1 0; min-width: 0; }
.panel.dock-right.uc-chrome .gp-color-cell > .swatch-input { flex: 1 1 auto; min-width: 0; width: 100%; }

/* ── Developer Element block, minimal (Jay, option B) ─────────────────────────
   Header: name on the left; the tag (quiet, clickable) and ⋯ (Mark as loop /
   form) on the right, before the chevron. They are SIBLINGS of the accordion
   trigger (a button can't hold buttons), laid over its right end. Body: one
   row of two pills — where the next edit lands, and in which state. */
.panel.dock-right.uc-chrome .rp-sec--element-min { position: relative; }
.panel.dock-right.uc-chrome .rp-sec--element-min .rp-sec__trigger { min-height: 44px; }
/* Room for the tag + ⋯ laid over the row; the chevron keeps its place. */
.panel.dock-right.uc-chrome .rp-sec--element-min .rp-el-title { padding-left: 112px; }
.panel.dock-right.uc-chrome .rp-sec--element-min .rp-el-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel.dock-right.uc-chrome .rp-el-headtools {
  position: absolute;
  top: 0;
  left: calc(var(--rp-gutter) + 22px);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 2px;
  max-width: 116px;
  z-index: 1;
}
.panel.dock-right.uc-chrome .rp-el-headtools .rp-el-tag { min-width: 0; }
.panel.dock-right.uc-chrome .rp-el-tag-quiet {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  max-width: 88px;
  padding: 0 6px;
  border: 0;
  border-radius: var(--uc-radius-sm, 6px);
  background: transparent;
  color: var(--uc-text-muted);
  font-family: var(--uc-font-mono, monospace);
  --uich-ff: var(--uc-font-mono, monospace);
  font-size: var(--uc-text-2xs, 11px);
  cursor: pointer;
}
.panel.dock-right.uc-chrome .rp-el-tag-quiet > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel.dock-right.uc-chrome .rp-el-tag-quiet:hover,
.panel.dock-right.uc-chrome .rp-el-tag-quiet[data-state='open'] {
  background: var(--uc-surface-hover, rgba(255, 255, 255, 0.07));
  color: var(--uc-text-strong);
}
.panel.dock-right.uc-chrome .rp-el-more { position: relative; color: var(--uc-text-muted); }
.panel.dock-right.uc-chrome .rp-el-more:hover { color: var(--uc-text-strong); }
.panel.dock-right.uc-chrome .rp-el-more__dot {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* The one row of pills. */
.panel.dock-right.uc-chrome .rp-el-pills {
  display: flex;
  gap: 6px;
  min-width: 0;
}
.panel.dock-right.uc-chrome .rp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--uc-control-h-sm, 28px);
  min-width: 0;
  padding: 0 10px 0 8px;
  border: 0;
  border-radius: var(--uc-radius-md, 8px);
  background: var(--rp-field-bg, var(--uc-surface-overlay));
  color: var(--uc-text-strong);
  font-size: var(--uc-text-xs, 12px);
  cursor: pointer;
}
.panel.dock-right.uc-chrome .rp-pill > svg:last-child { flex: 0 0 auto; color: var(--uc-text-muted); margin-right: auto; }
.panel.dock-right.uc-chrome .rp-pill:hover:not(:disabled),
.panel.dock-right.uc-chrome .rp-pill[data-state='open'] {
  background: var(--uc-surface-hover, rgba(255, 255, 255, 0.1));
}
.panel.dock-right.uc-chrome .rp-pill:disabled { cursor: default; color: var(--uc-text-muted); }
.panel.dock-right.uc-chrome .rp-pill--scope { flex: 1 1 auto; }
.panel.dock-right.uc-chrome .rp-scope-control {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}
.panel.dock-right.uc-chrome .rp-scope-control[data-has-highlight='true'] > .rp-pill--scope {
  padding-left: 54px;
}
.panel.dock-right.uc-chrome .rp-scope-control[data-has-highlight='true'] > .rp-pill--scope > svg:last-child {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}
.panel.dock-right.uc-chrome .rp-class-highlight {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
}
.panel.dock-right.uc-chrome .rp-class-highlight[aria-pressed='true'] {
  color: var(--uc-warning);
  background: var(--uc-surface-hover);
  box-shadow: inset 0 0 0 1px var(--uc-warning);
}
.panel.dock-right.uc-chrome .rp-pill--scope > svg:first-child { flex: 0 0 auto; color: var(--uc-text-muted); }
.panel.dock-right.uc-chrome .rp-pill--state { flex: 0 0 auto; position: relative; }
.panel.dock-right.uc-chrome .rp-pill--state.is-on { box-shadow: inset 0 0 0 1px var(--uc-border-strong); }
.panel.dock-right.uc-chrome .rp-pill__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel.dock-right.uc-chrome .rp-pill__label.is-mono,
.rp-scope-row__label.is-mono {
  font-family: var(--uc-font-mono, 'JetBrains Mono', monospace);
  --uich-ff: var(--uc-font-mono, 'JetBrains Mono', monospace);
  font-size: var(--uc-text-2xs, 11px);
}
.panel.dock-right.uc-chrome .rp-pill--scope.is-global .rp-pill__label { color: var(--uc-global, #a78bfa); }
/* Usage follows the class name and never shrinks; the name gives way. */
.panel.dock-right.uc-chrome .rp-pill__count {
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--uc-radius-full, 999px);
  background: var(--uc-surface-raised);
  box-shadow: inset 0 0 0 1px var(--uc-border);
  color: var(--uc-text-muted);
  font-size: var(--uc-text-2xs, 11px);
  font-weight: var(--uc-weight-medium, 500);
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* The scope list (portalled, so global selectors). */
.rp-scope-menu.rp-scope-menu {
  width: var(--radix-popper-anchor-width, 240px);
  min-width: 240px;
  max-width: calc(100vw - 16px);
  padding: 6px !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rp-scope-menu__title {
  padding: 4px 8px 2px;
  font-size: var(--uc-text-2xs, 11px);
  color: var(--uc-text-muted, #8a8a8a);
}
.rp-scope-menu__list { display: flex; flex-direction: column; max-height: 240px; overflow-y: auto; }
.rp-scope-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 6px 0 4px;
  border-radius: var(--uc-radius-sm, 6px);
  font-size: var(--uc-text-xs, 12px);
  color: var(--uc-text-strong, #f5f5f5);
  cursor: pointer;
  outline: none;
}
.rp-scope-row > svg { flex: 0 0 auto; color: var(--uc-text-muted, #8a8a8a); }
.rp-scope-row:hover,
.rp-scope-row:focus-visible { background: var(--uc-surface-hover, rgba(255, 255, 255, 0.07)); }
.rp-scope-row__label { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-scope-row.is-global .rp-scope-row__label { color: var(--uc-global, #a78bfa); }
/* A Global Class is listed (to see or remove it) but is not an edit target:
   it is edited in Site styles. */
.rp-scope-row[aria-disabled='true'] { cursor: default; }
.rp-scope-row[aria-disabled='true']:hover { background: transparent; }
.rp-scope-row__tag { font-size: var(--uc-text-2xs, 11px); color: var(--uc-text-muted, #8a8a8a); }
.rp-scope-row__remove { opacity: 0; flex: 0 0 auto; }
.rp-scope-row:hover .rp-scope-row__remove,
.rp-scope-row:focus-within .rp-scope-row__remove { opacity: 1; }
.rp-menu-check {
  display: inline-flex;
  width: 14px;
  flex: 0 0 14px;
  justify-content: center;
  color: var(--uc-text-strong, #f5f5f5);
}
.rp-scope-menu__add {
  padding: 4px 2px 0;
  border-top: 1px solid var(--uc-border-subtle, rgba(255, 255, 255, 0.08));
}
.rp-scope-menu__add .rp-addclass,
.rp-scope-menu__add .rp-addclass > * { width: 100%; }
.rp-scope-menu__hint {
  padding: 2px 8px 4px;
  font-size: var(--uc-text-2xs, 11px);
  line-height: 1.4;
  color: var(--uc-text-muted, #8a8a8a);
}
@media (hover: none) { .rp-scope-row__remove { opacity: 1; } }

/* ---- Narrow panel (280px, the dock minimum) — 2026-09-30 audit ----------
   The colour field's hex kept 8px padding on BOTH sides although the swatch
   chip's 8px gap already clears it on the left, so "#FFFFFF" was cut to
   "#FFFF" once the field shrank to ~110px. Left pad dropped, right trimmed. */
.panel.dock-right.uc-chrome .swatch-input.color-input > input,
#uichemy-composer-floating-panel .panel.dock-right.uc-chrome .swatch-input.color-input > input,
#smart-html-floating-panel .panel.dock-right.uc-chrome .swatch-input.color-input > input {
  padding: 0 0 0 var(--uc-space-4, 4px);
}

/* ── One label look (Jay 2026-09-30: "all label size same to same") ─────────
   Field captions everywhere in the right panel = the settings row label:
   12px regular, mid text, sentence case, no tracking. Sub-group headers
   (Flex container, Gaps, Gradient) are the same 12px at medium weight, so they
   still read as a heading without shouting. Comes last and carries the
   panel prefix so the older 10px/uppercase rules above can't win. */
:is(.uich-composer-host, .uich-tw, body) .panel.dock-right.uc-chrome :is(
  .uc-field-label, .uich-texts__label, .uc-img-src__label,
  .gp-set-row > label, .gp-stops-head > label, .gp-css-row > label,
  .gp-col-label-pos, .gp-col-label-color
) {
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-regular, 400);
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  color: var(--uc-text, var(--text-mid));
}
:is(.uich-composer-host, .uich-tw, body) .panel.dock-right.uc-chrome .rp-insp :is(.subsec-title, .gp-section-divider) {
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-medium, 500);
  letter-spacing: normal;
  text-transform: none;
  color: var(--uc-text, var(--text-mid));
}

/* Image settings (background image, mask…) use the Image block's big preview,
   so they stack: label on its own line, the preview + URL across the full
   width. In the label | field row the well got ~120px at the narrow panel —
   "Choose Image" overflowed into a strip and Source showed two letters. */
:is(.uich-composer-host, .uich-tw, body) .panel.dock-right .field.pf.pf-stack {
  grid-template-columns: minmax(0, 1fr);
  row-gap: 6px;
}
.panel.dock-right.uc-chrome .rp-insp .rp-sec--construct .uich-construct-nest .field.pf > * {
  grid-column: 1;
}
:is(.uich-composer-host, .uich-tw, body) .panel.dock-right .field.pf.pf-stack > .pf-label { grid-column: 1; }
:is(.uich-composer-host, .uich-tw, body) .panel.dock-right .field.pf.pf-stack > :not(.pf-label) { grid-column: 1; min-width: 0; }

/* Hide on device (composer-inspector.jsx renderHideOnRow): one icon toggle per
   device, the device's name in its tooltip; they wrap only if the panel is
   narrower than the row. */
.rp-hide-on { padding-top: 0; }
.rp-hide-on__row { display: flex; flex-wrap: wrap; gap: 4px; }
.rp-hide-on__row > button { min-width: 32px; padding-inline: 8px; }

/* Entrance animation (composer-inspector.jsx renderEntranceRow). */
.rp-entrance-sec { padding-top: 0; }
.rp-entrance__ms { position: relative; }
.rp-entrance__ms input { padding-left: 28px; }
/* No browser spin arrows: they drew over the "ms" unit at the right edge (QA).
   Up / Down on the keyboard still step the value by 50. */
.rp-entrance__ms input[type='number'] { -moz-appearance: textfield; -webkit-appearance: textfield; appearance: textfield; }
.rp-entrance__ms input[type='number']::-webkit-inner-spin-button,
.rp-entrance__ms input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.rp-entrance__unit {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--text-dim, hsl(var(--muted-foreground))); pointer-events: none;
}

/* ---- Loop / Form section (the builder's constructSection) ------------------ */
/* Its body is a section row like Content's, and the wrapper above already brings
   the panel gutter. The construct body carries its own gutter too (it is built
   to stand alone), so the Visual / Code control and every field under it sat one
   gutter further in than Content's. */
.panel.dock-right.uc-chrome .rp-insp .rp-sec--construct .uich-construct-body {
  padding-right: 0;
  padding-left: 0;
}
/* The form's own sections (Fields / On submit / After submit) are rows of this
   section, so they sit on its edges: the same 12px title and the same chevron
   column as the section title above (the DS accordion's own 14px title and 4px
   side padding put both 4px inside it), and no extra bottom padding under a
   body that already carries its own. */
.panel.dock-right.uc-chrome .rp-insp .rp-sec--construct .uich-construct-section-trigger {
  padding: 12px 0;
  font-size: 12px;
}
.panel.dock-right.uc-chrome .rp-insp .rp-sec--construct .uich-construct-section-content {
  padding: 0;
}
/* A field revealed under a switch is narrow (the ruled nest is 14px in): the
   label above the control, not a 80px label column that leaves the control
   176px wide. */
.panel.dock-right.uc-chrome .rp-insp .rp-sec--construct .uich-construct-nest .field.pf {
  grid-template-columns: minmax(0, 1fr);
  row-gap: 6px;
}
/* The Visual / Code switch spans the row, like Design / Developer above. */
.panel.dock-right.uc-chrome .rp-insp .rp-sec--construct .uich-construct-body > :is([role='radiogroup'], [role='tablist'], [data-uc='segmented-control']) {
  width: 100%;
}

/* ==== Chat tab, dark-panel legibility pass (QA, 2026-10) ======================
   The chat's secondary text (message meta, history preview + time, the model
   picker's "how to connect" blurb) was written against `--text-dim`, which the
   dark panel scope leaves at #525252: 2.29:1 on the #171717 panel and 1.99:1 on
   the #242424 popover. `--rp-chat-dim` is the one role those rules read now:
     dark   #9A9A9A (the panel's text-muted)  6.37:1 on #171717, 5.79:1 on
            #202020, 5.52:1 on the #242424 popover, 5.10:1 on a hovered row
     light  #595959                           7.00:1 on #FFFFFF, 5.72:1 on a
            selected row (#737373 was 3.87:1 there)
   Declared at (0,1,0) with :where() so the light block below wins on order. */
:where(.panel.dock-right, .uich-rp).uc-chrome {
  --rp-chat-dim: var(--rp-text-muted, #9A9A9A);
  /* Prompt placeholder (QA CLI-100): #9A9A9A in dark, light keeps --text-dim. */
  --rp-chat-placeholder: var(--rp-chat-dim);
  /* Skeleton bars (QA CLI-098): 49% grey = #4A4A4A on the #171717 panel. */
  --rp-chat-skel: rgba(128, 128, 128, 0.49);
}
:is(.uich-composer-host, .uich-tw, body)[data-uich-composer-theme="light"] :is(.panel.dock-right, .uich-rp).uc-chrome,
:is(.uich-composer-host, .uich-tw, body)[data-theme="light"] :is(.panel.dock-right, .uich-rp).uc-chrome,
:is(.panel.dock-right, .uich-rp).uc-chrome[data-uich-composer-theme="light"],
:is(.panel.dock-right, .uich-rp).uc-chrome[data-theme="light"] {
  --rp-chat-dim: #595959;
  --rp-chat-placeholder: var(--text-dim);
  --rp-chat-skel: rgba(128, 128, 128, 0.36);
}

/* Message meta ("Composer · just now"). */
:is(.panel.dock-right, .uich-rp).uc-chrome .msg2-meta { color: var(--rp-chat-dim); }
:is(.panel.dock-right, .uich-rp).uc-chrome .msg2-meta b { color: var(--rp-text-strong, var(--text-hi)); }

/* Model picker popover, "WP Connectors" / "CLI" empty tab. The popover mounts
   in the `.uich-rp` portal root, so the selector names both scopes. */
:is(.panel.dock-right, .uich-rp).uc-chrome .model-connect-body { color: var(--rp-chat-dim); }
:is(.panel.dock-right, .uich-rp).uc-chrome .model-connect-title { color: var(--rp-text-strong, var(--text-hi)); }

/* Picked-element chips above a sent message (`.msg2-refs` > Badge soft neutral).
   The DS neutral-soft badge is --uc-text-muted on --uc-surface-sunken, which
   reads as a hole in the dark bubble. Strong text on the raised surface with a
   real border: #FFFFFF on #202020 16.29:1 (light: #0A0A0A on #FFFFFF 19.80:1). */
.panel.dock-right.uc-chrome .msg2-refs > * {
  color: var(--rp-text-strong);
  background: var(--rp-surface-raised);
  box-shadow: inset 0 0 0 1px var(--rp-border);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Loading skeleton. `--uc-surface-sunken` (#101010) on the #171717 panel is
   invisible, so the bars take a neutral grey wash that lifts off a dark panel
   and darkens a light one, with a white sheen sweep. The module's own animation
   and its prefers-reduced-motion rule stay in charge of the motion. */
.panel.dock-right.uc-chrome .chat-loading > div { background: var(--rp-chat-skel, rgba(128, 128, 128, 0.36)); }
.panel.dock-right.uc-chrome .chat-loading > div::after {
  background: linear-gradient(-90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}
@media (prefers-reduced-motion: reduce) {
  .panel.dock-right.uc-chrome .chat-loading > div,
  .panel.dock-right.uc-chrome .chat-loading > div::after { animation: none; }
}

/* ---- Chat history rows -----------------------------------------------------
   Before: only the selected row had a box (inset 1px + fill), the others had
   nothing, preview and time were #525252. Now every row is the same shape (8px
   radius, 9px 10px padding, 2px apart): rest = bare, hover = light wash,
   selected = the stronger wash (no outline), keyboard focus = an inset ring so
   it is not clipped by the scrolling list. Preview and time use --rp-chat-dim. */
.panel.dock-right.uc-chrome .chat-side-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.panel.dock-right.uc-chrome .chat-side .ctile {
  padding: 9px 10px;
  border-radius: var(--uc-radius-md, 8px);
  box-shadow: none;
  color: var(--rp-text);
  transition: background var(--uc-dur-fast, 120ms) var(--uc-ease-standard, ease);
}
.panel.dock-right.uc-chrome .chat-side .ctile:hover,
.panel.dock-right.uc-chrome .chat-side .ctile.menu-open {
  background: var(--rp-hover);
  color: var(--rp-text-strong);
}
.panel.dock-right.uc-chrome .chat-side .ctile.on {
  background: var(--rp-press);
  box-shadow: none;
  color: var(--rp-text-strong);
}
.panel.dock-right.uc-chrome .chat-side .ctile:focus-visible {
  outline: 2px solid var(--rp-ring);
  outline-offset: -2px;
}
.panel.dock-right.uc-chrome .ctile-body { gap: 2px; }
.panel.dock-right.uc-chrome .ctile-s { color: var(--rp-chat-dim); }
.panel.dock-right.uc-chrome .ctile-when {
  color: var(--rp-chat-dim);
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
  .panel.dock-right.uc-chrome .chat-side .ctile { transition: none; }
}

/* ==========================================================================
 * RIGHT PANEL SCALE: every size in the right panel on the UiChemy DS scale.
 *
 * Jay (2026-09-28): the composer panel docked right, and every pop-up opened
 * from it, must use the UiChemy design system's sizes, the same as the page
 * builder's style panel, in every skin. The legacy composer CSS
 * (composer.css, composer-dock.css) was written with in-between sizes:
 * 11px and 11.5px text, weight 600/700, 5px and 10px corners, 30px and 36px
 * controls, 3/5/7/9px paddings. This file puts them on the DS scale.
 *
 * HOW. Nothing in the original files is edited. Every rule here is an
 * OVERRIDE of one legacy rule: the same selector with its old ancestor
 * context replaced by the right-panel scope, so outside the panel (canvas,
 * canvas toolbar, bottom timeline dock, admin screens, the panel docked
 * anywhere else) the old values still render exactly as before.
 *
 *   scope   :is(.uich-composer-host, .uich-tw, body)
 *           :is(.panel.dock-right, .uich-rp).uc-chrome
 *             .panel.dock-right   the panel itself (composer-app.jsx adds
 *                                 uc-chrome only while docked right)
 *             .uich-rp            the shared portal root, docked right: menus,
 *                                 colour picker, Globals / deps pop-ups,
 *                                 the floating Layers window, Pro modal
 *           The leading :is(...) always matches (body is an ancestor of both);
 *           it only lifts the scope to (0,4,0). An original carries at most
 *           (0,2,0) of ancestor context, so each override outranks it; this
 *           file also loads after composer.css and composer-dock.css
 *           (index.jsx).
 *   floating-shell rules  originals written under
 *           #uichemy-composer-floating-panel keep that id, scoped to
 *           #uichemy-composer-floating-panel .panel.dock-right.uc-chrome.
 *
 * GUARDS, both inside a zero-weight :where(), so they cost no specificity:
 *   [data-uc]         a UiChemy DS component element (Button, Input, Select,
 *                     Popover ...) is already DS; never restyled here.
 *   .rp-insp *        the settings panel (Inspector) is owned by
 *                     composer-right-panel-layout.css; left alone, EXCEPT the
 *                     Animation and Assets sections that render inside it
 *                     (their rules carry only the [data-uc] guard).
 *
 * MAPPING (DS tokens, design-system/styles/tokens.css):
 *   font-size    9 / 9.5 -> 10 (--uc-text-2xs) · 10.5 / 11 / 11.5 -> 12 (xs)
 *                12.5 -> 13 (sm) · 15 -> 14 (base) · 8, 10, 12, 13, 14, 16 stay
 *   font-weight  600 / 650 / 700 / 800 -> 500 (--uc-weight-medium; the DS
 *                folds semibold into medium)
 *   radius       2 / 3 -> 4 · 5 / 7 -> 6 · 9 / 10 / 11 -> 8 · 12 and up stay
 *   height       controls 24-30 -> 28 (--uc-control-h-sm), 31-36 -> 32 (md);
 *                left alone: icon boxes, avatars, logo marks, swatches, tab
 *                triggers (DS tab 26 / tab-sm 22) and the mini buttons nested
 *                inside a field. Square icon buttons keep their width = height.
 *   padding/gap  the even space steps 2 4 6 8 10 12 14 16 20 24 28 32 36 40;
 *                odd and in-between values go to the nearest step (a tie goes
 *                to the multiple of 4, then the smaller). 1px hairlines stay.
 *   Each changed value is noted with the value it replaces ("was ...").
 *
 * RESTATED VALUES. A declaration without a "was" note restates the original
 * value of a rule that used to beat one overridden here. Without it, the
 * higher-weight override would now win against that rule and change a size
 * that was never off-scale. Within this file rules keep the precedence order
 * they had in the originals (checked by script, see below).
 *
 * NOT HERE, on purpose:
 *   - canvas, canvas toolbar, text toolbar, selection overlay, the bottom
 *     scroll-timeline dock (.uich-mtl-*): outside the panel.
 *   - the code editor's own text metrics (CodeMirror .cm-*).
 *   - colour-picker and gradient internals (saturation field, hue/alpha
 *     tracks, handles, stop swatches, checkerboard): bespoke geometry.
 *   - rules whose classes no longer appear in any JSX (the old stage mockup,
 *     the retired colour picker, retired inspector chips): they match
 *     nothing, so they are not overridden.
 *   - colours (composer-right-panel.css) and skin differences
 *     (composer-right-panel-skin.css, loaded after this file).
 *
 * Generated from an audit of composer.css + composer-dock.css and then
 * checked by script: every selector parses, every value is on the DS scale,
 * each override outranks its original, and no override inverts the order of
 * two legacy rules that compete for the same element and property. When a
 * legacy rule in those files changes size, re-check the matching rule here.
 * ======================================================================== */

/* ---- Scale tokens the legacy rules read --------------------------------
   --radius was 6.4px (0.4rem, brand) and --radius-sm 2.4px; the segmented
   track 9px / 7px; fields 30px (--input-h) and layer rows 26px (--row-h);
   right-dock section titles weight 600 with an 18px bottom. Re-pointed only
   in the right-panel scope; composer-right-panel-layout.css sets its own
   --input-h inside .rp-insp. */
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome {
  --radius: var(--uc-radius-6);            /* was 0.4rem = 6.4px */
  --radius-sm: var(--uc-radius-4);         /* was calc(var(--radius) - 4px) = 2.4px */
  --seg-radius: var(--uc-radius-8);        /* was 9px */
  --seg-radius-inner: var(--uc-radius-6);  /* was 7px */
  --input-h: var(--uc-control-h-sm);       /* was 30px */
  --row-h: var(--uc-control-h-sm);         /* was 26px */
  --pf-sec-fw: var(--uc-weight-medium);    /* was 600 */
  --pf-sec-pad-b: var(--uc-space-16);      /* was 18px */
}

/* ==== Panel chrome: header, tab strip, resize grip, section heads, footer bar ==== */

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .panel-icon-btn:not(:where([data-uc], .rp-insp *)) {
  border-radius: var(--uc-radius-6); /* was 5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .panel-resize:not(:where([data-uc], .rp-insp *))::after {
  border-radius: var(--uc-radius-4); /* was 3px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .construct-accordion-head:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-8); /* was 9px */
  padding: var(--uc-space-16) var(--pf-sec-pad-x) var(--uc-space-12); /* was 18px var(--pf-sec-pad-x) 12px */
}

/* ==== Chat tab: messages, process steps, model picker, context chips, prompt box, AI setup, agent access ==== */

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .scope-dd:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-4); /* was 5px */
  height: var(--uc-control-h-sm); /* was 30px */
  border-radius: var(--uc-radius-4); /* was 2px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .chat-status .scope-dd:not(:where([data-uc], .rp-insp *)) {
  height: var(--uc-control-h-sm);
  border-radius: var(--uc-radius-8);
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .empty-card:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-16); /* was 18px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .empty-card-body:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-sm); /* was 12.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .ai-setup-title:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-base); /* was 15px */
  font-weight: var(--uc-weight-medium); /* was 600 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .msg2-meta b:not(:where([data-uc], .rp-insp *)) {
  font-weight: var(--uc-weight-medium); /* was 600 */
  font-size: var(--uc-text-sm); /* was 12.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .ctx-chip:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-4); /* was 5px */
  font-size: var(--uc-text-xs); /* was 11px */
  padding: var(--uc-space-4) var(--uc-space-8); /* was 3px 8px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .ctx-chip button:not(:where([data-uc], .rp-insp *)) {
  padding: 0 var(--uc-space-4) 0 0; /* was 0 0 0 3px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pick-overlay-btn-row button:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-4) var(--uc-space-16); /* was 5px 16px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .process-step:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-4) var(--uc-space-10) var(--uc-space-4) 0; /* was 3px 0 3px 10px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .inline-err:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .err-toast:not(:where([data-uc], .rp-insp *)) {
  border-radius: var(--uc-radius-8); /* was 10px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .process-head:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .err-toast-title:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-sm); /* was 12.5px */
  font-weight: var(--uc-weight-medium); /* was 600 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .globals-pop-empty code:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .stop-icon:not(:where([data-uc], .rp-insp *)) {
  border-radius: var(--uc-radius-4); /* was 3px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .model-btn:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .composer-image-thumb:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .ctile-kebab:not(:where([data-uc], .rp-insp *)) {
  border-radius: var(--uc-radius-6); /* was 5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .msg .who b:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .empty-hero h3:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .empty-cards-or:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .empty-card-title:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .model-connect-title:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .msg2-text .uich-md-h:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .ctx-chip.picked:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .globals-toggle-label:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .picked-banner b:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pick-overlay-msg b:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .inline-err-title:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .composer-drop:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .chat-side-section:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .agent-access-title:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .agent-access-body strong:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-title:not(:where([data-uc], .rp-insp *)) {
  font-weight: var(--uc-weight-medium); /* was 600 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-body:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-16); /* was 18px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-foot:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-12) var(--uc-space-16); /* was 11px 16px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .composer-stop:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-node:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-4); /* was 5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .agent-access-again:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-link:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-copy:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-bead:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-node-label:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-xs); /* was 10.5px */
  font-weight: var(--uc-weight-medium); /* was 700 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-listen:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-8) var(--uc-space-12); /* was 9px 12px */
  font-size: var(--uc-text-xs); /* was 11px */
  font-weight: var(--uc-weight-medium); /* was 600 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .agent-launch:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .agent-pairing-warn:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-8); /* was 7px */
  font-size: var(--uc-text-xs); /* was 11px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .agent-cmd:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-8) var(--uc-space-12) var(--uc-space-8) var(--uc-space-8); /* was 8px 8px 8px 11px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .msg2-tool:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-close:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .agent-cmd-copy:not(:where([data-uc], .rp-insp *)) {
  width: var(--uc-control-h-sm); /* was 26px */
  height: var(--uc-control-h-sm); /* was 26px */
}


:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .composer-input:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-8); /* was 7px */
  border-radius: var(--uc-radius-4); /* was 2px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .chat-followup:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-4) var(--uc-space-12); /* was 5px 11px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .chat-status:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-8) var(--uc-space-16); /* was 7px 16px */
  font-size: var(--uc-text-xs); /* was 11.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .chat-composer .composer-input:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-8);
  border-radius: 0;
}

#uichemy-composer-floating-panel .panel.dock-right.uc-chrome .chat2-main > .chat-status:not(:where([data-uc], .rp-insp *)) {
  /* inline = card border + padding (1+8 right, 1+14 left): edges match the card */
  padding: var(--uc-space-20) 15px var(--uc-space-8) var(--uc-space-9); /* was 19px 10px 7px */
  font-size: var(--uc-text-xs); /* was 11.5px */
}

#uichemy-composer-floating-panel .panel.dock-right.uc-chrome .chat-status .rounded-lg > button:not(:where([data-uc], .rp-insp *)) {
  padding: 0 var(--uc-space-8); /* was 0 9px */
  font-size: var(--uc-text-xs); /* was 11.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .empty-link.sm:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .empty-foot:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .ai-setup-ctx:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .model-connect-body:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .msg2-meta:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .msg2-text :not(pre) > code:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .globals-toggle.var-pill .globals-toggle-btn:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .globals-toggle.var-block .globals-toggle-btn:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .globals-toggle.var-block .globals-toggle-sub:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .globals-pop:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .globals-pop-link:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .msg2-image:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .process-time:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .process-step-name:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .process-step-detail:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .err-toast-text:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .composer-ctx:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .composer-image-size:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .chat-side-empty:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .ctile-s:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .agent-access-body:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-sub:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-prompt:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-hint:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uconnect-lead:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .agent-cmd code:not(:where([data-uc], .rp-insp *)),
#uichemy-composer-floating-panel .panel.dock-right.uc-chrome .agent-cmd code:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-xs); /* was 11.5px */
}

/* ==== Code tab chrome (the editor text itself is left alone) ================ */

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pr-cm-globals:not(:where([data-uc], .rp-insp *)) {
  border-radius: var(--uc-radius-8); /* was 9px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pr-cm-globals-group:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-8); /* was 7px */
  font-weight: var(--uc-weight-medium); /* was 700 */
  font-size: var(--uc-text-xs); /* was 11px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .ed-title:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pr-cm-count:not(:where([data-uc], .rp-insp *)) {
  font-weight: var(--uc-weight-medium); /* was 600 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pr-cm-globals-item:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-6) var(--uc-space-20) var(--uc-space-6) var(--uc-space-8); /* was 6px 8px 6px 22px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pr-cm-var:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-xs); /* was 10.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .ed-pane:not(:where([data-uc], .rp-insp *)) {
  border-radius: var(--uc-radius-4); /* was 2px */
}

/* ==== Globals manager, global classes and variables ========================= */

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .input.mono:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-xs); /* was 11.5px */
}

/* ==== Construct tab (loops, forms, dynamic data) ============================ */

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-construct-check:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-4) 0; /* was 3px 0 */
  font-size: var(--uc-text-sm); /* was 12.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-construct-head:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-construct-head code:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-loop-note:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-field-desc:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-sec-desc:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-rule-n:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-loop-rawstate:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-construct-section-sum:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-xs); /* was 11.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-construct-switchrow:not(:where([data-uc], .rp-insp *)) {
  min-height: var(--uc-control-h-sm); /* was 30px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-construct-switchrow-label:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-sm); /* was 12.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .select:not(:where([data-uc], .rp-insp *)) {
  padding: 0 var(--uc-space-8); /* was 0 9px */
  padding-left: var(--uc-space-24); /* was 26px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .prop-cell .select:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .prop-input-stack .select:not(:where([data-uc], .rp-insp *)) {
  height: var(--uc-control-h-md); /* was 36px */
  padding-right: var(--uc-space-12); /* was 11px */
  padding-left: var(--uc-space-12); /* was 11px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .field.pf .select:not(:where([data-uc], .rp-insp *)) {
  height: var(--input-h);
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-construct-body .uich-construct-check:not(:where([data-uc], .rp-insp *)) {
  padding-right: 0;
  padding-left: 0;
}

/* ==== Dependencies, libraries and assets ==================================== */

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep-name:not(:where([data-uc], .rp-insp *)) {
  font-weight: var(--uc-weight-medium); /* was 600 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep-field-check:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-8); /* was 9px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .deps-foot:not(:where([data-uc], .rp-insp *)) {
  border-bottom-right-radius: var(--uc-radius-6); /* was 7px */
  border-bottom-left-radius: var(--uc-radius-6); /* was 7px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep-add-custom label input:not(:where([data-uc])):not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep-add-custom label select:not(:where([data-uc])):not(:where([data-uc], .rp-insp *)) {
  border-radius: var(--uc-radius-6); /* was 5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep-field-check-name:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep-field-check-hint:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep-attrs-hint:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep-add-custom label:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep-add-hint:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-xs); /* was 11.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-asset-empty:not(:where([data-uc])) {
  font-size: var(--uc-text-2xs); /* was 9px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep-add-custom:not(:where([data-uc], .rp-insp *))::-webkit-scrollbar-thumb,
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep-settings-body:not(:where([data-uc], .rp-insp *))::-webkit-scrollbar-thumb {
  border-radius: var(--uc-radius-4); /* was 2px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep-settings-head strong:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .dep-add-float-head strong:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-sm); /* was 12.5px */
  font-weight: var(--uc-weight-medium); /* was 650 */
}

/* ==== Layers / Navigator window and History ================================= */

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-history-row:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-8) var(--uc-space-14); /* was 7px 14px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-history-row .lh-scope:not(:where([data-uc], .rp-insp *)) {
  padding: 0 var(--uc-space-4); /* was 0 5px */
  font-weight: var(--uc-weight-medium); /* was 600 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-history-row.is-viewonly.is-current .lh-label:not(:where([data-uc], .rp-insp *)) {
  font-weight: var(--uc-weight-regular);
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layer-row:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-4); /* was 3px */
  border-radius: var(--uc-radius-6); /* was 5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-head h3:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-history-row.is-current .lh-label:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-empty-msg:not(:where([data-uc], .rp-insp *)) {
  font-weight: var(--uc-weight-medium); /* was 600 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-history-row .lh-meta:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layer-row .ltag:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-foot:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-foot .btn:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-used-toggle:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .msg .who:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-empty-sub:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-xs); /* was 11px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layer-row.drop-before:not(:where([data-uc], .rp-insp *))::before,
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layer-row.drop-after:not(:where([data-uc], .rp-insp *))::after,
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-tree:not(:where([data-uc], .rp-insp *))::-webkit-scrollbar-thumb,
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-history-body:not(:where([data-uc], .rp-insp *))::-webkit-scrollbar-thumb {
  border-radius: var(--uc-radius-4); /* was 2px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-float-resize:not(:where([data-uc], .rp-insp *))::after {
  border-bottom-left-radius: var(--uc-radius-4); /* was 3px */
}

/* ==== Animation section ===================================================== */

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-motion-help:not(:where([data-uc])) {
  font-size: var(--uc-text-xs); /* was 10.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .subsec-title:not(:where([data-uc], .rp-insp *)) {
  font-weight: var(--uc-weight-medium); /* was 600 */
  font-size: var(--uc-text-xs); /* was 11.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .prop-cell .input:not(:where([data-uc], .rp-insp *)) {
  height: var(--uc-control-h-md); /* was 36px */
  padding-right: var(--uc-space-12); /* was 11px */
  padding-left: var(--uc-space-12); /* was 11px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .prop-cell .border-input:not(:where([data-uc], .rp-insp *)) {
  min-height: var(--uc-control-h-md); /* was 36px */
}

/* ==== Pro upsell: badges, locks, modal ====================================== */

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pro-badge:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-2xs); /* was 9px */
  font-weight: var(--uc-weight-medium); /* was 800 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pro-badge--sm:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-1) var(--uc-space-4); /* was 1px 5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pro-lock--rich:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-24) var(--uc-space-20) var(--uc-space-20); /* was 26px 22px 22px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pro-lock__feat-t:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-sm); /* was 12.5px */
  font-weight: var(--uc-weight-medium); /* was 600 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pro-lock__msg:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pro-lock__feat-d:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-xs); /* was 11.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pro-lock__cta:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pro-modal__cta:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-8) var(--uc-space-16); /* was 7px 16px */
  font-weight: var(--uc-weight-medium); /* was 700 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pro-modal:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-24) var(--uc-space-24) var(--uc-space-24); /* was 26px 26px 24px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pro-lock__title:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pro-modal__title:not(:where([data-uc], .rp-insp *)) {
  font-weight: var(--uc-weight-medium); /* was 700 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pro-modal__msg:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-sm); /* was 12.5px */
}

/* ==== Colour and gradient pickers (pop-ups) ================================= */

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .swatch-input input:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-xs); /* was 11.5px */
  padding: 0 var(--uc-space-8); /* was 0 9px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .swatch-input input.color-field-linked-input:not(:where([data-uc], .rp-insp *)) {
  font-weight: var(--uc-weight-medium); /* was 600 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .gp-set-row:not(:where([data-uc], .rp-insp *)) {
  min-height: var(--uc-control-h-sm); /* was 26px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .gp-unit:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-xs); /* was 10.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .gp-stops-head:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-8) var(--uc-space-10) var(--uc-space-4); /* was 7px 10px 5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .gp-color-cell:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-4); /* was 5px */
}

#uichemy-composer-floating-panel .panel.dock-right.uc-chrome .swatch-input:not(:where([data-uc], .rp-insp *)) {
  padding: 0 var(--uc-space-4) 0 var(--uc-space-8); /* was 0 8px 0 5px */
}

/* ==== Shared legacy controls and settings-panel pop-ups (never inside .rp-insp) ==== */

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .inspector-head:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-8) var(--uc-space-14); /* was 7px 14px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-dd-hint code:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-xs); /* was 10.5px */
  padding: var(--uc-space-1) var(--uc-space-4); /* was 1px 5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .scope-lane:not(:where([data-uc], .rp-insp *)) {
  padding-block: var(--uc-space-4); /* was 3px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .scope-more:not(:where([data-uc], .rp-insp *)) {
  height: var(--uc-control-h-sm); /* was 24px */
  padding: 0 var(--uc-space-8); /* was 0 7px */
  font-size: var(--uc-text-xs); /* was 11px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .text-row-area > textarea:not(:where([data-uc], .rp-insp *)) {
  padding-left: var(--uc-space-32); /* was 34px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .prop-scope-own:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-4); /* was 3px */
  font-size: var(--uc-text-2xs); /* was 9.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .input:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .textarea:not(:where([data-uc], .rp-insp *)) {
  padding: 0 var(--uc-space-8); /* was 0 9px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .field:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-8); /* was 7px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .btn:not(:where([data-uc], .rp-insp *)) {
  border-radius: var(--uc-radius-6); /* was 5px */
  padding: var(--uc-space-4) var(--uc-space-10); /* was 5px 10px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .btn.sm:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-4) var(--uc-space-8); /* was 3px 8px */
  font-size: var(--uc-text-xs); /* was 11px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .editor:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-sm); /* was 12.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .scope-chip-note:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .shadow-field-dim > span:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .shadow-field-color-label:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-2xs); /* was 9px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .field.pf .pf-remove:not(:where([data-uc], .rp-insp *)) {
  padding: 0 var(--uc-space-8); /* was 0 7px */
  border-radius: var(--uc-radius-6); /* was 5px */
  font-size: var(--uc-text-xs); /* was 11px */
  font-weight: var(--uc-weight-medium); /* was 600 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .section-empty:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-16) var(--uc-space-14); /* was 18px 14px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .sb-mar:not(:where([data-uc], .rp-insp *)) {
  border-radius: var(--uc-radius-6); /* was 5px */
  padding: var(--uc-space-4) var(--uc-space-8); /* was 5px 8px */
  gap: var(--uc-space-4); /* was 3px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .sb-pad:not(:where([data-uc], .rp-insp *)) {
  border-radius: var(--uc-radius-6); /* was 5px */
  gap: var(--uc-space-4); /* was 3px */
  padding: var(--uc-space-4); /* was 5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .sb-cell:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-xs); /* was 11px */
  padding: 0 var(--uc-space-4); /* was 0 3px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .sb-inset .sb-pad:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-8) var(--uc-space-10);
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .target .tag:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .uich-dd-hint:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .field > label:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .section-empty-hint:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .sb-inset .sb-content:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .sb-inset .sb-cell:not(:where([data-uc], .rp-insp *)) {
  font-size: var(--uc-text-xs); /* was 11px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .target .name:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .sb-label:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .gp-section-divider:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pf-background-bgColor .pf-name-text:not(:where([data-uc], .rp-insp *)) {
  font-weight: var(--uc-weight-medium); /* was 600 */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .design-style-section .pf-background-bgColor .pf-name-text:not(:where([data-uc], .rp-insp *)) {
  font-weight: inherit;
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .text-row-area > textarea:not(:where([data-uc], .rp-insp *))::-webkit-scrollbar-thumb,
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .tag-menu-list:not(:where([data-uc], .rp-insp *))::-webkit-scrollbar-thumb,
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .lib-list:not(:where([data-uc], .rp-insp *))::-webkit-scrollbar-thumb {
  border-radius: var(--uc-radius-4); /* was 3px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pr-gpick-btn:not(:where([data-uc], .rp-insp *)) {
  border-radius: var(--uc-radius-6); /* was 5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .layers-float:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .pr-gpick-pop:not(:where([data-uc], .rp-insp *)) {
  border-radius: var(--uc-radius-8); /* was 10px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .shadow-field-dim:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .shadow-field-color:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .sb:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .sb-pad-wrap:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .prop-input-stack .pf-input-row:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-4); /* was 3px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .subsection-title:not(:where([data-uc], .rp-insp *)) {
  font-weight: var(--uc-weight-medium); /* was 600 */
  font-size: var(--uc-text-xs); /* was 11.5px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .prop-input-stack .input:not(:where([data-uc], .rp-insp *)) {
  height: var(--uc-control-h-md); /* was 36px */
  padding-right: var(--uc-space-12); /* was 11px */
  padding-left: var(--uc-space-12); /* was 11px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .prop-input-stack .border-input:not(:where([data-uc], .rp-insp *)) {
  min-height: var(--uc-control-h-md); /* was 36px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .field.pf .bg-muted:has(button):not(:where([data-uc], .rp-insp *)) {
  min-height: var(--uc-control-h-md); /* was 36px */
  padding: var(--uc-space-4); /* was 3px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .field.pf .h-8:not(:where([data-uc], .rp-insp *)) {
  height: var(--uc-control-h-md); /* was 36px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .field.pf .bg-muted:not(:where([data-uc], .rp-insp *)) {
  padding: var(--uc-space-4); /* was 3px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .field.pf .bg-muted:has(button) button:not(:where([data-uc], .rp-insp *)),
:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .field.pf .bg-muted button.h-6:not(:where([data-uc], .rp-insp *)) {
  height: var(--uc-control-h-sm); /* was 30px */
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .field.pf .input:not(:where([data-uc], .rp-insp *)) {
  height: var(--input-h);
}

:is(.uich-composer-host, .uich-tw, body) :is(.panel.dock-right, .uich-rp).uc-chrome .field.pf:not(:where([data-uc], .rp-insp *)) {
  gap: var(--uc-space-4);
  row-gap: var(--pf-label-gap);
  -moz-column-gap: var(--uc-space-12);
       column-gap: var(--uc-space-12);
}

/* Inspector v2 — geometry matched to ds.shadcn.com/examples/print.
 *
 * Every number below was measured off the reference's computed styles, not
 * eyeballed:
 *   panel 243px · content 211px (16px sides)
 *   tablist  h30, pad 3, radius 8, filled     tab h24, 12px/500, radius 6, pad 4/8
 *   group    header 12px/500 normal-case, pad 0 16, lh 16, 16px below
 *   row      flex, gap 8, align flex-start    label 72px, 12px/500, lh 12
 *   rows     12px apart
 *   field    h28, radius 8, FILLED surface    input pad-left 24, pad-right 8
 *   addon    26x26 absolute inset 1px, radius 6, 12px/400
 *   icons    12px at stroke-width 2
 *
 * COLOUR is the one thing not copied literally: the reference is a single
 * light theme in lab(), while this panel has to survive brand/Elementor x
 * light/dark. So each colour maps to the token playing the same role — the
 * reference's filled input is shadcn --muted, so ours is hsl(var(--muted)).
 *
 * Scoped under .iv2 so none of it reaches the current inspector.
 */

.iv2 {
  --iv2-pad: 16px;
  --iv2-label-w: 72px;
  --iv2-field-h: 28px;
  --iv2-radius: 8px;
  --iv2-radius-inner: 6px;
  --iv2-row-gap: 12px;

  /* The reference panel is 243px, but that is one number NOT to copy: its
     values are bare ("2104") because the unit is a document-level setting,
     while ours carry it ("2104px") because units are per-property CSS. Copying
     243px clipped every 4-digit value. Control geometry above is exact; the
     panel itself fills the dock, which is 420px by default and 320px minimum. */
  width: 100%;
  background: var(--panel-bg);
  color: var(--text-hi);
  font-size: 12px;
}

/* ── tabs: a segmented pill, not a bordered strip ─────────────────────────── */
.iv2 .iv2-tablist {
  display: flex;
  height: 30px;
  margin: var(--iv2-pad) var(--iv2-pad) 0;
  padding: 3px;
  border: 0;
  border-radius: var(--iv2-radius);
  background: hsl(var(--muted));
}

.iv2 .iv2-tab {
  flex: 1;
  height: 24px;
  padding: 4px 8px;
  border: 0;
  border-radius: var(--iv2-radius-inner);
  background: transparent;
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.iv2 .iv2-tab:hover { color: var(--text-hi); }

/* The active tab lifts to the panel surface, so the pill reads as a track with
   a raised thumb — same figure/ground as the reference. */
.iv2 .iv2-tab[data-state='active'] {
  background: var(--panel-bg);
  color: var(--text-hi);
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), calc(0.08 * var(--shadow-a)));
}

.iv2 .iv2-tabpanel { padding: var(--iv2-pad) 0 0; }

/* ── groups ───────────────────────────────────────────────────────────────── */
/* Normal-case, weight 500, FULL contrast — not an uppercase micro-label. */
.iv2 .iv2-group + .iv2-group { margin-top: var(--iv2-pad); }

.iv2 .iv2-group-head {
  padding: 0 var(--iv2-pad);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: var(--text-hi);
}

.iv2 .iv2-group-body {
  display: flex;
  flex-direction: column;
  gap: var(--iv2-row-gap);
  padding: var(--iv2-pad) var(--iv2-pad) 0;
}

/* ── rows ─────────────────────────────────────────────────────────────────── */
.iv2 .iv2-row {
  display: flex;
  align-items: flex-start;
  -moz-column-gap: 8px;
       column-gap: 8px;
}

.iv2 .iv2-label {
  flex: 0 0 var(--iv2-label-w);
  width: var(--iv2-label-w);
  padding-top: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 12px;
  color: var(--text-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iv2 .iv2-ctl {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

/* ── fields ───────────────────────────────────────────────────────────────── */
/* Filled surface with a matching border, radius 8, height 28 — overrides the
   dock-right defaults, which are transparent/h36 by design elsewhere. */
.iv2 .lin-ig {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: var(--iv2-field-h);
  padding-left: 0;
  border-radius: var(--iv2-radius);
  border-color: hsl(var(--muted));
  background: hsl(var(--muted));
  box-shadow: none;
}

/* Handle sits absolutely inside the field's left edge, inset 1px on the block
   axis, so it never affects the input's own box. */
/* Flush to the padding box, not inset 1px: the field's 1px border already
   shrinks the containing block, so insetting again gave 24px where the
   reference measures 26px. */
.iv2 .lin-ig .lin-glyph {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 26px;
  margin: 0;
  border-radius: var(--iv2-radius-inner);
  font-family: inherit;
  --uich-ff: inherit;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-mid);
  z-index: 2;
}

.iv2 .lin-ig .lin-glyph:hover {
  background: var(--panel-bg-4);
  color: var(--text-hi);
}

/* 24px left gutter, the same as the reference's pl-6. Doubled selector to beat
   `.panel.dock-right .lin-ig .lin-glyph + input`, whose 4px gutter is correct
   for the shipping single-field layout but not here. */
.iv2.iv2 .lin-ig .lin-glyph + input {
  padding-right: 24px;
  padding-left: 8px;
  font-size: 12px;
}

.iv2 .lin-ig input { border-radius: var(--iv2-radius); }

/* ── icon buttons ─────────────────────────────────────────────────────────── */
.iv2 .iv2-iconbtn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--iv2-field-h);
  height: var(--iv2-field-h);
  padding: 0;
  border: 0;
  border-radius: var(--iv2-radius-inner);
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.iv2 .iv2-iconbtn:hover {
  background: hsl(var(--muted));
  color: var(--text-hi);
}

.iv2 .iv2-iconbtn.is-on {
  background: hsl(var(--muted));
  color: var(--text-hi);
}

.iv2 .iv2-btn-pair { display: inline-flex; gap: 4px; }

/* ── "Add…" fields ────────────────────────────────────────────────────────── */
.iv2 .iv2-addfield {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--iv2-field-h);
  padding: 0 8px 0 6px;
  border: 1px solid hsl(var(--muted));
  border-radius: var(--iv2-radius);
  background: hsl(var(--muted));
  cursor: pointer;
  text-align: right;
  transition: border-color 0.12s ease;
}

.iv2 .iv2-addfield:hover { border-color: var(--text-dim); }

.iv2 .iv2-addfield-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-hi);
}

.iv2 .iv2-addfield-text.is-empty { color: var(--text-mid); }

.iv2 .iv2-swatch {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--panel-line-2);
}

.iv2 .iv2-swatch.is-filled { border-color: transparent; }

/* ── select ───────────────────────────────────────────────────────────────── */
.iv2 .iv2-select {
  flex: 1 1 0;
  min-width: 0;
  height: var(--iv2-field-h);
  padding: 0 8px;
  border: 1px solid hsl(var(--muted));
  border-radius: var(--iv2-radius);
  background: hsl(var(--muted));
  color: var(--text-hi);
  font-size: 12px;
  cursor: pointer;
}

.iv2 .iv2-select:focus { outline: none; border-color: var(--text-dim); }

/** Shared Composer interaction contract, scoped to UI islands, never page HTML.
 * A keyboard indicator lives INSIDE a control; composite fields own one ring.
 * Specificity deliberately matches the host/reset shield in composer.css.
 */
:is(#uichemy-composer-floating-panel, #smart-html-floating-panel, .uich-composer-host, .uich-tw, .uich-rp, .uich-portal-root)
  :is(button:not([data-uc-focus-owner='parent']), [role='tab'], [role='combobox'], [role='treeitem'], a[href]):focus-visible {
  outline: 2px solid var(--uc-ring, currentColor) !important;
  outline-offset: -2px !important;
}
/* Standalone fields, including legacy code/search controls, keep their own
   keyboard edge. Native invalid state keeps its error colour. */
:is(#uichemy-composer-floating-panel, #smart-html-floating-panel, .uich-composer-host, .uich-tw, .uich-rp, .uich-portal-root)
  :is(input:not(:where([type='checkbox'], [type='radio'], [type='color'])):not([data-uc-focus-owner='parent']), textarea:not([data-uc-focus-owner='parent'])):focus-visible {
  outline: 2px solid var(--uc-ring, currentColor) !important;
  outline-offset: -2px !important;
}
:is(#uichemy-composer-floating-panel, #smart-html-floating-panel, .uich-composer-host, .uich-tw, .uich-rp, .uich-portal-root)
  :is(input, textarea)[aria-invalid='true']:focus-visible { outline-color: var(--uc-danger) !important; }
/* The border box includes the unit/swatch: no short ring on just its input.
   :has(input:focus-visible) avoids a ring solely from a pointer-open menu. */
:is(#uichemy-composer-floating-panel, #smart-html-floating-panel, .uich-composer-host, .uich-tw, .uich-rp)
  :is(.lin-box, .swatch-input, .sb-quad-cell, .sb-cell, .input-group):has(:is(input, textarea):focus-visible) {
  outline: 2px solid var(--uc-ring, currentColor) !important;
  outline-offset: -2px !important;
}
:is(#uichemy-composer-floating-panel, #smart-html-floating-panel, .uich-composer-host, .uich-tw, .uich-rp)
  :is(.lin-box, .swatch-input, .sb-quad-cell, .sb-cell, .input-group) :is(input, textarea):focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
/* These layer actions are intentionally bare, with a brighter glyph on hover;
   don't let the shared ghost decoration add a second chip behind that glyph. */
.uich-tw .layer-row .layer-act::before { content: none; }
@media (forced-colors: active) {
  :is(#uichemy-composer-floating-panel, #smart-html-floating-panel, .uich-composer-host, .uich-tw, .uich-rp, .uich-portal-root)
    :focus-visible { outline-color: Highlight !important; }
  :is(#uichemy-composer-floating-panel, #smart-html-floating-panel, .uich-composer-host, .uich-tw, .uich-rp)
    :is(.lin-box, .swatch-input, .sb-quad-cell, .sb-cell, .input-group):has(:is(input, textarea):focus-visible) { outline-color: Highlight !important; }
}

/* Embedded dock edge: replace its old exterior shadow, not another outline on top. */
:is(#uichemy-composer-floating-panel, #smart-html-floating-panel, .uich-composer-host, .uich-tw, .uich-rp) .panel.dock-right .dock-edge-toggle:focus-visible { box-shadow: none !important; }

/* Host CSS may target DS addon inputs by data-uc, so delegation must beat
   those legacy resets as well. Keep checkbox/chip base borders untouched. */
:is(#uichemy-composer-floating-panel, #smart-html-floating-panel, .uich-composer-host, .uich-tw, .uich-rp, .uich-portal-root)
  [data-uc-focus-owner='parent']:focus-visible { outline: none !important; }
:is(#uichemy-composer-floating-panel, #smart-html-floating-panel, .uich-composer-host, .uich-tw, .uich-rp, .uich-portal-root)
  :is(input, textarea)[data-uc-focus-owner='parent']:focus-visible { box-shadow: none !important; }

/* Connection layout only. All controls, surfaces and status treatments are DS. */
.uconnect-flow { container-type: inline-size; }
.uconnect-flow .uconnect-flow-heading { display:flex;align-items:flex-start;gap:var(--uc-space-12); }
.uconnect-flow .uconnect-flow-heading > :first-child { flex:1 1 auto;min-width:0; }
.uconnect-flow .uconnect-flow-heading > button { flex:none; }
.uconnect-flow .uconnect-flow-body { display:flex;flex-direction:column;gap:var(--uc-space-16);min-width:0; }
.uconnect-flow .uconnect-flow-progress { list-style:none;display:flex;align-items:center;flex-wrap:wrap;gap:var(--uc-space-4);padding:0;margin:0; }
.uconnect-flow .uconnect-flow-step { padding:0;min-width:0;height:auto; }
.uconnect-flow .uconnect-flow-step::before { content:none; }
.uconnect-flow .uconnect-flow-command { min-width:0; }
.uconnect-flow .uconnect-flow-caption { display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:var(--uc-space-8);font-size:var(--uc-text-xs);color:var(--uc-text-muted);padding-bottom:var(--uc-space-8);margin-bottom:var(--uc-space-8);border-bottom:1px solid var(--uc-border-subtle); }
.uconnect-flow .uconnect-flow-command code { display:block;font-family:var(--uc-font-mono);--uich-ff:var(--uc-font-mono);font-size:var(--uc-text-sm);line-height:1.8;color:var(--uc-text-strong);white-space:pre-wrap;overflow-wrap:anywhere; }
.uconnect-flow .agent-cmd-secret { color:var(--uc-text-muted); }
.uconnect-flow .uconnect-flow-wait { display:flex;flex-direction:column;gap:var(--uc-space-6); }
.uconnect-flow .uconnect-flow-detail { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--uc-space-12);font-size:var(--uc-text-sm);color:var(--uc-text); }
.uconnect-flow .uconnect-flow-requirements, .uconnect-flow .uconnect-flow-actions, .uconnect-flow .uconnect-flow-tools { display:flex;align-items:center;flex-wrap:wrap;gap:var(--uc-space-8) var(--uc-space-16); }
.uconnect-flow .uconnect-flow-requirements { font-size:var(--uc-text-xs);color:var(--uc-text-muted); }
.uconnect-flow .uconnect-flow-instructions { margin:0;padding-inline-start:20px;font-size:var(--uc-text-sm);line-height:1.6;color:var(--uc-text); }
.uconnect-flow .uconnect-flow-instructions li + li { margin-top:var(--uc-space-8); }
.uconnect-flow .uconnect-flow-footer { flex-wrap:wrap; }
.uconnect-flow .uconnect-flow-footer > div { min-width:0; }
@container(max-width:430px) {
  .uconnect-flow .uconnect-flow-footer { flex-direction:column-reverse;align-items:stretch;gap:var(--uc-space-4);padding:var(--uc-space-12); }
  .uconnect-flow .uconnect-flow-footer > button, .uconnect-flow .uconnect-flow-footer > div > button { width:100%;white-space:normal;height:auto;min-height:32px;padding-top:var(--uc-space-8);padding-bottom:var(--uc-space-8); }
  .uconnect-flow .uconnect-flow-progress { gap:var(--uc-space-4); }
}
/* Scoped Tailwind preflight has an element selector for headings which beats
   a lone CSS-module class. Restore the Dialog's own DS typography, not a new skin. */
.uconnect-flow .uconnect-flow-heading h2 {
  margin:0;
  font-size:var(--uc-text-xl);
  font-weight:var(--uc-weight-semibold);
  line-height:var(--uc-leading-tight);
}
/* Approved compact management layout; no parallel component skin. */
.uconnect-flow .uconnect-flow-agent { display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:var(--uc-space-16); }
.uconnect-flow .uconnect-flow-agent-name { display:flex;align-items:center;gap:var(--uc-space-12);min-width:0; }
.uconnect-flow .uconnect-flow-agent-name > svg { flex:none; }
.uconnect-flow .uconnect-flow-agent-name strong { font-size:var(--uc-text-base);font-weight:var(--uc-weight-medium);color:var(--uc-text-strong); }
.uconnect-flow .uconnect-flow-agent-name p { font-size:var(--uc-text-sm);color:var(--uc-text-muted);margin:2px 0 0; }
.uconnect-flow .uconnect-flow-rows { display:grid;min-width:0; }
.uconnect-flow .uconnect-flow-row { display:flex;align-items:center;justify-content:space-between;gap:var(--uc-space-16);min-height:60px;border-bottom:1px solid var(--uc-border-subtle);font-size:var(--uc-text-base); }
.uconnect-flow .uconnect-flow-row:last-child { border-bottom:0; }
.uconnect-flow .uconnect-flow-row > :first-child { color:var(--uc-text-muted);flex:1 1 auto;min-width:0; }
.uconnect-flow .uconnect-flow-target { width:168px;flex:none; }
.uconnect-flow .uconnect-flow-target-help { display:flex;align-items:flex-start;gap:var(--uc-space-8);padding-top:var(--uc-space-8); }
.uconnect-flow .uconnect-flow-target-help > :first-child { flex:1;min-width:0; }
.uconnect-flow .uconnect-flow-detected { display:flex;flex-direction:column;align-items:flex-end;gap:var(--uc-space-8);min-width:0; }
.uconnect-flow .uconnect-flow-detected > span { display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:var(--uc-space-8); }
.uconnect-flow .uconnect-flow-advanced, .uconnect-flow .uconnect-flow-setup-links { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--uc-space-8);border-top:1px solid var(--uc-border-subtle);padding-top:var(--uc-space-12); }
.uconnect-flow .uconnect-flow-advanced > span { color:var(--uc-text-muted);font-size:var(--uc-text-xs); }
.uconnect-flow .uconnect-flow-advanced-body { display:flex;flex-direction:column;gap:var(--uc-space-12); }
.uconnect-flow .uconnect-flow-instruction { display:flex;align-items:flex-start;gap:var(--uc-space-12);font-size:var(--uc-text-base);line-height:1.5; }
.uconnect-flow .uconnect-flow-instruction > :first-child { flex:none; }
.uconnect-flow .uconnect-flow-instruction p { margin:0; }
.uconnect-flow .uconnect-flow-caption > span:first-child { display:flex;align-items:center;gap:var(--uc-space-6); }
.uconnect-chat-status { display:flex;flex-wrap:wrap;align-items:center;gap:var(--uc-space-4); }
.uconnect-chat-status .uconnect-status-entry { min-width:0;flex:1 1 auto;justify-content:center;gap:var(--uc-space-6);padding-inline:var(--uc-space-6); }
.uconnect-chat-status .uconnect-status-entry > span:first-child { white-space:nowrap; }
@container(max-width:430px) {
  .uconnect-flow .uconnect-flow-agent { align-items:flex-start;gap:var(--uc-space-8); }
  .uconnect-flow .uconnect-flow-agent-name { gap:var(--uc-space-8); }
  .uconnect-flow .uconnect-flow-target { width:145px; }
  .uconnect-flow .uconnect-flow-row { gap:var(--uc-space-8);font-size:var(--uc-text-sm); }
  .uconnect-flow .uconnect-flow-advanced > span { display:none; }
  .uconnect-flow .uconnect-flow-target-help { flex-wrap:wrap; }
}

/* The shared DS Combobox supplies the search field and option list. This
   sets the global picker's popover width and token preview slots. */
.uc-portal.gpk {
  width: 264px;
  max-height: min(340px, var(--radix-popover-content-available-height, 340px));
  padding: var(--uc-space-6, 6px);
  overflow: hidden;
}

.gpk-sw {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: var(--uc-radius-xs, 4px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.gpk-aa {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: var(--uc-radius-xs, 4px);
  background: var(--uc-surface-control, rgba(255, 255, 255, .08));
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle, #2e2e2e);
  color: var(--uc-text-strong);
  font-size: 11px;
  line-height: 1;
  overflow: hidden;
}

.rp-developer-views { gap: var(--uc-space-12); }
.rp-developer-views .rp-developer-views__tabs { width: 100%; gap: 0; }
.rp-developer-views__tabs > [role='tab'] { flex: 1; }
/* Retain both panes so accordion state, the active file and drafts survive. */
.rp-developer-views > .rp-developer-views__pane[data-state='inactive'] { display: none; }
.rp-developer-views__pane { min-width: 0; }
/* The code pane fills a bounded host; Design keeps its natural scrolling list. */
.rp-developer-views[data-view='code'],
.rp-developer-views[data-view='code'] > .rp-developer-views__pane[data-state='active'],
.rp-developer-views__code {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.rp-developer-views__tabs { flex: none; }

/* Shared inspector fixes. Scope to inspector controls, never host chrome. */
.rp-entrance__ms .rp-entrance__unit { color: hsl(var(--foreground)); opacity: 1; }
.pf .pf-source-message { margin: 4px 0 0; font-size: 11px; line-height: 1.5; color: hsl(var(--muted-foreground)); }
.pf .pf-source-message--overridden { color: hsl(var(--foreground)); }

/* Info tips: the small "i" next to titles and options. */
.useo-tiplabel { display: inline-flex; align-items: center; gap: 6px; }
.useo-info { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 999px; color: var(--uc-fg-muted, #757575); cursor: help; flex: none; vertical-align: middle; }
.useo-info:hover { color: var(--uc-fg, #1e1e1e); background: var(--uc-bg-muted, rgba(0,0,0,.05)); }
.useo-info:focus-visible { outline: 2px solid var(--uc-ring, #3858e9); outline-offset: 1px; }
.useo-tip { display: block; font-weight: 400; line-height: 1.5; white-space: normal; text-align: right; }
/* Wider than the default 240px, and above the Elementor side panel (z 99999). */
.uc-portal:has(> .useo-tip) { max-width: 320px; z-index: 100001; }

/* UiChemy SEO — page panel. Tokens from the design system (--uc-*). */
.useo-panel { font-family: var(--uc-font-sans); color: var(--uc-fg); font-size: 13px; line-height: 1.5; display: flex; flex-direction: column; gap: 12px; }
.useo-panel * { box-sizing: border-box; }
.useo-sub { margin: 0; color: var(--uc-fg-muted); font-size: 12px; }
.useo-note { margin: 0; color: var(--uc-fg-muted); font-size: 12px; }
.useo-help { margin: 4px 0 0; color: var(--uc-fg-muted); font-size: 12px; line-height: 1.5; }
.useo-error { margin: 4px 0 0; color: var(--uc-danger-fg); font-size: 12px; }
.useo-saved { color: var(--uc-fg-muted); font-size: 12px; }
.useo-tiplabel { display: inline-flex; align-items: center; gap: 6px; }
.useo-chev { color: var(--uc-fg-muted); transition: transform var(--uc-dur-fast) var(--uc-ease-standard); }
.useo-chev.is-open { transform: rotate(-90deg); }

/* ── Findings box, always at the top ── */
.useo-checks-box { border-radius: var(--uc-radius-md); background: var(--uc-surface-base); box-shadow: inset 0 0 0 1px var(--uc-border-subtle); }
.useo-checks-box.is-warn { background: color-mix(in srgb, var(--uc-warning-soft) 55%, var(--uc-surface-raised)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--uc-warning) 30%, transparent); }
.useo-checks-box__head { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; }
.useo-checks-box__head:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; border-radius: var(--uc-radius-md); }
.useo-checks-box__icon { display: inline-flex; color: var(--uc-text-muted); }
.is-warn .useo-checks-box__icon { color: var(--uc-warning-fg); }
.useo-checks-box__title { font-weight: 600; font-size: 13px; color: var(--uc-text-strong); }
.useo-checks-box__head .useo-chev { margin-right: auto; }
.useo-checks-box .useo-findings { padding: 0 12px 10px; }
.useo-checks-box .useo-ignored { margin: 0 12px; padding: 8px 0 10px; }
.useo-checks-ok { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--uc-radius-md); background: var(--uc-success-soft); color: var(--uc-success-fg); font-size: 12px; font-weight: 500; }
.useo-checks-ok__icon { display: inline-flex; }
.useo-checks-ok .useo-ignored { flex-basis: 100%; border-top-color: color-mix(in srgb, var(--uc-success) 25%, transparent); font-weight: 400; }
.useo-findings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.useo-finding { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; padding: 7px 0; border-top: 1px solid var(--uc-border-subtle); }
.useo-finding.is-ignored { grid-template-columns: 1fr auto; color: var(--uc-fg-muted); }
.useo-finding__dot { width: 8px; height: 8px; border-radius: 999px; margin-top: 5px; background: var(--uc-text-subtle); }
.useo-finding__dot.is-danger { background: var(--uc-danger); }
.useo-finding__dot.is-warning { background: var(--uc-warning); }
.useo-finding__msg { font-size: 12px; color: var(--uc-text-strong); }
.useo-finding.is-ignored .useo-finding__msg { color: var(--uc-fg-muted); }

/* ── Tabs and panes ── */
.useo-panel-tabs { width: 100%; }
.useo-panel .useo-panel-tabs [role="tab"][role="tab"] { padding-right: 4px; padding-left: 4px; font-size: 12px; min-width: 0; }
.useo-checks-box .useo-checks-box__more { display: block; margin: 2px 12px 10px; }
.useo-pane { display: flex; flex-direction: column; gap: 14px; }
.useo-subhead { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--uc-text-subtle); }
.useo-switches { display: flex; flex-direction: column; gap: 12px; }
.useo-switches > .useo-switch-row + .useo-switch-row { padding-top: 12px; border-top: 1px solid var(--uc-border-subtle); }

/* ── Fields ── */
.useo-field { display: flex; flex-direction: column; gap: 6px; }
.useo-field__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.useo-field__top > .useo-tiplabel { min-width: 0; }
.useo-field__actions { display: flex; flex: none; align-items: center; gap: 8px; }
.useo-field__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.useo-field__meta > span:first-child:empty { display: none; }
.useo-label { font-weight: 500; font-size: 12.5px; color: var(--uc-text-strong); }
.useo-prov { display: inline-flex; align-items: center; color: var(--uc-text-muted); background: var(--uc-surface-base); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.useo-lenbar { flex: 1; min-width: 40px; height: 4px; border-radius: 999px; background: var(--uc-surface-sunken); overflow: hidden; }
.useo-lenbar > span { display: block; height: 100%; border-radius: inherit; background: var(--uc-success); transition: width var(--uc-dur-fast) var(--uc-ease-standard); }
.useo-lenbar.is-over > span { background: var(--uc-danger); }
.useo-count { color: var(--uc-fg-muted); white-space: nowrap; }
.useo-count.is-over { color: var(--uc-danger-fg); font-weight: 500; }
.useo-link { all: unset; cursor: pointer; color: var(--uc-text-strong); font-size: 12px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--uc-border-strong); text-underline-offset: 3px; }
.useo-link:hover { text-decoration-color: currentColor; }
.useo-link:focus-visible { outline: 2px solid var(--uc-ring); border-radius: 2px; }
.useo-pin { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; font-size: 11.5px; font-weight: 500; color: var(--uc-text-muted); border-radius: var(--uc-radius-sm); background: var(--uc-surface-base); }
.useo-pin:hover { color: var(--uc-text-strong); }
.useo-pin.is-pinned { color: var(--uc-inverse-fg); background: var(--uc-inverse-bg); }
.useo-pin:focus-visible { outline: 2px solid var(--uc-ring); }
.useo-inline-actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.useo-switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

/* ── Google preview ── */
.useo-serp { border-radius: var(--uc-radius-md); padding: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--uc-border); font-family: Arial, sans-serif; }
.useo-serp__head { display: flex; align-items: center; gap: 6px; margin: -2px 0 8px; font-family: var(--uc-font-sans); }
.useo-serp__label { font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--uc-text-subtle); }
.useo-serp__crumb { font-size: 12px; color: #4D5156; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.useo-serp__title { font-size: 16px; color: #1A0DAB; line-height: 1.3; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.useo-serp__desc { font-size: 12px; color: #4D5156; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.useo-serp__desc em { color: #80868B; }

/* ── Share card ── */
.useo-card { border: 1px solid var(--uc-border-subtle); border-radius: var(--uc-radius-md); overflow: hidden; background: var(--uc-surface-base); }
.useo-card__img { display: block; width: 100%; aspect-ratio: 1200 / 630; -o-object-fit: cover; object-fit: cover; background: var(--uc-surface-base); }
.useo-card__text { display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.useo-card__host { font-size: 10.5px; line-height: 1.4; color: var(--uc-text-muted); overflow-wrap: anywhere; }
.useo-card__title { font-weight: 500; font-size: 13px; line-height: 1.5; color: var(--uc-text-strong); overflow-wrap: anywhere; }
.useo-card__desc { font-size: 12px; color: var(--uc-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.useo-card__desc:empty { display: none; }
.useo-sharing-image .useo-inline-actions { margin-top: 0; }
.useo-sharing-image .useo-inline-actions > button { gap: 6px; background: transparent; background-image: none; box-shadow: inset 0 0 0 1px var(--uc-border); }
.useo-sharing-image .useo-inline-actions > button:hover { background: var(--uc-surface-hover); }
.useo-imgpick { display: flex; align-items: center; gap: 10px; }
.useo-imgpick__thumb { flex: none; width: 64px; height: 40px; border-radius: 6px; -o-object-fit: cover; object-fit: cover; background: var(--uc-surface-base); box-shadow: inset 0 0 0 1px var(--uc-border); }
.useo-imgpick__thumb.is-empty { border: 1.5px dashed var(--uc-border-strong); box-shadow: none; }
.useo-imgpick__side { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.useo-imgpick__side .useo-inline-actions { margin-top: 0; }
.useo-imgpick__side .useo-prov { max-width: 100%; align-self: flex-start; }

/* ── Disclosures, code, schema ── */
.useo-more { border-top: 1px solid var(--uc-border-subtle); padding-top: 10px; }
.useo-head { white-space: pre-wrap; word-break: break-all; font-family: var(--uc-font-mono); font-size: 11px; background: var(--uc-surface-base); padding: 8px; border-radius: var(--uc-radius-sm); max-height: 260px; overflow: auto; margin: 0; }
.useo-entities { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.useo-entity-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: var(--uc-radius-sm); background: var(--uc-surface-base); }
.useo-callout { border: 1px dashed var(--uc-border-strong); border-radius: var(--uc-radius-md); padding: 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.useo-mono-area textarea, textarea.useo-mono-area { font-family: var(--uc-font-mono); font-size: 12px; }

/* ── Save bar ── */
.useo-savebar { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 0; padding: 10px 0; background: var(--uc-surface-raised, #fff); border-top: 1px solid var(--uc-border-subtle); }
.useo-savebar__state { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; font-weight: 500; color: var(--uc-text-strong); }
.useo-savebar__dot { width: 7px; height: 7px; border-radius: 999px; background: var(--uc-warning); box-shadow: 0 0 0 3px var(--uc-warning-soft); flex: none; }

.useo-skel { height: 34px; border-radius: var(--uc-radius-md); background: var(--uc-muted); animation: useo-pulse 1.2s ease-in-out infinite; }
.useo-skel.is-short { width: 60%; }
@keyframes useo-pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .useo-skel { animation: none; } .useo-chev, .useo-lenbar > span { transition: none; } }
.useo-panel.is-compact .useo-serp__title { font-size: 14px; }

.useo-panel input[class]:not([type="checkbox"]):not([type="radio"]), .useo-panel textarea[class] {
	border: 0; border-radius: 6px; background: var(--uc-surface-control);
	box-shadow: inset 0 0 0 1px var(--uc-border); font-size: 12px;
}
.useo-panel input[class]:not([type="checkbox"]):not([type="radio"]) { height: 34px; padding-right: 10px; }
.useo-panel textarea[class] { min-height: 72px; padding: 9px 10px; line-height: 1.6; }
.useo-panel input[class]:hover:not(:disabled):not(:focus):not([aria-invalid="true"]), .useo-panel textarea[class]:hover:not(:disabled):not(:focus):not([aria-invalid="true"]) { box-shadow: inset 0 0 0 1px var(--uc-border-hover); }
.useo-panel input[class]:focus, .useo-panel textarea[class]:focus { box-shadow: inset 0 0 0 1px var(--uc-border-strong); outline: 1px solid var(--uc-ring); outline-offset: 1px; }
.useo-panel input[class][aria-invalid="true"], .useo-panel textarea[class][aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--uc-danger); outline-color: var(--uc-danger); }
.useo-panel button[role="combobox"] { min-width: 0; height: 34px; padding: 0 10px; border-radius: 6px; font-size: 12px; background-image: none; box-shadow: inset 0 0 0 1px var(--uc-border); }
.useo-panel button[role="combobox"]:hover { box-shadow: inset 0 0 0 1px var(--uc-border-hover); }
.useo-panel button[role="combobox"]:focus-visible, .useo-panel button[role="combobox"][data-state="open"] { outline: 1px solid var(--uc-ring); outline-offset: 1px; }

/* Insert-a-dynamic-value chips (variable picker). */
.useo-vars { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.useo-vars__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.useo-vars__label { font-size: 11px; color: var(--uc-text-muted, var(--uc-fg-muted)); margin-left: 2px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Findings header: the toggle and its info tip sit side by side, never one inside the other. */
.useo-checks-box__headrow { display: flex; align-items: center; gap: 4px; padding-left: 10px; }
.useo-checks-box__headrow .useo-checks-box__head { flex: 1; min-width: 0; }
.useo-checks-box__headrow .useo-chev { margin-right: auto; }

/* DS Accordion as a compact disclosure in the panel. */
.useo-disclosure > div { border-bottom: 0; }
.useo-disclosure h3 { margin: 0; padding: 0; border: 0; text-transform: none; letter-spacing: normal; font: inherit; }
.useo-disclosure h3 > button { text-transform: none; letter-spacing: normal; width: auto; justify-content: flex-start; gap: 6px; padding: 2px 0; font-size: 12.5px; font-weight: 500; }
.useo-disclosure [role="region"] { color: inherit; font-size: inherit; }
.useo-disclosure [role="region"] > div { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 2px; }
.useo-entities .useo-disclosure h3 > button { width: 100%; justify-content: space-between; padding: 8px 10px; border-radius: var(--uc-radius-sm); background: var(--uc-surface-base); }
.useo-entities .useo-disclosure [role="region"] > div { padding-top: 6px; }

/* Insert buttons under fields: compact in the narrow panel. */
.useo-vars__chips .useo-chip[class] { height: 24px; padding: 0 8px; gap: 4px; font-size: 11.5px; }

/* ── Minimal panel: preview + two fields, the rest folded into rows ───────── */
.useo-panel.is-minimal { gap: 14px; }
.useo-panel.is-minimal .useo-serp__label { text-transform: none; letter-spacing: 0; font-size: 11.5px; color: var(--uc-text-muted); }
.useo-panel.is-minimal .useo-field { gap: 6px; }
.useo-panel.is-minimal .useo-field__actions { display: inline-flex; align-items: center; gap: 2px; }
.useo-panel.is-minimal .useo-field__actions .useo-pin { order: -1; }
.useo-panel.is-minimal .useo-count { font-size: 11.5px; font-variant-numeric: tabular-nums; margin-left: 4px; }
.useo-panel.is-minimal .useo-pin[aria-pressed="true"] { color: var(--uc-inverse-fg); }

/* Findings: one row; the list opens under it. Ignore is an icon. */
.useo-panel.is-minimal .useo-checks-box__head { padding: 9px 12px; }
.useo-panel.is-minimal .useo-checks-box__title { font-weight: 500; font-size: 12.5px; }
.useo-panel.is-minimal .useo-finding { align-items: center; padding: 6px 0; font-size: 12px; }
.useo-panel.is-minimal .useo-finding__dot { margin-top: 0; }
.useo-panel.is-minimal .useo-finding__ignore { opacity: .55; }
.useo-panel.is-minimal .useo-finding:hover .useo-finding__ignore,
.useo-panel.is-minimal .useo-finding__ignore:focus-visible { opacity: 1; }

/* Insert menu sits inside the field, top right. */
.useo-vars.is-compact { position: relative; }
.useo-vars.is-compact input, .useo-vars.is-compact textarea { padding-left: 34px; }
.useo-vars.is-compact .useo-vars__menu { position: absolute; top: 4px; left: 4px; }

/* Match the editor panel's section boxes: 6px inset/gap and 12px inner padding.
   The group keeps its edge-to-edge separator above the cards. */
.useo-rows { display: flex; flex-direction: column; gap: var(--uc-space-6, 6px); margin-inline: calc(-1 * var(--useo-panel-inset, 16px)); padding: var(--uc-space-6, 6px); border-top: 1px solid var(--uc-border-subtle); background: var(--uc-surface-base); }
.useo-rows > div { border: 0; border-radius: var(--uc-radius-md, 8px); overflow: hidden; background: var(--uc-surface-raised); }
.useo-rows > div > h3 { margin: 0; padding: 0; border: 0; text-transform: none; letter-spacing: normal; font: inherit; }
.useo-rows > div > h3 > button { justify-content: flex-start; gap: 10px; min-height: 44px; padding: var(--uc-space-12, 12px); font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: normal; }
.useo-rows > div > h3 > button:hover { background: transparent; }
.useo-rows > div > h3 > button:focus-visible { outline-offset: -2px; }
.useo-row__title { color: var(--uc-text-strong); text-align: right; }
.useo-row__sum { margin-right: auto; min-width: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; font-size: 11px; color: var(--uc-text-muted); }
.useo-rows > div > [role="region"] { color: inherit; font-size: inherit; }
.useo-rows > div > [role="region"] > div { display: flex; flex-direction: column; gap: 16px; padding: 2px var(--uc-space-12, 12px) var(--uc-space-12, 12px); }
.useo-panel.is-minimal .useo-showcode { align-self: flex-start; }
/* Switch rows: the (i) follows the label text instead of floating by the switch. */
.useo-panel.is-minimal .useo-switch-row { align-items: center; }
.useo-panel.is-minimal .useo-switch-row > .useo-tiplabel { display: block; min-width: 0; }
.useo-panel.is-minimal .useo-switch-row > .useo-tiplabel > .useo-label { display: inline; }
.useo-panel.is-minimal .useo-switch-row > .useo-tiplabel > :not(.useo-label) { display: inline-flex; vertical-align: middle; margin-right: 4px; }

/* WordPress admin's li { margin-bottom: 6px } (Gutenberg, metabox) adds uneven gaps to these lists. */
.useo-panel li { margin-bottom: 0; }

/* ── Search preview uses the panel's surface and text tokens. ────────────── */
.useo-panel .useo-serp { padding: 10px; border-radius: var(--uc-radius-lg, 12px); background: var(--uc-surface-base); box-shadow: none; font-family: var(--uc-font-sans); }
.useo-panel .useo-serp__head { margin: 0 0 8px; padding: 0 2px; }
.useo-serp__card { padding: 12px; border: 1px solid var(--uc-border-subtle); border-radius: 8px; background: var(--uc-surface-base); font-family: Arial, sans-serif; }
.useo-serp__site { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; min-width: 0; }
.useo-serp__fav { flex: none; width: 24px; height: 24px; border-radius: 999px; background: var(--uc-surface-hover); display: grid; place-items: center; font: 500 11px/1 var(--uc-font-sans); color: var(--uc-text-strong); }
.useo-serp__who { display: flex; flex-direction: column; min-width: 0; }
.useo-serp__name { font-size: 12px; line-height: 1.3; color: var(--uc-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.useo-serp__card .useo-serp__crumb { font-size: 10.5px; line-height: 1.5; color: var(--uc-text-muted); }
.useo-serp__card .useo-serp__title { margin: 6px 0 4px; font-size: 15px; line-height: 1.4; color: #1967D2; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.useo-serp__card .useo-serp__desc, .useo-serp__desc em { color: var(--uc-text-muted); font-size: 11.5px; line-height: 1.6; overflow-wrap: anywhere; }
[data-theme="dark"] .useo-serp__card .useo-serp__title { color: #8AB4F8; }
.useo-panel.is-compact .useo-serp__card .useo-serp__title { font-size: 14px; }

/* ── Minimal layout: a status line, the preview with two fields and one switch,
   then a single level of settings. Flat on one surface. ── */
.useo-modal__dialog { background: var(--uc-surface-raised, #fff); }
.useo-modal__head { background: var(--uc-surface-raised, #fff); }
.useo-modal__body { padding: 12px 12px 0; }
.useo-panel.is-minimal { gap: 18px; min-width: 0; }
.useo-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.useo-visibility { display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.useo-visibility .useo-note { font-size: 11px; line-height: 1.6; }

/* Audit as one tinted status line; the findings open under it. */
.useo-status > div { --useo-tint: var(--uc-success-soft, #E7FFE7); border: 0; border-radius: 6px; overflow: hidden; color: var(--uc-success-fg, #0A842A); background: color-mix(in srgb, var(--useo-tint) 35%, transparent); }
.useo-status.is-warn > div { --useo-tint: var(--uc-warning-soft, #FFEDD8); color: var(--uc-warning-fg, #AA712B); }
.useo-status > div > h3 { margin: 0; padding: 0; border: 0; text-transform: none; letter-spacing: normal; font: inherit; }
.useo-status > div > h3 > button { justify-content: flex-start; gap: 8px; padding: 9px 10px; font-size: 11.5px; font-weight: 500; color: inherit; text-transform: none; letter-spacing: normal; }
.useo-status__icon { display: inline-flex; flex: none; }
.useo-status__text { flex: 1; min-width: 0; text-align: right; }
.useo-status > div > [role="region"] { color: var(--uc-fg); font-size: inherit; }
.useo-status > div > [role="region"] > div { display: flex; flex-direction: column; gap: 8px; padding: 4px 12px 10px; }
.useo-status .useo-findings .useo-finding:first-child { border-top: 0; }

/* Google preview: just the result card, no grey tray around it. */
.useo-panel.is-minimal .useo-serp { padding: 0; background: none; }
.useo-panel.is-minimal .useo-serp__head { padding: 0; margin-bottom: 8px; }

/* Field header: "Automatic" until overridden, then Reset. The exact count shows
   while typing (or when it is too long); the pin and { } show on hover or focus. */
.useo-auto { font-size: 11.5px; color: var(--uc-text-muted); white-space: nowrap; }
.useo-panel .useo-reset[class] { height: 22px; padding: 0 6px; font-size: 11.5px; }
.useo-panel.is-minimal .useo-field .useo-count { display: none; }
.useo-panel.is-minimal .useo-field:focus-within .useo-count, .useo-panel.is-minimal .useo-field .useo-count.is-over { display: inline; }
.useo-panel.is-minimal .useo-field:focus-within .useo-auto { display: none; }
.useo-panel.is-minimal .useo-field .useo-pin, .useo-panel.is-minimal .useo-vars.is-compact .useo-vars__menu { opacity: 0; transition: opacity var(--uc-dur-fast, .15s) ease; }
.useo-panel.is-minimal .useo-field:hover .useo-pin, .useo-panel.is-minimal .useo-field:focus-within .useo-pin,
.useo-panel.is-minimal .useo-vars.is-compact:hover .useo-vars__menu, .useo-panel.is-minimal .useo-vars.is-compact:focus-within .useo-vars__menu { opacity: 1; }
.useo-panel .useo-field > .useo-lenbar { flex: none; display: block; width: 100%; height: 2px; margin-top: -4px; opacity: 0; }
.useo-panel .useo-field:focus-within > .useo-lenbar, .useo-panel .useo-field > .useo-lenbar.is-over { opacity: 1; }
/* Audit card: count as a pill, warning tint when something important is found. */
.useo-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font: 500 11.5px/20px var(--uc-font-sans); background: var(--uc-surface-base, #F4F4F4); color: var(--uc-text-muted); }
.useo-pill.is-warn { background: var(--uc-warning-soft, #FFEDD8); color: var(--uc-warning-fg, #AA712B); }
.useo-pill.is-ok { background: var(--uc-success-soft, #E7FFE7); color: var(--uc-success-fg, #0A842A); }
.useo-panel.is-minimal .useo-audit .useo-row__sum { max-width: none; }
.useo-panel.is-minimal .useo-audit .useo-findings .useo-finding:first-child { border-top: 0; }
.useo-panel .useo-savebar { background: var(--uc-surface-raised, #fff); }

/* Audit findings: image preview on the right of the text, copy prompt under the list. */
/* A finding with a preview: the dot sits on the first line of text, not the middle of the row. */
.useo-panel.is-minimal .useo-finding.has-image { align-items: start; }
.useo-panel.is-minimal .useo-finding.has-image .useo-finding__dot { margin-top: 5px; }
/* Text on the left, the image preview on the right, then the ignore button. */
.useo-finding.has-image { grid-template-columns: auto 1fr auto auto; }
.useo-finding__thumb { all: unset; box-sizing: border-box; flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--uc-radius-sm, 6px); background: var(--uc-surface-raised); box-shadow: inset 0 0 0 1px var(--uc-border); color: var(--uc-text-subtle); cursor: pointer; transition: box-shadow var(--uc-dur-fast, .15s) ease; }
.useo-finding__thumb img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; display: block; }
.useo-finding__thumb:hover { box-shadow: inset 0 0 0 1px var(--uc-border-strong), 0 0 0 2px var(--uc-warning-soft); }
.useo-finding__thumb:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: 2px; }
.useo-finding__thumb.is-missing { opacity: .5; box-shadow: inset 0 0 0 1px var(--uc-warning); }
.useo-audit__foot { padding-top: 10px; }
.useo-audit__foot button { width: 100%; justify-content: center; gap: 6px; }

/* Actions that do something are buttons; links to other screens stay links. */
.useo-add-btn { width: 100%; justify-content: center; gap: 6px; }

/* UiChemy SEO — editor hosts. */
.useo-scope, .uc-content.useo-scope { background: transparent; }
.useo-sidebar-pad { padding: 12px 16px 0; }
/* Match the hosts with 12px gutters so section dividers reach the panel edges. */
.uipb-seo, #uichemy-seo-metabox-root { --useo-panel-inset: 12px; }

/* SEO glyph with the page's finding count on its corner. */
.useo-cicon { position: relative; display: inline-flex; line-height: 0; }
.useo-cicon__n { position: absolute; top: -5px; left: -7px; min-width: 15px; height: 15px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: var(--uc-warning, #FFA940); color: #171717; font: 600 9.5px/15px var(--uc-font-sans, system-ui, sans-serif); text-align: center; box-shadow: 0 0 0 2px var(--uc-surface-raised, #fff); }

/* Gutenberg: summary box in Page settings and the pre-publish check. */
.useo-summary { display: flex; flex-direction: column; gap: 8px; font: 13px/1.5 var(--uc-font-sans, system-ui, sans-serif); color: var(--uc-text-strong, #1e1e1e); }
.useo-summary__line { margin: 0; display: flex; align-items: center; gap: 6px; font-weight: 500; }
.useo-summary__line::before { content: ''; width: 8px; height: 8px; border-radius: 999px; background: var(--uc-text-subtle, #a3a3a3); flex: none; }
.useo-summary__line.is-warn::before { background: var(--uc-warning, #FFA940); }
.useo-summary__line.is-ok::before { background: var(--uc-success, #2EA343); }
.useo-summary .useo-summary__open { align-self: flex-start; }
.useo-summary__hint { margin: 0; font-size: 12px; color: var(--uc-text-muted, #737373); }
.useo-mini-findings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.useo-mini-findings li { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; font-size: 12px; color: var(--uc-text-muted, #737373); }
.useo-mini-findings__dot { width: 6px; height: 6px; border-radius: 999px; margin-top: 6px; background: var(--uc-text-subtle, #a3a3a3); }
.useo-mini-findings__dot.is-warning { background: var(--uc-warning, #FFA940); }
.useo-mini-findings__dot.is-blocker { background: var(--uc-danger, #F65258); }

/* Classic editor: the count beside the box title. */
.useo-mbcount-slot { margin-right: 8px; }
.useo-mbcount { display: inline-flex; align-items: center; gap: 5px; font: 500 11.5px/18px var(--uc-font-sans, system-ui, sans-serif); padding: 0 8px; border-radius: 999px; background: var(--uc-surface-base, #F4F4F4); color: var(--uc-text-muted, #737373); vertical-align: 1px; }
.useo-mbcount.is-warn { background: var(--uc-warning-soft, #FFEDD8); color: var(--uc-warning-fg, #AA712B); }
.useo-mbcount.is-ok { background: var(--uc-success-soft, #E7FFE7); color: var(--uc-success-fg, #0A842A); }

/* Bricks toolbar button. */
.useo-bricks-slot { display: inline-flex; align-items: center; list-style: none; }
.useo-tbtn { all: unset; box-sizing: border-box; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; color: inherit; opacity: .85; }
.useo-tbtn:hover, .useo-tbtn.is-on { opacity: 1; }
.useo-tbtn:focus-visible { outline: 2px solid var(--uc-ring, #3858e9); outline-offset: -4px; border-radius: 6px; }

/* Floating button (fallback where no toolbar can host the button). */
.useo-fab { position: fixed; left: 20px; bottom: 20px; z-index: 99990; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 14px; border-radius: 999px; border: 0; background: var(--uc-inverse-bg, #171717); color: var(--uc-inverse-fg, #fff); font: 500 13px/1 var(--uc-font-sans); cursor: pointer; box-shadow: var(--uc-shadow-3); }
.useo-fab .useo-cicon__n { box-shadow: 0 0 0 2px var(--uc-inverse-bg, #171717); }
.useo-fab:hover { opacity: .92; }
.useo-fab:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: 2px; }

/* The panel window: full-height modal, or a drawer under the host's top bar. */
.useo-modal { position: fixed; inset: 0; z-index: 99999; background: rgba(0, 0, 0, .45); display: flex; justify-content: flex-end; }
.useo-modal.is-drawer { top: 48px; background: rgba(0, 0, 0, .08); }
.useo-modal__dialog { width: min(420px, 100vw); height: 100%; background: var(--uc-surface-raised, #fff); display: flex; flex-direction: column; box-shadow: var(--uc-shadow-4); outline: 0; }
.useo-modal.is-drawer .useo-modal__dialog { box-shadow: 1px 0 0 var(--uc-border, rgba(0, 0, 0, .09)), 12px 0 32px -12px rgba(0, 0, 0, .18); animation: useo-slide var(--uc-dur-base, .2s) var(--uc-ease-emphasized, ease-out); }
@keyframes useo-slide { from { transform: translateX(-24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .useo-modal.is-drawer .useo-modal__dialog { animation: none; } }
.useo-modal__head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--uc-border-subtle, rgba(0, 0, 0, .055)); }
.useo-modal__mark { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--uc-inverse-bg, #171717); color: var(--uc-inverse-fg, #fff); }
.useo-modal__head h2 { margin: 0; font: 600 14px/1.3 var(--uc-font-sans); color: var(--uc-text-strong); }
.useo-modal__head .useo-modal__close { margin-right: auto; border-radius: var(--uc-radius-sm, 6px); }
.useo-modal__body { flex: 1; overflow-y: auto; padding: 12px 16px 0; }

/* Elementor top bar: the chip beside the page title (dark bar). */
.useo-ebchip { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 32px; margin-right: 8px; padding: 0 10px; border-radius: 8px; background: rgba(255, 255, 255, .08); color: #fff; font: 500 13px/1 var(--uc-font-sans, system-ui, sans-serif); white-space: nowrap; transition: background .15s ease; }
.useo-ebchip:hover { background: rgba(255, 255, 255, .16); }
.useo-ebchip.is-on { background: #fff; color: #0A0A0A; }
.useo-ebchip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.useo-ebchip__n { min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: #FFA940; color: #171717; font: 600 11px/18px var(--uc-font-sans, system-ui, sans-serif); text-align: center; }

/* Gutenberg's toolbar fills every icon path; keep the SEO mark an outline. */
.useo-seo-mark, .useo-seo-mark * { fill: none !important; }

/*
 * Layout for the DS controls inside WordPress field-group boxes. The controls themselves are DS
 * components (styled by their own modules); this only arranges them and the few compositions the
 * DS has no single component for (media picker, link row, repeater rows). Every value is a uc- token.
 *
 * Layout rule: every control fills its cell, the full row unless the field has a Width setting
 * (the grid maths lives in uich-gf-style.css). The section itself is capped, so full width stays a
 * comfortable form width.
 */

/* The DS scope paints its base surface; here the controls sit on WordPress's white box, the way they
   sit on white cards in the dashboard (DS inputs are a translucent wash over what is behind them). */
.uich-gf-ds.uc-scope { min-width: 0; background: transparent; font-family: var(--uc-font-sans); color: var(--uc-text-strong); }

/* ── The cell ──────────────────────────────────────────────────────────────── */

.uich-gf-ds-cell { min-width: 0; }
/* On / off in a settings row: the state text, then the control at the right edge. */
.uich-gf-labels-left > .uich-gf-wrap-true_false .uich-gf-ds-bool { flex-direction: row-reverse; color: var(--uc-text-muted); }

/* The PHP label and help text, brought in line with DS Label / hint. */
.uich-gf-row-ds > label.uich-gf-label,
.uich-gf-row-ds > .uich-gf-label-col > label.uich-gf-label {
	font-family: var(--uc-font-sans, inherit);
	font-size: 13px;
	font-weight: 500;
	color: var(--uc-text-strong);
}
.uich-gf-row-ds .uich-gf-instruction { margin: 0; font-size: 12px; line-height: 1.45; color: var(--uc-text-muted); }
.uich-gf-row-ds .uich-gf-input-wrap > .uich-gf-instruction,
.uich-gf-row-ds .uich-gf-field-error { margin: 6px 0 0; }
.uich-gf-row-ds .uich-gf-field-error { font-size: 12px; color: var(--uc-danger); }

/* The value inputs that carry the POST data. WordPress's forms.css gives checkbox / radio inputs a
   display value, which beats the `hidden` attribute, so they must be hidden explicitly. */
.uich-gf-ds input[hidden],
.uich-gf-ds select[hidden] { display: none !important; }

/* ── Selects ───────────────────────────────────────────────────────────────── */

.uich-gf-ds .uich-gf-ds-select,
.uich-gf-ds .uich-gf-ds-multi { width: 100%; min-width: 0; }
.uich-gf-ds-chips { display: flex; flex-wrap: wrap; gap: var(--uc-space-4); min-width: 0; }
.uich-gf-ds-multi[class] { height: auto; min-height: var(--uc-control-h-md); padding-block: var(--uc-space-4); }

.uich-gf-ds-pop[class] { box-sizing: border-box; min-width: var(--radix-popover-trigger-width); padding: var(--uc-space-4); }
.uich-gf-ds-pop__search { padding: var(--uc-space-4) var(--uc-space-4) var(--uc-space-6); }
.uich-gf-ds-pop__list { max-height: 260px; overflow-y: auto; }
.uich-gf-ds-pop__opt { display: flex; align-items: center; gap: var(--uc-space-8); padding: var(--uc-space-6) var(--uc-space-8); border-radius: var(--uc-radius-6); font-size: var(--uc-text-sm); cursor: pointer; }
.uich-gf-ds-pop__opt:hover { background: rgba(255, 255, 255, 0.08); }
.uich-gf-ds-pop__empty { margin: 0; padding: var(--uc-space-10); font-size: var(--uc-text-xs); color: var(--uc-text-muted); }

/* ── Checkbox / radio lists, true / false ──────────────────────────────────── */

.uich-gf-ds-choices { display: flex; flex-direction: column; gap: var(--uc-space-8); }
.uich-gf-ds-choices.is-row { flex-direction: row; flex-wrap: wrap; gap: var(--uc-space-8) var(--uc-space-20); }
.uich-gf-ds-choice { display: inline-flex; align-items: center; gap: var(--uc-space-8); width: -moz-fit-content; width: fit-content; font-size: var(--uc-text-sm); color: var(--uc-text-strong); cursor: pointer; }
/* "Select all" heads the list: a hairline sets it apart from the choices it controls. */
.uich-gf-ds-choice--all { font-weight: var(--uc-weight-medium); }
.uich-gf-ds-choices:not(.is-row) > .uich-gf-ds-choice--all { width: 100%; max-width: 240px; padding-bottom: var(--uc-space-8); border-bottom: 1px solid var(--uc-border-subtle); }
.uich-gf-ds-bool { min-height: var(--uc-control-h-sm); }

/* ── Range: slider + number box ────────────────────────────────────────────── */

/* The DS input is `width: 100%` at [class] strength, hence the [class]. */
.uich-gf-ds-range { display: flex; align-items: center; gap: var(--uc-space-12); height: var(--uc-control-h-md); }
.uich-gf-ds-range > :first-child { flex: 1 1 auto; min-width: 0; }
.uich-gf-ds-range .uich-gf-ds-range__num[class] { flex: none; width: 88px; }

/* ── Colour ────────────────────────────────────────────────────────────────── */

.uich-gf-ds-swatch { position: relative; display: block; width: 18px; height: 18px; border-radius: var(--uc-radius-4); box-shadow: inset 0 0 0 1px var(--uc-border); overflow: hidden; }
.uich-gf-ds-swatch input[type="color"] { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); padding: 0; border: 0; opacity: 0; cursor: pointer; }

/* ── Date / time: one icon (the DS one, on the left); the field opens the picker ── */

.uich-gf-ds-date::-webkit-calendar-picker-indicator { display: none; }
.uich-gf-ds-date { cursor: pointer; }

/*
 * ── Image / file / link ───────────────────────────────────────────────────────
 * The anatomy of the DS FileUpload: an empty, compact zone (icon · text · button), then a file row
 * (thumb or glyph · name and details · actions).
 */
.uich-gf-ds-zone {
	display: flex;
	align-items: center;
	gap: var(--uc-space-12);
	min-width: 0;
	padding: var(--uc-space-12);
	border-radius: var(--uc-radius-md);
	border: 1px dashed var(--uc-border-strong);
	/* The inputs' own fill (not FileUpload's sunken grey): an empty field reads like its neighbours. */
	background: var(--uc-surface-overlay);
	cursor: pointer;
	transition: border-color var(--uc-dur-fast) var(--uc-ease-standard);
}
.uich-gf-ds-zone:hover { border-color: var(--uc-text-subtle); }
.uich-gf-ds-zone:focus-within { border-color: var(--uc-text-muted); }
.uich-gf-ds-zone__icon {
	flex: none; display: grid; place-items: center; width: 32px; height: 32px;
	border-radius: var(--uc-radius-pill); background: var(--uc-surface-raised);
	box-shadow: inset 0 0 0 1px var(--uc-border-subtle); color: var(--uc-text-muted);
}
.uich-gf-ds-zone__text { flex: 1 1 auto; display: flex; flex-direction: column; gap: var(--uc-space-2); min-width: 0; }
.uich-gf-ds-zone__title { font-size: var(--uc-text-sm); font-weight: var(--uc-weight-medium); line-height: var(--uc-leading-snug); color: var(--uc-text-strong); }
.uich-gf-ds-zone__hint { font-size: var(--uc-text-xs); line-height: var(--uc-leading-snug); color: var(--uc-text-muted); }

.uich-gf-ds-file {
	display: flex;
	align-items: center;
	gap: var(--uc-space-12);
	min-width: 0;
	/* The empty zone's padding, so choosing a file swaps one for the other without a jump. */
	padding: var(--uc-space-12) var(--uc-space-12) var(--uc-space-12) var(--uc-space-8);
	border-radius: var(--uc-radius-md);
	background: var(--uc-surface-raised);
	box-shadow: inset 0 0 0 1px var(--uc-border);
}
.uich-gf-ds-file__icon {
	flex: none; display: grid; place-items: center; width: 32px; height: 32px;
	border-radius: var(--uc-radius-sm); background: var(--uc-surface-sunken); color: var(--uc-text-muted);
}
.uich-gf-ds-file__thumb { flex: none; display: block; width: 32px; height: 32px; border-radius: var(--uc-radius-sm); -o-object-fit: cover; object-fit: cover; background: var(--uc-surface-sunken); }
/* An image field is about the picture: a larger preview. */
.uich-gf-ds-file.is-image .uich-gf-ds-file__thumb { width: 56px; height: 56px; }
.uich-gf-ds-file__meta { flex: 1 1 auto; display: flex; flex-direction: column; gap: var(--uc-space-2); min-width: 0; }
.uich-gf-ds-file__name,
.uich-gf-ds-file__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uich-gf-ds-file__name { font-size: var(--uc-text-sm); font-weight: var(--uc-weight-medium); color: var(--uc-text-strong); }
.uich-gf-ds-file__sub { font-size: var(--uc-text-xs); line-height: var(--uc-leading-snug); color: var(--uc-text-muted); }
.uich-gf-ds-file__sub a { color: inherit; text-decoration: none; }
.uich-gf-ds-file__sub a:hover { color: var(--uc-text-strong); text-decoration: underline; }
.uich-gf-ds-file__actions { flex: none; display: flex; align-items: center; gap: var(--uc-space-4); }

/* Set link: drawn like a filled DS input (same fill, ring, radius and height as .shell). */
.uich-gf-ds-linkrow {
	display: flex;
	align-items: center;
	gap: var(--uc-space-8);
	min-width: 0;
	height: var(--uc-input-h, var(--uc-control-h-md));
	padding: 0 var(--uc-input-px, var(--uc-space-12)) 0 var(--uc-space-4);
	border-radius: var(--uc-input-radius, var(--uc-radius-md));
	background: var(--uc-surface-overlay);
	box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-input);
	/* The inputs' own size: a set link reads as a filled field. */
	font-size: var(--uc-text-base);
}
.uich-gf-ds-linkrow__icon { flex: none; display: inline-flex; color: var(--uc-text-muted); }
.uich-gf-ds-linkrow__text { flex: 1 1 auto; display: flex; align-items: baseline; gap: var(--uc-space-8); min-width: 0; white-space: nowrap; }
.uich-gf-ds-linkrow__title { flex: none; max-width: 50%; overflow: hidden; text-overflow: ellipsis; font-weight: var(--uc-weight-medium); color: var(--uc-text-strong); }
.uich-gf-ds-linkrow__url { min-width: 0; font-size: var(--uc-text-sm); overflow: hidden; text-overflow: ellipsis; color: var(--uc-text-muted); text-decoration: none; }
.uich-gf-ds-linkrow__url:hover { color: var(--uc-text-strong); text-decoration: underline; }
.uich-gf-ds-linkrow__flag { flex: none; font-size: var(--uc-text-xs); color: var(--uc-text-muted); }
.uich-gf-ds-linkrow__actions { flex: none; display: flex; align-items: center; gap: var(--uc-space-2); }

/* Empty link: a select-shaped trigger, icon and placeholder side by side. */
.uich-gf-ds-link-empty[class] { width: 100%; }
.uich-gf-ds-link-empty > span:first-child { display: inline-flex; align-items: center; gap: var(--uc-space-8); }
.uich-gf-ds-linkpop[class] { width: 320px; padding: 0; }
.uich-gf-ds-linkpop__body { display: flex; flex-direction: column; gap: var(--uc-space-6); padding: var(--uc-space-12); }
.uich-gf-ds-linkpop__body .uich-gf-ds-choice { margin-top: var(--uc-space-4); }
.uich-gf-ds-linkpop__foot { display: flex; justify-content: space-between; gap: var(--uc-space-8); padding: var(--uc-space-10) var(--uc-space-12); border-top: 1px solid var(--uc-border-subtle); }

/* ── Repeater: a card per row; inside, the same grid as the box ────────────── */

.uich-gf-ds-rep { display: flex; flex-direction: column; gap: var(--uc-space-8); }
.uich-gf-ds-rep__row { border-radius: var(--uc-radius-md); background: var(--uc-surface-raised); box-shadow: inset 0 0 0 1px var(--uc-border); }
.uich-gf-ds-rep__head { display: flex; align-items: center; justify-content: space-between; gap: var(--uc-space-8); height: 40px; padding: 0 var(--uc-space-14) 0 var(--uc-space-6); border-bottom: 1px solid var(--uc-border-subtle); }
.uich-gf-ds-rep__num { font-size: var(--uc-text-xs); font-weight: var(--uc-weight-medium); color: var(--uc-text-muted); }
.uich-gf-ds-rep__tools { display: inline-flex; gap: var(--uc-space-2); }
.uich-gf-ds-rep__fields { display: flex; flex-wrap: wrap; gap: var(--uc-space-16) var(--uich-gf-gap-x, 16px); padding: var(--uc-space-14); }
.uich-gf-ds-rep__field { display: flex; flex-direction: column; gap: var(--uc-space-6); flex: 1 1 100%; min-width: 0; }
.uich-gf-ds-rep__field.uich-gf-has-width { flex: 0 0 calc(var(--uich-gf-w) * 1% - (100 - var(--uich-gf-w)) * var(--uich-gf-gap-x, 16px) / 100); }
@container uich-gf (max-width: 560px) {
	.uich-gf-ds-rep__field.uich-gf-has-width { flex-basis: 100%; }
}
.uich-gf-ds-rep__foot { display: flex; align-items: center; gap: var(--uc-space-10); }
.uich-gf-ds-help { margin: 0; font-size: var(--uc-text-xs); color: var(--uc-text-muted); }
.uich-gf-ds-req { color: var(--uc-danger); }

/* ── Pickers: post object, page link, user (searchable, in the dark DS dropdown) ── */

.uich-gf-ds-ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.uich-gf-ds-pop__opt {
	all: unset;
	box-sizing: border-box;
	display: flex; align-items: center; justify-content: space-between; gap: var(--uc-space-8);
	width: 100%; padding: var(--uc-space-6) var(--uc-space-8);
	border-radius: var(--uc-radius-6); font-size: var(--uc-text-sm); cursor: pointer;
}
button.uich-gf-ds-pop__opt:hover,
button.uich-gf-ds-pop__opt:focus-visible { background: rgba(255, 255, 255, 0.08); }
button.uich-gf-ds-pop__opt[aria-selected="true"] { font-weight: var(--uc-weight-medium); }
.uich-gf-ds-pop__opt.is-muted { color: var(--uc-text-muted); }
.uich-gf-ds-pop__group {
	margin: var(--uc-space-8) 0 var(--uc-space-2); padding: 0 var(--uc-space-8);
	font-size: var(--uc-text-xs); font-weight: var(--uc-weight-medium); color: var(--uc-text-muted);
}
.uich-gf-ds-pop__empty { display: flex; align-items: center; gap: var(--uc-space-6); }
.uich-gf-ds-pop__more {
	all: unset; box-sizing: border-box; display: block; width: 100%;
	padding: var(--uc-space-8); text-align: center; border-radius: var(--uc-radius-6);
	font-size: var(--uc-text-xs); font-weight: var(--uc-weight-medium); color: var(--uc-text-muted); cursor: pointer;
}
.uich-gf-ds-pop__more:hover,
.uich-gf-ds-pop__more:focus-visible { color: var(--uc-text-strong); background: rgba(255, 255, 255, 0.08); }

/* A long term list scrolls instead of pushing the box down. */
.uich-gf-ds-scrollbox { max-height: 232px; overflow-y: auto; padding: var(--uc-space-10) var(--uc-space-12); border-radius: var(--uc-radius-md); box-shadow: inset 0 0 0 1px var(--uc-border); }

/* Password: the show / hide button sits in the field's trailing slot. */
.uich-gf-ds-password[class] { padding-left: var(--uc-space-2); }

/* ── Relationship ──────────────────────────────────────────────────────────── */

.uich-gf-ds-rel { display: flex; flex-direction: column; gap: var(--uc-space-8); min-width: 0; }
.uich-gf-ds-rel__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--uc-space-8); }
.uich-gf-ds-rel__search { flex: 1 1 240px; min-width: 0; }
.uich-gf-ds-rel__pt[class],
.uich-gf-ds-rel__tax[class] { flex: 0 0 auto; width: 200px; }
.uich-gf-ds-rel__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--uich-gf-gap-x, 16px); }
@container uich-gf (max-width: 560px) {
	.uich-gf-ds-rel__cols { grid-template-columns: minmax(0, 1fr); }
}
.uich-gf-ds-rel__col { display: flex; flex-direction: column; min-width: 0; border-radius: var(--uc-radius-md); background: var(--uc-surface-raised); box-shadow: inset 0 0 0 1px var(--uc-border); overflow: hidden; }
.uich-gf-ds-rel__head {
	display: flex; align-items: center; justify-content: space-between; gap: var(--uc-space-8);
	height: 36px; padding: 0 var(--uc-space-12); border-bottom: 1px solid var(--uc-border-subtle);
	font-size: var(--uc-text-xs); font-weight: var(--uc-weight-medium); color: var(--uc-text-muted);
}
.uich-gf-ds-rel__count { color: var(--uc-text-muted); }
.uich-gf-ds-rel__list { height: 240px; overflow-y: auto; padding: var(--uc-space-4); }
.uich-gf-ds-rel__list .uich-gf-ds-pop__empty { padding: var(--uc-space-10) var(--uc-space-8); }
.uich-gf-ds-rel__list .uich-gf-ds-pop__more { color: var(--uc-text-muted); }
.uich-gf-ds-rel__list .uich-gf-ds-pop__more:hover { color: var(--uc-text-strong); background: var(--uc-surface-sunken); }
.uich-gf-ds-rel__item {
	box-sizing: border-box;
	display: flex; align-items: center; gap: var(--uc-space-8);
	width: 100%; min-height: 32px; padding: var(--uc-space-4) var(--uc-space-8);
	border: 0; border-radius: var(--uc-radius-6); background: none;
	font: inherit; font-size: var(--uc-text-sm); color: var(--uc-text-strong); text-align: right;
}
button.uich-gf-ds-rel__item { cursor: pointer; }
button.uich-gf-ds-rel__item > svg { flex: none; margin-right: auto; color: var(--uc-text-subtle); opacity: 0; }
button.uich-gf-ds-rel__item:hover:not(:disabled),
button.uich-gf-ds-rel__item:focus-visible { background: var(--uc-surface-sunken); }
button.uich-gf-ds-rel__item:hover:not(:disabled) > svg,
button.uich-gf-ds-rel__item:focus-visible > svg { opacity: 1; }
button.uich-gf-ds-rel__item:focus-visible { outline: 1px solid var(--uc-brand); outline-offset: -1px; }
button.uich-gf-ds-rel__item:disabled { cursor: default; color: var(--uc-text-subtle); }
button.uich-gf-ds-rel__item.is-picked > svg { opacity: 1; color: var(--uc-text-muted); }
.uich-gf-ds-rel__item.is-selected { padding-left: var(--uc-space-2); }
.uich-gf-ds-rel__item.is-selected:hover { background: var(--uc-surface-sunken); }
.uich-gf-ds-rel__tools { flex: none; display: inline-flex; margin-right: auto; opacity: 0; }
.uich-gf-ds-rel__item.is-selected:hover .uich-gf-ds-rel__tools,
.uich-gf-ds-rel__item.is-selected:focus-within .uich-gf-ds-rel__tools { opacity: 1; }
.uich-gf-ds-rel__thumb { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--uc-radius-4); -o-object-fit: cover; object-fit: cover; background: var(--uc-surface-sunken); color: var(--uc-text-subtle); }

/*
 * ── On / off fields as setting rows ───────────────────────────────────────────
 * Label and help on the left, the switch or checkbox on the right, in a bordered row; consecutive
 * full-width ones join into one list with hairlines between (the settings-list pattern). The row's
 * padding is the grid gutter, so the outline is a pseudo-element inset by that gutter.
 */
@supports (grid-template-rows: subgrid) {
	.uich-gf-metabox > .uich-gf-row-ds.uich-gf-labels-top:has(> .uich-gf-wrap-true_false) {
		--_inset-x: calc(var(--uich-gf-gap-x, 16px) / 2);
		--_inset-b: var(--uich-gf-gap-y, 24px);
		position: relative;
		grid-template-rows: auto auto;
		grid-template-columns: minmax(0, 1fr) auto;
		align-content: center;
		-moz-column-gap: var(--uc-space-16);
		     column-gap: var(--uc-space-16);
		min-height: 56px;
		padding: var(--uc-space-12) calc(var(--_inset-x) + var(--uc-space-16)) calc(var(--_inset-b) + var(--uc-space-12));
	}
	.uich-gf-metabox > .uich-gf-row-ds.uich-gf-labels-top:has(> .uich-gf-wrap-true_false)::before {
		content: "";
		position: absolute;
		inset: 0 var(--_inset-x) var(--_inset-b);
		border: 1px solid var(--uc-border);
		border-radius: var(--uc-radius-md);
		pointer-events: none;
	}
	.uich-gf-metabox > .uich-gf-row-ds.uich-gf-labels-top:has(> .uich-gf-wrap-true_false) > label.uich-gf-label { grid-row: 1; grid-column: 1; align-self: end; }
	.uich-gf-metabox > .uich-gf-row-ds.uich-gf-labels-top:has(> .uich-gf-wrap-true_false) > .uich-gf-instruction { grid-row: 2; grid-column: 1; margin: 2px 0 0; }
	.uich-gf-metabox > .uich-gf-row-ds.uich-gf-labels-top:has(> .uich-gf-wrap-true_false) > .uich-gf-input-wrap { grid-row: 1 / span 2; grid-column: 2; align-self: center; margin: 0; }
	/* No help text: the label alone, centred on the control. */
	.uich-gf-metabox > .uich-gf-row-ds.uich-gf-labels-top:has(> .uich-gf-wrap-true_false):not(:has(> .uich-gf-instruction)) > label.uich-gf-label { grid-row: 1 / span 2; align-self: center; }
	/* The text that names the state reads first, the control sits at the row's right edge. */
	.uich-gf-metabox > .uich-gf-row-ds.uich-gf-labels-top:has(> .uich-gf-wrap-true_false) .uich-gf-ds-bool { flex-direction: row-reverse; color: var(--uc-text-muted); }

	/* Consecutive full-width ones: one list. */
	.uich-gf-metabox > .uich-gf-row-ds.uich-gf-labels-top:not(.uich-gf-has-width):has(> .uich-gf-wrap-true_false):has(+ .uich-gf-row-ds.uich-gf-labels-top:not(.uich-gf-has-width):not(.uich-gf-cond-hidden) > .uich-gf-wrap-true_false) {
		--_inset-b: 0px;
	}
	.uich-gf-metabox > .uich-gf-row-ds.uich-gf-labels-top:not(.uich-gf-has-width):has(> .uich-gf-wrap-true_false):has(+ .uich-gf-row-ds.uich-gf-labels-top:not(.uich-gf-has-width):not(.uich-gf-cond-hidden) > .uich-gf-wrap-true_false)::before {
		border-bottom: 0;
		border-bottom-right-radius: 0;
		border-bottom-left-radius: 0;
	}
	.uich-gf-metabox > .uich-gf-row-ds.uich-gf-labels-top:not(.uich-gf-has-width):has(> .uich-gf-wrap-true_false) + .uich-gf-row-ds.uich-gf-labels-top:not(.uich-gf-has-width):has(> .uich-gf-wrap-true_false)::before {
		border-top-color: var(--uc-border-subtle);
		border-top-right-radius: 0;
		border-top-left-radius: 0;
	}
}

/* Repeater sub-fields: the same 8px from label to control as the box's own rows. */
.uich-gf-ds-rep__field { gap: var(--uich-gf-label-gap, 8px); }

/* Right after a reorder: the moved post stays highlighted with its buttons; other rows keep their
   buttons off (and unclickable) until the pointer moves. */
.uich-gf-ds-rel__item.is-selected.is-moved { background: var(--uc-surface-sunken); }
.uich-gf-ds-rel__item.is-selected.is-moved .uich-gf-ds-rel__tools { opacity: 1; }
.uich-gf-ds-rel__list.is-moving .uich-gf-ds-rel__item.is-selected:not(.is-moved):hover { background: none; }
.uich-gf-ds-rel__list.is-moving .uich-gf-ds-rel__item.is-selected:not(.is-moved) .uich-gf-ds-rel__tools { opacity: 0; pointer-events: none; }

/* Builder-only: focus is distinct from selection; indentation remains depth-led. */
.uipb-layers .uipb-layer:focus-visible {
  outline: 2px solid var(--uc-border-focus, var(--uc-brand));
  outline-offset: -2px;
}
.uipb-layers .uipb-layer[aria-selected='true'] .uipb-layer__name { font-weight: 600; }
.uipb-layers .uipb-layer { flex-shrink: 0; }
.uipb-layers .uipb-layer__icon { pointer-events: none; }
/* No vertical guide lines down the nesting levels: the indent and the caret
   already show depth, and the lines made the tree busy. */

.uipb-history__status,.uipb-history__restore p{font-size:12px;line-height:1.5;margin:8px 12px;overflow-wrap:anywhere}.uipb-history__exact{display:block;font-size:11px;line-height:1.5;color:inherit;opacity:.85}.uipb-history__version[data-picked]{outline:2px solid currentColor;outline-offset:-2px}.uipb-history__selection{font-size:11px;font-weight:600}.uipb-history__exact:focus-visible{outline:2px solid currentColor;outline-offset:-2px}

/**
 * Layout, and which surface each region sits on.
 *
 * Still not one colour in this file. Every value below is a `--uc-*` token from
 * the design system, and the dark look comes from the `uc-chrome` class on the
 * root — the DS already defines a surface model for exactly this shape of app:
 *
 *   .uc-content                     light content (the default)
 *   .uc-content[data-theme="dark"]  dark content
 *   .uc-chrome                      dark chrome, "fixed; sidebar/nav/rails"
 *
 * The editor is chrome wrapped around one piece of light content: the page.
 * That is why the canvas is the only thing that stays light — it is not styled
 * here at all, it is a WordPress front end in an iframe, and darkening the
 * surround is what makes it read as the document rather than as the app.
 *
 * Widths are custom properties rather than literals because the canvas has to
 * know them too — it re-measures when either column changes.
 */
.uipb-studio {
  --uipb-topbar-h: 48px;
  --uipb-agent-w: 320px;
  --uipb-agent-rail-w: 52px;
  /* A style panel, so wider than a plain sidebar: three short controls on one
     row is the difference between a section you can see and one you scroll.
     But 340px was more than that argument buys — Webflow and Elementor both
     run 300, Framer 260 — and every pixel here comes straight off the canvas,
     which is the thing you are actually looking at.

     300px, with the label column below unchanged at 96px, leaves the control
     column around 180px: still enough for the widest rows in the panel (a
     number plus its unit select, and the four text-align buttons), which is
     what the three-controls claim was really about. */
  --uipb-inspector-w: 300px;

  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: var(--uipb-topbar-h) 1fr;
  grid-template-columns: var(--uipb-agent-w) 1fr 0;
  grid-template-areas:
    'topbar topbar topbar'
    'agent  canvas inspector';
  overflow: hidden;

  background: var(--uc-surface-base);
  color: var(--uc-text);
  font-family: var(--uc-font-sans, inherit);
}

/* Rule 2 from shell/README.md: the agent yields the width the moment styling starts. */
.uipb-studio[data-agent='rail'] { --uipb-agent-w: var(--uipb-agent-rail-w); }
.uipb-studio[data-inspector='open'] { grid-template-columns: var(--uipb-agent-w) 1fr var(--uipb-inspector-w); }

/* Rule 1: preview is the whole screen. Nothing docked, including the agent. */
.uipb-studio[data-mode='preview'] {
  grid-template-columns: 0 1fr 0;
}

/* No dividing rules between the regions.
 *
 * The top bar, the agent column and the inspector each carried a 1px
 * `--uc-border-subtle` edge against the canvas. They were drawing a boundary
 * the surfaces already draw: chrome sits on `--uc-surface-base` (#171717) and
 * the canvas ground is `--uc-surface-sunken` (#101010), which is a tonal step
 * you can see from across the room. The line on top of it added a third value
 * at the seam — #333 between #171717 and #101010 — so the edge read as a drawn
 * frame rather than as one surface ending and another beginning.
 *
 * Without them the chrome reads as panels floating on the canvas ground, which
 * is what it is. Nothing is lost: remove the tonal step and the lines would be
 * load-bearing again, so keep the two backgrounds different.
 *
 * 2026-10-13 (Jay): the builder ground is now `--uc-surface-base` too, the chat
 * card's colour, so every background matches. The chat and panel cards keep
 * their 1px inset edge, which is what separates them now. */
.uipb-topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--uc-surface-base);
}
/* Two zones. There was a third, centred on the WINDOW, holding the mode row —
   see the note in TopBar.jsx for why that moved into the left zone.
 *
 * With it gone the overflow reasoning below gets simpler, not weaker: the mode
 * row is now inside a zone with the default `min-width: auto`, so it cannot be
 * painted over by a right zone that has outgrown its box. It is the thing the
 * old centre zone needed the most protection for. */
.uipb-topbar__left,
.uipb-topbar__right {
  display: flex;
  align-items: center;
  gap: var(--uc-space-4);
  flex: 1 1 0;
  /* `min-width: 0`, so a zone is sized by its SHARE of the bar and not by its
     content — which is what keeps the centre on the window's midpoint. Without
     it the left zone was clamped up to its own 567px of content while the right
     took 436, and the chip sat 66px right of centre; the site name never
     ellipsised because the zone was never asked to be smaller than it.
   *
   * This is the setting that once let the right zone paint over the mode row,
   * so it is only safe alongside the thresholds further down: the site name
   * goes at 1100, the URL chip at 820, Share's label at 1200. Those keep each
   * zone's content inside its half at every width the editor is usable at —
   * measured, not assumed. Loosen one and check the bar again.
   *
   * The items that collapse carry their own `min-width: 0` and an ellipsis, so
   * what gives way is text, never a control. */
  min-width: 0;

}
.uipb-topbar__right { justify-content: flex-end; }

/* The middle, and it is centred on the WINDOW rather than on whatever is left
   over between the two side groups.
 *
 * That falls out of the zones: left and right are `flex: 1 1 0`, so they take
 * equal shares of the free space and the centre lands on the midpoint however
 * lopsided their contents are. The chip does not have to know anything about
 * the widths either side of it.
 *
 * `flex: 0 1 auto` — it never grows past its content, and it is the FIRST thing
 * to give way when the bar is full. That ordering is deliberate: only items
 * with a non-zero basis take part in shrinking, and the side zones have a basis
 * of 0, so the chip ellipsises before either side is squeezed toward its floor.
 * Exactly centred while there is room; narrower, then off-centre, once there is
 * not — and never on top of anything, which is the rule the side zones set. */
.uipb-topbar__center {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}

/* Nothing in a zone may overflow it.
 *
 * `justify-content: flex-end` sends overflow out of the START edge, and that
 * overflow is invisible to every measurement: `scrollWidth` equals
 * `clientWidth`, no scrollbar appears, nothing clips. It simply paints on top
 * of the centre zone. In Preview at 1280px the right zone's children summed to
 * 690px in a 476px box, so the URL chip began 214px to the left of its own
 * zone and lay across the mode row.
 *
 * Two things caused it. The zones are `flex: 1 1 0`, so the right one gets
 * exactly half the leftover however little the left one needs — and none of its
 * children could shrink, because a button's min-content is its whole label.
 *
 * The rule is: one item may shrink, the rest are dropped by a threshold. A bar
 * where every control squashes a little is harder to read than one that gives
 * up the least useful thing outright.
 *
 * The overflow this describes now lands on the left zone rather than on a
 * centred mode row, and the left zone's own `min-width: auto` floor is what
 * stops it. */
.uipb-topbar__right > * { flex: none; }
.uipb-topbar__left > * { flex: none; }

/* The brand logo — UiChemy's gradient mark, or the white-labelled one. */
/* The mark and its menu (common/HomeMark.jsx): `logo ▾` as one button that
   opens the menu, the same white fill and height as the page-name pill. */
.uipb-topbar__home {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  height: 28px;
  padding: 0 2px;
  margin-right: 4px;
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-control);
  color: var(--uc-text-muted);
  cursor: pointer;
  -moz-user-select: none;
       user-select: none;
  -webkit-user-select: none;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}
.uipb-topbar__home:hover,
.uipb-topbar__home[data-state='open'] { background: var(--uc-surface-control); color: var(--uc-text-strong); box-shadow: inset 0 0 0 1px var(--uc-border); }
.uipb-topbar__home:active { transform: scale(0.94); }
.uipb-topbar__home:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.uipb-topbar__home-chevron { flex: none; }
.uipb-home-menu { min-width: 200px; }
.uipb-home-menu__sub { min-width: 150px; }
.uipb-home-menu__label { flex: 1; }
.uipb-home-menu__check { margin-right: auto; }
.uipb-home-menu__arrow { margin-right: auto; flex: none; color: var(--uc-text-muted); }
.uipb-home-menu__logo { width: 16px; height: 16px; flex: none; -o-object-fit: contain; object-fit: contain; border-radius: var(--uc-radius-sm); }
/* 18px in the 28px pill: 5px clear above and below, as there is beside it
   (at 24px it touched the pill's top and bottom). */
.uipb-topbar__logo {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: block;
  pointer-events: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  -webkit-user-drag: none;
  -o-object-fit: contain;
     object-fit: contain;
  border-radius: var(--uc-radius-sm);
}
/* The fallback when there is no logo file: a plain square. */
.uipb-topbar__mark {
  width: 18px; height: 18px;
  border-radius: var(--uc-radius-sm);
  background: var(--uc-brand-fg);
  flex-shrink: 0;
}

/* The site name is the left zone's shrinkable item, for the same reason the URL
   chip is the right zone's: of the three things on that side — back, site,
   page — it is the one you already know. The page name is what you are editing
   and the back button is how you leave, so both keep their width.
 *
 * Without this the left zone overflowed exactly as the right one did: at 1024
   its content ran to 383px inside a 348px box, and the page menu sat 15px over
   the mode row. */
.uipb-topbar__site {
  flex: 0 1 auto;
  min-width: 0;
  font-size: var(--uc-text-sm, 13px);
  font-weight: var(--uc-weight-medium);
  color: var(--uc-text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: var(--uc-space-4);
}
.uipb-topbar__sep { color: var(--uc-text-muted); opacity: 0.6; }

/* The page name, and the field it turns into on double-click. Capped so a
   long title ellipsises instead of pushing the mode row off the bar; the field
   keeps roughly the same footprint so renaming does not reflow the bar. */
.uipb-topbar__title {
  max-width: 240px;
  min-width: 0;
}
.uipb-topbar__titletext {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uipb-topbar__rename {
  width: 200px;
  flex: none;
}
/* Renaming inside the page-name pill: the field takes the name's place at a
   height that fits the 28px pill, with the focus ring as its only frame, so
   the chevron beside it stays where it was (a full 28px outlined field, 200px
   wide, pushed it out of the pill). Specific enough to beat the builder's
   field well for inputs (.uich-cb-body … input, below). */
.uich-cb-body .uipb-topbar .uipb-topbar__address input.uipb-topbar__rename.uipb-topbar__rename.uipb-topbar__rename {
  flex: 0 1 180px;
  width: 180px;
  min-width: 80px;
  height: 22px;
  margin: 0 3px 0 2px;
  padding: 0 6px;
  border-radius: var(--uc-radius-sm);
  background: var(--uipb-field-bg);
  box-shadow: inset 0 0 0 1px var(--uc-ring);
  font-size: var(--uc-text-sm, 13px);
  font-weight: var(--uc-weight-medium);
}

/* Below this the site name has no room left to ellipsis into, and the page
   menu right beside it already says where you are. */
@media (max-width: 1100px) {
  .uipb-topbar__site,
  .uipb-topbar__sep { display: none; }
}

/* The URL chip. The host is the part you read; the path is context, so it
   recedes rather than competing at the same weight.
 *
 * It is also the one item in the right zone allowed to shrink — it degrades
 * gracefully, because an ellipsised URL still answers "which site is this?"
 * while a squashed Publish button answers nothing. */
.uipb-topbar__url {
  display: inline-flex;
  align-items: center;
  gap: var(--uc-space-4);
  flex: 0 1 auto;
  min-width: 0;
  max-width: 280px;
  overflow: hidden;
}
.uipb-topbar__host { color: var(--uc-text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uipb-topbar__path { color: var(--uc-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* `site / Page name ▾` — the address row in the middle of the bar. One flex
   row so the host, the slash, the name and the switcher sit on one baseline;
   the name is the part that gives way when the bar is full. */
.uipb-topbar__address {
  display: flex;
  align-items: center;
  gap: var(--uc-space-2);
  min-width: 0;
}
.uipb-topbar__address .uipb-topbar__url { max-width: 200px; color: var(--uc-text-muted); }
.uipb-topbar__address .uipb-topbar__host { color: var(--uc-text-muted); }
.uipb-topbar__address .uipb-topbar__title { color: var(--uc-text-strong); font-weight: var(--uc-weight-medium); }

/* The page's templates (TemplateSwitch): the template's name, and what it is. */
.uipb-tpl-menu { min-width: 280px; }
/* "Templates on this page", a quiet label over the list. */
.uipb-tpl-menu__head {
  padding: 6px 10px 4px;
  color: var(--uc-text-subtle);
  font-size: var(--uc-text-xs, 11px);
  font-weight: var(--uc-weight-medium);
}
.uipb-tpl-menu__list { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
/* Its scrollbar: a thin rounded thumb on no track, in the theme's border ink
   (the browser's default drew a white track down the dark menu). */
.uipb-tpl-menu__list { scrollbar-width: thin; scrollbar-color: var(--uc-border-strong) transparent; }
.uipb-tpl-menu__list::-webkit-scrollbar { width: 8px; }
.uipb-tpl-menu__list::-webkit-scrollbar-track { background: transparent; }
.uipb-tpl-menu__list::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: var(--uc-border-strong); background-clip: padding-box; }
.uipb-tpl-menu__list::-webkit-scrollbar-thumb:hover { background-color: var(--uc-text-subtle); }
/* The empty state is a note, not a menu row: a row is one line tall, so the
   sentence wrapped past it and the list scrolled over its own text. */
.uipb-tpl-menu__empty {
  padding: 6px 10px 8px;
  color: var(--uc-text-subtle);
  font-size: var(--uc-text-sm, 12px);
  line-height: 1.45;
  /* One line (QA): the menu is 280px wide at least, which the sentence fits. */
  white-space: nowrap;
}
.uipb-tpl-menu__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uipb-tpl-menu__type {
  margin-right: var(--uc-space-8);
  color: var(--uc-text-subtle);
  font-size: var(--uc-text-2xs, 10px);
  text-transform: uppercase;
  letter-spacing: var(--uc-tracking-wide);
}

/* Device row: icons only. Three words cost three times the width and say the
   same thing, and the icons are the one place in this bar where a picture is
   genuinely faster to read than its label. */
/* No sizing here. The device row is a DS Tabs pill, the same component and the
   same size as the mode row, so both get their height, radius, track and
   indicator from the DS rather than from two sets of local rules that drift.
   `.uipb-topbar__right > *` already stops it shrinking. */


/* The device row: the same control as the mode row, one step down.
 *
 * It was deliberately smaller than the mode row — 20px squares in a 2px track,
 * 24px against the mode row's 28 — so that a preference you set once did not
 * compete with the editor's primary navigation sitting right beside it.
 *
 * That argument died when the mode row moved to the LEFT of the bar. The device
 * row's neighbours are now the share, view and Publish buttons, every one of
 * them a 28px `sm` control, and a 24px group among them does not read as
 * ranked — it reads as misaligned, because it is: four pixels short against a
 * shared centre line, which the eye picks up as a wobble rather than as a
 * hierarchy.
 *
 * So it matches its neighbours now: 24px squares in the same 2px track puts the
 * group at 28px, level with everything to its right. Rank is carried by the
 * glyph instead, which stays at 14px (TopBar.jsx) inside a 24px square where
 * the buttons beside it run 16px in 28px — quieter contents, same box.
 *
 * Deliberately NOT changed in the design system. `sm` is right there; sizing it
 * here would move every tab row in every app built on it to suit one row. */
.uipb-topbar__devices { flex-shrink: 0; }
/* The track is the LIST, not the Tabs root. Padding on the root sits outside
   the track and only made the group taller without tightening anything. */
.uipb-topbar__devices [role='tablist'] { padding: 2px; }
.uipb-topbar__devices [role='tab'] { width: 24px; height: 24px; min-width: 24px; padding: 0; }
.uipb-topbar__device { display: inline-flex; align-items: center; justify-content: center; }

/* No label-dropping rule any more: Share was the last button carrying a word
   beside its icon, and it is icon-only at every width now. `.uipb-topbar__wordy`
   went with it. */

/* The chip shrinks long before it goes, now that it is the middle of the bar
   rather than one more thing on the right: hiding it at 1100 left a hole in the
   centre at widths where there was room for 280px of URL.
 *
 * It goes when the side groups can no longer afford it, and that point is
   arithmetic rather than taste. Each side gets `(W - 40 - chip) / 2`, and the
   left group cannot shrink below 369px once the site name has already gone —
   back, mark, page menu, mode row. Setting those equal with a 280px chip gives
   W = 1058, so below 1060 the chip is what gives way; above it, every zone
   fits and the chip sits exactly on the midpoint.
 *
 * Losing it costs little: the page menu still names the page and the eye beside
   Publish still opens it. */
@media (max-width: 1060px) { .uipb-topbar__url { display: none; } }

/* ---- The Publish split button --------------------------------------------
 * Two DS buttons made to read as one control: same solid brand fill, a 1px
 * seam between them, and the facing corners squared so the pair keeps a single
 * outline. The chevron was `variant="soft"`, which on this chrome rendered as a
 * dark square beside an orange button — two controls that happened to touch,
 * rather than a primary action with a second way in.
 *
 * `:first-child` / `:last-child` are (0,2,0), which is what lets them override
 * the DS's own `.uc-button` radius without an `!important`. Logical properties,
 * so the squared corners follow the writing direction rather than assuming the
 * chevron is on the right. */
/* No gap and no outline on the chevron: a 1px gap let the black top bar show
   through as a dark line between the two halves, and the chevron's own inset
   outline drew another one down its left edge. The halves meet as one pill. */
.uipb-publish { display: inline-flex; align-items: center; gap: 0; }
.uipb-publish > :first-child {
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}
.uipb-publish > :last-child {
  border-start-start-radius: 0;
  border-end-start-radius: 0;
  box-shadow: none;
}

.uipb-agent {
  grid-area: agent;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--uc-surface-base);
}
.uipb-agent__messages { flex: 1; min-height: 0; }
.uipb-agent__prompt { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.uipb-agent__rail { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; }

/* A rail button whose panel is open stays lit, so the rail says which of its
   surfaces you are looking at rather than only offering to open them. The
   state is `aria-pressed` on the button itself; this class is here purely to
   out-specify the DS's own `.button.ghost` pair, which a two-class selector
   only ties with — and a tie is decided by stylesheet order, which for a
   runtime-injected module is not ours to rely on. */
.uipb-agent .uipb-agent__toggle[aria-pressed='true'] {
  background: var(--uc-surface-control);
  color: var(--uc-text-strong);
}

.uipb-canvas {
  grid-area: canvas;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--uc-surface-base);
}
/* The canvas is the positioning context for the floating bar. */
.uipb-canvas { position: relative; }

/* The Composer widget's canvas toolbar (CanvasToolbar.jsx mounts the core's
   CanvasToolbarContent). The core pins its host to the WINDOW — a fixed,
   full-viewport layer with the pill at the bottom centre. Here the pill belongs
   to the canvas column, so the host is the canvas's own box instead, and the
   pill centres in it. Everything else — the pill, its magnifying buttons, the
   ✕, the tooltips — is the core's stylesheet (composer-dock.css) untouched. */
.uipb-canvas .uipb-canvas-toolbar.uich-canvas-toolbar-host {
  position: absolute;
  inset: 0;
  z-index: 5;
}
.uipb-canvas .uipb-canvas-toolbar .canvas-toolbar-wrap {
  position: absolute;
  right: 50%;
  /* Lifted clear of the motion timeline while it is open — the core publishes
     its live height as --uich-mtl-h (0 when closed). */
  bottom: calc(var(--uc-space-16) + var(--uich-mtl-h, 0px));
}

/* The motion timeline dock spans the CANVAS column, not the window: both its
   edges are the canvas card's (MotionDock measures them). */
body .uich-mtl { right: var(--uich-cb-mtl-left, 0px); left: var(--uich-cb-mtl-right, 0px); }
body .uich-mtl-launch { left: calc(16px + var(--uich-cb-mtl-right, 0px)); }

/* The dock is the canvas card's own foot (Jay 2026-10-27: "settle a proper
   design of the timeline"). The core draws it as full-width chrome for a
   preview; here it takes the card's white, bottom edge and 12px corners. The
   core is shared with Elementor, Gutenberg and Bricks, so all of it is
   restated here rather than changed there. */
.uipb-motion-dock .uich-mtl {
  --panel-bg: var(--uc-surface-raised);
  --panel-bg-2: color-mix(in srgb, var(--uc-text) 4%, var(--uc-surface-raised));
  bottom: var(--uich-cb-mtl-bottom, 0px);
  border-top-color: var(--uc-border);
  border-radius: 0 0 var(--uc-radius-lg, 12px) var(--uc-radius-lg, 12px);
}
.uipb-motion-dock .uich-mtl-body { border-radius: inherit; }

/* Collapse and close sit at the end of the play / time column, on the
   ruler's line, instead of a 36px row of their own; the rows get it back.
   `--uich-tools-w` is the core's live measure of the cluster. */
.uipb-motion-dock .uich-mtl .uich-mtl-head {
  position: absolute;
  top: 0;
  right: calc(var(--uich-n) - var(--uich-tools-w, 0px));
  left: auto;
  z-index: 8;
  height: 44px;
  border: 0;
  background: none;
}
.uipb-motion-dock .uich-mtl-tools { gap: 2px; padding: 0 6px; background: none; }
.uipb-motion-dock .uich-mtl-lead { padding-left: calc(var(--uich-tools-w, 0px) + 4px); }
.uipb-motion-dock .uich-mtl-tally.is-warn { min-width: 0; }
.uipb-motion-dock .uich-mtl.is-collapsed .uich-mtl-body { margin-left: 0; }

/* Ruler: labels along the top, ticks rising from the axis, and the playhead a
   short stem with a dot below the labels, so "0" is never struck through. */
.uipb-motion-dock .uich-mtl-tick { top: 0; bottom: 0; padding-top: 8px; color: var(--uc-text-muted); }
.uipb-motion-dock .uich-mtl-tick::before { top: auto; bottom: 0; height: 5px; background: var(--uc-border-strong); }
/* An edge label is pinned to its edge (the core's edgeShift), so its tick is
   too: under the label's middle it stood 4px off the value it marks. */
.uipb-motion-dock .uich-mtl-tick[style*="translateX(0)"]::before { right: 0; }
.uipb-motion-dock .uich-mtl-tick[style*="translateX(-100%)"]::before { right: auto; left: 0; }
.uipb-motion-dock .uich-mtl-cap { top: auto; height: 12px; }
.uipb-motion-dock .uich-mtl-cap::before { top: -4px; right: -3.5px; width: 8px; height: 8px; }
.uipb-motion-dock .uich-mtl-head-line { opacity: 0.6; }
.uipb-motion-dock .uich-mtl-grid { background: var(--uc-border); opacity: 1; }

/* Track names in medium weight; the kind icon of a pinned track takes the
   pinned bar's orange, so the colour reads as a key. */
.uipb-motion-dock .uich-mtl-row:not(.is-child) > .uich-mtl-name > .uich-mtl-name-main { color: var(--uc-text-strong); font-weight: 500; }
.uipb-motion-dock .uich-mtl-row:has(.uich-mtl-bar.is-pinned) .uich-mtl-kind { color: var(--uc-brand); }

/* Bars: a soft, opaque fill (the grid stops at a bar) with a hairline, no hard border. Scroll and reveal bars
   are ink, pinned bars the brand orange, an instant trigger a solid mark; the
   bar under the playhead and the one under the pointer step up. */
.uipb-motion-dock .uich-mtl-bar {
  --uich-cb-bar: var(--uc-text);
  top: 1px;
  height: 20px;
  border: 0;
  border-radius: 6px;
  background: color-mix(in srgb, var(--uich-cb-bar) 8%, var(--uc-surface-raised));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--uich-cb-bar) 16%, transparent);
  color: var(--uc-text);
}
.uipb-motion-dock .uich-mtl-bar.is-pinned { --uich-cb-bar: var(--uc-brand); background: color-mix(in srgb, var(--uich-cb-bar) 16%, var(--uc-surface-raised)); }
.uipb-motion-dock .uich-mtl-bar:hover { background: color-mix(in srgb, var(--uich-cb-bar) 14%, var(--uc-surface-raised)); }
.uipb-motion-dock .uich-mtl-bar.is-pinned:hover { background: color-mix(in srgb, var(--uich-cb-bar) 24%, var(--uc-surface-raised)); }
.uipb-motion-dock .uich-mtl-bar:is(.is-active, .is-dragging) {
  background: color-mix(in srgb, var(--uich-cb-bar) 18%, var(--uc-surface-raised));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--uich-cb-bar) 45%, transparent);
  color: var(--uc-text-strong);
}
.uipb-motion-dock .uich-mtl-bar.is-pinned:is(.is-active, .is-dragging) { background: color-mix(in srgb, var(--uich-cb-bar) 30%, var(--uc-surface-raised)); }
.uipb-motion-dock .uich-mtl-bar.is-instant,
.uipb-motion-dock .uich-mtl-bar.is-instant:hover {
  min-width: 4px;
  border-radius: 2px;
  background: var(--uc-text-strong);
  box-shadow: none;
}
.uipb-motion-dock .uich-mtl-bar.is-envelope,
.uipb-motion-dock .uich-mtl-bar.is-envelope:hover {
  top: 2px;
  height: 18px;
  border: 1px dashed var(--uc-border-strong);
  background: none;
  box-shadow: none;
}
/* On the right-panel toggle's line, and clear of it: with the right panel
   hidden the toggle sits on the canvas's bottom-right corner, where the
   launcher used to land on top of it. */
.uipb-studio .uich-mtl-launch { bottom: calc(var(--uipb-gutter) + 10px); min-height: 36px; }
body.uipb-right-hidden .uipb-studio .uich-mtl-launch { left: calc(var(--uipb-gutter) + 10px + 36px + var(--uc-space-8, 8px)); }

.uipb-canvas__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  overflow: auto;
  /* The same surface as the top bar, rather than the sunken one it inherited
     from `.uipb-canvas`. The page already reads as a document by having its own
     white fill, a radius and a border — the surround did not need to be a
     darker well to say so too, and two greys meeting at the top bar's edge drew
     a line across the editor that nothing meant. */
  background: var(--uc-surface-base);
}
/* The page itself: a light document sitting on the dark surround. The radius
   and border are the only things that make it read as a page rather than as a
   hole in the app — the iframe's own content is untouched.
 *
 * White, and not a token. Every other value in this file is a --uc-* variable,
 * but this one is the browser's own default page canvas rather than a design
 * decision: a DS surface token here would tint a real WordPress page a shade of
 * the editor's grey, and the point of this canvas is that it is not styled by
 * the app. It only shows while the frame loads; after that the theme paints. */
.uipb-canvas__doc {
  /* Zoom scales this box, not the iframe inside it, so the overlay drawn on
     top goes through the same transform as the page it is tracing. See the
     note in Canvas.jsx. `top center` keeps the page under the toolbar it
     belongs to rather than sliding out from under it. */
  --uipb-zoom: 1;
  transform: scale(var(--uipb-zoom));
  transform-origin: top center;

  position: relative;
  border: 1px solid var(--uc-border-subtle);
  border-radius: var(--uc-radius-lg);
  background: #fff;
  /* Clips the frame's own scrollbar into the corner radius. */
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.uipb-canvas__frame {
  display: block;
  border: 0;
  width: 100%;
  height: 100%;
  transition: width 160ms ease;
}
.uipb-canvas__frame[data-breakpoint='tablet'] { width: 768px; }
.uipb-canvas__frame[data-breakpoint='mobile'] { width: 390px; }
/* A desktop page fitted to a narrower card (Canvas.jsx DESKTOP_MIN): laid out
   from the left so the scaled box lands flush in the card, not centred off its
   left edge. */
.uipb-canvas__stage:has(> .uipb-canvas__doc[data-fit]) { justify-content: flex-start; overflow: hidden; }

.uipb-inspector {
  grid-area: inspector;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--uc-surface-base);
}
.uipb-inspector__header {
  display: flex;
  align-items: center;
  gap: var(--uc-space-8);
  /* 8px down the sides of the header, 12px down the sides of everything under
     it, would read as a header that is indented. One gutter for the column. */
  padding: var(--uc-space-8) var(--uc-space-12);
  border-bottom: 1px solid var(--uc-border-subtle);
}
/* The title takes the slack so the tabs sit where they sit whatever it says,
   and the close button stays pinned to the right edge. */
.uipb-inspector__title {
  flex: 1;
  min-width: 0;
  font-size: var(--uc-text-sm, 13px);
  font-weight: var(--uc-weight-medium);
  color: var(--uc-text-strong);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uipb-inspector__body { flex: 1; min-height: 0; }

/* ---- Globals ------------------------------------------------------------ *
 * The site's tokens, over the whole working area.
 *
 * It takes the canvas column AND the inspector column (`grid-column: 2 / -1`)
 * and stacks on top of the canvas in the same cell rather than replacing it —
 * Studio.jsx renders both, so the iframe keeps its scroll position and its
 * picked element while you are in here.
 *
 * Full bleed, unlike the code view's inset frame. The code view replaces the
 * canvas, so its margin falls on empty ground; this one covers a live canvas,
 * and a 12px gutter of somebody's hero section running down the edge of a token
 * editor is a distraction with nothing to say. One hairline on the left is
 * enough of a seam, since the agent column beside it is the same surface.
 *
 * The rows inside are the style panel's — the panel class is on the container,
 * so the colour swatch and the field pair are literally the same rules — but
 * the shape around them is a card per collection, which is what the extra
 * width is for.
 * ========================================================================== */
.uipb-globals {
  grid-row: 2;
  grid-column: 2 / -1;
  z-index: 6;

  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--uc-border-subtle);
  overflow: hidden;
  background: var(--uc-surface-base);
}

.uipb-globals__head {
  display: flex;
  align-items: center;
  gap: var(--uc-space-10);
  padding: var(--uc-space-10) var(--uc-space-16) var(--uc-space-10) var(--uc-space-12);
  border-bottom: 1px solid var(--uc-border-subtle);
}
.uipb-globals__title {
  font-size: var(--uc-text-sm, 13px);
  font-weight: var(--uc-weight-medium);
  color: var(--uc-text-strong);
}
/* One line, once, at the top. Every value below it is site-wide, and saying so
   per card would be six copies of the same sentence. */
.uipb-globals__hint {
  font-size: var(--uc-text-xs, 12px);
  color: var(--uc-text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uipb-globals__hint code,
.uipb-gl__empty code { font-family: var(--uc-font-mono, ui-monospace, monospace); }

.uipb-globals__body { flex: 1; min-height: 0; }
/* A reading measure, not the full width. Cards are 320px wide and the eye has
   to get from a name on the left of one to the value on the right of it; at
   2000px that is four columns of stretched rows and a lot of travel. */
.uipb-globals__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--uc-space-16) var(--uc-space-16) var(--uc-space-32);
}
/* 380, not 320. The card width is set by the longest thing in it, and the
   longest thing is a name: `--e-global-color-primary` is what Elementor's own
   globals are called, and at 320 it clipped to `e-global-c…` — which is the
   exact failure that moved this surface out of the 300px column. */
.uipb-globals__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  align-items: start;
  gap: var(--uc-space-12);
}

.uipb-panel .uipb-gl__card { background: var(--uc-surface-raised); }
/* The classes card holds CSS bodies, which want the full measure rather than a
   320px column of wrapped declarations. */
.uipb-gl__card--wide { grid-column: 1 / -1; }
.uipb-panel .uipb-gl__cardhead { padding: var(--uc-space-12) var(--uc-space-12) 0; }
.uipb-panel .uipb-gl__cardtitle {
  display: flex;
  align-items: center;
  gap: var(--uc-space-8);
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-medium);
  color: var(--uc-text-strong);
}

.uipb-panel .uipb-gl__rows {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-8);
  padding: var(--uc-space-12);
}

/* The name gets less room than the value on purpose: a name is `brand-dark`
   and a value is `linear-gradient(...)`. The two action columns are reserved
   rather than revealed, so hovering a row does not reflow the fields in it. */
/* The name gets the bigger share here, the opposite of the style panel's fixed
   96px label — because this label is data, and an unreadable one is a token
   you cannot use. The value keeps enough for a swatch and a hex; anything
   longer than that (a gradient, a font stack) is still editable in place and
   still ellipsised, which is the right way round: you know what your own
   gradient is, you are looking up what it is CALLED. */
.uipb-gl__row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--uc-space-6);
}

.uipb-gl__name { display: flex; align-items: center; gap: var(--uc-space-4); min-width: 0; }
.uipb-gl__dash {
  flex: none;
  font-family: var(--uc-font-mono, ui-monospace, monospace);
  font-size: var(--uc-text-xs, 12px);
  color: var(--uc-text-subtle, var(--uc-text-muted));
}
.uipb-panel .uipb-gl__id {
  width: 100%;
  min-width: 0;
  font-family: var(--uc-font-mono, ui-monospace, monospace);
  /* Mono runs wide, so it drops a step against the sans around it — the same
     trade the breadcrumb and the CSS box make. */
  font-size: var(--uc-text-2xs, 11px);
}

/* Quiet until you are on the row. A column of delete buttons at full strength
   reads as the point of the panel, and it is not. */
.uipb-panel .uipb-gl__act {
  opacity: 0;
  color: var(--uc-text-muted);
  transition: opacity var(--uc-dur-fast, 120ms) var(--uc-ease-standard, ease);
}
.uipb-gl__row:hover .uipb-gl__act,
.uipb-gl__row:focus-within .uipb-gl__act,
.uipb-gl__classhead:hover .uipb-gl__act,
.uipb-gl__classhead:focus-within .uipb-gl__act,
.uipb-panel .uipb-gl__act:focus-visible { opacity: 1; }

.uipb-panel .uipb-gl__actions {
  display: flex;
  align-items: center;
  gap: var(--uc-space-4);
  padding: 0 var(--uc-space-8) var(--uc-space-8);
}
.uipb-gl__spacer { flex: 1; }

.uipb-gl__none,
.uipb-gl__empty {
  margin: 0;
  font-size: var(--uc-text-xs, 12px);
  line-height: 1.5;
  color: var(--uc-text-muted);
}
.uipb-gl__empty { padding-bottom: var(--uc-space-16); max-width: 60ch; }

.uipb-panel .uipb-gl__classes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  align-items: start;
  gap: var(--uc-space-12);
  padding: var(--uc-space-12);
}
.uipb-gl__class { display: flex; flex-direction: column; gap: var(--uc-space-4); min-width: 0; }
.uipb-gl__classhead { display: flex; align-items: center; gap: var(--uc-space-6); }
.uipb-gl__classhead .uipb-gl__id { flex: 1; }
/* A class body is CSS and is read as CSS: mono, small, and left to wrap. */
.uipb-panel .uipb-gl__css {
  width: 100%;
  font-family: var(--uc-font-mono, ui-monospace, monospace);
  font-size: var(--uc-text-2xs, 11px);
  line-height: 1.5;
  resize: vertical;
}

.uipb-gl__status {
  font-size: var(--uc-text-2xs, 10px);
  color: var(--uc-text-muted);
  white-space: nowrap;
}

.uipb-gl__foot {
  display: flex;
  align-items: center;
  gap: var(--uc-space-6);
  padding-top: var(--uc-space-16);
}

/* The canvas overlay: outlines and insert points live above the iframe, never inside it. */
.uipb-overlay { position: absolute; inset: 0; pointer-events: none; }
/* Tablet / mobile: the frame is a fixed-width column centred in the doc box
   (margin: 0 auto), and the canvas reports rects from inside it. The overlay
   takes the same width and the same centring — left/right 0 with auto
   margins is margin: 0 auto for an absolute box, overflow included — so every
   outline, rail and insert point lands on the page, not one gutter to its
   left. */
.uipb-canvas__doc:has(> .uipb-canvas__frame[data-breakpoint='tablet']) > .uipb-overlay,
.uipb-canvas__doc:has(> .uipb-canvas__frame[data-breakpoint='mobile']) > .uipb-overlay { right: 0; left: 0; margin: 0 auto; }
.uipb-canvas__doc:has(> .uipb-canvas__frame[data-breakpoint='tablet']) > .uipb-overlay { width: 768px; }
.uipb-canvas__doc:has(> .uipb-canvas__frame[data-breakpoint='mobile']) > .uipb-overlay { width: 390px; }
.uipb-overlay > * { pointer-events: auto; }

/* =============================================================================
   Component surfaces.
 *
 * These exist so the components stop carrying `style={{ … }}`. Inline styles
 * were quick, and the cost showed up three ways: a spacing value repeated in
 * nine files drifts, none of it can be themed by the token change that made
 * the editor dark, and a component whose markup is half layout is harder to
 * read than one that names a class.
 *
 * Every value here is a --uc-* token.
 * ========================================================================== */

/* ---- Agent column ------------------------------------------------------- */
.uipb-agent__head { display: flex; justify-content: flex-end; padding: var(--uc-space-8) var(--uc-space-8) 0; }
.uipb-agent__intro { padding: var(--uc-space-16); color: var(--uc-text-muted); }

.uipb-msgs { display: flex; flex-direction: column; gap: var(--uc-space-12); padding: var(--uc-space-12); }
.uipb-msg { font-size: var(--uc-text-sm, 13px); line-height: 1.5; }
/* The person's own turn is right-aligned and on a surface; the assistant's is
   plain text. One bubble, not two — a transcript where both sides are boxed
   reads as a chat app, and this one is mostly the assistant explaining what it
   just did to the page. */
.uipb-msg[data-role='user'] {
  align-self: flex-end;
  max-width: 85%;
  padding: var(--uc-space-8) var(--uc-space-12);
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-raised);
  color: var(--uc-text-strong);
}

/* ---- Proposal ----------------------------------------------------------- */
.uipb-proposal { margin: var(--uc-space-12); }
.uipb-proposal__list { display: flex; flex-direction: column; gap: var(--uc-space-8); margin: 0; padding: 0; list-style: none; }
.uipb-proposal__row { display: flex; align-items: baseline; gap: var(--uc-space-8); cursor: default; }
.uipb-proposal__row code { font-size: var(--uc-text-xs, 12px); color: var(--uc-text-muted); }

/* ---- Canvas overlay ----------------------------------------------------- */
/* The section rail sits on the page itself, so it carries its own dark surface
   — the element rail's pill below. Bare, its muted icons floated straight on
   whatever the section painted, and on a light section they all but vanished. */
.uipb-sec-rail {
  position: absolute;
  top: var(--uc-space-4);
  left: var(--uc-space-4);
  display: flex;
  gap: var(--uc-space-2);
  padding: var(--uc-space-2);
  border: 1px solid var(--uc-border-subtle);
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-raised);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}
.uipb-sec-drag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--uc-radius-sm);
  color: var(--uc-text-muted); cursor: grab; -webkit-user-select: none; -moz-user-select: none; user-select: none;
  touch-action: none; /* or the browser scrolls instead of dragging */
}
.uipb-sec-drag:hover { color: var(--uc-text-strong); background: var(--uc-surface-control); }
/* The picked element's rail (ElementRail): the section rail's buttons, pinned
   under the element's bottom-right corner — the typography bar owns the space
   above it. `translateX(-100%)` right-aligns it to the element's edge. */
.uipb-el-rail {
  position: absolute;
  z-index: 3;
  display: flex;
  gap: var(--uc-space-2);
  padding: var(--uc-space-2);
  transform: translateX(100%);
  border: 1px solid var(--uc-border-subtle);
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-raised);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}
.uipb-el-rail[data-dragging='true'] { opacity: 0.85; }
.uipb-el-rail .uipb-sec-drag { width: 24px; height: 24px; }
/* Where a dragged element lands. */
.uipb-el-dropline {
  position: absolute;
  z-index: 3;
  height: 2px;
  background: var(--uc-brand-fg);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);
}
/* The seam between two sections.
 *
 * The strip stays where it is and stays hoverable; the BUTTON is what fades.
 * A `+` at every seam, permanently, is the editor talking over the page — at
 * rest the canvas should look like the page and nothing else, which is the
 * whole point of building on the real thing rather than a diagram of it.
 *
 * Three ways to bring it back, and all three are needed:
 *   :hover             — the pointer is on the seam itself
 *   [data-state] &     — the pointer is anywhere in the section it belongs to,
 *                        so the seams light up as you approach rather than
 *                        only once you are exactly on one
 *   :focus-within      — reached by keyboard, where there is no pointer to
 *                        reveal it and an invisible control would be a
 *                        control that does not exist
 *
 * `pointer-events` is NOT part of the hiding. The button is clickable whether
 * or not it has faded in, so a click that lands during the transition still
 * works — and the strip's hit area is unchanged from when the `+` was always
 * drawn, so nothing new eats a click on the page. */
.uipb-insert { position: absolute; right: 0; left: 0; bottom: -12px; height: 24px; display: flex; justify-content: center; align-items: center; pointer-events: auto; }
.uipb-insert > * { opacity: 0; transition: opacity var(--uc-dur-fast) var(--uc-ease-standard); }
.uipb-insert:hover > *,
.uipb-insert:focus-within > *,
[data-state='hover'] > .uipb-insert > *,
[data-state='selected'] > .uipb-insert > * { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .uipb-insert > * { transition: none; } }
.uipb-dropline { position: absolute; right: 0; left: 0; height: 2px; background: var(--uc-brand-fg); pointer-events: none; }

/* The picked element and the one under the pointer.
   An inset box-shadow rather than an outline: an outline is drawn OUTSIDE the
   box, so on an element flush against its section's edge it lands a pixel over
   the neighbour and reads as if the wrong thing is selected. Never a click
   target — the canvas owns picking, and a transparent div over the element
   would eat the click that changes it. */
.uipb-elbox { position: absolute; pointer-events: none; }
.uipb-elbox[data-state='hover'] { box-shadow: inset 0 0 0 1px var(--uc-brand-fg); opacity: 0.55; }
.uipb-elbox[data-state='selected'] { box-shadow: inset 0 0 0 2px var(--uc-brand-fg); }

/* ---- Library ------------------------------------------------------------ */
.uipb-lib { padding: var(--uc-space-12); }
.uipb-lib__filters { margin-bottom: var(--uc-space-12); }
.uipb-lib__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--uc-space-12); }
.uipb-lib__card { padding: 0; overflow: hidden; cursor: pointer; text-align: right; }
.uipb-lib__shot { position: relative; height: 150px; overflow: hidden; background: #fff; }
/* The frame is exactly the window the card shows (150px / 0.225), so the
   preview can centre a short section in it (LibraryTab previewDoc). */
.uipb-lib__shot iframe { width: 1280px; height: 667px; border: 0; transform: scale(0.225); transform-origin: top right; pointer-events: none; }
/* A transparent shield over the frame. `pointer-events: none` on the iframe is
   not enough on its own: the frame is CSS-transformed, and a press landing on a
   scaled frame owner cannot be attributed to a frame, so it is dropped rather
   than passed to the card underneath. */
.uipb-lib__shield { position: absolute; inset: 0; }
.uipb-lib__dynamic { position: absolute; top: 8px; right: 8px; z-index: 1; pointer-events: none; }
.uipb-lib__meta { display: flex; align-items: center; gap: var(--uc-space-8); padding: var(--uc-space-8) var(--uc-space-12); }
.uipb-lib__name { flex: 1; font-size: var(--uc-text-sm, 13px); font-weight: 600; }

/* ---- Data --------------------------------------------------------------- */
.uipb-data__row { display: flex; align-items: center; gap: var(--uc-space-8); width: 100%; }
.uipb-data__count { margin-right: auto; }
.uipb-data__list { display: flex; flex-direction: column; gap: var(--uc-space-8); margin: 0; padding: 0; list-style: none; }
.uipb-data__binding {
  display: flex; align-items: baseline; gap: var(--uc-space-8);
  width: 100%; padding: var(--uc-space-4) var(--uc-space-8);
  border: 0; border-radius: var(--uc-radius-sm);
  background: none; color: inherit; font: inherit; text-align: right; cursor: pointer;
}
.uipb-data__binding:hover { background: var(--uc-surface-control); }
.uipb-data__binding code { flex: 1; font-size: var(--uc-text-xs, 12px); word-break: break-all; }
.uipb-data__detail { color: var(--uc-text-subtle); }
.uipb-data__empty { padding: var(--uc-space-12); }

/* ---- History ------------------------------------------------------------ */
/* A floating card under the page menu, positioned and dismissed by the panel
   itself — see HistoryPanel.jsx for why it is not a Popover. */
.uipb-history {
	position: fixed;
	top: 44px;
	right: 60px;
	z-index: var(--uc-z-dropdown, 1250);
	display: flex;
	flex-direction: column;
	width: 360px;
	max-width: calc(100vw - 32px);
	border: 1px solid var(--uc-border-subtle);
	border-radius: var(--uc-radius-lg);
	background: var(--uc-surface-raised);
	box-shadow: var(--uc-shadow-4);
	color: var(--uc-text);
}
.uipb-history__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--uc-space-8);
	padding: var(--uc-space-8) var(--uc-space-12) var(--uc-space-8) var(--uc-space-8);
	border-bottom: 1px solid var(--uc-border-subtle);
}
.uipb-history__title {
	color: var(--uc-text-strong);
	font-size: var(--uc-text-sm, 13px);
	font-weight: var(--uc-weight-medium, 500);
}
.uipb-history__foot {
	padding: var(--uc-space-4) var(--uc-space-8);
	border-top: 1px solid var(--uc-border-subtle);
}
.uipb-history__row { display: flex; align-items: center; gap: var(--uc-space-8); padding: var(--uc-space-4) var(--uc-space-8); }

/* History in the sidebar (Sidebar.jsx HistoryPane): the same lists, laid in
   the card instead of floating over the page. */
.uipb-history.uipb-history--inline {
	position: static;
	width: auto;
	max-width: none;
	margin-top: var(--uc-space-12);
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}
.uipb-history--inline .uipb-history__foot { border-top: 0; padding: var(--uc-space-8) 0 0; }
/* The Composer's edit timeline, portalled into the pane: its rows on the
   builder's tokens (its own fall back to a pink accent outside its panel). */
.uipb-side__history .layers-history-row {
	padding: 7px 8px;
	border-radius: var(--uc-radius-md);
	color: var(--uc-text-strong);
}
.uipb-side__history .layers-history-row:hover { background: var(--uc-surface-hover); }
.uipb-side__history .layers-history-row.is-current { background: var(--uc-surface-control); }
.uipb-side__history .layers-history-row .lh-dot { background: var(--uc-text-subtle); }
.uipb-side__history .layers-history-row .lh-dot.is-current { background: var(--uc-brand); }
.uipb-side__history .layers-history-row .lh-meta { color: var(--uc-text-muted); }
.uipb-side__history .layers-history-row .lh-scope { background: var(--uc-surface-control); color: var(--uc-text); }
.uipb-side__history .layers-empty { color: var(--uc-text-muted); font-size: var(--uc-text-xs, 12px); }
.uipb-history__label { flex: 1; font-size: var(--uc-text-sm, 13px); }
/* The two layers are different KINDS of history, not two lists of the same
   thing, so each gets a heading rather than a separator. */
.uipb-history__heading {
	margin: var(--uc-space-8) 0 var(--uc-space-4);
	padding: 0 var(--uc-space-8);
	color: var(--uc-text-muted);
	font-size: var(--uc-text-xs, 12px);
	font-weight: var(--uc-weight-medium, 500);
	text-transform: uppercase;
	letter-spacing: var(--uc-tracking-wide, 0.02em);
}
.uipb-history__heading:first-child { margin-top: 0; }
.uipb-history__error {
	margin: 0;
	padding: var(--uc-space-8);
	color: var(--uc-danger-fg);
	font-size: var(--uc-text-sm, 13px);
}

/* The sidebar's History (Sidebar.jsx HistoryPane), on the panels' compact
   scale: sentence-case group labels, one 28px line per step, restore point
   and version, the newest marked "Now". */
.uipb-side__history .uipb-history__heading {
	margin: var(--uc-space-12) 0 2px;
	text-transform: none;
	letter-spacing: 0;
	font-size: 11.5px;
}
.uipb-side__history .uipb-history__heading:first-child { margin-top: 0; }
.uipb-side__history .uipb-history.uipb-history--inline { margin-top: 0; }
.uipb-history__empty,
.uipb-side__history .lh-compact-empty {
	margin: 0;
	padding: 4px 8px;
	color: var(--uc-text-muted);
	font-size: var(--uc-text-xs, 12px);
	text-align: right;
}
.uipb-history__step,
.uipb-history__version,
.uipb-side__history .lh-compact-row {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	min-height: 28px;
	padding: 0 8px;
	border: 0;
	border-radius: var(--uc-radius-md);
	background: none;
	color: var(--uc-text-strong);
	font: inherit;
	font-size: 13px;
	text-align: right;
}
.uipb-side__history .lh-compact-row { cursor: pointer; }
.uipb-side__history .lh-compact-row:hover { background: var(--uc-surface-hover); }
.uipb-side__history .lh-compact-row:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.uipb-history__step-label,
.uipb-side__history .lh-compact-label { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uipb-history__step[data-current] .uipb-history__step-label,
.uipb-side__history .lh-compact-row.is-current .lh-compact-label { font-weight: var(--uc-weight-medium, 500); }
.uipb-side__history .lh-compact-scope { flex: none; color: var(--uc-text-muted); font-size: 11.5px; }
.uipb-side__history .lh-compact-scope::before { content: '· '; }
.uipb-history__time,
.uipb-side__history .lh-compact-time { flex: none; margin-right: auto; color: var(--uc-text-muted); font-size: 11.5px; }
.uipb-history__now,
.uipb-side__history .lh-compact-now {
	flex: none;
	margin-right: auto;
	padding: 1px 6px;
	border-radius: var(--uc-radius-pill);
	background: var(--uc-surface-control);
	box-shadow: inset 0 0 0 1px var(--uc-border);
	color: var(--uc-text-strong);
	font-size: 11px;
	font-weight: var(--uc-weight-medium, 500);
}
.uipb-side__history .lh-compact-opened { margin: 4px 0 0; padding: 0 8px; color: var(--uc-text-muted); font-size: 11.5px; }
/* Edits: one timeline, grouped by time, repeats folded into a ×N row. */
.uipb-history__group + .uipb-history__group { margin-top: 6px; }
.uipb-history__when { margin: 0; padding: 6px 8px 2px; color: var(--uc-text-muted); font-size: 11px; }
.uipb-history__step { cursor: pointer; }
.uipb-history__step:hover,
.uipb-history__version:hover { background: var(--uc-surface-hover); }
.uipb-history__step:focus-visible,
.uipb-history__version:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.uipb-history__dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.uipb-history__step[data-current] .uipb-history__dot { background: var(--uc-accent, var(--uc-text-strong)); }
.uipb-history__step[data-current] { background: var(--uc-surface-hover); }
.uipb-history__step[data-after] { color: var(--uc-text-muted); }
.uipb-history__count {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin-right: auto;
	padding: 0 6px;
	border-radius: var(--uc-radius-pill);
	background: var(--uc-surface-control);
	color: var(--uc-text-muted);
	font-size: 11px;
	line-height: 18px;
	cursor: pointer;
}
.uipb-history__count:hover { color: var(--uc-text-strong); }
.uipb-history__chev { display: inline-block; transition: transform .15s; }
.uipb-history__chev[data-open] { transform: rotate(-90deg); }
.uipb-history__sub { padding-right: 14px; }
.uipb-history__restore {
	position: sticky;
	bottom: 0;
	margin-top: 8px;
	padding: 10px 0 2px;
	border-top: 1px solid var(--uc-border);
	background: var(--uc-surface-panel, var(--uc-surface));
}
.uipb-history__restore > * { width: 100%; }
/* Versions: two lines each, pick one, restore from the bottom. */
.uipb-history__version { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 40px; padding: 4px 8px; cursor: pointer; }
.uipb-history__version[data-current] { background: var(--uc-surface-hover); }
.uipb-history__version-when { font-weight: var(--uc-weight-medium, 500); }
.uipb-history__version-meta { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--uc-text-muted); font-size: 11.5px; }

/* ---- Forms shared by the add-section tabs -------------------------------- */
.uipb-form { display: flex; flex-direction: column; gap: var(--uc-space-8); padding: var(--uc-space-8); }

/* ---- Empty page --------------------------------------------------------- */
/* Over the canvas, not in place of it: the layer lets the pointer through to
   the page, and only the card takes clicks. */
.uipb-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--uc-space-16, 16px);
  pointer-events: none;
}
.uipb-empty__card { position: relative; max-width: 480px; width: 100%; pointer-events: auto; box-shadow: var(--uc-shadow-lg, 0 12px 32px rgba(0, 0, 0, 0.28)); }
.uipb-empty__close { position: absolute; top: var(--uc-space-8, 8px); left: var(--uc-space-8, 8px); }
.uipb-empty__starters { display: flex; flex-direction: column; gap: var(--uc-space-8); }

/* ---- Small shared bits -------------------------------------------------- */
.uipb-spacer { flex: 1; }
/* Reserves a check's width on menu rows that do not have one, so the labels
   stop jumping sideways as the selection moves. */
.uipb-check-gap { display: inline-block; width: 14px; }
.uipb-scroll-fill { height: 100%; }

/* =============================================================================
   Style panel.
 *
 * Density taken from Stacki: one line per property, a label column and a
 * control column, no card per field. A style panel is a reference table you
 * scan rather than a form you fill in — you find a property by its position,
 * so a whole section has to fit without scrolling, which means short rows and
 * no decorative spacing between them.
 *
 * Three scales, and they have to stay apart or the panel reads as noise:
 *
 *   4px   inside one control — a number and its unit, a chip and the next chip
 *   8px   between controls that belong to the same row or the same idea
 *   12px  the panel's own gutter, and between one block and the next
 *
 * Nothing here invents a size. The DS spacing scale is named in PIXELS —
 * `--uc-space-12` IS 12px, not the twelfth step of a 4pt ramp — which is the
 * trap this file fell into once already: every gap was written as `space-2`
 * meaning 8 and rendering 2, so the whole shell came out at a quarter of its
 * intended spacing while the DS Accordion sat at its correct 16 and towered
 * over it.
 * ========================================================================== */

.uipb-panel {
  /* The three numbers the whole panel is built from. Named here so a row, a
     divider, the target block and the CSS box cannot drift apart — they all
     have to agree on one left edge and one right edge or the column stops
     reading as a column. */
  --uc-panel-gutter: var(--uc-space-12);
  --uc-panel-label-w: 96px;
  --uc-panel-unit-w: 64px;

  display: flex; flex-direction: column; min-height: 0; height: 100%;
}
.uipb-panel__empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--uc-space-12);
  padding: var(--uc-space-12);
}
.uipb-panel__body { flex: 1; min-height: 0; }

/* ---- Target block (pinned above the sections) ---------------------------
 * Which element you are editing is the one thing you need while scrolling a
 * long list of properties, so it does not scroll with them. It sits on the
 * raised surface and owns a border: pinned chrome that reads as part of the
 * header rather than as the first of the sections.
 * ------------------------------------------------------------------------ */
.uipb-panel__id {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-8);
  padding: var(--uc-space-10) var(--uc-panel-gutter) var(--uc-space-12);
  background: var(--uc-surface-raised);
  border-bottom: 1px solid var(--uc-border-subtle);
}

/* Scoped one class deeper than they look like they need to be, here and in
   several rules below. This panel renders inside `.uich-tw`, the Tailwind
   island the core's surfaces require, and its preflight carries element resets
   —  `.uich-tw button { font: inherit; margin: 0 }`, `.uich-tw p { padding: 0 }`
   — at (0,1,1). A bare `.uipb-field__label` is (0,1,0) and loses to them, which
   is how the panel ended up with a label whose negative margin and line height
   were silently dropped on the <button> variant and kept on the <label> one.
 *
 * The trail up out of a nested element. Tags only, no classes: at 10px a
   breadcrumb of `div.card__body` wraps to three lines and stops being a
   glance. Ancestors only — the tag line under it names where you are. */
/* Row one: the element path, the badges that qualify it, and the state select.
   One line, because four lines of metadata above the first control was about a
   third of the panel — see the note on ElementId. */
.uipb-panel__where {
  display: flex;
  align-items: center;
  gap: var(--uc-space-6);
  min-height: 24px;
}

.uipb-panel__crumbs {
  display: flex;
  align-items: center;
  gap: var(--uc-space-2);
  flex: 1;
  min-width: 0;
  font-family: var(--uc-font-mono, ui-monospace, monospace);
  font-size: var(--uc-text-2xs, 10px);
  line-height: 1.6;
  white-space: nowrap;
}
/* Ancestors give way, the current element does not. A deep path should lose
   its oldest crumbs, not the element you are standing on — which is what
   clipping the whole trail from the right would do. */
.uipb-panel__ancestors {
  display: flex;
  align-items: center;
  gap: var(--uc-space-2);
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}
.uipb-panel .uipb-crumb {
  border: 0; background: none; padding: 0 var(--uc-space-2);
  border-radius: var(--uc-radius-xs);
  font: inherit; color: var(--uc-text-subtle, var(--uc-text-muted));
  cursor: pointer;
}
.uipb-panel .uipb-crumb:hover { color: var(--uc-text-strong); background: var(--uc-surface-control); }
/* The element you are on: the end of the path and the only part that is not a
   link, so it carries the weight and takes no hover. */
.uipb-panel .uipb-crumb.is-current {
  flex: 0 0 auto;
  color: var(--uc-text-strong);
  cursor: default;
}
.uipb-panel .uipb-crumb.is-current:hover { background: none; color: var(--uc-text-strong); }
/* The separator is drawn rather than typed, so it cannot be selected with the
   text or read out as a word by a screen reader. Two rules, because the
   current crumb is a sibling of the ancestor WRAPPER rather than of a crumb —
   and `:not(:empty)` keeps the leading separator off an element with no
   ancestors, where the path is one word. */
.uipb-panel .uipb-crumb + .uipb-crumb::before,
.uipb-panel .uipb-panel__ancestors:not(:empty) + .uipb-crumb::before {
  content: '\203A'; margin-left: var(--uc-space-4); opacity: 0.55;
}

/* The chips and the field that adds one share a row, because adding a class is
   the same act as reading them — not a separate control that happens to be
   nearby. The input flexes so the chips wrap first and it keeps a usable width. */
.uipb-panel__classes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--uc-space-4);
}
.uipb-panel__addclass { flex: 1 1 96px; min-width: 88px; }

/* A class chip — the widget panel's scope chip: a dot, the name in mono, and a
   × to take the class off the element. The one being edited is lit. Two
   buttons in one pill, so picking and removing are separate targets. */
.uipb-chip {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  height: 22px;
  border-radius: var(--uc-radius-sm);
  background: var(--uc-surface-control);
  color: var(--uc-text-muted);
  font-family: var(--uc-font-mono);
  font-size: var(--uc-text-2xs, 10px);
}
.uipb-chip[data-active='true'] {
  background: var(--uc-text-strong);
  color: var(--uc-surface-base);
}
.uipb-chip button {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.uipb-chip__name { gap: var(--uc-space-4); min-width: 0; padding: 0 var(--uc-space-6) 0 var(--uc-space-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uipb-chip__dot { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: currentColor; opacity: 0.6; }
.uipb-chip__x { padding: 0 var(--uc-space-4); opacity: 0.55; }
.uipb-chip__x:hover { opacity: 1; }
.uipb-chip:not([data-active='true']) .uipb-chip__name:hover { color: var(--uc-text-strong); }
/* A global class (from the site's Globals): the globe marks it, as the widget
   panel's chips mark theirs. */
.uipb-chip[data-global='true'] .uipb-chip__name svg { flex: 0 0 auto; opacity: 0.8; }

/* "This is a global class" — one quiet line under the class row. */
.uipb-panel__global-note {
  display: flex;
  gap: var(--uc-space-6);
  align-items: flex-start;
  margin: 0;
  padding: var(--uc-space-6) var(--uc-panel-gutter, var(--uc-space-12));
  color: var(--uc-text-muted);
  font-size: var(--uc-text-2xs, 10px);
  line-height: 1.45;
}
.uipb-panel__global-note svg { flex: 0 0 auto; margin-top: 1px; }
.uipb-panel__global-note code { font-family: var(--uc-font-mono); color: var(--uc-text); }
.uipb-panel__global-note button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--uc-text-strong);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* The state select, now inline at the end of the path row rather than a
   full-width control under an uppercase STATE label. Fixed width so the path
   beside it has a stable edge to clip against, and narrow because the longest
   value it shows is `Default`. */
.uipb-panel__state { flex: 0 0 auto; width: 92px; }
.uipb-panel__state > [data-slot='select-trigger'],
.uipb-panel__state > button { width: 100%; min-width: 0; }

/* ---- Layers --------------------------------------------------------------
 * The element tree. Lives in the floating Layers window (LayersFloat.jsx).
 * ------------------------------------------------------------------------ */
/* The tree itself. Capped and scrolling: a deep section would otherwise push
   every style control off the screen, which is the opposite of what a chooser
   above them is for. */
.uipb-layers {
  max-height: 220px;
  overflow: auto;
  padding: 0 var(--uc-space-6) var(--uc-space-8);
}
.uipb-layers__none {
  margin: 0;
  padding: 0 var(--uc-panel-gutter) var(--uc-space-12);
  color: var(--uc-text-muted);
  font-size: var(--uc-text-xs, 11px);
}

.uipb-layer {
  /* `--depth` comes from the entry, so indentation is data rather than a rule
     per level. */
  /* Relume's measure: 34px rows, 14px regular text, 20px a level. */
  --indent: calc(var(--depth, 0) * 20px);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 calc(6px + var(--indent)) 0 4px;
  border-radius: var(--uc-radius-sm);
  color: var(--uc-text-strong);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
/* Tints of the text colour, so they read on the light and the dark panel alike. */
.uipb-layer:hover { background: color-mix(in srgb, var(--uc-text-strong) 5%, transparent); }
/* The selected element's section, shaded; the element itself, tinted. */
.uipb-layer[data-onpath] { background: color-mix(in srgb, var(--uc-text-strong) 7%, transparent); }
.uipb-layer[data-state='selected'] { background: color-mix(in srgb, var(--uc-brand) 16%, transparent); }
.uipb-layer[data-dragging] { opacity: 0.4; }
.uipb-layer__icon { flex: none; display: inline-flex; color: var(--uc-text-strong); }
/* Hidden (the HTML `hidden` attribute): dimmed, and its eye stays shown. */
.uipb-layer[data-hidden] .uipb-layer__icon,
.uipb-layer[data-hidden] .uipb-layer__name { opacity: 0.45; }

/* Where the drop lands. A line for a sibling, a ring for going inside —
   different questions, so they must not look like the same answer. */
.uipb-layer[data-drop='before']::after,
.uipb-layer[data-drop='after']::after {
  content: '';
  position: absolute;
  right: var(--indent);
  left: 0;
  height: 2px;
  background: var(--uc-brand-fg);
  pointer-events: none;
}
.uipb-layer[data-drop='before']::after { top: -1px; }
.uipb-layer[data-drop='after']::after { bottom: -1px; }
.uipb-layer[data-drop='inside'] { box-shadow: inset 0 0 0 1px var(--uc-brand-fg); }

/* Scoped to the tree itself, not to the panel it sits in: the sidebar's
   Layers draws the same tree, and there the caret fell back to wp-admin's
   button look (a grey filled box). */
.uipb-layers .uipb-layer__caret {
  flex: 0 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--uc-radius-sm);
  background: none;
  box-shadow: none;
  color: var(--uc-text-muted);
  cursor: pointer;
}
.uipb-layers button.uipb-layer__caret:hover { background: var(--uc-surface-control); color: var(--uc-text-strong); }
.uipb-layers button.uipb-layer__caret:focus-visible { outline: 2px solid var(--uc-ring, currentColor); outline-offset: 0; }
.uipb-layers .uipb-layer__caret svg {
  width: 12px;
  height: 12px;
  transform: rotate(90deg);
  transition: transform var(--uc-dur-fast) var(--uc-ease-standard);
}
.uipb-layers .uipb-layer__caret[data-open] svg { transform: none; }

/* The element's tag after its name (LayersTree): `article`, `nav`, `div`. */
.uipb-layer__tag {
  margin-right: 6px;
  font-family: var(--uc-font-mono, ui-monospace, monospace);
  font-size: var(--uc-text-2xs, 10px);
  font-weight: 400;
  color: var(--uc-text-muted);
}
.uipb-layer__name {
  flex: 1;
  min-width: 0;
  font-size: var(--uc-text-base, 14px);
  font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uipb-layer__preview { color: var(--uc-text-muted); }
/* A loop (∞) or dynamic data, after the name: the same purple the canvas
   rings them in (composer-box-overlay.js, KIND_INK). */
.uipb-layer__mark { display: inline-flex; vertical-align: -2px; margin-right: 5px; color: #8B5CF6; }
/* Hidden on some devices (Hide on): an eye-off plus each device, muted, so it
   reads as a state and not as the purple of loop / dynamic data. */
.uipb-layer__mark[data-kind='hide-on'] { gap: 2px; color: var(--uc-text-muted); }
/* Hidden on the device the canvas shows: dimmed like the eye's hide. */
.uipb-layer[data-device-hidden] .uipb-layer__icon,
.uipb-layer[data-device-hidden] .uipb-layer__name { opacity: 0.45; }
/* Rename in place: the field takes the name's slot. */
.uipb-layer__rename {
  flex: 1;
  min-width: 0;
  height: 20px;
  padding: 0 4px;
  border: 1px solid var(--uc-border-focus, var(--uc-border));
  border-radius: var(--uc-radius-sm);
  background: var(--uc-surface-control);
  color: var(--uc-text-strong);
  font: inherit;
  font-size: var(--uc-text-xs, 11px);
  outline: none;
}

/* The row actions appear on approach. Always-on, they are two more things to
   read on every row of a list whose job is to be scanned. */
.uipb-layer__actions {
  flex: 0 0 auto;
  display: flex;
  gap: 0;
  opacity: 0;
  transition: opacity var(--uc-dur-fast) var(--uc-ease-standard);
}
.uipb-layer:hover .uipb-layer__actions,
.uipb-layer:focus-within .uipb-layer__actions,
.uipb-layer__actions:has([data-state='open']) { opacity: 1; }
/* Out of the row's flow until shown, so a long name keeps the full width. */
.uipb-layer:not(:hover):not(:focus-within):not([data-hidden]) .uipb-layer__actions:not(:has([data-state='open'])) { position: absolute; left: 4px; pointer-events: none; }
.uipb-layers .uipb-layer__actions button { width: 24px; height: 24px; min-width: 24px; }
/* A hidden layer shows its crossed-out eye without a hover, so it can be found again. */
.uipb-layer[data-hidden] .uipb-layer__actions { opacity: 1; }
/* Not while its ⋯ menu is open: moving onto the menu ends the row's hover, and
   a trigger gone to display: none left the menu nowhere to anchor, so it
   jumped to the top-left corner. */
.uipb-layer[data-hidden]:not(:hover):not(:focus-within):not(:has([data-state='open'])) .uipb-layer__actions > :not(.uipb-layer__eye) { display: none; }

/* ---- Sections ------------------------------------------------------------
 * The DS accordion is sized for a page: 16px of padding and 14px semibold
 * type, which is a 52px row. Ten of those is the whole panel before a single
 * property shows. Framer's section title is 12px at weight 550 sitting 16px in
 * from the panel edge, and the rule between sections is inset by the same
 * gutter rather than running edge to edge — so the panel reads as a stack of
 * grouped rows rather than as a list of bars.
 * ------------------------------------------------------------------------ */
/* The rule between sections is inset by the gutter, the way Framer's is, not
   run edge to edge the way the DS accordion draws it. A full-bleed line cuts
   the panel into bars; an inset one reads as a gap between two groups of rows
   that still belong to the same column. */
.uipb-panel .uipb-sec { border-bottom: 0; position: relative; }
.uipb-panel .uipb-sec + .uipb-sec::before {
  content: '';
  position: absolute;
  top: 0;
  right: var(--uc-panel-gutter);
  left: var(--uc-panel-gutter);
  height: 1px;
  background: var(--uc-border-subtle);
}

.uipb-panel .uipb-sec__trigger {
  gap: var(--uc-space-8);
  padding: var(--uc-space-14) var(--uc-panel-gutter);
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-medium);
  color: var(--uc-text-strong);
  transition: background var(--uc-dur-fast, 120ms) var(--uc-ease-standard, ease);
}
.uipb-panel .uipb-sec__trigger:hover { background: var(--uc-surface-control); }
/* Open, the title keeps its weight but the chevron is the only thing that
   moves. A header that also changes colour on open reads as selected. */
.uipb-panel .uipb-sec__trigger[data-state='open'] { padding-bottom: var(--uc-space-4); }

.uipb-sec__name { display: inline-flex; align-items: center; gap: var(--uc-space-6); }
/* The dot marks a section that holds a value. On a page you did not write it
   is the only way to find where the styling lives without opening all ten. */
.uipb-sec__dot {
  width: 5px; height: 5px; flex: none;
  border-radius: var(--uc-radius-pill);
  background: var(--uc-brand-fg);
}

/* The DS pads its content for a page too. The rows bring their own gutter. */
.uipb-panel .uipb-sec__content > * { padding: 0; }

/* ---- Rows ---------------------------------------------------------------- *
 * Framer's row model, measured off its own Style panel and scaled to ours:
 *
 *              Framer (260px)      here (340px)
 *   gutter     11 / 10             12 / 12
 *   label x    31  (20 in)         26  (14 in)
 *   control    x=115, w=135        x=132, w=196
 *   height     30                  28  (--uc-control-h-sm; the DS has no 30)
 *   row pitch  40 (30 + 10)        38 (28 + 10)
 *   radius     8                   8   (--uc-radius-md)
 *   fill       #f3f3f3 on #fff     --uc-surface-control on --uc-surface-base
 *
 * One property per row, always. The label is a fixed column and the control
 * fills the rest, so every control in the panel shares one left edge and one
 * right edge. The previous grid honoured the schema's `w: '1/2'` hints — which
 * describe a 900px desktop panel — and the result was a label above its control
 * on narrow fields and beside it on wide ones, with no two rows aligned.
 *
 * The label is indented past the section title on purpose: it is the one cue
 * that says these rows belong to the title above them, now that the section no
 * longer draws a box around itself.
 * ========================================================================== */
.uipb-fields {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-10);
  padding: var(--uc-space-10) var(--uc-panel-gutter) var(--uc-space-16);
}

.uipb-field {
  display: flex;
  align-items: center;
  gap: var(--uc-space-10);
  min-width: 0;
}

/* Upstream's own sub-grouping: Flex Container, Gaps, Flex Item, Grid. */
.uipb-fields__group {
  margin-top: var(--uc-space-6);
  font-size: var(--uc-text-2xs, 10px);
  font-weight: var(--uc-weight-medium);
  letter-spacing: var(--uc-tracking-wide);
  text-transform: uppercase;
  color: var(--uc-text-subtle, var(--uc-text-muted));
}

/* Framer's `+`, in words. A section opens on the properties that matter and
   says how many it is holding back, so the count itself tells you whether
   there is anything worth opening. */
.uipb-panel .uipb-fields__more {
  align-self: flex-start;
  /* On the gutter, like every other row. It carried `margin-left: 14px`, which
     lined it up with nothing — not the label column (96px), not the gutter. */
  margin-right: 0;
  padding: var(--uc-space-4) var(--uc-space-8);
  border: 0;
  border-radius: var(--uc-radius-sm);
  background: none;
  font-family: inherit;
  font-size: var(--uc-text-xs, 12px);
  line-height: 1.4;
  color: var(--uc-text-muted);
  cursor: pointer;
}
.uipb-panel .uipb-fields__more:hover { background: var(--uc-surface-control); color: var(--uc-text-strong); }

.uipb-panel .uipb-fields__none {
  /* Was indented 14px past the gutter, for the same non-reason as `__more`. */
  padding: 0 0 var(--uc-space-4);
  font-size: var(--uc-text-xs, 12px);
  color: var(--uc-text-muted);
}

.uipb-panel .uipb-field__label {
  display: flex;
  align-items: center;
  gap: var(--uc-space-4, 4px);
  flex: 0 0 var(--uc-panel-label-w);
  /* No extra indent. This carried `margin-inline-start: 14px`, which put every
     property row 14px further in than the section title above it and than the
     gutter everything else in the panel sits on — so the column had two left
     edges, 12 and 26, alternating down the panel. */
  padding: 1px 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: var(--uc-text-xs, 12px);
  font-weight: var(--uc-weight-regular);
  line-height: 1.4;
  text-align: right;
  color: var(--uc-text-muted);
  min-width: 0;
}
/* The name truncates; the dot beside it does not. `Grid Template Columns` is
   half again the width of this column, and with the marker inline it was the
   first thing the ellipsis ate — the one row you most want to see is set. */
.uipb-field__label-text {
  min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* A property that is set reads brighter than one that is not — the difference
   between "this element is 18px" and "18px is what it inherits". Brighter text
   and the same 5px dot the sections use, NOT a filled pill: at one row per
   property a column of grey chips is louder than the values it annotates, and
   the panel already spends its only fill on the controls. Same box either way,
   to the pixel: the two variants are a <button> and a <label>, and letting the
   button bring its own metrics put the controls of a mixed row on different
   lines. */
.uipb-panel .uipb-field__label.is-set {
  color: var(--uc-text-strong);
  cursor: pointer;
}
/* Set, the label is also a button that removes the property, so hover says so
   in the one channel left — the colour. */
.uipb-panel .uipb-field__label.is-set:hover { color: var(--uc-brand-fg); }
.uipb-field__dot {
  width: 5px; height: 5px; flex: none;
  border-radius: var(--uc-radius-pill);
  background: var(--uc-brand-fg);
}

.uipb-field__control { flex: 1; min-width: 0; }
/* Where a field's grey applied value comes from — `.hero h1`, or
   `inherited · .hero`. One quiet line under the control, like the widget
   panel's applied-from hint, so it never widens the row. */
.uipb-panel .uipb-field__control > .uipb-field__from {
  display: block;
  width: auto;
  margin-top: 2px;
  overflow: hidden;
  color: var(--uc-text-subtle);
  font-size: var(--uc-text-2xs, 10px);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uipb-field__from code { font-family: var(--uc-font-mono); color: var(--uc-text-muted); }

/* ---- Controls ------------------------------------------------------------ *
 * Framer's controls carry a fill and no border. On white that is #f3f3f3; on
 * this chrome it is `--uc-surface-control`, which is the same idea expressed as
 * a 5% white lift. A hairline would be the wrong translation: at 340px a column
 * of twenty bordered boxes is a ladder, and the fill separates the value from
 * the label without drawing a line anywhere.
 *
 * Every rule here is scoped to `.uipb-panel` for one reason: the panel renders
 * inside `.uich-tw`, the Tailwind island the core's surfaces need, whose
 * preflight sets `.uich-tw button, input, select, textarea { margin: 0;
 * padding: 0 }` at (0,1,1). A single class loses to that, which is how the
 * inputs came to have no padding and the CSS box sat flush against the panel
 * edge with its text touching the border.
 * ========================================================================== */
.uipb-panel .uipb-field__control > *,
.uipb-panel .uipb-field__pair > * { max-width: 100%; min-width: 0; }
.uipb-panel .uipb-field__control > button,
.uipb-panel .uipb-field__control > input,
.uipb-panel .uipb-field__control > [role='combobox'] { width: 100%; }

.uipb-panel .uipb-field__control input:not([type='color']),
.uipb-panel .uipb-field__control [role='combobox'],
.uipb-panel .uipb-panel__addclass input {
  height: var(--uc-control-h-sm);
  padding-inline: var(--uc-space-10);
  border: 0;
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-control);
  box-shadow: none;
  font-size: var(--uc-text-xs, 12px);
}
.uipb-panel .uipb-field__control input:not([type='color']):hover,
.uipb-panel .uipb-field__control [role='combobox']:hover {
  background: var(--uc-surface-raised);
}
/* Focus is the one place a ring earns its keep: it says which of twenty
   identical boxes has the caret. */
.uipb-panel .uipb-field__control input:not([type='color']):focus-visible,
.uipb-panel .uipb-field__control [role='combobox']:focus-visible,
.uipb-panel .uipb-panel__addclass input:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--uc-border-strong);
}

/* A length is a number and a unit, and the unit is the same three characters on
   every row — so it takes a fixed width and the number takes the rest. Framer
   splits its pair 50/50 because both halves hold real words (`1fr` / `Fill`);
   here that would be a 93px box saying `px`. What matters is that the seam
   lands in the same place on every length row, and a fixed unit does that. */
.uipb-field__pair { display: flex; align-items: center; gap: var(--uc-space-8); }
.uipb-panel .uipb-field__pair input:not([type='color']) { flex: 1 1 auto; min-width: 40px; }
.uipb-panel .uipb-field__pair > [role='combobox'] { flex: 0 0 var(--uc-panel-unit-w); width: auto; }

/* A segmented control fills the column like every other control, and its
   segments split it evenly. Left to itself the DS group is `inline-flex` and
   sizes to its four 28px buttons, so the one row in the section with a
   segmented control stopped 78px short of the right edge that every other row
   shares — the one thing this layout exists to hold. */
.uipb-panel .uipb-field__control [role='radiogroup'],
.uipb-panel .uipb-field__control [role='group'] {
  display: flex;
  width: 100%;
  height: var(--uc-control-h-sm);
  padding: var(--uc-space-2);
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-control);
}
.uipb-panel .uipb-field__control [role='radiogroup'] > *,
.uipb-panel .uipb-field__control [role='group'] > * {
  flex: 1;
  min-width: 0;
  /* The DS sizes its items off `control-h-md` minus the tray padding. Inside a
     28px tray that is 28px of item in 24px of room, so the segments sat proud
     of the track they are supposed to live in. */
  height: calc(var(--uc-control-h-sm) - 4px);
  min-height: 0;
  padding: 0;
  font-size: var(--uc-text-xs, 12px);
}
/* Selected lifts out of the tray, the way Framer's Yes/No does: a raised pill
   with the accent on the label, against segments that stay flat and muted. */
.uipb-panel .uipb-field__control [role='radiogroup'] > *[data-state='on'],
.uipb-panel .uipb-field__control [role='group'] > *[data-state='on'] {
  background: var(--uc-surface-overlay);
  color: var(--uc-brand-fg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
}

/* ---- The four-sided box (inset) ------------------------------------------
 * Framer's Position control: the four numbers arranged where the sides they
 * name actually are, around a block standing in for the element. Three rows
 * inside the control column, so the panel's right edge is unchanged and the
 * row simply gets taller.
 * ------------------------------------------------------------------------ */
/* Three columns, three rows. Each side sits in the cell that matches it, so
   Top is above the element and Left is beside it — the arrangement is the
   label, which is why the letters inside can be one character. */
.uipb-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--uc-space-4);
  width: 100%;
}
.uipb-box__cell { position: relative; display: block; min-width: 0; }
.uipb-box__cell:nth-child(1) { grid-area: 1 / 2; }  /* top */
.uipb-box__cell:nth-child(2) { grid-area: 2 / 1; }  /* left */
.uipb-box__cell:nth-child(4) { grid-area: 2 / 3; }  /* right */
.uipb-box__cell:nth-child(5) { grid-area: 3 / 2; }  /* bottom */

/* The side letter sits inside the field, right-aligned, and the input reserves
   room for it. A label beside each of four inputs costs more width than the
   inputs themselves have. */
.uipb-panel .uipb-box__input {
  width: 100%;
  height: var(--uc-control-h-sm);
  padding: 0 var(--uc-space-10) 0 var(--uc-space-20);
  border: 0;
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-control);
  color: var(--uc-text-strong);
  font-family: inherit;
  font-size: var(--uc-text-xs, 12px);
}
.uipb-panel .uipb-box__input:hover { background: var(--uc-surface-raised); }
.uipb-panel .uipb-box__input:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--uc-border-strong);
}
.uipb-box__side {
  position: absolute;
  top: 50%;
  left: var(--uc-space-8);
  transform: translateY(-50%);
  font-size: var(--uc-text-2xs, 10px);
  color: var(--uc-text-subtle, var(--uc-text-muted));
  pointer-events: none;
}

/* The element the four numbers are measured from. Not a control — without it
   the middle row reads as three inputs in a line. */
.uipb-box__core {
  grid-area: 2 / 2;
  height: var(--uc-control-h-sm);
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-overlay);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
}

/* The label stays centred against a three-row box, which puts it level with
   the element in the middle — the thing the four numbers are offsets from.
 *
 * And a box needs air around it. Spacing stacks two of them, and at the plain
 * 10px row gap the six inputs of Padding-bottom / Margin-top read as one
 * cluster: 4px between the rows of a box, 10px between two boxes, which is not
 * enough of a difference to say where one control ends. */
.uipb-box { margin-block: var(--uc-space-4); }

/* ---- Stepper (number) ---------------------------------------------------- */
.uipb-step {
  display: flex;
  flex: 0 0 auto;
  gap: 1px;
  padding: var(--uc-space-2);
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-control);
}
.uipb-panel .uipb-step__btn {
  width: var(--uc-space-24);
  height: calc(var(--uc-control-h-sm) - 4px);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0;
  border-radius: var(--uc-radius-sm);
  background: none;
  color: var(--uc-text-muted);
  font-family: inherit;
  font-size: var(--uc-text-base);
  line-height: 1;
  cursor: pointer;
}
.uipb-panel .uipb-step__btn:hover { background: var(--uc-surface-raised); color: var(--uc-text-strong); }

/* ---- Opacity ------------------------------------------------------------- */
.uipb-panel .uipb-opacity__num {
  flex: 0 0 64px;
  height: var(--uc-control-h-sm);
  padding-inline: var(--uc-space-10);
  border: 0;
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-control);
  color: var(--uc-text-strong);
  font-family: inherit;
  font-size: var(--uc-text-xs, 12px);
}
.uipb-panel .uipb-opacity__num:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--uc-border-strong);
}
.uipb-opacity__slider { flex: 1 1 auto; min-width: 0; }

/* Number inputs keep their spinners off. The stepper and the slider are the
   affordance; a native spinner on top of either is two controls for one value,
   and it eats the width the value needs. */
.uipb-panel input[type='number']::-webkit-outer-spin-button,
.uipb-panel input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.uipb-panel input[type='number'] { -moz-appearance: textfield; }

/* The native swatch paints the colour through its own shadow DOM. Style the
   frame, leave the fill alone: `background: none` made it a white square
   whatever the value was, and resetting `appearance` made it vanish entirely.
   The parts that need touching are the wrapper's padding and the swatch's own
   border, both of which are shadow pseudo-elements. */
.uipb-panel .uipb-field__swatch {
  width: var(--uc-control-h-sm, 28px); height: var(--uc-control-h-sm, 28px); flex: none;
  padding: 0; border: 1px solid var(--uc-border-subtle);
  border-radius: var(--uc-radius-md); cursor: pointer;
}
.uipb-panel .uipb-field__swatch::-webkit-color-swatch-wrapper { padding: 0; }
.uipb-panel .uipb-field__swatch::-webkit-color-swatch { border: 0; border-radius: var(--uc-radius-sm); }

/* The background image's swatch: the same frame, holding a thumbnail. */
.uipb-panel .uipb-field__imgswatch {
  display: grid; place-items: center; overflow: hidden;
  background: var(--uc-surface-control); color: var(--uc-text-muted);
}
.uipb-panel .uipb-field__imgswatch img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; display: block; }

/* ==========================================================================
 * Content tab (inspector/panel/ContentPanel.jsx)
 * ========================================================================== */

/* A textarea is taller than a control row, so its label sits at the top
   rather than floating in the middle of four lines of copy. */
.uipb-panel .uipb-content__row:has(textarea) { align-items: flex-start; }
.uipb-panel .uipb-content__row:has(textarea) .uipb-field__label { padding-top: var(--uc-space-6); }
.uipb-panel .uipb-content__text {
  width: 100%; min-height: 56px;
  border: 0; border-radius: var(--uc-radius-md);
  background: var(--uc-surface-control); box-shadow: none;
  font-size: var(--uc-text-xs, 12px);
}
.uipb-panel .uipb-content__text:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--uc-border-strong); }
.uipb-panel .uipb-content__row .uipb-field__control > .uipb-field__from { display: block; margin-top: var(--uc-space-4); }
.uipb-panel .uipb-content__note { margin: 0; font-size: var(--uc-text-xs, 12px); color: var(--uc-text-muted); }

/* Media: a thumbnail you click to replace, the library button and the URL. */
.uipb-panel .uipb-media { display: flex; gap: var(--uc-space-10); align-items: stretch; min-width: 0; }
.uipb-panel .uipb-media__thumb {
  flex: 0 0 64px; height: 64px; padding: 0; overflow: hidden;
  display: grid; place-items: center;
  border: 1px solid var(--uc-border-subtle); border-radius: var(--uc-radius-md);
  background: var(--uc-surface-control); color: var(--uc-text-muted); cursor: pointer;
  /* A checkerboard would be truer for transparency; the control fill reads
     fine for photos, which is what this mostly holds. */
}
.uipb-panel .uipb-media__thumb:disabled { cursor: default; }
.uipb-panel .uipb-media__thumb:not(:disabled):hover { border-color: var(--uc-border-strong); }
.uipb-panel .uipb-media__thumb img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; display: block; }
.uipb-panel .uipb-media__side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--uc-space-6); justify-content: center; }
.uipb-panel .uipb-media__side > button { width: 100%; }
.uipb-panel .uipb-media__side input {
  height: var(--uc-control-h-sm); padding-inline: var(--uc-space-10);
  border: 0; border-radius: var(--uc-radius-md);
  background: var(--uc-surface-control); box-shadow: none;
  font-size: var(--uc-text-xs, 12px); text-overflow: ellipsis;
}

/* The link box's page search: a list hung under the input, inside the panel
   (not a portal), so it scrolls with the field it belongs to. */
.uipb-panel .uipb-link { position: relative; min-width: 0; }
.uipb-panel .uipb-link__results {
  position: absolute; z-index: 10; top: calc(100% + 4px); right: 0; left: 0;
  margin: 0; padding: var(--uc-space-4); list-style: none;
  max-height: 240px; overflow: auto;
  border: 1px solid var(--uc-border-subtle); border-radius: var(--uc-radius-md);
  background: var(--uc-surface-raised); box-shadow: var(--uc-shadow-4);
}
.uipb-panel .uipb-link__results button {
  all: unset; box-sizing: border-box; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: var(--uc-space-8);
  padding: var(--uc-space-6) var(--uc-space-8); border-radius: var(--uc-radius-sm);
  font-size: var(--uc-text-xs, 12px); color: var(--uc-text-strong); cursor: pointer;
}
.uipb-panel .uipb-link__results button:hover { background: var(--uc-surface-control); }
.uipb-link__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uipb-link__type { flex: none; font-size: var(--uc-text-2xs, 10px); color: var(--uc-text-muted); text-transform: uppercase; }

/* Other attributes: name, value, remove — one row each, and one to add. */
.uipb-panel .uipb-attr { display: flex; align-items: center; gap: var(--uc-space-6); min-width: 0; }
.uipb-panel .uipb-attr__name {
  flex: 0 0 var(--uc-panel-label-w); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--uc-font-mono); font-size: var(--uc-text-2xs, 11px); color: var(--uc-text-muted);
}
.uipb-panel .uipb-attr input {
  flex: 1 1 auto; min-width: 0;
  height: var(--uc-control-h-sm); padding-inline: var(--uc-space-10);
  border: 0; border-radius: var(--uc-radius-md);
  background: var(--uc-surface-control); box-shadow: none;
  font-size: var(--uc-text-xs, 12px);
}
.uipb-panel .uipb-attr--new > :first-child input,
.uipb-panel .uipb-attr--new > input:first-child { flex: 0 0 var(--uc-panel-label-w); }

/* The media library is portalled to <body>, outside the editor's dark chrome
   and above it. Its own z-index (160000) already clears every editor layer;
   this only keeps its type from inheriting the shell's. */
body.uich-cb-body .media-modal { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* A font stack is longer than any panel. Ellipsis rather than overflow — the
   full value is still in the field, and a clipped one that also breaks the
   column is two problems instead of one. */
.uipb-panel .uipb-field__control input { text-overflow: ellipsis; }

/* ---- Custom CSS and the scope note -------------------------------------- */
/* Scoped, padded and ringed by hand for the same reason the fields are: the
   island's `.uich-tw textarea { margin: 0; padding: 0 }` wins over a single
   class, so the CSS box sat flush against both panel edges with its text
   touching the border and nothing around it saying it was a field. */
.uipb-panel .uipb-panel__css {
  display: block;
  width: calc(100% - (2 * var(--uc-panel-gutter)));
  margin: var(--uc-space-4) var(--uc-panel-gutter) var(--uc-space-16);
  padding: var(--uc-space-10);
  border: 0;
  background: var(--uc-surface-control);
  border-radius: var(--uc-radius-md);
  font-family: var(--uc-font-mono, ui-monospace, monospace);
  font-size: var(--uc-text-xs, 12px);
  line-height: var(--uc-leading-normal);
  resize: vertical;
}
.uipb-panel .uipb-panel__css:focus-visible {
  box-shadow: inset 0 0 0 1px var(--uc-border-strong);
  outline: none;
}
/* A standing caveat, not an alert. It says the same thing on every selection,
   so it gets the weight of a footnote: muted, small, and below the last
   section rather than competing with it.
   Two classes deep on purpose. The panel renders inside `.uich-tw`, the
   Tailwind island the core's markup needs, and its preflight carries
   `.uich-tw p { margin: 0; padding: 0 }` — one class more specific than a bare
   `.uipb-panel__note`, so the note rendered flush against both panel edges. */
.uipb-panel .uipb-panel__note {
  padding: var(--uc-space-16) var(--uc-panel-gutter);
  font-size: var(--uc-text-xs, 12px);
  line-height: var(--uc-leading-normal);
  /* Muted, not subtle. Subtle is rgb(82,82,82) on a rgb(23,23,23) panel —
     about 2.3:1, and this is a full sentence meant to be read once. */
  color: var(--uc-text-muted);
}

/* The DS accordion clips its content (`overflow: hidden`) while animating
   height, and Radix measures that height once, on open. The style panel's rows
   settle *after* that measurement — selects and number inputs lay out late — so
   the measured height came out short and the rest of the section was clipped.
   Clipped, not hidden: the fields rendered, reported correct positions, showed
   correct values, and could not be clicked, because the point you aimed at
   belonged to the clipping ancestor.
   Scoped to this panel so the Data panel's accordion keeps its animation. */
/* `height: auto` is the load-bearing half. Radix animates the content from 0 to
   `--radix-accordion-content-height`, which it measures on open — and inside
   this panel it measured 0, so the animation ran 0 → 0 and the section stayed
   zero-height. With `overflow: hidden` that hid the fields; with overflow
   visible they painted but the sections below laid out on top of them and took
   the clicks. Either way the controls showed correct values and could not be
   used.
   `!important` because it is overriding a keyframe animation's computed value,
   which ordinary specificity does not reach. Scoped to this panel so the Data
   panel's accordion keeps its animation. */
.uipb-panel .uipb-sec__content[data-state='open'] {
  height: auto !important;
  overflow: visible;
  animation: none !important;
}

/* "Set, but another rule wins." Sits between the element identity and the
   controls, because that is where it is looked for. */
.uipb-panel__overrides { padding: 0 var(--uc-space-12) var(--uc-space-8); }
.uipb-overrides { margin: var(--uc-space-4) 0 var(--uc-space-4); padding-right: var(--uc-space-16); }
.uipb-overrides code { font-size: var(--uc-text-xs, 11px); }

/* ---- Save conflict ------------------------------------------------------ */
/* Pinned to the bottom, full width, above the motion dock. Autosave is halted
   while this shows, so it outranks every other surface in the editor. */
.uipb-conflict {
  position: fixed;
  right: 0; left: 0; bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: var(--uc-space-16);
  padding: var(--uc-space-12) var(--uc-space-16);
  background: var(--uc-surface-raised);
  border-top: 1px solid var(--uc-border-subtle);
  color: var(--uc-text);
  font-size: var(--uc-text-sm, 13px);
}
.uipb-conflict__text { flex: 1; min-width: 0; }
.uipb-conflict__actions { display: flex; gap: var(--uc-space-8); flex-shrink: 0; }

/* ---- Inspector: Style / Layout / Effects -------------------------------- */
/* Sits between the element identity and the sections, on the same gutter as
   everything else in the column. Underline rather than pill: a pill row here
   would be the third pill group on screen after the mode row and the device
   row, and the eye stops telling them apart. */
.uipb-panel__tabs { padding: 0 var(--uc-space-12); border-bottom: 1px solid var(--uc-border-subtle); }
.uipb-panel__tabs [role='tab'] { display: inline-flex; align-items: center; gap: var(--uc-space-4); }

/* "Ask about this element" — pinned to the foot of the panel, because it is
   what you reach for when the controls above did not have the answer. */
.uipb-panel__ask {
  padding: var(--uc-space-8) var(--uc-space-12);
  border-top: 1px solid var(--uc-border-subtle);
}
.uipb-panel__ask > button { width: 100%; justify-content: center; }

/* ---- Agent transcript --------------------------------------------------- */
.uipb-msg__wrap { display: flex; flex-direction: column; gap: var(--uc-space-4); }

/* The day divider. Centred and quiet — it is a place marker, not a heading. */
.uipb-msgs__day {
  align-self: center;
  margin: var(--uc-space-8) 0 var(--uc-space-4);
  font-size: var(--uc-text-xs, 11px);
  color: var(--uc-text-muted);
}

/* "Thought for 18s". Above the answer, where the waiting happened. */
.uipb-msg__took {
  font-size: var(--uc-text-xs, 11px);
  color: var(--uc-text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- Agent prompt ------------------------------------------------------- */
.uipb-agent__actions {
  display: flex;
  align-items: center;
  gap: var(--uc-space-4);
  min-width: 0;
}
.uipb-agent__spacer { flex: 1; }
/* Round, like the concept's send. The only circular control in the editor,
   which is the point — it is the one that commits a turn. */
.uipb-agent__send { border-radius: var(--uc-radius-pill); }

.uipb-agent__starters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--uc-space-4);
  padding: 0 var(--uc-space-12) var(--uc-space-8);
}
.uipb-agent__starters button { font-size: var(--uc-text-xs, 11px); }

/* ---- Agent model picker ------------------------------------------------- */
.uipb-agent__model { display: flex; min-width: 0; margin-block-end: calc(-1 * var(--uc-space-4)); }
.uipb-model { max-width: 100%; min-width: 0; gap: var(--uc-space-4); color: var(--uc-text-muted); }
.uipb-model__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uipb-model__menu { min-width: 240px; max-height: 360px; overflow-y: auto; }
.uipb-model__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Which engine — "Anthropic" through a key, "Claude Code" on the machine —
   because the same model name can be offered by both. */
.uipb-model__via { font-size: var(--uc-text-2xs, 10px); color: var(--uc-text-subtle); white-space: nowrap; }

/* ---- CLI agent pairing -------------------------------------------------- */
.uipb-cli {
  margin: 0 var(--uc-space-12) var(--uc-space-8);
  padding: var(--uc-space-12);
  border: 1px solid var(--uc-border-subtle);
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-raised);
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-8);
  font-size: var(--uc-text-xs, 11px);
}
.uipb-cli__head { display: flex; align-items: center; gap: var(--uc-space-6); color: var(--uc-text-strong); }
.uipb-cli__title { font-size: var(--uc-text-sm, 13px); font-weight: var(--uc-weight-medium); }
.uipb-cli__body { margin: 0; color: var(--uc-text-muted); line-height: 1.5; }
.uipb-cli__steps {
  margin: 0;
  padding-inline-start: var(--uc-space-16);
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-8);
  color: var(--uc-text);
}
.uipb-cli__steps li { display: flex; flex-direction: column; gap: var(--uc-space-4); }
.uipb-cli__cmd {
  display: flex;
  align-items: center;
  gap: var(--uc-space-4);
  padding: var(--uc-space-4) var(--uc-space-8) var(--uc-space-4) var(--uc-space-4);
  border-radius: var(--uc-radius-sm);
  background: var(--uc-surface-sunken);
}
/* The whole command stays selectable — copying by hand is the fallback when
   the clipboard is refused. */
.uipb-cli__cmd code {
  flex: 1;
  min-width: 0;
  font-family: var(--uc-font-mono);
  font-size: var(--uc-text-2xs, 10px);
  word-break: break-all;
  -webkit-user-select: all;
     -moz-user-select: all;
          user-select: all;
}
.uipb-cli__row { display: flex; gap: var(--uc-space-4); }
.uipb-cli__status { margin: 0; color: var(--uc-text-muted); }
.uipb-cli__status[data-tone='ok'] { color: var(--uc-text-strong); }
.uipb-cli__status[data-tone='warn'] { color: var(--uc-text-strong); font-weight: var(--uc-weight-medium); }

/* ---- Chat setup / locked ------------------------------------------------ */
.uipb-setup { display: flex; flex-direction: column; gap: var(--uc-space-8); padding: var(--uc-space-16); }
.uipb-setup__title { margin: 0; font-size: var(--uc-text-sm, 13px); font-weight: var(--uc-weight-medium); color: var(--uc-text-strong); }
.uipb-setup__body { margin: 0; font-size: var(--uc-text-xs, 11px); line-height: 1.5; color: var(--uc-text-muted); }
.uipb-setup > button { align-self: flex-start; }
.uipb-setup__card {
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-6);
  padding: var(--uc-space-12);
  border: 1px solid var(--uc-border-subtle);
  border-radius: var(--uc-radius-md);
}
.uipb-setup__card > button { align-self: flex-start; }
.uipb-setup__card-head {
  display: flex;
  align-items: center;
  gap: var(--uc-space-6);
  font-size: var(--uc-text-xs, 11px);
  font-weight: var(--uc-weight-medium);
  color: var(--uc-text-strong);
}

/* ---- Code mode ---------------------------------------------------------- */
/* Takes the canvas's grid area, full width. The editor is the whole surface —
   the point of this mode is room to read. */
/* A framed panel, not a full-bleed surface.
 *
 * It sits in the canvas's grid area, so it is read against the same surround
 * the page is: inset on all four sides, rounded, and edged.
 *
 * The fill is `--uc-surface-base`, the same surface as the top bar, and it has
 * to be a step ABOVE what is behind it. That backdrop is the studio root, which
 * is `--uc-surface-sunken` (#101010) — so the first try, which made the panel
 * sunken too, painted #101010 on #101010 and the frame vanished. Only the
 * hairline was left to say a panel was there, which at 1px is not enough to
 * read as one. A panel lifts off its backdrop or it is not a panel.
 *
 * The frame is the cards' own outer ring, `--uipb-card-frame` (the
 * `--uc-border-subtle` hairline), like the sidebar and the right panel. Not a
 * `border`: on light the hairline is translucent, and inside the box it sat on
 * the card's own white and vanished; outside, it sits on the grey ground and
 * reads (Jay 2026-10-23: "add border like all panels").
 *
 * `overflow: hidden` is load-bearing: the tree and the editor both run to the
 * panel's edge, and without it their square corners sit outside the radius. */
/* Code mode: the canvas stays mounted under the code editor (Studio.jsx), out
   of sight and out of reach, at its full size. */
.uipb-studio[data-mode='code'] .uipb-canvas {
  visibility: hidden;
  pointer-events: none;
}
.uipb-code {
  grid-area: canvas;
  display: flex;
  min-width: 0;
  min-height: 0;
  /* Fills the canvas column, so its edges line up with the sidebar card's, as
     the canvas does in Design (was a 12px inset; Jay 2026-10-23). */
  margin: 0;
  box-shadow: var(--uipb-card-frame);
  border-radius: var(--uc-radius-lg);
  overflow: hidden;
  background: var(--uc-surface-base);
}
/* The code itself, dark theme: the editor's soft code grey (#b8bac4, the
   shared CodeMirror palette's operator colour, composer.css) rather than
   white, so the page's code reads as code (Jay 2026-10-23). The builder shows
   the plain text box, not CodeMirror, so this is its one text colour. */
.uipb-studio[data-uipb-theme='dark'] .uipb-code .uich-cm-textarea { color: #b8bac4; }
/* CodeMirror's palette (composer.css, `.ed-pane-body-live .cm-s-default`)
   colours attribute names with `--warn`, which only the Composer panel
   defines; the Code workspace is outside it, so they fell back to plain text.
   Same amber as the dark panel (composer-right-panel.css). */
.uipb-studio[data-uipb-theme='dark'] .uipb-code { --warn: #FFA940; }
.uipb-code__main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

/* ---- File tree -----------------------------------------------------------
 * A fixed column, not a share of the width: the editor is what this mode is
 * for, and a tree that grows with the window takes room from the thing being
 * read. 220px fits `uipb-herosplit.html` without truncating, which is about as
 * long as a section name gets.
 * ------------------------------------------------------------------------ */
.uipb-code__tree {
  display: flex;
  flex-direction: column;
  flex: 0 0 220px;
  min-height: 0;
  border-left: 1px solid var(--uc-border-subtle);
  /* Transparent, so the frame's own fill runs edge to edge behind it. It used
     to carry `--uc-surface-base`, which inside a sunken panel turned the file
     list into a lighter sidebar nothing had asked for. */
  background: none;
}
.uipb-code__search { padding: var(--uc-space-8); }
.uipb-code__search input { width: 100%; }
.uipb-code__groups {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 var(--uc-space-4) var(--uc-space-8);
}
.uipb-code__group { margin-bottom: var(--uc-space-2); }

.uipb-code__folder,
.uipb-code__file {
  display: flex;
  align-items: center;
  gap: var(--uc-space-6);
  width: 100%;
  border: 0;
  border-radius: var(--uc-radius-sm);
  background: none;
  font-family: inherit;
  font-size: var(--uc-text-xs, 12px);
  line-height: 1.4;
  text-align: right;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uipb-code__folder {
  padding: var(--uc-space-5) var(--uc-space-6);
  color: var(--uc-text-strong);
  font-weight: var(--uc-weight-medium);
}
.uipb-code__folder:hover { background: var(--uc-surface-control); }
.uipb-code__foldername { overflow: hidden; text-overflow: ellipsis; }
/* The caret points down when open and right when shut, which is the one cue
   that a group is hiding something. */
.uipb-code__caret { transform: rotate(90deg); }

/* Files are indented under their folder and set in the editor's own typeface —
   they ARE the thing in the editor, and a proportional name over a monospace
   buffer reads as a label for it rather than as the file itself. */
.uipb-code__file {
  padding: var(--uc-space-4) var(--uc-space-20) var(--uc-space-4) var(--uc-space-6);
  font-family: var(--uc-font-mono, ui-monospace, monospace);
  color: var(--uc-text-muted);
}
.uipb-code__file:hover { background: var(--uc-surface-control); color: var(--uc-text-strong); }
.uipb-code__file[data-active] { background: var(--uc-surface-raised); color: var(--uc-text-strong); }
/* A section with no CSS yet still shows `hero.css` — that is where it will go.
   Dimmed rather than hidden, so the tree does not change shape as you type. */
.uipb-code__file[data-empty]:not([data-active]) { color: var(--uc-text-subtle, var(--uc-text-muted)); opacity: 0.7; }

.uipb-code__none {
  padding: var(--uc-space-8) var(--uc-space-6);
  font-size: var(--uc-text-xs, 12px);
  color: var(--uc-text-muted);
}

/* ---- Open files ---------------------------------------------------------- */
.uipb-code__bar {
  display: flex;
  align-items: center;
  gap: var(--uc-space-8);
  padding: var(--uc-space-6) var(--uc-space-12);
  border-bottom: 1px solid var(--uc-border-subtle);
}
.uipb-code__spacer { flex: 1; }

.uipb-code__open-tabs { flex: 0 1 auto; min-width: 0; }
/* Only group the document label and its separate close action. DS Tabs owns
   the strip, indicator, trigger sizes, colours, spacing and keyboard behavior. */
.uipb-code__tab { display: inline-flex; align-items: center; flex: none; }
/* The close button appears on the active tab and on hover — a row of ×s is a
   row of things to hit by accident. */
.uipb-code .uipb-code__close { width: 18px; height: 18px; min-width: 0; opacity: 0; }
.uipb-code__tab:hover .uipb-code__close,
.uipb-code__tab[data-active] .uipb-code__close { opacity: 1; }
.uipb-code .uipb-code__close:focus-visible { opacity: 1; }

.uipb-code__error { padding: var(--uc-space-8) var(--uc-space-12) 0; }
.uipb-code__empty { padding: var(--uc-space-16); }

/* CodeMirror sizes itself to its container, so the container has to have a
   height — `flex: 1` with `min-height: 0` rather than a fixed one, or the
   editor grows past the viewport and the page scrolls instead of the code. */
.uipb-code__editor { flex: 1; min-height: 0; overflow: hidden; }
.uipb-code__editor .CodeMirror { height: 100%; font-size: var(--uc-text-sm, 13px); }

/* Developer's Code section shares the same editor and save path, in one column. */
.uipb-studio .panel.dock-right.uc-chrome .rp-insp .rp-body:has(.rp-developer-views[data-view='code']),
.uipb-studio .rp-body__inner:has(> .rp-developer-views[data-view='code']),
.uipb-studio .uipb-pagepanel__body:has(> .rp-developer-views[data-view='code']) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.uipb-studio .rp-body__inner:has(> .rp-developer-views[data-view='code']),
.uipb-developer-code { flex: 1; }
.uipb-developer-code { display: flex; flex-direction: column; min-height: 0; }
.uipb-studio .uipb-code--panel {
  grid-area: auto;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-height: 0;
  box-shadow: none;
  border: 1px solid var(--uc-border-subtle);
  border-radius: var(--uc-radius-md);
}
.uipb-code__panel-files { display: flex; flex-direction: column; flex: none; gap: var(--uc-space-8); padding: var(--uc-space-8); border-bottom: 1px solid var(--uc-border-subtle); }
.uipb-code__panel-files > button { width: 100%; min-width: 0; }
.uipb-studio .uipb-code__panel-files .uipb-code__file-select { padding-inline: var(--uc-space-8, 8px); }
.uipb-code__file-select > span:first-child { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.uipb-code__panel-files .uipb-code__languages { width: 100%; }
.uipb-code__languages > [role='tab'] { flex: 1; }
.uipb-code--panel .uich-cm-textarea { width: 100%; height: 100%; min-height: 0; resize: none; }
.uipb-pagepanel .uipb-developer-code { padding: var(--uc-space-8); }
.uipb-code__langrow { display: flex; align-items: center; gap: var(--uc-space-4, 4px); min-width: 0; }
.uipb-code__langrow .uipb-code__languages { flex: 1; min-width: 0; }
.uipb-code__extra { display: flex; align-items: center; gap: var(--uc-space-4, 4px); min-width: 0; font-size: var(--uc-text-xs); color: var(--uc-text-muted); }
.uipb-code__extra-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--uc-font-mono, monospace); }
.uipb-code__empty--section { display: flex; flex-direction: column; align-items: flex-start; gap: var(--uc-space-8); font-size: var(--uc-text-sm); color: var(--uc-text-muted); }
.uipb-code__empty--section p { margin: 0; }

/* ---- One gutter, actually honoured ---------------------------------------
 * Every row in this panel is padded to `--uc-panel-gutter`, and almost none of
 * them landed on it. Section titles sat 4px inside, field labels 10px, and the
 * amount varied per row — so the column had no left edge, just a fray.
 *
 * The cause is Tailwind's preflight, which this panel lives inside (`.uich-tw`,
 * the island the Composer core needs — see Inspector.jsx). Preflight sets
 * `content: ""` on `*::before, *::after`, which GENERATES both pseudo-elements
 * on every element. On a normal block that is invisible. On a `display: flex`
 * row it is not: an empty pseudo-element is a real flex item, so each row
 * silently gained a zero-width child at the start — and with it one whole
 * `gap`. The row's first visible thing then began at gutter + gap, and since
 * every row sets its own gap, each was pushed by a different amount.
 *
 * `:where(*)` so it has ZERO specificity: the pseudo-elements this file draws
 * on purpose — the hairline between sections, the breadcrumb separator — set
 * their own `content` from a real selector and still win. This only cancels the
 * ones nobody asked for.
 *
 * Scoped to the inspector body because that is where the island is. Everywhere
 * else in the shell is outside `.uich-tw` and never had the problem. */
.uipb-inspector__body :where(*)::before,
.uipb-inspector__body :where(*)::after { content: none; }


/* ---- Layers window -------------------------------------------------------
 * The Composer widget's floating Layers: a card over the canvas that you drag
 * by its header and size from its corner. Fixed to the viewport, above the
 * canvas and its toolbar, below dialogs.
 * ------------------------------------------------------------------------ */
.uipb-layers-float {
  position: fixed;
  z-index: 40;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  min-height: 180px;
  border: 1px solid var(--uc-border-subtle);
  border-radius: var(--uc-radius-lg);
  background: var(--uc-surface-raised);
  box-shadow: 0 18px 48px -12px rgba(0, 0, 0, 0.55), 0 4px 12px -4px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.uipb-layers-float__head {
  display: flex;
  align-items: center;
  gap: var(--uc-space-6);
  flex: 0 0 auto;
  padding: var(--uc-space-6) var(--uc-space-12) var(--uc-space-6) var(--uc-space-6);
  border-bottom: 1px solid var(--uc-border-subtle);
  color: var(--uc-text-strong);
  cursor: grab;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  touch-action: none;
}
.uipb-layers-float__head:active { cursor: grabbing; }
.uipb-layers-float__title { font-size: var(--uc-text-sm, 13px); font-weight: var(--uc-weight-medium); }
.uipb-layers-float__sub {
  min-width: 0;
  overflow: hidden;
  color: var(--uc-text-muted);
  font-family: var(--uc-font-mono);
  font-size: var(--uc-text-2xs, 10px);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uipb-layers-float__body { flex: 1; min-height: 0; overflow: auto; padding: var(--uc-space-6) 0; }
/* In the window the tree has the whole height, so the panel's 220px cap goes. */
.uipb-layers-float .uipb-layers { max-height: none; overflow: visible; }
/* With nothing selected: every section's tree, one after another. */
.uipb-layers-float__section + .uipb-layers-float__section { margin-top: var(--uc-space-8); }
.uipb-layers-float__section-label {
  padding: var(--uc-space-4) var(--uc-space-8);
  color: var(--uc-text-muted);
  font-size: var(--uc-text-2xs, 10px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.uipb-layers-float__resize {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  cursor: nesw-resize;
  touch-action: none;
  background: linear-gradient(-135deg, transparent 50%, var(--uc-border-strong) 50%, var(--uc-border-strong) 60%, transparent 60%, transparent 70%, var(--uc-border-strong) 70%, var(--uc-border-strong) 80%, transparent 80%);
}
/* While the window is dragged or sized the canvas iframe must not swallow the
   pointer, or the drag stops the moment it crosses the page. */
body.uipb-dragging-float iframe { pointer-events: none !important; }

/* The top bar's Layers toggle stays lit while its window is open. */
.uipb-topbar .uipb-topbar__toggle[aria-pressed='true'] {
  background: var(--uc-surface-control);
  color: var(--uc-text-strong);
}
/* The left / right panel toggles turn their icon over with the panel, so
   which way the button will act reads at a glance: open shows the icon as
   drawn (the arrow points "close"), closed shows it flipped ("open"). */
.uipb-topbar .uipb-topbar__toggle svg {
  transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);
  transform-origin: center;
}
.uipb-topbar .uipb-topbar__toggle[aria-pressed='false'] svg { transform: rotateY(-180deg); }
@media (prefers-reduced-motion: reduce) {
  .uipb-topbar .uipb-topbar__toggle svg { transition: none; }
}

/* =============================================================================
   Page settings dialog (topbar/PageSettingsDialog.jsx)
   ========================================================================== */
.uipb-ps { display: flex; flex-direction: column; gap: var(--uc-space-20); }
.uipb-ps__group { display: flex; flex-direction: column; gap: var(--uc-space-10); }
.uipb-ps__group + .uipb-ps__group { padding-top: var(--uc-space-20); border-top: 1px solid var(--uc-border-subtle); }
.uipb-ps__head { display: flex; align-items: center; gap: var(--uc-space-8); }
.uipb-ps h3 { margin: 0; color: var(--uc-text-strong); font-size: var(--uc-text-sm); font-weight: var(--uc-weight-medium); }

/* Layout: three cards, each a tiny page drawing + label + radio. */
.uipb-ps__layouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--uc-space-8); }
.uipb-ps__layout {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--uc-space-8);
  padding: var(--uc-space-10);
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-base);
  box-shadow: inset 0 0 0 1px var(--uc-border);
  cursor: pointer;
  transition: box-shadow var(--uc-dur-fast) var(--uc-ease-standard), background var(--uc-dur-fast) var(--uc-ease-standard);
}
.uipb-ps__layout:hover { background: var(--uc-surface-control); }
.uipb-ps__layout[data-checked] { box-shadow: inset 0 0 0 2px var(--uc-brand); }
.uipb-ps__layout:has(:focus-visible) { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.uipb-ps__radio { position: absolute; top: var(--uc-space-8); left: var(--uc-space-8); }
.uipb-ps__layout-text { display: flex; flex-direction: column; gap: 2px; }
.uipb-ps__layout-text strong { color: var(--uc-text-strong); font-size: var(--uc-text-sm); font-weight: var(--uc-weight-medium); }
.uipb-ps__layout-text span { color: var(--uc-text); font-size: var(--uc-text-xs); line-height: var(--uc-leading-snug); }

.uipb-ps__mini { display: flex; flex-direction: column; gap: 3px; height: 64px; padding: 5px; border-radius: var(--uc-radius-sm); background: var(--uc-surface-sunken); }
.uipb-ps__mini i { display: block; border-radius: var(--uc-radius-2); background: var(--uc-border-strong); }
.uipb-ps__mini-header, .uipb-ps__mini-footer { height: 7px; flex: none; opacity: 0.7; }
.uipb-ps__mini-title { height: 5px; width: 45%; margin: 2px auto 0; flex: none; }
.uipb-ps__mini-boxed { flex: 1; margin: 0 14px; background: var(--uc-text) !important; opacity: 0.55; }
.uipb-ps__mini-wide { flex: 1; background: var(--uc-text) !important; opacity: 0.55; }

.uipb-ps__row { display: flex; align-items: center; justify-content: space-between; gap: var(--uc-space-16); }
.uipb-ps__row > span:first-child:not(.uipb-ps__rowtext) { color: var(--uc-text); font-size: var(--uc-text-xs); }
.uipb-ps__rowtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.uipb-ps__rowtext > span { color: var(--uc-text); font-size: var(--uc-text-xs); }
.uipb-ps__select { width: 220px; }
.uipb-ps__note { margin: 0; color: var(--uc-text); font-size: var(--uc-text-xs); }
/* The page's full address under the slug field: long, so it wraps anywhere. */
.uipb-ps__link { overflow-wrap: anywhere; color: var(--uc-text-muted); }

/* =============================================================================
   Floating layout (Lovable-style)
   -----------------------------------------------------------------------------
   Two columns now: the canvas, and the side panel (the Composer's own panel,
   mounted as Elementor's drawer — Inspector.jsx). Both are floating cards on
   the app ground with an 8px gutter; the page fills the canvas card edge to
   edge. The top bar uses the same column template so its centre group sits
   over the page.

   The right column is sized by the drawer, the way Elementor's preview is:
   while it is open the Composer sets `--uich-dock-w` (its width) and
   `uich-hide-e-panel` on <body>, and clears both when it slides away. So the
   column opens with a selection, closes without one or on "Hide panel", and
   follows the drawer's resize handle — none of it decided here.

   Declared last and with the studio root's attributes, so it replaces the
   three-column grid above without editing it.
   ========================================================================== */
/* The gutter and the top bar's height are set on the editor's <body>, not on
   .uipb-studio, because the drawer shell and the Composer's canvas toolbar are
   mounted outside the studio (body-level layers) and line up on the same
   numbers. The panel's width is the drawer's own (`--uich-dock-w`).

   Three columns: the chat, the canvas, the panel. The two side columns each
   carry their own gutter (`--uipb-chat-col`, `--uipb-dock-col`) instead of a
   grid `column-gap`, so a closed side takes no gap with it. Each is 0 while
   its side is away: the chat column while `uipb-chat-open` is off <body>
   (Studio.jsx), the panel column while the drawer has not set
   `uich-hide-e-panel` (it sets that and `--uich-dock-w` while open). */
.uich-cb-body {
  --uipb-gutter: 8px;
  /* One corner for the builder's three cards (sidebar, canvas, panel) and the
     pieces that make them up — the DS large radius, not a 14px of its own. */
  --uipb-card-r: var(--uc-radius-lg);
  --uipb-topbar-h: 48px;
  /* The left sidebar's card, kept narrow so the canvas gets the room (Jay
     2026-10-22: "small and minimal"). */
  --uipb-chat-w: 288px;
  /* The sidebar's icon rail (sidebar/Sidebar.jsx), left of the chat / panel. */
  --uipb-rail-w: 44px;
  /* The three cards' frame — left panel, canvas, right panel — one hairline,
     the lightest border token. */
  --uipb-card-frame: 0 0 0 1px var(--uc-border-subtle);
  --uipb-chat-col: 0px;
  --uipb-dock-col: 0px;
}
.uich-cb-body.uipb-chat-open { --uipb-chat-col: calc(var(--uipb-rail-w) + var(--uipb-chat-w) + var(--uipb-gutter)); }
/* The left panel collapsed: its icon rail stays. */
.uich-cb-body.uipb-rail-only { --uipb-chat-col: calc(var(--uipb-rail-w) + var(--uipb-gutter)); }
.uich-cb-body.uich-hide-e-panel { --uipb-dock-col: calc(var(--uich-dock-w, 0px) + var(--uipb-gutter)); }
/* Smaller screens: the chat gives the canvas room first. */
@media (max-width: 1280px) { .uich-cb-body { --uipb-chat-w: 264px; } }

.uipb-studio {
  grid-template-columns: var(--uipb-chat-col) minmax(0, 1fr) var(--uipb-dock-col);
  grid-template-areas:
    'topbar topbar topbar'
    'agent canvas inspector';
  -moz-column-gap: 0;
       column-gap: 0;
  padding: 0 var(--uipb-gutter) var(--uipb-gutter);
  background: var(--uc-surface-base);
  /* The drawer's own slide: same duration and curve (composer-dock.css). */
  transition: grid-template-columns 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.uipb-studio[data-inspector='open'],
.uipb-studio[data-agent='rail'] { grid-template-columns: var(--uipb-chat-col) minmax(0, 1fr) var(--uipb-dock-col); }
.uipb-studio[data-inspector='closed'] { grid-template-columns: 0 minmax(0, 1fr) 0; }
/* Dragging the drawer's resize handle: the canvas tracks it 1:1, no easing. */
.uich-cb-body:has(#uichemy-composer-floating-panel .panel-resize:active) .uipb-studio { transition: none; }
@media (prefers-reduced-motion: reduce) { .uipb-studio { transition: none; } }
.uipb-studio[data-mode='preview'] { grid-template-columns: 0 minmax(0, 1fr) 0; padding: 0; }

/* Top bar on the app ground, in the body's three columns (Lovable's bar):
   the left group over the chat, the modes and the page over the canvas, the
   save state and Publish over the panel. Each side column is the body's own
   width variable (its card plus a gutter), floored at its content, so a closed
   side shrinks to what its group needs instead of to 0. */
.uipb-topbar.uipb-topbar--float {
  display: grid;
  grid-template-columns:
    minmax(max-content, var(--uipb-chat-col))
    minmax(0, 1fr)
    minmax(max-content, var(--uipb-dock-col));
  -moz-column-gap: 0;
       column-gap: 0;
  padding: 0;
  background: transparent;
  /* Match the canvas column through the sidebar's collapse animation. */
  transition: inherit;
}
/* Preview, and Globals over the working area: the body has no side columns. */
.uipb-studio[data-mode='preview'] .uipb-topbar--float,
.uipb-studio[data-inspector='closed'] .uipb-topbar--float { grid-template-columns: max-content minmax(0, 1fr) max-content; }
.uipb-topbar--float .uipb-topbar__canvas {
  display: grid;
  /* The left track never narrows below Design | Code · Layers · Settings, and
     the gap keeps that group clear of the device row. */
  grid-template-columns: minmax(max-content, 1fr) auto minmax(0, 1fr);
  -moz-column-gap: 16px;
       column-gap: 16px;
  align-items: center;
  min-width: 0;
}
.uipb-topbar--float .uipb-topbar__canvas > .uipb-modes,
.uipb-topbar--float .uipb-topbar__canvas > .uipb-topbar__modes-group { justify-self: start; }
/* Design | Code, then the Layers toggle beside it. */
.uipb-topbar__modes-group { display: inline-flex; align-items: center; gap: 6px; }
.uipb-topbar__sidebtn.uipb-topbar__sidebtn { gap: 0; width: var(--uc-control-h-sm, 28px); min-width: 0; padding: 0; justify-content: center; }
.uipb-topbar--float .uipb-topbar__left { display: flex; align-items: center; gap: var(--uipb-gutter); min-width: 0; padding: 0 0 0 8px; justify-self: start; }
/* The logo pill stands exactly over the sidebar's icon rail, and the page pill
   starts one gutter after it, as the cards below do. */
.uipb-topbar--float .uipb-topbar__home { box-sizing: border-box; width: var(--uipb-rail-w); margin-right: 0; padding: 0; }
/* Both pills carry the cards' hairline frame. The logo's hover / open ring
   (inset, a step stronger) replaces it rather than doubling it. */
.uipb-topbar--float .uipb-topbar__home:not(:hover):not([data-state='open']),
.uipb-topbar--float .uipb-topbar__address { box-shadow: var(--uipb-card-frame); }
.uipb-topbar--float .uipb-topbar__center { display: flex; align-items: center; gap: 12px; min-width: 0; position: static; transform: none; }
/* The device picker (TopBar.jsx DeviceMenu): the current device's icon and a
   chevron, one pill the height and fill of the page-name pill beside it. */
.uipb-topbar__device {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 28px;
  padding: 0 9px 0 6px;
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-control);
  color: var(--uc-text-strong);
  box-shadow: var(--uipb-card-frame);
  cursor: pointer;
  transition: box-shadow 120ms ease, color 120ms ease;
}
.uipb-topbar__device:hover,
.uipb-topbar__device[data-state='open'] { box-shadow: inset 0 0 0 1px var(--uc-border); }
.uipb-topbar__device:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.uipb-topbar__device-chevron { flex: none; color: var(--uc-text-muted); }
.uipb-device-menu { min-width: 160px; }
.uipb-device-menu__label { flex: 1; }
.uipb-device-menu__check { margin-right: auto; }
/* The device row stays put. Centred over the canvas column it slid every
   time a side panel opened or closed (the column changes width with them),
   so it is centred on the BAR — the window — instead, and keeps one place
   whatever the panels do. The bar is its containing block. */
.uipb-topbar.uipb-topbar--float { position: relative; }
.uipb-topbar--float .uipb-topbar__canvas > .uipb-topbar__center {
  position: absolute;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
  z-index: 1;
}
.uipb-topbar--float .uipb-topbar__right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; padding-right: var(--uipb-gutter); }

/* The canvas: a floating rounded card, the page edge to edge inside it. */
.uipb-studio .uipb-canvas {
  border-radius: var(--uipb-card-r);
  overflow: hidden;
  background: #fff;
  /* Hairline frame in both themes; light mode adds the soft panel lift below. */
  box-shadow: var(--uipb-card-frame);
}
.uipb-studio[data-mode='preview'] .uipb-canvas { border-radius: 0; box-shadow: none; }
.uipb-studio .uipb-canvas__stage { background: var(--uc-surface-base); }
.uipb-studio .uipb-canvas__doc { border: 0; border-radius: 0; }
/* Tablet / mobile widths: the page as a centred device column in the card. */
.uipb-studio .uipb-canvas__doc:has(.uipb-canvas__frame[data-breakpoint='tablet']),
.uipb-studio .uipb-canvas__doc:has(.uipb-canvas__frame[data-breakpoint='mobile']) { background: var(--uc-surface-base); }
.uipb-studio .uipb-canvas__frame[data-breakpoint='tablet'],
.uipb-studio .uipb-canvas__frame[data-breakpoint='mobile'] { margin: 0 auto; background: #fff; }

/* The side panel: Elementor's drawer shell, placed as the second floating card.
   It keeps every class and behaviour it has in Elementor — composer-dock.css
   still drives the slide (`active`, `uich-dock-slid`) and the panel still sets
   its width inline — and only its frame changes here: fixed over the grid's
   right column (which is exactly its width, see above) instead of flush to the
   window edge, under the top bar, with the canvas card's corners. */
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right {
  top: var(--uipb-topbar-h);
  left: var(--uipb-gutter);
  bottom: var(--uipb-gutter);
  /* Over the canvas, under the editor's dialogs and menus. */
  z-index: 20;
  border-right: 0;
  border-radius: var(--uipb-card-r);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle, rgb(255 255 255 / 8%));
}
/* Corners carried down to the panel rather than clipped here: the drawer's
   edge toggle sits just outside its left edge, and an overflow clip on the way
   down would hide it (and make it unclickable). */
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right > .uich-composer-host {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: inherit;
}
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right .panel.dock-right { border-radius: inherit; }
/* Its first and last strips paint their own fill with square corners, and
   the panel cannot clip them (overflow stays visible: the resize handle sits
   half outside its left edge). So the Editor | Code row takes the card's top
   corners and the body its bottom ones, and the panel drops its 1px top rule,
   which drew a second, inner line just under the shell's ring. Both themes. */
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right .panel.dock-right { border-top: 0; }
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right .panel.dock-right > .rp-panel-tabsrow { border-radius: var(--uipb-card-r) var(--uipb-card-r) 0 0; }
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right .panel.dock-right > .panel-body { border-radius: 0 0 var(--uipb-card-r) var(--uipb-card-r); overflow: hidden; }
/* With Code in the top bar there is no tabs row any more, so the body IS the
   top strip: square top corners let the inspector's grey poke out past the
   card's rounded ones. */
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right .panel.dock-right:not(:has(> .rp-panel-tabsrow)) > .panel-body { border-radius: var(--uipb-card-r); }
/* The chat column (below) lives inside this shell and is fixed to the window,
   so the shell must not be a containing block for it: no transform, ever —
   composer-dock.css slides the drawer with one. Away states hide it instead.
   The canvas column still eases (the grid transition above); the panel itself
   appears and goes without the slide. */
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right {
  transform: none !important;
}
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right:not(.active),
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right.uich-dock-slid {
  visibility: hidden;
}
/* "Hide panel": the panel goes, its edge toggle stays at the window edge to
   bring it back, as in Elementor. */
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right.active.uich-dock-slid .dock-edge-toggle {
  visibility: visible;
  position: fixed;
  right: auto;
  left: 0;
}

/* The chat column: the Composer's own chat (`.rp-chat-column`, rendered by the
   panel with `tabs={false}` / `chatOpen`), placed as the left card. It stays
   inside the drawer shell so every chat rule scoped to
   `#uichemy-composer-floating-panel .panel.dock-right` still applies, and is
   fixed over the grid's left column, which is exactly its width plus a gutter.
   Visible whatever the panel is doing — the shell may be hidden around it. */
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column {
  position: fixed;
  top: var(--uipb-topbar-h);
  bottom: var(--uipb-gutter);
  /* Right of the sidebar's icon rail. */
  right: calc(var(--uipb-gutter) + var(--uipb-rail-w));
  width: var(--uipb-chat-w);
  display: flex;
  flex-direction: column;
  min-height: 0;
  visibility: visible;
  border-radius: var(--uipb-card-r);
  /* No overflow clip: the chat's own menus (model, scope) open from inside it
     and must be able to leave the column. */
  background: var(--panel-bg, #181818);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle, rgb(255 255 255 / 8%));
}
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column > * { flex: 1; min-height: 0; }
/* The chat's empty state (mark, question, "Editing …" note, suggestion chips)
   centred in the sidebar card rather than hung on its left edge. */
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .ai-setup--simple { align-items: center; text-align: center; }
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .ai-setup--simple .ai-setup-mark { align-self: center; }
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .ai-setup--simple .ai-setup-head { align-items: center; }
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .ai-setup--simple .ai-setup-chips { justify-content: center; }
/* Compact chat for the narrow card: a smaller mark, question and chips, a
   shorter composer, and a slimmer tray under it. `.uich-cb-body` up front
   outranks the drawer's own ID-scoped rules (composer-dock.css). */
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .ai-setup--simple { gap: 10px; padding: 12px; }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .ai-setup-mark svg { width: 20px; height: 20px; }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .ai-setup-title { font-size: 13px; }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .ai-setup-note { font-size: 11.5px; line-height: 1.45; }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .ai-setup-chips { gap: 4px; }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .ai-setup-chips .ai-setup-chip { height: 24px; min-height: 0; padding: 0 9px; font-size: 11.5px; }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .chat2-main > .chat-composer { --ctl-card: var(--panel-bg); margin: 0 8px; padding: 6px 10px 6px 6px; border-radius: var(--uc-radius-lg); }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .chat-composer .composer-input { gap: 4px; }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .chat-composer .composer-input textarea:not(:where([data-uc])) { min-height: 40px; font-size: 13px; line-height: 20px; }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .composer-foot { padding-top: 0; }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .composer-foot > button { width: 26px; height: 26px; }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .composer-foot .model-dd { min-height: 26px; font-size: 12px; }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .composer-foot .model-dd > button { height: 26px; font-size: 12px; }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .chat2-main > .chat-status { margin: -10px 14px 8px; padding: 14px 6px 4px; }
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .chat-status button { height: 24px; min-height: 0; font-size: 12px; }
/* The chat's own boxes paint the card colour with square corners, and the
   column has no overflow clip (its menus must leave it), so their top corners
   covered the sidebar card's rounded ones and its hairline looked cut. Round
   them to the card's radius instead. */
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column > *,
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .chat2-wrap,
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .chat2-main {
  border-top-right-radius: 14px;
  border-top-left-radius: 14px;
}
/* Preview, and Globals over the working area, take the chat with the panel. */
.uich-cb-body:not(.uipb-chat-open) .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column { display: none !important; }
/* The chat fills the whole sidebar card. While Add, Layers or Settings is
   open that panel takes the card instead and `uipb-side-chat` is off, which
   hides the chat (rule above). */
.uich-cb-body:not(.uipb-side-chat) .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column { display: none !important; }
.uich-cb-body.uipb-side-chat .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column {
  top: var(--uipb-topbar-h);
  bottom: var(--uipb-gutter);
  /* Square on the rail's side: only the card's right corners are rounded. */
  border-radius: var(--uipb-card-r) 0 0 var(--uipb-card-r);
  box-shadow: none;
  background: transparent;
}
.uich-cb-body.uipb-side-chat .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column > *,
.uich-cb-body.uipb-side-chat .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .chat2-wrap,
.uich-cb-body.uipb-side-chat .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .chat2-main { border-top-right-radius: 0; }
/* Preview, and Globals over the working area: no panel. */
.uipb-studio[data-inspector='closed'] > #uichemy-composer-floating-panel { display: none; }

/* The modes keep their content width; the centre group stays centred over
   the canvas while there is room, and slides right rather than overlapping. */
.uipb-topbar--float .uipb-topbar__canvas { grid-template-columns: minmax(max-content, 1fr) auto minmax(0, 1fr); -moz-column-gap: 16px; column-gap: 16px; }
.uipb-topbar--float .uipb-topbar__address { display: flex; align-items: center; gap: 0; min-width: 0; max-width: 300px; padding: 0 2px 0 5px; height: 28px; border-radius: var(--uc-radius-md); background: var(--uc-surface-control); color: var(--uc-text); }
/* Even insets: 10px before the name (2px pad + 8px), and 10px after the
   chevron's glyph (5px pad + the 24px button's own 5px). */
.uipb-topbar--float .uipb-topbar__address .uipb-topbar__title.uipb-topbar__title { padding: 0 8px 0 4px; }
.uipb-topbar--float .uipb-topbar__address > :last-child { width: 24px; min-width: 24px; }
.uipb-topbar--float .uipb-topbar__address .uipb-topbar__titletext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; display: inline-block; }

/* The Composer panel's own canvas toolbar. The pill is `position: fixed;
   left: 50%` (its module CSS, no inline position), so it centres on the WINDOW
   whatever its host does. Centre it over the canvas card instead: the card
   spans the window minus the side panel and a gutter, so its middle is
   (100vw - panel - gutter) / 2. The pill keeps its own translateX(-50%), so
   this is the point it centres on. */
.uich-cb-body .uipb-studio > .uich-composer-host.uich-canvas-toolbar-host .canvas-toolbar-wrap {
  /* The canvas card's middle: the window's, moved right by the chat column and
     left by the panel column (each 0 while its side is away). */
  right: calc((100vw + var(--uipb-chat-col) - var(--uipb-dock-col)) / 2);
}
/* Responsive preview is a canvas tool, beside History in the bottom bar. */
.uich-cb-body .canvas-toolbar-wrap .uipb-device-picker { width: 44px; }
.uipb-device-picker__icon { display: inline-flex; align-items: center; gap: 2px; }
.uich-cb-body .canvas-toolbar-wrap .uipb-device-picker[data-state='open'] { background: var(--uc-tb-active-bg); box-shadow: var(--uc-tb-active-ring); color: var(--uc-text-strong); }
/* Draw (the toolbar's pencil) swaps the toolbar for its own bar in the same
   spot: the bar centres on the same point (its module CSS only allows for the
   right panel, not the chat column), and the toolbar steps out while it is up
   rather than showing behind it. */
.uich-cb-body .annotate-bar { right: calc((100vw + var(--uipb-chat-col) - var(--uipb-dock-col)) / 2); }
.uich-cb-body:has(.annotate-bar) .uipb-studio > .uich-composer-host.uich-canvas-toolbar-host .canvas-toolbar-wrap { visibility: hidden; pointer-events: none; }

/* Top bar: the history group and the save state. */
.uipb-topbar--float .uipb-topbar__group { display: inline-flex; align-items: center; gap: 2px; }
.uipb-topbar__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  color: var(--uc-text);
  font-size: var(--uc-text-xs, 12px);
  white-space: nowrap;
  cursor: default;
}
.uipb-topbar__status[data-dirty] { color: var(--uc-text-strong); }
.uipb-topbar__status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--uc-warning, #f5a524); }

/* The Composer's "Minimise panel" (its canvas toolbar) and the drawer's edge
   toggle slide it away and clear `--uich-dock-w`, so the column above closes
   on its own; "Open panel" on the same toolbar brings it back. */

/* Right-click section menu: the invisible point it opens from. */
.uipb-section-menu__anchor { position: fixed; width: 1px; height: 1px; pointer-events: none; }

/* Keyboard shortcuts sheet. */
.uipb-keys { display: flex; flex-direction: column; gap: var(--uc-space-16); }
.uipb-keys__group h3 { margin: 0 0 var(--uc-space-6); color: var(--uc-text-strong); font-size: var(--uc-text-xs); font-weight: var(--uc-weight-medium); text-transform: uppercase; letter-spacing: .06em; }
.uipb-keys__group dl { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.uipb-keys__row { display: flex; align-items: center; justify-content: space-between; gap: var(--uc-space-16); min-height: 28px; }
.uipb-keys__row dt { color: var(--uc-text); font-size: var(--uc-text-sm); }
.uipb-keys__row dd { margin: 0; }
.uipb-keys__row kbd { display: inline-block; padding: 2px 8px; border-radius: var(--uc-radius-sm); background: var(--uc-surface-control); box-shadow: inset 0 0 0 1px var(--uc-border); color: var(--uc-text-strong); font: 500 12px/18px var(--uc-font-mono, ui-monospace, monospace); white-space: pre; }

/* Command palette (⌘K). The dialog is centred, so the Combobox inside it gets a
   fixed height: a list that shrank with every letter typed would move the
   search field under the cursor. The Combobox caps itself at 360px for a
   dropdown; here it is the whole dialog, so that cap is lifted. */
/* The tray takes the list's own surface, so the sticky group headings
   (drawn on --uc-surface-overlay) do not read as bands across it. */
.uipb-palette { padding: var(--uc-space-8); background: var(--uc-surface-overlay, var(--uc-surface-raised)); }
/* The light theme's --uc-surface-overlay is a 10% white glass, which over the
   dialog scrim left the palette see-through. Solid white there instead. */
.uipb-palette.uc-content[data-theme='light'] { background: var(--uc-surface-raised); }
.uipb-palette > :last-child { height: min(440px, calc(100vh - 120px)); max-height: none; }
.uipb-palette > :last-child > :first-child { flex: none; }
.uipb-palette [role="listbox"] { flex: 1 1 auto; }

/* Read by screen readers, not drawn (the palette's dialog title). */
.uipb-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Narrow screens: the page name gives up width before anything overlaps. */
@media (max-width: 1080px) {
  .uipb-topbar--float .uipb-topbar__address { max-width: 180px; }
  .uipb-topbar--float .uipb-topbar__address .uipb-topbar__titletext { max-width: 110px; }
}
/* Right-to-left: the grid mirrors, so the panel is on the left and the canvas
   centre moves right by the panel's width. */
.uich-cb-body.rtl .uipb-studio > .uich-composer-host.uich-canvas-toolbar-host :is(.canvas-toolbar-wrap, .canvas-toolbar-handle),
.uich-cb-body.rtl .annotate-bar {
  right: calc((100vw - var(--uipb-chat-col) + var(--uipb-dock-col)) / 2);
}

/* The canvas toolbar floats inside the canvas card, over the foot of the page
   (Jay, 2026-10-27): the pill keeps its own `bottom: 24px`, 16px in from the
   card's edge. The chevron at its end hides it to a handle
   (CanvasToolbarContent `collapsible`), which sits in the same spot: its grip
   lines up with the pill's bottom edge, centred on the canvas card. */
.uich-cb-body .uipb-studio > .uich-composer-host.uich-canvas-toolbar-host .canvas-toolbar-handle {
  right: calc((100vw + var(--uipb-chat-col) - var(--uipb-dock-col)) / 2);
  bottom: calc(var(--uipb-gutter) + 4px + var(--uich-mtl-h, 0px));
}
/* Draw swaps the pill for its own bar; the handle steps out with it. */
.uich-cb-body:has(.annotate-bar) .canvas-toolbar-handle { visibility: hidden; }

/* =============================================================================
   Left sidebar: Add · Layers · AI chat (sidebar/Sidebar.jsx)
   The card sits in the grid's left column; every control in it is a design-
   system component, so these rules only place them. The AI chat tab's body is
   the Composer's chat column, fixed over the card below the tab row (above).
   ========================================================================== */
/* The old tab row's height, still read by the right column's head. */
.uich-cb-body {
  --uipb-side-tabs-h: 52px;
}
.uipb-side {
  /* The resize handle (SideResizeHandle) is placed against it. */
  position: relative;
  grid-area: agent;
  width: calc(var(--uipb-rail-w) + var(--uipb-chat-w));
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
/* The rail and the panel are the cards, each with the canvas card's frame. An
   outer ring, not an inset one: the tab bodies (and the chat column fixed over
   the panel) paint their own fill and would cover an inset ring. */
.uipb-side__rail,
.uipb-side__body {
  background: var(--uc-surface-base);
  box-shadow: var(--uipb-card-frame);
}
/* The DS Tabs root is a flex COLUMN, so the row is centred with justify-content
   (align-items would only centre it across). */
.uipb-side__tabs { flex: none; height: var(--uipb-side-tabs-h); display: flex; flex-direction: column; justify-content: center; align-items: stretch; padding: 0 12px; border-bottom: 1px solid var(--uc-border-subtle); }
.uipb-side__tabs [role='tablist'] { width: 100%; }
.uipb-side__tabs [role='tab'] { flex: 1 1 0; justify-content: center; gap: 6px; }
.uipb-side__subtabs { flex: none; padding: 8px 12px 0; }
.uipb-side__scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; scrollbar-width: none; }
/* Scrolls by wheel / trackpad / keyboard with no visible scrollbar, which drew
   as a light track down the dark card. The section's element tree in Layers
   scrolls on its own, and goes without one too. */
.uipb-side__scroll::-webkit-scrollbar,
.uipb-side__tree .uipb-layers::-webkit-scrollbar { display: none; }
.uipb-side__tree .uipb-layers { scrollbar-width: none; }
.uipb-side__chat { flex: 1; min-height: 0; }
/* The icon rail (AI · Layers · SEO · Pages · Settings) and the card it switches. */
.uipb-side__rail {
  flex: none;
  width: var(--uipb-rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Room between the icons (Jay 2026-10-22). */
  gap: 8px;
  padding: 8px 0;
  /* Square where the panel joins it. */
  border-radius: 0 var(--uipb-card-r) var(--uipb-card-r) 0;
}
/* 32px: 7px of room round the 18px icon in the pressed / hover box. */
.uipb-side__railbtn.uipb-side__railbtn { width: 32px; height: 32px; min-width: 0; padding: 0; border-radius: var(--uc-radius-md); color: var(--uc-text-muted); }
.uipb-side__railbtn > svg { width: 18px; height: 18px; flex-shrink: 0; }
/* Every rail control is the same IconButton with the same inset ghost hover.
   Selection reads aria-pressed, not the Tooltip trigger's data-state. */
.uipb-side__railbtn.uipb-side__railbtn[aria-pressed='true'] { color: var(--uc-text-strong); }
.uipb-side[data-collapsed] { width: var(--uipb-rail-w); }
/* Collapsed, the rail is a narrow strip on its own: a smaller radius than the cards', which read as a pill at 52px wide. */
.uipb-side[data-collapsed] .uipb-side__rail { border-radius: var(--uc-radius-md); }
/* The collapse / expand button, at the rail's foot. */
.uipb-side__railtoggle.uipb-side__railtoggle { margin-top: auto; }
/* A short hairline between the page panels and Site styles (site-wide). */
.uipb-side__railsep.uipb-side__railsep { flex: none; width: 16px; height: 1px; margin: 4px 0; background: var(--uc-border-subtle); }
.uipb-side__body {
  flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  /* Over the rail's edge by a pixel, so the two rings make one hairline. */
  margin-right: -1px;
  position: relative;
  border-radius: var(--uipb-card-r) 0 0 var(--uipb-card-r);
  overflow: hidden;
}
/* The sidebar's resize handle (sidebar/SideResizeHandle.jsx), the same as the
   right panel's (composer-dock.css .panel-resize): a 16px strip across the
   card's right edge with a 4×48 grip pill in the middle of it, grey at rest and
   bright on hover, focus and while dragging. Above the AI chat column drawn
   over the card. */
.uipb-side__resize { position: absolute; z-index: 60; top: 0; bottom: 0; left: -8px; width: 16px; cursor: ew-resize; touch-action: none; }
.uipb-side__resize::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 50%;
  width: 4px;
  height: 48px;
  transform: translate(50%, -50%);
  border-radius: var(--uc-radius-4, 4px);
  background: #404040;
  transition: background-color 120ms;
}
.uipb-studio[data-uipb-theme='light'] .uipb-side__resize::after { background: rgba(0, 0, 0, 0.14); }
.uipb-side__resize:hover::after,
.uipb-side__resize:focus-visible::after,
.uich-cb-body.uipb-resizing .uipb-side__resize::after { background: var(--uc-text-strong); }
/* Keyboard users need to see where focus is (M-07). */
.uipb-side__resize:focus-visible { outline: 2px solid var(--uc-text-strong); outline-offset: -2px; }
.uipb-side__row-meta { flex: none; color: var(--uc-text-muted); font-size: var(--uc-text-xs); text-transform: capitalize; }
/* SEO uses the right inspector's card layout (.rp-insp / .rp-sec): a base
   tray, raised cards, 6px outer gutters and gaps, and 12px inside each card.
   Keep this scoped to the builder's SEO sidebar: the shared SEO panel also
   mounts in the dashboard, Elementor, Gutenberg and Bricks. */
.uipb-side__seo {
  padding: var(--uc-space-6);
  background: var(--uc-surface-base);
}
.uipb-side__seo .uipb-seo .useo-panel {
  padding-top: 0;
  gap: var(--uc-space-6);
  font-size: var(--uc-text-xs);
  line-height: 1.4;
}
.uipb-side__seo :is(.useo-main, .useo-rows > div, .useo-status > div) {
  min-width: 0;
  border: 0;
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-raised);
  box-shadow: none;
  overflow: hidden;
}
.uipb-side__seo .useo-main {
  padding: var(--uc-space-12);
  gap: var(--uc-space-12);
}
.uipb-side__seo .useo-rows {
  margin: 0;
  padding: 0;
  border: 0;
  gap: var(--uc-space-6);
  background: transparent;
}
.uipb-side__seo :is(.useo-rows, .useo-status) > div > h3 > button {
  min-height: 40px;
  gap: var(--uc-space-8);
  padding: var(--uc-space-12);
  font-size: var(--uc-text-xs);
  font-weight: var(--uc-weight-medium);
  line-height: 1.4;
  color: var(--uc-text-strong);
}
.uipb-side__seo :is(.useo-rows, .useo-status) > div > h3 > button:hover { background: transparent; }
.uipb-side__seo :is(.useo-rows, .useo-status) > div > [role='region'] > div {
  gap: var(--uc-space-12);
  padding: var(--uc-space-2) var(--uc-space-12) var(--uc-space-12);
}
.uipb-side__seo :is(.useo-rows, .useo-status) > div > [role='region'][data-state='open'] {
  height: auto;
  animation: none;
}
.uipb-side__seo .useo-status.is-warn .useo-status__icon { color: var(--uc-warning-fg); }
.uipb-side__seo .useo-status.is-ok .useo-status__icon { color: var(--uc-success-fg); }
.uipb-side__seo :is(.useo-label, .useo-tiplabel) { color: var(--uipb-inspector-label); }
.uipb-side__seo .useo-label { font-size: var(--uc-text-sm); line-height: 18px; }
.uipb-side__seo .useo-panel {
  --uc-input-h: var(--uc-control-h-sm);
  --uc-input-px: var(--uc-space-8);
  --uc-input-radius: var(--uc-radius-sm);
}
.uipb-side__seo .useo-panel :is(input[class], textarea[class], button[role='combobox']) { font-size: var(--uc-text-xs); }
.uipb-side__seo .useo-panel input[class]:not([type='checkbox']):not([type='radio']) {
  height: var(--uc-control-h-sm);
  padding-right: var(--uc-space-8);
}
.uipb-side__seo .useo-panel textarea[class] {
  padding-block: var(--uc-space-8);
  padding-right: var(--uc-space-8);
}
.uipb-side__seo .useo-panel button[role='combobox'] {
  width: 100%;
  min-width: 0;
  height: var(--uc-control-h-sm);
  min-height: 0;
  border-radius: var(--uc-radius-sm);
  background: var(--uipb-field-bg);
  background-image: none;
}
.uipb-side__seo :is(.useo-serp__card, .useo-card, .useo-head, .useo-entities .useo-disclosure h3 > button) {
  border-radius: var(--uc-radius-sm);
  background: var(--uc-surface-base);
}
.uipb-side__seo .useo-savebar {
  margin-top: 0;
  padding: var(--uc-space-12);
  border-top: 0;
  border-radius: var(--uc-radius-md);
  background: var(--uc-surface-raised);
}
/* Fewer words in the builder's SEO panel (Jay 2026-10-23: "remove extra
   texts"), here only — Elementor, Gutenberg and Bricks share the panel:
   - "Automatic" by each field: the grey placeholder already shows the
     automatic value, and Reset still appears once you type your own;
   - an open row's summary ("Automatic", "A web page", "4 items"): the row's
     own fields say it; it stays on a closed row, where it is the only clue;
   - the 1200 × 630 px line under Choose image: the size is in its (i) tip.
   The summary is hidden, not removed: its `margin-left: auto` is what holds
   the row's chevron at the right edge. */
.uipb-side__seo .useo-auto,
.uipb-side__seo .useo-sharing-image > .useo-note { display: none; }
.uipb-side__seo [data-state='open'] > .useo-row__sum { visibility: hidden; }
/* Add / Layers, over the whole card in place of the chat. */
.uipb-side__panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* 46px: the title sits level with the rail's first button (8px in, 30px tall),
   at the chat's 13px, inset 12px like the panel's content below it. */
.uipb-side__panel-head { flex: none; height: 46px; display: flex; align-items: center; gap: 2px; padding: 0 12px 0 8px; border-bottom: 1px solid var(--uc-border-subtle); color: var(--uc-text-strong); font-size: 13px; font-weight: var(--uc-weight-medium); }
.uipb-side__panel-head button { width: 26px; height: 26px; min-height: 0; }
.uipb-side__panel-title { flex: 1; min-width: 0; }
.uipb-side__stack { display: flex; flex-direction: column; gap: 12px; }
.uipb-side__hint { margin: 0; color: var(--uc-text-muted); font-size: var(--uc-text-xs); line-height: 1.45; }
.uipb-side__hint b { color: var(--uc-text); font-weight: var(--uc-weight-medium); }
.uipb-side__more { align-self: flex-start; }
.uipb-side__group { display: flex; flex-direction: column; gap: 8px; }
.uipb-side__group + .uipb-side__group { margin-top: 4px; }
.uipb-side__group-title { margin: 4px 0 0; color: var(--uc-text-muted); font-size: 11px; font-weight: var(--uc-weight-medium); letter-spacing: .06em; text-transform: uppercase; }
.uipb-side__tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
/* An element tile: the DS outline Button, stacked icon over label. */
.uipb-side__tile.uipb-side__tile { height: auto; min-height: 64px; flex-direction: column; gap: 6px; padding: 10px 4px; font-size: var(--uc-text-xs); white-space: normal; }
/* Flat tiles: the outline Button's hairline only — no raised drop shadow and
   no sheen (its light-to-grey gradient). Hover tints the fill instead. */
.uipb-side__tile.uipb-side__tile { box-shadow: inset 0 0 0 1px var(--uc-border-subtle); background-image: none; }
.uipb-side__tile.uipb-side__tile:hover:not(:disabled) { background-image: linear-gradient(var(--uc-brand-glow-hover), var(--uc-brand-glow-hover)); box-shadow: inset 0 0 0 1px var(--uc-border); }
/* Library in the sidebar: one column, the sidebar scrolls. */
.uipb-lib__grid.uipb-lib__grid--column { grid-template-columns: minmax(0, 1fr); }
/* The section library in the sidebar (LibraryTab `fill`): no padding of its
   own (the sidebar's scroll already has it), the categories as one row of
   chips that scrolls sideways instead of wrapping in a box, and light cards —
   preview on top, name and category under it, "Add" on hover. */
.uipb-side .uipb-lib { display: flex; flex-direction: column; gap: 12px; padding: 0; }
.uipb-side .uipb-lib__filters {
  display: flex; flex-wrap: nowrap; gap: 6px; margin: 0; padding: 0;
  overflow-x: auto; scrollbar-width: none;
  background: transparent; box-shadow: none; border-radius: 0;
  /* The row scrolls sideways: its right edge fades out so a cut chip reads
     as "more this way", and the end padding lets the last chip clear the fade. */
  padding-left: 28px;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}
.uipb-side .uipb-lib__filters::-webkit-scrollbar { display: none; }
.uipb-side .uipb-lib__filters > button {
  flex: none; height: 26px; padding: 0 10px; border-radius: var(--uc-radius-pill);
  background: transparent; box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
  color: var(--uc-text-muted); font-size: var(--uc-text-xs); font-weight: var(--uc-weight-medium);
}
.uipb-side .uipb-lib__filters > button:hover { color: var(--uc-text-strong); box-shadow: inset 0 0 0 1px var(--uc-border); }
.uipb-side .uipb-lib__filters > button[data-state='on'] { background: var(--uc-inverse-bg); color: var(--uc-inverse-fg); box-shadow: none; }
.uipb-side .uipb-lib__grid--column { gap: 8px; }
/* Flat cards: a hairline, no lift. Hover and focus strengthen the ring. */
.uipb-side .uipb-lib__card {
  border-radius: var(--uc-radius-md); background: var(--uc-surface-raised);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
  transition: box-shadow 140ms ease;
}
.uipb-side .uipb-lib__card:hover,
.uipb-side .uipb-lib__card:focus-visible { box-shadow: inset 0 0 0 1px var(--uc-border-strong); transform: none; }
/* The preview: a 1280px page fitted to the card's width (LibraryTab measures
   it into --uipb-lib-fit), cropped to a 16:9 window. */
.uipb-side .uipb-lib__shot { height: auto; aspect-ratio: 16 / 9; margin: 4px 4px 0; border-radius: var(--uc-radius-xs); box-shadow: inset 0 0 0 1px var(--uc-border-subtle); }
.uipb-side .uipb-lib__shot iframe { transform: scale(var(--uipb-lib-fit, 0.2)); }
/* Fitted (LibraryTab `fit`): the window stays 16:9 on every card; the frame is
   as tall as the section's document, and one shorter than the window moves
   down (--uipb-lib-top, page pixels, before the scale) to sit in its middle on
   the section's own background. The ring sits over the frame (::after), since
   the frame paints over an inset shadow. */
.uipb-side .uipb-lib__shot[data-fitted] iframe { height: var(--uipb-lib-doc-h, 800px); transform: scale(var(--uipb-lib-fit, 0.2)) translateY(var(--uipb-lib-top, 0px)); }
.uipb-side .uipb-lib__shot::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--uc-border-subtle); pointer-events: none; }
.uipb-side .uipb-lib__meta { padding: 8px 10px 9px; gap: 6px; }
.uipb-side .uipb-lib__name { font-size: var(--uc-text-sm); font-weight: var(--uc-weight-medium); color: var(--uc-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The category, as quiet text rather than a filled badge (the DS Badge's own
   class names are hashed, so it is addressed by position). */
.uipb-side .uipb-lib__meta > :not(.uipb-lib__name) { flex: none; height: auto; background: transparent; box-shadow: none; border: 0; padding: 0; color: var(--uc-text-muted); font-size: var(--uc-text-xs); font-weight: 400; }
/* "Add", over the preview's corner while the card is hovered. */
.uipb-lib__add { display: none; }
.uipb-side .uipb-lib__add {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px;
  border-radius: var(--uc-radius-pill); background: #171717; color: #fff;
  font-size: 11.5px; font-weight: var(--uc-weight-medium);
  box-shadow: 0 2px 8px rgb(0 0 0 / 25%);
  opacity: 0; transform: translateY(-2px); transition: opacity 140ms ease, transform 140ms ease; pointer-events: none;
}
.uipb-side .uipb-lib__card:hover .uipb-lib__add,
.uipb-side .uipb-lib__card:focus-visible .uipb-lib__add { opacity: 1; transform: none; }
/* The All view's category headings (LibraryTab), quiet, with the count; and
   each card's "Adds after …", shown on hover and keyboard focus only. */
.uipb-side .uipb-lib__group { margin: 4px 2px -4px; color: var(--uc-text-muted); font-size: 11.5px; font-weight: var(--uc-weight-medium); }
.uipb-side .uipb-lib__group:first-child { margin-top: 0; }
.uipb-side .uipb-lib__meta { padding: 6px 8px 7px; }
.uipb-side .uipb-lib__meta .uipb-lib__name { font-size: 12.5px; }
.uipb-side .uipb-lib__meta .uipb-lib__where { margin-right: auto; font-size: 11px; opacity: 0; transition: opacity 120ms ease; }
.uipb-side .uipb-lib__card:hover .uipb-lib__where,
.uipb-side .uipb-lib__card:focus-visible .uipb-lib__where { opacity: 1; }
/* Templates */
.uipb-side__starter { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.uipb-side__starter-head { display: flex; align-items: center; gap: 8px; color: var(--uc-text-strong); }
.uipb-side__starter-name { flex: 1; font-weight: var(--uc-weight-medium); font-size: var(--uc-text-sm); }
.uipb-side__starter-blurb { margin: 0; color: var(--uc-text); font-size: var(--uc-text-xs); }
.uipb-side__starter-parts { margin: 0; color: var(--uc-text-muted); font-size: 11px; }
/* Layers: the outline */
.uipb-side__outline { gap: 2px; }
.uipb-side__outline > .uipb-side__hint { margin-bottom: 8px; }
.uipb-side__row.uipb-side__row { width: 100%; justify-content: flex-start; gap: 8px; }
.uipb-side__row[aria-pressed='true'] { background: var(--uc-surface-control); color: var(--uc-text-strong); }
.uipb-side__row--fixed { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px 0 4px; color: var(--uc-text-muted); }
.uipb-side__row-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
/* A section row's actions (Sidebar.jsx LayerActions), over the row's right
   end: shown on hover, on keyboard focus and on the selected row. The row's
   label gives way to them rather than running under them. */
.uipb-side__layer { position: relative; }
.uipb-side__layer-actions {
  position: absolute; top: 0; left: 4px; height: var(--uc-control-h-sm, 28px);
  display: flex; align-items: center; gap: 0;
  opacity: 0; pointer-events: none; transition: opacity 120ms ease;
}
.uipb-side__layer-actions .uc-button-icon-only,
.uipb-side__layer-actions button { width: 24px; height: 24px; }
.uipb-side__layer:hover > .uipb-side__layer-actions,
.uipb-side__layer:focus-within > .uipb-side__layer-actions,
.uipb-side__layer[data-selected] > .uipb-side__layer-actions { opacity: 1; pointer-events: auto; }
.uipb-side__layer:hover > .uipb-side__row .uipb-side__row-label,
.uipb-side__layer:focus-within > .uipb-side__row .uipb-side__row-label,
.uipb-side__layer[data-selected] > .uipb-side__row .uipb-side__row-label { padding-left: 124px; }
/* In the sidebar the tree is the whole panel, so it runs at full length and
   the sidebar scrolls; the 220px box is for the inspector, where it shares
   the column with the style sections. */
.uipb-side__tree { padding: 0; }
.uipb-side__tree .uipb-layers { max-height: none; overflow: visible; padding: 0; }
/* The page's header and footer rows, lined up with the section rows' icons
   (the 16px caret + 6px gap of a layer row). */
.uipb-side__outline > .uipb-side__row--fixed { min-height: 28px; padding: 0 28px 0 4px; gap: 6px; color: var(--uc-text-strong); }
.uipb-side__outline > .uipb-side__row--fixed .uipb-side__row-label { font-size: 13px; font-weight: var(--uc-weight-regular); }
/* The sidebar's tree on the chat's compact scale: 28px rows, 13px text, 16px a
   level. The inspector's tree keeps the full measure above. */
.uipb-side .uipb-layer { --indent: calc(var(--depth, 0) * 16px); height: 28px; gap: 6px; }
.uipb-side .uipb-layer__name { font-size: 13px; }
.uipb-side .uipb-layer__icon svg,
.uipb-side__outline > .uipb-side__row--fixed svg { width: 14px; height: 14px; }
/* The page's own sections between dashed rules, the header above, the footer below. */
.uipb-side__outline > .uipb-side__row--fixed:is(.uipb-side__row--header, .uipb-side__row--footer) {
  /* Shaped like a layer row (.uipb-layer): 28px, rounded, its hover / selected
     fill an inset pill. The dashed rule that sets the page's own layers apart
     is drawn just outside it (below), not taken out of the row's height. */
  position: relative;
  height: 28px;
  min-height: 28px;
  padding-top: 0;
  padding-bottom: 0;
  border: 0;
  border-radius: 6px;
}
.uipb-side__outline > .uipb-side__row--header { margin-bottom: 9px; }
.uipb-side__outline > .uipb-side__row--footer { margin-top: 9px; }
.uipb-side__outline > .uipb-side__row--header::after,
.uipb-side__outline > .uipb-side__row--footer::before {
  content: '';
  position: absolute;
  right: 0;
  left: 0;
  border-top: 1px dashed var(--uc-border-subtle);
  pointer-events: none;
}
.uipb-side__outline > .uipb-side__row--header::after { bottom: -5px; }
.uipb-side__outline > .uipb-side__row--footer::before { top: -5px; }
/* A UiChemy header / footer row selects it (Sidebar.jsx TemplateRow). */
/* Hover, selected and text exactly as a layer row's (.uipb-layer). */
.uipb-side__outline > .uipb-side__row--fixed[role='button'] { cursor: pointer; }
.uipb-side__outline > .uipb-side__row--fixed:is(.uipb-side__row--header, .uipb-side__row--footer) { color: var(--uc-text-strong); }
.uipb-side__outline > .uipb-side__row--fixed:is(.uipb-side__row--header, .uipb-side__row--footer) .uipb-side__row-label { font-size: 13px; font-weight: 400; line-height: 19.5px; }
.uipb-side__outline > .uipb-side__row--fixed:is(.uipb-side__row--header, .uipb-side__row--footer):hover { background: color-mix(in srgb, var(--uc-text-strong) 5%, transparent); }
.uipb-side__outline > .uipb-side__row--fixed[data-selected] { background: color-mix(in srgb, var(--uc-brand) 16%, transparent); }
.uipb-side__outline > .uipb-side__row--fixed[data-selected] .uipb-side__row-label { font-weight: 600; }
.uipb-side__outline > .uipb-side__row--fixed:is([role='button'], .uipb-side__row--ghost):focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
/* The pencil (and the ghost row's +) appear on approach, as a layer row's
   actions do: on hover, keyboard focus and the selected row. */
.uipb-side__row-edit.uipb-side__row-edit { flex: none; width: 24px; height: 24px; min-width: 24px; margin-right: auto; }
.uipb-side__outline > .uipb-side__row--fixed :is(.uipb-side__row-edit, .uipb-side__row-add) { opacity: 0; transition: opacity var(--uc-dur-fast, 120ms) var(--uc-ease-standard, ease); }
.uipb-side__outline > .uipb-side__row--fixed:is(:hover, :focus-within, :focus-visible, [data-selected]) :is(.uipb-side__row-edit, .uipb-side__row-add) { opacity: 1; }
/* No header / footer on the page: "Add header" / "Add footer" in its place
   (Sidebar.jsx TemplateRow), in a layer row's text, the + on hover. */
.uipb-side__outline > .uipb-side__row--ghost .uipb-side__row-label { color: var(--uc-text-muted); }
.uipb-side__outline > .uipb-side__row--ghost:is(:hover, :focus-visible) .uipb-side__row-label { color: var(--uc-text-strong); }
.uipb-side__outline > .uipb-side__row--ghost > svg:first-child { color: var(--uc-text-muted); }
.uipb-side__row-add { flex: none; margin-right: auto; margin-left: 5px; color: var(--uc-text-strong); }
.uipb-side__outline { gap: 0; }
/* No sections: the outline fills the panel, the header row stays on top, the
   footer at the foot, and "No sections yet" with its Add section button sits
   in the middle between them. */
.uipb-side__outline:has(> .uipb-side__outline-empty) { min-height: 100%; }
.uipb-side__outline > .uipb-side__outline-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px 12px; text-align: center; }
.uipb-side__outline-empty > .uipb-side__hint { margin: 0; }

/* "Add section" bars (canvas/InsertPoint.jsx): a hairline across the
   boundary with the DS Button on it, shown on hover (see below). */
.uipb-insert { position: absolute; right: 0; left: 0; bottom: -14px; height: 28px; display: flex; justify-content: center; align-items: center; pointer-events: none; z-index: 2; }
.uipb-insert[data-edge='top'] { top: -14px; bottom: auto; }
.uipb-insert[data-edge='top'][data-flush='true'] { top: 4px; }
.uipb-insert::before { content: ''; position: absolute; right: 24px; left: 24px; top: 50%; height: 1px; background: color-mix(in srgb, var(--uc-brand) 30%, transparent); opacity: 0; transition: opacity var(--uc-dur-fast) var(--uc-ease-standard); }
.uipb-insert:hover::before, .uipb-insert:focus-within::before { opacity: 1; }
.uipb-insert > * { opacity: 0; pointer-events: auto; transition: opacity var(--uc-dur-fast) var(--uc-ease-standard); }
/* On hover only: the seams of a hovered or selected section (its bottom one,
   and the one above it, owned by the section before), and a seam the pointer
   or the keyboard is on. */
.uipb-overlay > :is([data-state='hover'], [data-state='selected']) > .uipb-insert > *,
.uipb-overlay > :has(+ :is([data-state='hover'], [data-state='selected'])) > .uipb-insert > *,
.uipb-insert:hover > *, .uipb-insert:focus-within > * { opacity: 1; }
/* The DS Button as it is (sm, solid, neutral) — no local size or radius. */
.uipb-insert__btn.uipb-insert__btn { position: relative; }
.uipb-overlay[data-dragging='true'] .uipb-insert { display: none; }

/* The page's end (canvas/PageEndBar.jsx): one dashed box over the strip the
   page keeps for it, with 64px vertical and 24px horizontal padding around
   the three small buttons inside.
   `uc-scope` brings the light tokens and its own surface; the surface is
   dropped, the page shows through. The border darkens while the pointer is on
   the box, and clicking it between the buttons adds a section. The border
   sits halfway between --uc-border-strong and --uc-border-hover. */
.uipb-pageend.uipb-pageend { position: absolute; box-sizing: border-box; display: flex; align-items: center; gap: var(--uc-space-12); padding: calc(var(--uc-space-32) * 2) var(--uc-space-24); border: 1px dashed color-mix(in srgb, var(--uc-border-strong), var(--uc-border-hover)); border-radius: var(--uc-radius-lg); background: none; cursor: pointer; transition: border-color var(--uc-dur-fast) var(--uc-ease-standard); }
.uipb-pageend:hover { border-color: var(--uc-border-hover); }
/* The three are compact, sized to their labels with a little more room
   either side than a plain small button, and sit together in the box's middle
   (Jay 2026-10-28: "compact button little bit"); on a phone-width canvas they
   wrap. */
.uipb-pageend.uipb-pageend { justify-content: center; flex-wrap: wrap; }
.uipb-pageend > * { flex: none; padding-inline: var(--uc-space-16); }
/* Muted (InsertPoint `muted`): off the seams of a section whose element is
   picked, where the element's floating toolbar may sit. */
.uipb-insert[data-muted='true'] { display: none; }

/* An empty page's start choices (canvas/EmptyStart.jsx), over the page's slot. */
.uipb-start { position: absolute; display: flex; align-items: center; justify-content: center; padding: 16px; pointer-events: auto; }
.uipb-start__card { width: 100%; max-width: 720px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.uipb-start__head { text-align: center; }
.uipb-start__h { margin: 0 0 4px; color: var(--uc-text-strong); font-size: var(--uc-text-md); font-weight: var(--uc-weight-semibold); }
.uipb-start__p { margin: 0; color: var(--uc-text-muted); font-size: var(--uc-text-sm); }
.uipb-start__ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.uipb-start__way { display: flex; flex-direction: column; gap: 6px; padding: 14px; cursor: pointer; }
.uipb-start__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--uc-radius-md); background: var(--uc-surface-base); box-shadow: inset 0 0 0 1px var(--uc-border-subtle); color: var(--uc-brand); }
.uipb-start__title { display: flex; align-items: center; gap: 6px; color: var(--uc-text-strong); font-size: var(--uc-text-sm); font-weight: var(--uc-weight-medium); }
.uipb-start__blurb { color: var(--uc-text-muted); font-size: var(--uc-text-xs); }
@media (max-width: 1100px) { .uipb-start__ways { grid-template-columns: minmax(0, 1fr); } }

/* Drag from the sidebar (canvas/DropLayer.jsx): a layer over the page while a
   tile is dragged, with the section drop line or the element's target box. */
.uipb-droplayer { position: absolute; inset: 0; z-index: 6; pointer-events: auto; }
.uipb-droptarget { position: absolute; pointer-events: none; outline: 2px solid var(--uc-brand); outline-offset: -2px; background: color-mix(in srgb, var(--uc-brand) 6%, transparent); }
.uipb-droptarget__label { position: absolute; top: 6px; right: 6px; padding: 2px 8px; border-radius: var(--uc-radius-sm); background: var(--uc-brand); color: var(--uc-brand-on); font-size: 11.5px; font-weight: var(--uc-weight-medium); }
.uipb-droplayer .uipb-dropline { height: 3px; background: var(--uc-brand); border-radius: var(--uc-radius-2); }

/* =============================================================================
   Top bar zones (2026-10-16 layout plan; topbar/TopBar.jsx)
   Over the sidebar: back · mark · Page ▾ · sidebar toggle (pushed to the
   zone's end, so it sits at the sidebar card's edge). Over the canvas:
   Design | Code · devices · undo / redo. Over the inspector: Styles · save
   state · Preview ▾ · Publish.
   ========================================================================== */
.uipb-topbar--float .uipb-topbar__left { justify-self: stretch; }
/* Settings, then the sidebar toggle, pushed together to the zone's right end. */
.uipb-topbar--float .uipb-topbar__left .uipb-topbar__sidebtn { margin-right: auto; }
/* With the AI chat button first, it takes the push and Settings sits beside it. */
.uipb-topbar--float .uipb-topbar__left .uipb-topbar__aibtn ~ .uipb-topbar__sidebtn { margin-right: 0; }
.uipb-topbar--float .uipb-topbar__left .uipb-topbar__address { flex: 0 1 auto; min-width: 0; max-width: 220px; }
.uipb-topbar--float .uipb-topbar__left .uipb-topbar__address .uipb-topbar__titletext { max-width: 140px; }
.uipb-topbar--float .uipb-topbar__canvas > .uipb-topbar__history { justify-self: end; padding-left: 4px; }
/* The centre holds the devices alone now; keep it on the page's middle while
   there is room. The left track never narrows below Design | Code · Layers ·
   Settings, so with less room the devices slide right instead of running into
   Settings, and the gap keeps them apart. */
.uipb-topbar--float .uipb-topbar__canvas { grid-template-columns: minmax(max-content, 1fr) auto minmax(0, 1fr); -moz-column-gap: 16px; column-gap: 16px; }

/* Save state: a dot and a word, and the way into Revisions. */
.uipb-topbar__status.uipb-topbar__status { cursor: pointer; gap: 6px; padding: 0 8px; font-weight: var(--uc-weight-regular, 400); color: var(--uc-text); }
.uipb-topbar__status.uipb-topbar__status:hover { color: var(--uc-text-strong); }
.uipb-topbar__status .uipb-topbar__status-dot { background: var(--uc-success, #2ea343); }
.uipb-topbar__status[data-dirty] .uipb-topbar__status-dot { background: var(--uc-warning, #ffa940); }
.uipb-topbar__status[data-busy] .uipb-topbar__status-dot { background: var(--uc-text-muted); }
@media (prefers-reduced-motion: no-preference) {
  .uipb-topbar__status[data-busy] .uipb-topbar__status-dot { animation: uipb-pulse 1s ease-in-out infinite alternate; }
}
@keyframes uipb-pulse { from { opacity: 1; } to { opacity: .3; } }

/* Preview ▾: the same split as Publish, outlined, one 1px seam. */
.uipb-preview { display: inline-flex; align-items: center; }
.uipb-preview > :first-child { border-start-end-radius: 0; border-end-end-radius: 0; }
.uipb-preview > :last-child { margin-right: -1px; border-start-start-radius: 0; border-end-start-radius: 0; }

/* Preview: no side columns, so the three zones become back-to-edit and
   devices; the page name stays on the left. */
.uipb-studio[data-mode='preview'] .uipb-topbar--float .uipb-topbar__left { justify-self: start; }

/* Narrow windows: the page name gives up width first. */
@media (max-width: 1280px) {
  .uipb-topbar--float .uipb-topbar__left .uipb-topbar__address .uipb-topbar__titletext { max-width: 100px; }
}

/* =============================================================================
   The right column in Design mode (2026-10-16 layout plan; Studio.jsx)
   The column stays: the drawer's width while it is open, the last width it
   had while it is away (`--uipb-panel-w`, kept by Studio.jsx). Only the
   user's own "Hide panel" on a selection (`.active.uich-dock-slid`) closes it.
   With nothing selected the Page panel (inspector/PagePanel.jsx) fills it.
   ========================================================================== */
.uich-cb-body { --uipb-panel-w: 332px; }
.uich-cb-body.uipb-design-col:not(:has(#uichemy-composer-floating-panel.active.uich-dock-slid)) {
  --uipb-dock-col: calc(var(--uich-dock-w, var(--uipb-panel-w)) + var(--uipb-gutter));
}
.uipb-pagepanel {
  grid-area: inspector;
  margin-right: var(--uipb-gutter);
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--uipb-card-r);
  background: var(--uc-surface-base);
  box-shadow: var(--uipb-card-frame);
  overflow: hidden;
}
.uipb-pagepanel__head { flex: none; height: var(--uipb-side-tabs-h); display: flex; align-items: center; gap: 8px; padding: 0 16px 0 10px; color: var(--uc-text-strong); border-bottom: 1px solid var(--uc-border-subtle); }
.uipb-pagepanel__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.uipb-pagepanel__hint { margin: 0; color: var(--uc-text-muted); font-size: var(--uc-text-xs); line-height: 1.6; }
/* Nothing selected, or an empty page (PagePanel): a short prompt in the
   middle of the column instead of the Page styles card it replaced. */
.uipb-pagepanel--idle { justify-content: center; }
.uipb-pagepanel__idle { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; text-align: center; }
.uipb-pagepanel__idle-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: var(--uc-radius-lg); background: var(--uc-surface-control); color: var(--uc-text-strong); }
.uipb-pagepanel__idle-title { color: var(--uc-text-strong); font-size: var(--uc-text-sm); font-weight: var(--uc-weight-medium); }
.uipb-pagepanel__idle .uipb-pagepanel__hint { max-width: 240px; }
.uipb-pagepanel__idle-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
/* A selected header / footer (PagePanel): what it is, and the way to its editor. */
.uipb-pagepanel__loc { gap: 6px; }
.uipb-pagepanel__loc-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 6px; border-radius: 14px; background: color-mix(in srgb, #0D99FF 14%, transparent); color: #0D99FF; }
.uipb-pagepanel__loc-eyebrow { color: var(--uc-text-muted); font-size: var(--uc-text-2xs, 10px); font-weight: var(--uc-weight-medium); letter-spacing: 0.06em; text-transform: uppercase; }
.uipb-pagepanel__loc .uipb-pagepanel__hint { max-width: 260px; }
.uipb-pagepanel__loc-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; max-width: 240px; margin-top: 10px; }
.uipb-pageappearance { display: flex; flex-direction: column; gap: 16px; }
.uipb-pageappearance h3 { margin: 0; color: var(--uc-text-strong); font-size: var(--uc-text-sm); font-weight: var(--uc-weight-medium); }
.uipb-pageappearance__field { display: flex; flex-direction: column; gap: 8px; }
.uipb-pageappearance__label { color: var(--uc-text); font-size: var(--uc-text-sm); }
.uipb-pageappearance__help { margin: 0; color: var(--uc-text-muted); font-size: var(--uc-text-xs); line-height: 1.6; }
.uipb-pageappearance__color { display: flex; align-items: center; gap: 8px; min-width: 0; }
.uipb-pageappearance__color .swatch-input.color-input { flex: 1; min-width: 0; max-width: none; height: var(--uc-control-h-sm); padding: 0 8px; gap: 8px; border: 0; border-radius: var(--uc-input-radius, var(--uc-radius-md)); background: var(--uc-surface-overlay); box-shadow: inset 0 0 0 1px var(--uc-border-subtle), var(--uc-shadow-input); }
.uipb-pageappearance__color .swatch-input:hover { box-shadow: inset 0 0 0 1px var(--uc-border-hover), var(--uc-shadow-input); }
.uipb-pageappearance__color .swatch-input:focus-within { outline: none; box-shadow: inset 0 0 0 1px var(--uc-ring), var(--uc-shadow-input); }
.uipb-pageappearance__color .swatch-input input { flex: 1; min-width: 0; width: 0; height: 100%; margin: 0; padding: 0; border: 0; outline: none; background: transparent; box-shadow: none; color: var(--uc-text-strong); font: inherit; font-size: var(--uc-text-sm); }
.uipb-pageappearance__color .swatch-input input::-moz-placeholder { color: var(--uc-text-subtle); }
.uipb-pageappearance__color .swatch-input input::placeholder { color: var(--uc-text-subtle); }
.uipb-pageappearance__color .swatch-trigger { --panel-bg-4: var(--uc-border-subtle); --panel-bg-3: var(--uc-surface-base); }
.uipb-pageappearance__color .swatch-trigger:focus-visible { outline: 1px solid var(--uc-ring); outline-offset: -2px; }
.uipb-pageappearance__site { display: flex; align-items: center; gap: 10px; width: 100%; padding: 16px 0 0; border: 0; border-top: 1px solid var(--uc-border-subtle); background: transparent; color: var(--uc-text); text-align: right; cursor: pointer; font: inherit; }
.uipb-pageappearance__site > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.uipb-pageappearance__site strong { font-size: var(--uc-text-sm); font-weight: var(--uc-weight-medium); }
.uipb-pageappearance__site small { font-size: var(--uc-text-xs); color: var(--uc-text-muted); line-height: 1.5; }
.uipb-pageappearance__site:hover { color: var(--uc-text-strong); }
.uipb-pageappearance__site:focus-visible { outline: 1px solid var(--uc-ring); outline-offset: -2px; border-radius: var(--uc-radius-sm); }
/* The page settings form in the left sidebar (Settings): the dialog's three
   layout cards as a list in the narrow column. */
/* The sidebar's compact form: three picture tiles in a row, the name under
   each, the radio kept for keyboard and screen readers but not drawn (the
   ring marks the choice); 13px titles and 16px between groups. */
.uipb-ps[data-compact] { gap: var(--uc-space-16); }
.uipb-ps[data-compact] .uipb-ps__group + .uipb-ps__group { padding-top: var(--uc-space-16); }
.uipb-ps[data-compact] h3 { font-size: 13px; }
.uipb-ps[data-compact] .uipb-ps__layouts { gap: 6px; }
.uipb-ps[data-compact] .uipb-ps__layout { gap: 6px; padding: 6px; text-align: center; }
.uipb-ps[data-compact] .uipb-ps__layout .uipb-ps__radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.uipb-ps[data-compact] .uipb-ps__mini { height: 40px; }
.uipb-ps[data-compact] .uipb-ps__layout-text strong { font-size: 12px; white-space: nowrap; }
.uipb-ps[data-compact] .uipb-ps__select { flex: 1; width: auto; min-width: 0; }
.uipb-ps[data-compact] .uipb-ps__link { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* SEO: the Composer's own panel (new-dashboard/src/seo), in the right column's
   Page card. It draws its own cards; the card gives it the room, a header with
   the close button, and the scroll. */
/* Drag handle on the SEO card's left edge. Inside the card (it clips), a few px
   wide, with a line that shows on hover, focus and while dragging. */
.uipb-pagepanel--seo { position: relative; }
.uipb-pagepanel__resize { position: absolute; z-index: 5; top: 0; bottom: 0; right: 0; width: 8px; cursor: col-resize; touch-action: none; }
.uipb-pagepanel__resize::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 2px; background: var(--uc-brand); opacity: 0; transition: opacity 0.15s ease; }
.uipb-pagepanel__resize:hover::after, .uipb-pagepanel__resize:focus-visible::after, .uich-cb-body.uipb-resizing .uipb-pagepanel__resize::after { opacity: 1; }
.uipb-pagepanel__resize:focus-visible { outline: none; }
/* While dragging: the column follows the pointer with no easing, and the canvas
   frame does not take the pointer or select text under it. */
.uich-cb-body.uipb-resizing { cursor: col-resize; -webkit-user-select: none; -moz-user-select: none; user-select: none; }
.uich-cb-body.uipb-resizing .uipb-studio { transition: none; }
.uich-cb-body.uipb-resizing iframe { pointer-events: none; }
.uipb-pagepanel__head--seo { gap: 8px; padding: 0 16px 0 10px; color: var(--uc-text-strong); }
.uipb-pagepanel__title { flex: 1; font-size: var(--uc-text-sm); font-weight: var(--uc-weight-medium); }
.uipb-pagepanel__body--seo { padding: 0 12px 12px; gap: 0; }
.uipb-seo .useo-panel { padding-top: 12px; }
.uipb-seo__note { margin: 0; padding-top: 12px; color: var(--uc-text); font-size: var(--uc-text-xs); }

/* Add › search (sidebar/Sidebar.jsx), above Elements · Sections · Templates. */
.uipb-side__search { flex: none; display: flex; align-items: center; gap: 6px; padding: 12px 12px 0 8px; }
.uipb-side__search > :first-child { flex: 1; min-width: 0; }
.uipb-side__search input[type='search']::-webkit-search-cancel-button { cursor: pointer; }
/* The add panel's ✕ clears its search, so the field's own clear button would be a second ✕. */
.uipb-side__search:has([aria-label^='Search sections'], [aria-label^='Search elements']) input[type='search']::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
/* Add › Sections: a single scrolling category row, with wheel support and
   edge arrows (SectionCategories.jsx). Arrows overlay the full-width row;
   neither side reserves a slot. A small fade separates them from the chips. */
.uipb-side__categories { position: relative; isolation: isolate; flex: none; min-width: 0; display: flex; align-items: center; padding: 10px 8px 2px; }
.uipb-side__chips { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.uipb-side__chips::-webkit-scrollbar { display: none; }
.uipb-side__chips-track { display: flex; flex-wrap: nowrap; width: -moz-max-content; width: max-content; min-width: 100%; gap: var(--uc-space-6); padding-block: var(--uc-space-2); }
.uipb-side__chips-track > * { flex: none; }
.uipb-side__categories::before,
.uipb-side__categories::after { content: ''; position: absolute; z-index: 1; top: 10px; bottom: 2px; width: 36px; pointer-events: none; opacity: 0; }
.uipb-side__categories::before { right: 8px; background: linear-gradient(to left, var(--uc-surface-raised) 60%, transparent); }
.uipb-side__categories::after { left: 8px; background: linear-gradient(to right, var(--uc-surface-raised) 60%, transparent); }
.uipb-side__categories[data-scroll-left]::before,
.uipb-side__categories[data-scroll-right]::after { opacity: 1; }
.uipb-side__category-arrow.uipb-side__category-arrow { position: absolute; z-index: 2; top: calc(50% + 4px); transform: translateY(-50%); width: 24px; height: 24px; min-width: 0; padding: 0; border-radius: var(--uc-radius-pill); background-color: var(--uc-surface-raised); }
.uipb-side__category-arrow:first-child { right: 8px; }
.uipb-side__category-arrow:last-child { left: 8px; }
.uipb-side__category-arrow[hidden] { display: none; }

/* Round pills, as the Theme Builder's type filter draws them: an outline at
   rest, the selected one filled in the strong ink. */
.uipb-side__chips [data-uc='chip'][data-uc='chip'] {
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--uc-border);
  color: var(--uc-text);
  font-size: 13px;
  font-weight: var(--uc-weight-medium);
  transition: box-shadow 120ms ease, color 120ms ease, background-color 120ms ease;
}
.uipb-side__chips [data-uc='chip'][data-uc='chip']:hover { box-shadow: inset 0 0 0 1px var(--uc-border-strong); color: var(--uc-text-strong); }
.uipb-side__chips [data-uc='chip'][data-uc='chip'][data-selected] { background: var(--uc-text-strong); box-shadow: inset 0 0 0 1px var(--uc-text-strong); color: var(--uc-surface-base); }
.uipb-side__chips [data-uc='chip'] button { height: 100%; color: inherit; font: inherit; }

/* No column easing until the first layout has settled (Studio.jsx adds
   `uipb-ready` two frames after mount), so a load does not animate the
   columns out of 0 with the canvas over the sidebar and the panel. */
.uich-cb-body:not(.uipb-ready) .uipb-studio { transition: none; }

/* =============================================================================
   The right column, hidden from the top bar (2026-10-16 review; Studio.jsx)
   `uipb-right-hidden` zeroes the column and hides the Composer's drawer the
   way its own away states do (visibility, never a transform — the chat column
   inside it is fixed to the window and must stay where it is).
   ========================================================================== */
.uich-cb-body.uipb-right-hidden { --uipb-dock-col: 0px !important; }
.uich-cb-body.uipb-right-hidden .uipb-studio > #uichemy-composer-floating-panel.uich-dock-right,
.uich-cb-body.uipb-right-hidden .uipb-studio > #uichemy-composer-floating-panel.uich-dock-right .dock-edge-toggle { visibility: hidden; }

/* A closed side panel's way back (Studio.jsx): a small dark tab on the
   canvas's edge with an arrow pointing into the room the panel will take.
   Only while that panel is closed. */
.uipb-edgetab {
  position: fixed;
  top: 50%;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--uc-border-subtle);
  background: var(--uc-surface-raised);
  color: var(--uc-text-strong);
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 4px 14px -4px rgb(0 0 0 / 35%);
  transition: width 140ms ease, background 140ms ease;
}
.uipb-edgetab:hover { width: 22px; border-color: var(--uc-border-strong); }
.uipb-edgetab:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.uipb-edgetab--left { right: 0; border-right: 0; border-radius: var(--uc-radius-md) 0 0 var(--uc-radius-md); }
.uipb-edgetab--right { left: 0; border-left: 0; border-radius: 0 var(--uc-radius-md) var(--uc-radius-md) 0; }

/* The Composer drawer's own edge toggle (the "›" tab on its left edge while
   it is open) is left out: the builder hides and shows the right column from
   the top bar, and a closed column gets the builder's edge tab above. Two
   handles on one panel, one of them on an open panel, was one too many. */
.uich-cb-body .dock-edge-toggle { display: none !important; }

/* The AI chat column scrolls by wheel / trackpad / keyboard with no visible
   scrollbar, like the rest of the sidebar (.uipb-side__scroll): its track
   drew a light bar down the dark card. */
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column,
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column * { scrollbar-width: none; }
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column::-webkit-scrollbar,
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column *::-webkit-scrollbar { display: none; }

/* =============================================================================
   Flat cards on both themes (2026-10-22): the left rail and panel, the canvas
   and the right column (the Page card and the Composer's drawer) sit one step
   up from the ground (raised: white on grey in light, #202020 on #171717 in
   dark), framed by a hairline, with no drop shadow. Dark used to keep the
   ground's own fill, so its cards had no edge at all.
   ========================================================================== */
.uipb-studio .uipb-side__rail,
.uipb-studio .uipb-side__body,
.uipb-studio .uipb-pagepanel { background: var(--uc-surface-raised); }
/* The chat shares the icon rail's fill, independently of the right panel. */
.uipb-studio > #uichemy-composer-floating-panel .rp-chat-column { --panel-bg: var(--uc-surface-raised); }
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right .panel.dock-right { --panel-bg: var(--uc-surface-raised); background: var(--uc-surface-raised); }
/* Dark: the right panel's body is the ground's #171717, the same as its
   Design · Developer row, rather than the raised #202020 (Jay 2026-10-22:
   "make this bg dark"). Light keeps the raised white. */
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right .panel.dock-right[data-uich-composer-theme='dark'] { --panel-bg: var(--uc-surface-base); --panel-bg-2: var(--uc-surface-base); background: var(--uc-surface-base); }
/* The sections (DS AccordionItems, Content · Attributes · Typography …) and
   the element card keep their own raised grey, so they read as grey boxes on
   the dark body (Jay 2026-10-22: "keep this all boxes like before grey").
   The Editor | Code row on top is the same raised grey (Jay 2026-10-22: "keep
   this in grey"); its 16px margin becomes padding so the grey reaches the
   panel's edges and the rule under the row. */
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right .panel.dock-right[data-uich-composer-theme='dark'] > .rp-panel-tabsrow { margin: 0; padding: 16px; background: var(--uc-surface-raised); }

/* Every input in the builder looks like the right panel's (the Composer's
   Link, Content and Attributes fields), both themes (Jay 2026-10-22: "same as
   right side"): its field well — #1A1A1A in dark, the DS surface-base grey in
   light (composer-right-panel*.css, `--rp-field-bg`) — with no sheen and the
   dimmed resting ring. Hover keeps the DS ring; focus takes the panel's
   neutral ring rather than brand orange. Covers the sidebar (Settings, SEO,
   Pages and Add search), the top bar and the builder's dialogs; the AI chat's
   prompt box and the Layers rename field keep their own look. Set on <body> so
   the dialogs, which portal out of the studio, get it too. */
.uich-cb-body { --uipb-field-bg: #1A1A1A; }
.uich-cb-body:has(.uipb-studio[data-uipb-theme='light']) { --uipb-field-bg: var(--uc-surface-base, #F4F4F4); }
.uich-cb-body :is(.uipb-side, .uipb-topbar, [role='dialog']) :is(input:not([type='checkbox'], [type='radio'], [type='range'], [type='color'], [type='hidden'], .uipb-layer__rename, .gw-search input), textarea) {
  background: var(--uipb-field-bg);
  background-image: none;
}
.uich-cb-body :is(.uipb-side, .uipb-topbar, [role='dialog']) :is(input:not([type='checkbox'], [type='radio'], [type='range'], [type='color'], [type='hidden'], .uipb-layer__rename, .gw-search input), textarea):not(:focus):not(:hover) {
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle), var(--uc-shadow-input);
}
.uich-cb-body :is(.uipb-side, .uipb-topbar, [role='dialog']) :is(input:not(.gw-search input), textarea):focus { outline-color: var(--uc-ring); }
/* Globals' search draws the field on its <label> (.gw-search) around a bare
   <input>, so the box takes the field well and the input inside stays clear;
   given the well as well, it read as a second, darker box inside the first. */
.uich-cb-body .gw-search { background: var(--uipb-field-bg); }
/* The SEO panel's one-line fields (Title, Social title …): its own input rule
   (seo-panel.css, `.useo-panel input[class]:not(…):not(…)`) outranks the well
   above and painted them --uc-surface-control — white on light — next to its
   grey textareas (Jay 2026-10-23: "make it consistent"). */
.uich-cb-body .uipb-side .useo-panel input[class]:not([type='checkbox']):not([type='radio']) { background: var(--uipb-field-bg); }
/* The frame is declared on the body (above), where the border tokens are the
   light ones; resolve it again here so it follows the editor's theme. */
.uipb-studio { --uipb-card-frame: 0 0 0 1px var(--uc-border-subtle); }
/* The right panel's frame, the left panel's and the canvas's: an OUTER ring.
   An inset one on the drawer was painted over by the Composer's own panel
   inside it, so the column had no visible edge. */
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right { box-shadow: var(--uipb-card-frame); }
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right .panel.dock-right { box-shadow: none; }

/* Light-only lift for the three main cards. Keep the shared frame token flat:
   the address/device pills also use it and must not inherit panel elevation.
   The left rail and body form ONE card, so shadow their common shell rather
   than drawing a dark seam between them. Preview stays edge-to-edge and flat. */
.uipb-studio[data-uipb-theme='light'] {
  --uipb-panel-shadow: 0 2px 6px rgb(0 0 0 / 4%), 0 8px 20px -6px rgb(0 0 0 / 6%);
}
.uipb-studio[data-uipb-theme='light'] > .uipb-side {
  border-radius: var(--uipb-card-r);
  box-shadow: var(--uipb-panel-shadow);
}
.uipb-studio[data-uipb-theme='light'] > .uipb-side[data-collapsed] {
  border-radius: var(--uc-radius-md);
}
.uipb-studio[data-uipb-theme='light']:not([data-mode='preview']) > .uipb-canvas,
.uipb-studio[data-uipb-theme='light'] > .uipb-pagepanel,
.uipb-studio[data-uipb-theme='light'] > #uichemy-composer-floating-panel.uich-dock-right {
  box-shadow: var(--uipb-card-frame), var(--uipb-panel-shadow);
}

/* The canvas pill without Layers (2026-10-22) or History (2026-10-27): both
   open from the sidebar's icon rail, History above Settings. The pill is the
   shared Composer's own (composer-app.jsx, not to be changed for a
   builder-only need), so the builder hides them here: Layers, the action
   right after the pill's first separator, History, its last action, and that
   separator, which would otherwise end the pill on a bare line. The builder's
   own Scroll Timeline button (motion/TimelineToolButton) comes in between,
   behind a separator of its own: Select · Draw · Outlines | Timeline.
   Matched by place, not by their translated labels. */
.uich-cb-body #uich-composer-canvas-toolbar .canvas-toolbar-wrap [aria-label] > span:first-of-type,
.uich-cb-body #uich-composer-canvas-toolbar .canvas-toolbar-wrap [aria-label] > span:first-of-type + button[data-uc-toolbar-action],
.uich-cb-body #uich-composer-canvas-toolbar .canvas-toolbar-wrap [aria-label] > button[data-uc-toolbar-action]:not(.uipb-timeline-tool, .canvas-toolbar-chevron):is(:last-child, :has(+ span + .canvas-toolbar-chevron)) { display: none; }
/* The hide chevron (`.canvas-toolbar-chevron`, behind its own separator) now
   ends the pill, so History is matched as the action just before it. */

/* The AI chat's history list (the Composer's `.chat-side`, opened from
   "New chat & history"): the same fill as the chat it replaces, not the
   Composer's grey second surface (--panel-bg-2). Builder only — the drawer in
   the other editors keeps its own look. */
.uich-cb-body .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column .chat-side {
  background: var(--panel-bg, var(--uc-surface-raised)) !important;
  /* It fills the whole sidebar card: the card's corners (square on the rail's
     side) and no right rule of its own, which doubled the card's edge. */
  border-left: 0 !important;
  border-radius: var(--uipb-card-r) 0 0 var(--uipb-card-r) !important;
}

/* One page-level workspace per view; the Composer stays alive for chat. */
.uipb-topbar--float .uipb-modes { --uc-tab-track-bg: var(--uc-surface-sunken); width: -moz-max-content; width: max-content; min-width: 0; flex: none; }
.uich-cb-body.uipb-code-mode { --uipb-dock-col: 0px !important; }
.uich-cb-body:is(.uipb-code-mode, .uipb-overview-mode) #uichemy-composer-floating-panel,
.uich-cb-body:is(.uipb-code-mode, .uipb-overview-mode) #uichemy-composer-floating-panel .dock-edge-toggle { visibility: hidden; }
.uich-cb-body:is(.uipb-code-mode, .uipb-overview-mode).uipb-side-chat #uichemy-composer-floating-panel .rp-chat-column { visibility: visible; }
.uipb-feature-loading { grid-area: canvas; align-self: center; justify-self: center; color: var(--uc-text-muted); }
.uipb-motion-overview { display: flex; flex-direction: column; gap: var(--uc-space-12); }
.uipb-motion-overview__section { display: flex; flex-direction: column; gap: var(--uc-space-4); padding-block: var(--uc-space-8); border-bottom: 1px solid var(--uc-border-subtle); }
.uich-cb-body:is(.uipb-code-mode, .uipb-overview-mode) :is(.canvas-toolbar-wrap, .canvas-toolbar-handle) { display: none; }

/* Code mode on the light theme (2026-10-22): the workspace is a white card
   like the canvas it replaces, not the grey ground. The open file's row and
   tab were white-on-grey; on white they take the ground grey instead, and a
   tab's hover the hover wash. The dark theme keeps its fills. */
.uipb-studio[data-uipb-theme='light'] .uipb-code { background: var(--uc-surface-raised); }
.uipb-studio[data-uipb-theme='light'] .uipb-code .uipb-code__file[data-active] { background: var(--uc-surface-base); }

/* The right panel's Design | Developer row on the light theme: a white strip
   like the panel's head, not the inspector's grey ground showing through it
   (the dark theme already gives it --uc-surface-raised, above). */
.uipb-studio[data-uipb-theme='light'] > #uichemy-composer-floating-panel.uich-dock-right .rp-panel-tabsrow--mode { background: var(--uc-surface-raised); }

/* Code mode's line-number column: a neutral grey a step off the editor's own
   fill, in both themes (Jay 2026-10-23: "add grey color shade") — the
   Composer's --panel-bg-2 read as a blue-black strip in the builder. A
   hairline on its right edge, numbers in the muted ink. */
.uipb-studio .uipb-code .CodeMirror-gutters {
  background: var(--uc-surface-raised) !important;
  border-left: 1px solid var(--uc-border-subtle) !important;
}
/* Light: white, the editor's own fill, with the hairline as the only divide
   (a grey column read as a separate dark strip beside white code). The
   gutter pieces and the corner filler too: the Composer paints those itself. */
.uipb-studio[data-uipb-theme='light'] .uipb-code :is(.CodeMirror-gutters, .CodeMirror-gutter, .CodeMirror-gutter-filler, .CodeMirror-gutter-wrapper, .CodeMirror-linenumber) { background: var(--uc-surface-raised) !important; }
/* The light editor is white (the workspace card), which the Composer's own
   light rule (--panel-bg, !important) turned grey — the gutter's grey then
   had nothing to stand against. */
.uipb-studio[data-uipb-theme='light'] .uipb-code .CodeMirror { background-color: var(--uc-surface-raised) !important; }
.uipb-studio .uipb-code .CodeMirror-linenumber { color: var(--uc-text-muted) !important; opacity: 1; }

/* Code mode's syntax colours on the light theme: bright, like CodePen's light
   editor (Jay 2026-10-23: "in light mode add bright code colors"). The
   Composer's light palette (composer.css) hangs off its own host
   (`.uich-composer-host[data-theme="light"]`), which the Code workspace is
   not inside, so light mode got the dark palette's pastels — pale pink tags
   and mint strings on white. Same hue per token as the dark palette; the dark
   theme is unchanged. */
.uipb-studio[data-uipb-theme='light'] .uipb-code { --warn: #E8590C; }
.uipb-studio[data-uipb-theme='light'] .uipb-code .cm-s-default :is(.cm-tag, .cm-bracket) { color: #E0115F; }
.uipb-studio[data-uipb-theme='light'] .uipb-code .cm-s-default :is(.cm-attribute, .cm-property, .cm-qualifier) { color: #E8590C; }
.uipb-studio[data-uipb-theme='light'] .uipb-code .cm-s-default :is(.cm-string, .cm-string-2) { color: #16A34A; }
.uipb-studio[data-uipb-theme='light'] .uipb-code .cm-s-default :is(.cm-keyword, .cm-atom, .cm-builtin, .cm-def) { color: #7C3AED; }
.uipb-studio[data-uipb-theme='light'] .uipb-code .cm-s-default .cm-number { color: #0284C7; }
.uipb-studio[data-uipb-theme='light'] .uipb-code .cm-s-default :is(.cm-meta, .cm-link) { color: #2563EB; }
.uipb-studio[data-uipb-theme='light'] .uipb-code .cm-s-default .cm-comment { color: #94A3B8; }

/* Trial (Jay 2026-10-23): dark swaps the ground and the panels — a grey ground
   (raised #202020) with dark panels (base #171717). */
.uipb-studio[data-uipb-theme='dark'] { background: var(--uc-surface-raised); }
.uipb-studio[data-uipb-theme='dark'] .uipb-side__rail,
.uipb-studio[data-uipb-theme='dark'] .uipb-side__body,
.uipb-studio[data-uipb-theme='dark'] .uipb-pagepanel,
.uipb-studio[data-uipb-theme='dark'] > #uichemy-composer-floating-panel .rp-chat-column { --panel-bg: var(--uc-surface-base); background: var(--uc-surface-base); }
/* Its body keeps the card's right-hand corners now it carries its own fill. */
.uipb-studio[data-uipb-theme='dark'] .uipb-side__body { border-radius: var(--uipb-card-r) 0 0 var(--uipb-card-r); overflow: hidden; }
/* Selection is one moving DS pill behind the rail items, not a separate
   background painted onto each pressed button. Shared Tabs tokens keep the
   light secondary finish and the dark raised finish consistent. */
/* The chat's own fill (.chat2-main) rounds only its top-right corner, so with a
   fill of its own it squared the card's bottom-right; it takes both right ones. */
.uich-cb-body.uipb-side-chat .uipb-studio > #uichemy-composer-floating-panel .rp-chat-column :is(.chat2-wrap, .chat2-main) { border-radius: var(--uipb-card-r) 0 0 var(--uipb-card-r); }


/* UI/UX batch 1: scoped to the standalone studio, not embedded Composer. */
.uipb-studio { --uipb-inspector-label: #b3b3b3; }
.uipb-studio[data-uipb-theme='light'] { --uipb-inspector-label: #5c5c5c; }
.uipb-studio > #uichemy-composer-floating-panel .rp-insp :is(.pf-label, .pf-name-text, .rp-id__label, .sb-label, .sides-box-side, .uc-field-label) {
  color: var(--uipb-inspector-label);
  font-size: 13px;
  line-height: 18px;
}
.uipb-studio > #uichemy-composer-floating-panel .rp-insp :is(.pf-name-text, .sb-label) { font-weight: 500; }
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .pf-name-text { opacity: 1; }

/* Keep compact chrome, but stop making pointer targets smaller than 24px. */
.uipb-studio > #uichemy-composer-floating-panel .rp-panel-tabsrow--mode [role='tab'] {
  min-height: 28px;
  height: 28px;
  padding-inline: 10px;
}
.uipb-studio > #uichemy-composer-floating-panel .rp-path button {
  min-width: 24px;
  min-height: 28px;
  padding-inline: 6px;
}
.uipb-studio > #uichemy-composer-floating-panel .rp-insp :is(.sb-tools button, .sides-box button, .unit-pill) {
  min-width: 24px;
  min-height: 24px;
}
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .sb-cell { min-height: 28px; }
.uipb-studio > #uichemy-composer-floating-panel .rp-insp button:focus-visible {
  outline: 2px solid var(--uc-ring, #a3a3a3);
  outline-offset: -2px;
}

.uipb-studio > #uichemy-composer-floating-panel .rp-path button,
.uipb-studio > #uichemy-composer-floating-panel .rp-panel-tabsrow--mode [role='tab'][aria-selected='false'],
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .sb-tools button:not([data-state='on']) {
  color: var(--uipb-inspector-label);
}
/* The top bar's home, page and device controls wear the same DS outline button
   as Preview ▾ (Jay 2026-10-23: "same as like view for all consistency"):
   control fill, sheen, strong hairline, raised shadow. */
.uipb-studio .uipb-topbar :is(.uipb-topbar__home, .uipb-topbar__address, .uipb-topbar__device):is(.uipb-topbar__home, .uipb-topbar__address, .uipb-topbar__device) {
  background-color: var(--uc-surface-control);
  background-image: var(--uc-sheen);
  box-shadow: inset 0 0 0 1px var(--uc-border-strong), var(--uc-shadow-raised);
}
.uipb-studio .uipb-topbar :is(.uipb-topbar__home, .uipb-topbar__device):is(:hover, [data-state='open']):is(.uipb-topbar__home, .uipb-topbar__device) { background-image: var(--uc-sheen), linear-gradient(var(--uc-brand-glow-hover), var(--uc-brand-glow-hover)); }

/* Header option A (Jay 2026-10-23): one zone per card below. The mark and
   `Page ▾` over the sidebar; Design | Code and the devices centred on the
   canvas column itself (not the window), between two equal tracks; Preview ▾
   and Publish over the inspector. */
.uipb-topbar--float .uipb-topbar__left { gap: 6px; }
.uipb-topbar--float .uipb-topbar__canvas { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
/* Pinned to the canvas column's centre — the sidebar column plus half of
   what is left between the two side columns — so `Page ▾` growing the left
   zone (sidebar collapsed to its rail) cannot push it off. */
.uipb-topbar--float .uipb-topbar__canvas > .uipb-topbar__center { right: calc(var(--uipb-chat-col) + (100% - var(--uipb-chat-col) - var(--uipb-dock-col)) / 2); transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.uipb-studio[data-mode='preview'] .uipb-topbar--float .uipb-topbar__canvas > .uipb-topbar__center,
.uipb-studio[data-inspector='closed'] .uipb-topbar--float .uipb-topbar__canvas > .uipb-topbar__center { right: 50%; }


/* UI consistency pass: one field family; no document or save behavior changes.
   The colour field keeps its own look (Jay 2026-10-23: "keep this color box
   like before"), so it is not in this family. */
.uipb-studio > #uichemy-composer-floating-panel .rp-insp :is(.lin-box, .sides-box-cell .sb-cell, .prop-input-stack > [role='combobox']) {
  box-sizing: border-box;
  height: 28px !important;
  min-height: 28px;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--uipb-field-bg, #1a1a1a) !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle) !important;
}
.uipb-studio > #uichemy-composer-floating-panel .rp-insp :is(.lin-box, .sides-box-cell .sb-cell, .prop-input-stack > [role='combobox']):hover {
  box-shadow: inset 0 0 0 1px var(--uc-border) !important;
}
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .lin-box:focus-within,
.uipb-studio > #uichemy-composer-floating-panel .rp-insp :is(.sides-box-cell .sb-cell, .prop-input-stack > [role='combobox']):focus-visible {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .sides-box-row { gap: 6px; }
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .sides-box-cell .sb-cell { color: var(--uc-text-strong); }
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .element-editor-link-toggles label {
  color: var(--uipb-inspector-label);
  font-size: 12px;
  line-height: 18px;
  opacity: 1;
}

/* Quiet when up-to-date, without disabling the still-useful options menu.
   Not while saving: the button is disabled then too, and this greyed its
   label on top of the spinner. Saving keeps the orange fill, spinner only. */
.uipb-studio .uipb-publish:has(> button:first-child:disabled:not([data-loading])) {
  border-radius: 8px;
  background: var(--uc-surface-control);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
}
.uipb-studio .uipb-publish:has(> button:first-child:disabled:not([data-loading])) > button {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  opacity: 1;
}
.uipb-studio .uipb-publish:has(> button:first-child:disabled:not([data-loading])) > button:first-child { color: var(--uc-text-muted) !important; }
.uipb-studio .uipb-publish:has(> button:first-child:disabled:not([data-loading])) > button:last-child {
  color: var(--uc-text-strong) !important;
  box-shadow: inset -1px 0 0 var(--uc-border-subtle) !important;
}
.uipb-studio .uipb-publish:has(> button:first-child:disabled:not([data-loading])) > button:last-child:hover:not(:disabled) { background: var(--uc-surface-hover) !important; }

/* A full label must fit at the dock's 280px minimum, not end in an ellipsis. */
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .design-style-section { --rp-label-w: 96px; }
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .sides-box-cell .sb-cell { color: var(--uc-text-strong) !important; }
.uipb-studio > #uichemy-composer-floating-panel .rp-insp :is(.lin-box input, .sides-box-cell .sb-cell)::-moz-placeholder {
  color: var(--uipb-inspector-label) !important;
  opacity: 1;
}
.uipb-studio > #uichemy-composer-floating-panel .rp-insp :is(.lin-box input, .sides-box-cell .sb-cell)::placeholder {
  color: var(--uipb-inspector-label) !important;
  opacity: 1;
}

/* Hide on (Composer renderHideOnRow): the three bare icon toggles become one
   28px segmented field in the panel's field well, full width like the selects
   above it — each device an equal segment; a hidden device takes the raised
   pill of the Design | Developer switch (Jay 2026-10-23: "make this proper"). */
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .rp-hide-on__row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 2px;
  box-sizing: border-box;
  height: 28px;
  padding: 2px;
  border-radius: 8px;
  background: var(--uipb-field-bg, #1a1a1a);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle);
}
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .rp-hide-on__row > button {
  min-width: 0;
  height: 24px;
  min-height: 0;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--uc-text-muted);
}
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .rp-hide-on__row > button:hover { color: var(--uc-text-strong); background: var(--uc-surface-control); }
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .rp-hide-on__row > button:is([aria-pressed='true'], [data-state='on']) {
  color: var(--uc-text-strong);
  background-color: var(--uc-surface-raised);
  background-image: var(--uc-sheen);
  box-shadow: inset 0 0 0 1px var(--uc-border-subtle), var(--uc-shadow-control);
}
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .rp-hide-on__row > button svg { width: 15px; height: 15px; }

/* Sagar review: panel controls belong at the foot, not in the top bar.
   One stable button works while open or closed and never covers scroll content. */
.uipb-studio .uipb-righttoggle {
  position: fixed;
  left: calc(var(--uipb-gutter) + 10px);
  bottom: calc(var(--uipb-gutter) + 10px + var(--uich-mtl-h, 0px));
  z-index: 31;
  width: 36px;
  height: 36px;
  padding: 0;
}
/* With the right panel open the toggle sits on the panel's foot, beside the
   canvas card, and the motion timeline spans the card only: it stays at the
   bottom (Jay 2026-10-27). Only on the bare canvas corner, panel hidden, does
   it rise over the dock. */
.uich-cb-body:not(.uipb-right-hidden) .uipb-studio .uipb-righttoggle { bottom: calc(var(--uipb-gutter) + 10px); }
/* The CMS and the Theme Builder cover the page and the right panel with it, so
   the toggle has nothing to open there; it also sat on a CMS item's Publish
   button in the same corner. It comes back with the page. */
.uipb-studio[data-cms='open'] .uipb-righttoggle { display: none; }
/* Keep the inspector viewport full-height. The floating panel toggle needs
   clearance at the END of the scroll content, not an opaque 54px strip that
   cuts through every field while the user is scrolling. Both themes share it. */
.uipb-studio { --uipb-panel-control-clearance: calc(var(--uc-space-32) + var(--uc-space-24)); }
.uipb-studio > #uichemy-composer-floating-panel.uich-dock-right .panel.dock-right > .panel-body { padding-bottom: 0; }
.uipb-studio > #uichemy-composer-floating-panel .rp-body { scroll-padding-bottom: var(--uipb-panel-control-clearance); }
.uipb-studio > #uichemy-composer-floating-panel .rp-body__inner {
  padding-bottom: calc(var(--rp-box-pad, 6px) + var(--uipb-panel-control-clearance));
}
.uipb-studio .uipb-pagepanel__body { padding-bottom: 64px; }

/* Header approved 2026-10-23: keep page identity between navigation and actions. */
.uich-cb-body .uipb-studio { --uipb-topbar-h: inherit; }
.uipb-studio .uipb-topbar.uipb-topbar--page-centred {
  grid-template-columns: minmax(max-content, 1fr) minmax(0, 240px) minmax(max-content, 1fr);
  gap: 12px;
}
.uipb-topbar--page-centred .uipb-topbar__identity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* the page pill and the device picker beside it */
  min-width: 0;
}
.uipb-topbar--page-centred .uipb-topbar__identity .uipb-topbar__address { max-width: 100%; height: 28px; }
.uipb-topbar--page-centred .uipb-topbar__identity .uipb-topbar__titletext { max-width: 180px; }
/* Save status: a dot in the page pill, with a word only when it needs you
   (Jay 2026-10-23: the stacked "Saved" line under the pill looked odd). */
.uipb-topbar--page-centred .uipb-topbar__save-status { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; height: 20px; padding: 0 4px; font-size: var(--uc-text-xs); line-height: 1; white-space: nowrap; cursor: default; }
.uipb-topbar--page-centred .uipb-topbar__save-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--uc-success, #2ea343); }
.uipb-topbar--page-centred .uipb-topbar__save-status[data-state='dirty'] { color: var(--uc-warning, #ffa940); }
.uipb-topbar--page-centred .uipb-topbar__save-status[data-state='dirty'] .uipb-topbar__save-dot { background: var(--uc-warning, #ffa940); }
.uipb-topbar--page-centred .uipb-topbar__save-status[data-state='conflict'] { color: var(--uc-danger, #f5484a); }
.uipb-topbar--page-centred .uipb-topbar__save-status[data-state='conflict'] .uipb-topbar__save-dot { background: var(--uc-danger, #f5484a); }
.uipb-topbar--page-centred .uipb-topbar__history-buttons { display: flex; align-items: center; gap: 2px; padding-inline-start: 8px; border-inline-start: 1px solid var(--uc-border-subtle); }
.uipb-topbar--page-centred .uipb-topbar__right .uipb-topbar__device { gap: 6px; }
.uipb-topbar--page-centred .uipb-topbar__device-label { font-size: var(--uc-text-xs); }

/* The Developer view's divider meets the panel edges; content keeps its gutter. */
.uipb-studio .rp-body__inner > .rp-developer-views > .rp-developer-views__tabs {
  width: calc(100% + 2 * var(--rp-box-pad, 6px));
  max-width: none;
  margin-inline: calc(-1 * var(--rp-box-pad, 6px));
}

@media (max-width: 980px) {
  .uich-cb-body { --uipb-topbar-h: 84px; }
  .uipb-studio .uipb-topbar.uipb-topbar--page-centred {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 42px 36px;
    gap: 0 8px;
  }
  .uipb-topbar--page-centred .uipb-topbar__identity { grid-area: 1 / 1 / 2 / 3; }
  .uipb-topbar--page-centred .uipb-topbar__left { grid-area: 2 / 1; }
  .uipb-topbar--page-centred .uipb-topbar__right { grid-area: 2 / 2; }
}
@media (max-width: 520px) {
  .uipb-topbar--page-centred .uipb-topbar__device-label,
  .uipb-topbar--page-centred .uipb-preview__label { display: none; }
  .uipb-topbar--page-centred .uipb-topbar__right { gap: 4px; padding-inline-start: 0; }
  .uipb-topbar--page-centred .uipb-topbar__left { gap: 4px; padding-inline-end: 0; }
  .uipb-topbar--page-centred .uipb-topbar__history-buttons { padding-inline-start: 4px; }
}
@media (max-width: 420px) {
  .uich-cb-body { --uipb-topbar-h: 116px; }
  .uipb-studio .uipb-topbar.uipb-topbar--page-centred { grid-template-columns: 1fr; grid-template-rows: 42px 32px 36px; }
  .uipb-topbar--page-centred .uipb-topbar__identity { grid-area: 1 / 1; }
  .uipb-topbar--page-centred .uipb-topbar__left { grid-area: 2 / 1; }
  .uipb-topbar--page-centred .uipb-topbar__right { grid-area: 3 / 1; }
}
/* ---- CMS workspace (cms/CmsWorkspace.jsx) --------------------------------
 * One card over the canvas and the right column — the canvas column and the
 * inspector column together, as Code covers the canvas — with the left sidebar
 * (and the chat in it) left where it is. The canvas stays mounted underneath.
 * The content types on the left of the card, the list on the right. Every
 * control in it is a DS component, so this only lays them out.
 * ------------------------------------------------------------------------ */
.uipb-studio[data-cms='open'] .uipb-canvas { visibility: hidden; pointer-events: none; }
/* The canvas toolbar is the Composer's, fixed above everything; it is about
   the page, so it goes while the page is covered. */
.uipb-studio[data-cms='open'] #uich-composer-canvas-toolbar { visibility: hidden; }
.uipb-cms {
  /* Body text at the editor's regular weight, as Layers and the panels use;
     medium is kept for headings and the current nav item. */
  font-weight: var(--uc-weight-regular);
  grid-row: 2;
  grid-column: 2 / 4;
  z-index: 25;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  position: relative;
  min-width: 0;
  min-height: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--uc-surface-base);
  /* The cards' hairline frame, no drop shadow: it sits in the grid like the
     canvas and the panels, not floating over them. */
  box-shadow: var(--uipb-card-frame);
  color: var(--uc-text);
  font-size: var(--uc-text-sm);
}
.uipb-cms__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 8px;
  border-left: 1px solid var(--uc-border-subtle);
  /* A soft step between the ground and the raised list — the half-mix the
     design system uses for its muted panels (#FAFAFA in light) — so the nav
     reads lighter than the ground, still apart from the white list. */
  background: color-mix(in srgb, var(--uc-surface-base) 50%, var(--uc-surface-raised));
}
.uipb-cms__brand { display: flex; align-items: center; gap: 8px; padding: 4px 8px 12px; color: var(--uc-text-strong); }
.uipb-cms__brand strong { font-weight: var(--uc-weight-semibold, 600); }
/* The nav, the counts and the table's head at the regular weight: the
   DataTable's head and the nav ran medium, which read bold across the page. */
.uipb-cms__navitem, .uipb-cms__navcount, .uipb-cms__tabcount { font-weight: var(--uc-weight-regular); }
.uipb-cms th, .uipb-cms th button { font-weight: var(--uc-weight-regular); }
.uipb-cms__navgroup { display: flex; flex-direction: column; gap: 1px; }
.uipb-cms__navgroup + .uipb-cms__navgroup { margin-top: 14px; }
.uipb-cms__navlabel { padding: 4px 8px; color: var(--uc-text-muted); font-size: var(--uc-text-xs); font-weight: var(--uc-weight-regular); }
.uipb-cms__navempty { padding: 2px 8px 6px; color: var(--uc-text-muted); font-size: var(--uc-text-xs); line-height: var(--uc-leading-snug); }
.uipb-cms__navitem {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--uc-radius-md);
  background: transparent;
  color: var(--uc-text);
  font: inherit;
  text-align: right;
  cursor: pointer;
}
.uipb-cms__navitem:hover { background: var(--uc-surface-control); color: var(--uc-text-strong); }
.uipb-cms__navitem[aria-current='page'] { background: var(--uc-surface-raised); color: var(--uc-text-strong); font-weight: var(--uc-weight-medium); }
.uipb-cms__navitem:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
/* "+ Add" (the tooltip says what it adds). */
.uipb-cms__navadd { color: var(--uc-text-muted); }
.uipb-cms__navtext { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uipb-cms__navcount { color: var(--uc-text-muted); font-size: var(--uc-text-xs); font-variant-numeric: tabular-nums; }
/* Static, not relative: the close button and the item panel (and its scrim)
   are placed against the CMS frame, which does not scroll, so they stay put
   while the list scrolls under them. */
.uipb-cms__main { position: static; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
/* A sortable column's header (Title, Date) reads like Author and Status:
   the DataTable draws the sorted one as a filled button (.sortBtn[data-sorted]),
   which made Date look like a control the others were not. The text and the
   sort arrow stay, and clicking still sorts; hover only firms up the text. */
.uipb-cms th button:is(:hover, [data-sorted]) { background: transparent; color: inherit; }
.uipb-cms th button:hover { color: var(--uc-text-strong); }
/* The posts list on the raised surface, the nav beside it on the ground. Not
   the Theme Builder (.uipb-tb), which borrows this frame and keeps the ground. */
.uipb-cms:not(.uipb-tb) .uipb-cms__main { background: var(--uc-surface-raised); }
/* "← Back to <page>" across the top (common/WorkspaceBack.jsx): it says the
   page is underneath and how to get back, where a bare ✕ in the corner did
   not. The nav and the list share the row under it. */
.uipb-cms { grid-template-rows: auto minmax(0, 1fr); }
.uipb-wsback {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 8px;
  border-bottom: 1px solid var(--uc-border-subtle);
  background: var(--uc-surface-raised);
}
.uipb-wsback__btn { max-width: 360px; min-width: 0; }
.uipb-wsback__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uipb-cms__view { display: flex; flex-direction: column; gap: 16px; padding: 20px 24px 32px; min-width: 0; }
.uipb-cms__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.uipb-cms__headtext { display: flex; flex-direction: column; gap: 4px; min-width: 0; position: relative; }
/* The type's name, and its "…" menu (Advanced edit) beside it. */
.uipb-cms__headtitle { display: flex; align-items: center; gap: 4px; min-width: 0; }
.uipb-cms__head h2 { margin: 0; color: var(--uc-text-strong); font-size: var(--uc-text-xl); font-weight: var(--uc-weight-semibold); line-height: var(--uc-leading-snug); overflow-wrap: anywhere; }
.uipb-cms__head p { margin: 0; color: var(--uc-text-muted); font-size: var(--uc-text-sm); }
.uipb-cms__headactions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* The status tabs head the list's card, its toolbar row (PostsView): tabs on
   the left, Filter and search on the right, one hairline under both. */
/* The status tabs sit above the list, with a little room under their line. */
.uipb-cms__tabs { min-width: 0; margin-bottom: 6px; }
.uipb-cms__tabs [role="tab"] { gap: 4px; }
.uipb-cms__tabcount { color: var(--uc-text-muted); font-size: var(--uc-text-xs); font-variant-numeric: tabular-nums; }
.uipb-cms__search { display: inline-block; }
.uipb-cms__search > span, .uipb-cms__search input { width: 100%; }
.uipb-cms__muted { color: var(--uc-text-muted); font-size: var(--uc-text-xs); }
.uipb-cms__clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Table cells */
.uipb-cms__titlecell { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.uipb-cms__titletext { color: var(--uc-text-strong); font-weight: var(--uc-weight-regular); overflow-wrap: anywhere; }

/* Cards and form rows */
.uipb-cms__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; }
.uipb-cms__row--stacked { flex-direction: column; align-items: stretch; gap: 6px; }
.uipb-cms__rowtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.uipb-cms__rowtext label, .uipb-cms__rowlabel { color: var(--uc-text-strong); font-size: var(--uc-text-xs); font-weight: var(--uc-weight-medium); }
.uipb-cms__rowhint { color: var(--uc-text-muted); font-size: var(--uc-text-xs); line-height: var(--uc-leading-snug); overflow-wrap: anywhere; }
.uipb-cms__rowctl { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.uipb-cms__row--stacked .uipb-cms__rowctl { justify-content: stretch; }
.uipb-cms__row--stacked .uipb-cms__rowctl > * { flex: 1; min-width: 0; }
.uipb-cms__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.uipb-cms__form { display: flex; flex-direction: column; gap: 16px; }
.uipb-cms__features { display: flex; flex-direction: column; gap: 6px; }
.uipb-cms__alertaction { margin-top: 10px; }

.uipb-cms__check { display: flex; align-items: center; gap: 8px; min-height: 24px; color: var(--uc-text); cursor: pointer; }

/* The item panel (cms/ItemPanel.jsx): slides in over the right of the CMS
   card, the list dimmed under a scrim that closes it. */
.uipb-cms__scrim { position: absolute; inset: 0; z-index: 4; padding: 0; border: 0; background: rgb(0 0 0 / 35%); cursor: default; animation: uipb-cms-fade 0.18s ease-out; }
.uipb-cms__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: min(480px, 100%);
  background: var(--uc-surface-base);
  border-right: 1px solid var(--uc-border);
  box-shadow: 18px 0 40px -24px rgb(0 0 0 / 70%);
  animation: uipb-cms-slide 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.uipb-cms__panelbar { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px 12px 16px; border-bottom: 1px solid var(--uc-border-subtle); }
.uipb-cms__panelhead-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.uipb-cms__panelhead-text h2 { margin: 0; color: var(--uc-text-strong); font-size: var(--uc-text-lg); font-weight: var(--uc-weight-semibold); line-height: var(--uc-leading-snug); overflow-wrap: anywhere; }
.uipb-cms__meta { display: inline-flex; align-items: center; gap: 8px; color: var(--uc-text-muted); font-size: var(--uc-text-xs); }
.uipb-cms__panelbody { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 24px; }
.uipb-cms__panelfoot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--uc-border-subtle); background: var(--uc-surface-base); }
/* Each field group is a section under a hairline, titled like the editor's
   sidebar groups (.uipb-side__group-title). */
.uipb-cms__fieldgroup { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--uc-border-subtle); }
.uipb-cms__panelhead { margin: 0; color: var(--uc-text-muted); font-size: 11px; font-weight: var(--uc-weight-medium); letter-spacing: .06em; text-transform: uppercase; }
.uipb-cms__fields { min-width: 0; }
/* The rows were drawn for wp-admin's white box; in the panel they take its surface. */
/* Rows sit as far apart as the panel's own form rows: Custom Fields spaces
   them by --uich-gf-gap-y (24px in wp-admin). */
.uipb-cms__fields .uich-gf-metabox { --uich-gf-gap-y: 16px; background: transparent; padding: 0; }
/* The field controls in the editor's theme (FieldGroups takes their light
   scope off), with labels and help text sized like the panel's Title. */
.uipb-cms__fields .uich-gf-ds { min-width: 0; background: transparent; font-family: var(--uc-font-sans); color: var(--uc-text-strong); }
.uipb-cms__fields .uich-gf-row-ds > label.uich-gf-label,
.uipb-cms__fields .uich-gf-row-ds > .uich-gf-label-col > label.uich-gf-label { margin: 0 0 6px; color: var(--uc-text-strong); font-size: var(--uc-text-xs); font-weight: var(--uc-weight-medium); line-height: var(--uc-leading-snug); }
.uipb-cms__fields .uich-gf-row-ds .uich-gf-instruction { color: var(--uc-text-muted); font-size: var(--uc-text-xs); }
.uipb-cms__fields .uich-gf-row-ds > label.uich-gf-label + .uich-gf-instruction { margin: -2px 0 6px; }
.uipb-cms__nofields { margin: 0; }
/* The featured image (cms/FeaturedImage.jsx): the picture, clickable to
   replace it, with its buttons beside it. */
.uipb-cms__thumb { display: flex; align-items: flex-end; gap: 12px; }
.uipb-cms__thumbimg {
  flex: none;
  width: 96px;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: var(--uc-radius-md);
  overflow: hidden;
  background: var(--uc-surface-base);
  box-shadow: 0 0 0 1px var(--uc-border-subtle);
  cursor: pointer;
}
.uipb-cms__thumbimg img { display: block; width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; }
.uipb-cms__thumbimg:focus-visible { outline: 2px solid var(--uc-ring); outline-offset: -2px; }
.uipb-cms__thumbactions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* WordPress's media window (the featured image picker) is a [role=dialog]
   too, so the builder's field well above painted its search box near-black
   on the window's white. It keeps WordPress's own look. */
.uich-cb-body .media-modal.media-modal :is(input:not([type='checkbox'], [type='radio']), textarea) {
  background: #fff;
  color: #2c3338;
  box-shadow: 0 0 0 1px #8c8f94;
}
/* The dark theme's color-scheme reached it too: dark scrollbars and form
   controls on WordPress's white window. */
.uich-cb-body .media-modal,
.uich-cb-body .media-modal-backdrop { color-scheme: light; }
.uipb-cms__nofields a { color: var(--uc-text-strong); }
@keyframes uipb-cms-slide { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes uipb-cms-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .uipb-cms__panel, .uipb-cms__scrim { animation: none; } }

/* "How to use" (HowToUseDialog): the markup to copy, in a scrolling code box. */
.uipb-cms__howto { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.uipb-cms__howto > p { margin: 0; }
.uipb-cms__howtobar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.uipb-cms__code { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: var(--uc-radius-md); background: var(--uc-surface-sunken); border: 1px solid var(--uc-border-subtle); }
.uipb-cms__codebar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 14px 4px 6px; border-bottom: 1px solid var(--uc-border-subtle); color: var(--uc-text-muted); font-size: var(--uc-text-xs); }
/* Selectable as a whole — copying by hand is the fallback when the clipboard is refused. */
.uipb-cms__code pre { margin: 0; max-height: 320px; overflow: auto; padding: 12px 14px; font-family: var(--uc-font-mono); font-size: var(--uc-text-2xs, 11px); line-height: 1.6; color: var(--uc-text-strong); white-space: pre; -moz-tab-size: 2; -o-tab-size: 2; tab-size: 2; }
.uipb-cms__code code { font: inherit; -webkit-user-select: all; -moz-user-select: all; user-select: all; }
.uipb-cms__steps { margin: 0; padding-right: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--uc-text); font-size: var(--uc-text-sm); line-height: 1.5; }

/* The list's Filter popover (FilterMenu): one labelled dropdown per filter. */
.uipb-cms__filters { width: 280px; padding: 0; }
.uipb-cms__filtersbox { display: flex; flex-direction: column; max-height: min(70vh, 560px); }
.uipb-cms__filterslist { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 14px; }
.uipb-cms__filtershead { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 28px; padding: 12px 16px 8px; }
.uipb-cms__filtershead strong { font-size: var(--uc-text-base); font-weight: 600; }
.uipb-cms__filter { display: flex; flex-direction: column; gap: 6px; }
.uipb-cms__filter > span { font-size: var(--uc-text-sm); color: var(--uc-text-muted); }
.uipb-cms__filter button { width: 100%; }
.uipb-cms__filtersfoot { flex: none; display: flex; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid var(--uc-border-subtle); }

/* ── History › Versions (history/HistoryPanel.jsx VersionsList) ──────────
   Elementor's Revisions list in the builder's tokens: Discard / Apply on top,
   then one row per saved version — avatar, "when (date)", "what by whom". */
.uipb-revs { display: flex; flex-direction: column; gap: 8px; }
/* Stuck to the top of the scrolling panel while the list moves under it: it
   spans the panel's 12px padding (negative margin, top: -12px) and paints the
   panel's own fill, or the rows showed through it. */
.uipb-revs__bar {
  position: sticky; top: -12px; z-index: 2;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin: -12px -12px 0; padding: 12px 12px 10px;
  background: var(--uc-surface-raised);
  border-bottom: 1px solid var(--uc-border-subtle);
}
.uipb-studio[data-uipb-theme='dark'] .uipb-revs__bar { background: var(--uc-surface-base); }
.uipb-revs__bar > * { width: 100%; justify-content: center; }
.uipb-revs__hint { margin: 0 2px; font-size: var(--uc-text-xs, 12px); line-height: 1.5; color: var(--uc-text-muted); }
.uipb-revs__error { margin: 0 2px; font-size: var(--uc-text-xs, 12px); color: var(--uc-danger, #dc2626); }
.uipb-revs__empty { padding: 24px 8px; text-align: center; font-size: var(--uc-text-xs, 12px); line-height: 1.5; color: var(--uc-text-muted); }
.uipb-revs__empty p { margin: 0; }
.uipb-revs__empty-title { margin-bottom: 4px !important; font-size: var(--uc-text-sm, 13px); font-weight: var(--uc-weight-medium, 500); color: var(--uc-text-strong); }
.uipb-revs__list { display: flex; flex-direction: column; gap: 2px; outline: none; }
.uipb-revs__item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: var(--uc-radius-md, 8px); background: transparent; color: var(--uc-text);
  text-align: right; cursor: pointer; font: inherit;
  transition: background var(--uc-dur-fast, .12s) var(--uc-ease-standard, ease);
}
.uipb-revs__item:hover:not(:disabled) { background: var(--uc-surface-hover); }
.uipb-revs__item:focus-visible { outline: 2px solid var(--uc-ring, var(--uc-brand)); outline-offset: -2px; }
.uipb-revs__item[aria-selected='true'] { background: var(--uc-surface-control); box-shadow: inset 0 0 0 1.5px var(--uc-brand); }
.uipb-revs__item:disabled { cursor: default; opacity: .5; }
.uipb-revs__avatar {
  flex: none; width: 28px; height: 28px; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--uc-surface-control); color: var(--uc-text-strong); font-size: 12px; font-weight: 600;
}
.uipb-revs__avatar img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; display: block; }
/* No avatar: the name's initial on its own colour (avatarColor). */
.uipb-revs__avatar--initial { color: #fff; font-size: 13px; font-weight: 600; text-transform: uppercase; }
.uipb-revs__details { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* The row's name is its date and time; who and how long ago sit under it. */
.uipb-revs__when { font-size: var(--uc-text-sm, 13px); font-weight: var(--uc-weight-medium, 500); color: var(--uc-text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uipb-revs__meta { font-size: 11.5px; color: var(--uc-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uipb-revs__id { opacity: .7; }
.uipb-revs__tools { flex: none; display: inline-flex; align-items: center; justify-content: flex-end; min-width: 16px; }
.uipb-revs__sep { margin: 0 5px; opacity: .6; }
/* Current / Autosave, as a pill at the row's end. */
.uipb-revs__pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: var(--uc-weight-medium, 500); line-height: 1; white-space: nowrap; }
.uipb-revs__pill[data-type='current'] { background: color-mix(in srgb, var(--uc-brand) 14%, transparent); color: var(--uc-brand); }
.uipb-revs__pill[data-type='autosave'] { background: var(--uc-surface-control); color: var(--uc-text-muted); }
.uipb-revs__spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--uc-border); border-top-color: var(--uc-brand); animation: uipb-revs-spin .7s linear infinite; }
@keyframes uipb-revs-spin { to { transform: rotate(-360deg); } }

/* First-load skeleton rows: the same box as a version row. */
.uipb-revs__item--skeleton { cursor: default; }
.uipb-revs__item--skeleton:hover { background: transparent; }
.uipb-revs__sk-avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; }
.uipb-revs__sk-line { height: 12px; border-radius: var(--uc-radius-xs, 4px); }
.uipb-revs__sk-line--sub { height: 10px; margin-top: 4px; }
.uipb-revs__sentinel { height: 1px; }


/* The code panel while its editor loads (code/DeveloperCode.jsx). */
.uipb-code-skeleton { display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 16px; }
.uipb-code-skeleton__views { height: 32px; width: 100%; border-radius: var(--uc-radius-md); }
.uipb-code-skeleton__tabs { height: 28px; width: 100%; border-radius: var(--uc-radius-md); }
.uipb-code-skeleton__editor { display: flex; flex-direction: column; gap: 10px; padding: 12px 4px; }
.uipb-code-skeleton__line { height: 12px; border-radius: var(--uc-radius-sm); }
/* ---- Theme Builder workspace (theme-builder/ThemeBuilderWorkspace.jsx) ----
 * The CMS card's frame (.uipb-cms) with no type nav: the dashboard screen
 * inside has its own type tabs. Its rules are ThemeBuilder.editor.scss.
 * ------------------------------------------------------------------------ */
.uipb-cms.uipb-tb { grid-template-columns: minmax(0, 1fr); }
/* It follows the editor's theme: in light, white, as the dashboard's canvas
   is; in dark, the ground the CMS sits on (.uipb-cms). */
.uipb-studio[data-uipb-theme='light'] .uipb-cms.uipb-tb { background: var(--uc-surface-raised); }

/* Toasts above the editor's floating chrome. The Composer's Scroll Timeline
   launcher and dock sit at z-index 2147482400 (composer.css), which covered
   the bottom of a toast — its countdown line — in the same corner. */
[data-sonner-toaster] { z-index: 2147483000 !important; }

/* ---- Orange is Publish's alone -------------------------------------------
 * The design system's brand (--uc-brand, #FD6A35) colours every brand button,
 * badge, selection tint and drop line. In the builder it follows the theme
 * instead — the inverse ink, white in dark and black in light, as a solid
 * neutral button is — on every token scope in this document, portals (menus,
 * dialogs) included. Publish (the top bar's and the CMS item panel's, both
 * `.uipb-publish`) keeps the real orange: the one call to action that is it.
 * The page end's Ask AI (`.uipb-pageend__ai`) shares it (Jay 2026-10-28:
 * "ask ai orange DS button").
 * ------------------------------------------------------------------------ */
.uich-cb-body,
.uich-cb-body :is(.uc-scope, .uc-content, .uc-chrome, .uc-portal, .uc-pop-dark) {
  --uc-brand: var(--uc-inverse-bg);
  --uc-brand-on: var(--uc-inverse-fg);
}
.uich-cb-body .uipb-publish.uipb-publish,
.uich-cb-body .uipb-pageend__ai.uipb-pageend__ai {
  --uc-brand: #FD6A35;
  --uc-brand-on: #FFFFFF;
}

/* The page pill is a split button like Preview ▾ beside Publish (Jay
   2026-10-27: "make this same like right side"): the name and its ▾ are two
   DS outline buttons joined by a hairline, so the wrapper drops its own fill
   and frame. The menu still opens under the whole pill (TemplateSwitch). */
.uipb-studio .uipb-topbar .uipb-topbar__address.uipb-topbar__address.uipb-topbar__address { padding: 0; background: none; box-shadow: none; }
.uipb-studio .uipb-topbar .uipb-topbar__address > .uipb-topbar__title.uipb-topbar__title { padding: 0 12px; border-start-end-radius: 0; border-end-end-radius: 0; }
/* Renaming, the field fills the name's segment: 28px, flush to the ▾. */
.uich-cb-body .uipb-studio .uipb-topbar .uipb-topbar__address > input.uipb-topbar__rename.uipb-topbar__rename.uipb-topbar__rename { height: 28px; margin: 0; padding: 0 11px; border-radius: 0 var(--uc-radius-md, 8px) var(--uc-radius-md, 8px) 0; }
.uipb-studio .uipb-topbar .uipb-topbar__address > :last-child:not(:first-child) { width: 28px; min-width: 28px; margin-right: -1px; border-start-start-radius: 0; border-end-start-radius: 0; }

/* RTL admin (M-05). The canvas geometry — the stage, its scaled doc box and
   the overlay laid over the frame — is measured and transformed from the top
   left, so under an RTL admin the page slid out of view to the left. The page
   inside the frame keeps its own direction; only the stage is pinned LTR. */
.uipb-canvas,
.uipb-canvas__stage { direction: rtl; }

/* ---- The floating bar's menus follow the theme ------------------------------
 * The bar itself goes light with the editor (host/canvas-toolbar-ui.js), but
 * its Font, Weight and colour menus portal to the canvas portal root in this
 * document, and the DS menu components hardcode `uc-pop-dark`, which declares
 * the whole dark token set on the menu itself. So on the light theme the Font
 * list opened dark under a white bar. The Composer core lights `uc-pop-dark`
 * only inside the right panel (composer-right-panel.css); this does the same
 * for the canvas root, with the same light values. Keep in sync with that rule.
 * ------------------------------------------------------------------------ */
.uich-cb-body .uich-portal-root-canvas[data-uich-composer-theme="light"] :is(.uc-portal, .uc-pop-dark),
/* The top bar's and rail's menus (Preview, Update, the logo menu …) portal
   straight to <body>, where the same hardcoded dark set applied; they follow
   the editor's theme the same way (Studio.jsx puts uipb-theme-light on <html>). */
html.uipb-theme-light .uich-cb-body > [data-radix-popper-content-wrapper] > :is(.uc-portal, .uc-pop-dark),
/* The Free plan's Upgrade popup (composer-pro.jsx) is built dark for the other
   builders' dark panels; here it follows the editor's theme like the rest. */
html.uipb-theme-light .uich-cb-body .uc-pro-modal__overlay.uc-pro-modal__overlay {
  --uc-surface-sunken:  #EBEBEB;
  --uc-surface-base:    #F4F4F4;
  --uc-surface-raised:  #FFFFFF;
  --uc-surface-overlay: #FFFFFF;
  --uc-surface-control: #FFFFFF;
  --uc-surface-hover:   rgba(0, 0, 0, 0.04);
  --uc-text-strong: #0A0A0A;
  --uc-text:        #171717;
  --uc-text-muted:  #737373;
  --uc-text-subtle: #A3A3A3;
  --uc-inverse-bg: #171717;
  --uc-inverse-fg: #FFFFFF;
  --uc-border-subtle: rgba(0, 0, 0, 0.055);
  --uc-border:        rgba(0, 0, 0, 0.09);
  --uc-border-strong: rgba(0, 0, 0, 0.14);
  --uc-border-hover:  rgba(0, 0, 0, 0.22);
  --uc-ring:          rgba(23, 23, 23, 0.40);
  --uc-brand-fg:   #171717;
  --uc-success-fg: #0A842A;
  --uc-danger-fg:  #D12D37;
  --uc-warning-fg: #AA712B;
  --uc-accent-fg:  #171717;
  --uc-brand-soft:   #F0F0F0;
  --uc-success-soft: #E7FFE7;
  --uc-danger-soft:  #FFF2EF;
  --uc-warning-soft: #FFEDD8;
  --uc-accent-soft:  #F0F0F0;
  --uc-shadow-4: 0 16px 44px -12px rgb(0 0 0 / 18%), 0 4px 12px -4px rgb(0 0 0 / 12%);
  --uc-brand: var(--uc-inverse-bg);
  --uc-brand-on: var(--uc-inverse-fg);
  color-scheme: light;
}

/* The Upgrade button on the Free plan's Pro surfaces (the popup, the locked AI
   chat's tray) paints itself with --uc-brand, which the builder turns into the
   theme's inverse ink: white in dark. Its label was fixed white on top of that,
   so the button read as a blank white bar. The label takes the paired ink. */
.uich-cb-body .uc-pro .uc-pro-cta.uc-pro-cta { color: var(--uc-brand-on, #fff) !important; }

/* The top bar's dropdowns (logo, page, breakpoint, Preview, Update): the caret
   turns up while its menu is open and back down when it closes, so the icon
   says which state the menu is in (QA: it never changed). */
.uipb-topbar .uipb-chevron { transition: transform var(--uc-dur-fast, 0.15s) var(--uc-ease-standard, ease); }
.uipb-topbar [data-state='open'] .uipb-chevron { transform: rotate(-180deg); }

/* Menu separators: in the dark menus --uc-border-subtle is the menu's own fill
   (#2E2E2E on #2E2E2E), so the line vanished and left an unexplained gap
   between the groups (QA: uneven spacing in the logo menu). One step stronger
   in both themes. */
.uich-cb-body :is(.uc-portal, .uc-pop-dark) [role='separator'] { background: var(--uc-border); }

/** Compact interaction states for standalone builder chrome only.
 * No canvas/page styles, hit target reduction or blanket focus suppression.
 */
/* The page pill is a split button like Preview ▾ (studio.css), so its chevron
   is a segment with the same hover as Preview's. */
.uipb-studio :is(.uipb-preview, .uipb-publish, .uipb-topbar__address) > button:last-child:not(:disabled) {
  position: relative;
  isolation: isolate;
}
.uipb-studio :is(.uipb-preview, .uipb-topbar__address) > button:last-child:not(:disabled):is(:hover, [data-state='open']) {
  background-color: var(--uc-surface-control);
  background-image: none;
}
.uipb-studio .uipb-publish > button:last-child:not(:disabled):is(:hover, [data-state='open']) { background-image: var(--uc-sheen); }
.uipb-studio .uipb-publish:has(> button:first-child:disabled) > button:last-child:hover:not(:disabled) { background: transparent !important; }
.uipb-studio :is(.uipb-preview, .uipb-publish, .uipb-topbar__address) > button:last-child::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 4px;
  background: var(--uc-surface-hover);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}
.uipb-studio :is(.uipb-preview, .uipb-publish, .uipb-topbar__address) > button:last-child:not(:disabled):is(:hover, [data-state='open'])::before { opacity: 1; }
/* Match native shell controls and the embedded inspector; keep the focus
   perimeter close to the control, never a second large outer frame. */
.uipb-studio :is(button, [role='tab'], [role='combobox']):focus-visible,
.uipb-studio > #uichemy-composer-floating-panel :is(button, [role='tab'], [role='combobox']):focus-visible {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}
/* A numeric field owns the ring, not BOTH the wrapper and its unit button. */
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .lin-box:focus-within {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--uc-ring) !important;
}
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .lin-box:has(input:focus-visible) {
  outline: 2px solid var(--uc-ring);
  outline-offset: -2px;
}
.uipb-studio > #uichemy-composer-floating-panel .rp-insp .lin-box input:focus-visible {
  outline: none;
  box-shadow: none;
}
@media (forced-colors: active) {
  .uipb-studio :is(button, [role='tab'], [role='combobox']):focus-visible,
  .uipb-studio > #uichemy-composer-floating-panel :is(button, [role='tab'], [role='combobox']):focus-visible { outline-color: Highlight; }
}

/* Layout radio cards have one wrapper indicator, not a second ring on the dot. */
.uipb-studio .uipb-ps__layout .uipb-ps__radio:focus-visible { outline: none; }

