@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(../fonts/unbounded-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(../fonts/unbounded-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #0E0F12;
  --bar: #15171B;
  --surface: #1A1C21;
  --surface-2: #22252B;
  --line: #2A2D34;
  --text: #F2F3F5;
  --muted: #8A8F98;
  --dim: #5C616B;
  --lime: #C6F432;
  --lime-press: #B3DE24;
  --ink: #0E0F12;
  --water: #5AC8FA;
  --danger: #FF5A5F;
  --warn: #FFB547;
  --r-card: 20px;
  --r: 14px;
  --head: 'Unbounded', system-ui, sans-serif;
  --body: 'Inter', -apple-system, system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
  min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--lime); text-decoration: none; }
h1, h2, h3 { font-family: var(--head); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 700; line-height: 1.15; }
h2 { font-size: 19px; font-weight: 700; line-height: 1.2; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.i { display: block; flex: none; }
.i.inline { display: inline-block; vertical-align: -3px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.num { font-family: var(--head); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
#app { min-height: 100dvh; }
.screen {
  padding: calc(var(--safe-top) + 16px) 16px calc(var(--tabbar-h) + var(--safe-bottom) + 96px);
  max-width: 560px;
  margin: 0 auto;
  animation: fade .22s ease;
}
.screen.no-tabs { padding-bottom: calc(var(--safe-bottom) + 24px); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 40px; }
.topbar h1 { flex: 1; }
.topbar .sub { font-size: 13px; color: var(--muted); }
.back { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; flex: none; }
.eyebrow { font-size: 13px; color: var(--muted); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 2px 10px; }
.section-title h2 { font-size: 16px; }
.section-title button { color: var(--lime); font-size: 14px; font-weight: 600; }
.stack { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.center { text-align: center; }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--r-card); padding: 16px; }
.card.tight { padding: 12px 14px; }
.card + .card { margin-top: 10px; }
.card-label { font-size: 12px; color: var(--muted); }
.hero {
  background: var(--lime); color: var(--ink); border-radius: 22px; padding: 18px;
}
.hero .kicker { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hero h2 { font-size: 20px; margin: 6px 0 4px; }
.hero .meta { font-size: 13px; opacity: .8; }
.hero .btn { margin-top: 14px; }
.hero.rest { background: var(--surface); color: var(--text); }
.hero.rest .meta { color: var(--muted); opacity: 1; }

.tile { background: var(--surface); border-radius: var(--r-card); padding: 14px; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; }
.tile .big { font-family: var(--head); font-size: 20px; font-weight: 700; margin-top: 6px; }
.tile .label { font-size: 12px; color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--lime); transition: width .4s ease; }
.bar.water > i { background: var(--water); }

/* ---------- buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 0 18px; border-radius: var(--r);
  background: var(--lime); color: var(--ink); font-weight: 700; font-size: 16px;
  transition: transform .08s ease, background .15s ease, opacity .15s;
}
.btn:active { transform: scale(.98); background: var(--lime-press); }
.btn.dark { background: var(--ink); color: var(--lime); }
.btn.ghost { background: var(--surface); color: var(--text); }
.btn.ghost:active { background: var(--surface-2); }
.btn.danger { background: rgba(255, 90, 95, .12); color: var(--danger); }
.btn.small { min-height: 40px; font-size: 14px; border-radius: 12px; width: auto; padding: 0 14px; }
.btn[disabled], .btn.loading { opacity: .5; pointer-events: none; }
.btn.loading::after { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--lime); font-weight: 600; font-size: 15px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); flex: none; }
.icon-btn:active { background: var(--surface-2); }

/* ---------- forms ---------- */
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); padding-left: 2px; }
.input, textarea.input, select.input {
  width: 100%; min-height: 52px; padding: 14px 16px; border-radius: var(--r);
  background: var(--surface); border: 1.5px solid transparent; outline: none; font-size: 16px;
  transition: border-color .15s;
}
textarea.input { min-height: 110px; resize: vertical; line-height: 1.4; }
.input:focus { border-color: var(--lime); }
.input::placeholder { color: var(--dim); }
.input-unit { position: relative; }
.input-unit .input { padding-right: 52px; }
.input-unit em { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: 14px; pointer-events: none; }
.error { color: var(--danger); font-size: 14px; min-height: 20px; }

.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  background: var(--surface); border-radius: 18px; padding: 16px; border: 1.5px solid transparent;
  transition: border-color .15s, background .15s;
}
.choice .ico { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; flex: none; }
.choice b { display: block; font-weight: 600; }
.choice small { color: var(--muted); font-size: 13px; }
.choice[aria-pressed="true"] { border-color: var(--lime); background: #1E2118; }
.choice[aria-pressed="true"] .ico { background: var(--lime); color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 8px 14px; border-radius: 999px; background: var(--surface);
  font-size: 14px; font-weight: 500; border: 1.5px solid transparent; transition: all .15s;
}
.chip[aria-pressed="true"] { background: var(--lime); color: var(--ink); }
.chip.outline[aria-pressed="true"] { background: #1E2118; color: var(--lime); border-color: var(--lime); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days .chip { padding: 0; height: 44px; display: grid; place-items: center; border-radius: 12px; }

.seg { display: flex; background: var(--surface); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; min-height: 36px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }

.stepper { display: flex; align-items: center; background: var(--surface); border-radius: var(--r); padding: 6px; }
.stepper button { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; }
.stepper input { flex: 1; min-width: 0; width: 100%; text-align: center; background: none; border: 0; outline: none; font-family: var(--head); font-size: 22px; font-weight: 700; }
.stepper em { font-style: normal; color: var(--muted); font-size: 13px; margin-right: 8px; }

input[type=range] { width: 100%; accent-color: var(--lime); height: 32px; }

/* ---------- list rows ---------- */
.list { background: var(--surface); border-radius: var(--r-card); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; width: 100%; text-align: left; min-height: 56px; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row:active { background: var(--surface-2); }
.list-row .t { flex: 1; min-width: 0; }
.list-row .t b { display: block; font-weight: 600; font-size: 15px; }
.list-row .t small { color: var(--muted); font-size: 13px; }
.list-row .badge { width: 36px; height: 36px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--lime); }

/* ---------- tab bar & FAB ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--bar); border-top: 1px solid #1E2026;
  padding: 8px 8px calc(var(--safe-bottom) + 6px);
  display: flex; justify-content: space-around;
}
.tabbar a { width: 56px; height: 48px; display: grid; place-items: center; color: var(--dim); border-radius: 14px; transition: color .15s; }
.tabbar a[aria-current="page"] { color: var(--lime); }
.fab {
  position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px); z-index: 21;
  width: 58px; height: 58px; border-radius: 50%; background: var(--lime); color: var(--ink);
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(198, 244, 50, .25), 0 2px 8px rgba(0,0,0,.4);
  transition: transform .12s;
}
.fab:active { transform: scale(.94); }

/* ---------- sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); animation: bgIn .2s ease; }
@keyframes bgIn { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92dvh; overflow-y: auto;
  background: #16181C; border-radius: 26px 26px 0 0; padding: 10px 16px calc(var(--safe-bottom) + 20px);
  animation: up .28s cubic-bezier(.2,.9,.3,1); max-width: 560px; margin: 0 auto;
  overscroll-behavior: contain;
}
.sheet.full { top: calc(var(--safe-top) + 10px); max-height: none; display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
@keyframes up { from { transform: translateY(100%); } }
.sheet .grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sheet-head h2 { flex: 1; font-size: 18px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 16px; right: 16px; top: calc(var(--safe-top) + 10px); z-index: 60; max-width: 520px; margin: 0 auto;
  background: var(--surface-2); color: var(--text); padding: 14px 16px; border-radius: 16px; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: drop .25s ease; display: flex; gap: 10px; align-items: center;
}
.toast.err { background: #3A1C1F; color: #FFD5D6; }
.toast.ok .i { color: var(--lime); }
@keyframes drop { from { transform: translateY(-20px); opacity: 0; } }

/* ---------- auth / welcome ---------- */
.welcome { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--safe-top) + 24px) 20px calc(var(--safe-bottom) + 24px); max-width: 520px; margin: 0 auto; }
.logo { width: 64px; height: 64px; border-radius: 18px; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-family: var(--head); font-weight: 800; font-size: 34px; }
.welcome .hero-text { margin-top: auto; }
.welcome h1 { font-size: 34px; line-height: 1.1; margin: 22px 0 12px; }
.welcome h1 span { color: var(--lime); }
.welcome .lead { color: var(--muted); font-size: 16px; }
.feature-list { display: grid; gap: 12px; margin: 28px 0 32px; }
.feature-list div { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.feature-list .i { color: var(--lime); }
.auth-form { display: grid; gap: 12px; margin-top: 24px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-wrap button { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); }

/* ---------- onboarding ---------- */
.ob { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--safe-top) + 12px) 16px calc(var(--safe-bottom) + 16px); max-width: 560px; margin: 0 auto; }
.ob-top { display: flex; align-items: center; gap: 12px; }
.ob-progress { flex: 1; height: 6px; background: var(--surface); border-radius: 3px; overflow: hidden; }
.ob-progress i { display: block; height: 100%; background: var(--lime); border-radius: 3px; transition: width .3s ease; }
.ob-step { font-size: 13px; color: var(--muted); min-width: 40px; text-align: right; }
.ob-body { flex: 1; padding: 28px 2px 20px; animation: fade .25s ease; }
.ob-body h1 { margin-bottom: 8px; }
.ob-body .hint { color: var(--muted); margin-bottom: 22px; font-size: 15px; }
.ob-foot { display: grid; gap: 8px; }
.emoji-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.emoji-row button { width: 48px; height: 48px; border-radius: 14px; background: var(--surface); font-size: 24px; border: 1.5px solid transparent; }
.emoji-row button[aria-pressed="true"] { border-color: var(--lime); background: #1E2118; }

.gen { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 22px; }
.gen .pulse { width: 96px; height: 96px; border-radius: 28px; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-family: var(--head); font-weight: 800; font-size: 48px; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.08); box-shadow: 0 0 0 18px rgba(198, 244, 50, .08); } }
.gen p { color: var(--muted); min-height: 24px; transition: opacity .3s; }

/* ---------- today ---------- */
.greet { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.greet .t { flex: 1; min-width: 0; }
.greet h1 { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 22px; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 84px; height: 84px; font-size: 40px; }
.avatar.xl { width: 112px; height: 112px; font-size: 56px; }
.avatar-pick { display: grid; justify-items: center; gap: 14px; }
.avatar-big { position: relative; cursor: pointer; border-radius: 50%; }
.avatar-big .avatar { outline: 2px solid var(--line); outline-offset: 3px; }
.avatar-big .cam { position: absolute; right: 0; bottom: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; border: 3px solid var(--bg); }
.emoji-row { justify-content: center; }
.blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.blocks > .wide { grid-column: 1 / -1; }
.ring-wrap { position: relative; width: 56px; height: 56px; }
.ring-wrap .ring-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.water-btns { display: flex; gap: 6px; margin-top: 8px; }
.water-btns button { flex: 1; height: 32px; border-radius: 10px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.tip-card { display: flex; gap: 12px; align-items: flex-start; }
.tip-card .i { color: var(--lime); margin-top: 2px; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.macros div { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.macros b { display: block; font-family: var(--head); font-size: 14px; }
.macros small { color: var(--muted); font-size: 11px; }

/* ---------- workouts ---------- */
.week { display: flex; gap: 6px; margin-bottom: 14px; }
.week button { flex: 1; height: 56px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; align-content: center; gap: 2px; font-size: 12px; color: var(--muted); }
.week button b { font-family: var(--head); font-size: 14px; color: var(--text); }
.week button.train::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--lime); }
.week button[aria-pressed="true"] { background: var(--lime); color: var(--ink); }
.week button[aria-pressed="true"] b { color: var(--ink); }
.week button[aria-pressed="true"].train::after { background: var(--ink); }
.week button.done b { text-decoration: line-through; }
.ex { display: flex; gap: 12px; align-items: center; padding: 12px 0; }
.ex + .ex { border-top: 1px solid var(--line); }
.ex .n { width: 30px; height: 30px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-family: var(--head); font-size: 12px; flex: none; }
.ex .t { flex: 1; min-width: 0; }
.ex .t b { display: block; font-weight: 600; font-size: 15px; }
.ex .t small { color: var(--muted); font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.pill.lime { background: rgba(198, 244, 50, .14); color: var(--lime); }
.notes li { color: var(--muted); font-size: 14px; margin: 6px 0; }
.notes { padding-left: 18px; margin: 8px 0 0; }

.session-ex { background: var(--surface); border-radius: var(--r-card); padding: 14px; }
.session-ex + .session-ex { margin-top: 10px; }
.session-ex.complete { opacity: .55; }
.session-ex header { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.session-ex header .t { flex: 1; }
.session-ex header b { font-size: 16px; }
.set-row { display: grid; grid-template-columns: 28px 1fr 1fr 44px; gap: 8px; align-items: center; margin-top: 8px; }
.set-row .k { color: var(--muted); font-family: var(--head); font-size: 13px; text-align: center; }
.set-row input { width: 100%; height: 44px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid transparent; text-align: center; font-size: 16px; font-weight: 600; outline: none; }
.set-row input:focus { border-color: var(--lime); }
.set-row .chk { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--dim); }
.set-row .chk[aria-pressed="true"] { background: var(--lime); color: var(--ink); }
.set-head { display: grid; grid-template-columns: 28px 1fr 1fr 44px; gap: 8px; font-size: 11px; color: var(--dim); text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.tip-line { font-size: 13px; color: var(--muted); margin-top: 10px; display: flex; gap: 8px; }
.tip-line .i { color: var(--lime); margin-top: 1px; }
.timer {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 12px); z-index: 30; max-width: 536px; margin: 0 auto;
  background: var(--lime); color: var(--ink); border-radius: 20px; padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: up .25s ease;
}
.timer .num { font-size: 26px; font-weight: 800; flex: 1; }
.timer button { height: 40px; padding: 0 12px; border-radius: 12px; background: rgba(14,15,18,.12); font-weight: 700; font-size: 14px; }
.session-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.session-bar .clock { font-family: var(--head); font-size: 20px; font-weight: 700; flex: 1; }

/* ---------- nutrition ---------- */
.meal { background: var(--surface); border-radius: var(--r-card); padding: 14px; }
.meal + .meal { margin-top: 10px; }
.meal header { display: flex; gap: 12px; align-items: center; }
.meal header .t { flex: 1; min-width: 0; }
.meal header small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.meal header b { display: block; font-weight: 600; font-size: 15px; margin-top: 2px; }
.meal .chk { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--dim); flex: none; }
.meal .chk[aria-pressed="true"] { background: var(--lime); color: var(--ink); }
.meal.eaten header b { color: var(--muted); }
.meal ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.meal li { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.meal li span:last-child { color: var(--text); font-variant-numeric: tabular-nums; }
.meal .kbju { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- progress ---------- */
.chart { width: 100%; height: 180px; display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border-radius: 18px; padding: 12px; }
.stat b { display: block; font-family: var(--head); font-size: 20px; }
.stat small { color: var(--muted); font-size: 12px; }
.goal-track { position: relative; margin-top: 12px; }
.goal-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- chat ---------- */
.chat-log { flex: 1; overflow-y: auto; padding: 4px 0 12px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--lime); color: var(--ink); border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 6px; }
.msg.typing { color: var(--muted); }
.msg.typing i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; } }
.chat-input { display: flex; gap: 8px; align-items: flex-end; padding: 10px 0 calc(var(--safe-bottom) + 10px); border-top: 1px solid var(--line); background: #16181C; }
.chat-input textarea { flex: 1; min-height: 46px; max-height: 120px; resize: none; border-radius: 16px; padding: 12px 14px; background: var(--surface); border: 1.5px solid transparent; outline: none; font-size: 16px; line-height: 1.3; }
.chat-input textarea:focus { border-color: var(--lime); }
.chat-input button { width: 46px; height: 46px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; flex: none; }
.chat-empty { text-align: center; padding: 24px 8px; color: var(--muted); }
.chat-empty .logo { margin: 0 auto 14px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.plan-update { align-self: flex-start; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty .i { margin: 0 auto 10px; color: var(--dim); }
.banner { display: flex; gap: 12px; align-items: center; background: rgba(198, 244, 50, .08); border: 1px solid rgba(198, 244, 50, .25); border-radius: 16px; padding: 12px 14px; font-size: 14px; }
.banner .i { color: var(--lime); }
.banner.warn { background: rgba(255, 181, 71, .08); border-color: rgba(255, 181, 71, .3); }
.banner.warn .i { color: var(--warn); }
.disclaimer { font-size: 12px; color: var(--dim); margin-top: 18px; line-height: 1.5; }
.reorder { display: flex; align-items: center; gap: 10px; }
.reorder .t { flex: 1; }
.switch { position: relative; width: 52px; height: 32px; border-radius: 16px; background: var(--surface-2); flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--text); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--lime); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--ink); }
.offline { position: fixed; top: calc(var(--safe-top) + 6px); left: 50%; transform: translateX(-50%); z-index: 50; background: var(--surface-2); color: var(--muted); font-size: 12px; padding: 6px 12px; border-radius: 999px; }

/* ---------- launch animation «Пульс» ---------- */
/* Starts at the exact size/position of the static iOS splash (26% of screen width, centered). */
.boot { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; }
.boot .mark { width: min(26vw, 160px); height: min(26vw, 160px); position: relative; z-index: 1; animation: beat 1.1s ease-in-out .1s infinite; }
.boot .line { position: absolute; left: 0; top: 50%; width: 100%; height: min(20vw, 120px); transform: translateY(-50%); overflow: visible; }
.boot .line path { stroke: var(--lime); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s .15s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes beat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.1); } 28% { transform: scale(1); } 42% { transform: scale(1.06); } 56% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.boot.out { animation: bootOut .4s ease forwards; pointer-events: none; }
.boot.out .mark { animation: markOut .4s ease forwards; }
@keyframes bootOut { 60% { opacity: 1; } to { opacity: 0; } }
@keyframes markOut { to { transform: scale(.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .boot .mark { animation: none; }
  .boot .line { display: none; }
}
.phone-wrap { position: relative; }
.phone-wrap b { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-weight: 600; pointer-events: none; }
.phone-wrap .input { padding-left: 46px; }
.code-input { font-family: var(--head); font-size: 28px; font-weight: 700; letter-spacing: .45em; text-align: center; padding-left: calc(16px + .45em); }
.code-input::placeholder { letter-spacing: .3em; }
.link[disabled] { color: var(--dim); }
