/* Гиппократ — мини-приложение. Светлая тема — светлый шалфей, тёмная — ночной зелёный, золото — только акцент.
   Заголовки — GK Serif (подмножество Lora), текст — Inter; оба под лицензией SIL OFL 1.1, см. fonts/OFL.txt. */
@font-face { font-family: "Inter"; src: url("fonts/inter-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-700.woff") format("woff"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "GK Serif"; src: url("fonts/gkserif-400.woff") format("woff"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "GK Serif"; src: url("fonts/gkserif-600.woff") format("woff"); font-weight: 600 700; font-display: swap; }

:root, html[data-theme="light"] {
  --bg: #EDF1EC; --surf: #FFFFFF; --surf2: #F4F7F3; --ink: #17241E; --mute: #66726B; --faint: #8E9A93; --line: #DCE3DC;
  --brand: #1F5A44; --brand-ink: #FFFFFF; --gold: #B98B2E; --gold-ink: #1A1407; --gold-soft: #F3E8CF; --leaf-off: #D5DED6;
  --sleep: #6A6ED2; --water: #2F8DC0; --steps: #4F8A39; --food: #D0882C; --danger: #B3402E; --shade: rgba(20, 30, 25, .45);
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #13201A; --surf: #1B2C24; --surf2: #22362D; --ink: #E7EEE8; --mute: #9BAAA1; --faint: #74857B; --line: #2C4237;
  --brand: #7FC4A0; --brand-ink: #0F1E17; --gold: #D9B25C; --gold-ink: #1A1407; --gold-soft: #3A3220; --leaf-off: #2C4237;
  --sleep: #A3A6F2; --water: #6EC1EA; --steps: #93C877; --food: #F0B45F; --danger: #F08C78; --shade: rgba(0, 0, 0, .55);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #13201A; --surf: #1B2C24; --surf2: #22362D; --ink: #E7EEE8; --mute: #9BAAA1; --faint: #74857B; --line: #2C4237;
    --brand: #7FC4A0; --brand-ink: #0F1E17; --gold: #D9B25C; --gold-ink: #1A1407; --gold-soft: #3A3220; --leaf-off: #2C4237;
    --sleep: #A3A6F2; --water: #6EC1EA; --steps: #93C877; --food: #F0B45F; --danger: #F08C78; --shade: rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--ink); }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; min-height: 100vh; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hidden { display: none !important; }

#app { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.top { height: 52px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 14px; position: sticky; top: 0; z-index: 5;
  background: var(--bg); }
.top b { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.ib { width: 38px; height: 38px; border-radius: 19px; background: var(--surf); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--ink); flex: none; }
.ib.ghost { visibility: hidden; }
.main { flex: 1; padding: 2px 18px 100px; display: flex; flex-direction: column; gap: 14px; }
.date { font-size: 13.5px; color: var(--mute); }
.h1 { font-family: "GK Serif", Georgia, serif; font-weight: 600; font-size: 28px; line-height: 1.12; letter-spacing: -.01em; }
.h2 { font-family: "GK Serif", Georgia, serif; font-weight: 600; font-size: 20px; line-height: 1.2; }
.p { font-size: 14.5px; line-height: 1.45; color: var(--mute); }
.s { font-size: 13px; color: var(--mute); line-height: 1.35; }
.c { text-align: center; }
.panel { background: var(--surf); border-radius: 22px; padding: 6px 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.btn { min-height: 52px; border-radius: 16px; background: var(--brand); color: var(--brand-ink); font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 10px; flex: none; padding: 0 18px; width: 100%; }
.btn:disabled { opacity: .45; }
.btn .lk { width: 22px; height: 22px; border-radius: 11px; background: var(--gold-soft); display: flex; align-items: center;
  justify-content: center; font-style: normal; margin-left: -2px; }
.btn.line { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.gold { background: var(--gold); color: var(--gold-ink); }
.btn.sm { min-height: 42px; font-size: 14.5px; border-radius: 13px; }
.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid var(--line); }
.duo { display: flex; gap: 8px; }
.duo .btn { flex: 1; width: auto; min-width: 0; }
.row > .inp { min-width: 0; }
.link { color: var(--brand); font-weight: 600; font-size: 14px; padding: 8px 0; }
.chip { flex: none; min-height: 36px; padding: 0 13px; border-radius: 18px; border: 1px solid var(--line); background: var(--surf2);
  font-size: 13.5px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.prem { flex: none; font-size: 12px; font-weight: 700; color: var(--gold); background: var(--gold-soft); padding: 4px 9px; border-radius: 10px; }
.done { flex: none; width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.track { height: 5px; border-radius: 3px; background: var(--leaf-off); margin-top: 7px; overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 3px; transition: width .35s ease; }

/* нижние вкладки */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; height: calc(66px + env(safe-area-inset-bottom)); display: flex;
  justify-content: center; background: var(--surf); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs .in { display: flex; justify-content: space-around; align-items: flex-start; width: 100%; max-width: 520px; padding-top: 8px; }
.tabs button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--faint); font-weight: 500;
  width: 64px; }
.tabs button.on { color: var(--brand); font-weight: 700; }

/* венок дня */
.wreath { display: flex; align-items: center; gap: 14px; }
.wreath svg { flex: none; }
.legend { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 5px; flex: none; }
.week { display: flex; justify-content: space-between; padding: 6px 0 10px; }
.week div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--mute); }
.week div.now { color: var(--ink); font-weight: 700; }
.leaf { transition: fill .4s ease; }

.hrow { display: flex; align-items: center; gap: 12px; padding: 11px 0; width: 100%; text-align: left; }
.hrow + .hrow { border-top: 1px solid var(--line); }
.hrow .t { flex: 1; min-width: 0; }
.hrow .t b { display: block; font-size: 15.5px; font-weight: 600; }
.hrow .t span { font-size: 13px; color: var(--mute); }
.tip { background: var(--gold-soft); border-radius: 18px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; line-height: 1.4; }

/* питание */
.kcal { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kcal b { font-family: "GK Serif", Georgia, serif; font-size: 40px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.mac { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 4px 0 14px; }
.mac div { font-size: 12.5px; color: var(--mute); }
.mac div b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; margin-bottom: 1px; }
.adds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.adds button { height: 66px; border-radius: 16px; background: var(--surf); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 5px; font-size: 13px; font-weight: 600; position: relative; }
.adds button em { position: absolute; top: 7px; right: 7px; font-style: normal; width: 18px; height: 18px; border-radius: 9px;
  background: var(--gold-soft); display: flex; align-items: center; justify-content: center; }
.meal { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; width: 100%; text-align: left; }
.meal + .meal { border-top: 1px solid var(--line); }
.meal .tm { width: 42px; flex: none; font-size: 13px; color: var(--mute); padding-top: 2px; font-variant-numeric: tabular-nums; }
.meal .t { flex: 1; min-width: 0; }
.meal .t b { display: block; font-size: 15px; font-weight: 600; }
.meal .t span { font-size: 12.5px; color: var(--mute); }
.meal .k { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.empty { padding: 18px 4px; text-align: center; color: var(--mute); font-size: 14px; }

/* шаги */
.big { font-family: "GK Serif", Georgia, serif; font-size: 44px; font-weight: 600; letter-spacing: -.01em; line-height: 1; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 78px; padding-top: 8px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11.5px; color: var(--mute); height: 100%;
  justify-content: flex-end; }
.bars div.now { color: var(--ink); font-weight: 700; }
.bars i { width: 100%; border-radius: 6px 6px 3px 3px; display: block; min-height: 4px; }
.way { display: flex; gap: 12px; padding: 13px 0; align-items: flex-start; }
.way + .way { border-top: 1px solid var(--line); }
.way .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--surf2); display: flex; align-items: center; justify-content: center;
  flex: none; color: var(--brand); }
.way .t { flex: 1; min-width: 0; }
.way .t b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.ok { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--steps); margin-top: 6px; }
.howto { counter-reset: n; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.howto div { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.4; align-items: flex-start; }
.howto div::before { counter-increment: n; content: counter(n); width: 24px; height: 24px; border-radius: 12px; background: var(--gold-soft);
  color: var(--gold); font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.copy { display: flex; gap: 8px; align-items: center; background: var(--surf2); border-radius: 12px; padding: 8px 10px; margin-top: 10px; }
.copy code { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mute); }

/* образ */
.face { width: 104px; height: 128px; border-radius: 20px; background: var(--surf2); flex: none; overflow: hidden; }
.lock { display: flex; align-items: center; gap: 12px; padding: 12px 0; width: 100%; text-align: left; }
.lock + .lock { border-top: 1px solid var(--line); }
.lock .t { flex: 1; min-width: 0; }
.lock .t b { display: block; font-size: 15px; font-weight: 600; }
.lock .t span { font-size: 12.5px; color: var(--mute); }
.icn { width: 38px; height: 38px; border-radius: 12px; background: var(--surf2); display: flex; align-items: center; justify-content: center;
  flex: none; color: var(--brand); }
.card { background: var(--surf); border-radius: 18px; padding: 12px 14px; }
.card b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.ul { display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.ul div { display: flex; gap: 8px; font-size: 14px; line-height: 1.4; }
.ul div::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: var(--gold); margin-top: 8px; flex: none; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photos div { aspect-ratio: 3 / 4; border-radius: 14px; background: var(--surf2) center / cover no-repeat; position: relative; overflow: hidden; }
.photos span { position: absolute; left: 8px; bottom: 6px; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); }

/* отчёт */
.mrow { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mrow .t { width: 128px; flex: none; }
.mrow .t span { display: block; font-size: 12.5px; color: var(--mute); }
.mrow .t b { font-size: 16.5px; font-weight: 700; }
.spark { flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 30px; }
.spark i { flex: 1; border-radius: 2px; min-height: 1px; }
.delta { width: 70px; text-align: right; font-size: 12.5px; font-weight: 700; flex: none; color: var(--mute); }
.blur { filter: blur(5px); pointer-events: none; user-select: none; }

/* премиум */
.feat { display: flex; gap: 10px; padding: 9px 0; font-size: 14.5px; align-items: flex-start; line-height: 1.35; }
.plan { border-radius: 18px; background: var(--surf); border: 2px solid transparent; padding: 14px 16px; display: flex; align-items: center;
  gap: 12px; position: relative; width: 100%; text-align: left; }
.plan.on { border-color: var(--gold); }
.plan .t { flex: 1; }
.plan .t b { display: block; font-size: 16px; font-weight: 600; }
.plan .t span { font-size: 13px; color: var(--mute); }
.plan .pr { font-family: "GK Serif", Georgia, serif; font-size: 22px; font-weight: 600; }
.radio { width: 22px; height: 22px; border-radius: 11px; border: 2px solid var(--line); flex: none; }
.plan.on .radio { border: 7px solid var(--gold); }
.save { position: absolute; top: -10px; right: 14px; background: var(--gold); color: var(--gold-ink); font-size: 11.5px; font-weight: 800;
  padding: 3px 9px; border-radius: 9px; }

/* ещё */
.mrow2 { display: flex; align-items: center; gap: 12px; padding: 13px 0; width: 100%; text-align: left; font-size: 15px; }
.mrow2 + .mrow2 { border-top: 1px solid var(--line); }
.mrow2 .t { flex: 1; } .mrow2 .t span { display: block; font-size: 12.5px; color: var(--mute); }
.sw { width: 46px; height: 28px; border-radius: 14px; background: var(--brand); position: relative; flex: none; transition: background .2s; }
.sw::after { content: ""; position: absolute; right: 3px; top: 3px; width: 22px; height: 22px; border-radius: 11px; background: #fff;
  transition: right .2s, left .2s; }
.sw.off { background: var(--leaf-off); }
.sw.off::after { right: 25px; }

/* первый вход */
.onb { flex: 1; display: flex; flex-direction: column; padding: 8px 22px 26px; gap: 16px; min-height: calc(100vh - 52px); }
.dots { display: flex; gap: 6px; justify-content: center; padding-top: 4px; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--leaf-off); transition: width .3s; }
.dots i.on { width: 22px; background: var(--brand); }
.feat2 { display: flex; gap: 14px; align-items: flex-start; padding: 11px 0; }
.feat2 + .feat2 { border-top: 1px solid var(--line); }
.feat2 .ic { width: 40px; height: 40px; border-radius: 13px; background: var(--surf2); display: flex; align-items: center; justify-content: center;
  flex: none; color: var(--brand); }
.feat2 b { display: block; font-size: 15.5px; font-weight: 600; margin-bottom: 2px; }
.agree { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; line-height: 1.4; color: var(--mute); text-align: left; }
.agree .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); flex: none; display: flex; align-items: center;
  justify-content: center; }
.agree.on .box { background: var(--brand); border-color: var(--brand); }
.agree u { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.seg { display: flex; background: var(--surf); border-radius: 16px; padding: 4px; gap: 4px; }
.seg button { flex: 1; height: 48px; border-radius: 12px; font-weight: 600; font-size: 15.5px; color: var(--mute); }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.field { background: var(--surf); border-radius: 16px; min-height: 58px; display: flex; align-items: center; padding: 0 18px; gap: 10px;
  border: 2px solid var(--line); }
.field:focus-within { border-color: var(--brand); }
.field input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: "GK Serif", Georgia, serif;
  font-size: 26px; font-weight: 600; height: 54px; }
.field span { color: var(--mute); font-size: 15px; }
.lbl2 { font-size: 14px; font-weight: 600; margin-bottom: -6px; }
.goal { display: flex; align-items: center; gap: 12px; padding: 13px 0; }
.goal + .goal { border-top: 1px solid var(--line); }
.goal .dot { width: 12px; height: 12px; border-radius: 6px; flex: none; }
.goal .t { flex: 1; min-width: 0; }
.goal .t b { display: block; font-size: 15.5px; font-weight: 600; }
.goal .t span { font-size: 12.5px; color: var(--mute); }
.mini { display: flex; align-items: center; gap: 6px; }
.mini button { width: 36px; height: 36px; border-radius: 11px; background: var(--surf2); display: flex; align-items: center; justify-content: center; }
.mini b { min-width: 76px; text-align: center; font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.steps3 { display: flex; flex-direction: column; gap: 10px; }
.steps3 div { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; }
.steps3 i { width: 26px; height: 26px; border-radius: 13px; background: var(--gold-soft); color: var(--gold); font-style: normal; font-weight: 800;
  font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.spacer { flex: 1; }

/* нижний лист */
.shade { position: fixed; inset: 0; background: var(--shade); z-index: 20; opacity: 0; transition: opacity .2s; }
.shade.in { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--bg); border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; max-height: 92vh;
  overflow-y: auto; transform: translateY(100%); transition: transform .25s ease; max-width: 520px; margin: 0 auto; }
.sheet.in { transform: none; }
.sheet .sx { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 17px; background: var(--surf);
  display: flex; align-items: center; justify-content: center; color: var(--mute); }
.sheet > .h2:first-of-type { padding-right: 40px; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 2px; flex: none; }
.inp { width: 100%; min-height: 50px; border-radius: 14px; border: 2px solid var(--line); background: var(--surf); padding: 0 14px;
  font-size: 16px; outline: none; }
.inp:focus { border-color: var(--brand); }
textarea.inp { padding: 12px 14px; min-height: 90px; resize: none; line-height: 1.4; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.lbl { font-size: 12.5px; color: var(--mute); margin-bottom: 4px; display: block; }
.stepper { display: flex; align-items: center; justify-content: space-between; height: 48px; border-radius: 14px; background: var(--surf);
  padding: 0 6px; }
.stepper button { width: 36px; height: 36px; border-radius: 10px; background: var(--surf2); display: flex; align-items: center; justify-content: center; }
.stepper b { font-size: 18px; font-weight: 700; }
.res { display: flex; gap: 10px; align-items: center; padding: 10px 0; }
.res + .res { border-top: 1px solid var(--line); }
.res .t { flex: 1; min-width: 0; } .res .t b { display: block; font-size: 15px; font-weight: 600; } .res .t span { font-size: 12.5px; color: var(--mute); }
.res input { width: 74px; min-height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surf); text-align: center;
  font-size: 15px; font-weight: 600; outline: none; }
.check { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); flex: none; display: flex; align-items: center; justify-content: center; }
.check.on { background: var(--brand); border-color: var(--brand); }

/* камера */
.cam { position: fixed; inset: 0; z-index: 30; background: #0E1512; display: flex; flex-direction: column; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam .frame { position: absolute; left: 50%; top: 40%; width: 290px; height: 170px; transform: translate(-50%, -50%); border-radius: 14px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .42); }
.cam .frame i { position: absolute; width: 34px; height: 34px; border: 4px solid #fff; }
.cam .bar { position: absolute; top: 0; left: 0; right: 0; height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; z-index: 2; }
.cam .bar button { width: 40px; height: 40px; border-radius: 20px; background: rgba(10, 16, 13, .55); color: #fff; display: flex;
  align-items: center; justify-content: center; }
.cam .hint { position: absolute; top: 74px; left: 0; right: 0; text-align: center; color: #fff; font-size: 15px; font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6); z-index: 2; }
.cam .foot { position: absolute; bottom: calc(26px + env(safe-area-inset-bottom)); left: 18px; right: 18px; z-index: 2; display: flex; gap: 8px; }
.cam .foot .btn { flex: 1; width: auto; min-width: 0; background: rgba(10, 16, 13, .62); color: #fff; border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cam .hint { padding: 0 20px; }
.cam .scanline { position: absolute; left: 10px; right: 10px; top: 50%; height: 2px; border-radius: 2px; background: #7FE0A8;
  box-shadow: 0 0 10px #7FE0A8; animation: gk-scan 1.6s ease-in-out infinite alternate; }
@keyframes gk-scan { from { transform: translateY(-64px); } to { transform: translateY(64px); } }
@media (prefers-reduced-motion: reduce) { .cam .scanline { animation: none; } }

.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40;
  background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 14px; font-size: 14px; max-width: 88vw; text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .2); opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.in { opacity: 1; }
.loader { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.spin { width: 34px; height: 34px; border-radius: 17px; border: 3px solid var(--leaf-off); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 350px) {
  .main { padding-left: 14px; padding-right: 14px; }
  .h1 { font-size: 24px; }
  .wreath svg { width: 150px; height: 150px; }
  .mrow .t { width: 110px; }
}
