/* LayerUp Prints: shared design system.
   Quiet neutral UI, one orange accent, photo-first product cards (see docs/research-top5-sites.md §3).
   Page-specific styles live in css/pages/<page>.css. */

/* ---------- Font fallbacks (metric-matched to cut layout shift while web fonts load) ---------- */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 107%; ascent-override: 90%; descent-override: 22.5%; line-gap-override: 0%; }
@font-face { font-family: "Inter Tight Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 99%; ascent-override: 97%; descent-override: 24%; line-gap-override: 0%; }

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --surface: #f6f6f4;
  --surface-2: #eeeeea;
  --line: #e4e4e0;
  --line-strong: #cfcfca;
  --ink: #121316;
  --ink-2: #4a4d55;
  --muted: #6b6e77;          /* brief: #7C7F88, darkened to pass AA (5.1:1 on white) */
  --accent: #d4430e;         /* brief: #F2551D, darkened so white button text passes AA (4.6:1) */
  --accent-hover: #b8390a;
  --accent-tint: #fff1ea;
  --accent-brand: #f2551d;   /* the brand orange for marks and decoration, never for text */
  --on-accent: #ffffff;
  --accent-text: #b8390a;    /* orange TEXT on bg/surface/surface-2/tint: 5.0:1 or better */
  --success: #137a3a;        /* 4.66:1 on surface-2, 4.9:1 on tint, 5.4:1 on white */
  --on-success: #ffffff;     /* 5.4:1 */
  --danger: #c2341f;
  --warn: #8a5800;           /* 5.2:1 on surface-2 */
  --focus: #2b52fe;
  --field-border: #85888f;   /* form field borders: 3.5:1 on white, 3.05:1 on surface-2 */
  --overlay: rgb(10 11 14 / 0.5);
  --shadow-hover: 0 6px 20px rgb(0 0 0 / 0.08);
  --shadow-pop: 0 12px 32px rgb(0 0 0 / 0.14);

  --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", "Inter Tight Fallback", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --t-xs: 0.75rem;   /* 12 */
  --t-sm: 0.875rem;  /* 14 */
  --t-md: 1rem;      /* 16 */
  --t-lg: 1.125rem;  /* 18 */
  --t-xl: 1.375rem;  /* 22 */
  --t-2xl: 1.75rem;  /* 28 */
  --t-3xl: 2.25rem;  /* 36 */
  --t-4xl: 3rem;     /* 48 */

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --radius: 8px;
  --radius-btn: 6px;
  --radius-pill: 999px;
  --header-h: 64px;
  --announce-h: 34px;        /* shipping banner (one line, 18px text + 8px padding) */
  --strip-h: 45px;           /* category strip under the header */
  --max: 1280px;

  /* Stacking order, lowest to highest. */
  --z-raised: 20;            /* popovers inside the page (share QR) */
  --z-fab: 40;               /* shop's floating "Filter & sort" */
  --z-header: 50;            /* sticky header, product buy bar */
  --z-bar: 60;               /* cart checkout bar */
  --z-drawer: 70;            /* menu drawer */
  --z-scrim: 90;             /* filter sheet scrim */
  --z-sheet: 100;            /* filter sheet */
  --z-toast: 110;            /* toasts sit above everything except native dialogs */
  --z-skip: 120;             /* skip link */
  --gutter: 32px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Legacy aliases so older markup (admin.html) keeps working. Prefer the names above. */
  --fg: var(--ink);
  --bg-2: var(--surface-2);
  --accent-soft: var(--accent-tint);
  --accent-ink: var(--on-accent);
  --ok: var(--success);
  --radius-sm: var(--radius-btn);
  --step--1: var(--t-sm); --step-0: var(--t-md); --step-1: var(--t-lg); --step-2: var(--t-xl); --step-3: var(--t-2xl); --step-4: var(--t-3xl);

  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0f1013;
  --surface: #17181c;
  --surface-2: #202227;
  --line: #2c2e34;
  --line-strong: #3b3e46;
  --ink: #f3f3f1;
  --ink-2: #b4b6bc;
  --muted: #8f929a;
  --accent: #ff6a33;
  --accent-hover: #ff8152;
  --accent-tint: #2a1a13;
  --accent-brand: #ff6a33;
  --on-accent: #140a05;      /* dark text on the bright orange: 6.6:1 */
  --accent-text: #ff8152;    /* 6.4:1 or better on every dark surface */
  --success: #3fbf6e;
  --on-success: #0f1013;     /* 8:1 */
  --danger: #ff7a66;
  --warn: #f0b44c;
  --focus: #7d95ff;
  --field-border: #6a6e77;   /* 3.7:1 on bg, 3.1:1 on surface-2 */
  --overlay: rgb(0 0 0 / 0.62);
  --shadow-hover: none;
  --shadow-pop: 0 16px 40px rgb(0 0 0 / 0.5);
  color-scheme: dark;
}
/* No-JS fallback: follow the OS. (With JS, the inline head script always sets data-theme.) */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --bg: #0f1013; --surface: #17181c; --surface-2: #202227; --line: #2c2e34; --line-strong: #3b3e46;
    --ink: #f3f3f1; --ink-2: #b4b6bc; --muted: #8f929a; --accent: #ff6a33; --accent-hover: #ff8152;
    --accent-tint: #2a1a13; --accent-brand: #ff6a33; --on-accent: #140a05; --accent-text: #ff8152;
    --success: #3fbf6e; --on-success: #0f1013; --danger: #ff7a66; --field-border: #6a6e77;
    --warn: #f0b44c; --focus: #7d95ff; --overlay: rgb(0 0 0 / 0.62); --shadow-hover: none;
    --shadow-pop: 0 16px 40px rgb(0 0 0 / 0.5); color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); scrollbar-color: var(--line-strong) transparent; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 var(--t-md)/1.55 var(--font-body);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
main { display: block; min-height: 50vh; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
p a, .prose a, .link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); }
p a:hover, .prose a:hover, .link:hover { color: var(--accent); text-decoration-color: currentColor; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); color: var(--ink); margin: 0; line-height: 1.15; text-wrap: balance; font-weight: 600; }
h1 { font-size: var(--t-3xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
h2 { font-size: var(--t-2xl); letter-spacing: -0.015em; }
h3 { font-size: var(--t-xl); letter-spacing: -0.01em; }
h4 { font-size: var(--t-lg); letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; }
strong, b { font-weight: 600; color: var(--ink); }
small { font-size: var(--t-sm); }
code, kbd, pre { font-family: var(--font-mono); font-size: 0.9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }
::selection { background: color-mix(in srgb, var(--accent-brand) 26%, transparent); color: var(--ink); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
@media (max-width: 767px) {
  h1 { font-size: var(--t-2xl); }
  h2 { font-size: var(--t-xl); }
  h3 { font-size: var(--t-lg); }
}

/* ---------- Utilities ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Honeypot field for bots: off-screen (not display:none, which some bots skip). */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: var(--z-skip); background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-btn); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: var(--s4); }
.lede { font-size: var(--t-lg); line-height: 1.5; color: var(--ink-2); max-width: 62ch; }
/* Kept for old markup only: a quiet sentence-case label, no mono, no caps. */
.eyebrow { display: block; font: 500 var(--t-sm)/1.3 var(--font-body); color: var(--muted); }
.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.section { padding-block: var(--s8); }
.section + .section { padding-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s5); flex-wrap: wrap; margin-bottom: var(--s5); }
.section-head > div { display: grid; gap: var(--s1); min-width: 0; }
.section-head h2 { font-size: var(--t-2xl); }
.section-head .sub { color: var(--muted); font-size: var(--t-sm); }
.view-all { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-sm); font-weight: 500; color: var(--ink); text-decoration: none; padding-block: 6px; white-space: nowrap; }
.view-all .icon { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.view-all:hover { color: var(--accent); }
.view-all:hover .icon { transform: translateX(2px); }

.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); }
@media (max-width: 1279px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); } }

/* A row of cards: a 4-up grid on desktop, a scroll-snap carousel showing ~1.6 cards on phones. */
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--s5)) / 4); gap: var(--s5); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { scroll-snap-align: start; min-width: 0; }
@media (max-width: 1023px) { .row-scroll { grid-auto-columns: calc((100% - 2 * var(--s4)) / 2.6); gap: var(--s4); } }
@media (max-width: 767px) {
  .row-scroll {
    grid-auto-columns: calc((100% - var(--s3)) / 1.6); gap: var(--s3);
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; }
  .section { padding-block: 40px; }
  .section-head { margin-bottom: var(--s4); flex-wrap: nowrap; }
  .announce .more { display: none; }
  .section-head h2 { font-size: var(--t-xl); }
}

/* ---------- Buttons ---------- */
.btn {
  --btn-h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--btn-h); padding: 0 18px;
  font: 600 var(--t-sm)/1 var(--font-body); letter-spacing: 0;
  border: 1px solid transparent; border-radius: var(--radius-btn);
  background: var(--surface-2); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn-sm { --btn-h: 36px; padding: 0 12px; font-size: var(--t-sm); }
.btn-lg { --btn-h: 48px; padding: 0 24px; font-size: var(--t-md); }
.btn-block { display: flex; width: 100%; }
.btn:active:not([disabled]) { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn.is-loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--on-accent); border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: var(--t-sm); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 0; border-radius: var(--radius-btn); background: transparent; color: var(--ink);
  cursor: pointer; position: relative; text-decoration: none; transition: background-color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .icon { width: 20px; height: 20px; }
.buy-row { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
@media (pointer: coarse) { .btn { --btn-h: 44px; } .btn-sm { --btn-h: 40px; } .icon-btn { width: 44px; height: 44px; } }

/* ---------- Chips, badges, swatches, avatars ---------- */
.chips { display: flex; gap: var(--s2); flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--bg); color: var(--ink);
  font: 500 var(--t-sm)/1 var(--font-body); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: border-color 0.15s, background-color 0.15s;
}
.chip:hover { border-color: var(--line-strong); background: var(--surface); }
.chip.is-active, .chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--accent-tint); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--ink); }
.chip .x { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: -6px; border-radius: 50%; color: var(--muted); }
.chip .x svg { width: 14px; height: 14px; }
.chip:hover .x { color: var(--ink); background: var(--surface-2); }
@media (pointer: coarse) { .chip { min-height: 44px; } }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px;
  border-radius: 4px; background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  font: 500 var(--t-xs)/1 var(--font-body); white-space: nowrap;
}
.badge--ink { background: var(--ink); color: var(--bg); border-color: transparent; }

.license-badge {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px;
  border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink);
  font: 500 var(--t-xs)/1 var(--font-body); text-decoration: none; white-space: nowrap;
}
.license-badge::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid currentColor; box-sizing: border-box; background: radial-gradient(circle, currentColor 0 1.5px, transparent 2px); opacity: 0.7; }
a.license-badge:hover { border-color: var(--ink); }
@media (pointer: coarse) { a.license-badge::after { content: ""; position: absolute; inset: -10px -4px; } } /* 44px tap area */

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  --sw: #ccc;
  width: 28px; height: 28px; padding: 0; flex: none; border-radius: 50%; cursor: pointer;
  background: var(--sw); border: 0; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.14);
  position: relative; transition: box-shadow 0.15s;
}
.swatch::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid transparent; transition: border-color 0.15s; }
.swatch:hover::after { border-color: var(--line-strong); }
.swatch[aria-checked="true"]::after, .swatch[aria-pressed="true"]::after, .swatch.is-active::after { border-color: var(--ink); }
@media (pointer: coarse) { .swatch::before { content: ""; position: absolute; inset: -8px; } }
.swatch--sm { width: 12px; height: 12px; cursor: default; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.16); }
.swatch--sm::after { display: none; }
html[data-theme="dark"] .swatch { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18); }

.avatar {
  --av: var(--surface-2);
  width: 24px; height: 24px; flex: none; border-radius: 50%; overflow: hidden;
  display: inline-grid; place-items: center; background: var(--av); color: var(--ink);
  font: 600 10px/1 var(--font-body); letter-spacing: 0; text-transform: uppercase;
}
.avatar[style*="--h"] { background: hsl(var(--h) 38% 90%); color: hsl(var(--h) 40% 26%); }
html[data-theme="dark"] .avatar[style*="--h"] { background: hsl(var(--h) 22% 24%); color: hsl(var(--h) 45% 84%); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 40px; height: 40px; font-size: 14px; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label { font: 500 var(--t-sm)/1.3 var(--font-body); color: var(--ink); }
.field .hint { font-size: var(--t-xs); color: var(--muted); }
.field .error { font-size: var(--t-xs); color: var(--danger); }
/* Bare inputs (older pages) and the explicit classes share one look. */
:where(.input, .select, .textarea, input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="submit"], [type="button"]), select, textarea) {
  font: 400 var(--t-md)/1.4 var(--font-body); color: var(--ink);
  background: var(--bg); border: 1px solid var(--field-border); border-radius: var(--radius);
  min-height: 44px; padding: 10px 12px; width: 100%; transition: border-color 0.15s, box-shadow 0.15s;
}
:where(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
:where(.input, .select, .textarea, input, select, textarea):hover { border-color: var(--ink-2); }
:where(.input, .select, .textarea, input, select, textarea):focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 30%, transparent); }
:where(input, textarea, select)[aria-invalid="true"] { border-color: var(--danger); }
:where(.select, select) {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c7f88' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
}
:where(.textarea, textarea) { min-height: 128px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
/* Legacy: <label>Text<input></label> */
label { font: 500 var(--t-sm)/1.3 var(--font-body); color: var(--ink); }
:where(label:has(> input:not([type="checkbox"], [type="radio"])), label:has(> select), label:has(> textarea)) { display: grid; gap: 6px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; font-weight: 400; color: var(--ink-2); }
.form-note { font-size: var(--t-sm); color: var(--muted); }

/* Quantity stepper: <div class="qty"><button>-</button><input><button>+</button></div> */
.qty { justify-self: start; align-self: start; width: max-content; display: inline-flex; align-items: stretch; height: 44px; border: 1px solid var(--field-border); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.qty button { width: 40px; border: 0; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: background-color 0.15s; }
.qty button:hover { background: var(--surface-2); }
.qty button:disabled { color: var(--muted); cursor: not-allowed; background: transparent; }
.qty button svg { width: 16px; height: 16px; }
.qty input, .qty .input { width: 44px !important; min-height: 0 !important; height: 100%; border: 0 !important; border-radius: 0 !important; padding: 0 !important; text-align: center; background: transparent !important; box-shadow: none !important; font: 500 var(--t-md)/1 var(--font-body); font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
@media (pointer: coarse) { .qty button { width: 44px; } }

/* ---------- Accordion (details / summary) ---------- */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  min-height: 52px; padding: 14px 0; font: 500 var(--t-md)/1.35 var(--font-body); color: var(--ink);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; width: 18px; height: 18px; flex: none; background: currentColor; opacity: 0.7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s var(--ease);
}
.accordion details[open] > summary::after { transform: rotate(180deg); }
.accordion summary:hover { color: var(--accent); }
.accordion .panel-body, .accordion details > :not(summary) { padding-bottom: var(--s4); color: var(--ink-2); font-size: var(--t-sm); line-height: 1.6; }
.accordion details > :not(summary) + :not(summary) { margin-top: calc(-1 * var(--s2)); }

/* ---------- Breadcrumbs & page hero ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font: 400 var(--t-sm)/1.4 var(--font-body); color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep, .crumbs > span[aria-hidden] { color: var(--line-strong); }
.crumbs [aria-current="page"] { color: var(--ink); }
/* 44px-tall tap area on touch screens without changing the row height. */
@media (pointer: coarse) { .crumbs a { padding: 12px 4px; margin: -12px -4px; } }

.page-hero { border-bottom: 1px solid var(--line); background: var(--bg); }
.page-hero .wrap { padding-block: var(--s6) var(--s7); display: grid; gap: var(--s3); }
.page-hero .crumbs { margin-bottom: var(--s2); }
.page-hero h1 { max-width: 22ch; }
.page-hero .lede { color: var(--ink-2); }
@media (max-width: 767px) { .page-hero .wrap { padding-block: var(--s5) var(--s6); } }

/* ---------- Header ---------- */
/* Shipping banner: always exactly one line (--announce-h) so the space reserved for it below is exact. */
.announce {
  box-sizing: border-box; height: var(--announce-h); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  background: var(--ink); color: var(--bg); text-align: center;
  font: 500 13px/18px var(--font-body); padding: calc((var(--announce-h) - 18px) / 2) var(--gutter);
}
.announce a { color: inherit; }
html[data-theme="dark"] .announce { background: var(--surface-2); color: var(--ink); }
html[data-theme="dark"] .logo-mark rect:first-child { fill: var(--surface-2); }
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--bg); border-bottom: 1px solid var(--line);
  transition: background-color 0.2s;
}
/* The banner may render inside the header: let it scroll away while the bar under it stays stuck. */
.site-header:has(> .announce) { top: calc(-1 * var(--announce-h)); }
.site-header.is-scrolled { background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); }
.hdr { box-sizing: border-box; height: calc(var(--header-h) - 1px); display: flex; align-items: center; gap: var(--s5); }
/* Reserve the header + banner + category strip before core.js fills them in (no layout jump). */
#site-header:empty { display: block; height: calc(var(--announce-h) + var(--header-h)); margin-bottom: var(--strip-h); }
html.no-announce #site-header:empty { height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; text-decoration: none; color: var(--ink); font: 700 19px/1 var(--font-display); letter-spacing: -0.025em; white-space: nowrap; }
.logo-mark { width: 28px; height: 28px; flex: none; }
.logo-word span { color: var(--muted); font-weight: 600; }
.hdr-search { position: relative; flex: 1 1 auto; max-width: 480px; margin-inline: auto; }
.hdr-search .icon { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.hdr-search input[type="search"] { min-height: 40px; height: 40px; padding: 0 12px 0 40px; border-radius: var(--radius); background: var(--surface); border-color: transparent; font-size: var(--t-sm); }
.hdr-search input[type="search"]:hover { border-color: var(--line-strong); }
.hdr-search input[type="search"]:focus-visible { background: var(--bg); }
.hdr-actions { display: flex; align-items: center; gap: var(--s1); flex: none; }
.hdr-mobile-only { display: none !important; }
/* Admin sign-in link (header, top right) */
.hdr-admin { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border-radius: var(--radius-btn); color: var(--ink-2); font-size: var(--t-sm); font-weight: 500; text-decoration: none; transition: background-color 0.15s; }
.hdr-admin:hover { background: var(--surface-2); color: var(--ink); }
.hdr-admin[aria-current="page"] { color: var(--ink); }
.hdr-admin .icon { width: 18px; height: 18px; }
/* Shown only when card payments are on (admin > Settings), or only when they are off. */
html:not(.payments-on) [data-pay-on], html.payments-on [data-pay-off] { display: none !important; }
.cart-count {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--on-accent); font: 600 11px/18px var(--font-body); text-align: center; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--bg);
}
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: inline-block; }

/* Category strip (row 2, scrolls away with the page) */
.cat-strip { border-bottom: 1px solid var(--line); background: var(--bg); }
.cat-strip ul { list-style: none; padding: 0; margin: 0; display: flex; gap: var(--s5); overflow-x: auto; scrollbar-width: none; }
.cat-strip ul::-webkit-scrollbar { display: none; }
.cat-strip li.sep { margin-left: auto; }
.cat-strip a {
  display: inline-flex; align-items: center; height: 44px; white-space: nowrap; text-decoration: none;
  font: 500 var(--t-sm)/1 var(--font-body); color: var(--ink-2); box-shadow: inset 0 -2px 0 transparent; transition: color 0.15s, box-shadow 0.15s;
}
.cat-strip a:hover { color: var(--ink); }
.cat-strip a[aria-current="page"], .cat-strip a.is-active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

/* Mobile search panel + drawer */
.hdr-search-panel { display: none; }
.drawer { position: fixed; inset: 0; z-index: var(--z-drawer); visibility: hidden; }
.drawer-scrim { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity 0.25s var(--ease); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); background: var(--bg);
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(100%); transition: transform 0.3s var(--ease);
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
}
.drawer.is-open { visibility: visible; }
.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); padding: 0 8px 0 var(--s4); border-bottom: 1px solid var(--line); flex: none; }
.drawer-group { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.drawer-group h2 { font: 500 var(--t-xs)/1 var(--font-body); color: var(--muted); padding: var(--s3) 0 var(--s2); }
.drawer-group a, .drawer-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; text-decoration: none; color: var(--ink); font: 500 var(--t-md)/1.2 var(--font-body); }
.drawer-group a .icon { color: var(--muted); width: 18px; height: 18px; }
.drawer-group a[aria-current="page"] { color: var(--accent); }
.drawer-row { width: 100%; background: none; border: 0; cursor: pointer; padding: 0; text-align: left; }
body.no-scroll { overflow: hidden; }

@media (max-width: 899px) {
  :root { --strip-h: 53px; }
  .hdr { gap: var(--s2); }
  .hdr > .hdr-search { display: none; }
  .hdr-desktop-only { display: none !important; }
  .hdr-mobile-only { display: inline-grid !important; }
  .hdr-actions { margin-left: auto; gap: 0; margin-right: -6px; }
  .hdr-actions .icon-btn { width: 44px; height: 44px; }
  .hdr-actions .icon-btn .icon { width: 22px; height: 22px; }
  .hdr-admin { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .hdr-admin span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hdr-admin .icon { width: 22px; height: 22px; }
  .logo { min-height: 44px; }
  .cart-count { top: 3px; right: 1px; min-width: 19px; height: 19px; font-size: 11.5px; line-height: 19px; }
  .site-header.search-open .hdr-search-panel {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--s3) 0;
    box-shadow: var(--shadow-pop);
  }
  .hdr-search-panel .hdr-search { max-width: none; }
  /* 16px stops iOS Safari from zooming into the field on focus */
  .hdr-search-panel input[type="search"] { height: 48px; min-height: 48px; font-size: var(--t-md); }

  /* Category strip on phones/tablets: a row of chips that scrolls sideways, fading at the edge to hint there's more. */
  .cat-strip ul {
    gap: var(--s2); padding-block: 7px;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
    overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  .cat-strip ul.is-end { -webkit-mask-image: none; mask-image: none; }
  .cat-strip li { flex: none; scroll-snap-align: start; }
  .cat-strip li.sep { margin-left: var(--s2); position: relative; }
  .cat-strip li.sep::before { content: ""; position: absolute; left: calc(-1 * var(--s2) - 1px); top: 9px; bottom: 9px; width: 1px; background: var(--line); }
  .cat-strip li:last-child { padding-right: var(--gutter); }
  .cat-strip a {
    position: relative; height: 38px; padding-inline: 14px; border-radius: var(--radius-pill);
    border: 1px solid var(--line); background: var(--bg); color: var(--ink);
    box-shadow: none; font-size: var(--t-sm);
  }
  .cat-strip a::after { content: ""; position: absolute; inset: -4px -1px; } /* 44px-tall tap area */
  .cat-strip a:active { background: var(--surface-2); }
  .cat-strip a[aria-current="page"], .cat-strip a.is-active { box-shadow: none; background: var(--ink); border-color: var(--ink); color: var(--bg); }
}
@media (max-width: 767px) {
  :root { --header-h: 56px; --announce-h: 32px; }
  .logo { font-size: 18px; gap: 8px; }
}
@media (max-width: 380px) { .logo-word span { display: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: var(--s8); color: var(--ink-2); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(5, minmax(0, 1fr)); gap: var(--s6); padding-block: var(--s7) var(--s6); }
.footer-brand { display: grid; gap: var(--s4); align-content: start; max-width: 360px; }
.footer-brand p { font-size: var(--t-sm); color: var(--ink-2); }
.footer-col h2 { font: 600 var(--t-sm)/1.2 var(--font-body); color: var(--ink); margin-bottom: var(--s3); letter-spacing: 0; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 2px; }
.footer-col a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; font-size: var(--t-sm); color: var(--ink-2); }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.newsletter { display: grid; gap: var(--s2); }
.newsletter label { font: 600 var(--t-sm)/1.2 var(--font-body); color: var(--ink); }
.newsletter-row { display: flex; gap: var(--s2); }
.newsletter-row input { flex: 1 1 auto; min-width: 0; min-height: 44px; }
.newsletter-row .btn { --btn-h: 44px; flex: none; }
.newsletter .form-note { font-size: var(--t-xs); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--s2) var(--s5); flex-wrap: wrap; border-top: 1px solid var(--line); padding-block: var(--s5) calc(var(--s5) + env(safe-area-inset-bottom, 0px)); font-size: var(--t-xs); color: var(--muted); }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--ink); }
@media (max-width: 1023px) { .footer-top { grid-template-columns: repeat(5, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; max-width: 480px; } }
@media (max-width: 767px) {
  .site-footer { margin-top: 40px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--s5) var(--s4); padding-block: var(--s6) var(--s5); }
  .footer-col h2 { margin-bottom: var(--s1); }
  .footer-col ul { gap: 0; }
  .footer-col a { min-height: 44px; font-size: 15px; overflow-wrap: anywhere; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .newsletter-row input { font-size: var(--t-md); } /* 16px: no iOS zoom on focus */
  .footer-bottom { flex-direction: column; align-items: flex-start; font-size: 13px; line-height: 1.5; }
  .footer-bottom a { display: inline-block; padding-block: 10px; margin-block: -10px; }
}

/* ---------- Product card ---------- */
.pcard { position: relative; display: flex; flex-direction: column; min-width: 0; color: var(--ink-2); border-radius: var(--radius); }
.pcard-media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius);
  background: var(--surface); isolation: isolate;
}
.pcard-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s ease; }
.pcard-media .pcard-img-2 { opacity: 0; }
.pcard-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line-strong); }
.pcard-ph .icon { width: 40px; height: 40px; }
.pcard-badge, .pcard-rank { position: absolute; top: 10px; left: 10px; z-index: 2; }
.pcard-badge { background: color-mix(in srgb, var(--bg) 92%, transparent); border-color: transparent; }
.pcard-rank {
  height: 26px; min-width: 32px; padding: 0 8px; border-radius: 4px; display: inline-grid; place-items: center;
  background: var(--ink); color: var(--bg); font: 600 var(--t-xs)/1 var(--font-body); font-variant-numeric: tabular-nums;
}
.pcard-rank + .pcard-badge { left: auto; right: 10px; }
.pcard-dots { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 2; display: flex; justify-content: center; gap: 4px; opacity: 0; transition: opacity 0.2s; }
.pcard-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgb(255 255 255 / 0.6); box-shadow: 0 0 0 1px rgb(0 0 0 / 0.12); }
.pcard-dots i:first-child { background: #fff; }
.pcard-body { display: grid; gap: 6px; padding: var(--s3) 2px 0; flex: 1; align-content: start; container: pcard / inline-size; }
.pcard-title { margin: 0; font: 500 15px/1.35 var(--font-body); color: var(--ink); letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty; }
.pcard-title a { color: inherit; text-decoration: none; }
.pcard-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.pcard-title a:focus-visible { outline: none; }
/* Focus ring around the whole card: drawn on the link's overlay (works everywhere), plus the :has() version. */
.pcard-title a:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 4px; }
.pcard:has(.pcard-title a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 4px; }
.pcard-stat { display: flex; align-items: center; gap: 5px; font-size: var(--t-xs); color: var(--muted); }
.pcard-stat .icon { width: 14px; height: 14px; }
.pcard-meta { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--muted); }
.pcard-meta .avatar { width: 20px; height: 20px; font-size: 9px; }
.pcard-creator { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pcard-lic { flex: none; }
.pcard-creator + .pcard-lic::before { content: "·"; margin-right: 6px; }
.pcard-swatches { display: flex; align-items: center; gap: 4px; min-height: 16px; min-width: 0; }
.pcard-swatches > .swatch, .pcard-swatches > .more { flex: none; }
.pcard-swatches .more { font-size: var(--t-xs); color: var(--muted); margin-left: 2px; font-variant-numeric: tabular-nums; }
.pcard-swatches:has(.pcard-sw) { gap: 2px; margin-left: -6px; min-height: 24px; }
/* Card color dots are buttons or links (12px dot, 24px target with 2px gaps, taller on touch) above the card's link overlay. */
.pcard-sw {
  position: relative; z-index: 3; flex: none; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: inherit; text-decoration: none; cursor: pointer; display: grid; place-items: center;
}
.pcard-sw::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--sw, #ccc);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.16); transition: box-shadow 0.15s;
}
html[data-theme="dark"] .pcard-sw::before { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.2); }
.pcard-sw:hover::before { box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.16), 0 0 0 2px var(--bg), 0 0 0 3px var(--line-strong); }
.pcard-sw[aria-pressed="true"]::before { box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.16), 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink); }
.pcard-sw:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
@media (pointer: coarse) { .pcard-sw::after { content: ""; position: absolute; inset: -6px -1px; } }
/* "Color preview: Neon Green" tag on a recolored card photo (or "3D model in ..."). */
.pcard-preview {
  position: absolute; left: 8px; bottom: 8px; z-index: 2; max-width: calc(100% - 16px);
  padding: 3px 8px; border-radius: 999px; background: rgb(18 19 22 / 0.72); color: #fff;
  font: 500 11px/1.4 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.pcard-preview[hidden] { display: none; }
.pcard.is-preview .pcard-img-2, .pcard.is-preview .pcard-dots { display: none; }
.pcard.is-busy .pcard-media img { opacity: 0.75; }
/* "Photo shown in white": shares the swatch row so cards keep one height. Length picked by card width. */
.pcard-shown { min-width: 0; margin-left: 6px; font-size: var(--t-xs); line-height: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-shown > span { display: none; }
.pcard-shown > .pcard-shown-s { display: inline; }
.pcard-add .label-long { display: none; }
@container pcard (min-width: 230px) {
  .pcard-shown > .pcard-shown-s { display: none; }
  .pcard-shown > .pcard-shown-m { display: inline; }
  .pcard-add .label-long { display: inline; }
}
@container pcard (min-width: 440px) {
  .pcard-shown > .pcard-shown-m { display: none; }
  .pcard-shown > .pcard-shown-l { display: inline; }
}
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: 2px; }
.pcard-price { font: 600 var(--t-md)/1 var(--font-body); color: var(--ink); font-variant-numeric: tabular-nums; }
.pcard-add {
  position: relative; z-index: 3; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 8px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-btn); background: var(--bg); color: var(--ink);
  font: 600 13px/1 var(--font-body); cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}
.pcard-add .icon { width: 16px; height: 16px; }
.pcard-add:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pcard-add.is-added { background: var(--accent-tint); border-color: transparent; color: var(--success); }
@media (pointer: coarse) { .pcard-add::before { content: ""; position: absolute; inset: -6px -4px; } } /* 44px tap area */

@media (hover: hover) and (pointer: fine) {
  .pcard:hover .pcard-title { color: var(--accent); }
  .pcard:hover .pcard-media { box-shadow: var(--shadow-hover); }
  html[data-theme="dark"] .pcard:hover .pcard-media { box-shadow: 0 0 0 1px var(--line-strong); }
  .pcard:hover .pcard-img-2 { opacity: 1; }
  .pcard:hover .pcard-dots { opacity: 1; }
  .pcard-add { opacity: 0; }
  .pcard:hover .pcard-add, .pcard:focus-within .pcard-add, .pcard-add.is-added { opacity: 1; }
}
@media (max-width: 767px) {
  .pcard-title { font-size: var(--t-sm); }
  .pcard-price { font-size: 15px; }
  .pcard-meta { font-size: var(--t-xs); }
  .pcard-add { opacity: 1 !important; height: 36px; width: 36px; padding: 0; justify-content: center; }
  .pcard-add .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pcard-add::before { content: ""; position: absolute; inset: -4px; }
}

/* ---------- Skeletons ---------- */
.skeleton {
  background: var(--surface-2); border-radius: 4px; position: relative; overflow: hidden;
}
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bg) 55%, transparent), transparent);
  animation: shimmer 1.2s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.pcard--skeleton { pointer-events: none; }
.pcard--skeleton .pcard-media { background: var(--surface-2); }
.pcard--skeleton .sk-line { height: 12px; }
.pcard--skeleton .sk-line:nth-child(1) { width: 85%; height: 14px; }
.pcard--skeleton .sk-line:nth-child(2) { width: 55%; }
.pcard--skeleton .sk-line:nth-child(3) { width: 30%; height: 16px; margin-top: 4px; }

/* ---------- Empty state ---------- */
.empty-state, .empty {
  display: grid; justify-items: center; gap: var(--s3); text-align: center;
  padding: var(--s8) var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--radius); grid-column: 1 / -1;
}
.empty-state .icon, .empty .icon { width: 32px; height: 32px; color: var(--muted); }
.empty-state h2, .empty-state h3, .empty h3 { font-size: var(--t-xl); }
.empty-state p, .empty p { max-width: 46ch; color: var(--muted); }
.empty-state .buy-row, .empty-state .chips { justify-content: center; margin-top: var(--s2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--toast-lift, 24px) + env(safe-area-inset-bottom, 0px)); z-index: var(--z-toast);
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(440px, calc(100% - 32px));
  padding: 12px 16px; border-radius: var(--radius); background: var(--ink); color: var(--bg);
  font: 500 var(--t-sm)/1.4 var(--font-body); box-shadow: var(--shadow-pop);
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}
.toast .icon { width: 18px; height: 18px; color: color-mix(in srgb, var(--success) 70%, var(--bg)); }
html[data-theme="dark"] .toast .icon { color: #137a3a; }
.toast-icon { display: inline-flex; flex: none; }
.toast-icon[hidden], .toast-act[hidden] { display: none; }
.toast-act { margin-left: auto; padding-left: var(--s2); flex: none; }
.toast-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; margin: -8px -8px -8px 0; border: 0; border-radius: 6px; background: transparent; color: inherit; font: 600 var(--t-sm)/1 var(--font-body); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; cursor: pointer; }
.toast-btn:hover { background: color-mix(in srgb, var(--bg) 14%, transparent); }
.toast-btn:focus-visible { outline: 2px solid var(--bg); outline-offset: 1px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* ---------- 3D viewer overlay (injected by js/models.js next to its canvas) ---------- */
.lu-viewer-overlay { align-items: flex-end !important; padding-bottom: var(--s4); z-index: 2; }
.lu-viewer-loading {
  font: 500 var(--t-xs)/1.2 var(--font-body) !important; color: var(--muted) !important;
  background: color-mix(in srgb, var(--bg) 90%, transparent) !important; border: 1px solid var(--line);
  box-shadow: none !important; padding: 8px 12px !important; border-radius: var(--radius-pill) !important;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lu-viewer-loading > span:first-child { background: var(--surface-2) !important; width: 64px !important; }
.lu-viewer-loading i { background: var(--accent) !important; }
.lu-viewer-overlay:has(.lu-viewer-fallback) { padding-bottom: 0; align-items: stretch !important; background: var(--surface); }
.lu-viewer-fallback { width: 100%; height: 100%; object-fit: contain; display: block; }
.lu-viewer-overlay > p { align-self: center; font: 400 var(--t-sm)/1.4 var(--font-body) !important; color: var(--muted) !important; }

/* ---------- Shared bits that several pages use ---------- */
.prose { max-width: 70ch; display: grid; gap: var(--s4); color: var(--ink-2); line-height: 1.65; }
.prose h2 { font-size: var(--t-xl); margin-top: var(--s5); }
.prose h3 { font-size: var(--t-lg); margin-top: var(--s3); }
.prose ul, .prose ol { padding-left: 20px; display: grid; gap: 6px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s7); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: var(--s6); } }
/* "Last updated" line at the top of a policy page. */
.policy-date, .policy-body .policy-date { font-size: var(--t-sm); color: var(--muted); margin: 0 0 var(--s4); }
.policy-body .policy-date + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.notice { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 12px 14px; font-size: var(--t-sm); color: var(--ink-2); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: var(--s5); }
.table-wrap:focus-visible, .table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); min-width: 560px; }
.data-table th, .data-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { font: 600 var(--t-xs)/1.2 var(--font-body); color: var(--muted); background: var(--surface); }
.data-table td.num { font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font: 500 var(--t-xs)/1 var(--font-body); background: var(--surface-2); color: var(--ink-2); }
.status.ok { color: var(--success); }
.status.warn { color: var(--warn); }
.status.danger { color: var(--danger); }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .skeleton::after { display: none; }
}
@media print {
  .announce, .site-header, .cat-strip, .site-footer, .drawer, .toast { display: none !important; }
  body { background: #fff; color: #000; }
}
.footer-col a[href^="mailto:"] { overflow-wrap: anywhere; }

/* ---------- Touch screens: 44px hit areas ----------
   Real boxes of at least 44px (not only pseudo-element overlays), with negative margins where the visible size
   should stay the same, so nothing on the page moves. */
@media (pointer: coarse) {
  .view-all { min-height: 44px; margin-block: -5px; }
  .footer-col a { min-height: 44px; min-width: 44px; margin-block: -6px; }
  .footer-bottom a { display: inline-block; padding-block: 12px; margin-block: -12px; }
  /* Quantity steppers: the buttons fill the full 44px height of the field (its 1px border is clipped). */
  .qty button { position: relative; width: 44px; margin-block: -1px; }
  /* Card add button: 44px tall (wider than its icon on phones), same space in the row. */
  .pcard-add { height: 44px; margin-block: -6px; }
  /* License badge: a 44px-tall link whose visible outline stays badge-sized. */
  a.license-badge { height: 44px; margin: -10px; padding-inline: 18px; border-color: transparent; outline: 1px solid var(--line-strong); outline-offset: -10px; }
  a.license-badge:hover { border-color: transparent; outline-color: var(--ink); }
  a.license-badge:focus-visible { outline: 2px solid var(--focus); outline-offset: -10px; }
}
@media (pointer: coarse) and (max-width: 767px) {
  .pcard-add { width: 44px; height: 44px; margin-block: -4px; }
}
@media (pointer: coarse) and (max-width: 899px) {
  /* Phone category chips: 44px tall, the strip keeps its height (less padding around the row). */
  .cat-strip ul { padding-block: 4px; }
  .cat-strip a { height: 44px; }
}
/* Narrow cards (phones): "Photo: red and gray" gets its own line under the color dots instead of being cut off. */
@container pcard (max-width: 229.98px) {
  .pcard-swatches:has(.pcard-shown) { flex-wrap: wrap; row-gap: 2px; }
  .pcard-shown { flex: 1 0 100%; white-space: normal; overflow: visible; }
}
