/* Режим Mini App: телефон во весь экран, служебная оболочка прототипа скрыта. */
html.is-tma, html.is-tma body { height: 100%; margin: 0; overflow: hidden; background: var(--bg, #FFF7EC); }
html.is-tma .shell { display: block; height: 100%; }
html.is-tma .shell__nav, html.is-tma .shell__panel, html.is-tma .shell__fab, html.is-tma .shell__journey { display: none !important; }
html.is-tma .shell__stage { padding: 0; height: 100%; display: block; overflow: hidden; }
html.is-tma .shell__fit { width: 100% !important; height: 100% !important; }
html.is-tma .shell__phone { width: 100% !important; height: 100% !important; max-width: none; border-radius: 0; box-shadow: none; transform: none !important; border: 0; }
/* оба класса стоят на html вместе, поэтому правило должно быть сильнее .is-shot .shell__phone .app (390 × 844 для снимков) */
html.is-tma .shell__phone .app, html.is-tma .shell__phone .app.app--landscape { width: 100%; height: var(--app-h, 100%); border-radius: 0; }
html.is-tma .homebar i { display: none; }   /* полоска iPhone из прототипа: настоящую рисует система */
/* низ экрана: под меню только безопасная зона iPhone и сплошной фон, иначе лента просвечивает под меню */
html.is-tma { --home-h: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px)); --status-h: 10px; }   /* шапку рисует Telegram: запас под часы iPhone не нужен */
html.is-tma .homebar { padding: 0; }
html.is-tma .homebar:not(.homebar--nav) { background: var(--bg); }
html.is-tma .app:has(.pl-play) .homebar { background: transparent; }
html.is-tma .app__dock:has(.lead-send--night) .homebar { background: var(--t-night-b); }
html.is-tma .pl-vdock { background: linear-gradient(180deg, transparent 0, var(--bg) 22px); }
html.is-tma .scene { height: calc(var(--scene-h, 240px) - 36px); }
.on .ld-step::before { display: none; }   /* у строк в одну линию для соединителя нет места: он появлялся только у длинных */
html.is-tma .btn-col:has(> .fb-send), html.is-tma .btn-col:has(> .fb-app-send) { position: sticky; bottom: 0; z-index: 5; margin-inline: calc(-1 * var(--gutter)); padding: var(--s-4) var(--gutter) calc(var(--home-h) + 8px); background: linear-gradient(to bottom, transparent, var(--bg) 18px); }
html.is-tma .sub .ld-hero__in { padding-top: 60px; }   /* персонаж ниже логотипа */
.app__sbar { position: absolute; z-index: 11; right: 2px; top: 0; width: 3px; border-radius: 2px; background: rgba(120, 115, 170, .55); pointer-events: none; }
.app__sbar[hidden] { display: none; }
.person-card__credit { margin-top: 2px; font-size: 11px; line-height: 14px; color: var(--ink-3); }
.person-card__img { object-position: 50% 30%; }
.mt-org__mark { display: block; overflow: hidden; box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.mt-org__mark svg { display: block; width: 100%; height: 100%; }
.ld-net__ic, .ld-net--tg .ld-net__ic { background: none; }
.ld-net__ic svg { display: block; width: 100%; height: 100%; }
.rv-why__ava { object-fit: cover; }
.person-card__img--whole { object-fit: contain; }   /* портрет целиком: лицо не помещается в кадр 4:3 */
html.is-kb .tabbar, html.is-kb .homebar { display: none; }
html.is-tma .statusbar { display: none; }
html.is-tma .app__scroll { padding-top: env(safe-area-inset-top, 0px); }
html.is-tg-full .app__scroll { padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }   /* весь экран: кнопки Telegram поверх страницы */
html.is-tma .sv > .sv-actions { position: sticky; bottom: 0; z-index: 4; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter));
  padding: var(--s-5) var(--gutter) calc(var(--home-h) + 4px); background: linear-gradient(to bottom, transparent, var(--bg) 22px); }
html.is-tma .sv > .sheet__end { height: 0; }
.scale__nums span { cursor: pointer; }
html.is-tma .app__scroll { overscroll-behavior-y: none; }   /* без оттяжки: над шапкой не появляется пустая полоса */

/* 27.10: настоящие видео, фото и кружок */
.video--file { position: relative; overflow: hidden; background: #000; border-radius: var(--r-1); cursor: default; transform: translateZ(0); }
.video--file video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
/* подсветка уже видео и размыта: тень на всю рамку заливала углы, и они казались квадратными */
.pl-vid--file { position: relative; overflow: visible; box-shadow: none; background: none; isolation: isolate; }
.pl-vid--file::before { content: ""; position: absolute; inset: 18px 22px -8px; z-index: -1; border-radius: var(--r-1); background: var(--primary); opacity: .5; filter: blur(24px); }
.pl-vid .video--file { border-radius: var(--r-1); background: #000; }
/* свой плеер h.video */
.vp::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(180deg, transparent, rgba(11,10,31,.72)); pointer-events: none; transition: opacity .25s; }
.vp__big { position: absolute; z-index: 2; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 7px rgba(255,255,255,.18), 0 8px 24px rgba(11,10,31,.4); transition: opacity .25s, transform .25s; }
.vp__ic { display: grid; place-items: center; }
.vp__ic--play { padding-left: 4px; }
.vp__ic--pause, .vp.is-play .vp__ic--play { display: none; }
.vp.is-play .vp__ic--pause { display: grid; }
.vp.is-play .vp__big { background: rgba(11,10,31,.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: none; }
.vp__bar { position: absolute; z-index: 2; left: 12px; right: 8px; bottom: 6px; height: 40px; display: flex; align-items: center; gap: 8px; color: #fff; transition: opacity .25s; }
.vp__time { flex: none; min-width: 30px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.vp__track { position: relative; flex: 1; height: 32px; display: block; touch-action: none; cursor: pointer; }
.vp__track::before { content: ""; position: absolute; left: 0; right: 0; top: 14px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); }
.vp__fill { position: absolute; left: 0; top: 14px; height: 4px; width: 0; border-radius: 2px; background: linear-gradient(90deg, #FFD15C, #FF8A3D); }
.vp__fill::after { content: ""; position: absolute; right: -7px; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.vp__btn { flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: #fff; }
.vp__ic--off, .vp.is-mute .vp__ic--on { display: none; }
.vp.is-mute .vp__ic--off { display: grid; }
.vp__sound { position: absolute; z-index: 3; left: 50%; top: 12px; transform: translateX(-50%); height: 34px; padding: 0 14px 0 10px; border: 0; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 6px;
  background: rgba(11,10,31,.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.vp__sound[hidden] { display: none; }
/* панель скрыта: остаётся только картинка */
.vp.is-idle::after, .vp.is-idle .vp__bar, .vp.is-idle .vp__big { opacity: 0; pointer-events: none; }
.vp:not(.is-started) .vp__bar { opacity: 0; pointer-events: none; }
.vp.is-wait .vp__big { opacity: 1; background: rgba(11,10,31,.5); }
.vp.is-wait .vp__big .vp__ic { display: none; }
.vp.is-wait .vp__big::after { content: ""; width: 30px; height: 30px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: vp-spin .8s linear infinite; }
@keyframes vp-spin { to { transform: rotate(360deg); } }
/* кружок h.circle: как в Telegram, кольцо вокруг видео показывает время и тянется пальцем */
.ms-soft__item .ms-circle-play { padding: 0; background: none; }
.cv { position: relative; width: min(280px, 74vw); aspect-ratio: 1 / 1; margin: var(--s-2) auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cv video { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); border-radius: 50%; object-fit: cover; background: #000; }
.cv__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.cv__ring circle { fill: none; }
.cv__bg { stroke: rgba(128, 128, 160, .25); stroke-width: 2.6; }
.cv__fill { stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.cv__hit { stroke: transparent; stroke-width: 22; pointer-events: stroke; touch-action: none; cursor: grab; }
.cv__knob { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(11, 10, 31, .4); opacity: 0; pointer-events: none; transition: opacity .2s; }
.cv.is-started .cv__knob { opacity: 1; }
.cv__play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; padding-left: 4px; border-radius: 50%; display: grid; place-items: center; background: rgba(11, 10, 31, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; pointer-events: none; transition: opacity .2s; }
.cv.is-play .cv__play { opacity: 0; }
.cv-text { margin-top: var(--s-2); font-size: var(--fs-2); line-height: var(--lh-2); color: var(--ink-2); }
.cv-text summary { padding: var(--s-1) 0; text-align: center; font-weight: var(--fw-semibold); color: var(--primary); cursor: pointer; }
.cv-text p { margin: var(--s-1) 0 0; }
.ma-place__photo--file { padding: 0; overflow: hidden; }
.ma-place__photo--file img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* служебные кнопки прототипа в Telegram не нужны: темп ×10 и ручной поворот */
html.is-tma .pl-chip--proto, html.is-tma [data-pl-act="orient"], html.is-tma .pl-rot .pl-btn-onsky { display: none !important; }
/* телефон лежит на боку: видео и кнопки должны поместиться в невысокое окно */
@media (orientation: landscape) and (max-height: 500px) {
  html.is-tma .pl-vid--file { max-width: 340px; margin-inline: auto; }
  html.is-tma .pl-vdock { padding-top: var(--s-2); }
  html.is-tma .pl-vdock .btn-col { flex-direction: row; gap: var(--s-2); }
  html.is-tma .pl-vdock .btn { flex: 1; }
}
/* 27.10: настоящие отзывы из переписки */
.rv-real { display: flex; flex-direction: column; gap: 10px; }
.rv-car--real .ld-carousel__track { align-items: flex-start; }   /* короткое сообщение — карточка меньше, полоска под каруселью на месте */
.rv-real--long { cursor: pointer; }
/* CK-01 чек-лист за подписку */
.ck-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.ck-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--card-border); cursor: pointer; }
.ck-step input { width: 26px; height: 26px; margin: 1px 0 0; accent-color: var(--primary); }
.ck-step__t { display: grid; gap: 6px; min-width: 0; color: var(--ink); }
.ck-step__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ck-step__min { flex: none; font-size: 14px; color: var(--ink-2); }
.ck-step input:checked ~ .ck-step__t .ck-step__top b { color: var(--ink-3); }
.ck-step__q { display: grid; gap: 4px; padding-left: 14px; border-left: 3px solid var(--accent); }
.ck-step__s { font-size: 15px; color: var(--ink-2); }
.ck-box { display: grid; gap: 8px; padding: 18px; border-radius: 18px; background: var(--primary-soft); color: var(--on-primary-soft); }
.ck-box p { margin: 0; }
.ck-box ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.rv-real__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rv-real__top .ic { flex: none; color: var(--accent, #E0703A); }
.rv-real__tag { padding: 4px 12px; border-radius: var(--r-pill); background: var(--primary-soft); color: var(--on-primary-soft); font-size: 13px; line-height: 18px; font-weight: 600; }
.rv-real__t p { margin: 0; }
.rv-real--long .rv-real__t p { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.rv-real__more { align-self: flex-start; font-weight: 600; color: var(--accent, #E0703A); }
/* карусель: под слайдами одна полоска, ползунок идёт за текущим слайдом */
.ld-carousel__bar { width: 112px; height: 4px; margin: var(--s-3) auto 0; border-radius: 2px; background: rgba(128, 128, 160, .26); overflow: hidden; }
.ld-carousel__bar i { display: block; height: 100%; border-radius: 2px; background: var(--accent); transition: transform .25s ease; }
/* галерея и дипломы открываются на весь экран */
.ld-gallery__tile:not(.ld-gallery__tile--ph) { cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.ld-gallery__tile img { object-position: 50% 25%; }
.ma-dip--doc { cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.ma-dip__thumb { position: relative; flex: none; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); }
.ma-dip__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ma-dip__thumb--ic { display: grid; place-items: center; background: var(--primary-soft); color: var(--on-primary-soft); box-shadow: none; }
.ma-dip__zoom { position: absolute; right: 3px; bottom: 3px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(11, 10, 31, .62); color: #fff; }
.lb { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #080718; opacity: 0; transition: opacity .2s; }
.lb.is-open { opacity: 1; }
.lb__track { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb__track::-webkit-scrollbar { display: none; }
.lb.is-zoom .lb__track { overflow: hidden; }
.lb__slide { flex: 0 0 100%; height: 100%; display: grid; place-items: center; overflow: hidden; scroll-snap-align: center; }
.lb__slide img { display: block; max-width: 100%; max-height: 100%; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.lb__close { position: absolute; z-index: 2; right: 12px; top: 12px; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; }
.lb__foot { flex: none; padding: var(--s-3) var(--gutter) calc(var(--s-3) + var(--home-h)); text-align: center; font-size: var(--fs-2); line-height: var(--lh-2); color: #fff; }
/* шторка выбора: своё меню вместо системных списков и часов */
.psheet { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; justify-content: flex-end; }
.psheet__scrim { position: absolute; inset: 0; background: rgba(11, 10, 31, .5); opacity: 0; transition: opacity .2s; }
.psheet__panel { position: relative; max-height: 78%; display: flex; flex-direction: column; padding: var(--s-2) var(--gutter) calc(var(--s-3) + var(--home-h)); border-radius: 24px 24px 0 0; background: var(--surface); color: var(--ink); transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .3, 1); }
.psheet.is-open .psheet__scrim { opacity: 1; }
.psheet.is-open .psheet__panel { transform: none; }
.psheet__grab { flex: none; width: 40px; height: 4px; margin: 0 auto var(--s-1); border-radius: 2px; background: var(--line); }
.psheet__head { flex: none; min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); font-size: var(--fs-3); }
.psheet__x { flex: none; width: var(--tap); height: var(--tap); margin-right: -10px; padding: 0; border: 0; background: none; color: var(--ink-3); display: grid; place-items: center; }
.psheet__list { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: var(--s-1) 0; }
.psheet__opt { flex: none; min-height: 52px; padding: 8px 16px; border: 0; border-radius: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--field); color: var(--ink); font: inherit; font-size: var(--fs-3); line-height: 22px; text-align: left; }
.psheet__opt .ic { flex: none; opacity: 0; }
.psheet__opt[aria-pressed="true"] { background: var(--primary-soft); color: var(--on-primary-soft); font-weight: var(--fw-semibold); }
.psheet__opt[aria-pressed="true"] .ic { opacity: 1; }
.psheet__time { position: relative; flex: none; height: 220px; display: flex; align-items: center; justify-content: center; gap: var(--s-2); }
.psheet__frame { position: absolute; left: 0; right: 0; top: 88px; height: 44px; border-radius: 14px; background: var(--primary-soft); }
.psheet__wheel { position: relative; width: 84px; height: 220px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; text-align: center; }
.psheet__wheel::-webkit-scrollbar { display: none; }
.psheet__wheel i { display: block; height: 88px; }
.psheet__wheel span { display: block; height: 44px; line-height: 44px; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; scroll-snap-align: center; }
.psheet__time b { position: relative; font-size: 26px; }
.psheet__done { flex: none; margin-top: var(--s-3); }
/* 04.11 (30): субтитры к видео Марии — шрифт заголовков, мягкая плашка, над панелью плеера */
.vp__subs { position: absolute; z-index: 2; left: 6%; right: 6%; bottom: 52px; text-align: center; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.vp__subs.is-on { opacity: 1; }
.vp__subs span { display: inline; padding: 3px 10px; border-radius: 10px; background: rgba(20, 16, 60, .58); color: #fff; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  font-family: var(--font-display); font-size: 14px; line-height: 1.6; letter-spacing: .01em; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.vp.is-idle .vp__subs { bottom: 18px; }
