/* ─── База ─── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--fs); line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100dvh;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: var(--fs-2xl); } h2 { font-size: var(--fs-xl); } h3 { font-size: var(--fs-lg); }
p { margin: 0; }
.muted { color: var(--ink-2); } .small { font-size: var(--fs-sm); } .xs { font-size: var(--fs-xs); }
.hidden { display: none !important; }

/* пружинные кривые */
:root { --spring: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001);
        --spring-soft: cubic-bezier(.34, 1.4, .64, 1); }

/* ─── Живой фон ─── */
#bgfx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ─── Оболочка приложения ─── */
#app {
  max-width: var(--maxw); margin: 0 auto; min-height: 100dvh; position: relative; z-index: 1;
  display: flex; flex-direction: column; background: var(--bg);
}
@media (min-width: 640px) {
  body { background: var(--bg-2); display: grid; place-items: center; padding: 28px 16px; }
  #app {
    min-height: min(880px, calc(100dvh - 56px)); max-height: calc(100dvh - 56px); width: 100%;
    border-radius: 40px; box-shadow: 0 30px 80px rgba(20, 20, 40, .22), 0 0 0 1px rgba(255,255,255,.35) inset;
    overflow: hidden; overflow-y: auto; scrollbar-width: none;
  }
  #app::-webkit-scrollbar { display: none; }
  .nav { position: sticky; bottom: 12px; margin: 0 auto; transform: none; left: auto; }
}
.screen {
  flex: 1; display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 16px) var(--gut) calc(92px + env(safe-area-inset-bottom));
  animation: screen-in .45s var(--spring-soft);
}
.screen.no-nav { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
@keyframes screen-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* View Transitions между экранами */
::view-transition-old(root) { animation: vt-out .22s ease forwards; }
::view-transition-new(root) { animation: vt-in .38s var(--spring-soft); }
@keyframes vt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
::view-transition-group(hero) { animation-duration: .5s; animation-timing-function: var(--spring-soft); }

/* каскадное появление детей */
.stagger > * { animation: rise .5s var(--spring-soft) both; }
.stagger > *:nth-child(1) { animation-delay: .03s } .stagger > *:nth-child(2) { animation-delay: .08s } .stagger > *:nth-child(3) { animation-delay: .13s }
.stagger > *:nth-child(4) { animation-delay: .18s } .stagger > *:nth-child(5) { animation-delay: .23s } .stagger > *:nth-child(6) { animation-delay: .28s } .stagger > *:nth-child(7) { animation-delay: .33s } .stagger > *:nth-child(n+8) { animation-delay: .38s }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.97); } }

/* ─── Шапка ─── */
.topbar { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-bottom: 12px; }
.topbar .spacer { flex: 1; }
.brand { font-weight: 900; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 12px; border-radius: var(--r-pill); font-size: var(--fs-sm); }
.iconbtn {
  width: 44px; height: 44px; border-radius: var(--r-pill); display: grid; place-items: center;
  background: var(--card); box-shadow: var(--shadow); color: var(--ink-2); font-size: 1.15rem;
  transition: transform .35s var(--spring), background .15s;
}
.iconbtn:hover { transform: translateY(-1px); } .iconbtn:active { transform: scale(.9); }
.pill { padding: 6px 14px; border-radius: var(--r-pill); background: var(--card); box-shadow: var(--shadow); font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); transition: transform .35s var(--spring); }
.pill:active { transform: scale(.94); }

/* ─── Кнопки ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 17px 24px; border-radius: var(--r-pill); font-weight: 800; font-size: var(--fs);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 85%, #fff), var(--accent)); color: #fff;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 42%, transparent), 0 1px 0 rgba(255,255,255,.4) inset;
  transition: transform .45s var(--spring), box-shadow .2s, opacity .15s; width: 100%; position: relative; overflow: hidden;
}
.btn::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,.45), transparent 40%); opacity: 0; transition: opacity .3s; }
.btn:active::after { opacity: 1; transition: none; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px color-mix(in srgb, var(--accent) 50%, transparent); }
.btn:active { transform: scale(.97); box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn:disabled { opacity: .45; box-shadow: none; transform: none; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.btn.soft { background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }
.btn.sm { padding: 10px 16px; font-size: var(--fs-sm); width: auto; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.sticky-bottom { position: sticky; bottom: calc(92px + env(safe-area-inset-bottom)); margin-top: auto; padding-top: 16px; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 2; }
.no-nav .sticky-bottom { bottom: calc(16px + env(safe-area-inset-bottom)); }

/* ─── Карточки ─── */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 12px; }
.card.soft { background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }

/* ─── Нижняя навигация ─── */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), calc(var(--maxw) - 24px));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px;
  background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.4) inset; z-index: 20;
}
.nav button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: var(--r);
  color: var(--ink-3); font-size: .7rem; font-weight: 700; transition: color .2s, background .25s;
}
.nav button .ic { font-size: 1.35rem; line-height: 1; transition: transform .5s var(--spring); }
.nav button.active { color: var(--accent-ink); background: var(--accent-soft); }
.nav button.active .ic { transform: translateY(-3px) scale(1.15); }
.nav button:active .ic { transform: scale(.85); }

/* ─── Маскот ─── */
.mascot { display: block; overflow: visible; }
.mascot .m-body { transform-origin: 0 0; animation: m-breathe 3.4s ease-in-out infinite; }
@keyframes m-breathe { 50% { transform: translateY(-4px) scale(1.02, .985); } }
.mascot .m-shadow { transform-origin: 0 88px; animation: m-shadow 3.4s ease-in-out infinite; }
@keyframes m-shadow { 50% { transform: scale(.9); opacity: .06; } }
.mascot .m-wing { transform-origin: 0 0; animation: m-wing 3.4s ease-in-out infinite; }
.mascot .m-wl { transform-origin: -50px 0; } .mascot .m-wr { transform-origin: 50px 0; animation-direction: alternate-reverse; }
@keyframes m-wing { 50% { transform: rotate(-6deg); } }
.mascot .m-pupil { transition: transform .12s ease-out; }
.mascot .m-lid { transition: height .07s ease-in, y .07s ease-in; }
.mascot.blink .m-lid { height: 26px; }
.mascot.hop .m-body { animation: m-hop .6s var(--spring) 1, m-breathe 3.4s ease-in-out .6s infinite; }
@keyframes m-hop { 30% { transform: translateY(-22px) scale(.95, 1.08); } 60% { transform: translateY(0) scale(1.06, .94); } }
.mascot-wrap { display: grid; place-items: center; position: relative; }
.mascot-wrap .bubble { position: absolute; top: 4px; right: 6%; background: var(--card); padding: 8px 14px; border-radius: 16px 16px 16px 4px; box-shadow: var(--shadow); font-weight: 800; font-size: var(--fs-sm); animation: rise .6s var(--spring-soft) .3s both; max-width: 46%; }

/* ─── Главная ─── */
.hero { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.hero h1 { font-size: 2.3rem; }
.home-stage { position: relative; height: 210px; margin: 6px 0 12px; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(160deg, var(--sky-soft), var(--accent-soft)); }
.home-stage .stage-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-stage .mascot-wrap { position: absolute; inset: 0; }
.big-cta { padding: 22px; border-radius: var(--r-lg); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); color: #fff; display: flex; align-items: center; gap: 16px; text-align: left; width: 100%;
  box-shadow: 0 16px 34px color-mix(in srgb, var(--accent) 45%, transparent); transition: transform .5s var(--spring); position: relative; overflow: hidden; }
.big-cta:hover { transform: translateY(-2px) scale(1.01); } .big-cta:active { transform: scale(.975); }
.big-cta::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.16); animation: cta-orb 6s ease-in-out infinite; }
@keyframes cta-orb { 50% { transform: translate(-14px, 10px) scale(1.15); } }
.big-cta .ic { font-size: 2.2rem; animation: wobble 4s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(8deg); } }
.big-cta b { display: block; font-size: var(--fs-lg); }
.big-cta span { opacity: .92; font-size: var(--fs-sm); font-weight: 600; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tile { border-radius: var(--r); padding: 16px; background: var(--card); box-shadow: var(--shadow); text-align: left; display: flex; flex-direction: column; gap: 8px; transition: transform .45s var(--spring), box-shadow .2s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); } .tile:active { transform: scale(.96); }
.tile .ic { font-size: 1.6rem; }
.tile b { font-weight: 800; }
.tile.violet { background: var(--violet-soft); color: var(--violet-ink); box-shadow: none; }
.tile.mint   { background: var(--mint-soft);   color: var(--mint-ink);   box-shadow: none; }
.tile.amber  { background: var(--amber-soft);  color: var(--amber-ink);  box-shadow: none; }
.tile.sky    { background: var(--sky-soft); box-shadow: none; }

/* ─── Тест САН ─── */
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; position: relative; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff)); border-radius: 99px; transition: width .5s var(--spring-soft); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent); }
.pair { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.pair-words { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair-words div { border-radius: var(--r); padding: 18px 12px; text-align: center; font-weight: 800; font-size: 1.15rem; line-height: 1.25; display: grid; place-items: center; min-height: 92px; animation: word-in .5s var(--spring) both; }
.pair-words div:nth-child(2) { animation-delay: .06s; }
@keyframes word-in { from { opacity: 0; transform: translateY(18px) scale(.9); } }
.pair.back .pair-words div { animation-name: word-in-back; }
@keyframes word-in-back { from { opacity: 0; transform: translateY(-18px) scale(.9); } }
.pair-words .bad  { background: var(--rose-soft); color: var(--rose-ink, #8A2A40); }
.pair-words .good { background: var(--mint-soft); color: var(--mint-ink); }
.scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.scale button {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm);
  background: var(--card); box-shadow: var(--shadow); color: var(--ink-2);
  transition: transform .45s var(--spring), background .12s, color .12s; animation: pop-in .5s var(--spring) both;
}
.scale button:nth-child(1) { animation-delay: .05s } .scale button:nth-child(2) { animation-delay: .08s } .scale button:nth-child(3) { animation-delay: .11s } .scale button:nth-child(4) { animation-delay: .14s } .scale button:nth-child(5) { animation-delay: .17s } .scale button:nth-child(6) { animation-delay: .2s } .scale button:nth-child(7) { animation-delay: .23s }
@keyframes pop-in { from { opacity: 0; transform: scale(.4); } }
.scale button:hover { transform: scale(1.1); }
.scale button.g1 { background: var(--rose); color: #fff; }
.scale button.g2 { background: color-mix(in srgb, var(--rose) 60%, var(--card)); color: #fff; }
.scale button.g3 { background: color-mix(in srgb, var(--rose) 28%, var(--card)); }
.scale button.g5 { background: color-mix(in srgb, var(--mint) 28%, var(--card)); }
.scale button.g6 { background: color-mix(in srgb, var(--mint) 60%, var(--card)); color: #fff; }
.scale button.g7 { background: var(--mint); color: #fff; }
.scale button.picked { transform: scale(1.25); outline: 3px solid var(--ink); outline-offset: 3px; z-index: 1; }
.scale-hints { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 700; padding: 0 4px; }
.pair .q-title { text-align: center; color: var(--ink-2); }
.pair .mascot-mini { width: 72px; margin: 0 auto -6px; }

/* ─── Результат ─── */
.result-hero { text-align: center; padding: 0 0 12px; }
.result-level { display: inline-block; margin-top: 8px; padding: 8px 18px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; animation: pop-in .6s var(--spring) .2s both; }
.bars { display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.bar .track { grid-column: 1 / -1; height: 12px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff)); width: 0; transition: width 1.1s var(--spring-soft); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent); }
.bar b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }

/* ─── Список упражнений ─── */
.ex-list { display: grid; gap: 12px; }
.ex-card {
  display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; text-align: left;
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px; width: 100%;
  transition: transform .45s var(--spring), box-shadow .2s; position: relative; overflow: hidden;
}
.ex-card:hover { transform: translateY(-3px) scale(1.01); box-shadow: var(--shadow-lg); }
.ex-card:hover .thumb svg { transform: scale(1.08); }
.ex-card:active { transform: scale(.975); }
.ex-card .thumb { width: 96px; height: 96px; border-radius: var(--r-sm); background: var(--accent-soft); display: grid; place-items: center; overflow: hidden; }
.ex-card .thumb svg { width: 100%; height: 100%; transition: transform .6s var(--spring-soft); }
.ex-card b { display: block; font-size: 1.05rem; line-height: 1.2; }
.ex-card .meta { display: flex; gap: 8px; margin-top: 6px; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 700; }
.ex-card.done::after { content: '✓'; position: absolute; top: 10px; right: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: .9rem; animation: pop-in .5s var(--spring); }
.ex-card.done .thumb { opacity: .7; }

/* ─── Экран упражнения ─── */
.ex-hero { border-radius: var(--r-lg); background: var(--accent-soft); height: 240px; overflow: hidden; position: relative; margin-bottom: 16px; view-transition-name: hero;
  box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset; }
.ex-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 80% at 50% 120%, transparent 60%, rgba(0,0,0,.05)); }
.ex-hero svg { width: 100%; height: 100%; display: block; }
.ex-hero.compact { height: 170px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: var(--r-pill); background: var(--bg-2); font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
.section-label { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 6px; }
.step-card { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.step-text { font-size: 1.3rem; font-weight: 700; line-height: 1.4; animation: rise .5s var(--spring-soft) both; }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: all .45s var(--spring); }
.dots i.on { background: var(--accent); width: 24px; border-radius: 99px; box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
.dots i.past { background: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.q { font-weight: 800; font-size: 1.1rem; margin: 16px 0 8px; }
textarea.reflect { width: 100%; min-height: 120px; border: 2px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--card); resize: vertical; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.reflect:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.done-hero { text-align: center; padding: 16px 0 8px; }
.done-hero .ic { font-size: 4.5rem; line-height: 1; display: inline-block; animation: trophy 1s var(--spring) both; }
@keyframes trophy { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 60% { transform: scale(1.15) rotate(6deg); } 100% { transform: none; opacity: 1; } }
.glow { position: relative; }
.glow::before { content: ''; position: absolute; inset: -30px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%); animation: glow 2.6s ease-in-out infinite; z-index: -1; }
@keyframes glow { 50% { transform: scale(1.25); opacity: .6; } }

/* ─── Интерактивы ─── */
.box-ui { display: flex; gap: 8px; margin-top: 10px; }
.box-ui input { flex: 1; border: 2px solid var(--line); border-radius: var(--r-pill); padding: 12px 16px; background: var(--card); outline: none; transition: border-color .15s, box-shadow .15s; }
.box-ui input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.note-fly { position: absolute; left: 50%; top: 20%; transform: translateX(-50%); background: #FFF7B0; color: #5A4A00; padding: 8px 12px; border-radius: 8px; font-weight: 700; font-size: var(--fs-sm); box-shadow: var(--shadow); animation: note-fly 1.2s cubic-bezier(.5, 0, .8, .4) forwards; max-width: 70%; text-align: center; }
@keyframes note-fly { 0% { opacity: 0; transform: translate(-50%, -20px) rotate(-6deg) scale(1.1); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 110px) rotate(10deg) scale(.4); } }
canvas.scribble { width: 100%; height: 100%; display: block; touch-action: none; background: var(--card); border-radius: var(--r-lg); }
.breath { position: absolute; inset: 0; display: grid; place-items: center; }
.breath .ring { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, #FFE58A, var(--amber)); box-shadow: 0 0 60px rgba(245,183,0,.5); display: grid; place-items: center; font-weight: 900; color: #6B4E00; animation: breathe 12s ease-in-out infinite; }
.breath .ring::before { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgba(245,183,0,.35); animation: breathe-ring 12s ease-in-out infinite; }
@keyframes breathe { 0% { transform: scale(.7); } 33% { transform: scale(1.35); } 50% { transform: scale(1.35); } 83% { transform: scale(.7); } 100% { transform: scale(.7); } }
@keyframes breathe-ring { 0% { transform: scale(1); opacity: .6; } 33% { transform: scale(1.25); opacity: 0; } 50%, 100% { transform: scale(1); opacity: .6; } }

/* ─── Конфетти ─── */
.confetti-cv { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* ─── Дневник ─── */
.diary-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.diary-row:last-child { border-bottom: 0; }
.diary-row .em { font-size: 1.6rem; }
.diary-row b { font-size: var(--fs-lg); }
.spark { width: 100%; height: 90px; }
.spark path { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 1.4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ─── О приложении ─── */
.about p + p { margin-top: 10px; }
.help-card { border-left: 4px solid var(--rose); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.toggle:last-child { border-bottom: 0; }
.switch { width: 50px; height: 30px; border-radius: 99px; background: var(--line); position: relative; transition: background .25s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .45s var(--spring); }
.switch.on { background: var(--accent); } .switch.on::after { transform: translateX(20px); }

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

/* ─── Итоговая шкала благополучия ─── */
.statement {
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 22px 18px; text-align: center; font-weight: 800; font-size: 1.22rem; line-height: 1.35;
  animation: word-in .5s var(--spring) both;
}
.opts { display: grid; gap: 10px; }
.opt {
  padding: 16px 18px; border-radius: var(--r-pill); font-weight: 800; text-align: center;
  box-shadow: var(--shadow); transition: transform .45s var(--spring), background .15s, color .15s;
  animation: pop-in .45s var(--spring) both;
}
.opt.o0 { background: var(--mint-soft); color: var(--mint-ink); animation-delay: .05s; }
.opt.o1 { background: var(--sky-soft); animation-delay: .1s; }
.opt.o2 { background: var(--rose-soft); color: var(--rose-ink, #8A2A40); animation-delay: .15s; }
.opt:hover { transform: translateY(-2px); }
.opt:active { transform: scale(.97); }
.opt.picked { outline: 3px solid var(--ink); outline-offset: 3px; transform: scale(1.02); }
.score-card { text-align: center; }
.score { font-size: 3.2rem; font-weight: 900; line-height: 1; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.score span { font-size: 1.1rem; font-weight: 700; margin-left: 6px; }
.score-card .track { height: 14px; border-radius: 99px; background: var(--line); overflow: hidden; }
.score-card .track i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff)); transition: width 1.1s var(--spring-soft); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent); }
.scale-marks { display: flex; justify-content: space-between; margin-top: 6px; font-weight: 700; }
.point { margin-top: 10px; }
.point b { color: var(--accent-ink); }

/* ─── Блок КПТ ─── */
body[data-level="cbt"] { --accent: var(--sky); --accent-soft: var(--sky-soft); --accent-ink: #1E3A6E; }
:root[data-theme="dark"] body[data-level="cbt"],
body[data-level="cbt"]:where(:root:not([data-theme="light"]) *) { --accent-ink: #BBD2FF; }
.nav { grid-template-columns: repeat(5, 1fr); }
.nav button { font-size: .66rem; }
.nav button .ic { font-size: 1.25rem; }
.breath .ring.b478 { width: 136px; height: 136px; font-size: .95rem; background: radial-gradient(circle, #CFE4FF, var(--sky)); color: #fff; box-shadow: 0 0 60px rgba(91,141,239,.45); animation: breathe478 19s ease-in-out infinite; }
.breath .ring.b478::before { content: none; }
@keyframes breathe478 { 0% { transform: scale(.72); } 21% { transform: scale(1.15); } 58% { transform: scale(1.15); } 100% { transform: scale(.72); } }
.ground-list { display: grid; gap: 8px; margin-top: 12px; }
.ground-row { display: grid; grid-template-columns: 34px 1fr 26px; align-items: center; gap: 10px; text-align: left;
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; font-weight: 700;
  transition: transform .4s var(--spring), background .2s, opacity .2s; }
.ground-row .n { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 900; }
.ground-row .tick { color: var(--ink-3); font-weight: 900; }
.ground-row:active { transform: scale(.97); }
.ground-row.on { background: var(--mint-soft); }
.ground-row.on .tick { color: var(--mint); }
.ground-row.on .n { background: var(--mint); color: #fff; }
