/* Every palette supplies surfaces, readable text, actions, and semantic statuses. */
:root {
  --item-color-strength:24%;
  --item-bg-theme:var(--green-soft);--item-bg-neutral:var(--cream);
  --item-bg-red:color-mix(in oklab,#ef4444 var(--item-color-strength),var(--surface));
  --item-bg-rose:color-mix(in oklab,#e85370 var(--item-color-strength),var(--surface));
  --item-bg-pink:color-mix(in oklab,#db5ca5 var(--item-color-strength),var(--surface));
  --item-bg-purple:color-mix(in oklab,#aa56d4 var(--item-color-strength),var(--surface));
  --item-bg-violet:color-mix(in oklab,#8b5cf6 var(--item-color-strength),var(--surface));
  --item-bg-indigo:color-mix(in oklab,#6366f1 var(--item-color-strength),var(--surface));
  --item-bg-blue:color-mix(in oklab,#3b82f6 var(--item-color-strength),var(--surface));
  --item-bg-sky:color-mix(in oklab,#0ea5e9 var(--item-color-strength),var(--surface));
  --item-bg-cyan:color-mix(in oklab,#06b6d4 var(--item-color-strength),var(--surface));
  --item-bg-teal:color-mix(in oklab,#14b8a6 var(--item-color-strength),var(--surface));
  --item-bg-green:color-mix(in oklab,#22a566 var(--item-color-strength),var(--surface));
  --item-bg-lime:color-mix(in oklab,#84b82b var(--item-color-strength),var(--surface));
  --item-bg-yellow:color-mix(in oklab,#e6b52e var(--item-color-strength),var(--surface));
  --item-bg-orange:color-mix(in oklab,#ed8b3b var(--item-color-strength),var(--surface));
}
[data-shop-mode="dark"] {--item-color-strength:28%}
:root,[data-shop-theme="botanical"], [data-preview-theme="botanical"] {
  color-scheme:light;
  --green:#174d3d;--green-dark:#10392d;--green-soft:#dcebdc;
  --ink:#203b32;--muted:#52675d;--line:#cad9ca;--bg:#f3f5e9;--cream:#e7eddf;
  --surface:#fffef8;--sidebar:#e2ebda;--orange:#a64420;--on-accent:#fffef7;
  --success:#2d6944;--success-soft:#e0edda;--warning:#805600;--warning-soft:#fbefce;
  --danger:#a0352c;--danger-soft:#fae7df;--pop:#e89765;--feature:#174d3d;
  --display:'DM Serif Display',Georgia,serif;--card-radius:18px;--panel-radius:16px;
}
[data-shop-theme="electric"], [data-preview-theme="electric"] {
  --green:#2445dc;--green-dark:#1833bb;--green-soft:#dde4ff;
  --ink:#142052;--muted:#48577d;--line:#b7c3ea;--bg:#edf0ff;--cream:#e4e9ff;
  --surface:#fff;--sidebar:#e1e7ff;--orange:#7040ae;--on-accent:#fff;
  --pop:#d5ff43;--feature:#2445dc;--display:'Courier New',monospace;
  --card-radius:4px;--panel-radius:6px;
}
[data-shop-theme="bauhaus"], [data-preview-theme="bauhaus"] {
  --green:#1e42b7;--green-dark:#15318f;--green-soft:#e1e8ff;
  --ink:#202126;--muted:#5a5350;--line:#73716c;--bg:#f7efdf;--cream:#eee1c5;
  --surface:#fffcf3;--sidebar:#f1c942;--orange:#b13029;--on-accent:#fff;
  --pop:#f5c93f;--feature:#b13029;--display:'DM Sans',Arial,sans-serif;
  --card-radius:0px;--panel-radius:0px;
}
[data-shop-theme="atelier"], [data-preview-theme="atelier"] {
  --green:#67354e;--green-dark:#492337;--green-soft:#f0dfe7;
  --ink:#38282f;--muted:#6a5c64;--line:#d6c4c6;--bg:#f4ece6;--cream:#eee0d8;
  --surface:#fffaf6;--sidebar:#e9dcd7;--orange:#a44730;--on-accent:#fffaf6;
  --pop:#bd674b;--feature:#67354e;--display:'DM Serif Display',Georgia,serif;
  --card-radius:2px;--panel-radius:2px;
}
[data-shop-mode="dark"], [data-preview-mode="dark"] {
  color-scheme:dark;
  --green:#b9e78d;--green-dark:#d2f5ae;--green-soft:#263f2d;
  --ink:#edf4df;--muted:#a8baaa;--line:#3f5b49;--bg:#0b1713;--cream:#1e3428;
  --surface:#14271f;--sidebar:#102119;--orange:#ffb18a;--on-accent:#17351f;
  --success:#b0dc9a;--success-soft:#243d29;--warning:#f0cd82;--warning-soft:#3e3421;
  --danger:#ffa99b;--danger-soft:#442d29;--pop:#e89765;--feature:#b9e78d;
}
[data-shop-theme="electric"][data-shop-mode="dark"], [data-preview-theme="electric"][data-preview-mode="dark"] {
  --green:#c9fa58;--green-dark:#dfff8c;--green-soft:#2b3c24;
  --ink:#f0f3ff;--muted:#acb9de;--line:#425580;--bg:#0a0e20;--cream:#1d284b;
  --surface:#131b36;--sidebar:#10162e;--orange:#a4baff;--on-accent:#17230a;
  --pop:#c9fa58;--feature:#728eff;
}
[data-shop-theme="bauhaus"][data-shop-mode="dark"], [data-preview-theme="bauhaus"][data-preview-mode="dark"] {
  --green:#f5c93f;--green-dark:#ffe28c;--green-soft:#3e3521;
  --ink:#fff4e0;--muted:#c4baa7;--line:#817a6c;--bg:#17191e;--cream:#2f3037;
  --surface:#22252d;--sidebar:#22252d;--orange:#ffa090;--on-accent:#222127;
  --pop:#ef594a;--feature:#8ca7ff;
}
[data-shop-theme="atelier"][data-shop-mode="dark"], [data-preview-theme="atelier"][data-preview-mode="dark"] {
  --green:#e9b8cc;--green-dark:#ffcee1;--green-soft:#49313f;
  --ink:#f8e9e3;--muted:#c5afb9;--line:#68505d;--bg:#20171e;--cream:#3b2b36;
  --surface:#2c202a;--sidebar:#281d26;--orange:#f8b291;--on-accent:#402638;
  --pop:#d68d6f;--feature:#e9b8cc;
}
/* Professional palettes: restrained accents, regular sans type, and familiar edges. */
[data-shop-theme="studio"],[data-preview-theme="studio"],
[data-shop-theme="sand"],[data-preview-theme="sand"],
[data-shop-theme="sage"],[data-preview-theme="sage"],
[data-shop-theme="harbor"],[data-preview-theme="harbor"] {
  color-scheme:light;--display:'DM Sans',Arial,sans-serif;--card-radius:10px;--panel-radius:10px;
  --success:#2d6944;--success-soft:#e0edda;--warning:#805600;--warning-soft:#fbefce;
  --danger:#a0352c;--danger-soft:#fae7df;
}
[data-shop-theme="studio"],[data-preview-theme="studio"] {
  --green:#39434e;--green-dark:#242d36;--green-soft:#e2e7ec;
  --ink:#242b33;--muted:#59636e;--line:#cfd5dc;--bg:#f3f5f7;--cream:#e9edf1;
  --surface:#fff;--sidebar:#ebeff3;--orange:#59636e;--on-accent:#fff;
  --pop:#8a98a7;--feature:#39434e;
}
[data-shop-theme="sand"],[data-preview-theme="sand"] {
  --green:#725135;--green-dark:#513923;--green-soft:#e9dfd1;
  --ink:#302b25;--muted:#655c50;--line:#d7cfc3;--bg:#f5f1eb;--cream:#ebe4d9;
  --surface:#fffdf9;--sidebar:#eee8df;--orange:#725135;--on-accent:#fffdf9;
  --pop:#ac9479;--feature:#725135;
}
[data-shop-theme="sage"],[data-preview-theme="sage"] {
  --green:#3e6247;--green-dark:#294c34;--green-soft:#dce8db;
  --ink:#28372a;--muted:#566453;--line:#cad5c7;--bg:#f1f4ef;--cream:#e3eae0;
  --surface:#fcfdfa;--sidebar:#e7ede4;--orange:#52694f;--on-accent:#fcfdfa;
  --pop:#8da88a;--feature:#3e6247;
}
[data-shop-theme="harbor"],[data-preview-theme="harbor"] {
  --green:#365d88;--green-dark:#25496f;--green-soft:#dbe8f5;
  --ink:#263447;--muted:#53637a;--line:#cbd5e2;--bg:#f0f3f7;--cream:#e4eaf2;
  --surface:#fff;--sidebar:#e6ecf4;--orange:#496985;--on-accent:#fff;
  --pop:#8ba5bf;--feature:#365d88;
}
[data-shop-theme="studio"][data-shop-mode="dark"],[data-preview-theme="studio"][data-preview-mode="dark"],
[data-shop-theme="sand"][data-shop-mode="dark"],[data-preview-theme="sand"][data-preview-mode="dark"],
[data-shop-theme="sage"][data-shop-mode="dark"],[data-preview-theme="sage"][data-preview-mode="dark"],
[data-shop-theme="harbor"][data-shop-mode="dark"],[data-preview-theme="harbor"][data-preview-mode="dark"] {
  color-scheme:dark;--success:#b0dc9a;--success-soft:#243d29;
  --warning:#f0cd82;--warning-soft:#3e3421;--danger:#ffa99b;--danger-soft:#442d29;
}
[data-shop-theme="studio"][data-shop-mode="dark"],[data-preview-theme="studio"][data-preview-mode="dark"] {
  --green:#c4ccd4;--green-dark:#e0e5ea;--green-soft:#333c46;
  --ink:#f1f3f5;--muted:#b2b8bd;--line:#4a5158;--bg:#151719;--cream:#2a2e32;
  --surface:#202326;--sidebar:#1b1e21;--orange:#b2b8bd;--on-accent:#192129;
  --pop:#8092a3;--feature:#c4ccd4;
}
[data-shop-theme="sand"][data-shop-mode="dark"],[data-preview-theme="sand"][data-preview-mode="dark"] {
  --green:#dfbc97;--green-dark:#f0d2af;--green-soft:#493a2e;
  --ink:#f6efe5;--muted:#c6b9aa;--line:#5a4c40;--bg:#211d1a;--cream:#3b322a;
  --surface:#2c2621;--sidebar:#26201c;--orange:#dfbc97;--on-accent:#2c2118;
  --pop:#ac9479;--feature:#dfbc97;
}
[data-shop-theme="sage"][data-shop-mode="dark"],[data-preview-theme="sage"][data-preview-mode="dark"] {
  --green:#a8d0ae;--green-dark:#c4e4c8;--green-soft:#2e4735;
  --ink:#edf5ed;--muted:#b2c3b6;--line:#455d4c;--bg:#14201c;--cream:#2a3a30;
  --surface:#1d2b24;--sidebar:#18261f;--orange:#b2c3b6;--on-accent:#1b3021;
  --pop:#769b7b;--feature:#a8d0ae;
}
[data-shop-theme="harbor"][data-shop-mode="dark"],[data-preview-theme="harbor"][data-preview-mode="dark"] {
  --green:#a9c6ed;--green-dark:#c8defb;--green-soft:#293f5b;
  --ink:#edf3fc;--muted:#b1bfd2;--line:#445975;--bg:#111a28;--cream:#26374e;
  --surface:#1b283b;--sidebar:#152134;--orange:#b1bfd2;--on-accent:#1b2c43;
  --pop:#7898bf;--feature:#a9c6ed;
}
/* Shared UI primitives also cover dialogs, pickers, tables, and the phone order drawer. */
:root {--serif:var(--display);--border:var(--line)}
input,select,textarea {color:var(--ink);accent-color:var(--green)}
input::placeholder,textarea::placeholder {color:var(--muted);opacity:1}
.sidebar {background:var(--sidebar);border-color:var(--line)}
.topbar {background:var(--surface)}
.product {border-radius:var(--card-radius)}
.panel,.stat-card,.person-card,.location-card,dialog {border-radius:var(--panel-radius)}
.primary,.charge-btn,.mobile-cart-toggle,.nav-item.active,.toast-message {color:var(--on-accent)}
.stat-card.featured .stat-value,.stat-card.featured .stat-foot .up {color:var(--on-accent)}
.welcome-photo>span {color:#fff;background:#000c;padding:8px 12px;border-radius:6px}
.welcome-photo>span em {color:#fff}

.primary.danger {background:var(--danger);color:var(--surface)}
.receipt {background:var(--surface);color:var(--ink)}
.receipt h2 {color:var(--ink)}
.searchbox:focus-within {outline:2px solid var(--green);outline-offset:2px}
.toggle.on {background:var(--green)}
.toggle:after {background:var(--muted)}
.toggle.on:after {background:var(--on-accent)}
.avatar {color:var(--ink);background:var(--cream)}
.product-photo {background:var(--cream)}
.eyebrow {color:var(--orange)}
.intro h1 em {color:var(--green)}
.appearance-panel {background:var(--surface);border:1px solid var(--line);border-radius:var(--panel-radius);padding:20px;margin-bottom:24px;min-width:0}
.appearance-heading {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px;flex-wrap:wrap}
.appearance-heading h2 {font:30px/1.1 var(--display);letter-spacing:-1px;margin:0 0 9px;color:var(--ink)}
.appearance-heading p:not(.eyebrow) {margin:0;color:var(--muted);font-size:13px;line-height:1.6}
.theme-mode {border:1px solid var(--line);padding:4px;display:flex;gap:4px;margin:0;background:var(--bg);min-width:0;border-radius:8px}
.theme-mode legend {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%)}
.theme-mode label {position:relative;cursor:pointer}
.theme-mode input,.theme-card>input {position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.theme-mode span {display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 16px;font-size:13px;border-radius:5px;color:var(--muted)}
.theme-mode input:checked+span {background:var(--green);color:var(--on-accent)}
.theme-mode input:focus-visible+span {outline:3px solid var(--orange);outline-offset:3px}
.theme-options {border:0;padding:0;margin:0;display:grid;grid-template-columns:repeat(4,minmax(0,180px));gap:12px;min-width:0}
.sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.theme-card {position:relative;cursor:pointer;min-width:0;display:flex;flex-direction:column;border:2px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface);color:var(--ink)}
.theme-card:has(>input:checked) {border-color:var(--green);outline:2px solid var(--green);outline-offset:3px}
.theme-card:has(>input:focus-visible) {outline:3px solid var(--orange);outline-offset:5px}
.theme-card:has(>input:disabled),.theme-mode label:has(input:disabled) {cursor:wait;opacity:.65}
.theme-art {display:block;height:132px;padding:10px;position:relative;isolation:isolate;overflow:hidden;background:var(--bg);color:var(--ink)}
.theme-art-top {display:flex;justify-content:space-between;gap:8px;font:9px var(--sans);position:relative;z-index:2}
.theme-art-top>span:first-child {font-weight:700;letter-spacing:-.4px}
.theme-art-top>span:last-child {font-family:monospace;font-size:8px}
.theme-art-title {display:block;position:relative;z-index:2;font:22px/1 var(--display);letter-spacing:-.7px;margin-top:12px}
.theme-art-mark {position:absolute;z-index:0;font:88px/1 var(--display);color:var(--pop);right:-12px;top:24px;transform:rotate(-16deg)}
.theme-mini {display:grid;grid-template-columns:1.6fr 1fr;gap:5px;position:absolute;bottom:14px;left:10px;right:10px;height:30px;border:1px solid var(--line);padding:4px;background:var(--surface);z-index:2;border-radius:var(--card-radius)}
.theme-mini>span:first-child {display:flex;gap:4px;align-items:stretch}
.theme-mini b {flex:1;background:var(--cream);border:1px solid var(--line);border-radius:3px}
.theme-mini b:nth-child(2) {background:var(--green-soft)}
.theme-mini>span:last-child {display:flex;flex-direction:column;gap:3px;border-left:1px solid var(--line);padding-left:6px}
.theme-mini i {height:4px;background:var(--line);width:85%}
.theme-mini em {margin-top:auto;height:8px;background:var(--green);border-radius:2px}
.theme-swatches {position:absolute;bottom:5px;left:10px;display:flex;gap:5px}
.theme-swatches i {width:16px;height:3px;background:var(--green)}
.theme-swatches i:nth-child(2) {background:var(--pop)}
.theme-swatches i:nth-child(3) {background:var(--ink)}
.theme-card-copy {display:block;padding:10px;border-top:1px solid var(--line);background:var(--surface);flex:1}
.theme-card-copy strong {display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px;margin-bottom:5px}
.theme-card-copy>span {display:block;font-size:11px;line-height:1.45;color:var(--muted)}
.theme-selected {display:grid;place-items:center;width:18px;height:18px;background:var(--green);color:var(--on-accent);border-radius:50%;visibility:hidden}
.theme-selected .icon {font-size:14px;width:14px;height:14px}
.theme-card:has(>input:checked) .theme-selected {visibility:visible}
.appearance-footer {display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--line);margin-top:24px;padding-top:20px;flex-wrap:wrap}
.appearance-footer p {color:var(--muted);font-size:12px;line-height:1.6;margin:0;flex:1;min-width:200px}
.appearance-footer>div {display:flex;gap:8px;flex-wrap:wrap}
.appearance-footer button {min-height:44px;padding:10px 16px;font-size:13px}
.theme-group-heading {margin:2px 0 12px}
.theme-group-heading h3 {font:600 17px/1.4 var(--sans);margin:0 0 4px;color:var(--ink)}
.theme-group-heading p {font-size:12px;line-height:1.6;margin:0;color:var(--muted)}
.expressive-heading {border-top:1px solid var(--line);padding-top:20px;margin-top:20px}
[data-shop-theme="studio"] :is(.intro h1,.page-heading h1),
[data-shop-theme="sand"] :is(.intro h1,.page-heading h1),
[data-shop-theme="sage"] :is(.intro h1,.page-heading h1),
[data-shop-theme="harbor"] :is(.intro h1,.page-heading h1) {font-weight:600;letter-spacing:-.7px}
/* Art direction changes type, edges, contrast, and ornament as well as color. */
[data-shop-theme="botanical"] .intro h1,[data-shop-theme="botanical"] .page-heading h1 {letter-spacing:-1px}
[data-shop-theme="botanical"] .sidebar-note {background:var(--green);color:var(--on-accent);border-radius:24px 4px 24px 4px}
[data-shop-theme="botanical"] .sidebar-note p,[data-shop-theme="botanical"] .sidebar-note .sun {color:var(--on-accent)}
[data-shop-theme="botanical"] .product-photo {border-radius:12px 12px 4px 4px}
[data-shop-theme="botanical"] .appearance-panel {border-top:5px solid var(--green)}
[data-preview-theme="botanical"] .theme-art {background:radial-gradient(ellipse at 100% 20%,var(--cream) 0 37%,transparent 38%),var(--bg)}
[data-preview-theme="botanical"] .theme-art-mark {right:-12px;font-size:100px;top:22px}
[data-shop-theme="electric"] .intro h1,[data-shop-theme="electric"] .page-heading h1 {font-weight:700;letter-spacing:-1.5px;text-transform:uppercase}
[data-shop-theme="electric"] .topbar {border-bottom:3px solid var(--green)}
[data-shop-theme="electric"] .brand {font-family:monospace;letter-spacing:-3px;font-weight:700}
[data-shop-theme="electric"] .nav-item.active {border-radius:2px;box-shadow:4px 4px 0 var(--orange)}
[data-shop-theme="electric"] .product {border-bottom:3px solid var(--green)}
[data-shop-theme="electric"] .appearance-panel {border-top:5px solid var(--feature)}
[data-preview-theme="electric"] .theme-art {background:linear-gradient(135deg,transparent 65%,var(--pop) 65%),var(--bg)}
[data-preview-theme="electric"] .theme-art-title {font-size:22px;font-weight:700}
[data-preview-theme="electric"] .theme-art-mark {right:5px;top:32px;color:var(--feature);font-size:65px;transform:none}
[data-shop-theme="bauhaus"] .intro h1,[data-shop-theme="bauhaus"] .page-heading h1 {font-weight:700;letter-spacing:-1.5px}
[data-shop-theme="bauhaus"] .brand {font-family:var(--sans);font-weight:700}
[data-shop-theme="bauhaus"] .product,[data-shop-theme="bauhaus"] .stat-card {border:1px solid var(--ink);box-shadow:3px 3px 0 var(--ink)}
[data-shop-theme="bauhaus"] .product-photo,[data-shop-theme="bauhaus"] .nav-item,[data-shop-theme="bauhaus"] .secondary,[data-shop-theme="bauhaus"] .primary,[data-shop-theme="bauhaus"] .charge-btn {border-radius:0}
[data-shop-theme="bauhaus"] .appearance-panel {border-top:5px solid var(--orange)}
[data-shop-theme="bauhaus"] .sidebar-note {border:1px solid var(--ink);border-radius:0;background:var(--surface)}
[data-shop-theme="bauhaus"] .intro h1 em {font-style:normal;text-decoration:underline;text-decoration-color:var(--orange);text-underline-offset:5px}
[data-preview-theme="bauhaus"] .theme-art-title {font-weight:700;letter-spacing:-1.4px}
[data-preview-theme="bauhaus"] .theme-art-mark {font:95px/1 Arial,sans-serif;right:-25px;top:20px;color:var(--orange);transform:rotate(-30deg)}
[data-preview-theme="bauhaus"] .theme-mini {border-color:var(--ink);box-shadow:3px 3px 0 var(--ink)}
[data-shop-theme="atelier"] .intro h1,[data-shop-theme="atelier"] .page-heading h1 {letter-spacing:-1.3px}
[data-shop-theme="atelier"] .topbar {border-bottom:1px solid var(--ink)}
[data-shop-theme="atelier"] .brand {font-style:italic}
[data-shop-theme="atelier"] .product {border:0;border-bottom:1px solid var(--ink);background:transparent}
[data-shop-theme="atelier"] .product-photo {border-radius:0}
[data-shop-theme="atelier"] .nav-item.active {border-radius:0}
[data-shop-theme="atelier"] .appearance-panel {border-top:5px double var(--green)}
[data-preview-theme="atelier"] .theme-art {background:linear-gradient(90deg,transparent 74%,var(--cream) 74%),var(--bg)}
[data-preview-theme="atelier"] .theme-art-title {font-style:italic}
[data-preview-theme="atelier"] .theme-art-mark {font-style:italic;right:-6px;top:18px;font-size:92px;transform:none;opacity:.55}
@media (max-width:760px) {.theme-options {grid-template-columns:repeat(2,minmax(0,180px))}}
@media (max-width:600px) {.appearance-panel {padding:16px}.appearance-heading {gap:14px}.appearance-heading h2 {font-size:28px}.theme-options {gap:10px}.theme-art-top>span:last-child {display:none}.appearance-footer>div {width:100%}.appearance-footer button {flex:1}.theme-art-mark {opacity:.6}}
@media (prefers-reduced-motion:reduce) {button,.product,.product-photo img {transition:none}}
/* Receipts and payroll stay legible on paper, including from a dark workspace. */
@media print {
  :root,[data-shop-theme][data-shop-mode] {color-scheme:light;--bg:#fff;--surface:#fff;--cream:#fff;--ink:#000;--muted:#444;--line:#bbb;--green:#000;--green-dark:#000;--green-soft:#eee;--orange:#000;--on-accent:#fff;--warning:#000;--warning-soft:#fff;--danger:#000;--danger-soft:#fff;--success:#000;--success-soft:#fff}
  body,dialog[open],.receipt,.payslip,.modal-head,.modal-body,.modal-footer {background:#fff!important;color:#000!important}
  .receipt *,.payslip * {color:#000!important}
}
