/* Bali Body — стили мини-аппа
   Стиль: белый и светло-серый фон, солнечный жёлтый, чёрный. Узкий заголовочный шрифт капсом. */
:root {
  --bg: #FBF7EC;
  --bg-glow: #FFEFAE;
  --surface: #FFFFFF;
  --surface-2: #F5F0E1;
  --ink: #1C1B17;
  --muted: #6E6858;
  --line: #EDE6D2;
  --accent: #1C1B17;
  --accent-ink: #FFFFFF;
  --accent-text: #1C1B17;
  --accent-soft: #F5F0E1;
  --sun: #FFDE00;
  --sun-deep: #F2C200;
  --sun-ink: #1C1B17;
  --sun-soft: #FFF4C2;
  --card-soft: #FFFBEA;
  --water: #1C1B17;
  --water-fill: #1C1B17;
  --water-ink: #FFFFFF;
  --water-soft: #EEF0F4;
  --warn: #8A5A00;
  --warn-soft: #FFF1CC;
  --fig: #1C1B17;
  --fig-far: #D2CBB5;
  --fig-bg: #FBF5E2;
  --mat: #FFE866;
  --box: #E4DCC4;
  --shadow: 0 1px 2px rgba(60, 48, 10, .05), 0 8px 22px rgba(60, 48, 10, .06);
  --radius: 24px;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tabbar-h: 66px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141310; --bg-glow: #2A2410; --surface: #1E1C17; --surface-2: #2A2721; --ink: #F6F2E6; --muted: #ABA593; --line: #35312A;
    --accent: #FFDE00; --accent-ink: #1C1B17; --accent-text: #FFDE00; --accent-soft: #2A2721;
    --sun-soft: #3A320E; --card-soft: #24211A; --water: #FFDE00; --water-fill: #FFDE00; --water-ink: #1C1B17; --water-soft: #2A2721;
    --warn: #F3C35A; --warn-soft: #30260E;
    --fig: #F6F2E6; --fig-far: #4E493D; --fig-bg: #24211A; --mat: #4A4318; --box: #3A362D;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141310; --bg-glow: #2A2410; --surface: #1E1C17; --surface-2: #2A2721; --ink: #F6F2E6; --muted: #ABA593; --line: #35312A;
  --accent: #FFDE00; --accent-ink: #1C1B17; --accent-text: #FFDE00; --accent-soft: #2A2721;
  --sun-soft: #3A320E; --card-soft: #24211A; --water: #FFDE00; --water-fill: #FFDE00; --water-ink: #1C1B17; --water-soft: #2A2721;
  --warn: #F3C35A; --warn-soft: #30260E;
  --fig: #F6F2E6; --fig-far: #4E493D; --fig-bg: #24211A; --mat: #4A4318; --box: #3A362D;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: radial-gradient(130% 420px at 50% -80px, var(--bg-glow) 0%, transparent 70%) no-repeat, var(--bg); color: var(--ink); font: 15px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--sun); color: var(--sun-ink); }
html { scrollbar-color: var(--line) transparent; caret-color: var(--ink); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
body.locked { overflow: hidden; }

.app { max-width: 560px; margin: 0 auto; padding: 12px 16px calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom, 0px)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.tight { gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.m0 { margin: 0; }

h1, h2, h3 { margin: 0; text-wrap: balance; }
.display { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0; line-height: 1.05; }
h1.display { font-size: 30px; }
h2 { font-size: 18px; font-weight: 800; }
h3 { font-size: 15px; font-weight: 800; }
.sub { font-size: 14px; color: var(--muted); font-weight: 600; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 10px; }
.section-title h2 { font-size: 20px; font-weight: 800; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }

.card { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card.pad0 { padding: 0; overflow: hidden; }

/* шапка */
.topbar { display: flex; align-items: center; gap: 12px; padding: 4px 0 2px; }
.topbar .ava-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--muted); font-weight: 800; font-size: 18px; flex: none; display: grid; place-items: center; }
.topbar .ttl { flex: 1; min-width: 0; }
.topbar h1 { font-family: var(--font-display); font-weight: 700; font-size: 25px; line-height: 1.05; text-transform: uppercase; }
.topbar .date { font-size: 14px; color: var(--muted); font-weight: 600; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; flex: none; position: relative; color: var(--ink); padding: 0; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 2px var(--surface); }

/* лента дат */
.datestrip { position: relative; display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 6px; scrollbar-width: none; }
.datestrip::-webkit-scrollbar { display: none; }
.date-chip { flex: none; width: 58px; border: 0; background: var(--surface); border-radius: 18px; padding: 8px 0 9px; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--ink); box-shadow: var(--shadow); }
.date-chip .wd { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.date-chip .dn { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.1; }
.date-chip .mk { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; margin-top: 3px; }
.date-chip.train .mk { background: currentColor; }
.date-chip.done .mk { background: var(--sun-deep); border-color: var(--sun-deep); }
.date-chip.past .dn, .date-chip.past .mk { opacity: .5; }
.date-chip[aria-pressed="true"] { background: var(--sun); color: #1C1B17; box-shadow: 0 6px 16px rgba(242, 194, 0, .35); }
.date-chip[aria-pressed="true"] .dn, .date-chip[aria-pressed="true"] .mk { opacity: 1; }
.date-chip[aria-pressed="true"] .wd { color: rgba(28, 27, 23, .7); }
.date-chip[aria-pressed="true"].train .mk { background: #1C1B17; border-color: #1C1B17; }

/* карусель дней */
.carousel { position: relative; display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-padding: 0 16px; }
.carousel::-webkit-scrollbar { display: none; }
.day-card { position: relative; flex: none; width: calc(100% - 22px); min-height: 430px; border-radius: 34px; overflow: hidden; scroll-snap-align: center; display: flex; flex-direction: column; padding: 20px; border: 3px solid transparent; }
.day-card .wday { align-self: flex-start; background: #fff; color: #1C1B17; box-shadow: 0 2px 8px rgba(60, 48, 10, .08); font-weight: 700; font-size: 15px; padding: 7px 16px; border-radius: 999px; position: relative; z-index: 2; }
.day-card.rest { background: var(--sun); color: #1C1B17; text-align: center; }
.day-card.today { border-color: var(--sun-deep); }
.day-card.rest.today { border-color: #fff; box-shadow: 0 0 0 2px var(--sun-deep); }
.day-card .wm { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-family: var(--font-display); font-weight: 700; font-size: 132px; color: transparent; -webkit-text-stroke: 1.4px rgba(255, 255, 255, .7); line-height: 1; letter-spacing: -.01em; }
.day-card .rest-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; position: relative; z-index: 1; padding: 8px 6px 20px; }
.day-card .rest-body svg { width: 38px; height: 38px; }
.day-card .rest-body h2 { font-family: var(--font-display); font-weight: 700; font-size: 40px; text-transform: uppercase; line-height: 1; }
.day-card .rest-body p { margin: 6px 0 0; font-size: 17px; line-height: 1.35; color: rgba(13, 13, 15, .74); font-weight: 500; }
.day-card.work { background: linear-gradient(170deg, var(--card-soft) 0%, var(--surface) 60%); color: var(--ink); justify-content: flex-end; box-shadow: var(--shadow); --fig-bg: transparent; }
.day-card.work.today { border-color: var(--sun-deep); }
.day-card.work .wday { position: absolute; top: 20px; left: 20px; background: var(--sun); color: #1C1B17; box-shadow: none; }
.day-card.work .media { position: absolute; inset: 0; }
.day-card.work .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.day-card.work .media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 38%, var(--surface) 64%); }
.day-card.work .fig-slot { flex: 1 1 0; min-height: 150px; position: relative; margin: 40px -6px 8px; }
.day-card.work .fig-slot .fig-box { position: absolute; inset: 0; margin: auto; height: 100%; width: auto; max-width: 100%; aspect-ratio: 4 / 3; background: transparent; border-radius: 0; }
.day-card.work .info-b { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.day-card.work .meta { display: flex; align-items: center; gap: 7px; font-size: 15px; color: var(--muted); font-weight: 600; }
.day-card.work .meta svg { width: 18px; height: 18px; }
.day-card.work h2 { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1; text-transform: uppercase; }
.day-card.work .btn { margin-top: 10px; }
.day-card .done-chip { position: absolute; top: 20px; right: 20px; z-index: 2; background: #E6F6DF; color: #245C12; font-weight: 800; font-size: 13px; padding: 7px 12px; border-radius: 999px; display: inline-flex; gap: 5px; align-items: center; }
.day-card .done-chip svg { width: 14px; height: 14px; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 18px; padding: 13px 20px; font-weight: 800; background: var(--accent); color: var(--accent-ink); min-height: 52px; transition: transform .12s ease, opacity .12s; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .4; cursor: default; }
.btn.block { width: 100%; }
.btn.sun { background: var(--sun); color: #1C1B17; }
.btn.caps { font-family: var(--font-display); font-weight: 600; font-size: 19px; text-transform: uppercase; letter-spacing: .01em; }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.line { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn.white { background: #fff; color: #1C1B17; }
.btn.dark { background: #1C1B17; color: #fff; }
.btn.water { background: var(--water); color: var(--water-ink); }
.btn.sm { min-height: 44px; padding: 8px 14px; font-size: 14px; border-radius: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.link { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--sun-deep); text-underline-offset: 4px; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.chip svg { width: 14px; height: 14px; }
.chip.accent { background: var(--sun-soft); color: var(--ink); }
.chip.sun { background: var(--sun); color: #1C1B17; }
.chip.sun-soft { background: var(--sun-soft); color: var(--warn); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.dark { background: #fff; color: #1C1B17; box-shadow: 0 2px 8px rgba(60, 48, 10, .1); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* нижнее меню */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar .inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tabbar-h); }
.tab { background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); position: relative; padding: 0; }
.tab svg { width: 26px; height: 26px; }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"]::after { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--sun-deep); }
.fab { position: fixed; z-index: 21; right: max(16px, calc(50% - 264px)); bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--sun); color: #1C1B17; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(160, 120, 0, .32); }
.fab svg { width: 28px; height: 28px; }

/* быстрый доступ */
.qa { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 18px; }
.qa-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 0; border: 0; background: none; text-align: left; border-top: 1px solid var(--line); }
.qa-item:first-child { border-top: 0; }
.qa-ic { width: 50px; height: 50px; border-radius: 16px; background: var(--sun-soft); color: var(--ink); display: grid; place-items: center; flex: none; }
.qa-ic svg { width: 24px; height: 24px; }
.qa-ic.sun { background: var(--sun); color: #1C1B17; }
.qa-item b { display: block; font-size: 17px; font-weight: 700; line-height: 1.25; }
.qa-item .sub2 { display: block; font-size: 14px; color: var(--muted); }
.qa-item .chev { margin-left: auto; width: 20px; height: 20px; flex: none; color: var(--ink); }

/* анимации упражнений */
.fig-box { background: var(--fig-bg); border-radius: 16px; aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.fig-box svg.fig, .fig-box video, .fig-box .fig-video { width: 100%; height: 100%; display: block; object-fit: cover; }
.dur-label { position: absolute; right: 10px; bottom: 10px; background: rgba(13, 13, 15, .78); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 8px; }
.fig-box .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(13, 13, 15, .78); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 8px; }
.fg, .fg-far { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fg { stroke: var(--fig); }
.fg-far { stroke: var(--fig-far); }
.fg-fill { fill: var(--fig); }
.pr-sun { fill: var(--sun-deep); }
.pr-sun-far { fill: var(--sun); opacity: .6; }
.pr-hole { fill: var(--ink); }
.pr-bar { stroke: var(--muted); stroke-width: 3; fill: none; stroke-linecap: round; }
.pr-mat { fill: var(--mat); }
.pr-floor { stroke: var(--line); stroke-width: 2.5; stroke-linecap: round; }
.pr-box { fill: var(--box); }
.pr-box-stroke { fill: none; stroke: var(--box); stroke-width: 4; stroke-linecap: round; }
.pr-band { stroke: var(--sun-deep); stroke-width: 3; fill: none; stroke-linecap: round; }
.pr-cable { stroke: var(--muted); stroke-width: 1.5; opacity: .7; }
.pr-palm { stroke: #2E9B63; stroke-width: 4; fill: none; stroke-linecap: round; }
.pr-palm-trunk { stroke: #A07A45; stroke-width: 5; fill: none; stroke-linecap: round; }
.pr-sunlight { fill: var(--sun); }
.pr-wave { stroke: #3A8FD0; stroke-width: 3; fill: none; stroke-linecap: round; }

/* блюда */
.dish, .dish-photo { width: 100%; display: block; aspect-ratio: 16 / 10; height: auto; object-fit: cover; }
.dish-bg.dish-sun { fill: #FFEA70; }
.dish-bg.dish-sun2 { fill: #FFDE00; }
.dish-bg.dish-sea { fill: #F7F0DB; }
.dish-bg.dish-sea2 { fill: #EFE4C4; }
.dish-leaf path { fill: rgba(120, 95, 20, .08); }
.thumb { width: 58px; height: 58px; border-radius: 16px; overflow: hidden; flex: none; }
.thumb .dish, .thumb .dish-photo { width: 100%; height: 100%; aspect-ratio: auto; }
.media-top { position: relative; }
.media-top .badge { position: absolute; left: 14px; top: 14px; }
.kcal-badge { position: absolute; right: 14px; bottom: 14px; background: var(--sun); color: #1C1B17; font-family: var(--font-display); font-weight: 600; font-size: 16px; padding: 5px 12px; border-radius: 12px; }

/* главная */
.plan-hero { position: relative; border-radius: 28px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.plan-hero .img { position: relative; display: block; width: 100%; border: 0; padding: 0; background: none; }
.plan-hero .img .dish, .plan-hero .img .dish-photo { aspect-ratio: 16 / 8; }
.pill-cur { position: absolute; left: 14px; top: 14px; background: #fff; color: #1C1B17; font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .14); }
.pill-cur svg { width: 16px; height: 16px; }
.plan-hero .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.kcal-big { font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: #3E8E28; transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.macro:nth-child(2) .bar i { background: var(--sun-deep); }
.macro:nth-child(3) .bar i { background: #CDBF97; }
.norm { display: grid; grid-template-columns: auto 1fr; gap: 6px 26px; align-items: center; }
.norm .kcal-big { font-size: 46px; }
.norm-list { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.norm-list > span { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding-bottom: 3px; }
.norm-list > span:last-child { border-bottom: 0; }
.norm-list b { font-variant-numeric: tabular-nums; }
.water-row { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.glass { aspect-ratio: 3 / 4; border-radius: 5px 5px 9px 9px; border: 2px solid var(--line); background: linear-gradient(to top, var(--sun) var(--fill, 0%), transparent var(--fill, 0%)); transition: background .3s; }
.water-val { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; width: 100%; }
.check-row:first-child { border-top: 0; }
.tick { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; transition: background .15s, border-color .15s, transform .25s cubic-bezier(.16, 1, .3, 1); background: var(--surface); position: relative; padding: 0; }
.tick::after { content: ""; position: absolute; inset: -9px; }
.tick svg { width: 14px; height: 14px; opacity: 0; }
.done .tick, .tick[aria-pressed="true"] { background: var(--sun); border-color: var(--sun); transform: scale(1.06); }
.done .tick svg, .tick[aria-pressed="true"] svg { opacity: 1; color: #1C1B17; }
.done .ttl { color: var(--muted); }
.check-row.done .thumb { opacity: .7; }
.meal-meta { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 1px; }
.tipcard { display: flex; gap: 14px; align-items: flex-start; background: var(--sun); color: #1C1B17; border-radius: var(--radius); padding: 18px; }
.tipcard .sunball { width: 40px; height: 40px; border-radius: 12px; background: #fff; flex: none; display: grid; place-items: center; color: #1C1B17; }
.tipcard .sunball svg { width: 20px; height: 20px; }
.tipcard b { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 19px; letter-spacing: .01em; }
.banner { display: flex; gap: 12px; align-items: center; border-radius: var(--radius); padding: 16px 18px; background: var(--surface); box-shadow: var(--shadow); }
.banner.warn { background: var(--warn-soft); box-shadow: none; }
.scroller { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.guide-card { flex: none; width: 178px; scroll-snap-align: start; border: 0; padding: 0; text-align: left; background: var(--surface); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.guide-card svg { display: block; width: 100%; height: 96px; }
.guide-card .gt { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.guide-card b { font-size: 14px; line-height: 1.3; }

/* тренировки */
.seg { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 16px; }
.seg button { flex: 1; min-width: 0; white-space: nowrap; border: 0; background: none; padding: 9px 6px; border-radius: 12px; font-weight: 800; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg button.cur::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--sun-deep); margin-left: 6px; vertical-align: 2px; }
.seg-lock svg { width: 13px; height: 13px; margin-left: 5px; vertical-align: -2px; }
.ex-card { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center; padding: 12px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); }
.ex-card .fig-box { border-radius: 14px; cursor: pointer; }
.ex-card .name { font-weight: 800; font-size: 16px; line-height: 1.25; background: none; border: 0; padding: 0; text-align: left; }
.ex-card .dose { font-family: var(--font-display); font-size: 16px; font-weight: 600; white-space: nowrap; margin-top: 2px; }
.ex-card.done { opacity: .6; }
.ex-card .foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.swapped { color: var(--warn); font-size: 12px; font-weight: 800; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.info { background: var(--surface); border-radius: 16px; padding: 12px 14px; font-size: 14px; }
.info b { display: block; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 2px; }
.info.bad { background: var(--sun-soft); }
.info.full { grid-column: 1 / -1; }
.alt { display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.alt:first-child { border-top: 0; }

/* библиотека упражнений */
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 20px; padding: 0 16px; box-shadow: var(--shadow); }
.search svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; background: none; padding: 16px 0; font-size: 17px; outline: none; min-width: 0; }
.search input::placeholder { color: var(--muted); }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-btn { display: flex; align-items: center; gap: 10px; border: 0; background: var(--surface); border-radius: 20px; padding: 16px; font-weight: 700; font-size: 16px; box-shadow: var(--shadow); text-align: left; min-width: 0; }
.filter-btn svg { width: 24px; height: 24px; flex: none; }
.filter-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-btn.on { background: var(--sun); color: #1C1B17; }
.lib-list { display: flex; flex-direction: column; gap: 10px; }
.lib-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 12px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); border: 0; text-align: left; width: 100%; }
.lib-item .fig-box { aspect-ratio: 1; border-radius: 16px; }
.lib-item b { display: block; font-size: 16px; line-height: 1.25; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.tag { font-size: 13px; background: var(--surface-2); color: var(--ink); padding: 3px 9px; border-radius: 9px; font-weight: 500; }
.info-ic { width: 26px; height: 26px; color: var(--ink); }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }

/* режим тренировки */
.player { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.player .inner { max-width: 520px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.player .fig-box { border-radius: 26px; background: var(--surface); }
.segs { display: flex; gap: 4px; }
.segs i { flex: 1; height: 5px; border-radius: 5px; background: var(--line); }
.segs i.on { background: var(--ink); }
.segs i.now { background: var(--sun-deep); }
.set-dots { display: flex; gap: 6px; }
.set-dots i { width: 28px; height: 8px; border-radius: 6px; background: var(--line); }
.set-dots i.on { background: var(--ink); }
.ring { width: 200px; height: 200px; margin: 6px auto; position: relative; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring .track { stroke: var(--line); }
.ring .prog { stroke: var(--sun-deep); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.ring .t { font-family: var(--font-display); font-size: 54px; font-weight: 600; }
.player .grow-space { flex: 1; }
.confetti { display: flex; justify-content: center; gap: 8px; }
.confetti i { width: 12px; height: 12px; border-radius: 3px; background: var(--sun); transform: rotate(20deg); }
.confetti i:nth-child(2n) { background: var(--ink); transform: rotate(-15deg); }

/* еда */
.plan-card { background: var(--surface); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.plan-card .img { position: relative; display: block; width: 100%; border: 0; padding: 0; background: none; }
.plan-card .img .dish, .plan-card .img .dish-photo { aspect-ratio: 16 / 10; }
.plan-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.plan-card .dur { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.plan-card .dur svg { width: 20px; height: 20px; }
.plan-card h2 { font-family: var(--font-display); font-weight: 700; font-size: 30px; text-transform: uppercase; line-height: 1.05; display: flex; align-items: center; gap: 10px; }
.plan-card h2 svg { width: 24px; height: 24px; flex: none; }
.macro-line { display: flex; flex-wrap: wrap; gap: 4px 0; color: var(--muted); font-size: 15px; }
.macro-line span + span::before { content: ""; display: inline-block; width: 1.5px; height: 16px; background: var(--line); margin: 0 10px; vertical-align: -3px; }
.plan-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.meal-card { background: var(--surface); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.meal-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.meal-card .items { display: flex; flex-direction: column; gap: 5px; }
.meal-card .item { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.meal-card .item b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.macro-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.macro-chips span { font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 9px; font-variant-numeric: tabular-nums; }
.macro-chips .p { background: #E6F6DF; color: #245C12; }
.macro-chips .f { background: var(--sun); color: #1C1B17; }
.macro-chips .c { background: var(--surface-2); color: var(--ink); }
.meta-line { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 600; }
.meta-line span { display: inline-flex; align-items: center; gap: 4px; }
.meta-line svg { width: 15px; height: 15px; }
.tip { font-size: 14px; background: var(--sun-soft); border-radius: 14px; padding: 10px 12px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.shop-group { display: flex; flex-direction: column; }
.shop-item { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; }
.shop-item:first-of-type { border-top: 0; }
.shop-item.done .ttl { color: var(--muted); text-decoration: line-through; }

/* чат */
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 40vh; }
.msg { display: flex; gap: 8px; align-items: flex-end; }
.msg.me { justify-content: flex-end; }
.ava { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ava.ai { background: var(--sun); color: #1C1B17; }
.ava.ai svg { width: 16px; height: 16px; }
.ava.coach { background: var(--sun); color: #1C1B17; }
.bubble { max-width: 82%; padding: 11px 14px; border-radius: 20px; white-space: pre-wrap; word-wrap: break-word; font-size: 15px; }
.msg.me .bubble { background: var(--sun); color: #1C1B17; border-bottom-right-radius: 6px; }
.msg.them .bubble { background: var(--surface); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.bubble.typing { color: var(--muted); }
.quick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick button { flex: none; border: 0; background: var(--surface); box-shadow: var(--shadow); border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 700; }
.composer { position: sticky; bottom: calc(var(--tabbar-h) + 8px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; align-items: flex-end; background: var(--surface); border-radius: 22px; padding: 6px 6px 6px 16px; box-shadow: 0 4px 18px rgba(0, 0, 0, .08); border: 1px solid var(--line); }
.composer textarea { flex: 1; border: 0; background: none; resize: none; max-height: 120px; min-height: 24px; padding: 9px 0; outline: none; }
.composer .btn { min-height: 44px; min-width: 44px; padding: 8px 12px; border-radius: 16px; }

/* формы */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 800; color: var(--muted); }
.input { width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 13px 14px; font-size: 16px; }
.input:focus { outline: none; border-color: var(--ink); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option { display: flex; align-items: center; gap: 12px; text-align: left; border: 2px solid transparent; background: var(--surface); border-radius: 22px; padding: 10px 14px 10px 10px; box-shadow: var(--shadow); }
.option[aria-pressed="true"] { border-color: var(--sun-deep); background: var(--sun); color: #1C1B17; }
.option[aria-pressed="true"] span.sub { color: rgba(13, 13, 15, .7); }
.option .fig-box { width: 76px; flex: none; border-radius: 14px; }
.option[aria-pressed="true"] .fig-box { background: rgba(255, 255, 255, .55); --fig: #1C1B17; }
.option b { display: block; }
.option span.sub { font-size: 13px; color: var(--muted); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { border: 0; background: var(--surface); box-shadow: var(--shadow); border-radius: 999px; padding: 10px 18px; font-weight: 800; font-size: 14px; }
.pill[aria-pressed="true"] { background: var(--sun); color: #1C1B17; }
.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checkline input { width: 20px; height: 20px; accent-color: var(--ink); margin-top: 1px; flex: none; }
.feature { display: flex; gap: 14px; align-items: center; }
.feature .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--sun-soft); color: var(--ink); }
.feature .ic svg { width: 22px; height: 22px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale button { border: 0; background: var(--surface-2); border-radius: 12px; padding: 10px 0; font-weight: 800; }
.scale button[aria-pressed="true"] { background: var(--sun); color: #1C1B17; }
.progressbar { height: 5px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progressbar i { display: block; height: 100%; background: var(--ink); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform .4s cubic-bezier(.16, 1, .3, 1); }
.error { color: #B3261E; font-size: 14px; font-weight: 700; }
.hero { position: relative; overflow: hidden; border-radius: 34px; padding: 22px; background: var(--sun); color: #1C1B17; }
.hero .muted { color: rgba(13, 13, 15, .7); }
.hero .fig-box { background: rgba(255, 255, 255, .55); --fig: #1C1B17; --mat: #fff; --line: rgba(13, 13, 15, .15); }

/* профиль */
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--sun); color: #1C1B17; display: grid; place-items: center; font-family: var(--font-display); font-size: 24px; font-weight: 700; flex: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted); }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge-it { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 6px; border-radius: 18px; background: var(--surface-2); }
.badge-it svg { width: 44px; height: 44px; }
.badge-it b { font-size: 12px; line-height: 1.25; }
.badge-it span { font-size: 11px; color: var(--muted); line-height: 1.25; }
.badge-it.off > *:not(b):not(span) { opacity: .5; }
.badge-it.off svg { filter: grayscale(1); }
.ref-card { background: var(--sun); color: #1C1B17; border-radius: 28px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.ref-card .muted { color: rgba(13, 13, 15, .72); }
.ref-link { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: rgba(255, 255, 255, .7); border-radius: 12px; padding: 9px 11px; word-break: break-all; }
.tariff { display: flex; flex-direction: column; gap: 12px; border: 1.5px solid var(--line); }
.tariff.featured { border: 3px solid var(--sun-deep); background: var(--card-soft); }
.tariff .price { font-family: var(--font-display); font-size: 32px; font-weight: 700; }
.tariff ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.methods { display: flex; flex-direction: column; gap: 8px; }

/* график */
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--sun); opacity: .55; }
.chart .pt { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.chart .pt.last { fill: var(--sun); stroke: var(--ink); }
.chart text { fill: var(--muted); font-size: 10px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.chart text.val { fill: var(--ink); font-weight: 800; font-size: 11px; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }

/* шторка */
.sheet-back { position: fixed; inset: 0; z-index: 55; background: rgba(40, 32, 8, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; background: var(--bg); border-radius: 30px 30px 0 0; padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px)); max-height: 92vh; overflow-y: auto; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 10px; }
.sheet .cover { margin: 0 -16px; }
.sheet .cover .dish, .sheet .cover .dish-photo { border-radius: 0; }
.sheet .fig-box { background: var(--surface); }
.guide-sec { display: flex; flex-direction: column; gap: 4px; }
.notice { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow); border: 0; text-align: left; width: 100%; }
.notice .qa-ic { width: 42px; height: 42px; border-radius: 13px; }
.notice .qa-ic svg { width: 20px; height: 20px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 92px + env(safe-area-inset-bottom, 0px)); z-index: 80; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-weight: 800; font-size: 14px; max-width: calc(100% - 32px); }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #1C1B17; background: var(--sun); padding: 3px 8px; border-radius: 6px; }
.loader { display: grid; place-items: center; min-height: 60vh; text-align: center; gap: 10px; }
.sunspin { width: 54px; height: 54px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 10px var(--sun-soft); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.85); box-shadow: 0 0 0 18px var(--sun-soft); } }

/* один авторский момент: экран мягко проявляется при переключении вкладки */
.screen-in { animation: screenIn .38s cubic-bezier(.16, 1, .3, 1); }
@keyframes screenIn { from { opacity: .4; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .sunspin, .screen-in { animation: none; }
  .btn:active, .tick[aria-pressed="true"], .done .tick { transform: none; }
  .bar i, .progressbar i, .ring .prog { transition: none; }
}

@media (max-width: 370px) {
  .macros, .stats { gap: 6px; }
  .topbar h1 { font-size: 22px; }
  .day-card .rest-body h2 { font-size: 32px; }
  .ex-card { grid-template-columns: 80px 1fr auto; }
  .filter-btn { font-size: 14px; padding: 14px 12px; }
}

/* прогресс на главной */
.pg { display: flex; flex-direction: column; gap: 16px; padding: 22px 20px; }
.pg-streak { display: flex; align-items: center; gap: 12px; }
.pg-streak svg { width: 38px; height: 38px; color: var(--ink); flex: none; }
.pg-streak b { font-family: var(--font-display); font-weight: 700; font-size: 56px; line-height: 1; }
.pg-streak span { font-size: 19px; font-weight: 700; line-height: 1.15; }
.pg-grid { display: grid; grid-template-columns: 30px repeat(7, 1fr); gap: 6px; align-items: center; }
.pg-h { text-align: center; font-size: 13px; color: var(--muted); font-weight: 600; }
.pg-w { font-size: 13px; color: var(--muted); font-weight: 600; }
.pg-w.cur { color: var(--ink); font-weight: 800; }
.pg-c { display: block; aspect-ratio: 1; border-radius: 12px; background: var(--surface-2); }
.pg-c.pre { background: transparent; border: 1.5px dashed var(--line); }
.pg-c.future { background: var(--surface-2); opacity: .7; }
.pg-c.rest { background: linear-gradient(140deg, #B6F0BE 0%, #45D66E 100%); }
.pg-c.work { background: linear-gradient(140deg, #FFF3A6 0%, #FFD400 100%); }
.pg-c.today { background: var(--surface); border: 2px solid var(--line); }
.pg-c.rest.today, .pg-c.work.today { border: 0; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.pg-c.rest.today { background: linear-gradient(140deg, #B6F0BE 0%, #45D66E 100%); }
.pg-c.work.today { background: linear-gradient(140deg, #FFF3A6 0%, #FFD400 100%); }
.pg-c.missed { background: repeating-linear-gradient(135deg, var(--surface-2) 0 5px, var(--line) 5px 6.5px); }
.pg-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 10px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 14px; color: var(--muted); font-weight: 600; }
.pg-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.pg-legend .pg-c { width: 18px; height: 18px; border-radius: 6px; }
.topbar h1.hello { font-size: 23px; line-height: 1.08; text-wrap: wrap; }
.topbar h1.hello .nw { white-space: nowrap; }

/* логотип SOMA: монолинейные буквы, O — солнце на горизонте */
.soma { display: block; width: 100%; height: auto; overflow: visible; }
.soma .so-s, .soma .so-o, .soma .so-m, .soma .so-a { fill: none; stroke: #1C1B17; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.soma .so-sun { fill: #fff; }
.soma .so-hz { fill: none; stroke: #1C1B17; stroke-width: 5; stroke-linecap: round; }
.logo { display: inline-block; width: 150px; }
.logo.lg { width: 220px; }

/* заставка при запуске: солнце превращается в плитку SOMA, буквы «штампуются», внутри O восходит солнце; пока грузится — плитка дышит, лучи вращаются */
.splash { position: fixed; inset: 0; z-index: 200; overflow: hidden; background: radial-gradient(90% 60% at 50% 44%, #FFF6C9 0%, #FBF7EC 62%, #F7F0DC 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; animation: spSafety .4s ease 9s forwards; }
.splash .sp-stage { margin-bottom: 34px; }
.splash:not(.go) * { animation-play-state: paused !important; }
.sp-stage { position: relative; width: min(168px, 44vw); aspect-ratio: 1; display: grid; place-items: center; }
.sp-rays { position: absolute; left: -45%; top: -45%; width: 190%; height: 190%; overflow: visible; opacity: 0; animation: spRaysIn .7s cubic-bezier(.16, 1, .3, 1) 1.3s forwards; }
.sp-rays g { transform-origin: 0 0; animation: spSpin 14s linear 1.3s infinite; }
.sp-rays path { stroke: #F2C200; stroke-width: 7; stroke-linecap: round; fill: none; }
.sp-tile { position: relative; width: 100%; height: 100%; background: #FFDE00; border-radius: 50%; overflow: hidden; transform: scale(0); box-shadow: 0 18px 44px rgba(214, 160, 0, .32), inset 0 -6px 0 rgba(0, 0, 0, .04);
  animation: spTile 1s cubic-bezier(.34, 1.45, .64, 1) .05s forwards, spBreathe 1.8s cubic-bezier(.45, 0, .55, 1) 2.2s infinite; }
.sp-word { position: absolute; inset: 0; width: 100%; height: 100%; }
.sp-l { fill: none; stroke: #1C1B17; stroke-width: 18; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.sp-s { animation: spDraw .55s cubic-bezier(.65, 0, .35, 1) .72s forwards; }
.sp-o { animation: spDraw .55s cubic-bezier(.65, 0, .35, 1) .84s forwards; }
.sp-m { animation: spDraw .5s cubic-bezier(.65, 0, .35, 1) .96s forwards; }
.sp-a { animation: spDraw .5s cubic-bezier(.65, 0, .35, 1) 1.08s forwards; }
.sp-sun { fill: #fff; transform: translateY(16px); animation: spRise .9s cubic-bezier(.34, 1.4, .64, 1) 1.3s forwards, spSunPulse 1.8s cubic-bezier(.45, 0, .55, 1) 2.2s infinite; }
.sp-hz { stroke: #1C1B17; stroke-width: 3.5; stroke-linecap: round; transform-box: fill-box; transform-origin: center; transform: scaleX(0); opacity: 0; animation: spHz .5s cubic-bezier(.16, 1, .3, 1) 1.2s forwards; }
.sp-shine { position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent); transform: skewX(-18deg) translateX(0); animation: spShine 2.4s cubic-bezier(.45, 0, .2, 1) 1.55s infinite; }
.sp-tag { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .34em; text-transform: uppercase; color: #6E6858; opacity: 0; transform: translateY(8px); animation: spTag .7s cubic-bezier(.16, 1, .3, 1) 1.5s forwards; }
.sp-load { width: 72px; height: 4px; border-radius: 4px; background: rgba(28, 27, 23, .08); overflow: hidden; opacity: 0; animation: spTag .5s ease 2.3s forwards; }
.sp-load i { display: block; width: 40%; height: 100%; border-radius: 4px; background: #F2C200; animation: spLoad 1.1s cubic-bezier(.65, 0, .35, 1) infinite; }
.splash.out { animation: spIris .75s cubic-bezier(.76, 0, .24, 1) forwards; }
.splash.out .sp-stage { transition: transform .75s cubic-bezier(.76, 0, .24, 1); transform: scale(1.18); }
@keyframes spTile { 0% { transform: scale(0); border-radius: 50%; } 30% { transform: scale(.2); border-radius: 50%; } 55% { transform: scale(.2); border-radius: 50%; } 100% { transform: scale(1); border-radius: 24%; } }
@keyframes spBreathe { 0%, 100% { transform: scale(1); border-radius: 24%; } 50% { transform: scale(1.035); border-radius: 24%; } }
@keyframes spDraw { from { stroke-dashoffset: 1; opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes spRise { to { transform: translateY(0); } }
@keyframes spSunPulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes spLine { to { transform: scaleX(1); } }
@keyframes spHz { from { opacity: 1; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }
@keyframes spRaysIn { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
@keyframes spSpin { to { transform: rotate(360deg); } }
@keyframes spShine { 0% { transform: skewX(-18deg) translateX(0); } 45%, 100% { transform: skewX(-18deg) translateX(520%); } }
@keyframes spTag { to { opacity: 1; transform: none; } }
@keyframes spLoad { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
@keyframes spIris { from { clip-path: circle(150% at var(--ox, 50%) var(--oy, 50%)); } to { clip-path: circle(0 at var(--ox, 50%) var(--oy, 50%)); } }
@keyframes spSafety { to { opacity: 0; visibility: hidden; } }
@keyframes spFadeOut { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .splash * { animation: none !important; }
  .sp-tile { transform: none; border-radius: 24%; }
  .sp-l { stroke-dashoffset: 0; opacity: 1; }
  .sp-sun, .sp-hz, .sp-rays, .sp-tag, .sp-load { transform: none; opacity: 1; }
  .sp-shine { display: none; }
  .splash.out { animation: spFadeOut .25s ease forwards; }
  .splash.out .sp-stage { transform: none; }
}
.day-card .wm .logo { width: 88%; }
.day-card .wm .so-s, .day-card .wm .so-o, .day-card .wm .so-m, .day-card .wm .so-a { stroke: rgba(255, 255, 255, .75); stroke-width: 2.5; }
.day-card .wm .so-sun { fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 2.5; }
.day-card .wm .so-hz { stroke: rgba(255, 255, 255, .75); stroke-width: 2.5; }

/* готовые планы питания */
.rp-card { background: var(--surface); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.rp-open { display: block; width: 100%; border: 0; padding: 0; background: none; text-align: center; }
.rp-cover { position: relative; background: var(--surface-2); padding-top: 34px; overflow: hidden; }
.rp-cover.big { border-radius: 28px; }
.rp-wm { position: absolute; left: -4%; right: -4%; top: 6px; opacity: .55; pointer-events: none; }
.rp-wm .logo { width: 100%; }
.logo.wm-dark .so-s, .logo.wm-dark .so-o, .logo.wm-dark .so-m, .logo.wm-dark .so-a, .logo.wm-dark .so-hz { stroke: var(--line); stroke-width: 2; }
.logo.wm-dark .so-sun { fill: none; stroke: var(--line); stroke-width: 2; }
.rp-badge { position: relative; z-index: 2; width: 74%; margin: 0 auto -54px; background: var(--sun); color: #1C1B17; border-radius: 22px; padding: 16px 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 10px 24px rgba(160, 120, 0, .22); }
.rp-badge svg { width: 30px; height: 30px; }
.rp-badge b { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1; text-transform: uppercase; }
.rp-badge span { font-size: 13px; font-weight: 600; color: rgba(28, 27, 23, .75); }
.rp-img .dish, .rp-img .dish-photo { aspect-ratio: 16 / 9; }
.rp-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.rp-card .dur { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.rp-card .dur svg { width: 20px; height: 20px; }
.rp-card p { margin: 0; color: var(--muted); font-size: 15px; }

/* полноэкранная страница (план, гид) */
.page { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; animation: pageIn .38s cubic-bezier(.16, 1, .3, 1); }
@keyframes pageIn { from { transform: translateX(24px); opacity: .5; } }
.page-top { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.page-top h1 { font-family: var(--font-display); font-weight: 700; font-size: 24px; text-transform: uppercase; text-align: center; line-height: 1.1; }
.back-btn { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); display: grid; place-items: center; padding: 0; }
.back-btn svg { width: 20px; height: 20px; }
.page-body { max-width: 560px; margin: 0 auto; padding: 8px 16px calc(40px + env(safe-area-inset-bottom, 0px)); }

.mp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mp-stats div { background: var(--surface); border-radius: 18px; padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.mp-stats b { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.1; }
.mp-stats span { font-size: 12px; color: var(--muted); }
.mp-week { position: relative; display: flex; justify-content: center; align-items: center; margin-top: 8px; scroll-margin-top: 80px; }
.mp-pill { display: inline-flex; align-items: center; gap: 10px; background: var(--sun); color: #1C1B17; font-family: var(--font-display); font-weight: 700; font-size: 26px; text-transform: uppercase; padding: 10px 24px; border-radius: 18px; }
.mp-pill svg { width: 26px; height: 26px; }
.mp-count { position: absolute; left: 0; background: var(--surface); box-shadow: var(--shadow); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; }
.mp-days { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.mp-days::-webkit-scrollbar { display: none; }
.mp-days button { flex: none; border: 0; background: var(--surface); box-shadow: var(--shadow); border-radius: 14px; padding: 10px 14px; font-family: var(--font-display); font-weight: 600; font-size: 16px; text-transform: uppercase; color: var(--muted); }
.mp-days button[aria-pressed="true"] { background: var(--sun); color: #1C1B17; }
.mp-daycard { background: var(--surface); border-radius: 20px; padding: 14px 16px; text-align: center; box-shadow: var(--shadow); }
.mp-daycard h2 { font-family: var(--font-display); font-weight: 700; font-size: 28px; text-transform: uppercase; line-height: 1.1; }
.mp-daycard span { font-size: 13px; color: var(--muted); font-weight: 600; }
.mp-meal { background: var(--surface); border-radius: 24px; padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.mp-meal.snack { background: var(--surface-2); box-shadow: none; }
.mp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mp-head h3 { font-family: var(--font-display); font-weight: 700; font-size: 32px; text-transform: uppercase; line-height: 1; }
.mp-kcal { font-weight: 800; font-size: 13px; background: var(--sun); color: #1C1B17; padding: 4px 10px; border-radius: 10px; white-space: nowrap; }
.mp-dish { font-size: 14px; color: var(--muted); font-weight: 600; margin-top: -2px; }
.mp-items { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.mp-it { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.mp-it span { min-width: 0; }
.mp-it small { display: block; font-size: 12px; color: var(--muted); }
.mp-it b { font-weight: 500; color: var(--muted); white-space: nowrap; }
.mp-how { font-size: 13px; color: var(--muted); line-height: 1.45; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.mp-how b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }
.mp-macro { font-size: 12px; color: var(--muted); font-weight: 700; }
.mp-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* аккордеон вопросов */
.faq { background: var(--surface-2); border-radius: 20px; }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 16px 16px 20px; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 19px; text-transform: uppercase; line-height: 1.2; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { position: relative; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--sun); }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2.5px; margin: -1.25px 0 0 -7px; border-radius: 2px; background: #1C1B17; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.faq summary i::after { transform: rotate(90deg); }
.faq[open] summary i::after { transform: rotate(0); }
.faq-a { padding: 0 20px 18px; font-size: 15px; line-height: 1.55; color: var(--ink); }
.faq[open] { background: var(--surface); box-shadow: var(--shadow); }

/* гид по питанию */
.guide-page { display: flex; flex-direction: column; gap: 30px; }
.guide-page section { scroll-margin-top: 80px; }
.gp-h { font-family: var(--font-display); font-weight: 700; font-size: 34px; text-transform: uppercase; line-height: 1.05; margin-bottom: 10px; }
.gp-lead { font-size: 17px; line-height: 1.55; margin: 0 0 6px; }
.gp-sub { font-family: var(--font-display); font-weight: 700; font-size: 24px; text-transform: uppercase; line-height: 1.1; margin: 20px 0 6px; }
.gp-sub span { color: #8A6A00; }
.guide-page p { font-size: 16px; line-height: 1.6; margin: 0; }
.gp-note { display: flex; gap: 10px; align-items: flex-start; background: var(--sun-soft); border-radius: 18px; padding: 14px 16px; margin-top: 18px; font-size: 14px; font-weight: 600; }
.gp-note svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.guide-ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.55; }
.guide-ol li::marker { font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .page { animation: none; } .faq summary i::before, .faq summary i::after { transition: none; } }

/* регион */
.region-seg button { font-size: 15px; padding: 10px 6px; }
.region-seg button[aria-pressed="true"] { background: var(--sun); color: #1C1B17; box-shadow: none; }

/* другие тренировки */
.xw-row { gap: 12px; }
.xw-card { flex: none; width: 272px; scroll-snap-align: start; background: var(--surface); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.xw-img { height: 150px; background: linear-gradient(160deg, var(--card-soft), var(--surface-2)); position: relative; }
.xw-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xw-img .fig-box { height: 100%; width: auto; aspect-ratio: 4 / 3; margin: 0 auto; background: transparent; border-radius: 0; }
.xw-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.xw-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 24px; text-transform: uppercase; line-height: 1.05; }
.xw-card .tags { margin-top: 0; }
.xw-card .btn { margin-top: auto; }
.xw-meta { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.xw-meta svg { width: 18px; height: 18px; flex: none; }

/* сообщество */
.comm { background: var(--sun); color: #1C1B17; border-radius: 34px; padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.comm-art { position: relative; height: 170px; margin: 0 -4px 4px; }
.cm-tile { position: absolute; top: 14px; width: 42%; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 10px 22px rgba(90, 70, 0, .22); display: flex; flex-direction: column; justify-content: center; }
.cm-tile .fig-box, .cm-tile .dish { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; background: #FFF8D6; --fig: #1C1B17; }
.cm-tile.c0 { left: 0; transform: rotate(-7deg); }
.cm-tile.c1 { left: 29%; top: 0; z-index: 2; transform: rotate(2deg); }
.cm-tile.c2 { right: 0; transform: rotate(7deg); background: #1C1B17; color: #fff; padding: 14px; justify-content: flex-end; align-items: flex-end; text-align: right; gap: 2px; }
.cm-tile.c2 b { font-family: var(--font-display); font-size: 22px; text-transform: uppercase; }
.cm-tile.c2 small { color: rgba(255, 255, 255, .7); font-size: 12px; }
.cm-tile.c2 svg { position: absolute; top: 14px; right: 14px; left: auto; width: 26px; height: 26px; color: var(--sun); }
.cm-bubble { position: absolute; left: 8px; top: 8px; display: flex; gap: 2px; background: #fff; border-radius: 12px; padding: 4px 6px; box-shadow: 0 3px 8px rgba(0, 0, 0, .12); }
.cm-bubble svg { width: 16px; height: 16px; color: #E8412C; }
.cm-stat { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 10px; padding: 4px 8px; font-weight: 800; font-size: 13px; box-shadow: 0 3px 8px rgba(0, 0, 0, .12); }
.cm-stat svg { width: 14px; height: 14px; color: #E8412C; }
.cm-stat.s0 { right: 26%; bottom: 26px; }
.cm-stat.s1 { right: 22%; bottom: -2px; }
.comm h2 { font-family: var(--font-display); font-weight: 700; font-size: 28px; text-transform: uppercase; line-height: 1.05; }
.comm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 16px; font-weight: 600; }
.comm-list li { display: flex; gap: 12px; align-items: flex-start; }
.cm-ic { width: 34px; height: 34px; border-radius: 11px; background: rgba(255, 255, 255, .6); display: grid; place-items: center; flex: none; }
.cm-ic svg { width: 18px; height: 18px; }
.btn.dark svg { width: 20px; height: 20px; }

/* бонусные программы */
.pr-card { background: var(--surface); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.pr-art { position: relative; display: block; width: 100%; height: 190px; border: 0; padding: 0; background: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 1.5px) 0 0 / 14px 14px, var(--surface-2); overflow: hidden; }
.pr-art.big { height: 230px; border-radius: 28px; }
.pr-tile { position: absolute; top: 26px; width: 38%; aspect-ratio: 3 / 4; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 22px rgba(60, 48, 10, .14); }
.pr-tile .fig-box { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; background: #fff; }
.pr-tile.t0 { left: 6%; transform: rotate(-6deg); }
.pr-tile.t1 { left: 31%; top: 14px; z-index: 2; width: 38%; background: var(--sun); }
.pr-tile.t1 .fig-box { background: var(--sun); --fig: #1C1B17; --mat: #fff; }
.pr-tile.t2 { right: 6%; transform: rotate(6deg); }
.pr-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.pr-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 28px; text-transform: uppercase; line-height: 1.05; }
.pr-card p { margin: 0; color: var(--muted); font-size: 15px; }
.pr-point { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.pr-point svg { width: 18px; height: 18px; flex: none; margin-top: 2px; padding: 3px; border-radius: 6px; background: var(--sun); color: #1C1B17; box-sizing: content-box; }
.pr-ex { width: 100%; border: 0; background: none; padding: 0; text-align: left; }

/* личный кабинет */
.acc-head { display: flex; gap: 16px; align-items: center; padding: 6px 2px; }
.avatar.big { width: 76px; height: 76px; font-size: 34px; }
.acc-h { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 2px -6px; }
.acc-note { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border-radius: 16px; padding: 12px 14px; font-size: 13px; line-height: 1.45; }
.acc-note svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.sw-list { padding: 4px 18px; }
.sw-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.sw-list .sw-row:first-child { border-top: 0; }
.card.stack .sw-row { border-top: 1px solid var(--line); padding: 12px 0; }
.sw-row b { display: block; font-size: 15px; }
.sw-row small { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.switch:checked { background: var(--sun-deep); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.consent svg { width: 16px; height: 16px; flex: none; padding: 4px; border-radius: 8px; background: #3E8E28; color: #fff; box-sizing: content-box; margin-top: 1px; }
.consent .link { font-weight: 700; }
.qa-item.danger b { color: #B3261E; }
.qa-item.danger .qa-ic { background: #FDE7E4; color: #B3261E; }
.btn.danger { background: #B3261E; color: #fff; }
.acc-link { width: 100%; border: 0; text-align: left; align-items: center; }
.acc-link .chev { width: 20px; height: 20px; flex: none; margin-left: auto; }
.acc-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 10px 0 4px; line-height: 1.7; }
@media (prefers-reduced-motion: reduce) { .switch, .switch::after { transition: none; } }

/* ---------- питание: заголовки разделов с подписью ---------- */
.sec-head { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.sec-head h2 { font-size: 20px; font-weight: 800; line-height: 1.2; }
.sec-head p { margin: 0; font-size: 14px; color: var(--muted); }
.page.still { animation: none; }

/* ---------- «Съела другое» ---------- */
.x-thumb { display: grid; place-items: center; background: var(--sun-soft); color: var(--ink); }
.x-thumb svg { width: 26px; height: 26px; }
.x-del { flex: none; width: 36px; height: 36px; border-radius: 12px; border: 0; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; padding: 0; position: relative; }
.x-del::after { content: ""; position: absolute; inset: -4px; }
.x-del svg { width: 18px; height: 18px; }
.x-del:active { transform: scale(.94); }
.x-add { margin-top: 2px; }
.food-pick { cursor: pointer; }
.food-pick svg { width: 20px; height: 20px; }
.food-photo { position: relative; border-radius: 20px; overflow: hidden; background: var(--surface-2); }
.food-photo img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.x-del.on-img { position: absolute; top: 10px; right: 10px; background: rgba(28, 27, 23, .6); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.food-res { display: flex; flex-direction: column; gap: 12px; }
.food-kcal { display: flex; align-items: baseline; gap: 10px; }
.food-kcal input { width: 150px; font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1; padding: 8px 12px; }
.food-kcal span { font-size: 16px; font-weight: 800; color: var(--muted); }
.food-items { display: flex; flex-direction: column; gap: 6px; }
.food-it { display: grid; grid-template-columns: 1fr 78px 14px; align-items: center; gap: 8px; font-size: 15px; }
.food-it input { padding: 8px 10px; font-size: 15px; text-align: right; border-radius: 12px; }

/* ---------- цикл ---------- */
.cyc-card { padding: 0; overflow: hidden; --ph: var(--sun-deep); }
.cyc-card.phase-menstrual { --ph: #E07A63; }
.cyc-card.phase-follicular { --ph: #4FAE3A; }
.cyc-card.phase-luteal { --ph: #C8961E; }
.cyc-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border: 0; background: none; text-align: left; }
.cyc-head b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 18px; text-transform: uppercase; line-height: 1.15; }
.cyc-head .sub2 { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.cyc-head .chev { width: 20px; height: 20px; flex: none; transform: rotate(90deg); transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.cyc-head[aria-expanded="true"] .chev { transform: rotate(-90deg); }
.cyc-ring { width: 46px; height: 46px; flex: none; }
.cyc-ring circle + circle { stroke: var(--ph, var(--sun-deep)); }
.cyc-ring text { font-family: var(--font-display); font-weight: 700; font-size: 15px; fill: var(--ink); }
.cyc-body { padding: 0 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.cyc-tip { display: flex; gap: 12px; align-items: flex-start; background: var(--card-soft); border-radius: 16px; padding: 12px; }
.cyc-tip .qa-ic { width: 38px; height: 38px; border-radius: 12px; }
.cyc-tip .qa-ic svg { width: 20px; height: 20px; }
.cyc-tip b { font-size: 14px; }
.cyc-tip p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; }
.cyc-body .link { align-self: flex-start; }
.card.stack > .sw-row:first-child { border-top: 0; padding-top: 0; }
.cyc-step { display: flex; align-items: center; gap: 12px; }
.cyc-step b { display: block; font-size: 15px; }
.cyc-step small { display: block; font-size: 12px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 14px; padding: 4px; }
.stepper button { width: 40px; height: 40px; border: 0; border-radius: 11px; background: var(--surface); font-size: 20px; font-weight: 800; box-shadow: var(--shadow); }
.stepper button[disabled] { opacity: .35; }
.stepper b { min-width: 34px; text-align: center; font-family: var(--font-display); font-size: 20px; }
.cyc-now { display: flex; gap: 12px; align-items: center; background: var(--card-soft); border-radius: 16px; padding: 10px 12px; }
.cyc-now b { display: block; font-size: 14px; }
.cyc-now small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
input[type="date"].input { min-height: 50px; }

/* ---------- отчёт недели ---------- */
.report-card { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; text-align: left; background: var(--sun); color: #1C1B17; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.report-card .rc-ic { width: 46px; height: 46px; border-radius: 14px; background: #fff; display: grid; place-items: center; flex: none; }
.report-card .rc-ic svg { width: 24px; height: 24px; }
.report-card b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 20px; text-transform: uppercase; line-height: 1.1; }
.report-card span span, .report-card .grow > span { display: block; font-size: 14px; margin-top: 2px; }
.report-card .chev { width: 20px; height: 20px; flex: none; }
.rw-nav { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 8px; }
.rw-arrow { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--ink); padding: 0; }
.rw-arrow svg { width: 20px; height: 20px; }
.rw-arrow[disabled] { opacity: .3; box-shadow: none; }
.rw-title { text-align: center; display: flex; flex-direction: column; }
.rw-title b { font-family: var(--font-display); font-weight: 700; font-size: 24px; text-transform: uppercase; line-height: 1.1; }
.rw-title span { font-size: 13px; color: var(--muted); }
.rw-loading { display: flex; justify-content: center; }
.rw-loading .sunspin { width: 28px; height: 28px; box-shadow: 0 0 0 6px var(--sun-soft); }
.rw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rs { background: var(--surface); border-radius: 20px; padding: 14px 12px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rs b { font-family: var(--font-display); font-weight: 700; font-size: 36px; line-height: 1; white-space: nowrap; }
.rs b small { font-size: 18px; color: var(--muted); font-weight: 600; }
.rs span { font-size: 12px; line-height: 1.3; color: var(--muted); }
.rs.sun { background: var(--sun); color: #1C1B17; }
.rs.sun b small, .rs.sun span { color: rgba(28, 27, 23, .7); }
.rw-health { display: flex; flex-direction: column; gap: 8px; }
.rw-stats.three .rs b { font-size: 28px; }
.rw-chart-box svg { width: 100%; height: auto; display: block; }
.rw-chart .kb { fill: var(--sun); }
.rw-chart .kb.over { fill: var(--sun-deep); }
.rw-chart .kb.empty { fill: var(--line); }
.rw-chart .norm { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 4 4; opacity: .7; }
.rw-chart text { fill: var(--muted); font-size: 11px; font-family: var(--font-body); font-weight: 700; }
.rw-chart .norm-t { font-size: 10px; font-weight: 600; }
.rw-chart text.wd.ok { fill: var(--ink); }
.rw-chart .wk.done { fill: #3E8E28; }
.rw-chart .wk.miss { fill: none; stroke: #D1573F; stroke-width: 2; }
.rw-chart .wk.plan { fill: none; stroke: var(--line); stroke-width: 2; }
.rw-chart .drop { fill: #58A6D8; }
.rw-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.rw-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rw-legend i { display: inline-block; }
.rw-legend .lg-bar { width: 10px; height: 12px; border-radius: 3px; background: var(--sun); }
.rw-legend .lg-norm { width: 14px; border-top: 1.5px dashed var(--muted); }
.rw-legend .lg-dot { width: 10px; height: 10px; border-radius: 50%; background: #3E8E28; }
.rw-legend .lg-miss { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #D1573F; box-sizing: border-box; }
.rw-legend svg { width: 12px; height: 12px; color: #58A6D8; }
.rw-best { display: flex; gap: 10px; align-items: flex-start; background: var(--sun-soft); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.rw-best svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--warn); }
.rw-coach { display: flex; flex-direction: column; gap: 6px; }
.rw-coach-h { display: flex; gap: 12px; align-items: center; margin-bottom: 4px; }
.rw-coach-h .qa-ic { width: 42px; height: 42px; border-radius: 14px; }
.rw-coach-h .qa-ic svg { width: 20px; height: 20px; }
.rw-coach-h b { display: block; font-size: 16px; }
.rw-coach-h .tiny { display: block; }
.rw-coach h4 { margin: 8px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 17px; text-transform: uppercase; letter-spacing: .01em; }
.rw-coach ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.rw-coach li { font-size: 15px; line-height: 1.45; }
.rw-coach li::marker { color: var(--sun-deep); }
.rw-coach p { margin: 0; font-size: 15px; }
@media (max-width: 360px) { .rs b { font-size: 30px; } .rw-title b { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { .cyc-head .chev { transition: none; } }

/* ---------- восстановление (WHOOP / Apple Watch) ---------- */
.rec-card { --ph: #4FAE3A; }
.rec-card.lv-medium { --ph: #E3A815; }
.rec-card.lv-low { --ph: #E07A63; }
.rec-card.lv-unknown { --ph: var(--line); }
.rec-ring circle + circle { stroke: var(--ph); }
.rec-advice { font-size: 14.5px; line-height: 1.5; background: var(--card-soft); border-radius: 16px; padding: 12px 14px; border-left: 4px solid var(--ph); }
.rec-factors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rec-f { background: var(--surface-2); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rec-f span { font-size: 12px; color: var(--muted); font-weight: 600; }
.rec-f b { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.rec-f small { font-size: 12px; color: var(--muted); }
.rec-f small.good { color: #3E8E2E; }
.rec-f small.low { color: #C4553E; }
.rec-bars { display: flex; align-items: flex-end; gap: 4px; height: 54px; padding-top: 4px; }
.rec-bars i { flex: 1; border-radius: 5px 5px 3px 3px; background: #7CC46A; min-height: 4px; }
.rec-bars i.medium { background: #F2C94C; }
.rec-bars i.low { background: #EE9A86; }
.rec-bars i.none { background: var(--line); }
.dev-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dev-row .grow { min-width: 150px; }
.dev-row b { display: block; font-size: 15px; }
.dev-row small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.dev-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.dev-ic.whoop { background: #1C1B17; color: #FFDE00; }
.dev-ic.apple { background: #FFE8E3; color: #E0533C; }
.dev-ic svg { width: 22px; height: 22px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rec-f small.good { color: #8FD27E; }
  :root:not([data-theme="light"]) .rec-f small.low { color: #F2A08C; }
  :root:not([data-theme="light"]) .dev-ic.whoop { background: #FFDE00; color: #1C1B17; }
  :root:not([data-theme="light"]) .dev-ic.apple { background: #3A2622; color: #FF8A73; }
}
.dev-act { display: flex; gap: 8px; }
@media (max-width: 440px) { .dev-row:has(.dev-act) .dev-act { width: 100%; padding-left: 56px; } .dev-act .btn { flex: 1; } }

/* ---------- десктоп (≥1024 px): боковое меню, две колонки, окна по центру ---------- */
.side-nav { display: none; }
@media (min-width: 1024px) {
  :root { --side-w: 256px; --tabbar-h: 0px; }
  body { background: radial-gradient(1100px 560px at 62% -180px, var(--bg-glow) 0%, transparent 70%) no-repeat, var(--bg); }
  .side-nav { display: flex; flex-direction: column; gap: 4px; position: fixed; z-index: 30; top: 0; left: 0; bottom: 0; width: var(--side-w); padding: 30px 18px 20px; background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-right: 1px solid var(--line); overflow-y: auto; }
  .sn-logo { padding: 0 12px 26px; }
  .sn-logo .logo { width: 128px; }
  .sn-list { display: flex; flex-direction: column; gap: 4px; }
  .sn-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 0; border-radius: 14px; background: none; color: var(--muted); font: 700 15px/1.2 var(--font-body); text-align: left; cursor: pointer; transition: background .15s, color .15s; }
  .sn-item svg { width: 22px; height: 22px; flex: none; }
  .sn-item:hover { background: var(--surface-2); color: var(--ink); }
  .sn-item[aria-current="page"] { background: var(--sun); color: #1C1B17; box-shadow: 0 6px 16px rgba(200, 150, 0, .22); }
  .sn-item:focus-visible, .sn-me:focus-visible { outline: 3px solid var(--sun-deep); outline-offset: 2px; }
  .sn-sep { height: 1px; background: var(--line); margin: 12px 10px; }
  .sn-me { margin-top: auto; display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
  .sn-me .avatar { width: 40px; height: 40px; flex: none; }
  .sn-me b { display: block; font-size: 14px; line-height: 1.2; }
  .sn-me small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
  .sn-me .chev { width: 18px; height: 18px; flex: none; color: var(--muted); }

  .tabbar, .fab { display: none; }
  main.app { max-width: calc(1180px + var(--side-w)); margin: 0 auto; padding: 30px 44px 64px calc(var(--side-w) + 44px); }
  main.app.tab-coach, main.app.tab-lib { max-width: calc(980px + var(--side-w)); }
  main.app .topbar { padding-bottom: 6px; }
  main.app .topbar h1 { font-size: 34px; }
  main.app .topbar .ava-btn { display: none; }
  .dash { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); gap: 28px; align-items: start; }
  .dash > .stack { min-width: 0; }
  .card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .lib-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
  main.app .scroller, main.app .carousel { margin: 0; padding-left: 0; padding-right: 0; scroll-padding: 0; }
  main.app .day-card { width: calc(100% - 64px); min-height: 400px; }
  .dash-side .scroller { margin: 0 -2px; }

  /* шторки — окна по центру, страницы — справа от меню */
  .sheet-back { align-items: center; padding: 32px; }
  .sheet { max-width: 620px; border-radius: 30px; max-height: calc(100vh - 64px); }
  .page { left: var(--side-w); }
  .page-body { max-width: 820px; }
  .toast { left: calc(50% + var(--side-w) / 2); bottom: 32px; }
  .composer { bottom: 20px; }

  /* наведение — только на устройствах с мышью */
  .qa-item, .guide-card, .xw-card, .pr-card, .plan-card, .rp-card, .report-card { transition: transform .18s cubic-bezier(.16, 1, .3, 1), box-shadow .18s; }
  .guide-card:hover, .xw-card:hover, .plan-card:hover, .rp-card:hover, .report-card:hover { transform: translateY(-2px); }
}
@media (min-width: 1024px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sn-logo .soma .so-s, :root:not([data-theme="light"]) .sn-logo .soma .so-o,
  :root:not([data-theme="light"]) .sn-logo .soma .so-m, :root:not([data-theme="light"]) .sn-logo .soma .so-a,
  :root:not([data-theme="light"]) .sn-logo .soma .so-hz { stroke: var(--ink); }
}
@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  .sn-item, .qa-item, .guide-card, .xw-card, .pr-card, .plan-card, .rp-card, .report-card { transition: none; }
  .guide-card:hover, .xw-card:hover, .plan-card:hover, .rp-card:hover, .report-card:hover { transform: none; }
}
@media (min-width: 1024px) {
  .dash .plan-hero { display: grid; grid-template-columns: minmax(220px, 38%) minmax(0, 1fr); }
  .dash .plan-hero .img { height: 100%; }
  .dash .plan-hero .img .dish, .dash .plan-hero .img .dish-photo { aspect-ratio: auto; height: 100%; min-height: 100%; }
  .dash .plan-hero .body { padding: 20px 22px 22px; }
}

/* ---------- фото блюд из стоков ---------- */
.dish-ph { position: relative; display: block; overflow: hidden; }
.dish-ph > .dish-photo { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; background: var(--surface-2); }
.thumb .dish-ph, .rp-img .dish-ph { height: 100%; }
.mp-ph { margin: -18px -20px 4px; border-radius: 24px 24px 0 0; overflow: hidden; }
.mp-ph .dish { aspect-ratio: 16 / 8; }
@media (min-width: 1024px) { .dash .plan-hero .img .dish-ph { height: 100%; } }

/* ---------- правки по итогам QA: доступность и удобство ---------- */
html { scroll-padding-bottom: calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom, 0px)); scroll-padding-top: 16px; }
:root { --control-line: #B8AF96; --danger: #B3261E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --control-line: #6A6456; --danger: #FF8A73; } }
:root[data-theme="dark"] { --control-line: #6A6456; --danger: #FF8A73; }
.tick, .glass { border-color: var(--control-line); }
.qa-item.danger b { color: var(--danger); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.search:focus-within, .composer:focus-within { box-shadow: 0 0 0 2px var(--ink); }
.sheet:focus, .player:focus, #page:focus { outline: none; }
/* всплывающие сообщения — сверху, не закрывают кнопки внизу */
.toast { top: auto; bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); z-index: 120; box-shadow: 0 10px 28px rgba(0, 0, 0, .18); }
/* чат с тренером — буква-аватар, ИИ — звёздочка на круглой кнопке */
.icon-btn.coach-ava span { font-family: var(--font-display); font-weight: 700; font-size: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); color: #1C1B17; display: grid; place-items: center; }
/* день отдыха не занимает весь первый экран */
.day-card.rest { min-height: 300px; }
/* кнопки режима тренировки всегда видны даже в маленьком окне Telegram */
.pl-actions { position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; background: linear-gradient(to top, var(--bg) 75%, transparent); }
.scale-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; padding: 0 4px; }
@media (min-width: 1024px) { .toast { bottom: 28px; } }
.pl-actions .row .btn { min-width: 0; }

/* ---------- логотип-плитка SOMA (как на заставке) ---------- */
.logo-tile { display: inline-block; flex: none; width: 56px; aspect-ratio: 1; background: #FFDE00; border-radius: 24%; box-shadow: 0 8px 22px rgba(214, 160, 0, .22), inset 0 -3px 0 rgba(0, 0, 0, .04); vertical-align: middle; }
.logo-tile svg { display: block; width: 100%; height: 100%; }
.logo-tile .lt-l { fill: none; stroke: #1C1B17; stroke-width: 18; stroke-linecap: round; stroke-linejoin: round; }
.logo-tile .lt-sun { fill: #fff; }
.logo-tile .lt-hz { fill: none; stroke: #1C1B17; stroke-width: 3.5; stroke-linecap: round; }
.logo-tile.sm { width: 40px; }
.logo-tile.md { width: 72px; }
.sn-logo { display: flex; align-items: center; gap: 12px; }
.sn-brand { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: .08em; color: var(--ink); }
/* верх фото SOMA — пустой камень (место под текст), поэтому при обрезке держим в кадре тарелку */
.dish-photo { object-position: 50% 62%; }
