/* Две стороны: заставка выбора фракции на арте «Элийка и асмодианка» и оформление интерфейса по стороне.
   Арт: web/public/img/art/factions_elyos_asmodian.jpg (manifest.json) — слева элийка (светлое небо),
   справа асмодианка (фиолетовый космос), граница кадра ровно посередине. */

/* Оформление по стороне (токены, фон-арт, частицы) — в styles.css: :root — асмодиане, :root[data-faction="elyos"] — элийцы.
   Здесь — только заставка «Две стороны» и переключатель в «Настройках». */

/* Переключатель в «Настройках» */
.fx-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 20px; background: var(--well); box-shadow: inset 0 0 0 1px var(--edge); }
.fx-seg button {
  position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 2px; justify-items: start; min-width: 132px; min-height: 52px; padding: 8px 16px; border: 0; border-radius: 16px; cursor: pointer;
  background: transparent; color: var(--ink-2); font: 600 14px var(--font-body); text-align: left; transition: background .25s, color .2s, box-shadow .25s;
}
.fx-seg button small { font: 500 12px var(--font-body); color: var(--ink-3); }
.fx-seg button:hover { color: var(--ink); background: var(--well-2); }
.fx-seg button[aria-pressed="true"] { color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent), 0 8px 24px -12px var(--accent-glow); }
.fx-seg button[aria-pressed="true"] small { color: var(--ink-2); }
.fx-set { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

/* ---------- Заставка ---------- */
html.fx-lock, html.fx-lock body { overflow: hidden; }
.fx {
  --e: #F3D28E; --e-hi: #FFF3DA; --e-sky: #8FD0FF;
  --a: #A98BFF; --a-hi: #ECE4FF; --a-blood: #E2456A;
  --night: #05060B;
  --out: cubic-bezier(.22, 1, .36, 1);
  --in: cubic-bezier(.55, 0, 1, .45);
  --spring-soft: linear(0, 0.081, 0.249, 0.434, 0.601, 0.735, 0.835, 0.905, 0.951, 0.979, 0.995, 1.003, 1.007, 1.007, 1.006, 1.005, 1.004, 1.003, 1.002, 1.001, 1);
  position: fixed; inset: 0; z-index: 50; overflow: hidden; isolation: isolate;
  background: var(--night); color: #F2F4F8; font: 15px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased; outline: none;
}
.fx-stage, .fx-pan, .fx-par, .fx-kb, .fx-half, .fx-shade, .fx-dust { position: absolute; }
.fx-stage { inset: 0; }
.fx-pan { inset: 0; transition: transform 1.1s var(--spring-soft); }
.fx-par { inset: -2.5%; }
/* Слой шире экрана: запас на сдвиг к выбранной стороне, параллакс и наезд камеры. */
.fx-kb { inset: 0 -11%; transform-origin: 50% 45%; animation: fx-kb 38s cubic-bezier(.65, 0, .35, 1) infinite alternate; }
@keyframes fx-kb { from { transform: scale(1); } to { transform: scale(1.065) translate(-.6%, -.8%); } }
.fx-half { inset: 0; overflow: hidden; }
.fx-half.e { clip-path: inset(0 50% 0 0); }
.fx-half.a { clip-path: inset(0 0 0 50%); }
.fx-half img {
  width: 100%; height: 100%; max-width: none; display: block; object-fit: cover; object-position: 50% 40%;
  transition: transform 1.2s var(--out), opacity .3s;
}
.fx-half.e img { transform-origin: 36% 30%; }
.fx-half.a img { transform-origin: 62% 30%; }
.fx-veil, .fx-glow, .fx-seam { position: absolute; pointer-events: none; }
.fx-veil { top: 0; bottom: 0; width: 50%; opacity: 0; transition: opacity .7s var(--out); }
.fx-veil.e { left: 0; background: linear-gradient(90deg, rgba(4, 6, 14, .72), rgba(4, 6, 14, .5)); }
.fx-veil.a { left: 50%; background: linear-gradient(270deg, rgba(8, 4, 16, .74), rgba(8, 4, 16, .52)); }
.fx-glow { top: -10%; bottom: -10%; width: 60%; opacity: .45; mix-blend-mode: screen; transition: opacity .9s var(--out); }
.fx-glow.e { left: 4%; background: radial-gradient(48% 42% at 52% 34%, rgba(255, 222, 160, .30), rgba(143, 208, 255, .10) 55%, transparent 75%); }
.fx-glow.a { right: 4%; background: radial-gradient(48% 42% at 48% 34%, rgba(169, 139, 255, .32), rgba(226, 69, 106, .12) 55%, transparent 75%); }
/* Шов между мирами: тонкий луч, мягкий ореол и бегущий по нему блик. */
.fx-seam { left: 50%; top: -6%; bottom: -6%; width: 2px; margin-left: -1px; transform-origin: 50% 50%; }
.fx-seam::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(255, 246, 225, .85) 22%, #fff 50%, rgba(214, 196, 255, .85) 78%, transparent); }
.fx-seam::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60px; right: -60px; opacity: .55; transition: opacity .7s;
  background: linear-gradient(90deg, transparent, rgba(255, 220, 160, .22) 44%, rgba(255, 255, 255, .28) 50%, rgba(176, 140, 255, .24) 56%, transparent);
}
.fx-seam i {
  position: absolute; left: -3px; width: 8px; height: 140px; top: 0; border-radius: 4px;
  background: radial-gradient(closest-side, #fff, rgba(255, 255, 255, 0)); opacity: .9;
  animation: fx-run 6.5s cubic-bezier(.45, 0, .55, 1) infinite;
}
@keyframes fx-run { from { transform: translateY(-160px); } to { transform: translateY(calc(100vh + 160px)); } }
.fx-shade {
  inset: 0; pointer-events: none;
  background:
    linear-gradient(0deg, rgba(4, 5, 10, .86) 0%, rgba(4, 5, 10, .42) 30%, transparent 52%),
    linear-gradient(180deg, rgba(4, 5, 10, .55) 0%, transparent 24%),
    radial-gradient(130% 95% at 50% 45%, transparent 55%, rgba(3, 4, 8, .6) 100%);
}
.fx-dust { inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 1.4s var(--out) .4s; }
.fx.ready .fx-dust { opacity: 1; }

/* Наклон к стороне под курсором: своя половина растёт и светлеет, чужая уходит в тень. */
.fx[data-hover="elyos"] .fx-pan { transform: translateX(7%); }
.fx[data-hover="asmo"] .fx-pan { transform: translateX(-7%); }
.fx[data-hover="elyos"] .fx-half.e img, .fx[data-hover="asmo"] .fx-half.a img { transform: scale(1.04); }
.fx[data-hover="elyos"] .fx-veil.a, .fx[data-hover="asmo"] .fx-veil.e { opacity: 1; }
.fx[data-hover="elyos"] .fx-glow.e, .fx[data-hover="asmo"] .fx-glow.a { opacity: 1; animation: fx-breathe 5s ease-in-out infinite alternate; }
.fx[data-hover="elyos"] .fx-glow.a, .fx[data-hover="asmo"] .fx-glow.e { opacity: .12; }
.fx[data-hover] .fx-seam::after { opacity: .9; }
@keyframes fx-breathe { from { opacity: 1; } to { opacity: .72; } }

/* ---------- Надписи и управление ---------- */
.fx-ui { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.fx-ui > * { pointer-events: auto; }
.fx-top {
  position: absolute; top: clamp(18px, 4vh, 44px); left: 50%; translate: -50% 0; width: max-content; max-width: 90vw;
  display: grid; justify-items: center; gap: 6px; text-align: center; pointer-events: none; isolation: isolate;
}
/* мягкая тень под заголовком: при наклоне к элийцам под ним оказываются светлые волосы героини */
.fx-top::before { content: ''; position: absolute; inset: 20% -70px -24px; z-index: -1; background: radial-gradient(closest-side, rgba(4, 5, 12, .62), transparent); }
.fx-logo { width: clamp(150px, 14vw, 230px); height: auto; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .55)); }
.fx-eyebrow { font: 400 clamp(17px, 1.5vw, 22px) var(--font-brand); letter-spacing: .14em; color: rgba(246, 240, 228, .92); text-shadow: 0 1px 14px rgba(0, 0, 0, .7); }
.fx-eyebrow small { display: block; margin-top: 2px; font: 500 13px var(--font-body); letter-spacing: 0; color: rgba(236, 240, 248, .74); }
.fx-close {
  position: absolute; top: 18px; right: 18px; width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: #fff; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(10, 12, 22, .45); backdrop-filter: blur(12px);
}
.fx-close:hover { background: rgba(255, 255, 255, .14); }
.fx-close svg { width: 16px; height: 16px; }
.fx-hint { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; width: max-content; max-width: 90vw; font-size: 13px; color: rgba(236, 240, 248, .62); text-shadow: 0 1px 8px #000; pointer-events: none; }

/* Стороны: на ПК — левая и правая половины экрана, вся половина нажимается. */
.fx-side {
  position: absolute; top: 0; bottom: 0; width: 50%; padding: 0; margin: 0; border: 0; background: none; color: inherit;
  cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent;
}
.fx-side.e { left: 0; }
.fx-side.a { right: 0; text-align: right; }
.fx-side:focus-visible { outline: none; }
.fx-card {
  position: absolute; bottom: clamp(44px, 11vh, 130px); display: grid; gap: 8px; max-width: min(600px, 44vw);
  transition: transform .8s var(--spring-soft), opacity .5s var(--out);
}
.fx-side.e .fx-card { left: clamp(24px, 6.5vw, 120px); justify-items: start; }
.fx-side.a .fx-card { right: clamp(24px, 6.5vw, 120px); justify-items: end; }
.fx-mine { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--font-body); letter-spacing: .02em; text-shadow: 0 1px 8px #000; }
.fx-mine::before { content: ''; width: 7px; height: 7px; transform: rotate(45deg); background: currentColor; box-shadow: 0 0 10px currentColor; }
.fx-side.e .fx-mine { color: var(--e); }
.fx-side.a .fx-mine { color: #C9B5FF; }
.fx-name {
  display: block; font: 400 clamp(52px, 6.6vw, 112px)/.92 var(--font-brand); letter-spacing: .03em; white-space: nowrap;
  background-clip: text; -webkit-background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 22px rgba(0, 0, 0, .55));
}
.fx-side.e .fx-name { background-image: linear-gradient(180deg, #FFFDF6 10%, #F8E3B4 55%, #E2B864 100%); }
.fx-side.a .fx-name { background-image: linear-gradient(180deg, #FBF8FF 10%, #D9CCFF 55%, #9C7CFF 100%); }
.fx-sub { font-size: 15px; color: rgba(238, 241, 248, .8); text-shadow: 0 1px 10px rgba(0, 0, 0, .8); }
.fx-go {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 16px; border-radius: 999px;
  font: 600 14px var(--font-body); color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(10px); opacity: 0; translate: 0 8px; transition: opacity .35s var(--out), translate .5s var(--spring-soft), background .2s;
}
.fx-go svg { width: 14px; height: 14px; }
/* «Выбрать →» на обеих половинах: стрелка вправо — «дальше»; на правой половине стрелка к шву читалась как «← назад» */
.fx[data-hover="elyos"] .fx-side.e .fx-go, .fx[data-hover="asmo"] .fx-side.a .fx-go { opacity: 1; translate: 0 0; }
.fx[data-hover="elyos"] .fx-side.e .fx-card, .fx[data-hover="asmo"] .fx-side.a .fx-card { transform: translateY(-8px); }
.fx[data-hover="elyos"] .fx-side.a .fx-card, .fx[data-hover="asmo"] .fx-side.e .fx-card { opacity: .42; }
.fx-side.e:focus-visible .fx-go { outline: 2px solid var(--e); outline-offset: 3px; }
.fx-side.a:focus-visible .fx-go { outline: 2px solid var(--a); outline-offset: 3px; }
.fx-side:active .fx-go { background: rgba(255, 255, 255, .2); }
@media (hover: none) { .fx-go { opacity: 1; translate: 0 0; } }

/* ---------- Вход: стеклянная карточка поверх арта ---------- */
/* Карточка ниже и легче (героини видны до пояса): 360 px, тёмное стекло .42, заголовок — Forum, как «Компаньон»;
   подписи полей — внутри поля и уезжают вверх над значением (плавающая метка), кнопка светится золотом шва. */
.fx-login {
  position: absolute; left: 50%; bottom: 7vh; translate: -50% 0; width: min(360px, calc(100vw - 32px));
  display: grid; gap: 12px; padding: 22px 22px 20px; border-radius: 22px; text-align: left;
  background: rgba(12, 8, 24, .42);
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 30px 70px rgba(0, 0, 0, .45);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.fx-login h1 { margin: 0 0 4px; font: 400 28px/1.1 var(--font-brand); letter-spacing: .08em; color: rgba(250, 244, 230, .96); text-shadow: 0 1px 14px rgba(0, 0, 0, .6); }
.fx-field { position: relative; display: block; }
.fx-field > span { position: absolute; left: 15px; top: 50%; translate: 0 -50%; font-size: 15px; color: rgba(236, 240, 248, .66); pointer-events: none;
  transition: top .2s var(--out), translate .2s var(--out), font-size .2s var(--out), color .2s; }
.fx-field input:focus + span, .fx-field input:not(:placeholder-shown) + span { top: 8px; translate: 0 0; font-size: 11px; color: rgba(243, 222, 170, .9); }
.fx-login input[type=text], .fx-login input[type=password] {
  width: 100%; height: 48px; padding: 18px 14px 4px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .07); color: #fff; font: 15px var(--font-body); outline: none;
  transition: border-color .2s, background .2s;
}
.fx-login input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: inset 0 0 0 40px rgba(28, 22, 44, .96); caret-color: #fff; }
.fx-login input:focus { border-color: rgba(243, 210, 142, .8); background: rgba(255, 255, 255, .1); }
.fx-login .fx-err { color: #FF9479; font-size: 13px; }
.fx-login .fx-note { margin: 0; color: rgba(236, 240, 248, .74); font-size: 13px; }
.fx-login .fx-toggle { border: 0; background: none; color: #F6DEA6; font: 13px var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.fx-login .fx-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.fx-btn {
  height: 48px; margin-top: 4px; border: 0; border-radius: 13px; cursor: pointer;
  font: 600 15px var(--font-body); color: #1A1206; background: linear-gradient(180deg, #F6DEA6, #C9963F);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 8px 24px rgba(201, 150, 63, .28), 0 0 24px rgba(232, 196, 120, .35);
  transition: transform .12s, filter .2s;
}
.fx-btn:hover { filter: brightness(1.06); }
.fx-btn:active { transform: scale(.98); }
.fx-btn:disabled { cursor: progress; filter: saturate(.6) brightness(.9); }
.fx-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.fx-login.shake { animation: fx-shake .42s var(--out); }
@keyframes fx-shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

/* ---------- Появление ---------- */
.fx-stage { opacity: 0; }
.fx.ready .fx-stage { opacity: 1; animation: fx-in 1.6s var(--out) both; }
@keyframes fx-in { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
.fx.ready .fx-seam { animation: fx-seam 1.1s var(--out) .35s both; }
@keyframes fx-seam { from { transform: scaleY(0); opacity: 0; } to { transform: none; opacity: 1; } }
.fx .fx-top { animation: fx-drop .9s var(--out) .15s both; }
@keyframes fx-drop { from { opacity: 0; transform: translateY(-10px); } }
.fx-rise { animation: fx-rise .8s var(--spring-soft) both; }
@keyframes fx-rise { from { opacity: 0; transform: translateY(22px); } }
.fx-side.e .fx-card.fx-rise { animation-delay: .5s; }
.fx-side.a .fx-card.fx-rise { animation-delay: .62s; }
.fx-login.fx-rise { animation-delay: .3s; }
.fx-hint.fx-rise { animation-delay: .9s; }
.fx-leave { animation: fx-leave .32s var(--in) both; pointer-events: none; }
@keyframes fx-leave { to { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ---------- Уход: выбранная сторона заполняет кадр, чужая гаснет, затем открывается интерфейс ---------- */
.fx.out { pointer-events: none; animation: fx-out .6s var(--in) .55s both; }
@keyframes fx-out { to { opacity: 0; } }
.fx.out .fx-ui > * { transition: opacity .35s var(--in); opacity: 0; }
.fx.out[data-chose="elyos"] .fx-pan { transform: translateX(12.5%); }
.fx.out[data-chose="asmo"] .fx-pan { transform: translateX(-12.5%); }
.fx.out[data-chose="elyos"] .fx-half.e img, .fx.out[data-chose="asmo"] .fx-half.a img { transform: scale(1.1); }
.fx.out[data-chose="elyos"] .fx-veil.a, .fx.out[data-chose="asmo"] .fx-veil.e { opacity: 1; background: var(--night); }
.fx.out[data-chose="elyos"] .fx-glow.e, .fx.out[data-chose="asmo"] .fx-glow.a { opacity: 1; animation: none; transform: scale(1.4); transition: opacity .5s, transform 1.1s var(--out); }
.fx.out:not([data-chose]) { animation-delay: 0s; }

/* ---------- Вход → интерфейс: половины арта расходятся «дверями» по шву, в проёме — интерфейс ---------- */
.fx.doors { background: transparent; transition: background .3s; }
.fx.doors .fx-shade, .fx.doors .fx-dust, .fx.doors .fx-veil, .fx.doors .fx-glow { opacity: 0; transition: opacity .32s var(--in); }
/* логотип и надписи уходят раньше, чем открываются двери: поверх интерфейса они не висят */
.fx.doors .fx-ui { opacity: 0; transition: opacity .18s var(--in); }
.fx.doors .fx-half { transition: transform .9s cubic-bezier(.7, 0, .2, 1); }
.fx.doors .fx-half.e { transform: translateX(-52%); }
.fx.doors .fx-half.a { transform: translateX(52%); }
/* ПК: двери уходят симметрично и целиком за 600 мс; невыбранная половина гаснет за 250 мс (раньше она висела
   полупрозрачным тёмным слоем с жёсткой кромкой поперёк героя). По движущейся кромке каждой двери — свет 2 px. */
@media (min-width: 761px) {
  .fx.doors .fx-half { transition: transform .6s cubic-bezier(.7, 0, .2, 1), opacity .25s var(--in); }
  .fx.doors .fx-half.e { transform: translateX(-100%); }
  .fx.doors .fx-half.a { transform: translateX(100%); }
  .fx.doors[data-chose="asmo"] .fx-half.e, .fx.doors[data-chose="elyos"] .fx-half.a { opacity: 0; }
  .fx-half::after { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; opacity: 0; pointer-events: none;
    background: linear-gradient(180deg, transparent, #fff 20%, #fff 80%, transparent); box-shadow: 0 0 24px 4px rgba(214, 196, 255, .75); }
  .fx-half.e::after { left: calc(50% - 2px); } .fx-half.a::after { left: 50%; }
  .fx.doors .fx-half::after { opacity: 1; transition: opacity .12s; }
}
/* шов — тонкая линия 2 px, гаснет к 450 мс: широкая светлая полоса над героем читалась как артефакт */
.fx.doors .fx-seam { animation: fx-seam-open .45s var(--out) both; }
.fx.doors .fx-seam::after { opacity: 0; transition: opacity .15s; }
@keyframes fx-seam-open { 0% { opacity: 1; } 100% { opacity: 0; transform: scaleX(1.5); } }
.fx.doors .fx-seam i { display: none; }
/* выбор стороны: выбранная половина на миг светлеет, чужая уходит в тень, затем те же «двери», что после входа */
.fx[data-chose="elyos"] .fx-half.e img, .fx[data-chose="asmo"] .fx-half.a img { filter: brightness(1.12); transition: filter .25s, transform 1.2s var(--out); }
.fx[data-chose="elyos"] .fx-veil.a, .fx[data-chose="asmo"] .fx-veil.e { opacity: 1; }

/* ---------- Телефон: половины сверху и снизу ---------- */
@media (max-width: 760px) {
  .fx-kb { inset: 0; }
  .fx-half { transition: inset .9s var(--spring-soft); }
  /* Каждая половина показывает только свою сторону арта: край картинки ставим ровно по шву кадра (50 %),
     чтобы в нижнюю половину не попадали доспех элийки и жёсткая линия раздела. */
  .fx-half img {
    position: absolute; top: -4%; height: 108%; width: auto; object-fit: fill;
    transition: transform 1.2s var(--out), translate .9s var(--spring-soft), left .9s var(--spring-soft), height .9s var(--spring-soft), top .9s var(--spring-soft);
  }
  .fx-half.e, .fx-half.a { clip-path: none; }
  .fx-half.e { inset: 0 0 50% 0; }
  .fx-half.a { inset: 50% 0 0 0; }
  .fx-half.e img { left: 100%; translate: -49.5% 0; transform-origin: 72% 30%; }
  .fx-half.a img { left: 0; translate: -50.5% 0; transform-origin: 22% 30%; }
  .fx-veil { width: auto; left: 0; right: 0; height: 50%; }
  .fx-veil.e { top: 0; bottom: auto; }
  .fx-veil.a { top: 50%; bottom: auto; left: 0; }
  .fx-glow { left: 0; right: 0; width: auto; height: 50%; }
  .fx-glow.e { top: 0; bottom: auto; }
  .fx-glow.a { top: 50%; bottom: auto; }
  .fx-seam { left: -6%; right: -6%; top: 50%; bottom: auto; width: auto; height: 2px; margin: -1px 0 0; }
  .fx-seam::before { background: linear-gradient(90deg, transparent, rgba(255, 246, 225, .85) 22%, #fff 50%, rgba(214, 196, 255, .85) 78%, transparent); }
  .fx-seam::after { left: 0; right: 0; top: -40px; bottom: -40px; background: linear-gradient(180deg, transparent, rgba(255, 220, 160, .22) 44%, rgba(255, 255, 255, .28) 50%, rgba(176, 140, 255, .24) 56%, transparent); }
  .fx-seam i { top: -3px; left: 0; width: 140px; height: 8px; animation-name: fx-run-x; }
  @keyframes fx-run-x { from { transform: translateX(-160px); } to { transform: translateX(calc(100vw + 160px)); } }
  .fx.ready .fx-seam { animation-name: fx-seam-x; }
  @keyframes fx-seam-x { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
  .fx[data-hover] .fx-pan { transform: none; }
  .fx.out[data-chose] .fx-pan { transform: none; }
  .fx.out[data-chose="elyos"] .fx-half.e { inset: 0; }
  .fx.out[data-chose="asmo"] .fx-half.a { inset: 0; }
  .fx.out[data-chose="elyos"] .fx-half.a, .fx.out[data-chose="asmo"] .fx-half.e { opacity: 0; transition: opacity .4s; }
  .fx-shade { background: linear-gradient(180deg, transparent 30%, rgba(4, 5, 10, .7) 50%, transparent 50.1%), linear-gradient(0deg, rgba(4, 5, 10, .8), transparent 26%), linear-gradient(180deg, rgba(4, 5, 10, .5), transparent 16%); }
  .fx-top { left: 16px; translate: none; justify-items: start; text-align: left; top: calc(14px + env(safe-area-inset-top)); }
  .fx-logo { width: 104px; }
  .fx-eyebrow { font-size: 15px; letter-spacing: .1em; }
  .fx-eyebrow small { display: none; }
  .fx-hint { display: none; }
  .fx-side { width: auto; left: 0; right: 0; height: 50%; }
  .fx-side.e { top: 0; }
  .fx-side.a { top: 50%; }
  .fx-card { bottom: 20px; max-width: calc(100vw - 40px); gap: 6px; }
  .fx-side.e .fx-card { left: 20px; }
  .fx-side.a .fx-card { right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); }
  .fx-name { font-size: 46px; }
  .fx-sub { font-size: 14px; }
  .fx-go { margin-top: 2px; padding: 7px 14px; }
  .fx-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }

  /* Вход на телефоне: две вертикальные полосы — лица видны над карточкой, карточка у большого пальца. */
  .fx[data-mode="login"] .fx-half.e { inset: 0 50% 0 0; }
  .fx[data-mode="login"] .fx-half.a { inset: 0 0 0 50%; }
  .fx[data-mode="login"] .fx-half img { top: 0; height: 100%; }
  .fx[data-mode="login"] .fx-half.e img { left: 0; translate: -28.7% 0; }
  .fx[data-mode="login"] .fx-half.a img { left: 0; translate: -55.3% 0; }
  .fx[data-mode="login"] .fx-seam { left: 50%; right: auto; top: -6%; bottom: -6%; width: 2px; height: auto; margin: 0 0 0 -1px; }
  .fx[data-mode="login"] .fx-seam::before { background: linear-gradient(180deg, transparent, rgba(255, 246, 225, .85) 22%, #fff 50%, rgba(214, 196, 255, .85) 78%, transparent); }
  .fx[data-mode="login"] .fx-seam::after { display: none; }
  .fx[data-mode="login"] .fx-seam i { display: none; }
  .fx[data-mode="login"] .fx-shade { background: linear-gradient(0deg, rgba(4, 5, 10, .9) 0%, rgba(4, 5, 10, .5) 40%, transparent 62%), linear-gradient(180deg, rgba(4, 5, 10, .55), transparent 20%); }
  .fx[data-mode="login"] .fx-top { left: 50%; translate: -50% 0; justify-items: center; text-align: center; }
  .fx[data-mode="login"] .fx-logo { width: 128px; }
  .fx-login { bottom: calc(16px + env(safe-area-inset-bottom)); padding: 18px 16px 16px; }
  /* двери на телефоне: половины — узкие полосы, уезжают целиком */
  .fx.doors[data-mode="login"] .fx-half.e { transform: translateX(-102%); }
  .fx.doors[data-mode="login"] .fx-half.a { transform: translateX(102%); }
  /* выбор стороны на телефоне: половины сверху и снизу — двери расходятся по горизонтальному шву */
  .fx.doors[data-mode="pick"] .fx-half.e { transform: translateY(-102%); }
  .fx.doors[data-mode="pick"] .fx-half.a { transform: translateY(102%); }
}

/* Без анимаций: статичная картинка, смены мгновенные (общее правило styles.css снимает transition/animation). */
@media (prefers-reduced-motion: reduce) {
  .fx-dust, .fx-seam i { display: none; }
  .fx-stage { opacity: 1; }
}
