:root {
  --leaf: #4f9a47;        /* strong accent: top-bar pills, your chat bubbles, tracker, Buy badges */
  --leaf-hover: #3f8439;
  --leaf-text: #fff;      /* text on --leaf */
  --glow: none;           /* optional page glow (Ember) */
  --av1: #3f6b3a; --av2: #c0623d; --av3: #b8892b; --av4: #5a7d9a; --av5: #8a5a83; --av6: #4f8a74;  /* letter avatars */
  --bg: #f7f3ea;
  --surface: #fffdf8;
  --surface-2: #efe8d8;
  --text: #2a2a22;
  --muted: #6b6a5c;
  --border: #ddd4bf;
  --green: #3f6b3a;
  --green-dark: #2e5129;
  --green-soft: #e3ecd9;
  --terracotta: #c0623d;
  --terracotta-soft: #f6e1d6;
  --gold: #b8892b;
  --gold-soft: #f5ead0;
  --danger: #a33a2a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 50, 20, .06), 0 4px 16px rgba(60, 50, 20, .06);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Colors for the shop-style Seeds I Want list, and text on accent-colored buttons. */
:root {
  --on-accent: #fff;
  --link: #1f5fd1;
  --buy: #127a12;
  --buy-hover: #0e620e;
  --shop-bg: #ffffff;
  --shop-head: #f3f3f3;
  --shop-text: #1b1b1b;
  --badge-1: #5a5c99;
  --badge-2: #2f7a87;
}

/* Dark theme: chosen with the ☀️/🌙 button, or following the computer's setting when nothing was chosen. */
:root[data-theme="dark"] {
  --bg: #1b1d17;
  --surface: #24271f;
  --surface-2: #2e3228;
  --text: #ece8dc;
  --muted: #a3a08f;
  --border: #3b4033;
  --green: #8dbb7f;
  --green-dark: #a9d09c;
  --green-soft: #2d3a28;
  --terracotta: #e08a66;
  --terracotta-soft: #3d2a21;
  --gold: #d9b25e;
  --gold-soft: #3a3220;
  --danger: #e0796a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --on-accent: #18200f;
  /* Seeds I Want (shop-style list) */
  --link: #8fb4ff;
  --buy: #2f8f2f;
  --buy-hover: #3aa53a;
  --shop-bg: var(--surface);
  --shop-head: var(--surface-2);
  --shop-text: var(--text);
  --badge-1: #6f72b8;
  --badge-2: #3a8d9b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1d17;
    --surface: #24271f;
    --surface-2: #2e3228;
    --text: #ece8dc;
    --muted: #a3a08f;
    --border: #3b4033;
    --green: #8dbb7f;
    --green-dark: #a9d09c;
    --green-soft: #2d3a28;
    --terracotta: #e08a66;
    --terracotta-soft: #3d2a21;
    --gold: #d9b25e;
    --gold-soft: #3a3220;
    --danger: #e0796a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --on-accent: #18200f;
    /* Seeds I Want (shop-style list) */
    --link: #8fb4ff;
    --buy: #2f8f2f;
    --buy-hover: #3aa53a;
    --shop-bg: var(--surface);
    --shop-head: var(--surface-2);
    --shop-text: var(--text);
    --badge-1: #6f72b8;
    --badge-2: #3a8d9b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { min-width: 0; padding-top: 28px; padding-bottom: 48px; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1600px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* ---------- top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
#nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
#nav a, #nav button.linklike {
  color: var(--text); text-decoration: none; padding: 7px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem;
  position: relative;
}
#nav a:hover, #nav button.linklike:hover { background: var(--surface-2); }
#nav a.active { background: var(--green-soft); color: var(--green-dark); }
.badge {
  display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px;
  background: var(--terracotta); color: #fff; font-size: .75rem; line-height: 20px; text-align: center; font-weight: 600;
}

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 .95rem var(--sans); padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--green); color: var(--on-accent); cursor: pointer; text-decoration: none; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--green-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.warn { background: var(--terracotta); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.small { padding: 6px 12px; font-size: .85rem; }
button.linklike { background: none; border: 0; font: inherit; cursor: pointer; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--green) 40%, transparent); outline-offset: 1px; border-color: var(--green);
}
.field { margin-bottom: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin-right: 18px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.error { background: var(--terracotta-soft); color: var(--danger); padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; }
.error:empty { display: none; }

/* ---------- cards & layout ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.narrow { max-width: 560px; margin: 0 auto; }
.muted { color: var(--muted); }
.small-text { font-size: .875rem; }
.stack > * + * { margin-top: 14px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 32px 0 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

.hero {
  background: var(--hero-bg, var(--green-soft));
  border: 1px solid var(--hero-border, transparent);
  border-radius: 22px; padding: clamp(24px, 5vw, 48px); display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center;
}
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 16px 12px; text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 1.9rem; color: var(--green); }
.stat span { font-size: .85rem; color: var(--muted); }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.how .card { padding: 18px; }
.how .num { font-family: var(--serif); font-size: 1.5rem; color: var(--terracotta); }

.filters { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.filter-checks { display: flex; gap: 4px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 6px 14px; border-radius: 999px;
  font: 500 .875rem var(--sans); cursor: pointer;
}
.chip.on { background: var(--green); border-color: var(--green); color: var(--on-accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.listing {
  display: flex; flex-direction: column; text-decoration: none; color: inherit; padding: 0; overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.listing:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(60, 50, 20, .16); }
.emoji { font-size: 2rem; line-height: 1; width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); flex-shrink: 0; overflow: hidden; }
.emoji img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing-body { padding: 14px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.listing h3 { margin: 0; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 2px; }

/* ---------- photos ---------- */
.listing-media, .detail-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.listing-media > img, .detail-media > img, .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing-media > img { transition: transform .5s ease; }
.listing:hover .listing-media > img { transform: scale(1.05); }
.listing-media::after { /* soft shade so overlay tags stay readable on bright photos */
  content: ""; position: absolute; inset: 0 0 auto; height: 40%; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, .18), transparent);
}
.is-traded .listing-media > img, .is-traded .ph { filter: grayscale(.7) opacity(.75); }
.media-tags { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 1; }
.media-tags .tag { background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(6px); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.ph { display: grid; place-items: center; font-size: 4rem; }
.ph span { filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .18)); transition: transform .3s; }
.listing:hover .ph span { transform: scale(1.12) rotate(-4deg); }
.cat-vegetable { background: linear-gradient(135deg, var(--green-soft), var(--gold-soft)); }
.cat-herb { background: linear-gradient(135deg, var(--green-soft), var(--surface-2)); }
.cat-flower { background: linear-gradient(135deg, var(--terracotta-soft), var(--gold-soft)); }
.cat-fruit { background: linear-gradient(135deg, var(--terracotta-soft), var(--green-soft)); }
.cat-tree-shrub { background: linear-gradient(135deg, var(--green-soft), var(--green-soft) 40%, var(--gold-soft)); }
.cat-other { background: linear-gradient(135deg, var(--surface-2), var(--gold-soft)); }

.detail-main { padding: 0; overflow: hidden; }
.detail-inner { padding: 22px; }
.detail-media .ph { font-size: 6rem; }
.detail-media.zoomable { cursor: zoom-in; }
.ph-cta {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); white-space: nowrap; cursor: pointer;
  background: var(--surface); color: var(--text); font-weight: 600; font-size: .9rem; padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow);
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.dropzone {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border: 2px dashed var(--border); border-radius: var(--radius);
  background: var(--surface-2); cursor: pointer; overflow: hidden; font-weight: 400; margin: 0; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--green); background: var(--green-soft); }
.dropzone:focus-within { outline: 3px solid color-mix(in srgb, var(--green) 40%, transparent); border-color: var(--green); }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 16px; }
.dz-icon { font-size: 2.2rem; }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dropzone.has-photo { border-style: solid; }
.dropzone.has-photo .dz-empty { visibility: hidden; }
.dz-busy { display: none; position: absolute; inset: 0; place-items: center; background: color-mix(in srgb, var(--surface) 80%, transparent); font-weight: 600; }
.dropzone.busy .dz-busy { display: grid; }
.busy-btn { opacity: .6; pointer-events: none; }
label.btn { margin: 0; }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10, 12, 8, .9); display: grid; place-items: center; padding: 16px; cursor: zoom-out; animation: fade .15s; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.1rem; cursor: pointer; }
@keyframes fade { from { opacity: 0; } }
.swap .emoji { width: 40px; height: 40px; font-size: 1.4rem; border-radius: 10px; }
.variety { color: var(--muted); font-size: .95rem; }
.desc { color: var(--muted); font-size: .9rem; margin: 8px 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing-foot { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border); display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; color: var(--muted); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag.heirloom { background: var(--gold-soft); color: var(--gold); }
.tag.organic { background: var(--green-soft); color: var(--green); }
.tag.traded { background: var(--terracotta-soft); color: var(--terracotta); }
.status { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; }
.status.pending { background: var(--gold-soft); color: var(--gold); }
.status.accepted { background: var(--green-soft); color: var(--green); }
.status.completed { background: var(--green); color: #fff; }
.status.declined, .status.cancelled { background: var(--surface-2); color: var(--muted); }

.detail { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.detail-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.detail-head .emoji { width: 72px; height: 72px; font-size: 2.6rem; }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 16px 0; }
dl.facts dt { color: var(--muted); font-size: .9rem; }
dl.facts dd { margin: 0; font-weight: 500; }
.wants { background: var(--gold-soft); border-radius: 10px; padding: 12px 14px; }
.wants b { color: var(--gold); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex-shrink: 0; }
.person { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.tabs button, .tabs a { text-decoration: none; background: none; border: 0; font: 600 1rem var(--sans); color: var(--muted); padding: 10px 14px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.on, .tabs a.on { color: var(--green); border-bottom-color: var(--green); }

.trade-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding: 16px 18px; }
.trade-row + .trade-row { margin-top: 10px; }
.trade-row:hover { border-color: var(--green); }
.swap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.swap .arrow { color: var(--terracotta); font-size: 1.2rem; }

.chat { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding: 4px; margin-bottom: 14px; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 16px; background: var(--surface-2); }
.msg.mine { align-self: flex-end; background: var(--green-soft); }
.msg .meta { font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
.msg.system { align-self: center; background: none; color: var(--muted); font-size: .85rem; font-style: italic; padding: 2px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .big { font-size: 3rem; }
.footer { border-top: 1px solid var(--border); padding: 20px 0; color: var(--muted); font-size: .85rem; text-align: center; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 500; transition: .2s; max-width: calc(100% - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .hero, .detail, .how { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .trade-row { grid-template-columns: 1fr; }
  #nav a, #nav button.linklike { padding: 6px 9px; font-size: .9rem; }
}

/* ---------- haves / wants / matches ---------- */
.count { display: inline-block; font: 600 .8rem var(--sans); background: var(--surface-2); color: var(--muted); padding: 2px 9px; border-radius: 999px; vertical-align: middle; }
.chip-count { display: inline-block; margin-left: 4px; font-size: .75rem; font-weight: 700; color: var(--terracotta); }

.garden { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.garden .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.want-form .field { margin-bottom: 12px; }
.want-list { margin-top: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.want-list > p { padding: 16px; margin: 0; }
.want-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; }
.want-row + .want-row { border-top: 1px solid var(--border); }
.want-x {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--muted);
  cursor: pointer; font-size: .85rem; display: inline-grid; place-items: center;
}
.want-x:hover { background: var(--terracotta-soft); color: var(--danger); }
.want-chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 999px; background: var(--gold-soft); color: var(--text); font-weight: 500; font-size: .9rem; }

.match-banner { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; border-color: var(--green); margin-bottom: 4px; padding: 16px 20px; }
.match-banner .big { font-size: 2rem; }
.match-banner .arrow { margin-left: auto; font-size: 1.4rem; color: var(--green); }
.match-banner:hover { background: var(--green-soft); }
.setup-card, .hint-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 24px; }
.setup-card .big { font-size: 2.6rem; }
.setup-card > div { flex: 1; min-width: 220px; }
.setup-card p { margin: 0; }
.hint-card { display: block; line-height: 1.6; background: var(--gold-soft); border-color: transparent; margin: 0 0 16px; padding: 14px 18px; }

.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.match-card { display: flex; flex-direction: column; gap: 16px; }
.match-card.is-mutual { border: 2px solid var(--green); }
.match-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.match-badge { font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); }
.match-badge.mutual { background: var(--green); color: var(--on-accent); }
.match-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; flex: 1; }
.match-cols h4 { margin: 0 0 6px; font: 700 .75rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mini-item { display: flex; align-items: center; gap: 10px; padding: 6px; margin: 0 -6px; border-radius: 10px; text-decoration: none; color: inherit; line-height: 1.3; }
a.mini-item:hover { background: var(--surface-2); }
.mini-item .emoji { width: 44px; height: 44px; font-size: 1.5rem; border-radius: 10px; }
.match-note { font-size: .78rem; color: var(--green); font-weight: 500; }

.swap-builder { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; }
.swap-builder h3 { margin-bottom: 12px; }
.swap-arrow { align-self: center; font-size: 2rem; color: var(--terracotta); }
.pick { display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; cursor: pointer; font-weight: 400; line-height: 1.3; }
.pick:hover { background: var(--surface-2); }
.pick:has(input:checked) { background: var(--green-soft); }
.pick input { width: 18px; height: 18px; accent-color: var(--green); flex-shrink: 0; }
.pick .emoji { width: 44px; height: 44px; font-size: 1.5rem; border-radius: 10px; }
.pick .match-note { display: block; }
.their-wants { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.their-wants > div { width: 100%; }
.swap-side { padding: 14px 18px; }

@media (max-width: 1100px) {
  .garden { grid-template-columns: 1fr; }
  .garden aside { order: -1; }
}
@media (max-width: 760px) {
  .swap-builder { grid-template-columns: 1fr; }
  .swap-arrow { justify-self: center; transform: rotate(90deg); }
  .match-cols { grid-template-columns: 1fr; }
}

/* ---------- sidebar layout ---------- */
.layout { flex: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
/* The sidebar scrolls with the page (like eBay's filter column) instead of staying pinned with its own scrollbar. */
.sidebar { padding: 28px 0 24px; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 8px; }
.side-top, .side-group summary {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  color: var(--text); text-decoration: none; cursor: pointer;
}
.side-top { font-weight: 600; }
.side-group summary { list-style: none; font: 700 .76rem var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); user-select: none; }
.side-group summary::-webkit-details-marker { display: none; }
.side-group summary::after { content: "▾"; margin-left: auto; font-size: .8rem; transition: transform .15s; }
.side-group:not([open]) summary::after { transform: rotate(-90deg); }
.side-top:hover, .side-group summary:hover { background: var(--surface-2); }
.side-group { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.side-icon { width: 22px; text-align: center; font-size: 1rem; letter-spacing: 0; }
.side-group ul { list-style: none; margin: 0 0 6px; padding: 0; }
.side-group li a {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 44px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-size: .92rem;
}
.side-group li a:hover { background: var(--surface-2); }
.side-card a[aria-current="page"] { background: var(--green-soft); color: var(--green-dark); font-weight: 600; }
.side-card .badge, .side-card .count, .side-card .soon { margin-left: auto; }
.side-card .soon { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border: 1px solid var(--border); padding: 0 7px; border-radius: 999px; line-height: 18px; }

.menu-btn { display: none; background: none; border: 1px solid var(--border); color: var(--text); width: 40px; height: 40px; border-radius: 10px; font-size: 1.2rem; cursor: pointer; }
.menu-btn:hover { background: var(--surface-2); }
.topbar-inner { justify-content: flex-start; }
#nav { margin-left: auto; }
#nav > a:not(.btn):not(.user-chip) { color: var(--text); text-decoration: none; padding: 7px 12px; border-radius: 999px; font-weight: 500; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; padding: 4px 12px 4px 4px; border-radius: 999px; }
.user-chip:hover { background: var(--surface-2); }
.user-chip .avatar { width: 32px; height: 32px; font-size: .85rem; }
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .45); }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-grid; place-items: center; }
  .sidebar {
    position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); max-height: none; overflow-y: auto;
    padding: 16px; background: var(--bg); transform: translateX(-105%); transition: transform .2s ease; visibility: hidden;
  }
  body.drawer-open .sidebar { transform: none; visibility: visible; }
  body.drawer-open { overflow: hidden; }
  .user-chip span { display: none; }
}

/* ---------- explore / categories / feed / messages / coming soon ---------- */
.tag.hot { background: var(--terracotta-soft); color: var(--terracotta); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px; text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s; }
.cat-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(60, 50, 20, .16); }
.cat-emoji { font-size: 2.8rem; margin-bottom: 6px; }

.feed { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.feed-item { display: flex; align-items: center; gap: 14px; padding: 12px 18px; }
.feed-lead { order: -1; flex-shrink: 0; }
.feed-lead .mini-item { margin: 0; padding: 0; }
.feed-text { flex: 1; min-width: 0; }
.feed-emoji { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); font-size: 1.4rem; }

.convo-list { padding: 6px; }
.convo { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; color: inherit; text-decoration: none; }
.convo + .convo { border-top: 1px solid var(--border); }
.convo:hover { background: var(--surface-2); }
.convo-body { flex: 1; min-width: 0; }
.convo-top { display: flex; justify-content: space-between; gap: 8px; }
.convo-last { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.soon-card { text-align: center; padding: 40px 24px; margin-top: 12px; }
.soon-card .big { font-size: 3.4rem; line-height: 1; margin-bottom: 12px; }
.soon-pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--gold-soft); color: var(--gold); padding: 3px 12px; border-radius: 999px; margin-bottom: 10px; }
.garden.single { grid-template-columns: minmax(0, 1fr); }
.garden.single .want-form { max-width: 640px; }

/* ---------- announcement, reports, admin ---------- */
.announce { background: var(--gold-soft); border-bottom: 1px solid var(--border); }
.announce[hidden] { display: none; }
.announce-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; font-weight: 500; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .85em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
a.chip { text-decoration: none; display: inline-block; }

.report-link { background: none; border: 0; color: var(--muted); font: 500 .85rem var(--sans); cursor: pointer; padding: 6px 4px; text-align: left; }
.report-link:hover { color: var(--danger); text-decoration: underline; }
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 8, .55); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 460px; }

.admin-badge { background: var(--green-soft); color: var(--green-dark); font-size: .75rem; vertical-align: middle; font-family: var(--sans); }
.admin-tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; padding-bottom: 1px; }
.admin-tabs a { white-space: nowrap; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.admin-stat { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text); padding: 18px; }
.admin-stat b { font-family: var(--serif); font-size: 2rem; color: var(--green); line-height: 1.2; }
a.admin-stat:hover { border-color: var(--green); }
.admin-search { display: flex; gap: 8px; margin-bottom: 14px; max-width: 520px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { text-align: left; font: 700 .72rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .avatar { width: 34px; height: 34px; font-size: .85rem; }
.admin-table .mini-item { margin: 0; }
.row-muted td { opacity: .65; }
.row-actions { white-space: nowrap; }
.row-actions .btn { margin: 2px 2px 2px 0; }
.btn.danger:hover { background: var(--terracotta-soft); }

.report-card { display: flex; flex-direction: column; gap: 10px; }
.report-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-target { font-size: 1.05rem; font-weight: 600; }
.report-details { margin: 0; padding: 10px 14px; border-left: 3px solid var(--border); background: var(--surface-2); border-radius: 0 10px 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.menu-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; position: sticky; top: 62px; z-index: 5; background: var(--bg); padding: 10px 0; }
.menu-group { padding: 16px; }
.menu-group.is-hidden, .menu-item.is-hidden { opacity: .55; }
.menu-group-head, .menu-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.menu-group-head { margin-bottom: 10px; }
.menu-group-head .title-input { flex: 1; min-width: 160px; font-weight: 700; }
.icon-input { width: 56px !important; text-align: center; font-size: 1.1rem; padding: 8px 4px !important; }
.menu-items { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; padding-left: 14px; border-left: 2px solid var(--border); }
.menu-item input[data-field="label"] { flex: 1 1 140px; min-width: 120px; }
.menu-item input[data-field="href"] { flex: 2 1 200px; min-width: 160px; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.menu-item.single { padding-left: 0; }
.menu-item input, .menu-group-head input { padding: 7px 10px; }
.small-check { font-size: .85rem; margin: 0; white-space: nowrap; }
.small-check input { width: 16px; height: 16px; }
.row-btns { display: flex; gap: 2px; margin-left: auto; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.danger-text { color: var(--danger); }
.narrow-left { max-width: 640px; }
.security-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }

/* Anything marked hidden stays hidden, whatever display a class gives it. */
[hidden] { display: none !important; }

/* ---------- Seeds I Want (shop-style list) ---------- */
.shop-tabs-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.shop-tabs { display: flex; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.shop-tabs a {
  padding: 10px 16px; white-space: nowrap; text-decoration: none; color: var(--green); font-weight: 500;
  border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; margin-bottom: -1px;
}
.shop-tabs a:hover { background: var(--surface-2); }
.shop-tabs a.on { color: var(--text); font-weight: 700; background: var(--bg); border-color: var(--border); }
.shop-cta { border-radius: 8px; margin-bottom: 8px; }
.shop-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.shop-title-row h1 { font-family: var(--sans); font-size: 1.6rem; font-weight: 700; margin: 0; }
.shop-help { color: var(--green); padding: 0; }
.shop-help:hover { text-decoration: underline; }
.shop-title-row + .hint-card, #shopHelpBox { margin: 10px 0 0; }
.shop-count { margin: 10px 0 6px; font-size: .92rem; }
.shop-controls { display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap; margin-bottom: 16px; }
.shop-controls .pager { margin-right: auto; }
.shop-controls.bottom { margin: 18px 0 0; }
.shop-select { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 500; font-size: .95rem; }
.shop-select select { width: auto; min-width: 76px; }
#shopSort { min-width: 190px; }
.pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pg { min-width: 38px; height: 38px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 500; }
a.pg:hover { background: var(--surface-2); }
.pg-on { background: var(--text); color: var(--bg); font-weight: 700; }
.pg-off { color: var(--border); }
.pg-gap { color: var(--muted); min-width: 24px; }

.shop-head, .shop-row { display: grid; grid-template-columns: 76px minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, 1fr) 200px; gap: 18px; }
.shop-head { background: var(--surface-2); padding: 10px 14px; border-radius: 6px; font-size: .92rem; }
.shop-head > :first-child { grid-column: span 2; }
.shop-head a { font-weight: 600; text-decoration: none; }
.shop-head a:hover { text-decoration: underline; }
.shop-head > div:not(:first-child) { font-weight: 600; color: var(--green); }
.shop-head .r { text-align: right; }
.shop-row { padding: 24px 14px; border-bottom: 1px solid var(--border); align-items: start; line-height: 1.6; }
.shop-thumb { display: block; width: 76px; height: 76px; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 5px rgba(0, 0, 0, .25); }
.shop-thumb img, .shop-thumb .ph { width: 100%; height: 100%; object-fit: cover; }
.shop-thumb .ph { font-size: 2.1rem; }
.shop-title { display: block; font-size: 1.08rem; font-weight: 700; line-height: 1.35; margin-bottom: 2px; text-decoration: none; }
.shop-main a, .shop-seller a { color: var(--green); text-decoration: none; }
.shop-title:hover, .shop-main a:hover, .shop-seller a:hover { text-decoration: underline; }
.shop-main a:not(.shop-title) { text-decoration: none; }
.shop-cond { color: var(--muted); font-size: .93rem; }
.strong { color: var(--text); font-weight: 600; }
.cond-badge { display: inline-flex; align-items: center; gap: 4px; margin: 0 2px 0 4px; padding: 0 8px; border-radius: 4px; font-size: .76rem; font-weight: 700; line-height: 1.6; color: #fff; }
.cond-badge.heirloom { background: #8a6a1f; }
.cond-badge.organic { background: #3f6b3a; }
.shop-desc { margin: 2px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.shop-seller { font-size: .93rem; }
.shop-seller a.strong { display: block; font-weight: 700; text-decoration: none; }
.shop-when { font-style: italic; }
.shop-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; border-left: 1px solid var(--border); padding-left: 18px; min-height: 100%; }
.shop-for { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.shop-price { font-size: 1.45rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.shop-extra { font-size: .92rem; }
.shop-back { overflow-wrap: anywhere; }
.shop-btn { width: 100%; margin-top: 10px; border-radius: 6px; }

@media (max-width: 1050px) {
  .shop-head { display: none; }
  .shop-row { grid-template-columns: 76px minmax(0, 1fr); gap: 8px 16px; }
  .shop-cond, .shop-seller, .shop-buy { grid-column: 2; }
  .shop-buy { border-left: 0; padding: 10px 0 0; border-top: 1px dashed var(--border); align-items: stretch; text-align: left; }
}
@media (max-width: 480px) {
  .shop-row { grid-template-columns: 56px minmax(0, 1fr); padding: 18px 4px; }
  .shop-thumb { width: 56px; height: 56px; }
  .shop-cta { width: 100%; }
  #shopSort { min-width: 0; }
}

/* Seeds I Want: the marketplace look (white sheet, blue links, green buttons) in both themes. */
.shop-page { background: var(--shop-bg); color: var(--shop-text); border: 1px solid var(--border); border-radius: 10px; padding: 0 24px 24px; }
.shop-page .shop-tabs-row { margin: 0 -24px 18px; padding: 0 24px; }
.shop-tabs a { color: var(--link); }
.shop-tabs a.on { color: var(--shop-text); background: var(--shop-bg); border-top-width: 0; border-radius: 0 0 0 0; }
.shop-page .shop-tabs a.on { border-top: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.shop-cta, .shop-cta:hover { background: var(--link); color: #fff; border-radius: 4px; margin: 8px 0; }
.shop-cta:hover { filter: brightness(.92); }
.shop-page a, .shop-help, .shop-title, .shop-main a, .shop-seller a, .shop-head a, .shop-head > div:not(:first-child) { color: var(--link); }
.shop-page h1, .shop-price, .shop-page .strong:not(a) { color: var(--shop-text); }
.shop-head { background: var(--shop-head); border-radius: 0; color: var(--shop-text); }
.shop-row { border-bottom-color: var(--border); }
.shop-cond { color: var(--muted); }
.shop-cond .strong { color: var(--shop-text); }
.cond-badge.heirloom { background: var(--badge-1); }
.cond-badge.organic { background: var(--badge-2); }
.shop-btn:not(.secondary) { background: var(--buy); color: #fff; border-radius: 4px; font-weight: 600; }
.shop-btn:not(.secondary):hover { background: var(--buy-hover); }
.shop-btn.secondary { border-radius: 4px; }
.shop-price { font-size: 1.6rem; }
.pg-on { background: var(--shop-text); color: var(--shop-bg); }
.shop-alt { margin-top: 4px; }
.shop-notice { padding: 14px 16px; margin: 4px 0 8px; background: var(--shop-head); border-radius: 6px; line-height: 1.6; }
.shop-subhead { font-family: var(--sans); font-size: 1.15rem; margin: 28px 0 10px; color: var(--shop-text); }
.theme-btn { background: none; border: 1px solid var(--border); border-radius: 999px; width: 36px; height: 36px; cursor: pointer; font-size: 1rem; line-height: 1; margin-right: 4px; }
.theme-btn:hover { background: var(--surface-2); }
@media (max-width: 480px) {
  .shop-page { padding: 0 12px 16px; }
  .shop-page .shop-tabs-row { margin: 0 -12px 14px; padding: 0 12px; }
}
.shop-page a.btn:not(.secondary), .shop-tabs-row a.shop-cta { color: #fff; }
.shop-page a.btn.secondary { color: var(--shop-text); }
.shop-page .shop-tabs a.on:first-child { border-left: 0; }
/* Tab bar: tabs fill the bar's height with their text centered; the button is compact and centered too. */
.shop-tabs-row { align-items: stretch; }
.shop-tabs a { display: flex; align-items: center; }
.shop-tabs-row .shop-cta, .shop-tabs-row .shop-cta:hover { align-self: center; padding: 6px 14px; font-size: .88rem; margin: 6px 0; }

/* ---------- list / gallery switch ---------- */
.view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); flex-shrink: 0; }
.view-toggle button {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; background: none;
  color: var(--muted); font: 600 .85rem var(--sans); cursor: pointer;
}
.view-toggle button + button { border-left: 1px solid var(--border); }
.view-toggle button:hover { background: var(--surface-2); color: var(--text); }
.view-toggle button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.filters { grid-template-columns: minmax(0, 1fr) auto auto auto; }

/* Browse list view: marketplace rows on a white sheet. */
.shop-list { display: block; background: var(--shop-bg); color: var(--shop-text); border: 1px solid var(--border); border-radius: 10px; padding: 14px 14px 0; }
.shop-list .shop-row:last-child { border-bottom: 0; }

/* Seeds I Want gallery view. */
.shop-gallery { margin-top: 4px; }
.shop-card .listing-media { display: block; }
.shop-card .listing-body { gap: 1px; }
.shop-card .shop-title { font-size: 1.05rem; font-weight: 700; text-decoration: none; line-height: 1.3; margin-top: 2px; }
.shop-card .shop-for { color: var(--terracotta); }
.card-meta { margin-top: 4px; }
.card-meta a, .shop-card .more-link { color: var(--link); text-decoration: none; }
.shop-card .more-link { font-size: .85rem; font-weight: 700; }
.card-actions { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; align-items: stretch; text-align: center; }
.card-actions .shop-btn { width: 100%; margin-top: 0; }

@media (max-width: 760px) {
  .filters .view-toggle { justify-self: start; }
}
.shop-thumb, .shop-card .listing-media { text-decoration: none; }

/* Want List page: full-width rows like the Explore list view. */
.want-shop-list { margin-top: 18px; }
.want-shop-list .shop-buy .shop-btn + .shop-btn { margin-top: 6px; }

/* Logo in the top bar: the dark-green version on the light theme, a light-sage version on the dark theme. */
.brand { display: flex; align-items: center; }
.logo { height: 34px; width: auto; display: block; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
@media (max-width: 480px) { .logo { height: 26px; } }

/* ---------- home page layout ---------- */
.hero-solo { grid-template-columns: 1fr; }

/* Admin → Home page */
.home-rows { max-width: 820px; }
.home-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.home-row.is-hidden { opacity: .6; }
.home-row.home-sub { margin-left: 34px; padding: 10px 16px; }
.home-row-text { flex: 1; min-width: 0; }
.home-who { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding: 1px 8px; border-radius: 999px; margin-left: 4px; white-space: nowrap; }
.home-state { font-size: .8rem; font-weight: 700; color: var(--muted); min-width: 52px; }
.home-state.on { color: var(--green); }
.home-row .row-btns { min-width: 68px; justify-content: flex-end; }
.icon-btn:disabled { opacity: .35; cursor: default; }
/* On/off switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; margin: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--green) 40%, transparent); outline-offset: 2px; }
@media (max-width: 600px) {
  .home-row { flex-wrap: wrap; }
  .home-row.home-sub { margin-left: 16px; }
}
.admin-tabs { flex-wrap: wrap; overflow: visible; }
.admin-tools { border-color: var(--gold); background: var(--gold-soft); }

/* ---------- category default images ---------- */
.sample-tag {
  position: absolute; right: 8px; bottom: 8px; z-index: 1; font-size: .68rem; font-weight: 700; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 999px; color: #fff; background: rgba(0, 0, 0, .55); pointer-events: none;
}
.cat-tile.has-image { padding-top: 0; overflow: hidden; }
.cat-img { display: block; width: calc(100% + 32px); margin: 0 -16px 10px; aspect-ratio: 4 / 3; object-fit: cover; }
/* Admin → Category images */
.cat-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cat-admin { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.cat-admin-preview { aspect-ratio: 4 / 3; background: var(--surface-2); }
.cat-admin-preview img, .cat-admin-preview .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-admin-preview .ph { font-size: 3.4rem; }
.cat-admin-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }


/* List view photo size. Computer: about the height of the text beside it (~3.5 listings per laptop screen).
   Tablet: rows stack into photo + text. Phone: as big as possible while leaving ~180px for the text,
   so seed names stay on two lines (96px on small phones, ~124px on a typical 390px-wide phone, 128px max). */
:root { --thumb: 160px; }
/* Big screens have room for a bigger photo without squeezing the text columns. */
@media (min-width: 1500px) { :root { --thumb: 220px; } }
@media (min-width: 1800px) { :root { --thumb: 240px; } }
.shop-head, .shop-row { grid-template-columns: var(--thumb) minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, 1fr) 200px; }
.shop-thumb { width: var(--thumb); height: var(--thumb); border-radius: 8px; }
.shop-thumb .ph { font-size: 3.6rem; }
@media (max-width: 1050px) {
  .shop-row { --thumb: 140px; grid-template-columns: var(--thumb) minmax(0, 1fr); }
  .shop-thumb .ph { font-size: 3.2rem; }
}
@media (max-width: 480px) {
  .shop-row { --thumb: clamp(96px, calc(100vw - 266px), 128px); grid-template-columns: var(--thumb) minmax(0, 1fr); }
  .shop-thumb .ph { font-size: 2.8rem; }
}
@media (max-width: 760px) {
  /* Phones/tablets: stack the search bar's pieces (the later 4-column rule must not apply here). */
  .filters { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .shop-title { font-size: 1rem; }
}

/* ---------- photo carousel (cards, list rows, listing page) ---------- */
.listing-media .carousel, .detail-media .carousel { position: absolute; inset: 0; }
.shop-thumb { position: relative; overflow: hidden; }
.shop-thumb .carousel { position: absolute; inset: 0; }
.carousel { overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; background: var(--surface-2); }
.car-track { display: flex; height: 100%; transition: transform .3s ease; will-change: transform; }
.carousel.dragging .car-track { transition: none; }
.car-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; pointer-events: none; }
.carousel[data-zoom-click] { cursor: zoom-in; }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); color: #1b1b1b; font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding: 0 0 3px; box-shadow: 0 1px 6px rgba(0, 0, 0, .3); opacity: 0; transition: opacity .15s;
}
.car-prev { left: 8px; }
.car-next { right: 8px; }
.carousel:hover .car-btn, .car-btn:focus-visible { opacity: 1; }
@media (hover: none) { .car-btn { display: none; } } /* touch screens: swipe instead */
.car-dots { position: absolute; left: 50%; bottom: 9px; transform: translateX(-50%); z-index: 2; display: flex; gap: 5px; padding: 4px 7px; border-radius: 999px; background: rgba(0, 0, 0, .38); pointer-events: none; }
.car-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .5); transition: background .15s; }
.car-dots span.on { background: #fff; }
.car-zoom {
  position: absolute; left: 8px; bottom: 8px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .92); color: #1b1b1b; display: grid; place-items: center; cursor: zoom-in; padding: 0;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .3);
}
.car-zoom:hover { background: #fff; }
.shop-thumb .car-zoom { width: 28px; height: 28px; left: 6px; bottom: 6px; }
.shop-thumb .car-zoom svg { width: 15px; height: 15px; }
.shop-thumb .car-btn { width: 28px; height: 28px; font-size: 1.15rem; }
.shop-thumb .car-dots { bottom: 7px; gap: 4px; padding: 3px 6px; }
.shop-thumb .car-dots span { width: 5px; height: 5px; }
.shop-thumb:has(.car-dots) .car-zoom { bottom: 6px; }
.detail-media .car-btn { width: 42px; height: 42px; font-size: 1.7rem; }
.detail-media .car-zoom { width: 40px; height: 40px; left: 12px; bottom: 12px; }

/* Thumbnail strip under the listing page photo */
.thumb-strip { display: flex; gap: 8px; padding: 10px 22px 0; overflow-x: auto; scrollbar-width: thin; }
.thumb-strip button { flex: 0 0 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--surface-2); opacity: .7; }
.thumb-strip button.on { border-color: var(--green); opacity: 1; }
.thumb-strip button:hover { opacity: 1; }
.thumb-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- full-screen gallery ---------- */
.lightbox.gallery { cursor: default; display: flex; flex-direction: column; padding: 56px 16px 16px; gap: 12px; }
.gal-stage { flex: 1; min-height: 0; display: grid; place-items: center; touch-action: pan-y; }
.gal-stage { position: relative; }
.gallery .gal-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; border-radius: 0; box-shadow: none; user-select: none; }
.gal-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 4px;
}
.gal-btn:hover { background: rgba(255, 255, 255, .3); }
.gal-prev { left: 16px; }
.gal-next { right: 16px; }
.gal-count { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 600; font-size: .95rem; }
.gal-thumbs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; flex-shrink: 0; }
.gal-thumbs button { width: 60px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; opacity: .55; background: none; }
.gal-thumbs button.on { border-color: #fff; opacity: 1; }
.gal-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; box-shadow: none; }
@media (max-width: 600px) {
  .gal-btn { display: none; } /* swipe on phones */
  .gal-thumbs button { width: 46px; height: 46px; }
}

/* ---------- multi-photo manager (listing form) ---------- */
.photo-mgr { border: 2px dashed var(--border); border-radius: var(--radius); padding: 12px; background: var(--surface-2); transition: border-color .15s, background .15s; }
.photo-mgr.over { border-color: var(--green); background: var(--green-soft); }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pm-grid:empty { display: none; }
.pm-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface); }
.pm-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-cover { position: absolute; top: 6px; left: 6px; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--green); color: var(--on-accent); }
.pm-tools { position: absolute; inset: auto 0 0 0; display: flex; justify-content: center; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.pm-tools button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #1b1b1b; cursor: pointer; font-size: .9rem; display: grid; place-items: center; padding: 0; }
.pm-tools button:disabled { opacity: .35; cursor: default; }
.pm-add { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px; margin: 10px 0 0; border-radius: 10px; cursor: pointer; text-align: center; font-weight: 400; background: var(--surface); }
.pm-grid:empty + .pm-add { margin-top: 0; padding: 32px 18px; }
.pm-add:hover { background: var(--green-soft); }
.pm-add:focus-within { outline: 3px solid color-mix(in srgb, var(--green) 40%, transparent); }
.pm-icon { font-size: 1.8rem; }
.pm-busy { display: none; position: absolute; inset: 0; place-items: center; background: color-mix(in srgb, var(--surface) 85%, transparent); font-weight: 600; border-radius: 10px; }
.pm-add.busy .pm-busy { display: grid; }
.pm-hint { margin: 8px 2px 0; }
.lightbox.gallery { place-items: stretch; align-items: stretch; } .gal-stage { align-self: stretch; width: 100%; }

/* ---------- Admin → Pages ---------- */
.pages-admin { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.pages-list { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; position: sticky; top: 76px; }
.pages-list a { padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .93rem; }
.pages-list a:hover { background: var(--surface-2); }
.pages-list a.on { background: var(--green-soft); color: var(--green-dark); font-weight: 600; }
.pages-editor h3 { margin-bottom: 4px; }
.page-texts { padding: 18px 18px 4px; max-width: 820px; }
.page-text-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.page-text-head label { margin-bottom: 6px; }
.page-text-head .linklike { color: var(--green); padding: 0; }
.shop-page.no-tabs { padding-top: 20px; }
@media (max-width: 900px) {
  .pages-admin { grid-template-columns: minmax(0, 1fr); }
  .pages-list { position: static; flex-direction: row; overflow-x: auto; }
  .pages-list a { white-space: nowrap; }
}

/* ---------- eBay/Etsy-style top bar: search box + category row ---------- */
.header-search { flex: 1 1 320px; max-width: 620px; display: flex; margin: 0 8px 0 16px; }
.header-search input { flex: 1; min-width: 0; border-radius: 999px 0 0 999px; border-right: 0; padding: 9px 16px; }
.header-search .btn { border-radius: 0 999px 999px 0; padding: 0 18px; }
.catbar { border-top: 1px solid var(--border); background: var(--surface); }
.catbar-inner { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-top: 4px; padding-bottom: 4px; }
.catbar-inner::-webkit-scrollbar { display: none; }
.catbar a { flex-shrink: 0; padding: 6px 13px; border-radius: 999px; color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 500; white-space: nowrap; }
.catbar a:hover { background: var(--surface-2); }
.catbar a[aria-current="page"] { background: var(--green-soft); color: var(--green-dark); font-weight: 600; }
@media (max-width: 760px) {
  .header-search { order: 3; flex-basis: 100%; max-width: none; margin: 0 0 10px; }
}
/* the top bar is taller now: keep sticky toolbars below it */
.menu-toolbar { top: 108px; }
.pages-list { top: 120px; }

/* ---------- full-width home page (no sidebar on computers) ---------- */
@media (min-width: 901px) {
  body.no-sidebar .layout { grid-template-columns: minmax(0, 1fr); }
  body.no-sidebar #sidebar { display: none; }
}
.hero-search { display: flex; gap: 8px; max-width: 560px; margin: 4px 0 18px; }
.hero-search input { flex: 1; min-width: 0; padding: 14px 20px; font-size: 1.05rem; border-radius: 999px; }
.hero-search .btn { padding: 0 24px; }
.section-note { margin: -8px 0 12px; }

/* Swipeable rows of listing cards (Fresh seeds, New seeds that match your wants) */
.hscroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 260px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; scrollbar-width: thin; overscroll-behavior-x: contain;
}
.hscroll > * { scroll-snap-align: start; }
.browse-all { text-align: center; margin-top: 6px; }
@media (max-width: 600px) { .hscroll { grid-auto-columns: 78%; } }

/* Gardener spotlight */
.spotlight { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gardener-card { padding: 0; overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.gardener-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(60, 50, 20, .16); }
.gc-photos { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; height: 120px; background: var(--surface-2); }
.gc-photos img, .gc-photos .ph { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; font-size: 2.2rem; }
.gc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.gc-stats { color: var(--green); font-weight: 600; }
.gc-bio { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gc-seeds { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav-editor { margin-bottom: 18px; }
.topnav-items { margin: 10px 0 12px; }
.gc-photos { overflow: hidden; grid-template-rows: 120px; } .gc-photos > * { height: 120px; min-height: 0; min-width: 0; }
@media (max-width: 760px) { .hero-search { display: none; } } /* phones already have the top bar search */


/* ======================= Phone improvements ======================= */
.bottombar { display: none; }
@media (max-width: 760px) {
  /* Top bar slides away while scrolling down, comes back when scrolling up. */
  .topbar { transition: transform .22s ease; will-change: transform; }
  body.header-hidden .topbar { transform: translateY(-100%); }
  .topbar-inner { min-height: 54px; gap: 8px; }
  .logo { height: 24px; }

  /* App-style bottom tab bar, clear of the iPhone home bar. */
  .bottombar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; gap: 2px;
    background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -2px 12px rgba(0, 0, 0, .08);
    padding: 4px max(6px, env(safe-area-inset-left)) calc(4px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-right));
  }
  .bottombar a {
    position: relative; flex: 1; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600;
  }
  .bottombar a[aria-current="page"] { color: var(--green-dark); background: var(--green-soft); }
  .bb-icon { font-size: 1.35rem; line-height: 1; }
  .bottombar .badge { position: absolute; top: 3px; left: calc(50% + 6px); margin: 0; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(78px + env(safe-area-inset-bottom)); }

  /* Smallest text: at least 12px. */
  .tag, .eyebrow, .count, .badge, .shop-for, .soon, .home-who, .sample-tag, .match-badge, .chip-count,
  .cond-badge, .side-card .soon, .status, .pm-cover { font-size: 12px; }

  /* A compact welcome banner so the seeds show up sooner. */
  .hero { padding: 22px 18px; gap: 16px; border-radius: 18px; }
  .hero h1 { font-size: 1.55rem; }
  .hero p { font-size: 1rem; margin-bottom: 12px; }
  .stat { padding: 10px 8px; }
  .stat b { font-size: 1.4rem; }
  main { padding-top: 18px; }

  /* Admin tables become stacked cards with labels. */
  .table-wrap { overflow: visible; border: 0; background: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table thead { display: none; }
  .admin-table tr { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
  .admin-table td { border: 0; padding: 3px 0; }
  .admin-table td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; font-weight: 600; }
  .admin-table td.row-actions { white-space: normal; padding-top: 8px; }
  .admin-table td.row-actions::before { display: block; margin-bottom: 4px; }
  .row-muted td { opacity: 1; }
  .row-muted { opacity: .7; }
}

/* Touch screens: every button and link gets a thumb-sized tap area (about 44px). */
@media (pointer: coarse) {
  .btn, .chip, .catbar a, .view-toggle button, .pg, .tabs a, .shop-tabs a, .theme-btn, .menu-btn,
  #nav > a, #nav button.linklike, .side-top, .side-group summary, .pages-list a { min-height: 44px; }
  .btn.small { min-height: 40px; padding: 8px 14px; }
  .chip, .catbar a, #nav > a, #nav button.linklike, .tabs a, .shop-tabs a { display: inline-flex; align-items: center; }
  .side-group li a { padding-top: 11px; padding-bottom: 11px; }
  .theme-btn { width: 44px; }
  .icon-btn, .want-x { width: 40px; height: 40px; }
  .car-zoom, .detail-media .car-zoom { width: 42px; height: 42px; }
  .shop-thumb .car-zoom { width: 34px; height: 34px; }
  .pm-tools button { width: 38px; height: 38px; }
  .thumb-strip button { flex-basis: 72px; height: 72px; }
  /* small text links get extra tap padding without changing the layout */
  .shop-main a, .shop-seller a, .card-meta a, .report-link, .shop-help,
  p > a, .section-head > a, .small-text > a, a.small-text { padding-top: 8px; padding-bottom: 8px; display: inline-block; }
  .check { min-height: 44px; }
  .check input { width: 22px; height: 22px; }
}



/* ---------- feedback & star ratings ---------- */
.stars { position: relative; display: inline-block; line-height: 1; font-size: 1.05rem; letter-spacing: 1px; color: var(--border); vertical-align: -2px; white-space: nowrap; }
.stars::before { content: "★★★★★"; }
.stars-fill { position: absolute; inset: 0 auto 0 0; width: var(--pct); overflow: hidden; color: #e3a008; }
.stars-fill::before { content: "★★★★★"; }
.stars.sm { font-size: .9rem; }
.stars.lg { font-size: 1.6rem; }
.rating-inline { white-space: nowrap; }
.profile-rating { margin-top: 6px; }
.profile-rating a { text-decoration: none; color: inherit; }
.profile-rating a:hover b { text-decoration: underline; }
.needs-feedback { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-weight: 600; font-size: .85rem; }

.feedback-card .star-picker { display: flex; gap: 4px; margin: 4px 0 2px; }
.star-picker button { font-size: 2rem; line-height: 1; background: none; border: 0; padding: 2px 4px; cursor: pointer; color: var(--border); transition: transform .1s, color .1s; }
.star-picker button:hover { transform: scale(1.15); }
.star-picker button.on { color: #e3a008; }
.star-word { margin-bottom: 10px; min-height: 1.4em; }
.fb-comment { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-theirs { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }

.feedback-section { margin-top: 20px; }
.fb-tabs { margin-bottom: 14px; }
.fb-tabs .count { margin-left: 4px; }
.fb-summary { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: center; margin-bottom: 16px; }
.fb-score { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fb-avg { font-family: var(--serif); font-size: 2.8rem; font-weight: 700; line-height: 1; }
.fb-pct { font-size: .9rem; }
.fb-table-wrap { overflow-x: auto; }
.fb-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.fb-table th, .fb-table td { padding: 9px 12px; text-align: center; border-bottom: 1px solid var(--border); }
.fb-table thead th { font: 700 .74rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fb-table th[scope=row] { text-align: left; font-weight: 600; white-space: nowrap; }
.fb-table tr.pos td { color: var(--green); font-weight: 700; }
.fb-table tr.neg td { color: var(--danger); font-weight: 700; }
.fb-table tr.tot th, .fb-table tr.tot td { border-bottom: 0; font-weight: 800; }
.fb-list { display: flex; flex-direction: column; }
.fb-entry { padding: 12px 0; border-top: 1px solid var(--border); }
.fb-entry-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fb-remove { margin-left: auto; color: var(--danger); }
@media (max-width: 760px) {
  .fb-summary { grid-template-columns: 1fr; gap: 12px; }
  /* this table is small enough to stay a table on phones (not the stacked admin cards) */
  .fb-table th, .fb-table td { padding: 8px 6px; }
}
@media (pointer: coarse) { .star-picker button { min-width: 46px; min-height: 46px; font-size: 2.2rem; } }


/* ---------- feedback: comments left, summary box right (Reverb style) ---------- */
.feedback-section { margin-top: 26px; }
.fb-total { font-family: var(--sans); font-size: 1.1rem; font-weight: 500; }
.fb-seg { display: inline-flex; gap: 2px; padding: 4px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.fb-seg button { border: 0; background: none; padding: 8px 16px; border-radius: 9px; font: 600 .95rem var(--sans); color: var(--muted); cursor: pointer; }
.fb-seg button:hover { color: var(--text); }
.fb-seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.fb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.fb-layout .fb-list { display: flex; flex-direction: column; gap: 12px; }
.fb-role-note { margin: 0; }
.fb-layout .fb-entry { border: 1px solid var(--border); border-top: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; background: var(--surface); }
.fb-layout .fb-entry-head { display: flex; align-items: center; gap: 8px; }
.fb-layout .fb-entry .tag { font-size: .72rem; }
.fb-by { margin-top: 4px; }
.fb-by a { color: inherit; }
.fb-layout .fb-comment { margin: 8px 0 0; }
.fb-empty { text-align: center; padding: 28px 18px; }
.fb-summary-box { position: sticky; top: 120px; background: var(--surface-2); border-radius: 14px; padding: 18px 20px 14px; }
.fb-summary-box h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; text-align: center; margin: 0 0 12px; }
.fb-summary-box .fb-score { flex-direction: row; justify-content: center; gap: 12px; margin-bottom: 10px; text-align: left; }
.fb-summary-box .fb-avg { font-size: 2.4rem; }
.fb-count { display: block; }
.fb-summary-box .fb-table { font-size: .93rem; }
.fb-summary-box .fb-table th, .fb-summary-box .fb-table td { text-align: left; padding: 10px 8px; }
.fb-summary-box .fb-table thead th { font-size: .78rem; text-transform: none; letter-spacing: 0; color: var(--text); }
.fb-summary-box .fb-table th[scope=row] { font-size: .85rem; }
.fb-legend { margin: 10px 0 0; text-align: center; }
@media (max-width: 900px) {
  .fb-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .fb-summary-box { position: static; order: -1; }  /* phones: the summary comes first */
  .fb-seg { display: flex; }
  .fb-seg button { flex: 1; padding: 8px 6px; }
}

/* Add seeds: quick entry of several in a row */
.just-added { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 12px 14px; margin-bottom: 16px; border-radius: 12px; background: var(--green-soft); }
.just-added b { color: var(--green-dark); }
.just-added .chip { text-decoration: none; background: var(--surface); }
.add-tip { margin: 10px 0 0; }


/* ---------- mailing addresses (trade page + Settings) ---------- */
.addr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.addr-grid .addr-name, .addr-grid .addr-line1, .addr-grid .addr-line2 { grid-column: 1 / -1; }
.addr-grid .field { margin-bottom: 12px; }
.addr-grid input { width: 100%; }
.address-card h3 { margin-bottom: 4px; }
.addr-privacy { margin: 0 0 6px; }
.addr-block { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 14px; }
.addr-block h4 { margin: 0; font-family: var(--sans); font-size: 1rem; }
.addr-sub { margin: 2px 0 10px; }
.addr-lines { margin: 8px 0 12px; padding: 10px 14px; line-height: 1.5; background: var(--surface-2); border-radius: 10px; overflow-wrap: anywhere; }
.addr-waiting { margin: 0; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 10px; text-align: center; }
.addr-choices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.addr-choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.addr-choice:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.addr-choice input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--green); }
.addr-one { display: block; overflow-wrap: anywhere; }
fieldset.addr-new { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.addr-form .check { margin-bottom: 12px; }
.address-card .hero-actions { align-items: center; }
.addr-item { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.addr-item:first-child { border-top: 0; padding-top: 4px; }
.addr-item .addr-lines { margin-bottom: 0; }
.addr-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: none; }
.addr-edit { padding: 14px 0; border-top: 1px solid var(--border); }
.addr-book { margin-bottom: 12px; }
@media (max-width: 520px) {
  .addr-grid { grid-template-columns: minmax(0, 1fr); }
  .addr-item { flex-direction: column; }
  .addr-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
}


/* ---------- mailing addresses inside the trade conversation ---------- */
.msg.addr-msg { min-width: min(260px, 80%); border: 1px solid var(--border); }
.addr-msg-title { font-weight: 700; margin-bottom: 2px; }
.addr-msg .addr-lines { margin: 6px 0 8px; background: var(--surface); }
.addr-msg-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.addr-prompt { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 12px 14px; border-radius: 12px; background: var(--green-soft); border: 1px solid var(--green); }
.addr-picker { margin-bottom: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.addr-picker-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.addr-picker .addr-choice { background: var(--surface); }
.chat-addr { flex: none; padding-left: 12px; padding-right: 12px; font-size: 1.1rem; }


/* ---------- "I have this too" under a list row's button ---------- */
.shop-buy .shop-have { display: inline-block; margin-top: 8px; font-size: .88rem; font-weight: 600; color: var(--green-dark); }


/* ---------- share-address picker: saved (dropdown) or new ---------- */
.addr-choice-wrap { display: flex; flex-direction: column; gap: 10px; }
.addr-choice:has(input:disabled) { opacity: .6; cursor: default; }
.addr-saved { padding: 0 0 0 4px; }
.addr-saved select { width: 100%; }
.addr-saved .addr-lines { margin: 8px 0 0; background: var(--surface); }
.addr-picker fieldset.addr-new { margin: 0; padding: 0 0 0 4px; }
.addr-manage { margin: 0 0 12px; }
#addressBook { scroll-margin-top: 130px; }


/* ---------- shipping in the trade conversation ---------- */
.msg.ship-msg { min-width: min(260px, 80%); border: 1px solid var(--border); }
.track-no { font-family: ui-monospace, Consolas, monospace; letter-spacing: .02em; overflow-wrap: anywhere; }
.ship-state { margin: 6px 0 8px; font-weight: 600; }
.ship-state.done { color: var(--green-dark); }
.ship-panel { margin-bottom: 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.ship-panel-title { font-weight: 700; margin-bottom: 4px; }
.ship-row { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--border); }
.ship-row:first-of-type { border-top: 0; }
.ship-who { flex: 1 1 160px; font-size: .92rem; }
.ship-pill { font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); white-space: nowrap; }
.ship-pill.done { color: var(--green-dark); background: var(--green-soft); border-color: var(--green); }
.ship-pill.todo { color: var(--muted); }
.ship-acts { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ship-fields { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 0 12px; }
.ship-fields input, .ship-fields select { width: 100%; }
@media (max-width: 520px) { .ship-fields { grid-template-columns: minmax(0, 1fr); } }


/* ---------- All varieties page ---------- */
.vt-section { margin-top: 22px; }
.vt-section h2 { font-size: 1.25rem; margin: 0 0 10px; }
.vt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.vt-plant { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.vt-head { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-size: 1.05rem; margin-bottom: 8px; }
.vt-head:hover b { text-decoration: underline; }
.vt-head .count { margin-left: auto; }
.vt-emoji { font-size: 1.4rem; }
.vt-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.vt-var { font-size: .88rem; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.vt-var:hover { border-color: var(--green); }
.vt-var.hit { background: var(--green-soft); border-color: var(--green); }
#vtNone { margin-top: 16px; }


/* ======================= No sidebar: top bar + account menu + My Garden tabs ======================= */
.layout, body.no-sidebar .layout { display: block; }
#app { min-width: 0; }

/* top bar, right side */
#nav { gap: 6px; flex-wrap: nowrap; }
.nav-add { white-space: nowrap; }
.nav-icon { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  font-size: 1.2rem; text-decoration: none; }
.nav-icon:hover { background: var(--surface-2); }
.nav-icon .badge { position: absolute; top: -2px; right: -4px; margin: 0; }

/* account menu */
.acct { position: relative; }
.acct > summary { list-style: none; cursor: pointer; position: relative; }
.acct > summary::-webkit-details-marker { display: none; }
.acct-caret { font-size: .75rem; color: var(--muted); }
.acct-dot { position: absolute; top: 2px; left: 28px; width: 10px; height: 10px; border-radius: 50%; background: var(--terracotta, #c4622d);
  border: 2px solid var(--surface); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 230px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.acct-menu a, .acct-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border-radius: 9px;
  color: var(--text); text-decoration: none; font: 500 .95rem var(--sans); text-align: left; }
#nav .acct-menu a { padding: 9px 12px; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--surface-2); }
.acct-menu .badge, .acct-menu .count { margin-left: auto; }
.acct-menu hr { border: 0; border-top: 1px solid var(--border); margin: 5px 4px; }

/* My Garden tabs */
.garden-nav { display: flex; align-items: center; gap: 4px; margin-top: 18px; padding: 6px; overflow-x: auto; scrollbar-width: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.garden-nav::-webkit-scrollbar { display: none; }
.garden-title { font: 700 1rem var(--serif, Georgia), serif; padding: 0 12px 0 8px; white-space: nowrap; color: var(--green-dark); }
.garden-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; white-space: nowrap;
  color: var(--text); text-decoration: none; font-weight: 500; }
.garden-nav a:hover { background: var(--surface-2); }
.garden-nav a[aria-current="page"] { background: var(--green-soft); color: var(--green-dark); font-weight: 600; }
.garden-nav .count, .garden-nav .badge { margin-left: 2px; }
.garden-nav + main { padding-top: 18px; }

@media (max-width: 760px) {
  .nav-add-text, .acct-name, .acct-caret { display: none; }
  .nav-add { padding: 0; width: 40px; height: 40px; display: inline-grid; place-items: center; font-size: 1.2rem; }
  #nav > a.nav-icon { display: none; } /* Trades is in the bottom tab bar on phones */
  #nav { gap: 4px; }
  #nav > a.nav-add { min-height: 40px; }
  .acct-menu { position: fixed; right: 10px; left: auto; top: 62px; max-height: calc(100vh - 150px); overflow-y: auto; }
  .garden-title { display: none; }
  .garden-nav { margin-top: 12px; border-radius: 12px; }
  .garden-nav + main { padding-top: 12px; }
}
@media (pointer: coarse) {
  .acct-menu a, .acct-menu button { min-height: 44px; }
  .garden-nav a { min-height: 42px; }
}

/* the account button keeps its avatar on phones (an older rule hides spans in .user-chip) */
.acct .user-chip .avatar { display: grid; place-items: center; flex: none; }
@media (max-width: 760px) { .acct .user-chip { padding: 4px; } }

/* drawn icons (swap arrows) sit on the text line like an emoji would */
.ico { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.nav-icon { color: var(--text); }
.nav-icon .ico { width: 24px; height: 24px; }
.bb-icon .ico { width: 1em; height: 1em; vertical-align: 0; }
.bb-icon { display: inline-grid; place-items: center; height: 1.35rem; }
.garden-nav a .ico, .acct-menu a .ico { color: var(--green-dark); }

/* top bar pills: "Trades" and "+ Add seeds", the same leaf green in light and dark mode */
#nav > a.nav-pill { background: var(--leaf); color: #fff; border-color: transparent; gap: 6px; padding: 7px 14px; font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
#nav > a.nav-pill:hover { background: var(--leaf-hover); color: #fff; }
.nav-pill .ico { width: 1.05em; height: 1.05em; vertical-align: 0; }
.pill-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--leaf-hover);
  font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; }
@media (max-width: 760px) {
  #nav > a.nav-trades { display: none; } /* phones: Trades is in the bottom tab bar */
  #nav > a.nav-add { padding: 0; }
}

/* ---------- add / edit seeds: wider, photos left and details right on computers ---------- */
.form-wide { max-width: 1040px; margin-left: auto; margin-right: auto; }
.listing-form { padding: 26px 30px; }
.lf-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 8px 32px; align-items: start; }
.lf-photos { position: sticky; top: 130px; }
.lf-photos .pm-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.lf-photos .pm-grid:empty + .pm-add { padding: 64px 18px; }
.listing-form textarea#description { min-height: 150px; }
.listing-form .hero-actions { justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
.listing-form .add-tip { text-align: right; }
@media (max-width: 820px) {
  .lf-grid { grid-template-columns: minmax(0, 1fr); }
  .lf-photos { position: static; }
  .listing-form { padding: 20px 18px; }
  .listing-form .hero-actions { justify-content: flex-start; }
  .listing-form .add-tip { text-align: left; }
}

/* Seeds I Want: pointer to Explore instead of the "more seeds" list */
.shop-explore-link { margin: 22px 0 6px; text-align: center; font-weight: 500; }

/* ---------- My Trades: big seed tiles, the same size as the cards on My Garden → Overview ---------- */
.trade-card { display: block; padding: 16px 18px 18px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.trade-card + .trade-card { margin-top: 14px; }
.trade-card:hover { border-color: var(--green); box-shadow: var(--shadow); }
.trade-head { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.trade-head .status { margin-left: auto; }
.trade-sides { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.trade-side { min-width: 0; }
.trade-side-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.trade-tiles { display: flex; gap: 12px; flex-wrap: wrap; }
.trade-tile { width: 220px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.trade-tile .listing-media::after { display: none; }
.trade-tile .ph span { font-size: 4rem; }
.trade-tile-cap { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.trade-tile-cap b { font-family: var(--serif); font-size: 1.05rem; }
.trade-tile-cap span { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trade-arrow { font-size: 2rem; color: var(--terracotta); padding-top: 24px; }
.trade-more, .trade-none { width: 220px; aspect-ratio: 4 / 3; display: grid; place-items: center; border: 1px dashed var(--border); border-radius: 14px; }
.trade-more { font-weight: 600; color: var(--muted); }
@media (max-width: 760px) {
  .trade-sides { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 8px; }
  .trade-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .trade-tile, .trade-more, .trade-none { width: auto; }
  .trade-arrow { font-size: 1.5rem; padding-top: 70px; }
  .trade-tile-cap { padding: 8px 10px 10px; }
  .trade-tile .ph span { font-size: 3rem; }
  .trade-head .status { margin-left: 0; }
}

/* ---------- My Trades: fold a card down to a thin bar ---------- */
.trade-card { position: relative; }
.trade-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.trade-link:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.trade-toggle { position: relative; z-index: 2; width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 1rem; line-height: 1; transition: transform .15s, background .15s; }
.trade-toggle:hover { background: var(--surface-2); }
.trade-card.closed .trade-toggle { transform: rotate(-90deg); }
.trade-head .status { margin-left: auto; }
.trade-mini { display: none; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: .92rem; }
.trade-card.closed { padding-top: 12px; padding-bottom: 12px; }
.trade-card.closed .trade-head { margin-bottom: 8px; }
.trade-card.closed .trade-sides { display: none; }
.trade-card.closed .trade-mini { display: flex; }
.trade-card + .trade-card.closed, .trade-card.closed + .trade-card { margin-top: 10px; }
.mini-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mini-seed { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.mini-seed img, .mini-emoji { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; flex: none; background: var(--surface-2);
  display: inline-grid; place-items: center; font-size: 1.1rem; }
.trade-mini-arrow { color: var(--terracotta); font-size: 1.1rem; }
.trades-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.trades-bar .tabs { margin-bottom: 0; flex: 1; }
.trade-fold-all button { display: inline-flex; align-items: center; gap: 6px; }
.trade-fold-all button[aria-pressed="true"] { background: var(--green-soft); color: var(--green-dark); font-weight: 600; }
@media (max-width: 760px) {
  .trade-fold-all span { display: none; }
  .trade-card.closed .trade-meta { display: none; }
  .trade-toggle { width: 40px; height: 40px; }
}

/* ---------- My Trades v3: seeds as the headline, "what's next" chip, status stripe ---------- */
.trade-card { border-left: 5px solid var(--stripe, var(--border)); }
.trade-card.st-pending { --stripe: #d9a13b; }
.trade-card.st-accepted { --stripe: var(--leaf); }
.trade-card.st-shipping { --stripe: #4a86c5; }
.trade-card.st-done { --stripe: #8a9a83; }
.trade-card.st-off { --stripe: var(--border); opacity: .8; }
.trade-top { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.trade-title { flex: 1 1 320px; margin: 0; font: 600 1.08rem/1.35 var(--sans); min-width: 0; }
.tt-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); vertical-align: 2px; }
.tt-x { color: var(--terracotta); font-weight: 700; margin: 0 4px; }
.tt-more { font-size: .85rem; color: var(--muted); font-weight: 600; }
.tt-none { color: var(--muted); font-weight: 400; font-style: italic; }
.trade-next { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.trade-next.you { color: #fff; background: var(--terracotta); padding: 4px 12px; border-radius: 999px; font-weight: 600; }
.trade-top .status { margin-left: 0; }
.trade-sub { display: flex; align-items: center; gap: 4px 6px; flex-wrap: wrap; margin-top: 6px; font-size: .88rem; }
.trade-sub .avatar { width: 22px; height: 22px; font-size: .7rem; margin-right: 2px; }
.trade-who { font-weight: 700; }
.trade-card .trade-sides { margin-top: 14px; }
.trade-card.closed .trade-sub { margin-top: 4px; }
@media (max-width: 760px) {
  .trade-title { flex-basis: 100%; font-size: 1rem; }
  .trade-top { gap: 6px 8px; }
  .trade-top .trade-toggle { margin-left: auto; }
  .trade-next { white-space: normal; }
  .trade-sub { font-size: .82rem; }
}
.trade-toggle { display: inline-grid; place-items: center; padding: 0; }
.trade-toggle svg { display: block; }
@media (max-width: 760px) {
  .trade-card { padding-right: 56px; }
  .trade-top .trade-toggle { position: absolute; top: 12px; right: 10px; margin: 0; }
}

/* ---------- My Trades: YOU SEND → YOU GET columns (variety first, plant underneath) ---------- */
.trade-cols { flex: 1 1 460px; display: grid; grid-template-columns: minmax(0, 250px) auto minmax(0, 250px); align-items: end; gap: 0 14px; min-width: 0; }
.tc { min-width: 0; }
.tc-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 3px; }
.tc-seed { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tc-emoji { font-size: 1.6rem; line-height: 1; flex: none; }
.tc-names { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.tc-names b { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-plant { font-size: .82rem; color: var(--muted); }
.tc-more { flex: none; font-size: .75rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 8px; border-radius: 999px; }
.tc-none { color: var(--muted); font-style: italic; min-height: 36px; }
.tc-arrow { color: var(--terracotta); font-size: 1.4rem; font-weight: 700; padding-bottom: 6px; }
.trade-sub { margin-top: 10px; }
@media (max-width: 760px) {
  .trade-cols { flex-basis: 100%; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0 8px; }
  .tc-emoji { font-size: 1.3rem; }
  .tc-names b { font-size: .98rem; white-space: normal; }
  .tc-seed { flex-wrap: wrap; gap: 4px 7px; }
}
/* fixed column widths so YOU SEND / YOU GET line up on every card */
.trade-cols { flex: 0 1 auto; grid-template-columns: 230px 30px 230px; }
.trade-top .trade-next { margin-left: auto; }
@media (max-width: 1000px) and (min-width: 761px) { .trade-cols { grid-template-columns: 190px 26px 190px; } }
@media (max-width: 760px) { .trade-cols { flex: 1 1 100%; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); } .trade-top .trade-next { margin-left: 0; } }
@media (max-width: 760px) {
  .trade-cols { align-items: start; }
  .tc-seed { flex-wrap: nowrap; align-items: flex-start; }
  .tc-emoji { margin-top: 2px; }
  .tc-arrow { padding: 22px 0 0; }
  .tc-names b { overflow-wrap: anywhere; }
  .tc-more { display: none; }
}
@media (max-width: 760px) { .tc-names b { overflow-wrap: break-word; hyphens: manual; } }

/* ---------- My Trades: who (left) · what (middle) · what's next (right), one row ---------- */
.trade-top { flex-wrap: nowrap; align-items: center; gap: 16px; }
.trade-person { flex: 0 0 210px; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-right: 14px; border-right: 1px solid var(--border); }
.tp-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tp-name .avatar { width: 26px; height: 26px; font-size: .75rem; }
.tp-name b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-rating { font-size: .85rem; }
.tp-meta { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trade-top .trade-next { white-space: normal; text-align: right; max-width: 220px; }
@media (max-width: 1000px) and (min-width: 761px) {
  .trade-top { flex-wrap: wrap; }
  .trade-person { flex-basis: 100%; border-right: 0; padding-right: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
}
@media (max-width: 760px) {
  .trade-top { flex-wrap: wrap; gap: 10px; }
  .trade-person { flex-basis: 100%; border-right: 0; padding: 0 0 8px; border-bottom: 1px solid var(--border);
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
  .tp-meta { white-space: normal; }
  .trade-top .trade-next { text-align: left; max-width: none; }
}
.trade-person { flex-basis: 230px; }
.tp-meta { white-space: normal; overflow: visible; line-height: 1.35; }

/* trade card: a proper avatar beside the person's three lines */
.trade-person { flex: 0 0 260px; flex-direction: row; align-items: center; gap: 12px; }
.trade-person > .avatar { width: 48px; height: 48px; font-size: 1.15rem; flex: none; }
.tp-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tp-text .trade-who { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1000px) {
  .trade-person { flex-basis: 100%; flex-wrap: nowrap; align-items: center; }
  .tp-text { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .tp-text .tp-meta { flex-basis: 100%; }
}
@media (max-width: 760px) {
  .trade-person > .avatar { width: 42px; height: 42px; font-size: 1.05rem; }
}
@media (min-width: 1001px) {
  .trade-person { flex-basis: 290px; }
  .trade-cols { grid-template-columns: 210px 28px 210px; }
}

/* ---------- Messages: same person block as My Trades ---------- */
.convo.convo-v2 { display: grid; grid-template-columns: 48px 240px minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding: 14px 18px; }
.convo-v2 > .avatar { width: 48px; height: 48px; font-size: 1.15rem; }
.convo-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.convo-who .trade-who { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo-who .tp-rating { font-size: .85rem; }
.convo-who .tp-meta { font-size: .8rem; }
.convo-v2 .convo-last { min-width: 0; padding-left: 16px; border-left: 1px solid var(--border); color: var(--text); font-size: .93rem;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 760px) {
  .convo.convo-v2 { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 12px 14px; gap: 6px 12px; }
  .convo-v2 > .avatar { width: 42px; height: 42px; font-size: 1.05rem; }
  .convo-v2 .convo-last { grid-column: 1 / -1; grid-row: 2; padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .convo-v2 .status { grid-column: 3; grid-row: 1; align-self: start; }
}
@media (max-width: 760px) {
  .convo-who { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
  .convo-who .tp-meta { flex-basis: 100%; }
  .convo-v2 .status { font-size: .68rem; padding: 2px 8px; }
}
@media (max-width: 760px) {
  .convo-who { grid-column: 2 / -1; }
  .convo-v2 .convo-last { grid-column: 1 / 3; grid-row: 2; }
  .convo-v2 .status { grid-column: 3; grid-row: 2; align-self: end; margin-bottom: 1px; }
}


/* ---------- Trades = inbox: latest message on each card, unread markers ---------- */
.trade-last { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); font-size: .92rem; color: var(--text);
  display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.trade-last > b, .trade-last { overflow: hidden; }
.trade-last { white-space: nowrap; text-overflow: ellipsis; }
.lm-note { font-style: italic; }
.unread-dot { display: inline-block; width: 9px; height: 9px; margin-left: 7px; border-radius: 50%; background: var(--terracotta); vertical-align: 2px; }
.unread-count { margin-left: auto; flex: none; font-size: .75rem; font-weight: 700; color: #fff; background: var(--terracotta); padding: 1px 9px; border-radius: 999px; }
.trade-card.unread { box-shadow: 0 0 0 1px var(--terracotta) inset; }
.trade-card.unread .trade-last { font-weight: 600; }
.trade-card.closed .trade-last { margin-top: 8px; padding-top: 7px; }
@media (max-width: 760px) { .trade-last { font-size: .86rem; } }
.lm-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ---------- Find Trades: shared header with By gardener / By seed ---------- */
.find-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.find-head h1 { margin: 0; }
.find-head p { margin: 4px 0 0; }
.find-toggle { display: inline-flex; padding: 4px; gap: 2px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.find-toggle a { padding: 8px 16px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.find-toggle a:hover { color: var(--text); }
.find-toggle a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.shop-page .find-head + .shop-title-row { margin-top: -6px; gap: 16px; }

/* ---------- Trades: suggested matches strip ---------- */
.suggest { margin: 0 0 18px; padding: 14px 16px; border: 1px dashed var(--border); border-radius: 14px; background: var(--surface-2); }
.suggest-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.suggest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.suggest-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.suggest-card .btn { align-self: flex-start; margin-top: 4px; }
.suggest-who { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.suggest-who > span { display: flex; flex-direction: column; min-width: 0; }
.suggest-who .avatar { width: 38px; height: 38px; }
.suggest-line { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-line .tc-label { margin-right: 4px; }
@media (max-width: 760px) {
  .find-toggle { width: 100%; }
  .find-toggle a { flex: 1; text-align: center; padding: 8px 6px; }
  .suggest-grid { grid-template-columns: minmax(0, 1fr); }
}


/* ---------- for trade / for sale ---------- */
.avail-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.avail { font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.avail.trade { background: var(--green-soft); color: var(--green-dark); }
.avail.sale { background: var(--leaf); color: #fff; }
.card-avail { margin: 8px 0 4px; }
.mode-toggle { display: inline-flex; padding: 4px; gap: 2px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.mode-toggle button { border: 0; background: none; padding: 8px 16px; border-radius: 9px; font: 600 .92rem var(--sans); color: var(--muted); cursor: pointer; }
.mode-toggle button:hover { color: var(--text); }
.mode-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.avail-field { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.avail-field legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.avail-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.avail-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.avail-opt:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.avail-opt input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); flex: none; }
.avail-opt span { display: flex; flex-direction: column; gap: 2px; }
.avail-opt small { color: var(--muted); font-size: .82rem; }
.sale-fields { margin-top: 12px; }
.money-input { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.money-input span { padding: 0 4px 0 12px; color: var(--muted); font-weight: 600; }
.money-input input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 0; padding-left: 4px; }
.money-input:focus-within { outline: 3px solid color-mix(in srgb, var(--green) 40%, transparent); }
.price-box { font-size: 1.05rem; margin: 4px 0 8px; }
.price-box b { font-size: 1.6rem; font-family: var(--serif); margin-right: 4px; }
.sale-note { margin: 10px 0 0; }
.match-note.sale { color: var(--green-dark); }
@media (max-width: 760px) {
  .avail-opts { grid-template-columns: 1fr; }
  .mode-toggle { display: flex; width: 100%; }
  .mode-toggle button { flex: 1; padding: 8px 4px; font-size: .85rem; }
}

/* ---------- My Seeds: list view ---------- */
.seed-tools { display: flex; align-items: center; gap: 10px; }
.seed-list { padding: 4px 0; }
.seed-row { display: grid; grid-template-columns: 52px minmax(0, 1.4fr) minmax(0, 1.1fr) auto auto minmax(0, .9fr); align-items: center; gap: 6px 16px;
  padding: 10px 16px; color: var(--text); text-decoration: none; }
.seed-row + .seed-row { border-top: 1px solid var(--border); }
.seed-row:hover { background: var(--surface-2); }
.seed-thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-size: 1.6rem; }
.seed-thumb img { width: 100%; height: 100%; object-fit: cover; }
.seed-names { display: flex; flex-direction: column; min-width: 0; }
.seed-names b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seed-names .muted { font-size: .84rem; }
.seed-meta { font-size: .88rem; }
.seed-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.seed-wanted { font-size: .85rem; color: var(--terracotta); font-weight: 600; text-align: right; }
@media (max-width: 760px) {
  .seed-row { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 12px; }
  .seed-thumb { width: 46px; height: 46px; grid-row: span 2; }
  .seed-meta { grid-column: 2; font-size: .8rem; }
  .seed-tags, .seed-wanted { display: none; }
  .seed-avail { grid-column: 3; grid-row: 1; }
  .seed-tools .view-toggle span { display: none; }
}


/* ---------- My Garden → Overview dashboard ---------- */
.dash-hello { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.dash-hello h1 { margin: 0; }
.dash-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.dash-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .1s; }
.dash-stat:hover { border-color: var(--green); transform: translateY(-1px); }
.dash-icon { font-size: 1.25rem; line-height: 1; color: var(--green-dark); }
.dash-icon .ico { width: 1.2rem; height: 1.2rem; }
.dash-stat b { font: 700 1.7rem/1.1 var(--serif); margin-top: 6px; }
.dash-stat > span:not(.dash-icon):not(.dash-note) { font-size: .85rem; color: var(--muted); }
.dash-note { font-size: .76rem; font-weight: 700; color: var(--terracotta); }
.dash-section { margin-bottom: 22px; min-width: 0; }
.dash-section .section-head { margin-top: 0; }
.dash-list { padding: 4px 0; }
.dash-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text); text-decoration: none; }
.dash-row + .dash-row { border-top: 1px solid var(--border); }
.dash-row:hover { background: var(--surface-2); }
.dash-row .avatar { width: 40px; height: 40px; }
.dash-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-row-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-row .unread-count { margin-left: 0; }
.dash-empty { padding: 18px 20px; color: var(--muted); }
.dash-two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; }
.dash-two .seed-row { grid-template-columns: 46px minmax(0, 1fr) auto; }
.dash-two .seed-row .seed-thumb { width: 46px; height: 46px; grid-row: span 2; }
.dash-two .seed-row .seed-meta { grid-column: 2; font-size: .8rem; }
.dash-two .seed-row .seed-tags, .dash-two .seed-row .seed-wanted { display: none; }
.dash-two .seed-row .seed-avail { grid-column: 3; grid-row: 1; }
.dash-more { display: inline-block; margin-top: 8px; font-size: .9rem; }
.dash-wants { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 16px; }
.dash-wants .btn { margin-top: 6px; }
#suggestBox .suggest { margin-bottom: 22px; }
@media (max-width: 1000px) { .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dash-stat { padding: 12px; }
  .dash-stat b { font-size: 1.4rem; }
  .dash-row { flex-wrap: wrap; padding: 10px 12px; }
  .dash-row .trade-next { margin-left: 52px; }
}
@media (max-width: 760px) {
  .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 18px; }
  .dash-stat { padding: 9px 10px; border-radius: 12px; }
  .dash-icon { font-size: 1rem; }
  .dash-stat b { font-size: 1.25rem; margin-top: 3px; }
  .dash-stat > span:not(.dash-icon):not(.dash-note) { font-size: .72rem; line-height: 1.2; }
  .dash-note { font-size: .68rem; }
  .dash-hello h1 { font-size: 1.6rem; }
}
@media (max-width: 760px) {
  .dash-row-main { flex: 1 1 calc(100% - 56px); }
  .dash-row .trade-next, .dash-row .unread-count { margin-left: 52px; }
  .dash-row .trade-next + .unread-count { margin-left: 0; }
}

/* top search: All / For trade / For sale dropdown on the left of the box */
.header-search select { flex: none; width: auto; max-width: 128px; border-radius: 999px 0 0 999px; border-right: 0; padding: 9px 30px 9px 16px;
  background-color: var(--surface-2); font: 600 .88rem var(--sans); color: var(--text); cursor: pointer; }
.header-search select + input { border-radius: 0; border-left: 1px solid var(--border); }
@media (max-width: 760px) { .header-search select { max-width: 96px; padding: 9px 22px 9px 12px; font-size: .8rem; } }

/* Explore list rows: ships-from sits with price / demand */
.shop-ships { font-size: .82rem; color: var(--muted); margin: 2px 0 8px; }
.shop-ships b { color: var(--text); font-weight: 600; }

/* offered both ways: one two-part pill */
.avail.both { display: inline-flex; padding: 0; overflow: hidden; border: 1px solid var(--leaf); }
.avail.both > span { padding: 2px 9px; }
.avail.both > span:first-child { background: var(--green-soft); color: var(--green-dark); }
.avail.both > span:last-child { background: var(--leaf); color: #fff; }
.shop-or { font-size: .8rem; font-weight: 600; color: var(--green-dark); margin-top: -2px; }


/* ---------- profile photos ---------- */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-edit { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.avatar-edit > .avatar { width: 88px; height: 88px; font-size: 2.2rem; flex: none; }
.avatar-edit p { margin: 4px 0 10px; }
@media (max-width: 520px) { .avatar-edit { align-items: flex-start; } .avatar-edit > .avatar { width: 64px; height: 64px; font-size: 1.6rem; } }
@media (max-width: 760px) { .seed-tools { flex-wrap: wrap; justify-content: flex-end; } }

/* My Seeds list: same photo size as Explore's list rows (uses the shared --thumb size) */
.seed-row { grid-template-columns: var(--thumb) minmax(0, 1.4fr) minmax(0, 1.1fr) auto auto minmax(0, .9fr); gap: 6px 18px; padding: 14px 16px; }
.seed-thumb { width: var(--thumb); height: var(--thumb); border-radius: 8px; font-size: 3.6rem; box-shadow: 0 1px 5px rgba(0, 0, 0, .25); }
.seed-names b { font-size: 1.08rem; }
@media (max-width: 1050px) {
  .seed-row { --thumb: 140px; grid-template-columns: var(--thumb) minmax(0, 1fr); align-items: start; gap: 6px 16px; }
  .seed-row .seed-thumb { grid-row: span 5; font-size: 3.2rem; }
  .seed-row > :not(.seed-thumb) { grid-column: 2; grid-row: auto; }
  .seed-row .seed-tags, .seed-row .seed-wanted { display: flex; text-align: left; }
  .seed-row .seed-meta { font-size: .88rem; }
}
@media (max-width: 480px) {
  .seed-row { --thumb: clamp(96px, calc(100vw - 266px), 128px); padding: 12px; }
  .seed-row .seed-thumb { font-size: 2.8rem; }
}

/* the two-part trade/buy badge may wrap on narrow screens instead of overflowing */
.seed-avail, .avail-badges { min-width: 0; max-width: 100%; }
.avail.both { max-width: 100%; flex-wrap: wrap; }
.avail.both > span { white-space: normal; }

/* Want List: the add-a-want box spans the page, fields side by side */
.garden.single .want-form { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 0 14px; align-items: end; }
.garden.single .want-form .field { margin-bottom: 0; }
.garden.single .want-form > .error, .garden.single .want-form > p { grid-column: 1 / -1; }
.garden.single .want-form > .btn { height: 44px; white-space: nowrap; }
@media (max-width: 900px) {
  .garden.single .want-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; }
  .garden.single .want-form > .btn { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .garden.single .want-form { grid-template-columns: minmax(0, 1fr); } }

/* ---------- My Seeds rows: fixed columns so quantity/year, tags, trade/buy and demand line up ---------- */
.seed-row { grid-template-columns: var(--thumb) minmax(0, 1fr) 170px 150px 240px 180px; }
.seed-row .seed-avail { display: flex; }
.seed-row .seed-wanted { justify-content: flex-end; }
/* Compact: thin one-line bars, no photo */
.seed-row.compact { grid-template-columns: minmax(0, 1fr) 170px 150px 240px 180px; padding: 9px 16px; align-items: center; }
.seed-row.compact .seed-names { flex-direction: row; align-items: baseline; gap: 8px; }
.seed-row.compact .seed-names b { font-size: 1rem; }
.seed-row.compact .seed-names .muted { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1050px) {
  .seed-row.compact { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .seed-row.compact > :not(.seed-thumb) { grid-column: auto; }
  .seed-row.compact .seed-names { grid-column: 1; flex-direction: column; gap: 0; }
  .seed-row.compact .seed-avail { grid-column: 2; grid-row: 1; justify-content: flex-end; }
  .seed-row.compact .seed-meta { grid-column: 1; font-size: .8rem; }
  .seed-row.compact .seed-tags { display: none; }
  .seed-row.compact .seed-wanted { grid-column: 2; grid-row: 2; font-size: .78rem; }
}
@media (max-width: 760px) { .seed-tools .view-toggle span { display: none; } }
@media (max-width: 760px) {
  .seed-row.compact { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 10px 14px; }
  .seed-row.compact > * { grid-column: 1 !important; grid-row: auto !important; }
  .seed-row.compact .seed-avail { justify-content: flex-start; margin-top: 3px; }
  .seed-row.compact .seed-wanted { justify-content: flex-start; text-align: left; }
}

/* My Seeds: single heading row */
.seeds-head h1 .count { font-size: .9rem; vertical-align: middle; }
.seeds-head { align-items: flex-end; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 14px; }
.seeds-head > div:first-child { flex: 1 1 380px; min-width: 0; }
.seeds-head .seed-tools { margin-left: auto; }

/* ---------- My Seeds: fold each row (chevron) like Trades ---------- */
.seed-row { position: relative; grid-template-columns: var(--thumb) minmax(0, 1fr) 170px 150px 240px 170px 36px; }
.seed-link { position: absolute; inset: 0; z-index: 1; }
.seed-link:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.seed-toggle { position: relative; z-index: 2; justify-self: end; }
.seed-row.compact .seed-thumb { display: none; }
.seed-row.compact { grid-template-columns: minmax(0, 1fr) 170px 150px 240px 170px 36px; }
.seed-row.compact .seed-toggle { transform: rotate(-90deg); }
@media (max-width: 1050px) {
  .seed-row:not(.compact) { grid-template-columns: var(--thumb) minmax(0, 1fr); padding-right: 52px; }
  .seed-row .seed-toggle { position: absolute; top: 12px; right: 10px; grid-column: auto !important; }
  .seed-row.compact { grid-template-columns: minmax(0, 1fr) auto; padding-right: 52px; }
}
@media (max-width: 760px) { .seed-row.compact { grid-template-columns: minmax(0, 1fr); } }


/* ---------- My Seeds v3: click a row to open it; open rows show everything ---------- */
.seed-row { display: block !important; padding: 0 !important; position: relative; }
.seed-row:hover { background: none; }
.seed-bar { display: grid; grid-template-columns: minmax(0, 1fr) 170px 150px 240px 170px 28px; align-items: center; gap: 6px 18px;
  padding: 12px 16px; cursor: pointer; border-radius: 10px; }
.seed-bar:hover { background: var(--surface-2); }
.seed-bar:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.seed-bar .seed-names { flex-direction: row; align-items: baseline; gap: 8px; }
.seed-bar .seed-names .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .84rem; }
.seed-chevron { display: grid; place-items: center; color: var(--muted); transition: transform .15s; }
.seed-row.compact .seed-chevron { transform: rotate(-90deg); }
.seed-open { display: none; }
.seed-row.open { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.seed-row.open .seed-open { display: grid; grid-template-columns: var(--thumb) minmax(0, 1fr); gap: 18px; padding: 4px 16px 18px; }
.seed-photo { position: relative; width: var(--thumb); height: var(--thumb); border-radius: 10px; overflow: hidden; background: var(--surface-2);
  display: grid; place-items: center; box-shadow: 0 1px 5px rgba(0, 0, 0, .25); }
.seed-photo[data-zoom] { cursor: zoom-in; }
.seed-photo img { width: 100%; height: 100%; object-fit: cover; }
.seed-photo-emoji { font-size: 3.6rem; }
.seed-zoom { position: absolute; left: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); color: #1b1b1b; cursor: zoom-in; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.seed-photo-count { position: absolute; right: 8px; bottom: 8px; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, .6); color: #fff; }
.seed-info { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.seed-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 18px; margin: 0; }
.seed-facts dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.seed-facts dd { margin: 1px 0 0; font-size: .92rem; }
.seed-desc { margin: 0; white-space: pre-wrap; font-size: .93rem; }
.seed-wanters { font-size: .9rem; }
.seed-actions { margin: 2px 0 0; }
@media (max-width: 1050px) {
  .seed-bar { grid-template-columns: minmax(0, 1fr) auto 24px; gap: 2px 12px; }
  .seed-bar .seed-names { grid-column: 1; flex-direction: column; gap: 0; }
  .seed-bar .seed-avail { grid-column: 2; grid-row: 1; justify-content: flex-end; }
  .seed-bar .seed-chevron { grid-column: 3; grid-row: 1; }
  .seed-bar .seed-meta { grid-column: 1; font-size: .8rem; }
  .seed-bar .seed-wanted { grid-column: 2; grid-row: 2; font-size: .78rem; justify-content: flex-end; text-align: right; }
  .seed-bar .seed-tags { display: none; }
}
@media (max-width: 760px) {
  .seed-bar { grid-template-columns: minmax(0, 1fr) 24px; padding: 10px 12px; }
  .seed-bar > :not(.seed-chevron) { grid-column: 1 !important; grid-row: auto !important; justify-content: flex-start !important; text-align: left !important; }
  .seed-bar .seed-chevron { grid-column: 2; grid-row: 1; }
  .seed-row.open .seed-open { grid-template-columns: minmax(0, 1fr); padding: 0 12px 14px; }
  .seed-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; }
}
@media (max-width: 760px) { .seed-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; } }

/* Top bar: "+ Add seeds" is the main action (solid); Trades is an outline pill that lights up when something needs you. */
#nav > a.nav-pill.nav-trades { background: transparent; color: var(--green-dark); border: 1.5px solid var(--leaf); box-shadow: none; }
#nav > a.nav-pill.nav-trades:hover { background: var(--green-soft); color: var(--green-dark); }
#nav > a.nav-pill.nav-trades.has-alerts { background: var(--leaf); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
#nav > a.nav-pill.nav-trades.has-alerts:hover { background: var(--leaf-hover); }
.nav-trades .pill-count { background: var(--terracotta); color: #fff; }

/* ---------- Want List: slim one-line rows ---------- */
.want-lines { padding: 4px 0; margin-top: 16px; }
.want-line { display: grid; grid-template-columns: 34px minmax(0, 1.2fr) minmax(0, 1fr) 140px 210px 34px; align-items: center; gap: 4px 16px; padding: 10px 16px; }
.want-line + .want-line { border-top: 1px solid var(--border); }
.want-line:hover { background: var(--surface-2); }
.want-emoji { font-size: 1.5rem; line-height: 1; text-align: center; }
.want-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.want-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.want-name .muted { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.want-note { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.want-added { font-size: .82rem; }
.want-avail { font-size: .88rem; text-align: right; }
.want-found { display: inline-block; font-weight: 600; padding: 3px 11px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); text-decoration: none; }
.want-found:hover { background: var(--leaf); color: #fff; }
.want-line .want-x { justify-self: end; }
@media (max-width: 900px) {
  .want-line { grid-template-columns: 30px minmax(0, 1fr) auto 34px; gap: 2px 12px; }
  .want-name { grid-column: 2; flex-direction: column; gap: 0; }
  .want-note { grid-column: 2; grid-row: 2; font-size: .8rem; }
  .want-added { display: none; }
  .want-avail { grid-column: 3; grid-row: 1 / span 2; }
  .want-line .want-x { grid-column: 4; grid-row: 1 / span 2; }
  .want-emoji { grid-row: 1 / span 2; }
}
@media (max-width: 520px) {
  .want-line { grid-template-columns: 28px minmax(0, 1fr) 34px; }
  .want-avail { grid-column: 2; grid-row: 3; text-align: left; }
  .want-line .want-x { grid-column: 3; grid-row: 1 / span 3; }
  .want-emoji { grid-row: 1 / span 3; }
}
@media (max-width: 900px) { .want-note.muted { display: none; } }

/* ---------- Trade chat: full-width messages, told apart by colour + avatar (not left/right) ---------- */
.chat { gap: 8px; }
.chat .msg { max-width: none; align-self: stretch; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 0 12px;
  padding: 9px 14px; border-radius: 10px; border-left: 3px solid transparent; background: var(--surface-2); }
.chat .msg.mine { background: var(--green-soft); border-left-color: var(--leaf); }
.chat .msg.theirs, .chat .msg.addr-msg:not(.mine), .chat .msg.ship-msg:not(.mine) { border-left-color: var(--terracotta); }
.chat .msg > .avatar { width: 34px; height: 34px; font-size: .85rem; }
.chat .msg-main { min-width: 0; }
.chat .msg .meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; font-size: .78rem; color: var(--muted); }
.chat .msg .meta b { font-size: .92rem; color: var(--text); }
.chat .msg.mine .meta b { color: var(--green-dark); }
.chat .msg.cont { margin-top: -6px; border-top-left-radius: 0; border-top-right-radius: 0; padding-top: 2px; }
.chat .msg.cont > .avatar { visibility: hidden; height: 0; }
.chat .msg.system { display: block; align-self: center; background: none; border: 0; padding: 2px; }
.chat .msg.addr-msg, .chat .msg.ship-msg { display: block; min-width: 0; }
@media (max-width: 760px) {
  .chat .msg { grid-template-columns: 28px minmax(0, 1fr); gap: 0 10px; padding: 8px 10px; }
  .chat .msg > .avatar { width: 28px; height: 28px; font-size: .75rem; }
}
.chat .msg.cont { margin-top: -8px; }
.chat .msg:has(+ .msg.cont) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* ---------- Trade chat v3: bubbles (yours right in green, theirs left with avatar), like eBay / texting ---------- */
.chat { gap: 2px; }
.chat .msg { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; max-width: 80%; display: grid; gap: 0 8px; align-items: end; }
.chat .msg.theirs { align-self: flex-start; grid-template-columns: 30px minmax(0, auto); }
.chat .msg.mine { align-self: flex-end; grid-template-columns: minmax(0, auto); justify-items: end; }
.chat .msg:not(.cont) { margin-top: 10px; }
.chat .msg.cont { margin-top: 0; }
.chat .msg > .avatar, .chat .msg > .avatar-gap { width: 30px; height: 30px; font-size: .78rem; grid-row: 1; visibility: visible; }
.chat .bubble { grid-row: 1; padding: 8px 13px; border-radius: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.chat .msg.theirs .bubble { background: var(--surface-2); color: var(--text); border-bottom-left-radius: 6px; }
.chat .msg.mine .bubble { background: var(--leaf); color: #fff; border-bottom-right-radius: 6px; }
.chat .msg.theirs.cont .bubble { border-top-left-radius: 6px; }
.chat .msg.mine.cont .bubble { border-top-right-radius: 6px; }
.chat .msg-time { grid-row: 2; font-size: .72rem; color: var(--muted); margin: 2px 6px 0; }
.chat .msg.theirs .msg-time { grid-column: 2; }
.chat .msg-body { white-space: pre-wrap; }
/* status notes and the address / shipping cards */
.chat .msg.system { display: block; max-width: none; align-self: center; margin: 10px 0 4px; }
.chat .msg.addr-msg, .chat .msg.ship-msg { display: block; max-width: 80%; padding: 10px 14px; border-radius: 16px; margin-top: 10px;
  border: 1px solid var(--border); background: var(--surface-2); }
.chat .msg.addr-msg.mine, .chat .msg.ship-msg.mine { align-self: flex-end; background: var(--green-soft); border-color: var(--leaf); }
.chat .msg.addr-msg:not(.mine), .chat .msg.ship-msg:not(.mine) { align-self: flex-start; }
@media (max-width: 760px) {
  .chat .msg, .chat .msg.addr-msg, .chat .msg.ship-msg { max-width: 88%; }
  .chat .msg.theirs { grid-template-columns: 26px minmax(0, auto); }
  .chat .msg > .avatar, .chat .msg > .avatar-gap { width: 26px; height: 26px; font-size: .7rem; }
}
/* clear the previous full-width layout's backgrounds / stripes from the bubble rows */
.chat .msg.mine:not(.addr-msg):not(.ship-msg), .chat .msg.theirs { background: none; border-left: 0; padding: 0; border-radius: 0; }
.chat .msg.cont > .avatar-gap { visibility: hidden; }

/* ---------- Trade page: progress tracker ---------- */
.trade-progress { margin: 4px 0 18px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.tp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tp-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--muted); }
.tp-steps li::before { content: ""; position: absolute; top: 14px; right: 50%; width: 100%; height: 3px; background: var(--border); z-index: 0; }
.tp-steps li:first-child::before { display: none; }
.tp-steps li.done::before, .tp-steps li.current::before { background: var(--leaf); }
.tp-dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem;
  background: var(--surface-2); border: 2px solid var(--border); color: var(--muted); }
.tp-steps li.done .tp-dot { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.tp-steps li.current .tp-dot { background: var(--surface); border-color: var(--leaf); color: var(--green-dark); box-shadow: 0 0 0 4px var(--green-soft); }
.tp-label { font-size: .8rem; font-weight: 600; line-height: 1.2; }
.tp-steps li.done .tp-label { color: var(--text); }
.tp-steps li.current .tp-label { color: var(--green-dark); }
.tp-next { margin-top: 14px; padding: 9px 14px; border-radius: 10px; background: var(--surface-2); font-size: .93rem; }
.tp-next.you { background: color-mix(in srgb, var(--terracotta) 14%, transparent); border-left: 4px solid var(--terracotta); }
.tp-next.you b { color: var(--terracotta); }
.trade-progress.off { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; background: var(--surface-2); color: var(--muted); }
.trade-progress.off b { color: var(--text); }
@media (max-width: 760px) {
  .trade-progress { padding: 12px 10px; }
  .tp-dot { width: 24px; height: 24px; font-size: .72rem; }
  .tp-steps li::before { top: 11px; }
  .tp-label { font-size: .66rem; }
  .tp-next { font-size: .86rem; }
}


/* ======================= Theme: Ember (dark charcoal + copper, from the dashboard example) ======================= */
:root[data-theme="dark"][data-palette="ember"] {
  --bg: #121214;
  --surface: #1c1d21;
  --surface-2: #25262b;
  --border: #2e2f35;
  --text: #ebe7e1;
  --muted: #8f8c87;
  --green: #e07a35;
  --green-dark: #f2a56c;
  --green-soft: #3a2416;
  --terracotta: #e5484d;
  --terracotta-soft: #3b1c1e;
  --gold: #f0a83a;
  --gold-soft: #3a2c17;
  --danger: #ff6b6b;
  --on-accent: #1b120b;
  --link: #f2a56c;
  --buy: #e07a35;
  --buy-hover: #ec8c4a;
  --leaf: #d9732f;
  --leaf-hover: #e88a4a;
  --leaf-text: #fff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
  --glow: radial-gradient(ellipse 70% 45% at 50% -5%, rgba(224, 122, 53, .16), transparent 70%);
}
body { background-image: var(--glow); background-repeat: no-repeat; background-attachment: fixed; }
:root[data-palette="ember"] .status.accepted, :root[data-palette="ember"] .ship-pill.done { color: #7fd38a; background: #1f3324; border-color: #2f6b3a; }

/* Settings → Appearance */
.theme-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 10px; }
.theme-choice { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--surface); }
.theme-choice:has(input:checked) { border-color: var(--leaf); }
.theme-choice input { position: absolute; opacity: 0; pointer-events: none; }
.theme-choice:has(input:focus-visible) { outline: 3px solid var(--leaf); outline-offset: 2px; }
.theme-swatch { display: flex; height: 44px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(128, 128, 128, .3); }
.theme-swatch span { flex: 1; }
.theme-choice b { font-size: .92rem; }


/* ---------- Ember, round 2: no muddy browns ---------- */
:root[data-theme="dark"][data-palette="ember"] {
  --green: #d46a28;           /* buttons: richer copper, white text */
  --green-dark: #f2a56c;      /* copper text and links on charcoal */
  --on-accent: #fff;
  --av1: #d46a28; --av2: #c9434a; --av3: #c9902e; --av4: #4f6f96; --av5: #8a5a9e; --av6: #2f8a85;
}
:root[data-palette="ember"] .btn:not(.secondary):not(.danger):not(.warn):hover { background: #e47e3c; color: #fff; }
/* selected tabs / links: lighter charcoal + copper text and underline, instead of a brown block */
:root[data-palette="ember"] #gardenNav a[aria-current="page"],
:root[data-palette="ember"] .catbar a[aria-current="page"],
:root[data-palette="ember"] .bottombar a[aria-current="page"] {
  background: #2b2c32; color: #f2a56c; box-shadow: inset 0 -2px 0 #d46a28;
}
:root[data-palette="ember"] .find-toggle a.on, :root[data-palette="ember"] .mode-toggle button[aria-pressed="true"],
:root[data-palette="ember"] .view-toggle button[aria-pressed="true"] { background: #2b2c32; color: #f2a56c; }


/* ---------- Orders ---------- */
.order-what { flex: 1 1 260px; min-width: 0; }
.order-total { flex: 0 0 130px; display: flex; flex-direction: column; gap: 1px; }
.order-total b { font: 700 1.25rem var(--serif); }
.order-paid { font-size: .76rem; font-weight: 700; color: var(--muted); }
.order-paid.yes { color: var(--green-dark); }
.order-pays { margin-top: 6px; display: flex; align-items: baseline; gap: 10px; }
.order-pays b { font: 700 1.4rem var(--serif); }
.order-title-total { font-family: var(--sans); font-size: 1rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); vertical-align: middle; }
.order-progress .tp-steps { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.buy-list { display: flex; flex-direction: column; gap: 6px; }
.buy-total { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.buy-total b { font: 700 1.5rem var(--serif); }
@media (max-width: 1000px) { .order-total { flex-basis: auto; } }
@media (max-width: 760px) { .order-progress .tp-label { font-size: .6rem; } }


/* Home banner per theme ("Starting a garden?…") */
:root[data-theme="dark"] {
  --hero-bg: #252b20;
  --hero-border: #343a2c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hero-bg: #252b20;
    --hero-border: #343a2c;
  }
}
:root[data-theme="dark"][data-palette="ember"] {
  --hero-bg: #1c1d21;
  --hero-border: #2e2f35;
}
