/* ═══════════════════════════════════════════════════════════════════════════
   Voron VPN — сайт.

   Материал и палитра — дословно мини-аппы (`miniapp/css/styles.css`, §4д в
   claude/MINIAPP.md): фон — подложка логотипа, акцент — серебро, единственный
   цвет — голубое свечение маскота, и только под маскотом. Металлом заливаются
   только кнопка действия и главное число. Всё остальное — поверхность со швом.

   Движение — только то, что объясняет интерфейс: плавное появление блоков при
   прокрутке, отклик на наведение, открытие окна. Без прыжков, вращений и
   бесконечных анимаций. `prefers-reduced-motion` выключает всё.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;

  --ag-0: #FFFFFF;
  --ag-1: #E9EEF6;
  --ag-2: #C9D2E0;
  --ag-3: #A3AEC0;
  --ag-4: #7C8799;
  --ag-5: #5A6476;
  --ag-6: #3D4657;
  --ag-7: #262E3D;

  --ok: #2FBF8B;
  --warn: #E3A340;
  --bad: #E4566E;
  --gold: linear-gradient(135deg, #FFDF97 0%, #F7BE45 100%);
  --voron-bloom: rgba(79, 211, 228, .30);
  --voron-glow: rgba(79, 211, 228, .55);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.4, 0, .2, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --side-w: 264px;
  --wrap: 1200px;
  --pad: 24px;
}

/* Светлая тема — дословно мини-аппы: фон серый, а не белый, иначе серебро не
   проявляется. Плита действия — тёмная сталь. */
:root[data-theme="light"] {
  --bg: #EDF0F6;
  --bg-2: #E4E8F0;
  --surface: #FFFFFF;
  --surface-2: #E7EBF3;
  --surface-3: #DBE1EC;
  --sk: #DEE3EC;
  --sk-shine: rgba(255, 255, 255, .62);
  --text: #080C14;
  --text-2: #5C667A;
  --text-3: #8B95A8;
  --line: rgba(8, 16, 34, .09);
  --line-2: rgba(8, 16, 34, .16);
  --shadow-soft: 0 10px 30px rgba(12, 22, 48, .08), 0 2px 6px rgba(12, 22, 48, .05);
  --shadow-float: 0 24px 60px rgba(12, 22, 48, .16), 0 4px 12px rgba(12, 22, 48, .07);
  --bevel: inset 0 1px 0 rgba(255, 255, 255, .9);
  --metal: linear-gradient(148deg,
      #7A8698 0%, #4A5566 12%, #262E3C 28%, #6E7A8C 40%,
      #39434F 54%, #1B222D 70%, #5D6979 86%, #2B333F 100%);
  --metal-fg: #F4F7FC;
  --metal-text: linear-gradient(180deg, #59647A 0%, #2B3444 45%, #10161F 100%);
  --ag-ink: #3D4657;
  --ag-rim: rgba(8, 16, 34, .20);
  --ring: #5A6476;               /* рамка выбранного: на светлом серебро растворяется */
  --glass: rgba(237, 240, 246, .72);
  --backdrop: rgba(12, 15, 30, .34);
  --card-hi: linear-gradient(180deg, #FFFFFF 0%, #F6F8FB 100%);
  --hero-card: linear-gradient(160deg, #1A2232 0%, #0B111C 60%, #070B13 100%);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #050A14;
  --bg-2: #070D19;
  --surface: #0B1220;
  --surface-2: #131B2A;
  --surface-3: #1B2436;
  --sk: #131B2A;
  --sk-shine: rgba(200, 220, 255, .06);
  --text: #E7ECF4;
  --text-2: #8B96A9;
  --text-3: #586274;
  --line: rgba(190, 208, 236, .09);
  --line-2: rgba(190, 208, 236, .16);
  --shadow-soft: 0 8px 26px rgba(0, 0, 0, .55);
  --shadow-float: 0 24px 60px rgba(0, 0, 0, .72);
  --bevel: inset 0 1px 0 rgba(226, 236, 250, .07);
  --metal: linear-gradient(148deg,
      #FDFEFF 0%, #DDE5F0 11%, #A6B1C4 25%, #F1F5FB 38%,
      #C1CBDA 51%, #8A95A8 67%, #E2E9F3 83%, #A8B3C5 100%);
  --metal-fg: #050A12;
  --metal-text: linear-gradient(180deg, #FFFFFF 0%, #D5DDEA 45%, #9BA6B9 100%);
  --ag-ink: #C9D2E0;
  --ag-rim: rgba(190, 208, 236, .20);
  --ring: #A3AEC0;
  --glass: rgba(5, 10, 20, .72);
  --backdrop: rgba(0, 0, 0, .62);
  --card-hi: linear-gradient(180deg, #0D1524 0%, #0A101C 100%);
  --hero-card: linear-gradient(160deg, #111A2B 0%, #080E1A 60%, #060A13 100%);
  color-scheme: dark;
}

/* ── База ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font);
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(160, 175, 200, .35); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.noscript { padding: 40px; text-align: center; }

.icon {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.icon.sm { width: 18px; height: 18px; }
.icon.lg { width: 28px; height: 28px; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { opacity: .55; animation: bootPulse 1.6s var(--ease-io) infinite alternate; }
@keyframes bootPulse { to { opacity: .9; } }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

/* ── Типографика ──────────────────────────────────────────────────────────── */
.engrave {
  font-size: 12px; font-weight: 600; line-height: 1;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-3);
}
.metal-text {
  background-image: var(--metal-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.03em; line-height: 1.08; }
p { margin: 0; }

/* ── Кнопки ───────────────────────────────────────────────────────────────── */
.btn {
  --h: 48px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 22px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease), box-shadow .25s var(--ease), opacity .2s;
  user-select: none; -webkit-user-select: none;
  isolation: isolate;
}
.btn .icon { width: 20px; height: 20px; }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.is-busy { opacity: .5; pointer-events: none; }
.btn-lg { --h: 56px; padding: 0 30px; font-size: 16px; }
.btn-sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }

/* Плита действия: металл, один на экран. Блик проходит по ней при наведении —
   единственная «живая» деталь, и она отвечает на действие человека. */
.btn-primary {
  background: var(--metal);
  color: var(--metal-fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 0, 0, .18),
              0 10px 28px rgba(0, 0, 0, .22);
  overflow: hidden;
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -1px 0 rgba(0, 0, 0, .18),
                     0 14px 34px rgba(0, 0, 0, .3); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn-ghost:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ag-rim); }
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-soft:hover { background: var(--surface-3); }
.btn-danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1px rgba(228, 86, 110, .35); }
.btn-danger:hover { background: rgba(228, 86, 110, .08); }
.btn-link { height: auto; padding: 0; border-radius: 6px; color: var(--text-2); font-weight: 500; }
.btn-link:hover { color: var(--text); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  border-radius: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .icon { width: 20px; height: 20px; }
.icon-btn.is-danger:hover { color: var(--bad); }
.icon-btn.round { border-radius: 999px; }
.icon-btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }

/* Спиннер в кнопке на время запроса. */
.spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Поверхности ──────────────────────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--bevel), 0 0 0 1px var(--line);
  padding: 24px;
}
.card-hi { background: var(--card-hi); }
.card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-title { font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.card-sub { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.sep { height: 1px; background: var(--line); margin: 20px 0; border: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--text-2);
  background: var(--surface-2);
  white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-ok { color: var(--ok); background: rgba(47, 191, 139, .1); }
.chip-warn { color: var(--warn); background: rgba(227, 163, 64, .11); }
.chip-bad { color: var(--bad); background: rgba(228, 86, 110, .1); }
.chip-gold { color: #3A2A06; background: var(--gold); }
.chip-metal { color: var(--metal-fg); background: var(--metal); }

.badge-new { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* Колодец — выемка под ключ и ссылку: тот же приём, что у мини-аппы. */
.well {
  display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 6px 6px 6px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18), inset 0 0 0 1px var(--line);
}
.well-text {
  flex: 1; min-width: 0;
  font: 500 14px/1.3 var(--mono);
  color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: pointer;
}
.well-text:hover { color: var(--text); }
.well .icon-btn { background: var(--surface); }
.well .icon-btn:hover { background: var(--surface-3); }

/* Полоса прогресса: дорожка — поверхность, заливка — металл. */
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden;
       box-shadow: inset 0 1px 1px rgba(0, 0, 0, .15); }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--metal);
           width: 0; transition: width .9s var(--ease); }
.bar.is-warn > i { background: linear-gradient(90deg, #E3A340, #F2C46D); }
.bar.is-bad > i { background: linear-gradient(90deg, #C9425A, #E4566E); }

/* Сегменты (переключатель). */
.seg {
  display: inline-flex; gap: 4px; padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--text-2);
  white-space: nowrap; flex: none;
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--bevel), 0 1px 3px rgba(0, 0, 0, .25), 0 0 0 1px var(--line); }
.seg button .icon { width: 18px; height: 18px; }

/* Выбор из нескольких (срок, способ оплаты, пакет). */
.opt {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--bevel), inset 0 0 0 1px var(--line);
  text-align: left;
  transition: box-shadow .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease);
}
.opt:hover { box-shadow: var(--bevel), inset 0 0 0 1px var(--line-2); }
.opt.on { box-shadow: var(--bevel), inset 0 0 0 1.5px var(--ring), 0 8px 24px rgba(0, 0, 0, .18); }
.opt-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--ag-ink); flex: none; }
.opt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.opt-main b { font-weight: 600; font-size: 15.5px; }
.opt-main span { font-size: 13.5px; color: var(--text-2); }
.opt-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.opt-side b { font-size: 16px; font-weight: 650; white-space: nowrap; }
.opt-side s { font-size: 13px; color: var(--text-3); white-space: nowrap; }
.radio { width: 20px; height: 20px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow .2s var(--ease); }
.opt.on .radio { box-shadow: inset 0 0 0 6px var(--ag-ink); }

/* Переключатель вкл/выкл. */
.switch { position: relative; width: 46px; height: 28px; border-radius: 99px; background: var(--surface-3); flex: none; transition: background-color .25s var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .25s var(--ease); }
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(18px); }

/* Поля. */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input {
  height: 50px; width: 100%; padding: 0 16px;
  border-radius: 14px; border: 0; outline: 0;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 16px;
  transition: box-shadow .2s var(--ease);
}
.input:focus { box-shadow: inset 0 0 0 1.5px var(--ring); }
.input.upper { text-transform: uppercase; }
.input.upper::placeholder { text-transform: none; }
.input::placeholder { color: var(--text-3); }
.field-hint { font-size: 13px; color: var(--text-3); }
.field-err { font-size: 13px; color: var(--bad); min-height: 0; }

/* Скелетон. */
.sk { position: relative; overflow: hidden; background: var(--sk); border-radius: 10px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
             background: linear-gradient(90deg, transparent, var(--sk-shine), transparent);
             animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* Появление при прокрутке. */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; } .rv-d2 { transition-delay: .16s; } .rv-d3 { transition-delay: .24s; }
/* В кабинете — короче и ближе: это рабочий интерфейс, контент не должен «выплывать». */
.page .rv { transform: translateY(8px); transition-duration: .45s; }
.page .rv-d1 { transition-delay: .04s; } .page .rv-d2 { transition-delay: .08s; }

/* Ворон и его свет. Свечение — только под маскотом (MINIAPP.md §4д). */
.raven { position: relative; }
.raven::before {
  content: ""; position: absolute; left: 50%; top: 56%;
  width: 92%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--voron-bloom), transparent 72%);
  filter: blur(8px);
  pointer-events: none; z-index: 0;
}
.raven img { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   ЛЕНДИНГ
   ═══════════════════════════════════════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 40;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), backdrop-filter .3s;
}
.nav.scrolled {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; }
:root[data-theme="light"] .brand img, :root[data-theme="light"] .logo-ink { filter: brightness(.35) contrast(1.4); }
.nav-links { display: flex; gap: 6px; margin-left: 12px; }
.nav-links a { padding: 8px 12px; border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--text-2); transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; }

.mnav {
  position: fixed; inset: 76px 0 auto 0; z-index: 39;
  background: var(--bg); box-shadow: 0 1px 0 var(--line), var(--shadow-float);
  padding: 12px var(--pad) 24px;
  display: none; flex-direction: column; gap: 4px;
}
.mnav.open { display: flex; animation: dropIn .25s var(--ease); }
.mnav a { padding: 14px 4px; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--line); }
.mnav .btn { margin-top: 14px; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } }

/* Герой. */
.hero { position: relative; padding: 56px 0 40px; overflow: hidden; }
.hero::before {
  /* Тонкая сетка-гравировка под всем героем: глубина без картинки. */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 0%, transparent 75%);
  opacity: .6;
}
.hero-in { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; }
.hero-copy { position: relative; z-index: 2; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 999px;
                background: var(--surface); box-shadow: var(--bevel), 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.hero-eyebrow .chip { height: 22px; font-size: 11.5px; }
.hero h1 { margin-top: 26px; font-size: clamp(40px, 6.2vw, 76px); letter-spacing: -.045em; line-height: 1.02; }
.hero h1 .metal-text { display: inline; }
.hero-lead { margin-top: 24px; max-width: 540px; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--text-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 40px; color: var(--text-2); font-size: 14.5px; }
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .icon { width: 18px; height: 18px; color: var(--ag-ink); }

.hero-art { position: relative; min-height: 520px; display: flex; align-items: center; justify-content: center; }
.hero-art .raven { width: min(480px, 92%); }
.hero-art .raven::before { width: 110%; top: 60%; background: radial-gradient(closest-side, rgba(79, 211, 228, .34), rgba(79, 211, 228, .08) 55%, transparent 75%); }
.hero-rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.hero-rings i { position: absolute; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); }
.hero-rings i:nth-child(1) { width: 78%; aspect-ratio: 1; }
.hero-rings i:nth-child(2) { width: 100%; aspect-ratio: 1; opacity: .7; }
.hero-rings i:nth-child(3) { width: 124%; aspect-ratio: 1; opacity: .4; }

/* Карточка доступа поверх героя — витрина того, что человек получит. */
.pass {
  position: absolute; left: -2%; bottom: 8%; z-index: 3;
  width: 300px; padding: 20px 22px;
  border-radius: 22px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: var(--bevel), 0 0 0 1px var(--line-2), var(--shadow-float);
}
.pass-top { display: flex; justify-content: space-between; align-items: center; }
.pass-num { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.pass-num b { font-size: 46px; font-weight: 750; letter-spacing: -.05em; line-height: 1; }
.pass-num span { color: var(--text-2); font-weight: 500; }
.pass-key { margin-top: 14px; font: 500 12.5px var(--mono); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pass-bar { margin-top: 14px; }
.pass-foot { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12.5px; color: var(--text-3); }

/* Лента фактов под героем. */
.facts { padding: 8px 0 24px; }
.facts-in { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--bevel), 0 0 0 1px var(--line); }
.fact { padding: 26px 28px; }
.fact + .fact { box-shadow: inset 1px 0 0 var(--line); }
.fact b { display: block; font-size: clamp(26px, 3vw, 34px); font-weight: 750; letter-spacing: -.04em; line-height: 1.1; }
.fact span { display: block; margin-top: 6px; font-size: 14px; color: var(--text-2); }

/* Секции. */
.section { padding: 112px 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head h2 { margin-top: 16px; font-size: clamp(32px, 4.2vw, 52px); letter-spacing: -.04em; }
.section-head p { margin-top: 18px; font-size: 18px; color: var(--text-2); line-height: 1.6; }

/* Возможности: бенто. */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile {
  position: relative; overflow: hidden;
  padding: 30px; border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--bevel), 0 0 0 1px var(--line);
  grid-column: span 2;
  transition: box-shadow .3s var(--ease);
}
.tile:hover { box-shadow: var(--bevel), 0 0 0 1px var(--line-2); }
.tile.w3 { grid-column: span 3; }
.tile.w4 { grid-column: span 4; }
.tile-ico { width: 44px; height: 44px; color: var(--ag-ink); }
.tile-ico .icon { width: 30px; height: 30px; stroke-width: 1.5; }
.tile h3 { margin-top: 22px; font-size: 20px; letter-spacing: -.02em; line-height: 1.25; }
.tile p { margin-top: 10px; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.tile-big { min-height: 330px; display: flex; flex-direction: column; }
.tile-big h3 { font-size: clamp(24px, 2.4vw, 30px); max-width: 420px; }
.tile-big p { max-width: 420px; font-size: 16px; }
.tile-art { position: absolute; right: -10px; bottom: -14px; width: 46%; max-width: 280px; }
.tile-art.raven::before { top: 62%; }
.tile-stat { margin-top: auto; padding-top: 28px; display: flex; gap: 36px; }
.tile-stat b { display: block; font-size: 36px; font-weight: 750; letter-spacing: -.04em; line-height: 1; }
.tile-stat span { display: block; margin-top: 6px; font-size: 13px; color: var(--text-3); }

/* LTE-блок. */
.lte { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.lte-points { display: grid; gap: 22px; margin-top: 36px; }
.lte-point { display: flex; gap: 16px; }
.lte-point .num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; font-weight: 650; color: var(--text-2); }
.lte-point b { display: block; font-size: 16.5px; font-weight: 600; }
.lte-point span { display: block; margin-top: 4px; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.lte-card { padding: 34px; border-radius: var(--r-xl); background: var(--hero-card); color: #E7ECF4; box-shadow: inset 0 1px 0 rgba(226, 236, 250, .08), 0 0 0 1px rgba(190, 208, 236, .1), var(--shadow-float); }
.lte-card .engrave { color: #7C8799; }
.lte-card .big { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.lte-card .big b { font-size: 64px; font-weight: 750; letter-spacing: -.05em; line-height: 1;
                   background-image: linear-gradient(180deg, #FFFFFF 0%, #D5DDEA 45%, #9BA6B9 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lte-card .big span { color: #8B96A9; font-size: 18px; }
.lte-card .bar { margin-top: 22px; background: rgba(255, 255, 255, .07); }
.lte-card .bar > i { background: linear-gradient(148deg, #FDFEFF 0%, #DDE5F0 11%, #A6B1C4 25%, #F1F5FB 38%, #C1CBDA 51%, #8A95A8 67%, #E2E9F3 83%, #A8B3C5 100%); }
.lte-card .rows { margin-top: 26px; display: grid; gap: 0; }
.lte-card .rows div { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid rgba(190, 208, 236, .09); font-size: 15px; color: #8B96A9; }
.lte-card .rows div b { color: #E7ECF4; font-weight: 600; }

/* Шаги. */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: st; }
.step { padding: 30px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--bevel), 0 0 0 1px var(--line); }
.step-n { font: 700 13px var(--mono); color: var(--text-3); letter-spacing: .1em; }
.step h3 { margin-top: 40px; font-size: 21px; letter-spacing: -.02em; }
.step p { margin-top: 10px; color: var(--text-2); font-size: 15px; line-height: 1.6; }

/* Платформы. */
.plats { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.plat { padding: 24px 16px; border-radius: var(--r-md); text-align: center; background: var(--surface); box-shadow: var(--bevel), 0 0 0 1px var(--line);
        transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.plat:hover { box-shadow: var(--bevel), 0 0 0 1px var(--line-2); transform: translateY(-2px); }
.plat .icon { width: 30px; height: 30px; stroke-width: 1.5; color: var(--ag-ink); margin: 0 auto; }
.plat b { display: block; margin-top: 14px; font-size: 15px; font-weight: 600; }
.plat span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--text-3); }

/* Тарифы. */
.prices { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; align-items: stretch; }
.price {
  position: relative; display: flex; flex-direction: column;
  padding: 26px 22px 22px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--bevel), 0 0 0 1px var(--line);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.price:hover { box-shadow: var(--bevel), 0 0 0 1px var(--line-2), var(--shadow-soft); transform: translateY(-3px); }
.price.best { background: var(--hero-card); color: #E7ECF4; box-shadow: inset 0 1px 0 rgba(226, 236, 250, .1), 0 0 0 1px rgba(201, 210, 224, .28), var(--shadow-float); }
.price.best .muted, .price.best .faint { color: #8B96A9; }
.price-top { display: flex; align-items: center; justify-content: space-between; min-height: 26px; }
.price-name { font-size: 15px; font-weight: 600; color: var(--text-2); }
.price.best .price-name { color: #C9D2E0; }
.price-sum { margin-top: 22px; font-size: 38px; font-weight: 750; letter-spacing: -.045em; line-height: 1; }
.price.best .price-sum { background-image: linear-gradient(180deg, #FFFFFF 0%, #D5DDEA 45%, #9BA6B9 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.price-per { margin-top: 10px; font-size: 14px; color: var(--text-2); min-height: 21px; }
.price-per s { color: var(--text-3); margin-left: 6px; }
.price .btn { margin-top: auto; }
.price-list { margin: 22px 0 24px; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.price.best .price-list { color: #A3AEC0; }
.price-list li { display: flex; gap: 8px; align-items: flex-start; }
.price-list .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--ag-ink); }
.price.best .price-list .icon { color: #C9D2E0; }
.price.best .btn-primary { background: linear-gradient(148deg, #FDFEFF 0%, #DDE5F0 11%, #A6B1C4 25%, #F1F5FB 38%, #C1CBDA 51%, #8A95A8 67%, #E2E9F3 83%, #A8B3C5 100%); color: #050A12; }
.prices-note { margin-top: 26px; text-align: center; color: var(--text-3); font-size: 14px; }
.prices-common { display: none; margin: -24px 0 22px; text-align: center; color: var(--text-2); font-size: 14.5px; }

/* Методы оплаты строкой. */
.paylogos { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.paylogos span { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--bevel), 0 0 0 1px var(--line); font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.paylogos .icon { width: 17px; height: 17px; }

/* Рефералка на лендинге. */
.refband { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 48px; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--bevel), 0 0 0 1px var(--line); overflow: hidden; }
.refband h2 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.04em; }
.refband p { margin-top: 16px; color: var(--text-2); font-size: 17px; line-height: 1.6; }
.refband .raven::before { top: 64%; }

/* Вопросы. */
.faq { max-width: 860px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 4px; font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .3s var(--ease); color: var(--text-3); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq .ans { padding: 0 4px 26px; color: var(--text-2); font-size: 16px; line-height: 1.7; max-width: 720px; }

/* Финальный призыв. */
.cta { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; padding: 64px; border-radius: var(--r-xl); background: var(--hero-card); color: #E7ECF4; box-shadow: inset 0 1px 0 rgba(226, 236, 250, .08), 0 0 0 1px rgba(190, 208, 236, .1); }
.cta h2 { font-size: clamp(30px, 3.8vw, 48px); letter-spacing: -.04em; max-width: 620px; }
.cta p { margin-top: 16px; color: #8B96A9; font-size: 17px; max-width: 520px; }
.cta .btn-primary { background: linear-gradient(148deg, #FDFEFF 0%, #DDE5F0 11%, #A6B1C4 25%, #F1F5FB 38%, #C1CBDA 51%, #8A95A8 67%, #E2E9F3 83%, #A8B3C5 100%); color: #050A12; }
.cta .btn-ghost { color: #E7ECF4; box-shadow: inset 0 0 0 1px rgba(190, 208, 236, .2); }
.cta .btn-ghost:hover { background: rgba(255, 255, 255, .06); }
.cta-art { width: 260px; margin: -40px -20px -64px 0; align-self: end; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Подвал. */
.footer { padding: 72px 0 48px; margin-top: 40px; box-shadow: inset 0 1px 0 var(--line); }
.footer-in { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer p { margin-top: 16px; color: var(--text-3); font-size: 14px; max-width: 300px; line-height: 1.6; }
.footer h4 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.footer ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.footer a { color: var(--text-2); font-size: 15px; transition: color .2s; }
.footer a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 24px; box-shadow: inset 0 1px 0 var(--line); color: var(--text-3); font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════════════════
   ВХОД
   ═══════════════════════════════════════════════════════════════════════════ */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; background: var(--hero-card); color: #E7ECF4; }
.login-art .brand { color: #E7ECF4; }
.login-art .brand img { filter: none !important; }
.login-art .raven { width: min(440px, 80%); margin: 0 auto; }
.login-art .quote { max-width: 440px; font-size: 22px; line-height: 1.4; letter-spacing: -.02em; font-weight: 600; }
.login-art .quote span { display: block; margin-top: 12px; font-size: 15px; font-weight: 400; color: #8B96A9; letter-spacing: 0; }
.login-side { display: flex; flex-direction: column; padding: 40px 48px; }
.login-top { display: flex; justify-content: space-between; align-items: center; }
.login-box { margin: auto; width: 100%; max-width: 420px; padding: 40px 0; }
.login-box h1 { font-size: clamp(30px, 3.4vw, 40px); letter-spacing: -.04em; }
.login-mark { display: none; margin-bottom: 22px; }
:root[data-theme="light"] .login-mark img { filter: brightness(.35) contrast(1.4); }
.login-box > p { margin-top: 14px; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.login-box .btn-lg { margin-top: 32px; }
.login-points { margin: 32px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; color: var(--text-2); font-size: 14.5px; }
.login-points li { display: flex; gap: 12px; align-items: flex-start; }
.login-points .icon { width: 19px; height: 19px; color: var(--ag-ink); margin-top: 1px; }
.login-wait { margin-top: 28px; padding: 22px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--bevel), 0 0 0 1px var(--line); }
.login-wait-head { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.login-wait p { margin-top: 10px; font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.login-qr { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.login-qr canvas { width: 132px; height: 132px; border-radius: 14px; }
.login-qr p { margin: 0; font-size: 13.5px; }
.login-err { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: rgba(228, 86, 110, .08); color: var(--bad); font-size: 14px; }
.login-foot { color: var(--text-3); font-size: 13px; text-align: center; }
.login-foot a { text-decoration: underline; text-underline-offset: 3px; }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(47, 191, 139, .5); animation: pulse 1.8s var(--ease-io) infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(47, 191, 139, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 191, 139, 0); } }

/* ═══════════════════════════════════════════════════════════════════════════
   КАБИНЕТ
   ═══════════════════════════════════════════════════════════════════════════ */
.shell { min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; z-index: 30;
  width: var(--side-w);
  display: flex; flex-direction: column;
  padding: 24px 16px 18px;
  background: var(--bg-2);
  box-shadow: inset -1px 0 0 var(--line);
}
.side .brand { padding: 4px 10px 26px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; scrollbar-width: none; }
.side-nav::-webkit-scrollbar { display: none; }
.side-label { padding: 18px 12px 8px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 12px;
  border-radius: 12px;
  color: var(--text-2); font-size: 15px; font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.nav-item .icon { width: 20px; height: 20px; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.on { background: var(--surface); color: var(--text); box-shadow: var(--bevel), 0 0 0 1px var(--line); }
.nav-item.on::before { content: ""; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--metal); }
.nav-item .tail { margin-left: auto; font-size: 12.5px; color: var(--text-3); }
.side-user { display: flex; align-items: center; gap: 12px; padding: 14px 10px 0; margin-top: 12px; box-shadow: inset 0 1px 0 var(--line); }
.ava { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none; overflow: hidden;
       background: var(--metal); color: var(--metal-fg); font-weight: 700; font-size: 15px; }
.ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ava.lg { width: 64px; height: 64px; font-size: 24px; }
.side-user .who { flex: 1; min-width: 0; }
.side-user .who b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { display: block; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: none; }
.page { width: 100%; max-width: 1180px; padding: 44px 48px 80px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.page-head h1 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -.04em; }
.page-head p { margin-top: 10px; color: var(--text-2); font-size: 16px; max-width: 620px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }

/* Карта доступа — главный предмет кабинета. Тёмная в обеих темах, как у
   мини-аппы: это корпус, а не поверхность. */
.acard {
  position: relative; overflow: hidden;
  min-height: 360px;
  padding: 32px 34px;
  border-radius: var(--r-xl);
  background: var(--hero-card);
  color: #E7ECF4;
  box-shadow: inset 0 1px 0 rgba(226, 236, 250, .08), 0 0 0 1px rgba(190, 208, 236, .1), var(--shadow-soft);
  display: flex; flex-direction: column;
  isolation: isolate;
}
.acard::after {
  /* Гравировка-сетка, как на лендинге, только тише. */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(190, 208, 236, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(190, 208, 236, .05) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 85% 50%, #000, transparent 70%);
          mask-image: radial-gradient(ellipse 60% 80% at 85% 50%, #000, transparent 70%);
}
.acard .engrave { color: #7C8799; }
.acard-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 2; max-width: 62%; }
.acard-body { position: relative; z-index: 2; max-width: 62%; margin-top: 26px; }
.acard-num { display: flex; align-items: baseline; gap: 12px; }
.acard-num b { font-size: clamp(64px, 7vw, 92px); font-weight: 760; letter-spacing: -.055em; line-height: .9;
               background-image: linear-gradient(180deg, #FFFFFF 0%, #D5DDEA 45%, #9BA6B9 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.acard-num span { font-size: 22px; color: #8B96A9; font-weight: 500; }
.acard-title { font-size: clamp(30px, 3.2vw, 40px); font-weight: 720; letter-spacing: -.04em; line-height: 1.1;
               background-image: linear-gradient(180deg, #FFFFFF 0%, #D5DDEA 45%, #9BA6B9 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.acard-sub { margin-top: 12px; color: #8B96A9; font-size: 15.5px; line-height: 1.55; }
.acard-key { position: relative; z-index: 2; margin-top: auto; padding-top: 26px; max-width: 60%; }
.acard .well { background: rgba(255, 255, 255, .045); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(190, 208, 236, .1); }
.acard .well-text { color: #A3AEC0; }
.acard .well-text:hover { color: #E7ECF4; }
.acard .well .icon-btn { background: rgba(255, 255, 255, .06); color: #C9D2E0; }
.acard .well .icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.acard-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; max-width: 64%; }
.acard .btn-primary { background: linear-gradient(148deg, #FDFEFF 0%, #DDE5F0 11%, #A6B1C4 25%, #F1F5FB 38%, #C1CBDA 51%, #8A95A8 67%, #E2E9F3 83%, #A8B3C5 100%); color: #050A12; }
.acard .btn-ghost { color: #E7ECF4; box-shadow: inset 0 0 0 1px rgba(190, 208, 236, .2); }
.acard .btn-ghost:hover { background: rgba(255, 255, 255, .06); }
.acard-raven { position: absolute; right: -10px; bottom: -6px; width: 44%; max-width: 380px; z-index: 1; pointer-events: none; }
.acard-raven.raven::before { top: 60%; width: 110%; }
.acard .chip { background: rgba(255, 255, 255, .06); color: #A3AEC0; }
.acard .chip-ok { color: #4FD6A4; background: rgba(47, 191, 139, .12); }
.acard .chip-warn { color: #F0B95C; background: rgba(227, 163, 64, .12); }
.acard .chip-bad { color: #F07A8E; background: rgba(228, 86, 110, .12); }
.key-notice { margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; font-size: 14px; color: #F0B95C; background: rgba(227, 163, 64, .1); }

/* Плитки-показатели. */
.stat-big { font-size: 40px; font-weight: 750; letter-spacing: -.045em; line-height: 1; }
.stat-big small { font-size: 17px; font-weight: 500; letter-spacing: 0; color: var(--text-2); margin-left: 6px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--text-2); }
.kv b { color: var(--text); font-weight: 600; text-align: right; }
.kv:first-child { border-top: 0; }

/* Год со скидкой — младшая сестра карты доступа (как в мини-аппе). */
.yo { position: relative; overflow: hidden; }
.yo .stat-big { font-size: 48px; }
.yo-badge { font-weight: 700; }

/* Строки списка. */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid var(--line); }
.li:first-child { border-top: 0; }
.li-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); color: var(--ag-ink); flex: none; }
.li-main { flex: 1; min-width: 0; }
.li-main b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-main span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--text-2); }
.li-side { text-align: right; font-weight: 600; white-space: nowrap; }
a.li { transition: opacity .2s; }
a.li:hover .li-main b { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }

/* Пустые состояния. */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 12px 12px; }
.empty .raven { width: 180px; }
.empty h3 { margin-top: 18px; font-size: 20px; }
.empty p { margin-top: 8px; color: var(--text-2); max-width: 420px; }

/* Покупка. */
.buy { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.buy-sec + .buy-sec { margin-top: 32px; }
.buy-sec h2 { font-size: 19px; letter-spacing: -.02em; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.buy-sec h2 .faint { font-size: 14px; font-weight: 500; letter-spacing: 0; }
.periods { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.period { flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 18px 16px; min-height: 132px; }
.period .p-name { font-weight: 600; font-size: 15px; color: var(--text-2); }
.period .p-sum { font-size: 27px; font-weight: 750; letter-spacing: -.035em; line-height: 1.1; margin-top: 6px; }
.period .p-per { font-size: 13px; color: var(--text-3); margin-top: auto; }
.period .p-per s { margin-left: 4px; }
.period .chip { position: absolute; top: 14px; right: 14px; height: 22px; font-size: 11.5px; padding: 0 9px; }
.period.on .p-name { color: var(--text); }
.ladder { display: flex; flex-wrap: wrap; gap: 8px; }
.ladder button { min-width: 56px; height: 48px; padding: 0 14px; border-radius: 14px; font-weight: 650; font-size: 16px;
                 background: var(--surface); box-shadow: var(--bevel), inset 0 0 0 1px var(--line); transition: box-shadow .2s var(--ease), background-color .2s; }
.ladder button:hover { box-shadow: var(--bevel), inset 0 0 0 1px var(--line-2); }
.ladder button.on { background: var(--surface); box-shadow: var(--bevel), inset 0 0 0 1.5px var(--ring), 0 6px 18px rgba(0, 0, 0, .18); }
.ladder button[disabled] { opacity: .35; cursor: not-allowed; }
.summary { position: sticky; top: 28px; }
.summary .total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; }
.summary .total b { font-size: 36px; font-weight: 750; letter-spacing: -.045em; }
.summary .total s { color: var(--text-3); font-size: 16px; }
.methods { display: grid; gap: 8px; }
.methods .opt { padding: 12px 14px; }
.methods .opt-ico { width: 36px; height: 36px; border-radius: 10px; }

/* Подключение. */
.platbar { margin-bottom: 20px; }
.connect-side { position: sticky; top: 28px; }
@media (min-width: 681px) { .seg.platbar { flex-wrap: wrap; border-radius: 22px; } }
.apps { display: grid; gap: 16px; }
.app-card { padding: 26px; }
.app-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.app-head h3 { font-size: 21px; letter-spacing: -.02em; }
.app-note { margin-top: 6px; color: var(--text-2); font-size: 14.5px; }
.app-warn { margin-top: 14px; display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(227, 163, 64, .09); color: var(--text); font-size: 14px; line-height: 1.5; }
.app-warn .icon { color: var(--warn); width: 19px; height: 19px; margin-top: 1px; }
.app-steps { margin-top: 22px; display: grid; gap: 20px; }
.app-step { display: grid; grid-template-columns: 30px 1fr; gap: 14px; }
.app-step .n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13px; font-weight: 650; color: var(--text-2); }
.app-step p { padding-top: 4px; font-size: 15px; line-height: 1.55; }
.app-step .srcs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.src { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 12px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; transition: background-color .2s, box-shadow .2s; }
.src:hover { background: var(--surface-3); }
.src b { font-weight: 600; }
.src span { color: var(--text-3); font-size: 13px; }
.src .icon { width: 18px; height: 18px; color: var(--ag-ink); }
.qrbox { display: grid; place-items: center; padding: 18px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.qrbox canvas { width: 100%; max-width: 240px; height: auto; aspect-ratio: 1; border-radius: 14px; }
.guide { margin-top: 16px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.guide summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 600; font-size: 14.5px; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary .chev { margin-left: auto; transition: transform .25s var(--ease); color: var(--text-3); }
.guide[open] summary .chev { transform: rotate(90deg); }
.guide ol { margin: 0; padding: 0 20px 18px 38px; display: grid; gap: 10px; font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.guide ol b { color: var(--text); }
.guide .pre { padding: 0 16px 12px; font-size: 14px; color: var(--text-2); }
.guide .pre ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }

/* Рефералка. */
.ref-hero { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: center; overflow: hidden; }
.ref-hero .raven { margin: -20px -10px -40px 0; }
.lb-row { display: grid; grid-template-columns: 36px 40px 1fr auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.lb-row:first-child { border-top: 0; }
.lb-rank { font: 700 14px var(--mono); color: var(--text-3); text-align: center; }
.lb-rank.m1, .lb-rank.m2, .lb-rank.m3 { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #241A04; margin: 0 auto; }
.lb-rank.m1 { background: var(--gold); }
.lb-rank.m2 { background: linear-gradient(135deg, #F0F3F9 0%, #C4CEDD 100%); color: #1a2030; }
.lb-rank.m3 { background: linear-gradient(135deg, #F2C9A0 0%, #D99A5B 100%); }
.lb-row .ava { width: 36px; height: 36px; font-size: 14px; }
.lb-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-count { font-weight: 650; font-variant-numeric: tabular-nums; }
.lb-row.me { background: var(--surface-2); border-radius: 12px; border-top-color: transparent; padding-left: 6px; padding-right: 10px; margin: 2px -6px; }

/* Задания. */
.task { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 700; color: var(--text-2); }
.task.done .task-n { background: var(--metal); color: var(--metal-fg); box-shadow: none; }
.task b { font-size: 16px; font-weight: 600; }
.task .rew { margin-top: 3px; font-size: 14px; color: var(--text-2); }
.task .prog { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; margin-top: 12px; }
.task .prog span { font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* История. */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; padding: 0 12px 14px 0; }
.table td { padding: 16px 12px 16px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.table td:last-child, .table th:last-child { text-align: right; padding-right: 0; }
.table .what b { display: block; font-weight: 600; }
.table .what span { display: block; font-size: 13.5px; color: var(--text-2); margin-top: 2px; }

/* Нижняя панель (телефон). */
.tabbar { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   ОКНА И ТОСТЫ
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-root { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-scrim { position: absolute; inset: 0; background: var(--backdrop); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .28s var(--ease); }
.modal {
  position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  border-radius: 28px;
  background: var(--bg);
  box-shadow: var(--bevel), 0 0 0 1px var(--line-2), var(--shadow-float);
  opacity: 0; transform: translateY(14px) scale(.985);
  transition: opacity .28s var(--ease), transform .32s var(--ease);
}
.modal.wide { max-width: 560px; }
.modal-root.open .modal-scrim { opacity: 1; }
.modal-root.open .modal { opacity: 1; transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 22px 0 26px; }
.modal-head h3 { font-size: 21px; letter-spacing: -.025em; }
.modal-body { padding: 18px 26px 26px; overflow-y: auto; overscroll-behavior: contain; }
.modal-grip { display: none; }
.modal-note { font-size: 14.5px; color: var(--text-2); line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }
.pay-sum { padding: 26px; border-radius: var(--r-lg); background: var(--hero-card); color: #E7ECF4; box-shadow: inset 0 1px 0 rgba(226, 236, 250, .08), 0 0 0 1px rgba(190, 208, 236, .1); }
.pay-sum .engrave { color: #7C8799; }
.pay-sum b { display: block; margin-top: 14px; font-size: 48px; font-weight: 760; letter-spacing: -.05em; line-height: 1;
             background-image: linear-gradient(180deg, #FFFFFF 0%, #D5DDEA 45%, #9BA6B9 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pay-sum span { display: block; margin-top: 10px; color: #8B96A9; font-size: 14.5px; }
.pay-wait { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14.5px; color: var(--text-2); }
.success { text-align: center; padding-top: 6px; }
.success .raven { width: 190px; margin: 0 auto; }
.success h3 { margin-top: 14px; font-size: 26px; letter-spacing: -.03em; }
.success p { margin-top: 10px; color: var(--text-2); line-height: 1.6; }
.total-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 0 0; margin-top: 18px; border-top: 1px solid var(--line); }
.total-line span { color: var(--text-2); }
.total-line b { font-size: 22px; font-weight: 700; letter-spacing: -.03em; }

.toasts { position: fixed; left: 50%; bottom: 28px; z-index: 200; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow-float);
         opacity: 0; transform: translateY(10px); transition: opacity .25s var(--ease), transform .3s var(--ease); }
.toast.in { opacity: 1; transform: none; }
.toast .icon { width: 18px; height: 18px; }
.toast.bad { background: var(--bad); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════════════
   АДАПТИВ
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1240px) {
  .prices { grid-template-columns: repeat(3, 1fr); }
  .plats { grid-template-columns: repeat(4, 1fr); }
  .buy { grid-template-columns: minmax(0, 1fr) 340px; }
}

@media (max-width: 1080px) {
  .hero-in { grid-template-columns: 1fr; gap: 8px; }
  .hero { padding-top: 36px; }
  .hero-art { min-height: 440px; order: -1; margin: 0 auto; width: 100%; max-width: 560px; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-facts { justify-content: center; }
  .pass { left: 0; bottom: 4%; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile, .tile.w3, .tile.w4 { grid-column: span 1; }
  .tile-big { grid-column: span 2 !important; }
  .lte { grid-template-columns: 1fr; gap: 40px; }
  .refband { grid-template-columns: 1fr; padding: 40px; }
  .refband .raven { max-width: 360px; margin: 0 auto; }
  .footer-in { grid-template-columns: 1fr 1fr; }

  /* Кабинет: боковая панель уходит в выдвижное меню. */
  .side { transform: translateX(-100%); transition: transform .32s var(--ease); box-shadow: var(--shadow-float); background: var(--bg); }
  .side.open { transform: none; }
  .side-scrim { position: fixed; inset: 0; z-index: 29; background: var(--backdrop); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
  .side-scrim.open { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; height: 64px; padding: 0 20px;
            background: var(--glass); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); box-shadow: 0 1px 0 var(--line); }
  .topbar .brand { font-size: 17px; }
  .topbar .brand img { width: 30px; height: 30px; }
  .topbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
  .page { padding: 32px 28px 72px; }
  .g-main { grid-template-columns: minmax(0, 1fr); }
  .buy { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  /* Ключ — первым: на узком экране правая колонка уходит вниз, под все инструкции. */
  .connect-side { position: static; order: -1; }
}

@media (min-width: 681px) and (max-width: 1080px) {
  /* Планшет: вторая колонка главной уходит вниз — пусть стоит парой, а не лентой. */
  .stack.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav-links, .nav-right .hide-sm { display: none; }
  .nav-burger { display: inline-grid; }
  .facts-in { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { box-shadow: inset 0 1px 0 var(--line); }
  .fact:nth-child(4) { box-shadow: inset 1px 0 0 var(--line), inset 0 1px 0 var(--line); }
  .steps { grid-template-columns: 1fr; }
  .step h3 { margin-top: 20px; }
  .prices { grid-template-columns: repeat(2, 1fr); }
  .cta { grid-template-columns: 1fr; padding: 44px 32px 0; }
  .cta-art { width: 220px; margin: 8px auto 0; }
  .section { padding: 84px 0; }
  .section-head { margin-bottom: 40px; }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-hero { grid-template-columns: minmax(0, 1fr); }
  .ref-hero .raven { max-width: 300px; margin: 0 auto -30px; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-mark { display: block; }
  .login-side { padding: 24px; }
}

@media (max-width: 680px) {
  :root { --pad: 20px; }
  body { font-size: 15.5px; }
  .hero h1 { font-size: clamp(36px, 10.5vw, 48px); }
  .hero { padding-top: 12px; }
  .hero-art { min-height: 0; padding: 8px 0 4px; }
  .hero-art .raven { width: 58%; max-width: 260px; }
  .hero-rings i:nth-child(3) { display: none; }
  /* Витрина-карта на телефоне закрывала бы ворона целиком — её место в кабинете. */
  .pass { display: none; }
  .hero h1 { margin-top: 18px; }
  .hero-lead { margin-top: 16px; }
  .hero-cta { margin-top: 26px; }
  .hero-facts { margin-top: 26px; }
  .section { padding: 64px 0; }
  .hero-cta .btn { width: 100%; }
  .hero-facts { gap: 10px 20px; font-size: 13.5px; }
  .fact { padding: 20px; }
  .bento { grid-template-columns: 1fr; }
  .tile-big { grid-column: span 1 !important; min-height: 0; }
  .tile-art { position: relative; right: auto; bottom: auto; width: 70%; margin: 18px auto -40px; }
  .tile { padding: 24px; }
  .plats { grid-template-columns: repeat(2, 1fr); }
  .plat:last-child { grid-column: span 2; }
  .prices { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  /* На телефоне пять высоких карточек — это пять экранов прокрутки. Общее для
     всех тарифов сказано один раз над сеткой, список остаётся только у года. */
  .prices-common { display: block !important; }
  .price:not(.best) .price-list { display: none; }
  .price:not(.best) { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 16px; padding: 18px 18px 18px 20px; }
  .price:not(.best) .price-top { grid-column: 1; min-height: 0; justify-content: flex-start; gap: 8px; }
  .price:not(.best) .price-sum { grid-column: 1; margin-top: 4px; font-size: 26px; }
  .price:not(.best) .price-per { grid-column: 1; margin-top: 0; min-height: 0; font-size: 13px; }
  .price:not(.best) .btn { grid-column: 2; grid-row: 1 / span 3; width: auto; margin: 0; }
  .price-sum { font-size: 34px; }
  .refband { padding: 28px 22px 0; }
  .faq summary { font-size: 16.5px; padding: 22px 2px; }
  .cta { padding: 36px 22px 0; border-radius: var(--r-lg); }
  .cta-actions .btn { width: 100%; }
  .footer-in { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-in > :first-child { grid-column: span 2; }
  .footer-bottom { flex-direction: column; }

  /* Кабинет на телефоне — как мини-аппа: нижняя панель вкладок. */
  .page { padding: 22px 16px 120px; }
  .page-head { flex-direction: column; align-items: flex-start; margin-bottom: 22px; }
  .page-head h1 { font-size: 28px; }
  .page-head p { font-size: 15px; }
  .grid { gap: 14px; }
  .stack { gap: 14px; }
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: span 1; }
  .card { padding: 20px; border-radius: 22px; }
  .acard { min-height: 0; padding: 24px 22px 22px; border-radius: 26px; }
  .acard-top, .acard-body { max-width: 60%; }
  .acard-num b { font-size: 64px; }
  .acard-title { font-size: 28px; }
  .acard-sub { font-size: 14.5px; }
  .acard-key, .acard-actions { max-width: none; }
  .acard-key { padding-top: 22px; }
  .acard-raven { width: 44%; right: -14px; top: 34px; bottom: auto; }
  .acard-top { justify-content: flex-start; }
  .acard-actions { flex-wrap: nowrap; }
  .acard-actions .btn { padding: 0 16px; font-size: 14.5px; }
  .acard-actions .btn-primary { flex: 1 1 auto; }
  .acard-actions .btn-ghost { flex: 0 0 auto; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 25;
    height: 66px; padding: 6px; border-radius: 26px;
    background: var(--glass); -webkit-backdrop-filter: saturate(1.6) blur(20px); backdrop-filter: saturate(1.6) blur(20px);
    box-shadow: var(--bevel), 0 0 0 1px var(--line-2), var(--shadow-float);
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 20px; font-size: 11px; font-weight: 600; color: var(--text-3); transition: color .2s, background-color .2s; }
  .tabbar .icon { width: 22px; height: 22px; }
  .tabbar .on { color: var(--text); background: var(--surface-2); }
  .topbar { padding: 0 16px; }
  .buy-sec + .buy-sec { margin-top: 26px; }
  .periods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .period { min-height: 118px; padding: 16px 14px 14px; }
  .period .p-sum { font-size: 23px; }
  .period .chip { top: 10px; right: 10px; }
  .summary .total b { font-size: 30px; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
  .table tr:first-child { border-top: 0; }
  .table td { border: 0; padding: 0; text-align: left !important; }
  .table td.when { grid-column: 1; color: var(--text-3); font-size: 13px; order: 3; }
  .table td.what { grid-column: 1; grid-row: 1 / span 2; }
  .table td.how { display: none; }
  .table td.sum { grid-column: 2; grid-row: 1; text-align: right !important; font-weight: 650; }
  .lb-row { grid-template-columns: 30px 36px 1fr auto; gap: 10px; }
  .app-card { padding: 20px; }
  .login-qr, .qr-desk { display: none; }

  /* Окна — шторкой снизу, как в мини-аппе. */
  .modal-root { align-items: flex-end; padding: 0; }
  .modal { max-width: none !important; max-height: 92vh; border-radius: 28px 28px 0 0; transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom); }
  .modal-root.open .modal { transform: none; }
  .modal-grip { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 10px auto 0; }
  .modal-head { padding: 12px 20px 0 22px; }
  .modal-body { padding: 16px 22px 26px; }
  .toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

@media (max-width: 400px) {
  /* Узкий телефон: у второй кнопки карты остаётся только значок. */
  .acard-actions .btn-ghost .btn-label { display: none; }
  .acard-actions .btn-ghost { width: 48px; padding: 0; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 34px; }
  .acard-top, .acard-body { max-width: 70%; }
  .acard-num b { font-size: 54px; }
  .tabbar span { font-size: 10px; }
}

@media (max-width: 340px) {
  .periods { grid-template-columns: minmax(0, 1fr); }
}

/* Широкие мониторы: не растягиваем, а держим композицию. */
@media (min-width: 1600px) {
  :root { --wrap: 1280px; }
  .page { max-width: 1240px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
}

@media print {
  .nav, .side, .topbar, .tabbar, .toasts { display: none !important; }
  .main { margin: 0; }
}
