/* =====================================================================
   BAESILVY FIT — «жидкое стекло» в духе iOS 26: кнопки, переключатели, ползунки.
   Подключается последним на витрине, оформлении, заказе, подарке и в кабинете.
   Стекло — полупрозрачная заливка с размытием фона, светлая кромка сверху и мягкая тень;
   движение — пружинистое, «линза» переключателя переезжает к выбранному варианту.
   ===================================================================== */
:root {
  --lg-fill: color-mix(in srgb, #ffffff 64%, transparent);
  --lg-fill-strong: color-mix(in srgb, #ffffff 88%, transparent);
  --lg-track: color-mix(in srgb, #5a1a2c 8%, transparent);
  --lg-edge: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .55);
  --lg-lift: 0 10px 26px -14px rgba(60, 15, 25, .42), 0 2px 6px -3px rgba(60, 15, 25, .22);
  --lg-blur: blur(18px) saturate(1.8);
  --lg-spring: cubic-bezier(.3, 1.3, .5, 1);
  --lg-ink-on: var(--accent);
}
:root[data-theme="dark"] {
  --lg-fill: color-mix(in srgb, #ffffff 11%, transparent);
  --lg-fill-strong: color-mix(in srgb, #ffffff 19%, transparent);
  --lg-track: color-mix(in srgb, #ffffff 7%, transparent);
  --lg-edge: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(255, 255, 255, .13);
  --lg-lift: 0 12px 30px -14px rgba(0, 0, 0, .7), 0 2px 6px -3px rgba(0, 0, 0, .5);
  --lg-ink-on: #ffd9e0;
}

/* ---------- Кнопки ---------- */
/* Главные: заливка бренда + блик-линза сверху, как у стеклянной капли */
.cta:not(.quiet):not(.light)::before, .btn:not(.quiet):not(.ghost):not(.dark)::before, .fit-next::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(120% 95% at 50% -35%, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, .12));
}
/* Тихие и светлые: стекло — сквозь них видно, что под ними */
.cta.quiet, .btn.quiet, .cta.light {
  background: var(--lg-fill); color: var(--ink);
  -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-edge), var(--lg-lift);
}
.cta.quiet:hover, .btn.quiet:hover, .cta.light:hover { background: var(--lg-fill-strong); }
.plan.vip .cta.light, .private .cta.light { background: var(--lg-fill-strong); }
/* Нажатие: капля сжимается и пружинит обратно */
.cta, .btn, .tb-buy, .fit-next { transition: transform .5s var(--lg-spring), background-color .2s, color .2s, box-shadow .3s, translate .5s cubic-bezier(.16, 1, .3, 1); }
.cta:active, .btn:active, .tb-buy:active, .fit-next:active { transform: scale(.95); transition: transform .12s ease-out; }

/* Плавающие панели — стекло на тёмном */
:root[data-theme="light"] .topbar {
  background: color-mix(in srgb, #2a1117 80%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 14px 34px -10px rgba(42, 17, 23, .45);
}
:root[data-theme="light"] .sticky-plan:not([hidden]) {
  background: color-mix(in srgb, #2a1117 82%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
}
.prefs-btn { -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur); }

/* ---------- Переключатели: дорожка + стеклянная «линза» (app/glass.js ставит .glass-seg и .seg-thumb) ---------- */
fieldset.glass-seg { display: block; }
.glass-seg .seg-track { width: 100%;
  position: relative; isolation: isolate; display: flex; flex-wrap: wrap; gap: 4px; padding: 4px;
  border-radius: 26px; background: var(--lg-track);
  box-shadow: inset 0 1px 2px rgba(60, 15, 25, .08), inset 0 0 0 1px var(--hair, rgba(0, 0, 0, .06));
}
.glass-seg .seg-track label {
  position: relative; z-index: 1; flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 8px 12px; border-radius: 22px; line-height: 1.2;
  background: transparent !important; box-shadow: none !important; color: var(--ink); font-weight: 600;
  transform: none !important; transition: color .3s, opacity .3s; cursor: pointer;
}
.glass-seg .seg-track label:hover { opacity: .78; }
.glass-seg .seg-track label:has(input:checked) { color: var(--lg-ink-on); opacity: 1; }
.glass-seg .seg-track label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg-thumb {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
  width: var(--w, 0); height: var(--h, 0); transform: translate(var(--x, 0), var(--y, 0));
  border-radius: 22px; background: var(--lg-fill-strong);
  -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-edge), var(--lg-lift);
  transition: transform .55s var(--lg-spring), width .55s var(--lg-spring), height .55s var(--lg-spring), scale .3s var(--lg-spring), opacity .2s;
}
.glass-seg.pressing .seg-thumb { scale: 1.06 1.1; }
.glass-seg.no-anim .seg-thumb { transition: none; }
/* Подбор формата: те же стеклянные переключатели, варианты длиннее — переносятся */
.quiz-form .glass-seg .seg-track label { min-width: 9.5rem; font-size: .9375rem; min-height: 48px; }
@media (max-width: 640px) { .quiz-form .glass-seg .seg-track label { min-width: 100%; } }

/* ---------- Ползунки: тонкая дорожка и стеклянная капсула, которая «надувается» под пальцем ---------- */
.range input[type=range] { height: 34px; }
.range input[type=range]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 6px;
  background: linear-gradient(to right, var(--accent) var(--fill, 50%), var(--lg-track) var(--fill, 50%)); /* taste-skill-ignore: заливка дорожки ползунка */
  box-shadow: inset 0 1px 1px rgba(60, 15, 25, .08);
}
.range input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 40px; height: 26px; margin-top: -10px; border: 0; border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f6eff2);
  box-shadow: 0 6px 16px -5px rgba(60, 15, 25, .45), 0 1px 3px rgba(60, 15, 25, .22), inset 0 0 0 .5px rgba(60, 15, 25, .14), inset 0 1px 0 #fff;
  transition: transform .4s var(--lg-spring), box-shadow .25s, background .25s;
}
.range input[type=range]:active::-webkit-slider-thumb, .range input[type=range].dragging::-webkit-slider-thumb {
  transform: scale(1.25, 1.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .45));
  box-shadow: 0 12px 26px -8px rgba(60, 15, 25, .45), inset 0 0 0 1px rgba(255, 255, 255, .95), inset 0 -7px 10px -7px color-mix(in srgb, var(--accent) 45%, transparent);
}
.range input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: var(--lg-track); }
.range input[type=range]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--accent); }
.range input[type=range]::-moz-range-thumb {
  width: 40px; height: 26px; border: 0; border-radius: 999px; background: linear-gradient(180deg, #ffffff, #f6eff2);
  box-shadow: 0 6px 16px -5px rgba(60, 15, 25, .45), 0 1px 3px rgba(60, 15, 25, .22); transition: transform .4s var(--lg-spring);
}
.range input[type=range]:active::-moz-range-thumb { transform: scale(1.25, 1.35); }
.range output { transition: transform .4s var(--lg-spring), color .2s; display: inline-block; }
.range.dragging output { transform: scale(1.18); color: var(--accent); }
:root[data-theme="dark"] .range input[type=range]::-webkit-slider-thumb { background: linear-gradient(180deg, #fff6f2, #e9dcd8); }

@media (prefers-reduced-motion: reduce) {
  .seg-thumb, .range input[type=range]::-webkit-slider-thumb, .range output, .cta, .btn { transition: none !important; }
  .glass-seg.pressing .seg-thumb { scale: 1; }
}
/* Без поддержки backdrop-filter стекло становится просто светлой заливкой */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cta.quiet, .btn.quiet, .cta.light, .seg-thumb { background: var(--sheet); }
}

/* ---------- Калькулятор: виджеты результата (как виджеты iOS) ---------- */
.calc-res { margin-top: 20px; display: grid; gap: 10px; }
.cw {
  position: relative; border-radius: 22px; padding: 14px 16px;
  background: var(--lg-fill); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-edge), var(--lg-lift);
}
.cw span { display: block; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.cw b { display: block; font: 500 1.5rem/1.1 var(--f-display); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.cw small { display: block; font-size: .8125rem; line-height: 1.35; color: var(--muted); }
/* главный виджет: калории и кольцо БЖУ */
.cw-kcal {
  display: flex; align-items: center; gap: clamp(14px, 2vw, 22px); padding: 16px 20px;
  background: linear-gradient(145deg, #4c1526, #2a0a14); color: #fff3ee;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .06), 0 20px 40px -22px rgba(42, 10, 20, .75);
}
.cw-kcal span { color: rgba(255, 243, 238, .78); }
.cw-kcal b { color: #fff; font-size: clamp(2.25rem, 1.5rem + 2vw, 3.25rem); letter-spacing: -.01em; }
.calc-ring { width: 92px; height: 92px; flex: none; transform: rotate(-90deg); overflow: visible; }
.calc-ring circle { fill: none; stroke-width: 12; }
.ring-bg { stroke: rgba(255, 255, 255, .1); }
.ring-seg { stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .7s cubic-bezier(.16, 1, .3, 1), stroke-dashoffset .7s cubic-bezier(.16, 1, .3, 1); }
[data-ring="protein"], [data-m="protein"] { --mc: #f07c95; }
[data-ring="fat"], [data-m="fat"] { --mc: #f2d27a; }
[data-ring="carbs"], [data-m="carbs"] { --mc: #f6e6dc; }
.ring-seg { stroke: var(--mc); }
:root:not([data-theme="dark"]) [data-m="carbs"] { --mc: #c7a596; }
/* день: в среднем / тренировка / отдых */
.calc-day { margin: 0; }
.calc-day legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* БЖУ */
.cw-macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cw-macros i { display: block; width: 10px; height: 10px; border-radius: 50%; margin-bottom: 8px; background: var(--mc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc) 25%, transparent); }
/* вода и приёмы пищи */
.cw-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); gap: 10px; align-items: stretch; }
.cw-water { display: flex; align-items: center; gap: 12px; }
.water-glass { width: 44px; height: 58px; flex: none; overflow: visible; }
.glass-line { fill: none; stroke: color-mix(in srgb, var(--ink) 45%, transparent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.water-level { transform: translateY(calc((1 - var(--lvl, .5)) * 54px + 6px)); transition: transform .9s cubic-bezier(.16, 1, .3, 1); }
.water-wave { fill: color-mix(in srgb, #6db7df 72%, #bfe3f3); }
.cw-row .calc-meals { grid-template-columns: 1fr 1fr; gap: 10px; }
.cw-row .calc-meals li { padding: 10px 14px; box-shadow: var(--lg-edge), var(--lg-lift); }
.cw-row .calc-meals b { font: 600 .9375rem/1.2 var(--f-text); }
.cw-row .calc-meals span { font-weight: 500; }
/* цель: шкала «сейчас → цель» */
.goal-track { position: relative; height: 8px; margin: 10px 8px 8px; border-radius: 8px; background: linear-gradient(90deg, var(--accent), #e3909f); }
.goal-fill { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.goal-dot { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; translate: -50% -50%; background: #fff; box-shadow: 0 3px 8px rgba(60, 15, 25, .3), inset 0 0 0 5px var(--accent); }
.goal-dot.now { left: 0; }
.goal-dot.end { left: 100%; box-shadow: 0 3px 8px rgba(60, 15, 25, .3), inset 0 0 0 5px #e3909f; }
.goal-ends { display: flex; justify-content: space-between; gap: 12px; }
.goal-ends span { font-size: .8125rem; }
.cw-goal .calc-goal { margin-top: 8px; }
.cw-goal.no-track .goal-track, .cw-goal.no-track .goal-ends { display: none; }
.cw-goal.no-track .calc-goal { margin-top: 0; }
@media (prefers-reduced-motion: no-preference) {
  .water-wave { animation: water-wave 3.4s linear infinite; }
  @keyframes water-wave { to { transform: translateX(24px); } }
  .goal-fill::after { content: ""; position: absolute; inset: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: goal-shine 3s ease-in-out infinite; }
  @keyframes goal-shine { from { transform: translateX(-120%); } to { transform: translateX(380%); } }
}
@media (max-width: 640px) {
  .cw-row { grid-template-columns: 1fr; }
  .calc-ring { width: 76px; height: 76px; }
  .cw-macros { gap: 6px; }
  .cw-macros .cw { padding: 12px; }
  .cw-macros .cw b, .cw-water b { font-size: 1.3rem; }
  .cw-kcal b { font-size: 2.25rem; }
  .calc-day .seg-track label { font-size: .875rem; padding: 8px 6px; white-space: nowrap; }
}

/* ---------- Ровные цифры: у Cormorant по умолчанию «старые» цифры прыгают выше и ниже строки ---------- */
/* !important — потому что сокращение font: у заголовков и цен сбрасывает настройку к «старым» цифрам */
*, *::before, *::after { font-feature-settings: "lnum" 1 !important; }

/* ---------- 320 px: калькулятор и демо-полоса не шире экрана ---------- */
.calc-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
@media (max-width: 1100px) { .calc-wrap { grid-template-columns: minmax(0, 1fr); } }
.calc-box, .calc-fields, .calc-res { min-width: 0; }
.demo-bar label { min-width: 0; flex-wrap: wrap; }
.demo-bar select { min-width: 0; width: 100%; max-width: 22rem; }
@media (max-width: 380px) {
  .demo-bar label { width: 100%; }
}

/* ---------- Тёмная тема: никакого «тёмного на тёмном» у галочек и точек ---------- */
:root[data-theme="dark"] .plan.vip li::before { background-color: #f2e3a6; }
/* в тёмной теме бегущая строка розовая — точки цвета её текста */
:root[data-theme="dark"] .ribbon span::after, :root[data-style="burgundy"][data-theme="dark"] .ribbon span::after { background: currentColor; opacity: .75; }

/* ---------- Места VIP: сплошная шкала заполнения (30 мест — делениями нечитаемо) ---------- */
.seats-bar { display: block; height: 8px; margin-top: 10px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .2); }
.seats-bar i { display: block; height: 100%; border-radius: inherit; background: var(--butter-bright, #f2e3a6); transition: width .8s cubic-bezier(.16, 1, .3, 1); }

/* ---------- «Попробовать бесплатно»: подпись по центру кнопки ---------- */
.trial { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.trial > span { line-height: 1.4; }
.trial .cta { margin-top: 0; }

/* ---------- Тарифы: каждая карточка помещается на один экран ----------
   Плотнее отступы и списки, бонусы свёрнуты в строку «Бонусы · N» и раскрываются по нажатию. */
.tariffs { padding-top: clamp(64px, 7vw, 112px); padding-bottom: clamp(40px, 4vw, 72px); }
.tariffs .plans { margin-top: clamp(24px, 2.6vw, 40px); }
.plan { padding: clamp(20px, 2vw, 30px); }
.plan h3 { font-size: clamp(1.75rem, 1.35rem + .9vw, 2.25rem); }
.plan .plan-for { margin-top: 4px; font-size: .9375rem; }
.plan .price-row { margin-top: 10px; }
.plan .price { font-size: clamp(1.75rem, 1.45rem + .9vw, 2.3rem); }
.plan .price small { margin-top: 2px; font-size: .875rem; }
.plan ul.incl { margin-top: 14px; gap: 6px; }
.plan ul.incl li { font-size: .9375rem; line-height: 1.38; }
.plan ul.incl li.no { display: none; }
.plan-skip { margin-top: 10px; font-size: .875rem; }
.plan .seats { margin-top: 14px; }
.plan .seats .status { margin-top: 8px; padding: 6px 10px; font-size: .8125rem; }
.plan .cta { margin-top: 18px; }
details.plan-perks { margin-top: 14px; padding-top: 6px; interpolate-size: allow-keywords; }
details.plan-perks > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 40px; margin: 0; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
details.plan-perks > summary::-webkit-details-marker { display: none; }
details.plan-perks > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.perks-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.plan.vip .perks-n, .plan-perks.gold .perks-n { background: rgba(242, 227, 166, .2); color: #f2e3a6; }
details.plan-perks > summary::after {
  content: ""; margin: 0 3px 0 auto; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .35s cubic-bezier(.16, 1, .3, 1); opacity: .7;
}
details.plan-perks[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
details.plan-perks > .perks { margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) {
  details.plan-perks::details-content { block-size: 0; overflow: clip; transition: block-size .45s cubic-bezier(.16, 1, .3, 1), content-visibility .45s allow-discrete; }
  details.plan-perks[open]::details-content { block-size: auto; }
}

/* ---------- Калькулятор: на ноутбуке всё на одном экране, на телефоне результат всегда на виду ---------- */
.calc { padding-top: clamp(56px, 6vw, 104px); padding-bottom: clamp(48px, 5vw, 88px); }
.calc-fields { background: none !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; border-radius: 0 !important; gap: 12px !important; }
.calc-fields .range input[type=range] { height: 30px; margin-top: 0; }
.calc-fields .seg legend { margin-bottom: 6px; font-size: .875rem; }
.calc-box .glass-seg .seg-track label { min-height: 40px; padding: 6px 10px; font-size: .875rem; }
.calc-live { display: none; }
@media (min-width: 1101px) {
  .calc-wrap { grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 2vw, 28px); max-width: 78rem; align-items: start; }
  .calc-wrap > div:first-child { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 10px clamp(28px, 4vw, 64px); align-items: end; }
  .calc-wrap > div:first-child h2 { grid-row: 1 / span 2; }
  .calc-wrap > div:first-child > p { margin-top: 0; max-width: 40rem; }
  .calc-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px clamp(20px, 2.4vw, 36px); align-items: start; padding: clamp(18px, 2vw, 26px); }
  .calc-box .calc-res { margin-top: 0; gap: 8px; }
  .calc-box .calc-error { grid-column: 1 / -1; }
  .cw-kcal { padding: 12px 18px; }
  .calc-ring { width: 78px; height: 78px; }
  .cw { padding: 11px 14px; }
}
@media (max-width: 820px) {
  .calc-live {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    position: sticky; top: 10px; z-index: 5; margin: -4px -4px 14px; padding: 10px 16px; border-radius: 18px;
    background: linear-gradient(145deg, #4c1526, #2a0a14); color: #fff3ee;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 14px 30px -14px rgba(42, 10, 20, .7);
    transition: opacity .3s, transform .3s cubic-bezier(.16, 1, .3, 1);
  }
  .calc-live b { font: 500 1.6rem/1 var(--f-display); }
  .calc-live span { font-size: .8125rem; color: rgba(255, 243, 238, .8); }
  .calc-live.gone { opacity: 0; transform: translateY(-8px); pointer-events: none; }
}

/* ---------- Телефон: тарифы — карусель со свайпом, зоны — в две колонки ---------- */
@media (max-width: 820px) {
  .tariffs .plans {
    display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 25rem); grid-template-columns: none;
    gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 16px;
    margin-inline: -16px; padding: 6px 16px 14px; scrollbar-width: none;
  }
  .tariffs .plans::-webkit-scrollbar { display: none; }
  .tariffs .plans > .plan { scroll-snap-align: start; grid-column: auto !important; }
  .plans-hint { display: block; margin-top: 4px; font-size: .875rem; color: var(--muted); text-align: center; }
}
@media (min-width: 821px) { .plans-hint { display: none; } }
@media (max-width: 560px) {
  .focus-grid { grid-template-columns: 1fr 1fr !important; gap: 8px; }
  .focus-grid li.zone { min-height: 168px; padding: 14px; flex-direction: column !important; align-items: stretch !important; gap: 6px; }
  .focus-grid li.zone b { font-size: 1.3rem; }
  .focus-grid li.zone .zone-text span { font-size: .8125rem; line-height: 1.38; }
  .focus-grid li.zone .zone-art { width: 64px; margin: auto -8px -10px auto; }
}
@media (min-width: 1101px) {
  .calc-wrap > div:first-child { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .calc-wrap > div:first-child h2 { font-size: clamp(2.2rem, 1.3rem + 1.9vw, 3.3rem); }
  .calc-wrap > div:first-child > p { font-size: 1rem; }
  .cw-macros .cw span { display: inline; }
  .cw-macros i { display: inline-block; vertical-align: middle; margin: 0 6px 2px 0; }
  .cw-row .calc-meals li { padding: 7px 12px; }
}

/* ---------- Подбор формата: вопросы по одному, живая шкала, карточка результата ---------- */
.quiz { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: stretch; }
.quiz-form { display: grid; gap: 14px; align-content: start; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.quiz-count { margin: 0; font-size: .875rem; font-weight: 600; color: var(--muted); }
.quiz-back { border: 0; background: none; color: var(--accent); font: 600 .9375rem var(--f-text); cursor: pointer; padding: 8px 4px; min-height: 36px; text-decoration: underline; text-underline-offset: 4px; }
.quiz-back::before { content: "← "; }
.quiz-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.quiz-steps i { height: 5px; border-radius: 5px; background: var(--lg-track); transition: background-color .35s, transform .35s cubic-bezier(.16, 1, .3, 1); }
.quiz-steps i.done { background: var(--accent); }
.quiz-steps i.now { transform: scaleY(1.6); background: color-mix(in srgb, var(--accent) 55%, var(--lg-track)); }
.quiz-steps i.now.done { background: var(--accent); }
.quiz-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.quiz-q legend { font: 400 clamp(1.4rem, 1.1rem + .9vw, 1.9rem)/1.15 var(--f-display); margin: 4px 0 14px; padding: 0; outline: none; }
.quiz-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quiz-opts label {
  position: relative; display: grid; gap: 4px; align-content: start; min-height: 92px; padding: 14px 16px; border-radius: 20px; cursor: pointer;
  background: var(--lg-fill); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-edge), var(--lg-lift);
  transition: transform .45s var(--lg-spring), box-shadow .3s, background-color .3s;
}
.quiz-opts label:hover { transform: translateY(-2px); }
.quiz-opts label:active { transform: scale(.97); transition-duration: .12s; }
.quiz-opts input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.quiz-opts b { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.quiz-opts small { font-size: .8125rem; line-height: 1.35; color: var(--muted); }
.quiz-opts label:has(input:checked) { background: var(--accent); box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--accent) 90%, transparent), inset 0 1px 0 rgba(255, 255, 255, .22); }
.quiz-opts label:has(input:checked) b, .quiz-opts label:has(input:checked) small { color: var(--accent-ink); }
.quiz-opts label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.quiz-q.enter .quiz-opts label { animation: quizOpt .5s cubic-bezier(.16, 1, .3, 1) both; }
.quiz-q.enter .quiz-opts label:nth-child(2) { animation-delay: .05s; }
.quiz-q.enter .quiz-opts label:nth-child(3) { animation-delay: .1s; }
@keyframes quizOpt { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* живая шкала */
.quiz-out { align-content: center; padding: clamp(18px, 2vw, 28px); }
.quiz-lean { display: grid; gap: 14px; }
.quiz-lean .quiz-for { font-size: 1rem; opacity: 1; }
.quiz-lean .quiz-for span { font-weight: 700; color: var(--accent); }
.lean-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lean-bars li { display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; gap: 12px; font-weight: 600; font-size: .9375rem; }
.lean-bars i { display: block; height: 10px; border-radius: 10px; background: var(--lg-track); position: relative; overflow: hidden; }
.lean-bars i::after { content: ""; position: absolute; inset: 0; width: calc(var(--v, .08) * 100%); border-radius: inherit; background: color-mix(in srgb, var(--accent) 45%, var(--lg-track)); transition: width .6s cubic-bezier(.16, 1, .3, 1); }
.lean-bars li.is-lead i::after { background: var(--accent); }
.lean-bars li.is-lead span { color: var(--accent); }
.quiz-recap { display: grid; gap: 10px; }
.quiz-recap[hidden] { display: none; }
.quiz-recap-t { margin: 0; font: 400 clamp(1.4rem, 1.1rem + .9vw, 1.9rem)/1.15 var(--f-display); }
.quiz-recap ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.quiz-recap li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--lg-fill); box-shadow: var(--lg-edge); }
.quiz-recap li > span { font-size: .875rem; color: var(--muted); }
.quiz-recap button { display: grid; justify-items: end; gap: 0; border: 0; background: none; cursor: pointer; text-align: right; padding: 4px 0; font: inherit; color: var(--ink); }
.quiz-recap button b { font-weight: 700; font-size: .9375rem; }
.quiz-recap button small { font-size: .75rem; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.quiz-lean .quiz-wait { text-align: left; font-size: .875rem; }
/* карточка результата */
.qr-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qr-match { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: rgba(242, 227, 166, .18); color: #f2e3a6; }
.quiz-alt { margin: 12px 0 0; font-size: .875rem; }
.quiz-alt span { opacity: .75; }
.quiz-alt a { color: inherit; font-weight: 600; text-underline-offset: 3px; }
.quiz-again { margin-top: 12px; border: 0; background: none; color: inherit; opacity: .8; font: 600 .875rem var(--f-text); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 6px 0; }
@media (max-width: 900px) {
  .quiz { grid-template-columns: minmax(0, 1fr); }
  .quiz-out { min-height: 0; }
}
@media (max-width: 640px) {
  .quiz-opts { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .quiz-opts label { min-height: 0; padding: 12px 14px; grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .quiz-q.enter .quiz-opts label { animation: none; } }

/* ---------- Телефон: калькулятор целиком на одном экране ----------
   Сверху — результат (калории, день, БЖУ, вода и приёмы пищи лентой, цель строкой), ниже — компактные настройки. */
@media (max-width: 820px) {
  .calc { padding: 24px 12px 20px; }
  .calc-wrap { gap: 10px; }
  .calc-wrap > div:first-child { display: contents; }
  .calc-wrap > div:first-child h2 { order: 0; font-size: 1.85rem; line-height: 1.05; }
  .calc-wrap > div:first-child > p:not(.calc-note) { display: none; }
  .calc-note { order: 2; margin: 2px 4px 0 !important; font-size: .75rem; }
  .calc-box { order: 1; display: grid; gap: 10px; padding: 10px; }
  .calc-live { display: none !important; }
  .calc-box .calc-res { order: -1; margin: 0; gap: 6px; }
  .cw-kcal { padding: 8px 12px; gap: 12px; }
  .calc-ring { width: 52px !important; height: 52px !important; }
  .calc-ring circle { stroke-width: 14; }
  .cw-kcal b { font-size: 1.85rem !important; }
  .cw-kcal span { font-size: .75rem; }
  .calc-day .seg-track label { min-height: 32px !important; padding: 3px 6px !important; font-size: .8125rem !important; white-space: nowrap; }
  .cw-macros { gap: 6px; }
  .cw-macros .cw { padding: 7px 10px; border-radius: 14px; }
  .cw-macros i { display: inline-block; width: 8px; height: 8px; margin: 0 5px 1px 0; vertical-align: middle; }
  .cw-macros .cw span { display: inline; font-size: .75rem; }
  .cw-macros .cw b { font-size: 1.15rem !important; }
  .cw-macros small { display: none; }
  .cw-row { display: flex !important; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity; margin-inline: -10px; padding: 2px 10px 4px; }
  .cw-row::-webkit-scrollbar { display: none; }
  .cw-row > * { flex: none; scroll-snap-align: start; }
  .cw-water { padding: 7px 10px; gap: 8px; border-radius: 14px; }
  .water-glass { width: 24px; height: 32px; }
  .cw-water b { font-size: 1.05rem !important; }
  .cw-water small { display: none; }
  .cw-row .calc-meals { display: flex; gap: 6px; }
  .cw-row .calc-meals li { min-width: 104px; padding: 7px 10px !important; border-radius: 14px; }
  .cw-row .calc-meals b { font-size: .8125rem !important; }
  .cw-row .calc-meals span { font-size: .75rem; line-height: 1.25; }
  .cw-goal { padding: 7px 12px; border-radius: 14px; }
  .cw-goal .goal-track, .cw-goal .goal-ends { display: none !important; }
  .cw-goal .calc-goal { margin: 0 !important; font-size: .8125rem; }
  .cw-goal .calc-goal small { display: inline; margin-left: 2px; font-size: .75rem; }
  .calc-floor { font-size: .75rem; }
  .calc-fields { gap: 7px !important; }
  .calc-fields .range { display: grid; grid-template-columns: 7.6rem minmax(0, 1fr); align-items: center; gap: 0 10px; }
  .calc-fields .range label { font-size: .8125rem; gap: 4px; }
  .calc-fields .range output { font-size: 1.15rem; }
  .calc-fields .range input[type=range] { height: 28px; }
  .calc-fields .seg legend { font-size: .75rem; margin-bottom: 3px; }
  .calc-box .glass-seg .seg-track { padding: 3px; gap: 3px; border-radius: 20px; }
  .calc-box .glass-seg .seg-track label { min-height: 34px; padding: 3px 6px; font-size: .8125rem; border-radius: 17px; }
  .calc-box .seg-thumb { border-radius: 17px; }
  .calc-lose { gap: 7px; }
}
@media (max-width: 820px) {
  .calc-box { gap: 8px; }
  .calc-box .calc-res { gap: 5px; }
  .cw-kcal { padding: 6px 12px; }
  .calc-ring { width: 44px !important; height: 44px !important; }
  .cw-kcal b { font-size: 1.7rem !important; }
  .calc-day .seg-track label { min-height: 30px !important; }
  .cw-macros .cw { padding: 6px 8px; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
  .cw-macros .cw b { display: inline; font-size: 1.05rem !important; margin-left: auto; }
  .cw-goal .calc-goal small { display: none; }
  .calc-fields { gap: 6px !important; }
  .calc-fields .seg legend { margin-bottom: 2px; }
  .calc-box .glass-seg .seg-track label { min-height: 32px; }
  .calc-fields .range input[type=range] { height: 26px; }
  /* пока калькулятор на экране — нижняя плашка покупки уезжает, чтобы не закрывать его */
  body.calc-focus .sticky-plan:not([hidden]) { transform: translateY(140%); transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
  .sticky-plan:not([hidden]) { transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
}
@media (max-width: 820px) and (max-height: 700px) {
  .cw-row { display: none !important; }
  .calc-wrap > div:first-child h2 { font-size: 1.6rem; }
}

/* ---------- Калькулятор: пояснение — под калькулятором, не над ним ---------- */
.calc-wrap > .calc-after { display: grid; gap: 6px 32px; max-width: none; }
.calc-wrap > .calc-after p { margin: 0 !important; max-width: 44rem; font-size: .9375rem; line-height: 1.5; color: color-mix(in srgb, currentColor 86%, transparent); }
.calc-wrap > .calc-after .calc-note { opacity: .8; }
@media (min-width: 1101px) {
  .calc-wrap > div:first-child { display: block; }
  .calc-wrap > .calc-after { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: start; padding-inline: 4px; }
}
@media (max-width: 820px) {
  .calc-wrap > .calc-after { order: 2; padding-inline: 4px; }
  .calc-wrap > .calc-after p { font-size: .8125rem; line-height: 1.45; }
  /* БЖУ: подпись сверху, число снизу — одинаковая высота у всех трёх */
  .cw-macros .cw { display: grid !important; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1px 5px; padding: 6px 9px; }
  .cw-macros .cw i { margin: 0 !important; }
  .cw-macros .cw span { font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cw-macros .cw b { grid-column: 1 / -1; margin: 0 !important; font-size: 1.1rem !important; line-height: 1.1; }
  /* «Весь день на ногах» — в одну строку: ширина кнопок по тексту */
  .calc-fields fieldset:has(input[name=life]) .seg-track { flex-wrap: nowrap; }
  .calc-fields fieldset:has(input[name=life]) .seg-track label { flex: 1 1 auto; white-space: nowrap; padding-inline: 6px; }
  /* плашка покупки уезжает, пока калькулятор на экране (translate не спорит с анимацией появления) */
  body.calc-focus .sticky-plan:not([hidden]) { translate: 0 calc(100% + 40px); opacity: 0; pointer-events: none; }
  .sticky-plan:not([hidden]) { transition: translate .4s cubic-bezier(.16, 1, .3, 1), opacity .3s; }
}
@media (max-width: 380px) {
  .calc-fields fieldset:has(input[name=life]) .seg-track label { font-size: .75rem !important; padding-inline: 4px; }
}

/* ---------- Подбор: четыре варианта бюджета ---------- */
.quiz-q[data-step="5"] .quiz-opts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .quiz-q[data-step="5"] .quiz-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .quiz-q[data-step="5"] .quiz-opts { grid-template-columns: minmax(0, 1fr); } }
.quiz-q.enter .quiz-opts label:nth-child(4) { animation-delay: .15s; }

/* ---------- Подвал: соцсети в один ряд на ноутбуке ---------- */
footer .social { max-width: 940px; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }

/* ---------- «Что будет после оплаты»: целиком на одном экране ноутбука ---------- */
@media (min-width: 821px) {
  .fit-journey { padding-block: clamp(44px, 4.6vw, 76px); }
  .fit-journey-wrap { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(24px, 3.4vw, 56px); align-items: center; max-width: 76rem; }
  .fit-journey h2 { font-size: clamp(2.2rem, 1.3rem + 1.9vw, 3.3rem); }
  .fit-copy > p { margin-top: 10px; max-width: 48ch; }
  .fit-steps { margin-top: 18px; gap: 8px; }
  .fit-steps > li { padding: 13px 18px 15px; }
  .fit-steps b { font-size: 1.35rem; }
  .fit-steps .ticks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 18px; margin-top: 8px; font-size: .9375rem; line-height: 1.4; }
  .fit-copy .trial { margin-top: 14px; }
  .fit-stage { padding: clamp(14px, 1.6vw, 22px); }
  .fit-phase-buttons { margin-bottom: 12px; }
  .fit-phase-buttons button { min-height: 44px; font-size: .875rem; }
  .fit-phone { max-width: 340px; padding: 8px; border-radius: 30px; }
  .fit-screen { min-height: 430px; padding: 16px 16px 18px; gap: 10px; border-radius: 23px; }
  .fit-screen h3 { font-size: 1.9rem; }
  .fit-screen > p { font-size: .9375rem; line-height: 1.45; }
  .fit-box { padding: 11px 14px; }
  .fit-box ul { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; margin-top: 6px; font-size: .9375rem; }
  .fit-next { min-height: 46px; }
}
/* телефон: заголовок, вкладки с экраном кабинета, пробная тренировка */
@media (max-width: 820px) {
  .fit-journey { padding: 44px 14px 28px; }
  .fit-journey-wrap { display: flex; flex-direction: column; gap: 12px; }
  .fit-copy { display: contents; }
  .fit-journey h2 { font-size: 2.1rem; }
  .fit-copy > p { margin-top: 0; font-size: .9375rem; }
  .fit-steps { display: none; }
  .fit-stage { order: 2; padding: 10px; }
  .fit-copy .trial { order: 3; margin-top: 2px; }
  .fit-phase-buttons { margin-bottom: 10px; }
  .fit-phase-buttons button { min-height: 42px; padding: 4px; font-size: .8125rem; }
  .fit-phone { max-width: none; padding: 0; background: none !important; }
  .fit-screen { min-height: 0; padding: 14px 14px 16px; gap: 9px; }
  .fit-screen h3 { font-size: 1.6rem; }
  .fit-screen > p { font-size: .9375rem; line-height: 1.45; }
  .fit-box { padding: 10px 12px; }
  .fit-box ul { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; margin-top: 4px; font-size: .875rem; }
  .fit-next { min-height: 46px; }
}

/* ---------- Бонусы: ровная сетка 3×2 на ноутбуке, карусель на телефоне ---------- */
.bonus .sec-head h2 { font-size: clamp(2.2rem, 1.3rem + 1.9vw, 3.3rem); }
.bonus .sec-head p { margin: 0; }
.bonus-grid { margin-top: clamp(18px, 2vw, 28px); }
.bonus-grid > .ladder, .bonus-grid > .give { display: contents; }
.bonus-grid .ladder > div, .bonus-grid .face, .bonus-grid .give-card { margin: 0; display: flex; flex-direction: column; gap: 8px; padding: clamp(18px, 1.7vw, 24px); }
.bonus-grid .lad-num { font-size: clamp(2.4rem, 2rem + 1vw, 3rem); }
.bonus-grid .lad-name { margin: 0; }
.bonus-grid .ladder ul { margin: 4px 0 0; gap: 6px; font-size: .9375rem; line-height: 1.42; }
.bonus-grid .face h3 { margin: 4px 0 0; font-size: clamp(1.75rem, 1.4rem + .8vw, 2.2rem); }
.bonus-grid .face-tag { align-self: flex-start; }
.bonus-grid .face-text p:last-child { margin: 6px 0 0; font-size: .9375rem; line-height: 1.5; }
.bonus-grid .face-when { margin-top: auto; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--hair-strong); font-size: .9375rem; line-height: 1.35; }
.bonus-grid .face-when dd { text-align: right; }
.bonus-grid .give-card h3 { font-size: clamp(1.6rem, 1.3rem + .7vw, 2rem); }
.bonus-grid .give-card p { font-size: .9375rem; line-height: 1.5; }
.bonus-grid .give-card .cta { margin-top: auto; align-self: flex-start; }
@media (min-width: 1101px) {
  .bonus { padding-top: clamp(48px, 5vw, 88px); }
  .bonus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .bonus-grid .step-a { grid-area: 1 / 1; }
  .bonus-grid .step-b { grid-area: 1 / 2; }
  .bonus-grid .face { grid-area: 1 / 3 / 3 / 4; }
  .bonus-grid #gift { grid-area: 2 / 1; }
  .bonus-grid #friend { grid-area: 2 / 2; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .bonus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .bonus-grid .face { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .bonus { padding: 44px 0 8px; }
  .bonus .sec-head { padding-inline: 16px; gap: 8px; }
  .bonus .sec-head h2 { font-size: 2.1rem; }
  .bonus .sec-head p { font-size: .9375rem; }
  .bonus-grid {
    display: grid; grid-auto-flow: column; grid-auto-columns: min(84%, 22rem); gap: 10px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 16px;
    padding: 4px 16px 12px; scrollbar-width: none;
  }
  .bonus-grid::-webkit-scrollbar { display: none; }
  .bonus-grid .ladder > div, .bonus-grid .face, .bonus-grid .give-card { scroll-snap-align: start; }
  .bonus .plans-hint { margin: 0 16px; }
}

/* ---------- Частые вопросы: темы слева, аккордеон справа, один открытый ответ ---------- */
section.faq {
  max-width: 1120px; margin: clamp(16px, 2vw, 28px) auto 0; padding: clamp(36px, 4vw, 64px) clamp(20px, 4vw, 60px);
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 18px clamp(28px, 4.5vw, 72px); align-items: start;
}
section.faq h2 { font-size: clamp(2.2rem, 1.3rem + 1.9vw, 3.3rem); }
.faq-side { display: grid; gap: 16px; align-content: start; position: sticky; top: 96px; }
.faq-lead { margin: 0; color: var(--muted); max-width: 30ch; }
.faq-cats .seg-track label { min-height: 42px; font-size: .875rem; padding: 6px 10px; }
.faq-ask {
  justify-self: start; display: flex; align-items: center; gap: 12px; padding: 10px 20px 10px 10px; border-radius: 22px;
  text-decoration: none; color: #fff3ee; background: radial-gradient(120% 120% at 0% 0%, rgba(236, 120, 150, .28), transparent 60%), linear-gradient(145deg, #5c1b2e, #2f0b16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 214, 222, .16), 0 16px 34px -18px rgba(60, 12, 25, .8), 0 0 44px -18px rgba(214, 90, 124, .7);
  transition: transform .5s var(--lg-spring, cubic-bezier(.16, 1, .3, 1)), box-shadow .3s;
}
.faq-ask:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 214, 222, .22), 0 20px 40px -18px rgba(60, 12, 25, .85), 0 0 54px -14px rgba(214, 90, 124, .8); }
.faq-ask:active { transform: scale(.97); }
.faq-ask:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.faq-ask i { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 243, 238, .14); box-shadow: 0 0 16px rgba(236, 120, 150, .5), inset 0 0 0 1px rgba(255, 214, 222, .25); }
.faq-ask svg { width: 20px; height: 20px; }
.faq-ask b { display: block; font-weight: 700; line-height: 1.2; }
.faq-ask small { display: block; font-size: .8125rem; color: rgba(255, 243, 238, .78); line-height: 1.3; }
section.faq .acc { gap: 8px; counter-reset: q; }
section.faq .acc details { counter-increment: q; background: var(--bg); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--hair); transition: background-color .3s, box-shadow .3s; }
section.faq .acc details[open] { background: color-mix(in srgb, var(--sheet) 70%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 16px 34px -24px rgba(60, 15, 25, .45); }
section.faq .acc summary { display: flex; align-items: baseline; gap: 12px; padding: 15px 56px 15px 18px; font-size: 1rem; line-height: 1.35; transition: color .2s; }
section.faq .acc summary::before { content: counter(q, decimal-leading-zero); flex: none; min-width: 1.6em; font: 500 1.1rem/1 var(--f-display); color: var(--accent); }
section.faq .acc summary:hover { color: var(--accent); }
section.faq .acc summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 18px; }
section.faq .acc details p { margin: 0; padding: 0 22px 18px 58px; font-size: .9375rem; line-height: 1.55; }
section.faq .acc details[hidden] { display: none; }
:root[data-theme="dark"] section.faq .acc details[open] { background: var(--stone); }
@media (prefers-reduced-motion: no-preference) {
  section.faq .acc { interpolate-size: allow-keywords; }
  section.faq .acc details::details-content { block-size: 0; overflow: clip; transition: block-size .42s cubic-bezier(.16, 1, .3, 1), content-visibility .42s allow-discrete; }
  section.faq .acc details[open]::details-content { block-size: auto; }
}
@media (max-width: 820px) {
  section.faq { grid-template-columns: minmax(0, 1fr); margin: 0; padding: 44px 16px 36px; gap: 12px; }
  section.faq h2 { font-size: 2.1rem; }
  .faq-side { display: contents; }
  .faq-lead { font-size: .9375rem; }
  section.faq .acc { order: 1; }
  .faq-ask { order: 2; justify-self: stretch; }
  .faq-cats .seg-track label { min-height: 40px; font-size: .8125rem; padding: 4px 6px; }
  section.faq .acc summary { padding: 13px 50px 13px 14px; font-size: .9375rem; gap: 10px; }
  section.faq .acc details p { padding: 0 16px 16px 14px; font-size: .875rem; }
}

/* правки после просмотра: даты в строке, кнопка в одну строку, список «когда» — столбиком */
.fit-steps b span, .fit-steps .ticks span { display: inline; margin: 0; }
.fit-date span { white-space: nowrap; }
.fit-next { white-space: normal; text-wrap: balance; text-align: center; } /* узбекская кириллица не влезала в одну строку и обрезалась */
@media (min-width: 821px) {
  .fit-box ul { display: block; }
  .fit-date b { font-size: 1.3rem; }
  .fit-next { font-size: .9375rem; padding-inline: 16px; }
}
@media (max-width: 820px) and (max-height: 700px) {
  .fit-help, .fit-copy > p { display: none; }
  .fit-screen > p { font-size: .875rem; }
}
.bonus-grid .face-when { grid-template-columns: minmax(0, 1fr); gap: 0; }
.bonus-grid .face-when dt { font-size: .8125rem; }
.bonus-grid .face-when dd { text-align: left; margin: 0 0 8px; }
.bonus-grid .face-when dd:last-child { margin-bottom: 0; }

.bonus-grid .face { align-items: stretch; }
.bonus-grid .face-when { margin-top: 14px; }
/* две недели фейс-фитнеса — 14 дней-клеточек, первые уже «пройдены» */
.face-strip { display: none; }
.bonus-grid .face-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 17rem; margin: auto 0 0; padding: 14px 0 0; list-style: none; }
.face-strip li { aspect-ratio: 1; border-radius: 30%; background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent); }
.face-strip li:nth-child(-n+5) { background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent)); box-shadow: 0 6px 14px -8px var(--accent); }
@media (max-width: 820px) { .bonus-grid .face-strip { gap: 5px; } }
.faq-cats > legend.sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.faq-ask { background-color: #3f1220; }
.cw-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 14px; }
@media (max-width: 820px) { .fit-stage { min-width: 0; max-width: 100%; align-self: stretch; } .fit-phase-buttons button { min-width: 0; overflow-wrap: anywhere; hyphens: auto; } }
@media (max-width: 360px) { .fit-phase-buttons button { font-size: .75rem; padding: 4px 2px; } .fit-stage { padding: 8px; } }

/* ---------- Маленькие телефоны (iPhone SE и ниже по высоте): «После оплаты» и бонусы — в один экран ---------- */
@media (max-width: 820px) and (max-height: 700px) {
  .fit-journey { padding-top: 32px; }
  .fit-journey h2, .bonus .sec-head h2 { font-size: 1.85rem; }
  #fit-now > p:not(.fit-app-bar):not(.fit-help) { display: none; }
  .fit-screen { gap: 8px; padding: 12px 12px 14px; }
  .fit-screen h3 { font-size: 1.45rem; }
  .fit-box ul { font-size: .8125rem; }
  .fit-copy .trial span { font-size: .8125rem; }
  .bonus { padding-top: 32px; }
  .bonus .sec-head p { display: none; }
  .bonus-grid .face-strip { max-width: 12rem; gap: 4px; padding-top: 10px; }
  .bonus-grid .ladder > div, .bonus-grid .face, .bonus-grid .give-card { padding: 16px; gap: 6px; }
  .bonus-grid .face-when { margin-top: 10px; padding-top: 10px; font-size: .875rem; }
}
@media (max-width: 820px) and (max-height: 700px) {
  section.faq { padding-top: 32px; }
  section.faq h2 { font-size: 1.85rem; }
  .faq-lead { display: none; }
}

/* ---------- «Что будет после оплаты» v2: этапы — таймлайн-переключатель, справа телефон со свечением ---------- */
.fit-steps { position: relative; counter-reset: fs; --fill: 0; }
.fit-steps > li {
  counter-increment: fs; position: relative; cursor: pointer;
  background: transparent !important; box-shadow: none !important; border: 0 !important; transform: none !important;
  border-radius: 22px; transition: background-color .4s, box-shadow .4s;
}
.fit-step-go {
  all: unset; display: block; cursor: pointer; font: 400 1.35rem/1.15 var(--f-display); color: var(--ink);
  transition: color .3s;
}
.fit-step-go span { display: inline !important; margin: 0 !important; }
.fit-step-go:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.fit-steps > li .ticks { transition: opacity .35s; }
@media (min-width: 821px) {
  .fit-steps { gap: 4px; }
  /* дорожка и заполнение — по центрам кружков с номерами */
  .fit-steps::before, .fit-steps::after { content: ""; position: absolute; left: 31px; top: 34px; width: 2px; border-radius: 2px; pointer-events: none; }
  .fit-steps::before { bottom: 34px; background: color-mix(in srgb, var(--accent) 16%, transparent); }
  .fit-steps::after { height: calc((100% - 68px) * var(--fill)); background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #f0a0b4)); transition: height .7s cubic-bezier(.16, 1, .3, 1); }
  .fit-steps > li { padding: 14px 18px 15px 66px !important; }
  .fit-steps > li::before {
    content: counter(fs, decimal-leading-zero); position: absolute; z-index: 1; left: 14px; top: 16px; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; font: 500 1rem/1 var(--f-display); color: var(--accent); background: var(--sheet);
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 0 5px var(--sheet);
    transition: background .4s, color .4s, box-shadow .4s;
  }
  .fit-steps > li.on { background: color-mix(in srgb, #fff 62%, var(--sheet)) !important; box-shadow: inset 0 0 0 1px var(--hair), 0 22px 44px -30px rgba(60, 15, 25, .55) !important; }
  .fit-steps > li.on::before { color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 60%, #f3a7b9), var(--accent)); box-shadow: 0 0 0 5px color-mix(in srgb, #fff 62%, var(--sheet)), 0 0 24px color-mix(in srgb, var(--accent) 55%, transparent); }
  .fit-steps > li.on .fit-step-go { color: var(--accent); }
  .fit-steps > li:not(.on) .ticks { opacity: .62; }
  .fit-steps > li:not(.on):hover { background: color-mix(in srgb, #fff 30%, transparent) !important; }
  .fit-steps > li:not(.on):hover .ticks { opacity: .85; }
}
:root[data-theme="dark"] .fit-steps > li.on { background: var(--stone) !important; }
:root[data-theme="dark"] .fit-steps > li.on::before { box-shadow: 0 0 0 5px var(--stone), 0 0 24px color-mix(in srgb, var(--accent) 55%, transparent); }

/* сцена: винный градиент, свет за телефоном, стеклянный переключатель */
:root:not([data-style="classic"]) .fit-stage {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(60% 50% at 50% 58%, rgba(214, 90, 124, .38), transparent 70%), radial-gradient(40% 30% at 85% 8%, rgba(240, 190, 120, .14), transparent 70%), linear-gradient(160deg, #4f1627, #22070e 78%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(255, 214, 222, .08), 0 40px 80px -44px rgba(40, 8, 18, .75);
}
.fit-stage { border-radius: 32px !important; }
.fit-phase-buttons { padding: 4px; border-radius: 999px; background: rgba(255, 243, 238, .08); box-shadow: inset 0 0 0 1px rgba(255, 214, 222, .12); gap: 4px; }
.fit-phase-buttons button { border-radius: 999px !important; background: transparent !important; color: rgba(255, 243, 238, .82) !important; transition: background-color .35s, color .35s, box-shadow .35s; }
.fit-phase-buttons button:hover { background: rgba(255, 243, 238, .1) !important; color: #fff3ee !important; }
.fit-phase-buttons button[aria-selected="true"] { background: #fff3ee !important; color: #4f1627 !important; box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .6); }
@media (min-width: 821px) {
  .fit-phone {
    position: relative; padding: 9px; border-radius: 44px;
    background: linear-gradient(160deg, #2a0f17, #0c0306) !important;
    box-shadow: 0 0 0 1px rgba(255, 214, 222, .16), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 34px 70px -28px rgba(0, 0, 0, .75), 0 0 90px -24px rgba(214, 90, 124, .55);
  }
  .fit-phone::before { content: ""; position: absolute; z-index: 2; top: 18px; left: 50%; translate: -50% 0; width: 86px; height: 24px; border-radius: 999px; background: #0c0306; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
  .fit-screen { border-radius: 36px !important; padding-top: 44px !important; }
  .fit-app-bar { padding-inline: 4px; }
}
.fit-screen:not([hidden]) { animation: fitIn .55s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes fitIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fit-screen:not([hidden]) { animation: none; } .fit-steps::after { transition: none; } }

/* ---------- Бонусы и вопросы — отдельные разделы: воздух между ними и одна ширина ---------- */
@media (min-width: 821px) {
  .bonus { padding-bottom: clamp(64px, 7vw, 120px); }
  section.faq {
    width: calc(100% - 2 * var(--pad)); max-width: calc(1180px - 2 * var(--pad)); margin: 0 auto;
    background: linear-gradient(180deg, color-mix(in srgb, var(--stone) 55%, var(--sheet)), var(--sheet) 55%);
    box-shadow: inset 0 0 0 1px var(--hair), 0 34px 70px -48px rgba(60, 15, 25, .45);
  }
}
@media (max-width: 820px) {
  .bonus { padding-bottom: 28px; }
  section.faq { border-radius: 28px 28px 0 0; background: linear-gradient(180deg, color-mix(in srgb, var(--stone) 55%, var(--sheet)), var(--sheet) 40%); }
}
@media (min-width: 821px) {
  .fit-steps::before { bottom: auto; height: var(--track, calc(100% - 68px)); }
  .fit-steps::after { height: calc(var(--track, calc(100% - 68px)) * var(--fill)); }
}
@media (max-width: 820px) { .fit-screen { gap: 8px; } .fit-phase-buttons { margin-bottom: 8px; } .fit-journey-wrap { gap: 10px; } }
:root:not([data-style="classic"]) .fit-stage { background-color: #33101a !important; }

/* ---------- Вопросы без «карточек в карточке»: плоский список с разделителями ---------- */
section.faq .acc { gap: 0; }
section.faq .acc details, section.faq .acc details[open], :root[data-theme="dark"] section.faq .acc details[open] {
  background: transparent !important; box-shadow: none !important; border-radius: 0 !important;
  border-bottom: 1px solid var(--hair-strong);
}
section.faq .acc details:first-of-type { border-top: 1px solid var(--hair-strong); }
section.faq .acc summary { padding-left: 4px; }
section.faq .acc details p { padding-left: 46px; }
section.faq .acc details[open] summary { color: var(--accent); }
@media (max-width: 820px) { section.faq .acc details p { padding-left: 4px; } }

/* ---------- Оформление: форма, согласие ---------- */
.stack { display: grid; gap: 14px; }
.field textarea { width: 100%; min-width: 0; padding: 12px; font: 500 1rem/1.45 var(--f-text); color: var(--ink); background: #fff; border: 2px solid var(--stone-2); border-radius: 14px; resize: vertical; transition: border-color .2s, box-shadow .2s; }
.field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px rgba(94, 31, 40, .12); }
:root[data-theme="dark"] .field textarea { background: var(--sheet); color: var(--ink); }
.field small { font-size: .8125rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; line-height: 1.45; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.check a { color: var(--accent); font-weight: 600; }
/* Ошибка под полем: текст + значок, не только цвет */
.f-err { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; color: var(--bad, #8a2236); font-size: .875rem; font-weight: 600; line-height: 1.35; }
.f-err::before { content: "!"; flex: none; display: grid; place-items: center; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; background: var(--bad, #8a2236); color: var(--bad-bg, #f6dde0); font-size: .6875rem; font-weight: 800; }
[aria-invalid="true"]:not([type="checkbox"]) { border-color: var(--bad, #8a2236) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad, #8a2236) 18%, transparent) !important; }
.check:has([aria-invalid="true"]) { color: var(--bad, #8a2236); }
/* Продажи ещё не открыты: строка над тарифами */
.sales-soon { margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent); font-size: .9375rem; line-height: 1.45; }
.sales-soon[hidden] { display: none; }
/* Оформление: «Что входит» свёрнуто под формой */
details.co-incl.plan-perks { margin-top: 0; padding-top: 0; border-top: 0; }
.sheet details.co-incl > summary.perks-title { margin: 0; }

/* ---------- Юридические страницы ---------- */
.legal { max-width: 46rem; }
/* «Политика конфиденциальности»: длинное слово не влезало в 320px при размере h1 по умолчанию */
.legal h1 { font-size: clamp(2rem, 1.1rem + 4.6vw, 3.4rem); }
h1, h2 { overflow-wrap: break-word; hyphens: manual; }
.legal .sheet h2 { font-size: 1.35rem; }
.legal .sheet p, .legal .dots li { line-height: 1.6; }

/* ---------- Кнопка «Войти» в кабинет: шапка первого экрана и верхняя панель ---------- */
.ico-user { width: 18px; height: 18px; flex: none; }
.top .top-login, .tb-login {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px 0 12px; border-radius: 999px;
  text-decoration: none; font-weight: 600; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 38%, transparent);
  transition: background-color .25s, box-shadow .25s, transform .4s var(--lg-spring, cubic-bezier(.16, 1, .3, 1));
}
.top .top-login:hover, .tb-login:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); transform: translateY(-1px); text-decoration: none; }
.top .top-login:focus-visible, .tb-login:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.top-right { display: inline-flex; align-items: center; gap: 8px; }
/* «Войти» визуально 38–40 px, а нажимать можно на 46 px */
.top .top-login { position: relative; }
.top .top-login::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; }
/* Ссылки в подвале: область нажатия выше строки, строка не раздвигается */
footer .foot-row a { display: inline-block; padding: 10px 2px; margin: -10px -2px; }
/* Анимации вне экрана — на паузе (app/motion.js ставит .off-screen) */
.off-screen, .off-screen *, .off-screen *::before, .off-screen *::after { animation-play-state: paused !important; }
.tb-login { color: #fff3ee; background: rgba(255, 243, 238, .1); box-shadow: inset 0 0 0 1px rgba(255, 243, 238, .28); min-height: 38px; margin-right: 6px; }
.tb-login:hover { background: rgba(255, 243, 238, .18); }
:root[data-theme="dark"] .top .top-login { color: #f3a7b9; }
/* телефон: «Войти» вместо «Тарифы» — к тарифам ведёт главная кнопка «Выбрать формат» */
@media (max-width: 560px) {
  .top .top-tariffs { display: none; }
  .top .top-login { min-height: 38px; padding: 0 12px 0 10px; font-size: .875rem; }
}
@media (max-width: 360px) { .top .top-login span { display: none; } .top .top-login { padding: 0 10px; } }
/* в узкой шапке ссылки справа прячутся — «Войти» оставляем всегда */
.top .top-right > a.top-login { display: inline-flex !important; }
@media (max-width: 560px) {
  .top .top-login { width: 38px; min-height: 38px; padding: 0 !important; justify-content: center; }
  .top .top-login span { display: none; }
  .top .top-login .ico-user { width: 19px; height: 19px; }
}
/* телефон: логотип слева, «Войти» и язык справа; «Программа» — кнопкой под заголовком */
@media (max-width: 560px) {
  .sheet > nav.top { grid-template-columns: auto minmax(0, 1fr) auto; }
  .sheet > nav.top .left { display: none; }
  .sheet > nav.top .wordmark { grid-column: 1; justify-self: start; }
  .sheet > nav.top .right { grid-column: 3; }
}
@media (min-width: 375px) and (max-width: 560px) {
  .top .top-login { width: auto; padding: 0 13px 0 10px !important; gap: 6px; }
  .top .top-login span { display: inline; }
}
/* Ноутбук и планшет: первый экран — узкая колонка, и «Тарифы» наезжали на логотип (1024–1440 px, на 40–130 px).
   Решаем по ширине самой шапки: «Тарифы» прячем (к тарифам ведёт главная кнопка), в самой узкой — «Войти» значком */
.sheet > nav.top { container: topnav / inline-size; }
@media (min-width: 561px) {
  @container topnav (max-width: 720px) { .top .top-tariffs { display: none; } }
  @container topnav (max-width: 560px) {
    .top .top-login { width: 40px; padding: 0 !important; justify-content: center; }
    .top .top-login span { display: none; }
  }
}
