/* ==========================================================================
   Graftstall design system: warm studio. Cream paper, berry and sage, a soft
   serif for headings and a clear, friendly sans for reading. Built to be easy
   on the eye: larger text, strong contrast, no all-caps, calm motion.
   Change the brand by editing the tokens below.
   ========================================================================== */
:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #faf6ef;              /* cream paper */
  --bg-2: #fffdf9;            /* cards and panels */
  --bg-3: #f1eadf;            /* wells, image backgrounds */
  --line: #e6dccd;
  --line-2: #d5c8b6;

  /* Text (all pass WCAG AA on --bg and --bg-2; --ink and --ink-2 pass AAA) */
  --ink: #2b2420;
  --ink-2: #453b35;
  --muted: #5f544c;
  --faint: #8c8076;           /* placeholders and decoration only */

  /* Brand */
  --accent: #a23e61;          /* berry: buttons, links, highlights */
  --accent-2: #8a3352;
  --accent-ink: #ffffff;
  --highlight: #f3cf63;       /* marker colour some shop themes use */

  /* Theme hooks (shop themes override these) */
  --field-bg: #ffffff;
  --veil-rgb: 250, 246, 239;  /* translucent bars and photo veils */
  --display-weight: 620;
  --display-transform: none;
  --accent-soft: rgba(162, 62, 97, 0.09);
  --sage: #6e8559;
  --hot: #c2412d;             /* unread counts */

  /* Status */
  --ok: #2f7a4a;
  --ok-bg: #eaf4ec;
  --ok-line: #a9d1b4;
  --warn: #7a5600;
  --warn-bg: #fbf3de;
  --warn-line: #e5cb85;
  --danger: #b3261e;
  --danger-bg: #fbedec;
  --danger-line: #e8b4af;
  --info: #2f5e9e;
  --info-bg: #eaf1fa;
  --info-line: #b5cbe8;

  /* Type */
  --font-display: 'Fraunces Variable', Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono Variable', ui-monospace, Consolas, monospace;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(70, 50, 35, 0.05), 0 10px 28px rgba(70, 50, 35, 0.07);

  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  accent-color: var(--accent);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; font-size: 106.25%; } /* 17px base */
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; line-height: 1.6; background: var(--bg); }
main { flex: 1; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-3); padding: 1px 6px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.01em; font-variation-settings: 'SOFT' 100, 'WONK' 0; color: var(--ink); }
h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.mono { font-family: var(--font-mono); }
.kicker { font-size: 1rem; font-weight: 600; color: var(--accent); margin-bottom: 12px; display: inline-flex; gap: 8px; align-items: center; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(540px, 100% - 32px); margin-inline: auto; }
.mid { width: min(840px, 100% - 32px); margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mt { margin-top: 1.5rem; }
.mb { margin-bottom: 1.5rem; }
.section { padding: 40px 0; }

/* ---- Top banner, header ------------------------------------------------ */
.banner { background: var(--warn-bg); color: var(--warn); font-size: 0.92rem; text-align: center; padding: 7px 12px; border-bottom: 1px solid var(--warn-line); }
.banner code { background: rgba(70, 50, 35, 0.12); color: inherit; }

.site-header { background: rgba(var(--veil-rgb), 0.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .container { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo:hover { color: var(--ink); }
.logo svg { width: 32px; height: 32px; flex-shrink: 0; transition: transform 0.2s; }
.logo:hover svg { transform: rotate(-8deg) scale(1.05); }
.logo-text { font-family: var(--font-display); font-weight: 650; font-size: 1.4rem; letter-spacing: -0.01em; text-transform: lowercase; font-variation-settings: 'SOFT' 100; }
.search { flex: 1; display: flex; max-width: 520px; position: relative; }
.search input { flex: 1; border-radius: 999px; padding-left: 18px; padding-right: 96px; background: var(--bg-2); }
.search button { position: absolute; right: 4px; top: 4px; bottom: 4px; border-radius: 999px; padding: 0 16px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a, .nav button.link { color: var(--ink-2); text-decoration: none; padding: 9px 14px; border-radius: 999px; font-size: 1rem; font-weight: 500; }
.nav a:hover, .nav button.link:hover { color: var(--ink); background: var(--bg-3); }
.nav a.btn { color: var(--accent-ink); margin-left: 6px; }
.nav a.btn:hover { background: var(--accent-2); color: var(--accent-ink); }
.nav form { margin: 0; }
@media (max-width: 780px) {
  .site-header .container { height: auto; flex-wrap: wrap; padding: 10px 0; gap: 10px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .nav { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  .nav a, .nav button.link { padding: 6px 8px; }
}

/* ---- Buttons -------------------------------------------------------------- */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 650;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--accent-2); color: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 0 0 4px var(--accent-soft); }
.btn:active { transform: translateY(0); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.secondary:hover { border-color: var(--ink); box-shadow: none; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger-line); }
.btn.danger:hover { background: var(--danger-bg); box-shadow: none; }
.btn.big { padding: 16px 30px; font-size: 1.08rem; }
.btn.block { width: 100%; }
.btn.small { padding: 9px 16px; font-size: 0.92rem; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn[disabled]:hover { background: var(--accent); }
.btn.secondary[disabled]:hover, .btn.danger[disabled]:hover { background: transparent; }
button.link { background: none; border: 0; font: inherit; cursor: pointer; color: var(--accent); padding: 0; }

/* ---- Forms ---------------------------------------------------------------- */
label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 1rem; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 13px 15px; font: inherit; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--field-bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type=file] { color: var(--muted); font: inherit; font-size: 0.9rem; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; color: var(--ink); background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px; margin-right: 12px; cursor: pointer; }
textarea { min-height: 150px; resize: vertical; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.input-prefix input { padding-left: 30px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.filters select { width: auto; }

/* ---- Panels, alerts, badges ----------------------------------------------- */
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 18px; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 16px 0; border: 1px solid; font-size: 0.95rem; }
.alert.success { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.alert.error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.alert.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.alert.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 0.82rem; font-weight: 600; background: var(--bg-3); border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }
.badge.warn { color: var(--warn); border-color: var(--warn-line); background: var(--warn-bg); }
.badge.danger { color: var(--danger); border-color: var(--danger-line); background: var(--danger-bg); }
.badge.brand { color: var(--accent); border-color: rgba(162, 62, 97, 0.35); background: var(--accent-soft); }

/* ---- Home: hero ------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); padding: 72px 0 64px; background: var(--bg); }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.display { font-family: var(--font-display); font-weight: var(--display-weight); text-transform: var(--display-transform); font-size: clamp(2.3rem, 5.6vw, 4rem); line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 22px; font-variation-settings: 'SOFT' 100, 'WONK' 0; }
.display .hl { color: var(--accent); text-decoration: underline wavy var(--accent) 0.06em; text-underline-offset: 0.2em; text-decoration-skip-ink: none; }
.hero .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 48ch; }
.hero .lede strong { color: var(--ink); font-weight: 600; }

/* Receipt card (fee explainer) */
.receipt { font-family: var(--font-body); font-variant-numeric: tabular-nums; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px 22px 18px; box-shadow: var(--shadow); }
.receipt-head { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--muted); padding-bottom: 12px; border-bottom: 1px dashed var(--line-2); margin-bottom: 12px; }
.receipt-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.93rem; }
.receipt-row.total { border-top: 1px dashed var(--line-2); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 1.05rem; }
.receipt-row .acc { color: var(--accent); }
.receipt-note { font-size: 0.86rem; color: var(--muted); margin-top: 12px; }
.receipt-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.receipt-tabs span { font-size: 0.86rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.receipt-tabs span.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }

/* Scrolling ticker */
.ticker { background: var(--accent); color: var(--accent-ink); overflow: hidden; white-space: nowrap; border-bottom: 1px solid var(--accent-2); }
.ticker-track { display: inline-flex; gap: 0; animation: ticker 38s linear infinite; padding: 11px 0; }
.ticker-track span { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 0.82rem; font-weight: 700; padding: 0 22px; }
.ticker-track span::after { content: '/'; margin-left: 44px; opacity: 0.5; }
.ticker-track b { font-weight: 700; margin-left: 8px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* Why cards */
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .why-grid { grid-template-columns: 1fr; } }
.why-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: border-color 0.2s, transform 0.2s; }
.why-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.why-card .num { font-family: var(--font-body); font-variant-numeric: tabular-nums; color: var(--accent); font-size: 0.85rem; margin-bottom: 18px; display: block; }
.why-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.why-card p { color: var(--muted); margin: 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; }

.cta-band { border: 1px solid var(--line-2); border-radius: 22px; padding: 44px; display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap;
  background: var(--accent-soft); }
.cta-band h2 { font-size: clamp(1.5rem, 3.4vw, 2.4rem); margin: 0 0 8px; letter-spacing: -0.03em; }

/* Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: all 0.15s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---- Listing grid --------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 16px 40px rgba(70, 50, 35, 0.12); color: inherit; }
.card-img { aspect-ratio: 1 / 1; background: var(--bg-3); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 14px 16px 16px; }
.card-price { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.card-title { font-size: 1rem; font-weight: 500; margin: 4px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: 0.88rem; color: var(--muted); }
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 10px 12px 12px; }
}
.empty { text-align: center; padding: 56px 16px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* ---- Listing page ---------------------------------------------------------- */
.listing-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 36px; align-items: start; padding-top: 28px; }
@media (max-width: 880px) { .listing-layout { grid-template-columns: 1fr; } }
.gallery-main { aspect-ratio: 1 / 1; background: var(--bg-3); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs button { width: 72px; height: 72px; padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--bg-3); }
.thumbs button.active { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.price-big { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 2.2rem; font-weight: 700; letter-spacing: -0.01em; color: var(--accent); }
.buy-box { position: sticky; top: 88px; }
.desc { white-space: pre-line; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 0.93rem; margin: 18px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 0.9rem; align-self: center; }
.facts dd { margin: 0; }
.seller-card { display: flex; gap: 12px; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 650; flex-shrink: 0; }

/* ---- Fee picker & breakdowns ---------------------------------------------- */
.fee-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.fee-option { position: relative; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px; cursor: pointer; background: var(--field-bg); font-weight: 400; margin: 0; transition: border-color 0.15s, background 0.15s; color: var(--muted); }
.fee-option:hover { border-color: var(--faint); }
.fee-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.fee-option input { position: absolute; top: 18px; right: 18px; }
.fee-option strong { display: block; margin-bottom: 6px; padding-right: 24px; color: var(--ink); }
.fee-option .eg { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 0.8rem; color: var(--muted); margin-top: 10px; }

.breakdown { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.breakdown td { padding: 7px 0; }
.breakdown td:last-child { text-align: right; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.breakdown tr.total td { border-top: 1px dashed var(--line-2); font-weight: 700; padding-top: 11px; }
.breakdown tr.total:last-child td:last-child { color: var(--accent); }
.breakdown tr.minus td:last-child::before { content: '− '; }

/* ---- Dashboard -------------------------------------------------------------- */
.dash-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 20px 0 24px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.dash-nav a { padding: 11px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.dash-nav a:hover { color: var(--ink); }
.dash-nav a.active { color: var(--ink); border-bottom-color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat .label { color: var(--muted); font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.stat .value { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; margin-top: 4px; }
.stripe-status { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stripe-status.connected { border-color: var(--ok-line); background: linear-gradient(90deg, var(--ok-bg), var(--bg-2) 60%); }
.stripe-status.todo { border-color: rgba(162, 62, 97, 0.35); background: linear-gradient(90deg, var(--accent-soft), var(--bg-2) 60%); }

table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th { text-align: left; font-weight: 600; color: var(--muted); font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 0.86rem; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
table.data td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data td.num, table.data th.num { text-align: right; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: rgba(70, 50, 35, 0.03); }
.table-wrap { overflow-x: auto; }
.thumb-sm { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--bg-3); }
.inline-form { display: inline; margin: 0; }

.order { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--bg-2); }
.order + .order { margin-top: 12px; }
.order-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; }
@media (max-width: 780px) { .order-grid { grid-template-columns: 1fr; } }
details summary { cursor: pointer; color: var(--accent); font-weight: 600; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photo-grid label { position: relative; font-weight: 400; margin: 0; }
.photo-grid img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; width: 100%; border: 1px solid var(--line-2); }
.photo-grid .remove { position: absolute; left: 6px; bottom: 6px; background: rgba(var(--veil-rgb), 0.85); padding: 3px 8px; border-radius: 6px; font-size: 0.78rem; }
.preview-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.preview-strip img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-2); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--font-body); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent-ink); background: var(--accent); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-size: 0.8rem; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 28px; }

/* ---- Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 36px 0 28px; color: var(--muted); font-size: 0.9rem; overflow: hidden; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.wordmark-xl { font-family: var(--font-display); font-weight: var(--display-weight); text-transform: lowercase; letter-spacing: -0.03em; font-variation-settings: 'SOFT' 100; font-size: clamp(2rem, 14vw, 12rem); line-height: 0.9; color: var(--line); margin: 0 0 24px; user-select: none; white-space: nowrap; }
.wordmark-xl span { color: var(--accent); }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 28px; }
.footer-cols h4 { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 1rem; color: var(--ink); margin: 0 0 10px; }
.footer-cols a { display: block; padding: 3px 0; }
.footer-base { border-top: 1px solid var(--line); padding-top: 18px; }
@media (max-width: 640px) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ==========================================================================
   Platform features: navigation, shops, listings, reviews, onboarding
   ========================================================================== */
.mt-s { margin-top: 0.75rem; }
.mb-s { margin-bottom: 0.75rem; }
.mono { font-family: var(--font-mono); }
.warn-text { color: var(--warn); }
.block-link { display: block; text-align: center; margin-top: 10px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { left: 8px; }
.count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--hot); color: #fff; font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 0.8rem; font-weight: 700; margin-left: 4px; vertical-align: 1px; }
.chip-count { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 0.8rem; opacity: 0.7; margin-left: 4px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; cursor: pointer; }
label.check input { margin-top: 4px; flex-shrink: 0; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 0; }
.breadcrumbs { padding-top: 18px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

/* Account menu (header) */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 4px; border-radius: 999px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover .avatar { box-shadow: 0 0 0 4px var(--accent-soft); }
.avatar.xs { width: 32px; height: 32px; border-radius: 10px; font-size: 0.85rem; }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; z-index: 30; }
.menu-list a, .menu-list button.link { display: block; width: 100%; text-align: left; color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 0.93rem; }
.menu-list a:hover, .menu-list button.link:hover { background: var(--bg-3); color: var(--ink); }
.menu-list form { margin: 4px 0 0; border-top: 1px solid var(--line); padding-top: 4px; }
.menu-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }

/* Cards */
.card-img { position: relative; }
.card-noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 0.92rem; min-height: 120px; }
.card-flag { position: absolute; left: 10px; top: 10px; background: rgba(var(--veil-rgb), 0.85); color: var(--ink); font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 0.7rem; padding: 4px 8px; border-radius: 6px; }
.card-favs { position: absolute; right: 10px; bottom: 10px; background: rgba(var(--veil-rgb), 0.8); color: var(--ink); font-size: 0.8rem; padding: 3px 8px; border-radius: 999px; }
.card-rating { color: var(--warn); }
.fav-card { position: relative; }
.fav-remove { position: absolute; top: 8px; right: 8px; }

/* Shop cards (home) */
.shop-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.shop-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; transition: border-color 0.18s, transform 0.18s; }
.shop-card:hover { border-color: var(--accent); transform: translateY(-3px); color: inherit; }
.shop-card-banner { height: 80px; background: radial-gradient(300px 120px at 80% 0%, rgba(162, 62, 97, 0.18), transparent 70%), var(--bg-3); background-size: cover; background-position: center; }
.shop-card-body { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }

/* Shop page */
.shop-banner { height: clamp(120px, 22vw, 260px); background: radial-gradient(700px 260px at 85% 0%, rgba(162, 62, 97, 0.16), transparent 70%), linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px, var(--bg-2); background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.shop-head { margin-top: -56px; position: relative; }
.shop-head-main { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.shop-logo { width: 96px; height: 96px; border-radius: 20px; object-fit: cover; border: 3px solid var(--bg-2); background: var(--bg-3); flex-shrink: 0; font-size: 2.2rem; }
.shop-logo.sm { width: 46px; height: 46px; border-radius: 12px; border-width: 0; font-size: 1rem; }
.shop-tagline { margin: 4px 0 6px; color: var(--ink-2); }
.shop-meta a { color: inherit; text-decoration: none; }
.social-links { gap: 14px; margin-top: 8px; font-size: 0.88rem; }
.announcement { margin-top: 16px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid rgba(162, 62, 97, 0.25); font-size: 0.93rem; }
.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; margin-top: 24px; align-items: start; }
.shop-filters { margin-bottom: 8px; }
.shop-filters select, .shop-filters input { width: auto; }
@media (max-width: 960px) { .shop-layout { grid-template-columns: 1fr; } }

/* Browse */
.browse-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.filters-panel { position: sticky; top: 88px; padding: 18px; }
.filters-panel .field { margin-bottom: 14px; }
.price-range { grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 820px) { .browse-layout { grid-template-columns: 1fr; } .filters-panel { position: static; } }

/* Listing page */
.fav-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line-2); color: var(--muted); border-radius: 999px; padding: 7px 12px; font: inherit; cursor: pointer; transition: all 0.15s; }
.fav-btn .heart { font-size: 1.05rem; line-height: 1; }
.fav-btn:hover { border-color: var(--hot); color: var(--hot); }
.fav-btn.on { border-color: var(--hot); color: #fff; background: var(--hot); }
.policy-list { padding-left: 18px; margin: 0 0 10px; }
.policy-list li { margin: 4px 0; }
.specifics { margin-top: 0; }
.small-chip { padding: 4px 10px; font-size: 0.8rem; }
.buy-links { justify-content: center; }
.report-link { text-align: center; margin-top: 14px; }

/* Stars, reviews */
.stars { color: var(--faint); letter-spacing: 1px; white-space: nowrap; }
.stars .on { color: #b07a0c; } /* gold, 3.5:1 on cream */
.review { border-bottom: 1px solid var(--line); padding: 16px 0; }
.panel.review { border-bottom: 1px solid var(--line); padding: 18px 22px; }
.review.is-hidden { opacity: 0.55; }
.review-body { white-space: pre-line; margin: 8px 0 0; }
.review-mini { padding: 10px 0; border-top: 1px solid var(--line); }
.review-mini p { margin: 4px 0; }
.seller-reply { margin-top: 10px; padding: 10px 14px; background: var(--bg-3); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; font-size: 0.93rem; white-space: pre-line; }
.reviews-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 820px) { .reviews-layout { grid-template-columns: 1fr; } }
.rating-big { font-family: var(--font-display); font-size: 3rem; font-weight: 800; line-height: 1; }
.dist-row { display: grid; grid-template-columns: 32px 1fr 28px; gap: 8px; align-items: center; font-size: 0.85rem; margin: 4px 0; }
.dist-bar { height: 8px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.dist-bar span { display: block; height: 100%; background: var(--warn); border-radius: 999px; }
.star-input { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 2rem; color: var(--line-2); cursor: pointer; margin: 0; line-height: 1; transition: color 0.1s; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--warn); }
.star-input input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }

/* Onboarding checklist */
.checklist-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.checklist-head h2 { margin: 0; }
.checklist-head .kicker { margin-bottom: 6px; }
.progress { height: 10px; width: min(280px, 100%); background: var(--bg-3); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s; }
.checklist-steps { list-style: none; margin: 0; padding: 0; }
.checklist-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.checklist-steps li.current { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
.checklist.compact .checklist-steps li { padding: 9px 0; }
.checklist.compact .checklist-steps li.current { padding: 12px 24px; }
.checklist-steps .tick { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; }
.checklist-steps li.done .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.checklist-steps li.done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.checklist-steps form { margin: 0; }
.setup-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.settings-layout aside { position: sticky; top: 88px; }
@media (max-width: 960px) { .setup-layout, .settings-layout { grid-template-columns: 1fr; } .settings-layout aside { position: static; } }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.dash-grid .panel + .panel { margin-top: 0; }
.low-stock { padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: nowrap; }
.thumb-empty { display: grid; place-items: center; color: var(--faint); border: 1px dashed var(--line-2); }
.bulk-bar select { min-width: 180px; }
.small-value { font-size: 1.1rem; }

/* Listing form */
.photo-manager { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-item { background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 12px; padding: 8px; cursor: grab; position: relative; }
.photo-item:first-child { border-color: var(--accent); }
.photo-item:first-child::before { content: 'Cover'; position: absolute; top: 14px; left: 14px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 0.8rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.photo-item.dragging { opacity: 0.4; }
.photo-item.drag-over { outline: 2px dashed var(--accent); }
.photo-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.photo-controls { display: flex; justify-content: space-between; margin: 6px 0 4px; }
.photo-controls label { margin: 0; font-weight: 400; display: flex; gap: 4px; align-items: center; }
.alt-input { font-size: 0.8rem !important; padding: 6px 8px !important; }
.drag-hint { display: block; text-align: center; font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.dropzone { border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 16px; transition: border-color 0.15s, background 0.15s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.attr-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin-bottom: 8px; }
.fee-option.compact { padding: 10px 14px; margin-bottom: 8px; }
.fee-option.compact input { position: static; margin-right: 8px; }
.char-count { float: right; font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 0.86rem; color: var(--muted); font-weight: 400; }
.char-count.near { color: var(--warn); }

/* Shop profile editor */
.brand-preview { position: relative; margin-bottom: 40px; }
.banner-preview { height: 120px; border-radius: var(--radius-sm); background: var(--bg-3); background-size: cover; background-position: center; display: grid; place-items: center; border: 1px solid var(--line); }
.logo-preview { position: absolute; left: 18px; bottom: -32px; width: 76px; height: 76px; border-radius: 16px; overflow: hidden; border: 3px solid var(--bg-2); background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.policy-preview { list-style: none; padding: 0; }
.policy-preview li { padding: 6px 0; }

/* Orders, purchases */
.order.overdue { border-color: var(--danger-line); }
.address { line-height: 1.45; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.timeline li { padding: 10px 12px; border-left: 3px solid var(--line-2); display: flex; flex-direction: column; }
.timeline li.done { border-left-color: var(--accent); }
.setup-layout .timeline, aside .timeline { grid-template-columns: 1fr; }

/* Sell page */
.sell-hero .receipt label { font-weight: 400; color: var(--muted); }
.receipt .tab { display: inline-flex; gap: 6px; align-items: center; font-size: 0.8rem; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); cursor: pointer; margin: 0; font-weight: 600; }
.receipt .tab:has(input:checked) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.receipt .tab input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.steps-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { color: var(--ink); font-weight: 600; }
.faq p { margin: 10px 0 0; color: var(--muted); }
.title-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.title-row h1 { flex: 1; min-width: 0; }
.title-row form { flex-shrink: 0; margin-top: 4px; }

/* Listing variants */
.from { font-size: 0.6em; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-right: 2px; }
.card-price .from { font-size: 0.75em; }
.option-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }
@media (max-width: 560px) { .option-row { grid-template-columns: 1fr; gap: 0; } }
.variant-table td { padding: 6px 8px; }
.variant-table td:nth-child(2) { font-weight: 600; white-space: nowrap; }
.variant-table .input-sm, .variant-tools .input-sm { padding: 6px 8px; font-size: 0.88rem; }
.variant-table .input-prefix input { padding-left: 24px; }
.variant-table .input-prefix span { left: 9px; font-size: 0.85rem; }
.variant-table input[type=number] { width: 80px; }
.variant-table input[name^=vsku_] { width: 120px; }
.variant-table input[name^=vprice_] { width: 96px; }
.variant-tools { margin: 4px 0 10px; gap: 8px; }
.variant-tools input { width: 80px; }

/* ---------------------------------------------------------------------------
   Stall mode (in-person till) - built for a phone held at a market stall
   ------------------------------------------------------------------------- */
.stall-takings { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); text-decoration: none; background: var(--bg-2); }
.stall-takings strong { font-family: var(--font-body); font-variant-numeric: tabular-nums; color: var(--accent); }
.stall-takings:hover { border-color: var(--accent); color: var(--ink); }
.stall-search { width: 100%; font-size: 1.05rem; padding: 14px 16px; margin: 4px 0 16px; }
.stall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .stall-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.stall-item { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 8px 8px 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font: inherit; cursor: pointer; transition: border-color 0.15s, transform 0.1s; -webkit-tap-highlight-color: transparent; }
.stall-item:hover { border-color: var(--line-2); }
.stall-item:active { transform: scale(0.97); }
.stall-item.just-added { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.stall-item.is-out { opacity: 0.45; cursor: not-allowed; }
.stall-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-3); }
.stall-thumb img { width: 100%; height: 100%; object-fit: cover; }
.stall-initials { font-family: var(--font-display); font-weight: 650; font-size: 1.6rem; color: var(--faint); }
.stall-in-basket { position: absolute; top: 6px; right: 6px; min-width: 26px; height: 26px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-body); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.85rem; }
.stall-item-title { font-weight: 600; font-size: 0.92rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.stall-item-meta { display: flex; justify-content: space-between; gap: 6px; font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 0.9rem; color: var(--muted); }
.stall-item-meta b { color: var(--ink); font-weight: 600; }

.stall-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(var(--veil-rgb), 0.94); backdrop-filter: blur(10px); border-top: 1px solid var(--line-2); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
.stall-bar[hidden] { display: none; }
.stall-bar-inner { display: flex; gap: 12px; align-items: center; }
.stall-bar-summary { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.9rem; cursor: pointer; padding: 4px 0; text-align: left; }
.stall-bar-summary strong { color: var(--ink); font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 1.3rem; }
body.stall-has-bar { padding-bottom: 96px; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(43, 36, 32, 0.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop[hidden] { display: none; }
.sheet { width: min(560px, 100%); max-height: 92vh; overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 20px 20px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(70, 50, 35, 0.12); }
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 20px; border-bottom: 1px solid var(--line-2); } }
body.sheet-open { overflow: hidden; }
.sheet h2 { font-size: 1.25rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.stall-variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stall-variant { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg-3); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.stall-variant:hover:not([disabled]) { border-color: var(--accent); }
.stall-variant[disabled] { opacity: 0.45; cursor: not-allowed; }
.stall-lines { list-style: none; margin: 12px 0; padding: 0; }
.stall-line { padding: 12px 0; border-bottom: 1px solid var(--line); }
.stall-line-title { font-weight: 600; margin-bottom: 8px; }
.stall-line-controls { display: flex; align-items: center; gap: 10px; }
.stall-line-total { margin-left: auto; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.qty button { width: 40px; height: 40px; background: var(--bg-3); border: 0; color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.qty button[disabled] { color: var(--faint); cursor: not-allowed; }
.qty span { min-width: 34px; text-align: center; font-family: var(--font-body); font-variant-numeric: tabular-nums; font-weight: 600; }
.stall-price { width: 110px; flex-shrink: 0; }
.stall-price input { padding-top: 9px; padding-bottom: 9px; }
.stall-total-row { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 16px; font-size: 1.05rem; }
.stall-total-row strong { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 1.4rem; }
.stall-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stall-big-total { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-weight: 700; font-size: clamp(2.2rem, 10vw, 3rem); letter-spacing: -0.03em; margin: 2px 0 16px; outline: none; }
.stall-pay-options { display: grid; gap: 10px; }
.stall-pay-btn { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-3); color: var(--ink); font: inherit; cursor: pointer; }
.stall-pay-btn strong { font-family: var(--font-display); font-size: 1.25rem; }
.stall-pay-btn span { color: var(--muted); font-size: 0.9rem; }
.stall-pay-btn:hover:not([disabled]) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.stall-pay-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.stall-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.stall-quick .chip { cursor: pointer; font: inherit; }
.stall-change { min-height: 1.6em; margin: 6px 0 14px; font-size: 1.05rem; }
.stall-change strong, .stall-change-due strong { font-family: var(--font-body); font-variant-numeric: tabular-nums; color: var(--accent); }
.stall-change-due { text-align: center; font-size: 1.2rem; margin: 0 0 8px; }
.stall-error { color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger-line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 0.92rem; }
.stall-error[hidden] { display: none; }
.stall-qr { background: #fff; border-radius: var(--radius); padding: 14px; width: min(300px, 100%); margin: 0 auto 12px; }
.stall-qr svg { display: block; width: 100%; height: auto; }
.stall-status { text-align: center; font-family: var(--font-body); font-variant-numeric: tabular-nums; color: var(--accent); margin: 8px 0 14px; }
.stall-done-mark, .stall-paid-mark { width: 72px; height: 72px; margin: 4px auto 12px; display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 2.2rem; font-weight: 800; }
.stall-toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 60; max-width: min(92vw, 460px); padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 0.92rem; box-shadow: var(--shadow); transition: opacity 0.4s; text-align: center; }
.stall-toast.out { opacity: 0; }
.stall-sale.is-closed { opacity: 0.6; }
.stall-sale-items { margin: 10px 0 12px; padding-left: 18px; font-size: 0.92rem; }
.stall-sale-items li { margin: 2px 0; }
.stall-paid { text-align: center; }
.stall-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) {
  .stall-stats { gap: 8px; }
  .stall-stats .stat { padding: 12px; }
  .stall-stats .stat .value { font-size: 1.1rem; }
  .stall-stats .stat .small { display: none; }
  .stall-intro { display: none; }
}

/* ---------------------------------------------------------------------------
   Seller websites (shop sub-domains) and terms of sale
   ------------------------------------------------------------------------- */
.site-mode .logo { gap: 12px; }
.site-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.site-logo-letter { display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: 800; }
.site-name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.15rem; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.site-nav a.active { color: var(--ink); background: var(--bg-3); }
.site-wordmark { white-space: normal; overflow-wrap: anywhere; font-size: clamp(2.4rem, 9vw, 7rem); line-height: 0.9; }
.site-trader { margin: -8px 0 18px; }

.site-hero { position: relative; border-bottom: 1px solid var(--line); padding: 84px 0 72px; background: var(--bg) center / cover no-repeat; }
.site-hero.has-photo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(var(--veil-rgb), 0.92) 0%, rgba(var(--veil-rgb), 0.72) 55%, rgba(var(--veil-rgb), 0.35) 100%); }
.site-hero-inner { position: relative; }
.site-headline { font-size: clamp(2.2rem, 6.4vw, 4.6rem); max-width: 16ch; overflow-wrap: anywhere; }
.site-hero .lede { font-size: 1.15rem; color: var(--ink-2); max-width: 52ch; }
@media (max-width: 560px) { .site-hero { padding: 56px 0 48px; } }
.site-reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.site-about { font-size: 1.05rem; line-height: 1.7; max-width: 68ch; }

.terms-page { max-width: 820px; }
.terms-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 18px 0 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); font-size: 0.9rem; }
.terms-section { padding-top: 18px; scroll-margin-top: 90px; }
.terms-section h2 { font-size: 1.2rem; margin-bottom: 0.5em; }
.terms-section p { line-height: 1.7; margin: 0 0 0.9em; }
.terms-intro ul { padding-left: 18px; margin: 10px 0 14px; }
.terms-intro li { margin: 6px 0; }
.terms-edit-section { margin-top: 16px; }
.terms-edit-section textarea { width: 100%; margin-top: 6px; }
.terms-fixed { margin: 12px 0; padding: 12px 14px; border-left: 3px solid var(--line-2); background: var(--bg-3); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.terms-fixed p { margin: 0 0 0.6em; color: var(--muted); }
.terms-fixed p:last-child { margin-bottom: 0; }
.terms-reset { display: block; margin: 8px 0; }
.terms-default { margin-top: 8px; padding: 10px 12px; background: var(--bg-3); border-radius: var(--radius-sm); }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; padding: 14px 0; margin-top: 16px; background: linear-gradient(transparent, var(--bg) 35%); }

.switch-row { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.switch-row input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); }
.site-featured-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.site-featured-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.site-featured-item:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.site-featured-item input { accent-color: var(--accent); flex-shrink: 0; }
.site-featured-item img, .site-featured-noimg { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--bg-3); flex-shrink: 0; }
.accent-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.accent-swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.accent-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.accent-swatch span { width: 44px; height: 44px; border-radius: 12px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(70, 50, 35, 0.12); }
.accent-swatch input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 5px var(--ink); }
.accent-swatch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.accent-swatch small { color: var(--muted); font-size: 0.8rem; }

/* Fee rules (admin) and a seller's own fees */
.fee-offers { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.fee-offers li { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-3); }
.fee-offers li.on { border-color: var(--accent); background: var(--accent-soft); }
.fee-rule { padding: 12px 0; border-bottom: 1px solid var(--line); }
.fee-rule:last-child { border-bottom: 0; }
.fee-rule.is-past { opacity: 0.7; }
.fee-rule .badge { margin-left: 6px; }
.fee-kind-help { margin: 6px 0 0; padding-left: 16px; }
.fee-kind-help li { margin: 2px 0; }

/* Shipping integrations */
.connect-steps { padding-left: 20px; margin: 10px 0 14px; }
.connect-steps li { margin: 4px 0; }
.cd-status { padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-3); }

/* ---------------------------------------------------------------------------
   Comfortable for everyone: bigger tap targets, clear focus, calm motion
   ------------------------------------------------------------------------- */
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); }
.chip { min-height: 42px; display: inline-flex; align-items: center; }
.card:hover { transform: translateY(-2px); }
.card-price { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------------------
   Shop themes (lib/themes.js). A theme sets the tokens above on <body> (a
   seller's website) or on .shop-theme (their shop page on the marketplace);
   these rules give each theme its own headline highlight.
   ------------------------------------------------------------------------- */
.shop-theme { background: var(--bg); color: var(--ink); font-family: var(--font-body); padding-bottom: 32px; }
.shop-theme .shop-banner { border-radius: 0; }
[data-theme="market"] .display .hl { color: inherit; text-decoration: none; background: var(--highlight); padding: 0 0.15em; border-radius: 6px; }
[data-theme="pop"] .display .hl { color: var(--ink); text-decoration: none; display: inline-block; background: var(--highlight); padding: 0 0.3em; border-radius: 999px; transform: rotate(-3deg); }
[data-theme="bold"] .display .hl { color: var(--accent-ink); text-decoration: none; display: inline-block; background: var(--accent); padding: 0 0.12em; border-radius: 6px; transform: rotate(-3deg); }
[data-theme="bold"] .display, [data-theme="bold"] .site-name { letter-spacing: -0.03em; }
[data-theme="pop"] .btn, [data-theme="pop"] .chip { border-radius: 999px; }

/* Theme picker (Website settings) */
.theme-picker { display: grid; gap: 10px; }
.theme-option { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-weight: 400; margin: 0; position: relative; }
.theme-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-option input:focus-visible + .theme-preview { outline: 3px solid var(--accent); outline-offset: 2px; }
.theme-preview { display: flex; flex-direction: column; gap: 6px; padding: 10px; min-height: 76px; box-shadow: inset 0 0 0 1px rgba(70, 50, 35, 0.12); }
.theme-preview-title { font-size: 1.05rem; line-height: 1.1; }
.theme-preview-row { display: flex; gap: 6px; align-items: center; }
.theme-preview-btn { font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.theme-preview-card { font-size: 0.75rem; padding: 2px 8px; border-radius: 6px; }
.theme-option-text { display: flex; flex-direction: column; gap: 2px; }

/* Example-sale switch on the home page, and the /sell calculator tabs */
.receipt-tab { font: inherit; font-size: 0.92rem; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); cursor: pointer; font-weight: 600; }
.receipt-tab:hover { border-color: var(--accent); color: var(--accent); }
.receipt-tab[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.receipt .tab { font-size: 0.92rem; padding: 7px 14px; }
.receipt .tab:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
