:root {
  --bg: #f6f1e7;
  --surface: #fffdf8;
  --ink: #173529;
  --muted: #68766f;
  --green: #18392b;
  --green-2: #2e654d;
  --gold: #b99045;
  --line: #ded7c8;
  --shadow: 0 12px 32px rgba(24,57,43,.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin:0; color:var(--ink); background:linear-gradient(180deg,#f0ebdf 0,var(--bg) 240px); }
button,input,textarea { font:inherit; }
button { cursor:pointer; }
.topbar { position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px max(18px,calc((100vw - 1100px)/2)); background:rgba(246,241,231,.92); backdrop-filter:blur(12px); border-bottom:1px solid rgba(222,215,200,.7); }
.topbar h1 { font-size:1.1rem; margin:2px 0 0; }
.eyebrow { text-transform:uppercase; letter-spacing:.12em; font-size:.72rem; font-weight:800; color:var(--gold); margin:0 0 5px; }
main { max-width:1100px; margin:auto; padding:22px 18px 80px; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:22px; box-shadow:var(--shadow); }
.hero { padding:28px; display:grid; grid-template-columns:1fr auto; gap:28px; align-items:center; }
.hero h2 { font-size:clamp(1.7rem,4vw,2.8rem); line-height:1.03; margin:10px 0; max-width:640px; }
.hero p { color:var(--muted); max-width:650px; margin:0; }
.hero-actions { display:flex; flex-direction:column; gap:10px; min-width:180px; }
.primary,.secondary,.ghost { border-radius:12px; padding:11px 15px; font-weight:800; border:1px solid transparent; }
.primary { background:var(--green); color:white; }
.primary:hover { background:var(--green-2); }
.secondary { color:var(--green); background:#edf2ed; border-color:#d9e3db; }
.ghost { background:transparent; border-color:var(--line); color:var(--green); }
.pill,.count { display:inline-flex; align-items:center; padding:5px 9px; border-radius:999px; font-size:.75rem; font-weight:800; background:#e8efe8; color:var(--green); }
.tabs { display:flex; gap:8px; overflow:auto; padding:22px 0 12px; position:sticky; top:73px; z-index:10; background:linear-gradient(var(--bg) 70%, transparent); }
.tab { flex:0 0 auto; border:1px solid var(--line); background:var(--surface); color:var(--ink); padding:10px 15px; border-radius:999px; font-weight:800; }
.tab.active { background:var(--green); color:white; border-color:var(--green); }
.panel { display:none; }
.panel.active { display:block; }
.section-head { display:flex; align-items:end; justify-content:space-between; gap:18px; margin:20px 2px 14px; }
.section-head h2 { margin:0; font-size:1.65rem; }
.searchbox { display:block; margin-bottom:14px; }
.searchbox span { display:block; font-size:.75rem; font-weight:800; margin:0 0 6px 4px; color:var(--muted); }
.searchbox input,.chat-form textarea { width:100%; border:1px solid var(--line); border-radius:14px; padding:13px 14px; background:white; color:var(--ink); outline:none; }
.searchbox input:focus,.chat-form textarea:focus { border-color:var(--green-2); box-shadow:0 0 0 3px rgba(46,101,77,.1); }
.chips { display:flex; gap:8px; overflow:auto; padding:0 0 12px; }
.chip { border:1px solid var(--line); background:#fff; border-radius:999px; padding:7px 11px; white-space:nowrap; color:var(--muted); }
.chip.active { background:#e3ece5; color:var(--green); border-color:#bdd0c2; }
.grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.item-card { padding:18px; background:var(--surface); border:1px solid var(--line); border-radius:18px; min-height:150px; display:flex; flex-direction:column; gap:8px; transition:.18s ease; }
.item-card:hover { transform:translateY(-2px); box-shadow:var(--shadow); }
.item-card h3 { margin:0; font-size:1rem; line-height:1.25; }
.item-card p { margin:0; color:var(--muted); line-height:1.45; font-size:.9rem; }
.item-card .meta { margin-top:auto; display:flex; gap:6px; flex-wrap:wrap; }
.tag { font-size:.7rem; font-weight:700; color:var(--green-2); background:#eff5f0; padding:4px 7px; border-radius:999px; }
.assistant { padding:18px; }
.quick-prompts { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.quick-prompts button { border:1px solid var(--line); background:#fff; border-radius:12px; padding:8px 10px; color:var(--green); }
.chat-log { min-height:240px; max-height:52vh; overflow:auto; padding:10px 0; display:flex; flex-direction:column; gap:10px; }
.msg { max-width:88%; padding:12px 14px; border-radius:16px; line-height:1.5; white-space:pre-wrap; }
.msg.user { align-self:flex-end; background:var(--green); color:white; border-bottom-right-radius:5px; }
.msg.bot { align-self:flex-start; background:#f0eee7; border-bottom-left-radius:5px; }
[hidden] { display:none !important; }
.auth-box { margin:16px 0; padding:18px 22px; }
.auth-box .fineprint:empty { display:none; }
.auth-form label { display:block; font-size:.85rem; font-weight:700; margin:0 0 8px; }
.auth-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.auth-row input { flex:1 1 220px; border:1px solid var(--line); border-radius:12px; padding:11px 13px; background:white; color:var(--ink); }
.auth-row .fineprint { margin:0; }
.msg-actions { display:flex; gap:6px; margin-top:6px; }
.msg-actions button { border:1px solid var(--line); background:#fff; border-radius:999px; padding:3px 9px; font-size:.85rem; }
.msg-actions button[disabled] { opacity:.5; cursor:default; }
.chat-form { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:end; }
.fineprint { font-size:.76rem; color:var(--muted); line-height:1.4; margin:12px 0 0; }
.prose { padding:24px; line-height:1.6; }
.prose h2 { margin-top:0; }
.notice { margin-top:20px; background:#edf3ed; border-left:4px solid var(--green-2); padding:14px; border-radius:10px; }
.notice p { margin-bottom:0; }
dialog { width:min(720px,94vw); max-height:88vh; border:0; border-radius:22px; padding:0; color:var(--ink); background:var(--surface); box-shadow:0 30px 80px rgba(0,0,0,.25); }
dialog::backdrop { background:rgba(8,24,17,.52); backdrop-filter:blur(4px); }
.dialog-close { position:sticky; float:right; top:12px; right:12px; z-index:2; border:0; background:#edf1ed; width:38px; height:38px; border-radius:999px; font-size:1.45rem; }
#detailContent { padding:28px; }
#detailContent h2 { margin:5px 0 8px; }
.detail-list { padding-left:18px; }
.detail-section { margin-top:20px; }
.empty { grid-column:1/-1; text-align:center; padding:32px; color:var(--muted); }
@media (max-width:820px) { .grid{grid-template-columns:repeat(2,minmax(0,1fr));}.hero{grid-template-columns:1fr}.hero-actions{flex-direction:row}.tabs{top:69px} }
@media (max-width:560px) { .grid{grid-template-columns:1fr}.hero{padding:20px}.hero-actions{display:grid;grid-template-columns:1fr 1fr}.chat-form{grid-template-columns:1fr}.chat-form button{width:100%}.section-head{align-items:center}.topbar{padding-left:16px;padding-right:16px} }

.herb-media { margin:0 0 18px; border-radius:16px; overflow:hidden; background:#eee8dc; }
.herb-media img { display:block; width:100%; max-height:360px; object-fit:cover; object-position:center; }
.herb-media figcaption { padding:8px 12px; font-size:.72rem; color:var(--muted); background:#f4f0e8; }
.herb-placeholder { min-height:180px; margin:0 0 18px; border:1px dashed var(--line); border-radius:16px; display:grid; place-content:center; text-align:center; gap:6px; color:var(--muted); background:#f6f2e9; font-size:2rem; }
.herb-placeholder span { display:block; font-size:.82rem; font-weight:700; }
