:root {
  --bg: #f4efe6;
  --paper: #fffdf8;
  --ink: #1d1914;
  --muted: #5f584e;
  --line: #e4dcd0;
  --green: #1b6b43;
  --green-dark: #114a2e;
  --clay: #9a3412;
  --wa: #0f7a5a;
  --danger: #9f1239;
  --shadow: 0 1px 2px rgba(40, 28, 12, 0.05);
  --radius: 16px;
  color-scheme: light;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
img { max-width: 100%; display: block; }
a { color: var(--green-dark); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.4rem; }
h1 { font-family: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif; font-size: 1.8rem; font-weight: 700; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 0.75rem; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(1080px, calc(100% - 28px)); margin: 0 auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 8px; top: -40px; background: white; padding: 8px 12px; z-index: 5; }
.skip:focus { top: 8px; }
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; }
.top-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; min-width: 0; }
.brand-name { display: block; font-family: Palatino, Georgia, serif; font-weight: 700; font-size: 1.15rem; }
.brand-place { display: block; color: var(--muted); font-size: 0.78rem; }
.mark { width: 38px; height: 38px; border-radius: 11px; background: var(--green); display: grid; gap: 3px; padding: 9px 8px; flex: none; }
.mark span { display: block; height: 4px; border-radius: 2px; background: #f6f1e6; }
.mark span:nth-child(2) { width: 72%; }
.mark span:nth-child(3) { width: 48%; }
.account { margin-left: auto; text-decoration: none; font-weight: 700; padding: 8px 10px; }
.desktop-nav { display: none; gap: 16px; }
.desktop-nav a { text-decoration: none; color: var(--ink); font-weight: 600; }
.desktop-nav a.on { color: var(--green); }
.searchbar { display: flex; gap: 8px; padding: 0 0 12px; }
.searchbar input { flex: 1; min-width: 0; }
.btn, button.btn, a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 16px; border-radius: 12px; border: 0;
  background: var(--green); color: white; text-decoration: none; font-weight: 700; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--green-dark); border: 1px solid var(--line); }
.btn.wa { background: var(--wa); }
.btn.danger { background: var(--danger); }
button:disabled { opacity: 0.6; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid #d9d0c3; background: white; font-size: 16px;
}
textarea { min-height: 120px; resize: vertical; }
label { display: grid; gap: 6px; font-weight: 650; font-size: 0.95rem; }
.form, .filters { display: grid; gap: 12px; margin: 12px 0 20px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 44px; }
.check input { width: 20px; height: 20px; min-height: 0; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
main { padding: 18px 0 8px; }
.hero { padding: 8px 0 12px; }
.eyebrow { color: var(--green); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.78rem; }
.meta, .fine { color: var(--muted); font-size: 0.92rem; }
.meta.line { display: block; margin-top: 2px; }
.banner { padding: 12px 14px; border-radius: 12px; margin: 0 0 14px; }
.banner.error { background: #fde8ec; color: #6b1024; }
.banner.ok { background: #e5f4eb; color: #0f4d2d; }
.banner.sample { background: #fff4d6; color: #6a4b05; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; text-decoration: none; color: var(--ink); }
.chip span { color: var(--muted); }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; min-height: 100%; box-shadow: var(--shadow); }
.card img, .photo, .hero-photo { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: #efe6d8; display: block; }
.shop-row img, .panel > .photo { width: 72px; height: 72px; aspect-ratio: 1; border-radius: 10px; }
.sell { font-weight: 750; text-decoration: none; }
.sell-long { display: none; }
.photo-tools, .photo-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.photo-tools .photo, .photo-row .photo { width: 72px; height: 72px; aspect-ratio: 1; }
.previews { display: flex; gap: 8px; flex-wrap: wrap; }
.previews img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.progress { height: 8px; background: #efeae1; border-radius: 99px; overflow: hidden; margin: 8px 0; }
.progress span { display: block; height: 100%; width: 0; background: #1b6b43; }
.swatch, .hero-photo.swatch-0, .hero-photo.swatch-1, .hero-photo.swatch-2, .hero-photo.swatch-3, .hero-photo.swatch-4, .hero-photo.swatch-5,
.swatch-0, .swatch-1, .swatch-2, .swatch-3, .swatch-4, .swatch-5 {
  display: flex; align-items: flex-end; padding: 10px; color: white; font-weight: 700; font-size: 0.85rem;
}
.swatch-0 { background: #1b6b43; }
.swatch-1 { background: #9a3412; }
.swatch-2 { background: #1d4e89; }
.swatch-3 { background: #7a4e12; }
.swatch-4 { background: #0f6b62; }
.swatch-5 { background: #6b3f69; }
.card-body { display: grid; gap: 4px; padding: 10px; }
.card-name { font-weight: 750; }
.price { color: var(--clay); font-weight: 800; }
.price.big { font-size: 1.8rem; margin: 4px 0 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 4px; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 8px; font-size: 0.75rem; font-weight: 700; background: #efeae1; }
.pill.ok { background: #e5f4eb; color: #0f4d2d; }
.pill.warn { background: #fff4d6; color: #6a4b05; }
.pill.danger { background: #fde8ec; color: #6b1024; }
.pill.sample { background: #efe6ff; color: #4c1d95; }
.pill.muted { background: #eeeae4; color: var(--muted); }
.stack { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.panel, .shop-row { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.shop-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; text-decoration: none; color: inherit; align-items: center; }
.shop-row .meta { display: block; }
.split { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.steps { display: grid; gap: 10px; margin-top: 18px; }
.steps article { background: var(--paper); border-radius: var(--radius); padding: 14px; border: 1px solid var(--line); }
.empty { padding: 8px 0 16px; }
.product { display: grid; gap: 8px; }
.hero-photo { width: 100%; border-radius: var(--radius); }
.prose, .list-text { white-space: pre-wrap; }
.list-text { font: inherit; margin: 0 0 8px; background: #f7f3eb; padding: 8px; border-radius: 8px; }
.match { display: grid; gap: 4px; }
.timeline { display: flex; gap: 6px; list-style: none; padding: 0; overflow: auto; margin: 0 0 12px; }
.timeline li { padding: 6px 8px; border-radius: 999px; background: #efeae1; color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.timeline li.done { background: #e5f4eb; color: #0f4d2d; font-weight: 700; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; list-style: none; padding: 0; }
.stats li { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.pager { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.foot { padding: 12px 0 20px; color: var(--muted); font-size: 0.9rem; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--paper); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 4;
}
.tabbar a { text-align: center; text-decoration: none; color: var(--muted); font-size: 0.75rem; font-weight: 700; padding: 12px 2px; min-height: 48px; }
.tabbar a.on { color: var(--green-dark); }
.narrow { max-width: 38rem; }
.role-switch { display: grid; gap: 12px; }
.role-switch > input { position: absolute; opacity: 0; pointer-events: none; }
.role-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.role-picker label { text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; background: white; }
.vendor-panel, .rider-panel, .areas-panel { display: none; }
#role-vendor:checked ~ .vendor-panel,
#role-rider:checked ~ .rider-panel,
#role-rider:checked ~ .areas-panel,
#role-agent:checked ~ .areas-panel { display: grid; gap: 12px; }
#role-buyer:checked ~ .role-picker label[for="role-buyer"],
#role-vendor:checked ~ .role-picker label[for="role-vendor"],
#role-rider:checked ~ .role-picker label[for="role-rider"],
#role-agent:checked ~ .role-picker label[for="role-agent"] { background: var(--green); color: white; border-color: var(--green); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

@media (min-width: 800px) {
  body { padding-bottom: 0; }
  h1 { font-size: 2.4rem; }
  .desktop-nav { display: flex; align-items: center; }
  .sell-short { display: none; }
  .sell-long { display: inline; }
  .tabbar { display: none; }
  .cards { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .filters { grid-template-columns: repeat(4, 1fr) auto; align-items: end; }
  .form .btn, .actions .btn { width: auto; }
  .stats { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 799px) {
  .form .btn, .actions .btn { width: 100%; }
}

/* SEO: breadcrumbs, footer columns, blog */
.crumbs { margin: 4px 0 10px; font-size: 0.85rem; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { color: var(--green); }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 8px 0 14px; }
.foot-cols nav { display: flex; flex-direction: column; gap: 4px; }
.foot-cols a { color: var(--green); }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.post-list li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.post-list h2 { margin: 0 0 4px; font-size: 1.1rem; }
.article .prose p, .article .prose li { line-height: 1.65; }
.article .prose h2 { margin-top: 1.4em; }
.player { width: 100%; margin: 10px 0 4px; }
.related { margin-top: 22px; }
