:root {
  --fun-green: #165f39;
  --middle-green: #518f5c;
  --jaded-lime: #bcd5ac;
  --timberwolf: #f0eee5;
  --olivine: var(--jaded-lime);
  --palm-leaf: var(--middle-green);
  --dark-moss: var(--fun-green);
  --kombu: #123623;
  --paper: #fbfaf4;
  --ink: #18251d;
  --muted: #697267;
  --line: rgba(22, 95, 57, 0.14);
  --shadow: 0 18px 50px rgba(22, 95, 57, 0.12);
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(145deg, var(--timberwolf), #fbfaf4 52%, rgba(188, 213, 172, 0.55));
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  font-weight: 400;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell {
  position: relative;
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 16px 116px;
  background: rgba(247, 246, 239, 0.82);
  backdrop-filter: blur(22px);
}
.topbar, .section-title, .result-row, .plant-profile { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.topbar { margin-bottom: 18px; }
.eyebrow { margin: 0 0 4px; color: var(--palm-leaf); font-size: 12px; font-weight: 650; letter-spacing: 0; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; color: var(--kombu); font-size: 30px; font-weight: 680; line-height: 1; }
h2 { margin-bottom: 10px; color: var(--kombu); font-size: 24px; font-weight: 650; line-height: 1.1; }
h3 { margin-bottom: 6px; color: var(--kombu); font-size: 16px; font-weight: 650; line-height: 1.2; }
p, small { color: var(--muted); line-height: 1.45; }
.icon-button { display: grid; width: 46px; height: 46px; place-items: center; border: 0; border-radius: 50%; background: var(--kombu); color: var(--timberwolf); font-weight: 800; }
.screen { display: none; }
.screen.active { display: block; animation: rise 0.24s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.hero-plant { position: relative; overflow: hidden; min-height: 168px; margin-bottom: 24px; padding: 24px; border-radius: 28px; background: linear-gradient(135deg, var(--middle-green), var(--fun-green)); box-shadow: var(--shadow); }
.hero-plant h2, .hero-plant p { position: relative; z-index: 2; max-width: 265px; }
.hero-plant h2 { color: #f7f6ef; }
.hero-plant p { color: rgba(247, 246, 239, 0.78); }
.hero-plant .eyebrow { color: #c8deb1; }
.leaf-stack span, .plant-photo, .profile-photo { background-size: cover; background-position: center; }
.leaf-stack span { position: absolute; display: block; border-radius: 65% 10% 65% 10%; background: linear-gradient(135deg, #bfd39a, var(--palm-leaf)); opacity: 0.92; transform: rotate(-28deg); }
.leaf-stack span:nth-child(1) { right: -18px; bottom: 26px; width: 122px; height: 72px; }
.leaf-stack span:nth-child(2) { right: 44px; bottom: -18px; width: 104px; height: 60px; background: linear-gradient(135deg, var(--olivine), var(--palm-leaf)); }
.leaf-stack span:nth-child(3) { right: 18px; top: 8px; width: 72px; height: 45px; opacity: 0.55; }
.garden-overview { display: grid; grid-template-columns: 1fr auto; gap: 14px; margin-bottom: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 26px; background: rgba(255,255,250,.72); box-shadow: 0 12px 34px rgba(22,95,57,.08); }
.garden-overview h2 { margin: 0; }
.garden-next { grid-column: 1 / -1; display: grid; gap: 4px; padding: 13px 14px; border-radius: 18px; background: rgba(188,213,172,.24); }
.garden-next span { color: var(--fun-green); font-size: 13px; font-weight: 800; }
.garden-next small { font-size: 12px; }
.text-button { border: 0; background: transparent; color: var(--dark-moss); font-weight: 800; }
.list-stack, .action-grid, .care-list, .task-list, .catalog-list { display: grid; gap: 12px; }
.plant-card, .result-card, .condition-block, .care-item, .task-card, .large-action, .upload-zone, .empty-state, .success-card { border: 1px solid var(--line); border-radius: 24px; background: rgba(255, 255, 250, 0.78); box-shadow: 0 10px 30px rgba(55, 68, 38, 0.08); }
.plant-card, .care-item, .task-card, .large-action, .catalog-item button, .primary-button, .ghost-button { transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease; }
.plant-card:active, .large-action:active, .catalog-item button:active, .primary-button:active, .ghost-button:active { transform: scale(0.98); }
.plant-gallery { gap: 16px; }
.plant-card { position: relative; display: grid; grid-template-columns: 1fr; gap: 0; padding: 8px; overflow: hidden; }
.plant-photo { min-height: 210px; overflow: hidden; border-radius: 20px; background: linear-gradient(145deg, var(--jaded-lime), var(--middle-green) 58%, var(--fun-green)); }
.plant-photo img, .profile-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.plant-info { position: relative; display: grid; gap: 12px; min-width: 0; padding: 14px 6px 6px; }
.plant-place { margin-bottom: 4px; color: var(--palm-leaf); font-size: 12px; font-weight: 800; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { padding: 7px 9px; border-radius: 999px; background: rgba(159, 184, 120, 0.22); color: var(--dark-moss); font-size: 11px; font-weight: 800; }
.plant-next-task { display: grid; gap: 3px; padding: 12px; border-radius: 18px; background: rgba(188,213,172,.22); }
.plant-next-task span { color: var(--middle-green); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.plant-next-task strong { color: var(--kombu); font-size: 14px; font-weight: 700; }
.plant-next-task small { font-size: 12px; }
.delete-plant-button { position: absolute; right: 16px; top: 16px; display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 50%; background: rgba(255,250,244,.86); color: #9f3f24; box-shadow: 0 8px 20px rgba(24,37,29,.14); }
.delete-plant-button svg { width: 17px; height: 17px; fill: currentColor; }
.section-heading { margin: 6px 0 18px; }
.large-action { display: grid; min-height: 118px; gap: 5px; padding: 18px; text-align: left; background: linear-gradient(135deg, rgba(255,255,250,.88), rgba(159,184,120,.22)); }
.large-action:hover { box-shadow: 0 14px 34px rgba(55, 68, 38, 0.12); transform: translateY(-1px); }
.large-action.active { background: var(--olivine); }
.action-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--palm-leaf); color: #fffef5; }
.step-indicator { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: -4px 0 18px; }
.step-indicator span { height: 7px; border-radius: 999px; background: rgba(55, 68, 38, 0.12); transition: background .22s ease, transform .22s ease; }
.step-indicator span.active { background: var(--olivine); transform: scaleY(1.12); }
.add-step { display: none; }
.add-step.active { display: block; animation: stepIn .24s ease-out; }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
.back-button { min-height: 38px; margin-bottom: 12px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(223, 221, 209, .52); color: var(--dark-moss); font-weight: 900; }
.upload-zone { display: grid; min-height: 148px; margin: 14px 0; padding: 20px; place-items: center; text-align: center; border-style: dashed; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-zone span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: var(--dark-moss); color: var(--timberwolf); font-size: 30px; }
.photo-preview { display: none; width: 100%; max-height: 210px; object-fit: cover; border-radius: 20px; }
.upload-zone.has-preview { gap: 12px; }
.upload-zone.has-preview span { display: none; }
.upload-zone.has-preview .photo-preview { display: block; }
.upload-zone.is-loading { position: relative; overflow: hidden; }
.upload-zone.is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 20%, rgba(255,255,250,.42), transparent 78%); animation: shimmer 1.15s linear infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.status-error { color: #9f3f24; font-weight: 900; }
.status-ok { color: var(--dark-moss); font-weight: 900; }
.search-field { margin-bottom: 12px; }
.result-card, .condition-block, .empty-state { padding: 18px; }
.conditions-summary { margin-bottom: 14px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.summary-grid span { min-height: 38px; padding: 10px; border-radius: 14px; background: rgba(188,213,172,.24); color: var(--fun-green); font-size: 12px; font-weight: 700; }
.primary-button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--palm-leaf); color: #fffef5; font-weight: 900; }
.primary-button.full, .ghost-button.full { width: 100%; min-height: 54px; }
.ghost-button { min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(159,184,120,.26); color: var(--dark-moss); font-weight: 900; }
.ghost-button:disabled, .primary-button:disabled { opacity: .52; cursor: default; transform: none; }
.plant-profile { align-items: flex-end; margin-bottom: 18px; }
.profile-photo { flex: 0 0 116px; height: 148px; overflow: hidden; border-radius: 28px; box-shadow: var(--shadow); background: linear-gradient(145deg, var(--jaded-lime), var(--middle-green) 58%, var(--fun-green)); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid.compact { gap: 10px; }
label { display: grid; gap: 7px; color: var(--dark-moss); font-size: 12px; font-weight: 900; }
.wide { grid-column: 1 / -1; }
select, input[type="text"], input[type="number"], textarea { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,250,.74); color: var(--ink); padding: 0 13px; outline: none; caret-color: var(--fun-green); }
select:focus, input[type="text"]:focus, input[type="number"]:focus, textarea:focus { border-color: rgba(22,95,57,.42); box-shadow: 0 0 0 4px rgba(188,213,172,.34); }
textarea { min-height: 86px; padding-top: 12px; resize: vertical; }
.condition-block { margin-bottom: 14px; }
.condition-step { display: none; min-height: 438px; margin-bottom: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255, 255, 250, 0.78); box-shadow: 0 10px 30px rgba(55, 68, 38, 0.08); }
.condition-step.active { display: block; animation: stepIn .22s ease-out; }
.condition-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: -4px 0 16px; }
.condition-progress span { height: 7px; border-radius: 999px; background: rgba(22,95,57,.12); transition: background .2s ease, transform .2s ease; }
.condition-progress span.active { background: var(--middle-green); transform: scaleY(1.12); }
.choice-section { display: grid; gap: 8px; margin: 16px 0; }
.choice-label { margin: 0; color: var(--dark-moss); font-size: 12px; font-weight: 750; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice-grid.two { grid-template-columns: repeat(2, 1fr); }
.choice-pill { min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,250,.74); color: var(--ink); font-size: 13px; font-weight: 650; text-align: center; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.choice-pill.active { border-color: rgba(22,95,57,.34); background: var(--jaded-lime); color: var(--kombu); box-shadow: inset 0 0 0 1px rgba(22,95,57,.08); }
.choice-pill:active { transform: scale(.98); }
.step-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: center; }
.step-actions button[hidden] { display: none; }
.step-actions .primary-button, .step-actions .ghost-button { min-height: 52px; padding-inline: 10px; }
.conditions-status { min-height: 52px; margin: 4px 0 12px; }
.status-pill { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 18px; background: rgba(188,213,172,.34); color: var(--fun-green); font-size: 13px; font-weight: 750; animation: rise .2s ease-out; }
.status-pill span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: var(--fun-green); color: #fffef5; font-weight: 800; }
.status-pill.saved span { animation: successPop .34s ease-out; }
.toggle-row { grid-template-columns: 1fr auto; align-items: center; min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,250,.74); }
input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--dark-moss); }
.light-slider input { width: 100%; accent-color: var(--dark-moss); }
.scale-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.scale-labels span { color: var(--muted); font-size: 10px; font-weight: 800; text-align: center; }
.hint { margin: 14px 0 0; padding: 12px; border-radius: 16px; background: rgba(159,184,120,.2); color: var(--dark-moss); font-size: 13px; font-weight: 700; }
.care-item { display: grid; grid-template-columns: 42px 1fr; gap: 13px; padding: 16px; }
.care-item > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--olivine); color: var(--kombu); font-size: 13px; font-weight: 900; }
.task-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 15px; }
.task-card strong, .task-card small { display: block; }
.task-card.done { opacity: .64; }
.task-card.done-removing { animation: taskOut .24s ease-in forwards; }
@keyframes taskOut { to { opacity: 0; transform: translateX(18px) scale(.98); max-height: 0; padding-block: 0; margin: 0; } }
.task-group { display: grid; gap: 10px; }
.task-group-title { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px; }
.task-group-title h3 { margin: 0; }
.task-group-title span { display: grid; min-width: 26px; height: 26px; place-items: center; border-radius: 999px; background: var(--jaded-lime); color: var(--fun-green); font-size: 12px; font-weight: 800; }
.catalog-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.catalog-item:last-child { border-bottom: 0; }
.success-card { display: grid; min-height: 230px; place-items: center; padding: 28px; text-align: center; background: linear-gradient(145deg, rgba(255,255,250,.9), rgba(159,184,120,.36)); animation: successPop .38s ease-out; }
.success-mark { display: grid; width: 66px; height: 66px; place-items: center; border-radius: 50%; background: var(--olivine); color: var(--kombu); font-size: 34px; font-weight: 900; box-shadow: 0 14px 30px rgba(71, 98, 42, .16); }
@keyframes successPop { 0% { opacity: 0; transform: scale(.94); } 70% { opacity: 1; transform: scale(1.02); } 100% { transform: scale(1); } }
.bottom-nav { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 50; display: grid; width: min(calc(100% - 28px), 432px); grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px; border: 1px solid rgba(55,68,38,.08); border-radius: 28px; background: rgba(247,246,239,.94); box-shadow: 0 18px 42px rgba(38,48,31,.16); transform: translateX(-50%); backdrop-filter: blur(18px); }
.nav-item { display: grid; gap: 3px; min-width: 0; min-height: 54px; place-items: center; border: 0; border-radius: 20px; background: transparent; color: var(--dark-moss); }
.nav-item span { font-size: 18px; line-height: 1; }
.nav-item small { color: inherit; font-size: 10px; font-weight: 800; }
.nav-item.active { background: var(--olivine); color: var(--kombu); }
@media (max-width: 380px) {
  .app-shell { padding-inline: 12px; }
  .plant-photo { min-height: 190px; }
  .form-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  h1 { font-size: 27px; }
  h2 { font-size: 21px; }
}
@media (min-width: 720px) {
  body { padding-block: 28px; }
  .app-shell { min-height: calc(100vh - 56px); border-radius: 34px; box-shadow: 0 28px 90px rgba(55,68,38,.18); }
}
