/* ============================================================
   Bay Shore Relics — theme.css
   Warm paper / ink / brass railroad design system.
   Mobile-first, vanilla CSS. Replaces style.css (retired).
   Required tokens (used by checkout.html + account pages inline):
   --surface --line --radius --radius-sm --bg --ink --muted --accent
   --accent-soft --signal --shadow-sm --font-display --font-body
   --ink-soft --surface-2
   ============================================================ */

:root {
  /* ---- color tokens ---- */
  --bg: #f7f2e7;            /* warm paper */
  --surface: #fffdf8;       /* card / panel surface */
  --surface-2: #efe7d5;     /* recessed / inset surface */
  --line: #ddd0b6;          /* borders on paper */
  --line-strong: #c3b28c;
  --ink: #2b2318;           /* primary text */
  --ink-soft: #4c4132;      /* secondary text */
  --muted: #7c6e56;         /* muted / placeholder text */
  --accent: #9a6f1c;        /* brass */
  --accent-ink: #6e4f12;    /* darker brass for text on paper */
  --accent-soft: #f3e8cd;   /* brass tint */
  --signal: #b03a2a;        /* sold / error / attention */
  --signal-soft: #f8e3dd;
  --ok: #3f7a3a;
  --ok-soft: #e2f0e0;
  --info: #2f5f8a;
  --info-soft: #e0ecf6;

  /* ---- shape / shadow tokens ---- */
  --radius: 12px;
  --radius-sm: 6px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(43, 35, 24, .08), 0 2px 8px rgba(43, 35, 24, .06);
  --shadow-md: 0 2px 6px rgba(43, 35, 24, .10), 0 10px 28px rgba(43, 35, 24, .12);
  --shadow-lg: 0 6px 18px rgba(43, 35, 24, .16), 0 24px 60px rgba(43, 35, 24, .18);

  /* ---- type tokens ---- */
  --font-display: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 64px;
  --announce-h: 36px;
  --tap: 44px;              /* minimum touch target */
}

[data-theme="dark"] {
  --bg: #171310;
  --surface: #221c15;
  --surface-2: #2c241a;
  --line: #3d3325;
  --line-strong: #57493a;
  --ink: #f0e8d6;
  --ink-soft: #d8cdb4;
  --muted: #a89878;
  --accent: #d9a83f;
  --accent-ink: #e8bd63;
  --accent-soft: #3a2d17;
  --signal: #e07a63;
  --signal-soft: #41211b;
  --ok: #7cbf76;
  --ok-soft: #1e3320;
  --info: #7fb2e5;
  --info-soft: #1d2c3d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .45), 0 10px 28px rgba(0, 0, 0, .4);
  --shadow-lg: 0 6px 18px rgba(0, 0, 0, .5), 0 24px 60px rgba(0, 0, 0, .5);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .01em;
  margin: 0 0 .6em;
  color: var(--ink);
}
h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 3.5vw, 1.75rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
body.a11y-links a { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--accent-soft); }

/* ---------- layout helpers ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.content { padding-top: 24px; padding-bottom: 48px; min-height: 40vh; }

.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;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; color: var(--bg); }

.lead { font-size: 1.1rem; color: var(--ink-soft); }
.muted { color: var(--muted); font-size: .92rem; }
.dot { margin: 0 .55em; color: var(--accent); font-size: .7em; vertical-align: middle; }
.accent { color: var(--accent-ink); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin: 2rem 0 1rem;
  border-bottom: 2px solid var(--line); padding-bottom: .5rem;
}
.section-title { margin: 0; }
.more { font-size: .9rem; font-weight: 600; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn, .tr-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em; min-height: var(--tap);
  padding: .65em 1.35em;
  font-family: var(--font-display); font-size: 1rem; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  border: 2px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .05s;
}
.btn:active, .tr-btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-brass {
  background: var(--accent); border-color: var(--accent-ink); color: #fffdf6;
}
[data-theme="dark"] .btn-brass { color: #221a0c; }
.btn-brass:hover { background: var(--accent-ink); color: #fffdf6; }
[data-theme="dark"] .btn-brass:hover { color: #221a0c; }

.btn-ghost {
  background: transparent; border-color: var(--line-strong); color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }

.btn-danger { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn-danger:hover { filter: brightness(.92); color: #fff; }

.btn-sm { min-height: 36px; padding: .4em .9em; font-size: .85rem; }
.btn-lg { min-height: 52px; padding: .8em 2em; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* legacy cart button + icon buttons */
.cart-btn {
  display: inline-flex; align-items: center; gap: .5em;
  min-height: var(--tap); padding: .5em 1em;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink); text-decoration: none;
  border: 2px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
}
.cart-btn:hover { border-color: var(--accent); color: var(--accent-ink); }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; width: var(--tap); height: var(--tap);
  background: transparent; border: 2px solid transparent; border-radius: var(--radius-sm);
  color: var(--ink); cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--accent-soft); border-color: var(--line); color: var(--accent-ink); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn-label { font-size: .68rem; font-weight: 600; letter-spacing: .03em; }
@media (max-width: 640px) { .icon-btn-label { display: none; } }

/* theme toggle sun/moon swap */
#theme-toggle .sun { display: none; }
[data-theme="dark"] #theme-toggle .sun { display: block; }
[data-theme="dark"] #theme-toggle .moon { display: none; }

/* ---------- badges ---------- */
.badge {
  display: inline-block; padding: .25em .7em;
  font-family: var(--font-display); font-size: .75rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  background: var(--surface-2); color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px;
}
.badge-sold, .badge.sold { background: var(--signal-soft); color: var(--signal); border-color: var(--signal); }
.badge.new { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.badge.featured { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }

.cart-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  font-family: var(--font-body); font-size: .78rem; font-weight: 700;
  background: var(--signal); color: #fff; border-radius: 999px; line-height: 1;
}

/* add-to-cart state */
.in-cart { background: var(--ok-soft) !important; border-color: var(--ok) !important; color: var(--ok) !important; }

/* ---------- announcement bar ---------- */
.promo-bar {
  background: var(--ink); color: var(--bg);
  font-size: .88rem; text-align: center; padding: 8px 12px;
}
.promo-bar p { margin: 0; }
.promo-bar a { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); }
.promo-bar.announce { background: var(--accent-ink); color: #fff; }
.promo-bar.announce a { color: #fff; }

/* ---------- sticky header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.masthead-inner {
  display: flex; align-items: center; gap: 12px;
  min-height: var(--header-h); padding-top: 8px; padding-bottom: 8px;
}
.brand-lockup { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark { display: inline-flex; align-items: center; text-decoration: none; }
.mark-main { width: 44px; height: 44px; border-radius: 8px; }
.brand-word { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: .05em; color: var(--ink); line-height: 1.1; }
.brand-word small { display: block; font-size: .62rem; font-weight: 500; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }

.masthead-nav { display: none; }
.masthead-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }

/* header search toggle */
.search-wrap { position: relative; }
.search-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 110;
  width: min(360px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 12px;
}
.search-pop form { display: flex; gap: 8px; }
.search-pop input[type="search"] { flex: 1; min-width: 0; }

/* account link */
.acct-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap); padding: 0 .8em;
  font-family: var(--font-display); font-size: .95rem; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); border-radius: var(--radius-sm); white-space: nowrap;
}
.acct-link:hover { background: var(--accent-soft); color: var(--accent-ink); }
.acct-link svg { width: 22px; height: 22px; }

@media (min-width: 960px) {
  .masthead-nav { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
  .masthead-nav .nav-link { padding: .55em .8em; border-radius: var(--radius-sm); }
}

/* ---------- nav strip / mobile drawer ---------- */
.nav-strip { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.nav-strip .wrap { display: flex; align-items: center; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap); padding: .5em .8em; margin: 6px 0;
  background: none; border: 2px solid var(--line-strong); border-radius: var(--radius-sm);
  font-family: var(--font-display); font-size: .95rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-links { display: none; }
@media (min-width: 960px) {
  .nav-strip { display: none; }
}

/* mobile nav drawer */
.mobile-nav-overlay {
  position: fixed; inset: 0; z-index: 150; background: rgba(20, 14, 8, .5);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.mobile-nav {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 151;
  width: min(320px, 85vw); background: var(--surface);
  border-right: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transform: translateX(-105%); transition: transform .22s ease;
  display: flex; flex-direction: column; padding: 16px;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-nav-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mobile-nav nav { display: flex; flex-direction: column; }
.mobile-nav .nav-link {
  display: block; padding: .8em .4em; font-family: var(--font-display);
  font-size: 1.1rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line);
}
.mobile-nav .nav-link:hover { color: var(--accent-ink); }

.nav-link { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.nav-link:hover { color: var(--accent-ink); }
.nav-link[aria-current="page"] { color: var(--accent-ink); font-weight: 700; }

/* ---------- hero / sections (homepage) ---------- */
.hero {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 56px); margin: 24px 0; text-align: center;
  box-shadow: var(--shadow-sm);
}
.hero-kicker {
  font-family: var(--font-display); letter-spacing: .28em; text-transform: uppercase;
  font-size: .8rem; color: var(--accent-ink); margin: 0 0 .8em;
}
.hero-text { max-width: 46em; margin: 0 auto 1.2em; color: var(--ink-soft); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 24px 0; }
.tile {
  display: block; padding: 18px 14px; text-align: center; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.tile-kicker { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.tile-name { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); margin: .3em 0 0; }
.tile-sub { font-size: .85rem; color: var(--muted); margin: .2em 0 0; }

/* shop toolbar (filters/sort on homepage) */
.shop-tools {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  margin: 16px 0;
}
.shop-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-filters .btn { min-height: 38px; }
.result-count { color: var(--muted); font-size: .9rem; }

/* ---------- product cards / grids ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 16px 0; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .badge { position: absolute; top: 8px; left: 8px; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.card-meta { font-size: .8rem; color: var(--muted); margin: 0; text-transform: uppercase; letter-spacing: .06em; }
.card-title { font-family: var(--font-display); font-size: 1.02rem; font-weight: 500; margin: 0; line-height: 1.35; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent-ink); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.card-price { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--ink); margin: 0; }
.card-cta { font-size: .85rem; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
.card .btn { margin-top: 8px; }

/* testimonial / quote cards */
.t-card { padding: 6px; }
.t-quote { font-style: italic; color: var(--ink-soft); margin: 0 0 .6em; }
.t-byline { margin: 0; }

/* image placeholder */
.img-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 120px;
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 12px, var(--bg) 12px, var(--bg) 24px);
  color: var(--muted); font-size: .85rem;
}

/* empty states */
.empty {
  text-align: center; padding: 48px 20px; margin: 24px 0;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface);
}
.empty h2, .empty h3 { margin-bottom: .4em; }
.empty p { color: var(--muted); }

/* ---------- footer ---------- */
.wave-divider { line-height: 0; margin-top: 40px; }
.wave-divider svg { width: 100%; height: 56px; display: block; fill: var(--ink); opacity: .06; }

.footer { background: var(--ink); color: #e9dfc9; margin-top: 0; }
[data-theme="dark"] .footer { background: #0f0c09; border-top: 1px solid var(--line); }
.footer a { color: #f3e9d2; }
.footer a:hover { color: var(--accent); }
.footer-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  padding: 40px 16px 24px;
}
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1.2fr; } }
.footer h3 {
  font-size: .85rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .9em;
}
[data-theme="dark"] .footer h3 { color: var(--accent-ink); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: .45em 0; }
.footer address { font-style: normal; margin: 0 0 .6em; }
.footer p { font-size: .92rem; margin: 0 0 .7em; }
.trust p strong { color: #fff; }
[data-theme="dark"] .trust p strong { color: var(--ink); }

/* newsletter */
.email-band, .newsletter { margin: 0 0 1.2em; }
.newsletter h3 { margin-bottom: .5em; }
.email-form { display: flex; gap: 8px; max-width: 340px; }
.email-form input[type="email"] { flex: 1; min-width: 0; }
.email-note, .email-done { font-size: .88rem; margin: .6em 0 0; }
.email-done { color: #bfe3b8; }
.email-note.error { color: #f0a99a; }

.footer-legal { border-top: 1px solid rgba(233, 223, 201, .18); padding: 16px 0; font-size: .85rem; }
.footer-legal .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; }
.credit-row { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.credit-row span { display: inline-flex; align-items: center; gap: 6px; }
.credit-row img { display: inline-block; }

/* ---------- forms ---------- */
.field { margin: 0 0 14px; }
.field label, .field legend { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field .hint { font-size: .82rem; color: var(--muted); margin: 4px 0 0; }
.field .error-msg { font-size: .85rem; color: var(--signal); margin: 4px 0 0; display: none; }
.field.invalid .error-msg { display: block; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="tel"], input[type="number"], input[type="url"], select, textarea {
  width: 100%; min-height: var(--tap);
  padding: .6em .8em; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; }
input[aria-invalid="true"], .field.invalid input { border-color: var(--signal); }
textarea { min-height: 120px; resize: vertical; }

.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; }
.check-row input[type="checkbox"], .check-row input[type="radio"] {
  width: 22px; height: 22px; min-height: 0; margin-top: 2px; flex: 0 0 auto; accent-color: var(--accent);
}
.check-row label { font-weight: 400; margin: 0; }

.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: clamp(18px, 4vw, 32px); margin: 24px auto;
  max-width: 560px;
}
.form-card h1, .form-card h2 { text-align: center; }
.form-row { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-row.two { grid-template-columns: 1fr 1fr; } }

/* contact form (contact.md) */
.contact-form { max-width: 640px; margin: 24px 0; }
.contact-sent {
  background: var(--ok-soft); border: 1px solid var(--ok); color: var(--ink);
  border-radius: var(--radius); padding: 18px; margin: 24px 0;
}
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- cart drawer ---------- */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 180; background: rgba(20, 14, 8, .55);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 181;
  width: min(420px, 94vw); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translateX(105%); transition: transform .24s ease;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.cart-drawer-head h2 { margin: 0; font-size: 1.2rem; }
.cart-drawer-items { flex: 1; overflow-y: auto; padding: 12px 18px; margin: 0; list-style: none; }
.cart-drawer-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.cart-drawer-item:last-child { border-bottom: 0; }
.cart-drawer-thumb {
  width: 72px; height: 54px; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2);
}
.cart-drawer-title { font-weight: 600; font-size: .95rem; margin: 0 0 2px; line-height: 1.35; }
.cart-drawer-price { font-family: var(--font-display); font-weight: 600; margin: 0; }
.link-remove {
  background: none; border: 0; padding: 6px 4px; cursor: pointer;
  color: var(--signal); font-size: .85rem; text-decoration: underline;
}
.cart-drawer-empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.cart-drawer-foot { border-top: 1px solid var(--line); padding: 16px 18px 20px; background: var(--surface); }
.cart-drawer-subtotal { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 4px; font-size: 1.05rem; }
.cart-drawer-subtotal strong { font-family: var(--font-display); font-size: 1.35rem; }
.cart-drawer-note { font-size: .82rem; color: var(--muted); margin: 0 0 12px; }
.cart-drawer-actions { display: grid; gap: 10px; }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 190; background: rgba(20, 14, 8, .6);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  width: min(560px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 24px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h2 { margin: 0; }

/* ---------- toasts ---------- */
.toast-zone {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 220; display: flex; flex-direction: column; gap: 10px;
  width: min(420px, calc(100vw - 32px));
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg);
  border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow-md);
  font-size: .95rem; animation: toast-in .22s ease;
}
.toast.success { background: var(--ok); color: #fff; }
.toast.error { background: var(--signal); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- skeletons ---------- */
.skeleton {
  position: relative; overflow: hidden; background: var(--surface-2);
  border-radius: var(--radius-sm); min-height: 1em; color: transparent;
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: shimmer 1.4s infinite;
}
[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- accordions / details ---------- */
details.details, .accordion {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin: 0 0 10px; overflow: hidden;
}
details.details summary, .accordion > button.acc-head {
  list-style: none; cursor: pointer; width: 100%; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; font-family: var(--font-display); font-size: 1.02rem; font-weight: 500;
  background: none; border: 0; color: var(--ink);
}
details.details summary::-webkit-details-marker { display: none; }
details.details summary::after, .accordion > button.acc-head::after {
  content: "+"; font-size: 1.3rem; color: var(--accent-ink); flex: 0 0 auto;
  transition: transform .15s;
}
details.details[open] summary::after, .accordion > button.acc-head[aria-expanded="true"]::after { transform: rotate(45deg); }
details.details .details-body, .accordion .acc-body { padding: 0 18px 18px; color: var(--ink-soft); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--surface); }
table.data th, table.data td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.data th {
  font-family: var(--font-display); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); white-space: nowrap;
}
table.data tr:last-child td { border-bottom: 0; }
table.data tfoot td { font-weight: 700; background: var(--surface-2); }

/* ---------- notices ---------- */
.notice {
  border: 1px solid var(--line-strong); border-left: 4px solid var(--accent);
  background: var(--accent-soft); border-radius: var(--radius-sm);
  padding: 12px 16px; margin: 16px 0; color: var(--ink);
}
.notice.info { border-left-color: var(--info); background: var(--info-soft); }
.notice.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.notice.error { border-left-color: var(--signal); background: var(--signal-soft); }

/* ---------- product (listing) page ---------- */
.crumb { font-size: .85rem; color: var(--muted); margin: 0 0 14px; }
.crumb a { color: var(--muted); }
.listing-grid { display: grid; gap: 28px; margin: 8px 0 32px; }
@media (min-width: 880px) { .listing-grid { grid-template-columns: 1.15fr 1fr; } }
.listing-photo {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); position: relative;
}
.listing-photo img { width: 100%; height: auto; }
.photo-note { font-size: .82rem; color: var(--muted); padding: 10px 14px; margin: 0; border-top: 1px solid var(--line); }
.listing-info .price { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; margin: .2em 0; }
.listing-desc { color: var(--ink-soft); }
.buy-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin: 20px 0; box-shadow: var(--shadow-sm);
  display: grid; gap: 10px;
}
.sold-note {
  background: var(--signal-soft); border: 1px solid var(--signal);
  border-radius: var(--radius); padding: 16px; font-weight: 600; color: var(--ink);
}
.ship-note, .secure-note { font-size: .88rem; color: var(--muted); margin: 0; }
.bsr-rates { margin: 12px 0; font-size: .9rem; }
.bsr-rate-check { display: flex; gap: 8px; margin-top: 8px; }
.bsr-rate-check input { max-width: 140px; }

/* ---------- cart page ---------- */
.cart-page { display: grid; gap: 24px; margin: 16px 0 40px; }
@media (min-width: 920px) { .cart-page { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cart-thumb { width: 96px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.cart-desc h3 { margin: 0 0 4px; font-size: 1.05rem; }
.cart-desc p { margin: 0; font-size: .88rem; color: var(--muted); }
.line-price { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin: 0 0 6px; text-align: right; }
.cart-summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm);
  position: sticky; top: calc(var(--header-h) + 16px);
}
.cart-summary h2 { font-size: 1.2rem; margin: 0 0 12px; }
.subtotal { display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 700; margin: 12px 0; }
.cart-cta { display: grid; gap: 10px; margin-top: 12px; }
.promo-row { display: flex; gap: 8px; margin: 12px 0; }
.promo-input { flex: 1; min-width: 0; }
.promo-msg { font-size: .88rem; margin: 6px 0 0; }
.paypal-msg { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }

/* cart nudge banner */
.cart-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--accent-soft); border-bottom: 1px solid var(--accent);
  padding: 10px 16px; font-size: .92rem;
}
.cart-banner p { margin: 0; flex: 1; min-width: 200px; }
.cart-banner a { font-weight: 700; }
.cart-banner button {
  background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted);
}

/* ---------- account / checkout shared ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; border-bottom: 2px solid var(--line); }
.tabs button {
  background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px;
  padding: 10px 14px; font-family: var(--font-display); font-size: .95rem; font-weight: 500;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted); cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--accent); }
.rowline {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin: 0 0 18px; box-shadow: var(--shadow-sm);
}
.panel h2, .panel h3 { margin-top: 0; }

/* ticket-style divider */
.ticket {
  border: 2px dashed var(--line-strong); border-radius: var(--radius);
  padding: 18px; margin: 18px 0; background: var(--surface); text-align: center;
}
.ticket-label { font-family: var(--font-display); letter-spacing: .24em; text-transform: uppercase; font-size: .75rem; color: var(--muted); }
.ticket-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }

/* ---------- track page (track.html, untouched markup) ---------- */
.track-page { max-width: 640px; margin: 0 auto; }
.tr-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.tr-field { margin: 0 0 12px; }
.tr-field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.tr-err { color: var(--signal); font-size: .9rem; margin: 8px 0; display: none; }
.tr-result { margin-top: 18px; }
.tr-meta { display: grid; gap: 6px; font-size: .95rem; margin: 0 0 12px; }
.tr-items { list-style: none; margin: 0; padding: 0; }
.tr-items li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.tr-status { display: inline-block; padding: .2em .7em; border-radius: 999px; background: var(--info-soft); color: var(--info); font-size: .82rem; font-weight: 600; }
.tr-eta { color: var(--muted); font-size: .88rem; }
.tr-trackbox { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; font-family: var(--font-mono); font-size: .85rem; word-break: break-all; }
.tr-sub { font-size: .85rem; color: var(--muted); }

/* ---------- cookie note / consent ---------- */
.cookie-note {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 210;
  max-width: 560px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 16px 18px;
  font-size: .92rem;
}
.cookie-note p { margin: 0 0 10px; }
.cookie-actions { display: flex; gap: 10px; }

/* ---------- accessibility toolbar ---------- */
.a11y-wrap { position: relative; }
.a11y-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 160;
  width: min(320px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 16px;
}
.a11y-panel h2 { font-size: 1rem; margin: 0 0 10px; }
.a11y-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; padding: 10px 4px; cursor: pointer;
  background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font: inherit;
}
.a11y-row:last-child { border-bottom: 0; }
.a11y-desc { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; }
.switch {
  position: relative; flex: 0 0 auto; width: 44px; height: 24px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--muted); transition: left .15s, background .15s;
}
.a11y-row[aria-checked="true"] .switch { background: var(--accent); border-color: var(--accent-ink); }
.a11y-row[aria-checked="true"] .switch::after { left: 22px; background: #fff; }
#a11y-reset { color: var(--accent-ink); font-weight: 600; }

/* a11y.js body classes */
body.a11y-text-large { font-size: 18.5px; }
body.a11y-dyslexia { font-family: 'OpenDyslexic', var(--font-body); letter-spacing: .02em; }
body.a11y-dyslexia h1, body.a11y-dyslexia h2, body.a11y-dyslexia h3,
body.a11y-dyslexia .btn, body.a11y-dyslexia .nav-link { font-family: 'OpenDyslexic', var(--font-display); }
body.a11y-contrast {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f0f0f0;
  --line: #6b6b6b; --line-strong: #333;
  --ink: #000; --ink-soft: #1a1a1a; --muted: #3d3d3d;
}
body.a11y-contrast[data-theme="dark"], [data-theme="dark"] body.a11y-contrast {
  --bg: #000; --surface: #0a0a0a; --surface-2: #1a1a1a;
  --ink: #fff; --ink-soft: #f0f0f0; --muted: #d0d0d0;
}
body.a11y-motion *, body.a11y-motion *::before, body.a11y-motion *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}

/* ---------- prose (markdown pages) ---------- */
.prose { max-width: 44em; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .35em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--surface-2); font-family: var(--font-display); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.prose blockquote { border-left: 4px solid var(--accent); margin: 1em 0; padding: .6em 1em; background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); padding: .15em .4em; border-radius: 4px; }

/* ---------- search page ---------- */
.search-hero { text-align: center; margin: 12px 0 24px; }
.search-form { display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }
.search-form input[type="search"] { flex: 1; min-width: 0; }
.search-meta { text-align: center; color: var(--muted); margin: 12px 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 48px 0; max-width: 560px; margin: 0 auto; }
.notfound-code {
  font-family: var(--font-display); font-size: clamp(4rem, 16vw, 7rem); font-weight: 700;
  color: var(--accent); line-height: 1; margin: 0;
  text-shadow: 3px 3px 0 var(--accent-soft);
}
.notfound h1 { margin: .4em 0; }
.notfound .search-form { margin-top: 20px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

/* ---------- responsive polish ---------- */
@media (max-width: 700px) {
  .cart-line { grid-template-columns: 72px 1fr; }
  .line-price { text-align: left; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .email-form { max-width: none; }
  .cart-drawer { width: 94vw; }
}
@media (min-width: 1400px) {
  .wrap { max-width: 1280px; }
}
