/* My garden. Plan is #6A4B9C (white text 6.78:1). Dark plan is #C3A9F0. */
.garden-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0 0 12px; }
.garden-nav a { text-decoration: none; color: var(--fg); min-height: 44px; display: inline-flex; align-items: center; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.st { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 12px; }
.st b { font-family: var(--display); font-size: 1.6rem; display: block; }
.tri { display: flex; gap: 4px; }
.tri button { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--control, #868E88); background: var(--surface); color: var(--fg); }
.tri button[data-state="growing"].on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.tri button[data-state="intend"].on { background: #6A4B9C; color: #fff; border-color: #6A4B9C; }
:root[data-theme="dark"] .tri button[data-state="intend"].on, :root[data-theme="dark"] .reason.plan { background: #241a33; color: #C3A9F0; border-color: #C3A9F0; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.sizes button { min-height: 44px; border-radius: 14px; }
.sizes button.on { background: var(--fg); color: var(--bg); }
.plant-row, .grow-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border); width: 100%; }
.plant-row > div:first-child { flex: 1 1 100%; min-width: 0; max-width: 100%; }
.grow-row > a, .grow-row > span { flex: 1 1 auto; min-width: 0; max-width: 100%; }
.plant-row > .tri { flex: 0 0 auto; }
.plant-row b, .grow-row a, .grow-row span, .pc b, .library h2, .library h2 a {
  display: block; width: 100%; min-width: 0; max-width: 100%; overflow-wrap: break-word; word-break: normal;
}
h1, h2, h3 { min-width: 0; max-width: 100%; overflow-wrap: break-word; word-break: normal; }
@media (max-width: 420px) { h1 { font-size: 2rem; line-height: 1.15; } }
.sec-h h2, .sh-h h1 { width: auto; flex: 1 1 auto; }
.reason { display: inline-block; margin: 4px 0 0; font-size: 0.75rem; font-weight: 600; }
button.tick { width: 44px; height: 44px; border: 0; background: transparent; padding: 0; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.seg { display: flex; flex-wrap: nowrap; gap: 2px; background: var(--border); border-radius: 999px; padding: 3px; margin: 0 0 12px; overflow: hidden; }
.seg a { flex: 1 0 auto; min-width: max-content; white-space: nowrap; min-height: 40px; display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--fg); border-radius: 999px; font-size: 0.82rem; padding: 0 8px; }
.seg a[aria-current="page"] { background: var(--surface, #fff); font-weight: 650; }
.subtoggle { display: inline-flex; gap: 2px; margin: 0 0 12px; padding: 2px; background: var(--border); border-radius: 999px; }
.subtoggle a { color: var(--fg); text-decoration: none; min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 0.85rem; }
.subtoggle a[aria-current="page"] { background: var(--surface, #fff); font-weight: 650; }
details > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.grow-top > summary { position: sticky; top: 0; z-index: 2; background: var(--bg); font-weight: 650; font-size: 1.05rem; }
details > summary .ic { width: 18px; height: 18px; flex: none; }
details[open] > summary .ic { transform: rotate(90deg); }
.grow-group { margin: 0 0 4px 8px; }
.grow-line { display: flex; align-items: center; gap: 4px; min-height: 48px; }
button.tick-add { width: 48px; height: 48px; min-width: 48px; border: 0; background: transparent; padding: 0; display: grid; place-items: center; }
button.tick-add .tick-face { width: 24px; height: 24px; border-radius: 4px; border: 1.5px solid var(--control, #868E88); display: grid; place-items: center; }
.save-plants { position: sticky; bottom: calc(4.5rem + env(safe-area-inset-bottom)); z-index: 3; display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 12px 0; }
button.tick-add[aria-pressed="true"] .tick-face { background: var(--accent); color: var(--accent-fg, #fff); border-color: var(--accent); }
button.tick-add .ic { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-chip { border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; font-size: 0.82rem; }
dialog.sheet { border: 0; border-radius: 16px 16px 0 0; margin: auto 0 0; width: 100%; max-width: 40rem; max-height: 85vh; padding: 16px 16px 0; font-family: var(--font); color: var(--fg); background: var(--bg); }
dialog.sheet h2, dialog.sheet h3 { font-family: var(--display); }
dialog.sheet::backdrop { background: rgba(13, 17, 16, 0.45); }
dialog.sheet label, dialog.sheet .field-label { display: block; font-weight: 650; margin: 12px 0 6px; }
dialog.sheet input, dialog.sheet select, dialog.sheet textarea { width: 100%; max-width: none; box-sizing: border-box; }
dialog.sheet input[type="text"], dialog.sheet input:not([type]) { appearance: none; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--control, #868E88); background: var(--surface, #fff); font: inherit; color: var(--fg); }
#plot-sheet[open] { display: flex; flex-direction: column; }
#plot-sheet form { display: flex; flex-direction: column; overflow: auto; min-height: 0; }
#plot-sheet form button[type="submit"] { position: sticky; bottom: 0; width: 100%; margin-top: 16px; border-radius: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); padding-top: 12px; }
dialog.sheet textarea { min-height: 6rem; }
#pest-list button.rt { border: 0; background: transparent; text-align: left; width: 100%; box-shadow: none; }
.seg-choice { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-choice button { min-height: 44px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.seg-choice button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg, #fff); border-color: var(--accent); }
.seg-choice .ic { width: 16px; height: 16px; }
dialog.sheet .sheet-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; }
button.text { background: transparent; border: 0; color: var(--fg); min-height: 44px; }
button.swap { min-height: 44px; min-width: 44px; border-radius: 999px; }
.entry-list { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
a.entry { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface, #fff); color: var(--fg); text-decoration: none; }
a.entry .entry-ic { width: 28px; height: 28px; display: grid; place-items: center; flex: none; }
a.entry .entry-copy { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
a.entry small { color: var(--muted); }
a.entry .chev { color: var(--muted); font-size: 1.4rem; }
.start-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.start-steps a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--border); text-decoration: none; color: var(--fg); background: var(--surface, #fff); }
#garden-summary { margin: 0 0 12px; }
body { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
html[data-theme="dark"] { --muted: #D5DDD8; }
html[data-theme="dark"] .site-nav a { color: #E7EEEA; }
a { color: var(--link); }
.mode-seg { flex-wrap: nowrap; }
.mode-seg button { flex: 1 1 0; min-width: 0; font-size: 0.82rem; padding-left: 0.25rem; padding-right: 0.25rem; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.file-btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--accent); cursor: pointer; }
input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
body[data-page="review-portal"] .site-nav, body[data-page="review-portal"] .site-footer { display: none; }
body[data-page="review-portal"] { padding-bottom: 1.5rem; }
.chip-row { overflow-x: auto; flex-wrap: nowrap; }
.seg { overflow-x: auto; }
button.swap { min-width: 48px; min-height: 48px; }
dialog.sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: min(100%, 32rem); max-height: 85vh; overflow: auto; border: 0; border-radius: 16px 16px 0 0; background: var(--bg); color: var(--fg); padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); z-index: 40; }
dialog.sheet::backdrop { background: rgba(13, 17, 16, 0.5); }
.project-pick { display: block; margin: 8px 0 12px; }
.project-pick select { display: block; width: 100%; min-height: 48px; margin-top: 4px; }
.meta-chip { display: inline-block; margin: 0 0 0 6px; padding: 2px 8px; border-radius: 999px; background: var(--note-bg); border: 1px solid var(--note-border); font-size: 0.85rem; }
.start-steps { list-style: none; padding: 0; margin: 0; }
.plot-block { border: 1px solid var(--border); border-radius: 16px; padding: 12px; margin: 0 0 14px; background: var(--surface, #fff); }
.stage-chip, .warn-badge { display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); font-size: 0.85rem; }
.warn-badge { background: var(--note-bg); }
.qa, .seed-batch label, .seed-one label, .backup-note button { min-height: 44px; display: flex; align-items: center; gap: 8px; }
.backup-note { margin: 0 0 12px; }
.backup-note a { margin-right: 12px; }
.qa-row { display: flex; flex-wrap: wrap; gap: 6px; }
.seed-batch fieldset, .seed-one fieldset { border: 1px solid var(--border); border-radius: 12px; margin: 0 0 12px; padding: 8px 12px; }
.seed-batch input[type="radio"], .seed-one input[type="radio"] { width: 20px; height: 20px; }
@media (max-width: 380px) {
  .qa-row { flex-direction: column; }
  .qa-row .qa { width: 100%; }
}
.start-steps .entry { margin: 8px 0; }
body[data-page="chapter"] { padding-bottom: 0; }
html:not([data-theme="contrast"]) main a:not(.button):not(.entry):not(.cover):not(.dock-nav):not(.reader-back) { color: var(--accent); }
#plate-view[open] { position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0; background: #0D1110; color: #fff; display: flex; flex-direction: column; }
#plate-view .plate-bar { display: flex; gap: 8px; padding: 8px; }
#plate-view button { min-height: 48px; min-width: 48px; }
#plate-view img { flex: 1 1 auto; min-height: 0; width: 100%; object-fit: contain; background: #0D1110; }
#plate-caption { margin: 0; padding: 8px 12px 16px; text-align: center; }
@media (min-width: 64rem) {
  body[data-page="tasks"] main { max-width: 72rem; }
  body[data-page="tasks"] main > .controls { display: inline-flex; margin-right: 8px; }
}
#plate-view[open] { position: fixed; inset: 0; z-index: 30; }
body[data-page="chapter"] main { padding-top: 4.75rem; }
.reader-bar { position: sticky; top: 0; z-index: 5; background: var(--bg); }
#review-item-sheet .controls { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
@media (min-width: 64rem) {
  .entry-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .controls { flex-wrap: nowrap; }
}
.ic { width: 18px; height: 18px; }
button.tick .tick-face { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--control, #868E88); display: grid; place-items: center; }
.row.done button.tick .tick-face { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.seed-list { list-style: none; padding: 0; margin: 0 0 0.5rem; }
.seed-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; padding: 0.75rem 0; border-top: 1px solid var(--border); }
.seed-main { min-width: 0; flex: 1 1 12rem; }
.seed-main b, .seed-main p { margin: 0; }
.seed-main p { margin-top: 0.2rem; }
.seed-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; }
.seed-actions button, .seed-date input, #packet-form input, #packet-form button, #add-packet { min-height: 44px; }
.seed-date { display: flex; flex-direction: column; font-size: 0.85rem; gap: 0.15rem; }
.seed-foot { margin: 0.75rem 0 1.25rem; }
#packet-form { display: grid; gap: 0.5rem; max-width: 24rem; margin-top: 0.75rem; }
#add-packet { margin-top: 0.75rem; }
#undo-toast { margin-top: 0.75rem; }
#away-app input, #away-app button, #away-app textarea { min-height: 44px; max-width: 100%; }
#away-app label { display: block; margin-top: 0.5rem; }
#away-app .card, #swap-app .card { margin: 0.75rem 0; border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface); }
#swap-app input, #swap-app button, #swap-app textarea { min-height: 44px; max-width: 100%; }
#swap-app label { display: block; margin-top: 0.5rem; }
#swap-app .swap-check { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; }
#swap-sheet { white-space: pre-wrap; font-family: inherit; border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
#harvest-app input, #harvest-app button, #harvest-app select, #harvest-app textarea { min-height: 44px; max-width: 100%; }
#harvest-app label { display: block; margin-top: 0.5rem; }
#harvest-app .card, #glut-slot .card { margin: 0.75rem 0; border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface); }
#glut-slot input, #glut-slot button, #glut-slot select { min-height: 44px; max-width: 100%; }
#glut-slot label { display: block; margin-top: 0.5rem; }
#garden-map input, #garden-map button, #garden-map select, #garden-map textarea { min-height: 44px; max-width: 100%; }
#garden-map label { display: block; margin-top: 0.5rem; }
#garden-map .gmap-svg { width: 100%; height: 70vh; min-height: 16rem; display: block; touch-action: none; background: #f7f3e8; }
html[data-theme="dark"] #garden-map .gmap-svg { background: #1e2126; }
html[data-theme="contrast"] #garden-map .gmap-svg { background: #000; }
@media (prefers-reduced-motion: reduce) {
  #garden-map, #garden-map .gmap-svg { scroll-behavior: auto; transition: none; }
}
#garden-map .gmap-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; }
#garden-map .card { margin: 0.75rem 0; border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface); }
@media print {
  body[data-page="swap"] .site-header,
  body[data-page="swap"] .site-footer,
  body[data-page="swap"] .seg,
  body[data-page="swap"] #swap-intro,
  body[data-page="swap"] #swap-list,
  body[data-page="swap"] .controls,
  body[data-page="swap"] #swap-links,
  body[data-page="swap"] #swap-status { display: none !important; }
}
