/* Heading face (#418 PR 1): Plus Jakarta Sans, the latin subset as one variable woff2 (weights 200-800), self-hosted so no
   page asks a third party for a font. SIL Open Font License 1.1; see static/fonts/OFL.txt. Inter stays the body face and is
   not shipped: --font-sans names it and falls back to the system face, as before. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/PlusJakartaSans-latin-var.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Plus Jakarta Sans", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* NEUTRAL RAMP — Tailwind stone (build item 2, CP1).
     This is a reconciliation, not a new palette. The app was ALREADY
     rendering stone in 91 places in this file while :root defined a cool
     gray ramp (#111827/#4b5563/#6b7280/#f3f4f6/#d1d5db) that only the
     tokens used — so the two disagreed and the literals won wherever
     they appeared. Stone is warm, which is why it sits with the teal
     brand without the blue cast gray gave.

     Raw steps exist as tokens because the 91 sites span text, surfaces,
     dividers and borders. PREFER THE SEMANTIC TOKEN below wherever one
     fits; reach for a raw step only when no semantic name applies. */
  --stone-50:  #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;   /* 2.41:1 on page — NEVER active text, see below */
  --stone-500: #78716c;   /* 4.58:1 — the lightest step that passes AA text */
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-900: #1c1917;
  --color-bg-page: #f8faf9;
  --color-bg-surface: #ffffff;
  --color-bg-subtle: #f1f6f4;
  --color-bg-elevated: #ffffff;
  --color-brand: #075e5b;
  --color-brand-hover: #064c4a;
  --color-brand-pressed: #043d3b;
  --color-accent: #0f766e;
  /* The logo mint (#418). A highlight for NON-TEXT marks only (rules, dots, active-page markers): 3.36:1 on white clears the
     3:1 non-text bar (WCAG 1.4.11) but not the 4.5:1 text bar, so it is never a text color. */
  --color-highlight: #1f9e7f;
  /* Primary button (#418): a slight top-to-bottom gradient. White text clears 4.5:1 on both stops (DESIGN_SYSTEM.md). */
  --btn-stop-top: #0b7a72;
  --btn-stop-bottom: #075e5b;
  --btn-gradient: linear-gradient(180deg, var(--btn-stop-top), var(--btn-stop-bottom));
  --btn-shadow: 0 1px 0 rgb(255 255 255 / 14%) inset, 0 1px 2px rgb(7 94 91 / 24%), 0 2px 6px rgb(7 94 91 / 14%);
  /* The dark shell (#418 PR 2): the top bar and the rail sit on the logo's forest green. Text on it is nav-text (14.29:1), the
     quiet items nav-muted (7.66:1), and the current page's marker, the focus ring and the initials are the light mint (7.62:1).
     The hover and current fills are SOLID (white at 7% over the green), so the contrast of text on them can be pinned. */
  --nav-bg: #10241f;
  --nav-text: #e8f3ef;
  --nav-muted: #9db8b0;
  --nav-active: #21332f;
  --nav-border: #2c3f3a;
  --nav-mint: #3fc79c;
  --nav-focus: var(--nav-mint);
  --nav-btn-edge: #6b958b;   /* the 1px edge of Create listing on the dark bar: 4.87:1 */
  /* The margin values read as pills (#418): dark green on pale mint, 5.68:1. */
  --color-margin-bg: #e3f4ee;
  --color-margin-fg: #0b6b55;
  --color-text: var(--stone-900);
  --color-text-secondary: var(--stone-600);
  --color-text-muted: var(--stone-500);
  --color-border: #dbe3e1;
  --color-border-strong: #9aa9a6;
  /* #419: the edge of a form control (input, select, textarea, chips box). 3.39:1 on white, 3.23 on the page, 3.10 on the subtle
     ground: the 3:1 non-text bar (WCAG 1.4.11), which --color-border-strong (2.44:1) misses. Hover darkens it to muted text. */
  --color-control-border: #7f8f8a;
  --color-focus: #0b8279;
  --color-selected-bg: #e7f4f1;
  --color-selected-border: #08746d;
  --color-success: #08783e;
  --color-success-bg: #ecf8f0;
  --color-warning: #9a5b00;
  --color-warning-bg: #fff7e5;
  --color-error: #b42318;
  --color-error-bg: #fff1f0;
  --color-info: #075e5b;
  --color-info-bg: #edf7f6;
  --color-disabled-bg: var(--stone-100);
  --color-disabled-border: var(--stone-300);
  /* stone-400 is allowed HERE and nowhere else in text: WCAG 1.4.3
     exempts inactive controls, and disabled must stay visibly lighter
     than --color-text-muted or the two states become indistinguishable.
     Mapping to the nearest luminance (stone-500) would have collapsed
     them — today muted 4.61 reads darker than disabled 3.78, and that
     ordering is the signal. */
  --color-disabled-text: var(--stone-400);
  --color-overlay: rgb(28 25 23 / 48%);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  /* Radii ladder by ROLE, not by size alone (build item 2, CP2):
       xs  small chips and inline marks
       sm  controls — buttons, inputs, selects, textareas
       md  sub-panels — inner panels, thumbs, rows, tiles
       lg  containers — cards, panels, layout regions, media frames
     The 10px literals were an exact tie between md and lg on distance;
     all 14 were containers, so role settled it rather than rounding. */
  --radius-xs: 0.25rem;
  --radius-sm: 0.625rem;
  --radius-md: 0.75rem;
  --radius-lg: 0.875rem;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgb(16 36 31 / 6%), 0 4px 14px rgb(16 36 31 / 6%);
  --shadow-popover: 0 12px 30px rgb(28 25 23 / 14%);
  --shadow-modal: 0 24px 64px rgb(28 25 23 / 22%);
  --control-h: 2.75rem;
  --content-max: 90rem;
  /* Reading measure for RUNNING PROSE only — see DESIGN_SYSTEM.md for
     when it applies. 30rem = 480px, chosen to give roughly 60 characters
     at .subtitle's 14.4px. ABSOLUTE on purpose: written as 60ch it would
     resolve against each consumer's own font-size and silently mean 475px
     on a subtitle and 1056px on a 32px h1 — a different value per
     element. See the shared-value rule in AGENTS.md. */
  --measure-prose: 30rem;
  /* Backwards-compatible aliases while legacy screens migrate. */
  --ink: var(--color-text);
  --paper: var(--color-bg-page);
  --line: var(--color-border);
  /* #419: the legacy red, amber and green point at the status tokens, so the app has one red, one amber and one green (they were
     #b91c1c, #b45309 on #fffbeb and #15803d). The amber was the Price table's sale band (cptgt) until the owner ruled, 2026-10-17
     (6229011556): "stay consistent with the kit now for visual decisions" (#419 PR 4b). */
  --floor-red: var(--color-error);
  --floor-red-bg: var(--color-error-bg);
  --near-amber: var(--color-warning);
  --near-amber-bg: var(--color-warning-bg);
  --safe-green: var(--color-success);
  --safe-green-bg: var(--color-success-bg);
  --accent: var(--color-accent);

  /* -------------------------------------------------------------------
     From docs/style-target.css (build item 1, 2026-08-26) — names and
     structure taken from the Killion target stylesheet. Values are the
     target's own EXCEPT where a shared name already has a live value
     above (colors, --radius-md/--radius-lg, --control-h): those 27
     tokens keep today's numbers so nothing currently on screen shifts —
     see docs/style-target.css's header for the full diff. Everything
     below is net-new — nothing live consumes it yet, so there's no
     regression risk in taking the target's values as-is. --control-height
     is the one true rename (identical value to --control-h, 2.75rem);
     new rules should reference --control-height going forward. */
  --control-height: var(--control-h);
  --control-height-sm: 2.25rem;
  --content-max-editor: 100rem;
  --page-gutter: clamp(1rem, 2.5vw, 2rem);
  --color-bg-muted: #e9eeec;
  --color-focus-ring: rgb(8 125 118 / 24%);
  --color-etsy: #f1641e;
  --color-tiktok: #111111;
  --color-instagram: #c13584;
  --shadow-dialog: 0 24px 64px rgb(28 25 23 / 22%);
  --sidebar-width: 16.5rem;
  --app-header-height: 4.5rem;
  --sticky-action-height: 5.5rem;
  --duration-fast: 140ms;
  --duration-base: 200ms;
  --duration-dialog: 260ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --z-sticky: 20;
  --z-popover: 40;
  --z-overlay: 60;
  --z-dialog: 70;
  --z-toast: 80;

  /* #419: the type scale, eight stops and no others (DESIGN_SYSTEM.md, Typography). Every font-size in this file is one of
     these, except the h1 rule's own literals (on the scale, pinned by the CP3 manifest), the h1's 28 px below 768, the dark
     shell's own sizes (#418) and the canvas ruler's 10 px tick labels (a drawing annotation, not text). */
  --text-xs: 0.75rem;     /* 12: eyebrows, table headers, pills, counts */
  --text-sm: 0.8125rem;   /* 13: secondary metadata, small buttons */
  --text-base: 0.875rem;  /* 14: body in the app, labels, hints, buttons */
  --text-md: 1rem;        /* 16: inputs, card headings */
  --text-lg: 1.125rem;    /* 18: section-card headings */
  --text-xl: 1.25rem;     /* 20: section headings */
  --text-2xl: 1.5rem;     /* 24: figures in a stat tile */
  --text-3xl: 2rem;       /* 32: page titles */
}

* { box-sizing: border-box; }

/* An author rule setting `display` on an element beats the browser's own
   [hidden]{display:none} default (author stylesheets outrank the UA
   stylesheet regardless of the hidden attribute) — so any selector below
   that sets display unconditionally silently defeats el.hidden = true/false
   toggles in JS. Confirmed live: .override-panel/.inline-upload-form both
   stayed visually display:flex with hidden===true. One global override
   fixes every current and future case instead of patching each selector. */
[hidden] { display: none !important; }

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  margin: 0;
  padding: var(--space-8) var(--space-6);
  line-height: 1.5;
}

:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }   /* #419: the one focus ring; form controls use the brand edge and soft ring below */
::selection { color: white; background: var(--color-brand); }
.skip-link { position: fixed; top: var(--space-2); left: var(--space-2); z-index: 1000; transform: translateY(-160%); background: var(--color-brand); color: white; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); }
.skip-link:focus { transform: translateY(0); }
/* docs/style-target.css defines an equivalent .visually-hidden (same clip
   technique, no margin:-1px trick) — lowest-risk of the 16 name collisions
   in that file's overlap inventory; safe to consolidate whenever this rule
   is next touched. */
.sr-only, .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

button, input, select, textarea { font: inherit; }
/* 44px touch-target floor for real controls — a self-imposed touch preference (WCAG 2.5.5 is AAA; AA is 2.5.8 at 24px), see DESIGN_SYSTEM.md. Checkboxes and radios are
   EXCLUDED: they have a fixed intrinsic size, so a min-height floor does not
   enlarge the hit area, it just stretches the box — a checkbox declared
   18x18 rendered 18 wide by 44 tall, and it silently killed
   .variant-row's own min-height. Their hit area comes from the label or row
   that wraps them (see the selection primitive below), which is where a
   44px target actually belongs. */
button, [role="button"], input:not([type="checkbox"]):not([type="radio"]), select {
  min-height: var(--control-height);
}
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; background: var(--color-disabled-bg); border-color: var(--color-disabled-border); color: var(--color-disabled-text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .skeleton { opacity: 0.72; }
}

/* ------------------------------------------------------------------------
   State primitives, from docs/style-target.css (build item 1, 2026-08-26)
   ------------------------------------------------------------------------
   All additive — none of these names collide with anything live (see that
   file's overlap inventory), so nothing existing is renamed or restyled to
   use them here. They exist so item 2+ has a real, reusable primitive to
   migrate a screen's bespoke state class onto, instead of re-deriving
   hover/selected/loading/empty/error per component. State selectors prefer
   real ARIA/native attributes over class names where one fits (matching
   the existing .layers-tab[aria-selected="true"] precedent below) — a
   class name (.is-selected) is only the fallback when no attribute fits. */

/* .skeleton deliberately reuses the EXISTING @keyframes pulse (defined
   once, in the listing-status badge section below) rather than adding a
   second definition under the same name — DESIGN_SYSTEM.md v2.0's
   loading-state language says "use the existing @keyframes pulse", and
   two same-named keyframes would silently compete (last-defined wins),
   which is exactly the kind of ambiguity this system exists to prevent.
   docs/style-target.css's own pulse (0.52→1) differs only in phase and
   floor from the live one (1→0.45); the live values are canonical. */
.skeleton {
  display: block; min-height: 1rem; border-radius: var(--radius-sm);
  background: var(--color-bg-muted); animation: pulse 1.4s var(--ease-standard) infinite;
}
.skeleton--text { height: 0.875rem; }
.skeleton--control { height: var(--control-height); }
.skeleton--media { aspect-ratio: 4 / 3; border-radius: var(--radius-md); }
/* #419 PR 1: the shapes #310 asks for, on the same pulse */
.skeleton--title { height: 1.125rem; width: 40%; }
.skeleton--pill { height: 24px; width: 5rem; border-radius: var(--radius-pill); }
.skeleton--row { height: var(--control-height); border-radius: var(--radius-md); }
/* #33 PR 0: a submit button with data-busy-label while its form submits (static/busy.js). The label says it; no spinner. */
.is-busy { cursor: progress; }

.selectable-card {
  position: relative;
  transition: border-color var(--duration-fast) var(--ease-standard),
              background-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}
.selectable-card:hover { border-color: var(--color-border-strong); box-shadow: 0 4px 12px rgb(28 25 23 / 8%); }
.selectable-card[aria-selected="true"], .selectable-card.is-selected {
  border-color: var(--color-selected-border); background: var(--color-selected-bg);
  border-width: 2px; padding: calc(var(--space-4) - 1px) calc(var(--space-5) - 1px); /* one shape, see .selection-* */
}

.field__error { color: var(--color-error); font-size: var(--text-sm); line-height: 1.4; }
.field__hint { color: var(--color-text-secondary); font-size: var(--text-base); line-height: 1.43; }   /* #174: supporting text, 14/20 */

/* FORM CONTROLS (#419 PR 1). .input was on 49 controls and defined nowhere, so every input and select drew the browser's own box.
   One control: 44 px, the control border (3:1 on white), radius-sm, 16 px text; hover darkens the edge; focus is the brand edge
   plus the soft ring. Selects and textareas carry class="input" in the templates, so the element-qualified rules shape them;
   .select and .textarea are the same controls by their own names. A scoped width rule still sets each control's width. */
.field { display: grid; gap: 6px; min-width: 0; }
.field > .field-label { margin: 0; }
.input, .select, .textarea {
  max-width: 100%; min-height: var(--control-height); padding: 0 var(--space-3);
  border: 1px solid var(--color-control-border); border-radius: var(--radius-sm);
  background-color: var(--color-bg-surface); color: var(--color-text); font-size: var(--text-md);
  transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
textarea.input, .textarea { padding: 10px var(--space-3); min-height: 5.5rem; line-height: 1.5; resize: vertical; }
select.input, .select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%2378716c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input::placeholder, .textarea::placeholder { color: var(--color-text-muted); }
:is(.input, .select, .textarea):hover:not(:disabled) { border-color: var(--color-text-muted); }
:is(.input, .select, .textarea):focus-visible { outline: none; border-color: var(--color-focus); box-shadow: 0 0 0 1px var(--color-focus), 0 0 0 4px var(--color-focus-ring); }
:is(.input, .textarea)[aria-invalid="true"] { border-color: var(--color-error); }
.field__count { justify-self: end; font-size: var(--text-xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--color-text-muted); pointer-events: none; }
.input-wrap > .input { padding-left: 36px; }

/* LINKS (#419 PR 1): there was no link rule, so every link in the pages drew the browser's blue and purple. Brand text (7.31:1 on
   white, 6.96 on the subtle ground), a 40% underline that darkens on hover. A component class that sets its own color still wins. */
a { color: var(--color-brand); text-decoration-color: color-mix(in srgb, var(--color-brand) 40%, transparent); text-underline-offset: 0.18em; }
a:hover { color: var(--color-brand-hover); text-decoration-color: currentColor; }

/* EYEBROW (#419 PR 1): the group over a heading, and the one other place uppercase belongs (tables are the first). */
.eyebrow { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-secondary); }

.empty-state, .error-state {
  display: grid; place-items: center; gap: var(--space-3);   /* #419: no 16rem floor; a page-sized empty state is padded, not walled */
  padding: var(--space-8) var(--space-6); border: 1px dashed var(--color-border-strong); color: var(--color-text-secondary);
  border-radius: var(--radius-md); background: var(--color-bg-surface); text-align: center;
}
.error-state { border-color: #f0bbb5; background: var(--color-error-bg); }
.empty-state > svg { width: 32px; height: 32px; color: var(--color-text-muted); }
.empty-state strong { color: var(--color-text); font-weight: 600; }
.empty-state--inline { grid-auto-flow: column; justify-content: start; padding: var(--space-3) 14px; text-align: left; }
p.empty-state { display: block; align-content: center; }   /* a paragraph is inline text, not grid items: as a grid, a sentence with a link inside put its full stop on its own line (review and previews, 2026-09-07); pixel-diffed across every route */

.progress { width: 100%; height: 0.5rem; overflow: hidden; border-radius: var(--radius-pill); background: var(--color-bg-muted); }
.progress__value { height: 100%; border-radius: inherit; background: var(--color-brand); }

.disclosure { border-bottom: 1px solid var(--color-border); }
.disclosure__trigger {
  display: flex; width: 100%; min-height: var(--control-height); align-items: center;
  justify-content: space-between; gap: var(--space-3); border: 0; background: transparent;
  color: var(--color-text); padding: var(--space-3) var(--space-4); font-weight: 700; text-align: left;
}
.disclosure__content { padding: 0 var(--space-4) var(--space-4); }
.disclosure__trigger[aria-expanded="false"] + .disclosure__content { display: none; }

/* ------------------------------------------------------------------------
   SELECTION PRIMITIVE  (build item 2, CP0)
   ------------------------------------------------------------------------
   One selected background, border, indicator, hover and focus, in three
   shapes: .selection-row (compact lists), .selection-card (products,
   providers, mockups), .selection-tile (artwork and image libraries).

   Before this, five controls each had their own recipe — three different
   selected colours, three backgrounds, ring widths of 1px/2px/inset/none,
   and radii of 6/8/10/12px. Anything picking one thing should look like
   everything else picking one thing.

   SEMANTICS STAY HONEST. Underneath every one of these is a real
   <input type="checkbox"> for multi-select or <input type="radio"> for
   single-choice, wrapped in a <label> so the whole surface is clickable
   without a JS click handler. Never a div pretending to be a control,
   never a switch. The input is hidden with the clip technique, NOT
   display:none or visibility:hidden — those remove it from the tab order
   and the accessibility tree, which is the whole thing being preserved.

   THE CSS IS THE CONTRACT, not the Jinja macro. The variant rows, design
   tiles and layer rows are built in static/colors_editor.js, so the macro
   in templates/_selection.html is a convenience for server-rendered uses
   and the JS must emit the same shape. Keep them in step.
   ------------------------------------------------------------------------ */

/* THE INPUT IS A SIBLING, NOT A CHILD — this is load-bearing, not style.
   The obvious construction is <label><input>...</label> styled with
   :has(input:checked). It renders correctly and then goes stale: checking
   one radio implicitly unchecks its group-mate, and Chrome does not
   invalidate the :has() ancestor of the radio that was unchecked FOR it.
   Measured on the provider screen — after a real click the losing card kept
   the selected border and the winning card never gained it, and forcing a
   style recalc snapped both to the right state. The selector was correct
   the whole time; only the invalidation was missing.
   The adjacent-sibling combinator has no such gap, so the input sits
   *before* the label and is bound to it with for/id. Same real control,
   same native label activation, same keyboard behaviour — reliable paint. */
.selection-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.selection-row, .selection-card, .selection-tile {
  position: relative;
  display: block;
  cursor: pointer;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) var(--ease-standard),
              background-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}

.selection-row:hover, .selection-card:hover, .selection-tile:hover {
  border-color: var(--color-border-strong);
}

/* Selected: border AND background AND indicator — never colour alone
   (DESIGN_SYSTEM.md), so the state survives a monochrome display. Hover
   uses a different, weaker border so a hovered card is never mistakable
   for a selected one. */
.selection-input:checked + .selection-row,
.selection-input:checked + .selection-card,
.selection-input:checked + .selection-tile {
  border-color: var(--color-selected-border);
  border-width: 2px;
  background: var(--color-selected-bg);
}
/* ONE shape draws the outline: a 2px border, never border + ring. Two same-colour
   rings (1px border + 1px spread shadow) are flush on straight edges but anti-alias
   as two separate arcs at the radius, so corners smear wider and lighter; and an
   outer ring is clipped by any overflow container (the layer list lost its top edge
   that way). Measured at 1x against four alternatives — build item 2, CP7. Padding
   pulls in 1px so nothing moves when a surface is selected. */
.selection-input:checked + .selection-row { padding: calc(var(--space-2) - 1px) calc(var(--space-3) - 1px); }
.selection-input:checked + .selection-card { padding: calc(var(--space-4) - 1px); }
.selection-input:checked + .selection-tile { padding: calc(var(--space-2) - 1px); }

/* The input is invisible, so the focus ring has to land on the surface the
   user is actually operating. :focus-visible keeps it to keyboard focus —
   a mouse click selects without painting a ring. */
.selection-input:focus-visible + .selection-row,
.selection-input:focus-visible + .selection-card,
.selection-input:focus-visible + .selection-tile {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* ---- row: a checklist line. The indicator IS the affordance here, so
   unlike the card and tile it stays visible. ---- */
.selection-row {
  display: flex; align-items: center; gap: var(--space-2);
  min-height: 44px; padding: var(--space-2) var(--space-3);
}

.selection-indicator {
  position: relative; flex-shrink: 0;
  width: 20px; height: 20px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-bg-surface);
}
.selection-indicator svg {
  position: absolute; inset: 0; margin: auto;
  width: 14px; height: 14px; color: white;
  opacity: 0; transition: opacity var(--duration-fast) var(--ease-standard);
}
.selection-input:checked + .selection-row .selection-indicator,
.selection-input:checked + .selection-card .selection-indicator,
.selection-input:checked + .selection-tile .selection-indicator {
  background: var(--color-selected-border);
  border-color: var(--color-selected-border);
}
.selection-input:checked + .selection-row .selection-indicator svg,
.selection-input:checked + .selection-card .selection-indicator svg,
.selection-input:checked + .selection-tile .selection-indicator svg { opacity: 1; }

.selection-row__label { flex: 1; min-width: 0; font-size: var(--text-base); color: var(--color-text); }
.selection-row__info { flex-shrink: 0; font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---- card and tile: the surface and its border are the whole affordance,
   as in the mockups, so no indicator is rendered. ---- */
.selection-card { padding: var(--space-4); }
.selection-tile { padding: var(--space-2); text-align: left; }

/* ---- check: a checkbox CELL in a row that cannot itself be a <label>
   because it holds links or buttons (research_index's compare picker).
   The label wraps only the indicator. Padding gives a 44px hit area;
   the matching negative margin keeps the visual box 20px so the row's
   layout does not move. Fourth shape, added on first real use (CP5). ---- */
.selection-check {
  display: inline-flex; align-items: center; cursor: pointer;
  padding: var(--space-3); margin: calc(-1 * var(--space-3)); border-radius: var(--radius-sm);
}
.selection-input:checked + .selection-check .selection-indicator {
  background: var(--color-selected-border); border-color: var(--color-selected-border);
}
.selection-input:checked + .selection-check .selection-indicator svg { opacity: 1; }
.selection-input:focus-visible + .selection-check { outline: 3px solid var(--color-focus); outline-offset: 2px; }
/* The primitive had no disabled hook before this shape needed one: the
   picker disables unchecked boxes once four are selected. */
.selection-input:disabled + .selection-check { cursor: not-allowed; }
.selection-input:disabled + .selection-check .selection-indicator {
  background: var(--color-disabled-bg); border-color: var(--color-disabled-border);
}
/* cp32f (the owner, 2026-09-27): a disabled CHECKED cell — the held last-offered colour — keeps the selected fill, so it reads as
   checked; only an unchecked disabled cell (the picker's) greys out. The white tick on the disabled grey was all but invisible. */
.selection-input:disabled:checked + .selection-check .selection-indicator {
  background: var(--color-selected-border); border-color: var(--color-selected-border);
}

/* .input/.textarea/.select were listed here but are defined NOWHERE else
   in this stylesheet — ported from docs/style-target.css during build
   item 1 without checking. Harmless at runtime, but it made an audit
   report them as present components when they do not exist. Removed;
   those form-control classes stay documented-but-unbuilt (define on
   first real use) rather than being implied by a forced-colors rule. */
@media (forced-colors: active) {
  .btn, .card, .selectable-card { forced-color-adjust: auto; }
}

/* Right-aligned figures in data tables. Already used by the showcase's
   contrast tables but never defined, so it stated an intent it did not
   deliver — the numbers stayed left-aligned and hard to compare down a
   column. tabular-nums keeps digit columns from jittering
   (DESIGN_SYSTEM.md asks for it on financial values). */
.numeric { text-align: right; font-variant-numeric: tabular-nums; }

/* docs/style-target.css defines .wrap with a different recipe (1440px +
   responsive gutter, vs. this 980px fixed max-width with no gutter) — the
   highest-blast-radius collision in that file's overlap inventory, since
   this class is base.html's root wrapper on every single page. Not
   reconciled here; item 2 decides whether/how to widen it per screen. */
/* Widened from 980px in CP3. .subtitle is deliberately NOT capped:
   measured, the longest real subtitle is 181 characters against ~200
   of capacity here, so none wraps — the earlier 180/200 figures were
   the container's capacity, not any actual string. A subtitle wraps
   at the content edge, aligning with the rightmost card in the same
   container, which is the intended relationship. */
.wrap { max-width: var(--content-max); margin: 0 auto; }

/* HEADING SCALE (build item 2, CP3). DESIGN_SYSTEM.md: page titles
   32/38 desktop, 28/34 below 768px, weight 700; section headings 20/28;
   card headings 16/24.

   h2 and h3 previously had NO base rule at all — every heading in the
   app got its size from one of ten scoped component overrides, or fell
   through to the browser default. So this is not correcting a scale, it
   is supplying one that never existed. The ten scoped overrides still
   win where they apply, so no production screen moves here; each is
   converted by the checkpoint that owns its screen.

   .ds-sample-page-title rides the h1 rule so the showcase's type sample
   cannot drift from the real heading size — one owner of the value. */
h1, .ds-sample-page-title {
  font-size: 2rem; font-weight: 650;   /* Plus Jakarta's 700 reads heavy at 32px (#418) */
  line-height: 1.1875; letter-spacing: -0.02em; text-wrap: balance;
  margin-bottom: var(--space-1);
}
.ds-sample-page-title { margin-top: 0; }
h1, h2, h3, .ds-sample-page-title { font-family: var(--font-display); }
:is(h1, h2, h3) :is(small, .subtitle) { font-family: var(--font-sans); }   /* the muted part of a heading stays on the body face */
h2 { font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
h3 { font-size: 1rem; font-weight: 700; line-height: 1.5; }

@media (max-width: 768px) {
  h1, .ds-sample-page-title { font-size: 1.75rem; }
}
.subtitle { color: var(--color-text-muted); margin-top: 0; margin-bottom: var(--space-6); font-size: var(--text-base); }

/* NOTICES (#419 PR 1): one shape, four tones on the status tokens, an optional icon and action slot. .flash is the success
   tone, .flash.flash-error the error tone, .cache-warming-banner the info tone, .overflow-warning the warning tone. */
.notice, .flash, .cache-warming-banner {
  padding: var(--space-3) 14px; border: 1px solid; border-radius: var(--radius-md); font-size: var(--text-base);
}
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.notice > svg { width: 18px; height: 18px; flex: none; }
.notice > p { flex: 1 1 16rem; min-width: 0; margin: 0; }
.notice > .btn-sm, .notice > .btn-outline { margin-left: auto; }
.notice--ok, .flash { background: var(--color-success-bg); border-color: color-mix(in srgb, var(--color-success) 35%, transparent); color: var(--color-success); }
.notice--warn { background: var(--color-warning-bg); border-color: color-mix(in srgb, var(--color-warning) 35%, transparent); color: var(--color-warning); }
.notice--error { background: var(--color-error-bg); border-color: color-mix(in srgb, var(--color-error) 35%, transparent); color: var(--color-error); }
.notice--info, .cache-warming-banner { background: var(--color-info-bg); border-color: color-mix(in srgb, var(--color-info) 30%, transparent); color: var(--color-info); }
.notice--inline { padding: 6px 10px; font-size: var(--text-sm); border-radius: var(--radius-sm); }
.flash, .cache-warming-banner { margin-bottom: var(--space-4); }
/* #860 PR 2: the STAGING banner, first thing in the body on every page that extends base.html, the sign-in page included. The warning tone. */
.staging-banner { padding: var(--space-2) var(--space-4); background: var(--color-warning-bg); border-bottom: 1px solid var(--color-warning); color: var(--color-warning); font-size: var(--text-sm); font-weight: 600; text-align: center; }

/* docs/style-target.css's .card is border/radius/shadow only — padding
   lives in nested __header/__body/__footer there. This .card bakes padding
   directly in and is used as-is across the pricing tool; not reconciled
   here (see that file's overlap inventory). */
/* CARDS (#419 PR 1): one recipe: the surface, a 1px border, radius-lg, the two-layer card shadow, 20/24 padding (16 at phone
   width). The summary's sections and cards, the editor's columns, the Mockups panels, the Listings rows, the research and
   compare blocks take it (their own rules below keep their padding and layout). --quiet drops the shadow (tiles in a row),
   --locked is the subtle ground with no shadow, --held is the amber edge of a hold. */
.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-3);
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-card);
}
.card--quiet { box-shadow: none; }
.card--locked { background: var(--color-bg-subtle); box-shadow: none; }
.card--held { border-color: var(--color-warning); }
.card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px var(--space-3); margin-bottom: var(--space-3); }
.card__head :is(h2, h3) { font-size: var(--text-md); margin: 0; }
@media (max-width: 639px) { .card { padding: var(--space-4); } }

.card.below_floor { border-color: var(--floor-red); background: var(--floor-red-bg); }
.card.near_floor { border-color: var(--near-amber); background: var(--near-amber-bg); }
.card.well_above_floor { border-color: var(--line); }

.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); }
/* docs/style-target.css aliases .card-title to h3 (1rem/700); this is a
   smaller label span (0.95rem/600) used inside .card-top. Not reconciled. */
.card-title { font-weight: 600; font-size: var(--text-md); }
.card-type { color: var(--color-text-muted); font-size: var(--text-sm); }

.badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.badge.below_floor { background: var(--floor-red); color: white; }
.badge.near_floor { background: var(--near-amber); color: white; }
.badge.well_above_floor { background: var(--safe-green); color: white; }
.badge.unknown { background: var(--stone-500); color: white; }
.badge.warming { background: var(--accent); color: white; }


.research-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  background: var(--stone-50);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
}
.research-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-1); }
.research-label { font-size: var(--text-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-text-secondary); }
.research-meta { font-size: var(--text-base); color: var(--stone-700); margin: 0 0 var(--space-1); }
.research-note { font-size: var(--text-xs); color: var(--color-text-muted); margin: 0; }
.research-panel .btn-sm { flex: none; white-space: nowrap; }
.research-panel .btn-sm:disabled { opacity: 0.55; cursor: default; }
@media (max-width: 640px) { .research-panel { flex-direction: column; } }

/* Per-tag char-count hints under an Etsy tags input */
.tag-hints { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-2); }
.tag-chip {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--stone-100);
  color: var(--color-text-secondary);
  border: 1px solid transparent;
}
.tag-chip.invalid {
  background: var(--floor-red-bg);
  color: var(--floor-red);
  border-color: var(--floor-red);
  font-weight: 600;
}
.stat-sub.over { color: var(--floor-red); font-weight: 700; }

.price-row {
  display: flex;
  gap: var(--space-6);
  margin-top: var(--space-2);
  font-size: var(--text-base);
  color: var(--stone-700);
  flex-wrap: wrap;
}
.price-row strong { color: var(--ink); }

.approve-form {
  margin-top: var(--space-3);
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.approve-form input[type=number] {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  width: 90px;
  font-size: var(--text-base);
}
/* docs/style-target.css's .btn is a bare structural base — color comes
   from .btn--primary/--secondary/--ghost/--destructive modifiers. This
   rule is deliberately broader (bare `button` too, fully self-colored)
   because 6 classless <button> elements across 4 legacy pricing templates
   (discount_settings.html, listing_detail.html, profit_targets.html,
   watchlist.html) still depend on it for their entire appearance —
   narrowing to `.btn`-only would un-style those with no template change
   in this build to fix it. Every other bare <button> in the app (the
   colors editor's .layers-tab, .panel-collapse-toggle, .editing-mode-badge,
   etc.) already defensively re-declares its own background/color to
   escape this rule — see the comment at the top of the colors & design
   editor section below. `display: inline-block` here is inert-by-default
   (the UA stylesheet already sets it for <button>) and is not what
   silently defeated [hidden] toggling in the past — the global
   `[hidden] { display: none !important; }` rule above (line ~93) already
   wins over this regardless of value. Reconciling the selector scope is
   item 2's job, screen by screen. */
/* STRUCTURE ONLY — no appearance (build item 2, CP3).
   The defect was appearance leaking from an ELEMENT selector: every
   <button> in the app rendered accent-on-white whether or not it was a
   primary action, so component classes had to override a look they never
   asked for. Structure stays global because 19 component classes rely on
   it as a base (.btn-ghost alone would lose six properties); appearance
   moves to .btn below, which is the primary-button class.

   Deliberately NOT renamed to .btn-primary: that is 40 template edits
   with no user-visible change, and would leave two names for one thing.
   Recorded as cosmetic-and-deferred in listing-hub-roadmap.md. */
/* Element half collapsed (build item 2 follow-up, roadmap 2v.4, 2026-09-02): a bare <button> now
   gets only the UA default plus `font: inherit` above; every component class restates the structure
   it needs (verified element by element with scripts/button_structure.py and pixel-for-pixel with
   scripts/pixel_diff.py — zero differing pixels at rest and in :hover, :focus-visible, :active and
   disabled). .btn keeps the full structural rule, so the bare class="btn" uses and the anchors styled
   as buttons are served by .btn itself. */
/* BUTTONS (#419 PR 1): one structure, four tones, two sizes. .btn (and its alias .btn-primary) is the gradient primary, one per
   card or bar; .btn-outline is the quiet action (surface, neutral edge, brand text); .btn-ghost has no edge; .btn-danger and
   .btn-danger-outline are the one destructive tone (error text and edge). .btn-sm is a SIZE (13 px text, tighter sides), never a
   color: on its own it takes the outline tone. Every button keeps the 44 px touch floor (DESIGN_SYSTEM.md), .btn-sm included. */
.btn, .btn-primary, .btn-outline, .btn-ghost, .btn-danger, .btn-danger-outline, .btn-sm, .btn-approve {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--control-height); padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--text-base); font-weight: 600; line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}
:is(.btn, .btn-primary, .btn-outline, .btn-ghost, .btn-danger, .btn-danger-outline, .btn-sm, .btn-approve) > svg { width: 16px; height: 16px; flex: none; }
/* What each component class was silently inheriting from the element rule, restated. Each
   declaration below is a property scripts/button_structure.py saw CHANGE on a running page when
   the element selector was removed — twelve element kinds, nothing guessed from the stylesheet.
   Placed where the element rule stood so cascade order against the component rules is unchanged. */
.align-btn, .icon-btn, .btn-ghost { padding: var(--space-2) var(--space-4); }
.icon-btn, .btn-ghost, .design-tile, .disclosure__trigger, .layer-visibility-btn, .panel-collapse-toggle, .rotate-handle { font-size: var(--text-base); }
.btn-ghost, .disclosure__trigger, .layer-visibility-btn, .layers-tab, .panel-collapse-toggle { border-radius: var(--radius-sm); }
.btn-ghost, .disclosure__trigger { cursor: pointer; }

/* APPEARANCE — .btn is the primary button; .btn-primary is its alias (the sign-in page's button had only that class). */
.btn, .btn-primary { background: var(--btn-gradient); box-shadow: var(--btn-shadow); color: white; }
.btn-primary:hover { filter: brightness(0.92); }
.btn-primary:active { filter: brightness(0.86); }
.btn:hover { filter: brightness(0.92); }   /* was opacity 0.9, which lightens the gradient's light stop to 4.33:1 under white text; darkening keeps 4.98:1 */
.btn:active { filter: brightness(0.86); }
.btn:not(.btn-ghost):not(.btn-outline):not(.btn-danger):active { transform: translateY(1px); box-shadow: 0 1px 0 rgb(0 0 0 / 12%) inset; }   /* #418: the press nudge and inset shadow belong to the primary button, not to ghost, outline or danger */
/* The modifiers that restyle .btn as something other than the primary action carry no primary shadow. */
.btn-ghost, .btn.btn-outline, .btn-danger, .compare-bar .btn { box-shadow: none; }
.compare-bar .btn:active { transform: none; box-shadow: none; }
/* Ghost and outline buttons keep their own hover backgrounds; the primary's darkening filter is not theirs. */
.btn-ghost:hover, .btn-ghost:active, .btn-outline:hover, .btn-outline:active { filter: none; }

/* Switch — the design system's core control (DESIGN_SYSTEM.md "Components"; #120, 2026-09-30). A submit button in its own
   form, so it works without JavaScript: role="switch" and aria-checked carry the state, aria-label names what it switches
   ("SwiftPOD", never the state: the APG switch pattern), and the word On or Off sits inside, hidden from assistive technology,
   so the state is never color alone. On: the brand interaction color
   with the knob on the right. Off: a neutral track with the knob on the left. The button is the 44px hit area; the track
   inside it is what shows. */
.switch {
  display: inline-flex; align-items: center; min-height: var(--control-height);
  padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.switch__track {
  display: inline-flex; align-items: center; justify-content: space-between; gap: var(--space-1);
  box-sizing: border-box; min-width: 4rem; height: 1.75rem; padding: 0 0.1875rem 0 var(--space-2);
  border: 1px solid; border-radius: var(--radius-pill);
  font-size: var(--text-sm); font-weight: 600; line-height: 1;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.switch__knob { flex: none; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--color-bg-surface); box-shadow: var(--shadow-card); }
.switch[aria-checked="true"] .switch__track { background: var(--color-brand); border-color: var(--color-brand); color: white; }
.switch[aria-checked="false"] .switch__track {
  flex-direction: row-reverse; padding: 0 var(--space-2) 0 0.1875rem;
  background: var(--color-bg-muted); border-color: var(--color-border-strong); color: var(--color-text-secondary);
}
.switch[aria-checked="false"] .switch__knob { border: 1px solid var(--color-border-strong); }
.switch[aria-checked="true"]:hover .switch__track { background: var(--color-brand-hover); border-color: var(--color-brand-hover); }
.switch[aria-checked="false"]:hover .switch__track { border-color: var(--color-text-muted); }
.switch:focus-visible { outline: none; }
.switch:focus-visible .switch__track { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.switch:disabled { cursor: not-allowed; background: transparent; }   /* over the global button:disabled fill; the track shows the state */
.switch:disabled .switch__track,
.switch:disabled:hover .switch__track { background: var(--color-disabled-bg); border-color: var(--color-disabled-border); color: var(--color-disabled-text); }
.switch:disabled .switch__knob { border-color: var(--color-disabled-border); box-shadow: none; }
/* A switch's note beside it (#135): empty until a save made in place fails, then a short sentence in the error text, in words,
   never color alone. A polite live region announces it, so it stays rendered while empty (an empty block has no height). */
.switch__note { display: block; max-width: 10rem; color: var(--color-error); font-size: var(--text-sm); line-height: 1.4; }
/* Settings → Garments & providers: each garment's providers, collapsed by default (#120). Below the table's width it scrolls
   inside the card rather than widening the page. */
.garment-providers { overflow-x: auto; }
/* A switch returns to its own anchor: the garment switch to #garment-<id>, a provider switch to #provider-<id> (#128). Land it
   clear of the sticky top bar, the provider's row (its card below 768 px) as the garment's header. */
section[data-garment], .garment-providers tr[data-provider] { scroll-margin-top: calc(var(--topbar-height) + var(--space-4)); }
/* #93: each provider's own sizes offered and front print offset, edited in its row (its card below 768 px). */
.provider-fields > summary { cursor: pointer; }
.provider-fields__form { display: grid; gap: var(--space-2); margin-top: var(--space-2); min-width: 14rem; }
.provider-fields__form fieldset { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin: 0; }
.provider-fields__form input[type="text"] { display: block; width: 6rem; margin-top: var(--space-1); }
/* #126 (the owner's option (a), 2026-09-30): below 768 px, the app shell's breakpoint, each provider row is a small stacked card,
   so its switch never sits past the card's edge. The name and the switch on top, then Where, Print areas and Colors × sizes,
   each labeled in words from the cell's data-label. The column headers stay in the markup for assistive technology but are
   not drawn. At 768 px and above the table is unchanged. */
@media (max-width: 767px) {
  .garment-providers { overflow-x: visible; }
  .garment-providers table, .garment-providers tbody { display: block; }
  .garment-providers__head { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .garment-providers tr[data-provider] {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-3); row-gap: var(--space-1);
    margin-top: var(--space-3); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md);
    background: var(--color-bg-surface);
  }
  .garment-providers tr[data-provider] > td { display: block; grid-column: 1 / -1; padding: 0; border-bottom: 0; overflow-wrap: anywhere; }
  .garment-providers tr[data-provider] > td.garment-providers__name { grid-column: 1; grid-row: 1; font-weight: 600; }
  .garment-providers tr[data-provider] > td.garment-providers__switch { grid-column: 2; grid-row: 1; }
  .garment-providers tr[data-provider] > td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--color-text-secondary); }
  .garment-providers tr[data-provider] > td[data-label]:empty { display: none; }
}

.top-actions { margin-bottom: var(--space-6); }

.listing-group { margin-bottom: var(--space-8); }
.listing-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-3);
  border-bottom: 2px solid var(--ink);
}
.listing-header h2 { font-size: var(--text-lg); margin: 0; }
.listing-id { color: var(--color-text-muted); font-size: var(--text-sm); margin-left: auto; }

.listing-card {
  display: flex;
  gap: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
}
.listing-card:hover { border-color: var(--accent); }
.listing-thumb {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  background: var(--stone-100);
}
.listing-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.listing-thumb-lg {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}
.listing-card-body { flex: 1; min-width: 0; }
.listing-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.listing-card-top h2 { font-size: var(--text-md); margin: 0; }
.listing-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.stat-label { display: block; font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.02em; }
.stat-sub { display: block; font-size: var(--text-xs); color: var(--color-text-muted); }
.flag-warning { color: var(--floor-red); }
.flag-override { color: var(--accent); font-weight: 600; }

.listing-detail-header {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-6);
}
.listing-detail-header h1 { margin: 0 0 var(--space-1); }

/* CP3 widened .wrap to --content-max (1440px) and left this at 1400px, so
   "wide" was narrower than the default. --content-max-editor (1600px)
   makes wide genuinely wider. Used by research_compare and design_review. */
.wrap-wide { max-width: var(--content-max-editor); }

/* docs/style-target.css's .table-scroll is nearly identical (same purpose,
   tokens instead of literals) — lowest-risk of the 16 name collisions. */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.perf-num { white-space: nowrap; }   /* #1485: Settings > Performance keeps "6.5 s" on one line; the table scrolls inside its card */
.sku-table { width: 100%; border-collapse: collapse; font-size: var(--text-base); background: white; }
.sku-table th, .sku-table td { padding: var(--space-2) var(--space-3); text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.sku-table th { background: var(--stone-100); font-size: var(--text-xs); text-transform: uppercase; color: var(--color-text-muted); position: sticky; top: 0; }
.sku-table tr.below_floor td { background: var(--floor-red-bg); }
.sku-table tr.near_floor td { background: var(--near-amber-bg); }
.sku-table tr.warming td { background: #f0fdfa; }
.sku-cell { font-family: monospace; font-size: var(--text-sm); color: var(--color-text-muted); }
.price-cell { display: flex; align-items: center; gap: var(--space-1); }
.price-cell input { width: 75px; padding: var(--space-1) var(--space-1); border: 1px solid var(--line); border-radius: var(--radius-xs); font-size: var(--text-base); }
.use-recommended-btn, .revert-btn, .save-price-btn {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  margin-top: var(--space-1);
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  white-space: nowrap;
}
.revert-btn { background: var(--stone-500); margin-top: 0; }
.sku-message-row td { border-bottom: 1px solid var(--line); background: var(--stone-50); }
.sku-message { font-size: var(--text-sm); color: var(--color-text-muted); white-space: normal; padding-top: 0 !important; }
.competitor-panel { margin-bottom: var(--space-4); }

.bulk-bar {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
  background: var(--stone-100);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  margin-bottom: var(--space-4);
  position: sticky;
  top: 0.5rem;
  z-index: 10;
}

.filter-bar {
  background: var(--stone-100);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
}
.filter-row {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}
.filter-row:last-child { margin-bottom: 0; }
.filter-bar select, .filter-bar input[type=text] {
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
}
/* Errors adjacent to the field (DESIGN_SYSTEM.md) — real attribute-driven
   primitive, additive: nothing today sets aria-invalid, so this can't
   change any existing screen's rendering. */
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--color-error);
}

/* docs/style-target.css's .search-input is a complete self-styled input
   (border/padding/min-height); this one is sizing-only and relies on the
   sibling .filter-bar input[type=text] rule for its actual look. Not
   reconciled. */
.search-input { flex: 1; min-width: 160px; }
.check-label { display: flex; align-items: center; gap: var(--space-1); font-size: var(--text-base); }
.margin-slider { display: flex; flex-direction: column; gap: var(--space-1); min-width: 220px; }
.slider-row { display: flex; gap: var(--space-2); align-items: center; }
.slider-row input[type=range] { flex: 1; }

.dual-slider {
  position: relative;
  height: 24px;
  width: 220px;
}
.dual-slider-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  transform: translateY(-50%);
  background: var(--line);
  border-radius: var(--radius-xs);
}
.dual-slider-range {
  position: absolute;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  background: var(--accent);
  border-radius: var(--radius-xs);
}
.dual-slider input[type=range] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 24px;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
.dual-slider input[type=range]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  cursor: pointer;
}
.dual-slider input[type=range]::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  cursor: pointer;
}
.dual-slider input[type=range]::-webkit-slider-runnable-track { background: transparent; }
.dual-slider input[type=range]::-moz-range-track { background: transparent; }

table { width: 100%; border-collapse: collapse; margin-top: var(--space-4); }
th, td { text-align: left; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); font-size: var(--text-base); }
th { color: var(--color-text-secondary); background: var(--color-bg-subtle); font-weight: 600; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }   /* #419: secondary, not muted: muted on the subtle ground is 4.39:1 */
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ==================== Listing Hub ==================== */

.margin-pill { display: inline-block; min-width: 3.4em; padding: 1px var(--space-2); border-radius: var(--radius-pill); background: var(--color-margin-bg); color: var(--color-margin-fg); font-weight: 600; text-align: center; }   /* #418: a margin value read-only on the summary */
.hub-brand { display: inline-flex; flex: none; font-weight: 700; font-size: var(--text-md); color: var(--ink); text-decoration: none; }
.hub-brand img { display: block; height: 30px; width: auto; }   /* #331: the logo at half its 60 px file, sharp on a 2x screen */

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); margin-bottom: var(--space-5); }

/* listing-status badges (extend the pricing badge system) */
.badge.draft { background: var(--stone-500); color: white; }
.badge.staged { background: var(--near-amber); color: white; }
.badge.approved { background: var(--safe-green); color: white; }
.badge.pushed { background: var(--accent); color: white; }
/* #1d4ed8 stays a literal on purpose: no token family holds a blue — brand is
   teal, neutrals are stone, and the status palette has no "live" token.
   Mapping it to --color-info would collapse live into the brand hue, which
   is presumably why it is blue. White on it measures 6.70:1. Recorded as a
   token gap in the roadmap rather than invented in a normalization pass. */
.badge.live { background: #1d4ed8; color: white; }
.badge.error { background: var(--floor-red); color: white; }
.badge.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .badge.pulse { animation: none; } }

/* designs index */
.design-row {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--color-bg-surface); box-shadow: var(--shadow-card);
  padding: var(--space-4) var(--space-4); margin-bottom: var(--space-2); text-decoration: none; color: inherit;
  transition: border-color 150ms ease;
}
.design-row:hover { border-color: var(--accent); }
.design-row-main h2 { font-size: var(--text-md); margin: 0 0 var(--space-1); }
.design-row-meta { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.design-row-status { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); }
.design-row .lineup-thumb { width: 56px; height: 56px; }   /* #237: the Listings page's row carries the lineup card's thumbnail, smaller */
.design-row-main { flex: 1; min-width: 0; }
@media (max-width: 639px) { .design-row { flex-wrap: wrap; } .design-row-status { align-items: flex-start; flex-basis: 100%; } }
/* #276: the row's link and its Delete are siblings in a wrapper; the link keeps its card, the wrapper takes the row's spacing */
.design-row-wrap { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); }
.design-row-wrap > .design-row { flex: 1; min-width: 0; margin-bottom: 0; }
@media (max-width: 639px) { .design-row-wrap { flex-wrap: wrap; justify-content: flex-end; } .design-row-wrap > .design-row { flex-basis: 100%; } }
/* #419 PR 2: the Listings rows sit in ONE card (the kit's recipe), a row each with a top rule and a hover ground; the link draws no
   card of its own, and the row's ⋯ menu sits at its right, the Delete inside it (the owner's answer 5). At phone width the ⋯ stays
   on the row's first line, beside the thumbnail and the name, and the state pills wrap under them. */
.listings-list { padding: var(--space-1) 0; }
.listings-list .design-row-wrap { margin: 0; padding: 0 var(--space-3) 0 var(--space-5); border-top: 1px solid var(--color-border); flex-wrap: nowrap; align-items: center; transition: background-color var(--duration-fast) var(--ease-standard); }
.listings-list .design-row-wrap:first-child { border-top: 0; }
.listings-list .design-row-wrap:hover { background: var(--color-bg-subtle); }
.listings-list .design-row { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: var(--space-3) 0; }
.listings-list .design-row:hover .design-row-main h2 { color: var(--color-brand); }
.listings-list .design-row-status { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-1) var(--space-2); }
@media (max-width: 639px) {
  .listings-list .design-row-wrap { padding: 0 var(--space-2) 0 var(--space-4); align-items: flex-start; }
  .listings-list .design-row-wrap > .row-menu { padding-top: var(--space-2); }
  .listings-list .design-row-status { justify-content: flex-start; }
}
.empty { color: var(--color-text-muted); font-size: var(--text-base); padding: var(--space-6) 0; }

/* review header */
.review-header { display: flex; gap: var(--space-4); align-items: flex-start; margin-bottom: var(--space-5); }
.design-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-lg); background: var(--stone-100); flex-shrink: 0; }
.review-notes { margin: var(--space-2) 0 0; font-size: var(--text-base); color: var(--color-text-secondary); max-width: var(--measure-prose); }

/* product block */
.product-block { margin-bottom: var(--space-8); }
.product-block-head { display: flex; align-items: center; gap: var(--space-3); padding-bottom: var(--space-2); margin-bottom: var(--space-4); border-bottom: 2px solid var(--ink); }
/* Genuine section heading — it opens a block of mockups and platform cards
   under the design's h1, so it takes the base h2 scale; no size override.
   Monospace stays: the content is the INTERNAL product key, and that is the
   deliberate internal-identifier treatment. That it shows the internal key
   at all, where PRODUCT_NAMES is one lookup away, is ADR-006's consequence
   and is recorded against the naming item, not changed here. */
.product-block-head h2 { margin: 0; font-family: ui-monospace, monospace; }
.product-mockup { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius-sm); background: var(--stone-100); }

/* Product-level mockup review — the print is the thing being judged, so
   these are large, with fixed-aspect frames so the layout never jumps. */
.mockup-review { display: flex; flex-wrap: wrap; gap: var(--space-5); margin-bottom: var(--space-5); }
/* docs/style-target.css's .mockup-card expects __media/__body children;
   this one is flex-sizing only on design_review.html's <figure>. Not
   reconciled. */
.mockup-card { margin: 0; flex: 1 1 320px; max-width: 420px; }
.mockup-frame {
  aspect-ratio: 1 / 1;                /* Printify tee mockups are square */
  background: var(--stone-100);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.mockup-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mockup-broken .mockup-frame::after {
  content: "mockup unavailable"; display: flex; align-items: center;
  justify-content: center; height: 100%; color: var(--color-text-muted); font-size: var(--text-base);
}
.mockup-broken .mockup-img { display: none; }
.mockup-cap { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.mockup-color { font-weight: 600; font-size: var(--text-md); }

/* the platform columns: the two v1 channels (#209, ADR-027: Instagram is a later add-on) */
.platform-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
@media (max-width: 900px) { .platform-grid { grid-template-columns: 1fr; } }

.platform-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: white;
  padding: var(--space-4); display: flex; flex-direction: column;
}
.platform-card.is-approved { border-color: var(--safe-green); background: var(--safe-green-bg); }
.platform-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-2); }
.platform-name { font-weight: 600; font-size: var(--text-base); }

.field-label { display: block; font-size: var(--text-base); font-weight: 600; line-height: 1.43; color: var(--color-text); margin: var(--space-2) 0 var(--space-1); }   /* #419: labels are 14/20 600, sentence case */
.platform-card input[type=text], .platform-card textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-2); font-size: var(--text-sm); font-family: inherit; color: var(--ink); background: white;
  resize: vertical;
}
.platform-card input:focus-visible, .platform-card textarea:focus-visible { outline: none; border-color: var(--color-focus); box-shadow: 0 0 0 1px var(--color-focus), 0 0 0 4px var(--color-focus-ring); }
.platform-card input:disabled, .platform-card textarea:disabled { background: var(--stone-50); color: var(--color-text-secondary); }

.attrs { font-size: var(--text-sm); color: var(--color-text-secondary); }
.attrs div { display: flex; gap: var(--space-2); padding: var(--space-1) 0; }
.attrs div span { color: var(--color-text-muted); min-width: 84px; }

.platform-card-foot { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-3); flex-wrap: wrap; }
.price-slot { font-size: var(--text-xs); color: var(--color-text-muted); }
.save-note { font-size: var(--text-xs); color: var(--safe-green); margin-left: auto; }
.btn-sm { font-size: var(--text-sm); padding: 0 var(--space-3); }   /* #419: a size; it was a solid stone-500 button of its own */
.btn-sm:not(.btn):not(.btn-primary):not(.btn-ghost):not(.btn-outline):not(.btn-danger):not(.btn-danger-outline):not(.btn-approve) {
  background: var(--color-bg-surface); color: var(--color-brand); border-color: var(--color-border-strong);
}
.btn-sm:not(.btn):not(.btn-primary):not(.btn-ghost):not(.btn-outline):not(.btn-danger):not(.btn-danger-outline):not(.btn-approve):hover {
  background: var(--color-bg-subtle); border-color: var(--color-brand);
}
/* color was previously inherited from the global button rule; set it
   here so the modifier is self-sufficient rather than depending on
   whichever base class it happens to be paired with. */
.btn-approve { background: var(--safe-green); color: white; }
.btn-ghost { background: transparent; color: var(--color-text-secondary); border: 1px solid transparent; }   /* #419: no edge */
.btn-ghost:hover { background: var(--color-bg-subtle); color: var(--color-text); }

.check-grid { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); margin-top: var(--space-1); }
.form-actions { margin-top: var(--space-6); }

/* product picker (choose product type) */
.products-filter-bar { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin: var(--space-4) 0; }
.products-search {
  flex: 1 1 220px; padding: var(--space-2) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: var(--text-base); color: var(--ink);
}
.products-type-filter, .products-sort {
  padding: var(--space-2) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: var(--text-base); color: var(--ink); background: white;
  max-width: 100%;   /* #1325: a select is as wide as its longest option (583 px with the top-50 catalog); it shrinks to the bar */
}
.products-count { font-size: var(--text-sm); color: var(--color-text-muted); margin-left: auto; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-4); }
/* Surface, border, hover, selected and focus now come from .selection-card
   (see the SELECTION PRIMITIVE block). What is left here is only what is
   specific to this screen's tile. The radio is hidden by the primitive —
   the tile is the affordance, per the mockups — so it is no longer
   positioned in the corner.
   docs/style-target.css also defines .product-tile with __media/__content
   children; that name collision is still unreconciled, see its header. */
.product-tile { padding: var(--space-3); }
/* #1305: the cell is the grid item and the containing block of its visually hidden radio. The radio is position: absolute with no
   offsets, so as a direct child of the grid it sat at the grid's top corner, and a click on a tile lower down focused it there and
   scrolled the page back to the top. In its own cell it sits at its tile. display: grid lets the tile stretch to the row's height,
   as it did as the grid item. */
.product-tile-cell { position: relative; display: grid; }
.already-in-listing-badge {
  position: absolute; top: 0.6rem; left: 0.6rem; z-index: 1;
  font-size: var(--text-xs); color: var(--safe-green); background: var(--safe-green-bg);
  border: 1px solid var(--safe-green); border-radius: var(--radius-pill); padding: var(--space-1) var(--space-2);
}
.product-tile-img {
  width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--stone-100);
  border-radius: var(--radius-sm); display: block; margin-bottom: var(--space-2);
}
.product-tile-title { display: block; font-size: var(--text-base); font-weight: 600; color: var(--ink); }
.product-tile-sub { display: block; font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-1); }
.product-tile-gate { display: block; font-size: var(--text-sm); margin-top: var(--space-1); }   /* 8c-1 (#78): why a garment can't be picked yet */
.products-empty { padding: var(--space-4) 0; }

/* provider comparison cards */
/* Built this session (3b checkpoint 3). docs/style-target.css also defines
   .provider-card (expects __metrics/__metric children) — a direct,
   freshly-introduced name collision, not reconciled here. */
.provider-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-4); }
/* Surface, border, hover, selected and focus come from .selection-card. The
   old `.provider-card.selected` rule is deliberately gone: it was keyed on a
   Jinja-rendered class that never moved on click, so the highlight lied
   about which provider was chosen until the form posted. The primitive's
   :has(input:checked) tracks the radio. Nothing screen-specific remains
   except padding, which matches the card's slightly roomier layout. */
.provider-card { padding: var(--space-5); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }   /* #419 PR 5a: the card recipe's radius and shadow */
.selection-input:checked + .provider-card { padding: calc(var(--space-5) - 1px); }
.provider-card-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.provider-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--color-selected-bg); color: var(--color-brand);   /* #419 PR 5a: the ink disc is retired (a dark solid beside the dark shell) */
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  font-size: var(--text-md); flex-shrink: 0;
}
.provider-card-name { display: block; font-size: var(--text-md); font-weight: 600; color: var(--ink); }
.provider-card-location { display: block; font-size: var(--text-sm); color: var(--color-text-muted); }
/* Why a provider can't be picked (8c-1, #78): said in words under its name, beside the disabled radio. */
.provider-card-reason { margin: var(--space-2) 0 0; font-size: var(--text-sm); }

.provider-stats { display: flex; gap: var(--space-3); margin-bottom: var(--space-4); }
.provider-stat {
  flex: 1; min-width: 0; background: var(--color-bg-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3);
}
.provider-stat-label { display: block; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-secondary); }
.provider-stat-value { display: block; font-size: var(--text-xl); font-weight: 700; color: var(--ink); margin-top: var(--space-1); }
.provider-stat-value--sentence { font-size: var(--text-md); font-weight: 600; line-height: 1.35; }   /* cpcost: "Printify cost $X–$Y · read <date>" */
.provider-stat-value--pending { font-size: var(--text-base); font-weight: 500; color: var(--color-text-muted); }
.cost-stale { color: var(--near-amber); font-weight: 600; }   /* cpcost: past 30 days — still shown, never a gate */

.provider-colors-count { font-size: var(--text-sm); color: var(--ink); margin: 0 0 var(--space-2); }
.provider-swatches { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.provider-swatches .swatch-chip { width: 18px; height: 18px; border-radius: 50%; }   /* #419 PR 5a: the summary's round chip, not a 22 px square */
@media (max-width: 639px) { .provider-cards { grid-template-columns: minmax(0, 1fr); } .provider-card { padding: var(--space-4); } .selection-input:checked + .provider-card { padding: calc(var(--space-4) - 1px); } .provider-stats { flex-wrap: wrap; } .provider-stat { flex: 1 1 10rem; } }

/* Two garment-override upload fields, side by side */
.art-grid { display: flex; gap: var(--space-4); margin-top: var(--space-1); }
.art-grid > div { flex: 1; }
@media (max-width: 640px) { .art-grid { flex-direction: column; } }

/* Artwork thumbnail preview on a checkerboard so light-ink art is visible */
.art-preview:empty { display: none; }
.art-preview {
  margin-top: var(--space-2); display: flex; align-items: center; gap: var(--space-2);
}
.art-thumb {
  max-height: 110px; max-width: 160px; border-radius: var(--radius-md); border: 1px solid var(--stone-300);
  background-color: var(--color-bg-surface);
  background-image:
    linear-gradient(45deg, var(--stone-300) 25%, transparent 25%),
    linear-gradient(-45deg, var(--stone-300) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--stone-300) 75%),
    linear-gradient(-45deg, transparent 75%, var(--stone-300) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.art-thumb-name { font-size: var(--text-xs); color: var(--color-text-muted); word-break: break-all; }

/* ---------------------------------------------------------------- the back line */

/* #268 PR 0 (the owner, 2026-10-08: "remove the stepper at the top as a whole"): every page opened from the summary carries
   one line where the seven-step stepper stood (templates/_step_head.html): a link back to the summary at the section the page
   edits, the listing's name and, on a per-product page, the product's number and name. It wraps at phone width. */
.step-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-2);
  margin-bottom: var(--space-6); font-size: var(--text-base); color: var(--color-text-secondary);
}
.step-head__back {
  display: inline-flex; align-items: center; min-height: var(--control-height); font-weight: 600;
  color: var(--color-brand); text-decoration: none;
}
.step-head__back:hover { color: var(--color-brand-hover); text-decoration: underline; }
.step-head__sep { color: var(--color-border-strong); }
.step-head__name { color: var(--color-text); overflow-wrap: anywhere; }
.step-head__product { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text); overflow-wrap: anywhere; }

.provider-options { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-2); }

/* ---------------------------------------------------------------- colors & design editor */
/* Built to COLORS-DESIGN-SCREEN-SPEC.md. Every rule below sets its own
   color/display explicitly rather than relying on the shared button/.btn
   defaults or the UA [hidden] behavior — both have already silently
   defeated controls on this screen once (see the implementer notes in the
   spec); scoping here is deliberate, not an oversight. */

/* DESIGN_SYSTEM.md v2.0: ".wrap-editor consumes this token" — the editor
   width is now an explicit system role (--content-max-editor, 100rem =
   the same 1600px this was hardcoded to), not a page-level exception. */
.wrap-editor { max-width: var(--content-max-editor); }

/* #33 PR 2 (C-A): the title row, as the Mockups page's: the step's name, a one-line subtitle naming the garment and the provider.
   #451 (the owner, 2026-10-16): no Exit at its right any more. The design's title is on the back line above it. */
.editor-title { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
/* #474 (the owner, 2026-10-16: "let's just take all of this stuff out of the top so the rest of the page can move up"): nothing stands
   above the title row now, and the h1 drops the browser's top margin, so it sits at main's own padding under the top bar */
.editor-title h1 { margin: 0 0 var(--space-1); }
.editor-title .subtitle { margin-bottom: 0; }

/* docs/style-target.css's .products-strip is the same concept (min-height
   3rem, bordered) but expects .chip children instead of .product-chip.
   Not reconciled. */
.products-strip {
  display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
  margin-bottom: var(--space-5);
}
.products-strip-label { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.product-chip {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: white; color: var(--ink); font-size: var(--text-sm); text-decoration: none;
}
.product-chip.active { background: var(--color-selected-bg); border-color: var(--color-selected-border); color: var(--ink); }
/* ADR-008: dashed means ABSENCE. An in-progress product exists, so its chip is
   solid — border and text only, no fill, so fill keeps meaning exactly one
   thing on this strip (.active). Judged against a tinted candidate on the real
   strip: the tint did no visible work. State is also written for assistive
   tech in _products_strip.html; border style is never the only carrier. */
.product-chip.in-progress:not(.active) { border-style: solid; border-color: var(--color-border); color: var(--color-text-muted); }
/* Inline SVG now, not the &#10003; entity (DESIGN_SYSTEM.md: icons are SVG,
   never text glyphs). currentColor, so .active's white still applies. */
.chip-check { color: var(--safe-green); display: inline-flex; }
.chip-check svg { width: 12px; height: 12px; }
.product-chip.active .chip-check { color: var(--color-selected-border); }

.btn-outline { background: var(--color-bg-surface); color: var(--color-brand); border-color: var(--color-border-strong); }   /* #419: a neutral edge, brand text */
.btn-outline:hover { background: var(--color-bg-subtle); border-color: var(--color-brand); }
.btn-danger-outline, .btn.btn-danger, .btn-danger {
  background: var(--color-bg-surface); color: var(--color-error); border-color: color-mix(in srgb, var(--color-error) 45%, transparent); box-shadow: none;
}
:is(.btn-danger-outline, .btn-danger):hover { background: var(--color-error-bg); border-color: var(--color-error); filter: none; }

/* ---- three-zone layout ---- */
.editor-3col { display: flex; gap: var(--space-6); align-items: flex-start; }
.editor-col { background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-card); }   /* #33 PR 2: the card recipe */
.editor-col-left { flex: 0 0 260px; }
/* min-width: 0, not the default auto — a flex item's auto minimum is its min-content
   width, and the canvas header is 799px wide, so without this the column cannot shrink
   and the page overflows at 1400 (measured at close: scrollWidth 1431). The old 420px
   value was doing this job as well as being the floor; the floor is now the sub-640 rule. */
.editor-col-center { flex: 1 1 auto; min-width: 0; }
/* #394: min-width: 0 here too. The right column's automatic minimum was its min-content width, and a design name with no spaces
   (the owner's "Watermelon_Mocks_TShirt_1717__Front_Blue_Jean_3.jpg") is one unbreakable word: the layer row made the column 504px
   on Layers and the library's two tile tracks 939px on Design library, so every switch widened or narrowed it and moved the canvas
   column beside it. The column is now its basis on every tab, and the names inside it ellipsize. */
.editor-col-right { flex: 0 0 300px; min-width: 0; }
/* #498 (the owner, 2026-10-18): beside the canvas, the right column is sticky and the window's full height under the top bar, down
   to the bottom bar, so the canvas never leaves view while the designs are browsed. It is one fixed size on every tab: the header and
   the tab bar never move, and only the tab's content scrolls, inside the column (.layers-tab-body below). */
.editor-col-right {
  --editor-right-height: max(30rem, calc(100vh - var(--topbar-height) - 2 * var(--space-4) - 4.5rem));   /* 4.5rem: the sticky bottom bar (.step-footer) */
  position: sticky; top: calc(var(--topbar-height) + var(--space-4)); align-self: flex-start;
  height: var(--editor-right-height); display: flex; flex-direction: column;
}
.editor-col-right > .layers-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.editor-too-narrow { display: none; } /* shown by the sub-640px rule; a class toggle, never [hidden] — see ADR-010 */

@media (max-width: 1200px) {
  .editor-3col { flex-wrap: wrap; }
  .editor-col-center { order: -1; flex-basis: 100%; }
  .editor-col-left, .editor-col-right { flex-basis: 48%; }
  .editor-col-right { position: static; --editor-right-height: 36rem; }   /* #498: stacked under the canvas, a fixed height of its own */
}
/* Below 640px the editor states its minimum instead of overflowing (build item 2
   CP7, Option B — a deliberate behaviour change, recorded in the roadmap). A
   print-placement canvas with inch-precise controls has a real floor; the old
   420px minimum on the centre column scrolled the page 54px sideways at 390
   and nobody could place artwork in it anyway. Save / Exit in the top bar stay reachable.
   Toggled by class, not `hidden` — the global `[hidden] { display: none
   !important }` outranks any author rule (measured headless: the notice never
   appeared while it used the attribute — ADR-010). The at-rest
   `.editor-too-narrow { display: none; }` sits with the column rules above. */
@media (max-width: 639px) {
  .editor-3col { display: none; }
  .editor-too-narrow { display: block; }
}

/* ---- right panel: Layers | Design library tabs ---- */
.layers-tabs { display: flex; flex: none; gap: var(--space-1); margin-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
/* Active tab: a thin pill drawn by ::after, overlapping the container's 1px
   rule. The previous 2px border-bottom sat ABOVE that rule, so the two
   stacked into a squished bracket rather than a single indicator. */
.layers-tab {
  position: relative; background: none; border: none; padding: var(--space-2) var(--space-1);
  font-size: var(--text-base); font-weight: 600; color: var(--color-text-secondary); cursor: pointer; min-height: var(--control-height);
}
.layers-tab[aria-selected="true"] { color: var(--color-brand); }
.layers-tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: var(--space-1); right: var(--space-1); bottom: -1px;
  height: 3px; border-radius: var(--radius-pill); background: var(--color-highlight);
}
/* #385: both tab panels are one fixed height, and each scrolls inside itself, so a switch never grows or shrinks the right column
   or the page. #498: that height is the rest of the full-height column under the tab bar. The Layers tab scrolls as a whole; on
   Design library the controls stay and the grid fills what is left and scrolls. A tab that is not shown stays display: none through
   the global [hidden] rule, which outranks this one; colors_editor.js keeps each tab's scroll position across a switch. Showing a
   tab fades it in over 150ms (none with reduced motion), so the swap reads as one surface, not a reload. */
.layers-tab-body { flex: 1 1 auto; min-height: 0; position: relative; }
.layers-tab-panel { display: flex; flex-direction: column; height: 100%; animation: layers-tab-fade 150ms ease-out; }
.layers-tab-panel-list { overflow-y: auto; overscroll-behavior: contain; padding-right: var(--space-1); }
.layers-tab-panel > * { flex: 0 0 auto; }
.layers-tab-panel > .designs-grid { flex: 1 1 auto; min-height: 0; max-height: none; overscroll-behavior: contain; align-content: start; grid-auto-rows: max-content; }   /* rows keep their tiles' height and the grid scrolls */
@keyframes layers-tab-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .layers-tab-panel { animation: none; } }
.designs-count-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
.designs-count-row .designs-count-line { margin: 0; }
.designs-expand-btn > svg { width: 14px; height: 14px; }   /* #511 item 1: otherwise the kit's .btn-ghost.btn-sm as it is (44 px, the ghost's colors) */
.designs-count-line { font-size: var(--text-xs); color: var(--color-text-muted); margin: 0 0 var(--space-2); }
.designs-count { color: var(--color-text-muted); font-weight: 600; }

/* ---- right panel: Design library tab ---- */
/* #627: Import Canva design shares Upload new design's box (height, radius, edge, hover), so the two read as one pair */
.upload-designs-btn, .canva-import-btn {
  display: block; width: 100%; background: var(--color-bg-surface); color: var(--color-brand); border: 1px solid var(--color-border-strong);   /* #419: the outline tone, not an ink solid */
  border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); font-size: var(--text-base); font-weight: 600;
  cursor: pointer; margin-bottom: var(--space-2); min-height: var(--control-height);
}
.upload-designs-btn:hover, .canva-import-btn:hover { background: var(--color-bg-subtle); border-color: var(--color-brand); }
/* The icon sits left of the label, centered on it; its own 8px margin is Canva's clear space, so the button's padding is that much
   smaller. A link, so no underline; the hover is the pair's subtle fill and brand edge, with a short ease. */
.canva-import-btn {
  display: flex; align-items: center; justify-content: center; padding-block: 0; padding-inline: var(--space-1) var(--space-3);
  text-decoration: none; line-height: 1.2; transition: background-color 120ms ease, border-color 120ms ease;
  box-shadow: var(--btn-shadow);   /* Upload new design's, which it carries as a .btn */
}
.canva-import-btn:hover { text-decoration: none; }
.canva-import-btn:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.designs-search {
  width: 100%; padding: var(--space-2) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: var(--text-base); margin-bottom: var(--space-2); color: var(--ink);
}
.designs-collection-filter {
  width: 100%; padding: var(--space-1) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: var(--text-sm); color: var(--ink); background: white; margin-bottom: var(--space-3);
}
.designs-grid {   /* #394: minmax(0, 1fr), not 1fr: a 1fr track's minimum is its tiles' min-content, which a long name widened */
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2);   /* #498: three across, so 9 to 12 show at once */
  overflow-y: auto;
}
.design-tile {
  border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-2); cursor: pointer;
  background: white; text-align: left; position: relative; min-height: var(--control-height); min-width: 0;
}
.design-tile:hover { border-color: var(--accent); }
.design-tile.applied { border-color: var(--safe-green); border-width: 2px; padding: calc(var(--space-2) - 1px); }
.design-tile-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-xs); background: var(--stone-100); display: block; }
.design-tile-name { display: block; font-size: var(--text-xs); color: var(--ink); margin-top: var(--space-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* #498: in the panel's three-across grid the thumbnail is the tile; its name shows over the foot of the thumbnail on hover or focus,
   and in full in its tooltip (#396's title). It keeps its box at rest (transparent, not removed), so a cut name still measures cut. */
.designs-grid .design-tile { padding: var(--space-1); min-height: 0; }
.designs-grid .design-tile.applied { padding: calc(var(--space-1) - 1px); }
.designs-grid .design-tile-name {
  position: absolute; left: var(--space-1); right: var(--space-1); bottom: var(--space-1); margin: 0; padding: 2px var(--space-1);
  border-radius: 0 0 var(--radius-xs) var(--radius-xs); background: color-mix(in srgb, var(--color-bg-surface) 92%, transparent);
  opacity: 0; transition: opacity 120ms ease;
}
.designs-grid .design-tile:hover .design-tile-name, .designs-grid .design-tile:focus-visible .design-tile-name { opacity: 1; }
/* #468: an artwork whose file is gone from storage: no thumbnail, its name and "File missing" in words, never applied */
.design-tile--missing { cursor: default; display: flex; flex-direction: column; gap: var(--space-1); border-style: dashed; border-color: var(--color-warning); background: var(--color-warning-bg); }
.design-tile--missing:hover { border-color: var(--color-warning); }
.design-tile-missing-name { font-size: var(--text-xs); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.design-tile-missing-note { font-size: var(--text-xs); font-weight: 600; color: var(--color-warning); }
.design-tile-missing-act { font-size: var(--text-xs); min-height: 44px; align-self: flex-start; }
.design-tile-check {
  position: absolute; top: 0.3rem; right: 0.3rem; width: 20px; height: 20px; border-radius: 50%;
  background: var(--safe-green); color: white; font-size: var(--text-xs); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.designs-caption { font-size: var(--text-xs); color: var(--color-text-muted); margin: var(--space-2) 0; }
/* #498: Expand's picker drawer, over the right half of the window with the canvas still in view on the left; full screen on a
   narrow window. Large thumbnails, names shown. */
.library-drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(50%, 56rem); min-width: 30rem; max-width: 100%; height: 100%; max-height: 100%;
  padding: var(--space-5); border: 0; border-left: 1px solid var(--color-border); border-radius: 0; box-shadow: var(--shadow-card);
  background: var(--color-bg-surface); color: var(--color-text); flex-direction: column; gap: var(--space-3);
}
.library-drawer[open] { display: flex; }
.library-drawer::backdrop { background: rgb(0 0 0 / 18%); }
.library-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.library-drawer__head h2 { margin: 0; font-size: var(--text-lg); }
.library-drawer__filters { display: flex; gap: var(--space-2); }
.library-drawer__filters .drawer-search { flex: 1 1 auto; min-width: 0; padding: var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); }
.library-drawer__filters .drawer-collection-filter { flex: 0 1 14rem; min-width: 0; padding: var(--space-1) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); background: var(--color-bg-surface); }
.library-drawer__caption { margin: 0; }
.drawer-grid {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: var(--space-3); align-content: start;
}
@media (max-width: 899px) {
  .library-drawer { width: 100%; min-width: 0; border-left: 0; }
  .library-drawer__filters { flex-direction: column; }
  .library-drawer__filters .drawer-collection-filter { flex-basis: auto; }
}
.manage-library-link {
  display: block; font-size: var(--text-sm); color: var(--color-disabled-text); cursor: not-allowed;
  border-top: 1px solid var(--line); padding-top: var(--space-2); margin-top: var(--space-2);
}

/* ---- inline SVG icons (templates/_icons.html) ---- */
/* Sized here, not in the markup, so a button's box never moves with its glyph.
   `flex: none`: `button, .btn` padding leaves a 40px icon button a 6px content
   box, and an SVG that is a flex item shrinks into it — the stylesheet said
   24px while the rendered box was 6px wide (scripts/measure_icons.py). */
.icon-btn svg, .align-btn svg { width: 24px; height: 24px; display: block; flex: none; }
.chevron svg { width: 12px; height: 12px; display: block; }
.dpi-badge-icon svg, .dpi-panel-icon svg, .design-tile-check svg { width: 12px; height: 12px; display: inline-block; vertical-align: -1px; }

/* ---------------------------------------------------------------- product lineup (build item 4) */
.lineup { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: var(--space-4); }
.lineup-card { display: grid; gap: var(--space-4); }
.lineup-card-main { display: flex; gap: var(--space-5); align-items: flex-start; }
.lineup-thumb { width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius-md); background: var(--stone-100); flex-shrink: 0; }
.lineup-thumb-empty { border: 1px dashed var(--color-border-strong); }   /* dashed = absence (ADR-008): no artwork yet */
.lineup-thumb-garment { object-fit: contain; }
/* cp32d: the flat's strokes scale with the drawing, as the designer's do (.garment-silhouette [vector-effect] below). Left as the
   asset ships them — non-scaling, 2.25 device px — a 120px thumbnail of a white shirt read as a grey outline (the owner's run). */
.lineup-thumb-garment [vector-effect] { vector-effect: none; }   /* cp32c: the garment with the design, an inline SVG at the editor's own proportions */
.lineup-continue-helper { margin: var(--space-4) 0 0; }   /* cp32c: the consequence of Continue, inline and always visible — never a tooltip */
.lineup-card-body { flex: 1; min-width: 0; display: grid; gap: var(--space-4); }
.lineup-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.lineup-card-title { margin: 0; font-size: var(--text-lg); }
.lineup-card-internal { margin: var(--space-1) 0 0; font-size: var(--text-base); color: var(--color-text-muted); }
.badge.ready { background: var(--color-selected-bg); color: var(--color-selected-border); border: 1px solid var(--color-selected-border); }
.lineup-facts { list-style: none; margin: 0; padding: var(--space-3) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: var(--text-base); color: var(--color-text-secondary); border-top: 1px solid var(--line); }
.lineup-card-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; justify-content: space-between; }
.lineup-card-tools { display: flex; gap: var(--space-2); }
.lineup-note { font-size: var(--text-base); color: var(--color-text-muted); margin: var(--space-3) 0 var(--space-5); }
.lineup-footer { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
/* cp32g (the owner, 2026-09-27): every step page's back/continue buttons on their own bar, frozen at the bottom of the window while
   the page scrolls — sticky, so it settles at the page's end and never covers the last of the content. */
.lineup-footer {
  position: sticky; bottom: 0; z-index: 5; background: var(--color-bg-page);
  border-top: 1px solid var(--color-border); padding: var(--space-3) 0; margin-top: var(--space-4);
}
.lineup-footer-note { margin-right: auto; font-size: var(--text-base); color: var(--color-text-muted); }
/* #300 (the owner, 2026-10-09: "Continue to provider and Save and close button always needs to be bottom right"): the bar every page
   opened from the summary shares (templates/_step_footer.html). Its actions sit at the right, the primary last and so rightmost, any
   secondary to its left; on a phone they stack full-width, the primary at the bottom. */
.step-footer { justify-content: flex-end; }
@media (max-width: 767px) {
  .step-footer { flex-direction: column; align-items: stretch; }
  .step-footer .lineup-footer-note { margin-right: 0; }
  .step-footer .btn { text-align: center; }
}
@media (max-width: 768px) {
  .lineup-card-main { flex-direction: column; }
}

/* ---- left: variants ---- */
.variants-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-2); }
/* Panel labels: Variants / Artwork layers / Selected layer / Preview opacity /
   Effective DPI. Were h2, h3, h3, h3 and a span at three sizes; one label at the
   field-label spec (CP3 typography). Defined here with its first consumers. */
.panel-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--ink); margin: 0 0 var(--space-2); }
.variants-header .panel-label, .panel-collapse-toggle .panel-label, .layers-panel-header .panel-label, .dpi-panel-row .panel-label { margin: 0; }
/* #419 PR 5b: "N offered" is the kit's .pill.pill--ok (the template's classes), no outlined pill of its own */
/* #474: the closest-color note, the kit's amber inline notice, under its color's row in the list (colors_editor.js places it) */
.closest-note { margin: var(--space-1) 0 var(--space-2); }
.closest-note > p { flex-basis: 100%; }
.closest-note > .btn-sm { margin-left: 0; }
.variants-search {
  width: 100%; padding: var(--space-2) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: var(--text-base); margin-bottom: var(--space-2); color: var(--ink);
}
.variants-list { max-height: 420px; overflow-y: auto; }
/* position: relative contains the row's clip-hidden checkbox (#379): without it the box's containing block was .app-body, so it
   never scrolled with the list, and a click on the check cell focused it there and scrolled the page down to it. */
.variant-row {
  position: relative;
  display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-2); border-radius: var(--radius-sm);
  cursor: pointer; min-height: 40px;
}
.variant-row:hover { background: var(--color-bg-subtle); }
.variant-row.previewed { background: var(--color-selected-bg); }   /* #419 PR 5b: the kit's selected tint */
/* The offered control is the CP0 primitive's check cell (input + label.selection-check, built in
   colors_editor.js — ADR-011). Its 44px hit box is pulled back to 20px with negative margins; inside
   the 40px variant row, inside the scrolling variants list, the 12px hanging below the LAST row's
   cell became scrollable overflow and shortened the list's scrollbar thumb — caught by the pixel rule
   (2v item 3). Here the hit box is the row's own 40px, so nothing hangs past the row. */
.variant-row .selection-check { padding: 10px var(--space-3); margin: -10px calc(-1 * var(--space-3)); }
.swatch-chip {
  width: 22px; height: 22px; border-radius: var(--radius-sm); flex-shrink: 0;
  border: 1px solid var(--color-border-strong);   /* #419 PR 5b: a token edge, so a white swatch still reads on a white panel */
}
.variant-name { font-size: var(--text-base); color: var(--ink); flex: 1; }
/* Running prose: paragraphs read DOWN, so they take the reading
   measure. A subtitle is a single line under a title and does not. */
.prose, .variants-footnote { max-width: var(--measure-prose); }
.variants-hint, .variants-footnote { font-size: var(--text-xs); color: var(--color-text-muted); margin: var(--space-2) 0 0; }
/* Per DESIGN_SYSTEM.md — never communicate status by color alone. The dot
   itself is a glance-able cue; title/aria-label carry the actual meaning. */
.fork-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0; margin-left: -0.2rem;
}
.fork-count-line { font-size: var(--text-xs); color: var(--accent); font-weight: 600; margin: var(--space-1) 0 var(--space-2); }
.variants-footnote { border-top: 1px solid var(--line); padding-top: var(--space-2); margin-top: var(--space-2); }
/* #33 PR 2 (the owner's Q6): the provider's colors with no swatch, counted from the catalog; a hint, no action here */
.variants-more { margin: var(--space-3) 0 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--color-info-bg); font-size: var(--text-sm); }
/* #305 PR C (the owner's Q30): the size pick under the colors, each size the colors' check cell (input + label.selection-check) and
   its name. The row is the input's positioning context, so the visually hidden input never drifts out of the panel. */
.sizes-group { border: 0; border-top: 1px solid var(--line); margin: var(--space-3) 0 0; padding: var(--space-2) 0 0; min-width: 0; }
.sizes-group legend { float: left; width: 100%; padding: 0; margin: 0 0 var(--space-1); }
.sizes-all { clear: both; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-2); }   /* #1307: Select all, Deselect all */
.sizes-group > [data-sizes-said] { clear: both; margin: 0 0 var(--space-2); }
.size-row { position: relative; clear: both; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-2); }
.size-row .selection-check { padding: 10px var(--space-3); margin: -10px calc(-1 * var(--space-3)); }
.size-name { flex: 1; font-size: var(--text-base); color: var(--ink); cursor: pointer; }
.selection-input:disabled ~ .size-name { cursor: not-allowed; }
.size-line { flex-basis: 100%; margin: 0 0 var(--space-1); font-size: var(--text-xs); }
/* #1393 (the owner's ruling, 7168399049): where a product's sizes differ in print area, the size's name is a button that shows it on the
   canvas, and the row of the size in view takes a color row's selected tint; the box beside it still only offers the size. */
.size-row.previewed { background: var(--color-selected-bg); border-radius: var(--radius-sm); }
button.size-name { min-height: 40px; padding: 0; border: 0; background: none; font: inherit; text-align: left; }
button.size-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.size-views { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-2) 0 0; }
.size-view-btn[aria-pressed="true"]:not(.size-name) { background: var(--color-selected-bg); }
/* On a fitted size the canvas shows the design and nothing on it can be grabbed, and the layers column is inert (colors_editor.js). */
.garment-canvas.is-size-view .artwork-frame { pointer-events: none; cursor: default; }
/* #1397 (the owner's ruling, 26 Nov): on a fitted size only the tools under the size's button are dimmed (and inert); the button is not */
.editor-col-right.is-size-view .layers-panel-header, .editor-col-right.is-size-view .layers-tabs,
.editor-col-right.is-size-view .layers-tab-body { opacity: 0.55; }
.size-view-line { color: var(--ink); font-weight: 600; }
/* #1397: a size's own design, as a color's (the same toggle treatment as .enter-override-btn), under the size line */
.size-design { flex: none; margin: 0 0 var(--space-3); }
.size-design-row { display: flex; flex-direction: column; gap: var(--space-2); }
.size-design-row > button { width: 100%; text-align: center; text-wrap: balance; }
.size-design-why, .size-design-note { font-size: var(--text-xs); margin: var(--space-1) 0 0; }
.fork-both-line { font-size: var(--text-xs); margin: 0 0 var(--space-2); }
.sizes-line { clear: both; font-size: var(--text-xs); margin: var(--space-2) 0 0; }

/* ---- center: canvas ---- */
.canvas-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-2); }
.canvas-header h2 { font-size: var(--text-md); margin: 0; font-weight: 600; }
.position-toggle { display: flex; gap: var(--space-1); }
.position-btn {
  padding: var(--space-1) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: white; font-size: var(--text-sm); color: var(--ink); cursor: pointer;
}
.position-btn.active { background: var(--color-selected-bg); border-color: var(--color-selected-border); color: var(--ink); }
.position-btn:disabled { cursor: not-allowed; opacity: 0.4; }
/* #33 PR 2: Front/Back as one segmented control; the same buttons, the same .active the script sets */
.position-toggle.segmented { display: inline-flex; gap: 0; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.segmented .position-btn { border: 0; border-radius: 0; min-height: var(--control-height); min-width: 4rem; font-weight: 600; }
.segmented .position-btn + .position-btn { border-left: 1px solid var(--color-border-strong); }
.segmented .position-btn.active { background: var(--color-selected-bg); color: var(--color-brand); }   /* #419 PR 5b: the kit's segmented: the selected tint, not a solid fill */

.canvas-frame { position: relative; }
/* #296: the frame is a fixed size at every zoom. Only the drawing inside it scales; when it is larger than the frame, the
   frame scrolls. The height used to follow the drawing, so each zoom-in grew the frame and pushed the zoom control down the
   page. `safe center` keeps a drawing wider than the frame scrollable to its left edge (plain center would cut it off). */
.canvas-viewport {
  position: relative; background: var(--stone-100); border-radius: var(--radius-lg);
  padding: var(--space-6); overflow: auto; height: clamp(420px, 60vh, 640px);
  touch-action: pan-x pan-y;   /* #498: one finger pans the frame; a two-finger pinch zooms the design (colors_editor.js), not the page */
  display: flex; align-items: flex-start; justify-content: center; justify-content: safe center;
}
/* The zoom control's fixed place: the frame's bottom-right corner, outside the scrolling area, clear of its scrollbars. */
.canvas-zoom-controls {
  position: absolute; right: 1.25rem; bottom: 1.25rem; z-index: 3;
  display: flex; align-items: center; gap: var(--space-1);
  padding: var(--space-1); background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card); font-size: var(--text-sm); color: var(--color-text-muted);   /* #419 PR 5b: tokens, not literals */
}
.selected-layer-empty { font-size: var(--text-sm); color: var(--color-text-secondary); margin: 0 0 var(--space-2); }
.canvas-zoom-wrapper {
  display: grid; grid-template-columns: 24px auto; grid-template-rows: 20px auto;
  transform-origin: 0 0;
}
.ruler-corner { grid-column: 1; grid-row: 1; }
.ruler-top, .ruler-left { position: relative; color: var(--color-text-muted); font-size: 0.62rem; }
.ruler-top { grid-column: 2; grid-row: 1; }
.ruler-left { grid-column: 1; grid-row: 2; }
/* A tick's visible mark is its BORDER, which renders at the element's
   leading edge. So the element must sit at the true coordinate with NO
   transform of its own — only the label is centred on the line, via the
   nested .ruler-tick-label. The previous rules put transform:translate(-50%)
   on the whole element, which shifted every line back by half its own
   label width: -4.7px for one-digit labels, -7.4px for two-digit ones.
   That read like a fixed gutter at the origin but was actually
   width-dependent, so nudging the origin would have fixed 0/4/8 and left
   12/16/20 wrong. Measured and corrected 2026-08-26. */
.ruler-tick-top {
  position: absolute; top: 9px; height: 11px;
  border-left: 1px solid var(--line);
}
.ruler-tick-top .ruler-tick-label {
  position: absolute; top: -9px; left: 0; transform: translateX(-50%);
}
.ruler-tick-left {
  position: absolute; left: 10px; width: 14px;
  border-top: 1px solid var(--line);
}
.ruler-tick-left .ruler-tick-label {
  position: absolute; top: 0; right: 16px; transform: translateY(-50%);
  line-height: 1;
}

.dpi-badge {
  position: absolute; top: 0.9rem; right: 0.9rem; z-index: 3;
  display: flex; align-items: center; gap: var(--space-1);
  padding: var(--space-1) var(--space-2); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 600;
}
/* #419 PR 5b (the owner, 2026-10-17: "stay consistent with the kit"): the kit's status pills, a tinted ground and no edge */
.dpi-badge.dpi-good { background: var(--color-success-bg); color: var(--color-success); }
.dpi-badge.dpi-warn { background: var(--color-warning-bg); color: var(--color-warning); }
.dpi-badge.dpi-bad { background: var(--color-error-bg); color: var(--color-error); }

/* The fixed stage: explicitly sized to the garment in JS (renderCanvas),
   clipped here so a layer dragged/ghosted far outside the print area can
   never expand this box — and therefore can never grow .canvas-viewport's
   scrollable content past the garment itself. Without this, an unclipped
   ghost frame's bounding box (position:absolute, potentially far outside)
   was counted in the ancestor's scroll extent, producing a page-level
   scrollbar and, via scroll-anchoring, visibly clipping the garment's own
   top edge (found live, 2026-08-26 — both symptoms traced to this one
   missing clip, not two separate bugs). */
.garment-canvas { position: relative; overflow: hidden; }
/* #1467: a rectangle's stage (static/colors_editor.js stageMargin): the canvas keeps --stage-m of room on every side, in the layout, so the
   room is fitted and scrolled to; the rulers stay on the canvas's own edges. The canvas no longer clips: .artwork-stage does, at the stage. */
.canvas-zoom-wrapper.has-stage .garment-canvas { overflow: visible; margin: var(--stage-m); }
.canvas-zoom-wrapper.has-stage .ruler-top { margin: 0 var(--stage-m); }
.canvas-zoom-wrapper.has-stage .ruler-left { margin: var(--stage-m) 0; }
.artwork-stage { position: absolute; inset: calc(-1 * var(--stage-m, 0px)); overflow: hidden; pointer-events: none; }
.artwork-layers-frames { position: absolute; left: var(--stage-m, 0px); top: var(--stage-m, 0px); }
.artwork-stage .artwork-frame { pointer-events: auto; }
/* #498: the snap guides. Positioned over the print area by renderCanvas(); a line shows while the dragged design is snapped to the
   area's center or an edge, then fades. Never in the way of a click. The halo keeps the line readable on every garment color. */
.snap-guides { position: absolute; z-index: 4; pointer-events: none; }
/* #511 item 2: the guides sit inside the zoomed drawing, so their thickness is 1/zoom (--snap-px, static/colors_editor.js applyZoom): 1 px on screen at every zoom */
.snap-guide { position: absolute; opacity: 0; transition: opacity 300ms ease-out; background: var(--color-brand); box-shadow: 0 0 0 var(--snap-px, 1px) rgb(255 255 255 / 70%); }
.snap-guide-v { top: -12px; bottom: -12px; width: var(--snap-px, 1px); margin-left: calc(var(--snap-px, 1px) / -2); }
.snap-guide-h { left: -12px; right: -12px; height: var(--snap-px, 1px); margin-top: calc(var(--snap-px, 1px) / -2); }
.snap-guide.is-shown { opacity: 1; transition-duration: 60ms; }
.garment-silhouette { position: absolute; top: 0; left: 0; z-index: 0; }
/* The SVG's viewBox is inch-space, so a stroke-width in user units would
   scale with the garment. non-scaling-stroke keeps seam weights in real
   pixels at every zoom level, which is what makes them read as stitching
   rather than as thick outlines when zoomed in. */
/* The flat is inlined verbatim and tinted via `color`; its own presentation
   attributes carry every stroke weight and dash pattern. */
.garment-silhouette { transition: color 150ms ease; }

/* STROKE SCALING. The asset ships vector-effect="non-scaling-stroke" on
   every element, which pins stroke width to device pixels regardless of
   zoom. That is right for UI chrome (selection handles, guides) and wrong
   for an illustration being scaled into inch-space: zoomed out the garment
   shrinks while the seams stay 1px, so they read too heavy; zoomed in the
   garment grows while the seams stay 1px, so they thin to hairlines. The
   drawing should scale like a drawing. `vector-effect` is a CSS property as
   well as an attribute, so overriding it here beats the asset's own value
   without editing the file. */
.garment-silhouette [vector-effect] { vector-effect: none; }
/* Debug affordance: add .keep-non-scaling-stroke to the SVG to restore the
   asset's behaviour for comparison. */
.garment-silhouette.keep-non-scaling-stroke [vector-effect] {
  vector-effect: non-scaling-stroke;
}

/* Very dark garments: the asset's color-mix(..., #000) derivations all
   collapse to black, erasing seams and the collar. These rules outrank the
   asset's presentation attributes and push the shades upward instead. */
.garment-silhouette.is-dark-garment [stroke] { stroke: var(--seam-override); }
.garment-silhouette.is-dark-garment #collar-band { fill: var(--collar-override); }
/* #1176: a print-area drawing's template marks, over the design (z-index above the print box) and never in the way of a click; they keep
   the file's non-scaling strokes, so a mark stays one fine line at every zoom. The checkbox hides them, and the marks drawn under the body. */
.print-guides-overlay { display: none; position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none; }
.garment-canvas.hide-print-guides [data-guide] { display: none; }
.print-guides-row { display: flex; align-items: center; gap: var(--space-2); }
.print-guides-toggle { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-sm); }
.print-area-box {
  position: absolute; z-index: 1; overflow: hidden; pointer-events: none;
  outline: 2px dashed rgba(28,25,23,0.4);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.55) inset;
}
.print-area-box.has-overflow { outline: 2px dashed var(--color-warning); }
/* Full-fidelity copy of the artwork, clipped by print-area-box's
   overflow:hidden — decorative only, never receives pointer events, so the
   interactive frame beneath it (positioned in the same spot) keeps handling
   drag/resize/rotate even for the part that's on-screen inside the box. */
.artwork-clip { position: absolute; pointer-events: none; }
.artwork-clip img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
/* One .artwork-frame per VISIBLE layer (built in renderCanvas) — only the
   selected one is draggable; others are click-to-select only. */
.artwork-frame { position: absolute; cursor: pointer; }
.artwork-frame.selected { cursor: move; }
/* #1172: the selected layer's box and handles, one overlay over its frame, drawn above every layer and the print area's artwork
   (z-index over .print-area-box's 1). Only the handles take the pointer; the box's inside is the frame's, below it. */
.selection-box { position: absolute; z-index: 2; pointer-events: none; }
/* #1467: the box's dashed line, one screen pixel at every zoom. A border or outline under 1px is drawn as 1px before the zoom scales it, so
   the line is drawn on a copy of the box made zoom times larger and scaled back by 1 / the zoom (--ui-scale, colors_editor.js applyZoom). */
.selection-box::after {
  content: ""; position: absolute; left: 0; top: 0; pointer-events: none;
  width: calc(100% / var(--ui-scale, 1)); height: calc(100% / var(--ui-scale, 1));
  transform: scale(var(--ui-scale, 1)); transform-origin: 0 0; outline: 1px dashed rgba(45,212,191,0.5);
}
.selection-box .resize-handle, .selection-box .rotate-handle { pointer-events: auto; }
.artwork-drag {
  display: block; width: 100%; height: 100%; user-select: none;
  -webkit-user-drag: none; touch-action: none; pointer-events: none;
}
/* 40x40 transparent hit target (above WCAG 2.5.8's 24px AA minimum), centered on the
   position it's placed at (top/left set per data-handle below); the visible
   handle itself is the smaller ::before square inside it. */
/* #1467: every size below is scaled by --ui-scale (1 / the zoom, static/colors_editor.js applyZoom), so the box, its handles
   and its rotate control keep one on-screen size at every zoom, on a mug as on a tee. */
.resize-handle {
  position: absolute; width: calc(40px * var(--ui-scale, 1)); height: calc(40px * var(--ui-scale, 1)); margin: calc(-20px * var(--ui-scale, 1));
  background: none; border: none; box-shadow: none;
  display: flex; align-items: center; justify-content: center;
}
.resize-handle::before {
  content: ""; width: calc(14px * var(--ui-scale, 1)); height: calc(14px * var(--ui-scale, 1)); border-radius: calc(var(--radius-xs) * var(--ui-scale, 1));
  background: var(--accent); border: calc(2px * var(--ui-scale, 1)) solid white; box-shadow: 0 calc(1px * var(--ui-scale, 1)) calc(2px * var(--ui-scale, 1)) rgba(0,0,0,0.3);
}
.resize-handle[data-handle="n"]  { top: 0; left: 50%; cursor: ns-resize; }
.resize-handle[data-handle="s"]  { top: 100%; left: 50%; cursor: ns-resize; }
.resize-handle[data-handle="e"]  { top: 50%; left: 100%; cursor: ew-resize; }
.resize-handle[data-handle="w"]  { top: 50%; left: 0; cursor: ew-resize; }
.resize-handle[data-handle="ne"] { top: 0; left: 100%; cursor: nesw-resize; }
.resize-handle[data-handle="sw"] { top: 100%; left: 0; cursor: nesw-resize; }
.resize-handle[data-handle="nw"] { top: 0; left: 0; cursor: nwse-resize; }
.resize-handle[data-handle="se"] { top: 100%; left: 100%; cursor: nwse-resize; }

.rotate-stem {
  position: absolute; top: calc(-28px * var(--ui-scale, 1)); left: 50%; width: calc(1px * var(--ui-scale, 1)); height: calc(24px * var(--ui-scale, 1));
  background: var(--line); transform: translateX(-50%);
}
.rotate-handle {
  position: absolute; top: calc(-44px * var(--ui-scale, 1)); left: 50%; transform: translateX(-50%);
  width: calc(18px * var(--ui-scale, 1)); height: calc(18px * var(--ui-scale, 1)); border-radius: 50%; background: white;
  border: calc(2px * var(--ui-scale, 1)) solid var(--accent); cursor: grab; padding: 0;
  min-height: calc(var(--control-height) * var(--ui-scale, 1));   /* the global button minimum, in the same on-screen terms */
}

.approx-note, .overflow-caption { margin: var(--space-2) 0 0; max-width: var(--measure-prose); }   /* #33 PR 2: .field__hint lines */
.canvas-blank-note { font-size: var(--text-base); color: var(--color-text-secondary); margin: var(--space-2) 0 0; font-style: italic; }
.overflow-warning {
  display: flex; align-items: baseline; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600;
  color: var(--color-warning); background: var(--color-warning-bg);
  border: 1px solid var(--color-warning); border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-2); margin: var(--space-2) 0 0; max-width: 480px;
}

.canvas-bottom-bar {
  display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted);
}
.icon-btn {
  width: 30px; height: 30px; min-width: 40px; min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: white; color: var(--ink); cursor: pointer;
}
/* #498: the percentage is a button that goes to 100%; its width is fixed so the control never moves as the number changes */
.zoom-pct {
  width: 3.75rem; min-height: 40px; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: inherit;
  font-size: var(--text-sm); text-align: center; font-variant-numeric: tabular-nums; cursor: pointer;
}
.zoom-pct:hover { background: var(--color-bg-subtle); color: var(--color-text); }
.print-area-readout { margin-left: auto; }

/* ---- right panel ---- */
.panel-section { border-top: 1px solid var(--line); padding-top: var(--space-4); margin-top: var(--space-4); }
.editor-col-right .panel-section:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.panel-collapse-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; padding: 0; cursor: pointer; color: var(--ink); text-align: left;
}
.chevron { transition: transform 150ms ease; color: var(--color-text-muted); font-size: var(--text-xs); }
.panel-collapsible.collapsed .chevron { transform: rotate(-90deg); }
.panel-collapsible.collapsed .panel-collapse-body { display: none; }

.layers-panel-header { display: flex; flex: none; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
/* #498: the header is one line on every tab: the label, then the editing badge, each cut short rather than wrapping */
.layers-panel-header .panel-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layers-panel-header .editing-mode-badge { flex: 0 1 auto; min-width: 0; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layers-panel-header .layers-count { color: var(--color-text-muted); font-weight: 500; font-size: var(--text-sm); }
.editing-mode-badge {
  font-size: var(--text-xs); font-weight: 600; color: var(--color-brand); background: var(--color-selected-bg);
  border: 0; border-radius: var(--radius-pill); padding: var(--space-1) var(--space-3);
  cursor: pointer; min-height: 28px;   /* #419 PR 5b: the kit's brand pill (.pill--brand), no outline */
}
.editing-mode-badge:hover { background: var(--color-bg-subtle); }
.layers-coverage { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0 0 var(--space-3); }
.enter-override-btn { width: 100%; margin-bottom: var(--space-3); text-align: center; }
/* Filled, not just recolored (DESIGN_SYSTEM.md — status is written text,
   never color alone; the label itself already says "Using..."/"Make...",
   this is reinforcement, not the only signal). */
.enter-override-btn.forked { background: var(--color-selected-bg); color: var(--color-brand); border-color: var(--color-selected-border); }   /* #419: the selected tint, not a solid */

/* ---- right panel: layer list ---- */
.layer-list { position: relative; display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-2); }   /* #498: the Layers tab scrolls as a whole */
/* #1172: where a dragged layer will land, in the gap between two rows; .layer-row.is-dragging is a row held on a touch screen */
.layer-drop-line { position: absolute; left: 0; right: 0; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--accent); pointer-events: none; }
.layer-row.is-dragging { opacity: 0.6; }
.layer-row { -webkit-touch-callout: none; }
.layer-row {
  display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-2);
  border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; background: white;
}
.layer-row.selected { border-color: var(--color-selected-border); border-width: 2px; padding: calc(var(--space-1) - 1px) calc(var(--space-2) - 1px); background: var(--color-selected-bg); } /* selection tokens, no input: view state that never posts (ADR-011) */
.layer-thumb { width: 32px; height: 32px; border-radius: var(--radius-xs); object-fit: cover; background: var(--stone-100); flex-shrink: 0; }
.layer-thumb--text {   /* #1172: a text layer's icon, a plain serif T */
  display: flex; align-items: center; justify-content: center;
  font-family: "Times New Roman", Times, serif; font-size: var(--text-xl); line-height: 1; color: var(--ink);
}
.layer-name { flex: 1; font-size: var(--text-sm); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-visibility-btn {
  background: none; border: none; cursor: pointer; padding: var(--space-1);
  min-height: 32px; min-width: 32px; color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.layer-visibility-btn:hover { color: var(--ink); }
.layer-row.hidden-layer .layer-visibility-btn { color: var(--stone-300); }
.layer-row.hidden-layer .layer-name, .layer-row.hidden-layer .layer-thumb { opacity: 0.4; }
/* #498 (the owner, 2026-10-18): the row's one action is a trash can that deletes the layer (the same confirm and guards as Delete
   layer). It replaced the six-dot grip, which read as two ⋯ menus; the whole row is still the drag source for reordering. */
.layer-delete-btn {
  background: none; border: none; cursor: pointer; padding: var(--space-1); border-radius: var(--radius-sm);
  min-height: 32px; min-width: 32px; color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.layer-delete-btn:hover, .layer-delete-btn:focus-visible { color: var(--color-error); background: var(--color-error-bg); }
.layer-delete-btn svg { width: 16px; height: 16px; display: block; }
/* #1469: the row's Duplicate, beside the trash can, drawn as the trash can is */
.layer-duplicate-btn {
  background: none; border: none; cursor: pointer; padding: var(--space-1); border-radius: var(--radius-sm);
  min-height: 32px; min-width: 32px; color: var(--color-text-muted);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.layer-duplicate-btn:hover, .layer-duplicate-btn:focus-visible { color: var(--ink); background: var(--stone-100); }
.layer-duplicate-btn:disabled { cursor: not-allowed; color: var(--stone-300); background: none; }
.layer-duplicate-btn svg { width: 16px; height: 16px; display: block; }

/* ---- right panel: selected layer ---- */
.selected-layer-name { font-weight: 400; color: var(--color-text-muted); font-size: var(--text-sm); }
/* #394: "Selected layer" names the layer, and a long design name ellipsizes inside the column instead of pushing past its edge */
.selected-layer-panel .panel-collapse-toggle .panel-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-layer-panel .delete-layer-btn { width: 100%; margin-top: var(--space-2); text-align: center; }

.overrides-list { display: flex; flex-direction: column; gap: var(--space-1); }
.override-row { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--ink); }
.override-row-name { font-weight: 600; }
.override-row-status { color: var(--color-text-muted); flex: 1; }
.swatch-chip-sm { width: 16px; height: 16px; border-radius: var(--radius-xs); flex-shrink: 0; border: 1px solid rgba(28,25,23,0.14); }
.override-revert-btn {
  background: none; border: none; color: var(--accent); font-size: var(--text-xs);
  cursor: pointer; padding: 0; text-decoration: underline;
}

/* docs/style-target.css's .placement-fields is a 3-col CSS grid; this is a
   flex-wrap row — same purpose (the W/H/Scale/Left/Top/Rotate fields),
   different layout mechanic. Its target-file media-query rule for mobile
   is inert against this flex version (see that file's overlap inventory)
   and was deliberately not ported. Not reconciled. */
.placement-fields { display: flex; gap: var(--space-2); margin-bottom: var(--space-2); flex-wrap: wrap; }
.placement-fields label, .rotate-field {
  display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--text-xs);
  color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.02em; position: relative;
}
.placement-fields input, .rotate-field input {
  width: 64px; padding: var(--space-1) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: var(--text-base); text-transform: none; letter-spacing: normal; color: var(--ink);
}
.rotate-field { width: fit-content; margin-bottom: var(--space-2); }
/* #1066 PR 2: a text layer's words, font and ink, above its size and place */
.text-fields { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-3); }
.text-field { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.text-field input[type="text"], .text-field select { flex: 1; min-width: 0; min-height: 36px; }
.text-field input[type="color"] { width: 44px; height: 36px; padding: 2px; }
/* #1172: the Font list, each choice in its own font (static/design_chooser.css); the closed control shows the current one */
.font-picker { position: relative; flex: 1; min-width: 0; }
.font-picker__button {
  width: 100%; min-height: 36px; padding: 0 var(--space-6) 0 var(--space-2); text-align: left; font-size: var(--text-base);
  color: var(--ink); background: white; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative;
}
.font-picker__button::after {
  content: ""; position: absolute; right: var(--space-2); top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
.font-picker__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 20; margin: 0; padding: var(--space-1) 0; list-style: none;
  max-height: 16rem; overflow-y: auto; background: white; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.font-picker__list:focus { outline: none; }
.font-picker__option { padding: var(--space-2); min-height: 40px; display: flex; align-items: center; font-size: var(--text-lg); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font-picker__option[aria-selected="true"] { background: var(--color-selected-bg); }
.font-picker__option.is-active, .font-picker__option:hover { background: var(--color-bg-subtle); outline: 2px solid var(--color-selected-border); outline-offset: -2px; }
.text-ink-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.add-text-btn { margin-top: var(--space-2); }
/* #33 PR 2: the W/H lock indicator between the two fields (an indicator, not a control: the fields already keep the proportions) */
.placement-lock { display: inline-flex; align-items: center; justify-content: center; align-self: flex-end; width: 28px; height: 28px; border-radius: var(--radius-xs); background: var(--color-bg-subtle); color: var(--accent); }
.placement-lock svg { width: 15px; height: 15px; }
.unit { font-size: var(--text-xs); color: var(--color-text-muted); position: absolute; right: 8px; bottom: 6px; text-transform: none; pointer-events: none; }

.align-row { display: flex; align-items: center; gap: var(--space-1); flex-wrap: wrap; }
.align-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: white; color: var(--ink);
  font-size: var(--text-md); cursor: pointer;
}
.align-btn:hover { border-color: var(--accent); color: var(--accent); }
.align-btn.active { background: var(--color-selected-bg); border-color: var(--color-selected-border); color: var(--ink); }
.align-btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.align-sep { width: 1px; height: 1.4rem; background: var(--line); margin: 0 var(--space-1); }

.opacity-row { display: flex; align-items: center; gap: var(--space-2); position: relative; }   /* #419: .unit inside it is absolute; unpositioned, the "%" landed at the window's corner */
.opacity-row input[type=range] { flex: 1; }
.opacity-row input[type=number] { width: 52px; padding: var(--space-1); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); }
.opacity-caption { font-size: var(--text-xs); color: var(--color-text-muted); margin: var(--space-2) 0 0; }

.dpi-panel { display: block; }
.dpi-panel-row { display: flex; align-items: center; gap: var(--space-2); }
.dpi-panel-value { margin-left: auto; font-size: var(--text-md); }
.dpi-panel-value.dpi-good { color: var(--safe-green); }
.dpi-panel-value.dpi-warn { color: var(--near-amber); }
.dpi-panel-value.dpi-bad { color: var(--floor-red); }
.dpi-panel-icon { color: var(--safe-green); }
.dpi-panel-caption { font-size: var(--text-xs); color: var(--color-text-muted); margin: var(--space-1) 0 0; }


/* ---------------------------------------------------------------- research */
.research-add { display: flex; gap: var(--space-2); margin-bottom: var(--space-6); }
.research-add input[type=text] {
  flex: 1; padding: var(--space-2) var(--space-3); border: 1px solid var(--line);
  border-radius: var(--radius-md); font-size: var(--text-md);
}
.research-add input:focus { outline: none; border-color: var(--accent); }

.research-list { display: flex; flex-direction: column; gap: var(--space-2); }
.research-row {
  display: flex; align-items: center; gap: var(--space-4);
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4);
}
.research-pick { display: flex; align-items: center; }
/* Matches .selection-indicator's 20px so rows without a brief align. */
.pick-spacer { display: inline-block; width: 20px; }
.research-row-main { flex: 1; min-width: 0; }
.research-theme { font-weight: 600; font-size: var(--text-md); color: var(--ink); text-decoration: none; }
a.research-theme:hover { color: var(--accent); text-decoration: underline; }
.research-row-meta { margin: var(--space-1) 0 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.research-row-actions { display: flex; gap: var(--space-2); flex: none; }

.compare-bar {
  position: sticky; bottom: 1rem; margin-top: var(--space-5);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  background: var(--ink); color: white; padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg);
}
.compare-bar .btn { background: var(--color-bg-surface); color: var(--ink); }
.btn.disabled { opacity: 0.5; pointer-events: none; }

/* single brief */
.brief-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
@media (max-width: 700px) { .brief-grid { grid-template-columns: 1fr; } }
.brief-block { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-4); }
/* Card headings (DESIGN_SYSTEM.md 16/24). Genuine headings, not labels — each opens a
   <section> of content — and the h1→h2 outline is correct; only the size was wrong. */
.brief-block h2 { font-size: 1rem; margin: 0 0 var(--space-2); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }
/* docs/style-target.css's .chip is a generic badge/chip base
   (min-height:1.75rem, token-driven); this is a smaller research-page
   keyword pill. Same "small pill" concept, different recipe. Not
   reconciled. */
.chip {
  font-size: var(--text-sm); padding: var(--space-1) var(--space-2); border-radius: var(--radius-pill);
  background: var(--stone-100); color: var(--stone-700); border: 1px solid var(--stone-200);
}
.chip b { color: var(--color-text-muted); font-weight: 600; }

/* compare */
.cmp-grid { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: var(--space-4); }
@media (max-width: 800px) { .cmp-grid { grid-template-columns: 1fr; } }
.cmp-col { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-4); }
.cmp-col.least { border-color: var(--safe-green); box-shadow: 0 0 0 1px var(--safe-green) inset; }
.cmp-col-head { border-bottom: 1px solid var(--line); padding-bottom: var(--space-2); margin-bottom: var(--space-3); }
.cmp-theme { font-weight: 700; font-size: var(--text-md); color: var(--ink); text-decoration: none; }
.cmp-count { display: flex; align-items: baseline; gap: var(--space-2); margin-top: var(--space-1); }
.cmp-num { font-size: var(--text-2xl); font-weight: 700; }
.cmp-col.least .cmp-num { color: var(--safe-green); }
/* Card heading, 16px. Outline quirk recorded (not styling): the column title
   .cmp-theme is a link, not a heading, so the page skips h1→h3 here. */
.cmp-col h3 { font-size: 1rem; margin: 0 0 var(--space-2); }
.chip-unique { background: var(--color-success-bg); border-color: var(--safe-green); color: var(--color-success); }
.cmp-shared { margin-top: var(--space-5); border-top: 2px solid var(--ink); padding-top: var(--space-4); }
/* Section heading — takes the base h2 scale (1.25rem); no size override. */
.cmp-shared h2 { margin: 0 0 var(--space-2); }

/* ---------------------------------------------------------------- Killion design-system showcase (development only) */
.ds-showcase { max-width: 1120px; }
.ds-hero { padding: var(--space-8) 0 var(--space-4); }
.ds-kicker { color: var(--color-brand); font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ds-section { margin: var(--space-8) 0; padding: var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-bg-surface); box-shadow: var(--shadow-card); }
.ds-section > h2 { margin-top: 0; }
.ds-swatches, .ds-row, .ds-card-grid { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.ds-swatch { width: 110px; color: var(--color-text-secondary); font-size: var(--text-base); }
.ds-swatch-color { display: block; height: 64px; margin-bottom: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.ds-swatch-token { display: block; margin-top: var(--space-1); font-size: var(--text-xs); color: var(--color-text-muted); font-family: var(--font-mono); }
.ds-brand { background: var(--color-brand); }.ds-accent { background: var(--color-accent); }
.ds-text { background: var(--color-text); }.ds-text-secondary { background: var(--color-text-secondary); }.ds-text-muted { background: var(--color-text-muted); }
.ds-surface { background: var(--color-bg-surface); }.ds-subtle { background: var(--color-bg-subtle); }
.ds-border { background: var(--color-border); }.ds-border-strong { background: var(--color-border-strong); }
.ds-selected { background: var(--color-selected-bg); border-color: var(--color-selected-border); }.ds-success { background: var(--color-success); }.ds-warning { background: var(--color-warning); }.ds-error { background: var(--color-error); }.ds-info { background: var(--color-info); }
.ds-hint { color: var(--color-text-muted); font-size: var(--text-sm); margin: var(--space-2) 0 0; }
.ds-scale-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4); margin: var(--space-4) 0; }
.ds-scale-item { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); font-family: var(--font-mono); }
.ds-scale-bar { display: block; height: 12px; background: var(--color-brand); border-radius: var(--radius-xs); min-width: 4px; }
.ds-radius-box, .ds-shadow-box { display: block; width: 48px; height: 48px; background: var(--color-bg-surface); border: 1px solid var(--color-border); }
.ds-contrast-chip { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-sm); font-weight: 700; font-size: var(--text-sm); margin-right: var(--space-2); vertical-align: middle; }
.ds-money { font-size: var(--text-3xl); font-weight: 700; font-variant-numeric: tabular-nums; }.ds-money span { color: var(--color-text-secondary); font-size: var(--text-base); font-weight: 500; }
.ds-destructive { color: var(--color-error); border-color: var(--color-error); }
.ds-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin-top: var(--space-5); }
.ds-form-grid .field-label { margin: 0; }.ds-form-grid input, .ds-form-grid select, .ds-form-grid textarea { display: block; width: 100%; margin-top: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: white; color: var(--color-text); }.ds-form-grid .field-label span { display: block; color: var(--color-text-muted); font-size: var(--text-xs); font-weight: 400; }
.ds-form-grid input[aria-invalid="true"] { border-color: var(--color-error); }
.ds-form-grid input:disabled { background: var(--color-disabled-bg); color: var(--color-disabled-text); cursor: not-allowed; }
.ds-fieldset { margin-top: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-md); }.ds-fieldset legend { padding: 0 var(--space-2); font-weight: 600; }.ds-color-dot { width: 22px; height: 22px; border: 1px solid var(--color-border-strong); border-radius: 50%; }.ds-pepper { background: #454846; }.ds-ivory { background: #eee9df; }
.ds-card-grid > * { flex: 1 1 240px; }.ds-selectable.selected { border-color: var(--color-selected-border); box-shadow: inset 0 0 0 1px var(--color-selected-border); }.ds-price strong { color: var(--color-success); font-size: 1.75rem; font-variant-numeric: tabular-nums; }.ds-price p { padding: var(--space-2); color: var(--color-success); background: var(--color-success-bg); border-radius: var(--radius-sm); }
.ds-alert { margin-top: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid; border-radius: var(--radius-md); }.ds-alert-info { color: var(--color-info); background: var(--color-info-bg); }.ds-alert-success { color: var(--color-success); background: var(--color-success-bg); }.ds-alert-warning { color: var(--color-warning); background: var(--color-warning-bg); }.ds-alert-error { color: var(--color-error); background: var(--color-error-bg); }
.ds-table-wrap { overflow-x: auto; }.ds-table-wrap table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }.ds-table-wrap th, .ds-table-wrap td { height: 44px; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-border); text-align: left; }.ds-table-wrap thead th { color: var(--color-text-secondary); font-size: var(--text-xs); }
@media (max-width: 640px) { .ds-section { padding: var(--space-4); }.ds-form-grid { grid-template-columns: 1fr; }.ds-card-grid { display: block; }.ds-card-grid > * { margin-bottom: var(--space-3); } }


/* ---- Mockup library (build item 5, 5a; its calibration screen left with #277 PR B) ---- */
.mockup-library .upload-card { margin-bottom: var(--space-6); }
.mockup-upload-row { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: var(--space-3); align-items: end; }
.mockup-upload-row > * { min-width: 0; }
.mockup-upload-row .input { width: 100%; max-width: 100%; box-sizing: border-box; }
.mockup-group { margin-bottom: var(--space-6); }
.mockup-group-head h2 { margin: 0; font-size: var(--text-lg); }
.mockup-group-head p { margin: 0 0 var(--space-3); color: var(--color-text-muted); font-size: var(--text-base); }
.mockup-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-4); }
.mockup-tpl-card { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); }
.mockup-library .upload-card .input[type="file"] { padding: 6px var(--space-2); }
.mockup-library .upload-card .input[type="file"]::file-selector-button { margin-right: var(--space-2); min-height: 30px; padding: 0 var(--space-3); border: 1px solid var(--color-control-border); border-radius: var(--radius-sm); background: var(--color-bg-surface); color: var(--color-brand); font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer; }   /* #419 PR 5a: the UA's grey button, in the kit's outline tone */
.mockup-tpl-thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); background: var(--stone-100); }
.mockup-tpl-name { font-weight: 600; font-size: var(--text-base); overflow-wrap: anywhere; }
.mockup-tpl-meta { color: var(--color-text-muted); font-size: var(--text-sm); }
.mockup-tpl-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); margin-top: auto; }
.mockup-tpl-actions form { display: contents; }
@media (max-width: 834px) {
  .mockup-upload-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .mockup-upload-row { grid-template-columns: minmax(0, 1fr); }
}


/* ---- Mockups step: the gallery screen (build item 5, 5c) ---- */
/* #33 PR 1 (M-A, the owner's Q1): the three columns 1 : 2 : 1, the Listing photos card wrapping under the preview in the middle
   column; cards with head rows, the summary's pills and tile, 44 px controls. */
.mockups-title { margin-bottom: var(--space-4); }
.mockups-title h1 { margin-bottom: var(--space-1); }
.mockups-title .subtitle { margin-bottom: 0; }
.mockups-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: auto 1fr;
  grid-template-areas: "prod prev choose" "prod strip choose"; gap: var(--space-4); align-items: start; }
.mockups-products { grid-area: prod; }
.mockups-preview { grid-area: prev; }
.mockups-choose { grid-area: choose; max-height: calc(100vh - 2 * var(--space-4)); overflow-y: auto; overscroll-behavior: contain; }   /* #374: the panel scrolls inside itself, never the page */
.mockups-strip { grid-area: strip; }
.mockups-panel { min-width: 0; }   /* the card recipe (.card) draws the surface and shadow */
.mockups-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-3); }
.mockups-panel .mockups-card-head h2 { margin: 0; font-size: var(--text-md); }
/* #351, M-A item 3: the head's pill sits at the head's right (Products & colors, Live preview); Listing photos keeps its inline */
.mockups-card-head__acts { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-2); }
/* #351, M-A item 4: products are separated by a hairline, not a margin */
.mockups-product { margin-bottom: 0; padding: var(--space-2) 0; }
.mockups-product + .mockups-product { border-top: 1px solid var(--color-border); }
.mockups-product-name { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; margin: 0 0 var(--space-2); }
.mockups-color-row { display: flex; flex-wrap: nowrap; align-items: center; column-gap: var(--space-2); min-height: 44px; }
.mockups-swatch { width: 20px; height: 20px; flex: none; }
.mockups-swatch circle { stroke: var(--color-border-strong); stroke-width: 1; }
/* #664: a multi-design product's per-design rows, under a toggle; the Group photos section above the products */
.mockups-designs { margin-top: var(--space-1); }
.mockups-designs__toggle { display: list-item; min-height: 44px; line-height: 44px; cursor: pointer; color: var(--color-brand); font-weight: 600; }
.mockups-designs__toggle:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.mockups-design-colors { padding-left: var(--space-3); }
.mockups-design-name { font-weight: 600; margin: var(--space-2) 0 var(--space-1); }
.mockups-group-photos { padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border); }
.mockups-group-photos .field__hint { margin: 0; }
/* #665: "+ Group photo" opens her group photos; this listing's group pictures sit under it, each a link to the editor */
.mockups-group-add { margin: var(--space-2) 0; }
.mockups-group-add__btn { list-style: none; display: inline-flex; min-height: 44px; align-items: center; cursor: pointer; }
.mockups-group-add__btn::-webkit-details-marker { display: none; }
.mockups-group-pick, .mockups-group-made { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.mockups-group-pick { grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); }
.mockups-group-pick__tile { display: grid; gap: var(--space-1); padding: var(--space-1); border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-text); text-decoration: none; font-size: var(--text-sm); overflow-wrap: anywhere; }
.mockups-group-pick__tile:hover { border-color: var(--color-border-strong); }
.mockups-group-pick__tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-xs); background: var(--stone-100); }
.mockups-group-made__row { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: var(--space-1) var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-text); text-decoration: none; }
.mockups-group-made__row:hover { border-color: var(--color-border-strong); }
.mockups-group-made__pic { flex: 0 0 3rem; height: 2.25rem; border-radius: var(--radius-xs); background: var(--stone-100); overflow: hidden; }
.mockups-group-made__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mockups-group-made__name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.mockups-color-row .selection-row { flex: 1 1 auto; }
/* #351 (decision 5; M-A items 1 and 2): the row is the link, one 44 px line. Not current: a 1 px border on the surface, a stronger one
   on hover. Current: the selection recipe's checked look (2 px selected border on the selected ground, padding pulled in 1 px so
   nothing moves; the one-shape rule above). Keyboard focus is the 3 px ring. A pictured row is plain: its green pill says so. */
.mockups-color-list { list-style: none; margin: 0; padding: 0; }
.mockups-color-link { color: inherit; text-decoration: none; background: var(--color-bg-surface); }
.mockups-color-link:hover { background: var(--color-bg-subtle); }
.mockups-color-link:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.mockups-color-row .summary-pill { padding: 2px var(--space-2); }
/* #351, M-A item 5: the preview frame is 4:3 */
.mockups-preview-frame { position: relative; aspect-ratio: 4 / 3; background: var(--stone-100); border-radius: var(--radius-md); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.mockups-preview-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mockups-preview-state { padding: var(--space-4); text-align: center; color: var(--color-text-muted); }
.mockups-preview-skeleton { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 0; }
.mockups-preview-skeleton .mockups-preview-state { color: var(--color-text-secondary); }
/* #387 (the owner, 2026-10-14): a picture is hidden until it has fully loaded and decoded, then fades in (static/img_fade.js), so it
   never paints in strips; its frame's skeleton (the one .skeleton pulse, DESIGN_SYSTEM.md) holds the place meanwhile. Reduced motion:
   the global rule above makes the fade instant and the skeleton static. A failed load shows its words, never a broken image. Class
   toggles only (ADR-010). #388 reuses these for the Mockup library page. */
img[data-fade] { opacity: 0; transition: opacity 180ms var(--ease-standard); }
img[data-fade].is-loaded { opacity: 1; }
.skeleton.is-done { animation: none; background: none; }
.mockups-preview-skeleton.is-done, .mockups-preview .is-gone { display: none; }
.mockups-preview-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; }
.mockups-tile-pic { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--radius-sm); min-height: 0; }
.mockups-tile-pic img { display: block; height: 100%; }
.mockups-tile-pic.is-failed::after { content: "Photo unavailable"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: var(--space-1); text-align: center; font-size: var(--text-xs); color: var(--color-text-secondary); background: var(--stone-100); }
.mockups-add-btn { margin-left: auto; }
/* #351, M-A item 6 and Q10: the lines under the tools row (the cap, the Added line with its Undo, the render state, the hint) */
.mockups-tools-line { flex-basis: 100%; margin: 0; }
.mockups-added { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.mockups-added form { display: contents; }
.mockups-undo-btn { min-height: 44px; }
.mockups-continue-form { display: contents; }
/* #277: the picture's frame over the preview (static/photo_layers.js). The stage covers the preview frame; the photo is drawn
   object-fit: contain inside it and the script places the frame on the photo's drawn rectangle. Class toggles only (ADR-010). */
.pic-stage { position: absolute; inset: 0; }
/* #694 PR B: every design its own layer, each with its own box (static/photo_layers.js). The drawing shows only in the light preview
   (is-live); over a rendered picture each layer is still there to click, transparent. */
.pic-layers { position: absolute; inset: 0; pointer-events: none; }
.pic-layer { position: absolute; display: none; cursor: pointer; touch-action: none; transform-origin: 50% 50%; pointer-events: auto; }
.pic-stage.is-ready .pic-layer { display: block; }
.pic-layer.is-selected { cursor: move; }
.pic-layer:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pic-layer img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: fill; visibility: hidden; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.pic-stage.is-live .pic-layer img { visibility: visible; }
.pic-stage.is-fitting .pic-layer { pointer-events: none; }
/* #1034: a text layer on the photo (static/photo_text.js). Drawn only in the light preview (is-live), as the design layers are (over a rendered picture it is there to click, transparent); the
   render draws the same text into the saved picture. Its size, color and place are set by the script from the layer's own fields. */
.pic-texts { position: absolute; inset: 0; pointer-events: none; }
.pic-text { position: absolute; display: none; opacity: 0; white-space: nowrap; line-height: 1; cursor: pointer; touch-action: none; pointer-events: auto; user-select: none; transform: translate(-50%, -50%); transform-origin: 50% 50%; }
.pic-stage.is-ready .pic-text { display: block; }
.pic-stage.is-live .pic-text { opacity: 1; }
/* #1065: a selected text's box and handles are the stage's one box (.pic-chrome), placed on the text by static/photo_text.js */
.pic-text.is-selected { cursor: move; }
.pic-text:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.pic-stage.is-fitting .pic-text { pointer-events: none; }
.mockups-text-add { margin-bottom: var(--space-2); }
.mockups-text-list { margin-bottom: var(--space-2); }
.mockups-layer-row .mockups-text-form { display: flex; flex-direction: column; gap: var(--space-1); flex: 1 1 100%; min-width: 0; }
.mockups-text-size, .mockups-text-color, .mockups-text-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.mockups-text-row > .mockups-text-acts { flex: 1 1 100%; justify-content: flex-end; }
.mockups-text-size input[type="range"] { flex: 1 1 8rem; min-width: 0; }
.mockups-text-size input[type="number"] { width: 5.5rem; }
.mockups-text-color input[type="color"] { width: 2.75rem; height: var(--control-h); padding: 0; }
/* #1333 (the owner, 23 Nov, her layout option 1): the Selected layer card, first in the right panel and sticky at its top (the panel
   scrolls inside itself, #1178), so the design list stays in view under it. Its heading names the design; row 1 is Width, Turn, From the
   top and Across, four across; row 2 is Pin corners and Reset corners. More and the "?" sit beside the heading (on a phone, clear of the
   Feedback bubble). Nothing selected: one sentence. The "?" words and the More menu open under the heading, over the card, as wide as
   it, so neither one ever scrolls the panel sideways */
.photos-layer-card { position: sticky; top: 0; z-index: 6; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2);
  box-shadow: 0 6px 10px -8px rgb(28 25 23 / 30%); }
main.wrap-fit .photos-side > .photos-layer-card { padding: var(--space-3); }
.photos-layer-card__head { position: relative; display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.photos-layer-card.is-empty .layer-more { display: none; }
.photos-layer-card__h { flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--text-md); overflow-wrap: anywhere; }
.photos-layer-card__off { display: none; }
.photos-layer-card.is-empty .photos-layer-card__on { display: none; }
.photos-layer-card.is-empty .photos-layer-card__h { font-size: var(--text-sm); font-weight: 400; line-height: 1.3; color: var(--color-text-secondary); }
.photos-layer-card.is-empty .photos-layer-card__off { display: inline; }
.photos-layer-card.is-empty .photos-layer-card__fields { display: none; }
.photos-layer-card__fields { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.photos-layer-card__nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); align-items: end; margin: 0; }
.photos-layer-card__nums .field-label { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: var(--text-xs); line-height: 1.2; }
.photos-layer-card__nums .input { width: 100%; box-sizing: border-box; min-width: 0; min-height: 40px; padding-left: var(--space-2); padding-right: var(--space-1); }
.photos-layer-card__row { display: flex; align-items: flex-start; gap: var(--space-2); min-width: 0; }
.photos-layer-card__pin { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); flex: 1 1 auto; min-width: 0; }
.photos-layer-card__pin-hint { flex: 1 1 100%; margin: 0; }
.photos-layer-card__row .btn { padding-left: var(--space-2); padding-right: var(--space-2); }   /* Pin corners and Reset corners on one row */
.photos-layer-card:not(.is-pinned) .photos-layer-card__pin-hint { display: none; }   /* only while the pin is on */
.layer-more { flex: none; }
.layer-more__btn { list-style: none; }
.layer-more__btn::-webkit-details-marker { display: none; }
.layer-more__btn::marker { content: ""; }
.layer-more[open] > .layer-more__btn { background: var(--color-selected-bg); color: var(--color-brand); }
.layer-more__menu { position: absolute; z-index: 7; top: calc(100% + var(--space-1)); left: 0; right: 0; display: flex;
  flex-direction: column; align-items: stretch; gap: var(--space-2); padding: var(--space-3); background: var(--color-bg-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-popover); }
.layer-more__menu .field-label { margin: 0; }
.photos-layer-card__replace { display: flex; gap: var(--space-2); align-items: center; min-width: 0; }
.photos-layer-card__replace select { flex: 1 1 auto; min-width: 0; }
.layer-more__menu > .btn { justify-content: flex-start; }
@media (max-width: 767px) {
  /* a phone: the right panel is a short box under the photo (#1178), shorter than the card, so a sticky card would cover the list. The card
     stays first in the panel and scrolls with it, the list right under it; a new selection scrolls the panel back to it (photo_layers.js) */
  .photos-layer-card { position: relative; z-index: 1; }   /* under the status line, whose long words show over the panel's top (#1304) */
  .photos-layer-card__nums .input, .photos-layer-card__row .btn { min-height: 44px; }   /* a finger's target */
}
.mockups-layer-pick { display: flex; align-items: center; gap: var(--space-2); flex: 1 1 auto; min-width: 0; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.mockups-layer-pick[aria-pressed="true"] .mockups-tile-name { text-decoration: underline; }
.pic-frame { position: absolute; display: none; cursor: pointer; touch-action: none; transform-origin: 50% 50%; }
.pic-stage.is-ready .pic-frame { display: block; }
.pic-stage.is-selected .pic-frame { cursor: move; }
.pic-frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pic-frame__art { position: absolute; inset: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
.pic-stage.is-live .pic-frame__art { visibility: visible; }
.mockups-preview-frame .pic-frame__art img { position: absolute; width: auto; height: auto; max-width: none; object-fit: fill; user-select: none; -webkit-user-drag: none; }
/* #587: the box sits in .pic-chrome, a sibling after the fit's canvas that follows the frame, so a fit never paints over it. The
   chrome lets presses through to the frame below; only the corners and rotate take them */
/* #694 PR C (#665's real-path fix, kept): the chrome sits above every layer (each layer's own z-index is its place, 1 to 12), so the
   selected layer's corner or turn handle is never under another layer that overlaps it. #1229: above the fit's canvas and the texts too
   (the stage's stacking, at .pic-zoom below) */
.pic-chrome { position: absolute; z-index: 3000; display: none; pointer-events: none; transform-origin: 50% 50%; }
.pic-stage.is-ready .pic-chrome { display: block; }
.pic-box { position: absolute; inset: 0; display: none; outline: 1px dashed var(--accent); }
.pic-handle, .pic-rotate { pointer-events: auto; }
.pic-stage.is-selected .pic-box { display: block; }
/* 44px hit targets (DESIGN_SYSTEM.md, spacing and sizing) around the editor's drawn squares */
.pic-handle { position: absolute; width: 44px; height: 44px; margin: -22px; padding: 0; background: none; border: 0; box-shadow: none; display: flex; align-items: center; justify-content: center; touch-action: none; }
.pic-handle::before { content: ""; width: 14px; height: 14px; border-radius: var(--radius-xs); background: var(--accent); border: 2px solid white; box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.pic-handle--nw { top: 0; left: 0; cursor: nwse-resize; }
.pic-handle--ne { top: 0; left: 100%; cursor: nesw-resize; }
.pic-handle--se { top: 100%; left: 100%; cursor: nwse-resize; }
.pic-handle--sw { top: 100%; left: 0; cursor: nesw-resize; }
.pic-rotate-stem { position: absolute; top: -28px; left: 50%; width: 1px; height: 28px; background: var(--accent); transform: translateX(-50%); }
.pic-rotate { position: absolute; top: -50px; left: 50%; width: 44px; height: 44px; margin-left: -22px; padding: 0; background: none; border: 0; cursor: grab; touch-action: none; display: flex; align-items: center; justify-content: center; }
.pic-rotate::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: white; border: 2px solid var(--accent); }
/* #1527 (the owner, 2 Dec 2026): turn from any corner, in both editors. A band just outside each corner handle (24 px past its target,
   36 px on touch) shows a curved-arrow turn cursor, and a drag there turns the design about its center (static/photo_layers.js,
   static/colors_editor.js); the corner handle itself, drawn over the band, still sizes it. Each band is an L round its corner, cut away
   where it would cover the design. Design placement's is scaled by --ui-scale like its handles (#1467) */
.pic-turn, .rotate-band { position: absolute; --turn-band: 24px; pointer-events: auto; touch-action: none; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg stroke='white' stroke-width='4'%3E%3Cpath d='M5 15A10 10 0 0 1 15 5'/%3E%3Cpath d='M12 2l3.5 3L12 8M2 12l3 3.5L8 12'/%3E%3C/g%3E%3Cg stroke='%231c1917' stroke-width='2'%3E%3Cpath d='M5 15A10 10 0 0 1 15 5'/%3E%3Cpath d='M12 2l3.5 3L12 8M2 12l3 3.5L8 12'/%3E%3C/g%3E%3C/svg%3E") 12 12, grab; }
@media (pointer: coarse) { .pic-turn, .rotate-band { --turn-band: 36px; } }
.pic-turn { width: calc(44px + 2 * var(--turn-band)); height: calc(44px + 2 * var(--turn-band)); margin: calc(-22px - var(--turn-band)); }
.rotate-band { width: calc((40px + 2 * var(--turn-band)) * var(--ui-scale, 1)); height: calc((40px + 2 * var(--turn-band)) * var(--ui-scale, 1));
  margin: calc((-20px - var(--turn-band)) * var(--ui-scale, 1)); }
.pic-turn--nw, .rotate-band[data-band="nw"] { top: 0; left: 0; clip-path: polygon(0 0, 100% 0, 100% 50%, 50% 50%, 50% 100%, 0 100%); }
.pic-turn--ne, .rotate-band[data-band="ne"] { top: 0; left: 100%; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 100%, 50% 50%, 0 50%); }
.pic-turn--se, .rotate-band[data-band="se"] { top: 100%; left: 100%; clip-path: polygon(50% 0, 100% 0, 100% 100%, 0 100%, 0 50%, 50% 50%); }
.pic-turn--sw, .rotate-band[data-band="sw"] { top: 100%; left: 0; clip-path: polygon(0 0, 50% 0, 50% 50%, 100% 50%, 100% 100%, 0 100%); }
.pic-stage:not(.is-turnable) .pic-turn { display: none; }   /* a design's only: a selected text's box (photo_text.js) has none */
/* #1271: a pinned design. Its four corner handles take the box's place (the box and its turn handle are put away), each a 44 px target
   with a round mark on its corner (static/photo_layers.js puts it there, inside the part of the stage in view); its outline is the
   design's own, drawn through the same matrix3d as the design */
.pic-pins { position: absolute; inset: 0; z-index: 3000; display: none; pointer-events: none; }
.pic-stage.is-pinning .pic-pins { display: block; }
.pic-stage.is-pinning .pic-box, .pic-stage.is-fitting .pic-pins { display: none; }
.pic-pin { position: absolute; width: 44px; height: 44px; margin: -22px; padding: 0; background: none; border: 0; box-shadow: none; display: flex; align-items: center; justify-content: center; touch-action: none; cursor: move; pointer-events: auto; }
.pic-pin::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 2px solid white; box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.pic-pin:focus-visible { outline: 2px solid var(--accent); outline-offset: -6px; border-radius: 50%; }
.pic-layer.is-pinned.is-selected { outline: 1px dashed var(--accent); }
[data-mockup-render-state]:empty { display: none; }
/* the listing photos: the summary's tile (templates/_gallery_tile.html), wider here to hold the order controls under each */
/* #351, M-A item 9: wide enough for ↑ ↓ Remove on one 44 px line (the system's 44 px rule wins over M-A's 36), a 96 px picture */
.mockups-strip .summary-tiles { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.mockups-strip .summary-tile__img { height: 96px; }
.mockups-gallery-tools { display: flex; flex-wrap: nowrap; gap: var(--space-1); }
.mockups-gallery-tools form { display: contents; }
.mockups-gallery-tools button { min-height: 44px; padding: 0 var(--space-3); font-size: var(--text-sm); }
.mockups-gallery-tools .icon-btn { width: 44px; min-width: 44px; height: 44px; padding: 0; }
.mockups-gallery-tools .icon-btn svg { width: 18px; height: 18px; }
/* #497 (the owner, 2026-10-18): drag a photo to reorder, or its ⋯ menu (Move left, Move right, Make main photo), which opens from the
   ⋯ toward the tile so it never leaves the page; the first photo is the main one, labeled over its picture. Every tile carries the
   label and only the first shows it, so a reorder in place moves it with no redraw. */
.mockups-gallery .summary-tile { position: relative; touch-action: manipulation; cursor: grab; }
.mockups-gallery .summary-tile__img { -webkit-touch-callout: none; user-select: none; }
.mockups-gallery .tile-menu__list { left: 0; right: auto; min-width: 11rem; }
.mockups-gallery .mockups-main-pill { display: none; }   /* over .summary-pill's own display, which comes later */
.mockups-gallery > li:first-child .mockups-main-pill { display: inline-flex; position: absolute; top: var(--space-1); left: var(--space-1); }
.mockups-gallery.is-sorting .summary-tile { cursor: grabbing; }
.mockups-gallery .summary-tile.is-dragging { opacity: 0.6; outline: 2px dashed var(--color-focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.mockups-order-hint { margin: var(--space-2) 0 0; }
/* #497: the bar on the photo while it renders: indeterminate (a render reports no progress), with its words, over the frame's foot */
.mockups-render-progress { position: absolute; left: var(--space-3); right: var(--space-3); bottom: var(--space-3); z-index: 3; display: grid; gap: var(--space-1);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--color-bg-surface) 90%, transparent);
  font-size: var(--text-sm); color: var(--color-text-secondary); }
.mockups-strip .is-gone { display: none; }   /* the order's error line, until a save is refused */
.progress--indeterminate { position: relative; }
.progress--indeterminate > .progress__value { position: absolute; top: 0; bottom: 0; left: 0; width: 35%; animation: progress-slide 1.2s ease-in-out infinite; }
@keyframes progress-slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .progress--indeterminate > .progress__value { animation: none; width: 100%; opacity: 0.5; } }
.mockups-choose .tabs { margin-bottom: var(--space-3); border-bottom-color: transparent; }   /* #419 PR 5a: one rule under the pane tabs, not two stacked bars; the sub-tabs keep the same .tab recipe */
.mockups-choose .tabs .tab { font-weight: 500; }
.mockups-tabpanel { display: none; }
.mockups-tabpanel.is-active { display: block; }
.mockups-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--space-3); }
.mockups-tile { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-2); }
.mockups-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); background: var(--stone-100); }
.mockups-tile-name { font-size: var(--text-sm); font-weight: 600; overflow-wrap: anywhere; }   /* #351, M-A item 8 */
/* #351 (decision 6): each library photo carries a ⋯ beside its label (never inside it), over the tile's top-right corner, with its
   one-item menu; the same control on the Mockup library's cards. The Edit dialog is the app's .dialog. */
.mockups-tile-wrap { position: relative; min-width: 0; }
.mockups-tile-wrap .mockups-tile { height: 100%; }
.mockups-tile-wrap .tile-menu { position: absolute; top: var(--space-1); right: var(--space-1); }
.tile-menu { position: relative; }
.tile-menu__btn { width: 44px; min-width: 44px; height: 44px; padding: 0; background: var(--color-bg-surface); }
.tile-menu__btn svg { width: 18px; height: 18px; }
.tile-menu__list { display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 8rem; padding: var(--space-1);
  background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.tile-menu.is-open .tile-menu__list { display: block; }
.tile-menu__item { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 var(--space-3); text-align: left; background: none;
  border: 0; border-radius: var(--radius-sm); font: inherit; color: inherit; cursor: pointer; }
.tile-menu__item:hover { background: var(--color-bg-subtle); }
.tile-menu__item:focus-visible { outline: 3px solid var(--color-focus); outline-offset: -3px; }
.template-edit-thumb { display: block; width: 100%; max-height: 10rem; object-fit: contain; margin-bottom: var(--space-3); border-radius: var(--radius-sm); background: var(--stone-100); }
.template-edit-dialog .field { margin-bottom: var(--space-3); }
.template-edit-dialog .input { width: 100%; box-sizing: border-box; }
.mockups-standard form { display: contents; }
/* #374: the right panel's two tabs (Mockups, Designs), the shared tab look; the Designs tab's rows and library tiles */
.pane-tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--color-border); margin-bottom: var(--space-3); }
.mockups-pane { display: none; }
.mockups-pane.is-active { display: block; }
.mockups-pane-h { font-size: var(--text-base); margin: 0 0 var(--space-2); }
.mockups-design-list { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: var(--space-2); }
/* #1308: Add Design placement's layers, and its Undo right after; wraps at 390 */
.mockups-placement { margin: 0 0 var(--space-4); display: grid; gap: var(--space-2); justify-items: start; }
.mockups-placement__undo { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.mockups-placement .field__hint { margin: 0; }
.mockups-design-row { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; }
.mockups-design-row img { width: 44px; height: 44px; flex: none; object-fit: contain; border-radius: var(--radius-sm); background: var(--stone-100); }
.mockups-design-words { display: flex; flex-direction: column; min-width: 0; flex: 1 1 0; }
.mockups-design-row { flex-wrap: wrap; }
.mockups-design-row > form { display: contents; }
.mockups-design-row .icon-btn { width: 44px; min-width: 44px; height: 44px; padding: 0; }
.mockups-design-row .icon-btn svg { width: 16px; height: 16px; }
.mockups-design-tiles { margin-top: var(--space-3); }
.mockups-design-tile { text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--color-border); background: var(--color-bg-surface); }
.mockups-design-tile:hover { border-color: var(--color-border-strong); }
.mockups-design-tile img { object-fit: contain; }
#design-target { width: 100%; box-sizing: border-box; }
@media (max-width: 1024px) {
  .mockups-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "prod" "prev" "choose" "strip"; }
}
@media (max-width: 600px) {
  .mockups-add-btn { width: 100%; margin-left: 0; }
}

/* ---- #501 (the owner, 2026-10-18): Magic Fit, zoom on the mockup window, and the right panel in #498's treatment ---- */
/* the right panel: sticky beside the photo and the window's full height under the top bar, down to the bottom bar; its head and tab bar
   never move and only the shown tab scrolls, keeping its own scroll (static/mockups_gallery.js); a 150 ms fade, none with reduced
   motion. Stacked under the photo (1024px and narrower) it is static, at a fixed height of its own. */
.mockups-choose {
  --mockups-right-height: max(30rem, calc(100vh - var(--topbar-height) - 2 * var(--space-4) - 4.5rem));   /* 4.5rem: the bottom bar */
  position: sticky; top: calc(var(--topbar-height) + var(--space-4)); height: var(--mockups-right-height); display: flex; flex-direction: column;
}
.mockups-choose > .mockups-card-head, .mockups-choose > .pane-tabs { flex: none; }
.mockups-pane-body { flex: 1 1 auto; min-height: 0; position: relative; }
.mockups-pane.is-active { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding-right: var(--space-1); animation: layers-tab-fade 150ms ease-out; }
@media (prefers-reduced-motion: reduce) { .mockups-pane.is-active { animation: none; } }
/* four tabs in a narrow column: each shrinks to its words, a two-word name may take two lines, and all four always show */
.mockups-choose .pane-tabs { gap: 2px; flex-wrap: nowrap; justify-content: space-between; }
.mockups-choose .pane-tabs .tab { flex: 0 1 auto; min-width: 0; padding-left: var(--space-1); padding-right: var(--space-1); font-size: var(--text-sm);
  line-height: 1.15; text-align: center; overflow-wrap: normal; }
.mockups-subhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: var(--space-2); margin-bottom: var(--space-2); }
.mockups-subhead .tabs { margin-bottom: 0; }
.mockups-choose .mockups-subhead .tabs .tab { padding-left: var(--space-2); padding-right: var(--space-2); font-size: var(--text-sm); white-space: nowrap; }
.mockups-choose .mockups-tiles { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--space-2); }   /* two or three across, by width */
/* #664: This color / Group / All over the picker's grid, sticky as its filters were; the pressed chip in the selection tokens */
.filter-chips { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: var(--space-1); padding-bottom: var(--space-2);
  margin-bottom: var(--space-1); background: var(--color-bg-surface); }
.filter-chip { min-height: 40px; padding: 0 var(--space-3); font: inherit; font-size: var(--text-sm); color: inherit; cursor: pointer;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-pill); background: var(--color-bg-surface); }
.filter-chip:hover { background: var(--color-bg-subtle); }
.filter-chip:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.filter-chip[aria-pressed="true"] { border: 2px solid var(--color-selected-border); background: var(--color-selected-bg); font-weight: 600; }
.mockups-choose [data-tiles-head] { margin: var(--space-2) 0; }
.mockups-expand-btn { flex: none; min-height: 40px; padding: 0 var(--space-2); color: var(--color-brand); }
.mockups-expand-btn > svg { width: 14px; height: 14px; }
.mockups-dot { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; }
.mockups-dot circle { stroke: var(--color-border-strong); stroke-width: 1; }
.mockups-tile-fit { color: var(--color-brand); font-weight: 600; }
.mockups-tile-wrap.is-filtered, .photo-drawer-tile.is-filtered, .mockups-choose [data-tiles-head].is-filtered { display: none; }
.photo-drawer-tile { text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--color-border); background: var(--color-bg-surface); }
.photo-drawer-tile:hover { border-color: var(--color-border-strong); }
.photo-drawer-tile.is-current { border-color: var(--color-selected-border); background: var(--color-selected-bg); }
.photo-drawer select { min-height: 40px; }
@media (max-width: 1024px) {
  .mockups-choose { position: static; --mockups-right-height: 36rem; }
}
/* the Layers tab: top first, Scene among the designs */
.mockups-layer-list { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: var(--space-2); }
.mockups-layer-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.mockups-layer-row img { width: 44px; height: 44px; flex: none; object-fit: contain; border-radius: var(--radius-sm); background: var(--stone-100); }
.mockups-layer-row form { display: contents; }
.mockups-layer-row .btn-ghost { min-height: 40px; margin-left: auto; }
.mockups-layer-scene { background: var(--color-bg-subtle); border-color: var(--color-border-strong); }
.mockups-layer-row img.mockups-layer-scene__pic { object-fit: cover; }
/* the photo's toolbar: zoom always; #686: the fit's tools always (Move pressed), Save fit and Cancel once something is painted
   (static/mockup_fit.js sets .is-dirty), Remove fit on a fitted photo */
.fit-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.fit-bar__group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
.fit-bar__group.is-gone { display: none; }
.fit-bar__tools { padding: var(--space-1); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg-subtle); }
/* hidden by visibility, so its room is kept: the bar never rewraps and the photo never jumps under a stroke when they appear */
.fit-bar__save { display: inline-flex; align-items: center; gap: var(--space-1); padding-left: var(--space-2); border-left: 1px solid var(--color-border); visibility: hidden; }
.fit-bar.is-dirty .fit-bar__save { visibility: visible; }
.fit-bar__zoom { margin-left: auto; }
.fit-bar__form { display: contents; }
.fit-bar .btn-sm, .fit-bar .btn-ghost { min-height: 40px; }
.fit-bar .icon-btn { width: 40px; min-width: 40px; height: 40px; padding: 0; }
.fit-bar .icon-btn svg { width: 18px; height: 18px; }
.fit-bar [data-zoom-fit] svg { width: 14px; height: 14px; margin-right: 4px; }
.fit-bar__remove { color: var(--color-error); }
.fit-tool.is-on { background: var(--color-selected-bg); color: var(--color-brand); box-shadow: inset 0 0 0 1px var(--color-selected-border); }
.fit-brush { display: inline-flex; align-items: center; gap: var(--space-1); margin: 0 var(--space-1); font-size: var(--text-sm); color: var(--color-text-secondary); }
.fit-brush input[type=range] { width: 90px; min-height: 0; }
.fit-brush output { min-width: 2.2em; font-variant-numeric: tabular-nums; }
.fit-bar__sep { width: 1px; height: 24px; background: var(--color-border); }
.fit-hint { margin: 0 0 var(--space-2); }
/* #1075 item 4 (the owner, 13 Nov): the fit's help behind a small "?" in the bar, a <details> (the keyboard opens it; its summary
   carries the label); the words open over the photo, so opening them moves nothing */
.fit-help { position: relative; display: inline-flex; }
.layer-help { display: inline-flex; flex: none; }   /* #1333: the card's "?" (static: its words open under the card, as wide as it) */
.fit-help__q, .layer-help__q { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--color-border-strong); background: var(--color-bg-surface); color: var(--color-text-secondary); font-weight: 700;
  font-size: var(--text-sm); cursor: pointer; }
.fit-help__q::-webkit-details-marker, .layer-help__q::-webkit-details-marker { display: none; }
.fit-help__q::marker, .layer-help__q::marker { content: ""; }
.fit-help__q:focus-visible, .layer-help__q:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.fit-help[open] .fit-help__q, .layer-help[open] .layer-help__q { background: var(--color-selected-bg); color: var(--color-brand); }
.fit-help__words, .layer-help__words { position: absolute; z-index: 7; top: calc(100% + var(--space-1)); right: 0; width: min(22rem, 80vw); margin: 0; padding: var(--space-3);
  background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-popover);
  font-size: var(--text-sm); color: var(--color-text); }
.layer-help__words { top: calc(100% + var(--space-1)); left: 0; right: 0; width: auto; }
@media (max-width: 767px) {   /* a phone: the words span the fit bar, so they never run off the screen's edge */
  .fit-bar { position: relative; }
  .fit-help { position: static; }
  .fit-help__words { left: 0; right: 0; width: auto; }
}
/* the zoomed layer: the photo, the frame and the fit's canvas move together; the skeleton stays put over them (#1229: the render bar is
   under the photo now, in .photos-status) */
.pic-zoom { position: absolute; inset: 0; transform-origin: 0 0; isolation: isolate; }
/* #1229 and #1232: the stage's stacking, inside .pic-zoom only (isolate): the designs below Scene (static/photo_layers.js, 1 and up),
   then the fit's canvas (the photo in front where the fit says so, as the render puts it), then the designs above Scene (1001 and up),
   the photo's texts (static/photo_text.js, 2001 and up) and the selected layer's box (.pic-chrome). The canvas was under every layer,
   so an Erase never showed on the design until its render landed */
.pic-stage { touch-action: pan-x pan-y; }   /* one finger scrolls the page; two pinch or pan the photo (static/mockup_zoom.js) */
.pic-stage.is-zoomed, .pic-stage.is-fitting { touch-action: none; }
.pic-stage.is-pan-ready, .pic-stage.is-pan-ready * { cursor: grab !important; }
.pic-stage.is-panning, .pic-stage.is-panning * { cursor: grabbing !important; }
.mockups-preview-skeleton, .mockups-render-progress { pointer-events: none; }
.fit-canvas { position: absolute; z-index: 1000; display: none; pointer-events: none; }
.pic-stage.is-fit-overlay .fit-canvas { display: block; }
.pic-stage.is-fitting .fit-canvas { pointer-events: auto; cursor: none; touch-action: none; }
.pic-stage.is-fitting .pic-frame { pointer-events: none; }
.pic-stage.is-fitting .pic-box { display: none; }
/* #524: the brush's ring is in screen pixels (static/mockup_fit.js moves it out of the zoomed layer): a 1px dark line whose outer edge is
   the brush's painting edge, and a 1px white line just inside it, so it reads on light and dark photos and nothing sits outside the brush */
.fit-cursor { position: absolute; z-index: 2; display: none; box-sizing: border-box; border-radius: 50%; pointer-events: none; border: 1px solid rgb(0 0 0 / 75%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 90%); }
.fit-cursor.is-shown { display: block; }
/* Magic Fit's wand (the owner, 2026-10-20): a 16px glyph before the words, the button's own color (#686: drawn only with the switch on) */
.btn-wand { display: inline-flex; }
.btn-wand svg { width: 16px; height: 16px; }
/* #1264: the Beta tag on Magic Fit's button (the owner, 20 Nov), the .badge pill's size, in the selected tokens */
.magic-fit__beta { margin-left: var(--space-1); padding: 0 var(--space-1); border: 1px solid var(--color-selected-border); border-radius: var(--radius-pill);
  background: var(--color-selected-bg); color: var(--color-selected-border); font-size: var(--text-xs); font-weight: 600; line-height: 1.5;
  text-transform: uppercase; letter-spacing: 0.02em; }
[data-fit-magic][aria-busy="true"] { cursor: progress; }
/* the library's fit editor: the photo with a sample design, and the sample's picker beside it */
.fit-page__layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.fit-page__side .field { margin-bottom: var(--space-3); }
.fit-page__side .input { width: 100%; box-sizing: border-box; }
.mockups-preview-frame .fit-sample { position: absolute; width: auto; height: auto; max-width: none; object-fit: fill; opacity: 0; cursor: grab; user-select: none; -webkit-user-drag: none; touch-action: none; }
.mockups-preview-frame .fit-sample.is-ready { opacity: 1; }
@media (max-width: 900px) { .fit-page__layout { grid-template-columns: minmax(0, 1fr); } }
.template-edit-fit.is-gone, .template-edit-position.is-gone { display: none; }   /* #1513: Print position, a legacy photo's only */

/* 5e: pictured is derived; the color row states it in words. #351: the current row carries the selection look; a pictured row is plain */
.mockups-color-row { padding: 0 var(--space-3); border: 1px solid transparent; border-radius: var(--radius-md); margin-bottom: 2px; }   /* #419 PR 5a: no border on a row; a hover ground; the selected tint on the current one */
.mockups-color-row.is-current { border-color: var(--color-selected-border); background: var(--color-selected-bg); }
.mockups-color-state:not(.summary-pill--ok) { background: none; padding-right: 0; color: var(--color-text-muted); }   /* "Not in listing" is words, not a pill; only a pictured color earns the green one */
.mockups-color-name { flex: 1 1 4rem; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mockups-color-state { white-space: nowrap; }


/* ---- Copy step: the integration rail and one expanded editor (build item 6, 6b) ---- */
.copy-rail-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); margin-bottom: var(--space-2); }
.copy-rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.copy-rail-card { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3) var(--space-4); text-decoration: none; color: inherit; border: 1px solid var(--line); }
.copy-rail-card.is-selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.copy-rail-card:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.copy-rail-name { font-weight: 600; }
.copy-rail-sub { overflow-wrap: anywhere; }
.copy-editor { padding: var(--space-5); }
.copy-setup { border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); padding: var(--space-4); margin-bottom: var(--space-4); }
.copy-setup h2 { margin: 0 0 var(--space-2); font-size: var(--text-md); }
.copy-products { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.copy-products .is-active { border-color: var(--accent); font-weight: 600; }
.copy-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); }
.copy-card-head h2 { margin: 0; font-size: var(--text-lg); }
.copy-card-actions { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }   /* 7c: the preview link beside the status */
.copy-generated-line { margin: var(--space-1) 0 0; }
.copy-unlistable { color: var(--floor-red); font-weight: 600; margin: var(--space-2) 0; }
.copy-fields .field { margin-bottom: var(--space-4); }
.copy-fields .input { width: 100%; box-sizing: border-box; }
/* #233 PR B: the card above the copy. `.input` has no global width (see the note on .input above), so the card's own inputs were
   left at the browser's 20 columns, about a third of the card (the owner, on production, 6051178236): they take its full width */
.copy-inputs .input { width: 100%; box-sizing: border-box; }
.copy-inputs .field { margin-bottom: var(--space-4); }
.copy-inputs__read { margin: var(--space-2) 0 var(--space-4); }
.copy-inputs__read > summary { cursor: pointer; color: var(--color-text-secondary); font-size: var(--text-base); min-height: 44px; display: flex; align-items: center; gap: 0.25em; flex-wrap: wrap; }
.copy-inputs__open { text-decoration: underline; }
.copy-inputs__read-body { padding-top: var(--space-2); }
/* #233 PR B: per-field Regenerate beside each label, and what the last generation changed */
.summary-copy__field-regen { font-size: var(--text-sm); margin-left: var(--space-2); min-height: 44px; }
.copy-diff { margin: var(--space-2) 0; }
.copy-diff > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; width: fit-content; color: var(--color-brand); font-weight: 600; }   /* #419 PR 4a: reads as the kit's link */
.copy-diff > summary:hover { color: var(--color-brand-hover); text-decoration: underline; }
.copy-diff__field { overflow-wrap: anywhere; margin: var(--space-2) 0; }
.copy-diff__label { font-weight: 600; margin-right: var(--space-2); }
.copy-diff del { background: var(--color-error-bg); color: var(--color-text); }
.copy-diff ins { background: var(--color-success-bg); color: var(--color-text); text-decoration: none; }
.copy-diff__quiet { color: var(--color-text-muted); }   /* #528: the copy rules still broken, said quietly */
/* #1201 (the owner, 2026-11-17: "collapsed and not too much in the way ... subtle"): under the tags, one quiet line, closed; the
   kit's 44px hit row, its words small and secondary (not the brand link's bold), underlined on hover. Opened, it grows below. */
.why-tags { margin: 0; min-width: 0; }   /* a grid item of .field: the table never widens the field, so the chips never reflow */
.why-tags > summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: var(--space-1); width: fit-content; font-size: var(--text-sm); font-weight: 400; color: var(--color-text-secondary); }
.why-tags > summary:hover { color: var(--color-text); text-decoration: underline; }
.why-tags > summary::-webkit-details-marker { display: none; }
/* a drawn chevron (two borders, never a text glyph) says it opens: down when closed, up when open */
.why-tags > summary::after { content: ""; width: 6px; height: 6px; margin: 0 0 3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 150ms ease; }
.why-tags[open] > summary::after { margin-bottom: -3px; transform: rotate(-135deg); }
/* #844: "Why these tags" on the Copy card: the table scrolls inside its box at phone width, never the page */
.why-tags__wrap { overflow-x: auto; max-width: 100%; }
.why-tags__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: var(--text-sm); }
.why-tags__table th, .why-tags__table td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-border); text-align: left; }
.why-tags__table thead th { color: var(--color-text-secondary); font-size: var(--text-xs); font-weight: 600; white-space: normal; }
/* the tag cells are row headers: the global th rule's capitals and fill are reset, so each tag reads exactly as it is sent */
.why-tags__table tbody th { font-weight: 400; color: var(--color-text); text-transform: none; letter-spacing: normal; background: none; font-size: var(--text-sm); }
.why-tags__mine { color: var(--color-text-secondary); font-size: var(--text-xs); }
.why-tags__table .num { text-align: right; white-space: nowrap; }
.copy-tag { border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 2px var(--space-2); font-size: var(--text-sm); }   /* the Etsy preview's tags */
/* #368 (the owner's mockup, 2026-10-13): the tags are chips, each with an x, in one bordered box with the add box last; no echo marks */
.copy-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-bg-surface); }
.copy-chips:focus-within { border-color: var(--color-focus); box-shadow: 0 0 0 3px var(--color-focus-ring); }
.copy-chips__list { list-style: none; display: contents; }
.copy-chip { display: inline-flex; align-items: center; gap: var(--space-1); min-width: 0; max-width: 100%; padding: 0 0 0 var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-bg-subtle); font-size: var(--text-base); color: var(--color-text); }   /* #419 PR 4a: a pill, as every chip */
.copy-chip > span { overflow-wrap: anywhere; padding: var(--space-1) 0; }
.copy-chip__x { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--color-text-secondary); cursor: pointer; }
.copy-chip__x:hover { background: var(--color-bg-muted); color: var(--color-text); }
.copy-chip__x svg { width: 12px; height: 12px; }
.copy-chips__add { flex: 1 1 8rem; min-width: 8rem; min-height: 32px; border: 0; background: transparent; font: inherit; font-size: var(--text-base); color: var(--color-text); padding: 0 var(--space-1); }
.copy-chips__add:focus { outline: none; }
.copy-actions { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-3); }
.copy-actions .save-note { margin-right: auto; }
.copy-tools { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.copy-tools form { display: contents; }
@media (max-width: 834px) {
  .copy-rail { grid-template-columns: 1fr; }
  .copy-rail-head { flex-direction: column; align-items: flex-start; }
}

/* An error flash never reads as success: .flash-error existed in the lineup's markup since item 4 with no rule behind it (found 2026-09-07 on 6c's clash refusal). */
.flash.flash-error { background: var(--color-error-bg); border-color: color-mix(in srgb, var(--color-error) 35%, transparent); color: var(--color-error); }

/* Tabs / segmented control (design system: an approved workflow component; defined on first real use, 8d).
   One selected tab (aria-selected), arrow keys move between them; the panel is shown by [hidden]. */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--line); }
/* #419 PR 1: ONE tab recipe: secondary text, the brand on the selected tab, a 3 px mint indicator. .layers-tab and
   .summary-tabs__tab draw the same. */
.tab {
  position: relative; background: none; border: none; padding: var(--space-2) var(--space-3);
  font-size: var(--text-base); font-weight: 600; color: var(--color-text-secondary); cursor: pointer; min-height: var(--control-height);
}
.tab[aria-selected="true"] { color: var(--color-brand); }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: var(--space-2); right: var(--space-2); bottom: -1px;
  height: 3px; border-radius: var(--radius-pill); background: var(--color-highlight);
}
.tab:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-sm); }

/* Price band (8d): where a price sits in the owner's OWN shop, per size — p25/median/p75 and the floor on ONE axis.
   Marks are positioned by a data-driven custom property (--pos), never a class per value. */
.price-band { display: grid; gap: var(--space-3); }
.price-band h3 { margin: 0; font-size: var(--text-md); }
.price-band h3 small { display: block; font-weight: 400; color: var(--color-text-muted); font-size: var(--text-sm); }
.price-band-row { display: grid; gap: var(--space-2); padding: var(--space-2) 0; border-top: 1px solid var(--color-border); }
.price-band-label { display: flex; gap: var(--space-3); font-size: var(--text-base); color: var(--color-text-secondary); }
.price-band-axis { position: relative; height: 3.4rem; margin: var(--space-4) 0 var(--space-2); }
.price-band-axis::before { content: ""; position: absolute; left: 0; right: 0; top: 1.5rem; height: 2px; background: var(--color-border); }
.price-band-range { position: absolute; left: var(--from); width: calc(var(--to) - var(--from)); top: 1.1rem; height: 0.8rem; background: var(--color-selected-bg); border: 1px solid var(--color-selected-border); border-radius: var(--radius-sm); }
.price-band-range.is-subset { top: 1.3rem; height: 0.4rem; background: var(--accent); opacity: 0.55; border: 0; }
.price-band-mark { position: absolute; left: var(--pos); top: 0; transform: translateX(-50%); font-size: var(--text-xs); text-align: center; white-space: nowrap; color: var(--color-text-secondary); }
.price-band-mark::after { content: ""; display: block; width: 2px; height: 1.4rem; margin: 0 auto; background: currentColor; }
.price-band-mark i { display: block; font-style: normal; font-size: var(--text-xs); }
.price-band-mark.is-p25, .price-band-mark.is-p75 { color: var(--color-text-muted); }
.price-band-mark.is-median { font-weight: 600; color: var(--ink); }
.price-band-mark.is-floor { color: var(--floor-red); top: 2rem; }
.price-band-mark.is-floor::after { display: none; }
.price-band-mark.is-floor::before { content: ""; display: block; width: 2px; height: 1rem; margin: 0 auto 0.1rem; background: currentColor; }
.price-band-mark.is-this { color: var(--accent); font-weight: 700; top: 2rem; }
.price-band-mark.is-this::after { display: none; }
.price-band-mark.is-this::before { content: ""; display: block; width: 0; height: 0; margin: 0 auto 0.1rem; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid currentColor; }
.price-band-subset-n { color: var(--accent); font-weight: 600; }
.price-band-empty, .price-band-position { margin: 0; font-size: var(--text-base); color: var(--color-text-secondary); }
.price-band-row.is-empty .price-band-label { color: var(--color-text-muted); }

/* Info tip (8e): per-field ⓘ — a button that discloses one short text; keyboard-operable, never a title attribute alone. */
.tip { display: inline-block; position: relative; vertical-align: middle; }
.tip__button { width: 1.4rem; height: 1.4rem; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid var(--color-border); background: transparent; color: var(--color-text-muted); font-size: var(--text-xs); font-weight: 700; cursor: pointer; line-height: 1; }
.tip__button[aria-expanded="true"] { color: var(--ink); border-color: var(--ink); }
.tip__text { position: absolute; z-index: 5; left: 0; top: 1.7rem; width: 18rem; max-width: 80vw; padding: var(--space-2) var(--space-3); background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.12)); font-size: var(--text-sm); font-weight: 400; color: var(--color-text-secondary); }

/* Dialog (8e): the system dialog, defined on first real use — bulk edit over a selection. */
.dialog { border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); max-width: 28rem; width: calc(100vw - 2rem); background: var(--color-bg-surface); color: var(--color-text); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
.dialog h3 { margin: 0 0 var(--space-3); font-size: var(--text-lg); }
.dialog__actions { display: flex; gap: var(--space-2); justify-content: flex-end; margin-top: var(--space-4); }
/* #1070 PR 3: the layers choice carries three answers; at a phone's width they wrap, never pushed off the left edge */
[data-overwrite-choice] .dialog__actions { flex-wrap: wrap; }

/* ---- The app shell (10a): a compact top bar, the persistent left rail, the page. ----
   Widths are tokens, the modes are decided: the full rail (240 px) on management pages at >= 1024, the icon rail (56 px)
   from 768 to 1023 and on every builder page (a builder page never sits beside the FULL sidebar), and an
   off-canvas drawer below 768 behind the Menu button. The current item carries aria-current and its written label. */
:root { --rail-width: 240px; --rail-width-icons: 56px; --topbar-height: 3.25rem; }
body.app-body { padding: 0; }
.app-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--space-3); min-height: var(--topbar-height); padding: 0 var(--space-4) 0 calc(var(--space-2) + var(--space-3)); border-bottom: 1px solid var(--nav-border); background: var(--nav-bg); color: var(--nav-text); }
.app-topbar__space { flex: 1; }
.app-create-listing { white-space: nowrap; }
/* #418: on the dark bar the primary's lower gradient stop (2.13:1) merges into the green; a 1px light edge (--nav-btn-edge, 4.87:1) keeps the whole button visible, and a compact height sits it in the bar. */
.app-topbar .app-create-listing { min-height: 2.25rem; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; box-shadow: 0 0 0 1px var(--nav-btn-edge), var(--btn-shadow); font-size: 0.85rem; font-weight: 400; line-height: 1.5; }   /* #419: the dark shell keeps its approved sizes (#418); the button family's 14/600 is the page's */
.app-rail-toggle { display: none; align-items: center; gap: var(--space-2); min-height: var(--control-height); padding: 0 var(--space-3); border: 1px solid var(--nav-border); border-radius: var(--radius-md); background: transparent; color: var(--nav-text); font: inherit; cursor: pointer; }
.app-topbar :focus-visible, .app-rail :focus-visible { outline-color: var(--nav-focus); }   /* the focus ring on the dark ground */
.app-shell { display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr); min-height: calc(100vh - var(--topbar-height)); }
body[data-rail-mode="icons"] .app-shell { grid-template-columns: var(--rail-width-icons) minmax(0, 1fr); }
.app-rail { position: sticky; top: var(--topbar-height); align-self: start; min-height: calc(100vh - var(--topbar-height)); max-height: calc(100vh - var(--topbar-height)); overflow: auto; border-right: 1px solid var(--nav-border); background: var(--nav-bg); color: var(--nav-text); padding: var(--space-3) var(--space-2); display: grid; grid-template-rows: 1fr auto auto; row-gap: 0; gap: 0; }   /* #1116: a row for Coming soon between the list and the account block, the account block always in the last row, and no gap, so an empty middle row (the icon rail) leaves the block at the rail's bottom, as the real-path test pins; #418: the list takes the row above, the account block the row below, so the block sits at the rail's bottom (margin-top: auto did nothing in a start-aligned grid) */
.app-rail__shop { font-weight: 700; padding: var(--space-2) var(--space-3); border: 1px solid var(--nav-border); color: var(--nav-text); border-radius: var(--radius-md); }
.app-rail__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; align-self: start; }
.app-rail__link { display: flex; align-items: center; gap: var(--space-3); min-height: var(--control-height); padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--nav-muted); text-decoration: none; font-size: 0.95rem; position: relative; }
.app-rail__link:hover { background: var(--nav-active); color: var(--nav-text); }
.app-rail__link:focus-visible { outline: 2px solid var(--nav-focus); outline-offset: -2px; }
/* #418: the current page is the lifted fill, a mint marker on the rail's edge and a mint icon; aria-current stays the semantic carrier. */
.app-rail__link[aria-current="page"] { background: var(--nav-active); color: var(--nav-text); font-weight: 600; }
.app-rail__link[aria-current="page"]::before { content: ""; position: absolute; left: calc(-1 * var(--space-2)); top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--nav-mint); }
.app-rail__link[aria-current="page"] .app-rail__icon { color: var(--nav-mint); }
.app-rail__icon { display: inline-flex; flex: none; width: 20px; height: 20px; }
/* 8f: the account block pinned at the bottom of the full-height rail — layout only; no link, no switcher (multi-tenant is not built) */
.app-rail__account { grid-row: 3; margin-top: var(--space-2); display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3); border-top: 1px solid var(--nav-border); font-size: 0.85rem; line-height: 1.2; color: var(--nav-text); }
.app-rail__account small { color: var(--nav-muted); }
.app-rail__initials { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--nav-mint); color: var(--nav-bg); font-weight: 700; font-size: 0.8rem; flex: none; }
/* #1116: Coming soon, a native disclosure on the rail's own colors; hidden in icon mode by a class rule (never [hidden]) */
.app-rail__upcoming { align-self: end; padding: 0 var(--space-3); border-top: 1px solid var(--nav-border); color: var(--nav-text); }
.app-rail__upcoming summary { display: flex; align-items: center; min-height: var(--control-height); cursor: pointer; font-size: 0.95rem; color: var(--nav-text); border-radius: var(--radius-md); }
.app-rail__upcoming summary:focus-visible { outline: 2px solid var(--nav-focus); outline-offset: -2px; }
.app-rail__upcoming ul { list-style: none; margin: 0; padding: 0 0 var(--space-3); display: grid; gap: var(--space-3); }
.app-rail__upcoming-title { display: block; font-size: 0.875rem; }
.app-rail__upcoming-note { display: block; font-size: 0.8125rem; color: var(--nav-muted); }
.app-rail__sign-out { margin-left: auto; }   /* #257: the rail's sign-out, a POST form beside the account */
.app-rail__sign-out button { background: none; border: 0; padding: 0; color: var(--nav-muted); font: inherit; font-size: 0.8rem; text-decoration: underline; cursor: pointer; }
.status-dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: middle; background: var(--stone-500); }
.status-dot--clears { background: var(--safe-green); }
.status-dot--below { background: var(--floor-red); }
.swatch-dot { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); margin-right: 0.4rem; vertical-align: middle; }
/* #337: the icon rail exists from 768 up, so its rules do too. At every width they outranked the phone drawer's bare .app-rail: on a builder page
   the open drawer was 56 px wide unless focus sat inside it, and at the expansion's z-index 25 it lay UNDER the backdrop, so a tap on Dashboard
   blurred the link, shrank the drawer to its icons and clicked nothing. Below 768 the drawer's own rules decide, on every page. */
@media (min-width: 768px) {
  body[data-rail-mode="icons"] .app-rail__account { justify-content: center; padding: var(--space-2) 0; }
  body[data-rail-mode="icons"] .app-rail__label, body[data-rail-mode="icons"] .app-rail__shop, body[data-rail-mode="icons"] .app-rail__upcoming { display: none; }
  body[data-rail-mode="icons"] .app-rail { width: var(--rail-width-icons); padding-left: var(--space-2); padding-right: var(--space-2); transition: width 120ms ease; }
  body[data-rail-mode="icons"] .app-rail__link { justify-content: center; padding: 0; }
  /* 8g (owner's ruling): on a builder page the icon rail expands to full width on hover AND on keyboard focus, as an OVERLAY — its grid column stays 56px and the
     rail widens over the content on its own layer, so nothing reflows (a rail that pushed the page would move the colours editor's canvas under the cursor). */
  body[data-rail-mode="icons"] .app-rail:hover, body[data-rail-mode="icons"] .app-rail:focus-within { width: var(--rail-width); z-index: 25; box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.18)); padding-left: var(--space-3); padding-right: var(--space-3); }
  body[data-rail-mode="icons"] .app-rail:hover .app-rail__label, body[data-rail-mode="icons"] .app-rail:focus-within .app-rail__label,
  body[data-rail-mode="icons"] .app-rail:hover .app-rail__shop, body[data-rail-mode="icons"] .app-rail:focus-within .app-rail__shop { display: block; }
  body[data-rail-mode="icons"] .app-rail:hover .app-rail__link, body[data-rail-mode="icons"] .app-rail:focus-within .app-rail__link { justify-content: flex-start; padding: 0 var(--space-3); }
  body[data-rail-mode="icons"] .app-rail:hover .app-rail__account, body[data-rail-mode="icons"] .app-rail:focus-within .app-rail__account { justify-content: flex-start; padding: var(--space-3); }
}
/* main is a grid item: .wrap's auto margins would make it a fit-content item sized by its widest child (the colours editor's fixed canvas
   made it 1448 in a 1329 track, measured 2026-09-09), so it STRETCHES its track and centres its content with padding, never margins. */
.app-shell > main { margin: 0; max-width: none; justify-self: stretch; min-width: 0; padding: var(--space-5) max(var(--space-6), calc((100% - var(--content-max)) / 2)); }
.app-shell > main.wrap-editor, .app-shell > main.wrap-wide { padding-left: max(var(--space-6), calc((100% - var(--content-max-editor)) / 2)); padding-right: max(var(--space-6), calc((100% - var(--content-max-editor)) / 2)); }
@media (max-width: 1023px) {
  /* 8g (owner's ruling): every page that is not a builder page keeps the rail expanded — 10a's collapse to icons between 768 and 1023 is gone */
  .app-shell > main { padding: var(--space-4) var(--space-4); }
}
@media (max-width: 767px) {
  .app-shell, body[data-rail-mode="icons"] .app-shell { grid-template-columns: minmax(0, 1fr); }   /* the rail is fixed off-canvas: one column, whatever the mode (the mode rule outranks a bare selector) */
  .app-rail-toggle { display: inline-flex; }
  .app-topbar { z-index: 26; }   /* #418: above the drawer's backdrop (25), below the drawer (30): the Menu button stays crisp while the drawer is open */
  .app-rail { position: fixed; top: var(--topbar-height); bottom: 0; left: 0; width: var(--rail-width); max-height: none; z-index: 30; transform: translateX(-100%); transition: transform 160ms ease; box-shadow: none; }
  .app-rail.is-open { transform: none; box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.18)); }
  .app-rail.is-open .app-rail__label, .app-rail.is-open .app-rail__shop { display: block; }
  .app-rail.is-open .app-rail__link { justify-content: flex-start; padding: 0 var(--space-3); }
  .app-shell > main { padding: var(--space-4) var(--space-3); }
}
/* Drawer (10a): the off-canvas rail's backdrop — the system drawer, defined on first real use. */
.drawer-backdrop { position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.35); }
@media (prefers-reduced-motion: reduce) { .app-rail, body[data-rail-mode="icons"] .app-rail { transition: none; } }

/* cp32a (#32): the Create on Printify control — on the lineup card and the Colors save bar */
.printify-control{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2, 8px);margin-top:var(--space-2, 8px)}
.printify-control--compact .printify-state{font-size: var(--text-sm)}
.printify-problems{margin:var(--space-1, 4px) 0 0;padding-left:1.1rem}
.printify-problems li{margin:0}

/* cp32e (the owner, 2026-09-27): the lineup's Printify tag, its in-app dialogs and the hold while Printify creates. The hold's
   indicator is the existing .skeleton pulse (DESIGN_SYSTEM.md's loading-state language: no second keyframes). */
.printify-pill {
  display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-2); border-radius: 999px;
  background: var(--stone-100); color: var(--stone-500); font-weight: 600; font-size: var(--text-sm); margin-right: var(--space-1);
}
.printify-pill--on { background: var(--color-success-bg); color: var(--color-success); }
.lineup-create-list { padding-left: var(--space-4); margin: var(--space-2) 0 var(--space-3); }
.lineup-create-list li { margin: var(--space-1) 0; }

/* cp32f (the owner, 2026-09-27): the small loader beside "Removing from Printify" — the existing pulse, no second keyframes. */
.printify-loader {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: var(--space-1); vertical-align: middle;
  background: var(--color-selected-border); animation: pulse 1.4s var(--ease-standard) infinite;
}
@media (prefers-reduced-motion: reduce) { .printify-loader { animation: none; } }

/* V1-3 (#82; ADR-020): the listing summary page, in product cards (PR 1b; the boards Cards-summary, Cards-empty, Cards-phone).
   One column at every width: #318 removed the status rail, and #419 PR 4a removed the left section list (the owner's answer 3,
   6225866536) and the phone's Jump to (the owner, 2026-10-17: "Remove it"); each card carries its own mark, and under 768px every
   control is at least 44px tall. The column keeps the system's content width (--content-max, 1440), centered in the wide wrap, as the price block's scale requires */
.summary-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); align-items: start; max-width: var(--content-max); margin: var(--space-4) auto 0; }
.summary-state { flex: none; display: inline-flex; }
.summary-state--done { color: var(--color-success); }
.summary-state--open { color: var(--color-warning); }
.summary-state--locked { color: var(--color-text-secondary); }
.summary-main { min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.summary-group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-3); margin-top: var(--space-2); }
.summary-group-head__title { font-size: var(--text-md); margin: 0; }
.summary-section, .summary-card { background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-5) var(--space-6); scroll-margin-top: var(--space-4); }   /* #419: the card recipe */
.summary-section--locked { background: var(--color-bg-subtle); box-shadow: none; }
.summary-section__head { display: flex; align-items: flex-start; gap: var(--space-3); flex-wrap: wrap; }
.summary-section__head > .summary-state { margin-top: 3px; }
/* #294 PR B: "How buyers choose on Etsy". The dropdown preview (three closed boxes in Etsy's order, the first with its list of choices)
   beside the fields at 834px and wider; the list wraps inside the card. #367: right of them, under them below 834, sizes with prices. */
.etsy-dropdowns [data-dd-state] { display: inline-flex; margin-top: 3px; }   /* [hidden] still wins: the global rule is !important */
.etsy-dropdowns__body { display: grid; gap: var(--space-5); margin-top: var(--space-4); }
@media (min-width: 834px) { .etsy-dropdowns__body { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
/* #367 (the owner's demo, 2026-10-13): the preview is an example picture right of the fields (under them at phone width), on a tinted
   panel with an Example tag and a hint, nothing on it clickable; the list's first item carries Etsy's check as the one shown chosen */
.etsy-dd { display: grid; gap: var(--space-3); min-width: 0; margin: 0; padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  background: var(--color-bg-subtle); pointer-events: none; user-select: none; }
.etsy-dd__caption { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); font-size: var(--text-base); color: var(--color-text-secondary); }
.etsy-dd__tag { padding: 1px var(--space-2); border-radius: var(--radius-pill); background: var(--color-bg-surface); border: 1px solid var(--color-border);
  font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-secondary); }
.etsy-dd__hint { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.etsy-dd__list li:first-child { font-weight: 600; }
.etsy-dd__list li:first-child::before { content: "\2713"; margin-right: var(--space-1); }
.etsy-dd__box { display: grid; gap: var(--space-1); min-width: 0; }
.etsy-dd__label { font-size: var(--text-base); font-weight: 600; overflow-wrap: anywhere; }
.etsy-dd__select { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 44px; padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); background: var(--color-bg-surface); overflow-wrap: anywhere; }
.etsy-dd__empty { color: var(--color-text-muted); }
.etsy-dd__chevron { flex: none; color: var(--color-text-muted); }
.etsy-dd__list { list-style: none; margin: 0; padding: var(--space-1) 0; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-bg-surface); font-size: var(--text-base); box-shadow: var(--shadow-card); }
.etsy-dd__list li { padding: var(--space-1) var(--space-3); overflow-wrap: anywhere; }
.etsy-dd__count { font-variant-numeric: tabular-nums; }
/* #458 (the owner, 2026-10-16): the Size list's first two sizes and a drawn scrollbar, a track and a short thumb at its right edge. A
   picture, not a control: pseudo-elements only, nothing scrolls and nothing takes focus */
.etsy-dd__list--scroll { position: relative; padding-right: var(--space-4); }
.etsy-dd__list--scroll::before, .etsy-dd__list--scroll::after { content: ""; position: absolute; right: 4px; width: 6px; border-radius: 3px; }
.etsy-dd__list--scroll::before { top: 6px; bottom: 6px; background: var(--color-bg-muted); }
.etsy-dd__list--scroll::after { top: 6px; height: 40%; background: var(--color-border-strong); }
.etsy-dropdowns__form { display: grid; gap: var(--space-4); min-width: 0; }
.etsy-dropdowns__form .input { width: 100%; min-width: 0; }
.etsy-dropdowns__choices { border: 0; margin: 0; padding: 0; display: grid; gap: var(--space-3); min-width: 0; }
.etsy-dropdowns__choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-2) var(--space-3); }
.etsy-dropdowns__error { grid-column: 2 / -1; margin: 0; }
.etsy-dropdowns__clashes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.etsy-dropdowns__clashes:empty { display: none; }
.summary-section__titles { flex: 1 1 12rem; min-width: 0; }
.summary-section__titles p { margin: 2px 0 0; }
.summary-section__title { font-size: var(--text-lg); margin: 0; }
.summary-section__edit { margin-left: auto; }
.summary-listing h1 { margin: 0; overflow-wrap: anywhere; }
.summary-listing > .field__hint { margin: var(--space-1) 0 0; }
.summary-listing__eyebrow { margin: 0 0 var(--space-1); }
/* #419 PR 4a: the kit's quiet destructive action, a ghost in the error tone (the listing's Delete and a product's) */
.summary-listing .delete-listing, .summary-card__foot [data-product-delete] { background: transparent; border-color: transparent; }
.summary-listing .delete-listing:hover, .summary-card__foot [data-product-delete]:hover { background: var(--color-error-bg); border-color: transparent; }
/* #213: the listing's name, edited in place (static/summary.js); without scripts the form always shows */
.summary-name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.summary-name h1 { flex: 1 1 16rem; min-width: 0; }   /* #419 PR 4a: beside its done mark, the name wraps in place; Rename and Delete follow */
.summary-name > .summary-state svg { width: 20px; height: 20px; }
.summary-listing--js .summary-name h1 { cursor: pointer; }
.summary-rename { margin-top: var(--space-2); }
.summary-rename__row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.summary-rename__row .input { flex: 1 1 14rem; min-width: 0; min-height: 44px; }
.summary-rename .field__hint, .summary-rename .field__error { margin: var(--space-1) 0 0; }
/* #176: Price's tables in the Price & approve block, one per product, read only */
.summary-approve__panel { display: flex; flex-direction: column; gap: var(--space-4); padding-top: var(--space-3); }
.summary-price { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.summary-price__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.summary-price__table { font-size: var(--text-sm); }
/* #283: Change prices and Refresh costs side by side, wrapping at phone width; the cost line under them */
.summary-price__acts { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.summary-price__acts .inline-form { display: contents; }
.summary-price__cost { margin: 0; }
/* #268 PR 2a: Price's inputs in the summary's block (price.css carries the table, the controls row and the search) */
.summary-price__settings { display: grid; gap: var(--space-2); min-width: 0; }
.summary-price__settings > *, .summary-price__settings .field { min-width: 0; max-width: 100%; }   /* the profile select's 22rem gives way at phone width (it overflowed 390 by 3px) */
.summary-price__settings .field { grid-template-columns: minmax(0, 1fr); }
/* #1204 (the owner, 17 Nov): what the shipping switch did, behind one short line and a closed Details under the two selects. The short
   line stays one line tall (its words end in an ellipsis at phone width; Details always shows), and the words open OVER the tables
   below, as .fit-help's do, so opening them moves nothing. The summary is a 44 px tap target and the keyboard opens it. */
.profiles-more { position: relative; min-width: 0; font-size: var(--text-xs); color: var(--color-text-muted); }
.profiles-more__line { list-style: none; display: flex; align-items: center; gap: 0.3em; min-height: 44px; min-width: 0; cursor: pointer; white-space: nowrap; }
.profiles-more__line::-webkit-details-marker { display: none; }
.profiles-more__line::marker { content: ""; }
.profiles-more__line:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.profiles-more__short { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.profiles-more__open { flex: none; color: var(--color-brand); font-weight: 600; }
.profiles-more__words { position: absolute; z-index: 7; top: 100%; left: 0; right: 0; max-width: 40rem; padding: var(--space-3);
  background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-popover);
  font-size: var(--text-sm); color: var(--color-text); }
.profiles-more__words p { margin: 0; }
.profiles-more__words p + p, .profiles-more__words div + div { margin-top: var(--space-2); }
.summary-price { scroll-margin-top: calc(var(--topbar-height) + var(--space-4)); }   /* a save comes back at the product's table, its name in view */
.summary-price__controls--bare { padding: 0; border: 0; }   /* a TikTok table's: only its save error, hidden until a save fails */
.summary-price .disclosure { border-bottom: 0; }
.summary-srow__v .printify-skus { margin-left: 0; }   /* on a card's Printify row, under the costs, not pushed to the row's end */
.summary-srow__v .printify-skus__panel { min-width: 0; max-width: 100%; }
.summary-srow__v .printify-skus__copy { white-space: nowrap; }   /* the card's column is narrower than Price's: the word stays on one line */
/* #451 (the owner, 2026-10-16): the card's Printify row on one line, its facts dot-separated. A wrapped line starts clean: each item's
   dot sits in the gap before it, and the item that starts a line has its dot in the clipped strip left of the box (the items' wrapper
   is pulled left by one gap). The 6px padding, cancelled by the margin, keeps the SKUs toggle's focus ring inside the clip. */
.printify-line { overflow: hidden; padding: 6px; margin: -6px; }
.printify-line__items { display: flex; flex-wrap: wrap; align-items: center; row-gap: var(--space-1); margin-left: calc(-1 * var(--space-5)); }
.printify-line .printify-line__items > * { position: relative; min-width: 0; max-width: calc(100% - var(--space-5)); margin: 0 0 0 var(--space-5); }
.printify-line__items > *::before { content: "\00B7"; position: absolute; left: calc(var(--space-5) / -2); transform: translateX(-50%); color: var(--color-text-muted); font-weight: 700; }
/* #179: Copy edited in place */
.summary-copy .summary-row__main { flex: 1 1 100%; gap: var(--space-2); }
.summary-copy__fields { display: flex; flex-direction: column; gap: var(--space-5); margin-top: var(--space-3); }   /* #505: field to the next label 20px */
.summary-copy__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
/* #268 PR 1: the Copy page's functions on the summary: each tab's connection pill and the setup line for a channel not connected */
.summary-copy__setup { margin-bottom: var(--space-3); }
/* #368 (the owner's mockup, 2026-10-13): what the copy is written from beside Tips for great copy (stacked under 960px), the card's two
   actions, the Etsy tab's pill, and each field's label row with its Regenerate at the right and its counter under the box */
/* #1073 (the owner's mockup, 13 Nov): two columns from the laptop breakpoint (DESIGN_SYSTEM.md, 1024px), the generated copy on the
   left and Write Your Copy over Tips for great copy on the right; under it one column in source order: generated, Write Your Copy, Tips */
.copy-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; margin-top: var(--space-3); }
@media (min-width: 1024px) { .copy-cols { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.copy-cols__main, .copy-cols__side { min-width: 0; }
.copy-cols__side { display: flex; flex-direction: column; gap: var(--space-4); }
.copy-generated__head h3 { margin: 0; font-size: var(--text-lg); }
.copy-generated__head .field__hint { margin: var(--space-1) 0 var(--space-3); }
.copy-empty { margin: 0 0 var(--space-3); padding: var(--space-5); border: 1px dashed var(--color-border); border-radius: var(--radius-lg); background: var(--color-bg-subtle); color: var(--color-text-secondary); }
/* #1253: while copy is being written, the card's line in plain words and each row's skeleton where its title, description and tags will
   appear: the one .skeleton pulse (DESIGN_SYSTEM.md's loading-state language), static bars under reduced motion */
.copy-writing { margin: 0 0 var(--space-3); }
.copy-skeleton { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-3); }
.copy-skeleton__field { display: flex; flex-direction: column; gap: var(--space-2); }
.copy-skeleton__short { width: 60%; }
.copy-skeleton__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
@media (prefers-reduced-motion: reduce) { .copy-skeleton .skeleton { animation: none; } }
.copy-cols__side > .copy-inputs { margin-bottom: 0; padding: var(--space-5) var(--space-6); }
.copy-inputs__from { margin: 0 0 var(--space-2); font-size: var(--text-md); font-weight: 600; color: var(--color-text); }
.copy-inputs h3 { margin: 0 0 var(--space-3); font-size: var(--text-lg); }
.copy-inputs .field-label, .summary-copy .field-label { margin: 0; font-size: var(--text-md); font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--color-text); }
.copy-inputs .field-label { margin-bottom: var(--space-2); }
.copy-inputs__optional { font-weight: 400; color: var(--color-text-secondary); }
/* #505 (the owner, 2026-10-18, a screenshot marking the gaps): the Copy card on the kit's scale, used on the whole card. Label to hint
   4px; label or hint to field 8px (6 to 8); field to the next label 16 to 20; heading to its meta line 12px, a paragraph's gap, not 4.
   Text sizes and tap targets stay: a 44px control that made a row tall is pulled back with a negative margin, so its hit box stays 44px. */
.copy-inputs .copy-card-head h2, .copy-inputs .copy-card-head h3 { margin: 0; }
.copy-card-head .field__hint { margin: var(--space-3) 0 var(--space-4); }
.copy-card-head + .copy-inputs__read { margin-top: 0; }   /* its 44px summary row already centers the line 12px under the heading */
.copy-inputs__label-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); }
.copy-inputs__label-row--hinted { margin-bottom: var(--space-1); }
.copy-inputs .copy-inputs__label-row .field-label { margin: 0; }
.copy-inputs__label-row .copy-count { margin: 0; flex: none; }   /* the counter on its label's line, right-aligned */
.copy-inputs .copy-inputs__hint { margin: 0 0 var(--space-2); font-size: var(--text-sm); color: var(--color-text-secondary); }
.copy-inputs .field { margin-bottom: var(--space-5); }
.copy-count { display: block; text-align: right; margin-top: var(--space-1); font-variant-numeric: tabular-nums; }
.copy-inputs .summary-cautious { flex-wrap: nowrap; align-items: center; gap: var(--space-3); margin: var(--space-2) 0 var(--space-4); }
.copy-inputs .summary-cautious__label { font-size: var(--text-md); color: var(--color-text); cursor: pointer; }
.copy-inputs .summary-cautious .selection-check { flex: none; min-width: 32px; margin: calc(-1 * var(--space-3)) 0 calc(-1 * var(--space-3)) calc(-1 * var(--space-3)); padding-right: 0; }   /* the 44px hit area stays; the words start after the box */
.copy-inputs__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.copy-inputs__actions form { margin: 0; }
/* #780: the Copy card's status line (static/copy_editor.js): empty, it takes no space; a refusal or a failure reads in the error color */
.copy-status { margin: var(--space-2) 0 0; }
.copy-status:empty { margin: 0; }
.copy-status--error { color: var(--color-error); }
.copy-inputs__actions .copy-tools { margin: 0; padding: 0; border: 0; }
.copy-inputs__actions .summary-copy__all { flex: 1 1 16rem; display: flex; justify-content: flex-end; }
.copy-inputs__actions .btn-outline, .copy-inputs__actions .btn-primary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 0 var(--space-5); border-radius: var(--radius-md); font-weight: 600; }
.copy-inputs__actions .summary-copy__all .btn-primary { width: min(100%, 22rem); }
.copy-inputs__actions svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 599px) {   /* at phone width the two actions stack, full width, primary last as in the row */
  .copy-inputs__actions > form, .copy-inputs__actions > button { flex: 1 1 100%; }
  .copy-inputs__actions .btn-outline, .copy-inputs__actions .btn-primary, .copy-inputs__actions .summary-copy__all .btn-primary { width: 100%; }
  .copy-cols__side > .copy-inputs { padding: var(--space-4); }
  .copy-chips { padding: var(--space-2); gap: var(--space-1); }
  .copy-chip { padding-left: var(--space-2); font-size: var(--text-sm); }
  .copy-chip__x { width: 28px; height: 28px; }
}
.copy-tips { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-bg-subtle); }
.copy-tips > summary { list-style: none; display: flex; align-items: center; gap: var(--space-3); min-height: 56px; padding: var(--space-3) var(--space-5); cursor: pointer; font-weight: 700; font-size: var(--text-lg); color: var(--color-text); }
.copy-tips > summary::-webkit-details-marker { display: none; }
.copy-tips__icon { display: inline-flex; color: var(--color-warning); }
.copy-tips__icon svg, .copy-tips__chevron svg { width: 20px; height: 20px; }
.copy-tips__title { flex: 1; }
.copy-tips__chevron { display: inline-flex; color: var(--color-text-secondary); transition: transform 150ms var(--ease-standard, ease); }
.copy-tips[open] .copy-tips__chevron { transform: rotate(180deg); }
.copy-tips__list { list-style: none; margin: 0; padding: 0 var(--space-5) var(--space-3); }
.copy-tips__list li { display: flex; gap: var(--space-4); padding: var(--space-4) 0; border-top: 1px solid var(--color-border); }
.copy-tips__list li:first-child { border-top: 0; padding-top: var(--space-1); }
.copy-tips__badge { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--color-selected-bg); color: var(--color-brand); }
.copy-tips__badge svg { width: 22px; height: 22px; }
.copy-tips__name { margin: 0 0 var(--space-1); font-size: var(--text-md); font-weight: 600; }
.copy-tips__list p { margin: 0; font-size: var(--text-base); line-height: 1.5; color: var(--color-text-secondary); }
.summary-tabs__tab { display: inline-flex; align-items: center; gap: var(--space-2); }
.summary-tabs__pill { display: inline-flex; align-items: center; padding: 2px var(--space-2); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 600; background: var(--color-bg-subtle); color: var(--color-text-secondary); }
.summary-tabs__pill--connected { background: var(--color-selected-bg); color: var(--color-brand); }
.summary-tabs__pill--sandbox { background: var(--color-warning-bg); color: var(--color-warning); }
.summary-tabs__pill--reconnect { background: var(--color-warning-bg); color: var(--color-warning); }   /* #711: Etsy no longer accepts the connection */
.app-rail__etsy { color: inherit; }   /* #711: the rail's Etsy line, a link to Settings when it is not connected */
.summary-copy__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-3); margin-top: var(--space-3); }
.summary-copy__name { margin: 0; font-size: var(--text-lg); }
.summary-copy__preview { font-size: var(--text-base); color: var(--color-brand); min-height: 44px; display: inline-flex; align-items: center; }
.summary-copy__label-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
/* #505: the heading's meta line and each field's hint on the same scale (label to hint 4px, hint to field 8px), the field's grid gap
   dropped so the margins say it, and the 44px Regenerate and Preview controls pulled back so they no longer stretch their rows */
.summary-copy .field { gap: 0; }
.summary-copy__head .summary-copy__preview { margin-block: -8px; }
.summary-copy__label-row:has(+ .summary-copy__field-hint) { margin-bottom: var(--space-1); }
.summary-copy .summary-copy__field-hint { margin: 0 0 var(--space-2); font-size: var(--text-sm); }
.summary-copy .summary-copy__meta { margin: 0; }
.summary-copy__notes { display: contents; }   /* #780: a box for the in-place refresh only; its notes flow as they did */
.summary-copy .copy-count { margin-top: var(--space-1); }
.summary-copy__label-row .summary-copy__field-regen { margin: -12px 0; position: relative; z-index: 1; }   /* #419 PR 4a: the kit's small ghost button with its icon; #505: its 44px box overlaps the row's edges so the row is the label's height */
.summary-copy__field-regen svg { width: 16px; height: 16px; flex: none; }
.summary-copy__tag-count { font-weight: 400; color: var(--color-text-secondary); }
.summary-copy .copy-title { resize: vertical; min-height: 3.5rem; }
.summary-copy__actions { justify-content: flex-end; }
/* #460 (the owner, 2026-10-16: no Save, "removing some of that blank space too"): each field saves as she goes, so the card's Save row is
   gone (it shows only under noscript). The fields are spaced by the column's gap alone, and "What changed" sits right under the tags.
   The card's one note (Saving…, Saved) sits in the head row in a space held for it, so it never moves the page. */
.summary-copy__fields .field { margin-bottom: 0; }
.summary-copy .copy-diff { margin: 0; }
.summary-copy__field-form { display: none; }   /* each holds hidden fields only, posted by its button's form=; no gap of its own in the column */
.summary-copy .tag-hints:empty { margin: 0; }
.summary-copy .field__error { margin: 0; }   /* empty until a refusal: no height, so the field never jumps on a save */
.summary-copy__saved { margin-left: auto; min-width: 4.5em; min-height: 1.4em; text-align: right; font-size: var(--text-sm); color: var(--color-text-secondary); }
.summary-card { display: flex; flex-direction: column; scroll-margin-top: var(--space-4); }
.summary-card--off { border-color: var(--color-warning); }
.summary-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); }
.summary-card__name { display: flex; flex-direction: column; gap: 2px; flex: 1 1 10rem; min-width: 0; overflow-wrap: anywhere; }
.summary-card__name h3 { margin: 0; font-size: var(--text-lg); }
.summary-srow { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: var(--space-2) var(--space-4); align-items: start; padding: var(--space-3) 0; border-top: 1px solid var(--color-border); scroll-margin-top: var(--space-4); }
.summary-srow__k { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-secondary); padding-top: 2px; }
.summary-srow__v { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; overflow-wrap: anywhere; }
.summary-srow--waiting { background: var(--color-warning-bg); }
.summary-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
/* #660: a failed Printify update is one line, as "sending" is, so the card's poll reload keeps her place (#489, #659) */
.printify-update[data-state="failed"] { display: flex; flex-wrap: nowrap; align-items: center; width: 100%; contain: inline-size; }   /* its long words never widen the card */
.printify-update[data-state="failed"] [data-printify-update-line] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.printify-retry { flex: none; margin-block: -12px; padding: 0; border: 0; background: none; color: var(--color-brand); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.printify-retry:hover { color: var(--color-brand-hover); }
.printify-retry:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.printify-retry:disabled { color: var(--color-text-muted); text-decoration: none; cursor: not-allowed; }
.summary-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--color-brand); color: #fff; font-size: var(--text-xs); font-weight: 700; }
.summary-badge--open { background: var(--color-bg-surface); color: var(--color-brand); border: 2px solid var(--color-brand); }
/* PILLS (#419 PR 1): one family, tones by role. .summary-pill is its alias; .margin-pill and the numbered .summary-badge are its
   two specializations. --gray was used by two templates (the locked provider, Sandbox) and defined nowhere. */
.pill, .summary-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 2px var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 600; line-height: 1.3; white-space: nowrap; background: var(--color-bg-subtle); color: var(--color-text-secondary); }
.pill--ok, .summary-pill--ok { background: var(--color-success-bg); color: var(--color-success); }
.pill--warn, .summary-pill--warn { background: var(--color-warning-bg); color: var(--color-warning); }
.pill--error, .summary-pill--error { background: var(--color-error-bg); color: var(--color-error); }
.pill--info { background: var(--color-info-bg); color: var(--color-info); }
.pill--brand { background: var(--color-selected-bg); color: var(--color-brand); }
.pill--gray, .summary-pill--gray { background: var(--color-bg-muted); color: var(--color-text-secondary); }
.pill--outline { background: transparent; border: 1px solid var(--color-border-strong); }
.pill--sm { min-height: 20px; padding: 0 var(--space-2); }
.pill--upper { text-transform: uppercase; letter-spacing: 0.05em; }
.pill > i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.summary-pill--shared { color: var(--color-text); }
.summary-pill[data-provider-locked] { white-space: normal; max-width: 100%; }   /* #268 PR 2b: a sentence, not a status word; at 834 it wraps inside the card instead of running 22 px past the window */
.summary-lock { display: flex; align-items: center; gap: var(--space-2); color: var(--color-text-secondary); margin: 0; }
.summary-lock__icon { flex: none; }
.summary-missing { color: var(--color-warning); }
/* #963: a Failed tile's reason, clamped to two lines (the whole of it in its title) */
.summary-missing--clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.summary-act { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 var(--space-4); white-space: nowrap; text-decoration: none; }
/* #304: a product's Delete, last on its card, at the right; a refused line or a keyless refusal reads beside it */
.summary-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2) var(--space-3); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.summary-card__foot .field__hint { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
/* PR 3: the lineup's Printify control in a card's Printify row; its Try again is a 44px target like every summary action */
.summary-srow__v .printify-control { margin-top: 0; }
.summary-srow__v .printify-control button { min-height: 44px; align-self: flex-start; }
.summary-colors { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.summary-colors__main { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.summary-thumb { width: 64px; height: 64px; flex: none; object-fit: contain; border-radius: var(--radius-sm); background: var(--color-bg-subtle); }
.summary-swatches { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-size: var(--text-sm); }
.summary-swatches li { display: inline-flex; align-items: center; gap: var(--space-1); }
.summary-swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.16); flex: none; }
.summary-add { display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 72px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-bg-surface); color: var(--color-brand); font-weight: 600; text-decoration: none; scroll-margin-top: var(--space-4); }
.summary-add--start { flex-direction: column; min-height: 132px; border: 2px dashed var(--color-warning); }
.summary-add .field__hint { color: var(--color-text-secondary); font-weight: 500; }   /* the board Cards-empty: the hint is gray, not the link's teal */
.summary-card-locks { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--space-3); font-size: var(--text-base); }
.summary-card-locks li { display: flex; flex-direction: column; gap: 2px; }
/* #768 (the owner, 2026-10-29): the Next step card, full width, the heading, one line, the button under them (left-aligned with the text),
   then the product list folded in a <details> */
.summary-create { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-4) var(--space-5); border: 1px solid var(--color-brand); border-radius: var(--radius-lg); background: var(--color-bg-surface); }
.summary-create > p { margin: 0; }
.summary-create__act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-1); }   /* #741: the button and its reason */
.summary-create__btn { min-height: 52px; padding-inline: var(--space-6); font-size: var(--text-lg); }
.summary-create__list { font-size: var(--text-base); color: var(--color-text-secondary); }
.summary-create__list summary { cursor: pointer; }
.summary-create__list ul { margin: var(--space-2) 0 0; padding-left: var(--space-5); }
.summary-create__hide, .summary-create__list[open] .summary-create__show { display: none; }
.summary-create__list[open] .summary-create__hide { display: inline; }
.summary-tiles { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: var(--space-3); }
.summary-tile { display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--text-sm); color: var(--color-text-secondary); min-width: 0; }
.summary-tile__img { display: flex; align-items: center; justify-content: center; width: 100%; height: 88px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-border); background: var(--color-bg-subtle); }
.summary-tile__img--waiting { border-style: dashed; padding: var(--space-2); text-align: center; }
/* #344: the summary's held tile (data-hold) is amber, ground, border and words; the Mockups page's waiting tile (no data-hold) is unchanged */
.summary-tile[data-hold] .summary-tile__img--waiting { background: var(--color-warning-bg); border-color: var(--color-warning); color: var(--color-warning); }
.summary-rows { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.summary-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); padding: var(--space-2) 0; border-top: 1px solid var(--color-border); }
.summary-row:first-child { border-top: none; }
.summary-row__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.summary-tabs { margin-top: var(--space-2); }
.summary-tabs__list { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--color-border); }
.summary-tabs__tab { position: relative; min-height: 44px; background: none; border: none; padding: 0 var(--space-3); font: inherit; font-weight: 600; color: var(--color-text-secondary); cursor: pointer; }
.summary-tabs__tab[aria-selected="true"] { color: var(--color-brand); }
.summary-tabs__tab[aria-selected="true"]::after { content: ""; position: absolute; left: var(--space-2); right: var(--space-2); bottom: -1px; height: 3px; border-radius: var(--radius-pill); background: var(--color-highlight); }   /* #419: the one tab recipe */
.summary-prices { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: var(--space-2) 0 0; }
.summary-prices div { display: flex; gap: var(--space-1); }
.summary-prices dt { color: var(--color-text-secondary); }
.summary-prices dd { margin: 0; font-variant-numeric: tabular-nums; }
.summary-cautious { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-3); }
.summary-cautious__label { display: flex; gap: var(--space-2); align-items: flex-start; }
/* #268 PR 2b (#318, 2026-10-09): a channel's status words and its Preview, which the removed right rail showed, as its head line */
.summary-approve__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1) var(--space-3); margin: 0 0 var(--space-2); }
.summary-approve__status { font-weight: 600; }
.summary-tile .summary-inline { flex-wrap: nowrap; }
.summary-channel .summary-srow__act { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.summary-channel .summary-srow__act form { margin: 0; }
.summary-channel__lines { margin: 0; padding-left: var(--space-5); }
.summary-channel__action { list-style: none; margin: var(--space-1) 0 var(--space-2); }   /* #1033 PR 1: Update on Printify under its line, no bullet */
/* #454: a Publish refusal line links its fix; a refused Publish is aria-disabled (static/summary.js) and reads as the disabled button;
   the control a jump lands on is outlined in amber, the kit's warning token, with its tint, until she edits it */
.summary-refusal { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.summary-refusal:hover { color: var(--color-warning); }
.summary-channel [data-publish-open][aria-disabled="true"] { cursor: not-allowed; background: var(--color-disabled-bg); border-color: var(--color-disabled-border); color: var(--color-disabled-text); box-shadow: none; filter: none; }
.refusal-jump, .refusal-jump:focus, .refusal-jump:focus-visible { outline: 2px solid var(--color-warning); outline-offset: 2px; background-color: var(--color-warning-bg); scroll-margin: var(--space-6); }
:is(.input, .select, .textarea).refusal-jump, :is(.input, .select, .textarea).refusal-jump:focus-visible { border-color: var(--color-warning); box-shadow: 0 0 0 1px var(--color-warning), 0 0 0 4px color-mix(in srgb, var(--color-warning) 22%, transparent); }
.summary-channel [data-push-link] { align-self: flex-start; white-space: normal; }
@media (max-width: 767px) {
  .summary-page { gap: var(--space-4); }
  .summary-section, .summary-card, .summary-create { padding: var(--space-4); }
  .summary-srow { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .summary-srow__act:empty { display: none; }
  .summary-section__edit { margin-left: 0; }
  .summary-create, .summary-create__act { align-items: stretch; }
  .summary-create .summary-act { width: 100%; }
  .summary-channel .summary-srow__act { justify-content: flex-start; }
  .summary-approve__preview { display: inline-flex; align-items: center; min-height: 44px; }
}

/* V1-4 (#83): the dashboard. The start card (Build listing, the "or" divider, the describe form, wired by #84 PR A), then
   Listings, Needs attention and Channels: three columns from 1024, two from 768, one below; every state in words. */
.dashboard-start { align-items: center; text-align: center; gap: var(--space-2); }
.dashboard-start__build { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: var(--space-2) var(--space-6); font-size: var(--text-md); }
.dashboard-start .field__hint { margin: 0; }
.dashboard-or { display: flex; align-items: center; gap: var(--space-3); width: 100%; max-width: 36rem; margin: var(--space-2) 0; color: var(--color-text-muted); font-size: var(--text-base); }
.dashboard-or::before, .dashboard-or::after { content: ""; flex: 1 1 auto; border-top: 1px solid var(--color-border); }
.dashboard-describe { width: 100%; max-width: 36rem; text-align: left; display: flex; flex-direction: column; gap: var(--space-2); }
.dashboard-describe .field__hint, .dashboard-describe__error { margin: 0; }
.dashboard-describe__error { font-size: var(--text-base); font-weight: 600; color: var(--color-error); }
.dashboard[data-describe="typing"] .dashboard-cards { display: none; }   /* #84: typing leaves the box alone (static/describe.js) */
.dashboard-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); margin-top: var(--space-4); align-items: start; }
.dashboard-card h2 { margin: 0 0 var(--space-2); font-size: var(--text-lg); }
.dashboard-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dashboard-list > li { border-top: 1px solid var(--color-border); }
.dashboard-list > li:first-child { border-top: none; }
.dashboard-row, .dashboard-attention, .dashboard-channel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1) var(--space-3); min-height: 44px; padding: var(--space-2) 0; }
.dashboard-row { color: inherit; text-decoration: none; }
.dashboard-row:hover .dashboard-row__title { text-decoration: underline; }
.dashboard-row__title { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.dashboard-row__word { font-size: var(--text-base); color: var(--color-text-secondary); }
.dashboard-listing { display: flex; align-items: center; gap: var(--space-3); }   /* #276: the row's link, then its Delete */
.dashboard-listing > .dashboard-row { flex: 1; min-width: 0; }
.delete-dialog__stays { margin: var(--space-3) 0 var(--space-2); }
.delete-dialog__list { margin: 0 0 var(--space-2); padding-left: 1.25rem; overflow-wrap: anywhere; }
/* #86 PR B: Publish to Etsy's dialog: what will go, Hide in store, the outcome's sentence */
.publish-dialog { max-height: calc(100vh - 2rem); overflow-y: auto; }
.publish-dialog__what { margin: 0 0 var(--space-3); display: grid; gap: var(--space-2); font-size: var(--text-base); }
.publish-dialog__what > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: var(--space-2); }
.publish-dialog__what dt { color: var(--color-text-secondary); }
.publish-dialog__what dd { margin: 0; overflow-wrap: anywhere; }
.publish-dialog__list { margin: 0; padding-left: 1.1rem; }
.publish-dialog__hide { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; font-weight: 600; }
.publish-dialog__hide input { width: 1.25rem; height: 1.25rem; }
@media (max-width: 479px) { .publish-dialog__what > div { grid-template-columns: minmax(0, 1fr); gap: 0; } }
/* #462: the Publish progress dialog (the owner's approved mockup, 2026-10-16, in the kit: .dialog, .btn, .btn-outline, .progress). A
   checklist: the step under way turns, photos n of N with the kit's bar, a failed step amber with its reason in words (never color
   alone), Done with Preview on Etsy. Reduced motion stops the turning and the bar's slide. */
.progress-dialog { max-height: calc(100dvh - 2rem); overflow-y: auto; }
/* #507 (the owner, 2026-10-18: "jumpy"): nothing in the dialog changes size while it runs. It sits at a fixed top, not centered, so a
   change below the rows (the buttons at the end) never moves them; the heading is one line; every row has the same fixed height, with
   its detail line reserved (photos n of N and the bar side by side, or a failed step's reason on one line, said in full in the status
   below); the status line has a fixed height of its own. While it is open the page behind it is frozen (html.publish-frozen, from
   static/publish_progress.js): body scroll is locked, and the scrollbar's gutter is kept on every page that has the dialog, so the
   page never shifts sideways as it opens. */
html:has(dialog[data-publish-progress]) { scrollbar-gutter: stable; }
html.publish-frozen { overflow: hidden; }
.progress-dialog[open] { margin: max(1rem, 8vh) auto auto; max-height: calc(100dvh - max(1rem, 8vh) - 1rem); scrollbar-gutter: stable; }
.progress-dialog h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-dialog__sub { margin: 0 0 var(--space-3); color: var(--color-text-secondary); font-size: var(--text-sm); }
.progress-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.progress-step { box-sizing: border-box; height: calc(3.5rem + 2px); display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: var(--space-3); align-items: center; padding: var(--space-2) var(--space-3); border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--color-text-muted); }
.progress-step__body { min-width: 0; }
.progress-step__label { height: 1.25rem; line-height: 1.25rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-step--done { color: var(--color-text); }
.progress-step--active { background: var(--color-bg-subtle); color: var(--color-text); }
.progress-step--active .progress-step__label { font-weight: 600; }
.progress-step--failed { background: var(--color-warning-bg); border-color: color-mix(in srgb, var(--color-warning) 35%, transparent); color: var(--color-text); }
.progress-step--failed .progress-step__label { font-weight: 600; color: var(--color-warning); }
.progress-step__icon { box-sizing: border-box; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--color-border); font-size: var(--text-sm); font-weight: 700; line-height: 1; color: white; }
.progress-step--active .progress-step__icon { border-top-color: var(--color-highlight); animation: progress-spin 0.9s linear infinite; }
.progress-step--done .progress-step__icon { background: var(--color-highlight); border-color: var(--color-highlight); }
.progress-step--failed .progress-step__icon { background: var(--color-warning); border-color: var(--color-warning); }
@keyframes progress-spin { to { transform: rotate(360deg); } }
.progress-step__detail { display: flex; align-items: center; gap: var(--space-2); height: 1.25rem; line-height: 1.25rem; font-size: var(--text-sm); min-width: 0; }
.progress-step__count { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.progress-step__bar { flex: 1 1 auto; width: auto; height: 6px; }
.progress-step__bar > .progress__value { width: 0; background: var(--color-highlight); transition: width 0.4s ease; }
.progress-step--failed .progress-step__bar > .progress__value { background: var(--color-warning); }
.progress-step__reason { min-width: 0; color: var(--color-warning); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-dialog__status { margin: var(--space-3) 0 0; height: 5rem; line-height: 1.25rem; overflow-y: auto; font-size: var(--text-sm); color: var(--color-text-secondary); }
.progress-dialog__actions { flex-wrap: wrap; }
/* #613: what the Publish click approved since the earlier approval, below the status line so the rows never move */
.progress-dialog__notice { display: block; margin: var(--space-3) 0 0; max-height: 8rem; overflow-y: auto; }
.progress-dialog__notice-head { margin: 0; font-weight: 600; }
.progress-dialog__notice-list { margin: var(--space-1) 0 0; padding-left: 1.25rem; overflow-wrap: anywhere; }
.btn.progress-dialog__fix { background: var(--color-warning); box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .progress-step--active .progress-step__icon { animation: none; border-color: var(--color-highlight); background: var(--color-bg-subtle); }
  .progress-step__bar > .progress__value { transition: none; }
}
.dashboard-attention { flex-direction: column; align-items: flex-start; }
.dashboard-attention__text { font-size: var(--text-base); color: var(--color-text-secondary); overflow-wrap: anywhere; }
.dashboard-attention a, .dashboard-channel a, .dashboard-card__foot a { display: inline-flex; align-items: center; min-height: 44px; }
.dashboard-card__foot { margin: var(--space-2) 0 0; font-size: var(--text-base); }
@media (max-width: 1023px) {
  .dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .dashboard-cards { grid-template-columns: minmax(0, 1fr); }
}
/* #419 PR 2: the dashboard in the component kit. The row of four figures (the owner's answer 2): quiet cards, an eyebrow label, the
   figure in the display face, a muted line under it; four across from 1024, two below. The cards' heads carry their count as a pill;
   a listing's state is a pill; the empty states are the kit's inline one. */
.dashboard-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.dashboard-stat { display: grid; align-content: start; gap: var(--space-1); margin: 0; padding: 14px var(--space-4); min-width: 0; }
.dashboard-stat__label { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-secondary); }
.dashboard-stat__value { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--color-text); }
.dashboard-stat__value--warn { color: var(--color-warning); }
.dashboard-stat__sub { font-size: var(--text-xs); color: var(--color-text-muted); overflow-wrap: anywhere; }
@media (max-width: 1023px) { .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dashboard-card .card__head h2 { font-size: var(--text-lg); }
.dashboard-card .card__head { margin-bottom: var(--space-2); }
.dashboard-row .pill.dashboard-row__word { font-size: var(--text-xs); }
.dashboard-row:hover .dashboard-row__title { text-decoration: none; color: var(--color-brand); }
.dashboard-attention .btn-sm, .dashboard-channel .btn-sm { min-height: 44px; }
.dashboard-card__foot { padding-top: var(--space-2); border-top: 1px solid var(--color-border); }
.dashboard-card .empty-state--inline { display: block; padding: var(--space-3); font-size: var(--text-sm); }

/* #419 PR 2: a row's ⋯ menu (templates/_delete_button.html's row_menu; static/shell.js opens it). A 44 px ghost button with the
   three-dot icon; the list drops below it at the right edge, the popover recipe; Delete is its danger item, 44 px tall. */
.row-menu { position: relative; flex: none; }
.row-menu__toggle { width: 44px; min-width: 44px; padding: 0; }
.row-menu__toggle[aria-expanded="true"] { background: var(--color-bg-muted); color: var(--color-text); }
.row-menu__list { position: absolute; top: calc(100% + var(--space-1)); right: 0; z-index: 20; min-width: 11rem; padding: var(--space-1);
  background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-popover); }
.row-menu__item { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--color-text); font: inherit; font-size: var(--text-base); font-weight: 600; text-align: left; cursor: pointer; }
.row-menu__item:hover, .row-menu__item:focus-visible { background: var(--color-bg-subtle); }
.row-menu__item--danger { color: var(--color-error); }
.row-menu__item--danger:hover, .row-menu__item--danger:focus-visible { background: var(--color-error-bg); }

/* V1-5 (#84 PR A): a description's page. The text, then reading / what I picked up / the failure, each in words. */
.describe-page { display: flex; flex-direction: column; gap: var(--space-4); max-width: 48rem; }
.describe-card h2 { margin: 0 0 var(--space-2); font-size: var(--text-lg); }
.describe-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.describe-links, .describe-actions { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; margin: var(--space-2) 0 0; }
.describe-links a { display: inline-flex; align-items: center; min-height: 44px; }
.describe-links { gap: var(--space-2); margin-top: var(--space-3); }   /* #419 PR 2: two buttons now, the kit's gap between them */
.describe-actions .btn { min-height: 44px; }
.describe-actions form { margin: 0; }
.describe-status { margin: 0; font-weight: 600; }
.describe-status--failed { color: var(--color-error); overflow-wrap: anywhere; }
/* #459 (the owner, 2026-10-16: "ask, but make sure it looks nice"): Couldn't place is one amber block, the warning style of #344's
   held tile (ground, border and words): the heading with Edit description beside it, then one tidy list, a row per line, a line's
   hint of how to say it under it in the secondary text color. The links keep 44px targets; at phone width the head wraps. */
.describe-unplaced { margin: var(--space-3) 0 0; padding: var(--space-2) var(--space-3) var(--space-3); border: 1px solid var(--color-warning); border-radius: var(--radius-md); background: var(--color-warning-bg); }
.describe-unplaced__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--space-4); }
.describe-unplaced__head a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--color-brand); }
.describe-unplaced__head a:hover { color: var(--color-brand-hover); }
.describe-unplaced__head { padding-bottom: var(--space-1); }   /* #419 PR 2: Edit description is the outline button; a little air under it */
.describe-unmatched-h { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0; font-size: var(--text-md); color: var(--color-warning); }
.describe-unplaced__icon { display: inline-flex; flex: none; }
.describe-unplaced__icon svg { width: 18px; height: 18px; }
.describe-unmatched { margin: 0; padding: 0; list-style: none; }
.describe-unplaced__item { padding: var(--space-2) 0 var(--space-2) calc(18px + var(--space-2)); border-top: 1px solid color-mix(in srgb, var(--color-warning) 30%, transparent); overflow-wrap: anywhere; }
.describe-unplaced__item:first-child { border-top: none; }
.describe-unplaced__hint { display: block; margin-top: 0.125rem; font-size: var(--text-base); color: var(--color-text-secondary); }
.describe-next { margin: var(--space-3) 0 0; font-weight: 600; color: var(--color-text-secondary); }
/* #1335 (the owner, 2026-11-23): Build draft listing's chooser when more than one design was described, the app's .dialog box, a little
   wider. Several products: two choices as full-width buttons, a title and its line each. Every control is 44px; the actions wrap at
   phone width, so nothing scrolls sideways at 390. */
.describe-choose { max-width: 32rem; }
.describe-choose p { margin: 0 0 var(--space-3); overflow-wrap: anywhere; }
.describe-choose__form { margin: 0; }
.describe-choose__options { display: grid; gap: var(--space-2); }
.describe-choose__option { display: block; width: 100%; min-height: 44px; padding: var(--space-2) var(--space-3); text-align: left; font: inherit; color: var(--color-text); background: var(--color-bg-surface); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); }
/* #1380: each choice's own buttons, a Keep per product on the Multi-Design choice; 44 px and wrapping at 390 */
.describe-choose__keeps { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.describe-choose__keeps > button { min-height: 44px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.describe-several { margin: var(--space-3) 0 0; }
.describe-choose__option-title { display: block; font-weight: 600; }
.describe-choose__option-hint { display: block; margin-top: 0.125rem; color: var(--color-text-secondary); overflow-wrap: anywhere; }
.describe-choose__actions { flex-wrap: wrap; align-items: center; }
.describe-choose__actions > * { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.describe-choose .field__hint { margin: var(--space-3) 0 0; }

/* #383 (the owner's mockup, 2026-10-14), three things from it only. 1: the dashboard's describe box is one bordered box, Send its
   round dark-green arrow button at the bottom right, in its own column so her text never runs under it. 2: "What I picked up" is a
   bordered list, a row each: an icon, the label, the values as pills on the right (colors with a swatch dot). 3: while reading,
   skeleton rows in that list's shape, drawn with the app's one .skeleton pulse, still under reduced motion. */
.dashboard-describe__box { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-2); padding: var(--space-2); border: 1px solid var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-bg-surface); }
/* The box is the one outline, focused or not (the owner, 2026-10-14: "I don't like the double outline for the text box"): the textarea
   draws no border, ring or resize grip of its own, and focus shows on the box, as .copy-chips does: the focus color on its border plus a
   1px edge in the same color (a 2px solid edge, plainly visible) and the app's soft focus ring. Send keeps its own 3px ring. */
.dashboard-describe__box:focus-within { border-color: var(--color-focus); box-shadow: 0 0 0 1px var(--color-focus), 0 0 0 4px var(--color-focus-ring); }
.dashboard-describe__box textarea { min-width: 0; min-height: 4.5rem; padding: var(--space-1) var(--space-2); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-text); resize: none; }
.dashboard-describe__box textarea:focus, .dashboard-describe__box textarea:focus-visible { outline: none; box-shadow: none; }
.dashboard-describe__send { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: var(--radius-pill); background: var(--color-brand); color: white; cursor: pointer; transition: background-color 150ms var(--ease-standard); }
.dashboard-describe__send:hover { background: var(--color-brand-hover); }
.dashboard-describe__send:active { background: var(--color-brand-pressed); }
.dashboard-describe__send svg { width: 20px; height: 20px; }
.describe-rows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.describe-row, .describe-skeleton__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); min-height: 2.75rem; padding: var(--space-2) var(--space-3); border-top: 1px solid var(--color-border); }
.describe-row:first-child, .describe-skeleton__row:first-child { border-top: none; }
.describe-row dt { display: inline-flex; align-items: center; gap: var(--space-3); font-weight: 600; }
.describe-row__icon { display: inline-flex; flex: none; color: var(--color-text-secondary); }
.describe-row__icon svg { width: 18px; height: 18px; }
.describe-row dd { flex: 1 1 14rem; min-width: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-1) var(--space-2); text-align: right; overflow-wrap: anywhere; }
.describe-row dd > .field__hint { flex-basis: 100%; margin: 0; }
.describe-row__note { font-size: var(--text-base); color: var(--color-text-secondary); }
.describe-pills, .describe-pill-group { display: flex; flex-wrap: wrap; align-items: center; justify-content: inherit; gap: var(--space-1) var(--space-2); }
.describe-pills { list-style: none; margin: 0; padding: 0; }
.describe-pill-group { flex-basis: 100%; }
.describe-pill-group__name { font-size: var(--text-base); color: var(--color-text-secondary); }
.describe-guess { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-1) var(--space-2); }   /* #473 */
.describe-guess__text { flex-basis: 100%; margin: 0; }
.describe-guess__form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.describe-guess__form .select { width: auto; max-width: 100%; }
.summary-best-match { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.summary-best-match__keep { display: inline; margin: 0; }
.describe-pill { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 1.75rem; padding: 0.125rem var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-bg-subtle); font-size: var(--text-base); text-align: left; }
.describe-swatch { flex: none; width: 0.875rem; height: 0.875rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(16 36 31 / 18%); }   /* #419 PR 2: a hairline inside the dot, not a ring that reads as a radio button */
.describe-skeleton .skeleton { min-height: 0; }   /* #476: the list sits right under the heading, where the read card's list sits */
.describe-skeleton__icon { flex: none; width: 18px; height: 18px; }
.describe-skeleton__label { width: 7rem; height: 0.875rem; margin-right: auto; }
.describe-skeleton__pills { display: flex; gap: var(--space-2); margin-left: auto; }
.describe-skeleton__pill { width: 4.5rem; height: 1.75rem; border-radius: var(--radius-pill); }
.describe-skeleton__button { width: 9.5rem; height: 44px; border-radius: var(--radius-sm); }   /* #476: where Build draft listing lands */
@media (prefers-reduced-motion: reduce) { .describe-skeleton .skeleton { animation: none; } }
@media (max-width: 479px) {
  .describe-row dd { flex-basis: 100%; justify-content: flex-start; text-align: left; padding-left: calc(18px + var(--space-3)); }
  .describe-skeleton__pills { flex-basis: 100%; margin-left: 0; padding-left: calc(18px + var(--space-3)); }   /* stacked, as the read rows are */
}

/* #272 PR 2: the Multi-Design Listing's read-only screens (the approved mockup, claude.ai/artifact/YcVeTCa1g7MRscZs8jhRSb). The
   dashboard's split button: "Build listing" and its ▾ behind a divider, one button to the eye; its menu under it. */
.split-build { position: relative; display: inline-flex; align-items: stretch; }
.split-build form { margin: 0; display: flex; }
.split-build .dashboard-start__build { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.split-build__toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 var(--space-3);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: 1px solid rgb(255 255 255 / 45%); }
.split-build__menu { position: absolute; top: calc(100% + var(--space-1)); right: 0; z-index: 20; min-width: 15rem; padding: var(--space-1);
  background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: 0 6px 18px rgb(0 0 0 / 12%); text-align: left; }
.split-build__item { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--color-text); font: inherit; font-size: var(--text-md); text-align: left; cursor: pointer; }
.split-build__item:hover, .split-build__item:focus-visible { background: var(--color-selected-bg); }
/* The summary: "Create a Multi-Design Listing" above the first product; the Designs card; the lineup grid (#521: each square's controls
   inline, no drawer) */
.summary-multi-create { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: 0; }
.summary-multi-create .field__hint { flex: 1 1 14rem; min-width: 0; }
.multi-designs__back { margin: 0 0 0 auto; }
/* #623: Import Canva design beside the Designs card's heading, its own width (the pair rule above makes it full width), before Back */
.multi-designs__canva { display: inline-flex; width: auto; margin: 0 0 0 auto; }
.multi-designs__canva + .multi-designs__back { margin-left: 0; }
.multi-designs__coming { margin: var(--space-2) 0 0; text-align: right; }
/* #1150 PR 1: the last design's offer, Back to single design's in the card's head (a full row once open) and the last tile's Remove */
.multi-designs__offer > summary { list-style: none; color: inherit; }
.multi-designs__offer > summary::-webkit-details-marker { display: none; }
.multi-designs__offer[open] { flex: 1 0 100%; margin-left: 0; }
.multi-designs__offer p { margin: 0; max-width: 40rem; }
.multi-designs__offer-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); max-width: 100%; }
.multi-designs__offer-actions .summary-act { max-width: 100%; white-space: normal; text-align: center; }
.multi-designs__tiles { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--space-3); }
.multi-design { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.multi-design__art { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; max-width: 100%; border-radius: var(--radius-sm); background: var(--color-bg-subtle); overflow: hidden; }
.multi-design__art img { width: 100%; height: 100%; object-fit: contain; }
.multi-design__form { display: flex; flex-direction: column; gap: var(--space-1); margin: 0; min-width: 0; }
.multi-design__form .input { width: 100%; min-width: 0; min-height: 44px; }
.multi-design__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
/* #661: a design name's status line ("Saved", or a refusal in words) at the tile's foot, two lines reserved from the start: a longer
   refusal only lengthens the tile below everything in it, so nothing in the tile moves */
.multi-design__status { min-height: calc(2 * 1.43em); margin: 0; }
.multi-design__status--error { color: var(--color-error); }
.multi-designs__line, .multi-designs__count { margin: var(--space-2) 0 0; }
/* #579 PR C (the owner's mockup, frame 1): a multi-design card's Colors row: the summary line, Sizes and Starting colors as dropdown
   checklists (each a <details> with its own form), and Adjust placement with its note */
.pair-line { margin: 0; font-weight: 600; color: var(--color-text); }
.pair-dds { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-2); margin-top: var(--space-1); }
.pair-dd { position: relative; }
.pair-dd__btn { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--color-control-border);
  border-radius: var(--radius-md); background: var(--color-bg-surface); font-size: var(--text-sm); font-weight: 600; cursor: pointer; list-style: none; }
.pair-dd__btn::-webkit-details-marker { display: none; }
.pair-dd__btn::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.pair-dd[open] > .pair-dd__btn::after { transform: translateY(2px) rotate(-135deg); }
.pair-dd__btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.pair-dd__panel { position: absolute; top: calc(100% + var(--space-1)); left: 0; z-index: 5; width: min(16.5rem, calc(100vw - 2rem)); padding: var(--space-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg-elevated); box-shadow: 0 8px 24px rgb(20 35 31 / 14%);
  display: flex; flex-direction: column; gap: var(--space-1); }
.pair-dd__panel .field__hint, .pair-dd__panel .summary-missing { margin: 0; padding: var(--space-1) var(--space-2) 0; }
.pair-dd__panel > [data-pair-said], .pair-dd__panel > [data-pair-error] { padding-bottom: var(--space-1); }   /* #821: above the list */
.pair-dd__list { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pair-dd__list--scroll { max-height: 18rem; overflow-y: auto; }
.pair-dd__opt { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-2); border-radius: var(--radius-sm); font-size: var(--text-sm); cursor: pointer; }
.pair-dd__opt:hover { background: var(--color-bg-subtle); }
.pair-dd__opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--color-brand); }
.pair-dd__on { margin-left: auto; color: var(--color-text-secondary); white-space: nowrap; }   /* #731: a partly ticked color, "on N of M" */
.pair-dd__opt:has(input:disabled:not(:checked)) { color: var(--color-disabled-text); cursor: not-allowed; }
.pair-dd__search { min-height: 44px; margin-bottom: var(--space-1); }
.pair-dd__save { align-self: flex-start; margin-top: var(--space-1); }
.pair-dd__cap { color: var(--color-warning); }
.pair-adjust { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); max-width: 13rem; }
.pair-adjust .btn-outline { gap: var(--space-2); }
.pair-adjust .field__hint { text-align: right; }
@media (max-width: 640px) { .pair-adjust { align-items: flex-start; max-width: none; } .pair-adjust .field__hint { text-align: left; } }
/* #787 (the owner, 2026-10-30): each Designs card's Adjust placement, Match placement (its confirm names how many designs change) and
   the status line the Lineup's square said, in place of the Lineup table. Full-width, text-labelled controls, 44 px tall */
.multi-design__place { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-2); min-width: 0; }
.multi-design__place .summary-act { box-sizing: border-box; width: 100%; white-space: normal; text-align: center; overflow-wrap: break-word; }
.multi-design__adjust { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; }
.multi-design__adjust--warn { border-color: var(--color-warning); background: var(--color-warning-bg); }   /* Not placed yet */
.multi-design__match { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-1); margin: 0; }
.multi-design__match > details > summary, .multi-design__match-off { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.multi-design__match > details > summary { color: var(--color-brand); list-style: none; }
.multi-design__match > details > summary::-webkit-details-marker { display: none; }
.multi-design__match > details[open] { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-1); }
.multi-design__place-status { margin: 0; font-size: var(--text-sm); font-weight: 600; }
.multi-design__place-status--ok { color: var(--color-success); }
.multi-design__place-status--warn { color: var(--color-warning); }
.multi-design__place-status--error { color: var(--color-error); }
.multi-design__place-status--gray { color: var(--color-text-secondary); }
.multi-design__why { margin: 0; overflow-wrap: anywhere; }
.multi-design__place-form { margin: 0; display: flex; flex-direction: column; }
.multi-design__place-btn { min-height: 44px; border-style: dashed; }
/* #272 PR 3: Add design and Remove design */
.multi-design__confirm summary { cursor: pointer; color: var(--color-text-secondary); }
.multi-design__confirm[open] { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); }
.multi-design__remove { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); margin: 0; }
/* #1167: a long design name in the open confirm's "Remove <name>" (and "Remove <name> again") wraps inside the tile. .summary-act's nowrap
   gave the button a min-content wider than the tile, the fit-content form and confirm grew with it, and the page scrolled sideways at 390 */
.multi-design__remove, .multi-design__remove .multi-design__confirm { min-width: 0; max-width: 100%; }
.multi-design__remove button.summary-act { display: block; box-sizing: border-box; max-width: 100%; white-space: normal; text-align: center;
  overflow-wrap: break-word; line-height: 1.4; padding-block: calc((44px - 1.4em) / 2); }   /* block: "Remove" and the name wrap as one line of text */
.multi-designs__add { margin: var(--space-4) 0 0; display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.multi-designs__add-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; }
.multi-designs__add-row .input { flex: 1 1 14rem; min-width: 0; max-width: 100%; min-height: 44px; }
.multi-designs__lock { margin: var(--space-2) 0 0; }   /* #521: locked until a product has a provider */
/* #455 (the owner's approved mockup): Upload designs above the thumbnails; the dashed + Add a design tile where the next one goes; a file's
   own tile while it uploads (a progress bar), once added, or refused with its reason. Shown by static/designs_upload.js. */
.multi-designs__upload { margin: var(--space-3) 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.multi-designs__hint { flex: 1 1 16rem; min-width: 0; margin: 0; }   /* #550: the placement hint beside Upload designs */
.multi-design--add { padding: 0; border: 2px dashed var(--color-border-strong); background: transparent; }
.multi-design__pick { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2);
  width: 100%; min-height: 12rem; padding: var(--space-3); border: 0; border-radius: var(--radius-md); background: transparent; color: var(--color-brand);
  font-weight: 600; cursor: pointer; }
.multi-design__pick:hover:not(:disabled) { background: var(--color-selected-bg); }
.multi-design__pick:disabled { color: var(--color-disabled-text); cursor: not-allowed; }
.multi-design__plus { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--color-bg-subtle); font-size: var(--text-2xl); line-height: 1; }
.multi-design__progress { width: 100%; height: 6px; accent-color: var(--color-success); }
.multi-design__file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.multi-design__state { margin: 0; }
.multi-design--refused { border-color: var(--color-error); }
.multi-design--refused .multi-design__state { color: var(--color-error); }
.multi-designs__done { margin: var(--space-2) 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
/* #521: a design's product's own Delete and Try again, on its Adjust placement page */
.placement-product-acts { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-2); margin-top: var(--space-2); }
.placement-product-acts__delete summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--color-text-secondary); }
.placement-product-acts__delete[open] { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); }
.placement-product-acts__delete p { margin: 0; max-width: 22rem; }
.placement-product-acts__reason { flex: 1 0 100%; margin: 0; max-width: 40rem; overflow-wrap: anywhere; }
.etsy-dropdowns__fixed { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); }
@media (max-width: 767px) {
  .multi-designs__back { margin-left: 0; }
  .multi-designs__canva { margin-left: 0; }
  .multi-designs__coming { text-align: left; }
  .multi-designs__tiles { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
}

/* SETTINGS PAGES AND SIGN-IN (#419 PR 3): the kit's classes arranged for Settings, Garments & providers and the sign-in card.
   These replace the pages' inline styles; nothing here sets a color or a size the kit has not already named. */
.settings-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.settings-stack > .card, .settings-stack > section.card { margin: 0; }
.settings-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; margin-bottom: var(--space-3); }
.settings-row--center { align-items: center; }
.settings-row .field--grow { flex: 1 1 14rem; }
.input--narrow { width: 7rem; }
.settings-top50 { margin-top: var(--space-3); }
.settings-top50 .settings-row { margin-bottom: 0; }
[data-catalog-read-state] > p { margin: var(--space-3) 0 0; }
.settings-stack p.subtitle.cost-stale, [data-catalog-read-state] > p.subtitle.cost-stale {
  display: block; padding: var(--space-3) var(--space-4); border: 1px solid color-mix(in srgb, var(--color-warning) 35%, transparent);
  border-radius: var(--radius-md); background: var(--color-warning-bg); color: var(--color-warning); font-size: var(--text-base); margin-bottom: 0;
}
.garment-head { justify-content: space-between; }
.garment-head h2 .subtitle { margin: 0; font-weight: 400; font-size: var(--text-base); }
[data-garment-status] { margin: 0 0 var(--space-3); font-size: var(--text-base); }
[data-garment-status] .pill { white-space: normal; max-width: 100%; }   /* "Not offered yet — missing: …" can be long: it wraps inside the card */
.garment-details { margin-top: var(--space-3); border-top: 1px solid var(--color-border); padding-top: var(--space-3); }
.garment-details__form { display: grid; gap: var(--space-4); max-width: 40rem; margin-top: var(--space-3); }
.garment-details__reread { margin-top: var(--space-4); }
[data-garments-page] details > summary { cursor: pointer; font-weight: 600; color: var(--color-text); min-height: 32px; }
[data-garments-page] details > summary:hover { color: var(--color-brand); }
[data-garments-page] .garment-providers { margin: var(--space-2) 0; }
[data-garments-page] .garment-providers > summary { font-size: var(--text-base); }
[data-garments-page] .provider-fields > summary { font-weight: 400; font-size: var(--text-base); }

.signin { min-height: 100vh; display: grid; place-items: center; padding: var(--space-6) var(--space-4); }
.signin__card { width: 100%; max-width: 26rem; margin: 0; padding: var(--space-8) var(--space-6); }
.signin__logo { display: block; height: 32px; width: auto; margin: 0 0 var(--space-6); }
.signin__title { font-size: var(--text-2xl); line-height: 1.25; margin: 0 0 var(--space-2); }
.signin__form { display: grid; gap: var(--space-5); margin-top: var(--space-5); }
.signin__form .btn { width: 100%; }
.signin__beta { display: grid; gap: var(--space-3); padding-bottom: var(--space-6); margin-bottom: var(--space-6); border-bottom: 1px solid var(--color-border); }
.signin__beta p { margin: 0; }
.signin__beta .btn { width: 100%; }
.signin__subtitle { font-size: var(--text-lg); margin: 0 0 var(--space-2); }
@media (max-width: 639px) { .signin__card { padding: var(--space-6) var(--space-4); } }
/* #976: ArkTally's saved pricing pages (templates/arktally_*.html), on the sign-in card's layout */
.arktally__card { max-width: 36rem; display: grid; gap: var(--space-4); }
.arktally__card > * { margin: 0; }
.arktally__lists { list-style: none; padding: 0; display: grid; gap: var(--space-3); }
.arktally__list { display: grid; gap: var(--space-2); padding: var(--space-3) 0; border-top: 1px solid var(--color-border); }
.arktally__list-head { display: grid; gap: var(--space-1); min-width: 0; }
.arktally__name { overflow-wrap: anywhere; }
.arktally__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-start; }
.arktally__actions form { margin: 0; }
.arktally__rename form { display: grid; gap: var(--space-2); margin-top: var(--space-2); }
.arktally__rename > summary { list-style: none; }
.arktally__check { display: flex; gap: var(--space-2); align-items: center; }
.arktally__news { display: grid; gap: var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.arktally__news p { margin: 0; }
.arktally__delete > summary { cursor: pointer; color: var(--color-text-secondary); }
.arktally__delete form { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.page-head--settings { margin-bottom: var(--space-6); }
.page-head--settings .subtitle { margin-bottom: 0; max-width: 48rem; }
.page-head--settings > .btn-ghost { flex: none; white-space: nowrap; }
@media (max-width: 639px) { .page-head--settings { flex-direction: column-reverse; gap: var(--space-2); } .page-head--settings > .btn-ghost { align-self: flex-start; padding-left: 0; } }
.variant-cap-line { color: var(--color-warning); }   /* #579 PR C: Printify's 100-variant cap, on the placement page */

/* #797: Settings > Connections: Etsy, Printify and Canva as equal boxes in one row at 1024px and up, two across on a tablet, stacked on a phone. */
.conn { margin: 0 0 var(--space-4); }
.conn__head { margin-bottom: var(--space-3); }
.conn__head h2 { margin: 0; }
.conn__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); align-items: stretch; }
.conn-box { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; min-width: 0; }
.conn-box > * { margin: 0; }
.conn-box__name { display: flex; align-items: center; margin: 0; font-size: var(--text-lg); }
.conn-box__status { font-weight: 600; overflow-wrap: anywhere; }
.conn-box .settings-row, .conn-box__token { margin-bottom: 0; }
.conn-box__token { flex-direction: column; align-items: stretch; }
.conn-box__token .field--grow { flex: none; min-width: 0; }
.conn-box .input { width: 100%; min-width: 0; box-sizing: border-box; }
.conn-box__how { margin-top: auto; border-top: 1px solid var(--color-border); padding-top: var(--space-3); }
.conn-box__how > summary { cursor: pointer; font-size: var(--text-base); min-height: 32px; }
.conn-box__alt > summary { cursor: pointer; font-size: var(--text-base); min-height: 32px; }   /* #829 PR 3: "Use a token instead" */
.conn-box__alt > .conn-box__token { margin-top: var(--space-2); }
.conn-box__how > p { margin: var(--space-2) 0 0; }
.conn-box__shop { display: block; margin: var(--space-2) 0; overflow-wrap: anywhere; }   /* #1435: one shop per line in the picker */
.conn-box__shop--off { color: var(--color-text-secondary); }   /* #1435: a shop not on Etsy: greyed, its reason beside it */
/* #1204 (the owner, 17 Nov): the shipping switch's long words, its list and the processing days each behind a closed disclosure, after
   the controls they explain, so opening one moves nothing above it. The summary is one line and a 44 px tap target; the keyboard opens it. */
.switch-more { margin-top: var(--space-2); }
[data-shipping-switch-form] > .btn { margin-top: var(--space-2); }   /* Turn on, under the box's two-line name */
.switch-more__line { cursor: pointer; display: list-item; padding: 12px 0; line-height: 20px; font-weight: 600; color: var(--color-brand); }   /* list-item keeps the native marker: 20 + 2 x 12 = 44 px */
.switch-more__line:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.switch-more[open] > .switch-more__line { color: var(--color-text); }
.switch-more > :not(summary) { margin: var(--space-2) 0 0; }
/* #1204 round 3 (the owner, 18 Nov): the whole block one level further in, its status the summary. The summary is a 44 px tap target
   that wraps at phone width (a long status reads on two lines rather than overflowing); the keyboard opens it. */
.switch-block { margin-top: var(--space-3); border-top: 1px solid var(--color-border); }
.switch-block__line { cursor: pointer; display: list-item; padding: 12px 0; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }
.switch-block__line [data-shipping-switch-status] { font-weight: 400; }   /* the status reads lighter than its name */
.switch-block__short { white-space: nowrap; }   /* a short status wraps whole, under its name, in the 1280 card's third of the row */
.switch-block__line:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.switch-block > :not(summary) { margin: var(--space-2) 0 0; }
@media (max-width: 1023px) { .conn__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .conn__row { grid-template-columns: minmax(0, 1fr); } }

/* #627: Canva's icon logo (static/brand/canva-icon.svg, unmodified): under 50px, as Canva's brand guidelines ask of a small surface,
   with 8px of clear space on every side; never recolored, faded or stretched (square box, its own colors). */
.canva-mark { width: 20px; height: 20px; margin: 8px; flex: none; display: block; }
.canva-powered, .canva-heading, [data-canva-import-status] { display: flex; align-items: center; }
.canva-powered { margin: 0; }
/* #1006: a multi-page import's count, bar and one row per page. The bar counts a failed page as finished; .is-stopped (the poll gave up)
   stops everything that moves. */
.canva-progress { display: grid; gap: var(--space-1); margin: var(--space-2) 0; }
.canva-progress__count { margin: 0; font-size: var(--text-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.canva-progress .progress__value { height: 100%; width: 0; background: var(--color-highlight); transition: width 0.4s ease; }
.canva-progress:not(.is-stopped) .progress.is-working .progress__value { animation: pulse 1.2s ease-in-out infinite; }
.canva-pages { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: var(--space-1); font-size: var(--text-sm); }
.canva-pages li { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.canva-page__mark { box-sizing: border-box; flex: none; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--color-border); }
.canva-pages:not(.is-stopped) [data-page-state="importing"] .canva-page__mark { border-top-color: var(--color-highlight); animation: progress-spin 0.9s linear infinite; }
.canva-pages [data-page-state="done"] .canva-page__mark { background: var(--color-highlight); border-color: var(--color-highlight); }
.canva-pages [data-page-state="failed"] { color: var(--color-warning); }
.canva-pages [data-page-state="failed"] .canva-page__mark { background: var(--color-warning); border-color: var(--color-warning); }
.canva-progress.is-stopped .progress__value, .canva-pages.is-stopped .canva-page__mark { animation: none; }
@media (prefers-reduced-motion: reduce) { .canva-progress .progress.is-working .progress__value, .canva-pages [data-page-state] .canva-page__mark { animation: none; } }

/* #496 PR 2: Import Canva design's picker (templates/canva_picker.html) */
.canva-search { display: flex; flex-wrap: wrap; gap: var(--space-2, 8px); align-items: flex-end; margin-bottom: var(--space-3, 12px); }
.canva-search .input { flex: 1 1 200px; min-width: 0; }
.canva-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3, 12px); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.canva-grid__item { display: flex; flex-direction: column; gap: var(--space-2, 8px); }
.canva-grid__item.is-open { grid-column: 1 / -1; }
.canva-grid__item.is-open .canva-grid__thumb { max-width: 150px; }   /* the row it spans is for the pages, not a bigger picture */
/* #1517: every card has the same picture area, the page-count badge on it; no thumbnail is a placeholder, never a text-only card */
.canva-grid__thumb { position: relative; width: 100%; aspect-ratio: 5 / 6; background: var(--color-bg-subtle); border-radius: 6px; overflow: hidden; }
.canva-grid__thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.canva-grid__none { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2, 8px); color: var(--color-text-muted); font-size: var(--text-sm); }
.canva-grid__none img { width: 20px; height: 20px; object-fit: contain; }
.canva-grid__badge { position: absolute; right: var(--space-2, 8px); bottom: var(--space-2, 8px); padding: 2px var(--space-2, 8px); border-radius: 999px; background: var(--color-brand); color: var(--color-bg-surface); font-size: var(--text-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.canva-pagepick { flex: 1 0 100%; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2, 8px); grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.canva-pagepick__label { display: flex; align-items: center; cursor: pointer; font-size: var(--text-sm); }
.canva-pagepick__words { display: flex; align-items: center; gap: var(--space-1, 4px); }
.canva-grid__title { margin: 0; overflow-wrap: anywhere; }

/* #651: Import Canva design's dialog on Colors & design and the Designs card (a modal <dialog>, in the browser's top layer, so the
   rest of the page, the feedback bubble included, is inert behind its backdrop while it is open). The .dialog box, wider; its grid
   scrolls inside, so the dialog never grows past the window. At phone width it fills the window less 1rem. */
.canva-dialog { width: min(60rem, calc(100vw - 2rem)); max-width: none; max-height: 90vh; flex-direction: column; gap: var(--space-3); overflow: hidden; }
.canva-dialog[open] { display: flex; }
.canva-dialog__head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.canva-dialog__head h2 { margin: 0; font-size: var(--text-lg); }
.canva-dialog__close { margin-left: auto; }
.canva-dialog .canva-picker__body { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.canva-dialog .canva-grid { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; }
.canva-dialog [data-canva-list-status]:focus { outline: none; }
.canva-picker__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.canva-picker__actions:empty { display: none; }
.canva-grid__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
@media (max-width: 639px) { .canva-dialog { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); padding: var(--space-3); } }
/* #652: with Canva on, Upload new design and Import Canva design share one row, so the Design library grid below keeps its 150px
   floor at 834px (stacked, the second button's row came out of the grid's height) */
.designs-add-row { display: flex; gap: var(--space-2); margin-bottom: var(--space-2); }
.designs-add-row > .upload-designs-btn, .designs-add-row > .canva-import-btn { flex: 1 1 0; min-width: 0; margin-bottom: 0; }
/* #659 (the owner, 2026-10-27; her approved mockup, artboards "Main" and "Multi"): the summary's products in a grid, three across, two
   and then one as the page narrows, with + Add a product the last cell. Cards align at the top, so a short card never stretches. Each
   card reads top to bottom: the name, provider and chip with the ⋯ menu; the placement thumbnail; Colors and Sizes as dropdowns; the
   cost and Printify sync line; the buttons. Every dropdown, the menu and the SKUs open OVER the page (absolutely placed, never in the
   flow), so no card moves (templates/_summary_product_card.html; one open at a time, static/summary.js). */
.summary-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
@media (max-width: 1100px) { .summary-products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .summary-products { grid-template-columns: minmax(0, 1fr); } }
.summary-pcard { position: relative; min-width: 0; gap: var(--space-3); padding: var(--space-4); }
.summary-pcard .summary-card__head { flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: 0; }
/* #700: the number carries the status as a small dot on its corner (never a second ring beside it) */
.pcard-num { position: relative; display: inline-flex; flex: none; }
.pcard-num .summary-badge { width: 28px; height: 28px; font-size: var(--text-sm); }
.pcard-dot { position: absolute; top: -3px; right: -4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--color-bg-surface); box-sizing: border-box; }
.pcard-dot--done { background: var(--color-success); }
.pcard-dot--open { background: var(--color-warning); }
/* #700: the garment's photo beside the name; a square box the photo fits whole in (as it comes, no recoloring), a neutral blank behind it */
.pcard-top { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-3); align-items: start; padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-border); }
.pcard-photo { position: relative; width: 96px; height: 96px; border-radius: var(--radius-md); background: var(--color-bg-subtle); overflow: hidden; }
.pcard-photo__blank { position: absolute; inset: 24px; width: 48px; height: 48px; color: var(--color-text-muted); }
.pcard-photo__img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; background: var(--color-bg-subtle); }
.pcard-provider__chip { align-self: flex-start; }
.summary-pcard .pcard-colors { align-items: stretch; }   /* the rows' dropdowns fill the card's width */
.summary-pcard .summary-card__name { flex: 1 1 auto; gap: var(--space-1); }
.summary-pcard .summary-card__name h3 { font-size: var(--text-md); line-height: 1.3; }
.summary-pcard .summary-srow { display: flex; flex-direction: column; gap: var(--space-2); padding: 0; border-top: 0; }
.summary-pcard .summary-srow__v { gap: var(--space-2); }
.summary-pcard .summary-srow__act:empty { display: none; }
.summary-pcard .pcard-provider .summary-srow__v { gap: 2px; }
.summary-pcard .pcard-chip { align-self: flex-start; }
.summary-pcard .summary-card__foot { margin-top: 0; padding-top: 0; border-top: 0; justify-content: flex-start; }
.pcard-field { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.pcard-field__label { font-size: var(--text-xs); font-weight: 600; color: var(--color-text-secondary); }
/* #700: Sizes and Colors are label-and-dropdown rows, the label at the left and the dropdown filling the rest */
.pcard-field--row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: center; column-gap: var(--space-2); }
.pcard-field--row > .pcard-field__label { font-size: var(--text-sm); font-weight: 500; }
.summary-pcard .pair-dds { gap: var(--space-2); }
/* the card's dropdowns are full width, so a panel never runs past the card (or the window at 390) */
.summary-pcard .pair-dds { flex-direction: column; align-items: stretch; margin-top: 0; }
.summary-pcard .pair-dd { width: 100%; }
.summary-pcard .pair-dd__btn { width: 100%; justify-content: flex-start; font-weight: 500; text-align: left; }
.summary-pcard .pair-dd__btn::after { margin-left: auto; flex: none; }
.summary-pcard .pair-dd__panel { left: auto; right: 0; width: min(16.5rem, calc(100vw - 2rem)); max-height: 24rem; overflow-y: auto; }
.pcard-dd__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-dd__swatches { display: inline-flex; gap: 4px; }
.pcard-dd__swatches .summary-swatch { width: 18px; height: 18px; }
.pcard-line__val { display: inline-flex; align-items: center; gap: var(--space-1); min-width: 0; font-size: var(--text-sm); }   /* #743: a single-design card's read-only Sizes and Colors lines */
.pcard-line__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); }
.pcard-line__swatches { display: inline-flex; gap: 4px; }
.pcard-line__swatches .summary-swatch { width: 18px; height: 18px; }
.pcard-pop__panel .summary-swatches { flex-direction: column; gap: 0; }
.pcard-pop__panel .summary-swatches li { min-height: 32px; padding: 0 var(--space-2); }
.pcard-sizes { list-style: none; margin: 0; padding: var(--space-1) var(--space-2); display: flex; flex-wrap: wrap; gap: var(--space-1); }
.pcard-sizes li { padding: 2px var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-pill); font-size: var(--text-sm); }
.pcard-strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1); }
.pcard-strip__tile img { display: block; width: 36px; height: 36px; object-fit: contain; border: 1px solid var(--color-border); border-radius: var(--radius-xs); background: var(--color-bg-subtle); }
/* the ⋯ menu */
.pcard-menu { position: relative; flex: none; }
.pcard-menu__btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; list-style: none; cursor: pointer;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg-surface); color: var(--color-text-secondary); }
.pcard-menu__btn::-webkit-details-marker { display: none; }
.pcard-menu__btn svg { width: 18px; height: 18px; }
.pcard-menu__btn:hover, .pcard-menu[open] > .pcard-menu__btn { background: var(--color-bg-subtle); color: var(--color-text); }
.pcard-menu__btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.pcard-menu__panel { position: absolute; top: calc(100% + var(--space-1)); right: 0; z-index: 6; width: max-content; min-width: 12rem; max-width: calc(100vw - 2rem);
  display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-bg-elevated); box-shadow: var(--shadow-popover); }
.pcard-menu__panel form, .pcard-menu__delete { display: flex; margin: 0; }
.pcard-menu__panel .summary-act { width: 100%; justify-content: flex-start; }
/* the cost and sync line, and the SKUs: a block box, so the panel's top is where it would sit in the flow, under the line, over what follows */
.summary-pcard .pcard-printify .summary-srow__v { display: block; }
.summary-pcard .pcard-printify .summary-srow__v > * + * { margin-top: var(--space-1); }
.summary-pcard .printify-skus__panel { position: absolute; left: var(--space-3); right: var(--space-3); z-index: 6; max-width: none; max-height: min(28rem, 70vh); overflow: auto;
  padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg-elevated); box-shadow: var(--shadow-popover); }
/* the buttons, at the card's foot */
.pcard-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: auto; }
.pcard-actions > .summary-act { flex: 1 1 8rem; justify-content: center; }
.summary-pcard .pair-adjust { flex: 1 1 100%; max-width: none; align-items: stretch; }
.summary-pcard .pair-adjust .summary-act { justify-content: center; }
.summary-pcard .pcard-actions:empty { display: none; }
.summary-add--tile { flex-direction: column; min-height: 18rem; border-width: 2px; font-size: var(--text-md); }
@media (max-width: 639px) { .summary-add--tile { min-height: 6rem; } }
/* #735: a multi-design listing's one-product note, in place of + Add a product: a short cell in the hint's color, no dashed add affordance */
.summary-add--note { min-height: 0; padding: var(--space-3); border: 1px solid var(--color-border); color: var(--color-text-secondary); font-weight: 500; font-size: var(--text-sm); text-align: left; align-self: start; }
.summary-add--note p { margin: 0; }
.summary-add--note.summary-missing { color: var(--color-warning); border-color: var(--color-warning); }
.summary-link-btn { background: none; border: 0; padding: 0; color: var(--color-brand); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* ---------- Feedback bubble (#649) ----------
   Fixed at the bottom right of every signed-in page: above the sticky .lineup-footer (z 5), below the top bar (20), the drawer
   backdrop (25) and dialogs. static/feedback.js sets --feedback-lift to the sticky footer's height, so the button never covers Save,
   Publish or the step footer; body:has(.lineup-footer) is the fallback before the script runs. */
.feedback { position: fixed; right: var(--space-4); bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px) + var(--feedback-lift, 0px)); z-index: 15; }
body:has(.lineup-footer) .feedback { bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px) + var(--feedback-lift, 4.5rem)); }
.feedback__button { list-style: none; display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-4);
  border-radius: 999px; background: var(--color-brand); color: #fff; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.18)); }
.feedback__button::-webkit-details-marker { display: none; }
.feedback__button::marker { content: ""; }
.feedback__button:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 3px; }
.feedback__icon { display: inline-flex; }
.feedback__panel { position: absolute; right: 0; bottom: calc(100% + var(--space-2)); width: min(22rem, calc(100vw - 2 * var(--space-4)));
  max-height: calc(100vh - var(--topbar-height, 56px) - 6rem); overflow: auto; padding: var(--space-4); background: var(--color-bg-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.18)); }
.feedback__title { margin: 0 0 var(--space-3); font-size: var(--text-lg, 1.125rem); }
.feedback__kinds { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0 0 var(--space-3); padding: 0; border: 0; }
.feedback__kinds legend { padding: 0; margin-bottom: var(--space-1); }
.feedback__kinds label { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 44px; }
.feedback__text { width: 100%; box-sizing: border-box; resize: vertical; }
.feedback__count { text-align: right; margin-top: 0; }
.feedback__actions { display: flex; gap: var(--space-2); }
.feedback__status { margin: var(--space-2) 0 0; min-height: 1.25em; }
.feedback-table__text { white-space: pre-wrap; max-width: 28rem; }
/* The page's own last action (the summary's Publish to Etsy, at the foot of the page) scrolls clear of the button: main ends with room
   for it (CI browser-2 on #656 found Publish under the button at 1400, scrolled to the bottom). */
body:has([data-feedback]) .app-shell > main { padding-bottom: calc(var(--space-4) * 2 + 3.5rem); }
@media (max-width: 479px) { .feedback__button-label { display: none; } .feedback__button { padding: 0; width: 48px; justify-content: center; } }
/* #663 (the owner, 2026-10-27: "right now it's jumpy and doesn't really show progress"): the Create on Printify dialog's progress
   view (templates/_create_dialog.html, static/create_hold.js), in the Publish progress's kit (.progress, .progress-step). It sits at a
   fixed top, so a change below the rows never moves them; each row is the step's fixed height with its state in words on its detail
   line, and the list has a fixed height of its own that scrolls past six rows, so no row appears, reorders or grows. */
html:has(dialog[data-create-dialog]) { scrollbar-gutter: stable; }
.lineup-create-dialog--progress[open] { margin: max(1rem, 8vh) auto auto; max-height: calc(100dvh - max(1rem, 8vh) - 1rem); overflow-y: auto; }
.create-progress h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.create-progress__bar { margin: var(--space-2) 0 var(--space-1); }
.create-progress__bar > .progress__value { background: var(--color-highlight); transition: width 0.4s ease; }
.create-progress__count { margin: 0 0 var(--space-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.create-progress__rows { max-height: calc(6 * (3.5rem + 2px) + 5 * var(--space-1)); overflow-y: auto; }
.create-progress__word { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-step--failed .create-progress__word { color: var(--color-warning); }
.create-progress__hint, .create-progress__summary, .create-progress__error { margin: var(--space-3) 0 0; }
.create-progress__summary { font-weight: 600; }
.create-progress__error { color: var(--color-warning); }
@media (prefers-reduced-motion: reduce) { .create-progress__bar > .progress__value { transition: none; } }

/* #662: the Etsy variants meter, above the Products section (templates/_variant_meter.html). Its band (#770, the owner, 2026-10-29):
   green at or under Etsy's cap, red past it, no amber. The total takes the band's color: success 5.58:1 and error 6.57:1 on the
   surface; the fix lines are #454's refusal links */
.variant-meter { display: grid; gap: var(--space-2); border-left: 4px solid var(--color-success); }
.variant-meter--error { border-left-color: var(--color-error); }
.variant-meter__title { font-size: var(--text-lg, 1.125rem); margin: 0; }
.variant-meter--ok [data-variant-count] { color: var(--color-success); }
.variant-meter--error [data-variant-count] { color: var(--color-error); }
.variant-meter__bar { height: 8px; border-radius: 999px; background: var(--color-bg-subtle); overflow: hidden; }
.variant-meter__fill { display: block; height: 100%; background: var(--color-success); }
.variant-meter--error .variant-meter__fill { background: var(--color-error); }
/* #770 part 3: the bar pinned under the app's top bar once the meter scrolls out of view: one line, 36 px, over the meter's column
   (static/summary.js sets top, left and width from the top bar and the meter), under the top bar (z-index 20) and the rail's overlay
   and drawer. Its words in the band's color on the band's pale ground: success 5.11:1 on success-bg, error 5.98:1 on error-bg. */
.variant-pin { position: fixed; top: var(--topbar-height); left: 0; z-index: 19; box-sizing: border-box; display: flex; align-items: center;
  height: 36px; min-height: 0; margin: 0; padding: 0 var(--space-3); border: 1px solid color-mix(in srgb, var(--color-success) 35%, transparent);
  border-left: 4px solid var(--color-success); border-radius: 0 0 var(--radius-md) var(--radius-md); background: var(--color-success-bg);
  color: var(--color-success); font: inherit; font-size: var(--text-sm); font-weight: 600; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; cursor: pointer; box-shadow: var(--shadow-card); }
.variant-pin--error { border-color: color-mix(in srgb, var(--color-error) 35%, transparent); border-left-color: var(--color-error);
  background: var(--color-error-bg); color: var(--color-error); }
.variant-pin:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.variant-meter__detail { margin: 0; color: var(--color-error); font-weight: 600; }
.variant-meter__fixes { display: grid; gap: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--color-border); }
.variant-meter__lead { margin: 0; font-weight: 600; }
.variant-meter__list, .variant-meter__fits { margin: 0; padding-left: var(--space-5); display: grid; gap: var(--space-1); }
.variant-meter :is(p, li) { overflow-wrap: anywhere; }
.variant-meter > .field__hint { margin: 0; }   /* #785: at or under the cap the hints are the card's own grid items, which has its own gap; a hint's default 14 px margins sat on top of it, the last one's under the card's text. The ones inside the open toggle keep theirs. */
/* #736: past the cap, the options sit behind one <details> (data-meter-open), closed by default; the toggle is a 44 px tap target and shows
   the Show or the Hide words by the element's own [open], so the label needs no script */
.variant-meter__more { display: grid; }
.variant-meter__more[open] { gap: var(--space-2); }   /* #785: closed, the hidden content was still a grid item with a gap above it */
.variant-meter__toggle { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--color-brand); font-weight: 600; }
.variant-meter__rest { display: grid; gap: var(--space-2); }
.variant-meter__more:not([open]) [data-meter-hide], .variant-meter__more[open] [data-meter-show] { display: none; }

/* ---- #691 (the owner's approved mockup, 2026-10-27): the Photos page. The strip on top, always in the same place and at the same
   height; the selected photo's editor below it; the empty state's one card; the "+ Add photos" and Enlarge dialogs. DESIGN_SYSTEM.md
   names the placeholder tile, the tick tile and the edit bar. ---- */
.photos-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.photos-head__titles { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.photos-head__titles h1 { margin: 0; overflow-wrap: anywhere; }
.photos-head__back { font-size: var(--text-sm); text-decoration: none; }
.photos-page { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.photos-page .is-gone { display: none; }
/* the strip: its row has a fixed height with room for a sideways scrollbar inside it, so nothing under it moves when photos arrive, when
   a render lands, or when the row starts to scroll. #1075 item 2 (the owner, 13 Nov: a tighter strip): no placeholder tiles, a one-line
   caption, and a shorter row (was 192px), still one row high (#784) */
.photo-strip { min-width: 0; }
.photo-strip__head { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); margin-bottom: var(--space-2); }
.photo-strip__head h2 { margin: 0; font-size: var(--text-md); }
.photo-strip__row { display: flex; gap: var(--space-3); height: 160px; padding: 3px 3px 0; overflow-x: auto; overflow-y: hidden; align-items: flex-start;
  overscroll-behavior-x: contain; scrollbar-width: thin; }
.photo-strip__list { display: flex; gap: var(--space-3); list-style: none; margin: 0; padding: 0; flex: none; }
.photo-tile { position: relative; flex: 0 0 104px; width: 104px; height: 146px; display: flex; flex-direction: column; gap: 4px; padding-top: 3px; }
.photo-tile__form { display: contents; }
.photo-tile__pick { display: flex; flex-direction: column; gap: 4px; width: 104px; padding: 0; border: 0; background: none; font: inherit; color: inherit;
  text-align: left; cursor: pointer; touch-action: manipulation; -webkit-touch-callout: none; user-select: none; }
.photo-tile__pick:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.photo-tile__pic { position: relative; display: block; width: 104px; height: 104px; border-radius: var(--radius-md); overflow: hidden;
  background: var(--stone-100); outline: 1px solid var(--color-border); outline-offset: 0; }
.photo-tile.is-selected .photo-tile__pic { outline: 2px solid var(--color-selected-border); outline-offset: 2px; }
.photo-tile__img { display: block; width: 104px; height: 104px; object-fit: cover; pointer-events: none; }
/* #1329: the designs over a tile not rendered yet (templates/_gallery_tile.html tile_art): a box with the photo's aspect, laid out in its
   own px and scaled to cover the tile as the picture does; --tile-px is the tile's side, set beside each of its sizes */
.photo-tile__pic { --tile-px: 104; }
.photo-tile__art { position: absolute; left: 50%; top: 50%; transform-origin: 0 0; pointer-events: none; }
.photo-tile__art-layer { position: absolute; display: block; max-width: none; height: auto; }
.photo-tile__art-layer--pinned { left: 0; top: 0; transform-origin: 0 0; }
.photo-tile__art-text { position: absolute; white-space: nowrap; line-height: 1; }
.photo-tile__n { position: absolute; top: 5px; left: 5px; min-width: 1.4em; padding: 0 5px; border-radius: var(--radius-xs); background: var(--color-bg-surface);
  font-size: var(--text-xs); font-weight: 600; text-align: center; line-height: 1.5; }
.photo-tile__main { display: none; position: absolute; bottom: 5px; left: 5px; padding: 0 5px; border-radius: var(--radius-xs); background: var(--color-success-bg);
  color: var(--color-success); font-size: var(--text-xs); font-weight: 600; line-height: 1.5; }
.photo-strip__list > li:first-child .photo-tile__main { display: block; }
.photo-tile__line { display: block; max-width: 104px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--text-xs); }
/* the caption: AMENDED by #1075 item 2, one line (was the product and the color on two), the product cut first so the color shows,
   every tile the same height; an ordinary mockup's line is empty */
.photo-tile__label { display: flex; align-items: center; gap: 3px; height: 1.25em; line-height: 1.25; max-width: 104px; overflow: hidden;
  white-space: nowrap; font-size: var(--text-xs); font-weight: 600; }
.photo-tile__label .summary-badge { width: 16px; height: 16px; min-width: 16px; flex: none; }
.photo-tile__what, .photo-tile__which { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.photo-tile__what { flex: 0 1000 auto; color: var(--color-text-secondary); font-weight: 500; }
.photo-tile__which { flex: 0 1 auto; }
.photo-tile__line { color: var(--color-text-secondary); }
.photo-tile__line--warn { color: var(--color-warning); font-weight: 600; }
.photo-tile__line--error { color: var(--color-error); font-weight: 600; }
.photo-tile__line--muted { color: var(--color-text-muted); }
/* #1398 (the owner, 26 Nov 2026): the tile's read-only flags ("Color?" while its tag is incomplete), inside the pick, on the picture
   where #1035's chip was (below its middle, above Main), so a click on one selects and a press on one drags. AMENDED from #1035's
   select: the Color picker is This photo's now (templates/_photos_editor.html) */
.photo-tile__flags { position: absolute; top: 62px; left: 5px; display: flex; gap: 3px; max-width: 94px; pointer-events: none; }
.photo-tile__flag { display: flex; min-width: 0; overflow: hidden; white-space: nowrap; padding: 0 5px; border-radius: var(--radius-pill);
  border: 1px solid var(--color-border); background: var(--color-bg-surface); color: var(--color-text); font-size: var(--text-xs);
  font-weight: 600; line-height: 1.5; }
.photo-tile__flag .photo-tile__which { flex: none; }   /* "Color?" whole; the garment before it is what is cut */
/* #1398: the size this photo shows; beside "Color?" it is the one cut first (its whole name is in its title and in This photo) */
.photo-tile__flag--size { display: block; flex: 0 1000 auto; text-overflow: ellipsis; }
.photo-tile__menu { position: absolute; top: 3px; right: 0; }
.photo-tile__menu .tile-menu__btn { width: 32px; min-width: 32px; height: 32px; background: color-mix(in srgb, var(--color-bg-surface) 88%, transparent); }
/* #1072: fixed, so the strip's sideways scroll never clips it; static/strip_menu_place.js sets its left and top when it opens */
.photo-tile__menu .tile-menu__list { position: fixed; left: auto; right: auto; top: auto; min-width: 11rem; }
/* #822's fade, AMENDED by #1398 (the owner, 26 Nov 2026: one ⋯ menu, no separate ✕): a photo tile's ⋯ shows on the hovered tile,
   the selected tile, a tile holding focus and an open menu, and always where the pointer can't hover. Faded with opacity, never
   display or hidden, so Tab still reaches it (ADR-010) */
.photo-tile[data-tile] .photo-tile__menu { opacity: 0; transition: opacity var(--duration-fast) var(--ease-standard); }
.photo-tile[data-tile]:hover .photo-tile__menu, .photo-tile[data-tile]:focus-within .photo-tile__menu, .photo-tile[data-tile].is-selected .photo-tile__menu, .photo-tile[data-tile] .photo-tile__menu.is-open { opacity: 1; }
@media (hover: none) { .photo-tile[data-tile] .photo-tile__menu { opacity: 1; } }
.photo-strip__list.is-sorting .photo-tile__pick { cursor: grabbing; }
.photo-tile.is-dragging { opacity: 0.6; }
.photo-tile.is-dragging .photo-tile__pic { outline: 2px dashed var(--color-focus); }
.photo-tile--add { text-decoration: none; color: var(--color-brand); }
.photo-tile__add { display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--space-2); box-sizing: border-box;
  border: 2px dashed var(--color-border-strong); outline: 0; background: var(--color-bg-surface); font-weight: 600; font-size: var(--text-sm); }
.photo-tile--add.is-first .photo-tile__add { border-color: var(--color-brand); }
.photo-tile--add:hover .photo-tile__add { background: var(--color-bg-subtle); }
.photo-tile--add:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-md); }
/* the editor: the photo, then This photo and the tabs beside it */
.photos-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: var(--space-4); align-items: start; min-height: 38rem; }
.photos-stage-card { min-width: 0; }
.photos-editor .mockups-preview { grid-area: auto; }   /* the Mockups step's own grid area (above) is not this page's */
.photos-stage-card__name { margin: 0 0 var(--space-2); font-size: var(--text-sm); font-weight: 600; color: var(--color-text-secondary); }
/* #694 PR C (#665's real-path fix, kept): the photo's frame clips, never scrolls: overflow: hidden still scrolls by script and by
   focus, so a layer past the photo's edge, focused, shifted the photo sideways */
.photos-frame { overflow: clip; }
.photos-frame #photo-picture { width: 100%; height: 100%; object-fit: contain; }
.photos-side { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.photos-this { display: flex; flex-direction: column; gap: var(--space-2); }
.photos-this h2, .photos-empty h2 { margin: 0; font-size: var(--text-md); }
.photos-this__what { margin: 0; font-size: var(--text-sm); color: var(--color-text-secondary); overflow-wrap: anywhere; }
.photos-this form { display: contents; }
/* #1398: This photo's pickers (Color; the tile's #1035 chip moved here): a labeled full-width select, Set beside it without scripts */
.photos-this__pick-row { display: flex; gap: var(--space-2); align-items: center; min-width: 0; }
.photos-this__pick-row > .select { flex: 1 1 auto; min-width: 0; width: 100%; min-height: 44px; }
.photos-this .field-label { margin: 0; }
.tag-chip-js .photos-this__set { display: none; }
.photos-this__all { align-self: flex-start; min-height: 44px; }
.photos-this__notes { margin: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.photos-this__notes.is-gone { display: none; }
/* #1529: the photo's Ink opacity, under Color: its label, then the slider and its percent on one row */
.photos-this__ink { display: contents; }
.photos-this__ink input[type=range] { flex: 1 1 auto; min-width: 0; min-height: 44px; }
.photos-this__ink output { flex: none; min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }
.photos-panels .pane-tabs { margin-top: 0; }
/* #784 (the owner, 2026-10-29: "it needs to be shorter so it doesn't keep scrolling"): the right column in #501's treatment. Beside the
   photo (1025px and wider) the panel is sticky under the top bar and ends at the bottom of the screen, and the shown tab scrolls as ONE
   unit: no scroll box of its own for the library grid, so never a second scrollbar. "This photo" scrolls away with the page. Stacked
   (1024px and narrower) the grid is about 60vh at most with its own scroll. Either way the page never grows with the library. */
.photos-panels .mockups-design-tiles { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); grid-auto-rows: max-content; gap: var(--space-2);
  max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; align-content: start; }   /* compact tiles, three across */
.photos-panels .mockups-design-tile .field__hint { display: none; }
.photos-panels .mockups-design-tile .mockups-tile-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--text-xs); }
@media (min-width: 1025px) {
  .photos-side { align-self: stretch; }   /* the aside spans the editor's row, so the panel below can stick inside it */
  .photos-panels { position: sticky; top: calc(var(--topbar-height) + var(--space-4)); flex: none;
    height: calc(100vh - var(--topbar-height) - 2 * var(--space-4) - 4.5rem); display: flex; flex-direction: column; }   /* #1075: 4.5rem, the sticky bottom bar (.step-footer) */
  .photos-panels .mockups-pane.is-active { flex: 1 1 auto; min-height: 0; height: auto; padding-bottom: 3.5rem; }   /* the tab scrolls; its last row clears the Feedback bubble */
  .photos-panels .mockups-design-tiles { max-height: none; overflow: visible; }
}
/* the edit bar: amber, above the photo, while an edit is held or the photo was never rendered (role=status) */
.edit-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-2);
  padding: var(--space-2) var(--space-3); border: 1px solid var(--color-warning); border-radius: var(--radius-md); background: var(--color-warning-bg); }
.edit-bar__words { margin: 0; font-size: var(--text-sm); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); min-width: 0; }
.edit-bar__all { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 40px; font-weight: 600; }
.edit-bar__all input { width: 18px; height: 18px; }
.edit-bar__acts { display: inline-flex; gap: var(--space-2); }
.edit-bar__acts form { display: contents; }
.edit-bar .btn-sm { min-height: 40px; }
/* #1163 PR 2 (the owner, 15 Nov: "the page is jumpy with every action"): nothing above the photo moves it.
   - The bar's row keeps its height when nothing is held: hidden, never removed (the owner's question 1 is open; the planner's
     recommendation). Its words take one line, cut with an ellipsis (their whole is the title), so the row is the same height shown or
     hidden, at every width.
   - The photo's name takes one line, so a photo with a longer name opens at the same place.
   - Remove fit keeps its room while it is hidden, so the fit bar never rewraps when the first stroke saves a fit.
   - The page's words sit in the title's row, at its right (templates/design_mockups.html), so a note coming or going never moves the
     strip or the photo; below 768 px they keep a one-line row of their own under the title.
   - The strip's header keeps one line per part: the count and the colors line are cut with an ellipsis (the count's whole is its title;
     the colors' is in their panel), so the colors line changing its words (a tag chip, a render landing) never rewraps the header.
     Below 768 px each part has a row of its own.
   - The browser never anchors its scroll inside the strip: a tile's state line going as its render lands moved the anchor by 2 px,
     and the browser scrolled the whole page after it. */
.photo-strip, .photos-messages { overflow-anchor: none; }
.photos-page .edit-bar.is-gone { display: flex; visibility: hidden; }
.photos-page .edit-bar__words { flex-wrap: nowrap; min-width: 0; flex: 1 1 0; min-height: 40px; }
.photos-page .edit-bar__words [data-edit-bar-words] { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.photos-page .edit-bar__all { flex: 0 0 auto; }
.photos-stage-card__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.photos-page .fit-bar__group.is-gone { display: inline-flex; visibility: hidden; }
.photo-strip__head { flex-wrap: nowrap; }
.photo-strip__head > h2 { flex: none; }
.photo-strip__head [data-strip-count] { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.photo-strip__head .photo-colors { flex: 0 1 auto; }
.photo-strip__head .photo-colors__line { flex-wrap: nowrap; min-width: 0; }
.photo-strip__head .photo-colors__label { white-space: nowrap; }
.photo-strip__head .photo-colors__dots { flex-wrap: nowrap; }
.photo-strip__head .photo-colors__count { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 767px) {
  .photo-strip__head { flex-wrap: wrap; }
  .photo-strip__head [data-strip-count], .photo-strip__head .photo-colors { flex: 1 0 100%; margin-left: 0; }
}
.photos-head { flex-wrap: nowrap; }   /* the words' column has one width, said or not, so the title never rewraps around them */
.photos-head .photos-head__titles { flex: 1 1 auto; }
.photos-head .photos-messages { flex: 0 0 18rem; min-width: 0; text-align: right; }
.photos-messages > p { margin: 0; }
@media (max-width: 767px) {
  .photos-head { flex-wrap: wrap; }
  .photos-head .photos-messages { flex-basis: 100%; min-height: 1.43rem; text-align: left; }
}
/* ---- #1178 (the owner, 17 Nov; her approved mockup, laptop 1366x768 and phone 390x844): Mock Ups fitted to the screen. The page is
   exactly the window's height under the top bar, so the page itself never scrolls (with 30 mock ups and 15 designs too): the title row
   is locked at the top and the Save and close bar at the bottom, and between them only two things scroll, each inside itself: the Mock
   Ups strip and the right panel. The photo takes the space that is left and never moves while either one scrolls. A laptop and a
   landscape iPad (1024 px and wider) have the strip down the left side; a portrait iPad and a phone keep it on top, scrolling sideways,
   with the right panel under the photo. Layout only: every control is where its markup puts it, with its behavior unchanged. ---- */
main.wrap-fit { display: flex; flex-direction: column; box-sizing: border-box; height: calc(100vh - var(--topbar-height)); height: calc(100dvh - var(--topbar-height));
  min-height: 30rem; }
body .app-shell > main.wrap-fit { padding: var(--space-3) var(--space-4) 0; }   /* beats the Feedback bubble's room under the page: the bar below clears it */
main.wrap-fit > * { flex: none; }
/* the legal footer sits below the page in the shell; on this one page it would be the only thing the page scrolled to, so it is not
   drawn here (every other page keeps it, and it stays in the markup) */
.app-shell:has(> main.wrap-fit) > .legal-footer { display: none; }
main.wrap-fit .photos-head { margin-bottom: var(--space-3); align-items: center; }
main.wrap-fit .photos-head__titles { flex-direction: row; align-items: baseline; gap: var(--space-3); }
main.wrap-fit .photos-head__back { flex: none; white-space: nowrap; }
main.wrap-fit .photos-head__titles h1 { min-width: 0; font-size: var(--text-xl); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
main.wrap-fit .photos-page { flex: 1 1 0; min-height: 0; }
main.wrap-fit .photos-page > .card { margin-bottom: 0; }
main.wrap-fit .step-footer { margin-top: var(--space-3); }
/* the strip: its row scrolls inside itself, never the page; the header stays put above it, so the colors line's panel opens over the
   page and is never cut off by the row's scroll */
main.wrap-fit .photo-strip { display: flex; flex-direction: column; min-height: 0; padding: var(--space-3); }
main.wrap-fit .photo-strip__head { flex: none; }
main.wrap-fit .photo-strip__row { overscroll-behavior: contain; }
main.wrap-fit .photos-empty { min-height: 0; flex: 1 1 0; }
/* the editor: the photo's column, then the right panel; each fills the height that is left */
main.wrap-fit .photos-editor { min-height: 0; flex: 1 1 0; }
main.wrap-fit .photos-stage-card { display: flex; flex-direction: column; min-height: 0; padding: var(--space-3) var(--space-4); margin-bottom: 0; }
main.wrap-fit .photos-stage-card > * { flex: none; }
/* the photo's frame: the same 4:3 box as before (.mockups-preview-frame), as large as fits in the space that is left, centered. A wider
   box would leave no band above and below a photo, where a layer hanging past the photo's edge keeps its corner and turn handles on
   screen (the frame clips, #694 PR C) */
main.wrap-fit .photos-stage-card > .photos-frame { flex: 1 1 0; min-height: 8rem; width: auto; max-width: 100%; align-self: center; }
/* the two status lines under the photo: one fixed height, so their words (a save's, Erase's) never resize the photo */
main.wrap-fit .photos-status { height: calc(2 * 1.45em); margin-top: var(--space-2); overflow-y: auto; font-size: var(--text-sm); line-height: 1.45; }
main.wrap-fit .photos-status > p { margin: 0; padding: 0; text-align: left; font-size: inherit; line-height: inherit; }   /* #1304: the box's own size, so two lines fill it exactly */
/* #1229 (the owner, 19 Nov): the render's bar is a quiet line along the top of the status box, never over the photo (it was a panel on the
   photo's foot); its words are for a screen reader. The box's height is unchanged, so nothing moves the photo (#1178) */
main.wrap-fit .photos-status { position: relative; }
main.wrap-fit .photos-status > .mockups-render-progress { top: 0; right: 0; bottom: auto; left: 0; gap: 0; padding: 0; border-radius: 0; background: none; }
main.wrap-fit .photos-status > .mockups-render-progress .progress { height: 3px; }
/* the right panel: one column that scrolls inside itself (the Designs and Layers card grows with its tab, so the panel has one scroll) */
main.wrap-fit .photos-side { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; align-self: stretch; padding-bottom: 3.5rem; }   /* its last row clears the Feedback bubble */
main.wrap-fit .photos-side > .card { margin-bottom: 0; flex: none; padding: var(--space-4); }   /* the library keeps three tiles across, as before */
main.wrap-fit .photos-panels { position: static; height: auto; }
main.wrap-fit .photos-panels .mockups-pane.is-active { height: auto; overflow: visible; padding-bottom: 0; }
main.wrap-fit .photos-panels .mockups-design-tiles { max-height: none; overflow: visible; }
.photos-panels__head { display: flex; align-items: flex-end; gap: var(--space-2); }
.photos-panels__head .pane-tabs { flex: 1 1 auto; min-width: 0; }
.photos-panels__add { flex: none; margin-bottom: var(--space-3); white-space: nowrap; }
@media (min-width: 1024px) {
  main.wrap-fit .photos-page { flex-direction: row; align-items: stretch; }
  /* the strip down the left side: one column of tiles, "+ Add mock ups" at its top */
  main.wrap-fit .photo-strip { flex: none; width: 10rem; box-sizing: border-box; }
  main.wrap-fit .photo-strip__head { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: var(--space-1); }
  main.wrap-fit .photo-strip__head .photo-colors { margin-left: 0; }
  main.wrap-fit .photo-strip__head .photo-colors__line { flex-wrap: wrap; }
  main.wrap-fit .photo-strip__head .photo-colors__label { white-space: normal; }
  main.wrap-fit .photo-colors[open] .photo-colors__body { left: 0; right: auto; width: min(36rem, calc(100vw - 16rem)); }   /* over the photo, never cut off */
  main.wrap-fit .photo-strip__row { flex: 1 1 0; min-height: 0; height: auto; flex-direction: column; align-items: center; overflow-x: hidden; overflow-y: auto;
    padding: 3px 0; scrollbar-gutter: stable both-edges; }
  main.wrap-fit .photo-strip__list, main.wrap-fit .photo-strip__videos { flex-direction: column; }
  main.wrap-fit .photo-strip .photo-tile { flex: none; }
  main.wrap-fit .photo-strip .photo-tile--add { height: auto; }
  main.wrap-fit .photo-strip .photo-tile--add .photo-tile__add { height: 2.75rem; }
  main.wrap-fit .photos-editor { grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem); grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  /* the photo's column as a grid: the fit tools on the first row; the photo's name, Remove fit and zoom on the second; then the held
     edits' bar, the photo (every row that is left) and its two status lines. The fit bar's own box is not drawn (display: contents),
     so its groups are this grid's cells; nothing in it changes */
  main.wrap-fit .photos-stage-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
    column-gap: var(--space-2); row-gap: 0; }
  main.wrap-fit .photos-stage-card > * { grid-column: 1 / -1; min-width: 0; }
  main.wrap-fit .photos-stage-card > .fit-bar { display: contents; }
  main.wrap-fit .fit-bar > .fit-bar__group { grid-row: 2; grid-column: auto; align-self: center; margin-bottom: var(--space-2); }
  main.wrap-fit .fit-bar > .fit-bar__tools { grid-row: 1; grid-column: 1 / -1; justify-self: start; margin-bottom: var(--space-2); }
  main.wrap-fit .fit-bar__zoom { margin-left: 0; }
  main.wrap-fit .photos-stage-card__name { grid-row: 2; grid-column: 1; align-self: center; margin: 0 0 var(--space-2); }
  main.wrap-fit .photos-stage-card > .edit-bar { grid-row: 3; }
  main.wrap-fit .photos-stage-card > p { grid-row: 4; }
  main.wrap-fit .photos-stage-card > .photos-frame { grid-row: 5; min-height: 6rem; height: 100%; width: auto; max-width: 100%; justify-self: center; }
  main.wrap-fit .photos-stage-card > .photos-status, main.wrap-fit .photos-stage-card > p:last-child { grid-row: 6; }
}
@media (max-width: 1023px) {
  /* a portrait iPad and a phone: the strip on top, scrolling sideways; the photo, then the right panel under it, scrolling inside itself */
  main.wrap-fit .photos-page { gap: var(--space-3); }
  main.wrap-fit .photo-strip { flex: none; }
  main.wrap-fit .photo-strip__head { flex-wrap: wrap; row-gap: 0; }
  main.wrap-fit .photo-strip__head [data-strip-count] { flex: 1 1 0; }   /* beside the title, cut with an ellipsis */
  main.wrap-fit .photo-strip__head .photo-colors { flex: 1 0 100%; min-width: 0; }
  main.wrap-fit .photo-strip__head .photo-colors__line { overflow: hidden; }   /* its own row; the words never push the page wider */
  main.wrap-fit .photos-editor { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-3); }
  main.wrap-fit .photos-stage-card { flex: 3 1 0; }
  main.wrap-fit .photos-side { flex: 2 1 0; padding-bottom: var(--space-3); }
  /* the fit tools on one row that scrolls sideways inside itself, every tool kept; the "?" words open below the row, over the photo */
  main.wrap-fit .fit-bar { position: static; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; overscroll-behavior-x: contain; }
  main.wrap-fit .fit-bar__group { flex-wrap: nowrap; flex: none; }
  main.wrap-fit .fit-help { position: static; }
  main.wrap-fit .photos-stage-card { position: relative; }
  main.wrap-fit .fit-help__words { top: 3.75rem; left: var(--space-3); right: var(--space-3); width: auto; }
  /* the bottom bar keeps its two buttons on one row */
  main.wrap-fit .step-footer { flex-direction: row; align-items: center; }
  main.wrap-fit .step-footer .btn { flex: 1 1 0; }
}
@media (max-width: 767px) {
  /* a phone: the photo keeps a fixed share of the screen and the right panel takes what is left, scrolling inside itself. To make room,
     the strip's header is one row, the held edits' bar is one row (its words cut with an ellipsis, their whole in the title, as on a
     laptop), the photo's name is kept for screen readers only (the selected tile shows which photo it is), and the bottom bar is
     slimmer. Every control is still on screen or one scroll of its own box away */
  main.wrap-fit .photo-strip { padding: var(--space-2) var(--space-3); }
  main.wrap-fit .photo-strip__head { flex-wrap: nowrap; margin-bottom: var(--space-1); }
  main.wrap-fit .photo-strip__head [data-strip-count] { flex: 1 1 0; }
  main.wrap-fit .photo-strip__head .photo-colors { flex: 0 1 45%; }
  main.wrap-fit .photo-strip__head .photo-colors__line { flex-wrap: nowrap; }
  main.wrap-fit .photo-strip__head .photo-colors__label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* the dots and the count show; the words stay for screen readers */
  main.wrap-fit .photos-stage-card { flex: none; padding: var(--space-2) var(--space-3); }
  main.wrap-fit .photos-stage-card > .photos-frame { flex: none; height: clamp(8rem, 25vh, 20rem); min-height: 0; width: auto; max-width: 100%; align-self: center; }
  /* one line on a phone, one fixed height, so words that change never move or resize the photo (#1178). #1304 (the owner, 23 Nov):
     longer words (Magic Fit's no-edge line) wrap whole, never cut off: they show over the top of the right panel below, on the card's
     own background, and nothing moves */
  main.wrap-fit .photos-status { height: 1.45em; margin-top: var(--space-1); overflow: visible; z-index: 5; }
  main.wrap-fit .photos-status > p:not(:empty) { position: relative; background: var(--color-bg-surface); }
  main.wrap-fit .photos-side { flex: 1 1 0; min-height: 5rem; }
  main.wrap-fit .photos-stage-card__name { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  main.wrap-fit .photos-page .edit-bar { flex-wrap: nowrap; padding: var(--space-1) var(--space-2); }
  main.wrap-fit .photos-page .edit-bar__acts { width: auto; flex: none; }
  main.wrap-fit .photos-page .edit-bar__acts .btn { flex: none; }
  main.wrap-fit .step-footer { padding: var(--space-2) 0; margin-top: var(--space-2); }
  main.wrap-fit .photos-page, main.wrap-fit .photos-editor { gap: var(--space-2); }
  main.wrap-fit .photos-head { margin-bottom: var(--space-2); }
  body .app-shell > main.wrap-fit { padding-top: var(--space-2); }
}
/* #1178 round 2 (the owner, comment 6968450614): on a phone, Re-add, Redo, Show fit and "?" are in the fit bar's "⋯" menu (More fit
   tools), and Move, Erase, Brush and Undo stay in the bar. The menu is a <details>; static/mockup_fit.js moves those four into it on a
   phone and back to their places on a wider screen, where the menu is not drawn. Its list opens under the bar, over the photo, so the
   bar's sideways scroll never cuts it off and opening it moves nothing */
.fit-more { display: none; }
@media (max-width: 767px) {
  .fit-bar__tools > [data-fit-more-item] { display: none; }   /* until the script has them in the menu: no jump as the page opens */
  .fit-more { display: block; flex: none; }
  .fit-more__btn { list-style: none; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 0 var(--space-2);
    font-size: var(--text-lg); line-height: 1; cursor: pointer; }
  .fit-more__btn::-webkit-details-marker { display: none; }
  .fit-more__btn::marker { content: ""; }
  .fit-more__btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
  .fit-more[open] > .fit-more__btn { background: var(--color-selected-bg); color: var(--color-brand); }
  .fit-more__menu { position: absolute; z-index: 8; top: 3.5rem; right: var(--space-3); display: flex; flex-direction: column; align-items: stretch;
    gap: var(--space-1); min-width: 10rem; max-width: calc(100% - 2 * var(--space-3)); padding: var(--space-1); background: var(--color-bg-surface);
    border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-popover); }
  .fit-more__menu > button { justify-content: flex-start; }
  .fit-more__menu .fit-help { display: block; padding: var(--space-1) var(--space-2); }
  .fit-more__menu .fit-help__words { position: static; width: auto; margin-top: var(--space-1); box-shadow: none; }
  /* the mockup's bar, so Undo and the ⋯ sit in view at 390: slimmer buttons, a 64 px brush (its number kept for screen readers; the
     slider says its value too) and no rule between the brush and Undo */
  main.wrap-fit .fit-bar__tools > .btn-sm { padding: 0 var(--space-2); }
  main.wrap-fit .fit-bar__tools > .fit-bar__sep { display: none; }
  main.wrap-fit .fit-brush { margin: 0; }
  main.wrap-fit .fit-brush input[type=range] { width: 64px; }
  main.wrap-fit .fit-brush output { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* on a short phone (390x700) the photo gives way, down to 6rem, before the right panel would run under the bottom bar */
  main.wrap-fit .photos-stage-card { flex: 0 1 auto; min-height: 0; }
  main.wrap-fit .photos-stage-card > .photos-frame { flex: 0 1 auto; min-height: 6rem; }
  /* the strip's tiles are 64 px, as on the mockup, so the right panel has the room. Each keeps its pick, drag, ⋯ menu and state line:
     the number and "Main" on the picture's left, the ⋯ at its top right. The caption is kept for screen readers only (the picture shows
     which photo it is). AMENDED by #1398 (the owner, 26 Nov 2026): Enlarge, × and the tag chip left the tile; its flags ("Color?") sit
     in the chip's old row under the picture, one line cut with an ellipsis, the row kept on every tile so every tile is one height */
  main.wrap-fit .photo-strip .photo-tile { flex: 0 0 64px; width: 64px; height: auto; }
  main.wrap-fit .photo-tile__pick { width: 64px; gap: 2px; }
  main.wrap-fit .photo-tile__pic, main.wrap-fit .photo-tile__img, main.wrap-fit .photo-tile__video { width: 64px; height: 64px; }
  main.wrap-fit .photo-tile__pic { --tile-px: 64; }   /* #1329: the drawing over a tile scales with it */
  main.wrap-fit .photo-tile__label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  main.wrap-fit .photo-tile__line { max-width: 64px; }
  main.wrap-fit .photo-tile__flags { position: static; height: 20px; max-width: 64px; align-items: center; }
  main.wrap-fit .photo-tile__n { top: 3px; left: 3px; }
  main.wrap-fit .photo-tile__main { top: 25px; bottom: auto; left: 3px; }   /* #1398: clear of the ⋯ (it touched it by 1 px) */
  main.wrap-fit .photo-tile__menu { top: 3px; right: 0; }
  main.wrap-fit .photo-tile__menu .tile-menu__btn { width: 24px; min-width: 24px; height: 24px; min-height: 24px; padding: 0; }
  main.wrap-fit .photo-tile__menu .tile-menu__btn svg { width: 14px; height: 14px; }
  main.wrap-fit .photo-strip__row { height: auto; gap: var(--space-2); }   /* the row is as tall as its tiles (was 160 px for the 104 px ones) */
  main.wrap-fit .photo-strip .photo-tile--add { height: auto; }
  main.wrap-fit .photo-strip .photo-tile--add .photo-tile__add { height: 64px; padding: var(--space-1); font-size: var(--text-xs); }
}
/* ---- #1202 (the owner, 17 Nov: "that same concept on the placement page"): Design placement and colors fitted to the screen, on
   #1178's main.wrap-fit above. The page is the window's height under the top bar and never scrolls itself: the title row is locked at
   the top and the Save and close bar at the bottom, and between them the left panel (colors and sizes) and the right panel (its tab's
   content, as before: #498) each scroll inside themselves. The canvas takes the height that is left and never moves while either one
   scrolls; the notes under it are one box of a bounded height that scrolls inside itself. The page-wide form (#colors-form) is the
   column; the forms and dialogs after it are hidden or open over the page. Below 640 px the "too narrow" notice stands in for the
   editor, as before, between the same two bars. Layout only: every control is where its markup puts it, with its behavior unchanged. ---- */
main.wrap-fit > #colors-form { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
main.wrap-fit #colors-form > * { flex: none; }
/* the title row: the step's name and its subtitle on one line, the subtitle cut with an ellipsis (its title keeps the whole); a product's
   Delete and Try again stay in the row, under them */
main.wrap-fit .editor-title { margin-bottom: var(--space-3); }
main.wrap-fit .editor-title > div { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-3); min-width: 0; width: 100%; }
main.wrap-fit .editor-title h1 { flex: none; margin: 0; font-size: var(--text-xl); white-space: nowrap; }
main.wrap-fit .editor-title .subtitle { flex: 1 1 12rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
main.wrap-fit .placement-product-acts { flex: 1 0 100%; margin-top: 0; align-items: center; }
main.wrap-fit #colors-form > .editor-3col { flex: 1 1 0; min-height: 0; align-items: stretch; gap: var(--space-4); }
main.wrap-fit .editor-col { min-height: 0; box-sizing: border-box; }
/* the left panel: one column that scrolls inside itself down to its last size. The colors list keeps its own box (#379), at most half
   the panel's height, so the sizes are a short scroll away */
main.wrap-fit .editor-col-left { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; container-type: size; }
main.wrap-fit .variants-list { max-height: clamp(8rem, 50cqh, 420px); overscroll-behavior: contain; }
/* the canvas's column: its header, the canvas (every pixel that is left), the notes' box and Undo and Redo */
main.wrap-fit .editor-col-center { display: flex; flex-direction: column; overflow: hidden; }
main.wrap-fit .editor-col-center > * { flex: none; }
main.wrap-fit .editor-col-center > .canvas-frame { flex: 1 1 0; min-height: 10rem; display: flex; flex-direction: column; }
main.wrap-fit .canvas-viewport { flex: 1 1 0; min-height: 0; height: auto; }
main.wrap-fit .canvas-notes { flex: 0 1 auto; min-height: 1.5rem; max-height: 4.5rem; overflow-y: auto; overscroll-behavior: contain; }
/* the right panel: the full height between the bars, no longer sticky; its header and tab bar stay put and its tab scrolls (#498) */
main.wrap-fit .editor-col-right { position: static; height: auto; align-self: stretch; }
main.wrap-fit .layers-tab-panel-list { padding-bottom: 3.5rem; }   /* its last row clears the Feedback bubble (#1178's right panel) */
/* the lock's words for screen readers are clip-hidden at position: absolute; their box is the lock's own, inside the tab's scroll, so
   they never reach past it and lengthen the page (it was .layers-tab-body, outside the scroll) */
main.wrap-fit .placement-lock { position: relative; }
main.wrap-fit .step-footer { margin-top: var(--space-3); }
@media (min-width: 1024px) and (max-width: 1200px) {
  /* a small laptop window and a landscape iPad (was: the canvas across the top and the two panels under it, in a page that scrolled):
     the three columns, as on a wider laptop, the panels a little narrower so the canvas keeps its room */
  main.wrap-fit #colors-form > .editor-3col { flex-wrap: nowrap; }
  main.wrap-fit .editor-col-center { order: 0; flex: 1 1 auto; }
  main.wrap-fit .editor-col-left { flex: 0 0 220px; }
  main.wrap-fit .editor-col-right { flex: 0 0 280px; }
}
@media (max-width: 1023px) {
  /* a portrait iPad (was: the canvas across the top and the two panels under it, in a page that scrolled): the canvas, and the colors
     and sizes under it, in the first column; the right panel beside them the full height, so the canvas keeps two thirds of the height
     and the Design library the room it had (#498). Each panel scrolls inside itself, as on a laptop */
  main.wrap-fit #colors-form > .editor-3col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 300px); grid-template-rows: minmax(0, 2fr) minmax(0, 1fr); }
  main.wrap-fit .editor-col-center { grid-column: 1; grid-row: 1; }
  main.wrap-fit .editor-col-left { grid-column: 1; grid-row: 2; }
  main.wrap-fit .editor-col-right { grid-column: 2; grid-row: 1 / span 2; }
}
/* the bar keeps #300's rule (the owner, 2026-10-09) on this page: on a phone, Save and close takes the bar's full width, below Cancel
   (#1178's bar on Mock Ups puts the two on one row below 1024 px; Mock Ups is not in #300's pages, this one is) */
@media (max-width: 767px) {
  main.wrap-fit #colors-form > .step-footer { flex-direction: column; align-items: stretch; }
  main.wrap-fit #colors-form > .step-footer .btn { flex: none; }
}
@media (max-width: 639px) {
  /* a phone: the "too narrow" notice in the editor's place (as before), the bar at the bottom */
  main.wrap-fit #colors-form > .editor-3col { display: none; }
  main.wrap-fit #colors-form > .editor-too-narrow { flex: 1 1 0; min-height: 0; overflow-y: auto; }
  main.wrap-fit #colors-form > .closest-notes--narrow { flex: none; }
}
/* #1163 PR 2: a picture tile pressed (a library design added to the photo) keeps its picture; its busy words show over it
   (static/busy.js), so the grid is not drawn again when the answer lands */
.mockups-design-tile { position: relative; }
.busy-over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: inherit;
  background: var(--color-bg-surface); opacity: 0.9; font-size: var(--text-xs); font-weight: 600; color: var(--color-text); }
/* the empty state: one card the editor's height and its one start */
.photos-empty { min-height: 38rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); text-align: center; padding: var(--space-8); box-sizing: border-box; }
.photos-empty h2 { font-size: var(--text-xl); }
.photos-empty__words { max-width: 33rem; margin: 0; color: var(--color-text-secondary); }
.photos-empty__add { min-height: 48px; padding: 0 var(--space-6); font-size: var(--text-md); }
/* "+ Add photos": the chips (the other kinds disabled until #692), a grid of tick tiles, the footer */
/* #935 (the owner, 2026-11-04: "a set size so it doesn't resize with the change of each tab"): one height whichever chip is shown; the
   head, chips and foot stay put and only the grid scrolls. At phone width it takes the screen's height. */
.add-photos { max-width: 55rem; width: calc(100vw - 2rem); height: min(85vh, 48rem); max-height: calc(100vh - 2rem); display: none; flex-direction: column; gap: var(--space-3); box-sizing: border-box; }
.add-photos[open] { display: flex; }
@media (max-width: 600px) { .add-photos { height: calc(100vh - 2rem); height: calc(100dvh - 2rem); } }   /* #939 review: the phone's visible height (dvh), 100vh where dvh is unknown */
.add-photos__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.add-photos__head h2 { margin: 0 0 var(--space-1); font-size: var(--text-lg); }
.add-photos__head p { margin: 0; }
/* #1075 item 1: "Create design chooser photo", moved here from under the strip (a multi-design listing with no chooser photo yet) */
.add-photos__chooser { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3);
  margin: var(--space-3) 0 0; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg-subtle); }
.add-photos__chooser-words { margin: 0; flex: 1 1 18rem; }
.add-photos__close { width: 44px; min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.add-photos__chips { position: static; padding-bottom: 0; margin-bottom: 0; }
.filter-chip[role="tab"][aria-selected="true"] { border: 2px solid var(--color-selected-border); background: var(--color-selected-bg); font-weight: 600; }
.add-photos__note { margin: 0; }
/* #1515: Upload photos and From Canva, a fixed row above the chips (was: two dashed tiles at the end of the grid). The file input is the
   control, visually hidden; its label is the button and shows its focus ring */
.add-photos__actions { display: flex; flex-direction: column; gap: var(--space-1); }
.add-photos__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.add-photos__hint { margin: 0; }
.add-upload__pick, .add-canva-btn { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; cursor: pointer; text-decoration: none; }
.add-upload__icon { display: inline-flex; }
.add-upload__icon svg { width: 20px; height: 20px; }
.add-canva-btn__mark { width: 20px; height: 20px; }
.add-upload__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.add-upload__input:focus-visible + .add-upload__pick { outline: 3px solid var(--color-focus); outline-offset: 2px; }
/* #1533: Free mockups' Scene / Size / Color filters, one row under the chips (wrapping on a phone), and a scene card's size chips */
.add-photos__filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.add-filter { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-sm); }
.add-filter__words { font-weight: 600; }
.add-filter__select { width: auto; max-width: 12rem; min-height: 36px; padding-top: 0; padding-bottom: 0; font-size: var(--text-sm); }
@media (max-width: 600px) {   /* #1533: a phone keeps the filters to one row, each word over its select, so the grid keeps its room */
  .add-photos__filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: var(--space-1) var(--space-2); }
  .add-filter { flex-direction: column; align-items: stretch; gap: 0; font-size: var(--text-xs); min-width: 0; }
  .add-filter__select { max-width: none; width: 100%; }
  .add-photos__filters .add-photos__link { font-size: var(--text-xs); padding-bottom: var(--space-2); }
  .add-photos__hint { font-size: var(--text-xs); }
}
.add-photos__link { background: none; border: 0; padding: 0; color: var(--color-brand); font: inherit; font-size: var(--text-sm); font-weight: 600; text-decoration: underline; cursor: pointer; }
.add-scene { display: flex; flex-direction: column; }
.add-scene > .tick-tile { height: auto; flex: 1 1 auto; }
.add-scene__sizes { display: flex; flex-wrap: wrap; gap: var(--space-1); padding-top: var(--space-1); }
.add-size { position: relative; display: inline-flex; }
.add-size__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.add-size__chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--space-2); border: 1px solid var(--color-border-strong); border-radius: 999px;
  background: var(--color-bg-surface); font-size: var(--text-xs); cursor: pointer; overflow-wrap: anywhere; }
.add-size__input:checked + .add-size__chip { border: 2px solid var(--color-selected-border); background: var(--color-selected-bg); font-weight: 600; padding: 0 calc(var(--space-2) - 1px); }
.add-size__input:focus-visible + .add-size__chip { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.add-size__input:disabled + .add-size__chip { cursor: not-allowed; color: var(--color-disabled-text); border-color: var(--color-disabled-border); background: var(--color-disabled-bg); }
.filter-chip:disabled { cursor: not-allowed; color: var(--color-disabled-text); border-color: var(--color-disabled-border); background: var(--color-disabled-bg); }
.add-photos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); align-content: start; gap: var(--space-3); overflow-y: auto; scrollbar-gutter: stable; min-height: 0; flex: 1 1 auto; padding: 3px; }   /* #935: rows at the top of the fixed area, never stretched; the scrollbar's room kept on every chip, so the tiles keep their width */
.add-photos__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3);
  border-top: 1px solid var(--color-border); padding-top: var(--space-3); }
.add-photos__foot p { margin: 0; }
/* #1019 PR 3b: the Starter mockups chip's group headings and lines span the grid; a starter copied where it can't picture this product
   can't be ticked; a starter that couldn't be copied is said in the foot, on a line of its own */
.add-photos__group { grid-column: 1 / -1; margin: var(--space-2) 0 0; }
h3.add-photos__group { font-size: var(--text-sm); font-weight: 600; }
.add-photos__more { display: flex; justify-content: center; padding: var(--space-2) 0; }   /* #1459: a product's "Show N more", its next page read as she scrolls near it */
.tick-tile--off { cursor: default; background: var(--color-bg-subtle); }
.tick-tile--off:hover { border-color: var(--color-border); }
.add-photos__refused { flex: 1 0 100%; }
/* #1523: what "+ Upload a photo" says (made smaller before it was sent, refused), beside it, the grid's full width */
.add-photos__said { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; overflow-wrap: anywhere; }
.add-photos__said p { margin: 0; }
.add-photos__acts { display: inline-flex; gap: var(--space-2); }
/* the tick tile: the checkbox is the control (visually hidden, focusable), its label the tile; ticked, the selection border and a check */
.tick-tile-wrap { position: relative; min-width: 0; }
.tick-tile__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tick-tile { display: flex; flex-direction: column; gap: var(--space-1); height: 100%; padding: var(--space-2); box-sizing: border-box; cursor: pointer;
  border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg-surface); }
.tick-tile:hover { border-color: var(--color-border-strong); }
.tick-tile__pic { display: block; aspect-ratio: 1 / 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--stone-100); }
.tick-tile__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tick-tile__check { position: absolute; top: calc(var(--space-2) + 4px); left: calc(var(--space-2) + 4px); width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--color-border-strong); background: var(--color-bg-surface); box-sizing: border-box; }
.tick-tile__name { font-size: var(--text-sm); font-weight: 600; overflow-wrap: anywhere; }
.tick-tile__kind { font-size: var(--text-xs); }
.tick-tile__variant { font-size: var(--text-xs); overflow-wrap: anywhere; }   /* #1328: "Fine Art · 10″ x 8″ (Horizontal)" wraps, never scrolls */
.tick-tile__input:checked + .tick-tile { border: 2px solid var(--color-selected-border); background: var(--color-selected-bg); padding: calc(var(--space-2) - 1px); }
.tick-tile__input:checked + .tick-tile .tick-tile__check { background: var(--color-brand); border-color: var(--color-brand); }
.tick-tile__input:checked + .tick-tile .tick-tile__check::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px;
  border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tick-tile__input:focus-visible + .tick-tile { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.tick-tile-wrap .tile-menu { position: absolute; top: var(--space-1); right: var(--space-1); }
@media (max-width: 1024px) {
  .photos-editor { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .photos-empty { min-height: 26rem; padding: var(--space-5); }
  .edit-bar__acts { width: 100%; }
  .edit-bar__acts .btn { flex: 1 1 0; }
}
/* #704: the legal pages (/privacy, /terms) and the legal footer. The pages stand alone, as the sign-in page does: a readable measure, the
   inventory table as blocks below 640 px so the page never scrolls sideways. The footer is one line of links and Etsy's notice: on a
   signed-in page it is the shell grid's second row in the content column (the rail spans both rows), padded below so the fixed
   feedback bubble never covers it. */
.legal { max-width: 44rem; margin: 0 auto; padding: var(--space-8) var(--space-4) var(--space-6); line-height: 1.6; overflow-wrap: break-word; }
.legal__logo { display: inline-block; margin-bottom: var(--space-6); }
.legal__logo img { display: block; height: 32px; width: auto; }
.legal h1 { font-size: var(--text-2xl); line-height: 1.25; margin: 0 0 var(--space-2); }
.legal h2 { font-size: var(--text-lg); margin: var(--space-8) 0 var(--space-2); scroll-margin-top: var(--space-4); }
.legal__updated { color: var(--color-text-secondary); margin-top: 0; }
.legal__contents ol { padding-left: 1.5rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: var(--space-2); }
.legal code { overflow-wrap: anywhere; }
.legal__table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.legal__table th, .legal__table td { text-align: left; vertical-align: top; padding: var(--space-3); border-bottom: 1px solid var(--color-border); }
.legal__table thead th { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-secondary); }
.legal__never { padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg-surface); }
@media (max-width: 639px) {
  .legal { padding-top: var(--space-6); }
  .legal__table thead { display: none; }
  .legal__table, .legal__table tbody, .legal__table tr, .legal__table th, .legal__table td { display: block; width: auto; }
  .legal__table tr { padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
  .legal__table th, .legal__table td { padding: var(--space-1) 0; border-bottom: 0; }
}
.app-shell { grid-template-rows: 1fr auto; }
.app-shell > .app-rail { grid-row: 1 / span 2; }
.legal-footer { font-size: var(--text-xs); color: var(--color-text-secondary); padding: var(--space-4) 0 var(--space-6); border-top: 1px solid var(--color-border); margin-top: var(--space-8); }
.legal-footer p { margin: 0 0 var(--space-1); }
.app-shell > .legal-footer { grid-column: -2 / -1; min-width: 0; margin-top: 0; padding: var(--space-4) max(var(--space-6), calc((100% - var(--content-max)) / 2)) calc(var(--space-12) + var(--space-8)); }
.signin { align-content: center; }   /* the card and the footer below it sit together in the middle, never split across the page */
.signin > .legal-footer { width: 100%; max-width: 26rem; margin-top: var(--space-4); border-top: 0; text-align: center; }
@media (max-width: 767px) { .app-shell > .legal-footer { padding-left: var(--space-3); padding-right: var(--space-3); } }

/* #1012: the Mock Ups page's "Colors on this listing" line: one collapsed row above the strip, never inside the editor */
/* #1075 item 3: in the strip's header, at its right; open, the colors show in a panel over the strip, so nothing below moves */
.photo-colors { min-width: 0; margin-left: auto; }
.photo-strip__head .photo-colors__line { min-height: 24px; }   /* the header's own line height; 24px is WCAG 2.5.8's minimum target */
.photo-colors__line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); cursor: pointer; font-size: var(--text-sm); min-height: 32px; }
.photo-colors__line:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.photo-colors[open] .photo-colors__body { position: absolute; z-index: 6; top: 100%; right: 0; width: min(36rem, 100%); max-height: 50vh; overflow-y: auto;
  padding: var(--space-3); background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-popover); }
.photo-colors__label { font-weight: 600; }
.photo-colors__dots { display: inline-flex; flex-wrap: wrap; gap: 2px; }
.photo-colors__dot { width: 14px; height: 14px; stroke: rgba(0, 0, 0, 0.3); stroke-width: 0.8; fill: transparent; }
.photo-colors__count { color: var(--color-text-secondary); }
.photo-colors__body { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-2); }
.photo-colors__chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.photo-colors__chip { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-2); border: 1px solid var(--color-border); border-radius: 999px; font-size: var(--text-sm); }
.photo-colors__swatch { width: 16px; height: 16px; stroke: rgba(0, 0, 0, 0.3); stroke-width: 0.8; fill: transparent; flex: none; }
.photo-colors__mark { color: var(--color-success, var(--color-text-secondary)); font-weight: 600; }
.photo-colors__mark--none { color: var(--color-warning); font-size: var(--text-xs); }
.photo-colors__only { color: var(--color-text-secondary); font-size: var(--text-xs); }

/* #1115: the quick-start video. The page head's "Watch the quick start" (a quiet button on the right of the greeting; under it at
   phone width), and its dialog: the .dialog box, wider, with a 16:9 video; a near-full-screen sheet below 640px. */
.dashboard-quick-start { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; flex: none; white-space: nowrap; }
.dashboard-quick-start svg { flex: none; }
.quick-start { width: min(56rem, calc(100vw - 2rem)); max-width: none; max-height: 90vh; overflow-y: auto; }
.quick-start__head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.quick-start__head h2 { margin: 0; font-size: var(--text-lg); }
.quick-start__close { margin-left: auto; min-height: 44px; min-width: 44px; }
.quick-start__video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--color-bg-subtle); border-radius: var(--radius-md); }
@media (max-width: 639px) {
  .dashboard .page-head { flex-wrap: wrap; }
  .quick-start { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); padding: var(--space-3); }
}
