:root {
  color-scheme: light;
  --green: #3B6D11;
  --green-dark: #27500A;
  --green-light: #EAF3DE;
  --green-mid: #97C459;
  --green-soft: #C0DD97;
  --bg: #E9EFDD;
  --doodle: #CFDCBA;
  --card: #FFFFFF;
  --card-muted: #F4F6EF;
  --text: #1F2A14;
  --muted: #5F5E5A;
  --faint: #888780;
  --line: #DCE3CF;
  --orange: #D85A30;
  --danger: #A32D2D;
  --tip-bg: #FAEEDA;
  --tip-text: #633806;
  --nav-h: 64px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green); }

.doodle { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.doodle i { position: absolute; color: var(--doodle); font-size: 0.95rem; opacity: 0.62; }

.app {
  position: relative; z-index: 1;
  max-width: 520px; margin: 0 auto;
  min-height: 100dvh;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
.app.full { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.loading { color: var(--muted); }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; justify-content: space-around;
  background: var(--card); border-top: 1px solid var(--line);
  padding: 6px 0 calc(8px + env(safe-area-inset-bottom));
}
.nav[hidden] { display: none; }
.nav a { flex: 1; max-width: 120px; text-align: center; text-decoration: none; color: var(--faint); font-size: 0.72rem; }
.nav a i { display: block; font-size: 1.4rem; }
.nav a.on { color: var(--green); }

h1, .h1 { font-size: 1.45rem; font-weight: 600; line-height: 1.25; margin: 4px 0; }
h2, .h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 6px; }
.sub { color: var(--muted); margin: 0 0 14px; }
.small { font-size: 0.8rem; }
.muted { color: var(--muted); }
.grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; }
.center { text-align: center; }

.card { background: var(--card); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.card.tip { background: var(--tip-bg); color: var(--tip-text); }
.card.green { background: var(--green); color: #fff; }

.btn {
  display: block; width: 100%; border: none; border-radius: 12px;
  padding: 13px; font-size: 1.05rem; text-align: center; cursor: pointer;
  background: var(--green); color: #fff; margin-top: 8px;
}
.btn.ghost { background: var(--card); color: var(--green); border: 1.5px solid var(--green); }
.gallery-btn { box-sizing: border-box; font-weight: 600; }
.btn.danger { background: var(--card); color: var(--danger); border: 1.5px solid #F09595; }
.btn-sm {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 10px; padding: 6px 10px; font-size: 0.85rem; cursor: pointer;
  background: var(--card); color: var(--green); border: 1.5px solid var(--green-mid);
}
.btn-sm.solid { background: var(--green); color: #fff; border-color: var(--green); }
.btn-sm.danger { color: var(--danger); border-color: #F09595; }
.btn:active, .btn-sm:active { transform: scale(0.98); }

input[type=text], input[type=number], input:not([type]), textarea, select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 11px 12px; background: var(--card); font-size: 1rem;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green); }
textarea { resize: vertical; }
label.field { display: block; font-size: 0.8rem; color: var(--muted); }
.err { color: var(--danger); font-size: 0.85rem; margin-top: 6px; }

.progress { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.progress .bar { flex: 1; height: 6px; background: var(--card); border-radius: 3px; overflow: hidden; }
.progress .bar div { height: 100%; background: var(--green); border-radius: 3px; }
.iconbtn { background: none; border: none; color: var(--green); font-size: 1.4rem; cursor: pointer; padding: 2px; }

.opt {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 12px; padding: 12px;
  margin-bottom: 8px; cursor: pointer; border: 2px solid transparent;
}
.opt.on { border-color: var(--green); background: #F3F8EA; }
.opt i { color: var(--green); font-size: 1.3rem; }

.hero-icon {
  width: 88px; height: 88px; border-radius: 50%; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 2.6rem;
}
.tipline { display: flex; gap: 8px; margin-bottom: 6px; align-items: flex-start; }
.tipline:last-child { margin-bottom: 0; }

.avatar {
  border-radius: 50%; background: var(--green-soft); color: var(--green-dark);
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick {
  width: 130px; height: 130px; margin: 12px auto; border: 2px dashed var(--green-mid);
  background: var(--card); color: var(--green); cursor: pointer; font-size: 0.9rem; text-align: center;
}

.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot {
  position: relative; aspect-ratio: 1; border-radius: 12px; border: 2px dashed var(--green-mid);
  background: var(--card); color: var(--green); cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; font-size: 0.75rem; padding: 4px;
}
.slot i { font-size: 1.4rem; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .ok { position: absolute; right: 4px; top: 4px; background: var(--green); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }

.hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* map */
/* Plánek má jen tenký bílý lem, žádnou širokou bílou kartu kolem */
.map-wrap { background: transparent; padding: 0; margin: 6px 0 10px; }
.map-wrap > .small { margin: 0 4px 4px !important; text-align: center; }
.map {
  position: relative; width: 100%; background: #E4ECD4;
  border: 2px solid #B4B2A9; border-radius: 8px; margin-bottom: 12px;
}
.zone {
  position: absolute; border-radius: 7px; padding: 4px 5px; cursor: pointer;
  font-size: 0.72rem; font-weight: 600; overflow: visible;
}
.zone.edit { touch-action: none; cursor: move; outline: 2px dashed var(--green); outline-offset: 1px; }
.zone.sel { outline-color: var(--orange); outline-style: solid; }
.zone .zl { position: relative; z-index: 2; display: inline-block; max-width: 100%; }
.zone { overflow: hidden; }
.zone.sel, .zone.edit { overflow: visible; }
.zone .zwm {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; pointer-events: none;
  font-size: clamp(1.2rem, 9vw, 3rem); opacity: 0.16;
}
.zone .zl.vert { writing-mode: vertical-rl; }
/* Plánek: zóny jako mnohoúhelníky */
/* jedním prstem se stránka roluje i přes plánek; dva prsty plánek přibližují (viewport.js) */
.mapvp { position: relative; overflow: hidden; display: flex; justify-content: center; touch-action: pan-y; border-radius: 10px; margin-bottom: 0; }
.mapvp > .map { border: 3px solid #fff; border-radius: 8px; box-shadow: 0 0 0 1px #C9CDBF; }
.mapvp { padding: 2px 0 14px; } /* místo pro štítek Vstup pod plánkem */
.mapvp > .map { margin: 0; flex: none; will-change: transform; }
.vp-reset { position: absolute; left: 6px; top: 6px; z-index: 9; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #B4B2A9; background: #fff; font-size: 1.1rem; color: var(--green); }
.zsvg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 1; }
.zsvg .zp { stroke: rgba(40, 50, 30, 0.35); stroke-width: 1.2; pointer-events: visiblePainted; cursor: pointer; }
.zsvg .zp.edit { stroke-dasharray: 4 3; stroke: #3B6D11; }
.zsvg .zp.sel { touch-action: none; stroke: var(--orange); stroke-width: 2.5; stroke-dasharray: none; }
.map.sat .zsvg .zp { fill-opacity: 0.62; }
.zsvg .outside { fill: rgba(233, 239, 221, 0.78); }
.map.sat .zsvg .outside { fill: rgba(30, 30, 30, 0.38); }
.zsvg .boundary { fill: none; stroke: #5F5E5A; stroke-width: 2; }
/* Pozemek ve skutečném tvaru: obdélníkový rám zmizí, bílý lem vede po hranici pozemku */
.mapvp > .map:has(> .zsvg.shaped) { background: transparent; border-color: transparent; box-shadow: none; }
.zsvg.shaped { z-index: 1; }
.zsvg .plotfill { fill: #E4ECD4; }
.map.sat .zsvg .plotfill { fill: transparent; }
.zsvg .boundary-out { fill: none; stroke: #C9CDBF; stroke-width: 6; stroke-linejoin: round; }
.zsvg.shaped .boundary { stroke: #fff; stroke-width: 4; stroke-linejoin: round; }
.zlab { position: absolute; z-index: 2; transform: translate(-50%, -50%); pointer-events: none; text-align: center;
  font-size: 0.72rem; font-weight: 600; line-height: 1.15; max-width: 40%; }
.zlab .zwm { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: -1; font-size: 2.2rem; opacity: 0.18; }
.zlab .zl { display: inline-block; background: rgba(255, 255, 255, 0.55); border-radius: 5px; padding: 0 4px; }
.zlab .zl.vert { writing-mode: vertical-rl; }
/* na Zahradě jde klepnout přímo na název zóny (otevře právě tu zónu i při překryvu) */
.zlab.tap { z-index: 4; }
.zlab.tap .zl { pointer-events: auto; cursor: pointer; }
.zbadge { position: absolute; z-index: 3; transform: translate(-60%, -40%); pointer-events: none; }
.zbadge .badge { position: static; }
.map > .dot { position: absolute; z-index: 2; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #fff; border: 2px solid var(--green); pointer-events: none; }
.map > .dot.animal { background: #FAC775; border-color: #854F0B; }
.zhandles .vh, .zhandles .rh { position: absolute; z-index: 6; transform: translate(-50%, -50%); touch-action: none; }
.zhandles .vh { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--orange); }
.zhandles .vh::after { content: ''; position: absolute; inset: -10px; }
.zhandles .rh { width: 30px; height: 30px; margin-top: -26px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
/* čárky uprostřed stěn: za stěnu jde táhnout */
.zhandles .esvg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; overflow: visible; }
.zhandles .esvg line { stroke: var(--orange); stroke-width: 5; stroke-linecap: round; opacity: 0.85; }
.zhandles.busy .rh, .zhandles.busy .esvg, .zhandles.busy .vh { display: none; }
.plan .zshape { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; border-radius: 0; }
.entrance.pt { bottom: auto; transform: translate(-50%, -50%); }
.zone .dot, .plan .dot {
  position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  border-radius: 50%; background: #fff; border: 2px solid var(--green);
}
.badge {
  position: absolute; top: -8px; right: -8px; z-index: 3; min-width: 22px; height: 22px;
  border-radius: 11px; font-size: 0.72rem; display: flex; align-items: center; justify-content: center;
  padding: 0 5px; border: 2px solid #fff; color: #fff; background: var(--orange);
}
.badge.ok { background: #639922; }
.handle {
  position: absolute; right: -11px; bottom: -11px; width: 24px; height: 24px; border-radius: 6px;
  background: var(--orange); border: 2px solid #fff; cursor: nwse-resize; z-index: 4; touch-action: none;
}
.handle::after { content: ''; position: absolute; inset: -12px; }

/* Satelitní mapa */
.satwrap { position: relative; height: 50vh; min-height: 300px; border-radius: 12px; overflow: hidden; background: #DCE9C8; margin-bottom: 10px; }
.satmap { position: absolute; inset: 0; }
.satframe {
  position: absolute; left: 50%; top: 50%; z-index: 500; pointer-events: none;
  border: 3px solid #fff; border-radius: 2px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
}
.satentr {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 55%); white-space: nowrap;
  background: #fff; color: #444441; border-radius: 6px; padding: 1px 7px; font-size: 0.75rem; font-weight: 600;
}
.bpt span { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 3px solid var(--orange); color: #412402; font-size: 0.72rem; font-weight: 700; box-sizing: border-box; }
.bentr i { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 1.1rem; border: 2px solid #fff; }
.satbg { position: absolute; inset: 0; overflow: hidden; border-radius: 6px; z-index: 0; pointer-events: none; }
.satbg .leaflet-container { background: transparent; }
.satatt { position: absolute; right: 4px; bottom: 2px; font-size: 0.6rem; color: #fff; text-shadow: 0 0 2px #000; }
.plan .dot.animal {
  width: 26px; height: 26px; margin: -13px 0 0 -13px; background: #FAEEDA; border-color: #BA7517;
  display: flex; align-items: center; justify-content: center; color: #633806; font-size: 15px;
}
.zone .dot.animal.sm { background: #FAC775; border-color: #854F0B; }
/* Kompas, stín a překážky */
.compass {
  position: absolute; right: 6px; top: 6px; z-index: 7; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92); border: 1px solid #B4B2A9; pointer-events: none;
}
.compass .needle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #A32D2D; line-height: 1; }
.compass .needle span { font-size: 0.6rem; font-weight: 700; }
.compass .needle i { font-size: 1rem; }
svg.obst { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 6; }
/* Překážky jsou přichycené k okraji plánku a jen zvýrazní obrys */
svg.obst .ob { fill: none; stroke: #5F5E5A; stroke-width: 7; stroke-linecap: butt; stroke-linejoin: round; opacity: 0.75; }
svg.obst .ob-les { stroke: #27500A; }
svg.obst .ob-zivy { stroke: #639922; }
svg.obst .ob-dum, svg.obst .ob-garaz { stroke: #854F0B; }
svg.obst .ob-plot { stroke: #444441; }
svg.obst .ob-new { stroke: #D85A30; stroke-width: 5; stroke-linecap: round; }
svg.obst .ob.faint { opacity: 0.55; stroke-width: 6; }
.shadewrap {
  position: relative; padding: 26px; border-radius: 12px; touch-action: auto;
  background: repeating-linear-gradient(45deg, #DCE9C8, #DCE9C8 6px, #E4ECD4 6px, #E4ECD4 12px);
}
.shadewrap.drawing { touch-action: none; }
.shhint { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); z-index: 8; background: var(--orange); color: #fff; border-radius: 8px; padding: 1px 10px; font-size: 0.75rem; white-space: nowrap; }
.sunline { display: flex; align-items: center; gap: 8px; }
.sunline i { font-size: 1.5rem; }
.warn-card { background: #FAEEDA; border: 1px solid #EF9F27; border-radius: 12px; padding: 12px; margin: 8px 0; color: #412402; }
/* Rádce */
.chat { display: flex; flex-direction: column; gap: 8px; padding-bottom: 130px; }
.msg { max-width: 86%; padding: 9px 12px; border-radius: 16px; line-height: 1.45; font-size: 0.95rem; box-shadow: 0 1px 1px rgba(0,0,0,0.06); }
.msg.me { align-self: flex-end; background: #D3E8B8; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--card); border-bottom-left-radius: 4px; }
.msg img { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; margin-bottom: 6px; }
.msg.typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: #97C459; animation: blink 1.2s infinite; }
.msg.typing span:nth-child(2) { animation-delay: 0.2s; } .msg.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.composer {
  position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 4;
  background: var(--card); border-top: 1px solid var(--line); padding: 8px 10px;
}
.composer textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 9px 10px; border-radius: 18px; font: inherit; }
.composer .iconbtn { flex: none; position: relative; }
.composer .send { background: var(--green); color: #fff; border-radius: 50%; }
.composer .attach { position: relative; display: inline-block; margin-bottom: 6px; }
.composer .attach img { height: 64px; border-radius: 8px; display: block; }
.composer .attach .iconbtn { position: absolute; top: -8px; right: -8px; background: #fff; border-radius: 50%; width: 26px; height: 26px; }
.maker { margin: 22px 0 8px; background: #fff; border-radius: 12px; padding: 6px 10px; text-align: center; }
.maker img { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 8px 0 12px; }
.gimg { padding: 0; border: none; background: #DCE9C8; border-radius: 8px; overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.gimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map.sat .zone { opacity: 0.6; }
.map.sat .zone.sel { opacity: 0.8; }
.zone.sel { z-index: 6; }
.chip.pick { border: 1.5px solid #C0DD97; cursor: pointer; font: inherit; font-size: 0.85rem; padding: 6px 12px; }
.chip.pick.on { border-color: var(--orange); background: #FAECE7; }
.entrance {
  position: absolute; bottom: -12px; transform: translateX(-50%); z-index: 5;
  background: #fff; border: 1px solid #B4B2A9; border-radius: 6px; padding: 0 6px; font-size: 0.72rem; color: #444441;
  white-space: nowrap;
}

/* zone detail plan */
.plan { position: relative; width: 100%; border-radius: 12px; margin-bottom: 8px; }
.plan.placing { outline: 2px dashed var(--orange); outline-offset: 3px; cursor: crosshair; }
.plan .dot { width: 14px; height: 14px; margin: -7px 0 0 -7px; cursor: pointer; }
.plan .plabel {
  position: absolute; transform: translate(-50%, 10px); background: #fff; border-radius: 6px;
  padding: 0 5px; font-size: 0.72rem; white-space: nowrap; pointer-events: none;
}
.plan .hint {
  position: absolute; left: 8px; right: 8px; bottom: 8px; background: #fff; border-radius: 8px;
  padding: 5px 8px; font-size: 0.85rem; text-align: center; color: #993C1D;
}

/* tasks */
.task {
  background: var(--card); border-radius: 12px; padding: 10px; display: flex; gap: 10px;
  align-items: center; margin-bottom: 8px; cursor: pointer;
}
.task.done { background: var(--card-muted); }
.task.done .tt { color: var(--muted); text-decoration: line-through; }
.task .tt { font-weight: 600; }
.task .ts { font-size: 0.75rem; color: var(--muted); }
.cat-ic {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.check {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--green); background: #fff;
  flex: none; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff;
}
.check.on { background: var(--green); }
/* Dvě stejně výrazné volby (Přidat rostlinu) */
.choice2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 10px; }
.choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 120px; padding: 14px 8px;
  border: 2px solid var(--green); border-radius: 14px; background: var(--green-light); color: var(--green-dark); font: inherit; font-weight: 600; cursor: pointer; text-align: center; }
.choice i { font-size: 2rem; }
/* Kreslení řad prstem a náhled rostlin */
.plan.rows { touch-action: none; outline: 2px dashed var(--orange); outline-offset: 3px; }
.plan .rowsvg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
.plan .rowsvg polyline { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }
.plan .rowsvg text { font-size: 4px; fill: #993C1D; font-weight: 700; }
.plan .dot.preview { background: #FAC775; border-color: var(--orange); pointer-events: none; }
.rowcnt { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #E4E2DC; }
.undo-btn { flex: none; border-color: var(--orange); color: #993C1D; }
.undo-btn:disabled { opacity: 0.4; border-color: #B4B2A9; color: var(--muted); }
/* Denní péče o zvířata */
.care-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; padding: 5px 0; font: inherit; color: inherit; cursor: pointer; }
.care-item .check { width: 24px; height: 24px; font-size: 0.85rem; }
.care-item.on span:last-child { color: var(--muted); text-decoration: line-through; }
/* Zahrádkářský stupeň */
.rank-card { background: linear-gradient(135deg, var(--green-light), #fff 75%); }
.rank-top { display: flex; align-items: center; gap: 12px; }
.rank-ic { font-size: 2.4rem; line-height: 1; width: 56px; height: 56px; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.rank-name { font-size: 1.15rem; font-weight: 700; color: var(--green-dark); }
.bar { height: 12px; border-radius: 6px; background: rgba(59,109,17,.12); overflow: hidden; margin: 10px 0 4px; }
.bar > div { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--green-mid), var(--green)); transition: width .6s; }
.ladder { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 10px; }
.ladder > div { text-align: center; font-size: 1.3rem; padding: 4px 0 2px; border-radius: 10px; background: #fff; opacity: .35; filter: grayscale(1); }
.ladder > div.got { opacity: 1; filter: none; }
.ladder > div.cur { outline: 2px solid var(--green); }
.ladder small { display: block; font-size: 0.6rem; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.reopen { font-size: 0.75rem; color: var(--green); border: 1px solid var(--green-mid); border-radius: 10px; padding: 4px 8px; background: #fff; cursor: pointer; white-space: nowrap; }
.section-title { font-size: 0.85rem; color: var(--muted); margin: 14px 0 6px; }

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--green); cursor: pointer; margin-bottom: 8px; background: none; border: none; padding: 0; font-size: 0.95rem; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 12px; padding: 3px 10px; font-size: 0.78rem; margin: 0 4px 6px 0; color: #444441; }
.step { display: flex; gap: 10px; margin-bottom: 8px; }
.step .n { width: 24px; height: 24px; border-radius: 50%; background: var(--green-light); color: var(--green-dark); font-size: 0.78rem; display: flex; align-items: center; justify-content: center; flex: none; }

/* sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: #fff; width: 100%; max-width: 520px; border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 88dvh; overflow-y: auto;
}
.sheet .grab { width: 36px; height: 4px; background: #D3D1C7; border-radius: 2px; margin: 0 auto 12px; }
.pick-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.big-camera {
  height: 140px; border: 2px dashed var(--green-mid); border-radius: 14px; color: var(--green);
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; margin-bottom: 8px;
}
.big-camera i { font-size: 2.2rem; }
.plant-photo { width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; margin-bottom: 10px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: #1F2A14; color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 40;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: 90vw; text-align: center; font-size: 0.95rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.confetti { position: fixed; inset: 0; z-index: 50; pointer-events: none; width: 100vw; height: 100vh; }

.list-item { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; cursor: pointer; }
.thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--green-light); color: var(--green); display: flex; align-items: center; justify-content: center; flex: none; font-size: 1.3rem; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.demo-note { font-size: 0.72rem; color: var(--faint); margin-top: 4px; }
