/* ═══════════════════════════════════════════════════════════════
   Green Thumbs — Plant Detail v2 Styles
   Direction: Glasshouse B · "Grounded"
   This file is ADDITIVE — it layers on top of style.css.
   For production: add <link rel="stylesheet" href="style_v2.css">
   to base.html <head> after style.css.
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=DM+Serif+Display:ital@0;1&display=swap');

/* ── Glasshouse B design tokens ── */
:root {
    --pd-forest:       #2D4A36;
    --pd-forest-light: #3a5e47;
    --pd-coral:        #E86D4F;
    --pd-sage:         #E8EDE3;
    --pd-sage-dark:    #d4dcd0;
    --pd-ivory:        #F2EDDD;
    --pd-hero-bg:      #2D4A36;    /* always dark — both modes */
    --pd-hero-text:    #F2EDDD;    /* always ivory — both modes */
    --pd-card-stripe:  #2D4A36;    /* left-edge stripe on cards */
    --pd-nudge-amber:  #d97706;
    --pd-nudge-bg:     #fffbeb;
    --pd-nudge-text:   #92400e;
    --pd-nudge-border: #fcd34d;
    --pd-history-tint: #f0f9f4;    /* section rhythm: subtle green tint */
}

[data-theme="dark"] {
    --pd-card-stripe:  #3FB57A;    /* emerald stripe on dark */
    --pd-sage:         #1F3326;
    --pd-sage-dark:    #172a1e;
    --pd-nudge-bg:     #1c1200;
    --pd-nudge-text:   #fbbf24;
    --pd-nudge-border: #78350f;
    --pd-nudge-amber:  #fbbf24;
    --pd-history-tint: var(--surface);
}

/* ══════════════════════════════════════════
   HERO SECTION — Color as Material
   Forest green fills the entire header band.
   Atmospheric blur if a photo exists.
══════════════════════════════════════════ */

.pd-hero {
    position: relative;
    background: var(--pd-hero-bg);
    margin: -2rem -1.5rem 0;
    padding: 0;
    overflow: hidden;
    border-bottom: none;
}

/* Atmospheric blurred photo backdrop */
.pd-hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 40%;
    filter: blur(60px) saturate(1.3);
    opacity: 0.2;
    transform: scale(1.12); /* prevents blur edge fringing */
    pointer-events: none;
}

/* Radial vignette — grounds the text */
.pd-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 70%, rgba(45,74,54,0.6) 0%, transparent 70%);
    pointer-events: none;
}

.pd-hero-inner {
    position: relative;
    z-index: 1;
    padding: 2rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Back link */
.pd-back-link {
    display: inline-flex;
    align-items: center;
    color: rgba(242, 237, 221, 0.65);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
    transition: color 0.15s;
    width: fit-content;
    padding: 0.3rem 0.75rem;
    border: 1px solid rgba(242, 237, 221, 0.2);
    border-radius: 999px;
    background: rgba(242, 237, 221, 0.08);
    backdrop-filter: blur(8px);
}

.pd-back-link:hover {
    color: var(--pd-ivory);
    background: rgba(242, 237, 221, 0.15);
    border-color: rgba(242, 237, 221, 0.35);
}

/* Plant name — Type at scale */
.pd-plant-name {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 900;
    color: var(--pd-ivory);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 0.6rem;
}

/* Species + location meta row */
.pd-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.pd-species {
    font-style: italic;
    color: rgba(242, 237, 221, 0.7);
    font-size: 0.95rem;
}

.pd-loc {
    font-size: 0.9rem;
    color: rgba(242, 237, 221, 0.55);
    font-weight: 400;
}

/* Care note from Variant C — the plant's own words above the fold */
.pd-hero-notes {
    font-size: 0.88rem;
    color: rgba(242, 237, 221, 0.6);
    font-style: italic;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    max-width: 520px;
}

/* Health badge on dark hero */
.pd-hero-badge {
    margin-top: 0;
    align-self: flex-start;
}

.pd-hero .badge-healthy   { background: rgba(34,197,94,0.2);  color: #86efac; }
.pd-hero .badge-warning   { background: rgba(251,191,36,0.2); color: #fde68a; }
.pd-hero .badge-alert     { background: rgba(239,68,68,0.2);  color: #fca5a5; }
.pd-hero .badge-unknown   { background: rgba(255,255,255,0.1); color: rgba(242,237,221,0.6); }

/* ══════════════════════════════════════════
   PAGE BODY — Content area below the hero
══════════════════════════════════════════ */

.pd-body {
    padding-top: 1.8rem;
}

/* ══════════════════════════════════════════
   SECTION HEADER — shared utility
══════════════════════════════════════════ */

.pd-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* ══════════════════════════════════════════
   METADATA QUADRANT GRID — 2×2 card grid
   Depth hierarchy: left-edge stripe,
   layered shadows, no flat surfaces
══════════════════════════════════════════ */

.pd-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.pd-meta-quad {
    background: var(--surface);
    border-radius: 14px;
    padding: 1.1rem 1.2rem 1.1rem 1.4rem;
    border-left: 4px solid var(--pd-card-stripe);
    border-top: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 12px var(--shadow), 0 1px 3px var(--shadow);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.pd-meta-quad:hover {
    box-shadow: 0 8px 20px var(--shadow-hover), 0 2px 6px var(--shadow);
    transform: translateY(-1px);
}

/* Last Analysis quad — humanized date + full-date reveal on hover/tap */
.pd-analysis-quad { cursor: pointer; }

.pd-analysed-full {
    display: none;
    font-size: 0.72rem;
    color: var(--text-faint);
    margin-top: 0.25rem;
    line-height: 1.4;
    font-style: italic;
}

.pd-analysis-quad:hover .pd-analysed-full,
.pd-analysis-quad.date-revealed .pd-analysed-full {
    display: block;
}

.pd-analysis-quad:hover .pd-quad-label::after {
    content: ' — tap for date';
    font-size: 0.62rem;
    opacity: 0.45;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

@media (hover: none) {
    .pd-analysis-quad:hover .pd-quad-label::after { content: none; }
}

/* Last Watered quad — same humanized date + full-date reveal pattern */
.pd-watered-quad { cursor: pointer; }

.pd-watered-full {
    display: none;
    font-size: 0.72rem;
    color: var(--text-faint);
    margin-top: 0.25rem;
    line-height: 1.4;
    font-style: italic;
}

.pd-watered-quad:hover .pd-watered-full,
.pd-watered-quad.date-revealed .pd-watered-full {
    display: block;
}

.pd-watered-quad:hover .pd-quad-label::after {
    content: ' — tap for date';
    font-size: 0.62rem;
    opacity: 0.45;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

@media (hover: none) {
    .pd-watered-quad:hover .pd-quad-label::after { content: none; }
}

/* Last Analysed line (below action buttons) — tap-to-reveal full timestamp */
.pd-la-full {
    display: none;
    font-size: 0.8em;
    color: var(--text-faint);
    font-style: italic;
    margin-left: 0.3em;
}

.last-analysed.date-revealed .pd-la-full {
    display: inline;
}

/* Care notes: history-sourced hint text */
.pd-note-history-hint {
    font-size: 0.72rem;
    color: var(--text-faint);
    font-style: italic;
    margin-left: auto;
}

/* Muted quad (e.g. Next Water — not yet available) */
.pd-quad-muted .pd-quad-icon { opacity: 0.35; }
.pd-quad-muted .pd-quad-value { color: var(--text-faint); }

.pd-quad-icon {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: block;
    line-height: 1;
}

.pd-quad-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 0.3rem;
}

.pd-quad-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    word-break: break-word;
}

.pd-quad-sub {
    font-size: 0.75rem;
    color: var(--text-faint);
    margin-top: 0.25rem;
    line-height: 1.4;
}

.pd-quad-empty {
    color: var(--text-faint);
    font-weight: 400;
    font-style: italic;
}

/* ─── Photos quadrant — neutral state ─── */
/* Per spec: no icon, standard colour */
.pd-photos-quad .pd-quad-icon { display: none; }
.pd-photos-count { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.pd-photos-sub   { font-size: 0.78rem; }

/* Nudge badge (hidden in neutral) */
.pd-nudge-bang {
    display: none;
    position: absolute;
    top: 0.9rem;
    right: 1rem;
    font-size: 1rem;
    font-weight: 900;
    color: var(--pd-nudge-amber);
    line-height: 1;
    background: var(--pd-nudge-bg);
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--pd-nudge-border);
}

/* ─── Photos quadrant — nudge state (JS adds .nudge) ─── */
.pd-photos-quad.nudge {
    border-left-color: var(--pd-nudge-amber);
    background: var(--pd-nudge-bg);
    cursor: pointer;
}

.pd-photos-quad.nudge:hover {
    box-shadow: 0 8px 20px rgba(217,119,6,0.18), 0 2px 6px rgba(217,119,6,0.1);
}

.pd-photos-quad.nudge .pd-quad-label,
.pd-photos-quad.nudge .pd-photos-count,
.pd-photos-quad.nudge .pd-photos-sub {
    color: var(--pd-nudge-text);
}

.pd-photos-quad.nudge .pd-nudge-bang {
    display: flex;
}

/* Nudge message (injected by JS, hidden in neutral) */
.pd-nudge-msg {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--pd-nudge-border);
    font-size: 0.78rem;
    color: var(--pd-nudge-text);
    line-height: 1.5;
}

.pd-nudge-msg p {
    margin: 0 0 0.4rem;
}

.pd-nudge-msg p:first-child strong {
    font-weight: 700;
}

.pd-nudge-link {
    display: inline-block;
    color: var(--pd-nudge-text);
    font-weight: 600;
    font-size: 0.78rem;
    text-decoration: underline;
    margin-bottom: 0.4rem;
}

.pd-nudge-link:hover { opacity: 0.75; }

.pd-nudge-remind {
    font-size: 0.72rem;
    color: var(--pd-nudge-text);
    opacity: 0.65;
    margin: 0;
}

.pd-nudge-remind span {
    font-style: italic;
}

/* ══════════════════════════════════════════
   CARE NOTES SECTION
   Quiet but scannable. Compounds over time.
   Empty state uses botanical SVG illustration.
══════════════════════════════════════════ */

.pd-care-notes {
    background: var(--surface);
    border-radius: 14px;
    padding: 1.6rem 1.8rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px var(--shadow);
    border: 1px solid var(--border-light);
    /* Left stripe: botanical green — Color as Material in the body */
    border-left: 4px solid var(--pd-card-stripe);
}

.pd-care-notes .pd-section-head h3 {
    /* Override main h3 for section context */
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin: 0;
}

/* ─── Empty state ─── */
.pd-notes-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    padding: 1.5rem 1rem 0.5rem;
    text-align: center;
}

.pd-notes-illus {
    width: 56px;
    height: 56px;
    color: var(--accent);
    opacity: 0.45;
    flex-shrink: 0;
}

.pd-notes-illus svg {
    width: 100%;
    height: 100%;
}

.pd-notes-empty-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.pd-notes-empty-body {
    font-size: 0.82rem;
    color: var(--text-faint);
    line-height: 1.55;
    max-width: 300px;
}

/* ─── Populated state ─── */
.pd-notes-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.pd-note-item {
    padding: 0.9rem 1rem;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: background 0.2s;
}

.pd-note-item:hover {
    background: var(--surface);
}

.pd-note-item.pd-note-ai {
    border-left-color: var(--ai-text);
    background: var(--ai-bg);
}

.pd-note-text {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.55;
}

.pd-note-foot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pd-note-source-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ai-text);
    background: rgba(92,53,160,0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.pd-note-date {
    font-size: 0.75rem;
    color: var(--text-faint);
}

.pd-note-dismiss {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-faint);
    cursor: default;
    font-size: 1.1rem;
    padding: 0;
    opacity: 0.35;
    line-height: 1;
}

.pd-note-dismiss:hover:not(:disabled) {
    opacity: 0.8;
    cursor: pointer;
}

/* ─── Structured notes (API-summarised view) ─── */
.pd-notes-structured {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.pd-notes-sub {
    background: var(--bg);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
}

.pd-notes-sub-watch {
    border-left-color: #d97706;
}

.pd-notes-sub-species {
    border-left-color: #0d9488;
}

.pd-notes-sub-head {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.55rem;
}

.pd-notes-sub-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pd-notes-sub-source {
    font-size: 0.7rem;
    color: var(--text-faint);
    opacity: 0.75;
    font-style: italic;
}

.pd-notes-tag {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    line-height: 1.6;
}

.pd-notes-tag-amber {
    background: rgba(217,119,6,0.12);
    color: #b45309;
}

.pd-notes-tag-teal {
    background: rgba(13,148,136,0.12);
    color: #0d9488;
}

.pd-notes-bullets {
    list-style: disc;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pd-notes-bullets li {
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.5;
}

.pd-notes-watch li {
    color: #92400e;
}

.pd-notes-species li {
    color: #0f766e;
}

.pd-notes-source-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.74rem;
    color: var(--text-faint);
    margin: 0;
}

/* ─── Photos quadrant last-date reveal ─── */
.pd-photos-last-full {
    display: none;
    font-size: 0.7rem;
    color: var(--text-faint);
    margin-top: 0.2rem;
}

.pd-photos-quad:not(.nudge):hover .pd-photos-last-full,
.pd-photos-quad.date-revealed .pd-photos-last-full {
    display: block;
}

@media (hover: none) {
    .pd-photos-quad:not(.nudge):hover .pd-photos-last-full { display: none; }
}

/* ══════════════════════════════════════════
   PHOTO BAND — Section rhythm + horizontal scroll
   This section changes the surface material:
   pale sage tint instead of cream.
══════════════════════════════════════════ */

.pd-photo-band {
    background: var(--pd-sage);
    margin: 0 -1.5rem;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.5rem;
}

.pd-photo-band .pd-section-head h3 {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a6456;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pd-photo-count-chip {
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(45,74,54,0.12);
    color: var(--pd-forest);
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
}

.pd-add-link {
    font-size: 0.8rem;
    color: var(--pd-forest);
    font-weight: 600;
    text-decoration: none;
    padding: 0.3rem 0.8rem;
    border: 1.5px solid rgba(45,74,54,0.35);
    border-radius: 999px;
    transition: all 0.15s;
    white-space: nowrap;
    background: rgba(255,255,255,0.5);
}

.pd-add-link:hover {
    background: var(--pd-forest);
    color: var(--pd-ivory);
    border-color: var(--pd-forest);
}

/* Horizontal scroll strip */
.pd-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(45,74,54,0.2) transparent;
    padding-bottom: 0.25rem;
}

.pd-scroll-wrap::-webkit-scrollbar { height: 4px; }
.pd-scroll-wrap::-webkit-scrollbar-track { background: transparent; }
.pd-scroll-wrap::-webkit-scrollbar-thumb { background: rgba(45,74,54,0.2); border-radius: 2px; }

.pd-scroll-inner {
    display: flex;
    gap: 0.85rem;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    width: max-content;
}

.pd-scroll-inner .gallery-item {
    flex: 0 0 auto;
    width: 180px;
    min-width: 0;
}

/* Photo cards — Depth hierarchy: actual photos visually heavier */
.pd-scroll-photo {
    max-height: 200px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15), 0 2px 6px rgba(0,0,0,0.08);
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pd-scroll-photo:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 28px rgba(0,0,0,0.18), 0 4px 10px rgba(0,0,0,0.1);
}

/* ══════════════════════════════════════════
   ACTIONS ROW
══════════════════════════════════════════ */

.pd-actions {
    margin-bottom: 1.5rem;
}

/* ══════════════════════════════════════════
   LOG CARE EVENT — Designed interactive
   Pill chip selectors replace the <select>.
   Radio inputs are visually hidden; the
   label <span> provides all visual feedback.
══════════════════════════════════════════ */

.pd-log-section {
    background: var(--surface);
    border-radius: 14px;
    padding: 1.6rem 1.8rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px var(--shadow);
    border: 1px solid var(--border-light);
}

.pd-log-section h3 {
    margin-bottom: 1.1rem;
}

.pd-log-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

/* Chip group */
.pd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.pd-chip-label {
    display: inline-flex;
    cursor: pointer;
    position: relative;
}

/* Visually hide the radio — keep it accessible */
.pd-chip-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.pd-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 500;
    font-family: inherit;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    background: var(--surface);
    transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
    user-select: none;
    white-space: nowrap;
    line-height: 1.3;
}

.pd-chip-label:hover .pd-chip {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.pd-chip-label:active .pd-chip {
    transform: scale(0.97);
}

/* Checked state — :has() modern, radio:checked fallback */
.pd-chip-label:has(input:checked) .pd-chip {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
    font-weight: 600;
}

/* Fallback for Safari < 15.4 and Firefox < 121 */
.pd-chip-label input:checked ~ .pd-chip {
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
    font-weight: 600;
}

/* Focus ring for keyboard nav */
.pd-chip-label input:focus-visible ~ .pd-chip {
    outline: 3px solid var(--shadow-focus);
    outline-offset: 1px;
}

/* Notes + log button row */
.pd-log-row {
    display: flex;
    gap: 0.7rem;
    align-items: center;
}

.pd-log-input {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 1.1rem;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pd-log-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--shadow-focus);
}

.pd-log-input::placeholder { color: var(--text-faint); }

.pd-log-btn {
    border-radius: 999px;
    padding: 0.6rem 1.6rem;
    flex-shrink: 0;
    font-weight: 600;
}

/* ══════════════════════════════════════════
   CARE HISTORY — Section rhythm
   Subtle botanical tint differentiates this
   section from the white surface above.
══════════════════════════════════════════ */

.pd-history {
    background: var(--pd-history-tint);
    border-radius: 14px;
    padding: 1.6rem 1.8rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px var(--shadow);
    border: 1px solid var(--border-light);
}

/* ══════════════════════════════════════════
   DARK MODE OVERRIDES
══════════════════════════════════════════ */

[data-theme="dark"] .pd-hero {
    /* Hero always dark — no change needed */
}

[data-theme="dark"] .pd-photo-band {
    background: var(--pd-sage); /* --pd-sage remapped to #1F3326 in dark */
}

[data-theme="dark"] .pd-photo-band .pd-section-head h3 {
    color: #6fa98a;
}

[data-theme="dark"] .pd-photo-count-chip {
    background: rgba(63,181,122,0.15);
    color: #3FB57A;
}

[data-theme="dark"] .pd-add-link {
    color: #3FB57A;
    border-color: rgba(63,181,122,0.3);
    background: rgba(63,181,122,0.08);
}

[data-theme="dark"] .pd-add-link:hover {
    background: #3FB57A;
    color: #111A14;
    border-color: #3FB57A;
}

[data-theme="dark"] .pd-photos-quad.nudge {
    background: var(--pd-nudge-bg);
}

[data-theme="dark"] .pd-photos-quad.nudge .pd-quad-label,
[data-theme="dark"] .pd-photos-quad.nudge .pd-photos-count,
[data-theme="dark"] .pd-photos-quad.nudge .pd-photos-sub {
    color: var(--pd-nudge-text);
}

[data-theme="dark"] .pd-scroll-wrap::-webkit-scrollbar-thumb {
    background: rgba(63,181,122,0.2);
}

[data-theme="dark"] .pd-care-notes {
    border-left-color: var(--pd-card-stripe);
}

[data-theme="dark"] .pd-note-item {
    background: var(--surface);
}

[data-theme="dark"] .pd-note-item:hover {
    background: var(--bg);
}

[data-theme="dark"] .pd-notes-sub {
    background: var(--surface);
    border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .pd-notes-sub-watch {
    border-left-color: #d97706;
}

[data-theme="dark"] .pd-notes-sub-species {
    border-left-color: #14b8a6;
}

[data-theme="dark"] .pd-notes-watch li {
    color: #fbbf24;
}

[data-theme="dark"] .pd-notes-species li {
    color: #2dd4bf;
}

[data-theme="dark"] .pd-notes-tag-amber {
    background: rgba(217,119,6,0.2);
    color: #fbbf24;
}

[data-theme="dark"] .pd-notes-tag-teal {
    background: rgba(13,148,136,0.2);
    color: #2dd4bf;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */

@media (max-width: 768px) {
    .pd-hero {
        margin: -1.5rem -1rem 0;
    }

    .pd-hero-inner {
        padding: 1.5rem 1.25rem 2rem;
    }

    .pd-plant-name {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }

    .pd-photo-band {
        margin: 0 -1rem;
        padding: 1.2rem 1rem;
    }

    .pd-back-link {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
        margin-bottom: 1.2rem;
    }
}

@media (max-width: 480px) {
    .pd-back-link {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
        margin-bottom: 1rem;
        backdrop-filter: none;
    }

    .pd-hero-inner {
        padding: 1rem 0.8rem 1.5rem;
    }

    .pd-plant-name {
        margin-bottom: 0.4rem;
    }

    .pd-hero-meta {
        gap: 0.3rem 0.8rem;
    }
}

@media (max-width: 520px) {
    .pd-meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
    }

    .pd-meta-quad {
        padding: 0.9rem 0.85rem 0.9rem 1rem;
    }

    .pd-photos-count {
        font-size: 1.3rem;
    }

    .pd-plant-name {
        font-size: clamp(1.9rem, 11vw, 2.8rem);
    }

    .pd-log-section,
    .pd-care-notes,
    .pd-history {
        padding: 1.3rem 1.2rem;
    }

    .pd-log-row {
        flex-direction: column;
        align-items: stretch;
    }

    .pd-log-input {
        border-radius: 12px;
    }

    .pd-log-btn {
        border-radius: 12px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .pd-chips {
        gap: 0.35rem;
    }

    .pd-chip {
        font-size: 0.78rem;
        padding: 0.4rem 0.75rem;
    }
}

/* ══════════════════════════════════════════
   HOME PAGE
   Route: /  ·  Template: home.html
   body.page-home overrides main padding so
   sections can use full-viewport backgrounds.
══════════════════════════════════════════ */

.page-home main {
    max-width: none;
    padding: 0;
}

.home-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* ── Hero ── */
.home-hero {
    position: relative;
    background: var(--pd-hero-bg);
    overflow: hidden;
}

.home-hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 40%;
    filter: blur(60px) saturate(1.3);
    opacity: 0.2;
    transform: scale(1.12);
    pointer-events: none;
}

.home-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 70%, rgba(45,74,54,0.5) 0%, transparent 70%);
    pointer-events: none;
}

.home-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 3rem;
}

.home-hero-eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(242, 237, 221, 0.45);
    margin-bottom: 1rem;
}

.home-hero-headline {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: clamp(2.4rem, 7vw, 4rem);
    font-weight: 900;
    color: var(--pd-ivory);
    letter-spacing: -0.045em;
    line-height: 1.0;
    margin-bottom: 1rem;
}

.home-hero-headline em {
    font-style: italic;
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    color: #86efac;
    letter-spacing: -0.02em;
}

.home-hero-sub {
    font-size: 0.92rem;
    color: rgba(242, 237, 221, 0.55);
}

.home-hero-sub strong {
    color: rgba(242, 237, 221, 0.8);
    font-weight: 600;
}

/* ── Garden Snapshot ── */
.garden-snapshot {
    background: var(--bg);
}

.home-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 1.5rem;
}

.home-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.home-stat-card {
    background: var(--surface);
    border-radius: 14px;
    padding: 1.1rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

a.home-stat-card:hover,
a.home-stat-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.09), 0 2px 4px rgba(0, 0, 0, 0.06);
    border-color: var(--accent);
    outline: none;
}

.home-stat-number {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text);
}

.home-stat-number--muted {
    color: var(--text-muted);
}

.home-stat-number--healthy {
    color: #22c55e;
}

.home-stat-number--attention {
    color: #f59e0b;
}

.home-stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.home-stat-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 0.3rem;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.home-stat-dot--green { background: #22c55e; }
.home-stat-dot--amber { background: #f59e0b; }

.home-watering-lines {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.home-watering-line {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.home-watering-line strong {
    color: var(--text);
    font-weight: 600;
}

.home-plant-link {
    color: var(--pd-forest);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(45, 74, 54, 0.25);
    transition: border-color 0.15s;
}

[data-theme="dark"] .home-plant-link {
    color: #3FB57A;
    border-bottom-color: rgba(63, 181, 122, 0.3);
}

.home-plant-link:hover {
    border-bottom-color: var(--pd-forest);
}

/* ── Seasonal Dispatch ── */
.home-dispatch {
    background: var(--bg);
}

.home-dispatch .home-inner {
    padding-top: 0;
}

.home-dispatch-card {
    background: var(--surface);
    border-radius: 14px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--pd-forest);
    padding: 1.1rem 1.25rem;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .home-dispatch-card {
    border-left-color: #3FB57A;
}

.home-dispatch-icon {
    font-size: 1.1rem;
    line-height: 1;
    padding-top: 0.15rem;
    flex-shrink: 0;
}

.home-dispatch-text {
    font-size: 0.87rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.home-dispatch-text strong {
    color: var(--text);
    font-weight: 600;
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Entry Point ── */
.home-entry {
    background: var(--pd-sage);
}

.home-entry-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.home-entry-headline {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 400;
    color: var(--pd-forest);
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

[data-theme="dark"] .home-entry-headline {
    color: #3FB57A;
}

.home-entry-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.home-entry-leaf {
    flex-shrink: 0;
    color: var(--pd-forest);
    opacity: 0.18;
}

[data-theme="dark"] .home-entry-leaf {
    color: #3FB57A;
    opacity: 0.12;
}

.home-entry-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--pd-forest);
    color: var(--pd-ivory);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: all 0.15s;
    flex-shrink: 0;
    letter-spacing: 0.01em;
}

[data-theme="dark"] .home-entry-cta {
    background: #3FB57A;
    color: #111A14;
}

.home-entry-cta:hover {
    background: var(--pd-forest-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 74, 54, 0.3);
}

.home-cta-arrow {
    transition: transform 0.15s;
    display: inline-block;
}

.home-entry-cta:hover .home-cta-arrow {
    transform: translateX(2px);
}

/* ── Activity Teaser ── */
.home-activity {
    background: var(--surface);
}

.home-activity-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.home-activity-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text);
}

.home-activity-link {
    font-size: 0.8rem;
    color: var(--pd-forest);
    text-decoration: none;
    font-weight: 500;
}

[data-theme="dark"] .home-activity-link {
    color: #3FB57A;
}

.home-activity-link:hover {
    text-decoration: underline;
}

.home-activity-list {
    display: flex;
    flex-direction: column;
}

.home-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}

.home-activity-item:last-child {
    border-bottom: none;
}

.home-activity-emoji {
    font-size: 1rem;
    line-height: 1.5;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.home-activity-body {
    flex: 1;
    min-width: 0;
}

.home-activity-line {
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--text);
}

.home-activity-type {
    font-weight: 700;
}

.home-activity-time {
    font-size: 0.78rem;
    color: var(--text-faint);
    margin-top: 0.15rem;
}

.home-activity-empty {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem 0;
}

/* ── Home page responsive ── */
@media (max-width: 600px) {
    .home-entry-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-entry-leaf {
        display: none;
    }

    .home-entry-cta {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .home-stat-row {
        grid-template-columns: 1fr 1fr;
    }

    .home-stat-card:first-child {
        grid-column: 1 / -1;
    }

    .home-stat-number {
        font-size: 1.8rem;
    }
}


/* ══════════════════════════════════════════════════════════════════
   ACTIVITY FEED v2  —  Glasshouse B direction
   Additive layer. Does not affect any other page.
══════════════════════════════════════════════════════════════════ */

/* ── Hero band ──────────────────────────────────────────────────── */
.act2-hero {
    background: var(--pd-hero-bg);
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: -2rem;
}

.act2-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 15% 85%, rgba(74, 109, 90, 0.45) 0%, transparent 65%);
    pointer-events: none;
}

.act2-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 2.75rem;
}

.act2-hero-eyebrow {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(242, 237, 221, 0.32);
    margin-bottom: 0.7rem;
}

.act2-hero-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 400;
    font-style: italic;
    color: var(--pd-ivory);
    letter-spacing: -0.03em;
    line-height: 0.92;
    margin-bottom: 0.85rem;
}

.act2-hero-sub {
    font-size: 0.87rem;
    color: rgba(242, 237, 221, 0.42);
    line-height: 1.5;
}

/* ── Feed body ──────────────────────────────────────────────────── */
.act2-body {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 4rem;
}

/* ── Sort bar ───────────────────────────────────────────────────── */
.act2-sort-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.act2-sort-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-faint);
    margin-right: 0.2rem;
}

.act2-sort-pill {
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
    background: var(--surface);
    transition: border-color 0.12s, color 0.12s, background 0.12s;
    white-space: nowrap;
}

.act2-sort-pill:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.act2-sort-pill.active {
    background: var(--pd-forest);
    color: var(--pd-ivory);
    border-color: var(--pd-forest);
    font-weight: 600;
}

[data-theme="dark"] .act2-sort-pill.active {
    background: var(--pd-card-stripe);
    border-color: var(--pd-card-stripe);
    color: #0d1a11;
}

/* ── Date dividers ──────────────────────────────────────────────── */
.act2-date-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.75rem 0 0.65rem;
}

.act2-date-divider:first-of-type {
    margin-top: 0;
}

.act2-date-divider::before,
.act2-date-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.act2-date-chip {
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
    white-space: nowrap;
    padding: 0.22rem 0.7rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
}

/* ── Standalone event card ──────────────────────────────────────── */
.act2-event {
    background: var(--surface);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.45rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px var(--shadow);
    position: relative;
    overflow: hidden;
}

.act2-event-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.act2-event-left {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1;
}

.act2-event-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* AI event — visually heavier, purple accent */
.act2-event--ai {
    background: var(--ai-bg);
    border-color: rgba(92, 53, 160, 0.16);
    box-shadow: 0 2px 10px rgba(92, 53, 160, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.act2-event--ai::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--ai-text);
    border-radius: 3px 0 0 3px;
}

[data-theme="dark"] .act2-event--ai {
    border-color: rgba(216, 180, 254, 0.18);
    box-shadow: 0 2px 10px rgba(216, 180, 254, 0.07);
}

/* ── Shared text ────────────────────────────────────────────────── */
.act2-plant-link {
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
}

.act2-plant-link:hover {
    text-decoration: underline;
    color: var(--accent);
}

.act2-action-word {
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.act2-timestamp {
    font-size: 0.71rem;
    color: var(--text-faint);
    white-space: nowrap;
}

.act2-event-notes {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    line-height: 1.55;
}

/* ── Group (details / summary) ──────────────────────────────────── */
details.act2-group {
    margin-bottom: 0.45rem;
}

details.act2-group > summary {
    list-style: none;
    cursor: pointer;
    outline: none;
    display: block;
    -webkit-user-select: none;
    user-select: none;
}

details.act2-group > summary::-webkit-details-marker {
    display: none;
}

.act2-group-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    box-shadow: 0 1px 3px var(--shadow);
    transition: border-color 0.12s, box-shadow 0.12s;
}

details.act2-group > summary:hover .act2-group-row {
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--shadow-hover);
}

details.act2-group[open] .act2-group-row {
    border-radius: 12px 12px 0 0;
    border-bottom-color: transparent;
    box-shadow: none;
}

details.act2-group[open] > summary:hover .act2-group-row {
    box-shadow: none;
}

/* AI trigger group */
details.act2-group--ai .act2-group-row {
    background: var(--ai-bg);
    border-color: rgba(92, 53, 160, 0.16);
}

[data-theme="dark"] details.act2-group--ai .act2-group-row {
    border-color: rgba(216, 180, 254, 0.18);
}

.act2-group-icon {
    margin-top: 0.05rem;
    flex-shrink: 0;
}

.act2-group-body {
    flex: 1;
    min-width: 0;
}

.act2-group-main {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.act2-group-meta {
    margin-top: 0.2rem;
}

.act2-group-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* ── More chip ──────────────────────────────────────────────────── */
.act2-more-chip {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.67rem;
    font-weight: 700;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

[data-theme="dark"] .act2-more-chip {
    background: var(--accent-light);
    color: var(--accent);
}

details.act2-group[open] .act2-more-chip {
    background: var(--border);
    color: var(--text-muted);
}

/* ── Via import chip ────────────────────────────────────────────── */
.act2-via-chip {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-faint);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
}

/* ── Expand chevron ─────────────────────────────────────────────── */
.act2-expand-icon {
    font-size: 0.72rem;
    color: var(--text-faint);
    transition: transform 0.2s ease;
    display: inline-block;
    line-height: 1;
    align-self: center;
}

details.act2-group[open] .act2-expand-icon {
    transform: rotate(180deg);
}

/* ── Group children (expanded) ──────────────────────────────────── */
.act2-group-children {
    background: var(--bg);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

/* ── Sub-event rows ─────────────────────────────────────────────── */
.act2-sub-event {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
    padding: 0.5rem 1rem 0.5rem 1.1rem;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.act2-sub-event:last-child {
    border-bottom: none;
}

.act2-sub-event::before {
    content: '';
    position: absolute;
    left: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 3px;
    background: var(--border);
    border-radius: 50%;
    flex-shrink: 0;
}

.act2-sub-icon {
    font-size: 0.82rem;
    flex-shrink: 0;
}

.act2-sub-type {
    font-size: 0.82rem;
    font-weight: 600;
}

.act2-sub-time {
    font-size: 0.68rem;
    color: var(--text-faint);
    margin-left: auto;
    white-space: nowrap;
}

.act2-sub-notes {
    width: 100%;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 0.15rem;
}

.act2-sub--ai .act2-sub-type {
    color: var(--ai-text);
}

/* ── Photo thumbnail (reused class, no change) ─────────────────── */
/* .feed-thumb already defined in style.css — no override needed */

/* ── See why / health context ───────────────────────────────────── */
.act2-see-why-wrap {
    margin-top: 0.4rem;
    width: 100%;
}

details.act2-see-why > summary {
    list-style: none;
    cursor: pointer;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

details.act2-see-why > summary::-webkit-details-marker {
    display: none;
}

.act2-see-why-btn {
    font-size: 0.74rem;
    color: var(--ai-text);
    padding: 0.18rem 0.5rem;
    border-radius: 6px;
    transition: background 0.12s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

details.act2-see-why:hover .act2-see-why-btn,
details.act2-see-why[open] .act2-see-why-btn {
    background: var(--ai-bg);
}

/* On event cards (not sub-events), give the summary a little more room */
.act2-event .act2-see-why-btn {
    font-size: 0.78rem;
}

.act2-see-why-status {
    color: var(--text-muted);
    font-weight: 500;
}

.act2-why-chevron {
    font-size: 0.62rem;
    transition: transform 0.18s ease;
    display: inline-block;
    flex-shrink: 0;
}

details.act2-see-why[open] .act2-why-chevron {
    transform: rotate(180deg);
}

.act2-why-body {
    margin-top: 0.4rem;
    padding: 0.65rem 0.85rem;
    background: var(--ai-bg);
    border-radius: 8px;
    border-left: 3px solid var(--ai-text);
}

.act2-why-excerpt {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 0.4rem;
}

.act2-why-link {
    font-size: 0.72rem;
    color: var(--ai-text);
    text-decoration: none;
    font-weight: 500;
}

.act2-why-link:hover {
    text-decoration: underline;
}

/* ── Empty state ────────────────────────────────────────────────── */
.act2-empty {
    text-align: center;
    padding: 3.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .act2-hero-inner {
        padding: 2.25rem 1rem 2.25rem;
    }

    .act2-body {
        padding: 1.25rem 1rem 3rem;
    }

    .act2-event,
    .act2-group-row {
        padding: 0.7rem 0.85rem;
    }

    .act2-sub-event {
        padding: 0.45rem 0.85rem 0.45rem 1rem;
    }

    .act2-sort-bar {
        flex-wrap: wrap;
    }
}

/* ══════════════════════════════════════════════════════════════
   AUTH — Sign in · Sign up · Callback · Onboarding
   Glasshouse B design tokens. Standalone pages (no base nav).
══════════════════════════════════════════════════════════════ */

.auth-page {
    min-height: 100vh;
    background: var(--bg, #FAF8F5);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: var(--text, #1F2A24);
}

/* ── Auth hero band ── */
.auth-hero {
    background: var(--pd-hero-bg);
    color: var(--pd-hero-text);
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 60% 40%, rgba(63,181,122,0.12) 0%, transparent 60%);
    pointer-events: none;
}

.auth-hero-logo {
    position: relative;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a8d5b8;
    margin-bottom: 0.75rem;
}

.auth-hero h1 {
    position: relative;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--pd-hero-text);
    margin: 0 0 0.75rem;
}

.auth-hero h1 em {
    font-style: normal;
    color: #86efac;
}

.auth-hero-sub {
    position: relative;
    font-size: 1rem;
    color: rgba(242,237,221,0.7);
    line-height: 1.6;
}

/* ── Auth body ── */
.auth-body {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ── Path cards (two-up) ── */
.auth-paths {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 480px) {
    .auth-paths {
        grid-template-columns: 1fr;
    }
}

.auth-path-card {
    display: block;
    background: var(--surface, #fff);
    border: 1.5px solid var(--border, #E8EDE3);
    border-left: 4px solid var(--pd-forest);
    border-radius: 14px;
    padding: 1.25rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
    cursor: pointer;
}

.auth-path-card:hover {
    box-shadow: 0 4px 20px rgba(45,74,54,0.12);
    transform: translateY(-2px);
    border-color: var(--pd-forest);
    text-decoration: none;
}

.auth-path-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    display: block;
}

.auth-path-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--pd-forest);
    margin-bottom: 0.3rem;
}

.auth-path-desc {
    font-size: 0.8rem;
    color: var(--text-muted, #5C6961);
    line-height: 1.4;
}

/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted, #5C6961);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, #E8EDE3);
}

/* ── Auth form card ── */
.auth-form-card {
    background: var(--surface, #fff);
    border: 1.5px solid var(--border, #E8EDE3);
    border-left: 4px solid var(--pd-forest);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 2px 12px rgba(45,74,54,0.06);
}

.auth-form-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pd-forest);
    margin: 0 0 0.4rem;
}

.auth-form-card .auth-form-sub {
    font-size: 0.85rem;
    color: var(--text-muted, #5C6961);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* ── Form fields ── */
.auth-field {
    margin-bottom: 1rem;
}

.auth-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text, #1F2A24);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.auth-field input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border, #d4dcd0);
    border-radius: 9px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--surface, #fff);
    color: var(--text, #1F2A24);
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--pd-forest);
    box-shadow: 0 0 0 3px rgba(45,74,54,0.1);
}

.auth-field .auth-field-hint {
    font-size: 0.75rem;
    color: var(--text-muted, #5C6961);
    margin-top: 0.3rem;
}

/* ── Auth submit button ── */
.auth-submit {
    width: 100%;
    background: var(--pd-forest);
    color: #F2EDDD;
    border: none;
    border-radius: 9px;
    padding: 0.8rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.15s, transform 0.12s;
}

.auth-submit:hover {
    background: var(--pd-forest-light, #3a5e47);
    transform: translateY(-1px);
}

.auth-submit:active {
    transform: translateY(0);
}

/* ── Email sent confirmation ── */
.auth-email-sent {
    text-align: center;
    padding: 1.5rem 0;
}

.auth-email-sent .auth-sent-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.auth-email-sent h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pd-forest);
    margin-bottom: 0.5rem;
}

.auth-email-sent p {
    font-size: 0.9rem;
    color: var(--text-muted, #5C6961);
    line-height: 1.6;
}

.auth-email-sent strong {
    color: var(--text, #1F2A24);
}

/* ── Back link ── */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted, #5C6961);
    text-decoration: none;
    margin-top: 1.25rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--pd-sage, #E8EDE3);
    transition: background 0.15s;
}

.auth-back:hover {
    background: var(--pd-sage-dark, #d4dcd0);
    text-decoration: none;
    color: var(--text, #1F2A24);
}

/* ── Onboarding invite code ── */
.auth-invite-code-block {
    background: var(--pd-sage, #E8EDE3);
    border: 1.5px solid var(--pd-sage-dark, #d4dcd0);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-invite-code-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, #5C6961);
    margin-bottom: 0.5rem;
}

.auth-invite-code {
    font-family: 'Courier New', monospace;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--pd-forest);
    word-break: break-all;
}

.auth-invite-copy-btn {
    margin-top: 0.75rem;
    background: var(--pd-forest);
    color: #F2EDDD;
    border: none;
    border-radius: 7px;
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

.auth-invite-copy-btn:hover {
    background: var(--pd-forest-light, #3a5e47);
}

.auth-invite-expiry {
    font-size: 0.75rem;
    color: var(--text-muted, #5C6961);
    margin-top: 0.5rem;
}

/* ── Callback page ── */
.auth-callback-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--pd-hero-bg);
    color: var(--pd-hero-text);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    text-align: center;
    padding: 2rem;
}

.auth-callback-page h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #86efac;
    margin-bottom: 0.5rem;
}

.auth-callback-page p {
    font-size: 0.9rem;
    color: rgba(242,237,221,0.7);
}

/* ── Dark mode overrides ── */
[data-theme="dark"] .auth-page {
    background: #111A14;
    color: #E0DBD0;
}

[data-theme="dark"] .auth-path-card,
[data-theme="dark"] .auth-form-card {
    background: rgba(20,32,24,0.88);
    border-color: #2a3d2f;
}

[data-theme="dark"] .auth-path-card:hover,
[data-theme="dark"] .auth-form-card:hover {
    border-color: #3FB57A;
}

[data-theme="dark"] .auth-path-title {
    color: #3FB57A;
}

[data-theme="dark"] .auth-field input {
    background: #1F3326;
    border-color: #2a3d2f;
    color: #E0DBD0;
}

[data-theme="dark"] .auth-field input:focus {
    border-color: #3FB57A;
    box-shadow: 0 0 0 3px rgba(63,181,122,0.15);
}

[data-theme="dark"] .auth-submit {
    background: #3FB57A;
    color: #111A14;
}

[data-theme="dark"] .auth-submit:hover {
    background: #4fcb8a;
}

[data-theme="dark"] .auth-back {
    background: #1F3326;
    color: #8EA292;
}

[data-theme="dark"] .auth-back:hover {
    background: #2a4235;
    color: #E0DBD0;
}

[data-theme="dark"] .auth-invite-code-block {
    background: #1F3326;
    border-color: #2a4235;
}

[data-theme="dark"] .auth-invite-code {
    color: #3FB57A;
}

[data-theme="dark"] .auth-invite-copy-btn {
    background: #3FB57A;
    color: #111A14;
}

[data-theme="dark"] .auth-divider {
    color: #5C7A65;
}

[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after {
    background: #2a3d2f;
}

/* ── Mobile (390px) ── */
@media (max-width: 420px) {
    .auth-hero {
        padding: 2rem 1.25rem 1.75rem;
    }

    .auth-body {
        padding: 1.5rem 1rem 3rem;
    }

    .auth-form-card {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }

    .auth-invite-code {
        font-size: 1.4rem;
    }
}

/* ── Suggest-name button — disabled state (Add Plant) ── */
.btn-suggest:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Household settings page ──────────────────────────────────── */
.hh-info {
    margin-bottom: 2.25rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.hh-info-row {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.hh-info-label {
    color: var(--text-muted);
    min-width: 90px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hh-role-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: capitalize;
}

.hh-invite-heading {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.hh-invite-hint {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.hh-invite-form {
    max-width: 460px;
}

/* ══════════════════════════════════════════════════════════════
   ACCOUNT PAGE
   /account — profile + household + preferences merged
══════════════════════════════════════════════════════════════ */

/* ── Header user chip ── */
.header-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 0.7rem 0.3rem 0.35rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
}
.header-user-chip:hover {
    background: var(--border-light);
    color: var(--text);
}
.header-user-chip-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--pd-sage);
    color: var(--pd-forest);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    flex: 0 0 auto;
}
[data-theme="dark"] .header-user-chip-avatar {
    color: var(--pd-ivory);
}
.header-user-chip-name {
    font-size: 0.9rem;
    font-weight: 600;
}
.header-user-chip--active .header-user-chip-avatar {
    box-shadow: 0 0 0 2px var(--pd-forest);
}
[data-theme="dark"] .header-user-chip--active .header-user-chip-avatar {
    box-shadow: 0 0 0 2px var(--pd-card-stripe, #3FB57A);
}
@media (max-width: 640px) {
    .header-user-chip-name { display: none; }
}

/* ── Nav font override — Plus Jakarta Sans ── */
.header-nav-link {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
}
.header-nav-link.active {
    font-weight: 700;
}

/* ── Page layout ── */
.acct-body {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 4rem;
}

/* ── Section wrapper ── */
.acct-section {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-light);
}
.acct-section:last-of-type { border-bottom: none; }

.acct-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 1.1rem;
}

/* ── §5.2 You — profile card ── */
.acct-profile {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}
.acct-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--pd-sage);
    color: var(--pd-forest);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    flex: 0 0 auto;
}
[data-theme="dark"] .acct-avatar { color: var(--pd-ivory); }

.acct-avatar--sm {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
}
.acct-profile-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.acct-profile-name {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: var(--text);
    line-height: 1.2;
}
.acct-profile-email {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.acct-profile-email--missing { color: var(--text-faint); }
.acct-profile-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.acct-meta-sep { color: var(--text-faint); }
.acct-role-badge {
    margin-top: 0;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
}
.acct-profile-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.acct-action-note {
    font-size: 0.8rem;
    color: var(--text-faint);
    font-style: italic;
}

/* Inline edit row (change display name) — sits inside .acct-profile-body */
.acct-edit-row {
    margin-bottom: 0.2rem;
}
.acct-edit-row form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.acct-edit-row input {
    padding: 0.45rem 0.7rem;
    border: 1.5px solid var(--pd-forest);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-family: 'DM Serif Display', serif;
    font-size: 1.35rem;
    width: 100%;
    box-sizing: border-box;
}
.acct-edit-row-actions {
    display: flex;
    gap: 0.5rem;
}

/* ── §5.3 Display preferences ── */
.acct-sage-band {
    background: var(--pd-sage);
    margin: 0 -1.5rem;
    padding: 1.75rem 1.5rem;
}
.acct-pref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0;
    border-bottom: 1px solid color-mix(in oklab, var(--pd-forest) 12%, transparent);
}
.acct-pref-row:last-of-type { border-bottom: none; }
.acct-pref-name {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}
.acct-pref-control { display: flex; gap: 0.3rem; }
.acct-seg {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: transparent;
    border: 1px solid color-mix(in oklab, var(--pd-forest) 18%, transparent);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}
.acct-seg--active {
    background: var(--pd-forest);
    color: var(--pd-ivory);
    border-color: var(--pd-forest);
    font-weight: 600;
}
[data-theme="dark"] .acct-seg--active {
    background: var(--pd-card-stripe, #3FB57A);
    color: #0d1a11;
    border-color: var(--pd-card-stripe, #3FB57A);
}

/* iOS-style toggle */
.acct-toggle-btn {
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: color-mix(in oklab, var(--pd-forest) 18%, transparent);
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: background 0.18s;
    flex-shrink: 0;
}
.acct-toggle-btn[aria-pressed="true"] { background: var(--pd-forest); }
[data-theme="dark"] .acct-toggle-btn[aria-pressed="true"] {
    background: var(--pd-card-stripe, #3FB57A);
}
.acct-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.18s;
}
.acct-toggle-btn[aria-pressed="true"] .acct-toggle-thumb {
    transform: translateX(18px);
}
.acct-pref-deferred {
    margin-top: 1.25rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.acct-pref-deferred-icon { font-style: normal; color: var(--text-faint); }

/* ── §5.4 Your household ── */
.acct-hh-head { margin-bottom: 1.25rem; }
.acct-hh-name {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    color: var(--text);
    line-height: 1.2;
}
.acct-hh-meta { font-size: 0.85rem; color: var(--text-muted); }
.acct-members {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
}
.acct-member {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border-light);
}
.acct-member:last-child { border-bottom: none; }
.acct-member--you {
    background: color-mix(in oklab, var(--pd-sage) 35%, var(--surface));
}
.acct-member-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.acct-member-role {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── §5.5 Invite ── */
.acct-invite-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
}
.acct-invite-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}
.acct-invite-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.acct-invite-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.acct-invite-form input {
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.92rem;
}
.acct-invite-form input::placeholder { color: var(--text-faint); }
.acct-invite-alt {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border);
}
.acct-invite-alt-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.acct-invite-alt-slot { font-size: 0.9rem; color: var(--text-muted); }

.acct-hero-name {
    color: rgba(242, 237, 221, 0.85);
    font-weight: 600;
}

/* ── §5.6 Sign out ── */
.acct-signout-row {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.acct-signout-link {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.acct-signout-link:hover { color: var(--pd-coral); }

/* ── Section subtitle ── */
.acct-section-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: -0.6rem 0 1.2rem;
    line-height: 1.5;
}

/* ── Inline pencil edit trigger (name) ── */
.acct-profile-name-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.acct-name-edit-btn {
    border: none;
    background: transparent;
    color: var(--text-faint);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
    flex: 0 0 auto;
}
.acct-name-edit-btn:hover {
    color: var(--pd-forest);
    background: var(--pd-sage);
}
[data-theme="dark"] .acct-name-edit-btn:hover {
    color: var(--pd-card-stripe, #3FB57A);
    background: rgba(63, 181, 122, 0.12);
}
.acct-name-edit-btn svg { width: 16px; height: 16px; display: block; }

/* ── Display preferences — collapsible trigger ── */
.acct-display-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.1rem;
    background: var(--border-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text);
    text-align: left;
    gap: 1rem;
    transition: background 0.15s, border-color 0.15s;
}
.acct-display-trigger:hover {
    background: color-mix(in oklab, var(--pd-forest) 5%, var(--border-light));
    border-color: color-mix(in oklab, var(--pd-forest) 22%, var(--border));
}
.acct-display-trigger[aria-expanded="true"] {
    background: var(--pd-sage);
    border-color: color-mix(in oklab, var(--pd-forest) 22%, transparent);
}
[data-theme="dark"] .acct-display-trigger[aria-expanded="true"] {
    border-color: color-mix(in oklab, #3FB57A 35%, transparent);
}
.acct-display-summary {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}
.acct-display-trigger-right {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.acct-display-adjust {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}
.acct-display-trigger[aria-expanded="false"] .acct-display-adjust-open  { display: none; }
.acct-display-trigger[aria-expanded="true"]  .acct-display-adjust-closed { display: none; }
.acct-display-chevron {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    transition: transform 0.18s;
}
.acct-display-trigger[aria-expanded="true"] .acct-display-chevron {
    transform: rotate(180deg);
    color: var(--pd-forest);
}
[data-theme="dark"] .acct-display-trigger[aria-expanded="true"] .acct-display-chevron {
    color: var(--pd-card-stripe, #3FB57A);
}
.acct-display-body { margin-top: 0.85rem; }

/* ── Role picker ── */
.acct-role-picker {
    position: relative;
    display: inline-block;
}
.acct-role-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.45rem 0.22rem 0.55rem;
    border-radius: 999px;
    background: var(--pd-sage);
    color: var(--pd-forest);
    border: 1px solid color-mix(in oklab, var(--pd-forest) 20%, transparent);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.acct-role-trigger:hover {
    border-color: color-mix(in oklab, var(--pd-forest) 40%, transparent);
    background: color-mix(in oklab, var(--pd-forest) 8%, var(--pd-sage));
}
.acct-role-trigger[aria-expanded="true"] {
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--pd-forest) 12%, transparent);
    border-color: color-mix(in oklab, var(--pd-forest) 45%, transparent);
}
.acct-role-trigger svg {
    width: 11px;
    height: 11px;
    transition: transform 0.15s;
    display: block;
}
.acct-role-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
[data-theme="dark"] .acct-role-trigger {
    background: rgba(63, 181, 122, 0.15);
    color: var(--pd-card-stripe, #3FB57A);
    border-color: rgba(63, 181, 122, 0.25);
}
[data-theme="dark"] .acct-role-trigger:hover {
    background: rgba(63, 181, 122, 0.22);
}

.acct-role-menu {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
    padding: 0.35rem;
    z-index: 30;
    list-style: none;
    margin: 0;
}
.acct-role-menu[hidden] { display: none; }
.acct-role-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    font-size: 0.88rem;
    color: var(--text);
    cursor: pointer;
    font-weight: 500;
    user-select: none;
}
.acct-role-option:hover { background: var(--border-light); }
.acct-role-option--active {
    background: var(--pd-sage);
    color: var(--pd-forest);
    font-weight: 600;
}
[data-theme="dark"] .acct-role-option--active {
    background: rgba(63, 181, 122, 0.15);
    color: var(--pd-card-stripe, #3FB57A);
}
.acct-role-option-check {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--pd-forest);
    display: block;
}
.acct-role-option-check.is-empty { visibility: hidden; }
.acct-role-option--custom {
    border-top: 1px solid var(--border-light);
    margin-top: 0.25rem;
    padding-top: 0.6rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Custom title inline input */
.acct-custom-role-row[hidden] { display: none; }
.acct-custom-role-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.3rem;
}
.acct-custom-role-form input {
    padding: 0.4rem 0.7rem;
    border: 1.5px solid var(--pd-forest);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.92rem;
    width: 200px;
    max-width: 100%;
}

/* Invite section — sage band */
.acct-section--invite {
    background: var(--pd-sage);
    margin: 2rem -1.5rem;
    padding: 2rem 1.5rem;
    border-bottom: none;
}
[data-theme="dark"] .acct-section--invite {
    background: rgba(45, 74, 54, 0.18);
}
.acct-section--invite .acct-section-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.acct-section-icon {
    width: 24px;
    height: 18px;
    flex-shrink: 0;
    color: var(--pd-forest);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
[data-theme="dark"] .acct-section-icon {
    color: var(--pd-sage);
    opacity: 0.85;
}


/* ══════════════════════════════════════════════════════════════
   ══ LANDING PAGE ══
   Public-facing page at / for unauthenticated visitors.
   Standalone — no base.html nav.
══════════════════════════════════════════════════════════════ */

/* ── Page shell ── */
.lp-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg, #FAF8F5);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: var(--text, #1F2A24);
}

/* ── Hero ── */
.lp-hero {
    background: var(--pd-hero-bg);
    color: var(--pd-hero-text);
    padding: 4rem 1.5rem 4.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Botanical radial glow — matches auth-hero */
.lp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 60% 30%, rgba(63,181,122,0.14) 0%, transparent 55%),
        radial-gradient(ellipse at 25% 75%, rgba(63,181,122,0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* ── Wordmark ── */
.lp-wordmark {
    position: relative;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a8d5b8;
    margin: 0 0 1.5rem;
}

/* ── Headline ── */
.lp-headline {
    position: relative;
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.6rem, 9vw, 5rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--pd-hero-text);
    margin: 0 0 1.25rem;
}

/* ── Subline ── */
.lp-sub {
    position: relative;
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    font-weight: 400;
    color: rgba(242, 237, 221, 0.72);
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto 2.25rem;
}

/* ── CTA group ── */
.lp-ctas {
    position: relative;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Primary CTA — ivory fill, forest text */
.lp-btn-primary {
    display: inline-block;
    background: var(--pd-ivory);
    color: var(--pd-forest);
    border: none;
    border-radius: 9999px;
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.lp-btn-primary:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}

.lp-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Ghost CTA — ivory outline, transparent bg */
.lp-btn-ghost {
    display: inline-block;
    background: transparent;
    color: var(--pd-ivory);
    border: 1.5px solid rgba(242, 237, 221, 0.55);
    border-radius: 9999px;
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.lp-btn-ghost:hover {
    border-color: var(--pd-ivory);
    background: rgba(242, 237, 221, 0.1);
    transform: translateY(-2px);
}

.lp-btn-ghost:active {
    transform: translateY(0);
}

/* ── Feature cards section ── */
.lp-features {
    background: var(--bg, #FAF8F5);
    padding: 3.5rem 1.5rem;
    flex: 1;
}

.lp-features-inner {
    max-width: 820px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.lp-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5ebe2);
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    text-align: left;
}

.lp-card-emoji {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.lp-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text, #1F2A24);
    margin: 0 0 0.4rem;
    letter-spacing: -0.01em;
}

.lp-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted, #5a7364);
    line-height: 1.55;
    margin: 0;
}

/* ── Footer ── */
.lp-footer {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border, #e5ebe2);
}

.lp-footer p {
    font-size: 0.8rem;
    color: var(--text-muted, #8aab94);
    letter-spacing: 0.02em;
    margin: 0;
}

/* ── Responsive — collapse to 1-col on mobile ── */
@media (max-width: 600px) {
    .lp-hero {
        padding: 3rem 1.25rem 3.5rem;
    }

    .lp-features-inner {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .lp-ctas {
        flex-direction: column;
        align-items: center;
    }

    .lp-btn-primary,
    .lp-btn-ghost {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

/* Dark mode — cards adapt, hero is always dark */
[data-theme="dark"] .lp-card {
    background: var(--surface, #1e2e23);
    border-color: var(--border, #2d4a36);
}

[data-theme="dark"] .lp-footer {
    border-color: var(--border, #2a3d2f);
}


/* ══════════════════════════════════════════════════════════════
   PLANT DETAIL REDESIGN v0.24.0
   Hierarchy rethink: photo strip, log-care lift, collapsed care
   notes, AI primary/secondary buttons, badge anchor.
   Spec: docs/superpowers/specs/2026-06-04-plant-detail-redesign.md
══════════════════════════════════════════════════════════════ */

/* ── Hero badge anchor (warning/alert only) ── */
.pd-badge-link {
    text-decoration: none;
    cursor: pointer;
}
.pd-badge-seewhy {
    opacity: 0.8;
    font-size: 0.9em;
    margin-left: 0.3em;
}

/* ── Hero pill row — badge + zone chip side by side ── */
.pd-hero-pills-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
    align-self: flex-start;
}

/* ── Zone chip on dark hero (forest green bg, always) ── */
.pd-zone-chip {
    background: rgba(242, 237, 221, 0.15);
    border: 1px solid rgba(242, 237, 221, 0.3);
    color: var(--pd-ivory);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    cursor: pointer;
}
.pd-zone-chip:hover {
    background: rgba(242, 237, 221, 0.25);
    border-color: rgba(242, 237, 221, 0.5);
}
.pd-zone-chip--empty {
    background: transparent;
    border: 1px dashed rgba(242, 237, 221, 0.35);
    color: rgba(242, 237, 221, 0.55);
}
.pd-zone-chip--empty:hover {
    border-color: rgba(242, 237, 221, 0.6);
    color: rgba(242, 237, 221, 0.85);
}

/* ── Photo strip (collapsed state) ── */
.pd-photo-strip {
    display: flex;
    gap: 8px;
    padding: 0.75rem 0;
    align-items: center;
    overflow: hidden;
}
.pd-photo-strip-thumb-wrap {
    position: relative;
    flex-shrink: 0;
}
.pd-photo-strip-thumb {
    width: 76px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    display: block;
}
.pd-photo-strip-add {
    width: 76px;
    height: 76px;
    border-radius: 10px;
    border: 2px dashed var(--pd-forest);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    background: transparent;
    color: var(--pd-forest);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.7rem;
    gap: 2px;
}
.pd-photo-strip-add .pd-add-plus {
    font-size: 1.4rem;
    line-height: 1;
}
.pd-photo-strip-counter {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.9rem 0.5rem;   /* ≥44px touch target */
    min-height: 44px;
    font-family: inherit;
}

/* ── Unanalysed photo dot indicator ── */
.pd-photo-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #7c3aed;
    border: 1.5px solid white;
    animation: pd-dot-pulse 2.2s ease-in-out infinite;
}
@keyframes pd-dot-pulse {
    0%, 100% { transform: scale(1);   opacity: 1;    }
    50%      { transform: scale(1.2); opacity: 0.65; }
}

/* ── Expanded gallery wrapper ── */
.pd-photo-expanded {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.pd-photo-expanded.open {
    max-height: 2500px;   /* generous — gallery stacks tall at mobile widths */
}
.pd-photo-analysed {
    color: var(--text-muted);
    font-size: 0.78rem;
}
.pd-photo-not-analysed {
    font-style: italic;
}

/* ── Care Notes collapse ── */
.pd-care-notes-body {
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.pd-care-notes-collapsed .pd-care-notes-body {
    max-height: 0;
}
.pd-care-notes:not(.pd-care-notes-collapsed) .pd-care-notes-body {
    max-height: 3000px;
}
.pd-care-notes-summary {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.4rem 0;
    margin: 0;
}
.pd-care-notes:not(.pd-care-notes-collapsed) .pd-care-notes-summary {
    display: none;
}
.pd-care-notes-toggle {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.9rem 0.5rem;   /* ≥44px touch target */
    min-height: 44px;
    font-family: inherit;
}

/* ── AI tools section ── */
.pd-ai-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #7c3aed;
    margin: 0 0 0.75rem;
}
.btn-ai-primary {
    display: block;
    width: 100%;
    background: #7c3aed;
    color: white;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    font-family: inherit;
}
.btn-ai-primary:hover {
    opacity: 0.92;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}
.btn-ai-secondary {
    display: block;
    width: 100%;
    background: white;
    border: 2px solid #7c3aed;
    color: #7c3aed;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    font-family: inherit;
}
.btn-ai-secondary:hover {
    background: rgba(124, 58, 237, 0.06);
}
.btn-ai-sub-label {
    font-size: 0.78rem;
    font-weight: 400;
    opacity: 0.8;
    display: block;
    margin-top: 0.2rem;
}
.pd-ai-section form {
    margin-bottom: 0.6rem;
}
.pd-ai-edit-link {
    display: inline-block;
    color: var(--accent);
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0.4rem 0;
}
.pd-ai-edit-link:hover {
    text-decoration: underline;
}

/* ── Disabled states for new AI buttons (mirror .btn-ai:disabled) ── */
.btn-ai-primary:disabled,
.btn-ai-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(40%);
    box-shadow: none;
}

/* ── Dark mode overrides ── */
[data-theme="dark"] .btn-ai-primary {
    background: #5c35a0;
    color: white;
}
[data-theme="dark"] .btn-ai-secondary {
    background: transparent;
    border-color: #a78bfa;
    color: #a78bfa;
}
[data-theme="dark"] .btn-ai-secondary:hover {
    background: rgba(167, 139, 250, 0.1);
}
[data-theme="dark"] .pd-care-notes-summary {
    color: var(--text-muted);
    opacity: 0.85;
}
[data-theme="dark"] .pd-photo-strip-add {
    border-color: var(--pd-forest-light);
    color: var(--pd-forest-light);
}

/* ── Hero edit link (v0.24.3) ── */
.pd-hero-edit-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: rgba(242, 237, 221, 0.65);
    background: rgba(242, 237, 221, 0.08);
    border: 1px solid rgba(242, 237, 221, 0.2);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pd-hero-edit-link:hover {
    color: rgba(242, 237, 221, 0.95);
    background: rgba(242, 237, 221, 0.14);
    border-color: rgba(242, 237, 221, 0.4);
}


/* ══════════════════════════════════════════════════════════════
   ZONES
   /zones management page — photo-led redesign, Glasshouse B
══════════════════════════════════════════════════════════════ */

/* ── Hero pills ────────────────────────────────────────────── */
.zones-hero-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}
.zones-hero-pill {
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.zones-hero-pill--sage {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.zones-hero-pill--coral {
    background: #E86D4F;
    color: #fff;
}

/* ── Page wrapper ───────────────────────────────────────────── */
.zones-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
    background: var(--pd-sage);
}

/* ── Create card ────────────────────────────────────────────── */
.zones-create-card {
    background: var(--card-bg, #fff);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.zones-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}
.zones-create-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: inherit;
    background: var(--input-bg, #fff);
    color: var(--text-primary);
    margin-bottom: 1rem;
}
.zones-create-input:focus {
    outline: none;
    border-color: var(--pd-forest);
    box-shadow: 0 0 0 2px rgba(45, 74, 54, 0.12);
}
.zones-facing-label {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.zones-optional {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.zones-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.zones-chip input[type="radio"] {
    display: none;
}
.zones-chip span {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: var(--pd-sage);
    color: var(--text-primary);
    font-size: 0.82rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s, color 0.12s;
}
.zones-chip input:checked + span {
    background: var(--pd-forest);
    color: #fff;
}
.zones-create-btn {
    width: 100%;
    padding: 0.7rem;
    border-radius: 999px;
    background: var(--pd-forest);
    color: #fff;
    border: none;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.zones-create-btn:hover {
    background: var(--pd-forest-light);
}
.zones-create-btn:disabled {
    background: var(--pd-sage);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

/* ── Zone list ──────────────────────────────────────────────── */
.zones-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ── Zone card ──────────────────────────────────────────────── */
.zones-card {
    background: var(--card-bg, #fff);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 1.25rem;
    border-left: 3px solid var(--pd-forest);
}
.zones-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}
.zones-card-name {
    font-family: 'DM Serif Display', serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}
.zones-menu-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    line-height: 1;
    flex-shrink: 0;
    min-height: 32px;
    min-width: 32px;
    letter-spacing: 0.04em;
}
.zones-menu-btn:hover {
    background: var(--pd-sage);
}
.zones-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}
.zones-facing-pill {
    background: var(--pd-sage);
    color: var(--text-primary);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}
.zones-count-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ── "..." menu ─────────────────────────────────────────────── */
.zones-menu {
    display: none;
    flex-direction: column;
    gap: 0.6rem;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.85rem;
}
.zones-menu--open {
    display: flex;
}
.zones-rename-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.zones-rename-input {
    flex: 1;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    background: var(--input-bg, #fff);
    color: var(--text-primary);
}
.zones-rename-input:focus {
    outline: none;
    border-color: var(--pd-forest);
}
.zones-rename-btn {
    padding: 0.45rem 0.85rem;
    background: var(--pd-sage);
    color: var(--pd-forest);
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.zones-rename-btn:hover {
    background: var(--pd-sage-dark);
}
.zones-delete-btn {
    background: none;
    border: 1px solid #e11d48;
    color: #e11d48;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
    transition: background 0.12s;
}
.zones-delete-btn:hover:not(:disabled) {
    background: #fff0f3;
}
.zones-delete-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--border-color, #e5e7eb);
    color: var(--text-muted);
}

/* ── Thumbnail strip ────────────────────────────────────────── */
.zones-thumb-strip {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    margin-bottom: 0.85rem;
    scrollbar-width: none;
}
.zones-thumb-strip::-webkit-scrollbar { display: none; }
.zones-thumb-item {
    flex-shrink: 0;
    width: 72px;
    text-align: center;
}
.zones-thumb-img-wrap {
    position: relative;
    width: 72px;
    height: 72px;
}
.zones-thumb-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}
.zones-remove-form {
    display: contents;
}
.zones-remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #666;
    line-height: 1;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    /* Expand tap target without changing visual size */
    min-height: 22px;
    min-width: 22px;
}
.zones-remove-btn:hover {
    background: #fff0f3;
    color: #e11d48;
    border-color: #e11d48;
}
.zones-thumb-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin: 0.3rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Empty strip ────────────────────────────────────────────── */
.zones-empty-strip {
    border: 2px dashed var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    margin-bottom: 0.85rem;
    background: var(--pd-sage);
}
.zones-empty-icon {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 0.35rem;
}
.zones-empty-strip p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* ── Add plants button ──────────────────────────────────────── */
.zones-add-btn {
    background: var(--pd-sage);
    color: var(--pd-forest);
    border: none;
    border-radius: 999px;
    font-size: 0.87rem;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    cursor: pointer;
    transition: background 0.12s;
}
.zones-add-btn:hover {
    background: var(--pd-sage-dark);
}

/* ── Picker panel ───────────────────────────────────────────── */
.zones-picker {
    display: none;
    margin-top: 0.75rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 0.85rem;
    background: var(--card-bg, #fff);
}
.zones-picker--open {
    display: block;
}
.zones-picker-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-primary);
}
.zones-picker-count {
    color: var(--text-muted);
    font-size: 0.8rem;
    flex: 1;
    text-align: right;
}
.zones-picker-close {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.15rem 0.3rem;
    line-height: 1;
}
.zones-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
.zones-picker-item {
    background: none;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    padding: 0.4rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    transition: border-color 0.12s, background 0.12s;
    width: 100%;
}
.zones-picker-item:hover {
    border-color: var(--pd-forest);
    background: rgba(45, 74, 54, 0.04);
}
.zones-picker-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 7px;
    display: block;
}
.zones-picker-name {
    font-size: 0.72rem;
    text-align: center;
    color: var(--text-primary);
    line-height: 1.3;
    word-break: break-word;
}
.zones-picker-empty {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    margin: 0;
}

/* ── Unassigned section ─────────────────────────────────────── */
.zones-unassigned {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
}
.zones-unassigned-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}
.zones-unassigned-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
}
.zones-coral-pill {
    background: #E86D4F;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
}
.zones-unassigned-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
}
.zones-unassigned-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

/* ── Unassigned plant card ──────────────────────────────────── */
.zones-ucard {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 0.6rem;
    text-align: center;
    position: relative;
}
.zones-ucard-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 0.4rem;
}
.zones-ucard-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 0.15rem;
    line-height: 1.3;
}
.zones-ucard-species {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
    line-height: 1.3;
}

/* ── Inline zone picker on ucard ───────────────────────────── */
.zones-ucard-picker {
    display: none;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    padding-top: 0.5rem;
    text-align: left;
}
.zones-ucard-picker--open {
    display: block;
}
.zones-ucard-zone-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.4rem 0.5rem;
    background: none;
    border: none;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.1s;
}
.zones-ucard-zone-btn:hover {
    background: var(--pd-sage);
}
.zones-ucard-no-zones {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 0.35rem;
    font-style: italic;
}
.zones-ucard-close {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.3rem;
    background: var(--pd-sage);
    border: none;
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--pd-forest);
    cursor: pointer;
    margin-top: 0.4rem;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.1s;
}
.zones-ucard-close:hover {
    background: var(--pd-sage-dark);
}

/* ── Full empty state ───────────────────────────────────────── */
.zones-full-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-style: italic;
}

/* ── Dark mode ──────────────────────────────────────────────── */
[data-theme="dark"] .zones-page {
    background: var(--dark-bg, #111a14);
}
[data-theme="dark"] .zones-create-card,
[data-theme="dark"] .zones-card,
[data-theme="dark"] .zones-picker,
[data-theme="dark"] .zones-menu {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: none;
}
[data-theme="dark"] .zones-ucard {
    background: var(--card-bg);
    border-color: var(--border-color);
}
[data-theme="dark"] .zones-create-input,
[data-theme="dark"] .zones-rename-input {
    background: #1a2520;
    border-color: var(--border-color);
    color: var(--text-primary);
}
[data-theme="dark"] .zones-picker-item {
    border-color: var(--border-color);
}
[data-theme="dark"] .zones-picker-item:hover {
    background: rgba(232, 237, 227, 0.05);
}
[data-theme="dark"] .zones-remove-btn {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-muted);
}
[data-theme="dark"] .zones-unassigned {
    border-color: var(--border-color);
}
[data-theme="dark"] .zones-ucard-picker {
    border-color: var(--border-color);
}
[data-theme="dark"] .zones-empty-strip {
    border-color: var(--border-color);
}
[data-theme="dark"] .zones-menu {
    border-color: var(--border-color);
}
[data-theme="dark"] .zones-hero-pill--sage {
    background: rgba(232, 237, 227, 0.15);
    color: var(--pd-ivory);
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .zones-unassigned-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .zones-picker-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Plant card zone chip (used on /plants grid) ── */
.plant-zone-chip {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--pd-sage);
    color: var(--pd-forest);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
    border: 1.5px solid transparent;
    margin-top: 0.35rem;
    -webkit-appearance: none;
    appearance: none;
}
.plant-zone-chip:hover {
    background: var(--pd-sage-dark);
}
.plant-zone-chip--empty {
    background: transparent;
    border: 1.5px dashed rgba(45, 74, 54, 0.35);
    color: var(--text-muted);
}
.plant-zone-chip--empty:hover {
    border-color: var(--pd-forest);
    color: var(--pd-forest);
}
[data-theme="dark"] .plant-zone-chip {
    background: var(--pd-sage);   /* remaps to #1F3326 in dark mode */
    color: #3FB57A;
}
[data-theme="dark"] .plant-zone-chip:hover {
    background: var(--pd-sage-dark);
}
[data-theme="dark"] .plant-zone-chip--empty {
    border-color: rgba(63, 181, 122, 0.35);
    color: var(--text-muted);
}
[data-theme="dark"] .plant-zone-chip--empty:hover {
    border-color: #3FB57A;
    color: #3FB57A;
}

/* Zone colour variants — cycling palette for named zones */
.plant-zone-chip--c1 { background: #edddd4; color: #6b3a22; border-color: transparent; }
.plant-zone-chip--c1:hover { background: #e1ccbf; }
.plant-zone-chip--c2 { background: #e1dbf2; color: #3d2d6e; border-color: transparent; }
.plant-zone-chip--c2:hover { background: #d2cae8; }
.plant-zone-chip--c3 { background: #f0e9c4; color: #5c4614; border-color: transparent; }
.plant-zone-chip--c3:hover { background: #e4dab3; }
.plant-zone-chip--c4 { background: #cce2f0; color: #1a3e5c; border-color: transparent; }
.plant-zone-chip--c4:hover { background: #bad4e4; }
[data-theme="dark"] .plant-zone-chip--c1 { background: #3d2010; color: #d4967d; border-color: transparent; }
[data-theme="dark"] .plant-zone-chip--c2 { background: #1e1730; color: #a99cc8; border-color: transparent; }
[data-theme="dark"] .plant-zone-chip--c3 { background: #2d2500; color: #c8ae6a; border-color: transparent; }
[data-theme="dark"] .plant-zone-chip--c4 { background: #0d2030; color: #7aaecc; border-color: transparent; }

/* Ensure div.plant-card (changed from <a>) keeps pointer cursor */
.plant-card { cursor: pointer; }

/* ── Unassigned zone select ─────────────────────────────────── */
.zones-ucard-form { margin-top: 0.45rem; }
.zones-ucard-select {
    width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--surface, #fff);
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 1.8rem;
}
.zones-ucard-select:focus {
    outline: none;
    border-color: var(--pd-forest);
}
[data-theme="dark"] .zones-ucard-select {
    background-color: var(--card-bg, #1a2e22);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23aaa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ── Mobile header: 2-row layout (brand+controls / nav) ─────── */
@media (max-width: 640px) {
    header {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 0 !important;
        padding: 0.65rem 1rem !important;
    }
    .header-brand { flex: 1 1 auto; }
    .header-controls {
        flex: 0 0 auto !important;
        align-self: center !important;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }
    nav.header-nav {
        flex: 0 0 100%;
        order: 10;
        padding: 0.45rem 0 0;
        gap: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.07);
        margin-top: 0.25rem;
    }
    [data-theme="dark"] nav.header-nav { border-top-color: rgba(255, 255, 255, 0.1); }
    #font-toggle, #bold-toggle { display: none !important; }
}

