/* =========================================================
   Nilufa storefront
   Editorial risograph palette, OKLCH throughout.
   ========================================================= */

:root {
  /* neutrals, all tinted toward the brand hue (330) */
  --ink:      oklch(21% 0.035 330);
  --ink-soft: oklch(34% 0.03 330);
  --muted:    oklch(50% 0.028 330);
  --line:     oklch(88% 0.018 330);
  --line-strong: oklch(80% 0.025 330);
  --paper:    oklch(97.6% 0.011 330);
  --surface:  oklch(99.2% 0.005 330);
  --shade:    oklch(94.5% 0.016 330);

  /* the six item colours */
  --magenta:   oklch(57% 0.235 350);
  --tangerine: oklch(70% 0.172 52);
  --cobalt:    oklch(50% 0.185 262);
  --lime:      oklch(80% 0.185 122);
  --plum:      oklch(43% 0.155 312);
  --clay:      oklch(66% 0.115 38);

  --tint-magenta:   oklch(92% 0.062 350);
  --tint-tangerine: oklch(93% 0.058 62);
  --tint-cobalt:    oklch(92% 0.05 258);
  --tint-lime:      oklch(94% 0.075 122);
  --tint-plum:      oklch(91% 0.045 312);
  --tint-clay:      oklch(93% 0.045 42);

  --accent: var(--magenta);
  --accent-tint: var(--tint-magenta);
  --accent-on: oklch(98% 0.01 350);

  --ok:   oklch(58% 0.14 155);
  --warn: oklch(72% 0.16 75);
  --bad:  oklch(55% 0.19 25);

  /* 4pt spacing, named by intent */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --pad: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --radius-lg: 14px;

  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;

  --out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --in-expo:   cubic-bezier(0.7, 0, 0.84, 0);

  --z-drawer: 60; --z-scrim: 55; --z-toast: 80; --z-head: 40;
}

html[data-accent="tangerine"] { --accent: var(--tangerine); --accent-tint: var(--tint-tangerine); --accent-on: oklch(22% 0.05 52); }
html[data-accent="cobalt"]    { --accent: var(--cobalt);    --accent-tint: var(--tint-cobalt);    --accent-on: oklch(98% 0.01 262); }
html[data-accent="lime"]      { --accent: var(--lime);      --accent-tint: var(--tint-lime);      --accent-on: oklch(24% 0.08 122); }

[data-accent="magenta"]   { --tile: var(--tint-magenta);   --pen: var(--magenta); }
[data-accent="tangerine"] { --tile: var(--tint-tangerine); --pen: var(--tangerine); }
[data-accent="cobalt"]    { --tile: var(--tint-cobalt);    --pen: var(--cobalt); }
[data-accent="lime"]      { --tile: var(--tint-lime);      --pen: oklch(52% 0.14 122); }
[data-accent="plum"]      { --tile: var(--tint-plum);      --pen: var(--plum); }
[data-accent="clay"]      { --tile: var(--tint-clay);      --pen: oklch(52% 0.11 38); }

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-variant-ligatures: none; }

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

.sr, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip:focus {
  position: fixed; inset: 12px auto auto 12px; z-index: 99; background: var(--ink);
  color: var(--paper); padding: 10px 16px; border-radius: 999px;
}

/* ---------------- announcement ticker ---------------- */
.ticker {
  background: var(--ink); color: oklch(94% 0.08 122);
  font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase;
  overflow: hidden; padding: 9px 0;
}
.ticker__track { display: flex; gap: 64px; width: max-content; animation: slide 34s linear infinite; }
.ticker__track span { white-space: nowrap; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------------- masthead ---------------- */
.masthead {
  position: sticky; top: 0; z-index: var(--z-head);
  display: flex; align-items: center; gap: var(--s-5);
  padding: var(--s-4) var(--pad);
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; margin-right: auto; }
.brand__word {
  font-family: var(--display); font-size: clamp(1.5rem, 3vw, 1.95rem); font-weight: 700;
  letter-spacing: -0.045em; font-variation-settings: "SOFT" 20, "WONK" 1;
  margin-left: -0.05em;
}
.brand__img { height: 40px; width: auto; object-fit: contain; }

.mainnav { display: flex; gap: var(--s-5); font-size: 0.9375rem; }
.mainnav a { text-decoration: none; color: var(--ink-soft); padding-bottom: 2px; border-bottom: 1.5px solid transparent; transition: color .15s, border-color .15s; }
.mainnav a:hover { color: var(--ink); border-color: var(--accent); }

.masthead__tools { display: flex; align-items: center; gap: var(--s-2); }
.iconbtn {
  display: grid; place-items: center; width: 44px; height: 44px;
  background: none; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer;
  transition: background .18s var(--out-quart), border-color .18s;
}
.iconbtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.iconbtn:hover { background: var(--shade); border-color: var(--ink); }

.bagbtn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 999px; cursor: pointer;
  font-size: 0.9375rem; transition: transform .2s var(--out-quart), background .2s;
}
.bagbtn:hover { transform: translateY(-1px); background: oklch(28% 0.06 330); }
.bagbtn__n {
  min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-on); border-radius: 999px;
  font-size: 0.75rem; font-variant-numeric: tabular-nums;
}
.bagbtn__n.is-bump { animation: bump .4s var(--out-expo); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }

.searchsheet {
  display: flex; gap: var(--s-2); padding: var(--s-4) var(--pad) var(--s-5);
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.searchsheet input {
  flex: 1; min-height: 48px; padding: 0 18px; background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: 999px;
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border: 1px solid transparent; border-radius: 999px;
  font-size: 0.9375rem; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--out-quart), background .2s, color .2s, border-color .2s;
}
.btn--ink    { background: var(--ink); color: var(--paper); }
.btn--accent { background: var(--accent); color: var(--accent-on); }
.btn--ghost  { background: none; border-color: var(--ink); color: var(--ink); }
.btn:hover   { transform: translateY(-2px); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 0.875rem; }
.btn--lg { min-height: 56px; padding: 0 34px; font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer; font-size: 0.875rem;
  color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}
.linkbtn:hover { color: var(--ink); }
.linkbtn--center { display: block; margin: var(--s-3) auto 0; text-align: center; }

/* ---------------- page lead ---------------- */
main { display: block; }
.hero { padding: clamp(48px, 9vw, 108px) var(--pad) var(--s-7); max-width: 1400px; }
.eyebrow {
  display: flex; align-items: center; gap: 10px; font-size: 0.75rem;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--muted);
}
.dot { width: 5px; height: 5px; border-radius: 999px; background: var(--accent); }
.hero__title {
  font-size: clamp(2.75rem, 8.5vw, 6.25rem); line-height: 0.94; font-weight: 600;
  letter-spacing: -0.035em; margin: var(--s-4) 0 var(--s-5); max-width: 20ch;
  font-variation-settings: "SOFT" 30, "WONK" 1;
}
.hero__text { max-width: 62ch; font-size: clamp(1rem, 1.4vw, 1.1875rem); color: var(--ink-soft); }
.hero__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5); margin-top: var(--s-6); }
.hero__cats { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; }
.hero__cats a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.hero__cats a:hover { color: var(--ink); border-color: var(--accent); }

/* ---------------- controls ---------------- */
.controls {
  position: sticky; top: 76px; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-3) var(--pad);
  background: var(--paper); border-block: 1px solid var(--line);
}
.controls__pills { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; padding: 4px 0; }
.controls__pills::-webkit-scrollbar { display: none; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 8px 15px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 0.875rem; text-decoration: none;
  transition: background .18s var(--out-quart), border-color .18s, color .18s;
}
.pill span { font-size: 0.6875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pill:hover { border-color: var(--ink); }
.pill.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill.is-on span { color: oklch(80% 0.02 330); }

.controls__inputs { display: flex; align-items: center; gap: var(--s-5); }
.rangefield { display: grid; gap: 2px; font-size: 0.8125rem; color: var(--muted); }
.rangefield output { color: var(--ink); font-variant-numeric: tabular-nums; }
.rangefield input[type="range"] { width: 148px; accent-color: var(--accent); }
.selectfield select, .field select {
  min-height: 40px; padding: 0 34px 0 14px; background: var(--surface) no-repeat right 12px center;
  border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.875rem;
  appearance: none;
  background-size: 8px 5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23555' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E");
}

.resultline { padding: var(--s-5) var(--pad) 0; display: flex; gap: var(--s-3); align-items: baseline; color: var(--muted); font-size: 0.9375rem; }

/* ---------------- portfolio grid ---------------- */
.portfolio {
  display: grid; gap: var(--s-5) var(--s-4);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: var(--s-6) var(--pad) var(--s-9);
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
}
.portfolio--tight { padding-block: var(--s-5) var(--s-7); }
@media (max-width: 1180px) { .portfolio { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .portfolio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .portfolio { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .portfolio { grid-template-columns: 1fr; } }

.tile { display: flex; flex-direction: column; }
.tile--wide { grid-column: span 2; }
@media (max-width: 620px) { .tile--wide { grid-column: span 1; } }

.tile__canvas {
  position: relative; display: grid; place-items: center; overflow: hidden;
  aspect-ratio: 4 / 5; border-radius: var(--radius-lg);
  background: var(--tile, var(--shade));
  text-decoration: none;
}
.tile--wide .tile__canvas { aspect-ratio: 8 / 5; }
.tile__canvas img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--out-expo), filter .3s;
}
.tile:hover .tile__canvas img { transform: scale(1.045); }
.tile__noimg { font-size: 0.8125rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }

.flag {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 11px; border-radius: 999px; font-size: 0.6875rem;
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
  background: var(--ink); color: var(--paper);
}
.flag--off  { background: var(--accent); color: var(--accent-on); }
.flag--low  { top: auto; bottom: 12px; background: var(--surface); color: var(--ink); }
.flag--out  { top: auto; bottom: 12px; background: var(--ink); color: var(--paper); }
.flag--pick { left: auto; right: 12px; background: var(--surface); color: var(--pen, var(--ink)); }

.tile__meta { display: flex; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-3); }
.tile__meta h3 { font-size: 1.0625rem; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; }
.tile__meta h3 a { text-decoration: none; }
.tile__meta h3 a:hover { text-decoration: underline; }
.tile__sub { font-size: 0.8125rem; color: var(--muted); margin-top: 2px; }
.tile__price { font-family: var(--display); font-size: 1.0625rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tile__price s { display: block; font-size: 0.75rem; color: var(--muted); font-weight: 400; }

.tile__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-3); }
.idchip {
  font-family: ui-monospace, Menlo, monospace; font-size: 0.6875rem; letter-spacing: 0.02em;
  padding: 4px 8px; border: 1px dashed var(--line-strong); border-radius: 4px; color: var(--muted);
}
.tile__soldout { font-size: 0.8125rem; color: var(--muted); }
.tile .btn--sm { opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s var(--out-quart); }
.tile:hover .btn--sm, .tile:focus-within .btn--sm { opacity: 1; transform: none; }
@media (hover: none) { .tile .btn--sm { opacity: 1; transform: none; } }

/* ---------------- steps band ---------------- */
.steps { background: var(--ink); color: var(--paper); padding: var(--s-9) var(--pad); }
.steps__title { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 500; letter-spacing: -0.03em; }
.steps__list { list-style: none; margin: var(--s-7) 0 0; padding: 0; display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps__list h3 { font-size: 1.25rem; font-weight: 500; margin: var(--s-3) 0 6px; }
.steps__list p { color: oklch(78% 0.02 330); font-size: 0.9375rem; max-width: 34ch; }
.steps__n { font-family: var(--display); font-size: 2.5rem; font-weight: 700; line-height: 1; }
.steps__list li:nth-child(1) .steps__n { color: var(--lime); }
.steps__list li:nth-child(2) .steps__n { color: var(--tangerine); }
.steps__list li:nth-child(3) .steps__n { color: oklch(72% 0.18 350); }

/* ---------------- empty + notes ---------------- */
.empty { padding: var(--s-8) var(--pad); text-align: center; max-width: 46ch; margin-inline: auto; }
.empty__title { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.empty__text { color: var(--muted); margin: var(--s-2) 0 var(--s-5); }
.empty--bag { padding: var(--s-7) var(--s-5); }
.pagenote { padding: 12px var(--pad); background: var(--accent-tint); font-size: 0.9375rem; }
.pagenote--warn { background: oklch(94% 0.08 75); }

/* ---------------- page head ---------------- */
.pagehead { padding: var(--s-8) var(--pad) var(--s-5); }
.pagehead h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 600; letter-spacing: -0.03em; }
.pagehead p { color: var(--muted); margin-top: var(--s-2); max-width: 60ch; }

.crumbs { display: flex; gap: 10px; padding: var(--s-5) var(--pad) 0; font-size: 0.8125rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs > * + *::before { content: "/"; margin-right: 10px; color: var(--line-strong); }

/* ---------------- product detail ---------------- */
.detail {
  display: grid; gap: clamp(24px, 5vw, 72px); align-items: start;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  padding: var(--s-5) var(--pad) var(--s-8); max-width: 1500px;
}
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
.detail__stage {
  position: relative; aspect-ratio: 1; display: grid; place-items: center;
  background: var(--tile, var(--shade)); border-radius: var(--radius-lg); overflow: hidden;
}
.detail__stage img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: var(--s-2); margin-top: var(--s-2); flex-wrap: wrap; }
.thumb {
  width: 74px; aspect-ratio: 1; padding: 0; overflow: hidden; cursor: pointer;
  background: var(--tile, var(--shade)); border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .18s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-on, .thumb:hover { border-color: var(--ink); }

.detail__info { position: sticky; top: 108px; }
@media (max-width: 900px) { .detail__info { position: static; } }
.detail__title { font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1.02; margin: var(--s-3) 0 var(--s-3); font-variation-settings: "SOFT" 30; }
.detail__tag { color: var(--ink-soft); font-size: 1.0625rem; max-width: 46ch; }
.detail__price {
  font-family: var(--display); font-size: 2rem; font-weight: 600; margin-top: var(--s-5);
  display: flex; align-items: baseline; gap: var(--s-3); font-variant-numeric: tabular-nums;
}
.detail__price s { font-size: 1rem; color: var(--muted); font-weight: 400; }
.stockline { font-size: 0.875rem; margin-top: var(--s-2); }
.stockline.is-in  { color: var(--ok); }
.stockline.is-low { color: oklch(58% 0.15 60); }
.stockline.is-out { color: var(--bad); }

.buyform { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-5) 0 var(--s-6); }
.qtyfield input {
  width: 84px; min-height: 48px; padding: 0 14px; text-align: center;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.prose { color: var(--ink-soft); max-width: 68ch; line-height: 1.65; }
.specs { display: grid; gap: 0; margin: var(--s-6) 0 0; border-top: 1px solid var(--line); }
.specs > div { display: flex; justify-content: space-between; gap: var(--s-4); padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; text-align: right; }
.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; margin: var(--s-5) 0 0; font-size: 0.8125rem; }
.tags a { color: var(--pen, var(--accent)); text-decoration: none; padding: 5px 11px; border-radius: 999px; background: var(--tile, var(--shade)); }
.detail__sku { margin-top: var(--s-5); font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.alsosection { padding: 0 var(--pad); max-width: 1600px; }
.alsosection h2 { font-size: 1.5rem; font-weight: 500; padding-top: var(--s-6); border-top: 1px solid var(--line); }
.alsosection .portfolio { padding-inline: 0; }

/* ---------------- cart page ---------------- */
.cartlayout {
  display: grid; gap: clamp(24px, 4vw, 56px); align-items: start;
  grid-template-columns: minmax(0, 1fr) 340px; padding: var(--s-5) var(--pad) var(--s-9);
}
@media (max-width: 940px) { .cartlayout { grid-template-columns: 1fr; } }
.cartlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cartrow {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; gap: var(--s-4);
  align-items: center; padding: var(--s-5) 0; border-bottom: 1px solid var(--line);
}
.cartrow__thumb { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--tile, var(--shade)); }
.cartrow__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cartrow__body h2 { font-size: 1.0625rem; font-weight: 500; }
.cartrow__body h2 a { text-decoration: none; }
.cartrow__ids { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.8125rem; color: var(--muted); }
.cartrow__unit { font-size: 0.8125rem; color: var(--muted); margin-top: 4px; }
.cartrow__qty { display: grid; gap: 8px; justify-items: center; }
.cartrow__line { font-family: var(--display); font-size: 1.125rem; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .cartrow { grid-template-columns: 72px minmax(0, 1fr); }
  .cartrow__qty { justify-items: start; grid-column: 2; }
  .cartrow__line { grid-column: 2; text-align: left; }
}

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.stepper button {
  width: 38px; height: 38px; background: none; border: 0; cursor: pointer; font-size: 1.0625rem;
  transition: background .15s;
}
.stepper button:hover { background: var(--shade); }
.stepper button[disabled] { opacity: .35; cursor: not-allowed; }
.stepper span { min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; font-size: 0.9375rem; }

.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-5); }
.summary--sticky { position: sticky; top: 104px; }
.summary h2 { font-size: 1.125rem; font-weight: 600; margin-bottom: var(--s-4); }
.switch { display: flex; gap: 4px; padding: 4px; background: var(--shade); border-radius: 999px; margin-bottom: var(--s-4); }
.switch__opt { flex: 1; min-height: 36px; background: none; border: 0; border-radius: 999px; cursor: pointer; font-size: 0.875rem; }
.switch__opt.is-on { background: var(--surface); box-shadow: 0 1px 2px oklch(21% 0.035 330 / 0.12); }

.tally { margin: 0; font-size: 0.9375rem; }
.tally > div { display: flex; justify-content: space-between; gap: var(--s-4); padding: 7px 0; }
.tally dt { color: var(--muted); }
.tally dd { margin: 0; font-variant-numeric: tabular-nums; }
.tally__save dd { color: var(--ok); }
.tally__total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px !important; font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.tally__total dt { color: var(--ink); }
.summary .btn { margin-top: var(--s-4); }

/* ---------------- checkout ---------------- */
.checkout {
  display: grid; gap: clamp(24px, 4vw, 64px); align-items: start;
  grid-template-columns: minmax(0, 1fr) 340px; padding: var(--s-4) var(--pad) var(--s-9);
}
@media (max-width: 940px) { .checkout { grid-template-columns: 1fr; } }
.checkout__form fieldset { border: 0; border-top: 1px solid var(--line); margin: 0 0 var(--s-6); padding: var(--s-5) 0 0; }
.checkout__form legend { font-family: var(--display); font-size: 1.125rem; font-weight: 600; padding-right: var(--s-3); }
.field { display: grid; gap: 6px; margin-bottom: var(--s-4); }
.field > span { font-size: 0.8125rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.field em { text-transform: none; letter-spacing: 0; font-style: normal; opacity: .8; }
.field input, .field textarea {
  min-height: 48px; padding: 12px 16px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px; transition: border-color .15s, background .15s;
}
.field textarea { min-height: auto; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: var(--ink-soft); }
.field.has-error input, .field.has-error textarea { border-color: var(--bad); background: oklch(97% 0.03 25); }
.field2 { display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .field2 { grid-template-columns: 1fr; } }
.formerror { border: 1px solid var(--bad); border-radius: 10px; padding: var(--s-4); margin-bottom: var(--s-5); background: oklch(97% 0.03 25); }
.formerror ul { margin: 8px 0 0; padding-left: 18px; font-size: 0.9375rem; }
.finenote { font-size: 0.8125rem; color: var(--muted); margin-top: var(--s-3); text-align: center; }
.pickupnote { font-size: 0.9375rem; color: var(--ink-soft); background: var(--accent-tint); padding: 12px 16px; border-radius: 10px; margin-bottom: var(--s-4); }
.minilines { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: 12px; font-size: 0.875rem; }
.minilines li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.minilines__q { color: var(--muted); font-variant-numeric: tabular-nums; }
.minilines__n em { display: block; font-style: normal; font-size: 0.6875rem; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.minilines__p { font-variant-numeric: tabular-nums; }

/* ---------------- order sent ---------------- */
.sent { max-width: 68ch; margin-inline: auto; padding: var(--s-8) var(--pad) var(--s-9); text-align: center; }
.sent h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin: var(--s-4) 0 var(--s-4); }
.sent .eyebrow { justify-content: center; }
.sent__text { color: var(--ink-soft); margin-bottom: var(--s-6); }
.sent__preview { text-align: left; margin: var(--s-7) 0 var(--s-5); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.sent__previewhead { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: 12px var(--s-4); background: var(--shade); }
.sent__previewhead h2 { font-size: 0.9375rem; font-weight: 600; font-family: var(--sans); }
.sent pre { margin: 0; padding: var(--s-5); font-size: 0.8125rem; line-height: 1.65; white-space: pre-wrap; background: var(--surface); }

/* ---------------- bag drawer ---------------- */
.bag {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: var(--z-drawer);
  display: flex; flex-direction: column; background: var(--paper);
  border-left: 1px solid var(--line-strong);
  transform: translateX(101%); visibility: hidden;
  transition: transform .42s var(--out-expo), visibility .42s;
}
.bag.is-open { transform: none; visibility: visible; }
.bag__head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-5); border-bottom: 1px solid var(--line); }
.bag__head h2 { font-size: 1.375rem; }
.bag__body { flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-5) var(--s-6); }
.bag__nudge { font-size: 0.8125rem; color: var(--pen, var(--accent)); background: var(--accent-tint); padding: 9px 14px; border-radius: 999px; text-align: center; margin-bottom: var(--s-4); }
.baglines { list-style: none; margin: 0 0 var(--s-5); padding: 0; }
.bagline { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.bagline__thumb { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--tile, var(--shade)); }
.bagline__thumb img { width: 100%; height: 100%; object-fit: cover; }
.bagline__name { font-size: 0.9375rem; text-decoration: none; }
.bagline__id { font-family: ui-monospace, Menlo, monospace; font-size: 0.6875rem; color: var(--muted); margin: 3px 0 8px; }
.bagline__end { text-align: right; display: grid; gap: 6px; align-content: start; }
.bagline__price { font-weight: 600; font-variant-numeric: tabular-nums; }
.bag__actions { padding-top: var(--s-4); border-top: 1px solid var(--line); }
.scrim { position: fixed; inset: 0; z-index: var(--z-scrim); background: oklch(21% 0.035 330 / 0.42); border: 0; animation: fade .3s var(--out-quart); }
@keyframes fade { from { opacity: 0; } }
body.no-scroll { overflow: hidden; }

/* ---------------- toasts ---------------- */
.toasts { position: fixed; bottom: var(--s-5); left: 50%; translate: -50% 0; z-index: var(--z-toast); display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast {
  padding: 13px 18px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-size: 0.875rem; text-align: center; box-shadow: 0 8px 24px oklch(21% 0.035 330 / 0.22);
  animation: rise .34s var(--out-expo);
}
.toast--bad { background: var(--bad); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.toast.is-going { animation: sink .26s var(--in-expo) forwards; }
@keyframes sink { to { opacity: 0; transform: translateY(8px); } }

/* ---------------- footer ---------------- */
.footer { background: var(--ink); color: oklch(88% 0.02 330); padding: var(--s-9) var(--pad) var(--s-6); }
.footer__mark { font-family: var(--display); font-size: clamp(2.5rem, 9vw, 5.5rem); font-weight: 700; color: var(--paper); letter-spacing: -0.05em; line-height: 1; margin-left: -0.04em; }
.footer__note { color: oklch(72% 0.03 330); margin-top: var(--s-3); max-width: 40ch; }
.footer__cols { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: var(--s-8) 0 var(--s-7); font-size: 0.9375rem; }
.footer__cols h3 { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.11em; text-transform: uppercase; color: oklch(68% 0.03 330); margin-bottom: var(--s-3); }
.footer__cols p { margin-bottom: 7px; color: oklch(86% 0.02 330); }
.footer__cols a { color: inherit; }
.footer__addr { color: oklch(70% 0.03 330) !important; }
.footer__legal { font-size: 0.75rem; color: oklch(62% 0.03 330); border-top: 1px solid oklch(32% 0.04 330); padding-top: var(--s-4); }

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

@media (max-width: 780px) {
  .mainnav { display: none; }
  .controls { top: 69px; }
  .controls__inputs { width: 100%; justify-content: space-between; }
}
