:root {
  --olive-900: #262e17;
  --olive-800: #2f3a1c;
  --olive-700: #36421f;
  --olive-600: #4b5a32;
  --olive-500: #5f6f42;
  --sage: #7f8f5c;
  --moss: #a3ad80;
  --cream: #f6f0e3;
  --cream-2: #efe6d3;
  --beige: #e3d4b8;
  --sand: #d4c19f;
  --clay: #b5836f;
  --clay-dark: #93604d;
  --rose: #cf9f8f;
  --rose-soft: #f0dcd3;
  --ink: #2a2a1e;
  --muted: #6b6a58;
  --line: #ddd0b6;
  --danger: #a3473a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(38, 46, 23, 0.06), 0 6px 20px rgba(38, 46, 23, 0.06);
  --bg: var(--cream);
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--cream); line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
h1, h2, h3, h4 { font-family: "Fraunces", Georgia, serif; font-weight: 600; color: var(--olive-800); line-height: 1.15; margin: 0 0 0.4em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 0.8em; }
a { color: var(--olive-600); text-decoration-color: var(--moss); text-underline-offset: 3px; }
a:hover { color: var(--clay-dark); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  padding: 0.7em 1.3em; border-radius: 999px; border: 1.5px solid var(--olive-700);
  background: var(--olive-700); color: var(--cream); font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--olive-600); border-color: var(--olive-600); color: var(--cream); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-small { padding: 0.45em 1em; font-size: 0.88rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--olive-700); }
.btn-ghost:hover { background: var(--cream-2); color: var(--olive-800); }
.btn-clay { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn-clay:hover { background: var(--clay-dark); border-color: var(--clay-dark); }
.btn-ghost-light { background: transparent; border-color: rgba(246, 240, 227, 0.5); color: var(--cream); }
.btn-ghost-light:hover { background: rgba(246, 240, 227, 0.12); border-color: var(--cream); }
.danger { color: var(--danger); border-color: var(--danger); }
.danger:hover { background: #f6e3df; color: var(--danger); border-color: var(--danger); }
.danger-fill { background: var(--danger); border-color: var(--danger); }
.danger-fill:hover { background: #8a3a2f; border-color: #8a3a2f; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; font-size: 0.8rem; }
.link-btn:hover { color: var(--danger); }

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.field > span { font-weight: 700; font-size: 0.92rem; color: var(--olive-800); }
.field small { color: var(--muted); font-weight: 400; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fffdf8; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.62em 0.8em; width: 100%;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid rgba(181, 131, 111, 0.45); outline-offset: 1px; border-color: var(--clay);
}
textarea { resize: vertical; }
.check { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; white-space: nowrap; }
.check input { width: auto; accent-color: var(--olive-600); }
.form-error { color: var(--danger); font-weight: 600; background: #f8e7e3; border-radius: var(--radius-sm); padding: 0.6em 0.8em; }
.stack > * + * { margin-top: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* ---------- header / nav ---------- */
.site-header { background: var(--olive-700); position: sticky; top: 0; z-index: 20; }
.nav { max-width: 1180px; margin: 0 auto; padding: 0.7rem 1rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.45rem; color: var(--cream); text-decoration: none; font-family: "Fraunces", serif; font-size: 1.5rem; font-weight: 600; }
.brand svg { color: var(--rose); }
.brand:hover { color: var(--cream); }
.nav-links { display: flex; align-items: center; gap: 0.3rem; margin-left: auto; }
.nav-links > a:not(.btn) { color: var(--beige); text-decoration: none; padding: 0.45em 0.8em; border-radius: 999px; font-weight: 600; font-size: 0.95rem; }
.nav-links > a:not(.btn):hover { color: var(--cream); background: rgba(246, 240, 227, 0.08); }
.nav-links > a.active { color: var(--cream); background: rgba(246, 240, 227, 0.14); }
.nav-links .btn { margin-left: 0.3rem; }
.nav-user { display: inline-flex; align-items: center; gap: 0.5rem; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--cream); margin: 5px 0; border-radius: 2px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { flex-wrap: wrap; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 0.5rem 0 0.8rem; }
  .nav-open .nav-links { display: flex; }
  .nav-links .btn { margin: 0.3rem 0 0; }
}

.avatar {
  display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--rose); color: var(--olive-900); font-family: "Fraunces", serif; font-weight: 600; font-size: 1.1rem;
}
.avatar.sm { width: 28px; height: 28px; font-size: 0.85rem; }
.avatar.xl { width: 88px; height: 88px; font-size: 2.2rem; background: var(--clay); color: var(--cream); }

/* ---------- layout ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 2.5rem 1rem; }
.page.narrow { max-width: 720px; }
.page-head { margin-bottom: 1.5rem; max-width: 720px; }
.page-head p { color: var(--muted); font-size: 1.08rem; }
.page-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; max-width: none; flex-wrap: wrap; }
.section-head { margin-bottom: 1.4rem; }
.section-head p { color: var(--muted); }
.card { background: #fffaf0; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.band { background: var(--cream-2); max-width: none; }
.band > * { max-width: 1148px; margin-left: auto; margin-right: auto; }
.back { display: inline-block; margin-bottom: 1rem; text-decoration: none; font-weight: 600; }
.loading { display: grid; place-items: center; padding: 5rem 0; color: var(--sage); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.5rem; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

.site-footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 2rem 1rem; border-top: 1px solid var(--line); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--cream-2); min-height: 460px; display: grid; place-items: center; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; max-width: 640px; text-align: center; padding: 5rem 1.2rem 4rem; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 700; color: var(--clay-dark); }
.lede { font-size: 1.15rem; color: var(--olive-600); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin-top: 1.4rem; }
.plant-hero .hero-actions { justify-content: flex-start; }
@media (max-width: 700px) { .hero-art { opacity: 0.45; } }

/* ---------- levels ---------- */
.level-leaves { display: inline-flex; gap: 2px; vertical-align: -1px; }
.level-leaves svg { fill: var(--beige); }
.level-leaves svg.on { fill: var(--olive-600); }
.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.level-card { display: block; text-decoration: none; color: inherit; background: #fffaf0; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); transition: transform 0.15s; border-top: 5px solid var(--sage); }
.level-card:hover { transform: translateY(-2px); color: inherit; }
.level-card h3 { margin-top: 0.6rem; }
.level-card p { color: var(--muted); font-size: 0.95rem; }
.level-2 { border-top-color: var(--olive-500); }
.level-3 { border-top-color: var(--clay); }
.level-4 { border-top-color: var(--clay-dark); }
.meta { font-size: 0.85rem; font-weight: 700; color: var(--olive-600); }
.level-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3em 0.8em; border-radius: 999px; background: var(--cream-2); font-weight: 700; font-size: 0.85rem; color: var(--olive-700); }
.level-badge.level-3, .level-badge.level-4 { background: var(--rose-soft); color: var(--clay-dark); }
.level-badge.level-3 .level-leaves svg.on, .level-badge.level-4 .level-leaves svg.on { fill: var(--clay-dark); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }
.step-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--olive-700); color: var(--cream); font-weight: 700; margin-bottom: 0.6rem; }
.steps p { color: var(--muted); }

/* ---------- catalog ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 1rem; }
.filters input[type="search"] { flex: 1 1 240px; }
.filters select { flex: 0 1 200px; width: auto; }
.level-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.level-jump a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35em 0.9em; border-radius: 999px; background: var(--cream-2); text-decoration: none; font-weight: 600; font-size: 0.9rem; color: var(--olive-700); }
.level-section { margin-bottom: 2.5rem; }
.level-section header { border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; padding-bottom: 0.6rem; }
.level-section header h2 { display: flex; align-items: center; gap: 0.6rem; }
.level-section header p { color: var(--muted); margin: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.plant-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: #fffaf0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s; }
.plant-card:hover { transform: translateY(-3px); color: inherit; box-shadow: 0 10px 28px rgba(38, 46, 23, 0.12); }
.plant-card-art { display: grid; place-items: center; background: var(--cream-2); padding: 0.8rem 0 0.4rem; }
.plant-card-body { padding: 0.9rem 1rem 1rem; }
.plant-card-top { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.3rem; }
.level-name { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.plant-card h3 { margin-bottom: 0.1rem; }
.botanical { font-style: italic; color: var(--muted); font-size: 0.9rem; margin-bottom: 0.6rem; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chips li { font-size: 0.78rem; font-weight: 600; padding: 0.2em 0.6em; border-radius: 999px; background: var(--cream-2); color: var(--olive-600); }
.chips .chip-safe { background: var(--rose-soft); color: var(--clay-dark); }

/* ---------- plant detail ---------- */
.plant-hero { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: center; margin-bottom: 2rem; }
.plant-hero-art { background: var(--cream-2); border-radius: 50%; aspect-ratio: 1; display: grid; place-items: center; }
.plant-hero h1 { margin-top: 0.6rem; }
.why { font-size: 1.1rem; color: var(--olive-600); }
@media (max-width: 720px) {
  .plant-hero { grid-template-columns: 1fr; text-align: center; }
  .plant-hero-art { max-width: 220px; margin: 0 auto; }
  .plant-hero .hero-actions { justify-content: center; }
}
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.8rem; margin-bottom: 2rem; }
.fact { background: var(--olive-700); color: var(--cream); border-radius: var(--radius-sm); padding: 0.9rem 1rem; display: flex; flex-direction: column; }
.fact-label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--moss); font-weight: 700; }
.fact-value { font-family: "Fraunces", serif; font-size: 1.1rem; margin-top: 0.2rem; }
.fact-sub { font-size: 0.82rem; color: var(--beige); }
.care-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.care-block { background: #fffaf0; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.care-block h2 { font-size: 1.1rem; }
.care-block p:last-child, .care-block ul:last-child { margin-bottom: 0; }
.care-block ul { padding-left: 1.1rem; margin: 0; }
.care-block.wide { grid-column: 1 / -1; }
.care-block.tip { background: var(--rose-soft); border-color: var(--rose); }
.care-block.tip h2 { color: var(--clay-dark); }
.similar { margin-top: 3rem; }

/* ---------- match ---------- */
.match-layout { display: grid; grid-template-columns: 360px 1fr; gap: 1.5rem; align-items: start; }
.match-form { position: sticky; top: 84px; }
.match-form .field > span { font-size: 0.88rem; }
@media (max-width: 900px) { .match-layout { grid-template-columns: 1fr; } .match-form { position: static; } }
.summary { background: var(--olive-700); color: var(--cream); border: 0; margin-bottom: 1.5rem; }
.summary h2 { color: var(--cream); display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.summary .level-leaves svg { fill: var(--olive-500); }
.summary .level-leaves svg.on { fill: var(--rose); }
.summary p { margin: 0; color: var(--beige); }
.bundle { margin-bottom: 2rem; }
.bundle-why { color: var(--muted); }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.8rem; }
.pick { display: flex; gap: 0.8rem; text-decoration: none; color: inherit; background: #fffaf0; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem; box-shadow: var(--shadow); transition: transform 0.15s; }
.pick:hover { transform: translateY(-2px); color: inherit; }
.pick-art { flex: none; width: 84px; height: 84px; border-radius: 50%; background: var(--cream-2); display: grid; place-items: center; overflow: hidden; }
.pick h4 { margin: 0 0 0.15rem; font-size: 1.05rem; }
.pick-role { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--clay-dark); }
.pick-meta { font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.3rem; }
.reasons { margin: 0; padding-left: 1rem; font-size: 0.86rem; }
.reasons li { margin-bottom: 0.15rem; }
.stretch .pick { border-color: var(--rose); background: #fdf3ee; }
.avoid-list { padding-left: 1.1rem; color: var(--muted); }
.ranked summary { cursor: pointer; font-weight: 700; color: var(--olive-700); }
.ranked ol { columns: 2; column-gap: 2rem; margin: 1rem 0 0; padding-left: 1.4rem; }
@media (max-width: 600px) { .ranked ol { columns: 1; } }

/* ---------- auth ---------- */
.auth { display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 430px; }
.auth-mark { width: 52px; height: 52px; border-radius: 50%; background: var(--olive-700); color: var(--rose); display: grid; place-items: center; margin-bottom: 1rem; }
.auth-foot { text-align: center; margin: 1rem 0 0; color: var(--muted); }

/* ---------- garden ---------- */
.streak-banner { display: flex; align-items: center; gap: 1.2rem; background: var(--olive-700); color: var(--cream); border-radius: var(--radius); padding: 1rem 1.4rem; margin-bottom: 1.5rem; }
.streak-banner p { margin: 0; }
.streak-banner .muted { color: var(--moss); font-size: 0.9rem; }
.streak-num { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--clay); border-radius: 14px; min-width: 84px; padding: 0.4rem 0.6rem; }
.streak-num strong { font-family: "Fraunces", serif; font-size: 2rem; line-height: 1; }
.streak-num span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.streak-banner.done .streak-num { background: var(--rose); color: var(--olive-900); }

.garden-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
@media (max-width: 380px) { .garden-grid { grid-template-columns: 1fr; } }
.garden-card { background: #fffaf0; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.garden-card-link { display: flex; gap: 1rem; padding: 1rem; text-decoration: none; color: inherit; flex: 1; }
.garden-card-link:hover { color: inherit; }
.garden-card h3 { margin-bottom: 0.1rem; }
.garden-card p { margin-bottom: 0.3rem; }
.garden-art { flex: none; width: 96px; height: 96px; border-radius: 50%; background: var(--cream-2); display: grid; place-items: center; overflow: hidden; }
.garden-art.lg { width: 150px; height: 150px; }
.garden-card-actions { display: flex; gap: 0.5rem; padding: 0 1rem 1rem; }
.water-status { font-weight: 700; font-size: 0.88rem; }
.water-status::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.4rem; vertical-align: 1px; background: var(--sand); }
.water-status.ok::before { background: var(--sage); }
.water-status.due { color: var(--clay-dark); }
.water-status.due::before { background: var(--clay); }
.water-status.overdue { color: var(--danger); }
.water-status.overdue::before { background: var(--danger); }

.gp-head { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
.gp-head > div:last-child { flex: 1; min-width: 240px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pill { padding: 0.3em 0.8em; border-radius: 999px; background: var(--cream-2); font-size: 0.85rem; font-weight: 600; color: var(--olive-600); }
.gp-notes { background: var(--cream-2); border-radius: var(--radius-sm); padding: 0.6rem 0.9rem; }
.gp-layout { display: grid; grid-template-columns: 380px 1fr; gap: 1.2rem; align-items: start; margin-bottom: 1.2rem; }
@media (max-width: 860px) { .gp-layout { grid-template-columns: 1fr; } }
.action-chips { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.action-chips legend { font-weight: 700; font-size: 0.92rem; color: var(--olive-800); margin-bottom: 0.5rem; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-block; padding: 0.35em 0.85em; border-radius: 999px; border: 1.5px solid var(--line); font-size: 0.88rem; font-weight: 600; cursor: pointer; background: #fffdf8; user-select: none; }
.chip-check input:checked + span { background: var(--olive-700); border-color: var(--olive-700); color: var(--cream); }
.chip-check input:focus-visible + span { outline: 3px solid rgba(181, 131, 111, 0.45); }

.timeline { list-style: none; margin: 0; padding: 0; }
.tl-day { position: relative; padding: 0 0 1rem 1.3rem; border-left: 2px solid var(--beige); margin-left: 0.4rem; }
.tl-day::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--sage); border: 2px solid #fffaf0; }
.tl-date { font-weight: 700; font-size: 0.88rem; color: var(--olive-700); }
.tl-day ul { list-style: none; padding: 0; margin: 0.3rem 0 0; }
.tl-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; padding: 0.2rem 0; }
.tl-note { color: var(--muted); font-size: 0.92rem; flex: 1; min-width: 140px; }
.tag { display: inline-block; font-size: 0.76rem; font-weight: 700; padding: 0.15em 0.6em; border-radius: 999px; background: var(--cream-2); color: var(--olive-700); white-space: nowrap; }
.tag-watered { background: #dde6cf; }
.tag-fertilized, .tag-repotted { background: var(--rose-soft); color: var(--clay-dark); }
.tag-pest-treatment { background: #f3dcd6; color: var(--danger); }
.quick-guide p { margin-bottom: 0.5rem; }

/* ---------- profile ---------- */
.profile-head { display: flex; align-items: center; gap: 1.4rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.profile-id { flex: 1; min-width: 220px; }
.profile-id h1 { margin-bottom: 0.1rem; }
.profile-id p { margin-bottom: 0.3rem; }
.bio { max-width: 560px; }
.profile-actions { display: flex; gap: 0.5rem; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.6rem; margin-bottom: 1.5rem; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: #fffaf0; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.8rem 0.5rem; text-align: center; display: flex; flex-direction: column; font: inherit; color: inherit; }
.stat strong { font-family: "Fraunces", serif; font-size: 1.6rem; color: var(--olive-700); line-height: 1.1; }
.stat span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.stat.link { cursor: pointer; }
.stat.link:hover { border-color: var(--clay); }
.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; max-width: 100%; overflow-x: auto; margin-bottom: 0.6rem; justify-content: start; }
.hm-cell { width: 16px; height: 16px; border-radius: 4px; background: var(--cream-2); border: 1px solid var(--line); }
.hm-cell.on { background: var(--olive-600); border-color: var(--olive-600); }
.hm-cell.future { visibility: hidden; }
.page > .card + section, .page > section + .card, .page > .card + .card, .page > section + section { margin-top: 1.2rem; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.8rem; margin-bottom: 1rem; }
.shelf-item { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: inherit; background: #fffaf0; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 0.5rem; }
.shelf-item:hover { color: inherit; border-color: var(--sage); }
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; padding: 0.5rem 0; border-bottom: 1px solid var(--cream-2); }
.activity > span:nth-child(2) { flex: 1; min-width: 160px; }

.people-search { margin-bottom: 1rem; }
.user-list { display: flex; flex-direction: column; gap: 0.5rem; }
.user-row { display: flex; gap: 0.8rem; align-items: center; text-decoration: none; color: inherit; background: #fffaf0; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; }
.user-row:hover { color: inherit; border-color: var(--sage); }
.user-row-text { display: flex; flex-direction: column; min-width: 0; }
.user-row-text .muted { font-size: 0.88rem; }
.user-bio { font-size: 0.88rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(38, 46, 23, 0.45); display: grid; place-items: center; padding: 1rem; z-index: 50; }
.modal { position: relative; background: var(--cream); border-radius: var(--radius); padding: 1.6rem; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); }
.modal-close { position: absolute; top: 0.6rem; right: 0.8rem; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--muted); line-height: 1; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--olive-800); color: var(--cream); padding: 0.7rem 1.2rem; border-radius: 999px; font-weight: 600; transition: all 0.25s; z-index: 60; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
