:root {
  color-scheme: light;
  --bg: #f5f7f1;
  --surface: #ffffff;
  --surface-soft: #edf3e9;
  --ink: #223228;
  --muted: #758276;
  --line: #e3e9df;
  --green: #39734b;
  --green-dark: #275b38;
  --green-pale: #dcebdc;
  --amber: #f2dfb9;
  --shadow: 0 12px 36px rgba(39, 67, 43, .08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px calc(104px + env(safe-area-inset-bottom));
}

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.brand { display: flex; gap: 11px; align-items: center; }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 15px;
  color: var(--green-dark); background: var(--green-pale); font-size: 23px;
}
.brand-name { font-size: 17px; font-weight: 760; letter-spacing: -.3px; }
.brand-caption { margin-top: 2px; color: var(--muted); font-size: 12px; }
.region-button, .icon-button {
  border: 0; border-radius: 999px; background: var(--surface); color: var(--ink);
  box-shadow: 0 2px 10px rgba(39, 67, 43, .05);
}
.region-button { max-width: 160px; padding: 10px 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

.welcome {
  position: relative; overflow: hidden; padding: 23px; border-radius: 25px;
  background: linear-gradient(130deg, #dcebdc, #eff4e9 70%, #f5f1df); box-shadow: var(--shadow);
}
.welcome::after { content: ""; position: absolute; right: -24px; bottom: -58px; width: 180px; height: 180px; border: 1px solid rgba(57,115,75,.12); border-radius: 50%; box-shadow: 0 0 0 22px rgba(255,255,255,.14), 0 0 0 46px rgba(255,255,255,.12); }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.welcome h1 { position: relative; z-index: 1; max-width: 350px; margin: 9px 0 8px; font-size: clamp(25px, 7vw, 32px); line-height: 1.08; letter-spacing: -1.1px; }
.welcome p { position: relative; z-index: 1; max-width: 350px; margin: 0; color: #596b5c; font-size: 14px; line-height: 1.5; }
.welcome-meta { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; margin-top: 19px; color: #365640; font-size: 12px; font-weight: 650; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #6a9e67; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 25px 2px 13px; }
.section-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.4px; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.text-button { border: 0; padding: 6px 0; color: var(--green); background: transparent; font-size: 13px; font-weight: 700; white-space: nowrap; }

.task-list { display: grid; gap: 11px; }
.task-card {
  padding: 15px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface);
  box-shadow: 0 4px 18px rgba(39, 67, 43, .035);
}
.task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-title { margin: 0; font-size: 15px; font-weight: 720; line-height: 1.35; }
.task-description { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.task-trigger { display: inline-flex; align-items: center; gap: 6px; margin-top: 13px; padding: 7px 9px; border-radius: 10px; color: #47664b; background: #f0f5ed; font-size: 11px; font-weight: 650; }
.task-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; }
.task-tag { color: var(--muted); font-size: 11px; }
.done-button { flex: 0 0 auto; border: 0; border-radius: 999px; padding: 9px 12px; color: white; background: var(--green); font-size: 11px; font-weight: 700; }
.done-button:active, .primary-button:active { transform: translateY(1px); }
.empty-state { padding: 25px 20px; border: 1px dashed #cbd7c9; border-radius: 18px; color: var(--muted); background: rgba(255,255,255,.56); text-align: center; font-size: 13px; line-height: 1.5; }
.completed-list { margin-top: 22px; }
.completed-item { display: flex; align-items: center; gap: 11px; padding: 11px 3px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.check-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--green); background: var(--green-pale); font-size: 13px; }

.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 15px; padding: 13px 16px; color: white; background: var(--green); font-size: 14px; font-weight: 720; box-shadow: 0 7px 17px rgba(57,115,75,.18); }
.wide-button { width: 100%; margin-top: 17px; }
.secondary-button { border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; color: var(--green-dark); background: white; font-size: 13px; font-weight: 650; }

.garden-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.garden-card { min-height: 124px; padding: 15px; border: 1px solid var(--line); border-radius: 19px; background: white; }
.garden-icon { display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 13px; border-radius: 12px; background: var(--surface-soft); font-size: 18px; }
.garden-card strong { display: block; font-size: 14px; }
.garden-card span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.plant-list { display: grid; gap: 10px; margin-top: 17px; }
.plant-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.plant-row strong { display: block; font-size: 13px; }
.plant-row span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.remove-button { border: 0; padding: 8px; color: #9a7464; background: transparent; font-size: 12px; }

.stage-list { display: grid; gap: 11px; }
.stage-card { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.stage-number { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; color: var(--green-dark); background: var(--green-pale); font-size: 13px; font-weight: 750; }
.stage-card h3 { margin: 1px 0 5px; font-size: 14px; }
.stage-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.notice { margin-top: 16px; padding: 13px; border-radius: 14px; color: #725e37; background: #f8f0dd; font-size: 11px; line-height: 1.5; }

.profile-card { padding: 18px; border: 1px solid var(--line); border-radius: 19px; background: white; }
.profile-label { color: var(--muted); font-size: 11px; }
.profile-value { margin: 5px 0 14px; font-size: 15px; font-weight: 700; }
.profile-note { margin: 17px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.small-label { display: inline-block; margin-bottom: 9px; padding: 6px 8px; border-radius: 8px; color: #47664b; background: #f0f5ed; font-size: 10px; font-weight: 700; }

.bottom-nav {
  position: fixed; z-index: 5; right: 0; bottom: 0; left: 0; display: flex; justify-content: center;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(220,228,218,.9);
  background: rgba(250,251,248,.94); backdrop-filter: blur(18px);
}
.nav-inner { display: grid; grid-template-columns: repeat(4, 1fr); width: min(100%, 560px); gap: 4px; }
.nav-button { display: grid; justify-items: center; gap: 4px; border: 0; border-radius: 13px; padding: 7px 4px 5px; color: #8a9689; background: transparent; font-size: 10px; }
.nav-button.active { color: var(--green-dark); background: #edf4ea; font-weight: 720; }
.nav-icon { font-size: 18px; line-height: 1; }

.modal { width: min(calc(100% - 28px), 480px); max-height: min(84vh, 720px); padding: 0; border: 0; border-radius: 23px; color: var(--ink); background: var(--bg); box-shadow: 0 20px 70px rgba(0,0,0,.25); }
.modal::backdrop { background: rgba(22,34,25,.42); backdrop-filter: blur(3px); }
.modal-content { padding: 20px; }
.modal-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-heading h2 { margin: 0; font-size: 19px; }
.close-button { width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--muted); background: white; font-size: 20px; }
.field { display: grid; gap: 7px; margin: 13px 0; color: #48584b; font-size: 12px; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; border: 1px solid #dce4d8; border-radius: 12px; padding: 11px 12px; outline: none; color: var(--ink); background: white; font-size: 14px; }
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #77a77d; box-shadow: 0 0 0 3px rgba(88,145,95,.12); }
.field-hint { margin-top: -3px; color: var(--muted); font-size: 10px; font-weight: 400; }
.form-actions { display: flex; gap: 9px; margin-top: 19px; }
.form-actions > * { flex: 1; }

@media (max-width: 370px) {
  .app-shell { padding-right: 13px; padding-left: 13px; }
  .welcome { padding: 19px; }
  .region-button { max-width: 124px; }
}
:root {
  color-scheme: light;
}

.sync-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  padding: 10px 14px;
  border: 1px solid #dce8d5;
  border-radius: 14px;
  background: #f1f7ed;
  color: #52624d;
  font-size: 12px;
  line-height: 1.4;
}

.retry-button {
  border: 0;
  padding: 4px 0 4px 8px;
  background: transparent;
  color: #39643d;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.startup-error {
  display: grid;
  min-height: 70vh;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 32px 20px;
  text-align: center;
}

.startup-error .brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 20px;
  background: #e7f0df;
  color: #527448;
  font-size: 30px;
}

.startup-error h1,
.startup-error p {
  margin: 0;
}

.startup-error p {
  max-width: 360px;
  color: #697565;
  line-height: 1.55;
}
