/* Journal app: grows on the left, the chosen grow's journal on the right. */
/* ---------- account menu ---------- */
.account{position:relative}
.account-btn{display:flex;align-items:center;gap:8px;font:inherit;font-size:var(--t-sm);font-weight:500;color:var(--muted);background:transparent;border:1px solid var(--line);border-radius:var(--r-pill);padding:4px 10px 4px 4px;cursor:pointer;transition:background-color .15s,color .15s}
.account-btn:hover,.account-btn[aria-expanded="true"]{background:var(--soft);color:var(--ink)}
.avatar{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--honey-soft);color:var(--honey);font-family:var(--f-display);font-size:.95rem;line-height:1;text-transform:uppercase}
.account-email{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:24ch}
.chev{width:16px;height:16px;transition:transform .2s}
.account-btn[aria-expanded="true"] .chev{transform:rotate(180deg)}
@media (max-width:600px){.account-email{display:none}}

.menu{position:absolute;right:0;top:calc(100% + 8px);z-index:20;width:min(280px,calc(100vw - 32px));background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:8px;display:flex;flex-direction:column;animation:menu-in .14s ease-out}
.menu[hidden]{display:none}
@keyframes menu-in{from{opacity:0;transform:translateY(-4px)}}
.menu-head{display:flex;flex-direction:column;padding:8px 12px 12px;font-size:var(--t-sm);line-height:1.4}
.menu-head strong{font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.menu hr{border:0;border-top:1px solid var(--line);margin:6px 4px}
.menu [role="menuitem"]{display:flex;align-items:center;gap:12px;width:100%;font:inherit;font-size:var(--t-sm);font-weight:500;color:var(--ink);text-decoration:none;text-align:left;background:none;border:0;border-radius:var(--r-sm);padding:10px 12px;cursor:pointer}
.menu [role="menuitem"]:hover,.menu [role="menuitem"]:focus-visible{background:var(--soft);outline:0}
.menu [role="menuitem"] svg{width:18px;height:18px;flex:none;fill:none;stroke:var(--muted);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.menu .menu-danger{color:var(--bad)}
.menu .menu-danger svg{stroke:currentColor}
.menu .menu-danger:hover,.menu .menu-danger:focus-visible{background:color-mix(in srgb,var(--bad) 10%,transparent)}
.label{font-size:var(--t-sm);color:var(--muted)}

.stack{display:flex;flex-direction:column;gap:18px}
.form-msg{font-size:var(--t-sm);min-height:1.4em;color:var(--muted)}
.form-msg:empty{min-height:0}
.form-msg.error{color:var(--bad)}
.form-msg.success{color:var(--good)}
.link{background:none;border:0;padding:0;font:inherit;font-size:var(--t-sm);color:var(--muted);text-decoration:underline;text-underline-offset:3px;cursor:pointer;align-self:flex-start}
.link:hover{color:var(--ink)}
.check{display:flex;gap:10px;align-items:flex-start;font-size:.95rem}
.check input{width:18px;height:18px;margin-top:3px;flex:none;accent-color:var(--primary)}

/* ---------- log in / sign up ---------- */
.center{display:flex;justify-content:center;padding-block:clamp(32px,7vw,88px)}
.card{width:100%;max-width:440px;background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--shadow);padding:clamp(24px,4vw,36px);display:flex;flex-direction:column;gap:20px}
.card h1{font-size:var(--t-xl)}
.tabs{display:grid;grid-template-columns:1fr 1fr;background:var(--soft);border-radius:var(--r-pill);padding:4px}
.tabs button{font:600 var(--t-sm)/1 var(--f-body);padding:11px;border:0;border-radius:var(--r-pill);background:transparent;color:var(--muted);cursor:pointer;transition:background-color .2s,color .2s}
.tabs button[aria-selected="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgb(0 0 0 / .08)}

/* ---------- layout ---------- */
.app{display:grid;grid-template-columns:270px 1fr;gap:clamp(24px,4vw,48px);padding-block:16px 48px;align-items:start}
@media (max-width:860px){.app{grid-template-columns:minmax(0,1fr)}}
.sidebar{display:flex;flex-direction:column;gap:14px;background:var(--surface);border-radius:var(--r-lg);padding:18px;position:sticky;top:calc(env(safe-area-inset-top,0px) + 16px)}
@media (max-width:860px){.sidebar{position:static}}
.side-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:4px 4px 0}
.side-head h2{font-size:var(--t-lg);white-space:nowrap}
.grow-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
@media (max-width:860px){.grow-list{flex-direction:row;overflow-x:auto;padding-bottom:4px}}
.grow-item{display:flex;flex-direction:column;gap:2px;width:100%;text-align:left;font:inherit;color:var(--ink);background:transparent;border:0;border-radius:var(--r);padding:12px 14px;cursor:pointer;transition:background-color .15s}
@media (max-width:860px){.grow-item{min-width:190px;background:var(--bg)}}
.grow-item:hover{background:var(--bg)}
.grow-item[aria-current="true"]{background:var(--soft)}
.grow-item strong{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.grow-item span{font-size:.82rem;color:var(--muted)}

.content{min-width:0;display:flex;flex-direction:column}
.empty{display:flex;flex-direction:column;gap:16px;align-items:flex-start;max-width:34em;padding:clamp(24px,5vw,48px);background:var(--surface);border-radius:var(--r-lg)}
.empty-art{width:128px;height:128px;padding:18px;border-radius:50%;background:var(--soft);display:grid;place-items:center}
/* Botanical line art (drawn by js/art.js into [data-art] elements) */
[data-art] svg{display:block;width:100%;height:auto}
.card-sprig{width:128px;align-self:center;margin:-6px 0 -10px}
.empty-sprig{width:140px;margin-bottom:4px}
.tl-empty-art{width:72px;margin-bottom:2px}
.empty h1{font-size:var(--t-2xl)}

/* ---------- grow header ---------- */
.grow-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px;padding-top:8px}
.grow-head h1{font-size:var(--t-2xl);overflow-wrap:anywhere}
.grow-actions{display:flex;gap:8px;flex-wrap:wrap}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-block:24px 28px}
.stats > div{background:var(--surface);border-radius:var(--r);padding:16px 18px;display:flex;flex-direction:column;gap:2px}
.stats .v{font-family:var(--f-display);font-size:1.5rem;font-variant-numeric:tabular-nums;line-height:1.2}
.stats .v.flower{color:var(--berry)}
@media (max-width:620px){.stats{grid-template-columns:1fr 1fr}}

.stats .v.done{color:var(--honey)}
.grow-item.done span{color:var(--honey)}

/* ---------- harvest ---------- */
.harvest-btn{background:var(--honey-soft);color:var(--ink);border-color:color-mix(in srgb,var(--honey) 35%,transparent)}
.harvest-btn:hover{box-shadow:none;background:color-mix(in srgb,var(--honey) 22%,var(--surface))}
.harvest-btn svg{width:17px;height:17px;fill:none;stroke:var(--honey);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.harvest-card{margin-bottom:28px;padding:clamp(20px,3vw,28px);border-radius:var(--r-lg);background:linear-gradient(135deg,var(--honey-soft),var(--surface) 70%);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--honey) 25%,transparent);display:flex;flex-direction:column;gap:20px}
.harvest-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:10px 20px}
.harvest-top h2{font-size:var(--t-xl)}
.harvest-top-right{display:flex;align-items:center;gap:16px}
.stars-show{color:var(--honey);letter-spacing:.12em;font-size:1.1rem}
.harvest-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px}
.harvest-stats > div{display:flex;flex-direction:column;gap:2px;padding:14px 16px;border-radius:var(--r);background:var(--surface)}
.harvest-stats strong{font-size:1.35rem;font-weight:600;line-height:1.25}
.harvest-stats .big strong{font-size:2rem;letter-spacing:-.01em}
.harvest-stats .muted{font-size:.8rem}
.harvest-stats .pending{justify-content:center;border:1px dashed color-mix(in srgb,var(--honey) 45%,transparent);background:transparent}
.harvest-note{white-space:pre-wrap;overflow-wrap:anywhere;max-width:65ch;padding-left:14px;border-left:2px solid var(--honey)}

/* ---------- feeding chart ---------- */
.feed-card{margin-bottom:28px;background:var(--surface);border-radius:var(--r-lg);padding:clamp(20px,3vw,28px);display:flex;flex-direction:column;gap:18px}
.feed-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px 20px}
.feed-head h2{font-size:var(--t-xl)}
.feed-weeknav{display:flex;gap:6px}
.round-btn{width:40px;height:40px;flex:none;display:grid;place-items:center;padding:0;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;transition:background-color .15s,opacity .15s}
.round-btn:hover:not(:disabled){background:var(--soft)}
.round-btn:disabled{opacity:.35;cursor:default}
.round-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.feed-setup{display:flex;flex-wrap:wrap;align-items:flex-end;gap:14px 18px;padding:14px;border-radius:var(--r);background:var(--bg)}
.feed-setup input,.feed-setup select{background:var(--surface)}
.feed-line{flex:1 1 260px}
.feed-size{flex:0 1 190px}
.feed-strength{flex:0 0 auto}
.feed-strength .label{font-weight:600;color:var(--ink)}
.metric-tabs button[aria-checked="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgb(0 0 0 / .08)}
.joined{display:flex}
.joined input{border-radius:var(--r-sm) 0 0 var(--r-sm)}
.joined select{width:auto;flex:none;border-left:0;border-radius:0 var(--r-sm) var(--r-sm) 0}

.feed-body{display:flex;flex-direction:column;gap:14px}
.feed-week{color:var(--muted)}
.feed-week strong{font-family:var(--f-display);font-weight:400;font-size:var(--t-lg);color:var(--ink)}
.feed-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.feed-list li{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 2px;border-bottom:1px solid var(--line)}
.feed-name{display:flex;align-items:center;font-weight:600;min-width:0;overflow-wrap:anywhere}
.feed-list.ordered{counter-reset:mix}
.feed-list.ordered li{counter-increment:mix}
.feed-list.ordered .feed-name::before{content:counter(mix);display:grid;place-items:center;flex:none;width:26px;height:26px;margin-right:12px;border-radius:50%;background:var(--honey-soft);color:var(--honey);font-size:.8rem;font-weight:700}
.feed-amt{display:flex;flex-direction:column;align-items:flex-end;text-align:right;flex:none}
.feed-amt strong{font-size:1.35rem;font-weight:600;line-height:1.2;font-variant-numeric:tabular-nums}
.feed-amt small{font-size:.8rem;color:var(--muted)}
.feed-extras .label{margin-bottom:4px}
.feed-extras .feed-list li{padding:8px 2px}
.feed-extras .feed-name{font-weight:500}
.feed-extras .feed-amt strong{font-size:1rem}
.feed-water{display:flex;align-items:center;gap:12px;padding:16px;border-radius:var(--r);background:var(--bg)}
.feed-water-icon,.fed-icon,.btn-icon{display:inline-flex;flex:none}
.feed-water-icon svg,.fed-icon svg,.feed-attached > svg{width:20px;height:20px;fill:color-mix(in srgb,var(--honey) 22%,transparent);stroke:var(--honey);stroke-width:1.6;stroke-linejoin:round}
.btn-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}
.feed-note{font-size:var(--t-sm);max-width:65ch;padding-left:12px;border-left:2px solid var(--honey)}
.feed-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin-top:4px}
.feed-empty{display:flex;align-items:center;gap:18px;padding:18px;border-radius:var(--r);background:var(--bg);color:var(--muted)}
.feed-empty-art{width:64px;flex:none}
.feed-empty p{max-width:52ch}
.feed-source{display:flex;flex-direction:column;gap:6px;max-width:75ch;font-size:.8rem;line-height:1.5;color:var(--muted)}
.feed-source ul{margin:0;padding-left:18px}
.feed-table th button{font:inherit;color:inherit;background:none;border:0;padding:2px 6px;border-radius:6px;cursor:pointer}
.feed-table th button:hover{color:var(--ink)}
.feed-table tbody th{position:sticky;left:0;z-index:1;background:var(--surface);color:var(--ink);white-space:normal;min-width:110px;max-width:160px}
.feed-table tr.extra th{font-weight:500;color:var(--muted)}
.feed-table tr.ec td{color:var(--muted)}
.feed-table .sel{background:var(--soft)}
.feed-table .now{background:var(--honey-soft)}
.feed-table th.now{color:var(--honey)}
.feed-table thead th:first-child{position:sticky;left:0;z-index:1;background:var(--surface)}
.feed-full-caption{margin-top:12px}
@media (max-width:600px){.feed-size{flex:1 1 150px}.feed-amt strong{font-size:1.2rem}}

/* A feed attached to the entry form, and a logged feed in the journal */
.feed-attached{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--r);background:var(--honey-soft);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--honey) 30%,transparent)}
.feed-attached > div{display:flex;flex-direction:column;flex:1;min-width:0;font-size:var(--t-sm)}
.feed-attached strong{font-weight:700}
.feed-attached .link{align-self:center}
.fed{display:flex;align-items:flex-start;gap:10px;max-width:65ch;padding:10px 14px;border-radius:var(--r);background:var(--bg);font-size:var(--t-sm)}
.fed > div{display:flex;flex-direction:column;gap:2px;min-width:0}
.fed-title b{font-weight:700;margin-right:6px}
.fed-items{color:var(--muted);overflow-wrap:anywhere}

/* Plants in a grow */
.plants-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:18px}
.plants-bar:empty{display:none}
.plant-chip{display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:8px 14px;border-radius:var(--r);border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;text-align:left;cursor:pointer;max-width:200px;transition:background-color .15s,border-color .15s}
.plant-chip strong{font-size:.9rem;font-weight:700;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.plant-chip span{font-size:.75rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.plant-chip:hover{border-color:color-mix(in srgb,var(--ink) 30%,transparent)}
.plant-chip[aria-pressed="true"]{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
.plant-chip[aria-pressed="true"] span{color:color-mix(in srgb,var(--on-primary) 70%,transparent)}
.plants-bar .add-plant{border-radius:var(--r)}
.plants-bar .link{align-self:center;margin-left:4px}
.plant-for{max-width:320px}
.plant-label{font-size:.75rem;font-weight:700;padding:3px 10px;border-radius:var(--r-pill);background:var(--honey-soft);color:var(--honey)}
.plant-label.tent{background:var(--soft);color:var(--muted)}
.per-plant{border:0;margin:0;padding:14px;border-radius:var(--r);background:var(--bg);display:flex;flex-direction:column;gap:8px;min-width:0}
.per-plant legend{float:left;width:100%;padding:0;font-weight:600;font-size:var(--t-sm)}
.per-plant-row{display:grid;grid-template-columns:minmax(0,1fr) 92px 92px;gap:8px;align-items:center}
.per-plant-row input{padding:9px 10px;background:var(--surface)}
.per-plant-name{display:flex;flex-direction:column;min-width:0}
.per-plant-name strong,.per-plant-name small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.per-plant-name small{color:var(--muted);font-size:.75rem}
.harvest-plants{display:flex;flex-direction:column;gap:8px;padding:14px 16px;border-radius:var(--r);background:var(--surface)}
.hp-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(60px,2fr) auto;gap:12px;align-items:center}
.hp-name{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;min-width:0}
.hp-name small{color:var(--muted);font-size:.75rem}
.hp-best{font-size:.7rem;font-weight:700;padding:2px 8px;border-radius:var(--r-pill);background:var(--honey-soft);color:var(--honey)}
.hp-bar{height:8px;border-radius:var(--r-pill);background:var(--soft);overflow:hidden}
.hp-bar i{display:block;height:100%;border-radius:inherit;background:var(--honey)}
.hp-val{font-size:var(--t-sm);font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
@media (max-width:600px){.hp-row{grid-template-columns:1fr auto}.hp-bar{grid-column:1 / -1;order:3}}

/* Photoperiod / autoflower switch in the grow dialog */
.kind-field{border:0;margin:0;padding:0;min-width:0;display:flex;flex-direction:column;gap:6px}
.kind-field legend{font-weight:600;font-size:var(--t-sm);padding:0;margin-bottom:6px}
.kind-tabs{align-self:flex-start}
.kind-field small{font-size:var(--t-sm)}

/* Harvest countdown */
.plan-card{margin:-8px 0 28px;padding:18px 22px;border-radius:var(--r-lg);background:var(--surface);display:flex;flex-direction:column;gap:12px}
.plan-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.plan-big{color:var(--muted)}
.plan-big strong{font-family:var(--f-display);font-weight:400;font-size:1.75rem;color:var(--ink);margin-right:4px}
.plan-bar{height:10px;border-radius:var(--r-pill);background:var(--soft);overflow:hidden}
.plan-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--primary),var(--honey));transition:width .6s ease}
.plan-ends{display:flex;justify-content:space-between;gap:10px;font-size:.8rem;color:var(--muted)}
.plan-ends span:nth-child(2){text-align:center}
.plan-hint{font-size:var(--t-sm);padding-left:12px;border-left:2px solid var(--honey);max-width:65ch}
.plan-line{font-size:var(--t-sm);color:var(--muted)}
.plan-line strong{color:var(--ink)}
.plan-auto{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;padding:10px 14px;border-radius:var(--r);background:var(--berry-soft);font-size:var(--t-sm)}
@media (max-width:600px){.plan-ends span:nth-child(2){display:none}}

/* Your setup (tent, light, air) */
.setup-strip{margin:-12px 0 28px;padding:14px 18px;border-radius:var(--r-lg);background:var(--surface);display:flex;align-items:center;gap:14px;font-size:var(--t-sm)}
.setup-strip.is-empty{background:transparent;box-shadow:inset 0 0 0 1px var(--line)}
.setup-strip.is-empty p{flex:1;color:var(--muted)}
.setup-strip.is-empty strong{color:var(--ink)}
.setup-icon{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:var(--honey-soft)}
.setup-icon svg{width:20px;height:20px;fill:none;stroke:var(--honey);stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}
.setup-text{display:flex;flex-direction:column;flex:1;min-width:0}
.setup-text strong{font-size:.95rem;font-weight:700}
.setup-text .label{font-size:.75rem}
.setup-status{flex:none;font:700 .78rem/1 var(--f-body);padding:7px 12px;border-radius:var(--r-pill);border:0;cursor:pointer}
.setup-status.ok{background:color-mix(in srgb,var(--good) 14%,var(--surface));color:var(--good)}
.setup-status.warn{background:color-mix(in srgb,var(--warn) 16%,var(--surface));color:var(--warn)}
.setup-strip .link{align-self:center}
@media (max-width:600px){
  .setup-strip{flex-wrap:wrap}
  .setup-text{flex-basis:calc(100% - 52px)}
  .setup-strip.is-empty p{flex-basis:calc(100% - 52px)}
  .setup-status{margin-left:52px}
}
.setup-dialog{width:min(600px,calc(100vw - 32px))}
.su-tent{border:0;margin:0;padding:0;min-width:0}
.su-tent legend{font-weight:600;font-size:var(--t-sm);padding:0;margin-bottom:6px}
.tent-dims{display:flex;align-items:center;gap:8px}
.tent-dims input{flex:1;min-width:0}
.tent-dims select{width:auto;flex:none}
.tent-dims span{color:var(--muted)}
.su-results{display:flex;flex-direction:column;gap:6px}
.su-note{display:flex;gap:10px;padding:10px 12px;border-radius:var(--r);background:var(--bg);font-size:var(--t-sm)}
.su-dot{flex:none;width:9px;height:9px;border-radius:50%;margin-top:7px;background:var(--honey)}
.su-note.ok .su-dot{background:var(--good)}
.su-note.warn .su-dot{background:var(--warn)}
.su-note.bad .su-dot{background:var(--bad)}
.su-links{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:var(--t-sm);font-weight:600}
.su-links a{text-decoration-color:var(--honey);text-underline-offset:3px}
.su-links a::after{content:" →"}

/* Free and Pro plans */
.plan-pill{margin-left:auto;font-size:.7rem;font-weight:700;letter-spacing:.02em;padding:3px 9px;border-radius:var(--r-pill);background:var(--soft);color:var(--muted)}
.plan-pill.pro{background:var(--honey-soft);color:var(--honey)}
.plans-dialog{width:min(560px,calc(100vw - 32px))}
.plans-lead{margin-top:8px}
.plans-early{font-size:var(--t-sm);padding:10px 14px;border-radius:var(--r);background:var(--honey-soft);box-shadow:inset 3px 0 0 var(--honey)}
.plans-table{width:100%;border-collapse:collapse;font-size:var(--t-sm)}
.plans-table th,.plans-table td{padding:10px 8px;border-bottom:1px solid var(--line);text-align:center;vertical-align:middle}
.plans-table tbody th{text-align:left;font-weight:500;padding-left:0}
.plans-table thead th{font-family:var(--f-display);font-weight:400;font-size:1.2rem;border-bottom-width:2px}
.plans-table thead th.mine{color:var(--honey)}
.plans-table td{font-weight:600;white-space:nowrap;width:22%}
.plans-table td.yes{color:var(--good)}
.plans-table td.soon{color:var(--muted);font-weight:500;font-style:italic}
.plans-table td:last-child{background:color-mix(in srgb,var(--honey-soft) 60%,transparent)}
.plans-price{font-weight:600}
.plans-price:empty{display:none}
.plans-listed{font-size:var(--t-sm);color:var(--good);font-weight:600;max-width:22em;text-align:right}
#plansCta:empty{display:none}
.plans-dialog .dialog-actions{flex-wrap:wrap-reverse}

/* Compare grows. Series colours: a colour-blind-checked set, stepped separately for dark mode. */
.compare{--s1:#2a78d6;--s2:#eb6834;--s3:#1baf7a;--s4:#eda100;--s5:#e87ba4;--s6:#008300;display:flex;flex-direction:column}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .compare{--s1:#3987e5;--s2:#d95926;--s3:#199e70;--s4:#c98500;--s5:#d55181;--s6:#008300}
}
:root[data-theme="dark"] .compare{--s1:#3987e5;--s2:#d95926;--s3:#199e70;--s4:#c98500;--s5:#d55181;--s6:#008300}
.compare-open{width:100%;justify-content:center}
.compare-open svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.compare-lead{margin-top:8px;font-size:var(--t-sm)}
.compare-picks{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.cmp-pick{display:flex;align-items:center;gap:10px;padding:8px 14px 8px 12px;border-radius:var(--r);border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;text-align:left;cursor:pointer;max-width:240px;transition:border-color .15s,background-color .15s}
.cmp-pick:hover{border-color:color-mix(in srgb,var(--ink) 30%,transparent)}
.cmp-pick[aria-pressed="true"]{border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}
.cmp-pick > span{display:flex;flex-direction:column;min-width:0}
.cmp-pick strong{font-size:.9rem;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cmp-pick small{font-size:.75rem;color:var(--muted);white-space:nowrap}
.cmp-swatch{flex:none;display:inline-block;width:12px;height:12px;border-radius:50%;background:var(--c)}
.cmp-swatch.empty{background:transparent;box-shadow:inset 0 0 0 1.5px var(--line)}
.cmp-swatch.line{width:16px;height:4px;border-radius:2px}
.compare-loading{margin-top:12px;font-size:var(--t-sm)}
.compare-best{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-top:24px}
.compare-best:empty{display:none}
.best-card{background:var(--surface);border-radius:var(--r-lg);padding:16px 18px;display:flex;flex-direction:column;gap:2px}
.best-card strong{font-family:var(--f-display);font-weight:400;font-size:1.7rem;line-height:1.2}
.best-card strong.stars-show{font-family:var(--f-body);font-size:1.3rem;color:var(--honey);letter-spacing:.05em}
.best-grow{display:flex;align-items:center;gap:7px;margin-top:6px;font-size:var(--t-sm);font-weight:600;min-width:0}
.compare-best .compare-none{grid-column:1 / -1}
.compare-none{padding:18px 20px;border-radius:var(--r-lg);background:var(--surface);font-size:var(--t-sm)}
.chart .compare-none{background:var(--bg)}
.compare-chart-card{margin-top:24px}
.cmp-align{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:-6px}
.cmp-align .metric-tabs{align-self:flex-start}
.cmp-align .metric-tabs button[aria-checked="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgb(0 0 0 / .08)}
.cmp-svg .cmp-line{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:0}
.cmp-svg .cmp-dot{stroke:var(--surface);stroke-width:2}
.cmp-svg .cmp-labels circle{stroke:var(--surface);stroke-width:2}
.cmp-svg .cmp-end{fill:var(--ink);font-size:12px;font-weight:600}
.cmp-svg.animate .cmp-line{animation:trend-draw .9s cubic-bezier(.3,.7,.3,1) backwards}
.cmp-legend{padding-left:44px}
.cmp-legend span{color:var(--ink)}
.cmp-note{margin-top:8px;padding-left:44px}
.chart-tip .tip-row{display:grid;grid-template-columns:12px minmax(0,1fr) auto;align-items:center;gap:8px;width:100%}
.chart-tip .tip-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chart-tip .tip-row strong{font-variant-numeric:tabular-nums}
.compare-side{margin-top:28px;background:var(--surface);border-radius:var(--r-lg);padding:clamp(20px,3vw,28px) clamp(14px,3vw,28px)}
.compare-side h2{font-size:var(--t-xl)}
.cmp-scroll{margin-top:14px}
.cmp-table{border-collapse:separate;border-spacing:0;font-size:var(--t-sm);min-width:100%}
.cmp-table th,.cmp-table td{padding:9px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.cmp-table td{min-width:120px;font-variant-numeric:tabular-nums}
.cmp-table tbody th[scope="row"]{font-weight:500;color:var(--muted);white-space:nowrap}
.cmp-table thead th{vertical-align:bottom;border-bottom:2px solid var(--line)}
.cmp-table thead th:first-child,.cmp-table tbody th[scope="row"]{position:sticky;left:0;z-index:1;background:var(--surface)}
.cmp-head{display:flex;align-items:flex-start;gap:8px}
.cmp-head .cmp-swatch{margin-top:5px}
.cmp-head > span{display:flex;flex-direction:column}
.cmp-head small{font-weight:500;color:var(--muted);font-size:.75rem}
.cmp-group th{padding-top:20px;font-family:var(--f-display);font-weight:400;font-size:1.05rem;color:var(--ink);border-bottom:1px solid var(--line);text-align:left}
.cmp-group th[scope="rowgroup"]{position:sticky;left:0}
.cmp-table td.best{background:var(--honey-soft);font-weight:700;box-shadow:inset 3px 0 0 var(--honey)}
@media (max-width:600px){
  .cmp-pick{max-width:100%}
  .cmp-table th,.cmp-table td{padding:8px 10px}
  .cmp-table td{min-width:104px}
  .cmp-legend,.cmp-note{padding-left:0}
}

/* PDF grow report. Hidden on screen; while printing it's the only thing on the page.
   Always light, whatever the theme, so it prints clean on white paper. */
#reportBtn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}
.report-opts{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;min-width:0}
.report-opts legend{font-weight:600;font-size:var(--t-sm);padding:0;margin-bottom:6px}
.report-how{margin:0}
@media screen{ .report{display:none!important} }
@media print{
  html.printing-report, html.printing-report body{background:#fff!important;color:#131313;padding:0;margin:0}
  html.printing-report body > :not(.report){display:none!important}
  html.printing-report .report{display:block!important}
  @page{margin:14mm 13mm}
}
.report{
  --ink:#131313; --muted:#6B6862; --line:#E5E3DE; --soft:#F1F0EC; --honey:#A8873A; --honey-soft:#F7F2E6; --berry-soft:#ECEBE7; --good:#2F7A50; --warn:#A8700F;
  color:var(--ink); background:#fff; font-family:var(--f-body); font-size:10.5pt; line-height:1.45;
  -webkit-print-color-adjust:exact; print-color-adjust:exact;
}
.report h1,.report h2{font-family:var(--f-display);font-weight:400;margin:0;line-height:1.15}
.report p{margin:0}
.rp-head{display:flex;justify-content:space-between;align-items:center;padding-bottom:10px;border-bottom:1.5px solid var(--honey)}
.rp-brand{display:flex;align-items:center;gap:8px;font-family:var(--f-display);font-size:12pt}
.rp-brand em{font-style:normal;color:var(--honey)}
.rp-brand svg{width:26px;height:26px}
.rp-made{font-size:9pt;color:var(--muted)}
.rp-title{margin:18px 0 14px}
.rp-title h1{font-size:28pt}
.rp-sub{font-size:11.5pt;margin-top:4px}
.rp-dates{font-size:9.5pt;color:var(--muted);margin-top:4px}
.rp-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px;margin-bottom:6px}
.rp-tile{border:1px solid var(--line);border-radius:10px;padding:9px 11px;display:flex;flex-direction:column;break-inside:avoid}
.rp-tile strong{font-family:var(--f-display);font-weight:400;font-size:16pt;line-height:1.2}
.rp-tile strong.rp-stars{font-family:var(--f-body);color:var(--honey);font-size:13pt;letter-spacing:.05em}
.rp-label{font-size:8.5pt;color:var(--muted);font-weight:600}
.rp-muted{font-size:8.5pt;color:var(--muted)}
.rp-section{margin-top:20px}
.rp-section > h2{font-size:15pt;padding-bottom:5px;margin-bottom:9px;border-bottom:1px solid var(--line);break-after:avoid}
.rp-dl{display:grid;grid-template-columns:150px 1fr;gap:5px 14px;margin:0}
.rp-dl dt{color:var(--muted);font-weight:600;font-size:9.5pt}
.rp-dl dd{margin:0}
.rp-table{width:100%;border-collapse:collapse;margin-top:8px;font-size:9.5pt;break-inside:avoid}
.rp-table th,.rp-table td{text-align:left;padding:5px 8px;border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums}
.rp-table thead th{color:var(--muted);font-weight:600;font-size:8.5pt}
.rp-table tbody th{font-weight:600}
.rp-note{margin-top:6px;padding-left:10px;border-left:2px solid var(--honey);white-space:pre-wrap}
.rp-legend{display:flex;align-items:center;gap:6px;margin-bottom:6px}
.rp-key{display:inline-block;width:14px;height:9px;border-radius:2px}
.rp-key.band{background:color-mix(in srgb,var(--good) 20%,#fff)}
.rp-key.flower{background:var(--berry-soft);margin-left:10px}
.rp-charts{display:grid;grid-template-columns:1fr 1fr;gap:12px 18px}
.rp-chart{margin:0;break-inside:avoid}
.rp-chart figcaption{font-size:9.5pt;color:var(--muted);margin-bottom:2px}
.rp-chart figcaption strong{color:var(--ink)}
.rp-svg{display:block;width:100%;height:auto;font-family:var(--f-body)}
.rp-svg .rp-flower{fill:var(--berry-soft);opacity:.7}
.rp-svg .rp-dry{fill:var(--honey-soft)}
.rp-svg .rp-band{fill:var(--good);opacity:.13}
.rp-svg .rp-grid{stroke:var(--line);stroke-width:.8}
.rp-svg .rp-tick{fill:var(--muted);font-size:9px}
.rp-svg .rp-line{fill:none;stroke:var(--ink);stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
.rp-svg .rp-dot{fill:var(--ink)}
.rp-tags{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.rp-tags li{border:1px solid var(--line);border-radius:999px;padding:3px 10px;font-size:9pt}
.rp-tags li.warn{border-color:var(--warn);color:var(--warn)}
.rp-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.rp-photos figure{margin:0;break-inside:avoid}
.rp-photos img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px;background:var(--soft)}
.rp-photos figcaption{font-size:8.5pt;color:var(--muted);margin-top:3px}
.rp-journal{list-style:none;margin:0;padding:0}
.rp-journal li{padding:7px 0;border-bottom:1px solid var(--line);break-inside:avoid}
.rp-when{font-size:9.5pt}
.rp-reads{font-size:9pt;color:var(--muted);margin-top:2px}
.rp-journal .rp-note{margin-top:4px}
.rp-foot{margin-top:22px;padding-top:8px;border-top:1px solid var(--line);font-size:8.5pt;color:var(--muted);text-align:center}

/* Grow-light glow: a soft wash behind the top of the journal that follows the open grow's stage
   (cool in veg, warm in flower, amber while drying and curing), and behind the log-in card.
   Subtler than the landing page so the numbers stay easy to read. */
html,body{overflow-x:clip}
.app{--jg-a:color-mix(in srgb,var(--honey) 32%,transparent);--jg-b:color-mix(in srgb,var(--honey) 16%,transparent)}
.app[data-phase="seedling"],.app[data-phase="veg"]{--jg-a:color-mix(in srgb,#8ab8ff 36%,transparent);--jg-b:color-mix(in srgb,var(--honey) 16%,transparent)}
.app[data-phase="flower"]{--jg-a:color-mix(in srgb,var(--honey) 38%,transparent);--jg-b:color-mix(in srgb,#e8a0c8 22%,transparent)}
.app[data-phase="harvested"]{--jg-a:color-mix(in srgb,var(--honey) 28%,transparent);--jg-b:color-mix(in srgb,var(--honey) 14%,transparent)}
:root[data-theme="dark"] .app{--jg-a:rgb(186 92 255 / .16);--jg-b:rgb(255 80 160 / .1)}
:root[data-theme="dark"] .app[data-phase="seedling"],:root[data-theme="dark"] .app[data-phase="veg"]{--jg-a:rgb(120 150 255 / .17);--jg-b:rgb(186 92 255 / .1)}
:root[data-theme="dark"] .app[data-phase="flower"]{--jg-a:rgb(186 92 255 / .2);--jg-b:rgb(255 80 160 / .13)}
:root[data-theme="dark"] .app[data-phase="harvested"]{--jg-a:rgb(212 180 108 / .14);--jg-b:rgb(255 140 60 / .07)}
.content{position:relative;isolation:isolate}
.content::before{content:"";position:absolute;z-index:-1;left:-12%;right:-12%;top:-80px;height:560px;pointer-events:none;
  background:radial-gradient(closest-side at 32% 42%,var(--jg-a),transparent 72%),radial-gradient(closest-side at 76% 30%,var(--jg-b),transparent 70%);
  filter:blur(26px);animation:jglow 10s ease-in-out infinite;transition:background .8s}
@keyframes jglow{50%{opacity:.8;transform:scale(1.03)}}
#authView,#resetView{position:relative;isolation:isolate}
#authView::before,#resetView::before{content:"";position:absolute;z-index:-1;left:50%;top:50%;width:min(720px,130vw);height:620px;transform:translate(-50%,-50%);pointer-events:none;
  background:radial-gradient(closest-side at 45% 45%,color-mix(in srgb,var(--honey) 24%,transparent),transparent 72%),radial-gradient(closest-side at 62% 60%,color-mix(in srgb,var(--honey) 12%,transparent),transparent 70%);filter:blur(24px)}
:root[data-theme="dark"] #authView::before,:root[data-theme="dark"] #resetView::before{background:radial-gradient(closest-side at 45% 45%,rgb(186 92 255 / .22),transparent 72%),radial-gradient(closest-side at 62% 60%,rgb(255 80 160 / .14),transparent 70%)}
@media print{.content::before{display:none}}

/* Voice notes */
.note-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.mic-btn{display:inline-flex;align-items:center;gap:6px;font:600 .8rem/1 var(--f-body);padding:7px 12px;border-radius:var(--r-pill);border:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;transition:background-color .15s,border-color .15s}
.mic-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.mic-btn:hover{background:var(--soft)}
.mic-btn.on{background:color-mix(in srgb,var(--bad) 12%,var(--surface));border-color:color-mix(in srgb,var(--bad) 45%,transparent);color:var(--bad)}
.mic-btn.on svg{animation:mic-pulse 1.2s ease-in-out infinite}
@keyframes mic-pulse{50%{opacity:.35}}

/* Dry and cure */
.cure-card{margin:-8px 0 28px;padding:clamp(18px,3vw,26px);border-radius:var(--r-lg);background:var(--surface);display:flex;flex-direction:column;gap:14px}
.cure-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.cure-head h2{font-size:var(--t-xl)}
.cure-steps{display:flex;gap:4px;list-style:none;margin:0;padding:4px;border-radius:var(--r-pill);background:var(--soft);font-size:.8rem;font-weight:700;counter-reset:step}
.cure-steps li{padding:6px 12px;border-radius:var(--r-pill);color:var(--muted);counter-increment:step}
.cure-steps li::before{content:counter(step) " · "}
.cure-steps li.now{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgb(0 0 0 / .08)}
.cure-steps li.done{color:var(--good)}
.cure-steps li.done::before{content:"✓ "}
.cure-target{font-size:var(--t-sm);color:var(--muted);max-width:65ch}
.cure-status{display:grid;grid-template-columns:auto 1fr;gap:2px 14px;align-items:baseline;padding:12px 14px;border-radius:var(--r);background:var(--bg)}
.cure-status .label{grid-column:1 / -1}
.cure-status strong{font-family:var(--f-display);font-weight:400;font-size:1.5rem;line-height:1.2}
.cure-status p{font-size:var(--t-sm)}
.cure-status.ok{box-shadow:inset 3px 0 0 var(--good)}
.cure-status.warn{box-shadow:inset 3px 0 0 var(--warn)}
.cure-status.bad{box-shadow:inset 3px 0 0 var(--bad)}
.cure-status.bad p,.cure-status.warn p{color:var(--ink)}
.cure-log{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px}
.cure-in{display:flex;flex-direction:column;gap:4px;font-size:var(--t-sm);font-weight:600}
.cure-in .joined{display:flex;align-items:center;gap:6px}
.cure-in input{width:96px;padding:9px 12px}
.cure-unit{color:var(--muted);font-weight:500}
.cure-move{display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:var(--r);background:var(--honey-soft);font-size:var(--t-sm)}
.cure-move-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.cure-move-row input[type="date"]{width:auto;padding:8px 12px;background:var(--surface)}
.cure-move-row input[type="number"]{width:84px;padding:8px 12px;background:var(--surface)}
.cure-move-row input[type="number"]::placeholder{color:var(--muted)}
.cure-ready{display:flex;flex-direction:column;gap:2px}
.cure-ready strong{font-family:var(--f-display);font-weight:400;font-size:1.9rem;line-height:1.15}
.cure-ready p{color:var(--muted);font-size:var(--t-sm);max-width:60ch}
.cure-ready.ok strong{color:var(--good)}
.cure-ready.warn strong{color:var(--warn)}
.cure-ready.bad strong{color:var(--bad)}
.cure-bar{position:relative;height:10px;border-radius:var(--r-pill);background:var(--soft);margin-bottom:22px}
.cure-bar > i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--primary),var(--honey))}
.cure-mark{position:absolute;top:14px;transform:translateX(-50%);font-size:.72rem;color:var(--muted);white-space:nowrap}
.cure-mark::before{content:"";position:absolute;left:50%;top:-16px;width:2px;height:12px;background:var(--surface);transform:translateX(-50%)}
.cure-mark.hit{color:var(--ink);font-weight:700}
.cure-mark:last-child{transform:translateX(-100%)}
.cure-meta{margin-top:-6px}
.cure-links .link{font-size:.8rem}
@media (max-width:600px){
  .cure-head{flex-direction:column}
  .cure-mark{font-size:.66rem}
}

/* Seed vault */
.seed-tools{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:18px}
.seed-tools .field{flex:1;min-width:200px;max-width:340px}
.seed-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin-top:18px}
.seed-card{background:var(--surface);border-radius:var(--r-lg);padding:18px 20px;display:flex;flex-direction:column;gap:10px}
.seed-card.out{opacity:.7}
.seed-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.seed-name{display:flex;flex-direction:column;min-width:0}
.seed-name h3{font-size:1.3rem;overflow-wrap:anywhere}
.seed-count{display:flex;flex-direction:column;align-items:center;flex:none;min-width:56px;padding:6px 10px;border-radius:var(--r);background:var(--honey-soft)}
.seed-count strong{font-family:var(--f-display);font-weight:400;font-size:1.5rem;line-height:1.1}
.seed-count span{font-size:.7rem;color:var(--muted);font-weight:600}
.out .seed-count{background:var(--soft)}
.seed-chips{display:flex;flex-wrap:wrap;gap:6px}
.seed-note{font-size:var(--t-sm);color:var(--muted);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.seed-hist{font-size:.8rem;font-weight:600;color:var(--honey)}
.seed-actions{display:flex;align-items:center;gap:12px;margin-top:auto;padding-top:4px}
.seed-actions .btn{margin-left:auto}
.seed-actions .link{align-self:center}
.seed-step{display:flex;gap:4px}
.seed-step .round-btn{width:32px;height:32px;font:600 1.05rem/1 var(--f-body)}
.seed-empty{grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:32px 20px;border-radius:var(--r-lg);background:var(--surface)}
.seed-empty p{max-width:46ch}
.seed-empty .empty-art{width:110px;height:110px}

/* Sensor imports */
.sensor-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding-top:14px;border-top:1px solid var(--line)}
.sensor-row .btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.sensor-row .muted{flex:1;min-width:220px}
.sensor-dialog{width:min(600px,calc(100vw - 32px))}
.sensor-how{margin:0}
.sensor-map{display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:var(--r);background:var(--bg)}
.sensor-map select{background:var(--surface)}
.sensor-sum{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px}
.sensor-sum > div{display:flex;flex-direction:column;padding:10px 12px;border-radius:var(--r-sm);background:var(--honey-soft)}
.sensor-sum strong{font-family:var(--f-display);font-weight:400;font-size:1.35rem;line-height:1.2}
.sensor-preview{display:flex;flex-direction:column;gap:8px}
.sensor-preview:empty{display:none}
.sensor-bad{font-size:var(--t-sm);font-weight:600;color:var(--warn)}
.trend-svg .sensor-band{fill:var(--honey);opacity:.16}
.trend-svg .sensor-line{fill:none;stroke:var(--honey);stroke-width:1.5;stroke-linejoin:round;opacity:.9}
.key-sensor{width:16px;height:10px;border-radius:3px;background:color-mix(in srgb,var(--honey) 28%,var(--surface))}
.key-sensor-line{width:18px;height:2px;border-radius:2px;background:var(--honey)}

/* Activity tags */
.tags-field{border:0;margin:0;padding:0;min-width:0}
.tags-field legend{font-weight:600;font-size:var(--t-sm);padding:0;margin-bottom:8px}
.tag-picks{display:flex;flex-wrap:wrap;gap:6px}
.tag-pick{font:500 .85rem/1 var(--f-body);padding:9px 13px;border-radius:var(--r-pill);border:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;transition:background-color .15s,border-color .15s,color .15s}
.tag-pick:hover{border-color:color-mix(in srgb,var(--ink) 30%,transparent)}
.tag-pick[aria-pressed="true"]{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
.tag-pick.warn[aria-pressed="true"]{background:var(--warn);border-color:var(--warn);color:#fff}
.entry-tags{display:flex;flex-wrap:wrap;gap:6px}
.helper-hint{margin-top:10px;font-size:var(--t-sm);color:var(--warn)}
.helper-hint a{font-weight:700;color:inherit}
.tag{font-size:.8rem;font-weight:600;padding:4px 11px;border-radius:var(--r-pill);background:var(--berry-soft);color:var(--ink)}
.tag.warn{background:color-mix(in srgb,var(--warn) 16%,var(--surface));color:var(--warn)}
.journal-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:10px 16px;margin-top:44px;margin-bottom:16px}
.journal-head .entries-title{margin:0}
.tag-filter select{width:auto;padding:8px 12px;font-size:var(--t-sm);background:var(--surface)}
.trend-svg .tag-mark{fill:var(--berry);opacity:.75}
.trend-svg .tag-mark.warn{fill:var(--warn);opacity:1}
.key-tag{width:9px;height:9px;transform:rotate(45deg);background:var(--berry);opacity:.75}
.tip-tags{font-size:.78rem;font-weight:700;color:var(--berry)}

/* Feeding reminders */
.feed-remind{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:12px 14px;border-radius:var(--r);background:var(--bg)}
.feed-remind-icon{width:10px;height:10px;flex:none;border-radius:50%;background:color-mix(in srgb,var(--muted) 45%,transparent)}
.feed-remind.due .feed-remind-icon{background:var(--honey);box-shadow:0 0 0 4px color-mix(in srgb,var(--honey) 22%,transparent)}
.feed-remind.late .feed-remind-icon{background:var(--warn);box-shadow:0 0 0 4px color-mix(in srgb,var(--warn) 22%,transparent)}
.feed-remind-text{flex:1 1 220px;font-size:var(--t-sm)}
.feed-remind.due .feed-remind-text{color:var(--honey);font-weight:600}
.feed-remind.late .feed-remind-text{color:var(--warn);font-weight:600}
.feed-remind-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px}
.feed-remind-controls select{width:auto;padding:8px 12px;font-size:var(--t-sm);background:var(--surface)}
.grow-item .due-badge{align-self:flex-start;margin-top:4px;padding:2px 9px;border-radius:var(--r-pill);font-size:.75rem;font-weight:600;color:var(--honey);background:var(--honey-soft)}
.grow-item .due-badge.late{color:var(--warn);background:color-mix(in srgb,var(--warn) 14%,var(--surface))}

/* Custom recipe editor */
.recipe-dialog{width:min(860px,calc(100vw - 32px))}
.r-block{border:0;margin:0;padding:16px;border-radius:var(--r);background:var(--bg);min-width:0;display:flex;flex-direction:column;gap:10px}
.r-block legend{float:left;width:100%;padding:0;font-family:var(--f-display);font-size:var(--t-lg)}
.r-block input,.r-block select{background:var(--surface)}
.r-products{display:flex;flex-direction:column;gap:8px}
.r-product{display:flex;align-items:center;gap:8px}
.r-product input{flex:1;min-width:0}
.r-product select{width:auto;flex:none}
.r-product .round-btn{font-size:1.2rem;line-height:1}
.r-num{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:50%;background:var(--honey-soft);color:var(--honey);font-size:.8rem;font-weight:700}
#rAddProduct{align-self:flex-start}
.r-counts{display:flex;flex-wrap:wrap;gap:10px 20px}
.r-counts label{display:flex;align-items:center;gap:10px;font-weight:600;font-size:var(--t-sm)}
.r-counts input{width:80px}
.r-grid th small{display:block;font-weight:500;font-size:.75rem}
.r-grid thead th{vertical-align:bottom;white-space:normal;min-width:84px}
.r-grid tbody th{position:sticky;left:0;z-index:1;background:var(--bg);text-align:left;font-weight:600;color:var(--ink)}
.r-grid thead th:first-child{position:sticky;left:0;z-index:1;background:var(--bg)}
.r-grid tbody th span{display:block}
.r-grid tbody th .link{font-size:.75rem;font-weight:500}
.r-grid tbody tr.flower th span{color:var(--honey)}
.r-grid td{padding:5px 6px}
.r-grid td input{width:84px;padding:8px 10px;font-size:.95rem;font-variant-numeric:tabular-nums}
.r-grid input.bad{border-color:var(--bad);box-shadow:0 0 0 3px color-mix(in srgb,var(--bad) 18%,transparent)}
.dialog-actions .danger-link{margin-right:auto;align-self:center;color:var(--bad)}
.link.inline{display:inline;align-self:auto;color:inherit}
.feed-empty .link{margin-top:6px}

.rating-field{border:0;margin:0;padding:0;min-width:0}
.rating-field legend{font-weight:600;font-size:var(--t-sm);padding:0;margin-bottom:6px}
.stars{display:inline-flex;flex-direction:row-reverse;justify-content:flex-end;gap:2px}
.stars input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.stars label{font-size:2rem;line-height:1;color:color-mix(in srgb,var(--muted) 40%,transparent);cursor:pointer;padding:2px;transition:color .12s,transform .12s}
.stars label:hover,.stars label:hover ~ label,.stars input:checked ~ label{color:var(--honey)}
.stars label:hover{transform:scale(1.12)}
.stars input:focus-visible + label{outline:2px solid var(--primary);outline-offset:2px;border-radius:6px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.hint{margin-top:-8px;font-size:var(--t-sm)}
.dialog-actions .remove-harvest{margin-right:auto;align-self:center;color:var(--bad)}

/* The grow-complete moment */
.celebrate{overflow:hidden;text-align:center;padding:0}
.celebrate-body{position:relative;display:flex;flex-direction:column;align-items:center;gap:14px;padding:clamp(28px,5vw,40px);background:radial-gradient(120% 70% at 50% 0%,var(--honey-soft),transparent 70%)}
.celebrate h2{font-size:var(--t-2xl);overflow-wrap:anywhere}
.celebrate-stats{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-block:8px}
.celebrate-stats > div{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:110px;padding:14px 16px;border-radius:var(--r);background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.celebrate-stats strong{font-size:1.9rem;font-weight:600;line-height:1.15;font-variant-numeric:tabular-nums}
.celebrate-stats strong.stars-show{font-size:1.25rem;line-height:1.75}
.celebrate-stats span{font-size:.8rem;color:var(--muted)}
.celebrate .btn{margin-top:6px}
.confetti{position:absolute;inset:0;pointer-events:none;z-index:1}
.leaf{position:absolute;top:-24px;width:12px;height:18px;border-radius:0 100% 0 100%;background:var(--good);opacity:0;animation:leaf-fall 2.6s cubic-bezier(.35,.2,.6,1) forwards}
.leaf.gold{background:var(--honey)}
@keyframes leaf-fall{
  0%{opacity:0;transform:translate(0,0) rotate(0)}
  12%{opacity:.9}
  100%{opacity:0;transform:translate(var(--drift),460px) rotate(var(--spin))}
}

/* ---------- new entry ---------- */
.panel{background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--shadow)}
.panel summary{cursor:pointer;padding:20px 24px;font-family:var(--f-display);font-size:var(--t-lg);list-style:none;display:flex;justify-content:space-between;align-items:center}
.panel summary::-webkit-details-marker{display:none}
.panel summary::after{content:"+";font-family:var(--f-body);font-size:1.5rem;line-height:1;color:var(--primary);transition:transform .2s}
.panel[open] summary::after{transform:rotate(45deg)}
.entry-form{display:flex;flex-direction:column;gap:18px;padding:0 24px 24px}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.grid.two{grid-template-columns:1fr 1fr}
@media (max-width:680px){.grid{grid-template-columns:1fr 1fr}}
.vpd-preview{display:flex;align-items:center;min-height:48px;padding:0 14px;border-radius:var(--r-sm);background:var(--soft);font-size:.9rem;color:var(--muted)}
.vpd-preview.has{font-size:1.1rem;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.form-foot{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:14px}
.form-buttons{display:flex;gap:10px;flex-wrap:wrap}
.quick-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:12px 14px;border-radius:var(--r);background:var(--bg)}
.quick-row .btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.entry-form input.copied{background:var(--honey-soft);border-color:color-mix(in srgb,var(--honey) 45%,transparent);animation:copied-in .5s ease-out}
@keyframes copied-in{from{background:color-mix(in srgb,var(--honey) 35%,var(--surface))}}
.panel{transition:box-shadow .25s}
.panel.editing{box-shadow:0 0 0 2px var(--honey),var(--shadow)}
.panel.editing summary{color:var(--honey)}
/* Runoff: optional, opened with "Add runoff" */
.runoff-open{align-self:flex-start}
.runoff-open svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.runoff{display:flex;flex-direction:column;gap:12px;padding:14px;border-radius:var(--r);background:var(--bg);box-shadow:inset 3px 0 0 color-mix(in srgb,var(--honey) 60%,transparent)}
.runoff-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px}
.runoff input{background:var(--surface)}
.runoff-hint{grid-column:span 2;align-self:end;display:flex;flex-direction:column;gap:4px;font-size:var(--t-sm);line-height:1.45;min-height:48px;justify-content:center}
.runoff-hint .ok{color:var(--good)}
.runoff-hint .off{color:var(--warn);font-weight:600}
.reading.runoff{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--honey) 35%,transparent)}

.current-photo{display:flex;gap:16px;align-items:center;padding:12px;border-radius:var(--r);background:var(--bg)}
.current-photo img{width:72px;height:72px;flex:none;object-fit:cover;border-radius:var(--r-sm);background:var(--soft)}
.current-photo div{display:flex;flex-direction:column;gap:4px;font-size:var(--t-sm)}
.current-photo .check{font-size:var(--t-sm);margin-top:4px}
.photo-field{flex:1 1 260px}
.photo-field input{padding:9px}
.photo-field input::file-selector-button{font:600 var(--t-sm) var(--f-body);border:0;border-radius:var(--r-pill);padding:8px 14px;margin-right:12px;background:var(--soft);color:var(--ink);cursor:pointer}

/* ---------- trends chart ---------- */
.trends{margin-top:28px;background:var(--surface);border-radius:var(--r-lg);padding:clamp(20px,3vw,28px);display:flex;flex-direction:column;gap:20px;transition:opacity .2s}
.trends.is-loading{opacity:.5}
.trends-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px 20px}
.trends-head h2{font-size:var(--t-xl)}
.metric-tabs{display:flex;gap:4px;background:var(--soft);border-radius:var(--r-pill);padding:4px;max-width:100%;overflow-x:auto;scrollbar-width:none}
.metric-tabs::-webkit-scrollbar{display:none}
.metric-tabs:empty{display:none}
.metric-tabs button{font:600 var(--t-sm)/1 var(--f-body);white-space:nowrap;padding:9px 14px;border:0;border-radius:var(--r-pill);background:transparent;color:var(--muted);cursor:pointer;transition:background-color .2s,color .2s}
.metric-tabs button:hover{color:var(--ink)}
.metric-tabs button[aria-selected="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgb(0 0 0 / .08)}

.trend-summary{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 28px}
.trend-summary:empty{display:none}
.trend-now{display:flex;flex-direction:column;gap:2px}
.trend-value{font-size:2.75rem;font-weight:600;line-height:1.05;letter-spacing:-.02em}
.trend-value small{font-size:1rem;font-weight:500;color:var(--muted);letter-spacing:0;margin-left:2px}
.trend-meta{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding-bottom:4px;font-size:var(--t-sm)}
.status{display:inline-flex;align-items:center;gap:6px;font-size:.82rem;font-weight:600;padding:4px 11px;border-radius:var(--r-pill)}
.status.ok{background:color-mix(in srgb,var(--good) 14%,var(--surface));color:var(--good)}
.status.low,.status.high{background:color-mix(in srgb,var(--warn) 16%,var(--surface));color:var(--warn)}

.chart{position:relative;border-radius:var(--r-sm)}
.chart:focus-visible{outline-offset:6px}
.trend-svg{display:block;width:100%;height:auto;overflow:visible;font-family:var(--f-body)}
.trend-svg .grid line{stroke:var(--line);stroke-width:1}
.trend-svg .tick{fill:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.trend-svg .flower-zone{fill:var(--berry-soft);opacity:.55}
.trend-svg .dry-zone{fill:var(--honey-soft);opacity:.8}
.trend-svg .stage-edge{stroke:var(--line);stroke-width:1}
.trend-svg .stage-label{fill:var(--muted);font-size:12px;font-weight:600;letter-spacing:.02em}
.trend-svg .target-band{fill:var(--good);opacity:.11}
.trend-svg .trend-line{fill:none;stroke:var(--ink);stroke-width:2;stroke-linejoin:round;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:0}
.trend-svg .trend-dot{fill:var(--ink);stroke:var(--surface);stroke-width:2;transform-box:fill-box;transform-origin:center}
.trend-svg .trend-dot.off{fill:var(--warn)}
.trend-svg .end-label{fill:var(--ink);font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;paint-order:stroke;stroke:var(--surface);stroke-width:4px;stroke-linejoin:round}
.trend-svg .runoff-line{fill:none;stroke:var(--honey);stroke-width:2;stroke-dasharray:5 4;stroke-linejoin:round;stroke-linecap:round}
.trend-svg .runoff-dot{fill:var(--surface);stroke:var(--honey);stroke-width:2}
.trend-svg .crosshair{stroke:var(--muted);stroke-width:1;opacity:.6;pointer-events:none}
.trend-svg .active-dot{fill:var(--surface);stroke:var(--ink);stroke-width:2.5;pointer-events:none}
.trend-svg .active-dot.off{stroke:var(--warn)}
.trend-svg .hit{fill:transparent;cursor:pointer;touch-action:pan-y}
/* Draw-in when a chart first appears or the reading changes. Starts from the finished state,
   so if animations are switched off (reduced motion) the chart is simply there. */
.trend-svg.animate .trend-line{animation:trend-draw .9s cubic-bezier(.3,.7,.3,1) backwards}
.trend-svg.animate .trend-dot{animation:trend-pop .35s cubic-bezier(.3,1.5,.5,1) backwards;animation-delay:calc(.25s + var(--i) * 18ms)}
.trend-svg.animate .end-label{animation:trend-fade .4s ease-out .7s backwards}
@keyframes trend-draw{from{stroke-dashoffset:1}}
@keyframes trend-fade{from{opacity:0}}
@keyframes trend-pop{from{transform:scale(0)}}

.chart-legend{display:flex;flex-wrap:wrap;gap:6px 20px;margin-top:10px;padding-left:44px;font-size:.8rem;color:var(--muted)}
.chart-legend span{display:inline-flex;align-items:center;gap:7px}
.key{display:inline-block;flex:none}
.key-band{width:16px;height:10px;border-radius:3px;background:color-mix(in srgb,var(--good) 22%,var(--surface))}
.key-off{width:9px;height:9px;border-radius:50%;background:var(--warn)}
.key-in{width:18px;height:2px;border-radius:2px;background:var(--ink)}
.key-run{width:18px;height:0;border-top:2px dashed var(--honey)}
.trend-runoff{display:flex;flex-direction:column;gap:4px;max-width:36ch;padding:10px 14px;border-radius:var(--r);background:var(--bg)}
.runoff-value{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:1.35rem;font-weight:600;font-variant-numeric:tabular-nums;color:var(--honey)}
.trend-runoff .muted{line-height:1.45}
.tip-runoff{font-weight:600;color:var(--honey)}
.tip-runoff.off{color:var(--warn)}
.key-flower{width:16px;height:10px;border-radius:3px;background:var(--berry-soft);box-shadow:inset 0 0 0 1px var(--line)}
.key-dry{width:16px;height:10px;border-radius:3px;background:var(--honey-soft);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--honey) 30%,transparent)}
.chart-tip{position:absolute;z-index:2;pointer-events:none;display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:170px;max-width:240px;padding:12px 14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-sm);box-shadow:var(--shadow);font-size:var(--t-sm);line-height:1.4}
.tip-value{font-size:1.25rem;font-weight:700;font-variant-numeric:tabular-nums}
.chart-tip .status{margin-block:2px 4px}
.tip-hint{margin-top:4px;font-size:.78rem;color:var(--honey);font-weight:600}

.chart-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;min-height:180px;padding:24px;border-radius:var(--r);background:var(--bg);color:var(--muted)}
.chart-empty strong{font-family:var(--f-display);font-weight:400;font-size:var(--t-lg);color:var(--ink)}
.chart-empty span{max-width:36ch;font-size:var(--t-sm)}

.trend-table summary{cursor:pointer;font-size:var(--t-sm);font-weight:600;color:var(--muted);width:max-content}
.trend-table summary:hover{color:var(--ink)}
.table-scroll{overflow-x:auto;margin-top:12px}
.data-table{width:100%;border-collapse:collapse;font-size:var(--t-sm)}
.data-table th{text-align:left;font-weight:600;color:var(--muted);padding:8px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
.data-table td{padding:8px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
.data-table .num{font-variant-numeric:tabular-nums}

/* ---------- grow-lapse ---------- */
.timeline{margin-top:28px;background:var(--surface);border-radius:var(--r-lg);padding:clamp(20px,3vw,28px);display:flex;flex-direction:column;gap:18px}
.tl-empty{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:32px 24px;border-radius:var(--r);background:var(--bg);color:var(--muted)}
.tl-empty strong{font-family:var(--f-display);font-weight:400;font-size:var(--t-lg);color:var(--ink)}
.tl-empty span{max-width:40ch;font-size:var(--t-sm)}
.tl-body{display:flex;flex-direction:column;gap:14px}
.tl-body .link{align-self:flex-start}

.tl-stage{position:relative;aspect-ratio:4/3;max-height:72vh;width:100%;border-radius:var(--r);overflow:hidden;background:var(--soft);touch-action:pan-y}
.tl-stage:focus-visible{outline-offset:4px}
.tl-img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;transition:opacity .35s ease}
.tl-img.on{opacity:1}
.tl-img.instant{transition:none}
.timeline.playing .tl-img{transition-duration:.5s}
.tl-caption{position:absolute;left:0;right:0;bottom:0;padding:40px 18px 14px;display:flex;flex-direction:column;gap:2px;color:#fff;background:linear-gradient(to top,rgb(0 0 0 / .66),rgb(0 0 0 / 0));pointer-events:none}
.tl-when{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px}
.tl-when strong{font-family:var(--f-display);font-weight:400;font-size:1.35rem}
.tl-when span,.tl-readings{font-size:.85rem;opacity:.9;font-variant-numeric:tabular-nums}
.tl-readings:empty{display:none}
@media (max-width:600px){
  .tl-stage{aspect-ratio:4/5}
  .tl-caption{padding:28px 14px 10px}
  .tl-when strong{font-size:1.1rem}
  .tl-when span,.tl-readings{font-size:.78rem}
}
.tl-nav{position:absolute;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:42px;height:42px;border:0;border-radius:50%;background:rgb(0 0 0 / .38);color:#fff;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;backdrop-filter:blur(4px)}
.tl-nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.tl-nav.prev{left:12px}
.tl-nav.next{right:12px}
.tl-stage:hover .tl-nav:not(:disabled),.tl-nav:focus-visible{opacity:1}
.tl-nav:hover{background:rgb(0 0 0 / .55)}
.tl-nav:disabled{cursor:default}
@media (hover:none){.tl-nav{display:none}}

.tl-controls{display:flex;align-items:center;gap:14px}
.tl-play{display:grid;place-items:center;width:46px;height:46px;flex:none;border:0;border-radius:50%;background:var(--primary);color:var(--on-primary);cursor:pointer;transition:transform .15s}
.tl-play:hover:not(:disabled){transform:scale(1.06)}
.tl-play:disabled{opacity:.4;cursor:default}
.tl-play svg{width:20px;height:20px;fill:currentColor}
.tl-play .i-pause,.timeline.playing .tl-play .i-play{display:none}
.timeline.playing .tl-play .i-pause{display:block}
.tl-pos{flex:none;min-width:5ch;text-align:right;font-size:var(--t-sm);color:var(--muted);font-variant-numeric:tabular-nums}
#tlScrub{flex:1;padding:0;border:0;background:transparent;accent-color:var(--honey);height:28px;cursor:pointer}
#tlScrub:focus{box-shadow:none}

.tl-strip{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 8px;scroll-snap-type:x proximity;scrollbar-width:thin}
.tl-thumb{flex:none;display:flex;flex-direction:column;align-items:center;gap:4px;padding:0;border:0;background:none;cursor:pointer;scroll-snap-align:center;color:var(--muted);font:500 .75rem var(--f-body)}
.tl-thumb img{display:block;width:64px;height:64px;object-fit:cover;border-radius:var(--r-sm);background:var(--soft);opacity:.65;transition:opacity .2s,box-shadow .2s}
.tl-thumb:hover img{opacity:1}
.tl-thumb[aria-selected="true"]{color:var(--ink)}
.tl-thumb[aria-selected="true"] img{opacity:1;box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--honey)}

/* ---------- journal entries ---------- */
.entries-title{font-size:var(--t-xl);margin-top:44px;margin-bottom:16px}
.entry-list{display:flex;flex-direction:column;gap:12px}
.entry{display:grid;grid-template-columns:1fr auto;gap:12px 22px;padding:20px 22px;background:var(--surface);border-radius:var(--r)}
.entry{scroll-margin:24px}
.entry.flash{animation:entry-flash 1.8s ease-out}
@keyframes entry-flash{0%,35%{box-shadow:0 0 0 2px var(--honey),var(--shadow)}}
.entry-main{display:flex;flex-direction:column;gap:12px;min-width:0}
.entry-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px}
.entry-head strong{font-weight:700}
.entry-head .mono{font-size:.85rem;color:var(--muted)}
.readings{display:flex;flex-wrap:wrap;gap:6px}
.reading{font-size:.85rem;font-variant-numeric:tabular-nums;padding:5px 12px;border-radius:var(--r-pill);background:var(--bg)}
.reading b{font-weight:500;color:var(--muted);margin-right:5px}
.reading.ok{background:color-mix(in srgb,var(--good) 12%,var(--surface))}
.reading.low,.reading.high{background:color-mix(in srgb,var(--warn) 16%,var(--surface));color:var(--warn)}
.reading.low b,.reading.high b{color:inherit}
.entry-note{white-space:pre-wrap;overflow-wrap:anywhere;max-width:65ch}
.entry-side{display:flex;flex-direction:column;align-items:flex-end;gap:10px}
.entry-actions{display:flex;gap:16px}
.entry-photo{display:block;width:140px;aspect-ratio:1;object-fit:cover;border-radius:var(--r);background:var(--soft)}
@media (max-width:600px){.entry{grid-template-columns:1fr}.entry-side{flex-direction:row-reverse;justify-content:space-between;align-items:flex-start}.entry-photo{width:100%;max-width:260px}}
.entry-empty{color:var(--muted);padding:22px;background:var(--surface);border-radius:var(--r)}

/* ---------- dialog and toast ---------- */
dialog{border:0;border-radius:var(--r-lg);background:var(--surface);color:var(--ink);padding:clamp(22px,4vw,32px);width:min(480px,calc(100vw - 32px));box-shadow:var(--shadow)}
dialog::backdrop{background:rgb(15 25 19 / .45);backdrop-filter:blur(2px)}
dialog h2{font-size:var(--t-xl)}
.dialog-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}

/* ---------- welcome and guided tour ---------- */
.welcome{text-align:center;display:none}
.welcome[open]{display:flex;flex-direction:column;align-items:center;gap:12px}
.welcome-art{width:120px;margin-bottom:-4px}
.welcome h2{font-size:var(--t-xl)}
.welcome-steps{list-style:none;counter-reset:step;margin:6px 0 4px;padding:0;display:flex;flex-direction:column;gap:12px;text-align:left;width:100%}
.welcome-steps li{counter-increment:step;display:grid;grid-template-columns:34px 1fr;column-gap:12px;align-items:start;padding:12px 14px;border-radius:var(--r);background:var(--bg)}
.welcome-steps li::before{content:counter(step);grid-row:span 2;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--honey-soft);color:var(--honey);font-family:var(--f-display);font-size:1.1rem}
.welcome-steps b{font-weight:600}
.welcome-steps span{font-size:var(--t-sm);color:var(--muted);line-height:1.45}
.welcome .dialog-actions{width:100%}

.tour{position:fixed;inset:0;z-index:30}
.tour-hole{position:fixed;border-radius:var(--r-lg);box-shadow:0 0 0 2px var(--honey),0 0 0 9999px rgb(10 12 10 / .58);pointer-events:none;transition:left .35s ease,top .35s ease,width .35s ease,height .35s ease}
.tour-card{position:fixed;width:min(340px,calc(100vw - 32px));background:var(--surface);color:var(--ink);border-radius:var(--r);padding:18px 20px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:8px;animation:tour-in .25s ease-out}
.tour-card.docked{left:16px!important;right:16px;top:auto!important;bottom:calc(env(safe-area-inset-bottom,0px) + 16px);width:auto;max-width:520px;margin-inline:auto}
.tour-card h3{font-size:var(--t-lg)}
.tour-card p:not(.eyebrow){font-size:.95rem;color:var(--muted);line-height:1.55}
.tour-foot{display:flex;align-items:center;gap:10px;margin-top:6px}
.tour-foot .link{margin-left:auto;align-self:center}
.tour-dots{display:flex;gap:5px}
.tour-dots i{width:6px;height:6px;border-radius:50%;background:var(--line)}
.tour-dots i.on{background:var(--honey);width:16px;border-radius:3px}
@keyframes tour-in{from{opacity:0;transform:translateY(6px)}}

.toast{position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 24px);transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:12px 20px;border-radius:var(--r-pill);font-size:var(--t-sm);font-weight:600;max-width:calc(100vw - 32px);z-index:10;box-shadow:var(--shadow)}
.toast.error{background:var(--bad);color:#fff}

/* Block glow: every card in the journal gets a soft halo in the open grow's stage colour
   (same tints as the glow behind the journal, a little stronger so it reads around a card). */
.app{--jb:color-mix(in srgb,var(--honey) 55%,transparent);--jb-ring:70%}
.app[data-phase="seedling"],.app[data-phase="veg"]{--jb:color-mix(in srgb,#6aa2ff 58%,transparent)}
.app[data-phase="flower"]{--jb:color-mix(in srgb,var(--honey) 62%,transparent)}
.app[data-phase="harvested"]{--jb:color-mix(in srgb,var(--honey) 50%,transparent)}
:root[data-theme="dark"] .app{--jb:rgb(186 92 255 / .3);--jb-ring:45%}
:root[data-theme="dark"] .app[data-phase="seedling"],:root[data-theme="dark"] .app[data-phase="veg"]{--jb:rgb(120 150 255 / .3)}
:root[data-theme="dark"] .app[data-phase="flower"]{--jb:rgb(200 100 255 / .34)}
:root[data-theme="dark"] .app[data-phase="harvested"]{--jb:rgb(222 170 90 / .26)}
.app :is(.sidebar,.stats > div,.plan-card,.setup-strip,.feed-card,.cure-card,.panel:not(.editing),.trends,.timeline,.entry,.best-card,.seed-card,.compare-side,.compare-chart-card){
  box-shadow:0 0 0 1px color-mix(in srgb,var(--jb) var(--jb-ring),transparent),0 14px 40px -16px var(--jb);transition:box-shadow .8s}
.app .harvest-card{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--honey) 25%,transparent),0 14px 40px -16px var(--jb)}
@media print{.app :is(.sidebar,.stats > div,.plan-card,.setup-strip,.feed-card,.cure-card,.panel,.trends,.timeline,.entry){box-shadow:none}}