/*
 * Вход, регистрация и «Забыли пароль» в раскладке N1.
 * Чей файл: исполнитель входа и регистрации (js/login.js, js/join.js).
 * Подключён в index.html после owner.css: правила отсюда перебивают общие.
 * Общие части (оболочка, прокрутка, шторки, тосты) — в owner.css, их здесь не менять.
 *
 * Образец — вход приложения N1 (redizain-n1: static/css/vhod.css, app.html
 * 2081-2289). Всё под корнем .login.vh, чтобы не задеть экраны кабинета.
 *
 *   .login.vh   слой во весь экран (fixed); в нём слайды .vh-slide.
 *   .vh-slide   [строка «назад» .vh-top] [тело .vh-body, своя прокрутка,
 *               data-kb="scroll"] [низ .vh-dock с главной кнопкой,
 *               data-kb="dock" — над клавиатуру её поднимает n1-keyboard.js].
 *   Переход: новый слайд въезжает справа поверх (.vh-enter), прежний уходит
 *   на треть влево и темнеет на .10 (.vh-under); «назад» — наоборот
 *   (.vh-ret и .vh-leave; не .vh-back: так зовётся круглая кнопка «назад»). 420 мс, --neo-ease, как экраны N1.
 *   Планшет и окно на пол-экрана (560–1023): слой — колонка 480 по центру.
 *   Компьютер (от 1024): колонка 420 по центру окна, от верха с одним отступом
 *   на всех шагах, кнопка — сразу под формой, строка «назад» прилипает.
 */

/* ── слой ─────────────────────────────────────────────────────────────── */
.login.vh {
  position: fixed; inset: 0; z-index: 1;
  display: block; height: auto; padding: 0;
  overflow: hidden; overflow: clip;
  background: var(--bg);
  overscroll-behavior: none;
}
.login.vh::before { content: none; display: none; }
.login.vh [hidden] { display: none !important; }

/* ── слайд ────────────────────────────────────────────────────────────── */
.vh-slide {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column;
  background: var(--bg);
  /* clip, а не hidden: scrollIntoView и фокус не сдвигают сам слайд
     (шапка и низ всегда на месте, прокручивается только тело) */
  overflow: hidden; overflow: clip;
}
.vh-form { display: contents; }

/* затемнение нижнего слайда — внутри слайда, едет вместе с ним */
.vh-slide::after {
  content: ""; position: absolute; inset: 0; z-index: 50;
  background: #000; opacity: 0; pointer-events: none;
}

/* переходы между шагами */
.vh-slide.vh-enter, .vh-slide.vh-leave {
  z-index: 2;
  box-shadow: -1px 0 2px rgba(0, 0, 0, .18), -10px 0 26px rgba(0, 0, 0, .26);
}
.vh-slide.vh-enter { animation: vhEnter var(--neo-dur) var(--neo-ease) both; }
.vh-slide.vh-under { animation: vhUnder var(--neo-dur) var(--neo-ease) both; pointer-events: none; }
.vh-slide.vh-under::after { animation: vhDimIn var(--neo-dur) var(--neo-ease) both; }
.vh-slide.vh-ret { animation: vhFromUnder var(--neo-dur) var(--neo-ease) both; }
.vh-slide.vh-ret::after { animation: vhDimOut var(--neo-dur) var(--neo-ease) both; }
.vh-slide.vh-leave { animation: vhLeave var(--neo-dur) var(--neo-ease) both; pointer-events: none; }
@keyframes vhEnter { from { transform: translate3d(100%, 0, 0); } to { transform: none; } }
@keyframes vhUnder { from { transform: none; } to { transform: translate3d(-33.333%, 0, 0); } }
/* --vh-ux, --vh-ox, --vh-dim ставит свайп «назад» (join.js): переход доезжает
   с места пальца; без свайпа их нет, и едем с обычных мест */
@keyframes vhFromUnder { from { transform: translate3d(var(--vh-ux, -33.333%), 0, 0); } to { transform: none; } }
@keyframes vhLeave { from { transform: translate3d(var(--vh-ox, 0px), 0, 0); } to { transform: translate3d(100%, 0, 0); } }
@keyframes vhDimIn { from { opacity: 0; } to { opacity: .10; } }
@keyframes vhDimOut { from { opacity: var(--vh-dim, .10); } to { opacity: 0; } }

/* прошлый шаг под нынешним: невидим, пока свайп «назад» его не покажет */
.vh-slide.vh-rest { z-index: 0; visibility: hidden; transform: translate3d(-33.333%, 0, 0); pointer-events: none; }
.vh-slide.vh-rest::after { opacity: var(--vh-dim, .10); }
.vh-slide.vh-rest.vh-peek { visibility: visible; }
/* шаг под пальцем: над прошлым, с тенью слева, как при проезде */
.vh-slide.vh-drag { z-index: 2; box-shadow: -1px 0 2px rgba(0, 0, 0, .18), -10px 0 26px rgba(0, 0, 0, .26); will-change: transform; }

/* верхняя строка: 56 под вырезом, круглая «назад» 44 слева, номер шага */
.vh-top {
  flex: none; position: relative; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  height: calc(56px + var(--safe-t));
  padding: var(--safe-t) calc(116px + var(--safe-r)) 0 calc(16px + var(--safe-l));
  background: var(--bg);
}
/* мягкий край под строкой, пока тело прокручено */
.vh-top::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px;
  background: linear-gradient(var(--bg), rgba(38, 38, 38, 0));
  opacity: 0; transition: opacity 160ms linear; pointer-events: none;
}
.vh-slide.vh-scrolled .vh-top::after { opacity: 1; }
.vh-back {
  flex: none; width: 44px; height: 44px; border-radius: 22px;
  display: grid; place-items: center;
  background: var(--card2); color: #fff;
}
.vh-back svg.i { width: 22px; height: 22px; }
.vh-step { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* узкий телефон: только «Шаг 2 из 3» */
@media (max-width: 359px) {
  .vh-step-f { display: none; }
  .vh-step::first-letter { text-transform: uppercase; }
}

/* «Қаз | Рус»: справа вверху, на линии «назад» (на первом слайде — логотипа) */
.vh-slide > .vh-lng { position: absolute; z-index: 3; top: calc(var(--safe-t) + 6px); right: calc(12px + var(--safe-r)); }
/* на входе — в теле, на линии логотипа: уезжает вместе с ним при прокрутке */
.vh-body > .vh-lng { position: absolute; z-index: 3; top: calc(var(--safe-t) + 18px); right: calc(12px + var(--safe-r)); }

/* тело: своя прокрутка; содержимое не ужимается (клавиатура — прокрутка) */
.vh-body {
  flex: 1 1 auto; min-height: 0; position: relative;
  display: flex; flex-direction: column;
  padding: 4px calc(16px + var(--safe-r)) 24px calc(16px + var(--safe-l));
  overflow-x: hidden; overflow-y: auto;
  overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.vh-body::-webkit-scrollbar { display: none; }
.vh-body > * { flex-shrink: 0; }
/* первый слайд (вход): сверху логотип на вырез + 25, заголовок на вырез + 60 */
.vh-slide.vh-first .vh-body { padding-top: calc(var(--safe-t) + 25px); }

/* низ с главной кнопкой */
.vh-dock {
  flex: none; position: relative; z-index: 2;
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px calc(16px + var(--safe-r)) max(16px, calc(12px + var(--safe-b))) calc(16px + var(--safe-l));
  background: var(--bg);
}
/* мягкий край над низом: то, что ниже, уходит под кнопку плавно */
.vh-dock::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 16px;
  background: linear-gradient(rgba(38, 38, 38, 0), var(--bg)); pointer-events: none;
}

/* ── текст ────────────────────────────────────────────────────────────── */
.vh-logo { display: block; align-self: flex-start; width: 92px; height: 30px; margin: 0 0 5px; pointer-events: none; }
.vh-logo-desk { display: none; }
.vh-h1 { margin: 0; padding: 0 4px; font: 700 30px/36px var(--font); letter-spacing: -.5px; color: #fff; text-wrap: balance; overflow-wrap: anywhere; }
.vh-sub { margin: 6px 0 0; padding: 0 4px; font: 400 15px/20px var(--font); letter-spacing: -.23px; color: var(--grey); text-wrap: pretty; }
.vh-slide.vh-first .vh-sub { margin-top: 8px; }
.vh-nowrap { white-space: nowrap; }
.vh-first-f { margin-top: 24px; }

/* подсказка и ошибка под полем: серым и красным, 15/20 */
.login.vh .fill-hint { margin: 8px 0 0; padding: 0 16px; font: 400 15px/20px var(--font); letter-spacing: -.23px; color: var(--grey); }
.login.vh .fill-hint.err { color: var(--red); }
.login.vh .fill-hint.info:not(.err) { color: var(--amber); }
.vh-err { margin: 8px 0 0; padding: 0 16px; font: 400 15px/20px var(--font); letter-spacing: -.23px; color: var(--red); }
.vh-err:empty { display: none; }

/* ── поле: строка-карточка 56 r24, ввод без рамки ─────────────────────── */
.vh-fld + .vh-fld { margin-top: 12px; }
.vh-pole {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 16px;
  border-radius: 24px; background: var(--card);
  cursor: text;
  transition: box-shadow .15s ease, opacity .2s ease;
}
.vh-pole.err { box-shadow: inset 0 0 0 1.5px var(--red); }
.vh-in {
  flex: 1 1 auto; min-width: 0; width: 100%; height: 56px;
  margin: 0; padding: 0; border: 0; border-radius: 0; outline: 0;
  background: transparent; box-shadow: none; color: #fff;
  font: 400 17px/22px var(--font); letter-spacing: -.43px;
  caret-color: var(--lime);
  -webkit-appearance: none; appearance: none;
}
.vh-in::placeholder { color: var(--grey2); opacity: 1; }
.vh-in:focus-visible { outline: 0; }
.vh-in.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
/* автозаполнение не красит строку в жёлтый */
.vh-in:-webkit-autofill, .vh-in:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px var(--card) inset;
  caret-color: var(--lime);
  transition: background-color 9999s;
}
.vh-in::-ms-reveal, .vh-in::-ms-clear { display: none; }
/* пока ждём ответа, поля тусклые */
.vh-slide:has(.vh-dock .btn[aria-busy="true"]) .vh-pole { opacity: .45; }

/* номер: флаг и «+7» с чертой слева, вне поля ввода */
.vh-cc {
  flex: none; display: flex; align-items: center; gap: 8px;
  height: 24px; padding-right: 12px;
  box-shadow: 1px 0 0 var(--hair);
  font: 400 17px/22px var(--font); letter-spacing: -.43px; color: #fff;
}
.vh-flag { flex: none; display: block; width: 22px; height: 22px; border-radius: 50%; }
/* крестик очистки — только в поле с фокусом и набранным номером */
.vh-clear {
  flex: none; display: none; place-items: center;
  width: 44px; height: 44px; margin: 0 -10px 0 0; border-radius: 22px;
  color: var(--grey2);
}
.vh-clear svg.i { width: 22px; height: 22px; }
.vh-pole:focus-within .vh-in:not(:placeholder-shown) ~ .vh-clear { display: grid; }

/* глазок пароля */
.login.vh .eye {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; margin: 0 -10px 0 0; border-radius: 22px;
  color: var(--grey2);
}
.login.vh .eye svg.i { width: 22px; height: 22px; }

/* ── карточка со строками (анкета «О вас») ────────────────────────────── */
.vh-card { border-radius: 24px; background: var(--card); overflow: hidden; }
.vh-card > .vh-fld + .vh-fld { margin-top: 0; position: relative; }
/* волосок между строками: от начала текста до края */
.vh-card > .vh-fld + .vh-fld::before {
  content: ""; position: absolute; left: 16px; right: 0; top: 0; height: 1px;
  background: var(--hair); transform: scaleY(.5); transform-origin: top;
}
.vh-row {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 16px; cursor: text;
}
.vh-lbl { flex: none; width: 92px; font: 400 17px/22px var(--font); letter-spacing: -.43px; color: #fff; transition: color .15s ease; }
.vh-row.err .vh-lbl { color: var(--red); }
.login.vh .vh-card .fill-hint { margin: -6px 0 0; padding: 0 16px 12px; font-size: 13px; line-height: 18px; letter-spacing: -.08px; }
/* ритм анкеты: блоки с подписью и пароль — через 24, остальное — через 12 */
.login.vh .vh-sec, .login.vh .vh-pw { margin-top: 24px; }
.vh-legal { margin-top: 12px; }
.vh-legal .vh-card { margin-top: 0; }
.vh-note-s { margin: 8px 0 0; padding: 0 16px; font: 400 13px/18px var(--font); letter-spacing: -.08px; color: var(--grey2); }
.vh-pw .vh-card .vh-row.err { box-shadow: none; }
.vh-pw .vh-card:has(.vh-row.err) { box-shadow: inset 0 0 0 1.5px var(--red); }

/* подписи над блоками выбора */
.vh-cap { margin: 0 0 8px; padding: 0 16px; font: 400 15px/20px var(--font); letter-spacing: -.23px; color: var(--grey); }
.vh-opt { color: var(--grey2); font-size: 13px; }

/* ИП / ТОО / пока нет */
.vh-seg { display: flex; gap: 4px; padding: 4px; border-radius: 24px; background: var(--card); transition: box-shadow .15s ease; }
.vh-seg button {
  flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 12px; border-radius: 20px;
  color: var(--grey); font: 600 15px/20px var(--font); letter-spacing: -.23px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.vh-seg button.on { background: var(--card3); color: #fff; }
.vh-seg.err { box-shadow: inset 0 0 0 1.5px var(--red); }

/* «Откуда узнали» — плашки */
.login.vh .vh-chips { gap: 8px; }
.login.vh .vh-chips .chip { min-height: 44px; padding: 0 16px; border-radius: 22px; background: var(--card); }
.login.vh .vh-chips .chip.on { background: #fff; color: #111; }

/* согласие: галочка 24 r7, выбрано — белая (лайм на экране один — у кнопки) */
.vh-card.vh-consent { display: flex; align-items: flex-start; gap: 12px; padding: 16px; cursor: pointer; transition: box-shadow .15s ease; }
.vh-card.vh-consent.err { box-shadow: inset 0 0 0 1.5px var(--red); }
.vh-consent .chg-box { border-radius: 7px; box-shadow: inset 0 0 0 1.5px var(--grey2); margin-top: -1px; }
.vh-consent .chg-chk:checked + .chg-box { background: #fff; color: #111; box-shadow: none; }
.vh-consent-t { font: 400 15px/20px var(--font); letter-spacing: -.23px; color: var(--grey); }
.vh-consent-t .consent-link { color: #fff; }
.vh-fld[data-f="consent"] { margin-top: 12px; }

/* «Вы уже наш партнёр» и кнопки под ошибкой */
.vh-owner:empty, .vh-more:empty { display: none; }
.vh-owner, .vh-more { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.vh-owner .j-owner { margin: 0; }
.vh-owner .j-owner + .btn { margin-top: 0; }

/* ── ссылки ───────────────────────────────────────────────────────────── */
.vh-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-top: 4px; }
.vh-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  color: #fff; font: 400 17px/22px var(--font); letter-spacing: -.43px;
  text-decoration: none; text-align: left;
}
.vh-link[disabled] { color: var(--grey); font: 400 15px/20px var(--font); letter-spacing: -.23px; cursor: default; font-variant-numeric: tabular-nums; }
.vh-link .spin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }

/* строка под кнопкой: «Ещё нет кабинета? Регистрация» */
.vh-alt {
  margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 6px;
  min-height: 20px; text-align: center;
  font: 400 15px/20px var(--font); letter-spacing: -.23px; color: var(--grey);
}
.vh-alt-a {
  display: inline-flex; align-items: center; min-height: 44px; margin: -12px -8px; padding: 0 8px;
  color: #fff; font-weight: 600; text-decoration: none;
}

/* строка менеджеру внизу входа */
.vh-note { margin: 16px 0 0; padding: 0 16px; font: 400 13px/18px var(--font); letter-spacing: -.08px; color: var(--grey2); text-wrap: pretty; }
.vh-note a { color: #fff; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(255, 255, 255, .45); text-underline-offset: 3px; }
/* пояснение под полем номера (что дальше; владельцам пароль выдаёт менеджер) */
.vh-note.vh-note-f { margin-top: 16px; }
/* номер в подзаголовке «Регистрация» — белым: его проверяют глазами */
.vh-sub .vh-sub-w { color: #fff; }
/* «Вы у нас впервые»: номер карточкой, как поле на прошлом шаге, и «Изменить» */
.vh-num-card { cursor: default; }
.vh-num-v { flex: 1 1 auto; min-width: 0; font: 400 17px/22px var(--font); letter-spacing: -.43px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vh-num-chg {
  flex: none; height: 36px; margin-right: -6px; padding: 0 14px; border-radius: 18px;
  background: var(--card2); color: #fff; font: 600 15px/20px var(--font); letter-spacing: -.23px;
}
.vh-num-chg:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .vh-num-chg:hover { background: var(--card3); } }
/* узкий телефон: номер целиком важнее флага («Өзгерту» шире «Изменить») */
@media (max-width: 359px) {
  .vh-num-card .vh-flag { display: none; }
  .vh-num-chg { padding: 0 10px; }
}
/* вторая ссылка в строке («Другой номер») — серым */
.vh-link.vh-link-g { color: var(--grey); }

/* ── главная кнопка ───────────────────────────────────────────────────── */
.vh-dock .btn.wide { flex: none; transition: background-color .2s ease, color .2s ease; }
/* данных не хватает — серая (нажать можно: покажем, чего не хватает) */
.login.vh .btn.wide[aria-disabled="true"] { background: var(--card2); color: var(--grey2); }
/* загрузка: лайм остаётся, в середине тёмная крутилка */
.login.vh .btn[aria-busy="true"] { opacity: 1; }
.login.vh .btn.wide[aria-busy="true"]:not(.dark) { background: var(--lime); color: var(--on-lime); }
.login.vh .btn.wide .spin { width: 22px; height: 22px; border-width: 2.2px; }
.vh-dock .btn.dark { color: #fff; }

/* ── код из WhatsApp: шесть клеток ────────────────────────────────────── */
.vh-cells { display: flex; gap: 8px; padding: 0 4px; }
.vh-cell {
  flex: 1 1 0; min-width: 0; max-width: 64px; height: 56px;
  margin: 0; padding: 0; border: 0; border-radius: 16px; outline: 0;
  background: var(--card); color: #fff; box-shadow: none;
  font: 400 28px/34px var(--font); letter-spacing: 0; text-align: center;
  font-variant-numeric: tabular-nums;
  caret-color: var(--lime);
  -webkit-appearance: none; appearance: none;
  transition: box-shadow .15s ease, opacity .2s ease;
}
.vh-cell:focus { box-shadow: inset 0 0 0 2px var(--lime); }
.vh-cell:focus-visible { outline: 0; }
.vh-cells.err .vh-cell { box-shadow: inset 0 0 0 1.5px var(--red); }
.vh-cells.err .vh-cell:focus { box-shadow: inset 0 0 0 2px var(--red); }
.login.vh [data-f="code"] .fill-hint { padding: 0 4px; margin-top: 12px; }
.login.vh .vh-code-acts { flex-direction: column; align-items: flex-start; margin-top: 8px; }
.vh-code-acts .vh-link { padding: 0 4px; }
.vh-code-acts .vh-link[disabled] { min-height: 44px; }
/* «Проверяем код»: строка с крутилкой вместо ссылок, клетки тусклее */
.vh-checking { display: none; align-items: center; gap: 8px; margin: 12px 0 0; padding: 0 4px; font: 400 15px/20px var(--font); letter-spacing: -.23px; color: var(--grey); }
.vh-spin { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite; }
.vh-slide.vh-checking-on .vh-checking { display: flex; }
.vh-slide.vh-checking-on .vh-code-acts { display: none; }
.vh-slide.vh-checking-on .vh-cell { opacity: .6; }
.vh-slide.vh-checking-on .vh-err { display: none; }

/* ── 3D-картинка на свободное место ───────────────────────────────────── */
/* Тим 04.11: «иконки слишком крупные» — картинка не растягивается на всё
   свободное место, а стоит своего размера посередине между полями и низом */
.vh-art { position: relative; flex: 0 0 auto; height: clamp(112px, 18vh, 156px); margin: auto 0; padding-top: 16px; box-sizing: content-box; pointer-events: none; }
.vh-art img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: contain; -webkit-user-drag: none;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .5));
  animation: vhArt 420ms var(--neo-ease) both;
}
@keyframes vhArt { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
/* низкий экран (окно без клавиатуры ниже 700): картинка меньше */
.login.vh.vh-low .vh-art { height: 96px; padding-top: 8px; }
/* первый экран входа (стойка, широкая): крупнее остальных — Тим 04.11 «слишком
   маленькая»; ~220 на обычном телефоне, на низком экране 160 */
.vh-slide.vh-first .vh-art { height: clamp(150px, 26vh, 230px); }
.login.vh.vh-low .vh-slide.vh-first .vh-art { height: 160px; }
@media (max-width: 359px) {
  .login.vh.vh-low .vh-h1 { font-size: 26px; line-height: 32px; }
}

/* заглушка и «не удалось загрузить» */
.vh-sk { padding: 0 4px; }
.vh-fail { margin-top: 48px; }

/* фокус с клавиатуры */
.vh-back:focus-visible, .vh-link:focus-visible, .vh-alt-a:focus-visible, .vh-note a:focus-visible,
.vh-seg button:focus-visible, .vh-clear:focus-visible, .login.vh .eye:focus-visible {
  outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 12px;
}
.vh-back:focus-visible { border-radius: 22px; }
.vh-consent .chg-chk:focus-visible + .chg-box { outline: 2px solid var(--lime); outline-offset: 2px; }

@media (hover: hover) and (pointer: fine) {
  .vh-back:hover { background: var(--card3); }
  .vh-link:not([disabled]):hover, .vh-alt-a:hover, .vh-note a:hover { opacity: .8; }
  .vh-seg button:not(.on):hover { color: #fff; }
  .login.vh .btn.wide[aria-disabled="true"]:hover { background: var(--card2); }
  .login.vh .vh-chips .chip:not(.on):hover { background: var(--card2); }
}

/* «Меньше движения»: шаги сменяются без проезда (js: dir = 0), картинка — на месте */
@media (prefers-reduced-motion: reduce) {
  .vh-slide.vh-enter, .vh-slide.vh-under, .vh-slide.vh-ret, .vh-slide.vh-leave,
  .vh-slide::after, .vh-art img { animation: none !important; transform: none; }
}

/* ── планшет и окно на пол-экрана (560–1023): колонка 480 по центру, как
   #auth-wrapper N1; слайды ездят внутри неё. Телефон с вырезом в альбомной
   ориентации шире 660, колонка там дальше выреза, отступы под него не нужны. */
@media (min-width: 560px) and (max-width: 1023.98px) {
  .login.vh { left: calc(50% - 240px); right: calc(50% - 240px); --safe-l: 0px; --safe-r: 0px; }
  /* высокое окно планшета: 3D-картинка не растягивается на пол-экрана */
  .vh-art { max-height: 300px; }
}

/* ── компьютер: слева карточка о кабинете, справа шаги ────────────────── */
.vh-aside { display: none; }
@media (min-width: 1024px) {
  .login.vh { --vh-aw: clamp(440px, 44vw, 680px); }
  .vh-aside {
    position: absolute; z-index: 0; top: 16px; bottom: 16px; left: 16px; width: calc(var(--vh-aw) - 16px);
    display: flex; flex-direction: column;
    padding: 32px 40px 40px; border-radius: 32px; overflow: hidden;
    background: radial-gradient(90% 60% at 50% 40%, rgba(178, 255, 0, .09), rgba(178, 255, 0, 0) 70%), var(--card);
  }
  .vh-aside-logo { flex: none; display: block; width: auto; height: 32px; align-self: flex-start; }
  .vh-aside-art { flex: 1 1 auto; min-height: 160px; max-height: 340px; position: relative; margin: auto 0; padding: 24px 0; }
  .vh-aside-art img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 28px 40px rgba(0, 0, 0, .5)); -webkit-user-drag: none;
    animation: vhArt 520ms var(--neo-ease) both;
  }
  .vh-aside-tx { flex: none; }
  .vh-aside-h { margin: 0; font: 700 34px/40px var(--font); letter-spacing: -.6px; color: #fff; text-wrap: balance; }
  .vh-aside-l { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
  .vh-aside-l li { display: flex; align-items: center; gap: 14px; font: 400 17px/22px var(--font); letter-spacing: -.43px; color: var(--grey); }
  .vh-aside-ic { flex: none; width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; background: var(--card2); color: #fff; }
  .vh-aside-ic svg.i { width: 20px; height: 20px; }
  /* шаги — справа от карточки; прошлый шаг под нынешним свайпу не нужен */
  .vh-slide { left: var(--vh-aw); }
  .vh-slide.vh-rest { display: none; }
  /* логотип и 3D-картинка уже в карточке слева */
  .vh-body > .vh-logo, .vh-art { display: none !important; }
}
@media (min-width: 1024px) and (max-height: 640px) {
  .vh-aside-art { display: none; }
  .vh-aside { justify-content: space-between; }
}

/* ── компьютер: колонка 420 справа, от верха с одним отступом ─────────── */
@media (min-width: 1024px) {
  /* колонка от верха с одним отступом на всех шагах: «назад» и заголовок не
     прыгают от шага к шагу; длинный шаг прокручивается целиком (слайд) */
  .vh-slide {
    align-items: center;
    padding: 0 24px 48px;
    overflow-x: hidden; overflow-y: auto;
    scrollbar-width: thin;
  }
  /* отступ сверху — распоркой, а не padding: от padding прилипшая строка
     держалась бы на его высоте, и прокрученное было бы видно над ней */
  .vh-slide::before { content: ""; order: -100; flex: none; height: clamp(88px, 20vh, 220px); }
  .vh-body { display: contents; }
  .vh-top, .vh-body > *, .vh-dock { width: 100%; max-width: 420px; flex: none; }
  /* строка «назад» прилипает к верху, пока шаг прокручивают */
  .vh-top { order: -10; position: sticky; top: 0; z-index: 4; height: auto; padding: 16px 0 0; margin: -16px 0 20px; background: var(--bg); }
  .vh-note.vh-note-f { order: 0; margin-top: 16px; text-align: left; }
  .vh-art { order: -5; flex: none; height: 168px; margin: 0 0 8px; }
  .vh-art img { object-position: left center; }
  .vh-dock { order: 10; padding: 28px 0 0; background: none; gap: 16px; }
  .vh-dock::before { display: none; }
  .vh-note { order: 20; margin-top: 24px; text-align: center; }
  .vh-slide.vh-first .vh-body { padding: 0; }
  .vh-body > .vh-logo { display: block; position: absolute; top: 28px; left: 32px; width: 92px; height: 30px; max-width: none; margin: 0; }
  .vh-slide > .vh-lng, .vh-body > .vh-lng { top: 22px; right: 24px; width: auto; max-width: none; }
  .vh-h1 { font-size: 34px; line-height: 40px; }
  .vh-slide.vh-first .vh-sub { margin-top: 10px; }
  /* переход — короче: сдвиг 48 px и проявление */
  .vh-slide.vh-enter, .vh-slide.vh-leave { box-shadow: none; }
  .vh-slide.vh-enter { animation-name: vhEnterD; }
  .vh-slide.vh-under { animation-name: vhUnderD; }
  .vh-slide.vh-ret { animation-name: vhBackD; }
  .vh-slide.vh-leave { animation-name: vhLeaveD; }
  .vh-slide.vh-under::after, .vh-slide.vh-ret::after { animation: none; }
}
@keyframes vhEnterD { from { opacity: 0; transform: translate3d(48px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes vhUnderD { from { opacity: 1; } to { opacity: 0; } }
@keyframes vhBackD { from { opacity: 0; transform: translate3d(-32px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes vhLeaveD { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate3d(48px, 0, 0); } }
