@font-face { font-family: "Nunito"; src: url("/static/nunito.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
/* Monstera greens, spider-plant lime and cream, terracotta pots. Variable names kept from v1:
   --sage = monstera (primary), --sky = spider plant, --coral = terracotta. */
:root {
  --bg: #f6f3e8; --card: #fffdf6; --ink: #213326; --muted: #6b7a6c; --line: #e6e3d2;
  --sage: #2f6b45; --sage-soft: #e1ecdc; --coral: #c47656; --coral-soft: #f6e5da;
  --sky: #5f9a3c; --sky-soft: #eef3d8; --warn: #b5683f;
  --leaf: #2f6b45; --leaf-2: #3f8a55; --leaf-vein: #a9cf9a; --spider: #6fa84a; --stripe: #f4f1cf;
  --pot: #c47656; --pot-rim: #a95f42;
  --radius: 20px; --shadow: 0 1px 2px rgba(33, 51, 38, .06), 0 6px 18px rgba(33, 51, 38, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131a15; --card: #1c251f; --ink: #e4ede2; --muted: #9aab9c; --line: #2c3a30;
    --sage: #7cc08e; --sage-soft: #213428; --coral: #e39a78; --coral-soft: #3a2820;
    --sky: #b2d675; --sky-soft: #283220; --warn: #e3a179;
    --leaf: #3f8a55; --leaf-2: #57a56b; --leaf-vein: #2a5a38; --spider: #7fb85a; --stripe: #e8e5bf;
    --pot: #c47656; --pot-rim: #a95f42; --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16.5px/1.5 "Nunito", ui-rounded, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
header { display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top) + 12px) 18px 8px; }
.brand { font-weight: 800; letter-spacing: .2px; color: var(--sage); display: flex; align-items: center; gap: 7px; font-size: 18px; }
#brand-leaf { display: inline-flex; } .brand svg { width: 24px; height: 26px; color: var(--leaf); }
#who { color: var(--muted); font-size: 14px; }
main { padding: 4px 14px calc(90px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; }
h1 { font-size: 27px; margin: 6px 4px 14px; font-weight: 800; letter-spacing: -.2px; }
h2 { font-size: 18px; margin: 0 0 8px; font-weight: 800; }
h3 { font-size: 15px; margin: 14px 0 6px; color: var(--muted); font-weight: 600; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin: 0 0 12px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card.sage { background: var(--sage-soft); border-color: transparent; }
.card.coral { background: var(--coral-soft); border-color: transparent; }
.card.sky { background: var(--sky-soft); border-color: transparent; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hidden { display: none !important; }
button, .btn { font: inherit; border: 0; border-radius: 12px; padding: 11px 16px; cursor: pointer;
  background: var(--sage); color: #fff; font-weight: 600; }
button.ghost { background: transparent; color: var(--sage); border: 1.5px solid var(--sage); }
button.soft { background: var(--sage-soft); color: var(--ink); font-weight: 500; }
button.coral { background: var(--coral); }
button.link { background: none; color: var(--sage); padding: 4px 0; font-weight: 600; }
button.small { padding: 7px 12px; font-size: 14px; }
button:disabled { opacity: .5; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 10px 12px; width: 100%; }
textarea { min-height: 70px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--sage); }
input.masked { -webkit-text-security: disc; text-security: disc; }
label { display: block; font-size: 14px; color: var(--muted); margin: 10px 0 4px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--card); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
nav button { flex: 1; background: none; color: var(--muted); font-size: 12px; font-weight: 500; padding: 6px 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 10px; }
nav button span { font-size: 20px; line-height: 1; }
nav button.on { color: var(--sage); background: var(--sage-soft); }
/* habits */
.habit { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; }
.habit:last-child { border-bottom: 0; }
.tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; color: #fff; font-size: 15px; }
.habit.done .tick { background: var(--sage); border-color: var(--sage); }
/* scores */
.scores { display: flex; gap: 6px; }
.scores button { flex: 1; background: var(--bg); color: var(--ink); border: 1.5px solid var(--line); padding: 10px 0; font-weight: 600; }
.scores button.on { background: var(--sage); color: #fff; border-color: var(--sage); }
.scale-hint { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 3px; }
/* training */
.daypick { display: flex; gap: 6px; margin-bottom: 12px; }
.daypick button { flex: 1; }
.ex { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ex:last-child { border-bottom: 0; }
.ex-name { font-weight: 650; }
.target { font-size: 14px; color: var(--sage); margin: 3px 0; }
.setrow { display: grid; grid-template-columns: 44px 1fr 1fr; gap: 8px; align-items: center; margin-top: 6px; }
.setrow .n { color: var(--muted); font-size: 14px; }
.setrow input { padding: 9px 10px; text-align: center; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; background: var(--sage-soft); color: var(--sage); font-weight: 600; }
.pill.coral { background: var(--coral-soft); color: var(--coral); }
.pill.sky { background: var(--sky-soft); color: var(--sky); }
/* charts */
svg.chart { width: 100%; height: 140px; display: block; }
.chart .line { fill: none; stroke: var(--sage); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--sage); }
.chart .band { fill: var(--sage-soft); }
.chart .bar { fill: var(--sky); }
.chart .bar.ok { fill: var(--sage); }
.chart text { fill: var(--muted); font-size: 11px; }
.big-word { font-size: 22px; font-weight: 700; margin: 4px 0; }
.list-item { padding: 9px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { padding: 6px 4px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 3px; gap: 3px; border: 1px solid var(--line); }
.seg button { flex: 1; background: none; color: var(--ink); font-weight: 500; padding: 8px 4px; font-size: 14px; }
.seg button.on { background: var(--card); box-shadow: var(--shadow); color: var(--sage); font-weight: 650; }
/* sheet */
#sheet { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 10; display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { background: var(--card); width: 100%; max-width: 640px; border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 90vh; overflow: auto; }
#toast { position: fixed; bottom: calc(86px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; z-index: 20; font-size: 14px; }
.login { max-width: 380px; margin: 40px auto; }
.login .who-pick { display: flex; gap: 10px; margin: 16px 0; }
.login .who-pick button { flex: 1; padding: 18px; font-size: 18px; }

/* ── Plants ───────────────────────────────────────────────────────────── */
button, input, textarea, select { font-family: inherit; }
.card { position: relative; overflow: hidden; }
.card > * { position: relative; }
.card .watermark { position: absolute; right: -18px; top: -14px; width: 120px; height: 130px; color: var(--leaf); opacity: .13; transform: rotate(-24deg); pointer-events: none; }
.card.sage .watermark { opacity: .16; }
.hero { text-align: center; margin: 8px 0 4px; }
.hero .spider { width: 230px; height: 200px; }
.hero-row { position: relative; }
.hero-row .monstera { position: absolute; width: 90px; height: 100px; color: var(--leaf); }
.hero-row .m1 { left: -6px; top: 10px; transform: rotate(-35deg); }
.hero-row .m2 { right: -6px; top: 40px; transform: rotate(30deg) scaleX(-1); color: var(--leaf-2); }
.plant-card { display: flex; gap: 10px; align-items: center; }
.plant-card .spider { width: 150px; height: 130px; flex: none; }
.spider .lf { fill: none; stroke: var(--spider); stroke-width: 6; stroke-linecap: round; }
.spider .st { fill: none; stroke: var(--stripe); stroke-width: 1.6; stroke-linecap: round; }
.spider .pot { fill: var(--pot); } .spider .rim { fill: var(--pot-rim); }
.spider .run { fill: none; stroke: var(--spider); stroke-width: 1.8; stroke-linecap: round; }
.empty { text-align: center; padding: 6px 0; }
.empty svg { width: 54px; height: 58px; color: var(--leaf-2); opacity: .8; }
.habit.done .tick { animation: pop .25s ease; }
@keyframes pop { 50% { transform: scale(1.2); } }
.login { position: relative; }
