/* Главный экран сфер (S01) и экран сферы (S02) разбора v2, блок 2 (ТЗ v2 раздел 2, п. 1–5).
   Только страница сайта (index.html): мини-апп этот файл не подключает. Цвета — токены pl-vars.css. */

/* --- сцена: картина или запасной фон за экраном --- */
#scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--pl-bg); }
#scene .sc-move { position: absolute; inset: -56px 0 -8px; transform: translate3d(0, calc(var(--py, 0px) * -1), 0); will-change: transform; }
#scene .sc-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 900ms ease; }
#scene .sc-layer.on { opacity: 1; }
#scene .sc-paint, #scene .sc-img { position: absolute; inset: 0; }
#scene .sc-paint { background: var(--holst); }
#scene .sc-img { background: center / cover no-repeat; opacity: 0; transition: opacity 600ms ease; }
#scene .sc-layer.has-img .sc-img { opacity: 1; }
#scene .sc-layer.on .sc-img, #scene .sc-layer.on .sc-paint { animation: sc-zoom 24s ease-in-out infinite alternate; }
#scene .sc-shade { position: absolute; inset: 0; background: rgba(11, 14, 12, var(--shade)); }
#scene canvas.pl-bg-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
@keyframes sc-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
/* still — reduced-motion: статичный кадр (режима lite «слабый телефон» нет с RV3-P1a) */
#scene[data-motion="still"] .sc-move { transform: none; will-change: auto; }
#scene[data-motion="still"] .sc-layer.on .sc-img, #scene[data-motion="still"] .sc-layer.on .sc-paint { animation: none; }
#scene[data-motion="still"] .sc-layer, #scene[data-motion="still"] .sc-img { transition: none; }

/* экраны поверх сцены (S01, S02, опросник — `body[data-scene]` ставит scene.attach): фон страницы прозрачный */
body[data-screen="s02"], body[data-scene] { background: transparent; }
body[data-screen="s01"] #app, body[data-screen="s02"] #app, body[data-scene] #app { z-index: 1; }
#scene.cut .sc-layer, #scene.cut .sc-img { transition: none; }
/* ветка B главной (RV3-AB2): атрибуты ставит только scene.zoomTrack / vzlom при ветке B, вид A их не получает.
   data-zoom — слои ведёт прокрутка (scene.zoomFrame пишет transform и opacity в кадре): без переходов, покой 24 с
   не идёт (зум прокрутки и медленный зум не складываются в рывок). data-glide — отъезд к масштабу главной (назад с S02)
   и к 1 (уход в опросник). data-vzlom — короткое приближение к символу при выборе. .sc-vzlom — холст трещин под затемнением. */
#scene[data-zoom] .sc-layer { transition: none; }
#scene[data-zoom] .sc-layer .sc-img, #scene[data-zoom] .sc-layer .sc-paint { animation: none; }
#scene[data-zoom] .sc-layer.zm { will-change: transform, opacity; }
#scene[data-glide] .sc-layer { transition: transform 600ms cubic-bezier(.3, .1, .3, 1), opacity 900ms ease; }
#scene[data-zoom][data-glide] .sc-layer { transition: transform 600ms cubic-bezier(.3, .1, .3, 1), opacity 300ms ease; }
#scene[data-vzlom] .sc-layer { transition: transform 380ms cubic-bezier(.2, .7, .3, 1), opacity 150ms ease; }
#scene canvas.sc-vzlom { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
#scene[data-vzlom=""] .sc-shade { opacity: .55; }   /* до S02; со встающим S02 затемнение возвращается (data-vzlom="s02") */
#scene[data-zoom] .sc-shade { transition: opacity 350ms ease; }
#scene .sc-sled { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#scene .sc-sled path { fill: none; stroke: rgba(236, 239, 232, .22); stroke-width: 1px; vector-effect: non-scaling-stroke; }
/* опросник ветки B (RV3-AB2b; data-quiz ставит scene.quizB только при ветке B): одна картина сферы от S02 до S11/S12 тем
   кадром, каким кончился взлом, — без медленного зума покоя: трещины стоят на картине. Лист на границе блока несёт тот же
   слой сферы со следом трещин (у вида A следа в слое нет). */
#scene[data-quiz] .sc-layer .sc-img, #scene[data-quiz] .sc-layer .sc-paint { animation: none; }
/* трещины растут (.sc-rost — холст в слое сферы, класс .sc-sled), свет растущих концов (.sc-svet — временный холст окна);
   раскол S11: слой делится на куски .sc-kus (копии под clip-path), сам слой под ними скрыт, куски расходятся transform-ом;
   вспышка .sc-vspyshka — над затемнением, под текстом. data-raskol="konec" — конечный кадр без переходов. */
#scene[data-quiz] canvas.sc-svet { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
#scene[data-quiz] .sc-layer[data-raskol] > :not(.sc-kus) { visibility: hidden; }
#scene[data-quiz] .sc-kus { position: absolute; inset: 0; transition: transform 600ms cubic-bezier(.2, .7, .3, 1); will-change: transform; }
#scene[data-quiz][data-raskol="konec"] .sc-kus { transition: none; will-change: auto; }
#scene[data-quiz] .sc-vspyshka { position: absolute; left: calc(var(--vx) - 220px); top: calc(var(--vy) - 220px);
  width: 440px; height: 440px; pointer-events: none; opacity: 0;
  background: radial-gradient(circle closest-side, rgba(255, 248, 232, .42) 0, rgba(255, 248, 232, .1) 45%, transparent 100%);
  animation: sc-vspyshka 700ms ease-out forwards; }
@keyframes sc-vspyshka { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }
.sc-leaf .sc-sled { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sc-leaf .sc-sled path { fill: none; stroke: rgba(236, 239, 232, .22); stroke-width: 1px; vector-effect: non-scaling-stroke; }

/* --- опросник (разбор v2, блок 3): лист книги на границе блока ---
   Лист — копия экрана на фоне уходящего блока; сгиб от корешка (rotateY с перспективой) и тень по
   краю, только transform и opacity. Вперёд корешок слева, назад — справа. `data-flat` — после
   медленного листа (медиана кадра > 33 мс): сдвиг без тени. still листа не строит (scene.turn). */
.sc-leaf { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; perspective: 2200px; }
.sc-leaf .sheet { position: absolute; inset: 0; overflow: hidden; background: var(--pl-bg); transform-origin: 0 50%;
  backface-visibility: hidden; will-change: transform; box-shadow: 0 0 48px rgba(0, 0, 0, .55);
  animation: sc-turn var(--turn-ms, 700ms) cubic-bezier(.5, .05, .3, 1) forwards; }
.sc-leaf .sheet::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .55) 100%);
  animation: sc-turn-shade var(--turn-ms, 700ms) ease-in forwards; }
.sc-leaf[data-dir="back"] .sheet { transform-origin: 100% 50%; animation-name: sc-turn-back; }
.sc-leaf[data-dir="back"] .sheet::after { background: linear-gradient(270deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .55) 100%); }
.sc-leaf .sheet > .sc-layer { position: absolute; inset: -56px 0 -8px; transform: translate3d(0, calc(var(--py, 0px) * -1), 0); }
.sc-leaf .sc-paint, .sc-leaf .sc-img { position: absolute; inset: 0; }
.sc-leaf .sc-paint { background: var(--holst); }
.sc-leaf .sc-img { background: center / cover no-repeat; opacity: 0; }
.sc-leaf .has-img .sc-img { opacity: 1; }
.sc-leaf .sheet > .sc-shade { position: absolute; inset: 0; background: rgba(11, 14, 12, var(--shade, .72)); }
.sc-leaf-page { position: relative; z-index: 1; }
/* Подписи на сцене (опросник: дорожка этапов, «←», строка над вопросом, края шкалы, «Сложно сказать», .quiet;
   S01/S02: «←» и подписи сферы): --pl-muted эталона на худшем (белом) пикселе картины под затемнением 72 % — 3.15:1;
   светлее — от 4.5:1 (замер proba.py RV3-1, на S02 — RV3-2). */
body[data-blok] #app, body[data-scene] #app, body[data-screen="s01"] #app, body[data-screen="s02"] #app,
.sc-leaf-page { --pl-muted: #C4CCC5; }
@keyframes sc-turn { from { transform: rotateY(0); } to { transform: rotateY(-100deg); } }
@keyframes sc-turn-back { from { transform: rotateY(0); } to { transform: rotateY(100deg); } }
@keyframes sc-turn-shade { from { opacity: 0; } to { opacity: 1; } }
.sc-leaf[data-flat] .sheet { box-shadow: none; animation-name: sc-slide; animation-timing-function: ease-in; }
.sc-leaf[data-flat][data-dir="back"] .sheet { animation-name: sc-slide-back; }
.sc-leaf[data-flat] .sheet::after { display: none; }
@keyframes sc-slide { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-100%, 0, 0); } }
@keyframes sc-slide-back { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(100%, 0, 0); } }

/* --- S05 «Энергия сейчас» (блок 3): пояснение под заголовком и 4 уровня списком, текущий ярче --- */
.s05-title + .s05-sub { margin-top: -10px; }
/* PRM-2810-5 (ТЗ 28.10 Р-3, вариант Б): уровень — строка с полоской слева во всю высоту текста, название над описанием,
   между строками разделитель 1 px. Свой — полоска и название салатовые, текст обычной яркости; остальные — полоска тоном
   тусклой зоны шкалы (.levelbar .zones i.dim: зона .18), название белое, текст приглушённый (--pl-muted). */
.s05-levels { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; font-size: var(--pl-fs-sm); line-height: 1.4; }
.s05-levels li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 9px 0 9px 14px; color: var(--pl-muted); }
.s05-levels li + li { border-top: 1px solid var(--pl-line); }
.s05-levels li::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 2px;
  background: rgba(var(--pl-accent-rgb), .18); }
.s05-lv-name { font-weight: 600; color: var(--pl-text); }
.s05-lv-here { font-weight: 400; }
.s05-levels li.cur { color: var(--pl-text); }
.s05-levels li.cur::before { background: rgb(var(--pl-accent-rgb)); }
.s05-levels li.cur .s05-lv-name { color: rgb(var(--pl-accent-rgb)); }
/* Строка под карточкой «Лучше всего держится» (письмо 578, 3б): абзацем сразу под карточкой, вне её */
.s05-best-line { margin: -10px 0 0; font-size: var(--pl-fs-sm); line-height: 1.45; color: var(--pl-text); }
/* Появление по очереди (О-4, 3а; `renderIA`): шаг ~500 мс, весь показ ≤ 3,5 с; только opacity и transform —
   место элементов занято с первого кадра, на 390 px ничего не прыгает. Линия (шаг 2) прорисовывается слева
   направо: зоны раскрываются по одной (`--i`). still (reduced-motion) — всё сразу. */
#app[data-ia] [data-ia-step] { animation: ia-in 450ms ease-out var(--d) both; }
#app[data-ia] [data-ia-step="1"] { --d: 0ms; }
#app[data-ia] [data-ia-step="2"] { --d: 500ms; }
#app[data-ia] [data-ia-step="3"] { --d: 1150ms; }
#app[data-ia] [data-ia-step="4"] { --d: 1650ms; }
#app[data-ia] [data-ia-step="5"] { --d: 2150ms; }
#app[data-ia] [data-ia-step="6"] { --d: 2650ms; }
#app[data-ia] .levelbar .zones i[data-ia-step] { transform-origin: 0 50%;
  animation: ia-draw 300ms linear calc(var(--d) + var(--i, 0) * 120ms) both; }
#app[data-ia] .levelbar .marker[data-ia-step] { animation-name: ia-lit; }
/* зоны выше текущей приглушены (`.dim`, opacity .18 компонента 13): прорисовка — только transform (до RV3-P1a
   режим lite «слабый телефон» показывал их затуханием до `--zo`) */
#app[data-ia="still"] [data-ia-step], #app[data-ia="still"] .levelbar .zones i[data-ia-step] { animation: none; }
@keyframes ia-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ia-draw { from { transform: scaleX(0); } to { transform: none; } }
@keyframes ia-lit { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }

/* --- S01: вступление и карточки ---
   Цвета надписей прямо на сцене (не на карточке) — светлые: контраст ≥ 4.5:1 на худшем пикселе картины
   под затемнением 72 % (замер `proba.py`); токены --pl-dust и --pl-muted на белом пикселе дают 3.45 и 3.15. */
#app.sfery { max-width: 560px; padding-top: 0; }
.sfery .intro { min-height: 78svh; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: 48px 0 32px; }
.sfery .intro .eyebrow { font: 600 var(--pl-fs-cap)/1.3 var(--pl-font-head); letter-spacing: .08em; text-transform: uppercase; color: rgb(178, 232, 214); }
.sfery .intro h1 { font: 700 34px/1.15 var(--pl-font-head); margin: 0; max-width: 15ch; }
.sfery .intro .lead { color: var(--pl-text); font-size: var(--pl-fs-body); max-width: 34ch; margin: 0; }
.sfery .hint { width: 22px; height: 34px; border: 1.5px solid rgba(236, 239, 232, .5); border-radius: 12px; position: relative; margin-top: 18px; }
.sfery .hint::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--pl-text); animation: sc-hint 1.6s ease-in-out infinite; }
@keyframes sc-hint { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }

.sfery .spheres { display: flex; flex-direction: column; gap: 22vh; padding: 6vh 0 24vh; grid-template-columns: none; }
.sfery .sphere-card {
  position: relative; display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 16px; row-gap: 6px;
  align-items: center; padding: 20px; min-height: 132px; border-radius: var(--pl-r-card);
  background: rgba(17, 21, 18, .66); border: 1px solid rgba(236, 239, 232, .14); color: var(--pl-text); text-align: left;
  opacity: 0; transform: translateY(28px) scale(.98);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(.2, .7, .2, 1), border-color 300ms ease, box-shadow 300ms ease;
}
.sfery .sphere-card.on { opacity: 1; transform: none; }
.sfery .sphere-card.cur { border-color: rgba(var(--pl-accent-rgb), .38); }
.sfery .sphere-card.lit, .sfery .sphere-card:focus-visible {
  border-color: rgba(var(--pl-accent-rgb), .6); outline: none;
  box-shadow: 0 0 0 1px rgba(var(--pl-accent-rgb), .22), 0 0 32px rgba(86, 188, 162, .28);
}
/* плитка значка — `.tile.t-accent` (components.css, свечение снизу); в файле значка только знак (RV3-2 ч. 2) */
.sfery .sphere-card .zn { grid-row: 1 / span 2; }
.sfery .sphere-card .zn img { width: 28px; height: 28px; display: block; }
.sfery .sphere-card b { font: 600 22px/1.2 var(--pl-font-head); align-self: end; }
.sfery .sphere-card span { font-size: var(--pl-fs-sm); line-height: 1.4; color: var(--pl-text); opacity: .86; align-self: start; }
.sfery .sphere-card canvas.sc-glow { position: absolute; left: -10px; top: -10px; pointer-events: none; }
.sfery .foot { padding-bottom: 24px; color: rgb(214, 218, 210); }

@media (min-width: 900px) {
  #app.sfery { max-width: 640px; }
  .sfery .intro h1 { font-size: 46px; }
  .sfery .sphere-card { min-height: 150px; padding: 26px; }
}

/* --- S01 · главная по макету владельца (ТЗ приёмки 26.10, п. 1; RV4-P1a, решение 3; класс home-b — вид B для всех,
   решение 697). Фон — тёмный, за карточками один холст сети точек `canvas.rz-fon` (PL.grow), картины на весь экран нет.
   Свёрнутая карточка — полоса: значок, имя, шеврон. Раскрытая — картина сферы внутри карточки (`--kart`, только у этой
   карточки), затемнение `::after` 0,62, текст на стекле `.glass`; раскрытие — рост строки сетки 0fr → 1fr за 400 мс на месте.
   `.cut` — открыть или закрыть без перехода (app.js openCard, назад с опросника). --- */
body[data-screen="s01"] { background: var(--pl-bg); }
canvas.rz-fon { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
/* петля «Где ты» (iA, S11) — поверх общей сети и под карточками (решение 4) */
#app > canvas.rz-nad { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
:root:has(#app.sfery.home-b) { overflow-anchor: none; }
.sfery.home-b .intro { min-height: 44svh; }
/* Блок «Откуда 8 сфер» (SFERY-3010, решение 743): текст выше 44svh — от верха экрана, без пустоты над ним; стрелка под
   текстом говорит, что ниже сферы; последняя строка («Не знаешь, с чего начать?…») — у самих сфер. */
.sfery.home-b .intro.origin { min-height: 0; justify-content: flex-start; gap: 12px; padding: 28px 0 0; }
.sfery.home-b .intro.origin h1 { font-size: 30px; max-width: 16ch; }
.sfery.home-b .intro.origin .lead { max-width: 38ch; line-height: 1.45; }
.sfery.home-b .intro.origin .hint { margin-top: 4px; }
.sfery.home-b .s01-pick { margin: 18px 0 0; max-width: 34ch; font: 600 var(--pl-fs-body)/1.4 var(--pl-font-head); color: rgb(178, 232, 214); }
/* Блок над сферами на «жидком стекле» (RZB-3010-2, Д-2, решения 746, 748): тем же стилем, что нижняя панель приложения
   (`ma-vid.css` `#tabbar`, PRM-2810-7) — те же значения переменными `--glass-*`: фон .6, рамка .07, радиус 26, блик
   по верхнему краю (тень внутрь 1 px), две мягкие тени, размытие 18 px с усилением цвета 1.4; отступ 22 / 20 px.
   Ч. 1–3 — `.s01-glass` в `.intro.origin.glass`; ч. 4 — `.s01-glass.s01-how` поменьше, прямо над сферами. Без
   backdrop-filter, при «уменьшить прозрачность» и «уменьшить движение» — та же карточка без размытия, фон .92
   (признака «слабый телефон» нет — решение 668). Фон с сетью (`canvas.rz-fon`) не тронут. Разметка — `renderS01()`. */
.sfery.home-b { --glass-bg: rgba(14, 18, 16, .6); --glass-solid: rgba(14, 18, 16, .92); --glass-line: rgba(255, 255, 255, .07);
  --glass-r: 26px; --glass-blur: blur(18px) saturate(1.4);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 2px 8px rgba(0, 0, 0, .28), 0 14px 44px rgba(0, 0, 0, .5); }
.sfery.home-b .s01-glass { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; padding: 22px 20px;
  border: 1px solid var(--glass-line); border-radius: var(--glass-r); background: var(--glass-bg); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.sfery.home-b .intro.origin.glass { padding-top: 20px; }
.sfery.home-b .intro.origin.glass .hint { margin: 6px 0 0 20px; }
.sfery.home-b .s01-glass .s01-sub { margin: 10px 0 0; font: 700 22px/1.2 var(--pl-font-head); color: var(--pl-text); max-width: 20ch; }
.sfery.home-b .s01-how { gap: 8px; margin: 18px 0 0; padding: 20px; }
.sfery.home-b .s01-how p { margin: 0; max-width: 38ch; font-size: var(--pl-fs-body); line-height: 1.45; color: var(--pl-text); }
.sfery.home-b .s01-how .s01-pick { margin: 4px 0 0; color: rgb(178, 232, 214); }
/* Подводка (KC-0611-R2): три строки и одна яркая кнопка на том же стекле. `a` — в `.intro.origin.glass` под заголовком
   вместо ч. 1–3, инструкция — одной строкой `.pv-kak`; `b` — своим стеклом `.s01-pv` над нынешним экраном. Без них
   (`net`) этих классов на странице нет. */
.sfery.home-b .s01-glass .pv-poluchish { margin: 0; max-width: 34ch; font: 600 19px/1.35 var(--pl-font-head); color: var(--pl-text); }
.sfery.home-b .s01-glass .pv-verit { margin: 0; max-width: 38ch; font: 600 var(--pl-fs-body)/1.4 var(--pl-font-head); color: rgb(178, 232, 214); }
.sfery.home-b .s01-glass .pv-vnutri { margin: 0; max-width: 38ch; font-size: var(--pl-fs-body); line-height: 1.45; color: var(--pl-text); }
.sfery.home-b .s01-glass .pv-go { margin-top: 6px; box-shadow: 0 0 0 1px rgba(var(--pl-accent-rgb), .3), 0 0 28px rgba(var(--pl-accent-rgb), .32); }
.sfery.home-b .s01-pv { margin-top: 20px; }
.sfery.home-b .pv-kak { margin-top: 14px; }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sfery.home-b .s01-glass { background: var(--glass-solid); }
}
@media (prefers-reduced-transparency: reduce), (prefers-reduced-motion: reduce) {
  .sfery.home-b .s01-glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-solid); }
}
.sfery.home-b .spheres { gap: 12px; padding: 2svh 0 14svh; }
.sfery.home-b .sphere-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column;
  min-height: 0; padding: 0; background: rgba(17, 21, 18, .72); opacity: 1; transform: none; scroll-margin-top: 12px;
  -webkit-tap-highlight-color: transparent; transition: border-color 400ms ease, box-shadow 400ms ease; }
.sfery.home-b .sphere-card::before, .sfery.home-b .sphere-card::after { content: ""; position: absolute; inset: 0; z-index: -1;
  pointer-events: none; opacity: 0; transition: opacity 400ms ease; }
.sfery.home-b .sphere-card::before { background: none; }   /* PRO-0811-1e (838): картины сферы в карточке нет */
.sfery.home-b .sphere-card::after { background: rgba(11, 14, 12, .62); }
.sfery.home-b .sphere-card.open::before, .sfery.home-b .sphere-card.open::after { opacity: 1; }
.sfery.home-b .sphere-card.open { border-color: rgba(var(--pl-accent-rgb), .6);
  box-shadow: 0 0 0 1px rgba(var(--pl-accent-rgb), .22), 0 0 32px rgba(86, 188, 162, .28); }
.sfery.home-b .sc-head { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 16px;
  margin: 0; border: 0; background: none; color: var(--pl-text); text-align: left; cursor: pointer; border-radius: inherit; }
.sfery.home-b .sc-head:focus-visible { outline: 1.5px solid var(--pl-accent); outline-offset: -4px; }
.sfery.home-b .sc-head .zn { flex: none; }
.sfery.home-b .sphere-card b { flex: 1; min-width: 0; align-self: center; font: 600 20px/1.2 var(--pl-font-head);
  transition: font-size 400ms ease; }
.sfery.home-b .sphere-card.open b { font-size: 26px; }
.sfery.home-b .sc-chev { flex: none; width: 10px; height: 10px; margin-right: 4px; border: solid var(--pl-text);
  border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); transition: transform 400ms ease; opacity: .8; }
.sfery.home-b .sphere-card.open .sc-chev { transform: translateY(2px) rotate(-135deg); }
.sfery.home-b .sc-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 400ms cubic-bezier(.2, .7, .2, 1); }
.sfery.home-b .sphere-card.open .sc-more { grid-template-rows: 1fr; }
.sfery.home-b .sc-more-in { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
  padding: 0 14px; opacity: 0; transition: opacity 400ms ease, padding 400ms ease; }
.sfery.home-b .sphere-card.open .sc-more-in { opacity: 1; padding: 4px 14px 16px; }
.sfery.home-b .sc-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border-radius: calc(var(--pl-r-card) - 4px); }
.sfery.home-b .sc-body .sfera-about { margin: 0; }
.sfery.home-b ul.sfera-pain { margin: 0; padding: 0 0 0 18px; gap: 6px; }
.sfery.home-b ul.sfera-pain li { font-size: 16px; line-height: 1.45; color: var(--pl-text); }
.sfery.home-b ul.sfera-pain li::marker { color: rgb(var(--pl-accent-rgb)); }
.sfery.home-b .sc-more-in .btn { width: 100%; }
.sfery.home-b .sc-small { margin: -6px 0 0; font-size: 13px; line-height: 1.4; color: #FFFFFF; text-align: center; }
.sfery.home-b .sc-small + .sc-small { margin-top: -10px; }
.sfery.home-b .sc-more-in .error { margin: 0; }
.sfery.home-b .sphere-card.cut, .sfery.home-b .sphere-card.cut::before, .sfery.home-b .sphere-card.cut::after,
.sfery.home-b .sphere-card.cut b, .sfery.home-b .sphere-card.cut .sc-chev,
.sfery.home-b .sphere-card.cut .sc-more, .sfery.home-b .sphere-card.cut .sc-more-in { transition: none; }
/* Картины заранее (RV4-P1g, решение 6; Б-1; app.js kartPump): `kart-wait` — файл ещё не пришёл, у раскрытой карточки
   заглушка цвета сферы (тон — дальний край scene.js TONES; под затемнением `::after` 0,62 текст
   карточки ≥ 4.5:1), картины нет; `kart-ok` — картина декодирована и проявляется поверх за 0,3 с. Карточка без файлов —
   без классов, как прежде. */
.sfery.home-b .sphere-card[data-sphere="energy"] { --ton: #33505e; }
.sfery.home-b .sphere-card[data-sphere="emotions"] { --ton: #5a3540; }
.sfery.home-b .sphere-card[data-sphere="willpower"] { --ton: #2f4458; }
.sfery.home-b .sphere-card[data-sphere="relationships"] { --ton: #5a3328; }
.sfery.home-b .sphere-card[data-sphere="calling"] { --ton: #3d4a2c; }
.sfery.home-b .sphere-card[data-sphere="finance"] { --ton: #4a3a1e; }
.sfery.home-b .sphere-card[data-sphere="meaning"] { --ton: #2e3658; }
.sfery.home-b .sphere-card[data-sphere="time"] { --ton: #24463f; }
.sfery.home-b .sphere-card.kart-wait, .sfery.home-b .sphere-card.kart-ok {
  transition: border-color 400ms ease, box-shadow 400ms ease, background-color 400ms ease; }
.sfery.home-b .sphere-card.open.kart-wait, .sfery.home-b .sphere-card.open.kart-ok { background-color: var(--ton, rgb(17, 21, 18)); }
.sfery.home-b .sphere-card.open.kart-wait::before { opacity: 0; }
.sfery.home-b .sphere-card.kart-ok::before { transition-duration: 300ms; }
@media (prefers-reduced-motion: reduce) {
  .sfery.home-b .sc-more, .sfery.home-b .sc-more-in, .sfery.home-b .sphere-card::before, .sfery.home-b .sphere-card::after,
  .sfery.home-b .sphere-card b, .sfery.home-b .sc-chev, .sfery.home-b .sphere-card.kart-ok::before,
  .sfery.home-b .sphere-card.kart-wait, .sfery.home-b .sphere-card.kart-ok { transition: none; }
}

/* S02 · шар-сфера со знаком над заголовком (RV3-2 ч. 2, PL.shar): размер задан до запуска канваса — раскладка не сдвигается.
   72 px, зазор над шаром втянут (-14 — вплотную под шапкой; частицы в 2–3 px от края канваса): «Начать» ниже «до» на 70 px,
   а не на 134 (ответ на В-1). Верхний отступ `#app` занят липкой шапкой, 96 px без наложения на шапку и заголовок дают 96. */
.s02-shar { width: 72px; height: 72px; margin: -14px 0 -2px -3px; flex: none; }
.s02-shar canvas { width: 72px; height: 72px; display: block; }

/* reduced-motion: карточки видны сразу, без сдвига и подсказки прокрутки */
@media (prefers-reduced-motion: reduce) {
  .sfery .sphere-card { opacity: 1; transform: none; transition: none; }
  .sfery .hint::after { animation: none; }
}

/* --- S02: экран сферы --- */
/* 16/1.45 и зазор 6 px; кнопку «Начать» в первом экране 390×844 держат и отступы S02 ниже (RV3-4) */
.sfera-pain { display: flex; flex-direction: column; gap: 6px; }
.sfera-pain p { margin: 0; font-size: 16px; line-height: 1.45; color: var(--pl-text); }
/* Описание сферы над тезисами (письмо 578, 2а): не крупнее тезисов, отделено чертой акцента слева */
.sfera-about { margin: 0; padding-left: 10px; border-left: 2px solid rgba(var(--pl-accent-rgb), .7);
  font-size: 15px; line-height: 1.45; color: var(--pl-text); }
body[data-screen="s02"] #app .card { background: rgba(17, 21, 18, .7); }
/* Кнопка «Начать» в первом экране 390×844 и с описанием сферы (решение 9 RV3-4): поле сверху 56 → 32 и шаг
   между блоками 20 → 14; кегль и тексты прежние. */
body[data-screen="s02"] #app[data-look="pl"] { padding-top: 32px; gap: 14px; }

/* --- Стекло поверх картин (RV3-P1b, Р-3 и Р-9 одним решением): один класс плашки `.glass`, токены — pl-vars.css.
   Только экраны со сценой (`body[data-scene]`; мини-апп этот файл не подключает). С backdrop-filter — размытие,
   полупрозрачная заливка и подсветка верхнего края; без него — сплошная тёмная заливка той же формы. Без SVG-фильтров;
   стекло не выключается по устройству (668 п. 1). reduce — те же плашки, переходы снимает site.css. --- */
body[data-scene] .glass, body[data-screen="s01"] .glass { background: var(--pl-glass-solid); border: 1px solid var(--pl-glass-edge);
  box-shadow: inset 0 1px 0 var(--pl-glass-hi), 0 8px 24px rgba(0, 0, 0, .28); }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  body[data-scene] .glass, body[data-screen="s01"] .glass { background: var(--pl-glass-bg);
    -webkit-backdrop-filter: blur(var(--pl-glass-blur)) saturate(1.15); backdrop-filter: blur(var(--pl-glass-blur)) saturate(1.15); }
}
/* «Где ты» (iA; RV4-P1b, решение 4; ТЗ п. 6): карточка — стекло без размытия, петля видна сквозь неё целиком;
   заливка подобрана под контраст текста ≥ 4.5:1 на самом светлом пикселе фона (замер — runs/RV4-P1b/report.md) */
body[data-scene] .insert.glass.ia-skvoz { background: rgba(12, 16, 13, .7); -webkit-backdrop-filter: none; backdrop-filter: none; }
/* затемнение опросника — отдельное значение (`--shade-quiz`, scene.js SHADE_QUIZ) */
body[data-blok] #scene .sc-shade { background: rgba(11, 14, 12, var(--shade-quiz, .82)); }

/* --- Экраны вопросов по макету владельца (ТЗ приёмки 26.10, п. 5; RV4-P1g, решения 1, 3, 4). Вопрос — без плашки, прямо
   на сети точек: 27 px / 600, белый, мягкая тень под буквами против ярких точек сети (контраст — runs/RV4-P1g/report.md);
   пояснение и строки над ответами — 14 px приглушённые. Ответы — кнопки другого вида, чем вопрос: блок уже вопроса на 7 px с
   каждой стороны, ≥ 48 px, радиус 14, заливка белым 5 %, рамка салатовая 35 %, текст 15 px, слева кружок 18 px, между
   ответами 10 px; выбранный — салатовая заливка #b6f04a, тёмный текст, галочка в кружке. «Сложно сказать» — ссылкой под
   ответами. Шкала q01 — кнопки тем же видом. Разметка `choiceHtml` общая с мини-аппом — правка только здесь (мини-апп
   sfery.css не подключает). --- */
/* Локальное затемнение сети под вопросом (решение 1: тень одна не держит 4.5:1 — яркая точка сети ложится прямо под букву,
   замер proba-kontrast.txt): тёмное облако без рамки и углов, края растворяются маской — сеть вокруг видна, под текстом
   приглушена. */
body[data-scene] section.q { position: relative; isolation: isolate; }
body[data-scene] section.q::before { content: ""; position: absolute; inset: -32px -24px; z-index: -1; pointer-events: none;
  background: rgba(11, 14, 12, var(--q-ten, .8));
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 32px, #000 calc(100% - 32px), transparent),
    linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 32px, #000 calc(100% - 32px), transparent),
    linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  mask-composite: intersect; }
body[data-scene] section.q .q-text, body[data-scene] section.q .statement { margin: 0; padding: 0; border: 0; border-radius: 0;
  background: none; color: #FFFFFF; font: 600 27px/1.22 var(--pl-font-head);
  text-shadow: 0 1px 2px rgba(11, 14, 12, .9), 0 0 14px rgba(11, 14, 12, .85); }
body[data-scene] section.q > .cap, body[data-scene] section.q > .q-hint { margin: -8px 0 0; font-size: 14px; line-height: 1.4;
  color: #C9D1CA; text-shadow: 0 1px 2px rgba(11, 14, 12, .9), 0 0 10px rgba(11, 14, 12, .85); }
body[data-scene] section.q > .cap + .cap, body[data-scene] section.q > .cap + .q-hint, body[data-scene] section.q > .q-hint + .cap {
  margin-top: -12px; }
body[data-scene] section.q > [data-card-ask] { margin-top: 0; }
body[data-scene] section.q > [data-opts] { padding: 0 7px; gap: 10px; }
body[data-scene] section.q .opt { min-height: 48px; padding: 12px 14px; border-radius: 14px; gap: 12px; justify-content: flex-start;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(182, 240, 74, .35); color: #FFFFFF; font: 500 15px/1.35 var(--pl-font-text);
  box-shadow: none; }
body[data-scene] section.q .opt::before { content: ""; flex: none; width: 18px; height: 18px; box-sizing: border-box; border-radius: 50%;
  border: 1.5px solid rgba(182, 240, 74, .7); }
body[data-scene] section.q .opt.is-selected { background: #b6f04a; border: 1px solid #b6f04a; color: #0B0E0C; }
body[data-scene] section.q .opt.is-selected::before { border: 0; background: #0B0E0C url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%23b6f04a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
body[data-scene] section.q .opt.is-selected::after { content: none; }
body[data-scene] section.q .scale5 .opt { min-height: 48px; padding: 12px 14px; }
/* шкала q01: число над рядом и подписи краёв без плашки; 11 кнопок в ряд на 390 px (колонка 350 px — по 28 px), 48 px */
body[data-scene] section.q .q1-value { color: #FFFFFF; text-shadow: 0 1px 2px rgba(11, 14, 12, .9), 0 0 14px rgba(11, 14, 12, .85); }
body[data-scene] section.q .q1-value.is-empty { color: transparent; text-shadow: none; }
body[data-scene] section.q .scale10 { gap: 4px; }
body[data-scene] section.q .scale10 button { height: 48px; border-radius: 12px; background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(182, 240, 74, .35); color: #FFFFFF; font: 600 15px var(--pl-font-head); box-shadow: none; }
body[data-scene] section.q .scale10 button.is-selected { background: #b6f04a; border-color: #b6f04a; color: #0B0E0C; }
body[data-scene] section.q .scale-ends { margin-top: -10px; font-size: 14px; color: #C9D1CA;
  text-shadow: 0 1px 2px rgba(11, 14, 12, .9), 0 0 10px rgba(11, 14, 12, .85); }
/* «Сложно сказать» — текстовая ссылка под ответами */
body[data-scene] section.q > .unsure { align-self: center; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 0;
  background: none; box-shadow: none; color: #C9D1CA; font-size: 14px; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(201, 209, 202, .55); text-shadow: 0 1px 2px rgba(11, 14, 12, .9), 0 0 10px rgba(11, 14, 12, .85); }
body[data-scene] section.q > .unsure.is-selected { color: #b6f04a; text-decoration-color: #b6f04a; }

/* --- Шапка шагов поверх сцены (RV3-P1b, Р-8, решение 5): тёмная полоса во всю ширину, липкая сверху с безопасной
   зоной; текущий этап — акцент и 600, пройденный — «✓», будущий — приглушённый; точки 8 px; «вопрос k из m» с полосой
   заполнения. Сплошная полупрозрачная заливка без размытия — как шапка маршрута приложения и дёшево при прокрутке.
   Ширина экрана шире колонки (`#app` ≤ 430 px) — заливку тянет тень, обрезанная по высоте. --- */
body[data-scene] #app > .stagebar { position: sticky; top: 0; z-index: 5;
  margin: calc(-1 * var(--app-top, 56px)) calc(-1 * var(--pl-gutter)) 0;
  padding: calc(10px + env(safe-area-inset-top)) var(--pl-gutter) 10px;
  background: rgba(11, 14, 12, .9); border-bottom: 1px solid var(--pl-glass-edge);
  box-shadow: 0 0 0 100vmax rgba(11, 14, 12, .9); clip-path: inset(0 -100vmax -1px); gap: 6px; }
body[data-screen="s02"] #app { --app-top: 32px; }
body[data-scene] .stagebar .back { color: var(--pl-text); }
body[data-scene] .stagebar .trk { height: 14px; }
body[data-scene] .stagebar .trk::before { top: 6px; background: repeating-linear-gradient(90deg, rgba(236, 239, 232, .32) 0 3px, transparent 3px 8px); }
body[data-scene] .stagebar .trk .fill { top: 6px; background: rgba(var(--pl-accent-rgb), .7); }
body[data-scene] .stagebar .trk .tick { top: 3px; width: 8px; height: 8px; margin-left: -4px; background: rgba(236, 239, 232, .4); }
body[data-scene] .stagebar .trk .tick.on { background: var(--pl-accent); }
body[data-scene] .stagebar .trk .me { top: -4px; width: 22px; height: 22px; margin-left: -11px; background: rgba(var(--pl-accent-rgb), .25); }
body[data-scene] .stagebar .trk .me::after { inset: 5px; }
body[data-scene] .stagebar .labels { font-size: 13px; color: #AEB8B0; }
body[data-scene] .stagebar .labels .cur { color: var(--pl-accent); font-weight: 600; }
body[data-scene] .stagebar .labels .done { color: var(--pl-text); }
body[data-scene] .stagebar .labels .done b { color: var(--pl-accent); font-weight: 600; }
body[data-scene] .stagebar .qline { display: flex; align-items: center; gap: 12px; margin-left: 40px; }
body[data-scene] .stagebar .qcount { margin: 0; flex: none; font: 600 14px/1.3 var(--pl-font-text); color: var(--pl-text); }
body[data-scene] .stagebar .qfill { flex: 1; height: 4px; border-radius: 2px; background: rgba(236, 239, 232, .18); overflow: hidden; }
body[data-scene] .stagebar .qfill b { display: block; height: 100%; border-radius: 2px; background: var(--pl-accent); }

/* --- Экран сферы S02, вставки iA–iD и S11 (RV3-P1b, Р-3 и Р-12, решение 2): текстовый блок на той же плашке `.glass`;
   карточки внутри плашки — тонкая заливка вместо сплошной. --- */
body[data-scene] .glass.s02-text { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--pl-r-card); }
body[data-scene] .insert.glass, body[data-scene] .glass.s11-card { display: flex; flex-direction: column; gap: 16px;
  padding: 18px; border-radius: var(--pl-r-card); }
body[data-scene] .insert.glass > h1, body[data-scene] .insert.glass > p, body[data-scene] .s11-card > h1,
body[data-scene] .s11-card > p { margin: 0; }
body[data-scene] .insert.glass .s05-best-line { margin-top: -6px; }
body[data-scene] .glass .map, body[data-scene] .glass .calc, body[data-scene] .glass .note-card,
body[data-scene] .glass .card { background: rgba(236, 239, 232, .05); border-color: var(--pl-glass-edge); }
body[data-scene] .insert.glass .text.quiet, body[data-scene] .glass .map .r-desc, body[data-scene] .glass .cap { color: #CDD5CE; }

/* --- Итоги кругов ветки B (RV3-AB3; Р-19 а–д): разметку сцен и `#app[data-itog]` ставит app.js только при ветке B —
   вид A и выключенный тест этих правил не получают. Сцены итога круга 1: отрезки и «Пропустить», шар сферы, плашка сцены,
   «Дальше»; список iB–iD встаёт по строкам. Анимации — только opacity, transform, stroke-dashoffset; reduce — site.css
   снимает все, app.js не ведёт отрезки и рисует трещины конечным кадром. --- */
#app[data-itog] .itog-sceny { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.itog-sceny .isc-top { display: flex; align-items: center; gap: 12px; margin-top: -6px; }
.itog-sceny .isc-seg { flex: 1; display: flex; gap: 4px; }
.itog-sceny .isc-seg i { flex: 1; height: 3px; border-radius: 2px; background: rgba(236, 239, 232, .28); overflow: hidden; }
.itog-sceny .isc-seg b { display: block; height: 100%; background: var(--pl-text); transform: scaleX(0); transform-origin: left; }
.itog-sceny .isc-seg i.done b { transform: none; }
#app[data-itog="full"] .isc-seg i.cur b { animation: isc-seg var(--isc-ms, 4s) linear both; }
#app[data-itog="still"] .isc-seg i.cur b { transform: none; opacity: .6; }
body[data-scene] .itog-sceny .isc-skip { flex: none; min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 999px;
  font: 600 14px/1 var(--pl-font-text); color: var(--pl-text); }
.itog-sceny .isc-znak { align-self: center; display: grid; place-items: center; width: 140px; height: 140px; flex: none; }
.itog-sceny .isc-znak .zn { width: 76px; height: 76px; border-radius: 24px; }
.itog-sceny .isc-stage { display: grid; }
body[data-scene] .itog-scena { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 14px; padding: 18px;
  border-radius: var(--pl-r-card); }
.itog-scena .isc-head { display: flex; align-items: center; gap: 16px; }
.itog-scena .isc-ikon { width: 80px; height: 80px; border-radius: 24px; }
.itog-scena .isc-ikon svg { width: 40px; height: 40px; }
.itog-scena .isc-name { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.itog-scena .isc-name b { font: 600 24px/1.2 var(--pl-font-head); color: var(--pl-text); }
.itog-scena .dots { display: flex; gap: 8px; }
.itog-scena .dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #3A403B; }
.itog-scena .dots i.on { background: var(--pl-dust); border-color: var(--pl-dust); box-shadow: 0 0 8px rgba(86, 188, 162, .6); }
.itog-scena .isc-text { margin: 0; font-size: 16px; line-height: 1.5; color: var(--pl-text); }
/* низкий экран (360×740): сцена без прокрутки — меньше шар и отступы, шрифт текста тот же (решение 11) */
@media (max-height: 760px) {
  #app[data-itog] .itog-sceny { gap: 8px; }
  .itog-sceny .isc-znak { width: 88px; height: 88px; }
  .itog-sceny .isc-znak .zn { width: 60px; height: 60px; border-radius: 20px; }
  body[data-scene] .itog-scena { gap: 10px; padding: 14px; }
  .itog-scena .isc-ikon { width: 72px; height: 72px; border-radius: 22px; }
}
#app[data-itog="full"] .itog-scena { animation: isc-vhod 240ms cubic-bezier(.2, .8, .2, 1) both; }
/* значок виден с первого кадра (встаёт масштабом), название и текст — следом: текст ≤ 300 мс от тапа (решение 10) */
#app[data-itog="full"] .itog-scena .isc-ikon { animation: isc-ikon 180ms cubic-bezier(.2, .8, .2, 1) both; }
#app[data-itog="full"] .itog-scena .isc-name { animation: isc-in 130ms ease-out 30ms both; }
#app[data-itog="full"] .itog-scena .isc-text { animation: isc-in 130ms ease-out 60ms both; }
#app[data-itog="full"] .itog-scena.uhod { animation: isc-uhod 200ms ease-in both; pointer-events: none; }
/* значок сферы из шариков (PRM-2810-6; Р-4…Р-6): один холст экрана во весь #app поверх карточек — по нему летят струйки
   причин; касаний не ловит. Плитка .zn-chast (без img) — место значка: сцены круга 1 — в .isc-znak, iB–iD — над
   заголовком, S11 — у заголовка на правом верхнем углу карточки, наполовину над краем (≤ 72 px): ширины заголовка
   не берёт — ru «Маршрут собран» остаётся в строку, карточка почты и кнопка на месте. */
#app > canvas.znak-holst { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
/* S11 (круг 4, струек нет) — холст в плитке, на четверть стороны за её края: свечение и дыхание (≤ ×1,1) влезают */
.zn-chast > canvas.znak-holst { position: absolute; left: -25%; top: -25%; width: 150%; height: 150%; pointer-events: none; }
body[data-scene] .insert.glass > .zn-chast { align-self: center; width: 64px; height: 64px; border-radius: 20px; }
body[data-scene] .s11-card > .zn-chast { position: absolute; top: -30px; right: 14px; width: 56px; height: 56px;
  border-radius: 18px; }
/* плавный список (решения 5–6): строки по очереди от центра, точки этого круга последними, кнопка после строк; ≤ 900 мс */
#app[data-itog="full"] .map[data-map] .r { animation: itog-r 220ms cubic-bezier(.2, .8, .2, 1) calc(var(--i, 0) * 110ms) both; }
#app[data-itog="full"] .map[data-map] .dots i.nov { animation: itog-dot 140ms ease-out calc(640ms + var(--j, 0) * 30ms) both; }
#app[data-itog="full"] .insert-foot { animation: isc-in 200ms ease-out 660ms both; }
@keyframes isc-seg { from { transform: scaleX(0); } to { transform: none; } }
@keyframes isc-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes isc-ikon { from { transform: scale(.8); } }
@keyframes isc-vhod { from { transform: translateX(28px); } }
@keyframes isc-uhod { to { opacity: 0; transform: translateX(-28px); } }
@keyframes itog-r { from { opacity: 0; transform: scale(.94); } }
@keyframes itog-dot { from { background: transparent; border-color: #3A403B; box-shadow: none; }
  60% { box-shadow: 0 0 12px 3px rgba(148, 250, 101, .7); } }

/* --- «Настройка» между «Начать разбор» и первым вопросом (RV4-P1e, решения 2–4; ТЗ приёмки 26.10, п. 3). Фон — сеть
   точек при доле 0 (`body[data-scene]`, без картины); текст прямо на сети с тенью под буквами, как вопрос. Режим дыхания —
   вид практики приложения из pleer.js (PRM-2810-5, Р-2): шар M14 со словом фазы, строка фазы, шкала, таймер. reduce —
   строки сменяются без движения, сфера стоит, масштаб шара по фазам остаётся (как в приложении, APP2-P1a). --- */
body[data-screen="setup"] #app { --app-top: 32px; }
body[data-screen="setup"] #app[data-look="pl"] { padding-top: 32px; gap: 18px; }
.setup, .setup-tune { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 14px; }
.setup::before { content: ""; position: absolute; inset: -24px -20px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(11, 14, 12, .82), rgba(11, 14, 12, .55) 70%, transparent); }
.setup-lead { margin: 12px 0 0; color: #FFFFFF; font: 600 24px/1.28 var(--pl-font-head);
  text-shadow: 0 1px 2px rgba(11, 14, 12, .9), 0 0 14px rgba(11, 14, 12, .85); }
.setup-small { display: flex; flex-direction: column; gap: 8px; }
.setup-small p { margin: 0; font-size: 14px; line-height: 1.45; color: #C9D1CA;
  text-shadow: 0 1px 2px rgba(11, 14, 12, .9), 0 0 10px rgba(11, 14, 12, .85); }
.setup-small p:last-child { color: #FFFFFF; }
.setup-actions { display: flex; flex-direction: column; gap: 12px; }
.setup-actions .btn2 { background: rgba(11, 14, 12, .55); }
.setup-tune { flex: 1; align-items: center; justify-content: center; gap: 12px; }
.setup-line { margin: 0; min-height: 2.6em; text-align: center; color: #FFFFFF; font: 600 22px/1.3 var(--pl-font-head);
  text-shadow: 0 1px 2px rgba(11, 14, 12, .9), 0 0 14px rgba(11, 14, 12, .85); transition: opacity 600ms ease; }
.setup-line.out { opacity: 0; }
.setup-zvuk { position: absolute; top: 0; right: 0; width: 44px; height: 44px; padding: 10px; border-radius: 50%;
  border: 1px solid var(--pl-glass-edge); background: rgba(11, 14, 12, .6); color: var(--pl-text); }
.setup-zvuk[hidden] { display: none; }
.setup-zvuk svg { width: 100%; height: 100%; display: block; }
.setup-zvuk .off, .setup-zvuk[aria-pressed="false"] .on { display: none; }
.setup-zvuk[aria-pressed="false"] .off { display: inline; }
/* вид практики (pleer.js `vidHtml`) — те же значения, что у плеера приложения (ma-vid.css, miniapp.css: разбор их не грузит);
   шар меньше на низком экране (375×667 — без прокрутки) */
.setup-tune [hidden] { display: none !important; }
.setup-tune .player { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.setup-tune .pl-orbbox { position: relative; display: flex; align-items: center; justify-content: center; }
.setup-tune .orb { --orb-sz: min(260px, calc(100vw - 80px), 34svh); width: var(--orb-sz); height: var(--orb-sz);
  transform: scale(var(--orb, .78)); transition-property: transform, filter; transition-timing-function: ease-in-out;
  filter: brightness(calc(.82 + (var(--orb, .78) - .78) * 1.5)); }
.setup-tune .orb canvas { width: 100%; height: 100%; display: block; }
.setup-tune .pl-read { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; pointer-events: none; text-shadow: 0 2px 14px rgba(6, 10, 8, .9); }
.setup-tune .phase-word { font: 600 30px/1.15 var(--pl-font-text); min-height: 35px; color: #ECF2EC; text-align: center; }
.setup-tune .phase-count { font: 600 22px/1.2 var(--pl-font-text); min-height: 26px; color: #A2F97E; }
.setup-tune .pl-cue { margin: 0; max-width: 100%; min-height: 1.35em; text-align: center; font: 400 15px/1.35 var(--pl-font-text);
  color: #A8B2AD; white-space: nowrap; overflow: hidden; transition: opacity .1s ease;
  text-shadow: 0 1px 2px rgba(11, 14, 12, .9), 0 0 10px rgba(11, 14, 12, .85); }
.setup-tune .pl-cue.is-out { opacity: 0; }
.setup-tune .player[data-still] .pl-cue { transition: none; }
.setup-tune .pl-bar { width: 100%; }
.setup-tune .ma-blab { display: flex; margin-bottom: 7px; }
.setup-tune .ma-blab span { min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: center; white-space: nowrap;
  font: 600 12px/1.2 var(--pl-font-text); color: #8C938F; }
.setup-tune .ma-blab span.on { color: #A2F97E; }
.setup-tune .phasebar { display: flex; gap: 2px; width: 100%; height: 11px; border-radius: 6px; overflow: hidden; }
.setup-tune .phasebar i { display: block; flex: 1 1 0; height: 11px; position: relative; overflow: hidden; background: #242625; }
.setup-tune .phasebar i.on::after { content: ""; position: absolute; inset: 0; background: #8BE064; transform-origin: left;
  animation: setup-fill var(--d, 4s) linear var(--d0, 0s) forwards; }
.setup-tune .phasebar i.done { background: #8BE064; }
@keyframes setup-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.setup-tune .ma-scale { position: relative; height: 22px; margin-top: 6px; }
.setup-tune .ma-scale i { position: absolute; top: 0; width: 1px; height: 5px; background: #3A3E3C; transform: translateX(-50%); }
.setup-tune .ma-scale i.big { height: 8px; background: #6E7471; }
.setup-tune .ma-scale b { position: absolute; top: 10px; transform: translateX(-50%); font: 400 9px/1 var(--pl-font-text); color: #878C89; }
.setup-tune .ma-scale b:first-of-type { transform: none; }
.setup-tune .ma-scale b:last-of-type { transform: translateX(-100%); }
.setup-tune .timer { font: 600 15px var(--pl-font-text); color: #8C938F; }
/* шар дышит и при «меньше движения» (site.css гасит переходы) — длительность фазы --orb-t из orbTo, как miniapp.css */
@media (prefers-reduced-motion: reduce) {
  .setup-tune .orb { transition-property: transform, filter !important; transition-duration: var(--orb-t, 0s) !important;
    transition-timing-function: ease-in-out !important; }
}
