/* «Мой курс» — трекер приёма Optimin.
   Основа компонентов и движений — разбор SCB (iOS-подобные grouped-списки, стекло, sheet'ы),
   палитра — бренд Optimin: тёплый крем, чернила, оранжевый акцент, цвет по товару. */
:root {
  color-scheme: light;
  --bg: #fbf6ef;
  --card: #fff;
  --elev: #fff;
  --sheet-bg: #fbf6ef;
  --label: #1e1b18;
  --label2: rgba(74, 68, 61, .78);
  --label3: rgba(110, 102, 92, .45);
  --sep: rgba(30, 27, 24, .12);
  --fill: rgba(120, 90, 60, .08);
  --fill2: rgba(120, 90, 60, .15);
  --press: rgba(60, 40, 20, .06);
  --seg-on: #fff;
  --tint: #de6b0e;
  --tint-soft: rgba(242, 140, 30, .14);
  --accent: #f28c1e;
  --ink: #1e1b18;
  --on-ink: #fbf6ef;
  --ok: #2f8a4f;
  --ok-soft: rgba(47, 138, 79, .13);
  --warn: #b25400;
  --warn-soft: rgba(242, 140, 30, .16);
  --red: #d7362b;
  --bar: rgba(251, 246, 239, .82);
  --glass: rgba(255, 252, 247, .7);
  --glass-edge: rgba(255, 255, 255, .85);
  --glass-shadow: 0 12px 34px rgba(90, 50, 10, .14), 0 1px 3px rgba(30, 27, 24, .06);
  --alert-bg: rgba(255, 252, 247, .95);
  --card-shadow: 0 0 0 1px rgba(30, 27, 24, .04), 0 8px 24px -14px rgba(120, 80, 40, .25);
  --hero-grad: linear-gradient(160deg, #fff6ec 0%, #ffe9d2 55%, #fbd7b8 100%);
  --wa-bg: #efe7dd;
  --wa-in: #fff;
  --wa-out: #d9fdd3;
  --wa-head: #075e54;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --r: 22px;
  --kb: 0px;
  --vvh: 100vh;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #14110e; --card: #201b17; --elev: #2a241f; --sheet-bg: #1b1713;
    --label: #fbf6ef; --label2: rgba(251, 246, 239, .66); --label3: rgba(251, 246, 239, .32);
    --sep: rgba(251, 246, 239, .13); --fill: rgba(251, 246, 239, .08); --fill2: rgba(251, 246, 239, .14);
    --press: rgba(255, 255, 255, .07); --seg-on: #4a4038;
    --tint: #ffa24a; --tint-soft: rgba(255, 162, 74, .18); --accent: #ffa24a;
    --ink: #fbf6ef; --on-ink: #1e1b18;
    --ok: #4cc777; --ok-soft: rgba(76, 199, 119, .18); --warn: #ffb35c; --warn-soft: rgba(255, 162, 74, .2); --red: #ff6b5e;
    --bar: rgba(20, 17, 14, .78); --glass: rgba(42, 36, 31, .66); --glass-edge: rgba(255, 255, 255, .12);
    --glass-shadow: 0 12px 34px rgba(0, 0, 0, .5); --alert-bg: rgba(42, 36, 31, .96);
    --card-shadow: 0 0 0 1px rgba(255, 255, 255, .04);
    --hero-grad: linear-gradient(160deg, #2c2118 0%, #33231a 60%, #3d2618 100%);
    --wa-bg: #0b141a; --wa-in: #202c33; --wa-out: #005c4b; --wa-head: #202c33;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14110e; --card: #201b17; --elev: #2a241f; --sheet-bg: #1b1713;
  --label: #fbf6ef; --label2: rgba(251, 246, 239, .66); --label3: rgba(251, 246, 239, .32);
  --sep: rgba(251, 246, 239, .13); --fill: rgba(251, 246, 239, .08); --fill2: rgba(251, 246, 239, .14);
  --press: rgba(255, 255, 255, .07); --seg-on: #4a4038;
  --tint: #ffa24a; --tint-soft: rgba(255, 162, 74, .18); --accent: #ffa24a;
  --ink: #fbf6ef; --on-ink: #1e1b18;
  --ok: #4cc777; --ok-soft: rgba(76, 199, 119, .18); --warn: #ffb35c; --warn-soft: rgba(255, 162, 74, .2); --red: #ff6b5e;
  --bar: rgba(20, 17, 14, .78); --glass: rgba(42, 36, 31, .66); --glass-edge: rgba(255, 255, 255, .12);
  --glass-shadow: 0 12px 34px rgba(0, 0, 0, .5); --alert-bg: rgba(42, 36, 31, .96);
  --card-shadow: 0 0 0 1px rgba(255, 255, 255, .04);
  --hero-grad: linear-gradient(160deg, #2c2118 0%, #33231a 60%, #3d2618 100%);
  --wa-bg: #0b141a; --wa-in: #202c33; --wa-out: #005c4b; --wa-head: #202c33;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none;
  background: var(--bg); color: var(--label);
  font: 17px/1.35 var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
html.big { zoom: 1.14; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--tint); }
svg { display: block; flex: none; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }

/* ——— Экраны, навигация ——— */
.screen { position: fixed; inset: 0; background: var(--bg); overflow: hidden; transition: transform .5s var(--ease); }
.screen.off { display: none; }
.screen::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .14); opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); }
.scroll {
  height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
  padding: calc(env(safe-area-inset-top) + 50px) 0 calc(env(safe-area-inset-bottom) + 120px);
}
.has-tabs .scroll { padding-bottom: calc(env(safe-area-inset-bottom) + 110px); }
.col { max-width: 620px; margin: 0 auto; }
#push { transform: translateX(100%); box-shadow: -12px 0 32px rgba(0, 0, 0, .1); visibility: hidden; z-index: 12; }
body.pushed #push { transform: none; visibility: visible; }
body.pushed .tabscreen { transform: translateX(-28%); }
body.pushed .tabscreen::after { opacity: 1; }
body.nav-anim #push { visibility: visible; }

.navbar {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0;
  height: calc(env(safe-area-inset-top) + 50px); padding: env(safe-area-inset-top) 64px 0;
  display: flex; align-items: center; justify-content: center; transition: background .25s, box-shadow .25s;
}
.scrolled .navbar { background: var(--bar); box-shadow: 0 .5px 0 var(--sep); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.nav-title { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.scrolled .nav-title { opacity: 1; transform: none; }
.back, .nav-btn {
  position: absolute; bottom: 4px; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; color: var(--label);
  background: var(--glass); box-shadow: var(--glass-shadow), inset 0 0 0 .5px var(--glass-edge);
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); transition: transform .15s;
}
.back { left: 12px; }
.nav-btn { right: 12px; }
.nav-btn.l2 { right: 62px; color: var(--tint); font-size: 17px; }
.nav-btn.wa-btn { color: #1ea952; }
.back:active, .nav-btn:active { transform: scale(.9); }
.large-title { padding: 4px 20px 16px; display: flex; align-items: flex-end; gap: 12px; }
.large-title > div { flex: 1; min-width: 0; }
.large-title h1 { margin: 0; font: 800 32px/1.15 var(--display); letter-spacing: -.02em; }
.large-title p { margin: 3px 0 0; font-size: 15px; color: var(--label2); }

/* ——— Grouped-списки (SCB) ——— */
.group { margin: 0 16px 26px; }
.group-h { margin: 0 20px 7px; font-size: 13px; line-height: 18px; color: var(--label2); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.group-f { margin: 7px 20px 0; font-size: 13px; line-height: 18px; color: var(--label2); }
.list { position: relative; border-radius: var(--r); background: var(--card); overflow: hidden; box-shadow: var(--card-shadow); }
.row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 11px 16px; text-align: left; text-decoration: none; color: inherit; }
.list > * + *::before { content: ""; position: absolute; top: 0; right: 0; left: var(--sep-l, 16px); height: .5px; background: var(--sep); }
.list.icons { --sep-l: 60px; }
.row.tap { transition: background .2s; }
.row.tap:active { background: var(--press); transition: none; }
.row-main { flex: 1; min-width: 0; display: block; }
.row-main > span { display: block; }
.row-title { font-size: 17px; line-height: 22px; }
.row-sub { margin-top: 2px; font-size: 14px; line-height: 19px; color: var(--label2); }
.row-val { flex: none; color: var(--label2); }
.row-val.on { color: var(--tint); font-weight: 600; }
.chev { color: var(--label3); }
.ico { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--c, var(--accent)); color: #fff; font-size: 17px; }
.ico svg { width: 19px; height: 19px; }
.row input[type="time"] {
  flex: none; min-width: 92px; height: 36px; padding: 0 10px; border: 0; border-radius: 10px;
  background: var(--fill); color: var(--tint); font-weight: 600; font-variant-numeric: tabular-nums; text-align: center;
}
.row input[type="time"]::-webkit-calendar-picker-indicator { display: none; }

/* ——— Кнопки, переключатели, сегменты ——— */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 0 20px;
  border-radius: 27px; background: var(--ink); color: var(--on-ink); font-size: 17px; font-weight: 700;
  transition: transform .15s var(--ease), opacity .2s; text-decoration: none; text-align: center;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .35; }
.btn.accent { background: var(--accent); color: #fff; }
.btn.soft { background: var(--fill); color: var(--label); }
.btn.ghost { background: none; color: var(--tint); font-weight: 600; min-height: 44px; }
.btn.small { min-height: 40px; font-size: 15px; border-radius: 20px; width: auto; padding: 0 16px; }
.btns { display: flex; gap: 10px; }
.btns > * { flex: 1; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--tint-soft); color: var(--tint); font-size: 15px; font-weight: 700; text-decoration: none; }
.pill.ink { background: var(--ink); color: var(--on-ink); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill:active { transform: scale(.95); }
.switch { flex: none; position: relative; width: 51px; height: 31px; border-radius: 16px; background: var(--fill2); transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 3px 1px rgba(0, 0, 0, .06); transition: transform .32s var(--ease); }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.seg { position: relative; display: flex; padding: 2px; border-radius: 100px; background: var(--fill); --i: 0; --n: 2; }
.seg-thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / var(--n)); border-radius: 100px; background: var(--seg-on); box-shadow: 0 3px 8px rgba(0, 0, 0, .12); transform: translateX(calc(100% * var(--i))); transition: transform .38s var(--ease); }
.seg button { position: relative; flex: 1; min-width: 0; min-height: 34px; padding: 6px 10px; border-radius: 100px; font-size: 14px; font-weight: 700; text-align: center; color: var(--label); }
.seg button[aria-pressed="false"] { color: var(--label2); }
.seg.lang { width: 104px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scrollx { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 16px; margin: 0 0 16px; -webkit-overflow-scrolling: touch; }
.chips.scrollx::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--fill); font-size: 15px; font-weight: 600; white-space: nowrap; transition: background .2s, color .2s, transform .15s; }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--ink); color: var(--on-ink); }
.chip.soft-on { background: var(--tint-soft); color: var(--tint); }

/* ——— Главный экран: итог дня ——— */
.hero { position: relative; margin: 0 16px 22px; padding: 18px; border-radius: 26px; background: var(--hero-grad); overflow: hidden; box-shadow: var(--card-shadow); }
.hero-top { display: flex; align-items: center; gap: 16px; }
.hero-ring { position: relative; flex: none; width: 96px; height: 96px; }
.hero-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 26px/1 var(--round); font-variant-numeric: tabular-nums; }
.hero-ring b small { display: block; margin-top: 2px; font: 600 12px/1 var(--font); color: var(--label2); text-align: center; }
.hero-ring b span { display: block; text-align: center; }
.ring-track { stroke: rgba(30, 27, 24, .08); }
:root[data-theme="dark"] .ring-track { stroke: rgba(255, 255, 255, .1); }
.ring-fill { stroke: var(--ok); transition: stroke-dashoffset .8s var(--ease); }
.hero-text { flex: 1; min-width: 0; }
.hero-cap { font-size: 13px; font-weight: 700; color: var(--label2); text-transform: uppercase; letter-spacing: .04em; }
.hero-main { margin: 4px 0 2px; font: 800 22px/1.2 var(--display); letter-spacing: -.01em; }
.hero-sub { font-size: 15px; color: var(--label2); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 16px; }
.wd { display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--label2); }
.wd i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .55); color: transparent; font-style: normal; font-size: 15px; transition: background .3s, color .3s; }
:root[data-theme="dark"] .wd i { background: rgba(255, 255, 255, .08); }
.wd.kept i { background: var(--ok); color: #fff; }
.wd.part i { background: var(--ok-soft); color: var(--ok); }
.wd.frz i { background: #cfe3f5; color: #3a76a8; }
.wd.today i { box-shadow: 0 0 0 2px var(--ink); }
.wd.future i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--sep); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero-chips .chip { background: rgba(255, 255, 255, .6); height: 32px; font-size: 14px; }
:root[data-theme="dark"] .hero-chips .chip { background: rgba(255, 255, 255, .08); }

/* Лента приёмов по якорям режима */
.slot { margin: 0 16px 18px; }
.slot-h { display: flex; align-items: baseline; gap: 8px; margin: 0 4px 8px; }
.slot-h b { font: 800 18px/1.2 var(--display); }
.slot-h span { font-size: 14px; color: var(--label2); font-variant-numeric: tabular-nums; }
.dose { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: var(--card); box-shadow: var(--card-shadow); transition: background .3s, opacity .3s; }
.dose + .dose { margin-top: 8px; }
.dose-img { flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--soft, var(--fill)); overflow: hidden; }
.dose-img img { width: 52px; height: 52px; object-fit: contain; }
.dose-main { flex: 1; min-width: 0; }
.dose-name { font-size: 16px; font-weight: 700; line-height: 1.25; }
.dose-sub { margin-top: 2px; font-size: 14px; color: var(--label2); }
.take {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; border-radius: 22px;
  background: var(--ink); color: var(--on-ink); font-size: 15px; font-weight: 700; transition: transform .2s var(--spring), background .3s;
}
.take:active { transform: scale(.92); }
.dose.done { background: var(--ok-soft); box-shadow: none; }
.dose.done .take { background: var(--ok); color: #fff; padding: 0 14px; }
.dose.skipped { opacity: .62; }
.dose.skipped .take { background: var(--fill2); color: var(--label); }
.check-anim { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.check-anim path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .45s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Совет дня: закрыт до первой отметки */
.tip-card { position: relative; margin: 0 16px 22px; perspective: 1200px; }
.tip-inner { position: relative; min-height: 168px; transition: transform .7s var(--spring); transform-style: preserve-3d; }
.tip-card.open .tip-inner { transform: rotateY(180deg); }
.tip-face { position: absolute; inset: 0; min-height: 168px; padding: 18px; border-radius: 24px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; box-shadow: var(--card-shadow); }
.tip-front { background: repeating-linear-gradient(135deg, var(--card) 0 14px, rgba(242, 140, 30, .05) 14px 28px); align-items: center; justify-content: center; text-align: center; gap: 8px; }
.tip-front .lock { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--tint-soft); color: var(--tint); font-size: 24px; }
.tip-front b { font: 800 18px/1.2 var(--display); }
.tip-front span { font-size: 14px; color: var(--label2); max-width: 26em; }
.tip-back { position: relative; inset: auto; background: var(--card); transform: rotateY(180deg); }
.tip-kind { font-size: 12px; font-weight: 800; color: var(--tint); text-transform: uppercase; letter-spacing: .06em; }
.tip-title { margin: 6px 0 6px; font: 800 19px/1.25 var(--display); }
.tip-text { font-size: 15px; line-height: 1.45; color: var(--label2); flex: 1; }
.tip-more { align-self: flex-start; margin-top: 10px; color: var(--tint); font-weight: 700; font-size: 15px; }

/* Курс: прогресс, растение, остаток */
.course-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 22px; background: var(--card); box-shadow: var(--card-shadow); text-align: left; width: 100%; }
.course-card + .course-card { margin-top: 10px; }
.plant { flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--soft, var(--fill)); }
.plant svg { width: 54px; height: 54px; }
.cc-main { flex: 1; min-width: 0; }
.cc-name { font-weight: 700; font-size: 16px; line-height: 1.25; }
.cc-sub { margin-top: 3px; font-size: 14px; color: var(--label2); }
.bar { height: 8px; margin-top: 9px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--c, var(--accent)); transition: width .8s var(--ease); }
.refill { margin: 0 16px 22px; padding: 16px; border-radius: 24px; background: var(--warn-soft); }
.refill-h { display: flex; gap: 12px; align-items: center; }
.refill-h b { display: block; font: 800 17px/1.25 var(--display); }
.refill-h span { display: block; margin-top: 2px; font-size: 14px; color: var(--label2); }
.refill .btns { margin-top: 12px; }
.refill .btn { min-height: 46px; font-size: 15px; }

/* Ритуалы на главной */
.rituals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px 22px; }
.ritual { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 20px; background: var(--card); box-shadow: var(--card-shadow); text-align: left; min-height: 104px; }
.ritual .e { font-size: 26px; line-height: 1; }
.ritual b { font-size: 15px; font-weight: 700; line-height: 1.2; }
.ritual span { font-size: 13px; color: var(--label2); }
.ritual.done { background: var(--ok-soft); box-shadow: none; }
.ritual .plus { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tint-soft); color: var(--tint); font-size: 22px; font-weight: 700; }
.water-dots { display: flex; gap: 3px; }
.water-dots i { width: 9px; height: 13px; border-radius: 2px 2px 4px 4px; background: var(--fill2); }
.water-dots i.on { background: #4ba3e3; }

/* Рекомендация */
.reco { display: flex; gap: 12px; align-items: center; margin: 0 16px 22px; padding: 14px; border-radius: 22px; background: var(--card); box-shadow: var(--card-shadow); }
.reco-cap { font-size: 12px; font-weight: 800; color: var(--tint); text-transform: uppercase; letter-spacing: .06em; }
.reco b { display: block; margin-top: 2px; font-size: 15px; line-height: 1.3; }
.reco span { display: block; margin-top: 2px; font-size: 13px; color: var(--label2); }
.x { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--label2); font-size: 18px; }

/* ——— Сад и цветы степи ——— */
.garden { margin: 0 16px 22px; padding: 16px; border-radius: 26px; background: linear-gradient(180deg, #eaf3e4 0%, #f6efe2 100%); box-shadow: var(--card-shadow); }
:root[data-theme="dark"] .garden { background: linear-gradient(180deg, #1d261b 0%, #241e17 100%); }
.garden-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.garden-h b { font: 800 18px/1.2 var(--display); }
.garden-row { display: flex; gap: 12px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.garden-row::-webkit-scrollbar { display: none; }
.pot { flex: none; width: 96px; text-align: center; }
.pot svg { width: 96px; height: 96px; margin: 0 auto; }
.pot b { display: block; font-size: 13px; font-weight: 700; line-height: 1.2; }
.pot span { display: block; font-size: 12px; color: var(--label2); }
.grow { animation: grow .9s var(--spring); transform-origin: 50% 90%; }
@keyframes grow { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } }
.flowers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.flower { padding: 10px 4px; border-radius: 18px; background: var(--card); text-align: center; box-shadow: var(--card-shadow); }
.flower svg { width: 52px; height: 52px; margin: 0 auto; }
.flower b { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; line-height: 1.2; }
.flower.locked svg { filter: grayscale(1); opacity: .28; }
.flower.locked b { color: var(--label3); }

/* Значки (SCB) */
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge { padding: 14px 8px 12px; border-radius: 18px; background: var(--card); text-align: center; box-shadow: var(--card-shadow); }
.badge-emoji { font-size: 30px; line-height: 1; filter: grayscale(1); opacity: .35; }
.badge-title { margin-top: 8px; font-size: 13px; font-weight: 700; line-height: 1.2; }
.badge-desc { margin-top: 3px; font-size: 11px; line-height: 1.25; color: var(--label2); }
.badge.got .badge-emoji { filter: none; opacity: 1; animation: pop .5s var(--ease); }
.badge.got { box-shadow: inset 0 0 0 1.5px rgba(242, 140, 30, .55); }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } }

/* ——— Каталог ——— */
.search { display: flex; align-items: center; gap: 8px; height: 44px; margin: 0 16px 14px; padding: 0 14px; border-radius: 22px; background: var(--fill); color: var(--label2); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 17px; color: var(--label); -webkit-appearance: none; appearance: none; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px 24px; }
.pcard { display: flex; flex-direction: column; padding: 10px 10px 12px; border-radius: 22px; background: var(--card); box-shadow: var(--card-shadow); text-align: left; min-width: 0; }
.pcard-img { height: 118px; border-radius: 16px; display: grid; place-items: center; background: var(--soft, var(--fill)); overflow: hidden; }
.pcard-img img { width: 104px; height: 104px; object-fit: contain; }
.pcard-img svg { width: 70px; height: 90px; }
.pcard-brand { margin-top: 10px; font-size: 11px; font-weight: 800; color: var(--label2); text-transform: uppercase; letter-spacing: .06em; }
.pcard-name { margin-top: 2px; font-size: 14px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-tag { align-self: flex-start; margin-top: 8px; padding: 3px 9px; border-radius: 10px; background: var(--tint-soft); color: var(--tint); font-size: 12px; font-weight: 700; }
.pcard .pill { margin-top: 10px; align-self: stretch; justify-content: center; }
.foryou { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 0 16px; margin-bottom: 24px; }
.foryou::-webkit-scrollbar { display: none; }
.foryou .pcard { flex: none; width: 210px; }
.why { margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--label2); }

/* Деталь товара */
.p-hero { margin: 0 16px 18px; padding: 18px; border-radius: 26px; background: var(--soft, var(--fill)); text-align: center; }
.p-hero img { width: 170px; height: 170px; object-fit: contain; margin: 0 auto; display: block; }
.p-hero svg.jar { width: 110px; height: 140px; margin: 10px auto; }
.p-hero h2 { margin: 8px 0 4px; font: 800 22px/1.2 var(--display); }
.p-hero p { margin: 0; font-size: 15px; color: var(--label2); }
.note { margin: 0 16px 22px; padding: 14px 16px; border-radius: var(--r); font-size: 14px; line-height: 1.45; background: var(--fill); color: var(--label2); }
.note b { color: var(--label); }
.heat { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; padding: 14px 16px; }
.heat i { aspect-ratio: 1; border-radius: 6px; background: var(--fill); }
.heat i.on { background: var(--ok); }
.heat i.half { background: var(--ok-soft); }
.heat i.fut { background: none; box-shadow: inset 0 0 0 1px var(--sep); }
.stepper { flex: none; display: flex; align-items: center; height: 36px; border-radius: 18px; background: var(--tint-soft); color: var(--tint); }
.stepper button { width: 38px; height: 36px; display: grid; place-items: center; font-size: 20px; font-weight: 700; }
.stepper b { min-width: 36px; text-align: center; font-weight: 700; color: var(--label); font-variant-numeric: tabular-nums; }

/* ——— Практики ——— */
.prac { display: flex; align-items: center; gap: 14px; }
.prac .e { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--soft, var(--fill)); font-size: 24px; }
.player { margin: 0 16px 22px; padding: 22px 18px; border-radius: 28px; background: var(--card); box-shadow: var(--card-shadow); text-align: center; }
.breath { position: relative; width: 230px; height: 230px; margin: 10px auto 18px; display: grid; place-items: center; }
.breath i { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffd9b0, #f28c1e 70%); opacity: .9; transform: scale(.55); transition: transform 4s ease-in-out; }
.breath i.wave { background: none; box-shadow: 0 0 0 2px rgba(242, 140, 30, .3); transform: scale(1); }
.breath b { position: relative; font: 800 22px/1.2 var(--display); color: #fff; text-shadow: 0 1px 8px rgba(120, 60, 0, .35); }
.timer { font: 800 44px/1 var(--round); font-variant-numeric: tabular-nums; }
.glass { position: relative; width: 120px; height: 168px; margin: 8px auto 16px; border-radius: 10px 10px 26px 26px; box-shadow: inset 0 0 0 3px #9ccbec; overflow: hidden; background: rgba(156, 203, 236, .12); }
.glass i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, #8fd0ff, #3d9ae0); transition: height .6s var(--spring); }
.steps-list { text-align: left; margin-top: 14px; }
.check-row { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px 4px; border-top: .5px solid var(--sep); text-align: left; }
.check-row .box { flex: none; width: 28px; height: 28px; border-radius: 9px; box-shadow: inset 0 0 0 2px var(--sep); display: grid; place-items: center; color: #fff; transition: background .2s; }
.check-row.on .box { background: var(--ok); box-shadow: none; }

/* ——— Sheet (SCB) ——— */
.backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(20, 12, 4, .32); opacity: 0; pointer-events: none; transition: opacity .45s var(--ease); }
.backdrop.on { opacity: 1; pointer-events: auto; }
.sheet {
  --card: var(--elev);
  position: fixed; z-index: 21; left: 8px; right: 8px; bottom: calc(8px + var(--kb));
  max-width: 580px; margin: 0 auto; max-height: calc(var(--vvh) - env(safe-area-inset-top) - 24px);
  display: flex; flex-direction: column; border-radius: 34px; background: var(--sheet-bg); box-shadow: 0 -4px 40px rgba(0, 0, 0, .2);
  transform: translateY(calc(100% + 48px)); transition: transform .5s var(--ease), bottom .2s;
}
.sheet.on { transform: none; }
.sheet.dragging { transition: none; }
.grabber { width: 36px; height: 5px; margin: 7px auto 0; border-radius: 3px; background: var(--label3); }
.sheet-head { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 8px 18px 10px; touch-action: none; }
.sheet-head .t { max-width: 62vw; font-weight: 700; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-head .l { justify-self: start; color: var(--tint); font-weight: 600; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 0 calc(14px + env(safe-area-inset-bottom)); }
.sheet-body .group { margin-bottom: 20px; }
.sheet-pad { padding: 0 16px; }
.sheet-lead { margin: 0 20px 16px; font-size: 15px; line-height: 1.45; color: var(--label2); }

/* ——— Тост, алерт, конфетти ——— */
.toast {
  position: fixed; z-index: 40; top: calc(env(safe-area-inset-top) + 8px); left: 50%; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 22px; font-size: 15px; font-weight: 700; text-align: center;
  background: var(--glass); box-shadow: var(--glass-shadow), inset 0 0 0 .5px var(--glass-edge);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  transform: translate(-50%, -160%); opacity: 0; pointer-events: none; transition: transform .5s var(--ease), opacity .3s;
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.alert-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .32); opacity: 0; pointer-events: none; transition: opacity .25s; }
.alert-wrap.on { opacity: 1; pointer-events: auto; }
.alert { width: min(320px, 100%); padding: 22px 16px 16px; border-radius: 30px; text-align: center; background: var(--alert-bg); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); transform: scale(1.12); transition: transform .35s var(--ease); }
.alert-wrap.on .alert { transform: none; }
.alert h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.alert p { margin: 0 4px 18px; font-size: 15px; line-height: 1.4; color: var(--label2); }
.alert .btns button { height: 46px; border-radius: 23px; background: var(--fill); font-weight: 700; text-align: center; }
.alert .btns .yes { background: var(--ink); color: var(--on-ink); }
.confetti { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; }
.confetti span { position: absolute; top: -40px; left: var(--x); font-size: 24px; animation: fall var(--d) cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--r)); } }
.bump { animation: bump .45s var(--ease); }
@keyframes bump { 35% { transform: scale(1.08); } }

/* ——— Таб-бар (SCB, стекло) ——— */
.tabbar {
  position: fixed; z-index: 11; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 2px; padding: 4px; border-radius: 34px;
  background: var(--glass); box-shadow: var(--glass-shadow), inset 0 0 0 .5px var(--glass-edge);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  transform: translateX(-50%); transition: transform .45s var(--ease), opacity .3s;
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 66px; height: 58px; padding: 0 4px; border-radius: 29px; font-size: 11px; font-weight: 700; color: var(--label); transition: background .25s, color .25s; }
.tab svg { width: 25px; height: 25px; }
.tab.on { color: var(--tint); background: var(--fill); }
.tab:active { transform: scale(.94); }
body.tabs-hidden .tabbar { transform: translate(-50%, 160%); opacity: 0; pointer-events: none; }

/* ——— Онбординг ——— */
.onb { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column; transition: opacity .4s var(--ease), transform .5s var(--ease); }
.onb.gone { opacity: 0; transform: translateY(24px); pointer-events: none; }
.onb-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(env(safe-area-inset-top) + 12px) 16px 6px; }
.onb-top img { height: 26px; width: auto; }
:root[data-theme="dark"] .onb-top img, :root[data-theme="dark"] .logo-img { filter: invert(1) hue-rotate(180deg) brightness(1.1); }
.dots { display: flex; gap: 6px; justify-content: center; padding: 6px 0 2px; }
.dots i { width: 7px; height: 7px; border-radius: 4px; background: var(--fill2); transition: width .3s var(--ease), background .3s; }
.dots i.on { width: 22px; background: var(--ink); }
.onb-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 0 20px; }
.onb-step { animation: stepIn .5s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(24px); } }
.onb h2 { margin: 6px 20px 8px; font: 800 28px/1.15 var(--display); letter-spacing: -.02em; }
.onb .lead { margin: 0 20px 20px; font-size: 16px; line-height: 1.45; color: var(--label2); }
.onb-foot { flex: none; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); display: grid; gap: 4px; }
.onb-item { display: flex; gap: 14px; align-items: center; margin: 0 16px 12px; padding: 14px; border-radius: 24px; background: var(--card); box-shadow: var(--card-shadow); }
.onb-item .dose-img { width: 72px; height: 72px; border-radius: 20px; }
.onb-item .dose-img img { width: 66px; height: 66px; }
.plan-line { margin: 0 16px 18px; padding: 14px 16px; border-radius: 20px; background: var(--tint-soft); font-size: 15px; line-height: 1.45; }
.plan-line b { color: var(--tint); }
.opt { display: flex; gap: 14px; align-items: flex-start; width: 100%; margin: 0; padding: 14px 16px; text-align: left; }
.opt .e { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--fill); font-size: 20px; }
.opt .row-title { font-weight: 700; }
.opt .tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 9px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 800; vertical-align: 2px; }
.opt .radio { flex: none; width: 26px; height: 26px; margin-top: 7px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--sep); display: grid; place-items: center; color: #fff; transition: background .2s; }
.opt.on .radio { background: var(--ok); box-shadow: none; }
.consent { margin: 0 20px; font-size: 12.5px; line-height: 1.45; color: var(--label2); }
.done-screen { text-align: center; padding: 30px 20px; }
.big-check { width: 110px; height: 110px; margin: 10px auto 6px; fill: none; stroke: var(--ok); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.big-check circle { stroke-dasharray: 302; stroke-dashoffset: 302; animation: draw .6s var(--ease) .05s forwards; }
.big-check path { stroke-dasharray: 70; stroke-dashoffset: 70; animation: draw .45s var(--ease) .5s forwards; }

/* ——— Эмулятор WhatsApp (демо) ——— */
.wa { position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; background: var(--wa-bg); transform: translateY(100%); transition: transform .5s var(--ease); }
.wa.on { transform: none; }
.wa-head { flex: none; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 8px) 12px 10px; background: var(--wa-head); color: #fff; }
.wa-head .ava { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; }
.wa-head .ava img { width: 32px; height: auto; }
.wa-head b { display: block; font-size: 16px; }
.wa-head span { display: block; font-size: 12px; opacity: .8; }
.wa-close { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; font-size: 18px; }
.wa-cost { flex: none; display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; background: #fff7d6; color: #5a4300; font-size: 13px; font-weight: 600; }
:root[data-theme="dark"] .wa-cost { background: #3b3210; color: #ffe9a3; }
.wa-feed { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 10px 20px; display: flex; flex-direction: column; gap: 6px; }
.wa-day { align-self: center; margin: 8px 0 4px; padding: 4px 12px; border-radius: 8px; background: rgba(255, 255, 255, .85); color: #54656f; font-size: 12px; font-weight: 600; box-shadow: 0 1px .5px rgba(0, 0, 0, .1); }
:root[data-theme="dark"] .wa-day { background: #182229; color: #8696a0; }
.wa-msg { max-width: 84%; padding: 7px 10px 18px; border-radius: 10px; font-size: 15px; line-height: 1.38; position: relative; box-shadow: 0 1px .5px rgba(0, 0, 0, .13); white-space: pre-line; color: #111b21; }
:root[data-theme="dark"] .wa-msg { color: #e9edef; }
.wa-msg.in { align-self: flex-start; background: var(--wa-in); border-top-left-radius: 2px; }
.wa-msg.out { align-self: flex-end; background: var(--wa-out); border-top-right-radius: 2px; }
.wa-msg time { position: absolute; right: 8px; bottom: 3px; font-size: 11px; color: #667781; }
.wa-msg .tag { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; color: #8a6d00; }
.wa-msg .tag.free { color: #1d8a4a; }
.wa-msg a { color: #027eb5; word-break: break-all; }
.wa-btns { align-self: flex-start; max-width: 84%; width: 84%; display: grid; gap: 2px; margin-top: -4px; }
.wa-btns button { padding: 10px; border-radius: 8px; background: var(--wa-in); color: #027eb5; font-weight: 600; font-size: 15px; text-align: center; box-shadow: 0 1px .5px rgba(0, 0, 0, .13); }
:root[data-theme="dark"] .wa-btns button { color: #53bdeb; }
.wa-btns button:disabled { opacity: .5; }
.wa-sys { align-self: center; max-width: 92%; margin: 6px 0; padding: 6px 12px; border-radius: 8px; background: #fff3c4; color: #5a4300; font-size: 12.5px; line-height: 1.4; text-align: center; }
:root[data-theme="dark"] .wa-sys { background: #3b3210; color: #ffe9a3; }
.wa-foot { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); }
.wa-foot .btn { min-height: 44px; font-size: 14px; border-radius: 22px; }

/* Демо-кнопка */
.demo-fab { position: fixed; z-index: 13; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); height: 40px; padding: 0 14px; border-radius: 20px; background: #25d366; color: #fff; font-size: 14px; font-weight: 800; box-shadow: 0 8px 22px rgba(37, 211, 102, .35); display: inline-flex; align-items: center; gap: 6px; }
body.tabs-hidden .demo-fab, body.pushed .demo-fab { display: none; }
.clock { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 12px; background: var(--fill); font-size: 13px; font-weight: 700; color: var(--label2); }

.empty { padding: 30px 32px; text-align: center; font-size: 15px; color: var(--label2); }
.disc { margin: 4px 24px 26px; font-size: 12px; line-height: 1.45; color: var(--label3); text-align: center; }
.article { margin: 0 20px 24px; font-size: 17px; line-height: 1.55; }
.article h2 { margin: 6px 0 12px; font: 800 26px/1.2 var(--display); letter-spacing: -.01em; }
.article p { margin: 0 0 14px; color: var(--label); }
.kz-draft { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 11px; font-weight: 800; vertical-align: 2px; }

@media (max-width: 360px) {
  .tab { min-width: 58px; font-size: 10px; }
  .large-title h1 { font-size: 28px; }
  .hero-ring { width: 84px; height: 84px; }
  .grid { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
