@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: #0f1012;
  --bg-2: #141517;
  --card: #1a1b1d;
  --card-2: #212325;
  --card-3: #2a2c2e;
  --glass: rgba(255, 255, 255, .07);
  --glass-2: rgba(255, 255, 255, .12);
  --line: rgba(255, 255, 255, .07);
  --text: #f3f4f1;
  --muted: #9a9da1;
  --dim: #63666a;
  --lime: #b9f13d;
  --lime-ink: #10140a;
  --green: #5cf06f;
  --green-ink: #0b1a0c;
  --orange: #e8952b;
  --red: #ff6b5b;
  --glow: #3f7a1f;
  --radius: 22px;
  --nav-h: 72px;
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Inter', -apple-system, 'SF Pro Display', system-ui, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  background: #0a0b0c;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; font-weight: 500; }
.ic { display: inline-flex; width: 22px; height: 22px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic.sm { width: 16px; height: 16px; }
.ic.xs { width: 14px; height: 14px; }
.ic.lg { width: 26px; height: 26px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.lime { color: var(--lime); }
.num { font-variant-numeric: tabular-nums; }

/* ——— Рамка телефона на десктопе ——— */
.stage { height: 100%; display: flex; align-items: center; justify-content: center; }
.device { position: relative; width: 100%; height: 100%; }
.screen { position: absolute; inset: 0; overflow: hidden; background: var(--bg); }
.statusbar, .island { display: none; }

@media (min-width: 560px) {
  body {
    background:
      radial-gradient(60% 50% at 50% 110%, rgba(92, 200, 60, .28), transparent 70%),
      #0b0c0d;
  }
  .stage { padding: 24px; gap: 56px; }
  .device {
    width: 402px; height: min(874px, calc(100vh - 48px));
    border-radius: 60px; padding: 11px;
    background: linear-gradient(145deg, #3a3c3f, #18191b 40%, #2b2d30);
    box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 0 1.5px #4b4e52;
  }
  .screen { inset: 11px; border-radius: 50px; }
  .statusbar {
    display: flex; position: absolute; z-index: 60; top: 0; left: 0; right: 0; height: 54px;
    align-items: center; justify-content: space-between; padding: 6px 30px 0 40px;
    font-weight: 600; font-size: 16px; pointer-events: none;
  }
  .statusbar .sb-icons { display: flex; gap: 6px; align-items: center; }
  .island {
    display: block; position: absolute; z-index: 61; top: 11px; left: 50%; transform: translateX(-50%);
    width: 124px; height: 36px; border-radius: 20px; background: #000;
  }
  :root { --top: 50px; --bottom: 18px; }
  .aside { display: block !important; }
}
.aside { display: none; width: 280px; color: var(--muted); font-size: 14px; }
.aside h1 { color: var(--text); font-size: 28px; line-height: 1.1; letter-spacing: -.02em; margin-bottom: 14px; }
.aside p { margin: 0 0 10px; line-height: 1.5; font-weight: 400; }
.aside .logo { display: flex; align-items: center; gap: 10px; color: var(--text); margin-bottom: 28px; font-weight: 500; }
.aside .logo i { width: 26px; height: 16px; position: relative; }
.aside .logo i::before, .aside .logo i::after {
  content: ''; position: absolute; top: 0; width: 16px; height: 16px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--lime);
}
.aside .logo i::before { left: 0; }
.aside .logo i::after { left: 10px; }
@media (max-width: 900px) { .aside { display: none !important; } }

/* ——— Экраны ——— */
.view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.view::-webkit-scrollbar { display: none; }
.view.push { animation: pushIn .38s var(--ease); z-index: 5; background: var(--bg); }
.view.fade { animation: fadeIn .3s var(--ease); }
@keyframes pushIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.glow {
  position: absolute; left: 0; right: 0; top: 0; height: 420px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(90% 70% at 18% -8%, rgba(86, 168, 44, .75) 0%, rgba(54, 110, 28, .45) 34%, transparent 70%),
    radial-gradient(60% 50% at 95% 0%, rgba(110, 190, 60, .35), transparent 70%);
}
.glow.soft { height: 300px; opacity: .7; }
.wrap { position: relative; z-index: 1; padding: calc(var(--top) + 10px) 18px calc(var(--nav-h) + var(--bottom) + 40px); }
.wrap.no-nav { padding-bottom: calc(var(--bottom) + 110px); }

.topbar { display: flex; align-items: center; gap: 12px; min-height: 48px; margin-bottom: 18px; }
.topbar .grow { flex: 1; min-width: 0; }
.topbar h1 { font-size: 26px; letter-spacing: -.02em; }
.topbar.center { justify-content: space-between; }
.topbar.center h1 { font-size: 20px; text-align: center; flex: 1; }

.btn-ic {
  width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); flex: none;
  transition: background .2s;
}
.btn-ic:active { background: var(--glass-2); }
.btn-ic.sm { width: 36px; height: 36px; }
.btn-ic.sm .ic { width: 18px; height: 18px; }
.btn-ic.lime { background: var(--lime); color: var(--lime-ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; font-weight: 500; font-size: 14px; white-space: nowrap;
  transition: transform .15s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn.lime { background: var(--lime); color: var(--lime-ink); }
.btn.green { background: var(--green); color: var(--green-ink); }
.btn.white { background: #fff; color: #0c0d0e; }
.btn.dark { background: var(--card-3); }
.btn.ghost { background: var(--glass); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.xs { height: 28px; padding: 0 12px; font-size: 12px; }
.btn.block { width: 100%; height: 54px; font-size: 16px; }
.btn.danger { background: rgba(255, 107, 91, .14); color: var(--red); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn .ic { width: 18px; height: 18px; }

.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 26px 0 12px; }
.sec-head h2 { font-size: 19px; letter-spacing: -.01em; }
.sec-head .link { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 2px; }

.card {
  position: relative; border-radius: var(--radius); padding: 16px;
  background: linear-gradient(165deg, #232527 0%, #1a1b1d 55%, #18191b 100%);
  overflow: hidden;
}
.card.flat { background: var(--card); }
.card.glass { background: rgba(255, 255, 255, .06); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.card.green-tint {
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(92, 170, 50, .28), transparent 60%),
    linear-gradient(165deg, #222624 0%, #191b1a 100%);
}
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* ——— Главная ——— */
.hello { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.avatar {
  width: 50px; height: 50px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 25%, #3c5f2a, #1d2a17); font-weight: 600; font-size: 18px; color: var(--lime);
}
.hello .t1 { color: rgba(255, 255, 255, .8); font-size: 14px; }
.hello .t2 { font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.pill-orange {
  margin-left: auto; white-space: nowrap; flex: none; height: 44px; padding: 0 16px 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(180deg, #f0a23a, #c66f12); color: #fff; font-weight: 500;
  box-shadow: 0 6px 24px rgba(232, 149, 43, .35);
}
.searchbar {
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 6px 0 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  color: rgba(255, 255, 255, .65); width: 100%; text-align: left;
}
.searchbar .grow { flex: 1; }
.ring-ic {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: conic-gradient(from 210deg, #1e6b18, #6df05a, #1b4f15, #59d94a, #1e6b18);
  -webkit-mask: radial-gradient(circle, transparent 11px, #000 12px); mask: radial-gradient(circle, transparent 11px, #000 12px);
  filter: drop-shadow(0 0 6px rgba(90, 230, 70, .6));
}
.ring-ic.sm { width: 30px; height: 30px; -webkit-mask: radial-gradient(circle, transparent 9px, #000 10px); mask: radial-gradient(circle, transparent 9px, #000 10px); }

.week { display: flex; gap: 6px; }
.day {
  flex: 1; min-width: 0; height: 66px; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: rgba(255, 255, 255, .05); color: var(--muted); font-size: 12px; position: relative; transition: background .2s;
}
.day b { font-weight: 500; font-size: 13px; color: rgba(255, 255, 255, .55); }
.day.today { background: #fff; color: #111; }
.day.today b { color: #111; }
.day.sel { background: #fff; color: #111; }
.day.sel b { color: #111; }
.day .dot { position: absolute; bottom: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--lime); }
.day .dot.plan { background: var(--dim); }
.day.done b {
  width: 24px; height: 24px; border-radius: 50%; background: var(--lime); color: var(--lime-ink);
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}

.quote { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: rgba(255, 255, 255, .06); font-size: 14px; line-height: 1.4; }
.quote .ring-ic { flex: none; }

.hero-card { display: flex; gap: 12px; min-height: 196px; }
.hero-card .l { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hero-card h3 { font-size: 23px; line-height: 1.12; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.hero-card .meta { color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.hero-card .meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-card .r {
  width: 136px; border-radius: 16px; flex: none; display: flex; align-items: center; justify-content: center; gap: 2px;
  background: radial-gradient(100% 80% at 50% 0%, rgba(110, 190, 70, .25), transparent 70%), #26292a;
}
.hero-card .r svg { height: 128px; width: auto; }
.badge-ai {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--lime); color: var(--lime-ink); font-size: 12px; font-weight: 500;
}
.badge-ai .ic { width: 15px; height: 15px; }

.tile {
  border-radius: 20px; padding: 14px; min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  background: linear-gradient(165deg, #242628, #1a1b1d); text-align: left; position: relative; overflow: hidden;
}
.tile .lbl { color: rgba(255, 255, 255, .75); font-size: 13px; }
.tile .val { font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.tile .val small { font-size: 13px; font-weight: 500; margin-left: 2px; }
.tile .sub { font-size: 12px; color: var(--muted); }
.tile.hl { background: var(--green); color: var(--green-ink); }
.tile.hl .lbl, .tile.hl .sub { color: rgba(11, 26, 12, .7); }
.tile .bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tile .bar i { display: block; height: 100%; background: var(--lime); border-radius: 4px; }
.tile.hl .bar { background: rgba(0, 0, 0, .12); }
.tile.hl .bar i { background: var(--green-ink); }

/* ——— Списки ——— */
.list { border-radius: var(--radius); background: linear-gradient(165deg, #212325, #18191b); padding: 4px 14px; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; position: relative; width: 100%; text-align: left; }
.li + .li::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line); }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .s { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.li .s span { display: inline-flex; align-items: center; gap: 4px; }
.thumb {
  width: 60px; height: 60px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(90% 80% at 50% 0%, rgba(110, 190, 70, .22), transparent 70%), #26292b;
}
.thumb svg { height: 50px; width: auto; }
.ico-box {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  background: var(--card-3);
}
.ico-box.lime { background: var(--lime); color: var(--lime-ink); }
.ico-box.green { background: radial-gradient(circle at 35% 30%, #7ff06c, #2c9a3a); color: #fff; }
.ico-box.blue { background: radial-gradient(circle at 35% 30%, #67a8ff, #2a5fd6); color: #fff; }
.ico-box.orange { background: radial-gradient(circle at 35% 30%, #ffbe55, #e07a12); color: #fff; }
.ico-box.violet { background: radial-gradient(circle at 35% 30%, #a07bff, #5a37c9); color: #fff; }
.ico-box.red { background: radial-gradient(circle at 35% 30%, #ff8a7a, #d63a2a); color: #fff; }
.ico-box.teal { background: radial-gradient(circle at 35% 30%, #5fe6d2, #16968a); color: #fff; }
.ico-box .ic { width: 20px; height: 20px; }
.act {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--card-3); color: var(--lime); transition: background .2s, color .2s, transform .15s;
}
.act:active { transform: scale(.92); }
.act .ic { width: 18px; height: 18px; }
.act.on { background: var(--lime); color: var(--lime-ink); }
.act.muted-act { color: var(--muted); }

/* ——— Чипы и сегменты ——— */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap-chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  height: 36px; padding: 0 15px; border-radius: 999px; background: var(--card-2); color: rgba(255, 255, 255, .8);
  font-size: 13.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; flex: none; transition: background .2s, color .2s;
}
.chip.on { background: #fff; color: #0c0d0e; }
.chip.lime-on.on { background: var(--lime); color: var(--lime-ink); }
.chip .ic { width: 16px; height: 16px; }
.seg { display: flex; padding: 4px; border-radius: 999px; background: var(--card-2); gap: 2px; }
.seg button { flex: 1; height: 36px; border-radius: 999px; font-size: 13.5px; color: rgba(255, 255, 255, .75); transition: background .2s, color .2s; white-space: nowrap; padding: 0 10px; }
.seg button.on { background: var(--green); color: var(--green-ink); font-weight: 500; }

/* ——— Плитки отчёта ——— */
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat3 .tile { min-height: 100px; }
.stat3 .tile .val { font-size: 22px; }

/* ——— Графики ——— */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: rgba(255, 255, 255, .7); font-size: 11px; font-family: inherit; }
.chart .tip {
  position: absolute; transform: translate(-50%, -120%); background: #fff; color: #111; font-size: 12px; font-weight: 600;
  padding: 4px 8px; border-radius: 8px; pointer-events: none; white-space: nowrap;
}
.big-val { font-size: 44px; font-weight: 500; letter-spacing: -.03em; color: var(--lime); line-height: 1; }
.big-val small { font-size: 20px; margin-left: 2px; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--glass); }
.delta.good { color: var(--lime); }
.delta.bad { color: var(--red); }
.select-pill {
  height: 34px; padding: 0 12px 0 14px; border-radius: 999px; background: var(--glass); display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
}

/* ——— Шкала (gauge) ——— */
.gauge-tile { border-radius: 20px; padding: 14px; background: linear-gradient(165deg, #242628, #1a1b1d); position: relative; overflow: hidden; }
.gauge-tile .lbl { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.gauge-tile .gval { position: absolute; right: 14px; bottom: 10px; font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.gauge-tile .gsub { position: absolute; right: 14px; bottom: 10px; font-size: 12px; color: var(--muted); }

/* ——— Тренировка ——— */
.session-hero { position: relative; margin: calc(-1 * (var(--top) + 10px)) -18px 0; padding: calc(var(--top) + 10px) 18px 22px; overflow: hidden; }
.session-hero .bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(100% 90% at 50% 0%, rgba(86, 168, 44, .8), rgba(40, 80, 22, .5) 45%, transparent 75%);
}
.session-hero .fig { position: absolute; right: 50%; transform: translateX(50%); top: calc(var(--top) + 6px); height: 230px; opacity: .95; z-index: 0; display: flex; gap: 8px; }
.session-hero .fig svg { height: 100%; width: auto; }
.session-hero > *:not(.bg):not(.fig) { position: relative; z-index: 1; }
.session-hero .title { text-align: center; margin-top: 150px; }
.session-hero .title .k { font-size: 13px; color: rgba(255, 255, 255, .75); }
.session-hero .title h1 { font-size: 30px; letter-spacing: -.02em; text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }

.ex-card { border-radius: var(--radius); background: linear-gradient(165deg, #222426, #18191b); overflow: hidden; transition: opacity .3s; }
.ex-card.closed { opacity: .62; }
.ex-head { display: flex; align-items: center; gap: 12px; padding: 12px; width: 100%; text-align: left; }
.ex-head .grow { flex: 1; min-width: 0; }
.ex-head .t { font-weight: 500; font-size: 15.5px; line-height: 1.25; }
.ex-head .s { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.ex-body { padding: 0 12px 14px; }
.rec {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 14px; font-size: 13px; line-height: 1.4;
  background: rgba(185, 241, 61, .09); color: rgba(255, 255, 255, .85); margin-bottom: 10px;
}
.rec .ic { color: var(--lime); width: 18px; height: 18px; margin-top: 1px; }
.rec b { color: var(--lime); font-weight: 600; }
.set-row { display: grid; grid-template-columns: 34px 1fr 1fr 44px; gap: 8px; align-items: center; margin-top: 8px; }
.set-row.hdr { color: var(--dim); font-size: 12px; margin-top: 4px; }
.set-row.hdr span { text-align: center; }
.set-n { width: 30px; height: 30px; border-radius: 50%; background: var(--card-3); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.set-row.done .set-n { background: var(--lime); color: var(--lime-ink); }
.field-num {
  height: 44px; border-radius: 14px; background: var(--card-2); border: 0; outline: 0; text-align: center; width: 100%;
  font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.field-num::-webkit-outer-spin-button, .field-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field-num:focus { background: #2d3032; caret-color: var(--lime); }
.field-num::placeholder { color: var(--dim); }
.set-row.done .field-num { background: rgba(185, 241, 61, .1); color: var(--lime); }
.set-ok { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--card-3); color: var(--muted); }
.set-row.done .set-ok { background: var(--lime); color: var(--lime-ink); }
.ex-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.fab-bar {
  position: absolute; left: 18px; right: 18px; bottom: calc(var(--bottom) + 14px); z-index: 30; display: flex; gap: 10px; align-items: center;
}
.fab-bar .btn.block { box-shadow: 0 10px 40px rgba(0, 0, 0, .55); }
.rest-pill {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom) + 82px); z-index: 31;
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 999px;
  background: rgba(30, 32, 33, .92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  animation: fadeIn .3s var(--ease); white-space: nowrap;
}
.rest-pill .tm { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--lime); min-width: 48px; }
.rest-pill .lbl { font-size: 13px; color: var(--muted); }
.progress-line { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress-line i { display: block; height: 100%; border-radius: 6px; background: var(--lime); transition: width .4s var(--ease); }
.progress-line.green i { background: var(--green); }

/* ——— Добавки ——— */
.next-card { display: flex; flex-direction: column; gap: 14px; }
.next-card .big { font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.dose-group { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin: 18px 0 8px; }
.dose { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 10px; border-radius: 20px; background: linear-gradient(165deg, #212325, #18191b); }
.dose + .dose { margin-top: 8px; }
.dose .grow { flex: 1; min-width: 0; }
.dose .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dose .s .tag { height: 18px; font-size: 10.5px; margin-right: 2px; }
.dose .s { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.dose.taken .t { color: var(--muted); }
.dose .time { font-size: 13px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .8); padding: 0 4px; }
.dose.overdue .time { color: var(--orange); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; background: var(--glass); color: rgba(255, 255, 255, .75); }
.tag.lime { background: rgba(185, 241, 61, .14); color: var(--lime); }
.tag.orange { background: rgba(232, 149, 43, .16); color: #ffb35a; }
.stripes { display: flex; gap: 3px; height: 46px; align-items: stretch; }
.stripes i { flex: 1; border-radius: 2px; background: rgba(255, 255, 255, .14); }
.stripes i.on { background: var(--green); }

/* ——— Чат ——— */
.insights { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px 2px; scroll-snap-type: x mandatory; scroll-padding: 0 18px; }
.insights::-webkit-scrollbar { display: none; }
.insight {
  flex: none; width: 250px; border-radius: 22px; padding: 16px; scroll-snap-align: start;
  background: radial-gradient(120% 100% at 0% 0%, rgba(92, 170, 50, .22), transparent 60%), linear-gradient(165deg, #232628, #191a1c);
  display: flex; flex-direction: column; gap: 10px;
}
.insight .ico-box { width: 40px; height: 40px; }
.insight .t { font-weight: 500; font-size: 15.5px; line-height: 1.25; }
.insight .s { font-size: 13px; color: var(--muted); line-height: 1.4; }
.msgs { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 20px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; animation: fadeIn .3s var(--ease); }
.msg.user { align-self: flex-end; background: var(--lime); color: var(--lime-ink); border-bottom-right-radius: 6px; }
.msg.bot { align-self: flex-start; background: var(--card-2); border-bottom-left-radius: 6px; }
.msg.bot b { color: #fff; font-weight: 600; }
.msg ul { margin: 4px 0; padding-left: 18px; white-space: normal; }
.msg li { margin: 2px 0; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.composer {
  position: absolute; left: 14px; right: 14px; bottom: calc(var(--nav-h) + var(--bottom) + 26px); z-index: 20;
  display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 7px; border-radius: 999px;
  background: rgba(36, 38, 40, .88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}
.composer input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 15.5px; padding: 0 6px; }
.composer input::placeholder { color: rgba(255, 255, 255, .5); }
.composer .btn-ic { width: 46px; height: 46px; }
.composer .btn-ic.lime { width: 50px; height: 50px; }
.qchips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.qchips .chip { height: 34px; font-size: 13px; }

/* ——— Нижнее меню ——— */
.nav {
  position: absolute; z-index: 40; left: 14px; right: 14px; bottom: calc(var(--bottom) + 10px); height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; padding: 0 7px; border-radius: 999px;
  background: rgba(36, 38, 40, .82); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.nav button {
  flex: 0 0 70px; height: 56px; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10px; letter-spacing: -.01em; color: rgba(255, 255, 255, .72); transition: background .25s, color .25s; position: relative;
}
.nav button .ic { width: 21px; height: 21px; }
.nav button.on { background: #fff; color: #0c0d0e; font-weight: 500; }
.nav .orb {
  flex: 0 0 58px !important; height: 58px; border-radius: 50%; color: #0f2a22; gap: 0;
  background: radial-gradient(circle at 32% 28%, #ffffff 0%, #d9fbe9 22%, #8ef0c6 50%, #2fc3a4 80%, #179482 100%);
  box-shadow: 0 0 24px rgba(110, 240, 190, .35);
}
.nav .orb.on { background: radial-gradient(circle at 32% 28%, #ffffff 0%, #effde0 22%, #c8f78a 50%, #8fd63a 80%, #5aa31f 100%); color: #10220a; }
.nav .orb .ic { width: 26px; height: 26px; }
.nav .badge {
  position: absolute; top: 6px; right: 12px; min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  background: var(--orange); color: #fff; font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}

/* ——— Шторка ——— */
.sheet-layer { position: absolute; inset: 0; z-index: 80; pointer-events: none; }
.sheet-layer.open { pointer-events: auto; }
.backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .3s; }
.sheet-layer.open .backdrop { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92%; overflow-y: auto; scrollbar-width: none;
  border-radius: 32px 32px 0 0; padding: 10px 18px calc(var(--bottom) + 22px);
  background: radial-gradient(90% 40% at 50% 0%, rgba(80, 150, 40, .28), transparent 70%), #151618;
  transform: translateY(105%); transition: transform .38s var(--ease);
}
.sheet::-webkit-scrollbar { display: none; }
.sheet-layer.open .sheet { transform: none; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .2); margin: 0 auto 14px; }
.sheet h2 { font-size: 22px; letter-spacing: -.01em; margin-bottom: 4px; }
.sheet .lead { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.fl { display: flex; flex-direction: column; gap: 8px; }
.fl > label, .fl > .lab { font-size: 13px; color: var(--muted); }
.input {
  height: 52px; border-radius: 16px; background: var(--card-2); border: 0; outline: 0; padding: 0 16px; font-size: 16px; width: 100%;
}
.input:focus { background: #2a2d2f; caret-color: var(--lime); }
.input::placeholder { color: var(--dim); }
textarea.input { height: 90px; padding: 14px 16px; resize: none; }
input[type="time"].input, input[type="date"].input { color-scheme: dark; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper .input { text-align: center; font-size: 28px; font-weight: 500; height: 64px; }
.stepper .btn-ic { width: 52px; height: 52px; background: var(--card-2); }
.switch { width: 50px; height: 30px; border-radius: 15px; background: var(--card-3); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(20px); }
.times { display: flex; flex-wrap: wrap; gap: 8px; }
.time-chip { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 6px 0 4px; border-radius: 999px; background: var(--card-2); }
.time-chip input { background: none; border: 0; outline: 0; width: 92px; font-size: 15px; color-scheme: dark; padding-left: 8px; }
.time-chip button { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.wd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wd button { height: 42px; border-radius: 14px; background: var(--card-2); font-size: 13px; color: rgba(255, 255, 255, .75); }
.wd button.on { background: var(--lime); color: var(--lime-ink); font-weight: 500; }

/* ——— Уведомление ——— */
.toast-layer { position: absolute; left: 10px; right: 10px; top: calc(var(--top) + 6px); z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.notif {
  pointer-events: auto; display: flex; gap: 12px; padding: 12px; border-radius: 24px;
  background: rgba(44, 46, 48, .9); backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .5); animation: dropIn .45s var(--ease);
}
.notif.out { animation: dropOut .3s var(--ease) forwards; }
@keyframes dropIn { from { transform: translateY(-120%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dropOut { to { transform: translateY(-120%); opacity: 0; } }
.notif .app-ic { width: 40px; height: 40px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #c8f75a, #5cc72e); color: #10220a; }
.notif .app-ic .ic { width: 22px; height: 22px; }
.notif .grow { flex: 1; min-width: 0; }
.notif .h { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.notif .t { font-weight: 600; font-size: 14.5px; margin-top: 2px; }
.notif .b { font-size: 13.5px; color: rgba(255, 255, 255, .8); margin-top: 1px; }
.notif .acts { display: flex; gap: 8px; margin-top: 10px; }
.snack {
  pointer-events: auto; align-self: center; padding: 10px 16px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: #111;
  font-size: 13.5px; font-weight: 500; animation: dropIn .35s var(--ease); box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

/* ——— Разное ——— */
.empty { text-align: center; padding: 26px 16px; color: var(--muted); font-size: 14px; }
.empty .ic { width: 34px; height: 34px; color: var(--dim); margin-bottom: 8px; }
.body-pair { display: flex; justify-content: center; gap: 22px; padding: 8px 0 4px; }
.body-pair figure { margin: 0; text-align: center; }
.body-pair svg { height: 190px; width: auto; }
.body-pair figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend { display: flex; justify-content: center; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.kv { display: flex; justify-content: space-between; padding: 12px 0; font-size: 14px; position: relative; }
.kv + .kv::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line); }
.kv span:first-child { color: var(--muted); }
.tips { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tips li { display: flex; gap: 10px; font-size: 14px; line-height: 1.4; }
.tips li .n { width: 24px; height: 24px; border-radius: 50%; background: var(--card-3); flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--lime); }
.check {
  width: 26px; height: 26px; border-radius: 50%; background: var(--card-3); flex: none; display: flex; align-items: center; justify-content: center; color: transparent; transition: background .2s, color .2s;
}
.check.on { background: var(--lime); color: var(--lime-ink); }
.check .ic { width: 16px; height: 16px; }
.split-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; position: relative; }
.split-row + .split-row::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line); }
.split-row .d { width: 34px; color: var(--muted); font-size: 14px; }
.split-row select {
  flex: 1; height: 40px; border-radius: 12px; background: var(--card-2); border: 0; outline: 0; padding: 0 12px; color-scheme: dark; font-size: 14px;
}
.note { font-size: 12.5px; color: var(--dim); line-height: 1.45; }
.hidden { display: none !important; }

@media (max-width: 370px) { .nav button { flex-basis: 62px; } .nav { left: 8px; right: 8px; } }
.hist-row { padding: 11px 0; position: relative; }
.hist-row + .hist-row::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line); }
.hist-row .d { font-size: 12.5px; color: var(--muted); }
.hist-row .v { font-size: 14.5px; margin-top: 3px; }

/* ——— Внутри Telegram: без рамки телефона ——— */
html.tg { --top: 0px; --bottom: env(safe-area-inset-bottom, 0px); }
html.tg body { background: var(--bg); }
html.tg .stage { padding: 0; }
html.tg .device { width: 100%; height: 100%; border-radius: 0; padding: 0; background: none; box-shadow: none; }
html.tg .screen { inset: 0; border-radius: 0; }
html.tg .statusbar, html.tg .island, html.tg .aside { display: none !important; }

/* ——— Вход ——— */
.login { text-align: center; padding-top: calc(var(--top) + 48px); }
.login h1 { font-size: 30px; letter-spacing: -.02em; margin: 18px 0 8px; }
.login .lead { color: var(--muted); font-size: 15px; margin: 0 auto 24px; max-width: 300px; line-height: 1.45; }
.login-mark { display: flex; justify-content: center; }
.login-mark .ring-ic { width: 84px; height: 84px; -webkit-mask: radial-gradient(circle, transparent 28px, #000 29px); mask: radial-gradient(circle, transparent 28px, #000 29px); }
.login-err { margin-top: 16px; color: #ffb35a; font-size: 14px; line-height: 1.4; }
.login .note { text-align: center; }
a.btn { text-decoration: none; }
html.tg .device { max-width: 560px; margin: 0 auto; }
