:root {
  --bg: #0a0a0b;
  --surface: #151517;
  --surface-2: #1d1d20;
  --surface-3: #27272b;
  --line: rgba(255, 255, 255, .07);
  --text: #f5f5f7;
  --text-2: #a3a3ab;
  --text-3: #6c6c75;
  --accent: #c6f36b;
  --accent-ink: #0d1203;
  --accent-soft: rgba(198, 243, 107, .12);
  --good: #3ddc84;
  --warn: #ffb224;
  --bad: #ff5a5f;
  --info: #5aa9ff;
  /* серии графиков (проверенная палитра для тёмного фона) */
  --series-income: #199e70;
  --series-expense: #d95926;
  --series-bar: #3987e5;
  --r-row: 20px;
  --r-card: 24px;
  --r-tile: 28px;
  --sat: 0px;
  --sab: 0px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  color: var(--text);
  font: 400 15px/1.4 -apple-system, "SF Pro Text", Inter, system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

#app {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  overflow-x: clip;
  padding: calc(var(--sat) + 12px) 16px calc(110px + var(--sab));
  flex: 1;
}

/* ---------- экраны ---------- */
.screen { animation: screenIn .3s var(--ease) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: screenIn .35s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .035s; }
.stagger > *:nth-child(3) { animation-delay: .07s; }
.stagger > *:nth-child(4) { animation-delay: .105s; }
.stagger > *:nth-child(5) { animation-delay: .14s; }
.stagger > *:nth-child(6) { animation-delay: .175s; }
.stagger > *:nth-child(n+7) { animation-delay: .2s; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-bottom: 14px; }
.topbar h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.hello { display: flex; flex-direction: column; }
.hello small { color: var(--text-2); font-size: 13px; }
.hello b { font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, #3a3a40, #222226); display: grid; place-items: center;
  font-weight: 650; font-size: 16px; position: relative;
}
.avatar .pro-dot { position: absolute; right: -2px; bottom: -2px; background: var(--accent); color: var(--accent-ink);
  font-size: 9px; font-weight: 800; padding: 1px 4px; border-radius: 6px; border: 2px solid var(--bg); }

.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 4px 10px; }
.section-title h2 { font-size: 20px; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.section-title button { color: var(--text-2); font-size: 14px; }

.card { background: var(--surface); border-radius: var(--r-card); padding: 18px; }
.card + .card { margin-top: 12px; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.right { text-align: right; }
.pos { color: var(--good); }
.neg { color: var(--text); }

/* ---------- герой «можно тратить» ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-tile); padding: 20px 20px 18px;
  background: var(--accent); color: var(--accent-ink);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.55), transparent 55%),
    repeating-radial-gradient(circle at 110% -10%, transparent 0 22px, rgba(13,18,3,.07) 22px 23px);
}
.hero > * { position: relative; }
.hero .label { font-size: 14px; font-weight: 600; opacity: .7; }
.hero .big { font-size: 46px; font-weight: 750; letter-spacing: -.035em; line-height: 1.05; margin: 4px 0 2px; }
.hero .big small { font-size: 26px; font-weight: 650; opacity: .55; margin-left: 2px; }
.hero .sub { font-size: 14px; opacity: .72; }
.hero .meter { height: 8px; border-radius: 99px; background: rgba(13,18,3,.14); margin: 14px 0 12px; overflow: hidden; }
.hero .meter i { display: block; height: 100%; border-radius: 99px; background: var(--accent-ink); transition: width .6s var(--ease); }
.hero .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hero .chip { background: rgba(13,18,3,.1); border-radius: 99px; padding: 6px 11px; font-size: 13px; font-weight: 600; }
.hero.over { background: #ff8a65; }
.hero.neutral { background: var(--surface-2); color: var(--text); }
.hero.neutral .meter { background: var(--surface-3); }
.hero.neutral .meter i { background: var(--accent); }
.hero.neutral .chip { background: rgba(255,255,255,.07); }
.hero.neutral::before { opacity: .15; }
.coin-deco { position: absolute; right: -18px; top: -14px; width: 120px; height: 120px; opacity: .9; pointer-events: none; }

/* ---------- быстрый ввод ---------- */
.quick {
  margin-top: 12px; display: flex; align-items: center; gap: 10px; background: var(--surface);
  border-radius: 999px; padding: 6px 6px 6px 18px; transition: box-shadow .2s;
}
.quick:focus-within { box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 1px var(--accent) inset; }
.quick input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; padding: 8px 0; }
.quick input::placeholder { color: var(--text-3); }
.quick .go { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; transition: transform .15s, opacity .2s; }
.quick .go:disabled { opacity: .3; }

/* ---------- статистика месяца ---------- */
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.stat { background: var(--surface-2); border-radius: 18px; padding: 12px; min-width: 0; }
.stat small { display: block; color: var(--text-2); font-size: 12px; margin-bottom: 2px; }
.stat b { font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.stackbar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 2px; margin-top: 14px; background: var(--surface-2); }
.stackbar i { display: block; height: 100%; }
.stackbar i:first-child { border-radius: 99px 0 0 99px; }
.stackbar i:last-child { border-radius: 0 99px 99px 0; }

/* ---------- плитки ---------- */
.tiles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.tile {
  background: var(--surface); border-radius: var(--r-tile); padding: 16px; min-height: 160px; position: relative;
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; text-align: left;
  transition: transform .15s var(--ease);
}
.tile:active, .press:active { transform: scale(.97); }
.tile .t-title { font-size: 15px; font-weight: 600; }
.tile .t-val { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.tile .t-sub { font-size: 12.5px; color: var(--text-2); }
.tile .arrow { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; }
.tile .lock { position: absolute; top: 12px; right: 12px; }

.ring { width: 64px; height: 64px; }
.ring circle { fill: none; stroke-width: 7; }
.ring .bg { stroke: var(--surface-3); }
.ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); transform: rotate(-90deg); transform-origin: 50% 50%; }

/* ---------- инсайты ---------- */
.insights { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.insights::-webkit-scrollbar { display: none; }
.insight {
  scroll-snap-align: start; flex: 0 0 82%; background: var(--surface); border-radius: var(--r-card); padding: 16px;
  display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden;
}
.insight.single { flex-basis: 100%; }
.insight .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--surface-2); }
.insight b { font-size: 15.5px; font-weight: 650; line-height: 1.3; }
.insight p { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.42; }
.insight .lvl { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; letter-spacing: .02em; }
.lvl.bad { background: rgba(255,90,95,.14); color: #ff8589; }
.lvl.warn { background: rgba(255,178,36,.13); color: #ffc35a; }
.lvl.good { background: rgba(61,220,132,.13); color: #6be6a0; }
.lvl.info { background: rgba(90,169,255,.13); color: #8cc2ff; }

/* ---------- списки операций ---------- */
.list { background: var(--surface); border-radius: var(--r-card); padding: 4px 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 64px; width: 100%; text-align: left; }
.item + .item { border-top: 1px solid var(--line); }
.item:active { background: rgba(255,255,255,.03); }
.cat-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; flex: none; background: var(--surface-2); }
.item .t { font-size: 15.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .a { font-size: 16px; font-weight: 600; white-space: nowrap; }
.day-head { display: flex; justify-content: space-between; color: var(--text-2); font-size: 13px; font-weight: 600; margin: 18px 6px 8px; text-transform: uppercase; letter-spacing: .03em; }

.empty { text-align: center; padding: 36px 20px; color: var(--text-2); }
.empty .mascot { width: 120px; height: 120px; margin: 0 auto 12px; display: block; }
.empty b { color: var(--text); display: block; font-size: 18px; margin-bottom: 4px; }

/* ---------- сегменты, чипсы ---------- */
.seg {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface);
  border-radius: 999px; padding: 4px; margin-bottom: 16px;
}
.seg button { position: relative; z-index: 1; height: 38px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--text-2); transition: color .25s; }
.seg button.on { color: var(--text); }
.seg .pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 999px; background: var(--surface-3);
  transition: translate .3s cubic-bezier(.65, 0, .35, 1), width .3s;
  box-shadow: inset 0 0 0 1px #ffffff0a, inset 1px 1px 0 -0.5px #ffffff30, 0 2px 6px #0005;
}
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 550; white-space: nowrap; transition: background .2s, color .2s; }
.chip-btn.on { background: var(--text); color: #000; }

.month-sw { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.month-sw b { font-size: 17px; font-weight: 650; text-transform: capitalize; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; transition: transform .15s; }
.icon-btn:disabled { opacity: .3; }

.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 14px; padding: 0 12px; height: 42px; margin-bottom: 10px; }
.search input { background: none; border: 0; outline: none; flex: 1; min-width: 0; font-size: 16px; }

/* ---------- категории (анализ) ---------- */
.catrow { padding: 12px 16px; display: block; width: 100%; text-align: left; }
.catrow + .catrow { border-top: 1px solid var(--line); }
.catrow .top { display: flex; align-items: center; gap: 12px; }
.catrow .bar { position: relative; height: 6px; background: var(--surface-3); border-radius: 99px; margin: 10px 0 0 54px; }
.catrow .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--series-bar); }
.catrow .bar i.over { background: var(--warn); }
.catrow .bar .norm { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); border-radius: 2px; box-shadow: 0 0 0 2px var(--surface); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 99px; }
.badge.warn { background: rgba(255,178,36,.13); color: #ffc35a; }
.badge.good { background: rgba(61,220,132,.12); color: #6be6a0; }
.badge.info { background: rgba(255,255,255,.08); color: var(--text-2); }

/* ---------- графики ---------- */
.chart { width: 100%; display: block; overflow: visible; touch-action: pan-y; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: inherit; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tip {
  position: absolute; pointer-events: none; background: var(--surface-3); color: var(--text); border-radius: 12px;
  padding: 8px 10px; font-size: 12.5px; white-space: nowrap; box-shadow: 0 6px 20px #0008; transform: translate(-50%, -100%);
  opacity: 0; transition: opacity .15s; z-index: 5;
}
.tip.on { opacity: 1; }
.chart-wrap { position: relative; }

/* ---------- подушка ---------- */
.cushion-card { background: var(--surface); border-radius: var(--r-tile); padding: 20px; position: relative; overflow: hidden; }
.cushion-top { display: flex; gap: 16px; align-items: center; }
.big-ring { width: 128px; height: 128px; flex: none; position: relative; }
.big-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.big-ring circle { fill: none; stroke-width: 12; }
.big-ring .bg { stroke: var(--surface-3); }
.big-ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); }
.big-ring .mk { stroke: var(--text); stroke-width: 14; }
.big-ring .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.big-ring .center b { font-size: 26px; font-weight: 750; letter-spacing: -.03em; display: block; line-height: 1; }
.big-ring .center small { font-size: 12px; color: var(--text-2); }
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.level { background: var(--surface-2); border-radius: 16px; padding: 10px 12px; }
.level small { color: var(--text-2); font-size: 12px; display: block; }
.level b { font-size: 15px; font-weight: 650; }
.level.done { box-shadow: inset 0 0 0 1.5px var(--accent); }
.btns { display: flex; gap: 10px; margin-top: 16px; }

.acc { background: var(--surface); border-radius: var(--r-card); margin-top: 12px; overflow: hidden; }
.acc > button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; font-weight: 600; font-size: 15.5px; text-align: left; }
.acc > button svg { transition: transform .25s var(--ease); flex: none; }
.acc.open > button svg { transform: rotate(180deg); }
.acc .acc-body { display: none; padding: 0 18px 16px; }
.acc.open .acc-body { display: block; animation: screenIn .25s var(--ease); }
.store { display: flex; gap: 12px; padding: 10px 0; }
.store + .store { border-top: 1px solid var(--line); }
.store .ic { font-size: 22px; width: 32px; text-align: center; flex: none; }
.stars { color: var(--accent); letter-spacing: 1px; font-size: 13px; }

.goal { background: var(--surface); border-radius: var(--r-card); padding: 16px; display: block; width: 100%; text-align: left; transition: transform .15s var(--ease); }
.goal + .goal { margin-top: 10px; }
.goal .gi { width: 48px; height: 48px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; font-size: 26px; flex: none; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 12px 0 8px; }
.progress i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .8s var(--ease); }
.banner { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,178,36,.08); border: 1px solid rgba(255,178,36,.18); border-radius: 20px; padding: 14px 16px; margin: 12px 0; font-size: 14px; color: #ffd38a; }
.banner.good { background: rgba(61,220,132,.07); border-color: rgba(61,220,132,.18); color: #9bf0bf; }
.banner.bad { background: rgba(255,90,95,.08); border-color: rgba(255,90,95,.2); color: #ffa3a6; }
.banner .bi { font-size: 20px; line-height: 1.2; }

/* ---------- кнопки ---------- */
.btn {
  height: 52px; border-radius: 999px; padding: 0 22px; font-weight: 650; font-size: 16px; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px; transition: transform .15s var(--ease), opacity .2s; flex: 1;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.white { background: #fff; color: #000; }
.btn.dark { background: var(--surface-3); color: var(--text); }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.danger { background: rgba(255,90,95,.12); color: #ff7b7f; }
.btn.small { height: 40px; font-size: 14.5px; padding: 0 16px; flex: none; }
.btn:disabled { opacity: .4; }
.btn.full { width: 100%; flex: none; }

/* ---------- плавающее меню ---------- */
.nav-fade { position: fixed; left: 0; right: 0; bottom: 0; height: calc(120px + var(--sab)); pointer-events: none; z-index: 20;
  background: linear-gradient(to top, var(--bg) 35%, rgba(10,10,11,0)); }
.nav {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--sab));
  width: min(calc(100% - 24px), 520px); display: flex; gap: 8px; align-items: center;
  transition: transform .3s var(--ease), opacity .3s;
}
.nav.hidden { transform: translate(-50%, 140%); opacity: 0; }
.nav .bar {
  flex: 1; height: 64px; border-radius: 100px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px;
  background: rgba(30, 30, 33, .72); -webkit-backdrop-filter: saturate(3) blur(12px); backdrop-filter: saturate(3) blur(12px);
  box-shadow: inset 0 0 0 1px #ffffff0d, inset 1px 1px 0 -.5px #ffffff2a, 0 8px 30px #0009;
}
.nav .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 100px; color: var(--text-3); font-size: 10.5px; font-weight: 600; transition: color .2s, background .25s; }
.nav .tab.on { color: var(--text); background: rgba(118,118,128,.24); }
.nav .tab svg { width: 24px; height: 24px; }
.nav .fab {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none;
  box-shadow: 0 8px 26px rgba(198,243,107,.25), inset 0 -3px 0 rgba(0,0,0,.12); transition: transform .15s var(--ease);
}
.nav .fab:active { transform: scale(.92); }

/* ---------- шторка ---------- */
.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; opacity: 0; transition: opacity .25s; }
.sheet-back.on { opacity: 1; }
.sheet {
  position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px; background: #161618;
  border-radius: 30px 30px 0 0; padding: 10px 16px calc(16px + var(--sab)); max-height: calc(100vh - var(--sat) - 40px);
  overflow-y: auto; transform: translateY(100%); transition: transform .32s cubic-bezier(.32, .72, 0, 1);
  box-shadow: inset 0 1px 0 #ffffff12; overscroll-behavior: contain;
}
.sheet.on { transform: none; }
.sheet .handle { width: 40px; height: 5px; border-radius: 99px; background: var(--surface-3); margin: 0 auto 12px; }
.sheet h3 { font-size: 21px; font-weight: 700; margin: 4px 4px 14px; letter-spacing: -.01em; }
.sheet .close { position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; }

/* ---------- ввод суммы ---------- */
.amount-display { text-align: center; padding: 8px 0 4px; }
.amount-display .v { font-size: 52px; font-weight: 750; letter-spacing: -.04em; line-height: 1.1; min-height: 58px; }
.amount-display .v.zero { color: var(--text-3); }
.amount-display .v.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.amount-display .cur { color: var(--text-3); font-weight: 650; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.pad button { height: 54px; border-radius: 18px; background: var(--surface-2); font-size: 24px; font-weight: 500; transition: background .1s, transform .1s; }
.pad button:active { background: var(--surface-3); transform: scale(.96); }
.field { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 16px; padding: 0 14px; min-height: 50px; margin-top: 10px; }
.field input, .field select { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; padding: 12px 0; }
.field label { color: var(--text-2); font-size: 14px; flex: none; }
.cat-grid { display: grid; grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: 76px; gap: 8px; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
.cat-grid::-webkit-scrollbar { display: none; }
.cat-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 16px; font-size: 11px; color: var(--text-2); line-height: 1.15; text-align: center; transition: background .15s; }
.cat-pick span { font-size: 24px; width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; transition: box-shadow .15s; }
.cat-pick.on { color: var(--text); }
.cat-pick.on span { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.opt-list { display: grid; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: center; background: var(--surface-2); border-radius: 18px; padding: 14px; text-align: left; width: 100%; transition: box-shadow .15s; }
.opt.on { box-shadow: inset 0 0 0 2px var(--accent); }
.opt .oi { font-size: 26px; width: 36px; text-align: center; flex: none; }
.opt b { display: block; font-size: 15.5px; font-weight: 600; }
.opt small { color: var(--text-2); font-size: 13px; }

/* ---------- слайдеры «что если» ---------- */
.scenario { background: var(--surface); border-radius: var(--r-card); padding: 18px; }
.scenario + .scenario { margin-top: 12px; }
.scenario h4 { margin: 0 0 4px; font-size: 17px; font-weight: 650; display: flex; gap: 8px; align-items: center; }
.slider-row { margin-top: 14px; }
.slider-row .lbl { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); margin-bottom: 8px; }
.slider-row .lbl b { color: var(--text); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--accent) var(--p, 50%), var(--surface-3) var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; margin-top: -10px; box-shadow: 0 2px 8px #0008; }
input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: var(--surface-3); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--accent); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 0; }
.result { background: var(--surface-2); border-radius: 18px; padding: 14px; margin-top: 14px; }
.result .kpi { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 4px 0; }
.result .kpi span { color: var(--text-2); font-size: 14px; }
.result .kpi b { font-size: 17px; font-weight: 650; white-space: nowrap; }
.verdict { margin-top: 10px; font-size: 14px; display: flex; gap: 8px; }

/* ---------- Pro ---------- */
.locked { position: relative; }
.locked > .lock-veil {
  position: absolute; inset: 0; z-index: 3; border-radius: var(--r-card); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 20px; background: rgba(10,10,11,.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lock-veil b { font-size: 18px; }
.lock-veil p { margin: 0; color: var(--text-2); font-size: 14px; max-width: 280px; }
.pro-card { border-radius: var(--r-tile); padding: 20px; position: relative; overflow: hidden; background: linear-gradient(135deg, #20251a, #151517 60%); box-shadow: inset 0 0 0 1px rgba(198,243,107,.18); }
.pro-card .glow { position: absolute; width: 220px; height: 220px; right: -60px; top: -80px; background: radial-gradient(closest-side, rgba(198,243,107,.28), rgba(198,243,107,.06) 55%, transparent); }
.pro-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; padding: 2px 7px; font-size: 11px; font-weight: 800; letter-spacing: .03em; }

/* ---------- ИИ-чат ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.msg.ai { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); 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; } }
.chat-input { display: flex; gap: 8px; margin-top: 12px; }
.chat-input input { flex: 1; min-width: 0; background: var(--surface-2); border: 0; outline: none; border-radius: 999px; padding: 0 16px; height: 48px; font-size: 16px; }

/* ---------- онбординг ---------- */
.onb { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; padding: calc(var(--sat) + 24px) 20px calc(20px + var(--sab)); max-width: 560px; margin: 0 auto; }
.onb .body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.onb .glow-bg { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 40% at 50% 28%, rgba(198,243,107,.16), transparent 70%); }
.onb h2 { font-size: 32px; line-height: 1.1; font-weight: 750; letter-spacing: -.03em; margin: 18px 0 10px; }
.onb .lead { color: var(--text-2); font-size: 16px; margin: 0 0 20px; }
.benefit { display: flex; gap: 14px; margin: 14px 0; align-items: flex-start; }
.benefit .bi { width: 40px; height: 40px; border-radius: 13px; background: var(--surface); display: grid; place-items: center; font-size: 20px; flex: none; }
.benefit p { margin: 2px 0 0; color: var(--text-2); font-size: 14.5px; }
.benefit b { color: var(--text); }
.dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--surface-3); transition: width .3s, background .3s; }
.dots i.on { width: 20px; background: var(--accent); }
.mascot-hero { width: 170px; height: 170px; margin: 0 auto; display: block; animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-2deg); } }

/* ---------- тост ---------- */
.toast {
  position: fixed; z-index: 80; left: 50%; top: calc(var(--sat) + 12px); transform: translate(-50%, -150%);
  background: var(--surface-3); border-radius: 18px; padding: 12px 16px; font-size: 14.5px; max-width: calc(100% - 32px);
  box-shadow: 0 10px 30px #000a; transition: transform .35s cubic-bezier(.32, .72, 0, 1); display: flex; gap: 10px; align-items: center;
}
.toast.on { transform: translate(-50%, 0); }

/* ---------- скелетоны ---------- */
.sk { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: var(--r-card); }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.switch { width: 50px; height: 30px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 2px 4px #0006; }
.switch.on { background: var(--good); }
.switch.on::after { transform: translateX(20px); }
.set-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; width: 100%; text-align: left; min-height: 56px; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row .v { color: var(--text-2); font-size: 14.5px; }

.sub-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.sub-row + .sub-row { border-top: 1px solid var(--line); }
.mini-seg { display: flex; background: var(--surface-2); border-radius: 99px; padding: 3px; flex: none; }
.mini-seg button { height: 30px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.mini-seg button.on.keep { background: rgba(61,220,132,.16); color: #6be6a0; }
.mini-seg button.on.cancel { background: rgba(255,90,95,.16); color: #ff8589; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
