* { box-sizing: border-box; margin: 0; }
:root {
  /* daylight paper - the same family as the hand-drawn map (#E9E3D0) */
  --bg: #F1EBDD; --bg2: #EAE3D2;
  --card: #FBF8EF; --card-solid: #FFFDF6;
  --glass-border: rgba(44,58,48,0.14);
  --ink: #26332B; --muted: #66735F; --line: rgba(44,58,48,0.12); --line-2: rgba(44,58,48,0.20);
  --acc: #5F9432; --acc-fill: #A3E635; --acc2: #178F82;
  --fruit: #D06A32; --nut: #A67C4A; --berry: #A75BBE; --cucurbit: #1F9AA8;
  --veg: #3F8F4E; --vine: #7C5FD8; --hedge: #3F7F58; --herb: #7E9B3E; --structure: #4A4136;
  --attn: #C8402F; --gold: #A87E1B; --ok: #3F8F4E;
  --paper: var(--card-solid);
  --grass: rgba(95,148,50,.22); --soil: rgba(44,58,48,.08);
  --r: 18px; --r-sm: 12px;
  --shadow: 0 8px 26px rgba(58,50,32,0.14);
  --tr: all .18s ease;
}
/* the root carries the page colour too: in the phone shells the WKWebView paints
   its own white behind the page, and rubber-band over-scroll exposes it as a
   white flash unless html itself is dark */
html { color-scheme: light; background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
/* iOS WebKit paints button text in its own accent blue unless told otherwise;
   every button in this app styles itself from the page palette */
button, select { color: inherit; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea {
  appearance: none; -webkit-appearance: none;
  padding: 9px 12px; border: 1px solid var(--line-2);
  background-color: rgba(44,58,48,0.07); color: var(--ink);
  border-radius: 10px; font: inherit; font-size: 13.5px;
  transition: border-color .15s ease, background-color .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: rgba(95,148,50,0.9); background-color: rgba(44,58,48,0.07);
}
select {
  cursor: pointer; padding-inline-end: 32px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2396A395' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 15px;
}
html.rtl select { background-position: left 10px center; }
select option { background: var(--card-solid); color: var(--ink); }
input[type=checkbox], input[type=radio] { accent-color: var(--acc); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  background: var(--bg); color: var(--ink); min-height: 100vh;
  background-image:
    radial-gradient(900px 500px at 8% -5%, rgba(95,148,50,0.09), transparent 60%),
    radial-gradient(800px 600px at 100% 10%, rgba(45,212,191,0.07), transparent 55%),
    radial-gradient(700px 700px at 50% 110%, rgba(95,148,50,0.05), transparent 60%);
  background-attachment: fixed;
}
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(44,58,48,0.07); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* header */
header {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 28px; position: sticky; top: 0; z-index: 30;
  background: rgba(251,248,239,0.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--acc); }
.brand h1 { font-family: var(--display); font-size: 24px; letter-spacing: .02em; font-weight: 700; color: var(--ink); line-height: 1; }
.head-right { display: flex; align-items: center; gap: 12px; }
.weather-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.wx { background: var(--card); border: 1px solid var(--glass-border); border-radius: 12px; padding: 5px 11px; text-align: center; min-width: 56px; backdrop-filter: blur(10px); }
.wx .d { font-size: 11px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); font-weight: 600; }
.wx .t { font-size: 14px; font-weight: 750; } .wx .t small { color: var(--muted); font-weight: 500; }
.wx .r { font-size: 11px; color: var(--acc2); font-weight: 600; }
.lang-btn { border: 1px solid var(--line-2); background: var(--card); color: var(--ink); padding: 8px 14px; font-weight: 700; cursor: pointer; letter-spacing: 1px; border-radius: 999px; transition: var(--tr); }
.lang-btn:hover { background: var(--acc); color: #10160D; border-color: var(--acc); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 10px; }


/* nav */
nav { display: flex; gap: 6px; padding: 14px 28px 4px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
  border-radius: 999px; transition: var(--tr); letter-spacing: .2px;
}
.tab svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab:hover { color: var(--ink); background: var(--card); border-color: var(--glass-border); }
.tab.active { background: linear-gradient(135deg, var(--acc), #7BC93A); color: #10160D; font-weight: 800; box-shadow: 0 4px 18px rgba(95,148,50,0.9); }
.side-brand { display: none; }

/* desktop: the nav is a left rail, everything else lives in the right column */
@media (min-width: 981px) {
  body { display: grid; grid-template-columns: 216px minmax(0, 1fr); grid-template-areas: "nav header" "nav main"; align-content: start; min-height: 100vh; }
  nav {
    grid-area: nav; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 3px;
    padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: rgba(251,248,239,0.90); border-inline-end: 1px solid var(--line);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  }
  .side-brand { display: flex; align-items: center; gap: 10px; color: var(--acc); padding: 2px 10px 18px; }
  .side-brand span { font-family: var(--display); color: var(--ink); font-weight: 700; font-size: 19px; letter-spacing: .02em; }
  .tab { border-radius: 12px; padding: 10px 12px; }
  header { grid-area: header; }
  header .brand { display: none; }
  main { grid-area: main; }
  .walk-ov { left: 216px; }
}
/* width:100% matters - as a grid item, `margin: 0 auto` alone makes main shrink to
   its content, which collapses to nothing when a view has no intrinsic width. */
main { padding: 18px 28px 70px; max-width: 1560px; margin: 0 auto; width: 100%; }
.view { display: none; } .view.active { display: block; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
h2 { font-size: 18px; font-weight: 750; letter-spacing: -.2px; }

/* cards */
.card {
  background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 18px 20px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card h3 { font-size: 12.5px; font-weight: 750; text-transform: uppercase; letter-spacing: 1.3px; color: var(--muted); margin-bottom: 13px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card h3 .n { color: var(--acc); font-size: 11.5px; letter-spacing: .4px; text-transform: none; font-weight: 650; }

/* hero */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin: 10px 0 20px; flex-wrap: wrap; }
.hero .season { font-size: 11.5px; text-transform: uppercase; letter-spacing: 2.2px; font-weight: 800; background: linear-gradient(90deg, var(--acc), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h2 { font-size: 32px; font-weight: 800; letter-spacing: -.8px; margin: 3px 0; }
.hero .date { color: var(--muted); font-size: 14px; }
.sun-strip { display: flex; align-items: flex-end; gap: 18px; background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 20px; font-size: 14px; font-weight: 700; backdrop-filter: blur(14px); }
.sun-strip i { display: block; font-style: normal; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 2px; }
.sun-arc { width: 58px; height: 25px; border: 2.5px solid var(--gold); border-bottom: none; border-radius: 60px 60px 0 0; align-self: flex-end; opacity: .9; }

/* alerts */
.alert-row { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.alert { padding: 11px 16px; font-size: 14px; border-radius: var(--r-sm); border: 1px solid rgba(255,107,94,.3); background: rgba(255,107,94,.1); backdrop-filter: blur(10px); }
.alert.heat { border-color: rgba(229,192,91,.3); background: rgba(229,192,91,.1); }
.alert.rain, .alert.wind { border-color: rgba(76,201,212,.3); background: rgba(76,201,212,.1); }
.alert.hail { border-color: rgba(199,125,218,.35); background: rgba(199,125,218,.12); }

/* KPI row: the tiles share one row and wrap gracefully */
.kpi-row { grid-column: span 12; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); }

/* disease pressure expansion */
.dp-day { margin-top: 12px; }
.dp-risk { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px 14px; margin-top: 8px;
  background: rgba(44,58,48,0.07); border: 1px solid var(--glass-border); border-radius: var(--r-sm); }
.dp-risk .badge { margin-top: 2px; }

/* grid */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; } .col-6 { grid-column: span 6; } .col-8 { grid-column: span 8; } .col-12 { grid-column: span 12; }

/* KPI tiles */
.kpi {
  background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 16px 18px; cursor: pointer; position: relative;
  backdrop-filter: blur(14px); transition: var(--tr);
}
.kpi:hover { transform: translateY(-2px); border-color: rgba(95,148,50,0.9); }
.kpi.active { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 10px 34px rgba(95,148,50,0.9); }
.kpi .kv { font-size: 34px; font-weight: 800; letter-spacing: -1px; color: var(--ink); line-height: 1.05; }
.kpi .kv small { font-size: 13.5px; color: var(--muted); margin-inline-start: 4px; font-weight: 600; letter-spacing: 0; }
.kpi .kl { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin-top: 4px; font-weight: 750; }
.kpi .ks { font-size: 12.5px; color: var(--muted); margin-top: 7px; line-height: 1.4; }
.kpi-flex { display: flex; gap: 12px; align-items: center; }
.donut-mini { width: 52px; flex: none; }
.lvl-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-inline-end: 4px; }
.chev { position: absolute; top: 14px; right: 16px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--acc); font-weight: 800; }
.spark { width: 100%; margin-top: 9px; height: 22px; }

/* expanded panel */
.exp-panel { position: relative; border-inline-start: none; outline: 1px solid rgba(95,148,50,0.9); grid-column: 1 / -1; }
@media (min-width: 641px) { .kpi-row .exp-panel { order: 99; } }
.exp-panel h3 { color: var(--ink); font-size: 14px; text-transform: none; letter-spacing: -.2px; font-weight: 750; }
.exp-close { position: absolute; top: 14px; right: 16px; margin-inline-start: 0; }
.exp-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.wday { display: grid; grid-template-columns: 48px 1fr 1fr 62px; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; border-top: 1px solid var(--line); }
.wday:first-of-type { border-top: none; }
.wday .wbar { height: 9px; }
.attn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.attn-grid .attn-item { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px; }

/* 3D snippet */
.snap3d { cursor: pointer; position: relative; transition: var(--tr); overflow: hidden; }
.snap3d:hover { transform: translateY(-2px); border-color: rgba(95,148,50,0.9); }
.snap3d img, .snap3d .snap-svg { width: 100%; aspect-ratio: 16/9.5; object-fit: cover; display: block; border-radius: var(--r-sm); background: linear-gradient(160deg, #22302A, #182119); }

/* dashboard bits */
.attn-item { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; border-radius: 8px; transition: var(--tr); }
.attn-item:first-of-type { border-top: none; }
.attn-item:hover { background: rgba(44,58,48,0.07); }
.attn-item img { width: 46px; height: 46px; object-fit: cover; flex: none; border-radius: 9px; }
.attn-item .nm { font-weight: 700; font-size: 14px; }
.attn-item .cd { color: var(--attn); font-size: 12.5px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.harv-item { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.harv-item:first-of-type { border-top: none; }
.harv-item b { min-width: 110px; } .harv-item span { color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; text-align: center; background: rgba(44,58,48,0.07); }
.stat .v { font-size: 24px; font-weight: 800; letter-spacing: -.5px; color: var(--acc); }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-top: 3px; font-weight: 650; }
.mini-task { display: flex; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; align-items: flex-start; }
.mini-task:first-of-type { border-top: none; }
.dot-k { width: 8px; height: 8px; border-radius: 50%; background: var(--fruit); margin-top: 5px; flex: none; }
.health-row { display: flex; gap: 16px; align-items: center; }
.donut { width: 108px; flex: none; }
.donut-big { font: 800 20px -apple-system, sans-serif; fill: var(--ink); }
.donut-small { font: 500 8.5px -apple-system, sans-serif; fill: var(--muted); }
.health-legend { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.health-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-inline-end: 6px; }
.wlbl { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin: 8px 0 4px; }
.wlbl b { color: var(--ink); }
.wbar { height: 8px; background: rgba(44,58,48,0.07); border-radius: 99px; overflow: hidden; }
.wbar i { display: block; height: 100%; border-radius: 99px; }
.wmsg { font-size: 13.5px; margin-top: 10px; line-height: 1.5; }
.wmsg.suggest { color: var(--acc); border-inline-start: 3px solid var(--acc); padding-inline-start: 10px; }
.zone-photo { width: 100%; aspect-ratio: 16/7; object-fit: cover; border-radius: var(--r-sm); }
.pod .pod-img { width: 100%; aspect-ratio: 4/3.4; object-fit: cover; cursor: pointer; border-radius: var(--r-sm); transition: var(--tr); }
.pod .pod-img:hover { transform: scale(1.015); }
.feed-item { font-size: 13px; padding: 6px 0; border-top: 1px solid var(--line); }
.feed-item:first-of-type { border-top: none; }
.feed-item .fd { color: var(--muted); font-size: 11.5px; margin-inline-end: 6px; }
.foundation { margin-top: 14px; font-size: 13px; }
.fbar { height: 7px; background: rgba(44,58,48,0.07); border-radius: 99px; margin: 7px 0; overflow: hidden; }
.fbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc2)); border-radius: 99px; }

/* map */
.map-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.search { padding: 10px 16px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-size: 14px; width: 230px; border-radius: 999px; transition: var(--tr); }
.search::placeholder { color: var(--muted); }
.search:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(95,148,50,0.22); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: var(--card); color: var(--muted); padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; transition: var(--tr); }
.chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip.on { color: var(--ink); border-color: rgba(95,148,50,0.9); background: rgba(95,148,50,.16); }
.ghost-btn { border: 1px solid var(--line-2); background: transparent; color: var(--muted); padding: 8px 15px; font-size: 13px; font-weight: 600; cursor: pointer; margin-inline-start: auto; border-radius: 999px; transition: var(--tr); }
.ghost-btn:hover { border-color: var(--acc); color: var(--acc); }
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; }
#map-container { position: relative; background: var(--card-solid); border: 1px solid var(--glass-border); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; cursor: grab; }
#map-container:active { cursor: grabbing; }
#map-container svg { display: block; width: 100%; height: auto; }
.canopy { cursor: pointer; }
.canopy.dim { opacity: 0.1 !important; pointer-events: none; }
.canopy .ring { fill: none; stroke: transparent; stroke-width: 0.16; transition: stroke .12s ease; }
@media (hover: hover) {
  .canopy:hover .ring { stroke: rgba(35,40,32,.55); }
  .canopy:hover { filter: brightness(1.08); }
}
.canopy.selected .ring { stroke: #2F5D3A; stroke-width: 0.26; }
#map-svg text { font-family: system-ui, -apple-system, sans-serif; paint-order: stroke; stroke: rgba(251,248,239,.85); stroke-width: 0.18; stroke-linejoin: round; }
.zone-poly { cursor: pointer; }
.zone-poly:hover { filter: brightness(0.96); }
.map-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tooltip { position: fixed; z-index: 40; background: rgba(251,248,239,0.94); border: 1px solid var(--glass-border); color: var(--ink); font-size: 13px; padding: 8px 12px; pointer-events: none; max-width: 240px; border-radius: 10px; box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.tooltip .v { color: var(--muted); font-size: 12px; }

/* 3d */
.three-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; }
#three-container { position: relative; border: 1px solid var(--glass-border); border-radius: var(--r); box-shadow: var(--shadow); height: 74vh; min-height: 440px; overflow: hidden; background: linear-gradient(160deg, #22302A, #182119); }
#three-container canvas { display: block; }
.three-hint { position: absolute; left: 14px; bottom: 12px; z-index: 5; font-size: 12px; color: var(--ink); background: rgba(251,248,239,0.94); padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(8px); }
.three-hint.map-hint { top: 12px; bottom: auto; } /* the map runs taller than the screen - keep the hint where the eye lands */
.wx-badge { position: absolute; top: 14px; left: 14px; z-index: 6; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.wx-now { display: flex; align-items: center; gap: 8px; background: rgba(251,248,239,0.94); border: 1px solid var(--line-2); padding: 8px 14px; border-radius: 999px; backdrop-filter: blur(10px); font-size: 14px; }
.wx-now b { font-weight: 750; } .wx-now span { color: var(--acc2); font-weight: 700; }
.wx-live { font-style: normal; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; color: var(--acc); border: 1px solid rgba(95,148,50,0.9); padding: 2px 7px; border-radius: 999px; }
.wx-chips { display: flex; gap: 5px; flex-wrap: wrap; max-width: 330px; }
.wx-chip { font-size: 11.5px; font-weight: 650; padding: 5px 10px; border-radius: 999px; cursor: pointer; background: rgba(251,248,239,0.94); border: 1px solid var(--line-2); color: var(--ink); backdrop-filter: blur(8px); transition: var(--tr); }
.wx-chip:hover { color: var(--ink); border-color: rgba(95,148,50,0.9); }
.wx-chip.on { background: rgba(95,148,50,0.9); border-color: rgba(95,148,50,0.9); color: var(--acc); }

/* detail */
.detail { background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; max-height: 78vh; overflow-y: auto; backdrop-filter: blur(14px);
  align-self: start; /* a short card is a short card, never a full-height empty box */ }
/* nothing selected: give the whole width back to the map, the twin or the designer */
.three-wrap.no-detail, .map-wrap.no-detail { grid-template-columns: minmax(0, 1fr); }
.ds-wrap.no-detail { grid-template-columns: 250px minmax(0, 1fr); }
.no-detail > .detail, .no-detail > .ds-side { display: none; }
.detail-empty { color: var(--muted); font-size: 13.5px; }
.detail h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 2px; }
.detail .latin { font-style: italic; color: var(--muted); font-size: 13.5px; }
.detail .hero { width: 100%; aspect-ratio: 4/3; object-fit: cover; margin-top: 12px; cursor: zoom-in; border-radius: var(--r-sm); }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border: 1px solid var(--line-2); margin: 8px 5px 0 0; color: var(--muted); border-radius: 999px; background: rgba(44,58,48,0.07); }
.badge.attention { color: var(--attn); border-color: rgba(255,107,94,.5); background: rgba(255,107,94,.08); }
.badge.ok { color: var(--ok); border-color: rgba(111,207,124,.5); background: rgba(111,207,124,.08); }
.detail dl { margin: 12px 0 4px; font-size: 14px; }
.detail dt { color: var(--muted); margin-top: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 750; }
.detail dd { margin: 2px 0 0; }
.cond { color: var(--attn); font-size: 13.5px; margin-top: 3px; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; cursor: pointer; border-radius: 8px; transition: var(--tr); }
.thumbs img:hover { transform: scale(1.05); }
.care-list { margin-top: 6px; font-size: 13.5px; list-style: none; }
.care-list li { margin: 7px 0 0; padding-inline-start: 12px; border-inline-start: 2.5px solid rgba(95,148,50,0.9); }
.care-month { color: var(--gold); font-size: 11.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.note-row { display: flex; gap: 7px; margin-top: 14px; }
.note-row input { flex: 1; }
.note-row input::placeholder { color: var(--muted); }
.note-row button { border: 1px solid var(--line-2); background: rgba(44,58,48,0.07); color: var(--ink); padding: 9px 14px; cursor: pointer; border-radius: 10px; font-weight: 650; transition: var(--tr); }
.note-row button:hover { background: var(--acc); color: #10160D; border-color: var(--acc); }
.obs { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 6px; padding-inline-start: 10px; border-inline-start: 2px solid var(--line-2); }
.obs > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* always drawn, never hover-only: this is used on a phone out in the garden */
.obs .xdel { flex: none; padding: 0; line-height: 1.35; }
.file-btn { border: 1px solid var(--line-2); padding: 9px 12px; font-size: 13px; cursor: pointer; color: var(--muted); border-radius: 10px; transition: var(--tr); }
.file-btn:hover { border-color: var(--acc); color: var(--acc); }

/* inventory */
#inventory table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); font-size: 14px; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--glass-border); }
#inventory th, #inventory td { text-align: start; padding: 11px 14px; border-bottom: 1px solid var(--line); }
#inventory th { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); background: rgba(44,58,48,0.07); position: sticky; top: 64px; font-weight: 750; }
/* only the species rows open a plant; the unplaced rows must not offer a click */
#inventory tr[data-plant]:hover td { background: rgba(44,58,48,0.07); cursor: pointer; }
.src { font-size: 12.5px; color: var(--muted); }
.st-attention { color: var(--attn); font-weight: 700; } .st-unverified { color: var(--gold); }

/* tasks */
.tasks-cols { display: grid; grid-template-columns: 1fr; gap: 22px; max-width: 820px; }
.tasks-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tasks-head h2 { margin-bottom: 0; }
.tasks-cols h2 { margin-bottom: 12px; }
.task { display: flex; gap: 11px; align-items: flex-start; background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--r-sm); box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 8px; font-size: 14px; transition: var(--tr); }
.task:hover { border-color: rgba(95,148,50,0.9); }
.task input[type=checkbox] { margin-top: 2px; accent-color: var(--acc); width: 16px; height: 16px; }
.task.done { opacity: 0.4; text-decoration: line-through; }
.task .meta { color: var(--muted); font-size: 11.5px; margin-top: 3px; }

/* journal + planner */
.hform { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }

.hform button { border: 1px solid var(--line-2); background: rgba(44,58,48,0.07); color: var(--ink); padding: 9px 15px; cursor: pointer; font-size: 13.5px; font-weight: 650; border-radius: 10px; transition: var(--tr); }
.hform button:hover { background: var(--acc); color: #10160D; border-color: var(--acc); }
.hrow { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hrow.slim { padding: 6px 0; font-size: 13.5px; }
.hrow .hkg { margin-inline-start: auto; font-weight: 800; color: var(--acc); white-space: nowrap; }
.hrow.is-low b { color: var(--attn); }
.lowb { font-size: 11px; font-weight: 800; color: var(--attn); border: 1px solid rgba(255,107,94,.5); padding: 2px 7px; border-radius: 999px; }
.xdel { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 12.5px; }
.xdel:hover { color: var(--attn); }
.qbtn { border: 1px solid var(--line-2); background: rgba(44,58,48,0.07); color: var(--ink); cursor: pointer; padding: 2px 10px; border-radius: 8px; transition: var(--tr); }
.qbtn:hover { border-color: var(--acc); color: var(--acc); }
.hchart { width: 100%; }
.hchart .hx { font: 500 7px -apple-system, sans-serif; fill: var(--muted); }
.hchart .hv { font: 800 6.5px -apple-system, sans-serif; fill: var(--fruit); }
.kgby { margin-top: 10px; font-size: 13px; }
.pest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.pest-item { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px; font-size: 13px; }
.pest-item img { width: 64px; height: 64px; object-fit: cover; flex: none; border-radius: 8px; }
.frost-big { font-size: 46px; font-weight: 800; letter-spacing: -1.5px; background: linear-gradient(90deg, var(--acc2), var(--acc)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin: 8px 0 2px; }
.frost-big span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; font-weight: 600; letter-spacing: 0; -webkit-text-fill-color: var(--muted); }
.moon-row { display: flex; gap: 14px; align-items: center; }
.moon { width: 54px; flex: none; }
.rot { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rot th { text-align: start; font-size: 11px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); padding: 4px 8px 4px 0; font-weight: 750; }
.rot td { padding: 8px 8px 8px 0; border-top: 1px solid var(--line); }
.tg-grid { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; }
.tg-grid label { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; font-weight: 700; }

.zf { width: 58px; padding: 3px 6px; border: 1px solid var(--line-2); background: rgba(44,58,48,0.07); color: var(--ink); font-size: 12.5px; border-radius: 7px; }

/* harvest timeline */
.tl-name { font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: var(--tr); }
.tl-name:hover { color: var(--acc); }
.tl-cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.tl-cells i { height: 15px; background: rgba(44,58,48,0.07); display: block; border-radius: 4px; }
.tl-cells i.wk0 { outline: 1.5px solid var(--acc); outline-offset: -1.5px; }
.tl-cells i.on.c-fruit { background: var(--fruit); } .tl-cells i.on.c-nut { background: var(--nut); }
.tl-cells i.on.c-berry { background: var(--berry); } .tl-cells i.on.c-cucurbit { background: var(--cucurbit); }
.tl-cells i.on.c-veg { background: var(--veg); } .tl-cells i.on.c-vine { background: var(--vine); }

/* action center sections */
.ac-sec { margin-bottom: 12px; }
.ac-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.1px; font-weight: 800; padding: 6px 0 4px; }
.ac-label.now { color: var(--attn); } .ac-label.week { color: var(--fruit); } .ac-label.later { color: var(--muted); }
.ac-label span { color: var(--muted); font-weight: 500; }
.ac-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; border-top: 1px solid var(--line); font-size: 14px; cursor: pointer; border-radius: 8px; transition: var(--tr); }
.ac-item.plain { cursor: default; }
.ac-item input { margin-top: 2px; accent-color: var(--acc); width: 15px; height: 15px; }
.ac-item:hover { background: rgba(44,58,48,0.07); }

#lightbox { position: fixed; inset: 0; background: rgba(6,9,7,0.93); display: none; align-items: center; justify-content: center; z-index: 50; cursor: zoom-out; backdrop-filter: blur(6px); }
#lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 14px; }

/* v1.0: ask, time panel, roles, walk mode, QR, yield */
.ask-row { display: flex; gap: 8px; margin: 0 0 14px; }
.ask-row input { flex: 1; max-width: 640px; padding: 12px 18px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-size: 14px; border-radius: 999px; backdrop-filter: blur(10px); }
.ask-row input::placeholder { color: var(--muted); }
.ask-row input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(95,148,50,0.22); }
.ask-row .ghost-btn { margin-inline-start: 0; border-color: rgba(95,148,50,0.9); color: var(--acc); font-weight: 700; }
#ask-ans { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ask-card { background: var(--card); border: 1px solid rgba(95,148,50,0.9); border-radius: var(--r-sm); padding: 12px 16px; max-width: 460px; font-size: 14px; backdrop-filter: blur(10px); }
.ask-card b { display: block; margin-bottom: 4px; }

.role-sel option { background: var(--card-solid); }
body.role-viewer :is(.hform, .note-row, .act-bar, .act-pane, .xdel, .qbtn, .file-btn, .tg-grid, #tg-save, #tg-test, .zf, input[data-actask], .task input, #quick-add, #qr-print) { display: none !important; }
.time-panel { position: absolute; top: 14px; right: 14px; z-index: 6; display: flex; flex-direction: column; gap: 6px; background: rgba(251,248,239,0.94); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(10px); min-width: 250px; }
/* fold control: the panel collapses to its own header so the twin is never buried */
.tp-fold { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  background: none; border: 0; padding: 0 0 2px; margin: 0; cursor: pointer; color: var(--muted);
  font: inherit; text-transform: uppercase; letter-spacing: .9px; font-size: 10.5px; font-weight: 750; }
.tp-fold:hover { color: var(--acc); }
.tp-fold svg { flex: none; opacity: .85; }
.time-panel.collapsed { min-width: 0; padding: 9px 12px; gap: 0; }
.time-panel.collapsed .tp-body { display: none; }
.time-panel.collapsed .tp-fold { padding-bottom: 0; }
.tp-body { display: flex; flex-direction: column; gap: 6px; }
.tp-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink); }
.tp-row span { width: 46px; text-transform: uppercase; letter-spacing: .8px; font-size: 10.5px; font-weight: 750; color: var(--muted); }
.tp-row b { min-width: 62px; text-align: end; font-size: 12px; }
.tp-row input[type=range] { flex: 1; accent-color: var(--acc); height: 4px; }
.tp-row .ghost-btn { margin-inline-start: 0; width: 100%; padding: 6px 10px; font-size: 11.5px; }
.tp-row .ghost-btn.on-acc { border-color: var(--acc); color: var(--acc); background: rgba(95,148,50,.16); }
.sun-leg { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--ink); align-items: center; }
.sun-leg i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-inline-end: 3px; }
.yrow { display: grid; grid-template-columns: 90px 1fr 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; padding: 5px 0; border-top: 1px solid var(--line); }
.yrow:first-of-type { border-top: none; }
.yrow b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yrow .wbar { height: 9px; }
.walk-ov { position: fixed; inset: auto 12px 12px 12px; z-index: 45; }
.walk-card { background: rgba(251,248,239,0.94); border: 1px solid rgba(95,148,50,0.9); border-radius: var(--r); padding: 14px 16px; backdrop-filter: blur(14px); box-shadow: var(--shadow); max-width: 480px; margin: 0 auto; }
.walk-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#qr-sheet { display: none; }
body.printing-tags #qr-sheet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4mm; background: #fff; color: #000; padding: 8mm; }
.qr-tag { display: flex; gap: 3mm; align-items: center; border: 1px dashed #999; padding: 3mm; break-inside: avoid; }
.qr-tag svg { width: 22mm; height: 22mm; flex: none; }
.qr-tag b { display: block; font-size: 11.5px; } .qr-tag span { display: block; font-size: 10.5px; color: #444; }
.qr-tag .qid { font-family: monospace; }
.qr-head { grid-column: 1 / -1; font: 700 12px sans-serif; padding-bottom: 2mm; }
@media print {
  body.printing-tags > *:not(#qr-sheet) { display: none !important; }
  body.printing-tags { background: #fff !important; }
  body.printing-tags #qr-sheet { display: grid !important; }
}

/* v1.1: advisor, crowding, plant doctor */
.ghost-btn.on-acc { border-color: var(--acc); color: var(--acc); background: rgba(95,148,50,.16); }
.adv-item { border-top: 1px solid var(--line); padding: 12px 0 10px; }
.adv-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.adv-h b { font-size: 15px; }
.adv-why { list-style: none; margin: 6px 0 8px; font-size: 13px; color: var(--muted); }
.adv-why li { padding-inline-start: 14px; position: relative; margin: 3px 0; line-height: 1.4; }
.adv-why li::before { content: '+'; position: absolute; left: 0; color: var(--acc); font-weight: 800; }
.adv-add { margin-inline-start: 0 !important; padding: 5px 12px; font-size: 12px; }
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.sym-grid { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 10px; }
.sym { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; transition: var(--tr); user-select: none; }
.sym:hover { border-color: var(--ink); }
.sym.on { border-color: var(--acc); background: rgba(95,148,50,0.9); color: var(--ink); }
.sym.hinted { box-shadow: inset 3px 0 0 var(--acc2); }
.sym input { accent-color: var(--acc); pointer-events: none; }
.doc-thumb { width: 130px; aspect-ratio: 1; object-fit: cover; border-radius: 10px; margin: 4px 8px 4px 0; vertical-align: middle; }
.diag { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 9px; }
.diag.top { border-color: rgba(95,148,50,0.9); background: rgba(95,148,50,.16); }
.diag-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.diag-h b { font-size: 14.5px; }
.diag-score { margin-inline-start: auto; font-size: 11.5px; font-weight: 800; color: var(--acc); }
.diag-b { font-size: 13px; margin-top: 6px; }
.diag-b b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); margin-top: 8px; }
.diag-b p { line-height: 1.5; margin-top: 2px; }
.diag-b .hform button { padding: 6px 12px; font-size: 12.5px; }
.crowd-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.crowd-row:first-of-type { border-top: none; }
.crowd-row .hkg { margin-inline-start: auto; white-space: nowrap; font-weight: 800; }

/* garden designer */
.ds-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

#ds-name { font-weight: 700; min-width: 180px; }
.ds-stats { font-size: 13px; color: var(--muted); }
.ds-stats b { color: var(--acc); }
.ds-cov { display: inline-flex; gap: 3px; align-items: center; font-size: 11.5px; color: var(--muted); }
.ds-cov i { width: 10px; height: 14px; border-radius: 3px; background: rgba(44,58,48,0.07); display: inline-block; }
.ds-cov i.on { background: var(--acc); }
.ds-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr) 280px; gap: 14px; }
.ds-palette { display: flex; flex-direction: column; gap: 10px; max-height: 76vh; }
.ds-pal-list { overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding-inline-end: 4px; }
.ds-pal { color: var(--ink); display: grid; grid-template-columns: 36px 1fr auto; gap: 9px; align-items: center; text-align: start;
  background: var(--card); border: 1px solid var(--glass-border); border-radius: 12px; padding: 7px 10px;
  color: var(--ink); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: var(--tr); }
.ds-pal:hover { border-color: rgba(95,148,50,0.9); }
.ds-pal.on { border-color: var(--acc); background: rgba(95,148,50,.16); }
.ds-pal svg { width: 34px; height: 34px; }
.ds-pal small { color: var(--muted); font-weight: 500; font-size: 11.5px; white-space: nowrap; }
.ds-3d-host { min-width: 0; position: relative; }
.ds-3d-host #three-container { height: 68vh; min-height: 420px; }
.ds-3d-host .three-hint, .ds-3d-host .time-panel { display: none; }
#ds-trash { display: none; position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 6;
  align-items: center; gap: 9px; padding: 11px 18px; border-radius: 999px;
  background: rgba(251,248,239,0.94); border: 1.5px dashed rgba(44,58,48,0.8); color: var(--muted);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: .82rem; letter-spacing: .02em; pointer-events: none; transition: border-color .15s, color .15s, background .15s; }
#ds-trash.show { display: flex; }
#ds-trash.hot { border-color: #FF6B5E; color: #FF8A7E; background: rgba(90, 28, 22, .78); }
.ds-item { cursor: grab; }
.ds-item.sel { cursor: grabbing; }
.ds-item.ds-removed { cursor: pointer; }
.ds-side { background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; backdrop-filter: blur(14px); align-self: start; }
.ds-side h2 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
@media (max-width: 980px) { .ds-wrap { grid-template-columns: 1fr; } .ds-palette { max-height: 200px; } .ds-pal-list { flex-direction: row; flex-wrap: wrap; } .ds-pal { grid-template-columns: 30px 1fr; } .ds-pal small { display: none; } }

/* connect screen (native first run / server offline) */
.connect-ov { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 24px; }
/* photo timeline */
.ptl { margin-top: 12px; }
.ptl .hero { margin-top: 0; }
.ptl-head { display: flex; justify-content: flex-end; margin-top: 8px; }
.ptl-strip { display: flex; gap: 8px; overflow-x: auto; margin-top: 6px; padding: 2px 0 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.ptl-strip img { width: 104px; height: 84px; object-fit: cover; border-radius: 10px; cursor: pointer;
  opacity: .68; border: 2.5px solid transparent; transition: var(--tr); flex: none; scroll-snap-align: center; }
.ptl-strip img:hover { opacity: .85; }
.ptl-strip img.on { opacity: 1; border-color: #5F9432; box-shadow: 0 2px 8px rgba(58,50,32,.2); }

/* offline + toast */
.offline-badge { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 70;
  background: rgba(194,100,60,.92); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .3px;
  padding: 6px 14px; border-radius: 999px; backdrop-filter: blur(8px);
  max-width: calc(100vw - 24px); text-align: center; }
/* the hidden attribute must always win: a later display rule would otherwise pin the badge on screen */
.offline-badge[hidden] { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 80;
  background: rgba(251,248,239,0.94); border: 1px solid var(--glass-border); color: var(--ink);
  padding: 11px 18px; border-radius: 12px; font-size: 13.5px; max-width: 90vw; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; backdrop-filter: blur(12px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
/* compact tables in the care hub */
table.mini { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 6px; }
table.mini th { text-align: start; font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); font-weight: 750; padding: 4px 6px 4px 0; border-bottom: 1px solid var(--line); }
table.mini td { padding: 7px 6px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv-line { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.kv-line b { color: var(--ink); font-size: 17px; font-weight: 800; }
details summary { cursor: pointer; padding: 4px 0; }
details summary:hover { color: var(--ink); }

.qr-phone svg { width: 160px; height: 160px; background: #fff; padding: 8px; border-radius: 10px; display: block; }

/* ---- AR: camera + floating labels ---- */
.ar-ov { position: fixed; inset: 0; z-index: 60; background: #000; overflow: hidden; }
.ar-ov video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#ar-labels { position: absolute; inset: 0; }
.ar-label {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: rgba(251,248,239,0.94); border: 1px solid var(--line-2); border-inline-start: 3px solid var(--acc);
  border-radius: 12px; padding: 8px 12px; white-space: nowrap; color: var(--ink); font-size: 13.5px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  will-change: transform; transition: opacity .2s;
}
.ar-label::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 22px; background: linear-gradient(rgba(44,58,48,0.8), transparent); }
.ar-label b { font-weight: 750; }
.ar-label span { color: var(--muted); font-size: 12px; }
.ar-label.c-fruit { border-inline-start-color: var(--fruit); } .ar-label.c-nut { border-inline-start-color: var(--nut); }
.ar-label.c-berry { border-inline-start-color: var(--berry); } .ar-label.c-vine { border-inline-start-color: var(--vine); }
.ar-label.c-cucurbit { border-inline-start-color: var(--cucurbit); } .ar-label.c-hedge { border-inline-start-color: var(--hedge); }
.ar-label.c-herb { border-inline-start-color: var(--herb); }
.arb { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .6px; padding: 2.5px 7px; border-radius: 999px; }
.arb.attn { background: rgba(255,107,94,.2); color: #FF8A7E; }
.arb.phi { background: rgba(194,100,60,.22); color: #E09A6F; }
.arb.risk { background: rgba(229,192,91,.18); color: var(--gold); }
.ar-top {
  position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: linear-gradient(rgba(58,50,32,0.35), transparent);
  color: var(--ink); font-size: 13px;
}
#ar-radar { position: absolute; left: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 118px; height: 118px;
  background: rgba(251,248,239,0.94); border: 1px solid var(--line-2); border-radius: 50%; backdrop-filter: blur(8px); }
.arr-plot { fill: rgba(95,148,50,0.9); stroke: rgba(95,148,50,0.9); stroke-width: 1; }
.arr-dot { fill: rgba(44,58,48,0.8); }
.arr-me { fill: var(--acc); }
.arr-cone { fill: rgba(95,148,50,0.9); }
.ar-sheet {
  position: absolute; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  background: rgba(251,248,239,0.94); border: 1px solid var(--glass-border); border-radius: var(--r);
  padding: 16px 18px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}

.connect-card { max-width: 420px; width: 100%; background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--r); padding: 26px; backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 12px; }
.connect-card h2 { font-size: 22px; }
.connect-card input { padding: 12px 14px; border: 1px solid var(--line-2); background: rgba(44,58,48,0.07); color: var(--ink); border-radius: 12px; font-size: 15px; }
.connect-card button { padding: 12px; border-radius: 12px; border: none; background: linear-gradient(135deg, var(--acc), #7BC93A); color: #10160D; font-weight: 800; font-size: 15px; cursor: pointer; }

@media (max-width: 980px) {
  header, nav, main { padding-inline-start: 14px; padding-inline-end: 14px; }
  .map-wrap, .tasks-cols, .three-wrap,
  .map-wrap.no-detail, .three-wrap.no-detail, .ds-wrap.no-detail { grid-template-columns: 1fr; }
  .detail { max-height: none; }
  .col-4, .col-6, .col-8 { grid-column: span 12; }
  .col-3 { grid-column: span 6; }
  .exp-cols, .doc-grid { grid-template-columns: 1fr; }
  .hero h2 { font-size: 24px; }
  #inventory th { top: 0; }
}

/* separate the two status counts when a species carries both */
#inventory .st-attention + .st-unverified::before { content: '·'; margin: 0 5px 0 1px; color: var(--muted); }

/* A five-column table cannot hold a variety list at 375px: it either pushed the page
   sideways - taking the header and tab bar with it - or broke words mid-letter. On a
   phone each species becomes a stacked block instead: name and count on the first line,
   then category, then varieties, then status. */
@media (max-width: 640px) {
  #inventory .inv-card:active { border-color: var(--acc); }
  #inventory .inv-seg button { font-size: 13px; }
  #inventory .cat-cell i { flex: none; }
}

/* phone-native chrome: bottom tab bar + safe areas (applies in the iOS/Android shells too) */
@media (max-width: 640px) {
  /* under 16px iOS zooms the page on focus - a webby jolt the app must never do */
  input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea { font-size: 16px; }
  html, body { height: 100%; overflow: hidden; }
  body { display: flex; flex-direction: column; }
  main { flex: 1 1 0; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
  header { padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: 6px; }
  header h1 { font-size: 21px; letter-spacing: .02em; }
  .brand svg.mark { width: 20px; height: 20px; }
  .wx-rail { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 0 4px; margin: 0 0 14px; }
  .wx-rail::-webkit-scrollbar { display: none; }
  .wx-rail .wx { flex: none; min-width: 64px; }
  /* chrome is furniture: it neither selects nor flashes grey under a finger */
  header, nav, .ms-panel { -webkit-user-select: none; user-select: none; }
  nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: rgba(251,248,239,0.94); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--line); border-bottom: none;
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    display: flex; gap: 0;
  }
  /* ONE row: the four everyday destinations plus More; the rest live in the sheet */
  nav .tab { display: none; }
  nav .tab[data-tab="today"], nav .tab[data-tab="map"], #nav-cam,
  nav .tab[data-tab="journal"], nav .tab[data-tab="kitchen"] { display: flex; flex: 1 1 0; min-width: 0; }
  nav .tab[data-tab="today"] { order: 1; } nav .tab[data-tab="map"] { order: 2; }
  #nav-cam { order: 3; } nav .tab[data-tab="journal"] { order: 4; } nav .tab[data-tab="kitchen"] { order: 5; }
  .tab { flex-direction: column; gap: 3px; padding: 6px 2px 4px; font-size: 11px; font-weight: 600; text-align: center; border-radius: 12px; justify-content: center; }
  .tab svg { width: 22px; height: 22px; }
  /* active = tint, the platform convention - not a lit pill */
  .tab.active { background: none; box-shadow: none; color: var(--acc); font-weight: 700; }
  .tab:hover { background: none; border-color: transparent; }
  .tab:active { opacity: .55; }
  /* --navh is measured from the real tab bar at runtime and already includes the safe-area
     inset, because that inset lives in the bar's own bottom padding. The literals are the
     fallback for the two-row, ten-tab bar before the first measurement lands. */
  main { padding-bottom: calc(var(--navh, 76px) + 14px); }
  .walk-ov { bottom: calc(var(--navh, 76px) + 8px); }
  .kpi .kv { font-size: 28px; }
  .map-toolbar .ghost-btn { padding: 8px 12px; }
  .three-wrap #three-container { height: 64vh; min-height: 380px; }
  /* On a phone the controls cannot float over the scene - at this width they cover the whole
     garden. Pin them across the foot of the viewport as a compact, scrollable strip so the
     top half always shows the 3D. The container keeps its fixed height, so three.js sizing
     is untouched. */
  /* closed: one floating chip in the scene corner. Open: a bottom sheet, capped
     at 55% of the screen and scrollable, exactly like the app's other sheets. */
  .time-panel.collapsed { position: absolute; top: 10px; right: 10px; left: auto; bottom: auto;
    border-radius: 999px; padding: 8px 14px; min-width: 0; }
  .time-panel:not(.collapsed) {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 70;
    border-radius: 22px 22px 0 0; border-bottom: none;
    background: var(--card-solid, #FFFDF6);
    min-width: 0; max-height: 55%; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -18px 48px rgba(58,50,32,0.35);
  }
  .time-panel:not(.collapsed) .tp-fold { position: sticky; top: 0; background: inherit; padding: 4px 0 8px; z-index: 1; }
  .time-panel .tp-modes { display: flex; flex-wrap: wrap; }
  .time-panel .tp-modes .ghost-btn { width: auto; flex: 1 1 30%; }
  .time-panel .tp-info { max-width: none; }
  .three-wrap .three-hint { display: none; }
  /* touch targets: the sliders and buttons breathe a little more in the sheet */
  .time-panel:not(.collapsed) .tp-row { min-height: 38px; }
  .time-panel:not(.collapsed) input[type=range] { flex: 1; }
}

/* urgent engine tasks */
.task.urgent { border-inline-start: 3px solid var(--attn); padding-inline-start: 11px; }
.task.urgent .meta { color: var(--attn); }

/* onboarding wizard */
.wiz-ov { position: fixed; inset: 0; z-index: 90; background: rgba(6,10,8,.72); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.wiz { width: 100%; max-width: 520px; background: var(--card-solid); border: 1px solid var(--glass-border);
  border-radius: var(--r); padding: 20px 22px 22px; box-shadow: var(--shadow); max-height: 88vh; overflow-y: auto; }
.wiz-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--muted); font-size: 12.5px;
  text-transform: uppercase; letter-spacing: 1.2px; }
.wiz-head b { color: var(--ink); }
.wiz h2 { font-size: 20px; margin-bottom: 14px; }
.wiz-list { max-height: 210px; overflow-y: auto; margin-top: 12px; }

/* 3D mode panel: underground / water / 4D / overlays */
.tp-sep { height: 1px; background: rgba(44,58,48,0.07); margin: 9px 0 8px; }
.tp-modes { flex-wrap: wrap; gap: 4px; }
.tp-modes .ghost-btn { margin: 0; padding: 5px 10px; font-size: 11.5px; }
.ov-btn { opacity: .85; }
.tp-info { margin-top: 8px; font-size: 12px; color: var(--muted); max-width: 300px; }
.tp-info .src { margin-top: 6px; line-height: 1.45; }
.tp-legend { display: flex; flex-direction: column; gap: 3px; }
.tp-legend span { display: flex; align-items: center; gap: 7px; font-size: 11.5px; }
.tp-legend i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.tp-legend b { margin-inline-start: auto; color: var(--ink); }
.ov-scale { display: flex; justify-content: space-between; font-size: 11.5px; margin-top: 8px;
  padding: 5px 9px; border-radius: 7px; color: #10160D; font-weight: 700; }
.ov-light   { background: linear-gradient(90deg, #1b2a3a, #2f6f4f 45%, #E8D14A 78%, #FFF3B0); }
.ov-shelter { background: linear-gradient(90deg, #7A3B2E, #C2643C 40%, #8FBF6A 75%, #2E8B57); }
.ov-frost   { background: linear-gradient(90deg, #2F5D3A, #7FB3C8 55%, #9FD8EE 80%, #E6F6FF); }
.ov-heat    { background: linear-gradient(90deg, #2C4A63, #8FA86B 40%, #E8A34A 70%, #D1462F); }
.ov-wetness { background: linear-gradient(90deg, #C9A227, #A8B060 40%, #4C8FBF 75%, #1D4E7A); }
.ov-scale span:first-child { color: rgba(44,58,48,0.8); }

/* plants known but not yet located */
.unplaced-row td { opacity: .82; }
.unplaced-row .badge { background: rgba(229,192,91,.16); color: var(--gold); }

/* ---------- annual programme ---------- */
.prog-head { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.prog-head select { flex: 1; min-width: 160px; }
.prog-act { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; margin-bottom: 8px;
  border-inline-start: 3px solid var(--acc); background: rgba(44,58,48,0.07); border-radius: 0 10px 10px 0; }
.prog-act.kind-protect { border-inline-start-color: #E89A3C; }
.prog-act.kind-prune { border-inline-start-color: #6FA8DC; }
.prog-act.kind-sow { border-inline-start-color: #A3E635; }
.prog-act.kind-feed { border-inline-start-color: #B08968; }
.prog-act.kind-wash { border-inline-start-color: #E8E4D8; }
.prog-act.kind-water { border-inline-start-color: #2DD4BF; }
.prog-act.kind-harvest { border-inline-start-color: #D4A72C; }
.prog-act b { font-size: 14px; font-weight: 650; line-height: 1.35; }
.prog-act > span:not(.src) { font-size: 13.5px; line-height: 1.45; }
.prog-species { display: flex; flex-wrap: wrap; gap: 5px; }
.prog-species i { font-style: normal; font-size: 11.5px; font-weight: 650; padding: 2px 9px; border-radius: 999px;
  background: rgba(95,148,50,.13); color: #2F5220; }
.prog-month h4 { margin: 12px 0 6px; font-size: 13.5px; color: var(--acc); }
.prog-water { margin-bottom: 10px; }

.three-reset { position: absolute; bottom: 14px; right: 14px; z-index: 6;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(251,248,239,0.94); color: var(--ink); font-size: 12px; font-weight: 650;
  backdrop-filter: blur(10px); cursor: pointer; }
.three-reset:hover { border-color: var(--acc); color: var(--acc); }

/* the Designer's irrigation palette */
.irr-pal { display: flex; flex-direction: column; gap: 4px; }
.irr-zone-h { display: flex; align-items: center; gap: 6px; margin: 10px 0 3px; font-size: 11.5px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--mut, #8a8f88); }
.irr-zone-h i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.irr-zone-h .irr-mini { margin-inline-start: auto; padding: 2px 8px; font-size: 11.5px; }
.irr-pal .ds-pal .irr-dot { width: 12px; height: 12px; border-radius: 3px; flex: none; display: inline-block; }
.irr-pal .irr-num { min-width: 20px; height: 20px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; font-style: normal; padding: 0 3px; }

/* the sowing window card */
.sow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.sow-item { background: var(--card2, rgba(44,58,48,0.8)); border-radius: 10px; padding: 9px 11px; }
.sow-item b { display: block; margin-bottom: 4px; }
.sow-item small { color: var(--mut, #8a8f88); display: block; margin-top: 4px; }
.sow-chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* the planting calendar bands */
.pgantt { margin: 12px 0; }
.pgantt .pg-head { display: block; margin-bottom: 6px; }
.pg-row, .pg-months { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 8px; margin: 3px 0; }
.pg-row i { font-style: normal; font-size: 11.5px; color: var(--mut, #8a8f88); }
.pg-track { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; }
.pg-track b { height: 12px; border-radius: 3px; background: rgba(127,127,127,.12); }
.pg-track b.pg-in { background: #7FB77E; }
.pg-track b.pg-out { background: #3F7D49; }
.pg-track b.pg-harv { background: #D98E32; }
.pg-lab span { font-size: 11px; text-align: center; color: var(--mut, #8a8f88); }
.pg-lab span.now { color: var(--acc, #7FCF6C); font-weight: 700; text-decoration: underline; }
.pgantt .src { display: block; margin-top: 5px; }

/* the verification walk bar */
#vw-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--card2, rgba(44,58,48,0.8)); border: 1px solid rgba(232,161,60,.45);
  border-radius: 12px; padding: 8px 12px; margin: 0 0 8px; }
#vw-bar img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
#vw-bar .vw-count { font-size: 11.5px; letter-spacing: .05em; color: var(--mut, #8a8f88); }
#vw-bar b { font-size: 15px; }
#vw-bar small { color: var(--mut, #8a8f88); }
#vw-bar em { font-style: normal; color: #E8A13C; font-size: 13.5px; }
#vw-bar .ghost-btn { margin: 0; padding: 5px 12px; }
.vw-pulse { animation: vwpulse 1.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes vwpulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
/* during the verification walk the map wants room: the side panel holds the plant's
   own card, so the map takes the rest and stands tall enough to aim at a row */
.vw-live #map-container { min-height: 62vh; }
.vw-live #map-container svg { height: 62vh; }

/* ---- plant library ---- */
#library { max-width: 1000px; }
.lib-toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.lib-toolbar .chips { display: flex; flex-wrap: wrap; gap: 7px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 9px; }
.lib-card { color: var(--ink); position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 8px 12px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; cursor: pointer; text-align: center; transition: var(--tr); }
.lib-card:hover { border-color: var(--ink); transform: translateY(-1px); }
.lib-card svg { width: 46px; height: 46px; }
.lib-card b { font-size: 14px; line-height: 1.25; }
.lib-card small { color: var(--muted); font-size: 11.5px; }
.lib-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--fruit, #4A9152); }
.lib-hero { display: flex; align-items: center; gap: 16px; margin: 14px 0 6px; flex-wrap: wrap; }
.lib-hero-icon { background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; padding: 10px; line-height: 0; }
.lib-hero-icon svg { width: 76px; height: 76px; }
.lib-hero h2 { margin: 0; }
.lib-hero-btns { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.lib-desc { max-width: 72ch; font-size: 14.5px; line-height: 1.55; margin: 10px 0 4px; }
.lib-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 4px; }
.lib-fact { background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 9px 12px; }
.lib-fact small { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; margin-bottom: 2px; }
.lib-fact b { font-size: 14px; }
.lib-fine { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 3px; }
.lib-tl { margin: 12px 0 4px; }
.lib-tl-row { display: grid; grid-template-columns: 120px repeat(12, 1fr); gap: 3px; align-items: center; margin-top: 3px; }
.lib-tl-row span { font-size: 12px; font-weight: 600; color: var(--muted); padding-inline-end: 6px; }
.lib-tl-row i { height: 16px; border-radius: 4px; background: var(--line-2); opacity: .45; font-style: normal; }
.lib-tl-row.head i { background: none; opacity: 1; height: auto; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.lib-tl-row.head i.now { color: var(--attn); }
.lib-tl-row i.on { opacity: 1; }
.lib-tl-row i.ind { background: #D9A441; }
.lib-tl-row i.dir { background: #4A9152; }
.lib-tl-row i.tra { background: #22808A; }
.lib-tl-row i.har { background: #C05F38; }
.lib-note { background: var(--card); border-inline-start: 3px solid var(--fruit, #4A9152); border-radius: 8px; padding: 10px 13px; font-size: 13.5px; margin: 10px 0; max-width: 72ch; }
.lib-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.lib-var { background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 9px 12px; font-size: 13.5px; }
.lib-var b { display: block; margin-bottom: 2px; }
.lib-var span { color: var(--muted); font-size: 13px; }
.lib-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
@media (max-width: 700px) { .lib-two { grid-template-columns: 1fr; } .lib-tl-row { grid-template-columns: 86px repeat(12, 1fr); } }
.chip.warn { border-color: rgba(214,69,69,.5); color: var(--ink); background: rgba(214,69,69,.08); }
.lib-link { padding: 3px 10px; font-size: 12px; margin-inline-start: 4px; }
.ds-pal { grid-template-columns: 36px 1fr auto auto; }
.ds-info { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-style: italic; font-weight: 700; font-family: Georgia, serif; cursor: pointer; transition: var(--tr); }
.ds-info:hover { color: var(--ink); border-color: var(--ink); }
.sow-item[data-libopen] { cursor: pointer; }
.sow-item[data-libopen]:hover b { text-decoration: underline; }

/* ---- right-to-left (Arabic) ----
   The box model is already written in logical properties, so only the handful of
   physically-anchored pieces need mirroring: absolute offsets, one-sided radii and
   the icon glyphs that point somewhere. */
html.rtl .exp-close { right: auto; left: 16px; }
html.rtl .prog-act { border-radius: 10px 0 0 10px; }
html.rtl .lib-dot { right: auto; left: 10px; }
html.rtl .ar-label { border-inline-start-width: 3px; }
html.rtl .back-arrow, html.rtl .dir-glyph { transform: scaleX(-1); }
html.rtl #ds-trash { right: auto; left: 12px; }
html.rtl .vw-bar .ghost-btn { margin-inline-start: 0; }
/* numbers, coordinates, dates and units stay left-to-right inside Arabic text */
html.rtl .src, html.rtl .kv, html.rtl .v, html.rtl code, html.rtl .latin { unicode-bidi: plaintext; }
html.rtl table.mini td, html.rtl #inventory td { unicode-bidi: plaintext; }
/* a value like "40 cm" or "16-30 °C" is a left-to-right run inside Arabic text;
   plaintext lets each element take its direction from its own first strong
   character, so numbers keep their units on the correct side */
html.rtl .lib-fact b, html.rtl .lib-fact small, html.rtl .badge, html.rtl .hkg,
html.rtl .care-month, html.rtl .lib-var b, html.rtl .stat .v, html.rtl .kpi .kv,
html.rtl .chip, html.rtl .sow-item small, html.rtl .tp-row b { unicode-bidi: plaintext; }

/* ---- language menu ---- */
/* a floating menu needs a SOLID surface: --card is a translucent overlay that only
   reads correctly when it sits directly on the page background */
.lang-menu { position: fixed; z-index: 60; min-width: 190px; padding: 6px; border-radius: 14px;
  background: var(--card-solid, #FFFDF6); border: 1px solid var(--line-2);
  box-shadow: 0 18px 48px rgba(58,50,32,0.35), 0 2px 8px rgba(58,50,32,0.35); }
.lang-menu-h { font-size: 11px; text-transform: uppercase; letter-spacing: 1.1px; font-weight: 800;
  color: var(--muted); padding: 6px 10px 7px; }
.lang-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 9px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--ink);
  font-size: 14px; font-weight: 600; cursor: pointer; text-align: start; transition: var(--tr); }
.lang-opt i { font-style: normal; font-size: 11.5px; font-weight: 800; letter-spacing: .6px; color: var(--muted); }
.lang-opt:hover { background: rgba(95,148,50,0.9); color: var(--ink); }
.lang-opt:hover i { color: var(--ink); }
.lang-opt.on { background: rgba(95,148,50,.16); }
.lang-opt.on i { color: var(--acc, #A3E635); }

/* ---- More sheet: the tab bar overflow, raised as a bottom sheet ---- */
/* desktop keeps the full sidebar - More only exists on the phone bar */
@media (min-width: 641px) { #nav-more { display: none; } }
#nav-more.active { color: var(--acc); border-color: rgba(95,148,50,0.9); }
#more-sheet { position: fixed; inset: 0; z-index: 80; }
.ms-scrim { position: absolute; inset: 0; background: rgba(58,50,32,0.35); opacity: 0; transition: opacity .32s ease; }
.ms-panel { position: absolute; left: 0; right: 0; bottom: 0; background: var(--card-solid, #FFFDF6);
  border: 1px solid var(--line-2); border-bottom: none; border-radius: 22px 22px 0 0;
  padding: 8px 12px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(103%); transition: transform .42s cubic-bezier(.2,.9,.25,1.02);
  box-shadow: 0 -18px 48px rgba(58,50,32,0.35); }
#more-sheet.open .ms-scrim, #va-ov.open .ms-scrim { opacity: 1; }
#more-sheet.open .ms-panel, #va-ov.open .ms-panel { transform: none; }
#va-ov { position: fixed; inset: 0; z-index: 82; }
.ms-grab { display: block; width: 40px; height: 4.5px; border-radius: 3px; background: var(--line-2); margin: 4px auto 14px; cursor: pointer; }
.ms-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 2px; }
.ms-item { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 13px 2px 11px;
  background: none; border: 0; border-radius: 14px; color: var(--ink); font-size: 11.5px; font-weight: 600; cursor: pointer; }
.ms-item svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ms-item:active { background: rgba(44,58,48,0.07); }
.ms-item.on { color: var(--acc); }
html.rtl .ms-panel { direction: rtl; }

/* ---- app feel: no grey tap flashes, gentle press states ---- */
* { -webkit-tap-highlight-color: transparent; }
@media (max-width: 640px) {
  body { touch-action: manipulation; }
  .kpi:active, .lib-card:active, .chip:active, .ghost-btn:active, .sow-item:active { transform: scale(.97); opacity: .85; }
  .kpi, .lib-card, .chip, .ghost-btn, .sow-item { transition: transform .12s ease, opacity .12s ease; }
}

/* ---- centre camera button: the raised action in the middle of the bar ---- */
@media (min-width: 641px) { #nav-cam { display: none; } }
#nav-cam { padding-top: 0; padding-bottom: 0; }
.cam-fab { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  margin-top: -18px; border-radius: 50%; background: linear-gradient(135deg, var(--acc), #7BC93A);
  box-shadow: 0 6px 18px rgba(95,148,50,0.9), 0 2px 6px rgba(58,50,32,0.35); border: 3px solid var(--bg, #F1EBDD); }
.cam-fab svg { width: 24px; height: 24px; fill: none; stroke: #10160D; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#nav-cam:active .cam-fab { transform: scale(.93); }
#nav-cam.active .cam-fab { box-shadow: 0 6px 22px rgba(95,148,50,0.9), 0 2px 6px rgba(58,50,32,0.35); }

/* camera sheet options: full-width rows, icon + label */
.cam-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 12px;
  background: none; border: 0; border-radius: 14px; color: var(--ink); font-size: 15px; font-weight: 650;
  cursor: pointer; text-align: start; }
.cam-opt svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--acc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cam-opt:active { background: rgba(44,58,48,0.07); }
.cam-opt + .cam-opt { border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }

/* the doctor card pulses when the camera flow lands on it */
@keyframes cam-pulse { 0%, 100% { outline-color: transparent; } 40% { outline-color: rgba(95,148,50,0.9); } }
.cam-pulse { outline: 2px solid transparent; outline-offset: 3px; border-radius: 14px; animation: cam-pulse 1.2s ease 2; }

/* ---- plant-card actions: one row of actions, composers on demand ---- */
.act-bar { display: flex; gap: 7px; margin-top: 16px; }
.act-tab { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 6px 9px; border: 1px solid var(--line-2); background: rgba(44,58,48,0.07);
  color: var(--muted); border-radius: 12px; font-size: 11.5px; font-weight: 650; line-height: 1.15;
  text-align: center; cursor: pointer; transition: var(--tr); }
.act-tab svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.act-tab:hover { color: var(--ink); border-color: var(--ink); }
.act-tab.on { color: var(--acc); border-color: rgba(95,148,50,0.9); background: rgba(95,148,50,.16); }
.act-pane { display: flex; gap: 7px; margin-top: 8px; align-items: center; }
/* display:flex on the class would otherwise defeat the hidden attribute */
.act-pane[hidden] { display: none; }
.act-pane input { flex: 1; min-width: 0; }
button.btn-acc { border: 0; background: linear-gradient(135deg, #67A238, #4E8A2A); color: #FFFFFF;
  font-weight: 750; font-size: 13.5px; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  transition: transform .12s ease, opacity .12s ease; }
button.btn-acc:hover { opacity: .9; }
button.btn-acc:active { transform: scale(.95); }
.file-btn.icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  padding: 0; border-radius: 999px; flex: none; }
.file-btn.icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.file-btn.icon.has-file { border-color: var(--acc); color: var(--acc); background: rgba(95,148,50,.16); }

/* ---- task sections ---- */
.tk-chips { margin-bottom: 8px; }
.tk-section { margin-bottom: 14px; }
.tk-section .ac-label { display: flex; align-items: baseline; gap: 8px; }

/* ---- task list: segmented scope, one filter, priority sections ---- */
.tk-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.tk-head select { max-width: 210px; }
.seg { display: inline-flex; background: rgba(44,58,48,0.07); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; color: var(--muted); padding: 7px 16px; border-radius: 9px;
  font-weight: 650; font-size: 13.5px; cursor: pointer; transition: var(--tr); }
.seg button b { font-weight: 750; color: var(--acc); }
.seg button.on { background: var(--card-solid); color: var(--ink); box-shadow: 0 1px 5px rgba(58,50,32,0.35); }
.tk-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tk-tag { display: inline-flex; align-items: center; gap: 5px; }
.tk-tag i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tk-plant { border: 1px solid var(--line-2); background: rgba(44,58,48,0.07); color: var(--muted);
  padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; cursor: pointer; transition: var(--tr); }
.tk-plant:hover { color: var(--ink); border-color: var(--ink); }

/* ---- the app's one dropdown menu: every select opens this, never the OS popup ---- */
.dd-menu { position: fixed; z-index: 90; min-width: 180px; max-width: min(340px, calc(100vw - 12px));
  max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 6px; border-radius: 14px; background: var(--card-solid, #FFFDF6);
  border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(58,50,32,0.35), 0 2px 8px rgba(58,50,32,0.35); }
.dd-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink);
  font-size: 14px; font-weight: 600; cursor: pointer; text-align: start; transition: var(--tr); }
.dd-opt svg { flex: none; color: var(--acc); }
.dd-opt:hover { background: rgba(95,148,50,.16); }
.dd-opt.on { background: rgba(95,148,50,.16); }
.dd-opt:active { background: rgba(95,148,50,.16); }

/* ---- library detail: structure, season, care-now, interactive watch-for ---- */
.lib-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.lib-season { border-color: transparent; color: #10160D; font-weight: 750; }
.lib-season.sow { background: var(--acc); }
.lib-season.har { background: #E8935C; }
.lib-season.off { background: rgba(44,58,48,0.07); color: var(--muted); }
.lib-intro { max-width: 68ch; margin: 2px 0 8px; }
.lib-care { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.lib-care-row { display: flex; gap: 12px; align-items: baseline; padding: 8px 12px;
  background: rgba(44,58,48,0.07); border-inline-start: 3px solid var(--line-2); border-radius: 0 10px 10px 0; font-size: 13.5px; }
.lib-care-row .care-month { flex: none; min-width: 84px; }
.lib-care-row.now { border-inline-start-color: var(--acc); background: rgba(95,148,50,.16); }
.lib-nowchip { color: var(--acc); margin-inline-end: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }
.lib-dis { cursor: pointer; }
.dis-title { margin: 2px 4px 8px; }
.dis-text { font-size: 14px; line-height: 1.5; margin: 2px 4px 10px; color: var(--ink); }
.lib-rail { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 10px; margin-bottom: 8px; scrollbar-width: none; }
.lib-rail::-webkit-scrollbar { display: none; }
.lib-rail-card { flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 6px; background: var(--card); border: 1px solid var(--line-2); border-radius: 14px;
  cursor: pointer; transition: var(--tr); }
.lib-rail-card svg { width: 36px; height: 36px; }
.lib-rail-card b { font-size: 11.5px; line-height: 1.2; text-align: center; color: var(--ink); }
.lib-rail-card:hover { border-color: var(--ink); }

/* ---- library hero: identity as text, status as one line ---- */
.lib-sub { display: flex; align-items: center; gap: 7px; margin-top: 5px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lib-sub i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.lib-status { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.lib-ing { border-color: rgba(95,148,50,0.9); color: var(--acc); background: rgba(95,148,50,0.9);
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.lib-ing i { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); flex: none; }
.lib-status .badge { display: inline-flex; align-items: center; }
.lib-toolbar .seg { align-self: flex-start; }
@media (max-width: 640px) { .lib-toolbar .seg { width: 100%; } .lib-toolbar .seg button { flex: 1; } }

/* ---- the Season Wheel ---- */
.wheel-wrap { max-width: 340px; margin: 4px auto 0; }
.wheel-wrap svg { width: 100%; height: auto; display: block; }
.wheel-wrap text { font-family: inherit; user-select: none; -webkit-user-select: none; }
.wheel-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center;
  margin: 6px 0 12px; font-size: 11.5px; font-weight: 650; color: var(--muted); }
.wheel-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wheel-legend i { width: 9px; height: 9px; border-radius: 50%; }
.wheel-month { margin-bottom: 10px; }
.wl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; }
.lib-hero-icon { box-shadow: 0 0 48px -6px var(--cat, transparent); }

/* ---- inventory: every species leads with its drawing ---- */
#inventory td { padding-top: 8px; padding-bottom: 8px; }

/* ---- inline species icons: one drawing language across every list ---- */
.sp-ico { display: inline-flex; flex: none; vertical-align: middle; }
.sp-ico svg { width: 20px; height: 20px; display: block; }
.tl-name { display: flex; align-items: center; gap: 8px; }
.sow-head { display: inline-flex; align-items: center; gap: 7px; }
.hrow .sp-ico { margin-inline-end: 2px; }
.prog-species i { display: inline-flex; align-items: center; gap: 5px; }
.prog-species .sp-ico svg { width: 14px; height: 14px; }
.yrow .sow-head .sp-ico svg { width: 18px; height: 18px; }

/* ---- map species tokens: identity appears as the plan is zoomed, like any good map ---- */
#map-svg { touch-action: none; }
#map-svg .sp-token { opacity: 1; pointer-events: none; }

/* ---- inventory: the living collection ---- */
#inventory .inv-seg { margin-bottom: 18px; }
.inv-shelf { margin-bottom: 26px; }
.inv-shelf-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.inv-shelf-h i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.inv-shelf-h .n { font-weight: 600; opacity: .75; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.inv-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 14px 12px; cursor: pointer; transition: border-color .15s ease; }
@media (hover: hover) { .inv-card:hover { border-color: var(--acc); } }
.inv-ch { display: flex; align-items: flex-start; gap: 11px; }
.inv-ch > svg { width: 38px; height: 38px; flex: none; }
.inv-cn { min-width: 0; }
.inv-cn b { font-size: 15px; }
.inv-x { color: var(--muted); margin-inline-start: 7px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.inv-var { color: var(--muted); font-size: 12.5px; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-tl { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin: 13px 0 11px; }
.inv-tl i { height: 6px; border-radius: 2px; background: rgba(44,58,48,0.07); position: relative; }
.inv-tl i.on { background: var(--cc); }
.inv-tl i.now::after { content: ''; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px;
  transform: translateX(-50%); background: var(--acc); border-radius: 1px; }
.inv-cb { display: flex; flex-wrap: wrap; gap: 6px; min-height: 20px; }
.ib { font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; }
.ib-now { color: var(--acc); background: rgba(95,148,50,.16); }
.ib-next { color: var(--muted); background: rgba(44,58,48,0.07); }
.ib-attn { color: var(--attn); background: rgba(255,107,94,.13); }
.ib-unv { color: var(--gold); background: rgba(229,192,91,.12); }
.inv-card.unplaced { border-style: dashed; opacity: .85; }

/* ---- care hub: triage strip, coverage meters, the garden wheel ---- */
.ct-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ct-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px;
  background: rgba(44,58,48,0.07); border: 1px solid var(--line); color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; transition: border-color .15s ease; }
.ct-chip b { color: var(--ctc, var(--acc)); font-size: 15px; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .ct-chip:hover { border-color: var(--ctc, var(--acc)); } }
.ct-chip:active { border-color: var(--ctc, var(--acc)); }
.ct-meter { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.ct-meter > span:first-child { min-width: 110px; font-size: 13px; color: var(--ink); }
.ct-bar { flex: 1; height: 7px; border-radius: 4px; background: rgba(44,58,48,0.07); overflow: hidden; }
.ct-bar i { display: block; height: 100%; border-radius: 4px; }
.ct-meter .src { min-width: 52px; text-align: end; font-variant-numeric: tabular-nums; }
.prog-wrap { display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: start; }
.prog-wheel .wheel-wrap { margin: 0; }
.prog-act { position: relative; }
.prog-act .prog-add { margin-top: 6px; padding: 3px 10px; font-size: 12px; }
@media (max-width: 640px) {
  .prog-wrap { grid-template-columns: 1fr; }
  .prog-wheel { display: flex; flex-direction: column; align-items: center; }
  .ct-meter > span:first-child { min-width: 88px; }
}

/* ---- the plant care section (shared by the map card and the Care file) ---- */
.pc .care-list { margin: 6px 0 10px; }
.pc .care-month .wl-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; }
.pc-more { margin: 4px 0 10px; }
.pc-more summary { cursor: pointer; }
.pc-hist { border-top: 1px solid var(--line); padding-top: 6px; }

/* ---- intelligence: model answers sit above the offline engines, visibly grounded ---- */
.ask-model { border-inline-start: 3px solid var(--acc); }
.ask-answer { font-size: 15px; line-height: 1.5; margin: 0; }
.diag-model { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.diag-m { margin: 10px 0 4px; }

/* ---- AR: reticle lock and the callout ---- */
.ar-reticle { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border: 1.5px solid var(--line-2); border-radius: 50%; pointer-events: none; z-index: 5; }
.ar-reticle::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px;
  border-radius: 50%; background: var(--acc); }
.ar-label.lock { outline: 2px solid var(--acc); outline-offset: 2px; box-shadow: 0 0 0 6px rgba(95,148,50,0.9); }
.ar-lock { position: absolute; left: 12px; right: 12px; bottom: calc(110px + env(safe-area-inset-bottom)); z-index: 6;
  background: rgba(26,35,29,.92); border: 1px solid var(--line-2); border-radius: 16px; padding: 12px 14px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.arl-h { display: flex; align-items: center; gap: 9px; font-size: 16px; }
.arl-h .sp-ico svg { width: 24px; height: 24px; }
.arl-d { margin-inline-start: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.arl-now { margin: 6px 0 10px; font-size: 13.5px; color: var(--ink); }
.arl-now .wl-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; }
.arl-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.arl-acts button { margin: 0; padding: 7px 12px; font-size: 13.5px; }

/* ---- header: brand, launcher, settings - the weather rail lives on the Dashboard ---- */
.wx-rail { margin-bottom: 16px; }
.head-right { gap: 10px; }

/* ---- kitchen: what to make ---- */
.kit-seg { margin-bottom: 14px; flex-wrap: wrap; }
.rcp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.rcp { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.rcp-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rcp-h b { font-size: 15px; margin-inline-start: 2px; }
.rcp-h .ib { margin-inline-start: auto; }
.rcp-how { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 6px 0 8px; }
.rcp-m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---- doctor: the on-device read ---- */
.doc-net { margin-top: 8px; line-height: 1.9; }
.doc-net .ib { margin-inline-end: 4px; }

/* ---- doctor: symptom picker ---- */
.sym-picker { margin-top: 6px; }
.sym-sel { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.sym-sel .ib { cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 650; border: 0; }
.sym-clear { padding: 3px 9px; font-size: 12.5px; margin: 0; }
.sym-empty { margin: 0 0 8px; }
.sym-q { width: 100%; margin-bottom: 10px; }
.sym-seg { flex-wrap: wrap; }
.sym-seg i { font-style: normal; font-size: 11.5px; color: var(--acc); margin-inline-start: 2px; }

/* ---- harvest timeline: dated weeks and a legend ---- */
.tl-head { align-items: end; }
.tl-head span { display: block; text-align: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.1; padding-bottom: 2px; }
.tl-head span small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.tl-head span.wk0 { color: var(--acc); font-weight: 700; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 10px; font-size: 12px; color: var(--muted); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend .src { flex-basis: 100%; }
.tl-sw { width: 14px; height: 9px; border-radius: 3px; background: rgba(44,58,48,0.07); display: inline-block; }
.tl-sw.c-fruit { background: var(--fruit); } .tl-sw.c-nut { background: var(--nut); } .tl-sw.c-berry { background: var(--berry); }
.tl-sw.c-cucurbit { background: var(--cucurbit); } .tl-sw.c-veg { background: var(--veg); } .tl-sw.c-vine { background: var(--vine); }
.tl-sw.c-herb { background: var(--herb, #7E9B4A); } .tl-sw.c-hedge { background: #2F5D3A; }
.tl-sw.wk0 { outline: 1.5px solid var(--acc); outline-offset: -1.5px; }

/* ---- map: status rings in the legend ---- */
#map-legend .lg-ring { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2.5px solid; background: transparent; }

/* ---- harvest timeline: ribbons ---- */
.tl-rib { position: relative; }
.tl-rib i, .tl-rib b, .tl-rib u { grid-row: 1; }
.tl-rib i { background: rgba(44,58,48,0.07); }
.tl-rib b { display: block; height: 15px; border-radius: 8px; z-index: 1; box-shadow: inset 0 -1px 0 rgba(58,50,32,0.35); }
.tl-rib b.c-fruit { background: var(--fruit); } .tl-rib b.c-nut { background: var(--nut); } .tl-rib b.c-berry { background: var(--berry); }
.tl-rib b.c-cucurbit { background: var(--cucurbit); } .tl-rib b.c-veg { background: var(--veg); } .tl-rib b.c-vine { background: var(--vine); }
.tl-rib b.c-herb { background: var(--herb, #7E9B4A); } .tl-rib b.c-hedge { background: #2F5D3A; }
.tl-rib u { grid-column: 1; display: block; height: 15px; border-radius: 4px; outline: 1.5px solid var(--acc); outline-offset: -1.5px; z-index: 2; pointer-events: none; }

/* ---- plant card: the wheel ---- */
.card-wheel { margin: 10px 0 6px; }
.card-wheel .wheel-wrap svg { max-width: 230px; margin: 0 auto; display: block; }

/* ---- health donut: draws itself in ---- */
@keyframes donut-in { from { stroke-dasharray: 0 1000; } }
.donut circle, .donut-mini circle { animation: donut-in 1.1s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce) { .donut circle, .donut-mini circle { animation: none; } }

/* ---- the plant sheet (phone) ---- */
#plant-sheet { position: fixed; inset: 0; z-index: 70; }
#plant-sheet .ms-panel { max-height: 88vh; display: flex; flex-direction: column; padding-top: 6px; }
#plant-sheet.open .ms-scrim { opacity: 1; }
#plant-sheet.open .ms-panel { transform: none; }
#plant-sheet .ps-x { position: absolute; top: 12px; inset-inline-end: 12px; margin: 0; padding: 5px 11px; font-size: 13px; }
.ps-body { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 4px 8px; }
.ps-body h2 { padding-inline-end: 70px; }
.ps-body .ptl-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; }
.ps-body .ptl-strip img { width: 104px; height: 84px; }

/* ---- harvest timeline: progress ---- */
.tl-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; white-space: normal; }
.tl-nm { font-weight: 700; }
.tl-prog { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 11.5px; font-weight: 500; color: var(--muted); flex-basis: 100%; }
.tl-kg { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.tl-prog .ib { padding: 2px 7px; font-size: 11.5px; }
.tl-rib b.ahead { opacity: .38; }
.tl-rib b.open { position: relative; overflow: hidden; background-color: rgba(44,58,48,0.07) !important; box-shadow: inset 0 0 0 1.5px currentColor; }
.tl-rib b.open.c-fruit { color: var(--fruit); } .tl-rib b.open.c-nut { color: var(--nut); } .tl-rib b.open.c-berry { color: var(--berry); }
.tl-rib b.open.c-cucurbit { color: var(--cucurbit); } .tl-rib b.open.c-veg { color: var(--veg); } .tl-rib b.open.c-vine { color: var(--vine); }
.tl-rib b.open.c-herb { color: var(--herb, #7E9B4A); } .tl-rib b.open.c-hedge { color: #2F5D3A; }
.tl-rib b.open em { position: absolute; inset: 0 auto 0 0; background: currentColor; border-radius: 8px 0 0 8px; transition: width .6s ease; }
.tl-more { margin: 10px 0 0; padding: 5px 12px; font-size: 12.5px; }

/* ---- map: rows and Move mode ---- */
.row-tag text { letter-spacing: .02em; }
#map-container.move-mode .canopy { cursor: pointer; }
.canopy.moving .ring { stroke: var(--acc); stroke-width: 0.3; }
.canopy.moving { filter: drop-shadow(0 0 0.6px rgba(95,148,50,0.9)); }
.map-hint.moving { background: rgba(95,148,50,0.9); border-color: rgba(95,148,50,0.9); color: var(--ink); }
.map-hint-btn { margin: 0 0 0 8px; padding: 2px 9px; font-size: 11.5px; }
.map-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.map-zoom button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card-solid, #FFFDF6); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.wheel-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(251,248,239,0.94); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-size: 13.5px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 6; }
.wheel-hint.show { opacity: 1; }
.canopy .halo { fill: none; stroke-width: 0.22; stroke-dasharray: 0.45 0.28; pointer-events: none; }
.canopy .halo.structure { stroke: #E4574A; }
.canopy .halo.offrow { stroke: #E5C05B; }

/* ---- Move mode: slots and the pending placement ---- */
.slot { cursor: pointer; }
.slot .slot-dot { fill: #FBF8EF; stroke: rgba(251,248,239,0.94); stroke-width: 0.06; }
.slot.free .slot-dot { fill: #A3E635; }
.slot.taken .slot-dot { fill: rgba(251,248,239,.45); stroke: none; }
.slot:hover .slot-dot { r: 0.32; }
.ghost-ring { fill: rgba(95,148,50,0.9); stroke: #A3E635; stroke-width: 0.16; stroke-dasharray: 0.4 0.25; }
.ghost-dot { fill: #A3E635; }
.map-hint.confirm { background: var(--card-solid, #FFFDF6); border-color: rgba(95,148,50,0.9); }
.map-hint .btn-acc.map-hint-btn { padding: 3px 11px; font-size: 12px; margin: 0 0 0 8px; }

/* ---- Move plants: the one call to action on the map ---- */
.move-cta { padding: 8px 16px; font-weight: 750; }
.move-cta.on { background: var(--attn); color: #fff; box-shadow: 0 0 0 3px rgba(255,107,94,.25); }

.sibs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 4px; }
.sibs .src { flex-basis: 100%; }
.sibs .sib { margin: 0; padding: 4px 10px; font-size: 12.5px; }
.sibs .sib i { font-style: normal; color: var(--muted); margin-inline-start: 5px; }

.map-hint .add-row { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: 10px; }
.map-hint .add-row select { min-width: 140px; padding: 3px 28px 3px 8px; font-size: 12.5px; }
.map-hint .add-row input { width: 52px; padding: 3px 6px; font-size: 12.5px; }
.map-hint { flex-wrap: wrap; }

/* ---- the dialog ---- */
.dlg { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; }
.dlg-scrim { position: absolute; inset: 0; background: rgba(58,50,32,0.35); opacity: 0; transition: opacity .18s; }
.dlg-card { position: relative; width: min(440px, 100%); background: var(--card-solid, #FFFDF6); border: 1px solid var(--line-2); border-radius: 18px;
  padding: 18px 18px 16px; box-shadow: 0 24px 60px rgba(58,50,32,0.35); transform: translateY(10px) scale(.98); opacity: 0; transition: transform .2s cubic-bezier(.2,.7,.2,1), opacity .18s; }
.dlg.open .dlg-scrim { opacity: 1; } .dlg.open .dlg-card { transform: none; opacity: 1; }
.dlg-card h3 { margin: 0 0 10px; font-size: 15px; }
.dlg-body { font-size: 15px; line-height: 1.5; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dlg-body .sp-ico svg { width: 26px; height: 26px; }
.dlg-form { display: grid; gap: 10px; margin-bottom: 14px; }
.dlg-form label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.dlg-form select, .dlg-form input { width: 100%; }
.dlg-acts { display: flex; justify-content: flex-end; gap: 8px; }
.dlg-acts button { margin: 0; }
.btn-attn { background: var(--attn); color: #fff; border: 0; border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.ghost-btn.danger { color: var(--attn); border-color: rgba(255,107,94,.45); }
.dlg.danger .dlg-card { border-color: rgba(255,107,94,.5); }

/* ---- map search suggestions ---- */
.sg-menu { padding: 6px; }
.sg-row { display: flex; align-items: center; gap: 8px; width: 100%; text-align: start; }
.sg-row .sp-ico svg { width: 22px; height: 22px; }
.sg-name { font-weight: 650; }
.sg-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.sg-var { margin-inline-start: auto; color: var(--muted); font-size: 11.5px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-foot { padding: 6px 10px 2px; }
.sg-none { padding: 10px 10px 6px; display: grid; gap: 8px; }
.sg-lib { margin: 0; justify-self: start; }

/* ---- species picker ---- */
.add-cta { font-weight: 700; }
.dlg.picker .dlg-card { width: min(480px, 100%); }
.sp-list { max-height: min(52vh, 420px); overflow-y: auto; margin: 10px 0 12px; display: grid; gap: 2px; }
.sp-row { display: flex; align-items: center; gap: 9px; width: 100%; text-align: start; }
.sp-row .sp-ico svg { width: 24px; height: 24px; }
.sg-none .btn-acc { margin: 0; justify-self: start; }

#detail { position: relative; }
.detail-x { position: absolute; top: 10px; inset-inline-end: 10px; margin: 0; padding: 4px 10px; font-size: 12.5px; z-index: 2; }
#detail h2 { padding-inline-end: 70px; }

/* ---- map toolbar: Find on one line, Act on the next ---- */
.map-toolbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; }
.map-find, .map-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.map-find .search { flex: 0 1 240px; min-width: 160px; }
.map-filter { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.map-filter-lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); flex: none; }
.map-act .map-reset { margin-inline-start: auto; }
.map-group { display: flex; align-items: center; gap: 6px; position: relative; }
.map-group + .map-group { padding-inline-start: 10px; border-inline-start: 1px solid var(--line-2); }
.map-act .ghost-btn, .map-act .btn-acc { margin: 0; }
.map-seg { gap: 0; }
.map-seg .ghost-btn { border-radius: 0; }
.map-seg .ghost-btn:first-child { border-start-start-radius: 8px; border-end-start-radius: 8px; }
.map-seg .ghost-btn:last-child { border-start-end-radius: 8px; border-end-end-radius: 8px; margin-inline-start: -1px; }
.tools-cta { display: inline-flex; align-items: center; gap: 6px; }
.tools-cta svg { transition: transform .18s ease; }
.tools-cta[aria-expanded="true"] svg { transform: rotate(180deg); }
.map-toolbar, .map-act, .map-group { position: relative; z-index: 20; }
.map-tools { position: absolute; top: calc(100% + 6px); inset-inline-start: 10px; z-index: 260; min-width: 210px; max-width: calc(100vw - 28px);
  background: var(--card-solid, #FFFDF6); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px;
  box-shadow: 0 14px 40px rgba(58,50,32,0.35), 0 2px 8px rgba(58,50,32,0.35); }
.map-tools[hidden] { display: none; }
.map-tools .dd-opt { border-radius: 7px; }
@media (max-width: 700px) {
  .map-find .search { flex: 1 1 100%; }
  .map-filter { flex: 1 1 100%; overflow-x: auto; }
  .map-filter .chips { flex-wrap: nowrap; }
  .map-filter .chip { white-space: nowrap; flex: none; }
  .map-act { row-gap: 8px; }
  .map-act .map-reset { margin-inline-start: 0; }
  .map-group + .map-group { padding-inline-start: 0; border-inline-start: 0; }
  .map-filter { scrollbar-width: none; }
  .map-filter::-webkit-scrollbar { display: none; }
  .map-tools { inset-inline-start: auto; inset-inline-end: 0; }
}

/* ---- sign-in / setup ---- */
.au-ov { backdrop-filter: blur(14px); }
.au-card { max-width: 380px; }
.au-brand { display: flex; align-items: center; gap: 10px; color: var(--acc); font-weight: 800; letter-spacing: .28em; font-size: 15px; margin-bottom: 14px; }
.au-brand span { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 21px; letter-spacing: .02em; }
.au-card form { display: flex; flex-direction: column; gap: 10px; }
.au-card input { width: 100%; }
.au-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.au-providers { display: flex; flex-direction: column; gap: 8px; }
.connect-card .au-prov { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; transition: var(--tr); }
.connect-card .au-prov:hover { border-color: var(--ink); background: rgba(44,58,48,0.07); }
.connect-card .au-prov:disabled { opacity: .55; cursor: default; }
.au-fine { margin-top: 12px; font-size: 11.5px; }
.sec-links .hrow { gap: 10px; }
.ghost-btn.slim, select.slim { padding: 4px 10px; font-size: 12.5px; margin: 0; }

/* ---- approvals queue ---- */
.ap-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.ap-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ap-main b { font-size: 14px; }
.ap-acts { display: flex; gap: 6px; flex: none; }
.btn-acc.slim { padding: 5px 12px; font-size: 12.5px; margin: 0; }
.chk.slim { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }

.dlg-form label[hidden], .dlg-form [hidden] { display: none !important; }
.chk { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13.5px; color: var(--muted); }

.inv-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.inv-top .search { flex: 1 1 320px; max-width: 460px; }
.inv-aka { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.lib-season.blm, .lib-tl .blm { background: rgba(216,87,123,.18); color: #F2A0BC; border-color: rgba(216,87,123,.4); }
.lib-tl-row i.blm { background: #D8577B; }
.lib-season.blm { background: #D8577B; color: #fff; }

body.clean-shot .three-hint, body.clean-shot .wx-badge, body.clean-shot .time-panel, body.clean-shot .three-reset, body.clean-shot .map-hint, body.clean-shot .map-zoom, body.clean-shot #map-legend, body.clean-shot .map-toolbar, body.clean-shot .detail, body.clean-shot nav, body.clean-shot header, body.clean-shot .tab-bar { display: none !important; }
body.clean-shot main { padding: 0 !important; } body.clean-shot .three-wrap, body.clean-shot .map-wrap { display: block !important; }
body.clean-shot .three-wrap, body.clean-shot #three-container, body.clean-shot .map-wrap, body.clean-shot #map-container { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100vh !important; max-width: none !important; border-radius: 0 !important; margin: 0 !important; }
body.clean-shot #three-container canvas { width: 100vw !important; height: 100vh !important; }

/* ---- In the garden (centre button) ---- */
.ms-panel.fld { max-height: 86vh; overflow-y: auto; }
.fld-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.fld-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; }
.fld-chip .sp-ico { width: 22px; height: 22px; } .fld-chip small { color: var(--muted); font-weight: 500; }
.fld-chip:hover { border-color: var(--ink); }
.fld-row { display: flex; gap: 8px; margin: 6px 0; }
.fld-head { display: flex; align-items: center; gap: 10px; } .fld-head span { display: inline-flex; align-items: center; gap: 6px; } .fld-head .sp-ico { width: 22px; height: 22px; }
.fld-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.fld-act { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); text-align: left; cursor: pointer; min-height: 64px; }
.fld-act b { font-size: 14px; } .fld-act small { color: var(--muted); font-size: 11.5px; line-height: 1.25; }
.fld-act:hover { border-color: var(--acc); } .fld-act:active { background: rgba(95,148,50,.16); }
.fld-act.danger { color: var(--attn); }
.fld-form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.fld-form input, .fld-form textarea { width: 100%; }
@media (max-width: 400px) { .fld-grid { grid-template-columns: repeat(2, 1fr); } }

.au-rule { margin: -4px 0 2px; font-size: 12px; }
.person .pers { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.person .pers .badge { align-self: flex-start; font-size: 11.5px; }

/* ---- boot screen: nothing of the app shows until the server has said who is here ----
   The mark draws itself (stem, then each leaf), the wordmark rises, and the screen
   dissolves into the sign-in card or the garden. Reduced motion: a plain fade. */
body.booting > :not(#boot) { visibility: hidden; }
.boot { position: fixed; inset: 0; z-index: 400; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--acc);
  transition: opacity .45s ease, visibility .45s; }
.boot.out { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-mark .bm-canopy { stroke-dasharray: 130; stroke-dashoffset: 130; animation: bm-draw .8s ease-out forwards; }
.boot-mark .bm-trunk { stroke-dasharray: 12; stroke-dashoffset: 12; animation: bm-draw .35s ease-out .55s forwards; }
.boot-mark .bm-ground { stroke-dasharray: 26; stroke-dashoffset: 26; animation: bm-draw .4s ease-out .78s forwards; }
.boot-mark .bm-fruit circle { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.3); animation: bm-pop .28s ease-out forwards; }
.boot-mark .bm-fruit circle:nth-child(1) { animation-delay: .95s; } .boot-mark .bm-fruit circle:nth-child(2) { animation-delay: 1.05s; }
.boot-mark .bm-fruit circle:nth-child(3) { animation-delay: 1.15s; } .boot-mark .bm-fruit circle:nth-child(4) { animation-delay: 1.25s; }
.boot-mark { filter: drop-shadow(0 0 14px rgba(95,148,50,.3)); animation: bm-breathe 2.4s ease-in-out 1.5s infinite; }
.boot-word { font-family: var(--display); font-weight: 700; letter-spacing: .04em; font-size: 27px; color: var(--ink); opacity: 0; transform: translateY(6px); animation: bm-word .5s ease-out 1s forwards; }
@keyframes bm-draw { to { stroke-dashoffset: 0; } }
@keyframes bm-pop { to { opacity: 1; transform: scale(1); } }
@keyframes bm-word { to { opacity: 1; transform: none; } }
@keyframes bm-breathe { 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .boot-mark path, .boot-mark .bm-fruit circle { animation: none; stroke-dashoffset: 0; opacity: 1; transform: none; } .boot-word { animation: none; opacity: 1; transform: none; } .boot-mark { animation: none; } }

.fld-entry { justify-content: space-between; } .fld-entry .xdel { margin: 0; }

/* ---- tutorial ---- */
.tour { position: fixed; inset: 0; z-index: 300; }
.tour-scrim { position: absolute; inset: 0; background: rgba(8,12,10,.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tour-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100vw - 28px)); max-height: calc(100vh - 40px); overflow: auto; background: var(--card-solid, #FFFDF6); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 30px 80px rgba(58,50,32,0.35); display: flex; flex-direction: column; }
.tour-skip { position: absolute; top: 10px; right: 12px; z-index: 2; background: rgba(58,50,32,0.35); color: #fff; border: 0; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.tour-media { aspect-ratio: 16 / 11; background: #F1EBDD; overflow: hidden; border-radius: 22px 22px 0 0; }
.tour-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tour-people { height: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; }
.tour-people span { padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(95,148,50,0.9); color: var(--acc); font-weight: 700; }
.tour-body { padding: 18px 22px 6px; } .tour-body h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.01em; } .tour-body p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.tour-dots { display: flex; gap: 6px; justify-content: center; padding: 12px 0 4px; } .tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(44,58,48,0.07); cursor: pointer; } .tour-dots i.on { background: var(--acc); width: 18px; border-radius: 4px; }
.tour-acts { display: flex; align-items: center; gap: 8px; padding: 10px 16px 16px; } .tour-acts .grow { flex: 1; } .tour-card .tour-acts { justify-content: space-between; } .tour-acts .ghost-btn, .tour-acts .btn-acc { margin: 0; }
.tour-hole { position: absolute; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(8,12,10,.74), 0 0 0 3px var(--acc), 0 0 30px rgba(95,148,50,0.9); transition: all .28s ease; cursor: pointer; }
.tour-target { position: relative; z-index: 301 !important; }
.tour-tip { position: absolute; width: 320px; max-width: calc(100vw - 24px); background: var(--card-solid, #FFFDF6); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 20px 60px rgba(58,50,32,0.35); padding: 14px 16px 10px; transition: top .28s ease, left .28s ease; }
.tour-tip-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; } .tour-tip-h b { font-size: 16px; } .tour-tip-h span { color: var(--muted); font-size: 12.5px; }
.tour-tip p { margin: 6px 0 8px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.tour-tip .tour-acts { padding: 0; }
@media (max-width: 640px) { .tour-card { top: auto; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: calc(100vw - 20px); } }

/* ---- the card: facts (read) above, actions (do) below - one pattern for every card ---- */
.card-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card-head .latin { margin: 0; }
.card-head .badge { align-self: flex-start; margin-top: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 12px; }
.fact { display: inline-flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: 10px; background: rgba(44,58,48,0.07); border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.fact small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 14px; }
.ca { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px 8px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; transition: var(--tr); }
.ca svg { width: 20px; height: 20px; fill: none; stroke: var(--acc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ca:first-child { background: #4E7A2B; border-color: #4E7A2B; color: #FFFDF6; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 1px 0 rgba(44,58,48,.3); }
.ca:first-child svg { stroke: #FFFDF6; }
.ca:first-child:hover { background: #446C24; border-color: #446C24; }
.ca:hover { border-color: var(--ink); } .ca:active { background: rgba(95,148,50,.16); }
.ca.danger { color: var(--attn); } .ca.danger svg { stroke: var(--attn); }
/* sheet: skeleton while the card loads, then the content fades in */
.ps-body.loading > :not(.ps-skel) { display: none; }
.ps-skel { display: flex; flex-direction: column; gap: 10px; padding: 14px 8px; }
.ps-skel i { display: block; height: 14px; border-radius: 7px; background: rgba(44,58,48,0.07); animation: skel 1.1s ease-in-out infinite; }
.ps-skel i:first-child { width: 48%; height: 22px; } .ps-skel i:nth-child(2) { width: 70%; } .ps-skel i:nth-child(3) { width: 90%; height: 120px; border-radius: 12px; }
@keyframes skel { 50% { opacity: .5; } }
.ps-body:not(.loading) > * { animation: fadein .28s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ps-body:not(.loading) > * { animation: none; } .ms-panel { transition: none; } }

.card-actions.lib-actions { grid-template-columns: repeat(3, 1fr); max-width: 420px; }
@media (max-width: 640px) { .card-actions.lib-actions { max-width: none; } }

/* ---- card sections: one type scale, clear separation ----
   14px/1.5 body in the ink colour, 11px uppercase section titles, hairline between
   sections. Nothing in a card is set below 12.5px or in the muted colour unless it is
   genuinely secondary (a hint, a timestamp). */
.card-sec { padding: 14px 0 12px; border-top: 1px solid var(--line-2); }
.card-sec:first-of-type { border-top: 0; }
.card-sec h4 { margin: 0 0 10px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--acc); font-weight: 800; }
.kvl { display: grid; grid-template-columns: 1fr; gap: 8px; }
.kv-row { display: grid; grid-template-columns: minmax(96px, 120px) 1fr; gap: 12px; align-items: baseline; font-size: 14px; line-height: 1.45; }
.kv-row span { color: var(--muted); font-size: 13px; font-weight: 600; }
.kv-row b { font-weight: 600; color: var(--ink); }
.kv-row b .ghost-btn.slim { margin-inline-start: 6px; vertical-align: middle; }
.kv-note { margin: -6px 0 8px; font-size: 12.5px; }
.prose { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--ink); }
.prose.quote { padding: 10px 12px; border-radius: 10px; background: rgba(44,58,48,0.07); border: 1px solid var(--line-2); }
.card-sec .obs { font-size: 14px; color: var(--ink); margin-top: 8px; }
.card-sec .obs span { line-height: 1.45; }
.ps-body .card-sec { padding-inline: 4px; }

/* ---- type rhythm: one line-height for running text, ink for primary text ---- */
p, li, dd, .prose, .obs span, .wmsg { line-height: 1.5; }
.src { color: var(--muted); }

/* ================= the almanac pass =================
   The chrome learns the garden's language: warm serif display for titles, tiles that lead
   with a picture and speak in sentences, coverage that reads "8 of 12 done", soft paper-
   like cards. Numbers stay sans; the serif carries the headings only. */
:root { --display: "Iowan Old Style", "Palatino Nova", Palatino, "Book Antiqua", Georgia, serif; }
h1, h2, h3, .tour-body h3, .lang-menu-h, .connect-card h2 { font-family: var(--display); letter-spacing: 0; font-weight: 700; }
.kpi .kl { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 700; color: var(--ink); font-family: var(--display); }
.kpi { position: relative; overflow: hidden; border-radius: 18px; }
.kpi-ico { position: absolute; top: 14px; inset-inline-end: 14px; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.kpi::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 100% 0%, var(--tint, transparent), transparent 55%); pointer-events: none; }
.kpi-action { --tint: rgba(95,148,50,0.9); color: #A3E635; }
.kpi-harvest { --tint: rgba(232,147,60,.12); color: #E8A13C; }
.kpi-health { --tint: rgba(109,163,91,.14); color: #6DA35B; }
.kpi-water { --tint: rgba(45,212,191,.10); color: #2DD4BF; }
.kpi-disease { --tint: rgba(214,105,69,.12); color: #E07A5A; }
.kpi-sow { --tint: rgba(126,155,74,.14); color: #A3C060; }
.kpi-approvals { --tint: rgba(95,148,50,0.9); color: #A3E635; }
.kpi .kv, .kpi .ks { position: relative; }
.kpi .chev { color: var(--muted); }
/* care meters: a hand tool, a name, and plain words */
.ct-meter { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.ct-ico { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ct-meat { flex: 1; min-width: 0; }
.ct-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 5px; }
.ct-top span { font-weight: 600; } .ct-top b { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.ct-bar { height: 10px; border-radius: 6px; background: rgba(44,58,48,0.07); overflow: hidden; }
.ct-bar i { display: block; height: 100%; border-radius: 6px; box-shadow: inset 0 -1px 0 rgba(58,50,32,0.35); transition: width .5s ease; }
/* pruning coach rows lead with the plant */
.coach-row .sp-ico { width: 24px; height: 24px; flex: none; }
/* the doctor greets, not interrogates */
.doc-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.doc-art { width: 52px; height: 52px; flex: none; }
.doc-head h3 { margin: 0 0 2px; }
.doc-head p { margin: 0; }
/* harvest timeline: riper, juicier */
.tl-rib b { height: 18px; border-radius: 9px; }
.tl-rib u { height: 18px; }
.tl-name .sp-ico { width: 24px; height: 24px; }
.tl-kg { font-weight: 700; }
/* softer paper cards everywhere */
.card { border-radius: 20px; }
.kpi .kl::first-letter { text-transform: uppercase; }

/* ripening: the open window fills green -> the crop's own colour, a berry at the tip */
.tl-rib b.open em { display: block; height: 100%; border-radius: 9px; position: relative;
  background: linear-gradient(90deg, #6DA35B 0%, currentColor 78%); box-shadow: inset 0 -1px 0 rgba(58,50,32,0.35); min-width: 8px; }
.tl-rib b.open em::after { content: ""; position: absolute; right: -1px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2.5px rgba(44,58,48,0.8), 0 1px 4px rgba(58,50,32,0.35); }
.tl-mem { display: block; }
/* the almanac line: today's named jobs as warm chips */
.alm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 2px 0; }
.alm-lbl { font-family: var(--display); font-weight: 700; font-size: 15px; margin-inline-end: 2px; }
.alm-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; border: 1px solid rgba(95,148,50,0.9); background: rgba(95,148,50,0.9); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.alm-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); flex: none; }
.alm-chip:hover { border-color: var(--acc); }
/* the doctor's verdict reads like a consultation, not a log line */
#doc-result .doc-verdict, #doc-result > div { border-radius: 14px; }

/* ---- harvest: one card per crop, its own season as a band ---- */
.tl { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
/* a wide screen gets a two-column shelf; headers and summary span both */
@media (min-width: 1000px) {
  .tl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; align-items: stretch; }
  .tl-sum, .tl-sec, .tl-more { grid-column: 1 / -1; }
}
.tlc { display: flex; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: var(--tr); }
.tlc:hover { border-color: var(--line-2); transform: translateY(-1px); }
.tlc.urgent { border-color: rgba(200,64,47,.35); background: linear-gradient(0deg, rgba(200,64,47,.05), rgba(200,64,47,.05)), var(--card); }
.tlc-ico .sp-ico { width: 34px; height: 34px; }
.tlc-main { flex: 1; min-width: 0; }
.tlc-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.tlc-nm { font-family: var(--display); font-size: 16px; }
.tlc-kg { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tlc-line { font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.tlc-line.warn { color: var(--attn); font-weight: 600; }
.tlc-band { position: relative; height: 22px; border-radius: 11px; background: rgba(44,58,48,.07); border: 1.5px solid currentColor; overflow: visible; }
.tlc.c-fruit .tlc-band { color: var(--fruit); } .tlc.c-nut .tlc-band { color: var(--nut); } .tlc.c-berry .tlc-band { color: var(--berry); }
.tlc.c-cucurbit .tlc-band { color: var(--cucurbit); } .tlc.c-veg .tlc-band { color: var(--veg); } .tlc.c-vine .tlc-band { color: var(--vine); }
.tlc.c-herb .tlc-band { color: var(--herb); } .tlc.c-hedge .tlc-band { color: var(--hedge); }
.tlc-band.ahead { border-style: dashed; opacity: .75; }
.tlc-band em { display: block; height: 100%; border-radius: 9.5px; background: linear-gradient(90deg, #8FBF6A, currentColor); transition: width .5s ease; }
.tlc-band u { position: absolute; top: -5px; bottom: -5px; width: 2.5px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 1.5px rgba(251,248,239,.9); }
.tlc-band u::after { content: ""; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--ink); }
.tlc-d0, .tlc-d1 { position: absolute; top: 100%; margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.tlc-d0 { left: 2px; } .tlc-d1 { right: 2px; }
.tlc-main > .src { display: inline-block; margin-top: 16px; }
.tlc-band { margin-bottom: 14px; }

/* ---- profile hero: the plant's own photograph is the cover ---- */
.hero-photo { position: relative; margin: 0 0 12px; border-radius: 18px; overflow: hidden; min-height: 190px; max-height: 260px; }
.hero-photo img { width: 100%; height: 100%; min-height: 190px; max-height: 260px; object-fit: cover; display: block; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,26,20,0) 30%, rgba(20,26,20,.72)); }
.hero-txt { position: absolute; left: 14px; right: 14px; bottom: 12px; color: #FFF; }
.hero-txt h2 { margin: 0; color: #FFF; font-family: var(--display); text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.hero-txt .hero-sub { color: rgba(255,255,255,.85); font-size: 13px; margin: 2px 0 6px; font-style: italic; }
.hero-txt .badge { backdrop-filter: blur(6px); }
.ps-body .hero-photo { margin-top: 2px; }
.card-head { flex-direction: row; gap: 12px; align-items: center; }
.card-head .head-ico .sp-ico { width: 44px; height: 44px; }
.detail-x { z-index: 3; }
#detail .hero-photo + * { margin-top: 0; }
#detail { position: relative; }
#detail .detail-x, .ps-body .detail-x { position: absolute; top: 10px; inset-inline-end: 10px; background: rgba(251,248,239,.85); }

/* with a hero cover, the timeline keeps only its history strip */
.ptl.compact .ptl-img { display: none; }
.ptl.compact { margin-top: 2px; }

/* ---- the doctor's verdict: a consultation, not a log line ---- */
.dx { border-radius: 16px; background: var(--card); border: 1px solid var(--line); padding: 14px 16px; margin-top: 10px; }
.dx.top { border-color: rgba(95,148,50,.4); box-shadow: 0 6px 20px rgba(58,50,32,.10); }
.dx-h { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.dx-ring { width: 52px; height: 52px; flex: none; }
.dx-ring text { font-size: 10.5px; font-weight: 800; fill: var(--ink); }
.dx-name { font-family: var(--display); font-size: 17px; }
.dx-tags { display: flex; gap: 6px; margin-top: 4px; }
.dx-sec { margin: 8px 0; }
.dx-sec h5 { margin: 0 0 3px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); }
.dx-sec p { margin: 0; font-size: 14px; line-height: 1.5; }
.dx-acts { grid-template-columns: repeat(2, minmax(0, 180px)); margin: 10px 0 0; }

/* care today: the chips become spoken rows on the paper */
.ct-chips { flex-direction: column; gap: 8px; }
.ct-chip { width: 100%; justify-content: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.ct-chip b { min-width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--ctc) 18%, transparent); color: var(--ctc); font-size: 15px; }
.ct-chip span { font-weight: 600; color: var(--ink); }
.ct-chip:hover { border-color: var(--ctc); }

.ghost-btn.on-acc, button.on-acc { background: rgba(95,148,50,.16) !important; color: #2F5220 !important; border-color: rgba(95,148,50,.55) !important; font-weight: 750; }
.chip.on { background: rgba(95,148,50,.14); color: var(--ink); border-color: rgba(95,148,50,.5); }

/* ================= care hub, the deep cards =================
   Every log reads like a garden diary entry: a tool or plant leads, the state speaks
   in words and capsules, tables are gone. */
/* spray log: safety is the headline */
.spray-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.spray-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.spray-ico { width: 24px; height: 24px; flex: none; color: var(--acc2); }
.spray-meat { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.safety { flex: none; font-size: 12px; font-weight: 750; padding: 6px 11px; border-radius: 999px; }
.safety.wait { background: rgba(168,126,27,.14); color: #7A5B10; border: 1px solid rgba(168,126,27,.4); }
.safety.ok { background: rgba(63,143,78,.13); color: #2A6B38; border: 1px solid rgba(63,143,78,.4); }
/* pest diary: photographs first */
.pest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pest-card { border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: var(--tr); }
.pest-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pest-photo { position: relative; aspect-ratio: 4 / 3; background: var(--bg2); }
.pest-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pest-photo.none { display: grid; place-items: center; } .pest-photo.none .sp-ico { width: 42px; height: 42px; opacity: .7; }
.pest-date { position: absolute; bottom: 6px; left: 6px; background: rgba(251,248,239,.92); color: var(--ink); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.pest-card > b { display: block; padding: 8px 10px 0; font-family: var(--display); }
.pest-note { padding: 2px 10px 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* pruning coach: a card per species, spoken */
.coach-card { border-radius: 16px; border: 1px solid var(--line); background: var(--card); padding: 12px 14px; margin: 8px 0; }
.coach-h { display: flex; align-items: center; gap: 10px; }
.coach-h .sp-ico { width: 34px; height: 34px; flex: none; }
.coach-h > div { flex: 1; min-width: 0; }
.coach-nm { font-family: var(--display); font-size: 16px; display: block; }
.coach-why { margin: 8px 0 8px; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.coach-months { display: flex; gap: 6px; }
.coach-months span { font-size: 11.5px; font-weight: 750; padding: 4px 10px; border-radius: 999px; background: rgba(111,168,220,.16); color: #2C5E8A; }
.btn-acc.slim { padding: 7px 14px; font-size: 12.5px; }
/* irrigation: zone cards, minutes as the big number */
.irr-zones { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.irr-zone { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.irr-zone.under { border-color: rgba(168,126,27,.45); }
.irr-ico { width: 22px; height: 22px; flex: none; color: var(--acc2); }
.irr-meat { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.irr-run { text-align: end; }
.irr-run > b { font-size: 20px; letter-spacing: -.5px; } .irr-run small { font-size: 12px; color: var(--muted); font-weight: 600; }
.irr-dots { display: flex; gap: 3px; justify-content: flex-end; margin-top: 2px; }
.irr-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--acc2); }
/* capsules for readings */
.cap { display: inline-block; font-size: 12px; font-weight: 750; padding: 4px 10px; border-radius: 999px; background: rgba(44,58,48,.07); }
.cap.good { background: rgba(63,143,78,.13); color: #2A6B38; }
.cap.off { background: rgba(168,126,27,.14); color: #7A5B10; }
.soil-caps { margin-inline-start: auto; display: flex; gap: 6px; }
.feed-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); margin: 6px 0; }
.feed-row .sp-ico { width: 24px; height: 24px; }
.ph-stages { display: flex; gap: 5px; flex-wrap: wrap; }
/* symptom picker: garden tags, not checkboxes */
.sym { padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: var(--tr); }
.sym:hover { border-color: var(--acc); }
.sym.on { background: #5F9432; border-color: #5F9432; color: #FFF; }
.sym.hinted { border-style: dashed; border-color: rgba(168,126,27,.6); }

/* ---- the harvest shelf ---- */
.tl-sum { font-family: var(--display); font-size: 15.5px; color: var(--ink); padding: 2px 2px 8px; }
.tl-sec { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin: 8px 2px 2px; }
.tl-sec.pick { color: var(--fruit); } .tl-sec.soon { color: var(--muted); }
.tl-sec span { background: rgba(44,58,48,.08); color: var(--ink); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; letter-spacing: 0; }
.tl-sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tlc-ico { position: relative; align-self: flex-start; }
.tlc-ico .sp-ico { width: 40px; height: 40px; padding: 5px; border-radius: 50%; background: var(--card-solid); box-shadow: inset 0 0 0 2px currentColor; }
.tlc.c-fruit .tlc-ico { color: var(--fruit); } .tlc.c-nut .tlc-ico { color: var(--nut); } .tlc.c-berry .tlc-ico { color: var(--berry); }
.tlc.c-cucurbit .tlc-ico { color: var(--cucurbit); } .tlc.c-veg .tlc-ico { color: var(--veg); } .tlc.c-vine .tlc-ico { color: var(--vine); }
.tlc.c-herb .tlc-ico { color: var(--herb); } .tlc.c-hedge .tlc-ico { color: var(--hedge); }
.tlc-side { display: flex; flex-direction: column; align-items: center; gap: 1px; align-self: center; min-width: 64px; }
.tlc-side .tlc-basket { width: 40px; height: 36px; }
.tlc.c-fruit .tlc-side { color: var(--fruit); } .tlc.c-nut .tlc-side { color: var(--nut); } .tlc.c-berry .tlc-side { color: var(--berry); }
.tlc.c-cucurbit .tlc-side { color: var(--cucurbit); } .tlc.c-veg .tlc-side { color: var(--veg); } .tlc.c-vine .tlc-side { color: var(--vine); }
.tlc.c-herb .tlc-side { color: var(--herb); } .tlc.c-hedge .tlc-side { color: var(--hedge); }
.tlc-side b { font-size: 15px; color: var(--ink); }
.tlc-side span { font-size: 10.5px; color: var(--muted); white-space: nowrap; }

/* ---- the almanac front page ---- */
.hero-alm { position: relative; border-radius: 22px; padding: 20px 20px 16px; margin-bottom: 16px;
  background: linear-gradient(165deg, #FDFAF1 0%, #F4EDDA 55%, #EFE6CE 100%); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.hero-alm::before { content: ""; position: absolute; inset: -30% -10% auto auto; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(229,192,91,.25), transparent 65%); pointer-events: none; }
.hero-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.hero-alm .season { color: var(--fruit); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; font-size: 11.5px; }
.hero-alm h2 { font-size: 28px; margin: 2px 0 2px; }
.hero-alm .date { color: var(--muted); font-size: 13px; }
.hero-wx { margin: 8px 0 0; font-family: var(--display); font-size: 15.5px; color: var(--ink); }
.hero-temp { text-align: end; flex: none; }
.hero-temp b { font-size: 40px; letter-spacing: -1.5px; font-weight: 750; }
.hero-temp span { color: var(--muted); font-size: 15px; }
.hero-alm .sun-strip { margin-top: 10px; background: rgba(255,253,246,.6); border: 1px solid var(--line); border-radius: 14px; }
.hero-alm .alm { padding: 12px 0 0; }
.hero-alm .ask-row { margin-top: 12px; }
.hero-alm .ask-row input { background: #FFFDF6; }
/* tiles: medallions like the shelf */
.kpi-ico { width: 34px; height: 34px; padding: 6px; border-radius: 50%; background: var(--card-solid); box-shadow: inset 0 0 0 2px currentColor; top: 12px; }
.kpi .kv { font-size: 30px; }
/* photo of the day: a polaroid pinned to the page */
.polaroid { margin: 4px 4px 2px; background: #FFFDF6; border: 1px solid var(--line); border-radius: 6px; padding: 8px 8px 6px; box-shadow: 0 8px 20px rgba(58,50,32,.14); transform: rotate(-1.6deg); cursor: pointer; transition: var(--tr); }
.polaroid:hover { transform: rotate(0deg) scale(1.01); }
.polaroid img { width: 100%; border-radius: 3px; display: block; }
.polaroid figcaption { font-family: var(--display); font-size: 13.5px; text-align: center; padding: 6px 0 2px; color: var(--ink); }
/* activity: diary entries */
.feed-item.diary { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.feed-item.diary:last-of-type { border-bottom: 0; }
.feed-item.diary i { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); margin-top: 6px; flex: none; }
.feed-item.diary .fd { display: inline-block; margin-inline-end: 6px; color: var(--muted); font-size: 12px; }

/* ================= almanac everywhere: the remaining rooms =================
   Map chrome, tasks, journal, planner, inventory shelves, kitchen - the same paper,
   the same serif titles, the same capsules and medallions as the harvest shelf. */

/* map chrome: a paper toolbar floating over the plot */
.map-toolbar { background: var(--card-solid); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.map-filter-lbl { color: var(--fruit); }
#map-legend { display: flex; flex-wrap: wrap; gap: 6px 8px; padding: 10px 4px 0; }
#map-legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
#map-container { border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.map-hint { background: rgba(255,253,246,.92); color: var(--ink); border: 1px solid var(--line-2); font-weight: 650; }

/* tasks: a to-do diary */
.task { border-radius: 14px; border: 1px solid var(--line); background: var(--card); padding: 12px 14px; margin: 8px 0; transition: var(--tr); }
.task:hover { border-color: var(--line-2); }
.task.urgent { border-color: rgba(200,64,47,.4); background: linear-gradient(0deg, rgba(200,64,47,.05), rgba(200,64,47,.05)), var(--card); }
.task.done { opacity: .55; }
.task.done span { text-decoration: line-through; text-decoration-color: rgba(44,58,48,.4); }
.task input[type=checkbox] { width: 22px; height: 22px; accent-color: #5F9432; }
.tk-tag { border-radius: 999px; background: rgba(44,58,48,.06); padding: 3px 10px; }
.tk-plant { border-radius: 999px; background: rgba(95,148,50,.12); color: #2F5220; border: 0; font-weight: 700; padding: 3px 10px; cursor: pointer; }
.tasks-head h2 { font-family: var(--display); }

/* journal + generic log rows: paper entries */
#journal .hrow, #planner .hrow { border-radius: 12px; border: 1px solid var(--line); background: var(--card); padding: 9px 12px; margin: 6px 0; }
#journal .hrow .hkg { font-weight: 750; color: var(--fruit); }
#journal h3, #planner h3, #kitchen h3, #care h3, #settings h3, #library h3 { font-family: var(--display); }
.hform input, .hform select { background: #FFFDF6; }

/* planner: month sheets */
#planner .card { background: linear-gradient(180deg, #FDFAF1, var(--card)); }

/* inventory: shelf headers with medallion counts */
.inv-shelf-h { font-family: var(--display); font-size: 16px; align-items: center; }
.inv-shelf-h .n { background: var(--card-solid); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-family: system-ui, sans-serif; }
.inv-card { border-radius: 16px; transition: var(--tr); }
.inv-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.inv-cn b { font-family: var(--display); }

/* kitchen: recipe cards */
#kitchen .card { border-radius: 18px; }
#kitchen .hrow { border-radius: 12px; border: 1px solid var(--line); background: var(--card); padding: 9px 12px; margin: 6px 0; }

/* dialogs and sheets on paper */
.dlg, .ms-panel { background: var(--card-solid); }
.dlg h3, .lang-menu-h { font-family: var(--display); }

/* alerts: field notices, not error bars */
.alert { border-radius: 12px; font-weight: 650; }

/* library home cards */
#library [data-libopen] b, #library [data-libopen] { font-family: inherit; }
.lib-hero h2 { font-family: var(--display); }

/* ================= character pass: printed almanac, not app-store gloss =================
   Kill the AI-tells - neon glows, 135deg gradients, puffy uniform radii - and replace
   them with print finishes: paper grain, letterpress buttons, enamel field button. */

/* faint paper grain over everything, like laid stock */
body::after { content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* letterpress buttons: flat ink-green, pressed not glossy */
button.btn-acc { background: #4E7A2B; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 1px 0 rgba(44,58,48,.3); }
button.btn-acc:hover { opacity: 1; background: #446C24; }
button.btn-acc:active { transform: none; box-shadow: inset 0 2px 3px rgba(20,30,15,.35); }

/* the field button: enamel badge, not a glowing FAB */
.cam-fab { background: #3E6B21; box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 2px 5px rgba(58,50,32,.35); border: 3px solid #F5F1E4; }
.cam-fab svg { stroke: #F5F1E4; }
#nav-cam.active .cam-fab { box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 0 0 3px rgba(95,148,50,.3), 0 2px 5px rgba(58,50,32,.35); }

/* trim the puff: print-weight corners */
.card, .hero-alm, .map-toolbar { border-radius: 12px; }
#map-container { border-radius: 12px; }
.tlc, .coach-card, .pest-card, .irr-zone, .dx, .task, .inv-card, .spray-row, .feed-row { border-radius: 10px; }

/* retire the last of the lime on paper */
.kpi-action, .kpi-approvals { color: #4E7A2B; }
.lang-opt.on i { color: #4E7A2B; }

/* almanac rule under card titles: a hairline, set clear of the text */
.card > h3:first-child { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px; }

/* ================= signature glyph + fixes ================= */
/* KPI tiles: the medallion owns the corner; the details cue sits under the card text */
.kpi { padding-bottom: 30px; }
.kpi .chev { top: auto; bottom: 11px; right: auto; inset-inline-end: 14px; }

/* the Ask button carries the mark */
.ask-btn { display: inline-flex; align-items: center; gap: 7px; }
.ask-btn svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* the field button is the Pomario tree */
.cam-fab svg { width: 27px; height: 27px; stroke-width: 2.5; }

/* ================= round 9: voice ask, symptom field guide, the ledger ================= */

/* ask by voice - the tree listens */
.ms-panel.va { padding: 18px 18px calc(20px + env(safe-area-inset-bottom, 0px)); }
.va-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.va-tree { width: 46px; height: 46px; color: #4E7A2B; flex: none; }
#va-ov.listening .va-tree { animation: va-breathe 1.6s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(95,148,50,.4)); }
@keyframes va-breathe { 50% { transform: scale(1.08); } }
.va-tr { min-height: 56px; font-family: var(--display); font-size: 19px; line-height: 1.45; color: var(--ink); padding: 8px 2px; }
.va-q { font-family: var(--display); font-size: 16px; color: var(--muted); margin: 6px 0 8px; }
.va-row input { flex: 1; }
#va-ans .ask-card { margin-top: 10px; }

/* the symptom field guide: group plates and specimen tiles with a colour key */
.sym-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin: 10px 0; }
.sym-tabs button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 11.5px; font-weight: 650; cursor: pointer; position: relative; transition: var(--tr); }
.sym-tabs button svg { width: 21px; height: 21px; }
.sym-tabs button:hover { border-color: var(--line-2); color: var(--ink); }
.sym-tabs button.on { background: rgba(95,148,50,.1); border-color: #5F9432; color: #2F5220; }
.sym-tabs button i { position: absolute; top: 4px; inset-inline-end: 5px; font-style: normal; background: #C8402F; color: #FFFDF6; border-radius: 999px; font-size: 10.5px; min-width: 17px; height: 17px; line-height: 17px; text-align: center; padding: 0 4px; }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 8px; }
.symc { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-solid); cursor: pointer; transition: var(--tr); }
.symc:hover { border-color: var(--line-2); transform: translateY(-1px); }
.symc-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--tone, #5F9432); box-shadow: inset 0 0 0 1.5px rgba(44,58,48,.22); }
.symc-nm { font-size: 13px; line-height: 1.3; font-weight: 600; color: var(--ink); }
.symc-tick { width: 16px; height: 16px; margin-inline-start: auto; color: #4E7A2B; opacity: 0; flex: none; transition: var(--tr); }
.symc.on { background: rgba(95,148,50,.1); border-color: #5F9432; }
.symc.on .symc-tick { opacity: 1; }
.symc.hinted:not(.on) { border-style: dashed; border-color: #A8842C; }
@media (max-width: 560px) { .sym-tabs { grid-template-columns: repeat(5, 1fr); } .sym-grid { grid-template-columns: 1fr 1fr; } }

/* the ledger: every log form and log row in the app, no more spreadsheet */
.hform input, .hform select { background: #FFFDF6; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--ink); }
.hform input:focus, .hform select:focus { border-color: #5F9432; outline: none; box-shadow: 0 0 0 3px rgba(95,148,50,.14); }
.hform button:not(.ghost-btn):not(.btn-acc) { background: #4E7A2B; color: #FFFDF6; border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 1px 0 rgba(44,58,48,.3); }
.hform button:not(.ghost-btn):not(.btn-acc):hover { background: #446C24; }
.hrow { display: flex; align-items: center; gap: 10px; }
.hrow .fd { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 750; color: var(--muted); background: rgba(44,58,48,.06); border-radius: 6px; padding: 3px 7px; flex: none; }
.hrow .sp-ico svg { width: 20px; height: 20px; }
.hrow .hkg { margin-inline-start: auto; font-weight: 750; color: #B4501F; background: rgba(208,106,50,.12); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; flex: none; }
.hrow .xdel { opacity: .35; transition: var(--tr); }
.hrow:hover .xdel { opacity: 1; }

/* garden health: the donut is the tile's medallion, framing matches its neighbours */
.kpi-health .kpi-ico { display: none; }
.kpi-health .donut-mini { position: absolute; top: 11px; inset-inline-end: 12px; width: 40px; }

.ps-skel.slim { padding: 6px 0; } .ps-skel.slim i { height: 46px; border-radius: 12px; }

/* ================= round 10: the day's list, the plot sheet, the almanac instruments ================= */

/* the day's work: an open list, not finished pills */
.alm { display: flex; flex-direction: column; gap: 0; align-items: stretch; }
.alm-lbl { margin-bottom: 4px; }
.alm-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: start; background: none; border: 0;
  border-bottom: 1px dashed var(--line); padding: 10px 2px; cursor: pointer; color: var(--ink);
  font-size: 14px; font-weight: 600; line-height: 1.35; transition: var(--tr); }
.alm-item:last-of-type { border-bottom: 0; }
.alm-item:hover { color: #2F5220; }
.alm-item span { flex: 1; min-width: 0; }
.alm-ring { width: 17px; height: 17px; border-radius: 50%; border: 2.2px solid var(--acc); background: #FFFDF6; flex: none; }
.alm-go { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }

/* the plot sheet: title block, framed drawing, map key caption */
.plot-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 2px 4px 12px; }
.plot-head h2 { font-family: var(--display); font-size: 24px; margin: 0 0 2px; }
.compass { width: 42px; height: 42px; color: var(--muted); flex: none; }
.compass .cp-n { font-size: 10.5px; font-weight: 700; fill: currentColor; stroke: none; font-family: system-ui, sans-serif; }
.map-toolbar { background: transparent; border: 0; box-shadow: none; padding: 0 2px 12px; border-radius: 0; }
#map-container { box-shadow: 0 0 0 1px var(--line-2), 0 0 0 7px #EDE5D1, 0 0 0 8px rgba(44,58,48,.28), var(--shadow); border: 0; border-radius: 6px; margin: 8px; }
#map-legend { margin-top: 18px; padding: 12px 4px 0; border-top: 1px solid var(--line); }
.lg-lbl { font-size: 11px !important; font-weight: 800 !important; letter-spacing: .1em; text-transform: uppercase; color: var(--muted) !important; background: none !important; border: 0 !important; padding: 5px 2px !important; }

/* frost: the horizon to first frost */
.frost-hero { display: flex; align-items: center; gap: 16px; margin: 6px 0 2px; }
.frost-n { font-family: var(--display); font-size: 52px; line-height: 1; color: var(--ink); letter-spacing: -1px; flex: none; }
.frost-n span { display: block; font-family: system-ui, sans-serif; font-size: 12px; color: var(--muted); font-weight: 650; letter-spacing: .04em; margin-top: 5px; }
.frost-band { flex: 1; min-width: 0; }
.frost-band .fb-m { font-size: 10.5px; fill: var(--muted); font-weight: 600; }
.prot { margin-top: 10px; }
.prot-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.prot-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--ink);
  background: rgba(91,132,168,.1); border: 1px solid rgba(91,132,168,.35); border-radius: 999px; padding: 4px 11px; }
.prot-chip .sp-ico svg { width: 15px; height: 15px; }
.prot-chip.dim { color: var(--muted); border-style: dashed; background: none; }

/* moon: the disc as it stands tonight */
.moon-hero { display: flex; align-items: center; gap: 18px; margin: 8px 0 4px; }
.moon-big { width: 92px; height: 92px; flex: none; filter: drop-shadow(0 3px 8px rgba(58,50,32,.22)); }
.moon-name { font-family: var(--display); font-size: 20px; }
.moon-next { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 6px; font-weight: 600; }
.moon-next .mn { width: 13px; height: 13px; border-radius: 50%; flex: none; border: 1.4px solid rgba(44,58,48,.45); }
.moon-next .mn.full { background: #F6F1E0; }
.moon-next .mn.new { background: #33415C; margin-inline-start: 10px; }
.moon-advice { margin-top: 10px; }

/* season intelligence: gauges against last year */
.season-verdict { font-family: var(--display); font-size: 18.5px; line-height: 1.4; margin: 4px 0 12px; color: var(--ink); }
.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .gauges { grid-template-columns: 1fr; } }
.gauge .g-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.gauge .g-top span { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.gauge .g-top b { font-family: var(--display); font-size: 24px; color: var(--ink); }
.g-band { position: relative; height: 16px; border-radius: 8px; background: rgba(44,58,48,.08); overflow: visible; }
.g-band em { display: block; height: 100%; border-radius: 8px; }
.g-band.heat em { background: linear-gradient(90deg, #C9A227, #C86A32); }
.g-band.cold em { background: linear-gradient(90deg, #7FA8C9, #5B84A8); }
.g-band u { position: absolute; top: -4px; bottom: -4px; width: 2.5px; background: var(--ink); border-radius: 2px; opacity: .65; }
.gauge .src { display: block; margin-top: 6px; }

/* crop rotation: family flows, this year into next */
.rot-legend { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 2px 4px 8px; }
.rot-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.rot-row:last-of-type { border-bottom: 0; }
.rot-fam { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #FFFDF6; border-radius: 999px; padding: 6px 13px; flex: 1; min-width: 0; }
.rot-fam i { font-style: normal; font-weight: 700; font-size: 11.5px; background: rgba(255,253,246,.28); border-radius: 999px; padding: 1px 8px; margin-inline-start: auto; white-space: nowrap; }
.rot-fam.next { flex: 0 1 auto; justify-content: center; }
.f-nightshade { background: #A8503F; } .f-cucurbit { background: #B27F1F; } .f-brassica { background: #4C8A5F; }
.f-legume { background: #6F8B3B; } .f-rootleaf { background: #7A5B36; }
.rot-arrow { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html.rtl .rot-arrow { transform: scaleX(-1); }

/* crowding foresight: the collision, drawn */
.crowd-c { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px dashed var(--line); }
.crowd-c:last-of-type { border-bottom: 0; }
.crowd-pair { display: flex; flex: none; }
.crowd-pair .sp-ico { width: 34px; height: 34px; padding: 4px; border-radius: 50%; background: var(--card-solid); box-shadow: inset 0 0 0 2px var(--gold, #A87E1B); }
.crowd-pair .sp-ico + .sp-ico { margin-inline-start: -13px; }
.crowd-c.now .crowd-pair .sp-ico { box-shadow: inset 0 0 0 2px var(--attn); }
.crowd-main { flex: 1; min-width: 0; }
.crowd-main b span { color: var(--muted); font-weight: 600; }
.crowd-gap { height: 9px; border-radius: 5px; background: rgba(44,58,48,.08); margin: 5px 0 3px; overflow: hidden; }
.crowd-gap em { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #C9A227, #A87E1B); }
.crowd-c.now .crowd-gap em { background: linear-gradient(90deg, #D06A32, #C8402F); }
.crowd-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.crowd-when { font-size: 11.5px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: var(--gold, #A87E1B); background: rgba(168,126,27,.12); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.crowd-c.now .crowd-when { color: #B23A2E; background: rgba(200,64,47,.12); }
.crowd-side .ghost-btn { margin: 0; padding: 3px 10px; }

/* ================= the pantry: jars you can see ================= */
.pantry { background: linear-gradient(180deg, #F7F2E2, #F1EAD6); border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 0; margin: 10px 0 16px; }
.pantry-line { font-family: var(--display); font-size: 18.5px; color: var(--ink); margin: 0 0 6px; }
.shelf { display: flex; gap: 6px; overflow-x: auto; padding: 8px 4px 10px; border-bottom: 7px solid #B08954; border-radius: 0 0 3px 3px; -webkit-overflow-scrolling: touch; }
.shelf-jar { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: none; width: 76px; background: none; border: 0; cursor: pointer; padding: 0; color: var(--muted); transition: var(--tr); }
.shelf-jar:hover { transform: translateY(-3px); color: var(--ink); }
.shelf-jar .jar { width: 52px; height: 68px; filter: drop-shadow(0 2px 3px rgba(58,50,32,.25)); }
.shelf-jar span { font-size: 11px; font-weight: 650; line-height: 1.2; text-align: center; max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jar-n { font-size: 10.5px; font-weight: 750; fill: #26332B; font-family: system-ui, sans-serif; }

/* recipe cards as preserve labels */
.rcp { display: flex; gap: 13px; align-items: flex-start; background: var(--card-solid); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; transition: var(--tr); }
.rcp:hover { border-color: var(--line-2); transform: translateY(-1px); }
.rcp.flash { border-color: #5F9432; box-shadow: 0 0 0 3px rgba(95,148,50,.22); }
.rcp-jar { flex: none; }
.rcp-jar .jar { width: 46px; height: 60px; }
.rcp-main { flex: 1; min-width: 0; }
.rcp-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rcp-h b { font-family: var(--display); font-size: 16.5px; }
.rcp-trad { margin-inline-start: auto; font-size: 11px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: rgba(44,58,48,.07); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.rcp-ing { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 8px; }
.ing { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; color: #2F5220; background: rgba(95,148,50,.11); border: 1px solid rgba(95,148,50,.3); border-radius: 999px; padding: 3px 10px; }
.ing .sp-ico svg { width: 14px; height: 14px; }
.ing.wait { color: #7A5E17; background: rgba(168,126,27,.1); border-color: rgba(168,126,27,.4); border-style: dashed; }
.ing.dim { color: var(--muted); background: none; border-style: dashed; border-color: var(--line-2); }
.rcp-yield { font-size: 12.5px; font-weight: 750; color: #B4501F; background: rgba(208,106,50,.12); border-radius: 999px; padding: 3px 10px; }
.rcp.rcp-wait { background: var(--card); }
.rcp.rcp-wait .rcp-jar { opacity: .8; }
@media (max-width: 700px) { .rcp-grid { grid-template-columns: 1fr; } }

/* ================= the Garden Studio: founding a garden as a living drawing ================= */
.studio-ov { position: fixed; inset: 0; z-index: 300; background: var(--bg); overflow: auto; }
.studio { display: flex; flex-direction: column; min-height: 100%; max-width: 1100px; margin: 0 auto; padding: 14px clamp(14px, 3vw, 28px) 30px; }
.stu-head { display: flex; align-items: center; gap: 11px; padding-bottom: 12px; color: #4E7A2B; }
.stu-head svg { width: 30px; height: 30px; flex: none; }
.stu-head b { font-family: var(--display); font-size: 20px; color: var(--ink); letter-spacing: .02em; }
.stu-dots { display: flex; gap: 6px; margin-inline-start: 8px; }
.stu-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(44,58,48,.16); }
.stu-dots i.on { background: #5F9432; }
.stu-head .ghost-btn { margin: 0 0 0 auto; margin-inline-start: auto; padding: 5px 13px; }
.stu-stage { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); }
.stu-plot { display: block; width: 100%; max-height: 44vh; }
.stu-dim { fill: var(--muted); font-weight: 650; font-family: "Iowan Old Style", Palatino, Georgia, serif; }
.stu-hit { cursor: pointer; }
.stu-ink { stroke-dasharray: 120; stroke-dashoffset: 120; animation: stu-draw 1s ease-out forwards; }
@keyframes stu-draw { to { stroke-dashoffset: 0; } }
.stu-panel { padding: 18px 4px 0; }
.stu-panel h2 { font-family: var(--display); font-size: 26px; margin: 0 0 6px; }
.stu-sub { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 0 0 16px; max-width: 60ch; }
.stu-lbl { display: block; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.stu-lbl input { display: block; width: 100%; max-width: 420px; margin-top: 6px; font-family: var(--display); font-size: 21px; padding: 12px 14px; background: #FFFDF6; border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink); }
.stu-lbl input:focus { border-color: #5F9432; outline: none; box-shadow: 0 0 0 3px rgba(95,148,50,.14); }
.stu-dims { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 10px; }
.stu-k { display: block; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.stu-step { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line-2); border-radius: 11px; background: #FFFDF6; overflow: hidden; }
.stu-step button { width: 42px; height: 44px; border: 0; background: none; font-size: 22px; color: #4E7A2B; cursor: pointer; font-weight: 700; }
.stu-step button:hover:not(:disabled) { background: rgba(95,148,50,.1); }
.stu-step button:disabled { opacity: .3; cursor: default; }
.stu-step b { min-width: 52px; text-align: center; font-family: var(--display); font-size: 21px; }
.stu-line { font-family: var(--display); font-size: 17px; color: var(--ink); margin: 10px 0 6px; }
.stu-demo { margin: 12px 0 0; padding: 8px 14px; }
.stu-cats { margin-bottom: 10px; }
.stu-species { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 7px; max-height: 200px; overflow-y: auto; padding: 2px; margin-bottom: 10px; }
.stu-sp { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px 8px; background: var(--card-solid); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 11.5px; font-weight: 650; color: var(--ink); transition: var(--tr); }
.stu-sp .sp-ico svg { width: 24px; height: 24px; }
.stu-sp:hover { border-color: var(--line-2); transform: translateY(-1px); }
.stu-sp.on { border-color: #5F9432; background: rgba(95,148,50,.1); box-shadow: 0 0 0 1px #5F9432; }
.stu-foot { display: flex; gap: 10px; align-items: center; margin-top: 18px; }
.stu-foot .ghost-btn { margin: 0; }
.stu-next { margin: 0; padding: 12px 26px; font-size: 15.5px; }
@media (min-width: 860px) { .studio { flex-direction: row; align-items: flex-start; gap: 24px; padding-top: 26px; }
  .stu-head { position: absolute; top: 18px; left: 0; right: 0; max-width: 1100px; margin: 0 auto; padding: 0 28px; }
  .stu-stage { flex: 1.1; margin-top: 54px; position: sticky; top: 20px; } .stu-plot { max-height: 74vh; }
  .stu-panel { flex: 1; margin-top: 54px; } }

/* ================= category plates: specimens, not dots ================= */
.catp { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--card-solid); color: var(--muted);
  font-size: 12.5px; font-weight: 700; cursor: pointer; transition: var(--tr); white-space: nowrap; }
.catp .sp-ico { display: inline-flex; }
.catp .sp-ico svg, .catp .catp-all { width: 26px; height: 26px; padding: 3.5px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 1.7px var(--cc); box-sizing: border-box; flex: none; }
.catp .catp-all { color: #4E7A2B; }
.catp:hover { color: var(--ink); transform: translateY(-1px); border-color: var(--cc); }
.catp.on { border-color: var(--cc); background: var(--cc-soft); color: var(--ink); }
.catp.on .sp-ico svg, .catp.on .catp-all { background: #FFFDF6; }
.cat-plates { display: flex; flex-wrap: wrap; gap: 7px; }
.map-filter .catp { flex: none; }

/* ================= the Garden page: map, 3D and design are one place ================= */
#garden-modes { display: none; gap: 7px; padding: 0 0 12px; }
body[data-tab="map"] #garden-modes, body[data-tab="three"] #garden-modes, body[data-tab="design"] #garden-modes { display: flex; }
.gmode { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--card-solid); color: var(--muted);
  font-size: 13px; font-weight: 700; cursor: pointer; transition: var(--tr); }
.gmode svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.gmode:hover { color: var(--ink); border-color: var(--line-2); transform: translateY(-1px); }
.gmode.on { background: rgba(95,148,50,.12); border-color: #5F9432; color: #2F5220; }

/* ================= plan the shelf: wish-jars in, planting plan out ================= */
.pp-row { display: flex; align-items: center; gap: 11px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pp-row:last-of-type { border-bottom: 0; }
.pp-jar .jar { width: 38px; height: 50px; }
.pp-row b { font-family: var(--display); font-size: 15.5px; }
.pp-step { transform: scale(.86); transform-origin: center left; }
.pp-step b { font-family: var(--display); }
.pp-row .xdel { margin-inline-start: auto; }
.pp-crop { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.pp-crop:last-of-type { border-bottom: 0; }
.pp-ico { flex: none; }
.pp-ico .sp-ico svg { width: 34px; height: 34px; padding: 5px; border-radius: 50%; background: var(--card-solid); box-shadow: inset 0 0 0 2px var(--cc, #4A9152); box-sizing: border-box; }
.pp-main { flex: 1; min-width: 0; }
.pp-main > b { font-family: var(--display); font-size: 15.5px; }
.pp-band { height: 10px; border-radius: 6px; background: rgba(44,58,48,.08); margin: 5px 0 4px; overflow: hidden; }
.pp-band em { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #8FBF6A, #5F9432); }
.pp-side { text-align: end; flex: none; }
.pp-side b { font-family: var(--display); font-size: 21px; color: #B4501F; display: block; line-height: 1.1; }
.pp-side span { font-size: 11.5px; font-weight: 700; color: var(--muted); display: block; }
.pp-ok { flex: none; font-size: 11.5px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: #2F5220; background: rgba(95,148,50,.13); border-radius: 999px; padding: 4px 11px; }

/* ================= the plant's rhythm page + the living dashboard ================= */
/* care rules as rhythm rows: kind medallion, spoken line, the year as twelve dots */
.rhy { display: flex; align-items: flex-start; gap: 11px; padding: 10px 2px; border-bottom: 1px dashed var(--line); }
.rhy:last-of-type { border-bottom: 0; }
.rhy-ico { width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--card-solid); box-shadow: inset 0 0 0 1.8px var(--kc, #96A395); color: var(--kc, #96A395); }
.rhy-ico svg { width: 17px; height: 17px; }
.rhy-main { flex: 1; min-width: 0; }
.rhy-txt { display: block; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.ydots { display: inline-flex; gap: 4px; margin-top: 6px; }
.ydots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(44,58,48,.1); }
.ydots i.on { background: var(--kc, #5F9432); }
.ydots i.today { box-shadow: 0 0 0 2px #FFFDF6, 0 0 0 3.5px var(--ink); }
.rhy-now { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #2F5220; background: rgba(95,148,50,.14); border-radius: 999px; padding: 3px 9px; margin-top: 2px; }
.rhy.now { background: linear-gradient(90deg, rgba(95,148,50,.05), transparent); border-radius: 10px; padding-inline: 8px; }
/* the record as passport stamps */
.stamps { display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 4px 0 12px; }
.stamp { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 9px; border: 1.6px solid rgba(44,58,48,.4);
  border-radius: 9px; box-shadow: inset 0 0 0 3px #FFFDF6, inset 0 0 0 4.2px rgba(44,58,48,.18); background: #FFFDF6;
  color: var(--muted); transform: rotate(-1.2deg); }
.stamp:nth-child(even) { transform: rotate(1deg); }
.stamp svg { width: 16px; height: 16px; flex: none; }
.stamp b { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; line-height: 1.25; }
.stamp small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.stamp.done { color: #3E6B21; border-color: rgba(95,148,50,.55); box-shadow: inset 0 0 0 3px #FFFDF6, inset 0 0 0 4.2px rgba(95,148,50,.25); }
.stamp.warn { color: #B23A2E; border-color: rgba(200,64,47,.55); box-shadow: inset 0 0 0 3px #FFFDF6, inset 0 0 0 4.2px rgba(200,64,47,.25); }
/* the sky in the hero, and gauges that fill with the garden */
.hero-temp { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wx-art { width: 58px; height: 58px; }
.wx-sun { transform-origin: 32px 27px; animation: wx-turn 70s linear infinite; }
.wx-drops line { animation: wx-fall 1.3s ease-in infinite; }
.wx-drops line:nth-child(2) { animation-delay: .45s; } .wx-drops line:nth-child(3) { animation-delay: .85s; }
@keyframes wx-turn { to { transform: rotate(360deg); } }
@keyframes wx-fall { 0% { transform: translateY(-3px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(7px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wx-sun, .wx-drops line { animation: none; } }
.kpi-harvest .kpi-ico, .kpi-water .kpi-ico { display: none; }
.tile-gauge { position: absolute; top: 10px; inset-inline-end: 12px; width: 38px; height: 36px; }

/* ================= the living horizon ================= */
.horizon { margin: 12px -4px 2px; }
.horizon svg { display: block; width: 100%; height: auto; }
.hz-sun { animation: hz-breathe 5s ease-in-out infinite; }
@keyframes hz-breathe { 50% { opacity: .88; } }
@media (prefers-reduced-motion: reduce) { .hz-sun { animation: none; } }
.sun-strip.caption { justify-content: space-between; margin-top: 4px; }
.sun-strip.caption .sun-arc { display: none; }

/* ================= the almanac poster: the dashboard opens as a scene, not a card ================= */
.masthead { position: relative; margin: 4px -14px 0; }
@media (min-width: 641px) { .masthead { margin: 4px -28px 0; } }
.hz-svg { display: block; width: 100%; height: auto; max-height: min(36vw, 270px); }
.mh-txt { position: absolute; top: 9%; inset-inline-start: clamp(16px, 6%, 44px); }
.mh-txt h2 { font-family: var(--display); font-size: clamp(26px, 7.4vw, 40px); margin: 1px 0 2px; line-height: 1.05; color: var(--ink); }
.mh-txt .date { font-size: 13px; color: var(--muted); font-weight: 600; }
.mh-temp { position: absolute; top: 9%; inset-inline-end: clamp(16px, 6%, 44px); text-align: end; }
.mh-temp b { font-family: var(--display); font-size: clamp(34px, 9vw, 48px); color: var(--ink); line-height: 1; }
.mh-temp span { display: block; font-size: 13.5px; color: var(--muted); font-weight: 650; }
.masthead.night .mh-txt h2, .masthead.night .mh-temp b { color: #F2EDDD; }
.masthead.night .mh-txt .date, .masthead.night .mh-temp span { color: rgba(242,237,221,.75); }
.day-col { padding: 12px 2px 18px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.day-col .hero-wx { font-family: var(--display); font-size: 17px; color: var(--ink); margin: 0 0 10px; }
.hz-bee { animation: bee-bob 3.4s ease-in-out infinite; }
@keyframes bee-bob { 50% { transform: translate(0, 3px); } }
.hz-leaves .lf { animation: leaf-fall 6s ease-in infinite; }
.hz-leaves .lf1 { animation-delay: 2s; } .hz-leaves .lf2 { animation-delay: 4s; }
@keyframes leaf-fall { 0% { transform: translate(0, -10px) rotate(0deg); opacity: 0; } 15% { opacity: 1; }
  100% { transform: translate(14px, 60px) rotate(160deg); opacity: 0; } }
.hz-snow .sf { animation: snow-fall 7s linear infinite; }
.hz-snow .sf1 { animation-delay: 1.8s; } .hz-snow .sf2 { animation-delay: 3.5s; } .hz-snow .sf3 { animation-delay: 5.2s; }
@keyframes snow-fall { 0% { transform: translateY(-12px); opacity: 0; } 12% { opacity: .95; } 100% { transform: translateY(84px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hz-bee, .hz-leaves .lf, .hz-snow .sf { animation: none; } }
.mh-txt .season { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--fruit); margin-bottom: 3px; }

/* the horizon carries its own numbers: an instrument, not a decoration */
.hz-axis .hz-w { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; fill: var(--muted); font-family: system-ui, sans-serif; }
.hz-axis .hz-time { font-size: 12.5px; font-weight: 700; fill: var(--ink); font-family: "Iowan Old Style", Palatino, Georgia, serif; }
.masthead.night .hz-axis .hz-time { fill: var(--ink); }

/* ================= the brand face: Fraunces (wonky preserve-label cut), wordmark only ================= */
@font-face { font-family: "Pomario Brand"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 600; font-display: swap; }
.brand h1, .side-brand span, .boot-word, .au-brand span { font-family: "Pomario Brand", "Iowan Old Style", Palatino, Georgia, serif; font-weight: 600; letter-spacing: .01em; }

/* ================= the lush pass: colour mass, soft depth, big botanical presence =================
   The almanac keeps its soul - paper, serif, drawn objects - and gains the richness
   of the best plant apps: oversized watermark art, soft deep cards, breathing room. */

/* cards: softer, deeper, calmer */
.card, .hero-alm { border-radius: 20px; border-color: rgba(44,58,48,.08); box-shadow: 0 2px 4px rgba(58,50,32,.05), 0 12px 32px rgba(58,50,32,.07); }
.grid { gap: 14px; }
.kpi { border-radius: 20px; padding: 18px 18px 30px; border-color: rgba(44,58,48,.08); box-shadow: 0 2px 4px rgba(58,50,32,.05), 0 12px 32px rgba(58,50,32,.07); }
.kpi .kv { font-family: var(--display); font-size: 38px; font-weight: 700; letter-spacing: -.5px; }

/* the watermark: the tile's emblem, huge and quiet, bleeding off the corner */
.kpi-wm { position: absolute; bottom: -26px; inset-inline-end: -20px; width: 130px; height: 130px;
  fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round;
  opacity: .1; pointer-events: none; }
.kpi-action .kpi-wm { color: #4E7A2B; } .kpi-harvest .kpi-wm { color: #C05F38; }
.kpi-health .kpi-wm { color: #4E7A2B; } .kpi-water .kpi-wm { color: #2C7A8A; }
.kpi-disease .kpi-wm { color: #C8402F; } .kpi-sow .kpi-wm { color: #7E9B4A; }
.kpi-approvals .kpi-wm { color: #A87E1B; }

/* soft botanical washes per tile */
.kpi-harvest { background: linear-gradient(150deg, rgba(208,106,50,.09), rgba(208,106,50,0) 55%), var(--card); }
.kpi-water { background: linear-gradient(150deg, rgba(44,122,138,.09), rgba(44,122,138,0) 55%), var(--card); }
.kpi-health { background: linear-gradient(150deg, rgba(95,148,50,.1), rgba(95,148,50,0) 55%), var(--card); }
.kpi-disease { background: linear-gradient(150deg, rgba(200,64,47,.08), rgba(200,64,47,0) 55%), var(--card); }
.kpi-sow { background: linear-gradient(150deg, rgba(126,155,74,.1), rgba(126,155,74,0) 55%), var(--card); }

/* the harvest shelf: the crop drawing carries the card */
.tlc { border-radius: 18px; padding: 14px 16px; border-color: rgba(44,58,48,.08); box-shadow: 0 2px 4px rgba(58,50,32,.05), 0 10px 26px rgba(58,50,32,.06); }
.tlc-ico { position: relative; }
.tlc-ico::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: currentColor; opacity: .13; }
.tlc-ico .sp-ico { position: relative; width: 52px; height: 52px; padding: 8px; background: none; box-shadow: none; }
.tlc-nm { font-size: 17.5px; }

/* rhythm, recipes, crops: the same soft depth */
.rcp, .crowd-c, .pp-crop { border-radius: 18px; }
.rcp { border-color: rgba(44,58,48,.08); box-shadow: 0 2px 4px rgba(58,50,32,.05), 0 10px 26px rgba(58,50,32,.06); }

/* the masthead sky warms with the day */
.masthead { background: linear-gradient(180deg, rgba(228,179,60,.08), rgba(228,179,60,0) 65%); border-radius: 0 0 26px 26px; }
.masthead.night { background: none; }

/* the day column breathes */
.day-col { padding: 16px 2px 22px; }
.alm-item { padding: 12px 2px; font-size: 14.5px; }

/* ================= one voice: the unified surface system =================
   Cards 20, sub-cards 16, chips and inputs 12, capsules round. One shadow pair,
   borders faded to a breath. Applied over every screen so the app reads as one hand. */
:root { --sh-card: 0 2px 4px rgba(58,50,32,.05), 0 12px 32px rgba(58,50,32,.07);
        --sh-sub: 0 1px 3px rgba(58,50,32,.05), 0 6px 18px rgba(58,50,32,.05);
        --bd-soft: rgba(44,58,48,.08); }
/* sub-cards: every row-card across the app */
.task, .coach-card, .pest-card, .irr-zone, .spray-row, .feed-row, .dx, .inv-card,
#journal .hrow, #planner .hrow, #kitchen .hrow, .symc, .stu-sp, .stu-stage, .pantry {
  border-radius: 16px; border-color: var(--bd-soft); box-shadow: var(--sh-sub); }
.sym-tabs button, .stu-step, .hform input, .hform select, .stu-lbl input { border-radius: 12px; }
.sym-tabs button { border-color: var(--bd-soft); }
.tlc, .rcp, .crowd-c { border-color: var(--bd-soft); }
.stamp { border-radius: 9px; }        /* passport stamps stay crisp on purpose */
#map-container { border-radius: 8px; } /* the survey plate keeps its matte frame */
/* the section watermark: a card's emblem, huge and quiet, inside its corner */
.card { position: relative; }
.card-wm { position: absolute; bottom: 6px; inset-inline-end: 8px; width: 112px; height: 112px;
  fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round;
  opacity: .09; pointer-events: none; }
/* serif figures wherever a number leads */
.kv-line b, .frost-n, .gauge .g-top b, .pp-side b, .tlc-side b { font-family: var(--display); }

/* ================= walk mode (v2 prototype, flag-gated) ================= */
body.walking main { overflow: hidden; }
#walk-hud { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
#walk-hud .wk-hint { position: absolute; top: calc(64px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%);
  background: rgba(251,248,239,.92); border: 1px solid var(--bd-soft); border-radius: 999px; padding: 8px 16px;
  font-size: 12.5px; font-weight: 650; color: var(--ink); max-width: 84vw; text-align: center; box-shadow: var(--sh-sub); }
#walk-hud .wk-exit { position: absolute; top: calc(110px + env(safe-area-inset-top, 0px)); inset-inline-end: 14px;
  pointer-events: auto; margin: 0; background: rgba(251,248,239,.92); }
#walk-hud .wk-pad { position: absolute; bottom: calc(104px + env(safe-area-inset-bottom, 0px)); inset-inline-start: 22px;
  width: 108px; height: 108px; border-radius: 50%; pointer-events: auto; touch-action: none;
  background: rgba(251,248,239,.55); border: 1.5px solid rgba(44,58,48,.25); backdrop-filter: blur(6px); }
#walk-hud .wk-pad i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%; background: #4E7A2B; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 6px rgba(58,50,32,.3); }
#walk-hud .wk-ring { position: absolute; bottom: calc(104px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  pointer-events: auto; background: var(--card-solid); border: 1px solid var(--bd-soft); border-radius: 20px;
  box-shadow: var(--sh-card); padding: 14px 16px; width: min(340px, 92vw); }
#walk-hud .wk-ring > b { font-family: var(--display); font-size: 17px; display: block; margin-bottom: 9px; }
#walk-hud .wk-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
#walk-hud .wk-acts button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px 8px;
  border-radius: 14px; border: 1px solid var(--bd-soft); background: var(--card); color: var(--ink);
  font-size: 11.5px; font-weight: 700; cursor: pointer; transition: var(--tr); }
#walk-hud .wk-acts button svg { width: 20px; height: 20px; fill: none; stroke: #4E7A2B; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#walk-hud .wk-acts button:hover { border-color: #5F9432; transform: translateY(-1px); }
#walk-hud .wk-foot { display: flex; justify-content: space-between; margin-top: 9px; }
#walk-hud .wk-foot .ghost-btn { margin: 0; }

/* ================= hub plates: a hub opens as rooms, not as one endless scroll ================= */
.hub-plates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; margin-bottom: 14px; }
.hubp { display: flex; align-items: center; gap: 9px; padding: 13px 14px; border-radius: 16px;
  border: 1px solid var(--bd-soft); background: var(--card-solid); color: var(--muted);
  font-size: 13px; cursor: pointer; transition: var(--tr); box-shadow: var(--sh-sub); text-align: start; }
.hubp svg { width: 21px; height: 21px; flex: none; color: #4E7A2B; }
.hubp b { font-family: var(--display); font-size: 14.5px; color: var(--ink); font-weight: 700; line-height: 1.15; flex: 1; min-width: 0; }
.hubp i { font-style: normal; font-size: 12px; font-weight: 750; color: #B4501F; background: rgba(208,106,50,.12); border-radius: 999px; padding: 2px 9px; flex: none; }
.hubp:hover { transform: translateY(-1px); border-color: rgba(95,148,50,.4); }
.hubp.on { background: rgba(95,148,50,.1); border-color: #5F9432; color: var(--ink); }

/* walking is immersive: the 3D control chrome steps aside until you leave the walk */
body.walking #time3d, body.walking .wx-badge, body.walking .three-reset, body.walking .three-designer { display: none !important; }

/* walk juice: the floating plant name, and the storybook grade over the scene */
.wk-plantname { position: absolute; transform: translate(-50%, -100%); pointer-events: none; z-index: 40;
  background: rgba(251,248,239,.94); border: 1px solid rgba(44,58,48,.14); border-radius: 999px;
  padding: 5px 13px; font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 14px; font-weight: 700;
  color: #26332B; white-space: nowrap; box-shadow: 0 3px 10px rgba(58,50,32,.18); display: none; }
body.walking #three-container { filter: saturate(1.13) contrast(1.03); }
body.walking #three-container::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 42%, transparent 62%, rgba(30,40,25,.2)); border-radius: inherit; }
body.walking #tooltip { display: none !important; }  /* the walk names plants its own way */

/* ================= the game takes the whole screen ================= */
body.walking header, body.walking nav, body.walking #garden-modes,
body.walking .weather-strip, body.walking .plot-head, body.walking .map-toolbar { display: none !important; }
body.walking main { padding: 0; max-width: none; }
body.walking #three-container { position: fixed; inset: 0; width: 100vw !important; height: 100vh !important; max-height: none !important; z-index: 85; border-radius: 0; }
body.walking .three-wrap { display: block; }
body.walking #detail3d { display: none; }
/* the door on the Garden page */
.walk-enter { display: inline-flex; align-items: center; gap: 9px; padding: 11px 20px; border-radius: 999px; border: 0;
  background: #3E6B21; color: #F5F1E4; font-size: 14.5px; font-weight: 750; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 3px 10px rgba(58,50,32,.25); transition: var(--tr); }
.walk-enter svg { width: 19px; height: 19px; }
.walk-enter:hover { background: #35601B; transform: translateY(-1px); }
.walk-enter[hidden] { display: none; }
body.walking #three-container canvas { width: 100vw !important; height: 100vh !important; }

/* walk controls: the whole screen is the camera, the pad is the legs */
#walk-hud .wk-look { position: absolute; inset: 0; pointer-events: auto; touch-action: none; }
#walk-hud .wk-hint, #walk-hud .wk-exit, #walk-hud .wk-pad, #walk-hud .wk-ring { z-index: 2; }
#walk-hud .wk-cam { position: absolute; bottom: calc(230px + env(safe-area-inset-bottom, 0px)); inset-inline-start: 44px;
  width: 52px; height: 52px; border-radius: 50%; pointer-events: auto; z-index: 2; cursor: pointer;
  background: rgba(251,248,239,.9); border: 1.5px solid rgba(44,58,48,.25); color: #3E6B21;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(58,50,32,.2); }
#walk-hud .wk-cam svg { width: 24px; height: 24px; }
#walk-hud .wk-cam:active { transform: scale(.94); }

/* the navigator and the quest log */
#walk-hud .wk-map { position: absolute; top: calc(64px + env(safe-area-inset-top, 0px)); inset-inline-start: 14px;
  width: 124px; height: 124px; border-radius: 14px; pointer-events: auto; z-index: 2; cursor: pointer;
  border: 2px solid rgba(251,248,239,.85); box-shadow: 0 4px 14px rgba(20,30,15,.4); background: rgba(38,51,43,.5); }
#walk-hud .wk-jobs { position: absolute; bottom: calc(118px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 16px;
  display: inline-flex; align-items: center; gap: 7px; pointer-events: auto; z-index: 2; cursor: pointer;
  background: rgba(251,248,239,.92); border: 1.5px solid rgba(44,58,48,.25); border-radius: 999px; padding: 9px 15px;
  font-size: 13px; font-weight: 750; color: #26332B; box-shadow: 0 3px 10px rgba(58,50,32,.25); }
#walk-hud .wk-jobs svg { width: 17px; height: 17px; stroke: #3E6B21; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#walk-hud .wk-jobs-n { font-style: normal; background: #C8402F; color: #FFFDF6; border-radius: 999px; font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 5px; }
#walk-hud .wk-jobs-n:empty { display: none; }
#walk-hud .wk-jobslist { position: absolute; bottom: calc(168px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 16px;
  width: min(320px, 86vw); pointer-events: auto; z-index: 3; background: var(--card-solid); border: 1px solid var(--bd-soft);
  border-radius: 18px; box-shadow: var(--sh-card); padding: 10px; }
#walk-hud .wk-jobslist button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: start;
  background: none; border: 0; border-bottom: 1px dashed var(--line); padding: 10px 6px; cursor: pointer;
  font-size: 13px; font-weight: 650; color: var(--ink); }
#walk-hud .wk-jobslist button:last-child { border-bottom: 0; }
#walk-hud .wk-jobslist button:hover { color: #2F5220; }
#walk-hud .wk-jobslist button i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
#walk-hud .wk-jobslist p { margin: 8px; font-size: 13px; color: var(--muted); }

/* ================= the walk HUD, laid out like a game deserves =================
   Top-left the chart, top-right the door out, hint between them (then it fades),
   bottom-left the legs, bottom-right the hands: camera above jobs, one column. */
#walk-hud .wk-map { top: calc(14px + env(safe-area-inset-top, 0px)); inset-inline-start: 14px; width: 112px; height: 112px; }
#walk-hud .wk-exit { top: calc(14px + env(safe-area-inset-top, 0px)); inset-inline-end: 14px; padding: 8px 15px; font-size: 12.5px; }
#walk-hud .wk-hint { top: calc(18px + env(safe-area-inset-top, 0px)); left: 138px; right: 128px; transform: none;
  max-width: none; font-size: 11.5px; padding: 8px 12px; line-height: 1.35;
  transition: opacity .6s ease, visibility .6s; }
#walk-hud .wk-hint.gone { opacity: 0; visibility: hidden; }
#walk-hud .wk-pad { bottom: calc(26px + env(safe-area-inset-bottom, 0px)); inset-inline-start: 20px; }
#walk-hud .wk-cam { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 16px; inset-inline-start: auto; width: 50px; height: 50px; }
#walk-hud .wk-jobs { bottom: calc(32px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 16px; }
#walk-hud .wk-jobslist { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 16px; }
#walk-hud .wk-ring { bottom: calc(160px + env(safe-area-inset-bottom, 0px)); }

/* the GTA layout: radar bottom-right, hands top-right, door top-left */
#walk-hud .wk-map { top: auto; inset-inline-start: auto; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 16px;
  width: 118px; height: 118px; border-radius: 50%; border: 0; background: none; box-shadow: 0 5px 16px rgba(20,30,15,.45); }
#walk-hud .wk-exit { top: calc(14px + env(safe-area-inset-top, 0px)); inset-inline-start: 14px; inset-inline-end: auto; }
#walk-hud .wk-cam { top: calc(14px + env(safe-area-inset-top, 0px)); bottom: auto; inset-inline-end: 112px; width: 40px; height: 40px; }
#walk-hud .wk-cam svg { width: 20px; height: 20px; }
#walk-hud .wk-jobs { top: calc(14px + env(safe-area-inset-top, 0px)); bottom: auto; inset-inline-end: 14px; padding: 9px 14px; }
#walk-hud .wk-jobslist { top: calc(64px + env(safe-area-inset-top, 0px)); bottom: auto; inset-inline-end: 14px; }
#walk-hud .wk-hint { left: 90px; right: 170px; }
#walk-hud .wk-ring { bottom: calc(40px + env(safe-area-inset-bottom, 0px)); left: 45%; }

/* round chip, job line, yield whisper, photo mode */
#walk-hud .wk-photo { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); inset-inline-end: 162px;
  width: 40px; height: 40px; border-radius: 50%; pointer-events: auto; z-index: 2; cursor: pointer;
  background: rgba(251,248,239,.9); border: 1.5px solid rgba(44,58,48,.25); color: #3E6B21;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(58,50,32,.2); }
#walk-hud .wk-photo svg { width: 20px; height: 20px; }
#walk-hud .wk-stop { position: absolute; top: calc(64px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%);
  background: #3E6B21; color: #F5F1E4; border-radius: 999px; padding: 7px 16px; font-size: 12.5px; font-weight: 750;
  box-shadow: 0 3px 10px rgba(20,30,15,.35); z-index: 2; }
#walk-hud .wk-round { background: rgba(95,148,50,.12) !important; border-radius: 12px !important; border-bottom: 0 !important;
  margin-bottom: 6px; font-weight: 750 !important; color: #2F5220 !important; }
#walk-hud .wk-round svg { width: 17px; height: 17px; stroke: #3E6B21; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#walk-hud .wk-jobline { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
#walk-hud .wk-jobline i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
#walk-hud .wk-yield { display: inline-block; font-size: 11.5px; font-weight: 750; color: #B4501F; background: rgba(208,106,50,.12);
  border-radius: 999px; padding: 3px 10px; margin: 2px 0 6px; }
#walk-hud .wk-checked { margin: 0 0 8px; padding: 9px 14px; font-size: 13px; width: 100%; }
.wk-shot { position: fixed; inset: 0; z-index: 400; background: rgba(20,26,18,.92); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: 22px; }
.wk-shot img { max-width: 92vw; max-height: 70vh; border-radius: 14px; border: 4px solid #FFFDF6; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.wk-shot p { color: rgba(242,237,221,.85); font-size: 13px; margin: 0; }
.wk-shot > div { display: flex; gap: 10px; }
.wk-shot .ghost-btn { margin: 0; background: rgba(251,248,239,.92); }

/* ================= the Garden tab, folded: browsing is the default, working is a mode ================= */
.map-find-row { display: flex; gap: 8px; align-items: center; }
.map-find-row .search { flex: 1; min-width: 0; }
.fold-btn { margin: 0; flex: none; padding: 9px 15px; position: relative; }
#flt-btn.flt-live::after { content: ""; position: absolute; top: 6px; inset-inline-end: 7px; width: 7px; height: 7px;
  border-radius: 50%; background: #C2643C; }
#view-map .map-filter { display: none; }
#view-map.filtering .map-filter { display: flex; margin-top: 10px; }
#view-map .map-act { display: none; }
#view-map.editing .map-act { display: flex; margin-top: 10px; }
@media (max-width: 640px) { .plot-head .compass { display: none; } }

/* ---------- plant profile, second reading: visual first, archive folded ---------- */
.pf-glance { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0 4px; }
@media (min-width: 900px) { #detail .pf-glance { grid-template-columns: repeat(2, 1fr); } }
.pf-tile { position: relative; border: 1px solid var(--bd-soft, rgba(44,58,48,.14)); border-radius: 16px; padding: 12px 12px 10px; background: color-mix(in srgb, var(--kc) 7%, transparent); overflow: hidden; }
.pf-tile svg { width: 20px; height: 20px; color: var(--kc); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pf-tile b { display: block; font-family: var(--display); font-size: 21px; line-height: 1.1; color: var(--ink); margin-top: 6px; letter-spacing: .01em; }
.pf-tile small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.pf-now { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 6px; }
.pf-pill { display: flex; align-items: center; gap: 10px; border-inline-start: 3px solid var(--kc); background: color-mix(in srgb, var(--kc) 8%, transparent); border-radius: 12px; padding: 9px 12px; }
.pf-pill svg { width: 17px; height: 17px; flex: none; color: var(--kc); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pf-pill span { font-size: 13.5px; font-weight: 600; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-quiet { font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
.strip { margin: 6px 0 4px; }
.strip-row { display: grid; grid-template-columns: 96px repeat(12, 1fr); gap: 2px; align-items: center; margin-bottom: 4px; }
.strip-row.head { margin-bottom: 6px; }
.strip-row.head span { }
.strip-row.head i { text-align: center; font-size: 10.5px; font-weight: 750; color: var(--muted); font-style: normal; cursor: pointer; padding: 3px 0; border-radius: 7px; }
.strip-row.head i:hover { background: rgba(44,58,48,.08); color: var(--ink); }
.strip-row.head i.now { color: var(--acc); }
.strip-row.head i.sel { background: rgba(163,230,53,.22); color: var(--ink); }
.strip-lbl { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; padding-inline-end: 4px; }
.strip-lbl svg { width: 13px; height: 13px; flex: none; color: var(--kc); fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.strip-row:not(.head) i { height: 13px; border-radius: 3px; background: rgba(44,58,48,.07); font-style: normal; }
.strip-row:not(.head) i.on { background: var(--kc); }
.strip-row:not(.head) i.on.a { border-start-start-radius: 8px; border-end-start-radius: 8px; }
.strip-row:not(.head) i.on.z { border-start-end-radius: 8px; border-end-end-radius: 8px; }
.strip-row:not(.head) i.nowc:not(.on) { background: rgba(163,230,53,.16); }
.pf-fold { margin: 14px 0 10px; border: 1px solid var(--bd-soft, rgba(44,58,48,.14)); border-radius: 16px; background: rgba(44,58,48,.025); }
.pf-fold > summary { list-style: none; cursor: pointer; padding: 12px 14px; font-size: 13px; font-weight: 750; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.pf-fold > summary::-webkit-details-marker { display: none; }
.pf-fold > summary::after { content: ''; inline-size: 8px; block-size: 8px; border-inline-end: 2px solid var(--muted); border-block-end: 2px solid var(--muted); transform: rotate(45deg); margin-inline-start: auto; transition: transform .18s; }
.pf-fold[open] > summary::after { transform: rotate(-135deg); }
.pf-fold[open] > summary { border-bottom: 1px dashed var(--line); }
.pf-fold > *:not(summary) { margin-inline: 14px; }
.pf-fold > *:last-child { margin-bottom: 12px; }
.pf-n { font-style: normal; background: var(--acc); color: #fff; border-radius: 9px; font-size: 10.5px; padding: 1px 7px; }
/* the almanac poster is a phone poster: on a wide screen it becomes a centred plate,
   never a full-bleed wall */
@media (min-width: 641px) {
  .masthead { max-width: 780px; margin: 8px auto 0; border-radius: 20px; overflow: hidden; }
}
.prog-wheel { min-width: 0; }

/* ---------- the dashboard is one page ----------
   Desktop: today's work and the harvest timeline fill the left column edge to edge;
   the numbers and a tall 3D window hold the right. Both columns are viewport-bound,
   so nothing sits below the fold and nothing leaves dead paper behind.
   Phone and tablet: the wrappers dissolve (display: contents) and the pieces stack
   in the proven order - poster, ask, tasks, tiles, 3D, timeline. */
.dash { display: flex; flex-direction: column; }
.dash-main, .dash-side { display: contents; }
.dash .masthead { order: 1; }
.dash .day-col { order: 2; }
.dash .alert-row { order: 3; }
.dash .kpi-row { order: 4; }
.dash .snap3d { order: 5; margin-top: 14px; }
.dash .tl-card { order: 6; margin-top: 14px; }
@media (min-width: 1100px) {
  .dash { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
  .dash-main, .dash-side { display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 168px); overflow: hidden; }
  .dash-main .masthead { margin: 0 0 2px; max-width: 720px; border-radius: 20px; overflow: hidden; flex: none; }
  /* the sky crops before the page scrolls: the poster yields height, never the fold */
  .dash-main .hz-svg { width: 100%; height: auto; max-height: clamp(180px, 26vh, 300px); }
  .dash-main .day-col { border-bottom: 0; margin-bottom: 0; padding-bottom: 6px; flex: none; }
  .dash-main .tl-card { order: 7; flex: 1; display: flex; flex-direction: column; min-height: 0; margin-top: 4px; }
  .dash-main .tl-card .tl { flex: 1; min-height: 0; overflow-y: auto; padding-inline-end: 6px; }
  .dash-side .kpi-row { order: 0; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; flex: none; }
  .dash-side .snap3d { order: 0; flex: 1; min-height: 150px; display: flex; flex-direction: column; margin: 0; }
  .dash-side .snap3d img, .dash-side .snap3d .snap-svg { flex: 1; min-height: 0; height: auto; aspect-ratio: auto; object-fit: cover; }
  main { padding-top: 12px; padding-bottom: 14px; }
  #view-today .weather-strip { margin-bottom: 8px; }
}
/* short laptop screens: the poster tightens so the fold holds */
@media (min-width: 1100px) and (max-height: 880px) {
  .dash-main .hz-svg { max-height: 22vh; }
  .day-col .hero-wx { margin-bottom: 6px; font-size: 15.5px; }
  .mh-txt h2 { font-size: 30px; }
  .day-col { padding-top: 8px; }
}
/* narrow desktop: the side tiles compact */
@media (min-width: 1100px) and (max-width: 1520px) {
  .dash-side .kpi { padding: 12px 13px 10px; }
  .dash-side .kpi .kv { font-size: 26px; letter-spacing: -.5px; }
  .dash-side .kpi .kv small { font-size: 11.5px; }
  .dash-side .kpi .kl { font-size: 12px; }
  .dash-side .kpi .ks { font-size: 11px; }
}

/* the Ask bar is the product's signature: it leads the day column, framed, never buried */
.day-col .ask-row { background: linear-gradient(135deg, rgba(95,148,50,.12), rgba(95,148,50,.03)); border: 1.5px solid rgba(95,148,50,.5); border-radius: 16px; padding: 9px; box-shadow: 0 4px 16px rgba(44,58,48,.07); margin: 2px 0 12px; }
.day-col .ask-row input { background: var(--card-solid, #FFFDF6); }

/* ---------- the larder: stock you can see, a shelf you can read ---------- */
.lr-vessels { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 8px; }
.lr-v { border: 1px solid var(--bd-soft, rgba(44,58,48,.14)); border-radius: 16px; padding: 12px 13px; background: rgba(255,253,246,.5); }
.lr-v-h { display: flex; align-items: center; gap: 8px; }
.lr-v-h b { font-size: 14px; }
.lr-v-h .xdel { margin-inline-start: auto; }
.lr-bar { height: 8px; border-radius: 5px; background: rgba(44,58,48,.09); margin: 9px 0 7px; overflow: hidden; }
.lr-bar i { display: block; height: 100%; background: linear-gradient(90deg, #C9891F, #A87E1B); border-radius: 5px; }
.lr-v-n { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.lr-v-n b { color: var(--ink); font-size: 14px; }
.lr-step { margin-top: 9px; }
.lr-add { background: none; border-style: dashed; }
.lr-shelf { margin-top: 8px; border-top: 1px solid var(--line); }
.lr-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.lr-row.due { background: linear-gradient(90deg, rgba(216,138,43,.10), transparent 70%); }
.lr-jar { flex: none; width: 38px; }
.lr-jar .jar { width: 38px; height: auto; display: block; }
.lr-main { flex: 1; min-width: 0; }
.lr-main b { display: block; font-size: 14.5px; }
.lr-main .src { display: block; font-size: 11.5px; }
.lr-due { display: inline-block; font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.lr-due.on { color: var(--gold, #A87E1B); }
.lr-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.lr-acts .ghost-btn.slim { margin: 0; }
@media (max-width: 640px) {
  .lr-row { flex-wrap: wrap; }
  .lr-acts { margin-inline-start: auto; }
}

/* the after-picking line: the knowledge base speaking at the moment it matters */
.rcp-prep { font-size: 11.5px; color: var(--muted); margin: 3px 0 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rcp-prep b { color: #8A6B1F; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-inline-end: 4px; }

/* ---------- the sticker pass ----------
   The app icon's language - solid fills, chunky dark outlines, a cream field with a
   double border - carried into the chrome. The mark is filled everywhere; the FAB sits
   on the icon's own cream; nav and care glyphs go duotone; cards wear the inner frame. */
.cam-fab { background: #F4EFE1; border: 3px solid #26351F;
  box-shadow: 0 6px 18px rgba(38,53,31,.35), 0 2px 6px rgba(58,50,32,.3); }
.cam-fab svg { width: 27px; height: 27px; }
#nav-cam.active .cam-fab { box-shadow: 0 0 0 3px rgba(103,160,58,.4), 0 6px 18px rgba(38,53,31,.35); }
nav .tab svg { fill: currentColor; fill-opacity: .14; stroke-width: 2.1; }
nav .tab.active svg { fill-opacity: .26; }
.card, .kpi { position: relative; }
.card::after, .kpi::after { content: ''; position: absolute; inset: 5px;
  border: 1px solid rgba(38,53,31,.09); border-radius: calc(var(--r) - 6px); pointer-events: none; }
.hubp.on { border-width: 1.5px; border-color: #26351F; }

/* ---------- the almanac as a band: one line of sky, not a poster ---------- */
.alm-band { position: relative; display: flex; align-items: center; gap: 18px; background: var(--card); border: 1px solid var(--glass-border); border-radius: var(--r); box-shadow: var(--shadow); padding: 10px 18px 10px 10px; margin: 6px 0 12px; overflow: hidden; }
.alm-band::after { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(38,53,31,.09); border-radius: calc(var(--r) - 6px); pointer-events: none; }
.ab-scene { flex: none; width: 170px; height: 76px; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, rgba(228,179,60,.16), rgba(228,179,60,.02)); }
.alm-band.night .ab-scene { background: #2E3A52; }
.ab-scene .hz-svg { width: 100%; height: 100%; max-height: none; }
.ab-scene .hz-axis { display: none; }
.ab-main { min-width: 0; flex: 1; }
.ab-main .season { font-size: 10.5px; letter-spacing: .12em; font-weight: 800; color: #C05F38; text-transform: uppercase; }
.ab-main h2 { font-family: var(--display); font-size: clamp(19px, 2.6vw, 24px); margin: 1px 0 2px; line-height: 1.1; color: var(--ink); }
.ab-main .date { font-size: 12.5px; color: var(--muted); font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-sun { display: flex; gap: 16px; flex: none; }
.ab-sun span { display: flex; flex-direction: column; align-items: center; }
.ab-sun small { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; color: var(--muted); text-transform: uppercase; }
.ab-sun b { font-family: var(--display); font-size: 17px; color: var(--ink); }
.ab-temp { flex: none; text-align: end; }
.ab-temp b { font-family: var(--display); font-size: 30px; color: var(--ink); line-height: 1; }
.ab-temp span { display: block; font-size: 12px; color: var(--muted); font-weight: 650; }
@media (max-width: 760px) {
  .alm-band { flex-wrap: wrap; padding: 10px 12px; gap: 8px 14px; }
  .ab-scene { width: 112px; height: 58px; }
  .ab-sun { order: 4; width: 100%; justify-content: space-between; padding-top: 7px; border-top: 1px dashed var(--line); }
}
/* the working grid is the page now */
.dash2 .today-card .alm { margin: 0; }
@media (max-width: 640px) {
  .dash2 { display: flex; flex-direction: column; gap: 12px; }
  .dash2 .today-card { order: 1; } .dash2 .kpi-row { order: 2; } .dash2 .snap3d { order: 3; } .dash2 .tl-card { order: 4; }
}
@media (min-width: 641px) and (max-width: 1099px) {
  .dash2 .today-card { grid-column: span 6; } .dash2 .snap3d { grid-column: span 6; } .dash2 .tl-card { grid-column: span 12; }
}
@media (min-width: 1100px) {
  .dash2 .kpi-row { grid-template-columns: repeat(6, 1fr); gap: 10px; }
  .dash2 .kpi { padding: 12px 13px 10px; }
  .dash2 .kpi .kv { font-size: 26px; letter-spacing: -.5px; }
  .dash2 .kpi .kv small { font-size: 11.5px; }
  .dash2 .kpi .kl { font-size: 12px; }
  .dash2 .kpi .ks { font-size: 11px; }
  .dash2 .today-card, .dash2 .snap3d { max-height: 46vh; overflow: hidden; }
  .dash2 .tl-card { max-height: 46vh; display: flex; flex-direction: column; min-height: 0; }
  .dash2 .tl-card .tl { flex: 1; min-height: 0; overflow-y: auto; padding-inline-end: 6px; }
  .dash2 .snap3d img, .dash2 .snap3d .snap-svg { height: calc(100% - 44px); min-height: 200px; aspect-ratio: auto; object-fit: cover; }
}

/* short screens: the band and tiles tighten so the working row keeps the fold */
@media (min-width: 1100px) and (max-height: 880px) {
  .alm-band { padding: 7px 16px 7px 8px; margin: 2px 0 10px; }
  .ab-scene { height: 62px; width: 148px; }
  .ab-main h2 { font-size: 19px; }
  .dash2 .kpi { padding: 10px 12px 8px; }
  .dash2 .kpi .kv { font-size: 23px; }
  .dash2 .kpi .ks { display: none; }
  .dash2 .today-card, .dash2 .snap3d, .dash2 .tl-card { max-height: 42vh; }
  .day-col .ask-row, .alm-band + .ask-row { padding: 6px; margin-bottom: 8px; }
}

/* ============================================================
   FRIENDLY GROVE - the approved Claude Design system (Aug 2026).
   An override layer: tokens first, then the chrome. The sticker
   tree stays the anchor; everything else warms and rounds.
   ============================================================ */
@font-face { font-family: 'Pomario Display'; src: url('fonts/fraunces-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #F6F2E6; --bg2: #EFEAD9;
  --card: #FFFDF6; --card-solid: #FFFDF6;
  --hero: #3E5B2C; --lime: #A3E635;
  --r: 24px; --r-sm: 14px;
  --shadow: 0 6px 20px rgba(58,50,32,.10);
  --glass-border: rgba(44,58,48,0.10);
  --display: 'Pomario Display', 'Iowan Old Style', 'Palatino Nova', Palatino, 'Book Antiqua', Georgia, serif;
}
/* card voice: Fraunces sentence-case titles, quiet counts */
.card h3 { font-family: var(--display); font-size: 17.5px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--ink); margin-bottom: 12px; }
.card h3 .n { font-family: system-ui, sans-serif; font-weight: 800; font-size: 11.5px; background: #DDEEC6; color: #3E5B2C; border-radius: 999px; padding: 3px 10px; }
.card::after, .kpi::after { border-radius: 18px; }
/* everything touchable is a pill */
.ghost-btn, button.btn-acc, .hubp, .seg button, .tl-more { border-radius: 999px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select { border-radius: 999px; padding-inline: 16px; }
textarea { border-radius: 18px; }
button.btn-acc { background: var(--hero); box-shadow: none; font-weight: 800; }
button.btn-acc:hover { background: #33501F; }
.seg { background: #EAE4D2; border-radius: 999px; padding: 3px; border: 0; }
.seg button.on { background: var(--card); box-shadow: 0 2px 8px rgba(58,50,32,.14); border-radius: 999px; }
.hubp { border: 1.5px solid rgba(44,58,48,.14); font-weight: 800; }
.hubp.on { background: var(--hero); border-color: var(--hero); color: #FFFDF6; }
.hubp.on svg { color: var(--lime); }
.cap, .badge { border-radius: 999px; font-weight: 800; }
.badge.ok { background: #DDEEC6; color: #3E5B2C; border-color: transparent; }
.badge.attention { background: #F7E4DF; color: #C8402F; border-color: transparent; }
/* the phone bar: a floating dark pill, lime centre tree */
@media (max-width: 640px) {
  nav { left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); border-radius: 999px;
    background: #26332B; border: 0; padding: 6px 12px; box-shadow: 0 12px 32px rgba(38,51,43,.38); backdrop-filter: none; -webkit-backdrop-filter: none; }
  nav .tab { color: #9AA894; font-weight: 700; }
  nav .tab.active { color: var(--lime); }
  nav .tab svg { fill-opacity: .2; }
  .cam-fab { width: 50px; height: 50px; margin-top: -14px; background: var(--lime); border: 0; box-shadow: 0 6px 16px rgba(38,51,43,.35); }
  main { padding-bottom: calc(var(--navh, 74px) + 26px); }
}
/* the desktop rail: active row is a dark pill; the Walk promo lives at the foot */
@media (min-width: 641px) {
  nav .tab { border-radius: 999px; font-weight: 700; }
  nav .tab.active { background: var(--hero); color: #FFFDF6; box-shadow: none; }
  nav .tab.active svg { color: var(--lime); fill-opacity: .3; }
  .walk-promo { display: block; margin-top: 14px; background: #DCE5C4; border-radius: 18px; padding: 13px 14px; cursor: pointer; border: 0; text-align: start; }
  .walk-promo b { display: block; font-family: var(--display); font-size: 14.5px; color: var(--ink); margin-bottom: 2px; }
  .walk-promo span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
}
/* month strip, canvas grammar: separate rounded cells, today outlined in ink */
.strip-row:not(.head) i { height: 15px; border-radius: 5px; background: #ECE7D6; }
.strip-row:not(.head) i.on.a, .strip-row:not(.head) i.on.z { border-radius: 5px; }
.strip-row { gap: 3px; }
.strip-row:not(.head) i.nowc { outline: 2px solid #26332B; outline-offset: -1px; }
.strip-row:not(.head) i.nowc:not(.on) { background: #ECE7D6; }
.strip-row.head i.now { color: var(--ink); }
/* glance tiles, canvas tints */
.pf-tile { border: 0; border-radius: 18px; }
.pf-tile small { letter-spacing: .09em; }
.pf-tile[style*="#3E7CA8"], .pf-tile[style*="#178F82"] { background: #E1F0EE; }
.pf-tile[style*="#D9A62E"] { background: #FBF0D9; }
.pf-tile[style*="#8A7B63"], .pf-tile[style*="#7C5FD8"] { background: #EFE8FB; }
.pf-tile[style*="#C05F38"], .pf-tile[style*="#D97C4A"] { background: #F2E3D5; }
.pf-tile[style*="#5F8A2B"] { background: #DDEEC6; }

/* ---- the greeting hero (boards 1c / 5a): dark green, lime eyebrow, Fraunces sky ---- */
.gv-hero { position: relative; background: var(--hero); border-radius: 26px; padding: 20px 20px 16px; margin: 6px 0 14px; overflow: hidden; box-shadow: var(--shadow); }
.gv-tree { position: absolute; inset-inline-end: -26px; bottom: -30px; width: 190px; height: 190px; opacity: .5; pointer-events: none; }
.gv-eyebrow { position: relative; color: var(--lime); font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 8px; }
.gv-head { position: relative; font-family: var(--display); font-weight: 600; color: #FFFDF6; font-size: clamp(23px, 4.6vw, 30px); line-height: 1.18; margin: 0 0 13px; max-width: 15em; }
.gv-chips { position: relative; display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.gv-chips span { background: rgba(255,253,246,.16); color: #FFFDF6; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; }
.gv-chips span.rain { background: rgba(163,230,53,.22); color: #DDF3B2; }
.gv-hero .ask-row { position: relative; background: none; border: 0; box-shadow: none; padding: 0; margin: 0; display: flex; gap: 8px; }
.gv-hero .ask-row input { background: #FFFDF6; border: 0; flex: 1; }
.gv-hero .ask-btn { background: var(--lime); color: #26332B; border: 0; font-weight: 800; border-radius: 999px; padding-inline: 18px; }
.gv-hero .ask-btn svg { display: none; }
.gv-hero #ask-ans { position: relative; }
/* jobs card rings + the all-jobs line (5a) */
.gv-jobs .alm-item { border-radius: 16px; }
.gv-all { width: 100%; margin-top: 10px; font-weight: 800; color: var(--hero); border: 0; background: none; text-align: start; padding: 4px 2px; }
.gv-all:hover { background: none; text-decoration: underline; }
/* kitchen hero (2b): the same dark card grammar */
.pantry.gv-dark { background: var(--hero); border-radius: 26px; padding: 18px; margin-bottom: 12px; }
.pantry.gv-dark .pantry-line { font-family: var(--display); font-weight: 600; color: #FFFDF6; font-size: clamp(21px, 4.2vw, 26px); line-height: 1.2; margin: 0 0 12px; }
.pantry.gv-dark .shelf-jar span { color: rgba(255,253,246,.85); }

.walk-promo { display: none; }
@media (min-width: 641px) { nav .walk-promo { display: block; } }

/* ---- Jobs (board 2d): white row cards, ring checks, plain-word chips ---- */
.task { background: var(--card); border: 1px solid rgba(44,58,48,.08); border-radius: 22px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow); align-items: flex-start; }
.task input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 27px; height: 27px; border-radius: 50%; border: 2.5px solid #C9BFA5; background: none; margin: 1px 2px 0 0; flex: none; cursor: pointer; position: relative; transition: var(--tr); }
.tk-sec-week .task input[type=checkbox] { border-color: #C8402F; }
.task input[type=checkbox]:checked { border-color: #67A03A; background: #67A03A; }
.task input[type=checkbox]:checked::after { content: ''; position: absolute; inset: 6px 7px 9px 7px; border-inline-start: 0; border-block-start: 0; border-inline-end: 2.6px solid #FFF; border-block-end: 2.6px solid #FFF; transform: rotate(42deg); }
.task input[type=checkbox]:active { transform: scale(.94); }
.task.done { opacity: .62; }
.task.done > span { text-decoration: line-through; text-decoration-color: rgba(38,51,43,.5); }
.task.urgent { border-color: rgba(44,58,48,.08); background: var(--card); }
.tk-meta .tk-tag, .tk-meta .tk-plant { border-radius: 999px; font-weight: 800; font-size: 11.5px; padding: 4px 10px; }
.tk-meta .tk-plant { background: #EAE4D2; border: 0; color: var(--ink); }
.tk-before { background: #FBF0D9; color: #A87E1B; border-radius: 999px; font-weight: 800; font-size: 11.5px; padding: 4px 10px; }
.ac-label.now { color: #C8402F; }
.tk-count { background: #F7E4DF; color: #C8402F; border-radius: 999px; font-weight: 800; font-size: 11px; padding: 2px 8px; }
.tk-sec-wait .tk-count { background: #EAE4D2; color: var(--muted); }

/* ---- Journal hero + chart + trees (board 3a) ---- */
.jh-hero { margin-bottom: 2px; }
.jh-row { position: relative; display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
.jh-row select { background: #FFFDF6; border: 0; font-weight: 800; color: var(--ink); max-width: 46%; }
.jh-row input { flex: 1; background: none; border: 1.6px dashed rgba(255,253,246,.55); color: #FFFDF6; }
.jh-row input::placeholder { color: rgba(255,253,246,.75); }
.jh-log { background: var(--lime); color: #26332B; border: 0; border-radius: 999px; font-weight: 800; padding: 11px 22px; }
.jh-hint { font-size: 12.5px; color: rgba(255,253,246,.8); }
.jh-tree { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.jh-tree:last-child { border-bottom: 0; }
.jh-tree b { font-size: 14px; min-width: 84px; }
.jh-bar { flex: 1; height: 8px; border-radius: 999px; background: #ECE7D6; overflow: hidden; }
.jh-bar i { display: block; height: 100%; border-radius: 999px; background: #8FBF5A; }
.jh-kg { font-weight: 800; font-size: 12.5px; color: #8A4B22; }
/* ---- Plant doctor, photo-first (board 3b) ---- */
.doc-photo-tile { display: flex; align-items: center; gap: 14px; width: 100%; border: 1.8px dashed #C9BFA5; border-radius: 20px; padding: 16px; background: var(--card); cursor: pointer; margin-bottom: 10px; }
.doc-photo-tile svg { width: 34px; height: 34px; color: var(--muted); flex: none; }
.doc-photo-tile b { display: block; font-size: 15px; color: var(--ink); }
.doc-photo-tile small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.doc-run-row { display: flex; gap: 8px; margin-bottom: 12px; }
.doc-run-row select { flex: 1; }
.doc-or { font-weight: 800; font-size: 14px; color: var(--ink); margin: 12px 0 8px; }
.sym-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sym-tabs button { flex-direction: column; gap: 6px; background: var(--card); border: 1.5px solid rgba(44,58,48,.1); border-radius: 18px; padding: 12px 6px; font-weight: 800; font-size: 11.5px; }
.sym-tabs button.on { background: #DDEEC6; border-color: #67A03A; color: #3E5B2C; }
.sym-tabs button svg { width: 22px; height: 22px; }
.symc { border-radius: 999px; background: var(--card); border: 1px solid rgba(44,58,48,.1); font-weight: 700; }
.symc.on { background: #DDEEC6; border-color: #67A03A; }

/* ---- Planner (board 3c): the year ahead ---- */
.pl-head h2 { font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--ink); margin: 2px 0 2px; }
.pl-head .src { margin-bottom: 4px; }
.frost-card .frost-n { font-family: var(--display); font-size: 46px; font-weight: 700; line-height: 1; }
.frost-card .frost-n span { font-family: system-ui, sans-serif; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.card.moon-card, #planner .moon-card { background: #2B3440; border: 0; }
.card.moon-card h3, .card.moon-card .moon-name, .card.moon-card b { color: #EFEAD8; }
.moon-card .moon-name { font-family: var(--display); font-size: 20px; }
.card.moon-card .moon-next, .card.moon-card .moon-advice, .card.moon-card .wmsg, .card.moon-card .src { color: #AEBBCE; }
.moon-card::after { border-color: rgba(239,234,216,.12); }
#care-prog .prog-side .hrow, #care-prog .prog-row { border-radius: 16px; }
/* ---- Library (board 3d): the start-now band and species cards ---- */
.lib-rail { background: var(--hero); border-radius: 22px; padding: 14px; display: flex; gap: 10px; overflow-x: auto; }
.lib-rail-card { background: rgba(255,253,246,.13); border: 0; border-radius: 16px; color: #FFFDF6; font-weight: 800; padding: 12px 10px; min-width: 84px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.lib-rail-card b { color: #FFFDF6; font-size: 12px; }
.lib-card { border-radius: 22px; background: var(--card); box-shadow: var(--shadow); border: 1px solid rgba(44,58,48,.07); }
.lib-card b { font-family: var(--display); font-size: 16.5px; }
.lib-card .badge.ok { background: #DDEEC6; color: #3E5B2C; }
/* ---- sheets (boards 4e/5c/5d): warm ground, 32px crown, wide grab ---- */
.ms-panel { background: #F6F2E6; border-radius: 32px 32px 0 0; }
.ms-grab { width: 44px; height: 5px; border-radius: 999px; background: #C8C0A8; }
.ms-item { border-radius: 18px; background: var(--card); font-weight: 800; }
.ms-scrim { background: rgba(58,50,32,.45); }

/* ---- Jobs rows (6g): short title, quiet why, agronomy unfolds on click ---- */
.jbrow { cursor: default; }
.jbrow .jb-main { cursor: pointer; min-width: 0; }
.jbrow b { display: block; font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.jb-why { display: block; font-size: 12.5px; color: var(--muted); margin: 2px 0 6px; line-height: 1.4; }
.jb-full { display: none; font-size: 12.5px; color: var(--ink); background: #F6F2E6; border-radius: 12px; padding: 9px 11px; margin: 4px 0 8px; line-height: 1.45; }
.jbrow.open .jb-full { display: block; }
.jb-note { margin-top: 14px; background: #DDEEC6; color: #3E5B2C; border-radius: 16px; padding: 11px 14px; font-size: 12.5px; }
.jb-note b { color: #3E5B2C; }
/* desktop: the two columns of 6g */
@media (min-width: 1100px) {
  #task-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
  #task-list .tk-head, #task-list .detail-empty, #task-list .jb-note { grid-column: 1 / -1; }
}

/* ---- dashboard finish (5a/1c): week card in the hero row, three stats, pick cards ---- */
.wk-card { display: none; }
.wk-days { display: flex; gap: 7px; }
.wkd { flex: 1; background: #F6F2E6; border-radius: 14px; padding: 9px 4px; text-align: center; }
.wkd.now { background: #E1F0EE; }
.wkd small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wkd b { display: block; font-family: var(--display); font-size: 17px; color: var(--ink); }
.wkd span { font-size: 11.5px; color: var(--muted); font-weight: 650; }
.wkd i { display: block; font-style: normal; font-size: 10.5px; font-weight: 800; color: #178F82; }
.gv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 12px; }
.gvs { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 13px 14px 11px; }
.gvs b { display: block; font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1.05; }
.gvs span { font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.gv-pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 9px; margin-bottom: 8px; }
.gvp { background: #FBF3EC; border: 1px solid rgba(217,124,74,.25); border-radius: 18px; padding: 12px 10px; text-align: center; cursor: pointer; }
.gvp-ico { display: inline-flex; width: 44px; height: 44px; border-radius: 50%; background: #FFFDF6; align-items: center; justify-content: center; box-shadow: inset 0 0 0 2.4px rgba(217,124,74,.55); margin-bottom: 6px; }
.gvp b { display: block; font-family: var(--display); font-size: 14.5px; color: var(--ink); }
.gvp small { display: block; font-size: 11.5px; color: #8A4B22; font-weight: 700; margin: 2px 0 6px; }
.gvp-chip { display: inline-block; background: #FBF0D9; color: #A87E1B; border-radius: 999px; font-size: 10.5px; font-weight: 800; padding: 3px 9px; }
.gvp-chip.soon { background: #F2E3D5; color: #8A4B22; }
.tl-sum { font-size: 12.5px; color: var(--muted); }
@media (min-width: 1100px) {
  .gv-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; align-items: stretch; margin-bottom: 12px; }
  .gv-top .gv-hero { margin: 0; }
  .wk-card { display: block; }
  #view-today .weather-strip { display: none; }
  .gv-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; }
}

/* desktop re-budget after the hero-row + stats landed */
@media (min-width: 1100px) {
  .gv-hero { padding: 16px 18px 14px; }
  .gv-head { font-size: clamp(21px, 2.1vw, 26px); margin-bottom: 10px; }
  .gv-chips { margin-bottom: 10px; }
  .gvs { padding: 10px 14px 9px; } .gvs b { font-size: 26px; }
  .gv-stats { margin-bottom: 10px; }
  .dash2 .today-card, .dash2 .snap3d, .dash2 .tl-card { max-height: 40vh; }
  .wk-card h3 { margin-bottom: 8px; }
  .wkd { padding: 7px 3px; } .wkd b { font-size: 15px; }
}
@media (min-width: 1100px) and (max-height: 880px) {
  .gv-hero .gv-tree { display: none; }
  .gvs b { font-size: 22px; }
  .dash2 .today-card, .dash2 .snap3d, .dash2 .tl-card { max-height: 36vh; }
  .gv-pickgrid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 7px; }
  .gvp { padding: 8px 8px; } .gvp-ico { width: 34px; height: 34px; }
}

/* grid tracks must never be stolen by a neighbour's min-content */
.grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
@media (min-width: 1100px) {
  .dash2 .tl-card { overflow: hidden; }
  .dash2 .tl-card .gv-pickgrid { overflow-y: auto; flex: 1; min-height: 0; }
}

.col-2 { grid-column: span 2; } .col-5 { grid-column: span 5; } .col-7 { grid-column: span 7; } .col-9 { grid-column: span 9; }

/* ---- 4b: the cellar shelf drawn ---- */
.lr-cellar { background: var(--card); margin: -4px 0 14px; }
.lr-cellar-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.lr-cellar-h b { font-family: var(--display); font-size: 17.5px; }
.lr-shelfrow { display: flex; align-items: flex-end; gap: 9px; min-height: 66px; padding: 0 6px; }
.lr-sj { width: 26px; border: 2.2px solid #26351F; border-radius: 7px 7px 9px 9px; background: none; position: relative; }
.lr-sj::before { content: ''; position: absolute; top: -7px; left: 5px; right: 5px; height: 6px; background: #A87E1B; border-radius: 3px 3px 0 0; }
.lr-sj.full { background: #8FBF5A; }
.lr-note { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--muted); align-self: center; margin-inline-start: 8px; }
.lr-plank { height: 7px; background: #B08256; border-radius: 4px; margin-top: 2px; }
.lr-v { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 13px 14px; margin-bottom: 10px; }
.lr-vjar { width: 30px; height: 38px; border: 2.2px solid #26351F; border-radius: 7px 7px 9px 9px; position: relative; flex: none; }
.lr-vjar::before { content: ''; position: absolute; top: -7px; left: 5px; right: 5px; height: 6px; background: #A87E1B; border-radius: 3px 3px 0 0; }
.lr-vjar.full { background: #8FBF5A; }
.lr-v-main { flex: 1; min-width: 0; }
.lr-v-main b { font-size: 15px; }
.lr-step2 { display: flex; align-items: center; gap: 9px; }
.lr-step2 button { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid rgba(44,58,48,.18); background: var(--card); font-size: 18px; font-weight: 800; }
.lr-step2 button.plus { background: var(--hero); color: #FFFDF6; border: 0; }
.lr-step2 button:active { transform: scale(.94); }
.lr-step2 > b { font-family: var(--display); font-size: 20px; min-width: 26px; text-align: center; }
.lr-add { border: 1.8px dashed #C9BFA5; box-shadow: none; background: none; flex-wrap: wrap; }
.lr-add-lbl { font-weight: 800; font-size: 13px; color: var(--muted); width: 100%; }
/* ---- 4d: batch empty state ---- */
.bb-empty { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 20px; padding: 16px; }
.bb-jar { width: 34px; height: 44px; border: 2.2px dashed #C9BFA5; border-radius: 8px 8px 10px 10px; flex: none; position: relative; }
.bb-jar::before { content: ''; position: absolute; top: -8px; left: 6px; right: 6px; height: 6px; border: 2.2px dashed #C9BFA5; border-bottom: 0; border-radius: 3px 3px 0 0; }
.bb-empty b { font-family: var(--display); font-size: 16px; }
/* ---- 2c: three tiles ---- */
.pf-3 { grid-template-columns: repeat(3, 1fr); }
.pf-3 .pf-tile small { font-size: 10.5px; }
/* ---- 2a: ready halo + key pills ---- */
.canopy.ready > circle:first-of-type, .canopy.ready circle.cnp { filter: drop-shadow(0 0 4px rgba(163,230,53,.9)); }
.canopy.ready { --halo: 1; }
#map-legend span, .map-key span { border-radius: 999px; font-weight: 800; }

/* ---- 7a: night ---- */
.gv-hero.night { background: #232E26; }
.gv-moon { position: absolute; inset-inline-end: 14px; top: 14px; width: 64px; height: 64px; }
.gv-hero.night .gv-chips span { background: rgba(242,237,221,.12); }
.nt-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; padding: 13px 15px; margin-bottom: 12px; cursor: pointer; border: 0; }
.nt-card svg:first-child { width: 22px; height: 22px; color: #178F82; flex: none; }
.nt-card b { display: block; font-size: 14.5px; }
.nt-card small { font-size: 12px; color: var(--muted); }
.nt-card .alm-go { margin-inline-start: auto; width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2; }
/* ---- 7b: KPI homes ---- */
.hk-card { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.hk-ring { width: 64px; height: 64px; flex: none; }
.hk-pct { font: 800 9px system-ui, sans-serif; fill: var(--ink); }
.hk-main b { font-family: var(--display); font-size: 16.5px; display: block; }
.hk-chips { display: flex; gap: 7px; margin-top: 7px; flex-wrap: wrap; }
.hk-chip { border: 0; border-radius: 999px; font-weight: 800; font-size: 11.5px; padding: 5px 11px; }
.hk-chip.attn { background: #F7E4DF; color: #C8402F; }
.hk-chip.unv { background: #FBF0D9; color: #A87E1B; }
.wd-card .wd-big { display: flex; align-items: center; gap: 10px; }
.wd-card .wd-big svg { width: 26px; height: 26px; color: #178F82; }
.wd-card .wd-big b { font-family: var(--display); font-size: 26px; }
.wd-tip { margin-top: 10px; background: #E1F0EE; color: #14655C; border-radius: 14px; padding: 10px 12px; font-size: 12.5px; font-weight: 600; }
.dr-card .dr-row { display: flex; align-items: center; gap: 11px; width: 100%; text-align: start; background: #FDF6F1; border: 1px solid rgba(217,124,74,.25); border-radius: 16px; padding: 11px 13px; margin-bottom: 8px; cursor: pointer; }
.dr-dot { width: 10px; height: 10px; border-radius: 50%; background: #E8B23C; flex: none; }
.dr-dot.hi { background: #C8402F; }
.dr-row b { display: block; font-size: 13.5px; }
.dr-row small { font-size: 11.5px; color: var(--muted); }
.dr-row em { margin-inline-start: auto; font-style: normal; font-weight: 800; font-size: 12px; color: #C8402F; }
.lib-rail-card small { font-size: 10.5px; color: rgba(255,253,246,.75); font-weight: 700; }

/* ---- 7c: record tiles + fold eyebrows ---- */
.rec-tiles { display: flex; gap: 8px; margin: 4px 0 12px; flex-wrap: wrap; }
.rec-tile { border: 1.5px solid rgba(44,58,48,.14); border-radius: 14px; padding: 8px 13px; text-align: center; background: var(--card); }
.rec-tile small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.rec-tile b { font-size: 13px; color: var(--muted); font-weight: 700; }
.rec-tile.has b { color: var(--ink); }
.pf-fold .card-sec h4 { color: #5F9432; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pf-fold .prose.quote { background: #F1EDE0; border-radius: 14px; padding: 11px 13px; border: 0; }
/* ---- 7d: the batch sheet ---- */
.ms-panel.bw { padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
.bw-h { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.bw-h svg { width: 40px; height: 52px; flex: none; }
.bw-h b, .bw-t { font-family: var(--display); font-size: 18px; }
.bw-h small { display: block; font-size: 11.5px; color: var(--muted); }
.bw-dots { margin-inline-start: auto; display: flex; gap: 5px; }
.bw-dots i { width: 8px; height: 8px; border-radius: 50%; background: #D8D2BE; }
.bw-dots i.on { background: #67A03A; }
.bw-q { font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.bw-row { display: flex; align-items: center; gap: 11px; background: var(--card); border-radius: 18px; padding: 11px 13px; margin-bottom: 8px; }
.bw-main { flex: 1; min-width: 0; }
.bw-main b { font-size: 14px; display: block; }
.bw-main small { font-size: 11px; color: #8A4B22; font-weight: 700; }
.bw-note { background: #F1EDE0; border-radius: 14px; padding: 10px 13px; font-size: 12.5px; color: var(--muted); margin: 10px 0; }
.bw-note.gold { background: #FBF0D9; color: #8A6B1F; }
.bw-date { background: var(--card); border-radius: 999px; padding: 11px 16px; font-weight: 800; margin-bottom: 10px; display: inline-block; }
.ms-panel.bw textarea { width: 100%; border-radius: 16px; margin-bottom: 12px; }
.bw-sum { display: flex; gap: 12px; align-items: center; background: var(--hero); border-radius: 18px; padding: 13px 15px; color: #FFFDF6; }
.bw-sum svg { width: 36px; height: 48px; flex: none; }
.bw-sum b { display: block; font-size: 14px; }
.bw-sum small { font-size: 11.5px; color: rgba(255,253,246,.75); }
.bw-foot { display: flex; gap: 10px; justify-content: space-between; margin-top: 14px; }
.bw-foot .btn-acc { flex: 1; }

/* ---- 7e ---- */
.js-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 12px; }
.js-k { background: var(--card); border: 1.5px solid rgba(44,58,48,.12); border-radius: 18px; padding: 13px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 800; font-size: 12px; }
.js-k svg { width: 22px; height: 22px; }
.js-k.on { border-color: #67A03A; background: #DDEEC6; color: #3E5B2C; }
.js-k.bad { color: #C8402F; }
.js-k.bad.on { background: #F7E4DF; border-color: #C8402F; }
.st-door { width: 100%; border: 1.8px dashed #C9BFA5; background: none; font-weight: 800; color: var(--muted); margin: 0 0 12px; padding: 12px; }
/* ---- 7f: RTL mirroring rules - what must NOT flip ---- */
[dir="rtl"] .strip-row, [dir="rtl"] .wk-days, [dir="rtl"] .lib-tl-row, [dir="rtl"] .hchart { direction: ltr; }
[dir="rtl"] .gv-tree, [dir="rtl"] .gv-moon, [dir="rtl"] .cam-fab svg { transform: none; }
[dir="rtl"] .alm-go { transform: scaleX(-1); }
[dir="rtl"] .gv-chips span, [dir="rtl"] .wkd b, [dir="rtl"] .ab-sun b { unicode-bidi: plaintext; }

/* ---- 7h day one ---- */
.gv-sub { position: relative; color: rgba(255,253,246,.85); font-size: 13px; margin: -4px 0 12px; }
#e0-studio { position: relative; }
.e0-card { background: var(--card); border-radius: 20px; padding: 20px 16px; text-align: center; box-shadow: var(--shadow); }
.e0-card .bb-jar, .e0-card .e0-pen { display: inline-block; margin-bottom: 8px; }
.e0-card .e0-pen { width: 30px; height: 30px; }
.e0-card b { display: block; font-family: var(--display); font-size: 16.5px; margin-bottom: 4px; }
.e0-card .btn-acc { margin-top: 10px; }
/* ---- 7i offline: calm banner + dark toast ---- */
.offline-badge { display: flex; gap: 10px; align-items: center; background: #EAE4D2; color: var(--ink); border-radius: 16px; margin: 8px 14px 0; padding: 10px 14px; font-size: 12.5px; }
.offline-badge svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.offline-badge b { display: block; font-size: 13px; }
.offline-badge small { color: var(--muted); }
.toast { background: #26332B; color: #FFFDF6; border-radius: 999px; font-weight: 700; box-shadow: 0 10px 28px rgba(38,51,43,.4); }
/* ---- 7j typed ask ---- */
.ms-panel.va .lang-menu-h { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #5F9432; }
.ms-panel.va .va-row input { border: 1.6px solid #67A03A; background: var(--card); }
.va-six { margin-inline-start: auto; font-size: 10.5px; color: var(--muted); align-self: center; }

/* ---- 7k photo mode ---- */
.wk-shot { background: #26332B; }
.wp-top { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 4px 6px 12px; }
.wp-mode { color: var(--lime); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.wp-frame { background: #FFFDF6; border-radius: 18px; padding: 10px 10px 8px; margin: 0; max-width: 78%; }
.wp-frame img { border-radius: 12px; width: 100%; }
.wp-frame figcaption { display: flex; align-items: center; gap: 6px; padding-top: 7px; font-size: 11px; color: var(--muted); }
.wp-frame figcaption b { font-family: var(--display); color: var(--ink); font-size: 12.5px; }
.wp-frame figcaption span { margin-inline-start: auto; }
.wk-shot p { color: rgba(255,253,246,.75); font-size: 12px; }
.wp-btns { display: flex; gap: 10px; }
.wp-save { background: var(--lime); color: #26332B; border: 0; border-radius: 999px; font-weight: 800; padding: 11px 20px; }
.wp-share { background: rgba(255,253,246,.16); color: #FFFDF6; border: 0; border-radius: 999px; font-weight: 800; padding: 11px 20px; }
.wp-x { width: 44px; height: 44px; border-radius: 50%; background: #FFFDF6; color: var(--ink); border: 0; font-size: 19px; margin-top: 8px; }
/* ---- 7l answered ask ---- */
.gv-hero .ask-card { background: #FFFDF6; border-radius: 18px; border: 0; }
.ask-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.ask-chip { border-radius: 999px; font-size: 11.5px; font-weight: 800; padding: 4px 11px; background: #EAE4D2; color: var(--ink); }
.ask-chip.ok { background: #DDEEC6; color: #3E5B2C; }
.ask-chip.warn { background: #FBF0D9; color: #A87E1B; }
.gv-hero .ac-label.week { color: var(--lime); }
.gv-hero .ask-card.ask-model + .ac-label + .ask-card, .gv-hero #ask-ans .ask-card:not(.ask-model) { background: rgba(255,253,246,.12); color: #FFFDF6; }
.gv-hero #ask-ans .ask-card:not(.ask-model) b { color: #FFFDF6; font-family: var(--display); }

/* ---- 7o approvals card ---- */
.ap-card { margin-bottom: 12px; }
.ap7-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.ap7-row:last-of-type { border-bottom: 0; }
.ap7-av { width: 34px; height: 34px; border-radius: 50%; color: #FFF; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.ap7-main { flex: 1; min-width: 0; }
.ap7-main b { font-size: 13.5px; display: block; }
.ap7-main small { color: var(--muted); font-size: 11.5px; }
/* ---- 7p tutorial chrome ---- */
.tour-card { border-radius: 24px; background: #FFFDF6; }
.tour-body h3 { font-family: var(--display); font-size: 19px; text-transform: none; letter-spacing: 0; }
.tour-acts .btn-acc, .tour-acts button.primary { background: var(--hero); border-radius: 999px; font-weight: 800; }
.tour-skip { border-radius: 999px; background: #FFFDF6; color: #1F2A1C; font-weight: 800; }
[dir="rtl"] .tour-skip { right: auto; left: 12px; }
.tour-dots i { width: 7px; height: 7px; border-radius: 999px; }
.tour-dots i.on { background: #67A03A; width: 18px; }
.tour-spot, .tour-hole { outline: 3px solid var(--lime); }

/* ---- 5c listening ---- */
.va-listenwrap { text-align: center; padding: 8px 0 4px; }
.va-glow { display: inline-flex; width: 96px; height: 96px; border-radius: 50%; background: #E4F3C8; align-items: center; justify-content: center; box-shadow: 0 0 0 14px rgba(163,230,53,.18); margin-bottom: 14px; }
.va-glow svg { width: 44px; height: 44px; }
.va-listening { display: block; font-family: var(--display); font-size: 22px; margin-bottom: 4px; }
.va-wave { display: flex; gap: 4px; justify-content: center; align-items: center; height: 34px; margin: 12px 0 4px; }
.va-wave i { width: 5px; border-radius: 999px; background: #67A03A; animation: vaw 1s ease-in-out infinite; height: 12px; }
.va-wave i:nth-child(2n) { animation-delay: .15s; background: #8FBF5A; }
.va-wave i:nth-child(3n) { animation-delay: .3s; height: 20px; }
.va-wave i:nth-child(4n) { animation-delay: .45s; background: #3E5B2C; }
@keyframes vaw { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1.6); } }
.ms-panel.va:not(.listening) .va-wave { display: none; }
.va-actions { justify-content: center; gap: 10px; margin-top: 10px; }
.va-actions .btn-acc { padding-inline: 26px; }

/* ---- 5f walk HUD grove ---- */
.wk-exit, .wk-cam, .wk-jobs { border-radius: 999px; background: #FFFDF6; color: var(--ink); font-weight: 800; border: 0; }
.wk-jobs b, .wk-jobs .n { background: #C8402F; color: #FFF; border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.wk-pad, .wk-stick { background: rgba(255,253,246,.4); }
.wk-stick i, .wk-nub { background: var(--lime); }
.wk-radar { border: 3px solid #FFFDF6; }
/* walk-to-row action shows where the walk exists */
.gv-walkrow { display: none; }
@media (min-width: 641px) { .gv-walkrow { display: flex; } }

/* 5f quest-nearby banner */
.wk-quest { position: fixed; top: calc(64px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 61;
  display: flex; align-items: center; gap: 10px; background: #FFFDF6; border-radius: 18px; padding: 11px 13px; box-shadow: 0 10px 28px rgba(38,51,43,.35); }
.wk-quest b { display: block; font-size: 13.5px; }
.wk-quest small { font-size: 11.5px; color: var(--muted); }
.wk-quest > div { flex: 1; min-width: 0; }
.wq-go { background: var(--hero); color: #FFFDF6; border: 0; border-radius: 999px; font-weight: 800; padding: 9px 18px; }

/* ---- 2a: the illustrated plot - paper tags, tan ground, key pills ---- */
.st-tag { font-family: ui-monospace, 'SF Mono', Menlo, monospace !important; font-weight: 600 !important;
  fill: #5A5240 !important; paint-order: stroke; stroke: #FBF6E8; stroke-width: 0.5px; stroke-linejoin: round; }
#map-legend { display: flex; flex-wrap: wrap; gap: 7px; }
#map-legend span, #map-legend button { background: var(--card); box-shadow: var(--shadow); padding: 6px 12px; font-weight: 800; font-size: 11.5px; border: 0; }
.canopy.ready circle { stroke: #A3E635; }

/* 5d tree sheet */
.cam-opt { border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.cam-opt small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cam-opt .alm-go { margin-inline-start: auto; width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 2; }
.cs-voice { text-align: center; font-size: 11.5px; color: var(--muted); margin: 10px 0 2px; }
/* 5b welcome scene */
.tour-scene { width: 100%; display: block; background: linear-gradient(180deg, #EAF0DC, #F6F2E6); }

/* 5e 3D chrome */
.tw-live { display: flex; gap: 8px; align-items: center; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 11px 14px; margin: 10px 14px; font-size: 12.5px; color: var(--muted); }
.time-panel, .wx-badge { border-radius: 999px; }
.time-panel button, .wx-badge button { border-radius: 999px; font-weight: 800; }
.time-panel button.on, .wx-badge .on { background: var(--hero); color: #FFFDF6; }
/* 6b cellar mini on desktop */
.kit-shelfmini { display: none; }
@media (min-width: 1100px) {
  #kit-make { position: relative; }
  .kit-shelfmini { display: block; position: absolute; top: 54px; inset-inline-end: 18px; width: 240px;
    background: var(--card); border: 1px solid rgba(44,58,48,.1); border-radius: 18px; padding: 13px 14px; box-shadow: var(--shadow); z-index: 2; }
  .kit-shelfmini > b { font-size: 14px; display: block; }
  .kit-shelfmini > .src { display: block; margin-bottom: 8px; }
  .ksm-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 0; }
  .ksm-row .lr-vjar { width: 18px; height: 24px; border-width: 1.8px; }
  .ksm-row .lr-vjar::before { top: -5px; height: 4px; }
  .ksm-row b { margin-inline-start: auto; font-family: var(--display); font-size: 15px; }
  #kit-make .pantry.gv-dark { margin-inline-end: 260px; }
  .rcp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}

/* 7m auth chrome */
.au-card { border-radius: 26px; text-align: center; }
.au-brand { justify-content: center; }
.au-card h2 { font-family: var(--display); font-size: 22px; margin: 6px 0 4px; }
.au-card input { text-align: start; width: 100%; margin-bottom: 9px; }
.au-card .btn-acc { border-radius: 999px; padding-block: 13px; font-size: 15px; }
.au-fine { margin-top: 12px; }
/* 7q yearbook + tag print share the grove tokens via their own pages */

/* ---- the LIVE twin on the dashboard + designer-mode entry (one 3D, two modes) ---- */
.snap3d { position: relative; }
.snap3d .live-chip { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 8px;
  background: #DDEEC6; color: #3E5B2C; border-radius: 999px; padding: 3px 10px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; vertical-align: 2px; }
.snap3d .live-chip i { width: 7px; height: 7px; border-radius: 50%; background: #3E5B2C; animation: livepulse 1.6s ease-in-out infinite; }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .snap3d .live-chip i { animation: none; } }
#snap3d-host { border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 10; background: #26351F; }
#snap3d-host #three-container { position: relative; width: 100%; height: 100%; }
#snap3d-host canvas { width: 100% !important; height: 100% !important; display: block; }
/* in the card, the twin is a window: chrome that belongs to the full page stays out */
.snap3d .three-hint, .snap3d .three-reset, .snap3d .three-designer,
.snap3d .time-panel, .snap3d .wx-badge { display: none; }
.three-designer { position: absolute; bottom: 58px; right: 14px; z-index: 6;
  background: #26351F; color: #FFFDF6; border: 0; border-radius: 999px; padding: 9px 16px;
  font-weight: 800; font-size: 13px; cursor: pointer; box-shadow: 0 6px 20px rgba(58,50,32,.25); }
.three-designer:hover { background: #3E5B2C; }

/* ---- Grove skin for the field sheet and the phone plant sheet (were pre-Grove) ---- */
.fld-grid { gap: 10px; }
.fld-act { background: #FFFDF6; border: 0; border-radius: 20px; padding: 14px;
  box-shadow: 0 6px 20px rgba(58,50,32,.10); min-height: 70px; gap: 3px;
  transition: transform .12s ease; }
.fld-act:active { transform: scale(.96); }
.fld-act b { font-size: 15px; color: #26332B; }
.fld-act small { color: #66735F; font-size: 11.5px; }
.fld-act.danger { background: #FBF1EF; }
.fld-act.danger b { color: #C8402F; }
.fld-chip { border: 0; background: #FFFDF6; box-shadow: 0 3px 12px rgba(58,50,32,.10);
  font-weight: 700; transition: transform .12s ease; }
.fld-chip:hover { box-shadow: 0 0 0 1.5px #26332B inset; }
.fld-chip:active { transform: scale(.96); }
.fld-head span { font-family: 'Pomario Display','Iowan Old Style',Palatino,Georgia,serif; font-weight: 700; font-size: 17px; letter-spacing: 0; text-transform: none; }
.fld-head span small { font-family: -apple-system, system-ui, sans-serif; font-weight: 500; font-size: 12px; color: #66735F; letter-spacing: 0; text-transform: none; }
.fld-head .ghost-btn { border: 0; background: #EAE4D2; border-radius: 999px; font-weight: 800; }
#plant-sheet .ps-x { border: 0; background: #FFFDF6; border-radius: 999px; padding: 8px 15px;
  font-weight: 800; font-size: 13px; box-shadow: 0 4px 14px rgba(58,50,32,.18); color: #26332B; }
#plant-sheet .ps-x:active { transform: scale(.95); }
.ps-body .ptl-img { border-radius: 18px; }

/* ---- the shelf sheet: one door onto the pantry ---- */
.lr-addbtn { display: block; width: 100%; margin: 10px 0 4px; padding: 13px; border-radius: 999px; font-size: 15px; }
.sh-name { width: 100%; padding: 13px 16px; border-radius: 16px; border: 1.5px solid #EAE4D2; background: #FFFDF6; color: #26332B; font: inherit; font-size: 15px; outline: none; }
.sh-name:focus { border-color: #67A03A; }
.sh-recs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.sh-rec { border: 0; background: #EAE4D2; color: #26332B; border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: 12.5px; cursor: pointer; transition: transform .12s ease; }
.sh-rec:hover { box-shadow: 0 0 0 1.5px #26332B inset; }
.sh-rec:active { transform: scale(.95); }
.sh-rec.on { background: #26351F; color: #FFFDF6; }
@keyframes jarpop { from { transform: scale(.4); } to { transform: scale(1); } }
.lr-shelfrow .lr-sj { animation: jarpop .3s cubic-bezier(.34,1.56,.64,1) both; transform-origin: bottom; }
@media (prefers-reduced-motion: reduce) { .lr-shelfrow .lr-sj { animation: none; } }
.sh-rec.make { background: #DDEEC6; color: #3E5B2C; }
.sh-rec.make.on, .sh-rec.make:hover { box-shadow: 0 0 0 1.5px #3E5B2C inset; }
#nr-ov textarea { width: 100%; border-radius: 16px; border: 1.5px solid #EAE4D2; background: #FFFDF6; padding: 11px 14px; font: inherit; font-size: 14.5px; color: #26332B; outline: none; resize: vertical; }
#nr-ov textarea:focus { border-color: #67A03A; }
#nr-ov .sh-recs { max-height: 168px; overflow-y: auto; }

/* ---- every bottom sheet is a viewport overlay ----
   .ms-ov had no rule of its own: its panel was absolutely positioned against the PAGE,
   so on a long page (the kitchen, once the catalogue grew) the sheet and its action
   buttons rendered far below the fold and could not be reached at all. */
.ms-ov { position: fixed; inset: 0; z-index: 82; }
.ms-ov.open .ms-scrim { opacity: 1; }
.ms-ov.open .ms-panel { transform: none; }
/* the panel scrolls inside itself and never hides its own footer behind the phone bar */
.ms-panel.bw, .ms-panel.fld { max-height: 86vh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.ms-panel.bw { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
/* the confirm row stays on screen while the body scrolls under it */
.bw-foot { position: sticky; bottom: calc(-1 * (18px + env(safe-area-inset-bottom))); z-index: 2;
  background: var(--card-solid, #FFFDF6); padding: 10px 0 calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 18px -12px rgba(58,50,32,.45); }

/* ---- Make now: the card answers the press, and shows what is already put up ---- */
.rcp-log { border: 0; background: #3E5B2C; color: #FFFDF6; border-radius: 999px;
  padding: 9px 18px; font-weight: 800; font-size: 13px; cursor: pointer;
  transition: transform .12s ease, background .18s ease; }
.rcp-log:hover { background: #4C6E36; }
.rcp-log:active { transform: scale(.94); }
.rcp.arming { box-shadow: 0 0 0 2px #3E5B2C inset; }
.rcp.arming .rcp-log { background: #26351F; }
.rcp.has-stock { background: #F7FAF1; }
.rcp-stock { background: #DDEEC6; color: #3E5B2C; border-radius: 999px; padding: 3px 10px;
  font-size: 11px; font-weight: 800; white-space: nowrap; }
.rcp.has-stock .rcp-log { background: #FFFDF6; color: #3E5B2C; box-shadow: 0 0 0 1.5px #3E5B2C inset; }
.rcp.has-stock .rcp-log:hover { background: #EFF6E4; }
/* the jars that just landed announce themselves once */
@keyframes stockpop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.rcp-stock { animation: stockpop .34s cubic-bezier(.34,1.56,.64,1) both; }
@media (prefers-reduced-motion: reduce) { .rcp-stock { animation: none; } }

/* ---- the page names itself (boards 3a, 4a) ---- */
.page-t { font-family: 'Pomario Display', 'Iowan Old Style', Palatino, Georgia, serif;
  font-weight: 700; font-size: 26px; line-height: 1.15; color: #26332B; margin: 2px 0 12px;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.page-t .page-sub { font-family: -apple-system, system-ui, sans-serif; font-size: 13px;
  font-weight: 500; color: #66735F; letter-spacing: 0; }
.card h3.h3-split { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card h3 .h3-aside { color: #66735F; font-size: 12px; font-weight: 600; letter-spacing: 0;
  text-transform: none; white-space: nowrap; }
@media (min-width: 641px) { .page-t { font-size: 30px; } }

/* ---- the shelf name field is a combobox over the whole kitchen library ---- */
.sh-combo { position: relative; }
.sh-drop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 6;
  background: #FFFDF6; border-radius: 18px; box-shadow: 0 14px 38px rgba(58,50,32,.24);
  max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 6px; }
.sh-drop[hidden] { display: none; }
.sh-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start;
  border: 0; background: none; border-radius: 14px; padding: 8px 10px; cursor: pointer;
  color: #26332B; font: inherit; }
/* every option answers the pointer - house rule */
.sh-opt:hover, .sh-opt:focus-visible { background: #EFF6E4; outline: none; }
.sh-opt.on { background: #DDEEC6; }
.sh-opt-jar { width: 26px; flex: none; display: block; }
.sh-opt-jar .jar { width: 26px; height: 34px; display: block; }
.sh-opt-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sh-opt-main b { font-size: 14.5px; font-weight: 700; line-height: 1.2; }
.sh-opt-main small { font-size: 11.5px; color: #66735F; }
.sh-opt-own { margin-inline-start: auto; background: #DDEEC6; color: #3E5B2C; border-radius: 999px;
  padding: 2px 9px; font-size: 10.5px; font-weight: 800; }
.sh-opt.make { background: #F2F7EA; margin-top: 4px; }
.sh-opt.make:hover { background: #E4EFD4; }
.sh-opt-plus { width: 26px; height: 26px; flex: none; border-radius: 50%; background: #3E5B2C;
  color: #FFFDF6; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
.sh-opt-none { padding: 12px 10px; color: #66735F; font-size: 13px; margin: 0; }

/* ---- Jobs (board 2d): one control row, the count as a lime pill ---- */
.page-sub-line { color: #66735F; font-size: 13.5px; margin: -6px 0 14px; }
.tk-head { flex-wrap: nowrap; }
.tk-head .seg { flex: none; }
.tk-head select { flex: 1; min-width: 0; max-width: none; border-radius: 999px; }
.seg button b { display: inline-block; background: #A3E635; color: #26351F; border-radius: 999px;
  padding: 1px 8px; margin-inline-start: 6px; font-size: 11.5px; font-weight: 800; }
.seg button:not(.on) b { background: #E3DECB; color: #66735F; }
@media (max-width: 420px) { .tk-head { flex-wrap: wrap; } .tk-head select { flex: 1 0 100%; } }

/* ---- Library (board 3d): the search leads, the card says it is in the garden ---- */
.lib-toolbar .search { order: -1; }
.lib-ing { position: absolute; top: 8px; inset-inline-end: 8px; background: #DDEEC6; color: #3E5B2C;
  border-radius: 999px; padding: 2px 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 0; }
.lib-card { position: relative; }

/* ---- Planner frost card (board 3c): the number leads, one sentence closes ---- */
.frost-card .frost-n { font-family: 'Pomario Display', 'Iowan Old Style', Palatino, Georgia, serif;
  font-size: 46px; font-weight: 700; line-height: 1; color: #26332B; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.frost-card .frost-n span { font-family: -apple-system, system-ui, sans-serif; font-size: 13.5px; font-weight: 700; color: #26332B; }
.frost-card .frost-where { margin: 2px 0 12px; }
.frost-when { background: #E8EFF5; color: #26332B; border-radius: 14px; padding: 11px 14px;
  font-size: 13.5px; line-height: 1.5; margin-top: 12px; }
.frost-when b { color: #3B5A75; }
.frost-fold { margin-top: 10px; }

/* ---- Garden map (board 2a): the hint reads as a dark chip laid on the plot ---- */
@media (max-width: 640px) {
  #detail .detail-empty { background: #26332B; color: #FFFDF6; border-radius: 999px;
    padding: 9px 16px; font-size: 13px; font-weight: 700; border: 0; text-align: start;
    box-shadow: 0 6px 20px rgba(58,50,32,.28); }
}

/* ---- Ask: species suggestions are tappable and land in the Library ---- */
.ask-sps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ask-sp { border: 0; background: #EAE4D2; color: #26332B; border-radius: 999px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.ask-sp:hover { background: #DDEEC6; color: #3E5B2C; }
.ask-sp:active { transform: scale(.96); }

/* ---- the walk raises a curtain instead of showing an empty 3D page ---- */
.walk-load { position: fixed; inset: 0; z-index: 120; background: #F1EBDD;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .28s ease; }
.walk-load.on { opacity: 1; }
.walk-load.out { opacity: 0; }
.wl-in { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; text-align: center; }
.wl-mark { animation: wl-breathe 2.4s ease-in-out infinite; }
.wl-t { font-family: 'Pomario Display', 'Iowan Old Style', Palatino, Georgia, serif;
  font-size: 22px; font-weight: 700; color: #26332B; margin-top: 6px; }
.wl-s { font-size: 13px; color: #66735F; }
.wl-bar { width: 190px; height: 6px; border-radius: 999px; background: #E3DECB; overflow: hidden; margin-top: 8px; }
.wl-bar i { display: block; height: 100%; width: 40%; border-radius: 999px; background: #67A03A;
  animation: wl-slide 1.35s cubic-bezier(.55,.1,.45,.9) infinite; }
@keyframes wl-slide { 0% { transform: translateX(-105%); } 100% { transform: translateX(360%); } }
@keyframes wl-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) {
  .wl-mark { animation: none; }
  .wl-bar i { animation: none; width: 100%; opacity: .6; }
}

/* ---- jar stock row: the glyphs sit in the middle of their circles, and every row
   keeps the same control width whether or not it can be deleted ---- */
.lr-step2 button, .lr-step2 .xdel {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none; padding: 0; margin: 0;
  border-radius: 50%; line-height: 1; font-size: 18px; font-weight: 800;
  font-family: -apple-system, system-ui, sans-serif; }
.lr-step2 .xdel { border: 1.5px solid rgba(44,58,48,.14); background: var(--card); color: var(--muted); font-size: 16px; }
.lr-step2 .xdel:hover { color: #C8402F; border-color: rgba(200,64,47,.4); }
/* the slot a delete control would occupy, kept empty so rows line up */
.lr-slot { width: 34px; height: 34px; flex: none; display: inline-block; }
/* the number is what the house owns - say so, and keep digits from shifting the row */
.lr-own { display: flex; flex-direction: column; align-items: center; min-width: 34px; }
.lr-own b { font-family: var(--display); font-size: 20px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.lr-own small { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
/* the size names the row, the split sits under it - never run together on one line */
.lr-v-main b, .lr-v-main .src { display: block; }
.lr-v-main b { line-height: 1.2; }
.lr-v-main .src { margin-top: 2px; white-space: nowrap; }
/* on a phone the controls give the size name room to stay on one line */
@media (max-width: 460px) {
  .lr-step2 { gap: 6px; }
  .lr-step2 button, .lr-step2 .xdel, .lr-slot { width: 32px; height: 32px; }
  .lr-own { min-width: 30px; }
  .lr-v { gap: 10px; padding: 12px; }
  /* the name holds one line, and truncates rather than running under the controls */
  .lr-v-main b { white-space: nowrap; }
  .lr-v-main .src { overflow: hidden; text-overflow: ellipsis; }
}

/* ---- forecast to shopping list: what is coming, what it needs, what the cellar holds ---- */
.lp-card { background: #FBF0D9; }
.lp-card.ok { background: #DDEEC6; }
.lp-card .ac-label.week { color: #8A4B22; }
.lp-card.ok .ac-label.week { color: #3E5B2C; }
.lp-big { display: flex; align-items: baseline; gap: 9px; margin: 4px 0 6px; }
.lp-big b { font-family: var(--display); font-size: 40px; line-height: 1; color: #8A4B22; font-variant-numeric: tabular-nums; }
.lp-big.ok b { color: #3E5B2C; }
.lp-big span { font-size: 14px; font-weight: 800; color: var(--ink); }
.lp-line { font-size: 13.5px; line-height: 1.55; color: var(--ink); margin: 0 0 4px; }
.lp-when { font-size: 13px; font-weight: 700; color: #8A4B22; margin: 0 0 6px; }
.lp-card.ok .lp-when { color: #3E5B2C; }
.lp-card .ghost-btn { margin-top: 8px; background: rgba(255,253,246,.75); border: 0; }

/* ---- one photo becomes a record ---- */
.pk-shot { width: 100%; max-height: 190px; object-fit: cover; border-radius: 16px; margin: 6px 0 10px; }
.pk-read { text-align: center; padding: 10px 0; }
.pk-row { display: flex; align-items: center; gap: 11px; background: #F2F7EA; border-radius: 16px; padding: 11px 13px; }
.pk-ico { width: 30px; height: 30px; flex: none; display: flex; align-items: center; justify-content: center; }
.pk-ico svg, .pk-ico img { width: 26px; height: 26px; }
.pk-main { flex: 1; min-width: 0; }
.pk-main b { display: block; font-size: 15px; }
.pk-main small { color: var(--muted); font-size: 12px; }

/* ---- plant where I stand: the fix and the one big target ---- */
.ph-h { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.ph-fix { background: #FBF0D9; color: #8A4B22; border-radius: 14px; padding: 10px 13px;
  font-size: 13px; font-weight: 700; text-align: center; }
.ph-fix.ok { background: #DDEEC6; color: #3E5B2C; }
.ph-drop { width: 100%; margin-top: 12px; padding: 18px; font-size: 17px; border-radius: 20px; }
.ph-live [data-phundo] { width: 100%; margin-top: 8px; }

/* ---- the pantry is a shelf, not a list: every jar shows what it holds ---- */
.pantry-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  gap: 0 5px; align-items: end; padding: 8px 0 0; margin-inline: -4px;
  background: repeating-linear-gradient(to bottom, transparent 0 100px, #B98F5B 100px 107px); }
.pantry-shelf.empty { background: none; display: block; padding: 18px 4px; text-align: center; }
.pj { border: 0; background: none; padding: 0 0 9px; cursor: pointer; display: flex;
  flex-direction: column; align-items: center; gap: 2px; height: 107px; justify-content: flex-end;
  transition: transform .14s ease; }
.pj:hover { transform: translateY(-3px); }
.pj:active { transform: translateY(0) scale(.97); }
/* the glass */
.pj-jar { position: relative; width: 60px; height: var(--h, 100px); display: block;
  border: 2.4px solid #26351F; border-radius: 9px 9px 12px 12px;
  background: rgba(255,253,246,.65); }
.pj.bottle .pj-jar { width: 46px; border-radius: 18px 18px 9px 9px; }
.pj.bottle .pj-label { left: -8px; right: -8px; }
.pj.bottle .pj-lid { height: 9px; left: 22%; right: 22%; border-radius: 3px 3px 0 0; border: 2.4px solid #26351F; border-bottom: 0; top: -9px; }
.pj-lid { position: absolute; top: -1px; left: -1px; right: -1px; height: 11px;
  background: #A87E1B; border-bottom: 2.4px solid #26351F; display: block; }
.pj.bottle .pj-lid { height: 10px; }
/* what is inside, in the colour of the crop */
.pj-fill { position: absolute; left: 0; right: 0; bottom: 0; top: 11px; display: block;
  background: var(--c, #C9891F); opacity: .82; border-radius: 0 0 9px 9px; }
/* the paper label */
/* the label may grow upward, but never into the band the count badge occupies */
.pj-label { position: absolute; left: -6px; right: -6px; bottom: 5px; max-height: calc(100% - 20px); overflow: hidden; background: #FFFDF6;
  border-radius: 3px; padding: 2px 1px; text-align: center; box-shadow: 0 1px 2px rgba(38,51,43,.22); z-index: 1; }
.pj-label b { font-size: 10.5px; font-weight: 800; line-height: 1.08; color: #26332B; letter-spacing: -.012em;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; hyphens: manual; overflow-wrap: break-word; }
.pj-label small { display: block; font-size: 10.5px; line-height: 1.1; color: #66735F; margin-top: 0; white-space: nowrap; }
.pj-count { position: absolute; top: -3px; right: 1px; z-index: 2; background: #26351F; color: #FFFDF6;
  border-radius: 999px; padding: 0 5px; font-size: 10.5px; font-weight: 800; line-height: 1.4;
  box-shadow: 0 0 0 2px rgba(255,253,246,.55); }
.pj-soon { background: #FBF0D9; color: #8A4B22; border-radius: 999px; padding: 2px 8px;
  font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.pj.soon .pj-jar { border-color: #A87E1B; }
.lr-cellar-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.lr-cellar-h b { font-family: var(--display); font-size: 18px; }
@media (max-width: 420px) { .pantry-shelf { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); } }

/* ---- the pantry, structured: four sibling cards, each one idea ----
   shelf (what is put up) → jars to buy (what the harvest will need) →
   jars and bottles (what the house has to put it in) → the records, folded away. */
.pantry-card { padding-bottom: 14px; }
.pantry-card .lr-addbtn { margin: 14px 0 0; }
.stock-card .lr-vessels { margin-top: 10px; }
.stock-card .lr-hint { margin: 10px 0 4px; }
.stock-card .pf-fold, .rec-card .pf-fold { margin-top: 4px; }
.rec-card .pf-fold + .pf-fold { margin-top: 2px; border-top: 1px solid rgba(44,58,48,.08); padding-top: 6px; }
.rec-card .lr-own-list { margin-top: 4px; }
/* the section label leads its card, never floats between two of them */
.pantry-card > .ac-label.week, .stock-card > .ac-label.week, .lp-card > .ac-label.week { display: block; margin-bottom: 2px; }

/* ---- supporting lines: the figure leads, the words stay quiet ----
   A count under a heading is not body copy. The number is set in the display face with
   tabular figures so columns of them line up; the surrounding words drop back to a small,
   slightly tracked muted sans. One treatment, used wherever a heading is summarised. */
.statline { font-size: 12.5px; line-height: 1.35; color: var(--muted); letter-spacing: .012em; }
.statline b { font-family: var(--display); font-weight: 700; font-size: 16.5px; line-height: 1;
  color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: 0; margin-inline-end: 1px; }
/* beside a page title the figure may speak a little louder */
.page-t .statline b { font-size: 18px; }
.lr-cellar-h { flex-wrap: wrap; }
.lr-cellar-h .statline { text-align: end; margin-inline-start: auto; white-space: nowrap; }
@media (max-width: 430px) {
  .lr-cellar-h .statline { text-align: start; margin-inline-start: 0; flex-basis: 100%; margin-top: 2px; }
}
.card h3 .h3-aside.statline { text-transform: none; }
.card h3 .h3-aside.statline b { font-size: 15.5px; }
@media (max-width: 420px) { .statline b { font-size: 15.5px; } .page-t .statline b { font-size: 16.5px; } }

/* ---- the overnight digest: a slim band above the hero, only when something changed ---- */
.dg-card { grid-column: 1 / -1; background: #FFFDF6; border-radius: 20px; padding: 14px 16px 12px;
  box-shadow: var(--shadow); position: relative; }
.dg-card .ac-label.week { color: #8A4B22; margin-bottom: 4px; }
.dg-card.frost .ac-label.week { color: #3B5A75; }
.dg-lines { display: flex; flex-direction: column; gap: 5px; margin: 2px 0 8px; }
.dg-line { font-size: 14px; line-height: 1.45; color: var(--ink); display: flex; gap: 9px; align-items: baseline; }
.dg-line i { width: 8px; height: 8px; border-radius: 50%; background: #67A03A; flex: none; transform: translateY(-1px); }
.dg-line.sky i { background: #3B5A75; }
.dg-line.frost i { background: #7FA8C9; }
.dg-line.window i { background: #D97C4A; }
.dg-line.people i { background: #A87E1B; }
.dg-acts { display: flex; gap: 8px; align-items: center; }
.dg-x { position: absolute; top: 10px; inset-inline-end: 10px; width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: #F6F2E6; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
.dg-x:hover { color: var(--ink); }
@media (max-width: 640px) { .dg-card { margin-bottom: 2px; } }

/* ---- the family timeline in the Journal: who did what, grouped by day ---- */
.fa-day { margin: 14px 0 6px; }
.fa-row { display: flex; align-items: flex-start; gap: 11px; padding: 9px 0; border-bottom: 1px solid rgba(44,58,48,.07); }
.fa-row:last-child { border-bottom: 0; }
.fa-who { width: 32px; height: 32px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  background: #DDEEC6; color: #3E5B2C; font-weight: 800; font-size: 13px; font-family: var(--display); }
.fa-who.house { background: #EAE4D2; color: #66735F; }
.fa-main { flex: 1; min-width: 0; font-size: 14px; line-height: 1.45; }
.fa-main b { font-weight: 800; }
.fa-main .fa-obj { color: var(--ink); }
.fa-main small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.fa-time { color: var(--muted); font-size: 12px; flex: none; margin-top: 2px; font-variant-numeric: tabular-nums; }
.fa-empty { color: var(--muted); font-size: 13.5px; padding: 12px 0; }

/* ---------- one listing per kind: the kind sheet and its rows ---------- */
.kd-sheet .kd-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 10px; }
.kd-head .pk-main b { display: block; font-size: 17px; }
.kd-head .pk-main b small { font-weight: 500; color: var(--muted); font-size: 13px; margin-inline-start: 4px; }
.kd-head .pk-main > small { display: block; color: var(--muted); font-size: 12px; }
.kd-head .sg-n { margin-inline-start: auto; font-family: var(--display); font-size: 18px; color: var(--ink); }
.kd-head.slim { margin: 4px 0 6px; width: 100%; }
.kd-list { display: flex; flex-direction: column; width: 100%; }
.kd-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; color: var(--ink); text-align: start; cursor: pointer; border-radius: 10px; }
.kd-row:last-child { border-bottom: 0; }
.kd-row:hover { background: rgba(38,51,43,.06); }
.kd-row:active { transform: scale(.985); }
.kd-n { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--acc-soft, #E4EFD6); color: var(--ink); font-family: var(--display); font-size: 13px; }
.kd-main { flex: 1; min-width: 0; }
.kd-main b { display: block; font-size: 14.5px; }
.kd-main small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.kd-row .badge { flex: 0 0 auto; }
.kd-link { display: inline-block; margin: -2px 0 10px; padding: 0; border: 0; background: none; color: var(--acc-ink, #3F6D2A); font: inherit; font-size: 12.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.kd-link:hover { color: var(--ink); }

/* a size just added: the row flashes once so the addition is seen */
@keyframes row-flash { 0% { background: #E4EFD6; box-shadow: 0 0 0 2px #8FBF5A inset; } 100% { background: var(--card); box-shadow: none; } }
.just-added { animation: row-flash 1.8s ease-out; }
.lr-v.just-added { border-radius: 14px; }
.sz-form select { min-width: 64px; }

/* ---------- Designer: the scene is the hero, one line of actions, one sheet for the files ---------- */
.ds-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ds-head .page-t { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.ds-head #ds-name { font: inherit; font-family: var(--display); font-size: inherit; font-weight: inherit; color: inherit; background: none; border: 0; border-bottom: 1.5px dashed transparent; padding: 0 2px; min-width: 120px; max-width: 100%; border-radius: 0; }
.ds-head #ds-name:hover { border-bottom-color: var(--line-2); }
.ds-head #ds-name:focus { outline: none; border-bottom-color: var(--acc); }
.ds-sum b { color: var(--acc); }
.ds-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ds-actions .ghost-btn, .ds-actions .btn-acc { margin: 0; }
.ds-actions .pf-n { margin-inline-start: 2px; }
.ds-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr) 280px; grid-template-areas: "pal scene side" "pal hint side"; gap: 14px; }
.ds-wrap.irr { grid-template-columns: 300px minmax(0, 1fr) 280px; }
.ds-3d-host { grid-area: scene; }
.ds-hint { grid-area: hint; margin: 0; }
.ds-side { grid-area: side; }
.ds-palette { grid-area: pal; padding: 14px; gap: 8px; max-height: none; }
.ds-pal-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ds-pal-h .ac-label { margin: 0; }
.ds-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.ds-cat { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 700; cursor: pointer; }
.ds-cat i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ds-cat:hover { border-color: var(--ink); }
.ds-cat.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ds-pal-list { max-height: 56vh; }
.ds-3d-host .three-designer.ds-exit { top: 14px; left: 14px; right: auto; bottom: auto; }
.ds-modeseg { position: absolute; top: 14px; right: 14px; z-index: 6; background: rgba(20,28,22,.55); border-color: rgba(255,255,255,.18); backdrop-filter: blur(8px); }
.ds-modeseg button { color: rgba(255,255,255,.8); padding: 6px 13px; }
.ds-modeseg button.on { background: #fff; color: var(--ink); }
#dsl-ov .kd-row.on { background: rgba(38,51,43,.06); }
#dsl-ov .kd-row .xdel { margin-inline-start: 4px; }
@media (max-width: 980px) {
  .ds-wrap, .ds-wrap.irr { grid-template-columns: 1fr; grid-template-areas: "scene" "hint" "side" "pal"; }
  .ds-3d-host #three-container { height: 52vh; min-height: 340px; }
  .ds-side:has(> .detail-empty) { display: none; }
  .ds-palette { max-height: none; }
  .ds-pal-list { max-height: 44vh; flex-direction: column; }
  .ds-pal { grid-template-columns: 36px 1fr auto auto; }
  .ds-pal small { display: inline; }
  .ds-head .ds-actions { width: 100%; }
  .ds-head .ds-actions .btn-acc { margin-inline-start: auto; }
}

/* inside the designer the scene carries only the designer's own chrome */
.ds-3d-host .wx-badge, .ds-3d-host #wx3d, .ds-3d-host .three-reset, .ds-3d-host .three-designer:not(.ds-exit) { display: none !important; }
.ds-pal-h .ac-label { white-space: nowrap; }
.ds-pal-h { flex-direction: column; align-items: flex-start; gap: 6px; }
.ds-pal-h .ds-cov { flex-wrap: wrap; }

/* jars to buy: the shortfall split by size, then the one action that closes the loop */
.lp-split { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 10px; }
.lp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.55); border: 1px solid rgba(120,90,40,.18); font-size: 13px; color: var(--ink); }
.lp-chip b { font-family: var(--display); font-size: 15px; }
.lp-card #lp-bought { margin: 0; }
/* the live card's heading reads "3D live" as one unit on the left; the corner belongs to the details hint */
.snap3d h3 { justify-content: flex-start; align-items: center; padding-inline-end: 64px; }

/* the sheet's confirm row belongs to the panel: its colour, a soft fade, no white box */
.bw-foot { background: linear-gradient(to bottom, rgba(246,242,230,0), #F6F2E6 34%); box-shadow: none; padding-top: 14px; }
.kd-sheet .bw-foot .btn-acc { flex: 1; }
.kd-sheet .bw-foot .ghost-btn { flex: 0 0 auto; }
/* one kind on the map: the bar above it and the numbers on the trees */
.kind-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; }
.kind-bar > b { font-size: 15px; }
.kind-bar .sg-n { color: var(--muted); font-family: var(--display); font-size: 15px; }
.kn-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: 4px; }
.kn-chip { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font-family: var(--display); font-size: 14px; cursor: pointer; }
.kn-chip:hover { background: rgba(38,51,43,.08); }
.kn-chip.on { background: var(--ink); color: #FBF8EF; }
.kind-bar [data-knx] { margin: 0 0 0 auto; }
.canopy .kn { pointer-events: none; }
.canopy.dim .kn { display: none; }

.kind-bar .kn-chips { flex-basis: 100%; margin: 2px 0 0; }
.kind-bar [data-knx] { margin-inline-start: auto; }
.kn-where { flex-basis: 100%; display: flex; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line-2); margin-top: 4px; }
.kn-where > b { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #FBF8EF; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 13px; flex: none; }
.kn-where > span { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; }
.kn-where > span small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.canopy.selected .ring { stroke-width: 0.34; }
.kind-bar[hidden] { display: none; }
