/* =========================================================
   «Крылатые герои земли Нижегородской» — AR-модуль
   Единый музейно-архивный визуальный стиль (ТЗ п. 3.3.6, 4)
   Mobile-first, вертикальная ориентация.
   ========================================================= */

/* Рукописный шрифт адреса на письме — ЛОКАЛЬНО (без Google Fonts CDN). Фолбэк — cursive. */
@font-face {
  font-family: 'Marck Script'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../vendor/fonts/marck-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Marck Script'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../vendor/fonts/marck-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122;
}

:root {
  /* Палитра: архивная бумага, авиационный сине-стальной, латунь */
  --bg:          #161e26;
  --bg-2:        #1c2733;
  --panel:       #223040;
  --panel-line:  #34465a;
  --ink:         #eae3d2;   /* основной текст — тёплый «бумажный» */
  --ink-soft:    #b9b09a;
  --paper:       #e8dec5;   /* фактура старой бумаги */
  --paper-ink:   #2c2417;
  --brass:       #c9a05a;   /* латунь/акцент */
  --brass-soft:  #8a7240;
  --steel:       #5d7d99;
  --danger:      #b4583f;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --font: "Georgia", "PT Serif", "Times New Roman", serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* --- Шкала типографики (модульная, шаг ~1.2; serif для заголовков, ui для интерфейса) --- */
  /* целочисленная шкала (без дробей), вторичный текст ≥13px для музейной аудитории */
  --fs-eyebrow: 11px;   /* надзаголовок-«бровь» (метка) */
  --fs-cap:     13px;   /* подписи, мелкий текст (был 12.5 — дробь ломала ритм) */
  --fs-body:    15px;   /* основной текст */
  --fs-h3:      18px;   /* заголовок карточки */
  --fs-h2:      22px;   /* заголовок секции/сцены */
  --fs-h1:      30px;   /* титул хаба — доминирует над секциями (≥1.35× к h2) */
  --lh-tight:   1.15;   /* заголовки */
  --lh-snug:    1.3;    /* подзаголовки */
  --lh-body:    1.6;    /* читаемый текст */

  /* --- Шкала отступов (база 4px) — единый ритм для секций/сеток/паддингов --- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  min-height: 100%;
  /* На узких экранах (≈320dp, старые дешёвые Android) декоративные «крылья» титула
     дают ~6px горизонтального скролла. clip убирает боковой сдвиг и при этом НЕ
     создаёт скролл-контейнер → не ломает position:sticky (таб-бар/футер).
     На Safari < 16 / старом Chrome просто игнорируется (там остаётся косметический пиксель). */
  overflow-x: clip;
}

body {
  /* лёгкая фактура «карты/бумаги» поверх фона */
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(93,125,153,.18), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 2px, transparent 2px 4px),
    var(--bg);
}

#app { min-height: 100vh; }

/* ---------- Общие контейнеры ---------- */
.screen {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(16px + var(--safe-top)) 16px calc(28px + var(--safe-bottom));
  animation: fade .35s ease;
}
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Доступность: уважать системную настройку «уменьшить движение» (вестибулярные нарушения, музейный контекст) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

.eyebrow {
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: var(--fs-eyebrow);
  color: var(--brass);
  margin: 0 0 6px;
}

h1.title {
  font-family: var(--font);
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  margin: 0 0 6px;
  color: var(--ink);
}

.subtitle { color: var(--ink-soft); margin: 0 0 18px; font-size: 14px; }

/* ---------- Хаб: список сцен ---------- */
.hub-header { text-align: center; margin-bottom: 18px; }
.hub-header .crest {
  width: 64px; height: 64px; margin: 6px auto 12px;
  display: block;
}

.cards { display: grid; gap: 12px; }

.card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  color: inherit;
  text-decoration: none;
  /* материальная грань: тонкий «свет» по верхней кромке (подсвеченный металл) + тень-подъём */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), var(--shadow);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.card:active { transform: scale(.985); border-color: var(--brass-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 6px 18px rgba(0,0,0,.5); }

/* «гравированная плашка»: стальной радиальный фон + врезанная тень + световой кант —
   line-art-иконка читается как гравировка по металлу, а не проволочный контур на плоском боксе */
.card .thumb {
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  background: radial-gradient(115% 115% at 50% 16%, #28333f 0%, #121a22 78%);
  border: 1px solid var(--panel-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 -3px 7px rgba(0,0,0,.42);
  display: grid; place-items: center;
  overflow: hidden;
}
.card .thumb svg { width: 100%; height: 100%; display: block;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.45)); }  /* лёгкая глубина гравировки */

.card .meta h3 { margin: 0 0 3px; font-family: var(--font); font-size: var(--fs-h3); }
.card .meta p { margin: 0; font-size: var(--fs-cap); color: var(--ink-soft); line-height: var(--lh-snug); }

.badge {
  /* по умолчанию — ТИХАЯ метка (дисциплина латуни: акцент не размазываем по всем бейджам) */
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
  border: 1px solid var(--panel-line); color: var(--ink-soft);
  white-space: nowrap;
}
.badge.is-3d { color: var(--brass); border-color: var(--brass-soft); }  /* 3D — единственная латунная метка */

.chev { color: var(--ink-soft); font-size: 20px; }   /* шеврон — тихий, не конкурирует с акцентом */

.card-tail { display: flex; align-items: center; gap: var(--sp-2); }

/* ---------- Хаб: онбординг-подсказка про QR ---------- */
.hub-hint {
  display: flex; align-items: center; gap: var(--sp-2);
  margin: var(--sp-4) auto 0; max-width: 92%;
  font-size: var(--fs-cap); line-height: var(--lh-snug); color: var(--ink-soft);
  text-align: left;
  background: rgba(201,160,90,.07);
  border: 1px solid var(--brass-soft);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
}
.hub-hint svg { flex: 0 0 auto; width: 22px; height: 22px; }

/* геральдический разделитель ── ★ ── под титулом (оправдывает центрированную шапку, премиум-акцент) */
.hub-divider {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-3);
  max-width: 230px; margin: var(--sp-3) auto 0;
  color: var(--brass); font-size: 11px; line-height: 1;
}
.hub-divider::before, .hub-divider::after {
  content: ''; height: 1px; flex: 1 1 0;
  background: linear-gradient(90deg, transparent, var(--brass-soft));
}
.hub-divider::after { background: linear-gradient(90deg, var(--brass-soft), transparent); }

/* ---------- Хаб: секции-модули ---------- */
.hub-section { margin-top: var(--sp-5); }
.section-head {
  position: relative;
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3);
  margin: 0 0 var(--sp-3); padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--panel-line);
}
/* латунная линия поверх бордера — «прочерчивается» при появлении секции */
.section-head::after {
  content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: linear-gradient(90deg, var(--brass), transparent 75%);
  transform: scaleX(0); transform-origin: left;
}
.section-head h2 {
  margin: 0; font-family: var(--font); font-size: var(--fs-h2);
  color: var(--ink); font-weight: 600; letter-spacing: .01em;
}
.section-count {
  /* демотирован до простого числа (был латунной пилюлей — конфликтовал с бейджами по смыслу) */
  font-size: var(--fs-cap); color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- Хаб: премиум-моторика ----------
   Всё под no-preference → при reduced-motion правила не применяются (статичный, доступный экран).
   cardIn — backwards (не «запирает» transform → hover-подъём работает); lineDraw — forwards (линия остаётся). */
@media (prefers-reduced-motion: no-preference) {
  .hub .card {
    animation: cardIn .5s cubic-bezier(.2,.7,.2,1) backwards;
    animation-delay: calc(var(--i, 0) * 45ms);
  }
  .hub .section-head::after { animation: lineDraw .6s ease .12s forwards; }
}
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes lineDraw { to { transform: scaleX(1); } }

/* десктоп: мягкий подъём карточки на hover (на тач — press-эффект :active scale) */
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); border-color: var(--brass-soft);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 14px 32px rgba(0,0,0,.5); }
}

/* видео-превью: затемнение миниатюры + кнопка play поверх */
.thumb-video { position: relative; }
.thumb-video .thumb-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(10,14,19,.34); color: var(--paper); font-size: 18px;
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
}

/* ---------- Хаб: featured-карточка героя («парадный вход») ----------
   Единственный акцентный элемент экрана (Von Restorff): крупный визуал + латунный CTA. */
.card-feature {
  display: block; grid-template-columns: none; padding: 0; overflow: hidden;
  margin-bottom: var(--sp-3); position: relative;
  border-color: var(--brass-soft);
}
.card-feature::before {                 /* латунная световая линия по верхней кромке — «подсвеченный металл» */
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 1;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
}
.card-feature .feat-visual {
  height: 172px; display: grid; place-items: center;
  background: radial-gradient(120% 100% at 50% 0%, #2d3f52, #141b22 82%);
  border-bottom: 1px solid var(--panel-line);
  box-shadow: inset 0 -8px 18px rgba(0,0,0,.32);   /* врезанная глубина — единый материал с плашками */
}
.card-feature .feat-visual svg { filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.card-feature .feat-visual svg { width: 116px; height: 116px; }
.card-feature .feat-body { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); }
.card-feature .feat-meta { flex: 1 1 auto; min-width: 0; }
.card-feature .feat-eyebrow {
  margin: 0 0 4px; font-size: var(--fs-eyebrow); text-transform: uppercase;
  letter-spacing: .14em; color: var(--brass);
}
.card-feature h3 { margin: 0 0 3px; font-family: var(--font); font-size: var(--fs-h2); color: var(--ink); }
.card-feature .feat-meta p { margin: 0; font-size: var(--fs-cap); color: var(--ink-soft); }
.card-feature .feat-cta {           /* ЕДИНСТВЕННАЯ латунно-залитая кнопка на экране */
  flex: 0 0 auto; font-size: 13px; font-weight: 600; white-space: nowrap;
  color: #1a130a; background: var(--brass); border-radius: 999px; padding: 9px 15px;
}

/* ---------- Экран сцены ---------- */
.scene-top {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.btn-back {
  appearance: none; border: 1px solid var(--panel-line); background: var(--panel);
  color: var(--ink); border-radius: 999px; padding: 9px 14px; font-size: 14px;
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
}
.btn-back:active { transform: scale(.96); }

/* «сцена» — статичный визуальный объект (ТЗ: AR-слой только для показа) */
.stage {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--panel-line);
  background:
    radial-gradient(120% 80% at 50% 0%, #2a3a4c, #141b22 80%);
  box-shadow: var(--shadow);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: grid; place-items: center;
}
.stage svg { width: 100%; height: 100%; display: block; }
/* 3D-карта памяти (премиум) */
.stage.map { aspect-ratio: 4 / 5; background: radial-gradient(135% 115% at 50% 16%, #3b4e64 0%, #1b2735 48%, #0e151f 100%); }
.map-canvas { position: absolute; inset: 0; }
.map-canvas canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }

/* виньетка */
.map-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 6;
  background: radial-gradient(125% 105% at 50% 40%, transparent 60%, rgba(12,18,27,.40) 100%);
  box-shadow: inset 0 0 60px rgba(0,0,0,.32); }

/* подписи мест на карте (CSS2D) */
.map-label {
  font-family: var(--font); font-size: 12px; color: var(--paper);
  white-space: nowrap; padding: 2px 9px; border-radius: 4px;
  background: rgba(14,20,26,.72); border: 1px solid rgba(201,160,90,.45);
  letter-spacing: .02em; pointer-events: none;
  transition: opacity .25s ease; text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.map-label.primary { color: #f3e7c8; border-color: var(--brass); font-size: 12.5px; }
.map-label.on { background: var(--brass); color: #1a130a; border-color: var(--brass); }
.map-label i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* карточки-аннотации по полям + SVG-лидеры */
.map-callouts { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.callout-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.callout-svg .lead { fill: none; stroke: var(--brass); stroke-width: 1; opacity: .55; transition: opacity .2s, stroke-width .2s; }
.callout-svg .lead.on { stroke: #f0d9a6; stroke-width: 1.8; opacity: .95; }
.callout-svg .leaddot { fill: var(--brass); opacity: .8; }
.callout-svg .leaddot.on { fill: #ffe6b0; opacity: 1; }

.map-card { position: absolute; max-width: 38%; display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; border-radius: 9px; pointer-events: auto; cursor: pointer;
  background: linear-gradient(180deg, rgba(34,46,58,.94), rgba(20,28,36,.94));
  border: 1px solid var(--panel-line); border-left: 3px solid var(--brass);
  box-shadow: 0 8px 22px rgba(0,0,0,.45); backdrop-filter: blur(3px);
  transition: transform .14s, border-color .14s, box-shadow .14s; }
.map-card.right { border-left: 1px solid var(--panel-line); border-right: 3px solid var(--brass); flex-direction: row-reverse; text-align: right; }
.map-card.on { transform: scale(1.04); box-shadow: 0 10px 28px rgba(0,0,0,.6); }
.map-card .mc-ic { flex: 0 0 auto; display: inline-flex; }
.map-card .mc-tx { display: flex; flex-direction: column; line-height: 1.2; }
.map-card .mc-tx b { font-family: var(--font); font-size: 17px; color: var(--ink); }
.map-card.primary .mc-tx b { font-size: 17.5px; color: #f3e7c8; }
.map-card .mc-tx small { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }

/* карточка-навигатор → НИЖНЯЯ панель (в доке, в потоке — не перекрывает карту): заголовок + текст + стрелки */
.map-card.pinned { position: static; inset: auto; max-width: none; min-width: 0; width: 100%;
  flex-direction: column; align-items: stretch; gap: 8px; cursor: default; max-height: 38dvh; padding: 11px 13px;
  border: 0; border-top: 3px solid var(--brass); border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, rgba(30,40,51,.97), rgba(18,25,33,.97));
  box-shadow: 0 -8px 22px rgba(0,0,0,.4); transition: none; }
.map-card.pinned .mc-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: block; padding-right: 3px; }
.map-card.pinned .mc-head { display: flex; align-items: flex-start; gap: 9px; }
.map-card.pinned .mc-tx { flex: 1 1 auto; min-width: 0; }
.map-card.pinned .mc-date { flex: 0 0 auto; align-self: flex-start; font-size: 10px; color: var(--brass);
  border: 1px solid var(--panel-line); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.map-card.pinned .mc-text { margin: 9px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink); }
.map-card .mc-nav { display: flex; align-items: center; gap: 8px; border-top: 1px dashed var(--panel-line); padding-top: 8px; flex: 0 0 auto; }
.map-card .mc-nav button { appearance: none; cursor: pointer; flex: 1 1 0; height: 32px; border-radius: 8px;
  border: 1px solid var(--panel-line); background: var(--bg-2); color: var(--ink); font-size: 18px; line-height: 1; }
.map-card .mc-nav button:active { transform: scale(.94); }
.map-card .mc-nav .mc-pos { flex: 0 0 auto; font-size: 12px; color: var(--brass); font-variant-numeric: tabular-nums; min-width: 46px; text-align: center; }

@media (max-width: 430px) {
  .map-card.pinned { max-height: 40dvh; padding: 10px 11px; }
  .map-card.pinned .mc-tx b { font-size: 16.5px; }
  .map-card.pinned .mc-tx small { font-size: 11.5px; }
  .map-card.pinned .mc-text { font-size: 14.5px; }
}

/* иммерсивная (AR) карта — карта сверху (бо́льшая часть), виджет-навигатор отдельной панелью снизу.
   Ограничена телефонной шириной (на телефоне = во весь экран, на десктопе — колонка по центру). */
.screen-bare { max-width: 480px; margin: 0 auto; padding: 0; position: relative;
  display: flex; flex-direction: column; height: 100vh; height: 100dvh; animation: fade .35s ease; }
.screen-bare .stage.map { flex: 1 1 auto; min-height: 0; width: 100%; aspect-ratio: auto;
  border: 0; border-radius: 0; box-shadow: none; }
.screen-bare .map-dock { flex: 0 0 auto; }
.screen-bare .map-cartouche,
.screen-bare .map-legend { display: none; }   /* в иммерсиве лишние: категория видна иконкой в карточке */
.map-exit { position: absolute; top: calc(12px + var(--safe-top)); right: 12px; z-index: 9;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--panel-line);
  background: rgba(18,26,34,.82); color: var(--ink); font-size: 21px; line-height: 36px; text-align: center;
  cursor: pointer; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.map-exit:active { transform: scale(.93); }

/* надписи районов на карте (курсив-засечки, всегда видимы с LOD) */
.map-dlabel { font-family: var(--font); font-style: italic; font-size: 10.5px; letter-spacing: .02em;
  color: rgba(232,222,197,.92); text-shadow: 0 1px 2px rgba(0,0,0,.7); white-space: nowrap;
  opacity: 0; transition: opacity .2s ease; pointer-events: none; }

/* маршрут памяти */
.route-bar { margin: 0 0 12px; }
.route-go { width: 100%; appearance: none; cursor: pointer; font-family: var(--font); font-size: 14px;
  color: #1a130a; background: linear-gradient(180deg, #e6c489, var(--brass)); border: none;
  padding: 10px 14px; border-radius: var(--radius-sm); letter-spacing: .02em; box-shadow: var(--shadow); }
.route-go:active { transform: scale(.99); }
.route-step { display: flex; align-items: center; gap: 8px; }
.route-step button { appearance: none; cursor: pointer; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--panel-line); background: var(--panel); color: var(--ink); font-size: 17px; }
.route-step button:active { transform: scale(.95); }
.route-step [data-route-pos] { flex: 1; text-align: center; font-family: var(--font); color: var(--brass); font-variant-numeric: tabular-nums; }
.route-step [data-route-stop] { color: var(--danger); }

/* обогащённая панель места */
.place-detail .pd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.place-detail .pd-date { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.place-detail .pd-link { margin-top: 10px; font-size: 13px; color: var(--brass); line-height: 1.45;
  border-top: 1px dashed var(--panel-line); padding-top: 8px; }

/* реестр: группа «Нижний Новгород» */
.places .place-list li.place-group { background: none; border: none; padding: 0; display: block; border-radius: 0; }
.pg-head { width: 100%; appearance: none; cursor: pointer; display: flex; align-items: center; gap: 7px;
  font-family: var(--font-ui); font-size: 13px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--panel-line); background: var(--bg-2); color: var(--ink); }
.pg-head .pg-count { margin-left: auto; font-size: 11px; background: var(--brass); color: #1a130a; border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.pg-head .pg-caret { font-size: 10px; color: var(--brass); transition: transform .2s; }
.place-group.open .pg-head .pg-caret { transform: rotate(180deg); }
.pg-items { list-style: none; margin: 8px 0 0 12px; padding: 4px 0 0 10px; border-left: 1px solid var(--panel-line);
  display: none; flex-wrap: wrap; gap: 7px; }
.place-group.open .pg-items { display: flex; }

/* сводка хаба в панели */
.pd-sub { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 0; }
.pd-sub li { font-size: 13px; color: var(--ink); cursor: pointer; padding: 7px 0; border-bottom: 1px dashed var(--panel-line); transition: color .12s; }
.pd-sub li:last-child { border-bottom: none; }
.pd-sub li:hover { color: var(--brass); }
.pd-sub li i { color: var(--ink-soft); font-size: 12px; }

/* картуш-заголовок */
.map-cartouche { position: absolute; top: 12px; left: 12px; z-index: 7; pointer-events: none;
  padding: 8px 12px; border-left: 2px solid var(--brass);
  background: linear-gradient(90deg, rgba(14,20,26,.6), transparent); }
.map-cartouche .mc-kicker { display: block; font-family: var(--font-ui); font-size: 9.5px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--brass); }
.map-cartouche .mc-title { display: block; font-family: var(--font); font-size: 17px; color: var(--ink); margin-top: 2px; }

/* компас */
.map-compass { position: absolute; top: 12px; right: 12px; z-index: 7; width: 46px; height: 46px; opacity: .9; pointer-events: none; }
.map-compass svg { width: 100%; height: 100%; }

/* легенда категорий */
.map-legend { position: absolute; left: 12px; bottom: 12px; z-index: 7; pointer-events: none;
  display: flex; flex-wrap: wrap; gap: 6px 12px; max-width: 70%; }
.map-legend .lg { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-soft);
  background: rgba(14,20,26,.5); padding: 3px 8px; border-radius: 999px; }
.map-legend .lg i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* категория в панели */
.place-cat { display: inline-block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--c, var(--brass)); border: 1px solid currentColor; padding: 2px 8px; border-radius: 999px; margin-bottom: 8px; opacity: .9; }

.places .place-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.places .place-list li {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--panel-line); background: var(--bg-2); color: var(--ink-soft);
  transition: border-color .12s, color .12s, background .12s;
}
.places .place-list li .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brass-soft); }
.places .place-list li.on { color: #1a130a; background: var(--brass); border-color: var(--brass); font-weight: 600; }
.places .place-list li.on .dot { background: #1a130a; }
.place-detail h3 { font-family: var(--font); font-size: 17px; margin: 0 0 6px; color: var(--ink); }
.place-detail p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.loading-note { font-size: 13px; color: var(--ink-soft); }

/* 2.5D-параллакс */
.stage.parallax { perspective: 900px; }
.stage.parallax .layer {
  position: absolute;
  inset: -8%;                 /* запас, чтобы края не открывались при сдвиге */
  will-change: transform;
  transform: scale(1.08);
  backface-visibility: hidden;
}
.stage.parallax .layer svg { width: 100%; height: 100%; display: block; }
.depth-btn {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  z-index: 50; background: var(--brass); color: #1a130a; border: none;
  padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
}

.stage .stage-tag {
  position: absolute; top: 10px; left: 10px; z-index: 40;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(0,0,0,.45); color: var(--ink-soft);
  padding: 5px 9px; border-radius: 999px; backdrop-filter: blur(4px);
}

/* 3D-просмотрщик (И-16) */
model-viewer {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  border: 1px solid var(--panel-line);
  background:
    radial-gradient(120% 80% at 50% 10%, #2c3d50, #10161c 80%);
  box-shadow: var(--shadow);
  --poster-color: transparent;
}
model-viewer .mv-hint {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--ink-soft); background: rgba(0,0,0,.4);
  padding: 6px 12px; border-radius: 999px; pointer-events: none;
  white-space: nowrap;
}
.ar-button {
  position: absolute; bottom: 12px; right: 12px;
  background: var(--brass); color: #1a130a; border: none;
  padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 13px;
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
}
/* кнопка AR ещё прогревает usdz в кэш — приглушена и неактивна, чтобы тап не «провалился» */
.ar-button.is-preparing, .ar-button:disabled { opacity: .6; cursor: progress; }

/* ===== Кроссплатформенность: сообщение «3D недоступно» + баннер in-app-браузера ===== */
.compat-msg { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: radial-gradient(125% 95% at 50% 14%, #2f2719, #100b06 82%); }
.compat-card { max-width: 360px; text-align: center; color: #efe6d2; }
.compat-ic { font-size: 40px; margin-bottom: 10px; }
.compat-card h2 { margin: 0 0 10px; font-family: Georgia, serif; color: #e6c489; }
.compat-card p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.compat-sub { color: #b9ad93; font-size: 13px; }
.compat-back { margin-top: 16px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--brass);
  background: transparent; color: #e6c489; font: inherit; cursor: pointer; }

.inapp-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; animation: fade .3s ease;
  padding: 10px calc(10px + env(safe-area-inset-right)) calc(10px + var(--safe-bottom, env(safe-area-inset-bottom))) calc(10px + env(safe-area-inset-left));
  background: rgba(20,16,10,.96); border-top: 1px solid var(--brass-soft);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.inapp-inner { display: flex; align-items: flex-start; gap: 10px; max-width: 480px; margin: 0 auto; color: #efe6d2; }
.inapp-ic { font-size: 20px; line-height: 1.2; }
.inapp-tx { flex: 1; min-width: 0; }
.inapp-tx b { display: block; font-size: 13px; color: #e6c489; }
.inapp-tx small { display: block; font-size: 12px; line-height: 1.45; color: #c8bca2; margin-top: 2px; }
.inapp-act { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.inapp-act [data-copy] { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--brass);
  background: var(--brass); color: #1a130a; font: 600 12px/1.1 inherit; white-space: nowrap; cursor: pointer; }
.inapp-act [data-x] { padding: 2px 6px; border: 0; background: transparent; color: #b9ad93; font-size: 16px; cursor: pointer; }

/* Именная плашка под 3D-портретом — латунь с гравировкой */
model-viewer .mv-plate {
  position: absolute; left: 50%; bottom: calc(16px + var(--safe-bottom)); transform: translateX(-50%);
  margin: 0; padding: 7px 24px 9px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  max-width: 86%; text-align: center; pointer-events: none;
  background: linear-gradient(180deg, rgba(32,24,13,.82), rgba(15,11,6,.86));
  border: 1px solid var(--brass-soft); border-radius: 11px;
  box-shadow: 0 8px 22px rgba(0,0,0,.55), inset 0 1px 0 rgba(201,160,90,.32);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
model-viewer .mv-plate-star {
  color: var(--brass); font-size: 9px; letter-spacing: .35em; text-indent: .35em; opacity: .85;
}
model-viewer .mv-plate-name {
  margin: 1px 0 0; font-family: var(--font); font-weight: 600;
  font-size: clamp(14px, 4.6vw, 17px); line-height: 1.15; letter-spacing: .03em;
  background: linear-gradient(180deg, #f5e4bb 0%, #d8b069 52%, #9c7f48 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.5));
}
model-viewer .mv-plate-sub {
  margin-top: 3px; font-family: var(--font-ui);
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
}
model-viewer.mv-named .ar-button { top: calc(12px + var(--safe-top)); bottom: auto; }   /* кнопку AR наверх, чтобы не спорить с плашкой */
/* AR-сцена на весь экран: «Смотреть в AR» — в правый-верхний угол, подсказку вращения скрыть,
   «Подробнее»/«Видео» приподнять — иначе кнопки слипаются внизу (и лезут под тулбар Safari) */
.screen-immersive .ar-button { top: calc(12px + var(--safe-top)); right: 12px; bottom: auto; left: auto; }
.screen-immersive .mv-hint { display: none; }
.screen-immersive .scene-actions { bottom: calc(26px + var(--safe-bottom)); }

/* Иммерсивный AR-портрет: model-viewer на весь экран, без рамки/полей */
.screen-immersive model-viewer {
  flex: 1 1 auto; min-height: 0; width: 100%; height: auto;
  aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none;
  background: radial-gradient(125% 95% at 50% 14%, #2f2719, #100b06 82%);   /* тёплый «архивный» фон (камеры тут нет — у model3d нативный AR) */
}
.map-exit.exit-left { left: 12px; right: auto; }   /* стрелку «назад» — влево, AR-кнопка справа */

/* Иммерсив: плашку приподнять, чтобы под ней поместились кнопки действий */
.screen-immersive model-viewer .mv-plate { bottom: calc(78px + var(--safe-bottom)); }

/* Кнопки действий под плашкой: «Подробнее» / «Видео» */
.scene-actions {
  position: absolute; left: 50%; bottom: calc(16px + var(--safe-bottom)); transform: translateX(-50%);
  z-index: 8; display: flex; gap: 10px;
}
.scene-act {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 600;
  color: var(--ink); text-decoration: none;
  background: rgba(16,22,30,.78); border: 1px solid var(--brass-soft);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
.scene-act .sa-ic { color: var(--brass); font-size: 13px; }
.scene-act:active { transform: scale(.95); }
.scene-act.sa-video { background: var(--brass); color: #1a130a; border-color: var(--brass); }
.scene-act.sa-video .sa-ic { color: #1a130a; }

/* Полноэкранный блок «Подробнее» — биография/подвиг (ТЗ 3.3.3) */
.detail-sheet {
  position: fixed; inset: 0; z-index: 30; overflow-y: auto;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(93,125,153,.18), transparent 60%),
    var(--bg);
  animation: fade .25s ease;
}
.detail-sheet[hidden] { display: none; }
.detail-inner {
  max-width: 600px; margin: 0 auto;
  padding: calc(54px + var(--safe-top)) 22px calc(40px + var(--safe-bottom));
}
.detail-head {
  text-align: center; padding-bottom: 20px; margin-bottom: 24px;
  border-bottom: 1px solid var(--panel-line);
}
.detail-kicker {
  display: inline-block; font-family: var(--font-ui);
  text-transform: uppercase; letter-spacing: .18em; font-size: 11px;
  color: var(--brass); margin-bottom: 12px;
}
.detail-head h2 {
  font-family: var(--font); font-weight: 700; color: var(--ink);
  font-size: clamp(24px, 7vw, 33px); line-height: 1.12; margin: 0;
}
.detail-years {
  font-family: var(--font); font-style: italic; font-size: 15px;
  color: var(--ink-soft); letter-spacing: .04em; margin: 9px 0 0;
}
.detail-lead { font-size: 16px; line-height: 1.65; color: var(--ink); margin: 0 0 16px; }
.detail-lead::first-letter {
  float: left; font-family: var(--font); font-weight: 700; color: var(--brass);
  font-size: 3.1em; line-height: .82; padding: 6px 10px 0 0;
}
.detail-p { font-size: 14.5px; line-height: 1.72; color: var(--ink-soft); margin: 0 0 14px; }
.detail-facts {
  list-style: none; margin: 26px 0 0; padding: 18px 0 0;
  border-top: 1px solid var(--panel-line);
}
.detail-facts li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  padding: 11px 2px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.detail-facts li:last-child { border-bottom: 0; }
.detail-facts li > span:first-child {
  flex: 0 0 auto; font-family: var(--font-ui);
  text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; color: var(--brass-soft);
}
.detail-facts li > span:last-child {
  text-align: right; font-family: var(--font); font-size: 14px; color: var(--ink);
}
.detail-close {
  position: fixed; top: calc(12px + var(--safe-top)); right: 14px; z-index: 31;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--panel-line); background: rgba(18,26,34,.9); color: var(--ink);
  font-size: 18px; line-height: 36px; text-align: center;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.detail-close:active { transform: scale(.93); }

/* Страница видеоролика (ТЗ 3.4) */
.screen-video { justify-content: center; background: #07090c; }
.vp-stage {
  position: relative; width: 100%; max-width: 480px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: #000; overflow: hidden; border-radius: 4px;
  -webkit-user-select: none; user-select: none;
}
.vp-video { width: 100%; max-height: 80vh; background: #000; display: block; }

/* спиннер загрузки поверх кадра */
.vp-loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .2s; }
.vp-loading.on { opacity: 1; }

/* большая центральная кнопка play */
.vp-bigplay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border-radius: 50%; border: none; cursor: pointer;
  display: grid; place-items: center; color: #1a130a;
  background: rgba(201,160,90,.94); box-shadow: 0 10px 30px rgba(0,0,0,.55);
  transition: transform .15s, opacity .2s; z-index: 4;
}
.vp-bigplay svg { width: 32px; height: 32px; margin-left: 3px; }
.vp-bigplay:active { transform: translate(-50%, -50%) scale(.92); }
.vp-stage.is-playing .vp-bigplay { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.7); }

/* нижняя панель управления */
.vp-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: 9px;
  padding: 16px 12px calc(12px + var(--safe-bottom));
  background: linear-gradient(to top, rgba(7,9,12,.92), rgba(7,9,12,.35) 68%, transparent);
  transition: opacity .25s, transform .25s;
}
.vp-stage.vp-hide .vp-controls { opacity: 0; transform: translateY(8px); pointer-events: none; }
.vp-btn {
  flex: 0 0 auto; width: 34px; height: 34px; border: none; background: none;
  color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0;
  border-radius: 8px; transition: transform .12s, color .15s;
}
.vp-btn svg { width: 21px; height: 21px; }
.vp-btn:active { transform: scale(.88); }
.vp-btn:hover { color: var(--brass); }
.vp-time {
  flex: 0 0 auto; font-family: var(--font-ui); font-size: 12px; color: var(--ink);
  font-variant-numeric: tabular-nums; min-width: 32px; text-align: center; opacity: .9;
}
/* дорожка перемотки */
.vp-track { position: relative; flex: 1 1 auto; height: 28px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.vp-track::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: 999px; background: rgba(255,255,255,.22); }
.vp-buffered { position: absolute; left: 0; height: 4px; border-radius: 999px; background: rgba(255,255,255,.34); width: 0; }
.vp-fill { position: absolute; left: 0; height: 4px; border-radius: 999px; background: var(--brass); width: 0; }
.vp-knob { position: absolute; left: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--brass); box-shadow: 0 1px 5px rgba(0,0,0,.55); transform: translateX(-50%); transition: transform .12s; }
.vp-track:active .vp-knob { transform: translateX(-50%) scale(1.25); }

/* фуллскрин — растянуть видео без чёрных поясов по краям панели */
.vp-stage:fullscreen { max-width: none; width: 100%; height: 100%; border-radius: 0; }
.vp-stage:fullscreen .vp-video { max-height: 100%; height: 100%; object-fit: contain; }
.vp-stage:-webkit-full-screen { max-width: none; width: 100%; height: 100%; }
.vp-stage:-webkit-full-screen .vp-video { max-height: 100%; height: 100%; object-fit: contain; }

/* плашка «Поверните телефон» (только для горизонтального ролика в портретной ориентации) */
.vp-rotate {
  position: absolute; inset: 0; z-index: 7; display: grid; place-items: center;
  background: rgba(7,9,12,.86); backdrop-filter: blur(2px);
  color: var(--ink); text-align: center; cursor: pointer;
  animation: vpFade .25s ease;
}
.vp-rotate[hidden] { display: none; }
@keyframes vpFade { from { opacity: 0; } to { opacity: 1; } }
.vp-rotate-in { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px; }
.vp-rotate-ic { width: 64px; height: 64px; color: var(--brass); animation: vpTilt 2.2s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes vpTilt { 0%,100% { transform: rotate(0deg); } 45%,70% { transform: rotate(-90deg); } }
.vp-rotate-t { margin: 0; font-family: var(--font); font-size: 18px; line-height: 1.3; }
.vp-rotate-t span { display: block; margin-top: 5px; font-family: var(--font-ui); font-size: 12.5px; color: var(--ink-soft); }
.vp-empty {
  width: 100%; aspect-ratio: 3 / 4; max-height: 78vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 24px; text-align: center;
  background: radial-gradient(120% 80% at 50% 30%, #1c2733, #07090c 80%);
}
.vp-play {
  width: 64px; height: 64px; border-radius: 50%; margin-bottom: 8px;
  display: grid; place-items: center; font-size: 24px; color: #1a130a;
  background: var(--brass); box-shadow: 0 8px 22px rgba(0,0,0,.5);
}
.vp-ttl { font-family: var(--font); font-size: 18px; color: var(--ink); margin: 0; }
.vp-sub { font-size: 13px; color: var(--ink-soft); margin: 0; }
.vp-todo { font-size: 12px; color: var(--brass-soft); margin: 10px 0 0; line-height: 1.5; max-width: 330px; }
.vp-todo code { background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 4px; font-size: 11px; }
.vp-cap { padding: 16px 18px calc(20px + var(--safe-bottom)); text-align: center; flex: 0 0 auto; }
.vp-cap h2 { font-family: var(--font); font-size: 18px; margin: 4px 0 0; color: var(--ink); }

/* «Вид из кабины» Ил-2 (first-person three.js) */
.stage.cockpit { aspect-ratio: 3 / 4; background: radial-gradient(120% 80% at 50% 10%, #2c3d50, #10161c 80%); }
.cockpit-canvas { position: absolute; inset: 0; }
.stage.cockpit canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; cursor: grab; }
.stage.cockpit canvas:active { cursor: grabbing; }

/* Фронтовое письмо (3D-треугольник, three.js) */
.stage.letter { aspect-ratio: 4 / 5; background: radial-gradient(120% 90% at 50% 12%, #2a2418, #0e0b07 82%); }
.letter-canvas { position: absolute; inset: 0; }
.stage.letter canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; cursor: grab; }
.stage.letter canvas:active { cursor: grabbing; }
.letter-open-btn {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 50;
  appearance: none; cursor: pointer; font-family: var(--font-ui); font-size: 13px; letter-spacing: .02em;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(20,16,9,.66); color: var(--paper); border: 1px solid rgba(201,160,90,.55);
  backdrop-filter: blur(3px); transition: transform .12s ease, background .15s ease, color .15s ease;
}
.letter-open-btn:active { transform: translateX(-50%) scale(.96); }
.letter-open-btn.is-open { background: var(--brass); color: #1a130a; border-color: var(--brass); }
/* письмо в AR-иммерсиве: только письмо + «Раскрыть», стейдж на весь экран */
.screen-bare .stage.cockpit,
.screen-bare .stage.letter { flex: 1 1 auto; min-height: 0; width: 100%; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
.screen-immersive .letter-open-btn { bottom: calc(18px + var(--safe-bottom)); }
.screen-immersive .stage.letter ~ .scene-actions { top: calc(12px + var(--safe-top)); bottom: auto; left: auto; right: 12px; transform: none; }
.stage .stage-hint {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 40;
  font-size: 12px; color: var(--ink-soft); background: rgba(0,0,0,.4);
  padding: 6px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap;
}

/* Текстовый блок-пояснение (ТЗ: текст в обычном интерфейсе, вне AR-слоя) */
.info {
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-left: 3px solid var(--brass);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.info h2 { font-family: var(--font); font-size: 18px; margin: 0 0 8px; }
.info p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--ink); }
.info p:last-child { margin-bottom: 0; }

.specs { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.specs li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px;
  border-bottom: 1px dashed var(--panel-line); padding-bottom: 6px; }
.credit { margin: 12px 0 0; font-size: 10.5px; color: var(--ink-soft); opacity: .6; letter-spacing: .02em; line-height: 1.4; }
.credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: .5px; }
.specs li span:first-child { color: var(--ink-soft); }
.specs li span:last-child { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Ссылка на сопутствующий видеоролик (раздел 3.4) */
.video-cta {
  margin-top: 14px;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, #2a2018, #1d160f);
  border: 1px solid var(--brass-soft); border-radius: var(--radius-sm);
  padding: 12px 14px; color: var(--ink); text-decoration: none;
}
.video-cta .play {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%;
  background: var(--brass); color: #1a130a; display: grid; place-items: center; font-size: 16px;
}
.video-cta b { display: block; font-size: 14px; }
.video-cta small { color: var(--ink-soft); font-size: 12px; }

.foot-nav { margin-top: 22px; display: flex; justify-content: center; }

/* ---------- Заглушки/служебное ---------- */
.notice {
  margin-top: 18px; font-size: 12px; color: var(--ink-soft);
  text-align: center; line-height: 1.4;
}
.notice code { color: var(--brass); }

.brand-foot {
  margin-top: 28px; text-align: center; color: var(--ink-soft); font-size: 11px;
  letter-spacing: .04em;
}

/* =========================================================
   ЕДИНЫЙ AR-ФИРСТИЛЬ — сквозная камера телефона + общая навигация.
   Камеру вешает модуль ar-camera.js на host (класс .ar-host);
   оболочку сцены (полный экран) даёт .screen-bare/.screen-immersive.
   ========================================================= */
/* живое видео камеры — самый нижний слой; контент сцены поверх */
.ar-camera { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: 0; background: #0a0e13; pointer-events: none; }
.ar-host { position: relative; }                              /* контекст для абсолютной камеры */
.ar-host > .stage, .ar-host > model-viewer { position: relative; z-index: 1; }
.ar-host > .map-dock { position: relative; z-index: 2; }
.ar-host.ar-off .ar-camera { display: none; }                /* нет камеры → коричневый фолбэк-фон ниже */
/* камера ВКЛ → сцена и model-viewer прозрачны, видно живой кадр */
.ar-host.ar-on .stage, .ar-host.ar-on model-viewer { background: transparent !important; }
.ar-host.ar-on .map-vignette { opacity: .35; }
/* камера ВЫКЛ/недоступна → ЕДИНЫЙ тёплый «архивный» коричневый фон во всех AR-сценах */
.ar-host.ar-off .stage,
.ar-host.ar-off model-viewer { background: radial-gradient(125% 95% at 50% 14%, #2f2719, #100b06 82%) !important; }

/* кнопка выхода — кружок со стрелкой влево, слева-сверху (во ВСЕХ сценах) */
.ar-back { position: absolute; top: calc(12px + var(--safe-top)); left: 12px; z-index: 20;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(14,20,27,.55); border: 1px solid rgba(255,255,255,.22); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 4px 16px rgba(0,0,0,.4);
  transition: transform .12s, background .12s; }
.ar-back:hover { background: rgba(20,28,37,.72); }
.ar-back:active { transform: scale(.92); }
.ar-back svg { width: 23px; height: 23px; display: block; }

/* «Видеоролик» — пилюля снизу по центру (сцены с видео) */
.ar-video { position: absolute; left: 50%; transform: translateX(-50%); z-index: 20;
  bottom: calc(18px + var(--safe-bottom)); display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px 11px 12px; border-radius: 999px; cursor: pointer; font-size: 14px; color: var(--ink);
  background: rgba(14,20,27,.6); border: 1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 6px 20px rgba(0,0,0,.45); }
.ar-video:active { transform: translateX(-50%) scale(.96); }
.ar-video .pl { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brass); color: #1a130a; font-size: 11px; }

/* ретрай камеры (нет доступа / нужен жест на iOS) */
.ar-cam-retry { position: absolute; left: 50%; transform: translateX(-50%); z-index: 19;
  bottom: calc(70px + var(--safe-bottom)); display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 999px; cursor: pointer; font-size: 12.5px; color: var(--ink-soft);
  background: rgba(14,20,27,.6); border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ar-cam-retry[hidden] { display: none; }

/* =========================================================
   ПРЕЛОАДЕРЫ — мгновенный бут-экран + загрузка 3D-сцены
   ========================================================= */
@keyframes ar-spin { to { transform: rotate(360deg); } }
/* бут-лоадер (виден сразу при загрузке страницы, до запуска app.js) */
#boot { position: fixed; inset: 0; z-index: 9999; display: grid; place-content: center; justify-items: center; gap: 16px;
  background: radial-gradient(120% 90% at 50% 20%, #243042, #0b0f14 80%); color: var(--ink); text-align: center; padding: 24px; }
.boot-ring { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(201,160,90,.25);
  border-top-color: var(--brass); animation: ar-spin .9s linear infinite; }
.boot-title { font-family: var(--font); font-size: 19px; margin: 0; line-height: 1.25; }
.boot-title span { color: var(--brass); font-size: 15px; }
.boot-note { font-family: var(--font-ui); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin: 0; }

/* пер-сценовый оверлей: поверх сцены, пока грузятся three.js / тяжёлая модель */
.ar-loading { position: absolute; inset: 0; z-index: 15; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: radial-gradient(120% 90% at 50% 30%, #2f2719, #0c0906 82%); color: var(--ink); text-align: center;
  transition: opacity .45s ease; }
.ar-loading.is-hiding { opacity: 0; pointer-events: none; }
.ar-loading .ld-ring { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(201,160,90,.22);
  border-top-color: var(--brass); animation: ar-spin .9s linear infinite; }
.ar-loading .ld-note { font-family: var(--font-ui); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }

/* =========================================================
   КВЕСТЫ И ЗАГАДКИ (ТЗ р. 3.6)
   Визуальный язык — «музейная экспозиция»: латунь, архивная бумага,
   печать-медальон. Крупные цели под палец (ТЗ р. 4).
   ========================================================= */
.quest-screen { max-width: 560px; margin: 0 auto; padding: calc(14px + var(--safe-top)) 16px calc(30px + var(--safe-bottom)); }

/* ----- шапка-«экспозиционная этикетка» ----- */
.quest-head { margin-bottom: var(--sp-5); }
.quest-bar { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.q-back {
  flex: none; width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--brass);
  background: radial-gradient(120% 120% at 50% 0%, #2a3a4c, #1a2530);
  border: 1px solid var(--brass-soft); box-shadow: 0 2px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .12s ease, border-color .12s ease;
}
.q-back svg { width: 19px; height: 19px; }
.q-back:active { transform: scale(.92); }
.quest-tag {
  font-family: var(--font-ui); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brass); padding: 6px 12px; border-radius: 999px;
  background: rgba(201,160,90,.08); border: 1px solid var(--brass-soft);
}
.quest-h { font-family: var(--font); font-size: 25px; line-height: 1.12; margin: 0 0 4px; color: var(--ink); letter-spacing: .01em; }
.quest-sub { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
/* латунный разделитель с ромбом */
.quest-rule { display: flex; align-items: center; gap: 10px; margin-top: var(--sp-4); }
.quest-rule span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--brass-soft) 40%, var(--brass-soft) 60%, transparent); }
.quest-rule i { color: var(--brass); font-size: 11px; font-style: normal; opacity: .85; }

.quest-body { animation: q-rise .32s ease; }
@keyframes q-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.q-task { display: flex; flex-direction: column; gap: var(--sp-4); }

/* «карточка задания» — инструкция с латунным корешком */
.q-instr { display: flex; gap: 12px; align-items: stretch; background: linear-gradient(180deg, rgba(34,48,64,.6), rgba(20,28,36,.6)); border: 1px solid var(--panel-line); border-radius: var(--radius-sm); padding: 12px 14px 12px 0; }
.q-instr .qi-spine { flex: none; width: 4px; border-radius: 3px; background: linear-gradient(180deg, var(--brass), var(--brass-soft)); }
.q-instr p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }

/* прогресс + заклёпки */
.q-progress { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.q-progress > span { font-family: var(--font-ui); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.q-pips { display: flex; gap: 6px; }
.q-pip { width: 8px; height: 8px; border-radius: 50%; background: transparent; border: 1.5px solid var(--brass-soft); transition: background .2s, transform .2s; }
.q-pip.is-done { background: var(--brass); border-color: var(--brass); }
.q-pip.is-cur { background: var(--brass); border-color: var(--brass); transform: scale(1.35); box-shadow: 0 0 0 3px rgba(201,160,90,.2); }

/* ----- кнопки ----- */
.quest-foot { margin-top: var(--sp-5); }
.q-foot-row { display: flex; gap: 10px; }
.q-btn {
  flex: 1; appearance: none; cursor: pointer; min-height: 54px; padding: 15px 18px;
  border-radius: var(--radius-sm); font: 600 15px/1 var(--font-ui); letter-spacing: .01em;
  border: 1px solid var(--panel-line); background: linear-gradient(180deg, var(--panel), var(--bg-2)); color: var(--ink);
  transition: transform .1s ease, filter .15s ease, opacity .15s ease;
}
.q-btn:active { transform: scale(.97); }
.q-btn:disabled { opacity: .4; cursor: default; }
.q-btn.is-primary {
  color: #20160a; border-color: var(--brass);
  background: linear-gradient(180deg, #e2bd74, #c9a05a 60%, #b88f48);
  box-shadow: 0 4px 14px rgba(201,160,90,.28), inset 0 1px 0 rgba(255,255,255,.4);
}
.q-btn.is-primary:not(:disabled):active { filter: brightness(1.04); }
.q-btn.is-ghost { background: transparent; border-color: var(--brass-soft); color: var(--brass); }

/* фото-портрет / изображение самолёта (фолбэк — глиф) */
.q-portrait, .q-plane-img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }
.q-portrait--ph { display: grid; place-items: center; }
.q-plane-img { border-radius: 8px; object-fit: contain; }

/* ===== 3.6.1 сопоставление ===== */
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.match-col ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.match-cap { margin: 0; font-family: var(--font-ui); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.match-item {
  display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 10px; cursor: pointer;
  background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--panel-line);
  border-radius: var(--radius-sm); transition: border-color .14s ease, box-shadow .14s ease, transform .1s ease;
}
.match-item:active { transform: scale(.98); }
.match-item .mi-glyph { width: 42px; height: 42px; flex: none; border-radius: 50%; overflow: hidden; background: #11181f; border: 1px solid var(--brass-soft); }
.match-item.is-plane .mi-glyph { border-radius: 9px; border-color: var(--panel-line); }
.match-item .mi-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.match-item .mi-name { font-size: 13px; line-height: 1.2; }
.match-item .mi-tag { font-size: 10.5px; color: var(--brass); font-family: var(--font-ui); min-height: 12px; }
.match-item.is-sel { border-color: var(--brass); box-shadow: 0 0 0 2px rgba(201,160,90,.35), 0 6px 16px rgba(0,0,0,.3); transform: translateY(-1px); }
.match-item.is-linked { border-color: var(--brass-soft); }
.match-item.is-taken { opacity: .45; }
.match-item.is-right { border-color: #6f9e74; box-shadow: 0 0 0 1px #6f9e74; }
.match-item.is-wrong { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }

/* ===== 3.6.2 шифровка — телеграфная лента + ключ ===== */
.cipher-tape {
  display: flex; flex-direction: column; align-items: stretch; border-radius: 8px; overflow: hidden;
  background: repeating-linear-gradient(90deg, var(--paper) 0 16px, #ded2b4 16px 17px); border: 1px solid var(--brass-soft);
  box-shadow: inset 0 0 18px rgba(120,90,40,.18);
}
.cipher-tape .ct-edge { height: 7px; background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(120,90,40,.32) 9px 12px); }
.cipher-tape .ct-code {
  font-family: ui-monospace, "Courier New", monospace; font-size: 23px; letter-spacing: 2px; word-spacing: 12px;
  text-align: center; padding: 12px 10px; color: #5a4422;
}
.cipher-key { background: var(--bg-2); border: 1px solid var(--panel-line); border-radius: var(--radius-sm); padding: 12px; }
.ck-cap { margin: 0 0 9px; font-family: var(--font-ui); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.ck-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ck-cell { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 6px; border-radius: 8px; background: #11181f; border: 1px solid var(--panel-line); }
.ck-cell b { font: 700 15px var(--font); color: var(--ink); }
.ck-cell i { font: 14px ui-monospace, monospace; font-style: normal; letter-spacing: 2px; color: var(--brass); }
.q-input {
  width: 100%; min-height: 56px; padding: 14px 16px; font: 19px/1 var(--font-ui); text-align: center; letter-spacing: 3px;
  background: var(--paper); color: var(--paper-ink); border: 1px solid var(--brass-soft); border-radius: var(--radius-sm);
  box-shadow: inset 0 2px 6px rgba(120,90,40,.14);
}
.q-input::placeholder { color: #9a8b6b; letter-spacing: 1px; }
.q-input.is-wrong { border-color: var(--danger); animation: q-shake .4s; }
@keyframes q-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }
.q-hint { margin: 0; font-size: 13px; color: var(--ink-soft); font-style: italic; padding: 10px 12px; background: var(--bg-2); border-radius: 8px; border-left: 2px solid var(--brass-soft); }

/* инструкция «как читать азбуку Морзе» — метод декодирования, а не намёк на ответ */
.cipher-howto { background: rgba(201,160,90,.06); border: 1px solid var(--brass-soft); border-radius: var(--radius-sm); padding: 12px 14px; }
.cipher-howto .ch-cap { margin: 0 0 9px; font-family: var(--font-display); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); }
.cipher-howto .ch-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.cipher-howto .ch-steps li { font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.cipher-howto .ch-steps li::marker { color: var(--brass); font-weight: 700; }
.cipher-howto .ch-steps b { color: var(--ink); }
.ch-dot, .ch-dash { font: 700 16px ui-monospace, "Courier New", monospace; color: var(--brass); vertical-align: -1px; }
.cipher-howto .ch-example { margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--panel-line); font-size: 13px; color: var(--ink-soft); }
.cipher-howto .ch-example b { color: var(--brass); font: 400 18px var(--font); }
.ch-code { font: 16px ui-monospace, "Courier New", monospace; letter-spacing: 2px; color: #5a4422; background: var(--paper); border-radius: 5px; padding: 1px 8px; }

/* лента: буквы-группы как отдельные «телеграммные» чипы — границы букв видны явно */
.cipher-tape .ct-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 9px 14px; padding: 13px 12px; }
.ct-letter {
  font-family: ui-monospace, "Courier New", monospace; font-size: 22px; letter-spacing: 3px; line-height: 1;
  color: #5a4422; padding: 6px 11px; border-radius: 7px;
  background: rgba(255,255,255,.34); box-shadow: inset 0 0 0 1px rgba(120,90,40,.28);
}

/* ===== 3.6.3 картиночный паззл ===== */
.puz-stage { position: relative; }
.puz-board {
  display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; aspect-ratio: 1 / 1;
  padding: 6px; border-radius: var(--radius); background: linear-gradient(180deg, #2a3a4c, #141b22);
  border: 1px solid var(--brass-soft); box-shadow: var(--shadow), inset 0 0 0 1px rgba(0,0,0,.3);
  transition: gap .4s ease, padding .4s ease;
}
.puz-tile {
  appearance: none; border: none; padding: 0; cursor: pointer; border-radius: 6px; background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); transition: transform .12s ease, box-shadow .15s ease, border-radius .4s ease;
}
.puz-tile:active { transform: scale(.96); }
.puz-tile.is-sel { box-shadow: 0 0 0 3px var(--brass), 0 6px 14px rgba(0,0,0,.45); transform: translateY(-2px); z-index: 2; }
.puz-tile.is-home { box-shadow: inset 0 0 0 1px rgba(111,158,116,.5); }
.puz-board.is-done { gap: 0; padding: 3px; }
.puz-board.is-done .puz-tile { border-radius: 0; box-shadow: none; pointer-events: none; }
.puz-board.is-done { animation: puz-glow .9s ease; }
@keyframes puz-glow { 0%{box-shadow:var(--shadow)} 40%{box-shadow:0 0 0 2px var(--brass), 0 0 30px rgba(201,160,90,.5)} 100%{box-shadow:var(--shadow)} }
/* миниатюра-цель в углу */
.puz-ref { position: absolute; right: 8px; bottom: 8px; width: 64px; margin: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--brass); box-shadow: 0 4px 12px rgba(0,0,0,.5); background: #11181f; }
.puz-ref img { width: 100%; display: block; }
.puz-ref figcaption { font-family: var(--font-ui); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; text-align: center; color: var(--brass); padding: 2px; background: rgba(14,20,26,.85); }
.puz-status { margin: 0; text-align: center; font-family: var(--font-ui); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.puz-final { margin: 4px 0 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--brass-soft); }
.puz-final img { width: 100%; display: block; }
.puz-final figcaption { font-family: var(--font); font-size: 12px; color: var(--ink-soft); text-align: center; padding: 8px 10px; background: var(--bg-2); }

/* ===== общий вид варианта (выбор) ===== */
.opt {
  display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 11px 14px; cursor: pointer; text-align: left;
  background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--panel-line); border-radius: var(--radius-sm);
  color: var(--ink); transition: border-color .14s ease, transform .1s ease, box-shadow .14s ease;
}
.opt:active:not(:disabled) { transform: scale(.985); }
.opt:not(:disabled):hover { border-color: var(--brass-soft); }
.opt-label { flex: 1; min-width: 0; }
.opt-label b { font-weight: 600; font-size: 15px; }
.opt-label small { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.opt-key { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font: 700 14px var(--font-ui); color: var(--brass); background: #11181f; border: 1px solid var(--brass-soft); }
.opt-badge { flex: none; width: 22px; text-align: center; font-weight: 700; }
.opt.is-right { border-color: #6f9e74; background: rgba(111,158,116,.14); }
.opt.is-right .opt-badge::after { content: '✓'; color: #8fcf95; }
.opt.is-right .opt-key { color: #8fcf95; border-color: #6f9e74; }
.opt.is-wrong { border-color: var(--danger); background: rgba(180,88,63,.12); }
.opt.is-wrong .opt-badge::after { content: '✕'; color: #e0876f; }

/* ===== 3.6.4 угадай героя ===== */
.hero-clue { position: relative; font-family: var(--font); font-size: 16px; line-height: 1.5; padding: 18px 16px 16px 44px; background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--panel-line); border-left: 3px solid var(--brass); border-radius: var(--radius-sm); }
.hc-quote { position: absolute; left: 12px; top: 6px; font-family: var(--font); font-size: 40px; color: var(--brass-soft); line-height: 1; }
.hero-options { display: flex; flex-direction: column; gap: 10px; }
.hero-opt .ho-portrait { flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 1px solid var(--brass-soft); background: #11181f; }
.hero-card { padding: 14px; background: var(--bg-2); border: 1px dashed var(--brass-soft); border-radius: var(--radius-sm); animation: q-rise .25s ease; }
.hc-verdict { margin: 0 0 6px; font: 700 14px var(--font-ui); }
.hc-verdict.ok { color: #8fcf95; }
.hc-verdict.no { color: var(--brass); }
.hc-text { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); }

/* ===== 3.6.5 викторина ===== */
.quiz-q { font-size: 17px; line-height: 1.4; font-family: var(--font); color: var(--ink); }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-explain { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); padding: 12px; background: var(--bg-2); border-radius: var(--radius-sm); border-left: 2px solid var(--brass-soft); animation: q-rise .25s ease; }
.quiz-review { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; }
.qr-row { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 11px 13px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--panel-line); }
.qr-row.is-right { border-left: 3px solid #6f9e74; }
.qr-row.is-no { border-left: 3px solid var(--danger); }
.qr-mark { font-weight: 700; font-size: 15px; }
.qr-row.is-right .qr-mark { color: #8fcf95; }
.qr-row.is-no .qr-mark { color: #e0876f; }
.qr-body { display: flex; flex-direction: column; gap: 3px; }
.qr-body b { font-size: 13px; font-weight: 600; line-height: 1.3; }
.qr-ans { font-size: 12.5px; color: var(--brass); }
.qr-ex { font-size: 12px; color: var(--ink-soft); line-height: 1.4; }

/* ===== экран результата — печать-медальон + справка ===== */
.q-result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 12px 4px; animation: q-rise .35s ease; }
.q-seal { position: relative; width: 96px; height: 96px; display: grid; place-items: center; animation: seal-in .5s cubic-bezier(.2,1.3,.4,1); }
@keyframes seal-in { 0%{transform:scale(0) rotate(-18deg);opacity:0} 100%{transform:scale(1) rotate(0);opacity:1} }
.q-result.is-ok .q-seal { color: var(--brass); }
.q-result.is-no .q-seal { color: var(--brass-soft); }
.q-seal-ring { position: absolute; inset: 0; width: 96px; height: 96px; }
.q-seal-mark { font-size: 38px; color: var(--brass); }
.q-result.is-ok .q-seal-mark { color: #e2bd74; text-shadow: 0 0 14px rgba(201,160,90,.5); }
.q-result-h { font-family: var(--font); font-size: 23px; margin: 0; color: var(--ink); }
.q-fact { width: 100%; text-align: left; background: linear-gradient(180deg, rgba(34,48,64,.5), rgba(20,28,36,.5)); border: 1px solid var(--panel-line); border-left: 3px solid var(--brass); border-radius: var(--radius-sm); padding: 14px 16px; }
.q-fact-kicker { display: block; font-family: var(--font-ui); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); margin-bottom: 6px; }
.q-fact p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink); }

/* ===== хаб квестов: номер на иконке ===== */
.quest-card .thumb { position: relative; }
.quest-card .quest-no { position: absolute; left: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--font-ui); color: #20160a; background: var(--brass); box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.card-tail { display: flex; align-items: center; gap: 8px; }

/* ===== тост ===== */
.q-flash {
  position: fixed; left: 50%; bottom: calc(20px + var(--safe-bottom)); transform: translate(-50%, 20px);
  background: var(--bg-2); color: var(--ink); border: 1px solid var(--brass-soft); border-radius: 999px;
  padding: 11px 20px; font-size: 13px; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; z-index: 40; max-width: 88vw; text-align: center;
}
.q-flash.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .quest-body, .q-result, .hero-card, .quiz-explain, .q-seal { animation: none; }
}

/* =========================================================
   КВЕСТЫ · ПРЕМИУМ-ОБОЛОЧКА v2 (по эталон-макету)
   Фон-блюпринт, military-титул, плашки-таблички с заклёпками,
   соединители с самолётиком, зелёные печати «Верно».
   ========================================================= */
@font-face { font-family: 'Russo One'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../vendor/fonts/russo-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Russo One'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../vendor/fonts/russo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
:root { --font-display: 'Russo One', 'PT Sans Narrow', var(--font-ui); --green: #6f9e74; --green-bright: #8fcf95; }

/* ----- фон-блюпринт + карта ----- */
.quest-screen {
  position: relative;
  background-color: #0e141c;
  background-image:
    linear-gradient(180deg, rgba(12,16,22,.5), rgba(12,16,22,.72) 55%, rgba(10,13,18,.92));
  background-repeat: no-repeat; background-size: cover;
}
.quest-screen::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url(../assets/quests/bg/blueprint.webp) center top / cover no-repeat;
  opacity: .9;
}
.quest-screen > * { position: relative; }

/* ----- шапка: back + центрированный счётчик «ЗАДАНИЕ N ИЗ M» ----- */
.quest-bar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin-bottom: var(--sp-4); }
.q-back {
  flex: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; grid-column: 1;
  display: grid; place-items: center; color: var(--brass);
  background: radial-gradient(130% 130% at 50% 25%, #33485d, #18222d);
  border: 1.5px solid var(--brass); box-shadow: 0 3px 12px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.18), inset 0 0 12px rgba(201,160,90,.12);
  transition: transform .12s ease;
}
.q-back svg { width: 20px; height: 20px; }
.q-back:active { transform: scale(.9); }
.quest-count {
  grid-column: 2; justify-self: center; display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: #e9dcc0;
  padding: 8px 18px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(36,28,16,.85), rgba(20,16,10,.85));
  border: 1.5px solid var(--brass-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 4px 14px rgba(0,0,0,.45);
}
.quest-count i { color: var(--brass); font-style: normal; font-size: 11px; }

/* ----- military-титул + крылья ----- */
.quest-h {
  font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.05; text-align: center;
  text-transform: uppercase; letter-spacing: .015em; color: #ece3d0; margin: 6px 0 6px;
  text-shadow: 0 2px 0 rgba(0,0,0,.45), 0 0 22px rgba(0,0,0,.55);
}
.quest-sub { text-align: center; color: var(--ink-soft); margin: 0; font-size: 14px; }
.quest-wings { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.quest-wings .wing { width: 64px; height: 18px; opacity: .92; }
.quest-wings .wing.flip { transform: scaleX(-1); }
.quest-wings i { color: var(--brass); font-style: normal; font-size: 13px; filter: drop-shadow(0 0 6px rgba(201,160,90,.5)); }
.wing path { fill: var(--brass); }
.wing path.faint { fill: var(--brass-soft); }

/* ----- мерило прогресса (пилюля «N/M пары») ----- */
.q-meter {
  align-self: center; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 16px; letter-spacing: .02em; color: var(--ink);
  padding: 7px 18px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(34,46,58,.9), rgba(20,28,36,.9)); border: 1.5px solid var(--brass-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 3px 12px rgba(0,0,0,.4);
}
.q-meter .qm-ico { width: 20px; height: 14px; }
.q-meter b { color: var(--green-bright); font-weight: 400; transition: color .2s; }
.q-meter small { font-size: 13px; color: var(--ink-soft); }

/* ----- инфо-плашка с ⓘ ----- */
.q-note {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px;
  background: rgba(20,28,36,.7); border: 1px solid var(--panel-line); color: var(--ink-soft); font-size: 13px;
}
.q-note .qn-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--brass); border: 1.5px solid var(--brass-soft); font-size: 13px; }

/* ===== MATCH: таблички-плашки с заклёпками + связи ===== */
.match-grid { position: relative; }
.match-cap { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); font-size: 12.5px; letter-spacing: .12em; color: var(--brass); }
.match-cap .cap-wing { width: 26px; height: 10px; }
.match-cap .cap-wing.flip { transform: scaleX(-1); }

.match-item {
  position: relative; min-height: 66px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid #3a4d62;
  background:
    radial-gradient(circle at 9px 9px,   rgba(0,0,0,.55) 0 1.6px, rgba(255,255,255,.06) 2px 2.8px, transparent 3px),
    radial-gradient(circle at calc(100% - 9px) 9px, rgba(0,0,0,.55) 0 1.6px, rgba(255,255,255,.06) 2px 2.8px, transparent 3px),
    radial-gradient(circle at 9px calc(100% - 9px), rgba(0,0,0,.55) 0 1.6px, rgba(255,255,255,.06) 2px 2.8px, transparent 3px),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), rgba(0,0,0,.55) 0 1.6px, rgba(255,255,255,.06) 2px 2.8px, transparent 3px),
    linear-gradient(180deg, #2b3c4e, #18232f);
  box-shadow: 0 6px 16px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.07);
  transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.match-item:active { transform: scale(.985); }
.match-item .mi-glyph { width: 46px; height: 46px; flex: none; border-radius: 50%; overflow: hidden; background: #11181f; border: 2px solid var(--brass-soft); box-shadow: inset 0 0 10px rgba(0,0,0,.5); }
.match-item.is-plane .mi-glyph { border-radius: 10px; border-color: #3a4d62; }
.match-item .mi-name { font-family: var(--font); font-size: 14px; font-weight: 600; line-height: 1.15; }
.match-item.is-plane .mi-name { font-size: 14px; }
.match-item .mi-sub { display: block; font-family: var(--font-ui); font-size: 11px; color: var(--ink-soft); margin-top: 1px; }
.match-item .mi-tag { display: none; }
/* состояния */
.match-item.is-sel { border-color: var(--brass); box-shadow: 0 0 0 2px var(--brass), 0 0 24px rgba(201,160,90,.55), 0 6px 16px rgba(0,0,0,.4); transform: translateY(-1px); }
.match-item.is-right { border-color: var(--green); box-shadow: 0 0 0 1.5px var(--green), 0 0 20px rgba(111,158,116,.4); }
.match-item.is-right .mi-glyph { border-color: var(--green); }
.match-item.is-wrong { animation: q-shake .4s; border-color: var(--danger); box-shadow: 0 0 0 1.5px var(--danger); }
/* зелёная печать «Верно» */
.mi-verno { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; padding: 3px 10px 3px 7px; border-radius: 999px; font-family: var(--font-ui); font-size: 11.5px; font-weight: 600; color: var(--green-bright); background: rgba(95,143,99,.16); border: 1px solid rgba(111,158,116,.6); }
.mi-verno svg { width: 13px; height: 13px; }

/* узлы и линии-связи */
.match-node { position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; transform: translateY(-50%); background: #11181f; border: 2px solid var(--brass-soft); z-index: 3; transition: background .2s, border-color .2s, box-shadow .2s; }
.match-item:not(.is-plane) .match-node { right: -7px; }
.match-item.is-plane .match-node { left: -7px; }
.match-node.is-active { border-color: var(--brass); background: var(--brass); box-shadow: 0 0 10px rgba(201,160,90,.8); }
.match-node.is-linked { border-color: var(--green); background: var(--green-bright); box-shadow: 0 0 8px rgba(143,207,149,.7); }
.match-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.match-links .lk { fill: none; stroke: var(--green); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; opacity: .9; }
.match-links .lk-plane { fill: var(--brass); }

/* ===== общий титул в результате/хабе — military ===== */
.q-result-h { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; }
.hub-header .title, .title { } /* хаб остаётся как есть */

/* ===== тост-успех ===== */
.q-flash.is-ok { border-color: rgba(111,158,116,.7); color: var(--ink); padding-left: 14px; }
.q-flash .qf-ico { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #0e141c; font-size: 12px; margin-right: 8px; vertical-align: -5px; box-shadow: 0 0 10px rgba(111,158,116,.6); }

/* ----- MATCH: широкий «канал» между колонками под линии-связи ----- */
.match-grid { column-gap: clamp(44px, 13vw, 64px); }
.match-node { width: 14px; height: 14px; }
.match-item:not(.is-plane) .match-node { right: -8px; }
.match-item.is-plane .match-node { left: -8px; }
.match-links .lk { stroke-width: 2.4; stroke-dasharray: 1.5 6.5; opacity: .95; }
/* «тянучка» от выбранного лётчика в канал — видно, что пара формируется */
.match-links .lk-pending { fill: none; stroke: var(--brass); stroke-width: 2.4; stroke-dasharray: 1.5 6.5; stroke-linecap: round; opacity: .85; }
.match-links .lk-pending-dot { fill: var(--brass); }

/* =========================================================
   ПРЕМИУМ-ОБОЛОЧКА ХАБА (pscreen) — по эталон-макету
   Фотогерой-коллаж + трафаретный титул + карточки-иллюстрации +
   записка-маршрут + нижний таб-бар. Используется главным хабом
   (app.js) и хабом квестов (quests.js). Mobile-first.
   ========================================================= */
.pscreen {
  position: relative;
  max-width: 560px; margin: 0 auto;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg);
}

/* ----- кнопка «На главную» поверх героя ----- */
.pback {
  position: absolute; z-index: 6;
  top: calc(10px + var(--safe-top)); left: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 9px 16px 9px 12px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-ui); font-size: 13px; color: #f0e7d2;
  background: linear-gradient(180deg, rgba(26,34,44,.82), rgba(14,20,28,.86));
  border: 1px solid var(--brass-soft);
  box-shadow: 0 4px 14px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: transform .12s ease;
}
.pback:active { transform: scale(.96); }

/* ----- фотогерой-коллаж + затемнение к низу ----- */
.phero { position: relative; overflow: hidden; }
.phero-img {
  display: block; width: 100%;
  height: clamp(248px, 62vw, 350px);
  object-fit: cover; object-position: 50% 28%;
}
.phero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(14,20,28,.12) 0%, rgba(14,20,28,0) 34%,
    rgba(14,20,28,.55) 74%, var(--bg) 100%);
}
.phero-cap { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2; text-align: center; padding: 0 16px; }

/* ----- трафаретный military-титул + крылья ----- */
.ptitle-eyebrow {
  margin: 0 0 5px; font-family: var(--font-display); font-weight: 400;
  text-transform: uppercase; letter-spacing: .2em; font-size: 11px;
  color: var(--brass); text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.ptitle {
  margin: 0; font-family: var(--font-display); font-weight: 400;
  text-transform: uppercase; letter-spacing: .015em; line-height: .96;
  font-size: clamp(30px, 8.6vw, 44px); color: #f1e8d3;
  text-shadow: 0 2px 0 rgba(0,0,0,.5), 0 3px 18px rgba(0,0,0,.6);
}
.ptitle-wings { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 7px; }
.ptitle-wings svg { width: clamp(40px, 12vw, 60px); height: auto; filter: drop-shadow(0 1px 4px rgba(0,0,0,.6)); }
.ptitle-line2 {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  letter-spacing: .1em; font-size: clamp(13px, 3.6vw, 17px); color: var(--brass);
  white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.7);
}

/* ----- контентная зона ----- */
.pwrap { position: relative; flex: 1 0 auto; padding: 0 16px; }
.psub {
  margin: 16px auto 18px; max-width: 34ch; text-align: center;
  color: var(--ink-soft); font-size: 14px; line-height: 1.5;
}

/* ----- записка-маршрут (бумажная, приколота к низу героя) ----- */
.pticket {
  position: relative; z-index: 3;
  width: max-content; max-width: 72%;
  margin: -40px 8px 8px auto; padding: 12px 22px 13px;
  text-align: center; font-family: var(--font); color: #2c2417;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.022) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, #efe4c6, #dccfa6);
  border: 1px solid #c9b88a; border-radius: 3px;
  transform: rotate(-2.4deg);
  box-shadow: 0 12px 26px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.45);
}
.pticket::before {
  content: ''; position: absolute; top: -9px; left: 50%;
  transform: translateX(-50%) rotate(3deg);
  width: 58px; height: 18px;
  background: rgba(201,160,90,.45); border: 1px solid rgba(138,114,64,.5);
  box-shadow: 0 2px 5px rgba(0,0,0,.3);
}
.pt-kicker {
  margin: 0; font-family: var(--font-display); font-weight: 400;
  text-transform: uppercase; letter-spacing: .18em; font-size: 10px; color: #7a5a23;
}
.pt-count { margin: 2px 0 1px; font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1; color: #3a2c12; }
.pt-note { margin: 0 auto; max-width: 22ch; font-size: 12px; line-height: 1.3; color: #5a4a2a; }

/* ----- список карточек ----- */
.plist { display: grid; gap: 12px; }

.pcard {
  position: relative;
  display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; align-items: center;
  padding: 12px; border-radius: 16px; text-decoration: none; color: inherit;
  background: linear-gradient(180deg, #243140, #18222d);
  border: 1px solid #33485d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 8px 22px rgba(0,0,0,.4);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.pcard:active { transform: scale(.99); }
.pcard.is-active {
  border-color: var(--brass);
  box-shadow: 0 0 0 1px var(--brass), inset 0 1px 0 rgba(255,255,255,.08), 0 10px 28px rgba(0,0,0,.5);
}

.pstart {
  position: absolute; top: -9px; right: 16px; z-index: 4;
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  letter-spacing: .1em; font-size: 10px; color: #20160a; padding: 4px 13px; border-radius: 999px;
  background: linear-gradient(180deg, #f0cd8c, var(--brass));
  box-shadow: 0 4px 12px rgba(201,160,90,.4), inset 0 1px 0 rgba(255,255,255,.55);
}

.pcard-thumb {
  position: relative; width: 74px; height: 74px; flex: none; border-radius: 12px; overflow: hidden;
  border: 1px solid #3a4d62; background: #11181f;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), inset 0 -8px 16px rgba(0,0,0,.4);
}
.pcard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-no {
  position: absolute; top: 4px; left: 4px; z-index: 2;
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font: 700 12px var(--font-ui); color: #20160a; background: var(--brass);
  box-shadow: 0 1px 5px rgba(0,0,0,.5);
}
.pcard-play {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 1;
  color: #fff; font-size: 20px; text-shadow: 0 2px 6px rgba(0,0,0,.7);
  background: radial-gradient(circle, rgba(0,0,0,.2), rgba(0,0,0,.45));
}
.pcard-done {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font: 700 12px var(--font-ui); color: #0e141c; background: var(--green-bright);
  box-shadow: 0 1px 5px rgba(0,0,0,.5);
}
/* пройденный квест — мягко приглушаем, акцент остаётся на следующем («Старт») */
.pcard.is-done { opacity: .9; }
.pcard.is-done .pcard-thumb img { filter: saturate(.7) brightness(.9); }
.pcard.is-done .pcard-btn { color: var(--green-bright); border-color: var(--green); }

.pcard-meta { min-width: 0; }
.pcard-meta h3 { margin: 0 0 3px; font-family: var(--font); font-size: 17px; line-height: 1.15; color: var(--ink); }
.pcard-meta p { margin: 0; font-size: 13px; line-height: 1.3; color: var(--ink-soft); }

.pcard-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.pcard-btn {
  font-family: var(--font-ui); font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--brass-soft); color: var(--brass); background: rgba(201,160,90,.06);
}
.pcard.is-active .pcard-btn {
  background: linear-gradient(180deg, #e6c489, var(--brass)); color: #20160a;
  border-color: var(--brass); box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.pcard-chev { font-size: 22px; line-height: 1; color: var(--ink-soft); }
.pcard.is-active .pcard-chev { color: var(--brass); }

/* ----- шлейф-самолётик (футер) ----- */
.pfoot-trail { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 22px 0 8px; color: var(--brass-soft); }
.pfoot-trail i { height: 1px; width: 58px; background: repeating-linear-gradient(90deg, var(--brass-soft) 0 5px, transparent 5px 11px); }
.pfoot-trail svg { width: 22px; height: 22px; opacity: .85; }

/* ----- нижний таб-бар ----- */
.ptabbar {
  position: sticky; bottom: 0; z-index: 20; margin-top: auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 8px 8px calc(8px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(18,24,32,.9), rgba(12,16,22,.97));
  border-top: 1px solid var(--panel-line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.ptab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 4px; border-radius: 12px; text-decoration: none;
  color: var(--ink-soft); font-family: var(--font-ui); font-size: 11px;
  transition: color .12s ease, background .12s ease;
}
.ptab svg { width: 24px; height: 24px; }
.ptab.is-active {
  color: #1a130a; background: linear-gradient(180deg, #e6c489, var(--brass));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 4px 12px rgba(201,160,90,.28);
}
.ptab:not(.is-active):active { color: var(--brass); background: rgba(201,160,90,.08); }

/* ----- премиум-моторика появления карточек (отключается при reduced-motion) ----- */
@media (prefers-reduced-motion: no-preference) {
  .plist .pcard { animation: cardIn .5s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
}

/* =========================================================
   КВЕСТ-ТУЛКИТ: HUD (очки/серия/таймер), раунды, звёзды, табло
   ========================================================= */
.q-hud { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.hud-cell { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 6px; border-radius: var(--radius-sm); background: linear-gradient(180deg, rgba(34,46,58,.85), rgba(20,28,36,.85)); border: 1px solid var(--panel-line); }
.hud-k { font-family: var(--font-ui); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.hud-v { font-family: var(--font-display, var(--font)); font-size: 19px; color: var(--ink); line-height: 1; }
.hud-combo-cell.is-hot .hud-v { color: var(--brass); text-shadow: 0 0 10px rgba(201,160,90,.6); }
.hud-pop { position: absolute; top: -2px; right: 8px; font: 700 13px var(--font-ui); color: var(--green-bright); animation: hud-pop .8s ease forwards; pointer-events: none; }
@keyframes hud-pop { 0%{opacity:0;transform:translateY(6px)} 25%{opacity:1} 100%{opacity:0;transform:translateY(-14px)} }
.hud-timer { position: relative; flex: none; width: 46px; height: 46px; display: grid; place-items: center; }
.hud-timer svg { position: absolute; inset: 0; width: 46px; height: 46px; transform: rotate(-90deg); }
.hud-timer .ht-bg { fill: none; stroke: var(--panel-line); stroke-width: 4; }
.hud-timer .ht-fg { fill: none; stroke: var(--brass); stroke-width: 4; stroke-linecap: round; transition: stroke .3s; }
.hud-timer .ht-sec { font-family: var(--font-display, var(--font)); font-size: 16px; color: var(--ink); }
.hud-timer.is-low .ht-fg { stroke: var(--danger); }
.hud-timer.is-low .ht-sec { color: var(--danger); }

/* баннер раунда (тема) */
.q-round { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border-radius: var(--radius-sm); background: linear-gradient(90deg, rgba(201,160,90,.14), transparent); border-left: 3px solid var(--brass); }
.q-round .qr-n { font-family: var(--font-ui); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.q-round .qr-theme { font-family: var(--font); font-size: 14.5px; color: var(--ink); }

/* факт-карточка */
.q-factcard { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--radius-sm); background: linear-gradient(180deg, rgba(34,46,58,.6), rgba(20,28,36,.6)); border: 1px solid var(--panel-line); border-left: 3px solid var(--brass); animation: q-rise .25s ease; }
.qfc-kicker { font-family: var(--font-ui); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.qfc-title { margin: 0; font-family: var(--font); font-size: 16px; color: var(--ink); }
.qfc-text { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.qfc-next { margin-top: 6px; }

/* звёзды + табло результата */
.q-stars { display: flex; justify-content: center; gap: 8px; font-size: 30px; }
.q-star { color: var(--panel-line); transition: color .3s, transform .3s; }
.q-star.on { color: var(--brass); text-shadow: 0 0 12px rgba(201,160,90,.6); animation: star-pop .4s cubic-bezier(.2,1.4,.4,1); }
@keyframes star-pop { 0%{transform:scale(0) rotate(-20deg)} 100%{transform:scale(1)} }
.q-scoreboard { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 4px; }
.qsb-rank { margin: 0; font-size: 15px; color: var(--ink-soft); }
.qsb-rank b { font-family: var(--font-display, var(--font)); color: var(--brass); font-weight: 400; }
.qsb-stats { display: flex; gap: 10px; width: 100%; }
.qsb-stats span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--panel-line); }
.qsb-stats i { font-family: var(--font-ui); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); font-style: normal; }
.qsb-stats b { font-family: var(--font-display, var(--font)); font-size: 18px; color: var(--ink); font-weight: 400; }
.qsb-best { margin: 2px 0 0; font-size: 13px; color: var(--brass); }
@media (prefers-reduced-motion: reduce) { .q-star.on, .hud-pop, .q-factcard { animation: none; } }

/* угадай героя: несколько строк-улик */
.hero-clue .hc-line { display: block; }
.hero-clue .hc-line + .hc-line { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--brass-soft); animation: q-rise .25s ease; }

/* шифровка: строка сборки фразы из расшифрованных слов */
.cipher-phrase { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--panel-line); font-family: ui-monospace, "Courier New", monospace; letter-spacing: 2px; }
.cipher-phrase .cp-slot { font-size: 16px; color: var(--ink-soft); }
.cipher-phrase .cp-slot.done { color: var(--brass); font-weight: 700; }
.cipher-phrase .cp-slot.cur { color: var(--ink); border-bottom: 2px solid var(--brass); padding-bottom: 1px; }
.cipher-phrase .cp-sep { color: var(--brass-soft); }

/* факт-карточка оверлеем (между шагами квеста) */
.q-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(8,11,16,.72); backdrop-filter: blur(3px); animation: q-fade .2s ease; }
@keyframes q-fade { from { opacity: 0; } to { opacity: 1; } }
.q-overlay .q-factcard { max-width: 440px; width: 100%; box-shadow: var(--shadow); animation: q-pop .32s cubic-bezier(.2,1.2,.4,1); }
@keyframes q-pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .q-overlay, .q-overlay .q-factcard { animation: none; } }

/* факт-карточки — НЕпрозрачная подложка (не сливаться с фоном-блюпринтом) */
.q-factcard { background: linear-gradient(180deg, #26333f 0%, #19232f 100%); }
.q-overlay .q-factcard { box-shadow: 0 22px 60px rgba(0,0,0,.66), inset 0 1px 0 rgba(255,255,255,.05); }
.q-overlay { background: rgba(6,9,13,.8); }

/* =========================================================
   ДОСТИЖЕНИЯ «Лётная книжка» + АРХИВ «Коллекция»
   ========================================================= */
.ach-head { margin: 8px 0 16px; }
.ach-head .ptitle-eyebrow { margin-bottom: 2px; }

/* прогресс */
.ach-progress { margin-bottom: 18px; }
.ach-bar { height: 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--panel-line); overflow: hidden; }
.ach-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #b88f48, #e2bd74); box-shadow: 0 0 12px rgba(201,160,90,.5); transition: width .5s ease; }
.ach-pct { margin: 8px 0 0; text-align: center; font-family: var(--font-ui); font-size: 12.5px; letter-spacing: .04em; color: var(--ink-soft); }

/* список квестов */
.ach-list { display: flex; flex-direction: column; gap: 10px; }
.ach-row { display: grid; grid-template-columns: 34px 1fr 26px; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--panel-line); opacity: .72; }
.ach-row.is-done { opacity: 1; border-color: var(--brass-soft); }
.ach-no { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--font-display, var(--font)); color: var(--brass); background: #11181f; border: 1px solid var(--brass-soft); }
.ach-meta h3 { margin: 0 0 3px; font-family: var(--font); font-size: 15px; color: var(--ink); }
.ach-sub { display: flex; align-items: center; gap: 10px; }
.ach-sub .q-stars { font-size: 15px; gap: 3px; }
.ach-best { font-family: var(--font-ui); font-size: 11.5px; color: var(--ink-soft); }
.ach-todo { margin: 0; font-size: 11.5px; color: var(--ink-soft); font-style: italic; }
.ach-status { text-align: center; font-size: 18px; color: var(--brass); }
.ach-row:not(.is-done) .ach-status { color: var(--panel-line); }

/* диплом */
.diploma { margin-top: 22px; }
.diploma .dip-frame { position: relative; text-align: center; padding: 26px 20px; border-radius: var(--radius); background: radial-gradient(120% 90% at 50% 0%, #24323f, #131c25); border: 2px solid var(--brass); box-shadow: var(--shadow), inset 0 0 0 1px rgba(0,0,0,.4); }
.diploma.is-locked .dip-frame { border-color: var(--brass-soft); opacity: .82; }
.dip-eyebrow { font-family: var(--font-ui); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.dip-title { margin: 8px 0 10px; font-family: var(--font-display, var(--font)); font-size: 30px; letter-spacing: .02em; color: #ece3d0; text-transform: uppercase; }
.dip-text { margin: 0 auto; max-width: 38ch; font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.dip-name { width: 100%; margin: 16px 0 12px; min-height: 50px; padding: 12px 14px; text-align: center; font: 18px var(--font); letter-spacing: 1px; background: var(--paper); color: var(--paper-ink); border: 1px solid var(--brass-soft); border-radius: var(--radius-sm); }

/* коллекция */
.arch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.arch-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; cursor: pointer; background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--panel-line); border-radius: var(--radius-sm); color: var(--ink); transition: transform .1s ease, border-color .12s ease; }
.arch-card:active { transform: scale(.96); }
.arch-card:hover { border-color: var(--brass-soft); }
.arch-pic { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #11181f; border: 2px solid var(--brass-soft); }
.arch-card.is-plane .arch-pic { border-radius: 12px; border-color: var(--panel-line); display: grid; place-items: center; }
.arch-card.is-plane .arch-pic .q-plane-img { width: 90%; height: 90%; }
.arch-name { font-family: var(--font); font-size: 13px; font-weight: 600; text-align: center; line-height: 1.15; }
.arch-meta2 { font-family: var(--font-ui); font-size: 10.5px; color: var(--ink-soft); text-align: center; }

/* match: текстовые элементы доски (родина / факт — без портрета) */
.match-item.is-text { justify-content: center; text-align: center; padding: 14px 12px; }
.match-item.is-text .mi-name { font-size: 14px; line-height: 1.25; }
