/* 0.9.9: спокойнее для глаз — подписи темнее (контраст ≥5), мелкий текст не меньше 12,5 px, «Закат» без розовой заливки. */
/* Не горбись — стиль «Утро» (версия 0.3).
   Светлый воздух, графит, мятно-бирюзовый акцент. Тёмная тема — если Telegram в тёмном режиме.
   Один набор стилей: заголовки, подписи, карточки и кнопки везде одинаковые. */
:root {
  --bg: #eef1ea; --surface: #ffffff; --fg: #16201a; --muted: #55605a; --line: #dfe5da;
  --accent: #2b8242; --accent-2: #236f37; --accent-soft: #dcefd8; --on-accent: #ffffff;
  --leaf: #34b64a;
  --flame: #ff8a3d; --ice: #4aa3ff; --warn: #e5533d; --gold: #f2c230;
  --ring1: #2b8242; --ring2: #8a5cf0; --ring3: #ff8a3d;
  --tab: rgba(255, 255, 255, .86);
  --hero-bg: linear-gradient(165deg, #d9ebd0 0%, #eef1ea 72%);
  --c1: linear-gradient(150deg, #2b8242, #1e5e3c); --c2: linear-gradient(150deg, #ff9a6b, #ef5f7b);
  --c3: linear-gradient(150deg, #5b8def, #7a5af5); --c4: linear-gradient(150deg, #f6c453, #f08c3a);
  --c5: linear-gradient(150deg, #3a4256, #1c2130); --c6: linear-gradient(150deg, #3fa9f5, #2a6fdb);
  --r: 22px;
  --f: "Onest", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
}
:root.dark {
  --bg: #111512; --surface: #1b211c; --fg: #eef3ee; --muted: #919c93; --line: #2a322b;
  --accent: #5fcf7a; --accent-2: #80dc96; --accent-soft: #1d3324; --on-accent: #0c1410;
  --ring1: #5fcf7a; --ring2: #a58bff;
  --tab: rgba(27, 33, 28, .86);
  --hero-bg: linear-gradient(165deg, #1f3324 0%, #111512 72%);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: var(--f); font-size: 15px; line-height: 1.45; }
body { overscroll-behavior: none; }
button { font: inherit; color: inherit; }
#app { min-height: 100%; }

/* ---------- экран ---------- */
.screen { max-width: 560px; margin: 0 auto; padding: calc(14px + var(--safe-top)) 16px calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; min-height: 100vh; animation: in .25s ease-out; }
.screen.tabbed { padding-bottom: calc(104px + var(--safe-bottom)); }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.grow { flex: 1; }
.t1 { font-size: 28px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; margin: 0; text-wrap: balance; }
.t2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; margin: 0; }
.t3 { font-size: 15px; font-weight: 700; margin: 0; }
.sub { color: var(--muted); font-size: 14px; }
.lbl { font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card { background: var(--surface); border-radius: var(--r); padding: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.card.hero { background: var(--hero-bg); box-shadow: none; }

/* ---------- кнопки ---------- */
.btn { appearance: none; border: 0; border-radius: 16px; padding: 15px 18px; font-weight: 700; font-size: 16px; width: 100%; cursor: pointer; background: var(--accent); color: var(--on-accent); transition: transform .08s, opacity .15s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; }
.btn.soft { background: var(--accent-soft); color: var(--accent-2); }
.btn.ghost { background: transparent; color: var(--muted); font-weight: 600; padding: 10px; }
.btn.dark { background: var(--fg); color: var(--bg); }
.btn svg { width: 18px; height: 18px; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-2); white-space: nowrap; }
.pill.dark { background: var(--fg); color: var(--bg); }
.chip { border: 0; font-size: 13px; font-weight: 600; padding: 8px 13px; border-radius: 99px; background: var(--surface); white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--fg); color: var(--bg); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }

/* ---------- нижнее меню ---------- */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-bottom)); width: min(540px, calc(100% - 20px)); height: 66px; border-radius: 26px; background: var(--tab); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: grid; grid-template-columns: repeat(4, 1fr); box-shadow: 0 8px 24px rgba(0, 0, 0, .1), inset 0 0 0 1px color-mix(in srgb, var(--fg) 6%, transparent); z-index: 10; }
.tab { border: 0; background: none; display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--accent); }

/* ---------- загрузка ---------- */
.splash { position: fixed; inset: 0; background: var(--hero-bg); display: grid; place-items: center; align-content: center; gap: 14px; z-index: 50; transition: opacity .35s; }
.splash.out { opacity: 0; pointer-events: none; }
.splash-fig { position: relative; height: 230px; display: grid; justify-items: center; align-items: end; }
.splash-fig .mascot { height: 220px; position: relative; z-index: 1; transform-origin: 50% 100%; }
.splash-shadow { position: absolute; bottom: -6px; width: 92px; height: 14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .16), transparent); }
/* 0.9.11: у позы «hello» голова левее центра картинки (рука справа) — сдвигаем, чтобы голова и тень были по центру экрана */
.splash-fig .mascot, .splash-shadow { translate: 20px 0; }
.mascot.breathe { animation: breathe 2.6s ease-in-out infinite; }
.mascot.breathe + .splash-shadow { animation: breathe-sh 2.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-5px) scale(1.012, .992); } }
@keyframes breathe-sh { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.9); opacity: .75; } }
.loadbar { width: 120px; height: 5px; border-radius: 9px; background: color-mix(in srgb, var(--fg) 10%, transparent); overflow: hidden; }
.loadbar i { display: block; height: 100%; width: 0; border-radius: 9px; background: var(--accent); animation: load 1.25s ease-out forwards; }
@keyframes load { to { width: 100%; } }
.mascot { display: block; user-select: none; -webkit-user-drag: none; }
@media (prefers-reduced-motion: reduce) { .mascot.breathe, .mascot.breathe + .splash-shadow { animation: none; } }
.splash .name { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.dots { display: flex; gap: 6px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .3; animation: dot 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 40% { opacity: 1; } }
.hero-anim .hero-spine { animation: spine 1.6s ease-in-out infinite alternate; }
.hero-anim .hero-head { animation: head 1.6s ease-in-out infinite alternate; }
@keyframes spine { from { d: path("M60 152 Q80 110 76 76 L82 58"); } to { d: path("M60 152 Q60 110 60 72 L62 52"); } }
@keyframes head { from { transform: translate(26px, 10px); } to { transform: none; } }

/* ---------- главная ---------- */
.how { display: grid; gap: 12px; }
.how-i { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.how-i i { width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; }
.stat { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 15px; padding: 6px 10px; border-radius: 12px; background: var(--surface); font-variant-numeric: tabular-nums; }
.stat svg { width: 17px; height: 17px; }
.stat.flame { color: var(--flame); } .stat.ice { color: var(--ice); }
.rings { display: grid; grid-template-columns: 100px 1fr; gap: 14px; align-items: center; }
.rings svg { width: 100px; height: 100px; }
.ring-track { fill: none; stroke-width: 10; opacity: .18; }
.ring { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.legend { display: grid; gap: 8px; font-size: 13px; }
.legend b { font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.alts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.alt { border: 0; text-align: left; background: var(--surface); border-radius: 18px; padding: 12px; display: grid; gap: 4px; cursor: pointer; align-content: start; }
.alt b { font-size: 14px; }
.alt span { font-size: 13px; color: var(--muted); line-height: 1.3; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.wd { display: grid; justify-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.wd i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; color: var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent); }
.wd i.ok { background: var(--accent); color: var(--on-accent); }
.wd i.now { box-shadow: 0 0 0 2px var(--accent); }
.wd svg { width: 14px; height: 14px; }
.lockbox { display: grid; gap: 10px; text-align: center; justify-items: center; }
.lockbox .ic { width: 48px; height: 48px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; }
.lockbox .ic svg { width: 24px; height: 24px; }

/* ---------- курсы ---------- */
.ccard { border: 0; text-align: left; width: 100%; border-radius: var(--r); padding: 16px; color: #fff; min-height: 128px; display: grid; align-content: space-between; position: relative; overflow: hidden; cursor: pointer; }
.ccard .ct { font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; max-width: 68%; }
.ccard .cm { font-size: 13px; font-weight: 600; opacity: .92; }
.ccard .tag { position: absolute; top: 14px; right: 14px; font-size: 12.5px; font-weight: 700; background: rgba(15, 15, 25, .38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 4px 9px; border-radius: 99px; display: inline-flex; gap: 4px; align-items: center; }
.ccard .tag svg { width: 12px; height: 12px; }
.ccard .fig { position: absolute; right: 10px; bottom: 0; height: 92px; z-index: 0; }
.ccard .tag { z-index: 2; }
.ccard .ct, .ccard .cm { position: relative; z-index: 1; max-width: 64%; }
.cover { margin: calc(-14px - var(--safe-top)) -16px 0; padding: calc(56px + var(--safe-top)) 16px 18px; color: #fff; position: relative; min-height: 220px; display: grid; align-content: end; gap: 4px; }
.cover .fig { position: absolute; right: 12px; bottom: 0; height: 170px; }
.cover .back { position: absolute; top: calc(12px + var(--safe-top)); left: 12px; background: rgba(255, 255, 255, .22); color: #fff; }
.day { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 12px; }
.day i { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; background: var(--accent-soft); color: var(--accent-2); flex: none; }
.day.lock { opacity: .55; }
.day .end { margin-left: auto; color: var(--muted); }
.day .end svg { width: 16px; height: 16px; }

/* ---------- диагностика ---------- */
.topbar { display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 40px; height: 40px; border-radius: 13px; border: 0; background: var(--surface); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn svg { width: 20px; height: 20px; }
.prog { flex: 1; height: 7px; background: color-mix(in srgb, var(--fg) 8%, transparent); border-radius: 99px; overflow: hidden; }
.prog > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.opts { display: grid; gap: 10px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opt { appearance: none; border: 2px solid transparent; background: var(--surface); border-radius: 18px; padding: 15px 16px; font-weight: 600; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; }
.opt.sel { border-color: var(--accent); }
.opt .r { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.opt.sel .r { border: 7px solid var(--accent); }
.opt.card2 { flex-direction: column; justify-content: center; padding: 18px 10px; }
.opt.card2 svg { width: 60px; height: 86px; }
.body-map { display: flex; justify-content: center; }
.body-map svg { width: 190px; height: 276px; }
.body-base { fill: color-mix(in srgb, var(--fg) 7%, transparent); }
.zone { fill: color-mix(in srgb, var(--fg) 10%, transparent); stroke: var(--line); stroke-width: 1.5; cursor: pointer; transition: fill .15s; }
.zone.on { fill: color-mix(in srgb, #ff4d3d 55%, transparent); stroke: #ff4d3d; }
.zchips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.zchip { border: 1.5px solid var(--line); background: var(--surface); border-radius: 99px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.zchip.on { border-color: #ff4d3d; background: color-mix(in srgb, #ff4d3d 12%, var(--surface)); }
.side-fig { display: flex; justify-content: center; }
.side-fig svg { width: 140px; height: 198px; }
.side-label { text-align: center; font-weight: 700; font-size: 17px; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 30px; }
.wheel-wrap { position: relative; width: 100px; }
.wheel-wrap::before { content: ""; position: absolute; left: 0; right: 0; top: 88px; height: 44px; background: var(--surface); border-radius: 12px; }
.wheel { position: relative; height: 220px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); }
.wheel::-webkit-scrollbar { display: none; }
.wheel-item { height: 44px; display: grid; place-items: center; scroll-snap-align: center; font-size: 22px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wheel-item.on { color: var(--fg); font-weight: 800; }
.wheel-pad { height: 88px; }
.wheels { display: flex; gap: 10px; justify-content: center; align-items: center; }
.building { display: grid; gap: 14px; justify-items: center; text-align: center; margin: auto 0; }
.building svg { width: 100px; height: 142px; }
.bstep { display: flex; gap: 10px; align-items: center; color: var(--muted); font-weight: 600; transition: color .2s; }
.bstep.on { color: var(--fg); }
.bstep i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-style: normal; }
.bstep.on i { background: var(--accent); border-color: var(--accent); color: #fff; }
.bstep i svg { width: 12px; height: 12px; }

/* ---------- план и прогресс ---------- */
.idx { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.idx svg { width: 96px; height: 96px; }
.idx-num { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.zb { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; font-size: 13.5px; font-weight: 600; }
.zb .b { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--fg) 8%, transparent); overflow: hidden; }
.zb .b i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.zb span:last-child { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.note { border-radius: 16px; padding: 12px 14px; font-size: 13.5px; background: var(--accent-soft); }
.note.warn { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.spark { display: flex; justify-content: center; align-items: flex-end; gap: 6px; height: 56px; }
.spark i { flex: 1; max-width: 34px; border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--accent) 28%, transparent); min-height: 4px; }
.spark i.last { background: var(--accent); }
.spark-l { display: flex; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.spark-l span { flex: 1; max-width: 34px; text-align: center; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.month i { aspect-ratio: 1; border-radius: 8px; background: color-mix(in srgb, var(--fg) 6%, transparent); }
.month i.ok { background: var(--accent); }
.month i.empty { background: transparent; }

/* ---------- тренировка ---------- */
.ex-stage { background: var(--surface); border-radius: 26px; aspect-ratio: 1; display: grid; place-items: center; }
.ex-stage svg { width: 72%; height: 72%; }
.ex-tuck .ex-head { animation: tuck 2.2s ease-in-out infinite; }
.ex-angel .ex-arm { animation: angel 2.2s ease-in-out infinite; transform-origin: 92px 86px; }
.ex-open .ex-arm { animation: openA 2.2s ease-in-out infinite; transform-origin: 92px 86px; }
@keyframes tuck { 50% { transform: translateX(-9px); } }
@keyframes angel { 50% { transform: rotate(-60deg); } }
@keyframes openA { 50% { transform: rotate(25deg); } }
.timer { font-size: 66px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.02em; transition: color .2s; }
/* 0.9.42: последние 5 секунд — красный и пульс на каждую секунду */
.timer.final { color: var(--warn); }
.timer.pulse { animation: tpulse .5s ease-out; }
@keyframes tpulse { 0% { transform: scale(1.14); } 100% { transform: scale(1); } }
.segs { display: flex; gap: 4px; flex: 1; }
.segs i { flex: 1; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--fg) 10%, transparent); }
.segs i.on { background: var(--accent); }
.rest { background: var(--accent); color: #fff; }
.rest .segs i { background: rgba(255, 255, 255, .3); } .rest .segs i.on { background: #fff; }
.rest .ex-stage { background: rgba(255, 255, 255, .14); }
.rest .big-num, .rest .t2 { color: #fff; }
.rest .sub { color: rgba(255, 255, 255, .8); }
.rest .icon-btn, .rest .btn.soft { background: rgba(255, 255, 255, .2); color: #fff; }
.rest .btn:not(.soft) { background: #fff; color: var(--accent-2); }
.big-num { font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale button { border: 2px solid transparent; background: var(--surface); border-radius: 14px; padding: 10px 4px; font-size: 12.5px; font-weight: 600; cursor: pointer; display: grid; gap: 4px; justify-items: center; }
.scale button b { font-size: 18px; }
.scale button.sel { border-color: var(--accent); }

/* ---------- профиль ---------- */
.avatar { width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 22px; display: grid; place-items: center; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ach { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.2; }
.ach-ic { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; background: var(--surface); color: color-mix(in srgb, var(--fg) 22%, transparent); }
.ach-ic svg { width: 24px; height: 24px; }
.ach.on { color: var(--fg); }
.ach.on .ach-ic { background: color-mix(in srgb, var(--flame) 16%, var(--surface)); color: var(--flame); }
.lb { display: grid; gap: 6px; }
.lr { display: grid; grid-template-columns: 26px 34px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 16px; background: var(--surface); font-weight: 600; }
.lr .p { font-weight: 800; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.lr .a { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; }
.lr .x { font-weight: 800; font-variant-numeric: tabular-nums; }
.lr .n { display: inline-flex; gap: 5px; align-items: center; min-width: 0; }
.lr .n svg { width: 15px; height: 15px; color: var(--gold); }
.lr.g1 { box-shadow: inset 0 0 0 1.5px var(--gold); background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 18%, var(--surface)), var(--surface)); }
.lr.g1 .p { color: #c99700; }
.lr.g2 { box-shadow: inset 0 0 0 1.5px #b9c2d0; background: linear-gradient(90deg, color-mix(in srgb, #b9c2d0 22%, var(--surface)), var(--surface)); }
.lr.g3 { box-shadow: inset 0 0 0 1.5px #d6a77a; background: linear-gradient(90deg, color-mix(in srgb, #d6a77a 20%, var(--surface)), var(--surface)); }
.lr.g45 { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); }
.lr.me { background: var(--accent-soft); }
.divl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 2px 0; }
.divl::before, .divl::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ref-link { background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; font-family: ui-monospace, Menlo, monospace; overflow-x: auto; white-space: nowrap; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tier { background: var(--bg); border-radius: 14px; padding: 10px 6px; display: grid; gap: 3px; font-size: 12.5px; font-weight: 600; text-align: center; border: 2px solid transparent; }
.tier b { font-size: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tier.on { border-color: var(--accent); } .tier.on b { color: var(--accent-2); }
.list { background: var(--surface); border-radius: var(--r); overflow: hidden; }
.li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 0; background: none; width: 100%; text-align: left; cursor: pointer; font-weight: 600; }
.li + .li { border-top: 1px solid var(--line); }
.li .end { color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.li .end svg { width: 16px; height: 16px; }
.li.danger { color: var(--warn); }
.switch { width: 48px; height: 29px; border-radius: 99px; background: color-mix(in srgb, var(--fg) 18%, transparent); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(19px); }

/* ---------- оплата ---------- */
.feat { display: grid; gap: 10px; }
.feat div { display: flex; gap: 10px; align-items: center; }
.feat i { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-style: normal; flex: none; }
.feat i svg { width: 13px; height: 13px; }
.plan-opt { border: 2px solid var(--line); background: var(--surface); border-radius: 18px; padding: 14px 16px; text-align: left; display: grid; gap: 2px; cursor: pointer; width: 100%; }
.plan-opt.sel { border-color: var(--accent); }
.badge { font-size: 12.5px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: var(--accent); color: var(--on-accent); }

/* ---------- шторка и тост ---------- */
.sheet-back { position: fixed; inset: 0; background: rgba(10, 12, 16, .4); display: flex; align-items: flex-end; z-index: 40; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--bg); width: 100%; max-width: 560px; margin: 0 auto; border-radius: 26px 26px 0 0; padding: 10px 16px calc(20px + var(--safe-bottom)); display: grid; gap: 10px; max-height: 86vh; overflow-y: auto; animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(40px); } }
.grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 4px; }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom)); transform: translate(-50%, 16px); background: var(--fg); color: var(--bg); padding: 11px 16px; border-radius: 14px; font-weight: 600; font-size: 14px; opacity: 0; transition: .25s; z-index: 60; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.steps-list { margin: 0; padding-left: 22px; display: grid; gap: 14px; }
.steps-list li::marker { font-weight: 800; color: var(--accent); }
.steps-list b, .steps-list span { display: block; }

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

/* ---------- палитры (0.4): мужская «Мята» — по умолчанию, женские — на выбор ---------- */
/* ---------- темы: Стандарт (база выше) · Для неё · Для него ----------
   Правило: фон и карточки никогда не зелёные — маскот всегда виден. */
:root[data-theme="her"] { --bg: #fcf3f0; --line: #f1e1dc; --accent: #e0577a; --accent-2: #c23c62; --accent-soft: #fde3ea; --ring1: #e0577a; --ring2: #8b5cf6; --ring3: #ffb547; --hero-bg: linear-gradient(165deg, #fde1e8 0%, #fcf3f0 72%); --c1: linear-gradient(150deg, #e0577a, #a6479f); }
:root.dark[data-theme="her"] { --bg: #151012; --surface: #211a1d; --line: #33282c; --accent: #f07393; --accent-2: #f796ae; --accent-soft: #3d1c28; --hero-bg: linear-gradient(165deg, #3d1c28 0%, #151012 72%); --tab: rgba(33, 26, 29, .86); }
:root[data-theme="him"], :root.dark[data-theme="him"] { --bg: #14171b; --surface: #1f2329; --fg: #eef1f4; --muted: #8f97a3; --line: #2c323a; --accent: #49d26b; --accent-2: #6fe08b; --accent-soft: #1d3324; --on-accent: #0c1410; --ring1: #49d26b; --ring2: #9575ff; --ring3: #ff9a4a; --tab: rgba(31, 35, 41, .88); --hero-bg: linear-gradient(165deg, #262c35 0%, #14171b 72%); --c1: linear-gradient(150deg, #3b4352, #22272f); }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme { border: 0; border-radius: 16px; padding: 10px 6px 8px; display: grid; justify-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); color: var(--fg); }
.theme.on { box-shadow: inset 0 0 0 2.5px var(--accent); }
.theme .sw { width: 100%; height: 58px; border-radius: 11px; display: grid; place-items: center; overflow: hidden; }
.theme .sw img { height: 54px; }
.theme .sw.std { background: linear-gradient(165deg, #d9ebd0, #eef1ea); }
.theme .sw.her { background: linear-gradient(165deg, #fde1e8, #fcf3f0); }
.theme .sw.him { background: linear-gradient(165deg, #262c35, #14171b); }
.pals { display: flex; gap: 8px; }
.pal { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; padding: 0; }
.pal.on { box-shadow: 0 0 0 2.5px var(--fg); }

/* ---------- выбор пола ---------- */

/* ---------- возраст-кнопки ---------- */
.agegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.agegrid .opt { justify-content: center; font-size: 17px; padding: 18px; }
.agegrid .opt:last-child:nth-child(odd) { grid-column: 1 / -1; }
.sub-q { margin-top: 6px; }

/* ---------- цитата дня ---------- */
.quote { font-size: 17px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.quote::before { content: "“"; display: block; font-size: 40px; line-height: .6; color: var(--accent); margin-bottom: 4px; }

/* ---------- календарь как во Flo ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head .icon-btn { width: 34px; height: 34px; background: var(--bg); }
.cal-head .icon-btn.next svg { transform: rotate(180deg); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px 4px; text-align: center; }
.cal .wh { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cal .cd { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; position: relative; font-variant-numeric: tabular-nums; }
.cal .cd.ok { background: color-mix(in srgb, var(--flame) 16%, var(--surface)); color: var(--flame); }
.cal .cd.ok svg { width: 20px; height: 20px; }
.cal .cd.miss::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: color-mix(in srgb, var(--fg) 30%, transparent); }
.cal .cd.now { box-shadow: inset 0 0 0 2px var(--accent); }
.cal .cd.fut { color: color-mix(in srgb, var(--fg) 30%, transparent); }
.cal-leg { display: flex; gap: 14px; font-size: 13px; color: var(--muted); align-items: center; }
.cal-leg span { display: inline-flex; gap: 5px; align-items: center; }
.cal-leg i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* ---------- упражнение: подсказка ---------- */
.cue { font-size: 13.5px; color: var(--muted); text-align: center; max-width: 420px; margin: 4px auto 0; }
.rest .cue { color: rgba(255, 255, 255, .85); }

/* ---------- поле ввода ---------- */
textarea { width: 100%; min-height: 110px; border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 14px; font: inherit; background: var(--surface); color: var(--fg); resize: vertical; }
textarea:focus { outline: none; border-color: var(--accent); }
.price-old { text-decoration: line-through; color: var(--muted); font-weight: 600; margin-left: 6px; }

/* ---------- достижения: листаются вбок ---------- */
.ach-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
.ach-row::-webkit-scrollbar { display: none; }
.ach-row .ach { flex: 0 0 78px; scroll-snap-align: start; border: 0; background: none; cursor: pointer; padding: 0; }

/* ---------- маскот на экранах ---------- */
.m-hero { height: 112px; margin: -18px -6px -6px 0; }
.m-side { height: 92px; margin: -8px -6px -8px 6px; flex: none; }
.m-sheet { height: 96px; flex: none; margin: -6px 0 -4px 6px; }
.m-q { height: 96px; flex: none; margin: -10px -6px 0 8px; }
.m-big { height: 170px; }
.m-mid { height: 120px; }
.m-rest { height: 150px; margin: 0 auto 6px; }
.rest-m { display: grid; justify-items: center; }
.mascot.pop { animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.ccard .mascot.fig, .cover .mascot.fig { width: auto; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .18)); }
.reset-sheet { display: grid; gap: 10px; justify-items: center; text-align: center; }
.reset-sheet .keep { margin: 0; font-weight: 700; font-size: 14px; color: var(--accent-2); background: var(--accent-soft); padding: 8px 12px; border-radius: 12px; }
.reset-sheet .btn.ghost { font-size: 14px; padding: 8px; }
.icon-x { border: 0; background: color-mix(in srgb, var(--fg) 7%, transparent); color: var(--muted); width: 26px; height: 26px; border-radius: 50%; font-size: 17px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.check-done { padding: 12px 16px; font-weight: 600; font-size: 14px; }
.badge.save { background: #2fb457; color: #fff; }

/* 0.7: маскот-силуэт сбоку в шаге «силуэт» и фото курсов */
.m-sidefig { height: 210px; width: auto; margin: 0 auto; transition: opacity .15s; }
.ccard .photo, .cover .photo { object-fit: cover; border-radius: 12px; width: auto; }

/* ================= 0.8 ================= */
/* статистика недели вместо колец */
.wstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; padding: 14px 10px; }
.wstats b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.wstats span { font-size: 13px; color: var(--muted); font-weight: 600; }
/* Лёгкий день */
.light-btn { border: 0; width: 100%; text-align: left; background: var(--surface); border-radius: 18px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.light-btn b { display: block; font-size: 15px; }
.light-btn svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.tip { gap: 10px; align-items: center; background: var(--accent-soft); font-size: 14px; }
.m-tip { height: 58px; flex: none; }
.pill.soft-warn { background: color-mix(in srgb, var(--gold) 22%, var(--surface)); color: #8a6400; justify-self: start; }
.pill.glass { background: rgba(255, 255, 255, .22); color: #fff; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: color-mix(in srgb, var(--fg) 6%, transparent); padding: 4px; border-radius: 14px; }
.seg button { border: 0; background: none; border-radius: 11px; padding: 10px 6px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
button.day { border: 0; width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.day.done i { background: var(--accent); color: var(--on-accent); }
.day i svg { width: 15px; height: 15px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid3 .card { padding: 12px 6px; text-align: center; }
.grid3 .big-num { font-size: 30px; }
/* окно перед тренировкой */
.pblock { background: var(--surface); border-radius: 18px; padding: 12px 14px; display: grid; gap: 6px; }
.pex { border: 0; background: none; padding: 4px 0; display: flex; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; font-weight: 600; }
.pex .sub { flex: none; }
/* медиа упражнения: видео после съёмки, пока — заглушка */
.exm { position: relative; background: var(--surface); border-radius: 26px; aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: center; }
.exm video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.exm-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #f6f5f1; }
.exm.has .exm-ph { display: none; }
.exm-ph { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 20px; background: linear-gradient(160deg, var(--accent-soft), var(--surface)); position: absolute; inset: 0; align-content: center; }
.exm-ph b { font-size: 19px; letter-spacing: -.01em; }
.exm-pos { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--accent-2); }
.exm.small { aspect-ratio: 16 / 9; border-radius: 20px; }
.exm.small .exm-ph b { font-size: 16px; }
.ex-name { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.i-info { width: 18px; height: 18px; color: var(--muted); }
.rest .i-info { color: rgba(255, 255, 255, .8); }
.rest-box { position: relative; }
.rest .exm { background: rgba(255, 255, 255, .14); }
.rest .exm-ph { background: rgba(255, 255, 255, .1); color: #fff; }
.rest .exm-pos { color: rgba(255, 255, 255, .85); }
.m-corner { position: absolute; right: -4px; bottom: -14px; height: 70px; }
.switch-box { background: var(--accent-soft); color: var(--accent-2); border-radius: 26px; aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 24px; text-align: center; padding: 20px; }
/* карточка упражнения */
.ex-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.xtag { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-2); }
.xtag.ok { background: color-mix(in srgb, #2fb457 14%, var(--surface)); color: #1f8a41; }
.xtag.no { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--warn); }
/* настройка плана */
.zchip.wide { flex-basis: 100%; }
.body-map svg { width: 200px; height: 300px; }
.body-map svg .body-base { color: var(--fg); }
.pcards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pcards.three { grid-template-columns: repeat(3, 1fr); }
.pcard { border: 2px solid transparent; background: var(--surface); border-radius: 18px; padding: 8px 8px 12px; display: grid; gap: 4px; justify-items: center; text-align: center; cursor: pointer; align-content: start; }
.pcard.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.pcard b { font-size: 14px; line-height: 1.2; }
.pcard .sub { font-size: 13px; line-height: 1.25; }
.simg { width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; background: #f4f4f2; display: grid; place-items: center; overflow: hidden; position: relative; }
.simg img { width: 100%; height: 100%; object-fit: contain; }
.simg i { display: none; font-style: normal; font-size: 12.5px; color: #9a9a9a; }
.simg.none i { display: block; }
.simg.flip img { transform: scaleX(-1); }
.pcards.three .simg { aspect-ratio: 3 / 4; }
.hrow { background: var(--surface); border-radius: 16px; overflow: hidden; }
.hrow .li { padding: 14px; }
.hrow.on { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--gold) 60%, transparent); }
.hhint { margin: 0 12px 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 18%, var(--surface)); font-size: 13.5px; }
.opt.small { padding: 11px 12px; font-size: 14px; }
.agree { border: 0; background: none; display: flex; gap: 12px; align-items: flex-start; text-align: left; font-size: 14px; cursor: pointer; padding: 6px 2px; }
.agree .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); flex: none; display: grid; place-items: center; background: var(--surface); }
.agree.on .box { background: var(--accent); border-color: var(--accent); color: #fff; }
.agree .box svg { width: 14px; height: 14px; }
.blocks { display: grid; gap: 8px; }
.blocks div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; font-size: 13.5px; }
/* курсы */
.lockall { border: 2px dashed var(--line); background: var(--surface); border-radius: 18px; padding: 18px; display: grid; justify-items: center; gap: 4px; cursor: pointer; text-align: center; }
.lockall svg { width: 22px; height: 22px; color: var(--accent-2); }
.linkrow { border: 0; background: none; color: var(--accent-2); font-weight: 700; font-size: 14px; display: inline-flex; gap: 4px; align-items: center; justify-content: center; cursor: pointer; padding: 4px; }
.linkrow svg { width: 15px; height: 15px; }
.inc { font-size: 12.5px; font-weight: 600; color: #1f8a41; margin-top: 4px; }
/* прогресс: отзывы */
.spark i.fb-easy, .cal-leg i.fb-easy { background: color-mix(in srgb, #2fb457 55%, transparent); }
.spark i.fb-ok, .cal-leg i.fb-ok { background: var(--accent); }
.spark i.fb-hard, .cal-leg i.fb-hard { background: var(--flame); }
.spark i.pain { box-shadow: inset 0 3px 0 var(--warn); }
.about-hero { display: grid; justify-items: center; }
.m-board { height: 180px; }
.terms a { color: var(--accent-2); font-weight: 700; }
.ccard .tag { position: static; justify-self: start; margin-bottom: 8px; }
.ccard { align-content: start; }
.ccard .cm { margin-top: auto; padding-top: 10px; }
.sheet .exm { min-height: 230px; flex: none; } .sheet .exm.small { min-height: 0; }
/* 0.8.1: тренировка — сначала «как делать», потом таймер */
.wo-text { text-align: center; }
.wo-text [data-of] { display: block; }
.wo-steps { text-align: left; font-size: 14px; background: var(--surface); border-radius: 16px; padding: 12px 14px 12px 32px; }
.rest-pill { justify-self: center; margin: 0 auto 10px; width: max-content; background: var(--accent-soft); color: var(--accent-2); border-radius: 99px; padding: 6px 14px; font-size: 14px; font-weight: 600; }
.rest-pill b { font-variant-numeric: tabular-nums; }
[data-mid] { display: grid; gap: 6px; }
[data-mid] .linkrow { justify-self: center; }
/* медиа упражнения: высота фиксирована, чтобы ничего не наезжало на текст (было на iPhone) */
.exm, .exm.small { aspect-ratio: auto; height: min(56vw, 300px); flex: none; }
.exm.small { height: min(40vw, 190px); }
.sheet .exm { min-height: 0; height: min(52vw, 260px); }
.switch-box { aspect-ratio: auto; height: min(56vw, 300px); }
/* 0.9.10: есть фото упражнения — блок по пропорции фото 4:3, чтобы обе фигуры (точка А и Б) были крупными */
.exm:has(.exm-img), .sheet .exm:has(.exm-img) { aspect-ratio: auto; height: min(calc((min(100vw, 560px) - 32px) * .75), 400px); }
.exm.small:has(.exm-img) { aspect-ratio: auto; height: min(calc((min(100vw, 560px) - 32px) * .5), 240px); }
/* достижения: точки-подсказка, что можно листать */
.ach-wrap { position: relative; }
.ach-wrap::after { content: ""; position: absolute; top: 0; right: -16px; bottom: 4px; width: 40px; background: linear-gradient(90deg, transparent, var(--surface)); pointer-events: none; }
.ach-dots { display: flex; justify-content: center; gap: 6px; }
.ach-dots i { width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--fg) 18%, transparent); transition: width .2s; }
.ach-dots i.on { width: 18px; border-radius: 3px; background: var(--accent); }
/* программа: недели → дни → упражнения */
.wk { background: var(--surface); border-radius: 18px; overflow: hidden; }
.wk > button { width: 100%; border: 0; background: none; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; cursor: pointer; }
.wk > button svg { width: 16px; height: 16px; transition: transform .2s; color: var(--muted); }
.wk.open > button svg { transform: rotate(90deg); }
.wk-body { display: none; padding: 0 10px 10px; gap: 6px; }
.wk.open .wk-body { display: grid; }
.dd { background: var(--bg); border-radius: 14px; }
.dd > button { width: 100%; border: 0; background: none; padding: 11px 12px; display: flex; gap: 10px; align-items: center; text-align: left; cursor: pointer; }
.dd > button i { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; background: var(--accent-soft); color: var(--accent-2); flex: none; }
.dd > button .end svg { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; }
.dd.open > button .end svg { transform: rotate(90deg); }
.dd-body { display: none; padding: 0 12px 10px 52px; }
.dd.open .dd-body { display: grid; gap: 2px; }
.dd-part { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
.dd-ex { border: 0; background: none; padding: 6px 0; display: flex; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--fg); }
.dd-ex .sub { flex: none; }
.dd-ex::after { content: "›"; color: var(--muted); margin-left: 4px; }
/* 0.8.1: окно поверх экрана — скроллится только оно */
.sheet-back { overscroll-behavior: none; touch-action: none; }
.sheet { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; position: relative; transition: transform .18s ease-out; }
.sheet-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--fg) 8%, transparent); color: var(--muted); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.sheet-x svg { width: 16px; height: 16px; }
/* 0.8.2: обложки курсов в одном тоне */
:root { --cv: linear-gradient(150deg, #2a7f43, #3b9a52); }
.ccard { min-height: 150px; }
.ccard .cimg, .cover .cimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; z-index: 0; }
.ccard:has(.cimg)::before, .cover:has(.cimg)::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(15, 40, 25, .55) 0%, rgba(15, 40, 25, .25) 45%, transparent 70%); }
.ccard .tag, .ccard .ct, .ccard .cm { z-index: 2; }
.cover > :not(.cimg) { position: relative; z-index: 2; }
.cover .back { position: absolute; }
.cover { min-height: 240px; }
.cover .t1, .ccard .ct { text-shadow: 0 1px 12px rgba(30, 10, 90, .35); }
/* 0.8.3: выбор зон на фигуре-манекене */
.body-photo { position: relative; width: min(64vw, 260px); aspect-ratio: 149 / 199; margin: 0 auto; }
.body-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.body-photo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.body-photo { width: auto; height: min(52vh, 360px); aspect-ratio: 69 / 180; }
/* 0.8.3: зоны по форме мышц, обрезаны по силуэту */
.pzone-paint { fill: #ff2d1f; opacity: 0; mix-blend-mode: multiply; transition: opacity .18s; }
.pzone-paint.on { opacity: .8; }
.pzone-hit { fill: transparent; cursor: pointer; }

/* ---------- 0.9.11: четыре темы (28.10). «Росток» (std, по умолчанию у всех), «Персик» (sunset), «Слива» (plum), «Графит» (him). «Лайм/Карбон» убран.
   В каждой теме три цвета курсов из одной гаммы: --cplan (личный план) → --csub (подписка) → --cpaid (платный курс). ---------- */
:root { --cplan: linear-gradient(150deg, #1e5e3c, #2a7a4e); --csub: var(--cv); --cpaid: linear-gradient(150deg, #c97f2e, #e2a24c); --wash: none; }
:root[data-theme="him"], :root.dark[data-theme="him"] { --cplan: linear-gradient(150deg, #33507a, #45668f); --csub: linear-gradient(150deg, #1e6e60, #2a8a76); --cpaid: linear-gradient(150deg, #268048, #2f9658); }
:root[data-theme="sunset"], :root.dark[data-theme="sunset"] { --bg: #fbefe9; --surface: #ffffff; --fg: #2c1b1f; --muted: #6b5156; --line: #f2ddd5; --accent: #d2405b; --accent-2: #b0304a; --accent-soft: #fde1e3; --on-accent: #ffffff; --ring1: #d2405b; --ring2: #9a5ad6; --ring3: #ffb547; --tab: rgba(255, 255, 255, .9); --hero-bg: linear-gradient(165deg, #f8d3c8 0%, #fbefe9 78%);
  --wash: linear-gradient(180deg, #fbefe9 0%, #f9e6df 100%); --cplan: linear-gradient(150deg, #a8344f, #cc4f67); --csub: linear-gradient(150deg, #dc5e5c, #ee8168); --cpaid: linear-gradient(150deg, #ec8f50, #f6b072); color-scheme: light; }
:root[data-theme="plum"], :root.dark[data-theme="plum"] { --bg: #1a0b17; --surface: #2b1327; --fg: #fbf0f6; --muted: #c9a7bd; --line: #43203b; --accent: #ff8fb1; --accent-2: #ffa9c4; --accent-soft: #4a1c3f; --on-accent: #2a0a1e; --ring1: #ff8fb1; --ring2: #b98cff; --ring3: #ffb547; --tab: rgba(43, 19, 39, .9); --hero-bg: linear-gradient(165deg, #43173a 0%, #2b1327 75%);
  --wash: linear-gradient(180deg, #2a0f24 0%, #1a0b17 70%); --cplan: linear-gradient(150deg, #6b1e45, #8a2b5a); --csub: linear-gradient(150deg, #9a3e6a, #bc5a86); --cpaid: linear-gradient(150deg, #d97a9c, #f1a3bf); }
:root[data-theme="plum"], :root[data-theme="him"] { color-scheme: dark; }
body { background-image: var(--wash); background-attachment: fixed; }
.ccard.k-plan { background: var(--cplan) !important; }
.ccard.k-sub, .cover.k-sub { background: var(--csub) !important; }
.ccard.k-paid, .cover.k-paid { background: var(--cpaid) !important; }
.ccard:has(.cimg)::before, .cover:has(.cimg)::before { background: linear-gradient(90deg, rgba(15, 8, 20, .48) 0%, rgba(15, 8, 20, .2) 45%, transparent 70%); }
.cover .t1, .ccard .ct { text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.theme .sw.sunset { background: linear-gradient(165deg, #f8d3c8, #fbefe9); }
.theme .sw.plum { background: linear-gradient(165deg, #43173a, #1a0b17); }
.theme .sw { position: relative; }
.theme .sw::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 6px; height: 6px; border-radius: 3px; background: var(--sw3); }
.theme .sw.std { --sw3: linear-gradient(90deg, #2a7a4e 0 33%, #3b9a52 33% 66%, #e2a24c 66%); }
.theme .sw.sunset { --sw3: linear-gradient(90deg, #cc4f67 0 33%, #ee8168 33% 66%, #f6b072 66%); }
.theme .sw.plum { --sw3: linear-gradient(90deg, #7a2350 0 33%, #ad4f7a 33% 66%, #e08aa6 66%); }
.theme .sw.him { --sw3: linear-gradient(90deg, #45668f 0 33%, #237a6a 33% 66%, #2f9658 66%); }
.themes { grid-template-columns: repeat(4, 1fr); }
/* ---------- 0.9.1: шаг «Кто ты?», плитки зон, карточка упражнения блоками, дни с фото, блеск на покупке ---------- */
:root { --zone: #e8604c; }
:root.dark, :root[data-theme="him"], :root[data-theme="plum"] { --zone: #ff8a7a; }
:root[data-theme="sunset"] { --zone: #e8604c; }
.gpick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gcard { position: relative; height: min(56vh, 400px); border: 0; border-radius: 24px; overflow: hidden; padding: 0; cursor: pointer; display: flex; align-items: flex-end; background: var(--surface); box-shadow: 0 8px 24px rgba(20, 10, 40, .14); }
.gcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 80% 50%; }
.gcard span { position: relative; z-index: 1; margin: 0 10px 12px; width: 100%; background: rgba(255, 255, 255, .94); color: #17151c; border-radius: 14px; padding: 12px 6px; font-weight: 800; font-size: 15px; text-align: center; }
.gcard.sel { box-shadow: 0 0 0 3px var(--accent), 0 8px 24px rgba(20, 10, 40, .18); }
.ztiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ztile { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); text-align: left; cursor: pointer; color: var(--fg); }
.ztile i { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; }
.ztile i svg { width: 13px; height: 13px; }
.ztile b { display: block; font-size: 14px; line-height: 1.2; }
.ztile .sub { font-size: 12.5px; }
.ztile.on { border-color: var(--zone); background: color-mix(in srgb, var(--zone) 10%, var(--surface)); }
.ztile.on i { background: var(--zone); border-color: var(--zone); color: #fff; }
.ztile.wide { grid-column: 1 / -1; justify-content: center; }
.exblk { background: var(--surface); border-radius: 18px; padding: 14px; display: grid; gap: 8px; }
.exblk hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.xtag.zone { background: color-mix(in srgb, var(--zone) 14%, var(--surface)); color: var(--zone); }
.dd > button .dimg { width: 52px; height: 52px; flex: none; border-radius: 12px; object-fit: cover; object-position: 50% 50%; background: var(--accent-soft); }
.dayhero { position: relative; margin: -10px -16px 0; height: 220px; border-radius: 26px 26px 0 0; overflow: hidden; display: flex; align-items: flex-end; color: #fff; }
.dayhero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.dayhero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(10, 6, 16, .62), transparent 62%); }
.dayhero > div { position: relative; z-index: 2; padding: 16px; display: grid; gap: 2px; }
.dayhero .lbl, .dayhero .sub { color: rgba(255, 255, 255, .88); }
.dex { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 10px 0; text-align: left; cursor: pointer; color: var(--fg); }
.dex:last-child { border-bottom: 0; }
.dex b { font-size: 14.5px; }
.dex .tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.dex .xtag { font-size: 12.5px; padding: 2px 8px; }
.dex svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.card.three { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 12px 6px; }
.card.three > div + div { border-left: 1px solid var(--line); }
.card.three b { display: block; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.card.three span { font-size: 12.5px; color: var(--muted); }
.about { display: grid; gap: 2px; }
.about .more { justify-self: start; border: 0; background: none; padding: 0; font-weight: 700; color: var(--accent-2); cursor: pointer; }
/* блеск: медленный блик на платном курсе и кнопках покупки/подписки */
.ccard.k-paid::after, .cover.k-paid::after, .btn.shine::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .28) 45%, transparent 60%); background-size: 250% 100%; animation: shine 3.6s ease-in-out infinite; }
.btn.shine { position: relative; overflow: hidden; }
.k-paidbtn { background: var(--cpaid); color: #fff; }
@keyframes shine { 0% { background-position: 120% 0; } 60%, 100% { background-position: -60% 0; } }
[hidden] { display: none !important; }
/* ---------- 0.9.2: тренировка дня с фото, номера упражнений ---------- */
.whero { position: relative; border: 0; width: 100%; min-height: 190px; border-radius: var(--r); overflow: hidden; padding: 0; display: flex; align-items: flex-end; text-align: left; cursor: pointer; background: var(--cplan); color: #fff; }
.whero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.whero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(10, 6, 16, .66) 0%, rgba(10, 6, 16, .2) 55%, transparent 80%); }
.whero-in { position: relative; z-index: 2; padding: 14px 16px; display: grid; gap: 4px; width: 100%; }
.whero .lbl, .whero .sub { color: rgba(255, 255, 255, .88); }
.whero .t2 { color: #fff; font-size: 21px; }
.dnum { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 15px; background: var(--accent-soft); color: var(--accent-2); }
.simg img { object-fit: cover; } .simg { background: #d9d9dc; } .pcard .sub { font-size: 12.5px; }
.gcard img { object-position: 50% 20%; }
/* 0.9.2: нечётная последняя плитка — на всю ширину */ .ztiles > .ztile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ztiles > .ztile.wide { grid-column: 1 / -1; justify-content: flex-start; }
/* нечётная «обычная» плитка перед широкой тоже растягивается */
.ztiles > .ztile:nth-last-child(2):nth-child(odd):has(+ .ztile.wide) { grid-column: 1 / -1; }

/* 0.9.3: блеск на светлой кнопке — полоса в цвет акцента, чтобы было видно */
.btn.soft.shine::after { background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .85) 45%, transparent 60%); background-size: 250% 100%; }
/* 0.9.3: выгода на тарифах — честная зачёркнутая цена (месяц × 12) и метка скидки */
.plan-opt .was { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.save-tag { font-size: 12.5px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
/* 0.9.3: выходные в «Офисной разминке» */
.dd.wkend > .row { padding: 11px 12px; gap: 10px; align-items: center; color: var(--fg); }
.dd.wkend i { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); flex: none; }
.dd.wkend i svg { width: 22px; height: 22px; }
/* 0.9.3: паузы «Офисной разминки» с фото */
.day.dphoto { align-items: center; }
.day.dphoto .dth { position: relative; width: 52px; height: 52px; flex: none; border-radius: 12px; overflow: hidden; background: var(--accent-soft); }
.day.dphoto .dth img { width: 100%; height: 100%; object-fit: cover; display: block; }
.day.dphoto .dth i { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--on-accent); width: auto; height: auto; border-radius: 0; }
.day.dphoto .dth i svg { width: 22px; height: 22px; }
.rest-pill.ready { background: var(--accent); color: var(--on-accent); }
.plan-opt .inc s { color: var(--muted); font-weight: 600; }

/* 0.9.9: меньше текста — свёрнутый список упражнений, строка «Пригласи друга», свёрнутые настройки */
details > summary { list-style: none; cursor: pointer; } details > summary::-webkit-details-marker { display: none; }
.exlist summary { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 8px; font-weight: 700; color: var(--accent-2); }
.exlist summary svg, .setbox summary svg { width: 16px; height: 16px; transform: rotate(90deg); transition: transform .15s; }
.exlist[open] summary svg, .setbox[open] summary svg { transform: rotate(-90deg); }
.setbox summary.li { background: var(--surface); border-radius: var(--r); }
.setbox[open] summary.li { border-radius: var(--r) var(--r) 0 0; }
.setbox[open] .list { border-radius: 0 0 var(--r) var(--r); border-top: 1px solid var(--line); }
.refrow { border: 0; width: 100%; text-align: left; cursor: pointer; color: var(--fg); gap: 12px; }

/* ---------- 0.9.13: профиль короче — карточка уровня открывает окно с уровнями и достижениями ---------- */
.lvlrow { border: 0; width: 100%; text-align: left; cursor: pointer; color: var(--fg); gap: 12px; transition: transform .12s; }
.lvlrow:active { transform: scale(.98); }
.lvl-badge { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font-size: 20px; font-weight: 800; }
.lvl-badge svg { width: 20px; height: 20px; }
.lvl-go { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.lvl-go svg { width: 18px; height: 18px; }
.lvl-h { width: 100%; text-align: left; margin-top: 6px; }
.lvl-list { display: grid; gap: 8px; width: 100%; text-align: left; }
.lvl-li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: color-mix(in srgb, var(--fg) 4%, transparent); }
.lvl-li .lvl-badge { width: 36px; height: 36px; border-radius: 12px; font-size: 16px; }
.lvl-li.cur { background: var(--accent-soft); }
.lvl-li.cur .lvl-badge { background: var(--accent); color: var(--on-accent); }
.lvl-li.lock { opacity: .6; }
.lvl-li.lock .lvl-badge { background: color-mix(in srgb, var(--fg) 8%, transparent); color: var(--muted); }
.lvl-lock { color: var(--muted); display: grid; }
.lvl-lock svg { width: 18px; height: 18px; }
.sheet .ach-grid { width: 100%; }
.sheet .ach { border: 0; background: none; padding: 0; cursor: pointer; }
.sheet .ach-ic { background: color-mix(in srgb, var(--fg) 6%, var(--surface)); }

/* 0.9.22: «Прогресс» — неделя, итоги, цель */
.pweek { display: flex; flex-direction: column; gap: 14px; width: 100%; text-align: left; border: 0; cursor: pointer; }
.pweek .week { width: 100%; }
.pring { width: 64px; height: 64px; flex: none; }
.more { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 700; color: var(--accent-2); }
.more svg { width: 15px; height: 15px; }
.pweek .more { align-self: center; }
.ptiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ptiles .card { padding: 14px 10px; text-align: center; display: grid; gap: 2px; }
.ptiles b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; display: inline-flex; justify-content: center; align-items: baseline; gap: 6px; }
.ptiles span { font-size: 12.5px; color: var(--muted); font-weight: 600; line-height: 1.25; }
.ptiles small.ice { font-size: 12px; color: var(--ice); display: inline-flex; align-items: center; gap: 1px; }
.ptiles small.ice svg { width: 11px; height: 11px; }
.pbar { height: 8px; border-radius: 8px; background: var(--accent-soft); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 8px; background: var(--accent); }
.pidx { width: 100%; border: 0; text-align: left; cursor: pointer; }
.cal .cd.ok { background: var(--accent); color: var(--on-accent); }
.cal .cd.miss::after { display: none; }
.pgoal-ic svg { width: 20px; height: 20px; flex: none; }
.sheet { max-height: min(86vh, calc(100vh - var(--safe-top) - 10px)); }

/* 0.9.23: самочувствие и тест «было → стало» */
.fmaps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fmaps.one { grid-template-columns: minmax(0, 170px); justify-content: center; }
.fbody { display: grid; gap: 6px; text-align: center; }
.fimg { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: color-mix(in srgb, var(--fg) 4%, var(--surface)); }
.fimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: grayscale(1); opacity: .5; }
.fimg i { position: absolute; border-radius: 50%; filter: blur(6px); opacity: .85; }
.fsum { margin: 0; text-align: center; font-weight: 700; font-size: 14.5px; }
.fsum.ok { color: var(--accent-2); }
.fgrid { display: grid; gap: 6px; align-items: center; justify-content: start; }
.fgrid .fz { font-size: 13px; color: var(--muted); font-weight: 600; line-height: 1.15; }
.fgrid i { width: 26px; height: 26px; border-radius: 8px; }
.fgrid i.no { box-shadow: inset 0 0 0 1.5px var(--line); }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchips .chip { font-size: 14.5px; padding: 10px 14px; border: 1.5px solid var(--line); }
.fchips .chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.frow { display: grid; gap: 6px; }
.frow .seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13.5px; }
.frow .seg i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.warnbox { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.tchk { display: grid; }
.tchk > div { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.tchk > div:first-child { border-top: 0; }
.tchk s { color: var(--muted); font-size: 12.5px; }
.tchk .ok { color: var(--accent-2); white-space: nowrap; }
.tchk .mid { color: #d9822b; white-space: nowrap; }
.feelask { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; cursor: pointer; }
.feelask > svg { width: 18px; height: 18px; color: var(--muted); }

/* 0.9.23: «Осанка и самочувствие» — карточка внизу + опрос после тренировки */
.pcard2 { display: flex; width: 100%; border: 0; cursor: pointer; }
.pcard2 .row svg { width: 18px; height: 18px; color: var(--muted); }
.pline { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.pdots { display: inline-flex; gap: 3px; flex: none; }
.pdots i { width: 10px; height: 10px; border-radius: 50%; }
.sheet .sep { height: 1px; background: var(--line); width: 100%; margin: 4px 0; }
.fchips .chip i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.fchips .chip small { font-size: 11.5px; font-weight: 700; margin-left: 6px; opacity: .8; }
.fchips .chip.lv1 { border-color: #f2c230; background: color-mix(in srgb, #f2c230 14%, var(--surface)); }
.fchips .chip.lv2 { border-color: #f08c3a; background: color-mix(in srgb, #f08c3a 14%, var(--surface)); }
.fchips .chip.lv3 { border-color: #e5533d; background: color-mix(in srgb, #e5533d 14%, var(--surface)); }

/* 0.9.23b: проще — один тёплый цвет, меньше текста */
.fchips .chip.lv1, .fchips .chip.lv2, .fchips .chip.lv3 { border-color: var(--flame); background: color-mix(in srgb, var(--flame) 10%, var(--surface)); color: var(--fg); }
.pips { display: inline-flex; gap: 3px; margin-left: 8px; vertical-align: 1px; }
.pips b { width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--flame) 25%, transparent); }
.pips b.on { background: var(--flame); }
.tcount { font-size: 14px; color: var(--accent-2); }
.tchk .tk { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--line); flex: none; }
.tchk .tk.on { background: var(--accent); box-shadow: none; color: var(--on-accent); }
.tchk .tk svg { width: 13px; height: 13px; }
.fsum, .fsum.ok { font-weight: 600; color: var(--fg); }

.fchips .chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.frow2 { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; }
.frow2 b { font-size: 14.5px; }

/* 0.9.33: вторая сторона — зеркальное фото */
.exm.mirror img, .exm.mirror video { transform: scaleX(-1); }
