/* ============================================================
   RPG Studio — landing styles
   Palette: deep ink + candle gold + arcane violet
   ============================================================ */

:root {
  --bg: #0c0a13;
  --bg-2: #120e1c;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #efe6d8;
  --text-2: #bcb2a8;
  --text-3: #a89b90; /* 29.10 (U1-007): прежний #87796f давал 3,6-4,3:1 на подвале и мелких подписях, этот 5,9:1 и выше на самом светлом фоне сайта */
  --gold: #e8934c;
  --gold-2: #f0b46f;
  --violet: #6b6fae;
  --violet-2: #9a9dd4;
  --rose: #f08fb0;
  --teal: #5fd4c4;
  --ember: #c0503a;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Playfair Display", "Cormorant Garamond", "Georgia", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1180px;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* Нажатие (22.10): синюю вспышку Android гасим везде (она рисовалась поверх всего, даже поверх открывшегося окна), вместо неё - лёгкое
   сжатие и затемнение: нажал 90 мс, отпустил 160 мс. Фокус с клавиатуры (:focus-visible) не трогаем. Для больших карточек свои правила
   (.igra-model-item:active и др.) сильнее и дают сжатие слабее. «Уменьшить движение»: без сжатия, затемнение остаётся. */
html { -webkit-tap-highlight-color: transparent; }
:where(button, .btn, [role="button"]) { transition: transform .16s cubic-bezier(.2, 0, 0, 1), filter .16s cubic-bezier(.2, 0, 0, 1); }
button:active:not(:disabled), a.btn:active, .btn:active:not(:disabled), [role="button"]:active:not([aria-disabled="true"]) {
  transform: scale(.96); filter: brightness(.86); transition-duration: .09s;
}
@media (prefers-reduced-motion: reduce) {
  button:active:not(:disabled), a.btn:active, .btn:active:not(:disabled), [role="button"]:active:not([aria-disabled="true"]) { transform: none; }
}

html, body { overflow-x: hidden; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Atmosphere (background) ---------- */
.sky {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(139, 124, 246, 0.22), transparent 60%),
    radial-gradient(900px 600px at 90% 10%, rgba(232, 180, 92, 0.13), transparent 60%),
    radial-gradient(800px 800px at 60% 110%, rgba(240, 143, 176, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
}
.sky::after {
  content: ""; position: absolute; inset: 0; opacity: 0.35; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
.stars {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.7;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 60%, transparent 61%),
    radial-gradient(1px 1px at 38% 6%, #fff 60%, transparent 61%),
    radial-gradient(1.6px 1.6px at 72% 22%, #ffe7b3 60%, transparent 61%),
    radial-gradient(1px 1px at 88% 44%, #fff 60%, transparent 61%),
    radial-gradient(1.4px 1.4px at 55% 62%, #d8d0ff 60%, transparent 61%),
    radial-gradient(1px 1px at 22% 80%, #fff 60%, transparent 61%),
    radial-gradient(1.2px 1.2px at 5% 50%, #fff 60%, transparent 61%),
    radial-gradient(1px 1px at 95% 85%, #fff 60%, transparent 61%),
    radial-gradient(1.4px 1.4px at 65% 92%, #ffe7b3 60%, transparent 61%),
    radial-gradient(1px 1px at 45% 35%, #fff 60%, transparent 61%);
  background-size: 100% 100%;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 0.85; } }

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); }
.h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.h3 { font-size: 1.5rem; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--text-2); max-width: 58ch; }
.muted { color: var(--text-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--gold); opacity: 0.7; }
.gradient-text {
  background: linear-gradient(95deg, var(--gold-2) 0%, var(--gold) 35%, var(--violet-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head .lead { margin-top: 16px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  color: #1a1206;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 60%, #d99a3d);
  box-shadow: 0 10px 30px rgba(232, 180, 92, 0.25), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-primary:hover { box-shadow: 0 14px 40px rgba(232, 180, 92, 0.38), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-ghost {
  color: var(--text); background: var(--surface); border-color: var(--border-strong);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(255,255,255,.28); }
.btn-lg { padding: 17px 30px; font-size: 1.05rem; }
.btn-sm { padding: 10px 18px; font-size: 0.9rem; }

/* Кнопки входа через Яндекс ID и VK ID — фирменные цвета из брендбуков,
   форма и отступы те же, что у остальных .btn рядом (пилюля, тот же padding),
   SVG встроен в разметку, а не подключён с чужого CDN (закон 9 проекта: своя
   графика, ничего стороннего в рендере страницы) */
.btn-yandex {
  color: #000; background: #fff; border-color: #fff;
}
.btn-yandex:hover { background: #f2f2f2; }
.btn-vk {
  /* #0077ff с белым текстом даёт 4,1:1, а порог читаемости 4,5:1: берём на тон темнее */
  color: #fff; background: #006ae6; border-color: #006ae6;
}
.btn-vk:hover { background: #005bc8; }
.btn-yandex svg, .btn-vk svg { width: 18px; height: 18px; flex: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.nav.is-scrolled {
  background: rgba(11, 10, 18, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.01em; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--violet), #5b4fd6);
  box-shadow: 0 6px 18px rgba(139, 124, 246, 0.4), inset 0 1px 0 rgba(255,255,255,.3);
}
.brand-mark svg { width: 20px; height: 20px; color: #fff; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 0.95rem; color: var(--text-2); transition: color .2s; }
/* Шестая вкладка («Мини-игры») не влезает между логотипом и кнопкой на ширине
   861–1100: пункты переносились на две строки. Ужимаем промежутки, а не текст. */
.nav-links a { white-space: nowrap; }
@media (max-width: 1100px) { .nav-links { gap: 18px; } .nav-links a { font-size: .9rem; } }
.nav-links a:hover, .nav-links a.is-active { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-cta .nav-dl .dl-ico { width: 16px; height: 16px; display: none; }
.nav-cta .nav-dl .dl-label { display: inline; }
/* Кнопка входа в шапке: значок человека всегда виден, подпись "Войти"/"Кабинет"
   прячется на узких телефонах (см. медиа ниже) — сама кнопка не прячется
   никогда, раньше вход был доступен только через ☰, и владелец не находил его. */
.nav-cta .nav-auth { display: inline-flex; align-items: center; gap: 7px; }
.nav-cta .nav-auth .auth-ico { width: 18px; height: 18px; flex: none; }
.nav-cta .nav-auth .auth-ico-user { display: none; }
.nav-cta .nav-auth.is-authed .auth-ico-guest { display: none; }
.nav-cta .nav-auth.is-authed .auth-ico-user { display: inline-block; }
.nav-cta .nav-auth.is-authed { color: var(--gold); border-color: rgba(232,180,92,.4); }
.nav-toggle {
  /* На широком экране уже виден весь .nav-links — бургер рядом с ним лишний,
     показываем его только когда nav-links сам прячется (см. медиа ниже). */
  display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); align-items: center; justify-content: center; color: var(--text); transition: background .2s;
}
.nav-toggle:hover { background: var(--surface-2); }
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Drawer (apps + site) ---------- */
.backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(5,4,10,.6); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; z-index: 90; width: min(320px, 86vw); display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 18px; overflow-y: auto; background: linear-gradient(180deg, #14111f, #0e0c18); border-right: 1px solid var(--border-strong); box-shadow: 20px 0 60px rgba(0,0,0,.5); transform: translateX(-102%); transition: transform .32s cubic-bezier(.2,.8,.2,1); visibility: hidden; }
.drawer.is-open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 14px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.drawer-head .brand { font-size: 1.3rem; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); background: none; border: 0; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 22px; height: 22px; }
.drawer-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; padding: 12px 10px 6px; }
.drawer-list { display: flex; flex-direction: column; gap: 6px; }
.drawer-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; }
.drawer-item.is-live { background: rgba(139,124,246,.14); border-color: rgba(139,124,246,.38); }
.drawer-item.is-live:hover { background: rgba(139,124,246,.22); }
/* 30.09: раньше opacity .75 гасила весь пункт, и серая подпись падала до ~3,5:1; теперь приглушена только иконка, текст полной яркости */
.drawer-item.is-soon .ic { opacity: .75; }
.drawer-item .ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.drawer-item.is-live .ic { color: #fff; background: linear-gradient(135deg, var(--violet), #5b4fd6); border-color: transparent; }
.drawer-item .ic svg { width: 20px; height: 20px; }
.drawer-item .txt { min-width: 0; flex: 1; }
.drawer-item b { display: block; font-weight: 600; font-size: .98rem; }
.drawer-item .txt span { display: block; font-size: .8rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-item .go { flex: none; color: var(--gold); }
.drawer-item .go svg { width: 18px; height: 18px; }
.drawer-item .soon { flex: none; font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(232,180,92,.4); }
/* «Хроники Варлодов»: бейдж «в разработке» рядом с заголовком, а не отдельной
   колонкой — снаружи он съедал всю ширину подписи «Карточная дуэль», и она
   обрезалась многоточием даже короче «Играть в браузере» рядом.
   На ширине выдвижного меню (320px) заголовок + бейдж вместе всё равно не
   влезали в одну строку: блочный <b> переносил бейдж целиком на вторую
   строку (владелец 29.09, снимок drawer). Тот же приём, что у .txt span —
   заголовку нельзя расти шире доступного, поэтому сокращаем сам бейдж
   (меньше паддинг/шрифт/трекинг), а не переносим его. */
.drawer-item .txt b {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Заголовок с бейджем («Хроники Варлодов в разработке») — самая длинная
   строка в списке, и даже уменьшенный бейдж ниже не оставлял места под
   «Хроники Варлодов» на 320px (посчитано на живом снимке: 183px на строку,
   86px уже бейдж). Шрифт заголовка здесь чуть меньше, чем у остальных
   пунктов — не так заметно на глаз, как перенос бейджа строкой ниже. */
.drawer-item .txt b:has(.soon) { font-size: .82rem; }
.drawer-item .txt b .soon {
  display: inline-block; margin-left: 4px; vertical-align: 1px;
  font-size: .48rem; letter-spacing: 0; padding: 1px 4px;
}
.drawer-links { display: flex; flex-direction: column; }
.drawer-links a { padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-size: .98rem; }
.drawer-links a:hover, .drawer-links a.is-active { color: var(--text); background: var(--surface-2); }

/* 29.09 (Егор): на странице «Хроники Варлодов» и на переработанных страницах
   шапка держит лого и бургер, а перед бургером — три действия (.nav-actions):
   «Начать игру», вход (аватар/иконка) и «Скачать» с попапом Android/Windows.
   В выдвижном меню остаётся тот же набор ссылок для тех, кому шапка тесна,
   плюс отдельная круглая кнопка входа наверху (.drawer-auth) — раньше вход
   был карточкой в общем списке и терялся между «Играть» и «Скачать». */
body.nav-simple .nav-toggle { display: inline-flex; }
body.nav-simple .drawer-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
body.nav-simple .tag-soon {
  flex: none; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold); padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(232,180,92,.4);
}

/* ---------- Шапка: действия перед бургером ---------- */
body.nav-simple .nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; margin-right: 14px; min-width: 0; }

body.nav-simple .nav-play {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  font-size: .92rem; font-weight: 600; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); white-space: nowrap; transition: background .2s, border-color .2s;
  flex: none;
}
body.nav-simple .nav-play:hover { background: var(--surface-2); border-color: rgba(255,255,255,.28); }
body.nav-simple .nav-play svg { width: 17px; height: 17px; flex: none; }

/* Вход: иконка гостя по умолчанию, аватарка/буква — когда main.js узнаёт
   сессию (rpgstudio.session) и, если получится, аккаунт (/api/account/me). */
body.nav-simple .nav-auth {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--border-strong);
  white-space: nowrap; transition: background .2s, border-color .2s, color .2s; flex: none;
}
body.nav-simple .nav-auth:hover { background: var(--surface-2); color: var(--text); }
body.nav-simple .nav-auth.is-authed { color: var(--text); border-color: rgba(232,180,92,.45); }
body.nav-simple .nav-auth .auth-avatar { width: 28px; height: 28px; }
body.nav-simple .nav-auth.is-authed .auth-avatar { box-shadow: 0 0 0 2px rgba(232,180,92,.55); }

.auth-avatar {
  position: relative; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--violet), #5b4fd6); color: #fff; font-weight: 700; line-height: 1;
}
.auth-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-avatar-letter {
  display: none; font-family: var(--font-body); font-weight: 700; font-size: 12.6px; line-height: 1;
  margin: 0; padding: 0; text-indent: 0; text-transform: uppercase; text-align: center;
}
.drawer-auth .auth-avatar-letter { font-size: 19px; }   /* п.26 spisok.md: ~0.45 диаметра, без засечек */
.auth-avatar-guest { width: 58%; height: 58%; }
/* Порядок приоритета: своя картинка > буква имени > силуэт гостя — .has-avatar
   и .is-authed выставляет main.js по данным /api/account/me. */
.has-avatar .auth-avatar-guest, .has-avatar .auth-avatar-letter { display: none; }
.is-authed:not(.has-avatar) .auth-avatar-guest { display: none; }
.is-authed:not(.has-avatar) .auth-avatar-letter { display: block; }

body.nav-simple .nav-dl { position: relative; flex: none; }
body.nav-simple .nav-dl-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
body.nav-simple .nav-dl-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: max(250px, 100%);
  background: linear-gradient(180deg, #17131f, #100d19); border: 1px solid var(--border-strong);
  border-radius: 16px; box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; gap: 4px;
}
body.nav-simple .nav-dl-menu[hidden] { display: none; }
body.nav-simple .nav-dl-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--text);
  text-align: left; width: 100%; border: 1px solid transparent;
}
a.nav-dl-item:hover { background: var(--surface-2); }
body.nav-simple .nav-dl-item.is-disabled .nav-dl-item-ic { opacity: .6; }
body.nav-simple .nav-dl-item.is-disabled b { color: var(--text-2); }
body.nav-simple .nav-dl-item-ic { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
body.nav-simple .nav-dl-item-ic svg { width: 17px; height: 17px; }
body.nav-simple .nav-dl-item-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.nav-simple .nav-dl-item-txt b { font-size: .92rem; font-weight: 600; }
body.nav-simple .nav-dl-item-txt > span:not(.tag-soon) { font-size: .78rem; color: var(--text-2); }

/* ≤480px: подписи прячутся, действия остаются кликабельными иконками — на
   360–412px «Начать игру» + аватар + «Скачать» + бургер с подписями не
   помещались в одну строку и ломали шапку. */
@media (max-width: 480px) {
  body.nav-simple .nav-actions { gap: 6px; margin-right: 8px; }
  body.nav-simple .nav-play { padding: 0; width: 38px; height: 38px; justify-content: center; }
  body.nav-simple .nav-play-txt { display: none; }
  body.nav-simple .nav-auth { padding: 0; width: 38px; height: 38px; justify-content: center; }
  body.nav-simple .nav-auth-txt { display: none; }
  body.nav-simple .nav-dl-btn { padding: 0; width: 38px; height: 38px; }
  body.nav-simple .nav-dl-txt { display: none; }
  body.nav-simple .nav-dl-menu { right: -6px; width: 78vw; max-width: 280px; }
}
@media (max-width: 359px) {
  body.nav-simple .nav-play { display: none; }
}
/* 09.10 (Егор): гостю на телефоне вместо безымянного кружка-силуэта — подписанная
   кнопка «Войти», как на ПК; силуэт прячется, чтобы кнопка влезла в 360–390px.
   Вошедшему остаётся круглый аватар (правила выше). html.has-session ставит sess.js
   до отрисовки, .is-authed — main.js: пока сессия есть, «Войти» не мигает. */
@media (max-width: 480px) {
  html:not(.has-session) body.nav-simple .nav-auth:not(.is-authed) { width: auto; padding: 0 13px; color: var(--text); }
  html:not(.has-session) body.nav-simple .nav-auth:not(.is-authed) .auth-avatar { display: none; }
  html:not(.has-session) body.nav-simple .nav-auth:not(.is-authed) .nav-auth-txt { display: inline; font-size: .88rem; font-weight: 600; }
}

/* ---------- Выдвижное меню: кнопка входа наверху ---------- */
.drawer-auth {
  display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; padding: 8px 16px 8px 8px;
  border-radius: 999px; background: var(--surface); border: 1px solid rgba(232,180,92,.45);
  box-shadow: 0 0 0 1px rgba(232,180,92,.15) inset; transition: background .2s;
}
.drawer-auth:hover { background: var(--surface-2); }
.drawer-auth .auth-avatar { width: 42px; height: 42px; box-shadow: 0 0 0 2px rgba(232,180,92,.55); }
.drawer-auth-txt { min-width: 0; overflow: hidden; }
.drawer-auth-txt b { display: block; font-weight: 600; font-size: .98rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Full-screen app (single-file build only) */
.app-host { position: fixed; inset: 0; z-index: 100; background: #0a0a11; }
.app-host[hidden] { display: none; }
.app-host iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Hero ---------- */
.hero-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../img/worlds/hero-bg.png") center 60% / cover no-repeat;
  opacity: .5;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.6) 55%, transparent 100%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.6) 55%, transparent 100%);
}
.hero-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 500px at 70% 40%, transparent, var(--bg) 85%); }
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 120px) 0 clamp(60px, 8vw, 110px); }
.hero .container {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-copy .h1 { margin-bottom: 22px; }
.hero-copy .lead { margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 20px; color: var(--text-3); font-size: 0.9rem; }
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--teal); }

/* Story console mock */
.console-wrap { position: relative; max-width: 880px; margin-inline: auto; }
.console-wrap::before {
  content: ""; position: absolute; inset: -12% -8%; z-index: -1; filter: blur(60px); opacity: .6;
  background: radial-gradient(closest-side, rgba(139,124,246,.55), transparent 70%);
}
.console {
  border: 1px solid var(--border-strong); border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, rgba(24, 21, 38, 0.95), rgba(14, 12, 24, 0.95));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.08);
}
.console-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: .8rem; color: var(--text-3);
}
.console-bar .dots { display: flex; gap: 6px; }
.console-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.12); }
.console-bar .dots i:first-child { background: #f26d6d; }
.console-bar .dots i:nth-child(2) { background: #f5c451; }
.console-bar .dots i:nth-child(3) { background: #63d38e; }
.console-bar .tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.console-bar .tag svg { width: 12px; height: 12px; color: var(--gold); }
.console-body { display: grid; grid-template-columns: 1fr 190px; min-height: 380px; }
.console-story { padding: 22px 24px; font-family: var(--font-display); font-size: 1.22rem; line-height: 1.5; color: #e9e3f5; }
.console-story .narration { min-height: 8.5em; }
.console-story .action { margin-top: 14px; padding: 10px 14px; border-left: 3px solid var(--gold); background: rgba(232,180,92,.08); border-radius: 0 10px 10px 0; font-family: var(--font-body); font-size: .92rem; color: var(--gold-2); }
.console-story .action b { font-weight: 600; opacity: .7; margin-right: 6px; }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--gold); vertical-align: -0.15em; margin-left: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.console-side { border-left: 1px solid var(--border); padding: 18px 16px; display: flex; flex-direction: column; gap: 16px; background: rgba(255,255,255,.02); }
.console-side h4 { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.chips { display: flex; flex-direction: column; gap: 8px; }
.chip { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: .8rem; color: var(--text-2); }
.chip svg { width: 14px; height: 14px; flex: none; }
.chip.c-violet svg { color: var(--violet-2); }
.chip.c-gold svg { color: var(--gold); }
.chip.c-rose svg { color: var(--rose); }
.chip.c-teal svg { color: var(--teal); }
.console-input { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); background: rgba(0,0,0,.25); }
.console-input .field { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; color: var(--text-3); }
.console-input .field svg { width: 16px; height: 16px; }
.console-input .go { display: grid; place-items: center; width: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1206; }
.console-input .go svg { width: 18px; height: 18px; }


/* Home hero — full-height illustration, "мастер у костра" */
.hero-home {
  position: relative; overflow: hidden; padding: 0;
  min-height: clamp(560px, calc(100svh - var(--nav-h)), 920px);
  min-height: clamp(560px, calc(100vh - var(--nav-h)), 920px);
  display: flex; align-items: center;
}
.hero-home .hero-bg {
  background: url("../img/art/hero-desktop_sm.webp") right center / cover no-repeat;
  opacity: 1; mask-image: none; -webkit-mask-image: none;
}
@media (min-width: 900px) {
  .hero-home .hero-bg { background-image: url("../img/art/hero-desktop.webp"); }
}
@media (max-width: 720px) {
  .hero-home .hero-bg { background-image: url("../img/art/hero-mobile_sm.webp"); background-position: center 22%; }
}
@media (max-width: 720px) and (min-resolution: 1.5x) {
  .hero-home .hero-bg { background-image: url("../img/art/hero-mobile.webp"); }
}
.hero-home .hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    /* тёмное поле слева под заголовок — путник и арка теперь справа на картинке */
    linear-gradient(90deg, rgba(8,7,13,.78) 0%, rgba(8,7,13,.5) 36%, rgba(8,7,13,.08) 64%, transparent 82%),
    linear-gradient(0deg, rgba(9,7,14,.96) 0%, rgba(9,7,14,.72) 22%, rgba(9,7,14,.14) 52%, rgba(9,7,14,.12) 70%, rgba(9,7,14,.55) 100%);
}
.hero.hero-home .container.hero-home-inner {
  position: relative; z-index: 1; display: flex !important; flex-direction: column; align-items: flex-start;
  text-align: left;
  padding: clamp(40px, 6vw, 88px) 0 clamp(64px, 8vw, 104px);
}
.hero-home .eyebrow { color: var(--gold-2); }
.hero-home .h1 { max-width: 23ch; text-wrap: balance; margin-bottom: 16px; text-shadow: 0 4px 28px rgba(0,0,0,.55); font-size: clamp(2.2rem, 4.6vw, 3.8rem); }
.hero-home .lead { margin-bottom: 24px; max-width: 42ch; text-wrap: balance; color: #e7ded1; }
.hero-home .hero-actions { justify-content: flex-start; margin-bottom: 0; }
.hero-scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text-3); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  animation: bob 2.6s ease-in-out infinite;
}
.hero-scroll svg { width: 16px; height: 16px; }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }
@media (max-width: 720px) {
  .hero.hero-home .container.hero-home-inner { align-items: center; text-align: center; }
  .hero-home .lead { margin-inline: auto; }
  .hero-home .hero-actions { justify-content: center; }
  /* Длинная фраза-эйбрау переносится в 2 строки — тире-декор из ::before,
     выровненное по центру блока, повисало отдельно слева. Прячем его тут. */
  .hero-home .eyebrow::before { display: none; }
  .hero-home .eyebrow { padding-left: 0; }
  /* Подпись "Листайте" на телефоне упиралась в кнопку "Как это работает" —
     на тесном экране убираем её вовсе, кнопки сами показывают, что дальше. */
  .hero-scroll { display: none; }
  /* Аудит 03.10: кнопка «Сыграть 5 ходов» должна попасть в первый экран телефона */
  .hero.hero-home .container.hero-home-inner { padding-top: 22px; padding-bottom: 40px; }
  .hero-home .h1 { margin-bottom: 12px; }
  .hero-home .lead { margin-bottom: 18px; }
}
/* Невысокие окна ноутбуков (1366×768 с учётом браузерного хрома — реальный
   viewport около 700px). Контент героя (эйбрау+заголовок+текст+кнопки)
   при обычных отступах чуть выше выходит за нижний край первого экрана —
   кнопки обрезаются. Здесь просто плотнее отступы, шрифт/текст не трогаем. */
@media (max-height: 760px) {
  .hero.hero-home .container.hero-home-inner { padding: clamp(20px, 3vw, 40px) 0 clamp(28px, 4vw, 56px); }
  .hero-home .eyebrow { margin-bottom: 10px; }
  .hero-home .h1 { margin-bottom: 10px; }
  .hero-home .lead { margin-bottom: 16px; }
  .hero-scroll { bottom: 14px; }
}

/* Basics row */
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }
.basics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.basics li { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.basics li b { display: block; font-weight: 600; font-size: .98rem; }
.basics li span:last-child { display: block; font-size: .86rem; color: var(--text-2); }
.basic-icon { flex: none; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; border: 1px solid rgba(154,157,212,.4); color: var(--violet-2); }
.basic-icon.gold { border-color: rgba(232,147,76,.45); color: var(--gold-2); }
.basic-icon.rose { border-color: rgba(240,143,176,.4); color: var(--rose); }
.basic-icon svg { width: 19px; height: 19px; }
.basics-more { margin-top: 18px; text-align: center; }
.basics-more a { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 600; font-size: .95rem; }
.basics-more svg { width: 16px; height: 16px; }
/* Цена словами, а не числом: «По вашему ключу» в кегле для «590₽» выглядит поломкой */
.price .words { font-family: inherit; font-size: 1.25rem; font-weight: 600; color: var(--text); }

/* Правовые страницы: длинный текст, который должны дочитать, а не пролистать */
.legal { max-width: 46rem; }
.legal h2 { margin: 32px 0 10px; font-size: 1.15rem; color: var(--gold); }
.legal p { margin: 0 0 14px; line-height: 1.65; color: var(--text-2); }
.legal ul { margin: 0 0 14px; padding-left: 20px; }
.legal li { margin-bottom: 8px; line-height: 1.6; color: var(--text-2); }
.legal b { color: var(--text); }
.legal a { color: var(--gold); }
.legal-updated { font-size: .86rem; color: var(--text-3); }

/* Sub-page head */
.page-head { padding: clamp(48px, 8vw, 96px) 0 8px; }
.page-head .lead { margin-top: 14px; }
.page-head-art { position: relative; padding: clamp(90px, 20vw, 220px) 0 clamp(40px, 6vw, 64px); overflow: hidden; }
.page-head-art .eyebrow, .page-head-art .h2 { position: relative; text-shadow: 0 4px 24px rgba(0,0,0,.6); }
.page-head-art .lead { position: relative; color: #e7ded1; }
.page-head-bg {
  position: absolute; inset: 0; z-index: 0;
  background: url("../img/art/card-fantasy_sm.webp") center 35% / cover no-repeat;
}
@media (min-width: 720px) {
  .page-head-bg { background-image: url("../img/art/hero-desktop_sm.webp"); }
}
.page-head-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9,7,14,.94) 0%, rgba(9,7,14,.55) 55%, var(--bg) 100%);
}
.page-head-bg-nuar { background-image: url("../img/art/card-horror_sm.webp"); }
@media (min-width: 720px) { .page-head-bg-nuar { background-image: url("../img/art/card-horror.webp"); background-position: center 30%; } }
.page-head-bg-blank { background-image: url("../img/art/card-blank_sm.webp"); }
@media (min-width: 720px) { .page-head-bg-blank { background-image: url("../img/art/card-blank.webp"); background-position: center 35%; } }
.page-head-bg-forest { background-image: url("../img/art/card-forest_sm.webp"); }
@media (min-width: 720px) { .page-head-bg-forest { background-image: url("../img/art/card-forest.webp"); background-position: center 30%; } }
.page-head-bg-master { background-image: url("../img/art/master_sm.webp"); }
@media (min-width: 720px) { .page-head-bg-master { background-image: url("../img/art/master.webp"); background-position: center 35%; } }

/* Узкая шапка-баннер: текстовым/правовым страницам нужна картинка-акцент,
   а не полноэкранная сцена — читаемость текста ниже важнее антуража */
.page-head-thin { padding: clamp(64px, 11vw, 108px) 0 clamp(24px, 4vw, 32px); }
.page-head-thin .page-head-bg::after { background: linear-gradient(180deg, rgba(9,7,14,.88) 0%, rgba(9,7,14,.72) 55%, var(--bg) 100%); }

/* Console mock sitting on a dim illustrated scene */
.console-wrap-scene { position: relative; padding: 22px; border-radius: 26px; }
.console-wrap-scene::before {
  content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit; overflow: hidden;
  background: url("../img/art/master_sm.webp") center 30% / cover no-repeat; opacity: .5; filter: saturate(.8);
}
@media (min-width: 720px) { .console-wrap-scene::before { background-image: url("../img/art/master.webp"); } }
.console-wrap-scene::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(180deg, rgba(9,7,14,.55), rgba(9,7,14,.88));
}

/* Footer */
.footer { padding: 36px 0 28px; border-top: 1px solid var(--border); color: var(--text-3); font-size: .88rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--text-2); }
.footer-links a:hover { color: var(--text); }
.footer-copy { margin-top: 18px; }
.footer-legal { margin-top: 8px; font-size: .78rem; line-height: 1.5; overflow-wrap: anywhere; }
.footer-legal a { color: inherit; text-decoration: underline; }
/* Знак возрастной категории (436-ФЗ): текстом в подвале, без мета-тега rating */
.age-mark { display: inline-block; padding: 0 6px; border: 1px solid currentColor; border-radius: 6px; font-weight: 700; font-size: .78rem; line-height: 1.5; }
.socials { display: flex; gap: 10px; }
.socials a { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); }
.socials svg { width: 17px; height: 17px; }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 130px) 0; position: relative; }
.section-head { margin-bottom: 40px; }

/* Feature grid */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(139,124,246,.16), transparent 60%);
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card-icon {
  width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; margin-bottom: 20px;
  border: 1px solid rgba(154,157,212,.4); color: var(--violet-2);
}
.card-icon.gold { border-color: rgba(232,147,76,.45); color: var(--gold-2); }
.card-icon.rose { border-color: rgba(240,143,176,.4); color: var(--rose); }
.card-icon.teal { border-color: rgba(95,212,196,.4); color: var(--teal); }
.card-icon svg { width: 21px; height: 21px; }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; font-family: var(--font-body); font-weight: 600; }
.card p { color: var(--text-2); font-size: .96rem; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 32px 28px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step-num {
  font-family: var(--font-display); font-size: 3.4rem; line-height: 1; font-weight: 600;
  background: linear-gradient(180deg, var(--gold-2), rgba(232,180,92,.25));
  -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 18px;
}
.step h3 { font-family: var(--font-body); font-size: 1.15rem; margin-bottom: 10px; }
.step p { color: var(--text-2); font-size: .96rem; }
.step::after {
  content: ""; position: absolute; top: 50%; right: -18px; width: 18px; height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}
.step:last-child::after { display: none; }

/* Worlds */
.worlds { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.world {
  position: relative; grid-column: span 4; min-height: 300px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px; isolation: isolate;
}
.world.wide { grid-column: span 8; }
.world.half { grid-column: span 6; }
.world .art { position: absolute; inset: 0; z-index: -1; transition: transform .8s ease; }
.world:hover .art { transform: scale(1.05); }
.world .art img { width: 100%; height: 100%; object-fit: cover; }
.world::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,10,18,.25) 0%, rgba(11,10,18,.62) 38%, rgba(8,7,14,.97) 100%); }
.world .kicker { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; font-weight: 600; }
.world h3 { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.05; margin-bottom: 8px; }
.world p { color: var(--text-2); font-size: .94rem; max-width: 46ch; }
.world-take { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.world-take-status { font-size: .82rem; color: var(--text-3); margin: 0; }
.world-take-status.is-error { color: var(--gold); }
.world-take-status:empty { display: none; }

/* Authors split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split .h2 { margin-bottom: 16px; }
.split .lead { margin-bottom: 28px; }
.list-check { display: grid; gap: 14px; }
.list-check li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.list-check svg { width: 20px; height: 20px; flex: none; color: var(--teal); margin-top: 2px; }
.list-check b { color: var(--text); font-weight: 600; }
.lorebook {
  position: relative; border-radius: 22px; border: 1px solid var(--border-strong); padding: 22px;
  background: linear-gradient(180deg, rgba(24,21,38,.9), rgba(14,12,24,.95)); box-shadow: var(--shadow);
}
.lorebook::before { content: ""; position: absolute; inset: -10%; z-index: -1; filter: blur(70px); opacity: .5; background: radial-gradient(closest-side, rgba(232,180,92,.45), transparent 70%); }
.lore-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.lore-head h4 { font-family: var(--font-display); font-size: 1.35rem; }
.lore-head span { font-size: .78rem; color: var(--text-3); }
.lore-entry { padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 10px; }
.lore-entry .name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.lore-entry .name svg { width: 15px; height: 15px; color: var(--gold); }
.lore-entry .keys { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.lore-entry .keys span { font-size: .72rem; padding: 3px 8px; border-radius: 6px; background: rgba(139,124,246,.16); color: var(--violet-2); border: 1px solid rgba(139,124,246,.3); }
.lore-entry p { font-size: .86rem; color: var(--text-2); }
.lore-meter { margin-top: 14px; }
.lore-meter .label { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-3); margin-bottom: 6px; }
.lore-meter .bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.lore-meter .bar i { display: block; height: 100%; width: 62%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--gold)); }

/* ---------- Выбор платформы (хиро главной) ----------
   Заменяет прежние две карточки #pricing («Бесплатно на телефоне» и «Онлайн,
   если телефон слабый») — владелец назвал их «нелепым нагромождением»: одно и
   то же решение (телефон или браузер) дублировалось в hero и ниже по странице.
   Теперь один блок, три варианта, id="pricing" оставлен на нём же — по этому
   якорю ведут ссылки «Сколько стоит» со всех остальных страниц сайта. */
.platform-picker {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  max-width: 720px; margin-top: 6px;
}
.platform-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 20px 20px 22px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border-strong);
  backdrop-filter: blur(10px); transition: border-color .2s, background .2s;
}
a.platform-card:hover, a.platform-card:focus-visible { background: var(--surface-2); border-color: rgba(255,255,255,.32); }
.platform-card.is-primary { border-color: rgba(232,180,92,.55); background: linear-gradient(180deg, rgba(232,180,92,.12), rgba(255,255,255,.04)); }
.platform-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--text); }
.platform-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  font-weight: 600; font-size: .9rem; border: 1px solid transparent;
}
.platform-card.is-primary .platform-btn { color: #1a1206; background: linear-gradient(135deg, var(--gold-2), var(--gold) 60%, #d99a3d); }
/* 18.10 владелец: серая «Скачать» на тёмном едва заметна - у всех живых карточек кнопка золотая, как «Играть» */
.platform-card:not(.is-primary):not(.is-disabled) .platform-btn { color: #1a1206; background: linear-gradient(135deg, var(--gold-2), var(--gold) 60%, #d99a3d); box-shadow: 0 8px 22px -12px rgba(232,180,92,.7); }
.platform-note { font-size: .84rem; color: var(--text-3); line-height: 1.4; }
/* Раньше opacity:.55 гасила ВЕСЬ блок разом, включая заголовок «Windows» —
   на тёмном фоне серый текст и так небогат контрастом, а вполовину прозрачный
   становился едва читаемым (владелец 29.09: «серое на тёмном еле видно»).
   Приглушаем только повод «неактивности» (обводку/фон карточки), заголовок
   остаётся почти полной яркости, а сама пометка «скоро» — золотым акцентом,
   не тусклее самого текста рядом. */
.platform-card.is-disabled { cursor: default; opacity: .82; }
.platform-card.is-disabled .platform-name { opacity: .85; }
.platform-card.is-disabled .platform-note {
  font-size: .74rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold-2); opacity: 1;
}
/* Блок доверия к APK (версия/размер/дата) — заполняется из
   site/data/apk.json скриптом apk-trust.js, см. его комментарий.
   SHA-256 в данных остаётся, но на сайте больше не показывается. */
.apk-trust { margin-top: 14px; font-size: .82rem; color: var(--text-3); line-height: 1.5; max-width: 560px; }
.apk-trust-row { margin: 0 0 4px; }
.apk-warn { margin: 18px auto 0; max-width: 620px; padding: 12px 16px; font-size: .85rem; line-height: 1.55; color: var(--text-2, var(--text-3)); background: rgba(212, 168, 83, .08); border: 1px solid rgba(212, 168, 83, .35); border-radius: 12px; text-align: left; }
.apk-warn strong { color: var(--gold-2, var(--gold)); }
/* Аудит 03.10 (P1-7): заметка про старые сборки свёрнута и опущена к «Как это работает» */
details.apk-warn { margin-top: 28px; }
details.apk-warn summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.apk-warn summary::-webkit-details-marker { display: none; }
details.apk-warn summary::after { content: '+'; font-size: 1.2rem; line-height: 1; color: var(--gold-2, var(--gold)); }
details.apk-warn[open] summary::after { content: '−'; }
details.apk-warn p { margin: 10px 0 0; }

/* Аудит 03.10 (P0-4): главный путь — игра в браузере, карточка во всю ширину сверху */
.platform-picker { grid-template-columns: 1fr 1fr; }
.platform-card.is-hero { grid-column: 1 / -1; align-items: center; text-align: center; padding: 22px 20px 20px; }
.platform-card.is-hero .platform-btn { font-size: 1.05rem; padding: 13px 26px; box-shadow: 0 10px 28px -12px rgba(232,180,92,.7); }
.platform-card.is-hero .platform-note { font-size: .9rem; color: var(--text-2, var(--text-3)); max-width: 440px; }
.platform-card.is-hero .platform-btn { white-space: nowrap; }
@media (max-width: 400px) {
  .platform-card.is-hero { padding: 18px 14px 16px; gap: 8px; }
  .platform-card.is-hero .platform-btn { font-size: .98rem; padding: 12px 18px; gap: 7px; }
  .platform-card.is-hero .platform-note { font-size: .86rem; }
}

/* Второстепенные кнопки-ссылки под платформами (вторая колонка от .btn-primary/.btn-ghost). */
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
@media (max-width: 720px) {
  /* «2+1»: телефон и браузер в ряд, Windows-бета во всю ширину под ними — так
     просил владелец, чтобы неактивный третий вариант не был вровень с рабочими. */
  .platform-picker { grid-template-columns: 1fr 1fr; max-width: none; }
  .platform-card.is-disabled { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 18px; gap: 10px; }
  .platform-card:not(.is-hero):not(.is-disabled) { grid-column: 1 / -1; }
}

/* FAQ */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .2s; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; font-weight: 600; font-size: 1.02rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary > span { flex: none; display: inline-flex; } /* обёртка стрелки не сжимается у двухстрочных вопросов (находка 002) */
.faq summary svg { width: 20px; height: 20px; flex: none; color: var(--text-3); transition: transform .25s; }
.faq details[open] summary svg { transform: rotate(180deg); color: var(--gold); }
.faq .answer { padding: 0 22px 22px; color: var(--text-2); font-size: .96rem; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; border-radius: 28px; border: 1px solid var(--border-strong);
  padding: clamp(48px, 7vw, 88px) clamp(24px, 6vw, 80px); text-align: center;
  background: linear-gradient(180deg, rgba(30,24,52,.9), rgba(16,13,28,.95));
  box-shadow: var(--shadow);
}
.cta-band::after {
  /* старую пиксельную заглушку worlds/cta-bg.png убрали — на новой палитре её
     силуэт луны выглядел чужеродным пятном; свет дают только градиенты ниже. */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 0%, rgba(232,147,76,.10), transparent 60%);
}
.cta-band::before {
  content: ""; position: absolute; inset: -40% -10%; z-index: 1; pointer-events: none;
  background: radial-gradient(600px 300px at 50% 0%, rgba(139,124,246,.35), transparent 70%), radial-gradient(500px 300px at 80% 100%, rgba(232,180,92,.22), transparent 70%);
}
.cta-band > * { position: relative; z-index: 2; }
.cta-band .h2 { margin-bottom: 14px; }
.cta-band .lead { margin: 0 auto 30px; }
.cta-band .hero-actions { justify-content: center; margin-bottom: 0; }

/* ---------- Master split (illustration + chat mock) ---------- */
.console-mini { margin: 22px 0; box-shadow: none; }
.console-mini .console-story { padding: 16px 18px; font-size: 1.02rem; }
.console-mini .console-story .narration { min-height: 0; }
.console-mini .console-story .action { margin-top: 10px; font-size: .86rem; }
.master-split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.master-art { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-strong); box-shadow: var(--shadow); aspect-ratio: 5 / 3; }
.master-art img { width: 100%; height: 100%; object-fit: cover; }
.master-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(9,7,14,.6) 100%); }
.master-copy .h2 { margin-bottom: 16px; }
.master-copy .lead { margin-bottom: 26px; }
@media (max-width: 860px) { .master-split { grid-template-columns: 1fr; } }

/* ---------- Worlds showcase (home) ---------- */

/* Скриншоты приложения (реальные снимки экрана, без доната — см. CLAUDE.md
   правило про ассеты). Горизонтальная лента: на узком экране (360 px) всё
   равно видно кусок соседнего кадра, это подсказывает, что список листается. */
.app-screens-grid {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity;
}
.app-screens-grid img {
  flex: 0 0 auto; height: 420px; width: auto; border-radius: var(--radius-sm);
  border: 1px solid var(--border); scroll-snap-align: start;
}
/* Когда все кадры влезают (широкий экран) — лента по центру; auto-поля, а не
   justify-content:center, чтобы при переполнении первый кадр не уезжал за левый край. */
.app-screens-grid img:first-child { margin-left: auto; }
.app-screens-grid img:last-child { margin-right: auto; }
@media (max-width: 720px) {
  .app-screens-grid img { height: 320px; }
}

/* Ровная сетка 3×2 — раньше первая и четвёртая карточки были шире остальных
   (span 3 из 6 колонок), из-за чего сетка "разъезжалась": разный размер
   карточек, дыра в конце ряда, пустая колонка. Теперь все карточки одного
   размера и пропорции. */
.showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.showcase-card {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid var(--border); display: flex; align-items: flex-end;
  gap: 10px; padding: 16px;
}
.showcase-card img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.showcase-card:hover img { transform: scale(1.06); }
.showcase-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,10,18,.1) 30%, rgba(8,7,14,.92) 100%); }
.showcase-card span { position: relative; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--text); margin-right: auto; flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; text-shadow: 0 1px 6px rgba(0,0,0,.85); }
/* Карточка с кнопкой «Взять себе» — не сама ссылка (иначе кнопка внутри
   ссылки была бы вложенным интерактивным элементом), а картинка внутри
   растянута отдельной ссылкой showcase-card-bg на всю площадь плитки. */
.showcase-card-bg { position: absolute; inset: 0; z-index: 0; }
.showcase-take { position: relative; z-index: 1; flex: none; }
.showcase-more { margin-top: 22px; text-align: center; }
/* Персонажи на главной (09.10): шесть портретов 3:4 со ссылками на /personazhi/ */
.home-pz { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.home-pz-card { display: block; text-decoration: none; color: var(--text); }
.home-pz-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-2); transition: transform .3s ease, border-color .3s ease; }
.home-pz-card:hover img { transform: translateY(-3px); border-color: rgba(240,180,111,.55); }
.home-pz-card .home-pz-name { display: block; margin-top: 8px; text-align: center; font: 600 1rem/1.25 var(--font-display); }

/* ---------- Описание на карточках главной (19.10) ----------
   Миры и герои: при наведении (и фокусе клавиатуры) из карточки выезжает описание. На телефоне
   наведения нет, поэтому подпись видна всегда (у миров — над названием, у героев — под именем). */
.card-desc { pointer-events: none; }
.showcase-card .card-desc {
  position: absolute; inset: 0; z-index: 0; display: flex; align-items: flex-start; padding: 18px 18px 74px;
  font-family: var(--font-body); font-weight: 500; font-size: 1rem; line-height: 1.45; color: #f4ece0; text-shadow: none;
  background: linear-gradient(180deg, rgba(8,7,14,.9) 0%, rgba(8,7,14,.78) 60%, rgba(8,7,14,.3) 100%);
  opacity: 0; transform: translateY(10px); transition: opacity .3s ease, transform .35s cubic-bezier(.2,.8,.2,1);
  flex: none; margin: 0;
}
.showcase-card:hover .card-desc, .showcase-card:focus-within .card-desc { opacity: 1; transform: none; }
.showcase-card .card-desc { overflow: hidden; }
.home-pz-card { position: relative; }
.home-pz-pic { display: block; overflow: hidden; border-radius: var(--radius-sm); }
.home-pz-card:hover img { transform: scale(1.05); }
.home-pz-card .card-tag { display: none; }
.home-pz-card .card-desc {
  position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 3 / 4; display: flex; align-items: flex-end; padding: 12px 11px 14px;
  font: 500 .84rem/1.4 var(--font-body); text-align: left; color: #f4ece0; margin: 0; overflow: hidden;
  background: linear-gradient(180deg, rgba(8,7,14,.2) 0%, rgba(8,7,14,.86) 50%, rgba(8,7,14,.95) 100%);
  opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .35s cubic-bezier(.2,.8,.2,1);
  border-radius: var(--radius-sm);
}
.home-pz-card:hover .card-desc, .home-pz-card:focus-visible .card-desc { opacity: 1; transform: none; }
/* Без наведения (телефон, планшет): миры — описание видно над названием, герои — короткая подпись под именем */
@media (hover: none) {
  .showcase-card .card-desc {
    inset: auto 16px 62px 16px; padding: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
    background: none; opacity: 1; transform: none; font-size: .86rem; line-height: 1.35; text-shadow: 0 1px 6px rgba(0,0,0,.9); color: #f1e8da;
  }
  .home-pz-card .card-desc { display: none; }
  .home-pz-card .card-tag { display: block; margin-top: 3px; text-align: center; font: 500 .8rem/1.3 var(--font-body); color: var(--text-2); }
}
@media (prefers-reduced-motion: reduce) { .card-desc { transition: none !important; } }
@media (max-width: 900px) { .home-pz { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1024px) {
  .showcase { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .showcase { grid-template-columns: 1fr; }
}

/* Reveal on scroll — прячем только когда сценарий подтвердил себя классом
   html.js (main.js ставит его первой строкой). Без JS правило ниже вообще
   не применяется, и .reveal остаётся обычным видимым блоком. */
.reveal { transition: opacity var(--reveal-dur, .7s) ease, transform var(--reveal-dur, .7s) ease; }
html.js .reveal { opacity: 0; transform: translateY(18px); }
html.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal.no-anim { transition: none !important; }
.reveal[data-delay="1"] { transition-delay: var(--reveal-delay, .08s); }
.reveal[data-delay="2"] { transition-delay: calc(var(--reveal-delay, .08s) * 2); }
.reveal[data-delay="3"] { transition-delay: calc(var(--reveal-delay, .08s) * 3); }
.reveal[data-delay="4"] { transition-delay: calc(var(--reveal-delay, .08s) * 4); }
.reveal[data-delay="5"] { transition-delay: calc(var(--reveal-delay, .08s) * 5); }
/* Лесенка скорости прокрутки — ставит main.js в data-scroll-speed на <html>.
   Чем быстрее скроллит человек, тем короче анимация появления карточек. */
html[data-scroll-speed="1"] { --reveal-dur: .38s; --reveal-delay: .045s; }
html[data-scroll-speed="2"] { --reveal-dur: .16s; --reveal-delay: .02s; }
html[data-scroll-speed="3"] { --reveal-dur: 0s; --reveal-delay: 0s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .features-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .basics { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .world, .world.wide, .world.half { grid-column: span 6; }
}
/* .nav-links (8 пунктов) вместе с тремя кнопками .nav-cta не помещаются в
   ширину .container (1180px, дальше не растёт) — сумма их собственной ширины
   около 1280px, и на 1024–1360px правая кнопка «Скачать» съезжала за край
   экрана: запас у margin-inline:auto давал скрыть переполнение только с
   ~1382px и выше. Поэтому меню-ссылки прячутся в бургер настолько широко,
   чтобы кнопкам «Начать игру»/«Войти»/«Скачать» всегда хватало места. */
@media (max-width: 1380px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .console-body { grid-template-columns: 1fr; }
  .console-side { border-left: 0; border-top: 1px solid var(--border); }
  .split { grid-template-columns: 1fr; }
  .nav-cta { gap: 8px; }
  .nav-cta .btn-sm { padding: 9px 14px; font-size: .86rem; }
  .brand { font-size: 1.25rem; gap: 9px; }
  .brand-mark { width: 32px; height: 32px; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 32px); }
  .features-grid, .steps { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .section-tight { padding: 36px 0; }
  .plan { padding: 24px 22px; }
  .plan .price .num { font-size: 2.4rem; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .world, .world.wide, .world.half { grid-column: span 12; min-height: 240px; }
  .hero-actions .btn { width: 100%; }
  .console-story { font-size: 1.08rem; }
}
@media (max-width: 480px) {
  /* Кнопка "Начать игру" рядом со "Скачать" не помещалась вместе с бургером
     на 360–420px — "Скачать" сворачивается в квадратную иконку со стрелкой,
     подпись остаётся в aria-label. */
  .nav-cta .nav-dl .dl-label { display: none; }
  .nav-cta .nav-dl .dl-ico { display: inline-block; }
  .nav-cta .nav-dl { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 420px) {
  /* Playfair Display рисует "RPG Studio" шире Cormorant — на узких телефонах
     кнопка "Скачать" и бургер иначе вылезали за край экрана. */
  .brand { font-size: 1.05rem; gap: 7px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-mark svg { width: 16px; height: 16px; }
  .nav-cta { gap: 6px; }
  .nav-cta .btn-sm { padding: 8px 11px; font-size: .8rem; }
  .nav-toggle { width: 38px; height: 38px; }
  .nav-toggle svg { width: 19px; height: 19px; }
}
@media (max-width: 419px) {
  /* Пять элементов шапки ("Начать игру", вход, "Скачать", бургер) на 360-412px
     не помещаются вместе с подписью "Войти"/"Кабинет" — прячем текст, значок
     и aria-label/aria-текст остаются. */
  .nav-cta .nav-auth .auth-label { display: none; }
  .nav-cta .nav-auth { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 379px) {
  /* На 360px даже без подписи входа шапка теснее некуда — "RPG Studio" рядом
     с четырьмя кнопками вылезал за край, оставляем только значок-логотип. */
  .nav .brand span:not(.brand-mark) { display: none; }
  .nav .brand { gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drawer, .backdrop { transition: none; }
  .stars { animation: none; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
}

/* ---------- Общий кошель мини-игр: плашка «В кошеле: N монет» ----------
   Разметку внутри [data-koshel] рисует igry/koshel.js — одна на все страницы
   (витрина, «Гонец», кости), поэтому и стиль здесь, а не у каждой страницы свой. */
.koshel-plashka {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 40px;
  padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid rgba(240, 180, 111, .35);
  background: rgba(107, 111, 174, .14); color: var(--text); font-size: .95rem; line-height: 1.2;
}
.koshel-plashka b { font-family: var(--font-display); font-size: 1.2rem; color: var(--gold-2); font-variant-numeric: lining-nums; }
.koshel-coin {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 38% 34%, #ffe3a8 0 22%, var(--gold-2) 23% 58%, var(--gold) 59% 100%);
  box-shadow: inset 0 0 0 2px rgba(120, 60, 20, .35);
}
.koshel-debt, .koshel-mem { font-size: .76rem; padding: 2px 9px; border-radius: 999px; }
.koshel-debt { color: #ffb8a8; border: 1px solid rgba(192, 80, 58, .5); background: rgba(192, 80, 58, .12); }
.koshel-mem { color: var(--text-2); border: 1px solid var(--border-strong); }
.koshel-debt[hidden], .koshel-mem[hidden] { display: none; }

/* «← Все мини-игры» на страницах игр. Иначе из игры назад к списку вёл
 * только пункт меню, а на телефоне он спрятан в выдвижном меню. */
.back-igry-wrap { position: relative; z-index: 2; padding-top: 14px; }
.back-igry { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: .9rem; transition: color .2s, border-color .2s; }
.back-igry:hover, .back-igry:focus-visible { color: var(--text); border-color: var(--border-strong); }
.back-igry svg { width: 16px; height: 16px; }
/* «В лавку» — рядом с «Все мини-игры» на страницах игр, у которых есть товары
 * в общей лавке (igry/lavka/): своих лавок у игр больше нет. */
.back-igry-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.v-lavku { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px 7px 11px; border-radius: 999px;
  border: 1px solid rgba(232,147,76,.45); background: rgba(232,147,76,.10); color: var(--gold-2); font-size: .9rem; font-weight: 600;
  transition: background .2s, border-color .2s, color .2s; }
.v-lavku:hover, .v-lavku:focus-visible { color: var(--text); background: rgba(232,147,76,.18); border-color: var(--gold); }

/* ---------- Страница «Магазин чернил» (site/magazin.html) ----------
   .plan использует .price/.num, для которых точечная адаптивность под 600px
   уже была заведена выше (см. @media 600px) — здесь только базовое правило. */
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 28px 0 8px; }
.plan {
  position: relative; padding: 30px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.plan.is-popular { border-color: rgba(232,147,76,.5); background: linear-gradient(180deg, rgba(232,180,92,.10), rgba(255,255,255,.035)); }
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: #1a1206;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 60%, #d99a3d);
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.plan-name { color: var(--text-2); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.plan .price { margin: 10px 0 4px; font-family: var(--font-display); }
.plan .price .num { font-size: 2.6rem; font-weight: 700; color: var(--text); }
.plan .price .cur { font-size: 1.15rem; color: var(--text-2); margin-left: 3px; }
.plan .moves { color: var(--text-2); font-size: .92rem; margin-bottom: 20px; min-height: 2.6em; }
.plan .btn { width: 100%; }
.plan-note { color: var(--text-3); font-size: .82rem; margin-top: -2px; }
.price-table { width: 100%; border-collapse: collapse; margin: 20px 0 8px; font-size: .95rem; }
.price-table caption { caption-side: top; text-align: left; color: var(--text-2); font-size: .88rem; margin-bottom: 10px; }
.price-table th, .price-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.price-table thead th { color: var(--text-2); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table td:first-child, .price-table th:first-child { font-family: var(--font-display); color: var(--gold-2); }
.price-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 22px 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.price-custom label { color: var(--text-2); font-size: .92rem; }
.price-custom input {
  width: 110px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-size: .95rem; font-family: var(--font-body);
}
.price-custom label { flex: 1 1 100%; }
.price-custom input { flex: 1 1 140px; min-width: 0; width: auto; } /* на телефоне поле было 110 px, подсказка обрезалась (находка 044) */
.price-custom .btn { flex: none; }
.price-note-block { margin: 18px 0; padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: .9rem; }
/* Сообщение под кнопками покупки на /magazin — тот же вид, что у .igra-error
   в кабинете игры (site/igra/igra.css), но здесь своя копия: эта страница
   не подключает igra.css целиком ради одного правила. */
#magazinMessage { padding: 12px 14px; border-radius: 12px; background: rgba(95,212,196,.1); border: 1px solid rgba(95,212,196,.35); color: var(--teal); font-size: .92rem; margin: 4px 0 18px; }
#magazinMessage.is-error { background: rgba(240,143,176,.1); border-color: rgba(240,143,176,.35); color: var(--rose); }
#magazinMessage[hidden] { display: none !important; }
/* Пять пакетов (с 06.10 есть «Вечер»): последняя строка по центру, а не одинокая карточка слева */
@media (min-width: 1025px) { #magazinPlans { display: flex; flex-wrap: wrap; justify-content: center; } #magazinPlans .plan { flex: 0 0 calc(25% - 13.5px); } }
/* Подписки (5 карточек): в контейнере ~740 px четыре колонки давали карточки по 170 px, цена рвалась на две строки,
   пятая стояла одна слева (U1-004, 29.10). Три в ряд и остаток по центру, как у пакетов выше. */
@media (min-width: 1025px) { #magazinSubs { display: flex; flex-wrap: wrap; justify-content: center; } #magazinSubs .plan { flex: 0 0 calc(33.333% - 12px); min-width: 0; } }
.plan .price { white-space: nowrap; }
@media (max-width: 1024px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .plan-grid { grid-template-columns: 1fr; } .price-table { font-size: .88rem; } .price-table th, .price-table td { padding: 9px 8px; } }
.v-lavku svg { width: 16px; height: 16px; }
/* Осмотр вида 15.10: обе пилюли были 39 px в высоту — палец на телефоне промахивается
 * (меньше 44 px). Растим поле касания, а не шрифт: вид остаётся прежним. */
.back-igry, .v-lavku { min-height: 44px; }
/* Там же: кнопки «Отменить ход», «Сдаться», «Звук», «Совет ворона» в играх — .btn-sm,
 * 40–42 px. На сенсорном экране поднимаем до 44 px; на ПК с мышью вид не меняется,
 * шапка (.nav) не затронута — правило только внутри <main>. */
@media (pointer: coarse) { main .btn { min-height: 44px; } }

/* ---------- Правки по осмотру 29.09 (пачка 2) ---------- */
/* Бургер: бейдж «в разработке» строкой под названием, без наезда на край. */
.drawer-item .txt b:has(.soon) {
  font-size: .98rem; overflow: visible; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
}
.drawer-item .txt b .soon {
  margin: 0; vertical-align: baseline; font-size: .62rem; letter-spacing: .08em; padding: 2px 7px; line-height: 1.3;
}
/* Бургер: кольцо аватара целиком — кольцо рисуем отдельным слоем снаружи
   круга, чтобы overflow:hidden у аватара и у меню его не срезали. */
.drawer-auth { padding: 10px 16px 10px 10px; margin: 2px 4px 12px; overflow: visible; }
.drawer-auth .auth-avatar { box-shadow: none; overflow: visible; }
.drawer-auth .auth-avatar > * { border-radius: 50%; }
.drawer-auth .auth-avatar::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid rgba(232,180,92,.6); pointer-events: none;
}
.drawer-auth .auth-avatar-img { width: 100%; height: 100%; }
.drawer-auth .auth-avatar-guest, .drawer-auth .auth-avatar-letter { position: relative; }
/* Версия внутри карточки «Android». */
.platform-ver { font-size: .8rem; color: var(--gold-2, var(--gold)); line-height: 1.4; font-weight: 600; }
.platform-ver:empty { display: none; }
/* Лента скриншотов: тонкая полоса в цветах сайта вместо системной. */
.app-screens-grid { scrollbar-width: thin; scrollbar-color: rgba(232,180,92,.55) transparent; padding-bottom: 12px; }
.app-screens-grid::-webkit-scrollbar { height: 6px; }
.app-screens-grid::-webkit-scrollbar-track { background: rgba(255,255,255,.06); border-radius: 999px; }
.app-screens-grid::-webkit-scrollbar-thumb { background: rgba(232,180,92,.55); border-radius: 999px; }
.app-screens-grid::-webkit-scrollbar-thumb:hover { background: rgba(232,180,92,.85); }
.app-screens-grid::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
/* Ввод кода на 6 ячеек (assets/js/otp.js). Только общие токены темы. */
.otp { position: relative; width: 100%; max-width: 340px; }
.otp-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp-cell {
  display: grid; place-items: center; aspect-ratio: 1 / 1.15; max-height: 58px; border-radius: 12px;
  background: color-mix(in srgb, var(--text, #fff) 7%, transparent); border: 1px solid color-mix(in srgb, var(--text, #fff) 30%, transparent);
  color: var(--text, #fff); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s;
}
.otp-cell.is-filled { border-color: var(--gold, #e8b45c); }
.otp .otp-input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: transparent;
  color: transparent; caret-color: transparent; opacity: .01; font-size: 16px; letter-spacing: 0; z-index: 1;
}
.otp:focus-within .otp-cell.is-active { border-color: var(--gold, #e8b45c); box-shadow: 0 0 0 3px rgba(232,180,92,.28); }
/* Настоящая причина «обрезанного» кружка: display:block у картинки перебивал
   атрибут hidden, и пустой <img> рисовал рамку битой картинки в углу. */
.auth-avatar-img[hidden] { display: none !important; }

/* Кружок «!» с пояснением (site/igra/js/hint.js) на публичных страницах, например /magazin:
   стили из igra.css без тем игры (как в admin.css) */
.igra-with-info { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
.igra-info-btn {
  flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; margin: -4px 0; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; vertical-align: middle;
}
.igra-info-btn:hover, .igra-info-btn[aria-expanded="true"] { color: var(--gold); background: rgba(232, 147, 76, .14); }
.igra-info-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.igra-info-ico { width: 16px; height: 16px; display: block; }
.igra-info-pop {
  position: fixed; z-index: 95; left: 12px; top: 12px; width: max-content; max-width: 340px;
  padding: 10px 12px 12px 14px; border-radius: 12px; color: var(--text);
  border: 1px solid var(--border-strong, var(--border)); background: var(--bg-2, #1b1622);
  box-shadow: 0 12px 34px -8px rgba(0,0,0,.7); font-size: .86rem; line-height: 1.45;
}
.igra-info-pop[hidden] { display: none; }
.igra-info-pop:focus { outline: none; }
.igra-info-pop-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.igra-info-pop-title { margin: 3px 0 0; flex: 1; min-width: 0; font-weight: 700; font-size: .88rem; color: var(--text); }
.igra-info-pop-close {
  flex: none; width: 26px; height: 26px; margin: -2px -4px 0 0; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-2); cursor: pointer;
}
.igra-info-pop-close:hover, .igra-info-pop-close:focus-visible { color: var(--text); outline: none; }
.igra-info-pop-body p { margin: 0; color: var(--text-2); }
.igra-info-pop-body p + p { margin-top: 6px; }
.plan .moves.igra-with-info { align-items: flex-start; flex-wrap: nowrap; }

/* Ссылки «5 ходов бесплатно» в тексте главной (шаг 01 и подпись под демо) были цвета текста */
.step p a, .demo-note a { color: var(--gold-2, var(--gold)); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Мини-партия на главной (03.10): живой гостевой мастер вместо записи «Вельмара» ----------
   Разметка — index.html (#demo-try), поведение — assets/js/mini-chat.js (лёгкая загрузка) и
   mini-chat-game.js (ходы, лениво). Поля «Мир» и «Герой» рядом на ПК, друг под другом на телефоне. */
.mini-sub { margin: 14px auto 0; max-width: 46ch; color: var(--text-2); font-size: 1rem; line-height: 1.5; }
#demo-try .section-head { margin-bottom: 32px; }
.mini [hidden] { display: none !important; } /* .btn и .mini-game задают display и перебивали атрибут hidden */
.mini {
  max-width: 880px; margin: 0 auto; border-radius: 22px; padding: 22px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(600px 220px at 12% 0%, rgba(232,147,76,.09), transparent 70%),
    radial-gradient(520px 240px at 100% 100%, rgba(107,111,174,.12), transparent 70%),
    linear-gradient(180deg, rgba(24, 21, 38, 0.92), rgba(14, 12, 24, 0.92));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.07);
}
.mini-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mini-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mini-label-row { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.mini-field label {
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--gold-2);
}
.mini-name {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; color: var(--text);
}
.mini textarea {
  width: 100%; resize: none; display: block; min-height: 64px; max-height: 420px;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border-strong);
  background: rgba(8, 7, 14, .55); color: var(--text);
  font: 400 1rem/1.5 var(--font-body); /* 16px: иначе Safari на телефоне увеличивает страницу при фокусе */
  transition: border-color .2s, box-shadow .2s;
}
.mini textarea::placeholder { color: var(--text-3); }
.mini textarea:focus { outline: none; border-color: rgba(240,180,111,.6); box-shadow: 0 0 0 3px rgba(232,147,76,.16); }
.mini-assist {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(240,180,111,.35); background: rgba(232,147,76,.08); color: var(--gold-2);
  font: 600 .88rem/1.2 var(--font-body); transition: background .2s, border-color .2s;
}
.mini-assist::before {
  content: ""; width: 16px; height: 16px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 4C11 4 6 9 5 19'/%3E%3Cpath d='M5 19c3-1 7-3 9-7'/%3E%3Cpath d='M14 12c2 0 4-1 6-8'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 4C11 4 6 9 5 19'/%3E%3Cpath d='M5 19c3-1 7-3 9-7'/%3E%3Cpath d='M14 12c2 0 4-1 6-8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mini-assist:hover { background: rgba(232,147,76,.16); border-color: rgba(240,180,111,.6); }
.mini-assist:focus-visible, .mini-i:focus-visible, .mini-send:focus-visible, .mini-full:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.mini-assist.is-busy { cursor: progress; opacity: 1; }
.mini-assist.is-busy::before { animation: blink 1s steps(2) infinite; }
.mini-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.mini-start { min-width: 170px; }
.mini-actions .mini-i { order: 3; }
.mini-i {
  width: 28px; height: 28px; border-radius: 50%; flex: none; cursor: pointer;
  border: 1.5px solid var(--border-strong); background: none; color: var(--text-2);
  font: 700 .9rem/1 var(--font-body);
}
.mini-i[aria-expanded="true"], .mini-i:hover { color: var(--gold-2); border-color: rgba(240,180,111,.55); }
.mini-info { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.mini-info p { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--text-2); }
.mini-info p + p { margin-top: 6px; }
.mini-err { margin: 0; font-size: .86rem; line-height: 1.45; color: #f3a58b; }
.mini-err-main { margin-top: 12px; }
.mini-err-link { color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* Партия */
.mini-game { display: flex; flex-direction: column; }
.mini-bar {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--border);
}
.mini-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mini-left {
  font-size: .78rem; font-weight: 600; color: var(--gold-2); padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(240,180,111,.35); background: rgba(232,147,76,.08); white-space: nowrap;
}
.mini-left-short { display: none; }
.mini-full { margin-left: auto; font-size: .88rem; font-weight: 600; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.mini-full:hover { color: var(--text); }
.mini-log {
  display: flex; flex-direction: column; gap: 16px; padding: 18px 2px 18px;
  max-height: min(62vh, 560px); min-height: 180px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
.mini-turn-master { font-family: var(--font-body); font-size: 1.02rem; line-height: 1.65; color: #e9e2f2; } /* Playfair на сайте только 600+: длинный рассказ им читался жирно */
.mini-turn-master p { margin: 0; }
.mini-turn-master p + p { margin-top: .7em; }
.mini-turn-you {
  align-self: flex-end; max-width: 86%; padding: 10px 16px; border-radius: 18px 18px 4px 18px;
  background: rgba(232,147,76,.12); border: 1px solid rgba(240,180,111,.25); color: var(--text);
  font-size: .96rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
}
.mini-turn.is-pending { display: flex; flex-direction: column; gap: 8px; }
.mini-dots { display: inline-flex; gap: 6px; padding: 6px 0; }
.mini-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-2); opacity: .35; animation: mini-dot 1.2s infinite; }
.mini-dots i:nth-child(2) { animation-delay: .2s; }
.mini-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes mini-dot { 30% { opacity: 1; transform: translateY(-2px); } }
.mini-wait { font-family: var(--font-body); font-size: .86rem; color: var(--text-3); line-height: 1.45; }
.mini-fail {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px;
  background: rgba(192,80,58,.12); border: 1px solid rgba(192,80,58,.35); font-size: .9rem; color: var(--text);
}
.mini-form { display: flex; align-items: flex-end; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.mini-form textarea { min-height: 50px; flex: 1; border-radius: 16px; }
.mini-send {
  flex: none; width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1206;
}
.mini-send:disabled, .mini-form textarea:disabled { opacity: 1; filter: saturate(.4); border-style: dashed; cursor: default; }
.mini.is-sending .mini-send { cursor: progress; }
.mini-wall {
  margin-top: 16px; padding: 20px; border-radius: 16px; text-align: center;
  border: 1px solid rgba(240,180,111,.4);
  background: radial-gradient(420px 160px at 50% 0%, rgba(232,147,76,.16), transparent 75%), rgba(10, 9, 18, .7);
}
.mini-wall-title { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.4rem; color: var(--text); }
.mini-wall-lead { margin: 0 auto 16px; max-width: 46ch; color: var(--text-2); line-height: 1.5; }
.mini-wall-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 720px) {
  .mini { padding: 16px; border-radius: 18px; }
  .mini-fields { grid-template-columns: 1fr; gap: 16px; }
  .mini-actions .btn { flex: 1 1 auto; }
  .mini-title { font-size: 1.05rem; flex: 1 1 100%; }
  .mini-left-long { display: none; }
  .mini-left-short { display: inline; }
  .mini-full { margin-left: auto; }
  .mini-log { max-height: 64vh; }
  .mini-turn-master { font-size: 1rem; }
  .mini-wall-actions .btn { flex: 1 1 100%; }
}

/* Мини-партия на главной (mini-chat.js, 04.10): пока она на экране телефона, «Отзыв» не закрывает кнопку хода */
@media (max-width: 760px) { body.mini-playing .fb-fab { display: none !important; } }

/* Гость / вошедший (assets/js/sess.js ставит html.has-session до первой отрисовки) */
html.has-session [data-guest-only] { display: none !important; }
html:not(.has-session) [data-authed-only] { display: none !important; }
html:not(.has-last) [data-has-last-only] { display: none !important; }
html.has-last [data-no-last-only] { display: none !important; }

/* ---------- Зоны нажатия на телефоне, 44 px (U1-008, 29.10) ----------
   Замер аудита: ссылки подвала и хлебные крошки 21-23 px, кружки «!» 26-32, «Расписать за меня» 35. Растим область
   нажатия, а не шрифт: у кружков отрицательный внешний отступ держит прежнее место в строке. */
@media (max-width: 767px) {
  .footer-links { gap: 0 20px; }
  .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .igra-info-btn { width: 44px; height: 44px; margin: -9px; }
  .mini-i { width: 44px; height: 44px; }
  .mini-assist { min-height: 44px; }
  .price-custom input { min-height: 44px; }
}

/* ---------- Типографика на узких экранах (U1-020, 29.10) ---------- */
h1, h2, .display { text-wrap: balance; }      /* на 360 в заголовке оставалось одно слово на второй строке */
.nw { white-space: nowrap; }                   /* «ИИ-мастером» не рвём по дефису */
.showcase-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 359px) {
  .igrat-sub { gap: 2px 14px; }
  .igrat-sub i { display: none; }              /* точка-разделитель повисала в конце первой строки */
}
