/* The app’s two typefaces, served by the app itself: Gabarito for headings and Atkinson Hyperlegible Next for everything else.
   Both are under the SIL Open Font License (the licence texts are beside the font files in client/assets/fonts). */
@font-face { font-family: "Gabarito"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/gabarito-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Gabarito"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/gabarito-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Gabarito"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/gabarito-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Gabarito"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/gabarito-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Gabarito"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/gabarito-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Gabarito"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/gabarito-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Gabarito"; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/gabarito-latin-ext-800-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Gabarito"; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/gabarito-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
/* The base every screen stands on: the phone's safe areas are kept clear at top and bottom, and the page has no margin of its own. */
:root { color-scheme: light; box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body { margin: 0; padding: 0; }
img { max-width: 100%; }
[hidden]:not([hidden=until-found i]) { display: none !important; }
/* Layout: one phone-first column with a sticky top bar and a fixed bottom menu (My garden, To do, Planner, Plants, Club, More);
   forms open as bottom sheets; from tablet width the garden plan sits beside its numbered key.
   Everything is sized in rem so the text-size setting scales the whole app. Nothing is ever wider than the screen, so the page only moves up and down. */
:root {
  --bg: #F2F5F0; --surface: #FFFFFF; --surface-2: #E8EEE6;
  --ink: #13231A; --ink-2: #46574C; --line: #CBD6CC; --line-strong: #7C8F82;
  --accent: #1C6A40; --accent-ink: #FFFFFF; --accent-soft: #DDEEE2; --accent-text: #17593A;
  --sun: #F4B63F; --sun-soft: #FCEFCF; --sun-ink: #5B3F00;
  --frost: #2A6CA6; --frost-soft: #DFECF8; --frost-ink: #174A77;
  --warn: #A8500B; --warn-soft: #FBE9D4; --warn-ink: #7A3A06;
  --bad: #B3261E; --bad-soft: #FADEDB; --bad-ink: #8C1D17; --on-bad: #FFFFFF;
  --cal-cover: #2B8C82; --on-sun: #13231A;
  --p-ground: #DCE8D2; --p-lawn: #BFD9A8; --p-path: #D9D4C7; --p-patio: #CFCBC2; --p-house: #C9CED4; --p-house-line: #8E98A3;
  --p-shed: #B99B7A; --p-water: #9CC7E3; --p-soil: #9A7657; --p-soil-empty: #C7AE95; --p-wood: #6E5038;
  --p-leaf: #3F8F55; --p-leaf-2: #2F7445; --p-glass: #D7EAF2; --p-glass-line: #6FA3BD; --p-pot: #C2703F;
  --p-sprout: #A9D98A; --p-over: #B59A45; --p-over-2: #8E7A3A; --p-rest: #7E9A92; --p-rest-2: #68847C;
  --p-tree: #5FA05E; --p-hedge: #4F8050; --p-label: #13231A; --p-label-bg: rgba(255,255,255,.88); --p-card: #FCFDFB; --p-track: #D3DED4; --p-grid: rgba(19,35,26,.08);
  --st-ready: #F4B63F; --st-plan: #1C6A40;
  --i-sky: #E3F0F7; --i-soil: #8B6B50; --i-soil-2: #77593F; --i-leaf: #4E9A5E; --i-leaf-2: #357A47; --i-leaf-3: #86C486; --i-cane: #B89B6E;
  --shade: rgba(19,35,26,.45); --shadow: 0 0.6rem 2rem rgba(19,35,26,.18);
  --f-display: "Gabarito", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --t-xs: 0.84rem; --t-s: 0.92rem; --t-m: 1rem; --t-l: 1.17rem; --t-xl: 1.45rem; --t-xxl: 1.8rem;
  --r: 0.9rem; --r-s: 0.55rem; --tap: 3.1rem; --gap: 1rem; --gutter: 1rem;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0E1611; --surface: #17211B; --surface-2: #212D26; --ink: #ECF2ED; --ink-2: #A8B8AD; --line: #2D3B32; --line-strong: #6A7D70; --accent: #74D09B; --accent-ink: #082013; --accent-soft: #1D3A2A; --accent-text: #8ADDAE; --sun: #F4B63F; --sun-soft: #3D3113; --sun-ink: #F9D98B; --frost: #7DB8EA; --frost-soft: #162C40; --frost-ink: #A9D2F5; --warn: #F0A561; --warn-soft: #3A2612; --warn-ink: #F6C08F; --bad: #F28B82; --bad-soft: #3F1B18; --bad-ink: #F7B1AB; --on-bad: #3A0B08; --cal-cover: #5CC4B6; --on-sun: #13231A; --p-ground: #1E2C22; --p-lawn: #2E4A30; --p-path: #4A473F; --p-patio: #45423C; --p-house: #3A424B; --p-house-line: #6B7783; --p-shed: #6B543D; --p-water: #2F5F80; --p-soil: #6B4F39; --p-soil-empty: #4F3D2E; --p-wood: #A78664; --p-leaf: #4FA468; --p-leaf-2: #3C8553; --p-glass: #243B45; --p-glass-line: #6FA3BD; --p-pot: #B5683B; --p-sprout: #8FCB74; --p-over: #9A8440; --p-over-2: #7A6832; --p-rest: #5E7A72; --p-rest-2: #4C665E; --st-ready: #F4B63F; --st-plan: #8ADDAE; --p-tree: #4B8A4D; --p-hedge: #3D6B3F; --p-label: #ECF2ED; --p-label-bg: rgba(14,22,17,.82); --p-card: #121C16; --p-track: #33443A; --p-grid: rgba(236,242,237,.08); --i-sky: #1B2A33; --i-soil: #5C4635; --i-soil-2: #4B382A; --i-leaf: #4E9A5E; --i-leaf-2: #357A47; --i-leaf-3: #86C486; --i-cane: #B89B6E; --shade: rgba(0,0,0,.6); --shadow: 0 0.6rem 2rem rgba(0,0,0,.5); color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #0E1611; --surface: #17211B; --surface-2: #212D26; --ink: #ECF2ED; --ink-2: #A8B8AD; --line: #2D3B32; --line-strong: #6A7D70; --accent: #74D09B; --accent-ink: #082013; --accent-soft: #1D3A2A; --accent-text: #8ADDAE; --sun: #F4B63F; --sun-soft: #3D3113; --sun-ink: #F9D98B; --frost: #7DB8EA; --frost-soft: #162C40; --frost-ink: #A9D2F5; --warn: #F0A561; --warn-soft: #3A2612; --warn-ink: #F6C08F; --bad: #F28B82; --bad-soft: #3F1B18; --bad-ink: #F7B1AB; --on-bad: #3A0B08; --cal-cover: #5CC4B6; --on-sun: #13231A; --p-ground: #1E2C22; --p-lawn: #2E4A30; --p-path: #4A473F; --p-patio: #45423C; --p-house: #3A424B; --p-house-line: #6B7783; --p-shed: #6B543D; --p-water: #2F5F80; --p-soil: #6B4F39; --p-soil-empty: #4F3D2E; --p-wood: #A78664; --p-leaf: #4FA468; --p-leaf-2: #3C8553; --p-glass: #243B45; --p-glass-line: #6FA3BD; --p-pot: #B5683B; --p-sprout: #8FCB74; --p-over: #9A8440; --p-over-2: #7A6832; --p-rest: #5E7A72; --p-rest-2: #4C665E; --st-ready: #F4B63F; --st-plan: #8ADDAE; --p-tree: #4B8A4D; --p-hedge: #3D6B3F; --p-label: #ECF2ED; --p-label-bg: rgba(14,22,17,.82); --p-card: #121C16; --p-track: #33443A; --p-grid: rgba(236,242,237,.08); --i-sky: #1B2A33; --i-soil: #5C4635; --i-soil-2: #4B382A; --i-leaf: #4E9A5E; --i-leaf-2: #357A47; --i-leaf-3: #86C486; --i-cane: #B89B6E; --shade: rgba(0,0,0,.6); --shadow: 0 0.6rem 2rem rgba(0,0,0,.5); color-scheme: dark; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; scroll-padding-bottom: 6rem; overflow-x: hidden; overflow-x: clip; touch-action: pan-y pinch-zoom; }
html[data-size="2"] { font-size: 125%; }
html[data-size="3"] { font-size: 140%; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: var(--t-m); line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip; overscroll-behavior-x: none; }
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; text-wrap: balance; letter-spacing: -0.005em; overflow-wrap: anywhere; }
h1 { font-size: var(--t-xxl); font-size: min(var(--t-xxl), 11.5cqw); font-weight: 700; }   /* a long word in a heading shrinks to fit a narrow screen rather than splitting */
h2 { font-size: var(--t-xl); font-weight: 700; }
h3 { font-size: var(--t-l); font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
a { color: var(--accent-text); }
:focus-visible { outline: 0.19rem solid var(--frost); outline-offset: 0.12rem; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* ---------- shell ---------- */
.app { min-height: 100%; }
.wrap { max-width: 36rem; margin-inline: auto; padding-inline: var(--gutter); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 0.5rem; min-height: 3.6rem; padding-block: 0.35rem; }
.top-title { flex: 1; min-width: 0; font-family: var(--f-display); font-weight: 700; font-size: var(--t-l); font-size: min(var(--t-l), 5.6vw); line-height: 1.15; overflow-wrap: anywhere; }
.top-title small { display: block; font-family: var(--f-body); font-weight: 400; font-size: var(--t-xs); color: var(--ink-2); }
.top-big { font-size: var(--t-xl); font-size: min(var(--t-xl), 8vw); }
/* a short message takes the title's place in the bar for a few seconds */
.top-flash { display: none; flex: 1; min-width: 0; padding: 0.3rem 0.7rem; border-radius: var(--r-s); background: var(--ink); color: var(--bg); font-weight: 700; font-size: var(--t-s); line-height: 1.25; overflow-wrap: break-word; }   /* two lines fit the bar exactly */
.top-in.flashing .top-flash { display: block; animation: flash-in 0.18s ease-out; }
.top-in.flashing .top-title { display: none; }
.top-in.flashing .back { font-size: 0; gap: 0; padding-inline: 0.35rem; min-width: var(--tap); justify-content: center; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-0.3rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .top-in.flashing .top-flash { animation: none; } }
.back { display: inline-flex; align-items: center; gap: 0.2rem; min-height: var(--tap); padding: 0 0.75rem 0 0.35rem; margin-left: -0.35rem; border: 0; border-radius: var(--r-s); background: none; color: var(--accent-text); font-weight: 700; }
.back svg { width: 1.5rem; height: 1.5rem; }
.icon-btn { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.05rem; min-width: var(--tap); min-height: var(--tap); padding: 0.2rem 0.4rem; border: 0; border-radius: var(--r-s); background: none; color: var(--ink); font-size: var(--t-xs); font-weight: 700; }
.icon-btn svg { width: 1.6rem; height: 1.6rem; }
.dot { position: absolute; top: 0.15rem; right: 0.2rem; min-width: 1.3rem; height: 1.3rem; padding: 0 0.3rem; border-radius: 1rem; background: var(--bad); color: var(--on-bad); font-size: 0.75rem; line-height: 1.3rem; text-align: center; font-weight: 700; }
.screen { display: flex; flex-direction: column; gap: 1.4rem; padding-block: 1.1rem 7.5rem; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.stack-s { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.rowflex { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.rowflex > .grow, .grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-s); }
.xs { font-size: var(--t-xs); }
.b { font-weight: 700; }
.center { text-align: center; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.sec-head p { color: var(--ink-2); font-size: var(--t-s); }
.eyebrow { font-size: var(--t-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-2); }

/* In the phone app the page runs under the app's own header. Nothing of ours should show through up there: the strip is painted in the page colour on every screen. */
body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 25; pointer-events: none; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); }
.tabs-in { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 44rem; margin-inline: auto; }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; min-height: calc(4.1rem + env(safe-area-inset-bottom, 0px)); padding: 0.35rem 0.1rem calc(0.35rem + env(safe-area-inset-bottom, 0px));   /* the chosen tab's tint runs to the bottom edge of the phone */ border: 0; background: none; color: var(--ink-2); font-size: 0.8rem; font-size: min(0.8rem, 3.3vw); font-weight: 700; line-height: 1.1; border-top: 0.2rem solid transparent; overflow-wrap: anywhere; }
.tab.off { opacity: 0.42; }
.tab svg { width: 1.7rem; height: 1.7rem; }
.tab[aria-current="page"] { color: var(--accent-text); border-top-color: var(--accent); background: var(--accent-soft); }
.tab .dot { top: 0.3rem; right: calc(50% - 1.75rem); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: var(--tap); padding: 0.55rem 1.15rem; border: 0.13rem solid var(--accent); border-radius: var(--r); background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: var(--t-m); line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; position: relative; }
.btn svg { width: 1.45rem; height: 1.45rem; flex: none; }
.btn.sec { background: var(--surface); color: var(--accent-text); border-color: var(--accent); }
.btn.quiet { background: none; border-color: transparent; color: var(--accent-text); }
.btn.danger { background: var(--surface); color: var(--bad-ink); border-color: var(--bad); }
.btn.danger.armed, .tool.danger.armed { background: var(--bad); color: var(--on-bad); }
.btn.block { display: flex; width: 100%; }
.btn.sm { min-height: 2.6rem; padding: 0.35rem 0.85rem; font-size: var(--t-s); border-radius: var(--r-s); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.btn-row > .btn { flex: 1 1 9rem; }
.btn-row.nav > .btn.sec { flex: 0 0 auto; }   /* Back takes only what it needs; the way forward gets the rest */
/* the real file input inside a photo button: there for the phone to open its chooser, never seen */
.file-in { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
label.btn:focus-within, label.row:focus-within { outline: 0.19rem solid var(--frost); outline-offset: 0.12rem; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.list > * + * { border-top: 1px solid var(--line); }
.row { position: relative; display: flex; align-items: center; gap: 0.8rem; width: 100%; min-height: 3.6rem; padding: 0.7rem 0.9rem; border: 0; background: none; text-align: left; }
.row > .grow { display: flex; flex-direction: column; gap: 0.1rem; }
.row .chev { flex: none; width: 1.4rem; height: 1.4rem; color: var(--ink-2); }
.row-title { font-weight: 700; overflow-wrap: break-word; }
.row-sub { color: var(--ink-2); font-size: var(--t-s); overflow-wrap: break-word; }
button.row:active, .tab:active, .btn:active { filter: brightness(0.95); }
/* how each crop stands, in the list of planters */
.cs { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.4rem; }
.cs-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 0.7rem; }
.cs-name { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.cs-name small { font-size: inherit; font-weight: 400; color: var(--ink-2); }
.cs-name.off { font-weight: 400; color: var(--ink-2); }
.cs-when { font-weight: 700; color: var(--accent-text); }
.cs-when.sun { color: var(--sun-ink); } .cs-when.warn { color: var(--warn-ink); } .cs-when.frost { color: var(--frost-ink); }
.cs-bar { display: block; height: 0.55rem; border-radius: 1rem; background: var(--surface-2); overflow: hidden; }
.cs-bar > i { display: block; height: 100%; min-width: 0.55rem; border-radius: 1rem; background: var(--accent); }
.cs-bar.sun > i { background: var(--sun); } .cs-bar.warn > i { background: var(--warn); }
.todo-row { align-items: flex-start; }
.todo-row > .grow { gap: 0.35rem; }
.todo-btns { margin-top: 0.15rem; }
.num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 700; font-size: var(--t-s); font-variant-numeric: tabular-nums; }
.thumb { flex: none; width: min(3.6rem, 17vw); height: min(3.6rem, 17vw); border-radius: var(--r-s); overflow: hidden; background: var(--i-sky); }
.thumb.lg { width: min(4.6rem, 22vw); height: min(4.6rem, 22vw); }
.thumb svg, .thumb img { width: 100%; height: 100%; object-fit: cover; }
.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-family: var(--f-display); font-weight: 700; }
.avatar svg { width: 1.5rem; height: 1.5rem; }
.avatar.sun { background: var(--sun-soft); color: var(--sun-ink); }
.pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.12rem 0.6rem; border-radius: 2rem; font-size: var(--t-xs); font-weight: 700; background: var(--surface-2); color: var(--ink); white-space: nowrap; border: 0.09rem solid transparent; }
.pill.good { background: var(--accent-soft); color: var(--accent-text); }
.pill.sun { background: var(--sun-soft); color: var(--sun-ink); }
.pill.warn { background: var(--warn-soft); color: var(--warn-ink); }
.pill.bad { background: var(--bad-soft); color: var(--bad-ink); }
.pill.frost { background: var(--frost-soft); color: var(--frost-ink); }
.pill.ahead { background: var(--surface); color: var(--accent-text); border: 0.09rem dashed var(--accent); }
.pill svg { flex: none; width: 0.95em; height: 0.95em; stroke-width: 3.2; }
/* a small round tick or cross beside a heading or a line of words */
.mark { display: inline-grid; place-items: center; width: 1.2em; height: 1.2em; margin-right: 0.4em; border-radius: 50%; vertical-align: -0.18em; }
.mark svg { width: 0.72em; height: 0.72em; stroke-width: 3.6; }
.mark.yes { background: var(--accent); color: var(--accent-ink); }
.mark.no { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 0.09rem var(--line-strong); }
.pills { display: flex; flex-wrap: wrap; gap: 0.35rem; min-width: 0; }
.pills > .pill { white-space: normal; }   /* on a very narrow screen with the largest text, a tag wraps rather than sticking out */
.note { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.85rem 0.95rem; border-radius: var(--r); background: var(--surface-2); color: var(--ink); }
.note > svg { flex: none; width: 1.6rem; height: 1.6rem; margin-top: 0.05rem; }
.note.frost { background: var(--frost-soft); color: var(--frost-ink); }
.note.warn { background: var(--warn-soft); color: var(--warn-ink); }
.note.bad { background: var(--bad-soft); color: var(--bad-ink); }
.note.good { background: var(--accent-soft); color: var(--accent-text); }
.note.sun { background: var(--sun-soft); color: var(--sun-ink); }
.note.ahead { background: var(--surface); color: var(--ink); border: 0.13rem dashed var(--accent); }
.note .grow { display: flex; flex-direction: column; gap: 0.45rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.6rem; }
.card .facts, .sheet .facts { grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); }
.fact { display: flex; flex-direction: column; gap: 0.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 0.6rem 0.75rem; text-align: left; min-width: 0; }
.fact-l { font-size: var(--t-xs); color: var(--ink-2); font-weight: 700; }
.fact-v { font-weight: 700; overflow-wrap: anywhere; }
.fact.tap { border: 0.13rem solid var(--accent); min-height: var(--tap); }
.fact-c { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.2rem; color: var(--accent-text); font-size: var(--t-s); font-weight: 700; }
.fact-c svg { width: 1.1rem; height: 1.1rem; }
.empty { border: 0.13rem dashed var(--line-strong); border-radius: var(--r); padding: 1.1rem; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; gap: 0.7rem; align-items: center; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.field > label, .field > .label { font-weight: 700; }
.field .hint, .hint { color: var(--ink-2); font-size: var(--t-s); }
.input, select.input, textarea.input { display: block; width: 100%; max-width: 100%; min-width: 0; min-height: var(--tap); padding: 0.6rem 0.8rem; border: 0.13rem solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); color: var(--ink); font-size: var(--t-m); }
/* date boxes: stop phones giving them a width of their own, which made the sheet slide sideways */
input[type="date"].input { -webkit-appearance: none; appearance: none; text-align: left; }
input[type="date"].input::-webkit-date-and-time-value { text-align: left; }
textarea.input { min-height: 6.5rem; resize: vertical; line-height: 1.4; }
.input:focus { border-color: var(--accent); }
.err { color: var(--bad-ink); font-weight: 700; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.3rem; padding: 0.3rem; border-radius: var(--r); background: var(--surface-2); }
.seg button { min-height: 2.75rem; padding: 0.35rem 0.5rem; border: 0; border-radius: 0.65rem; background: none; font-weight: 700; color: var(--ink-2); line-height: 1.15; overflow-wrap: anywhere; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(19,35,26,.25); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(8.2rem, 100%), 1fr)); gap: 0.55rem; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; width: 100%; min-height: var(--tap); padding: 0.65rem 0.8rem; border: 0.13rem solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); text-align: left; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.choice small { font-weight: 400; color: var(--ink-2); font-size: var(--t-s); }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.choice[aria-pressed="true"] small { color: var(--accent-text); }
.choice[aria-pressed="true"] .pill.good { background: var(--surface); }
.vpick.on { border: 0.13rem solid var(--accent); border-radius: var(--r-s); background: var(--surface); }
.vpick.on > .choice { border: 0; border-radius: var(--r-s) var(--r-s) 0 0; }
.vmore { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.75rem 0.8rem 0.85rem; border-top: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip { min-height: 2.7rem; padding: 0.3rem 0.95rem; border: 0.13rem solid var(--line-strong); border-radius: 2rem; background: var(--surface); font-weight: 700; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.switch-row { display: flex; align-items: center; gap: 0.9rem; width: 100%; min-height: 3.6rem; padding: 0.7rem 0.9rem; border: 0; background: none; text-align: left; }
.switch { flex: none; position: relative; width: 3.4rem; height: 2rem; border-radius: 2rem; background: var(--line-strong); transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--surface); transition: transform .15s; }
[aria-checked="true"] .switch { background: var(--accent); }
[aria-checked="true"] .switch::after { transform: translateX(1.4rem); }
.splits { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(7.2rem, 100%), 1fr)); gap: 0.55rem; }
.split-pick { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 0.6rem 0.4rem; border: 0.13rem solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); font-weight: 700; font-size: var(--t-s); line-height: 1.2; text-align: center; min-width: 0; }
.split-pick svg { width: 100%; max-width: 5.2rem; height: 4.6rem; }
.split-pick[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }

/* ---------- sheet + messages ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: var(--shade); display: flex; align-items: flex-end; justify-content: center; padding-top: env(safe-area-inset-top, 0px); }   /* a tall panel stops short of the phone app's own header */
.sheet { width: 100%; max-width: 38rem; max-height: 92%; overflow-y: auto; overflow-x: hidden; touch-action: pan-y pinch-zoom; background: var(--bg); border-radius: 1.2rem 1.2rem 0 0; box-shadow: var(--shadow); padding: 0 var(--gutter) calc(1.25rem + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 1rem; overscroll-behavior: contain; }
.sheet > * { min-width: 0; max-width: 100%; }
.screen, .sheet { container-type: inline-size; }   /* lets the rules at the end of this file adapt to a narrow screen with large text */
.sheet-head { position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); max-width: none; }
.sheet-title { display: flex; align-items: center; gap: 0.6rem; padding-block: 0.8rem 0.6rem; }
.sheet-title h2 { flex: 1; min-width: 0; font-size: var(--t-l); }
@media (min-width: 46rem) { .scrim { align-items: center; padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 1.5rem 1.5rem; } .sheet { border-radius: 1.2rem; max-height: 88%; } }
.flash { margin-bottom: 0.7rem; padding: 0.65rem 0.9rem; border-radius: var(--r-s); background: var(--ink); color: var(--bg); font-weight: 700; }
.toast { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 0.75rem); left: 50%; transform: translateX(-50%); z-index: 70; max-width: min(30rem, calc(100% - 2rem)); width: max-content; padding: 0.7rem 1.1rem; border-radius: var(--r); background: var(--ink); color: var(--bg); font-weight: 700; box-shadow: var(--shadow); text-align: center; pointer-events: none; }

/* ---------- signing in and the first-time questions ---------- */
.login { display: flex; flex-direction: column; gap: 1.4rem; padding-block: 2rem 3rem; }
.brand { display: flex; align-items: center; gap: 0.9rem; }
.brand-mark { flex: none; width: 4rem; height: 4rem; border-radius: 1.1rem; background: var(--accent); display: grid; place-items: center; }
.brand-mark svg { width: 2.6rem; height: 2.6rem; }
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: var(--t-xxl); line-height: 1.02; letter-spacing: -0.015em; }
.faceid { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; padding: 2rem 1rem; }
.faceid svg { width: 5.5rem; height: 5.5rem; color: var(--accent-text); }
.faceid.go svg { animation: pulse 0.9s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); opacity: 0.6; } }
.intro { gap: 1.6rem; }

/* ---------- garden plan ---------- */
.plan { background: var(--p-ground); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.plan svg { width: 100%; height: auto; }
.plan text { font-family: var(--f-body); font-weight: 700; fill: var(--p-label); pointer-events: none; }
.plan .hit { cursor: pointer; }
.plan .n-badge { fill: var(--ink); }
.plan .n-text { fill: var(--bg); }
.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; font-size: var(--t-s); font-weight: 700; }
.legend li { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend svg { width: 2.2rem; height: 1.5rem; flex: none; border-radius: 0.2rem; }
.garden-cols { display: flex; flex-direction: column; gap: 1.4rem; }
.greet { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.7rem; }
.greet h1 { font-size: var(--t-xl); }
.switcher { display: flex; align-items: center; gap: 0.7rem; width: 100%; min-height: var(--tap); padding: 0.4rem 0.9rem; border: 0.13rem solid var(--line-strong); border-radius: var(--r); background: var(--surface); text-align: left; }
.switcher svg { flex: none; width: 1.5rem; height: 1.5rem; color: var(--accent-text); }
.switcher .grow { display: flex; flex-direction: column; line-height: 1.25; }

/* ---------- pictures, calendar, timeline ---------- */
.pic { border-radius: var(--r-s); overflow: hidden; background: var(--i-sky); position: relative; }
.pic svg, .pic img { width: 100%; height: auto; display: block; }
.pic-tag { position: absolute; left: 0.4rem; bottom: 0.4rem; padding: 0.05rem 0.5rem; border-radius: 1rem; background: var(--p-label-bg); color: var(--p-label); font-size: 0.72rem; font-weight: 700; }
.pattern { border-radius: var(--r-s); background: var(--surface-2); padding: 0.5rem; }
.pattern svg { width: 100%; height: auto; max-height: 15rem; }
.pattern text { font-family: var(--f-body); font-weight: 700; fill: var(--ink); }
.pattern .pot-pat { max-width: 11rem; margin-inline: auto; }
.pattern .tray-pat { max-width: 16rem; margin-inline: auto; }
.cal { display: grid; grid-template-columns: minmax(0, 6.2rem) repeat(12, minmax(0, 1fr)); gap: 0.2rem 0.12rem; align-items: center; font-size: var(--t-xs); font-weight: 400; color: var(--ink); }
.cal .m { text-align: center; font-weight: 700; color: var(--ink-2); font-size: 0.74rem; }
.cal .m.now { color: var(--on-sun); background: var(--sun); border-radius: 0.3rem; }
.cal .lab { font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.cal .c { height: 1.15rem; border-radius: 0.2rem; background: var(--surface-2); }
.cal .c.half-a { background: linear-gradient(90deg, var(--surface-2) 50%, var(--cc) 50%); }
.cal .c.half-b { background: linear-gradient(90deg, var(--cc) 50%, var(--surface-2) 50%); }
.cal .c.on { background: var(--cc); }
.progress { height: 0.9rem; border-radius: 1rem; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 1rem; background: var(--accent); }
.stage { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); gap: 0.85rem; padding: 0.85rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.stage.now { border: 0.16rem solid var(--accent); }
.stage > .pic { align-self: start; }
.stage .stack-s p { overflow-wrap: anywhere; }
.stage-dates { font-weight: 700; color: var(--accent-text); }
@media (max-width: 22rem) { .stage { grid-template-columns: 1fr; } }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); gap: 0.5rem; }
.photo { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: var(--r-s); overflow: hidden; background: var(--i-sky); max-width: 100%; }
.photo img, .photo svg { width: 100%; height: 100%; object-fit: cover; }
.photo .pill { position: absolute; left: 0.3rem; bottom: 0.3rem; }
.bigphoto { border-radius: var(--r); overflow: hidden; background: var(--i-sky); }
.bigphoto img, .bigphoto svg { width: 100%; height: auto; display: block; }

/* ---------- club ---------- */
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 0.7rem; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.reacts { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.react { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.7rem; padding: 0.25rem 0.8rem; border: 0.13rem solid var(--line-strong); border-radius: 2rem; background: var(--surface); font-weight: 700; font-variant-numeric: tabular-nums; }
.react[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.react span { font-size: 1.25rem; line-height: 1; }
.react.add { border-style: dashed; color: var(--accent-text); font-size: var(--t-s); }
.react.add svg { width: 1.3rem; height: 1.3rem; }
.react.sm { min-height: 2.75rem; padding: 0.15rem 0.6rem; font-size: var(--t-s); }
.react.sm span { font-size: 1.1rem; }
.bubble .reacts { margin-top: 0.4rem; }
/* who chose which emoji, in words */
.who { display: flex; flex-wrap: wrap; gap: 0.1rem 0.9rem; font-size: var(--t-s); color: var(--ink-2); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.1rem, 1fr)); gap: 0.4rem; }
.emoji-btn { min-height: var(--tap); padding: 0; border: 0.13rem solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); font-size: 1.6rem; line-height: 1; }
.emoji-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
/* what a swap or a seed offer is about */
.post-crop { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.7rem; border-radius: var(--r-s); background: var(--surface-2); }
.seeds .row { align-items: flex-start; }
.comment { display: flex; gap: 0.7rem; align-items: flex-start; }
.comment .bubble { flex: 1; min-width: 0; background: var(--surface-2); border-radius: var(--r-s); padding: 0.6rem 0.8rem; overflow-wrap: anywhere; }
.ai { border: 0.13rem solid var(--frost); border-radius: var(--r); padding: 1rem; background: var(--surface); display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; }
.ai-tag { align-self: flex-start; }
.ai ul { display: flex; flex-direction: column; gap: 0.4rem; }
.ai li { position: relative; padding-left: 1.3rem; }
.ai li::before { content: ""; position: absolute; left: 0.2rem; top: 0.6em; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--frost); }
.ai-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.thinking { display: flex; align-items: center; gap: 0.7rem; font-weight: 700; color: var(--frost-ink); }
.thinking i { width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 0.2rem solid var(--frost-soft); border-top-color: var(--frost); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { display: flex; gap: 0.35rem; }
.steps i { flex: 1; height: 0.4rem; border-radius: 1rem; background: var(--surface-2); }
.steps i.on { background: var(--accent); }
.bullets { display: flex; flex-direction: column; gap: 0.4rem; }
.bullets li { position: relative; padding-left: 1.3rem; overflow-wrap: anywhere; }
.bullets li::before { content: ""; position: absolute; left: 0.2rem; top: 0.6em; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--accent); }

/* ---------- builder ---------- */
.bld { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.bld-top { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem var(--gutter); border-bottom: 1px solid var(--line); }
.bld-top h2 { flex: 1; min-width: 0; font-size: var(--t-l); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bld-top .btn { flex: none; }
@media (max-width: 33.99rem) { .bld-top { justify-content: space-between; } .bld-top h2.bld-title { display: none; } .bld-top .btn svg { display: none; } .bld-top .btn { padding-inline: 0.8rem; padding-inline: min(0.8rem, 3vw); font-size: min(1rem, 4.6vw); } .bld-top { gap: min(0.5rem, 2vw); } }
.bld-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.bld-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0.3rem 0.4rem; touch-action: none; overflow: hidden; }
.bld-stage svg { max-width: 100%; max-height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.bld-stage text { font-family: var(--f-body); font-weight: 700; fill: var(--p-label); pointer-events: none; }
.bld-stage .piece { cursor: grab; }
.bld-stage .sel-box { fill: none; stroke: var(--frost); stroke-width: 0.09; stroke-dasharray: 0.25 0.15; pointer-events: none; }
.bld-stage .handle { fill: var(--frost); stroke: #fff; stroke-width: 0.06; cursor: nwse-resize; }
.bld-stage .grip { fill: var(--frost); opacity: 0.85; pointer-events: none; }
.bld-bar { border-top: 1px solid var(--line); background: var(--surface); padding: 0.55rem var(--gutter); display: flex; flex-direction: column; gap: 0.45rem; }
.bld-hint { font-size: var(--t-s); color: var(--ink-2); min-height: 4.1em; line-height: 1.36; display: grid; position: relative; }
.bld-hint > span { grid-area: 1 / 1; min-width: 0; }
.bld-hint > .bld-over { position: absolute; left: 0; right: 0; bottom: 0; min-height: 100%; }
.bld-hint .bld-room { visibility: hidden; pointer-events: none; }
.bld-msg { display: block; padding: 0.4rem 0.7rem; border-radius: var(--r-s); background: var(--ink); color: var(--bg); font-weight: 700; }
.bld-tools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.35rem; gap: min(0.35rem, 1.6cqw); }
/* The tools keep to two rows of five on a phone and one row of nine where there is room, measured against the text size in use.
   With the text set large on a narrow phone their labels stop growing, so that no word is split and the plan keeps its space. */
.bld-bar { container-type: inline-size; }
.bld-tools .tool { font-size: min(0.76rem, 3.7cqw); padding-inline: 0; border-width: min(0.13rem, 2px); }
@container (min-width: 34rem) { .bld-tools { grid-template-columns: repeat(9, minmax(0, 1fr)); } .bld-tools .tool { font-size: 0.76rem; } .bld-hint { min-height: 2.8em; } }
.bld-side .pal { touch-action: pan-y; }
@media (max-height: 43rem) { .tool svg { display: none; } .tool { min-height: 2.5rem; } .bld-hint { font-size: var(--t-xs); } .bld-bar { padding-block: 0.4rem; } }
.tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; min-height: 3.1rem; padding: 0.3rem 0.1rem; border: 0.13rem solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); font-size: 0.76rem; font-weight: 700; line-height: 1.1; text-align: center; min-width: 0; overflow-wrap: anywhere; }
.tool svg { width: 1.4rem; height: 1.4rem; }
.tool.danger { color: var(--bad-ink); border-color: var(--bad); }
.tool:disabled { opacity: 0.38; cursor: default; }
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.6rem, 1fr)); gap: 0.55rem; }
.pal { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.6rem 0.3rem; border: 0.13rem solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); font-weight: 700; font-size: var(--t-s); line-height: 1.15; text-align: center; touch-action: none; }
.pal svg { width: 3.4rem; height: 3.4rem; }
.bld-side { display: none; }
.ghost { position: fixed; z-index: 80; pointer-events: none; opacity: 0.85; }
@media (min-width: 56rem) {
  .bld-main { flex-direction: row; }
  .bld-side { display: flex; flex-direction: column; gap: 0.8rem; width: 19rem; flex: none; overflow-y: auto; padding: 0.8rem var(--gutter); border-right: 1px solid var(--line); background: var(--surface); }
  .bld-side .palette { grid-template-columns: repeat(2, 1fr); }
  .bld-add-btn { display: none; }
}
.bld-col { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; }

/* ---------- wide screens ---------- */
@media (min-width: 56rem) {
  .wrap { max-width: 64rem; --gutter: 1.5rem; }
  .screen.narrow, .login { max-width: 36rem; margin-inline: auto; width: 100%; }
  .garden-cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; gap: 1.6rem; }
  .tabs-in { max-width: 50rem; }
}

/* ---------- Version 3: kind tabs, know more, simple to-do, planting plan, garden log ---------- */
.kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.3rem; padding: 0.3rem; border-radius: var(--r); background: var(--surface-2); }
.kinds:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kinds button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; min-height: 3.4rem; padding: 0.35rem 0.3rem; border: 0; border-radius: 0.65rem; background: none; font-weight: 700; color: var(--ink-2); line-height: 1.15; text-align: center; min-width: 0; }
.kinds button small { font-weight: 400; font-size: var(--t-xs); }
.kinds button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(19,35,26,.25); }
.vpick { border-radius: var(--r-s); }
.vpick .know { align-self: flex-start; margin: 0.15rem 0 0.2rem 0.3rem; }
.vpick.on .know { margin-left: 0.5rem; margin-bottom: 0.5rem; }
/* ---------- photographs of plants ---------- */
.ph { position: relative; display: block; overflow: hidden; border-radius: var(--r-s); background: var(--i-sky); aspect-ratio: 4 / 3; }
.ph.sq { aspect-ratio: 1; }
.ph > img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; }
.ph.ok > img { opacity: 1; }
.ph-alt { display: none; }
.ph.bad > .ph-alt { display: block; height: 100%; }
.ph.bad > .ph-alt svg { width: 100%; height: 100%; }
.phfig { display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start; }
.phfig > .ph { width: 100%; max-width: 32rem; }
.phfig figcaption { font-size: var(--t-s); overflow-wrap: anywhere; }
.ph-off { display: none; }
.ph.bad ~ .ph-off { display: block; }
.ph.bad ~ figcaption, .ph.bad ~ .btn, .ph.bad + .ph-cap { display: none; }
.phw { float: right; display: flex; flex-direction: column; gap: 0.15rem; width: min(5.6rem, 27vw); margin: 0 0 0.35rem 0.7rem; }
.ph-cap { font-size: var(--t-xs); font-weight: 400; line-height: 1.2; text-align: center; color: var(--ink-2); }
.choice.has-ph { display: flow-root; }
.choice.has-ph > span:not(.phw):not(.pills), .choice.has-ph > small { display: block; }
.choice.has-ph > .pills { margin-top: 0.25rem; }
.choice.has-ph > small { margin-top: 0.3rem; }
.choice[aria-pressed="true"] .ph-cap { color: var(--accent-text); }
.vtop { display: flow-root; min-width: 0; }
.vtop > .pills { margin-top: 0.4rem; }
.vtop > p { margin-top: 0.6rem; }
.credits li { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; }
.credits li > .btn { margin-left: -0.85rem; }
.lpics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.lp { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.lp figcaption { font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); }
.learn h2 { font-size: var(--t-xl); }
.learn .facts { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
a.row { text-decoration: none; color: inherit; }
.brk { overflow-wrap: anywhere; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* typing a planter's size, right under the drawing it changes */
.sizebox { display: flex; flex-direction: column; gap: 0.7rem; padding: 0.85rem 0.9rem; border-radius: var(--r-s); background: var(--accent-soft); }
.sizebox h3 { font-size: var(--t-m); }
.sizebox .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 0.6rem; }
/* the to-do list: a round button to tick, then the words */
.todo-list .todo-item { display: flex; align-items: flex-start; gap: 0.7rem; width: 100%; padding: 0.7rem 0.9rem; border: 0; background: none; text-align: left; }
.todo-item.as-btn { align-items: center; }
.todo-item > .chev { flex: none; width: 1.4rem; height: 1.4rem; color: var(--ink-2); align-self: center; }
.tick { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0.13rem solid var(--line-strong); background: var(--surface); color: var(--line-strong); }
.tick svg { width: 1.45rem; height: 1.45rem; }
button.tick:active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tick.none { border: 0; background: var(--surface-2); color: var(--ink-2); }
.tick.none.sun { background: var(--sun-soft); color: var(--sun-ink); }
.tick.done { border: 0; background: var(--accent-soft); color: var(--accent-text); }
button.tick.done { background: var(--accent); color: var(--accent-ink); }   /* a done job's tick is solid, and can be pressed to put the job back */
button.tick.done:active { background: var(--surface); color: var(--line-strong); box-shadow: inset 0 0 0 0.13rem var(--line-strong); }
.todo-main { flex: 1; min-width: 0; min-height: 2.75rem; display: flex; flex-direction: column; justify-content: center; gap: 0.15rem; padding: 0; border: 0; background: none; text-align: left; }
.todo-main .pills { margin-top: 0.2rem; }
.todo-item > .lg-day { width: 2.75rem; height: 2.75rem; }
/* the planner: one chart. Each space has its name, what is in it, and a strip of the year with the months written above it */
.pl-chart { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0.15rem 0.8rem 0.5rem; }
/* the months, written small above a bed's strip: J F M A M J J A S O N D, this month picked out */
.pl-mon { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); padding-left: 2px; font-size: 0.7rem; font-weight: 700; line-height: 1.25; color: var(--ink-2); text-align: center; }
.pl-mon b { border-radius: 0.25rem; }
.pl-mon b.now { color: var(--on-sun); background: var(--sun); }
.pl-months { position: sticky; top: var(--top-h, 3.7rem); z-index: 5; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); margin-inline: -0.8rem; padding: 0.45rem 0.8rem 0.35rem; background: var(--surface); border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); text-align: center; }
.pl-months span { border-radius: 0.3rem; }
.pl-months .now { color: var(--on-sun); background: var(--sun); }
.pl-bed { display: flex; flex-direction: column; padding-block: 0.35rem; }
.pl-bed + .pl-bed { border-top: 1px solid var(--line); }
.pl-row { display: flex; flex-direction: column; gap: 0.3rem; width: 100%; min-height: 2.75rem; padding: 0.35rem 0; border: 0; background: none; text-align: left; }
.pl-lab { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.5rem; min-width: 0; line-height: 1.2; overflow-wrap: anywhere; }
.pl-lab .num { width: 1.7rem; height: 1.7rem; font-size: var(--t-xs); }
.pl-bedname { padding-top: 0.35rem; }
.pl-sec { color: var(--ink-2); font-size: var(--t-s); }
.pl-what { margin-left: auto; font-weight: 700; font-size: var(--t-s); text-align: right; }
.pl-what.free { color: var(--accent-text); }
.pl-cells { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); }
.pl-cells i, .pl-key i { display: block; height: 1.1rem; background: var(--surface-2); }
.pl-cells i:nth-child(odd) { margin-left: 2px; border-radius: 0.2rem 0 0 0.2rem; }
.pl-cells i:nth-child(even) { border-radius: 0 0.2rem 0.2rem 0; }
.pl-cells i.now { box-shadow: inset 0 0 0 0.13rem var(--ink); }
.k-g { background: var(--accent) !important; }
.k-h { background: var(--sun) !important; }
.k-pg { background: repeating-linear-gradient(135deg, var(--accent) 0 0.2rem, var(--accent-soft) 0.2rem 0.4rem) !important; }
.k-ph { background: repeating-linear-gradient(135deg, var(--sun) 0 0.2rem, var(--sun-soft) 0.2rem 0.4rem) !important; }
.pl-key { display: block; width: 2.2rem; flex: none; }
.pl-key i { height: 1.35rem; border-radius: 0.2rem; border: 1px solid var(--line); }
/* the garden log */
.lg-bed { gap: 0.2rem; }
.lg-bedhead, .lg-head { display: flex; align-items: center; gap: 0.7rem; width: 100%; min-height: var(--tap); padding: 0.2rem 0; border: 0; background: none; text-align: left; }
.lg-bedhead .chev, .lg-head .chev { flex: none; width: 1.4rem; height: 1.4rem; color: var(--ink-2); }
.lg-crop { border-top: 1px solid var(--line); padding-top: 0.5rem; margin-top: 0.3rem; }
.lg-head > .grow { display: flex; flex-direction: column; }
.lg-lines, .lg-years { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.2rem 0 0.3rem; font-size: var(--t-s); }
.lg-lines li { display: grid; grid-template-columns: 3.7rem minmax(0, 1fr); gap: 0.5rem; overflow-wrap: anywhere; }
.lg-lines li.wide { display: block; color: var(--ink-2); }
.lg-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-note { display: block; color: var(--ink-2); }
.lg-years li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: 0.5rem; }
.lg-day { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 2.9rem; height: 2.9rem; border-radius: var(--r-s); background: var(--surface-2); line-height: 1.05; font-variant-numeric: tabular-nums; }
.lg-day small { font-size: 0.72rem; color: var(--ink-2); font-weight: 700; }
/* one bed drawn large on its own page, with a label on each part */
.bedpic { position: relative; width: 100%; margin-inline: auto; }
.bedpic svg { display: block; width: 100%; height: 100%; }
.bp-sec { position: absolute; display: flex; align-items: flex-end; justify-content: center; padding: 0.3rem 0.15rem; border: 0; border-radius: 0.4rem; background: none; min-width: 0; }
.bp-sec.alt { align-items: flex-start; }   /* every other label sits at the top, so neighbours never meet */
button.bp-sec:active { background: rgba(255,255,255,.25); }
.bp-lab { flex: none; max-width: 100%; min-width: min-content; padding: 0.12rem 0.45rem; border-radius: 0.5rem; background: var(--p-label-bg); color: var(--p-label); font-size: var(--t-xs); font-weight: 700; line-height: 1.15; text-align: center; }   /* words stay whole: a long name may reach a little over the edge of a narrow part */
.bp-lab small { display: block; font-weight: 400; font-size: inherit; }
.bp-lab.off { font-weight: 400; }
/* a bed that is not split: the whole drawing is one button, and its name sits underneath, clear of the plants */
.bp-sec.one { position: static; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0.4rem; width: 100%; margin-inline: auto; padding: 0 0 0.2rem; }
.bp-sec.one .bedpic { display: block; }
.bp-sec.one .bp-lab { width: max-content; max-width: 100cqw; padding: 0; background: none; color: var(--ink); font-size: var(--t-m); }
.bp-sec.one .bp-lab.off { color: var(--ink-2); }
/* on the garden plan: the "Planned" tag, and a ring round the bed that has just been planted */
.tag-b { fill: var(--accent); }
.cap-b { fill: var(--p-label-bg); }   /* the little label under a planter */
.cap-b.card { fill: var(--p-card); stroke: var(--p-ground); }   /* the card for a crop in the ground: its name, its week, and a bar */
.plan text.cap-s { font-weight: 500; fill: var(--accent-text); }
.plan text.cap-s.sun { fill: var(--sun-ink); } .plan text.cap-s.warn { fill: var(--warn-ink); }
.cap-track { fill: var(--p-track); } .cap-track.in { fill: var(--p-label-bg); }
.cap-fill { fill: var(--accent); } .cap-fill.sun { fill: var(--sun); } .cap-fill.warn { fill: var(--warn); }
.cap-b, .tag-b, .cap-track, .cap-fill { pointer-events: none; }
.plan .hit2 { cursor: pointer; }
.plan text.tag-t, text.tag-t { fill: var(--accent-ink); font-family: var(--f-body); font-weight: 700; pointer-events: none; }
.tag-i { fill: none; stroke: var(--accent-ink); stroke-linecap: round; stroke-linejoin: round; }
.plan .hl { fill: none; stroke: var(--sun); stroke-width: 0.2; pointer-events: none; opacity: 0; animation: hl 6s ease-out 1 both; }
@keyframes hl { 0% { opacity: 0; stroke-width: 0.5; } 8% { opacity: 1; stroke-width: 0.2; } 20% { opacity: 0.35; } 32% { opacity: 1; } 44% { opacity: 0.35; } 56% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .plan .hl { animation: none !important; opacity: 1; } }

/* ---------- small phones with the text set large ----------
   Measured against the text size in use, so these apply when there is room for fewer letters across, whatever the cause. */
@container (max-width: 17rem) {
  .row .chev { display: none; } .row { gap: 0.55rem; padding-inline: 0.6rem; flex-wrap: wrap; } .row > .grow { min-width: 55%; } .row > .pill { margin-left: auto; }   /* give the words the room the arrow took; a tag drops to the next line */
  .switcher { flex-wrap: wrap; } .switcher .grow { min-width: 60%; } .switcher .pill { margin-left: auto; }
  .seg { grid-auto-flow: row; } .kinds, .kinds:has(> :nth-child(2):last-child) { grid-template-columns: minmax(0, 1fr); }   /* choices one above the other */
  .lpics { grid-template-columns: minmax(0, 1fr); } .facts, .card .facts, .sheet .facts, .learn .facts { grid-template-columns: minmax(0, 1fr); }
  .lg-bedhead .chev, .lg-head .chev, .todo-item > .chev { display: none; }   /* as in other lists, the arrow makes way for the words */
  .todo-list .todo-item { flex-wrap: wrap; } .todo-item > .todo-main { flex: 1 1 55%; } .todo-item > .btn.sm { margin-left: auto; }   /* "Remove" drops under the words */
  .lg-bedhead h3, .pl-lab b { font-size: var(--t-m); }
  .stage { grid-template-columns: minmax(0, 1fr); } .stage > .pic { max-width: 12rem; }   /* picture above the words */
  .choice.has-ph > .phw, .vtop > .phw { float: none; width: 100%; margin: 0 0 0.5rem; } .phw > .ph.sq { aspect-ratio: 16 / 9; }   /* a variety's photograph runs across the top of its card, so its name and the words below keep the full width */
  .cal { grid-template-columns: repeat(12, minmax(0, 1fr)); } .cal > span:first-child { display: none; } .cal .lab { grid-column: 1 / -1; margin-top: 0.3rem; }   /* each row's name sits above its twelve months, so the months have the full width */
}
@container (max-width: 12.5rem) { .row > .thumb, .lg-head > .thumb { display: none; } .switch-row { gap: 0.5rem; padding-inline: 0.6rem; } .row-title, .row-sub, h1, h2, h3 { hyphens: auto; -webkit-hyphens: auto; } }   /* the very tightest case: the small pictures in lists make way for the words */

/* ---------- added for the real app ---------- */
/* a small icon in a line of words */
svg.inl { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; color: var(--accent-text); }
/* a stage drawing with a photograph behind it: tap to turn it over */
button.pic.flip { display: block; width: 100%; padding: 0; border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
button.pic.flip .pic-tag { background: var(--accent); color: var(--accent-ink); }
.pic-photo { aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
/* A small drawing carries a short label. Turned over, its photograph takes the full width of the card, so that it can be seen properly. */
.pic .pic-tag svg { display: inline-block; width: 0.95rem; height: 0.95rem; flex: none; }
.pic-tag.short { display: none; }
.stage .pic.flip[aria-pressed="false"] .pic-tag.long, .lp .pic.flip[aria-pressed="false"] .pic-tag.long { display: none; }
.stage .pic.flip[aria-pressed="false"] .pic-tag.short, .lp .pic.flip[aria-pressed="false"] .pic-tag.short { display: inline-flex; align-items: center; gap: 0.25rem; }
.stage:has(> .pic.flip[aria-pressed="true"]) { grid-template-columns: minmax(0, 1fr); }
.lp:has(> .pic.flip[aria-pressed="true"]) { grid-column: 1 / -1; }
.pic-credit { position: absolute; right: 0; top: 0; max-width: 100%; padding: 0.1rem 0.45rem; border-bottom-left-radius: var(--r-s); background: var(--p-label-bg); color: var(--p-label); font-size: 0.66rem; line-height: 1.3; overflow-wrap: anywhere; }
/* no signal: a small flag in the top bar while changes wait to be sent */
html.offline .top-in::after { content: "No signal"; flex: none; align-self: center; padding: 0.15rem 0.55rem; border-radius: 1rem; background: var(--warn-soft); color: var(--warn-ink); font-size: var(--t-xs); font-weight: 700; }
html.offline .top-in.flashing::after { display: none; }
