/* ==========================================================================
   Velora — design system
   Self-hosted system fonts only: zero third-party requests, no GDPR headache,
   nothing to block the first paint.
   ========================================================================== */

:root {
  --bg:        #fbf9f7;
  --bg-alt:    #f4efe9;
  --surface:   #ffffff;
  --surface-2: #faf7f4;
  --ink:       #1c1917;
  --ink-soft:  #44403c;
  --muted:     #79716b;
  --line:      #e9e2da;
  --line-soft: #f1ece6;
  --accent:    #7c2d4f;
  --accent-ink:#ffffff;
  --accent-soft:#fdf1f5;
  --accent-line:#f0d6e0;
  --gold:      #a8834e;
  --ok:        #2f6f4f;
  --ok-soft:   #eaf5ef;
  --warn:      #9a6510;
  --warn-soft: #fdf4e3;
  --bad:       #a12d2d;
  --bad-soft:  #fbeceb;

  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow:    0 1px 2px rgba(28,25,23,.04), 0 8px 24px -12px rgba(28,25,23,.14);
  --shadow-lg: 0 2px 4px rgba(28,25,23,.04), 0 24px 48px -20px rgba(28,25,23,.22);
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #131010;
    --bg-alt:    #1a1615;
    --surface:   #1c1817;
    --surface-2: #221d1c;
    --ink:       #f6f1ec;
    --ink-soft:  #ddd5cd;
    --muted:     #a49a92;
    --line:      #302927;
    --line-soft: #262020;
    --accent:    #e8a2bd;
    --accent-ink:#2a1019;
    --accent-soft:#2a1b21;
    --accent-line:#452b35;
    --gold:      #d0ac77;
    --ok:        #7fc9a2;
    --ok-soft:   #16261e;
    --warn:      #e5b567;
    --warn-soft: #2a2115;
    --bad:       #f19a94;
    --bad-soft:  #2c1918;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 48px -20px rgba(0,0,0,.7);
  }
}

*, *::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(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.16; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }
small { font-size: .82rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap-narrow { max-width: 760px; }
.wrap-tight  { max-width: 520px; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-sm { padding-block: clamp(1.6rem, 3vw, 2.4rem); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.grow { flex: 1 1 auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.tiny { font-size: .8rem; }
.mono { font-family: var(--mono); font-size: .86em; }
.nowrap { white-space: nowrap; }
.mt0{margin-top:0}.mb0{margin-bottom:0}.mt1{margin-top:1rem}.mt2{margin-top:2rem}.mb1{margin-bottom:1rem}.mb2{margin-bottom:2rem}

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 1.1rem; height: 66px; }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand:hover { color: var(--accent); }
.brand-mark { width: 26px; height: 26px; flex: none; }
.nav { display: flex; align-items: center; gap: .2rem; margin-left: auto; }
.nav a, .nav button.linkish {
  color: var(--ink-soft); text-decoration: none; font-size: .93rem; font-weight: 500;
  padding: .5rem .7rem; border-radius: var(--radius-sm); white-space: nowrap;
}
.nav a:hover, .nav button.linkish:hover { background: var(--bg-alt); color: var(--ink); }
.nav a.active { color: var(--accent); }
/* A button in the nav is a button first: the generic .nav a rules must not
   win over its padding, size or — most visibly — its foreground colour. */
.nav a.btn { padding: .55rem 1.05rem; font-size: .86rem; font-weight: 600; }
.nav a.btn-accent, .nav a.btn-accent:hover { background: var(--accent); color: var(--accent-ink); }
.nav a.btn-ghost, .nav a.btn-ghost:hover { color: var(--ink); }
.nav-search { flex: 1 1 260px; max-width: 340px; }
.menu-toggle { display: none; }

@media (max-width: 900px) {
  .topbar-inner { height: 58px; }
  .nav-search { display: none; }
  .menu-toggle {
    display: inline-flex; margin-left: auto; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--ink); cursor: pointer;
  }
  .nav {
    display: none; position: absolute; top: 58px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: .5rem 20px 1rem; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a, .nav .btn { width: 100%; text-align: left; padding-block: .7rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-size: .93rem; font-weight: 600; line-height: 1;
  padding: .72rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--ink); color: var(--bg); cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}
.btn:hover { color: var(--bg); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); background: var(--bg-alt); }
.btn-danger { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.btn-danger:hover { color: var(--bad); }
.btn-sm { padding: .45rem .8rem; font-size: .82rem; }
.btn-lg { padding: .95rem 1.7rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }

/* ---------- forms ---------- */
label { display: block; font-size: .87rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .35rem; }
.hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=url], input[type=tel], input[type=date], select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .65rem .8rem; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
.field { margin-bottom: 1.05rem; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .9rem; color: var(--ink-soft); margin-bottom: .6rem; cursor: pointer; }
.check input { margin-top: .25rem; flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.input-prefix { position: relative; display: flex; align-items: stretch; }
.input-prefix .pfx, .input-prefix .sfx {
  display: inline-flex; align-items: center; padding: 0 .75rem; font-size: .9rem; color: var(--muted);
  background: var(--bg-alt); border: 1px solid var(--line);
}
.input-prefix .pfx { border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-prefix .sfx { border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; white-space: nowrap; }
.input-prefix .pfx + input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-prefix input:has(+ .sfx) { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }

/* ---------- cards & surfaces ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow);
}
.card-flat { box-shadow: none; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.05rem; }
.panel-body { padding: 1.25rem; }

/* ---------- listing grid ---------- */
.grid { display: grid; gap: 1.4rem 1.2rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }

.item { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.item-media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--radius); background: var(--bg-alt);
  border: 1px solid var(--line);
}
.item-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.item:hover .item-media img { transform: scale(1.045); }
.item-media .ph { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: .8rem; }
.item-body { padding: .7rem .1rem 0; }
.item-title { font-family: var(--serif); font-size: 1.02rem; font-weight: 600; margin: 0 0 .15rem; line-height: 1.3; }
.item:hover .item-title { color: var(--accent); }
.item-meta { font-size: .82rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; }
.item-price { font-weight: 700; font-size: .98rem; margin-left: auto; color: var(--ink); }
.item-seller { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--muted); margin-top: .3rem; }

.badge {
  position: absolute; top: .6rem; left: .6rem; z-index: 2;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .55rem; border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--ink);
  backdrop-filter: blur(6px); border: 1px solid var(--line);
}
.badge-sold { background: var(--ink); color: var(--bg); border-color: transparent; }

/* ---------- pills / tags / status ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .76rem; font-weight: 600; padding: .25rem .6rem; border-radius: 99px;
  background: var(--bg-alt); color: var(--ink-soft); border: 1px solid var(--line);
  white-space: nowrap;
}
.pill-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.pill-bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.pill-accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip {
  font-size: .84rem; padding: .4rem .8rem; border-radius: 99px; text-decoration: none;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--surface);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- alerts ---------- */
.alert {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .85rem 1rem; border-radius: var(--radius-sm); font-size: .9rem;
  border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 1rem;
}
.alert strong { display: block; }
.alert-ok   { background: var(--ok-soft);   border-color: color-mix(in srgb, var(--ok) 28%, transparent);   color: var(--ok); }
.alert-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 28%, transparent); color: var(--warn); }
.alert-bad  { background: var(--bad-soft);  border-color: color-mix(in srgb, var(--bad) 28%, transparent);  color: var(--bad); }
.alert-info { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.alert a { color: inherit; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .89rem; min-width: 620px; }
table.data th, table.data td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data th { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; border-bottom-color: var(--line); }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 80% at 82% 8%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 68%),
    radial-gradient(50% 60% at 8% 92%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 70%);
}
.hero-grid { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1.05fr .95fr; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: .9rem; }
.lede { font-size: clamp(1.02rem, .95rem + .35vw, 1.18rem); color: var(--ink-soft); max-width: 54ch; }
.hero-collage { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.hero-collage > * { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.hero-collage > :first-child { grid-row: span 2; aspect-ratio: 3/5; }
.hero-collage > :not(:first-child) { aspect-ratio: 1/1; }
.hero-collage img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- feature strip ---------- */
.features { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature { padding: 1.3rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feature .ico { width: 34px; height: 34px; color: var(--accent); margin-bottom: .7rem; }
.feature h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.feature p { font-size: .88rem; color: var(--muted); margin: 0; }

/* ---------- listing detail ---------- */
.detail { display: grid; gap: 2.4rem; grid-template-columns: 1.1fr .9fr; align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; gap: 1.6rem; } }
.gallery-main { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--bg-alt); aspect-ratio: 4/5; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .5rem; margin-top: .6rem; }
.gallery-thumbs button {
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  background: none; cursor: pointer; aspect-ratio: 1; transition: border-color .15s;
}
.gallery-thumbs button.on, .gallery-thumbs button:hover { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.price-tag { font-family: var(--serif); font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem); font-weight: 600; letter-spacing: -.02em; }
.spec-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .1rem 1.2rem; margin: 0; }
.spec-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line-soft); font-size: .89rem; }
.spec-list dt { color: var(--muted); }
.spec-list dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- shop header ---------- */
.shop-hero { border-bottom: 1px solid var(--line); background: var(--surface); }
.shop-hero-inner { display: flex; gap: 1.4rem; align-items: center; padding-block: 2.2rem; flex-wrap: wrap; }
.avatar { width: 86px; height: 86px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); flex: none; background: var(--bg-alt); }
.avatar-sm { width: 30px; height: 30px; }
.avatar-xs { width: 22px; height: 22px; }
.avatar-fallback { display: grid; place-items: center; font-family: var(--serif); font-size: 1.9rem; color: var(--accent); background: var(--accent-soft); }
.avatar-sm.avatar-fallback { font-size: .85rem; }
.avatar-xs.avatar-fallback { font-size: .7rem; }

/* ---------- dashboard shell ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; gap: 2rem; align-items: start; padding-block: 2rem; }
@media (max-width: 900px) { .shell { grid-template-columns: 1fr; gap: 1.2rem; } }
.side { position: sticky; top: 84px; }
@media (max-width: 900px) { .side { position: static; } }
.side-nav { display: flex; flex-direction: column; gap: .15rem; }
@media (max-width: 900px) { .side-nav { flex-direction: row; overflow-x: auto; padding-bottom: .4rem; } }
.side-nav a {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: var(--radius-sm);
  color: var(--ink-soft); text-decoration: none; font-size: .9rem; font-weight: 500; white-space: nowrap;
}
.side-nav a:hover { background: var(--bg-alt); color: var(--ink); }
.side-nav a.on { background: var(--ink); color: var(--bg); }
.side-nav .sep { margin-top: .8rem; padding: 0 .75rem .3rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }

.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.05rem 1.15rem; }
.stat .k { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.stat .v { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1.15; margin-top: .25rem; letter-spacing: -.02em; }
.stat .s { font-size: .8rem; color: var(--muted); }

/* ---------- debt meter ---------- */
.meter { height: 8px; border-radius: 99px; background: var(--bg-alt); overflow: hidden; border: 1px solid var(--line); }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), var(--warn)); }
.meter.hot > i { background: linear-gradient(90deg, var(--warn), var(--bad)); }

/* ---------- redacted buyer block ---------- */
.redact { position: relative; border-radius: var(--radius-sm); overflow: hidden; }
.redact .masked { filter: blur(4px); user-select: none; opacity: .55; pointer-events: none; }
.redact-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1rem;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

/* ---------- uploader ---------- */
.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.6rem 1rem; text-align: center;
  background: var(--surface-2); transition: border-color .15s, background .15s; cursor: pointer;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input[type=file] { display: none; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; margin-top: .9rem; }
.thumb { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--bg-alt); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .x {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.62); color: #fff; cursor: pointer; font-size: .8rem; line-height: 1;
  display: grid; place-items: center;
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding-block: 2.6rem 2rem; margin-top: 3rem; }
.footer-grid { display: grid; gap: 1.8rem; grid-template-columns: 1.6fr 1fr 1fr 1fr; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-family: var(--sans); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .7rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .38rem; }
.footer a { color: var(--ink-soft); text-decoration: none; font-size: .89rem; }
.footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }

/* ---------- age gate ---------- */
.agegate {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.2rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px);
}
.agegate .card { max-width: 460px; text-align: center; box-shadow: var(--shadow-lg); }

/* ---------- impersonation banner ---------- */
.impersonating {
  background: var(--warn); color: #1c1917; font-size: .85rem; font-weight: 600;
  padding: .5rem 20px; display: flex; gap: .8rem; align-items: center; justify-content: center; flex-wrap: wrap;
}
.impersonating a { color: inherit; }

/* ---------- pagination ---------- */
.pager { display: flex; gap: .4rem; justify-content: center; margin-top: 2.2rem; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 .6rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none;
  color: var(--ink-soft); font-size: .88rem; background: var(--surface);
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pager .off { opacity: .4; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty svg { width: 44px; height: 44px; margin-bottom: .8rem; opacity: .45; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.sr-only { position: absolute; 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: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 999; background: var(--surface); padding: .6rem 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow); }

@media print { .topbar, .footer, .btn, .side { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ==========================================================================
   Homepage banner
   The background is a real image — generated lace by default, or whatever the
   owner uploads in Admin → Settings. A scrim sits between it and the type so
   headline contrast never depends on which image is in place.
   ========================================================================== */
.hero-banner {
  position: relative;
  isolation: isolate;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
  background: var(--hero) center / cover no-repeat, var(--bg-alt);
}
.hero-banner::before { content: none; }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg,
      color-mix(in srgb, var(--bg) 95%, transparent) 0%,
      color-mix(in srgb, var(--bg) 88%, transparent) 34%,
      color-mix(in srgb, var(--bg) 42%, transparent) 55%,
      color-mix(in srgb, var(--bg) 8%, transparent) 78%,
      transparent 100%),
    linear-gradient(to top, color-mix(in srgb, var(--bg) 70%, transparent), transparent 45%);
}
@media (max-width: 860px) {
  .hero-scrim { background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 90%, transparent), color-mix(in srgb, var(--bg) 78%, transparent)); }
}

.hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 3rem; align-items: center; }
@media (max-width: 980px) { .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; } }
.hero-copy h1 { text-wrap: balance; margin-bottom: .55em; }
.hero-copy .lede { text-shadow: 0 1px 0 color-mix(in srgb, var(--bg) 60%, transparent); }

.hero-stats { display: flex; gap: 2.2rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.hero-stats span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* frosted button that stays readable on top of any banner */
.btn-glass {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 14%, transparent);
  backdrop-filter: blur(10px) saturate(1.4);
}
.btn-glass:hover { background: var(--surface); color: var(--ink); }

/* three listing photos fanned out like cards on a table */
.hero-fan { position: relative; height: clamp(300px, 34vw, 430px); }
.hero-fan-card {
  position: absolute; top: 50%; width: clamp(150px, 17vw, 215px); aspect-ratio: 4/5;
  border-radius: var(--radius); overflow: hidden; text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  box-shadow: var(--shadow-lg);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}
.hero-fan-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-fan .fan-0 { left: 0;   transform: translateY(-52%) rotate(-7deg); z-index: 3; }
.hero-fan .fan-1 { left: 31%; transform: translateY(-58%) rotate(2deg);  z-index: 2; }
.hero-fan .fan-2 { left: 62%; transform: translateY(-46%) rotate(9deg);  z-index: 1; }
.hero-fan .fan-0:hover { transform: translateY(-56%) rotate(-7deg) scale(1.04); z-index: 4; }
.hero-fan .fan-1:hover { transform: translateY(-62%) rotate(2deg)  scale(1.04); z-index: 4; }
.hero-fan .fan-2:hover { transform: translateY(-50%) rotate(9deg)  scale(1.04); z-index: 4; }
.hero-fan-price {
  position: absolute; right: .55rem; bottom: .55rem;
  font-size: .78rem; font-weight: 700; color: #fff;
  padding: .25rem .55rem; border-radius: 99px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
}
@media (max-width: 980px) {
  .hero-fan { height: clamp(260px, 52vw, 340px); }
  .hero-fan-card { width: clamp(130px, 26vw, 190px); }
  .hero-fan .fan-0 { left: 4%; } .hero-fan .fan-1 { left: 33%; } .hero-fan .fan-2 { left: 62%; }
}
@media (max-width: 520px) { .hero-fan { display: none; } }

/* ---------- seller directory ---------- */
.seller-card { padding: 0; overflow: hidden; }
.seller-card-link { display: block; text-decoration: none; color: inherit; }
.seller-peek { display: block; aspect-ratio: 16/9; background: var(--bg-alt); overflow: hidden; }
.seller-peek img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.seller-card-link:hover .seller-peek img { transform: scale(1.05); }
.seller-body { display: flex; flex-direction: column; gap: .5rem; padding: 0 1.1rem 1.1rem; }
.seller-head { display: flex; align-items: flex-end; gap: .65rem; margin-top: -1.6rem; }
.seller-head .avatar { width: 52px; height: 52px; flex: none; }
.seller-head > span { display: flex; flex-direction: column; padding-bottom: .1rem; min-width: 0; }
.seller-head strong { font-family: var(--serif); font-size: 1.05rem; line-height: 1.2; }
.seller-head .tiny { line-height: 1.3; }
.seller-line { font-size: .85rem; color: var(--muted); line-height: 1.4; }
.seller-card-link:hover .seller-head strong { color: var(--accent); }
.seller-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- launch-phase trust signals ----------
   Shown in place of the counters while the numbers are still small. A counter
   reading "1 order shipped" argues against the site; these do not. */
.hero-signals { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .55rem; }
.hero-signals li { display: flex; align-items: center; gap: .55rem; font-size: .92rem; color: var(--ink-soft); }
.hero-signals svg { width: 17px; height: 17px; flex: none; color: var(--ok); }
.badge-new { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* ---------- demonstration banner ----------
   Deliberately loud and unskippable. Its whole purpose is that nobody can look
   at the sample catalogue and mistake it for a trading marketplace. */
.demo-banner {
  position: relative; z-index: 70;
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .6rem 20px;
  background: repeating-linear-gradient(135deg, #1c1917, #1c1917 12px, #2a2523 12px, #2a2523 24px);
  color: #fdf1f5; font-size: .86rem; font-weight: 600; text-align: center;
  border-bottom: 2px solid var(--accent);
}
.demo-banner svg { width: 18px; height: 18px; flex: none; color: var(--accent); }

/* ---------- live field validation ----------
   Colour is never the only signal: the message under the field says the same
   thing in words, for anyone who cannot separate the two hues. */
input.is-ok    { border-color: var(--ok);   box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 15%, transparent); }
input.is-bad   { border-color: var(--bad);  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 15%, transparent); }
input.is-checking { border-color: var(--muted); }

.handle-status {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-top: .55rem; padding: .42rem .8rem .42rem .62rem;
  border-radius: 999px; border: 1px solid transparent;
  font-size: .87rem; font-weight: 600; line-height: 1.3;
  background: var(--bg-alt); color: var(--muted);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
/* An empty status must take no space at all, or the form jumps as you type. */
.handle-status:empty { display: none; }
.handle-status svg { width: 16px; height: 16px; flex: none; }

.handle-status.free {
  background: var(--ok-soft); color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 28%, transparent);
}
.handle-status.taken, .handle-status.invalid {
  background: var(--bad-soft); color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 28%, transparent);
}
.handle-status.checking { background: var(--bg-alt); color: var(--muted); }
.handle-status.checking svg { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .handle-status.checking svg { animation: none; } }

/* A matching mark inside the field, so the answer is next to what you typed. */
.field-check { position: relative; }
.field-check > .mark {
  position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; pointer-events: none; opacity: 0;
  transition: opacity .18s ease;
}
.field-check > .mark.on { opacity: 1; }
.field-check > .mark.ok  { color: var(--ok); }
.field-check > .mark.bad { color: var(--bad); }
.field-check input { padding-right: 2.4rem; }
