:root {
  --bg: #f6f2e7;
  --bg-alt: #ede6d3;
  --surface: #ffffff;
  --surface-2: #ede6d3;
  --elevated: #ffffff;
  --white: #ffffff;
  --ink: #1d2116;
  --ink-contrast: #ffffff;
  --ink-soft: #52584a;
  --ink-mid: #3a3f30;
  --muted: #6e6c5e;
  --muted-2: #96937f;
  --border: #e3dcc8;
  --border-2: #e3dcc8;
  --sage: #748163;
  --sage-deep: #4f5940;
  --sage-bg: #e7eadc;
  --clay: #c1683f;
  --clay-bg: #f3e2d6;
  --marigold: #de9a3c;
  --verified-bg: var(--sage-bg);
  --verified-fg: var(--sage-deep);
  --verified-check: var(--sage-deep);
  --buying-bg: #e6eaf3;
  --buying-fg: #3d5a80;
  --selling-bg: var(--clay-bg);
  --selling-fg: var(--clay);
  --danger: #b23b2e;
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(29,33,22,.05), 0 6px 20px rgba(29,33,22,.06);
  --shadow-lg: 0 12px 32px rgba(29,33,22,.14);
  /* Was the bottom tab bar's height, reserved as clearance for body padding
     and fixed-position elements (toast, FABs, sticky chat composer) above
     it. The bar is gone now, so this is 0 — those elements' small "+Npx"
     offsets become their own plain clearance from the viewport edge. */
  --nav-h: 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + 14px);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
/* Browsers give <button> its own default text color (often literally
   black) instead of inheriting from the page: every button-based card
   (.thread-card, .chat-item, .menu-item, ...) would otherwise fall back to
   that default for everything nested inside. */
button { font-family: inherit; cursor: pointer; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-family: 'Fraunces', Georgia, serif; font-weight: 600; }
h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
input, select, textarea { font-family: inherit; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 18px; }
.app-shell { max-width: 480px; margin: 0 auto; }
@media (min-width: 900px) { .app-shell { max-width: 620px; } }

.row { display: flex; align-items: center; }
.between { justify-content: space-between; }

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm);
  padding: 13px 20px; font-size: 14px; font-weight: 700;
  transition: transform .05s ease, opacity .15s ease;
  white-space: nowrap; font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-fill { background: var(--ink); color: var(--ink-contrast); }
.btn-fill:hover { opacity: .88; }
.btn-outline { background: var(--surface); border: 1.5px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--surface); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 12.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.pill-btn {
  border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface);
  font-size: 12.5px; padding: 8px 15px; color: var(--ink-soft); font-weight: 600;
  white-space: nowrap; flex-shrink: 0;
}
.pill-btn.active { background: var(--ink); color: var(--ink-contrast); border-color: var(--ink); }

.cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  flex-shrink: 0; border-radius: 999px; background: var(--surface); font-size: 12.5px;
  padding: 9px 15px; color: var(--ink-mid); font-weight: 600; white-space: nowrap; border: none;
}
.cat-chip svg { width: 16px; height: 16px; color: var(--sage-deep); flex-shrink: 0; }
.cat-chip.active { background: var(--ink); color: var(--ink-contrast); }
.cat-chip.active svg { color: var(--ink-contrast); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  flex-shrink: 0; position: relative; border: none; color: var(--ink);
}
.icon-btn:hover { background: var(--surface-2); }
.dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); border: 1.5px solid var(--surface); }

.search-bar {
  flex: 1; height: 44px; border-radius: var(--radius-sm); background: var(--surface);
  display: flex; align-items: center; gap: 8px; padding: 0 14px;
  font-size: 13.5px; color: var(--muted); border: none; width: 100%; cursor: text;
}
.search-bar input {
  border: none; background: transparent; outline: none; font-size: 13.5px;
  color: var(--ink); flex: 1; padding: 0;
}
.search-bar input::placeholder { color: var(--muted); }

/* ---------- Top page chrome (per-page headers) ---------- */
.page-top { padding: 18px 18px 0; }
.loc-row { margin-bottom: 14px; cursor: pointer; }
.loc-label { font-size: 11px; color: var(--muted); margin: 0; }
.loc-value { font-size: 15px; font-weight: 700; margin: 2px 0 0; }
.search-row { gap: 10px; margin-bottom: 14px; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 14px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.cats::-webkit-scrollbar { display: none; }

.back-row { padding: 16px 18px 6px; }
.header-title { font-size: 17px; font-weight: 800; margin: 0; }

.section-title { font-size: 16px; font-weight: 800; margin: 4px 0 12px; padding: 0 18px; }

/* ---------- Product grid & cards ---------- */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 18px; }
@media (min-width: 620px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card { background: var(--surface); border-radius: 16px; overflow: hidden; position: relative; display: block; }
.product-img { aspect-ratio: 1/0.85; background: var(--surface-2); position: relative; overflow: hidden; }
.product-img img, .product-img video { width: 100%; height: 100%; object-fit: cover; }
.video-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%; background: rgba(20,23,26,.6); color: #fff;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.video-badge svg { width: 16px; height: 16px; margin-left: 2px; }
.cond-tag {
  position: absolute; top: 8px; left: 8px; background: #fff; font-size: 10px;
  padding: 3px 9px; border-radius: 999px; font-weight: 700; color: var(--ink-soft);
}
.save-btn {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--ink-soft); border: none; box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.save-btn.active { color: var(--danger); }
.product-body { padding: 10px 12px 12px; }
.product-title {
  font-size: 12.5px; font-weight: 700; margin: 0 0 3px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.product-price { font-size: 14.5px; font-weight: 800; margin: 0 0 4px; }
.product-tag { font-size: 10.5px; color: var(--muted); margin: 0 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-distance { font-size: 10.5px; font-weight: 700; color: var(--sage-deep); margin: -3px 0 6px; }
.trust-row { display: flex; align-items: center; gap: 6px; font-size: 10.5px; overflow: hidden; }
.seller-name-sm { font-weight: 700; color: var(--ink-mid); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verify-label { flex-shrink: 0; font-weight: 700; }
.verify-label.yes { color: var(--verified-fg); }
.verify-label.no { color: var(--muted-2); }
/* A category label ("this is a shop"), not a trust claim — deliberately
   never reuses the Verified/Unverified green-or-gray so it can't be read
   as one. Same clay tone as the Fashion/Trust icons elsewhere. */
.shop-tag {
  flex-shrink: 0; font-weight: 700; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.03em;
  background: var(--clay-bg); color: var(--clay); padding: 2px 6px; border-radius: 999px;
}
.verified { color: var(--verified-check); font-weight: 800; }
.muted { color: var(--muted-2); }


/* ---------- Listing detail ---------- */
.detail-wrap { padding: 0 18px; }
.detail-imgs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; border-radius: 16px; scroll-snap-type: x mandatory; }
.detail-imgs::-webkit-scrollbar { display: none; }
.detail-img {
  min-width: 100%; aspect-ratio: 4/3; background: var(--surface); border-radius: 16px;
  overflow: hidden; scroll-snap-align: start; position: relative;
}
.detail-img img, .detail-img video { width: 100%; height: 100%; object-fit: contain; }
.detail-img img { cursor: pointer; }
/* Videos already have native controls in this same box — a separate expand
   button avoids the lightbox stealing taps meant for play/pause/scrub. */
.detail-img-expand {
  position: absolute; bottom: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(20,23,26,.6); color: #fff; border: none; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.detail-title-row { margin-bottom: 2px; gap: 10px; align-items: flex-start; }
.detail-title { font-size: 19px; font-weight: 800; margin: 0; flex: 1; }
.detail-price { font-size: 23px; font-weight: 800; margin: 6px 0 4px; }
.detail-meta { font-size: 12.5px; color: var(--muted); margin: 0 0 18px; }
.detail-desc { font-size: 13.5px; color: var(--ink-mid); margin: 0 0 18px; white-space: pre-line; line-height: 1.55; }

.badge {
  font-size: 10.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex-shrink: 0;
}
.badge-verified { background: var(--verified-bg); color: var(--verified-fg); }
.badge-new { background: var(--surface-2); color: var(--muted); }
.badge-shop { background: var(--clay-bg); color: var(--clay); }

.seller-card { background: var(--surface); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; gap: 10px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-weight: 800;
  font-size: 13px; color: var(--ink-soft); flex-shrink: 0; overflow: hidden;
}
.avatar img, .avatar svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.seller-name { font-size: 13.5px; font-weight: 800; margin: 0; }
.seller-sub { font-size: 11.5px; color: var(--muted); margin: 1px 0 0; }

/* ---------- Community Q&A ---------- */
.community-box { border-top: 1px solid var(--border-2); padding-top: 14px; margin-bottom: 18px; }
.community-title {
  font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase;
  letter-spacing: .03em; margin: 0 0 12px; display: flex; align-items: center; gap: 6px;
}
.thread { display: flex; flex-direction: column; gap: 12px; }
.thread-item { display: flex; gap: 10px; }
.vote-col {
  display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--muted-2);
  width: 20px; flex-shrink: 0; padding-top: 1px; gap: 1px;
}
.vote-col button { background: none; border: none; color: inherit; font-size: 11px; padding: 2px; line-height: 1; }
.vote-col button:hover { color: var(--ink); }
.vote-col button.voted { color: var(--verified-check); }
.vote-col .n { font-weight: 800; color: var(--ink-soft); margin: 1px 0; font-size: 12px; }
.thread-body { flex: 1; min-width: 0; }
.thread-user { font-size: 12.5px; font-weight: 800; margin: 0; }
.thread-user .flair { font-weight: 500; color: var(--muted); font-size: 11px; }
.thread-text { font-size: 13px; color: var(--ink-mid); margin: 2px 0 0; line-height: 1.45; }
.qa-form { display: flex; gap: 8px; margin-top: 4px; }
.qa-form input {
  flex: 1; border: 1.5px solid var(--border-2); border-radius: 999px; padding: 10px 16px;
  font-size: 13px; outline: none; background: var(--surface); color: var(--ink);
}
.qa-form input:focus { border-color: var(--ink); }

.cta-row { display: flex; gap: 10px; padding: 4px 0 8px; }
.cta-row .btn { flex: 1; }
.cta-row .btn-fill { flex: 1.3; }

/* ---------- Chats / Community list ---------- */
.chats-title { font-size: 22px; font-weight: 800; margin: 4px 0 14px; }
.chat-tabs { display: flex; gap: 8px; margin: 14px 18px 12px; }
.chat-list { padding: 0 18px; }
.chat-item {
  display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border);
  background: none; border-left: none; border-right: none; border-top: none; width: 100%;
  text-align: left; align-items: flex-start;
}
.chat-info { flex: 1; min-width: 0; }
.chat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.chat-name { font-size: 13.5px; font-weight: 800; margin: 0; }
.chat-time { font-size: 10.5px; color: var(--muted-2); flex-shrink: 0; }
.chat-tag {
  font-size: 9.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 6px;
}
.tag-buying { background: var(--buying-bg); color: var(--buying-fg); }
.tag-selling { background: var(--selling-bg); color: var(--selling-fg); }
.chat-msg { font-size: 12px; color: var(--muted); margin: 3px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread {
  background: var(--ink); color: var(--ink-contrast); font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 999px; display: flex;
  align-items: center; justify-content: center; padding: 0 4px; flex-shrink: 0; margin-top: 2px;
}

/* ---------- Chat thread view ---------- */
.chat-thread-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 18px 18px; }
.bubble { max-width: 75%; padding: 10px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.4; }
.bubble.them { background: var(--surface); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.me { background: var(--ink); color: var(--ink-contrast); align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble .time { display: block; font-size: 10px; opacity: .6; margin-top: 4px; }
.chat-quick { display: flex; gap: 6px; padding: 0 18px 10px; flex-wrap: wrap; }
.chat-quick button { font-size: 11.5px; border: 1px solid var(--border-2); background: var(--surface); padding: 6px 12px; border-radius: 999px; color: var(--ink-soft); }
.chat-quick button:hover { border-color: var(--ink); color: var(--ink); }
.chat-input-row { display: flex; gap: 8px; padding: 10px 18px calc(env(safe-area-inset-bottom,0px) + 10px); border-top: 1px solid var(--border); position: sticky; bottom: var(--nav-h); background: var(--surface); }
.chat-input-row input { flex: 1; border: 1.5px solid var(--border-2); border-radius: 999px; padding: 11px 16px; font-size: 13.5px; outline: none; background: var(--surface); color: var(--ink); }
.chat-input-row input:focus { border-color: var(--ink); }

/* ---------- Forms (Sell / post ad) ---------- */
.form-wrap { padding: 4px 18px 18px; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 7px; color: var(--ink-mid); }
.form-row .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.form-row input[type=text], .form-row input[type=number], .form-row select, .form-row textarea {
  width: 100%; border: 1.5px solid var(--border-2); border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 14px; outline: none; background: var(--surface); color: var(--ink);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--ink); background: var(--surface); }
.form-row textarea { resize: vertical; min-height: 100px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.img-upload-row { display: flex; gap: 10px; flex-wrap: wrap; }
.img-drop {
  /* Same aspect ratio as .product-img (the real grid thumbnail) — so this
     upload-time preview shows sellers exactly what will and won't make the
     cut, not a differently-shaped square that hides the real crop. */
  width: 78px; aspect-ratio: 1/0.85; border: 1.5px dashed var(--border-2); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 22px;
  background: var(--surface); overflow: hidden; position: relative; flex-shrink: 0;
}
.img-drop.add-slot { cursor: pointer; background: none; }
.img-drop.add-slot:hover { border-color: var(--ink); color: var(--ink); }
.img-drop.filled { border-style: solid; border-color: var(--border-2); }
.img-drop.filled img { width: 100%; height: 100%; object-fit: cover; }
.img-remove-btn {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(20,23,26,.72); color: #fff; border: none; font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.img-drop .uploading-badge {
  position: absolute; inset: 0; background: rgba(20,23,26,.55); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700;
}
.upload-progress { font-size: 12px; color: var(--ink-soft); margin-top: 8px; display: none; }
.upload-progress.active { display: block; }
.chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-select .opt { padding: 9px 15px; border-radius: 999px; background: var(--surface); font-size: 12.5px; color: var(--ink-mid); font-weight: 600; }
.chip-select .opt.active { background: var(--ink); color: var(--ink-contrast); }
.chip-select input { display: none; }
.confirm-box { display: flex; gap: 8px; align-items: flex-start; background: var(--verified-bg); padding: 12px 14px; border-radius: 12px; }
.confirm-box label { font-weight: 400 !important; font-size: 12.5px !important; color: var(--ink-mid); }

/* ---------- Account / My ads / Profile ---------- */
.account-head { display: flex; gap: 14px; align-items: center; padding: 6px 18px 18px; }
.account-head .avatar { width: 62px; height: 62px; font-size: 20px; }
.account-head h2 { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.account-head .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.account-stats { display: flex; gap: 10px; padding: 0 18px 18px; }
.account-stats div { flex: 1; text-align: center; background: var(--surface); border-radius: 12px; padding: 12px 6px; }
.account-stats strong { display: block; font-size: 15px; }
.account-stats span { font-size: 10px; color: var(--muted); }
.menu-list { padding: 0 18px; }
.menu-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600; width: 100%; background: none; border-left: none; border-right: none; border-top: none; text-align: left;
}
.menu-item .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.menu-item .chev { margin-left: auto; color: var(--muted-2); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .big { font-size: 38px; margin-bottom: 10px; }
.empty-state h3 { color: var(--ink); font-size: 15px; margin-bottom: 6px; }

/* ---------- Filters (browse) ---------- */
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 18px 14px; }
.filter-row select {
  border: 1px solid var(--border-2); border-radius: 999px; padding: 8px 13px; font-size: 12px;
  background: var(--surface); color: var(--ink-soft); flex-shrink: 0;
}
.result-count { font-size: 12px; color: var(--muted); padding: 0 18px 10px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 16px); left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--ink); color: var(--ink-contrast); padding: 12px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 700; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Lightbox (full-screen photo/video view) ---------- */
.lightbox-overlay { position: fixed; inset: 0; background: #000; z-index: 300; }
.lightbox-overlay[hidden] { display: none; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; border: none; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-strip { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; }
.lightbox-strip::-webkit-scrollbar { display: none; }
.lightbox-slide {
  min-width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  scroll-snap-align: start; flex-shrink: 0;
}
.lightbox-slide img, .lightbox-slide video { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(23,23,26,.45);
  display: flex; align-items: flex-end; justify-content: center; z-index: 200;
}
.modal-overlay[hidden] { display: none; }
@media (min-width: 620px) { .modal-overlay { align-items: center; } }
/* Modals share the redesigned pages' look: Inter (the shared h3 rule would
   otherwise fall back to Georgia — Fraunces isn't loaded on those pages),
   the same paper/forest colours as their scoped tokens, and enough padding
   and heading margin that the heading can never run under the close button. */
.modal {
  background: #F7F2E7; color: #2A2A22; font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border-radius: 22px 22px 0 0; max-width: 480px; width: 100%;
  padding: 28px 24px calc(24px + env(safe-area-inset-bottom, 0px)); box-shadow: var(--shadow-lg); position: relative;
}
@media (min-width: 620px) { .modal { border-radius: 20px; padding-bottom: 28px; } }
.modal .close-x {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; color: #5C5A4D; border: none; background: none; cursor: pointer;
}
.modal .close-x:hover { background: rgba(31,58,46,.08); color: #1F3A2E; }
.modal h3 {
  font-family: inherit; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; color: #1F3A2E;
  margin: 0 44px 8px 0; line-height: 1.25;
}
.modal p.sub { font-size: 0.9rem; line-height: 1.5; color: #5C5A4D; margin-bottom: 18px; }
.modal .btn { font-family: inherit; font-weight: 600; font-size: 0.95rem; padding: 13px 20px; border-radius: 12px; }
.modal .btn-fill { background: #1F3A2E; color: #F7F2E7; }
.modal .btn-outline { background: transparent; border: 1.5px solid #1F3A2E; color: #1F3A2E; }
.modal .btn-outline:hover { background: rgba(31,58,46,.08); }

.stack-gap { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Reviews ---------- */
.rating-summary { display: flex; align-items: center; gap: 12px; padding: 0 18px 16px; }
.rating-summary .avg { font-size: 32px; font-weight: 800; line-height: 1; }
.rating-summary .stars-row { margin: 4px 0 2px; }
.rating-summary .count { font-size: 12px; color: var(--muted); }
.review-list { padding: 0 18px; }
.review-card { background: var(--surface); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-head .avatar { width: 34px; height: 34px; font-size: 11px; }
.review-name { font-size: 13px; font-weight: 800; margin: 0; }
.review-time { font-size: 11px; color: var(--muted); margin-left: auto; flex-shrink: 0; }
.review-listing { font-size: 11px; color: var(--ink-soft); margin: 0 0 6px; }
.review-text { font-size: 13px; color: var(--ink-mid); line-height: 1.5; margin: 0; }
.star-picker { display: flex; gap: 8px; justify-content: center; margin: 6px 0 18px; }
.star-picker button { background: none; border: none; font-size: 30px; color: var(--surface-2); padding: 2px; }
.star-picker button.on { color: #f5a623; }

/* ---------- Report / help ---------- */
.report-type-list { display: flex; flex-direction: column; gap: 8px; }
.report-type-list label {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--ink-mid);
}
.report-type-list input[type=radio] { accent-color: var(--ink); width: 16px; height: 16px; }
.safety-tip-row { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.safety-tip-row .ic { font-size: 18px; flex-shrink: 0; }
.safety-tip-row p { font-size: 13px; color: var(--ink-mid); line-height: 1.45; }
.report-card { background: var(--surface); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.report-card .row.between { margin-bottom: 4px; }
.report-status {
  font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--buying-bg); color: var(--buying-fg); flex-shrink: 0;
}
.report-card .type { font-size: 13px; font-weight: 700; }
.report-card .desc { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.report-card .meta { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ============================================================
   Trust profile + listing confidence
   ============================================================ */
.trust-badges-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.trust-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700;
  padding: 5px 11px; border-radius: 999px;
}
.trust-badge.yes { background: var(--verified-bg); color: var(--verified-fg); }
.trust-badge.no { background: var(--surface); color: var(--muted); }
.trust-badge.pending { background: var(--selling-bg); color: var(--selling-fg); }

.trust-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.trust-stat { background: var(--surface); border-radius: 10px; padding: 12px; }
.trust-stat strong { display: block; font-size: 17px; font-weight: 800; }
.trust-stat span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.trust-stat.untracked strong { color: var(--muted); font-size: 13px; font-weight: 600; }

.confidence-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.confidence-item { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-mid); }

/* ---------- Vouch ---------- */
.vouch-box {
  display: flex; align-items: center; gap: 12px; margin-top: 14px;
  background: var(--surface); border-radius: 12px; padding: 12px 14px;
}
.vouch-avatars { display: flex; flex-shrink: 0; }
.vouch-avatars .vouch-avatar-item {
  display: block; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface);
  overflow: hidden; margin-left: -9px;
}
.vouch-avatars .vouch-avatar-item svg { width: 100%; height: 100%; display: block; }
.vouch-avatars .vouch-avatar-item:first-child { margin-left: 0; }
.vouch-box-text { flex: 1; min-width: 0; }
.vouch-box-text .t1 { font-size: 13px; font-weight: 700; }
.vouch-box-text .t2 { font-size: 11px; color: var(--muted); }
/* Unvouched = marigold outline, marigold heart. Vouched = solid marigold
   fill, white heart — a real lit/unlit state, not just a label change. */
.vouch-toggle-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; border: 1.5px solid var(--marigold); background: transparent;
  color: var(--marigold); font-size: 12px; font-weight: 700; padding: 8px 14px;
}
.vouch-toggle-btn .vouch-icon { width: 13px; height: 13px; flex-shrink: 0; }
.vouch-toggle-btn .vouch-icon svg { width: 100%; height: 100%; display: block; }
.vouch-toggle-btn.on { background: var(--marigold); color: #fff; }
.vouch-toggle-btn:disabled { opacity: .5; }
.confidence-item .mark { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.confidence-item.yes .mark { background: var(--verified-bg); color: var(--verified-fg); }
.confidence-item.no .mark { background: var(--surface-2); color: var(--muted); }
.confidence-item.no { color: var(--muted); }

.verify-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.verify-row:last-child { border-bottom: none; }
.verify-row .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.verify-row .body { flex: 1; }
.verify-row .body strong { font-size: 13.5px; display: block; }
.verify-row .body p { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Category chip select (Sell page) ---------- */
.chip-select .opt svg { width: 16px; height: 16px; margin-right: 5px; vertical-align: -3px; color: var(--sage-deep); }
.chip-select .opt.active svg { color: var(--ink-contrast); }

/* ---------- Character avatar picker ---------- */
.char-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.char-card { background: var(--surface); border: 2px solid var(--border-2); border-radius: 16px; padding: 16px 10px; text-align: center; cursor: pointer; }
.char-card.selected { border-color: var(--sage); }
.char-avatar { width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 50%; overflow: hidden; }
.char-avatar svg { width: 100%; height: 100%; }
.char-card .label { font-size: 12.5px; font-weight: 700; }
.char-card .sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Toggle switch ---------- */
.switch { position: relative; display: inline-block; width: 40px; height: 24px; margin-left: auto; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch-track { position: absolute; inset: 0; background: var(--surface-2); border-radius: 999px; transition: background-color .15s; cursor: pointer; }
.switch-track::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: var(--surface); border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .switch-track { background: var(--sage); }
.switch input:checked + .switch-track::before { transform: translateX(16px); background: #fff; }

/* ---------- Community forum ---------- */
.comm-tabs { display: flex; gap: 8px; padding: 0 18px 14px; overflow-x: auto; }
.thread-card {
  display: block; width: 100%; text-align: left; background: var(--surface); border: none;
  border-radius: var(--radius); padding: 14px 16px; margin: 0 18px 12px; box-shadow: var(--shadow);
}
.thread-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mini-avatar { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.mini-avatar svg { width: 100%; height: 100%; }
.thread-user { font-size: 12px; font-weight: 700; }
.thread-time { font-size: 11px; color: var(--muted); margin-left: auto; }
.thread-title { font-size: 14.5px; font-weight: 800; margin-bottom: 4px; }
.thread-body { font-size: 13px; color: var(--ink-mid); line-height: 1.4; margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.thread-foot { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); font-weight: 700; }
.thread-foot span { display: inline-flex; align-items: center; gap: 4px; }

.status-chip-sm { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-left: auto; }
.status-chip-sm.open { background: var(--surface-2); color: var(--muted); }
.status-chip-sm.acknowledged { background: var(--buying-bg); color: var(--buying-fg); }
.status-chip-sm.fixed { background: var(--verified-bg); color: var(--verified-fg); }
.status-chip-sm.wont_fix { background: var(--clay-bg); color: var(--clay); }
.status-select { font-size: 11px; font-weight: 700; border: 1px solid var(--border-2); border-radius: 999px; padding: 4px 8px; background: var(--surface); color: var(--ink); margin-left: auto; }

.notice-card { background: var(--sage-bg); border-radius: var(--radius); padding: 14px 16px; margin: 0 18px 12px; }
.notice-card .thread-time { color: var(--sage-deep); }
.notice-card .thread-title { color: var(--sage-deep); }

.comm-compose {
  position: fixed; bottom: calc(var(--nav-h) + 20px); left: 18px; z-index: 90;
  width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--ink-contrast);
  display: flex; align-items: center; justify-content: center; font-size: 26px; border: none;
  box-shadow: var(--shadow-lg);
}
.reply-card { padding: 10px 18px; border-bottom: 1px solid var(--border); }
.vote-col-h { display: flex; align-items: center; gap: 10px; }
.vote-col-h button { background: var(--surface-2); border: none; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--ink); font-size: 15px; }
.vote-col-h .n { font-weight: 800; font-size: 14px; }
.vouch-seal-mini {
  width: 16px; height: 16px; border-radius: 50%; background: var(--marigold); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.vouch-seal-mini svg { width: 9px; height: 9px; }

/* ---------- Location search (Nominatim) + map preview (Leaflet) ---------- */
.nominatim-dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  background: var(--elevated); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); max-height: 240px; overflow-y: auto;
}
.nominatim-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  border-bottom: 1px solid var(--border); padding: 10px 14px; font-size: 12.5px; color: var(--ink);
}
.nominatim-item:last-child { border-bottom: none; }
.nominatim-item:hover { background: var(--surface-2); }
.map-preview { width: 100%; height: 160px; border-radius: var(--radius-sm); overflow: hidden; margin-top: 10px; background: var(--surface-2); }
.map-preview .leaflet-container { font-family: inherit; }
