/* Stitch Shop — shared palette, site header and Light/Dark toggle (all pages) */
:root,[data-theme="dark"]{
  --bg:#0d1014;--surface:#1a1d22;--surface-2:#24272e;--surface-3:#2d3139;--line:#2a2e36;--line-strong:#3a3f48;
  --text:#f3f5f8;--muted:#a1a7b0;--dim:#8a919b;
  --blue:#0a7ff5;--blue-hover:#2a91ff;--blue-text:#4aa8ff;--orange:#f7a14c;--red:#f26b5e;--green:#38d184;--green-deep:#14332a;--gold:#ffd84d;
  --shadow:0 18px 50px #0007;
  --divider-bg:#15181d;--toast-bg:#f3f5f8;--toast-fg:#0d1014;
  --btn-white-bg:#fff;--btn-white-fg:#0d1014;--btn-white-hover:#e9ecf0;--chip-hover:#5a606b;
  --community-icon:#0d1014;--community-muted:#bcd0c7;
  --band-top:#122a40;--perks-bg:#0f1318;--overlay:#0d1014d9;
  --win-bg:#10291f;--win-text:#38d184;--win-muted:#9fc7b3;
  --glow-filter:blur(30px) brightness(.55);--glow-opacity:.8;--switch-off:#2d3139;
  --lime:#d8f36a;--btn-bg:#f3f5f8;--btn-fg:#0d1014;--btn-hover:#dfe3e8;
  --warn-bg:#3a2118;--warn-text:#ffb199;--ok-bg:#1c2a1a;--ok-line:#2f4a2b;
  --field-bg:#14171c;--sel-bg:#1e2a17;--sel-border:#8ab03a;--star-off:#3a3f48;--star-on:#f2b441;--disabled-bg:#2d3139;
  color-scheme:dark;
}
[data-theme="light"]{
  --bg:#f6f4ef;--surface:#fffefa;--surface-2:#eeece5;--surface-3:#e3e0d6;--line:#e3e0d6;--line-strong:#c9c5b8;
  --text:#20211f;--muted:#5c5f57;--dim:#6b6e66;
  --blue:#0b6fdb;--blue-hover:#095bb5;--blue-text:#0a63c4;--orange:#a8480a;--red:#c2352a;--green:#12794a;--green-deep:#dff1e6;--gold:#ffd84d;
  --shadow:0 18px 50px #29281722;
  --divider-bg:#e9e6dd;--toast-bg:#20211f;--toast-fg:#fff;
  --btn-white-bg:#20211f;--btn-white-fg:#fff;--btn-white-hover:#393c35;--chip-hover:#8d9086;
  --community-icon:#fffefa;--community-muted:#3f5a4c;
  --band-top:#d7e8f9;--perks-bg:#fffefa;--overlay:#f6f4efe6;
  --win-bg:#dff1e6;--win-text:#0f6b40;--win-muted:#3f5a4c;
  --glow-filter:blur(30px) brightness(1.05);--glow-opacity:.35;--switch-off:#b3afa2;
  --lime:#d8f36a;--btn-bg:#222421;--btn-fg:#fff;--btn-hover:#393c35;
  --warn-bg:#fff0e9;--warn-text:#8b422f;--ok-bg:#eff5dc;--ok-line:#dfe6c8;
  --field-bg:#faf9f4;--sel-bg:#f5f8e9;--sel-border:#8ea53a;--star-off:#cfccc0;--star-on:#d9901a;--disabled-bg:#c8c9c2;
  color-scheme:light;
}

/* Keyboard focus — visible in both themes on every page */
:focus-visible{outline:3px solid var(--blue-text);outline-offset:2px;border-radius:6px}
button:focus-visible,a.btn:focus-visible,.btn:focus-visible{outline-offset:3px}

/* Site header */
.site-header{position:sticky;top:0;z-index:40;background:var(--bg);border-bottom:1px solid var(--line);padding-top:env(safe-area-inset-top)}
.sh-inner{max-width:1240px;margin:0 auto;height:64px;padding:0 var(--pad,20px);display:flex;align-items:center;gap:16px}
.sh-brand{display:flex;align-items:center;gap:9px;text-decoration:none;font-weight:850;font-size:20px;letter-spacing:-.04em;color:var(--text);flex:none}
.sh-brand .brand-mark{width:29px;height:29px;border-radius:10px;background:var(--lime);color:#20211f;display:grid;place-items:center;font-size:17px;transform:rotate(-8deg)}
.sh-nav{display:none;gap:4px;margin-left:12px}
.sh-nav a{padding:9px 16px;border-radius:999px;color:var(--muted);text-decoration:none;font-size:15px;font-weight:600}
.sh-nav a:hover{background:var(--surface-2);color:var(--text)}
.sh-nav a.active{background:var(--surface-2);color:var(--text)}
.sh-spacer{flex:1}
.sh-link{color:var(--muted);text-decoration:none;font-size:14px;font-weight:600;white-space:nowrap;padding:8px 4px}
.sh-link:hover{color:var(--text)}
.seller-entry-mobile{display:none}
.workspace-switcher{display:flex;align-items:center;gap:3px;padding:4px;border:1px solid var(--line);border-radius:999px;background:var(--surface);flex:none}
.workspace-switcher a{display:block;padding:8px 13px;border-radius:999px;color:var(--muted);text-decoration:none;font-size:14px;font-weight:650;white-space:nowrap}
.workspace-switcher a:hover{color:var(--text);background:var(--surface-2)}
.workspace-switcher a.current,.workspace-switcher a[aria-current="page"]{background:var(--surface-2);color:var(--text)}
.workspace-menu{display:none;position:relative;flex:none}
.workspace-menu summary{list-style:none;display:flex;align-items:center;justify-content:center;gap:8px;min-height:38px;padding:0 12px;border:1px solid var(--line-strong);border-radius:999px;background:var(--surface);color:var(--text);font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}
.workspace-menu summary::-webkit-details-marker{display:none}
.workspace-menu summary span{color:var(--muted);font-size:16px;line-height:1}
.workspace-menu-list{position:absolute;z-index:60;right:0;top:calc(100% + 8px);min-width:148px;padding:6px;border:1px solid var(--line-strong);border-radius:14px;background:var(--surface);box-shadow:var(--shadow)}
.workspace-menu-list a{display:block;padding:10px 12px;border-radius:9px;color:var(--muted);text-decoration:none;font-size:14px;font-weight:650}
.workspace-menu-list a:hover,.workspace-menu-list a[aria-current="page"]{background:var(--surface-2);color:var(--text)}
.theme-toggle{display:inline-flex;padding:3px;gap:2px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line-strong);flex:none}
.theme-toggle button{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px;border:0;border-radius:999px;background:transparent;color:var(--muted);font-size:14px;font-weight:650;cursor:pointer;transition:background .15s,color .15s}
.theme-toggle button:hover{color:var(--text)}
.theme-toggle button[aria-pressed="true"]{background:var(--btn-bg);color:var(--btn-fg)}
.theme-toggle svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:420px){.sh-brand{font-size:18px}.theme-toggle button{padding:0 10px;gap:5px;font-size:13px}.sh-inner{gap:10px}.site-header .theme-toggle button span{display:none}}
@media(max-width:560px){.seller-entry-desktop{display:none}.seller-entry-mobile{display:inline}}
@media(max-width:340px){.theme-toggle button span{display:none}.theme-toggle button{padding:0 11px}}
@media(min-width:900px){.sh-nav{display:flex}}
@media(max-width:1050px){.workspace-switcher{display:none}.workspace-menu{display:block}}

/* Standalone page headers (checkout / winner / feedback): wrap on phones so the toggle never crowds the brand */
@media(max-width:560px){
  header:has(>[data-theme-slot]){flex-wrap:wrap;height:auto;padding:12px 0 8px;row-gap:2px}
  header>.spacer{display:none}
  header>[data-theme-slot]{margin-left:auto}
  header>.home-link{order:3;width:100%;padding:4px 0}
}
