/* ══════════════════════════════════════════════════════════════════════════
   ГАЗЕТА «ВЕСТНИК WILDLEGACY» — общая вёрстка всех выпусков (news/issue-N.html)
   Выпуск = только содержимое с классами ниже; стили здесь одни на все номера.
   Справочник компонентов и шаблон нового выпуска — docs/news.md.

   🔴 ПАЛИТРА — ЗЕРКАЛО :root из css/game.css (те же имена --accent-* и --bg-*,
   те же значения), а НЕ подключение game.css и не сезонная тема. Выпуск —
   печатный документ: он обязан выглядеть одинаково в Хэллоуин и без него,
   поэтому body[data-event] тут не читается, а eventTheme.js не грузится.
   Сменили палитру игры навсегда — поправьте значения здесь руками.
   ⚠️ Шрифты — только свои файлы из /assets/fonts (Inter) и системные засечки.
   fonts.googleapis.com не тянуть (правило проекта, у части игроков недоступен).
   ══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/assets/fonts/inter-cyrillic-ext.woff2?v=1') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/assets/fonts/inter-cyrillic.woff2?v=1') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2?v=1') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2?v=1') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* — зеркало css/game.css — */
  --accent:            #5B5FEF;   /* текст и заливка на СВЕТЛОМ (бумага) */
  --accent-rgb:        91, 95, 239;
  --accent-dark:       #8A7CFF;   /* текст на ТЁМНОМ стекле */
  --accent-dark-rgb:   138, 124, 255;
  --accent-strong:     #5B5BF0;   /* заливка под белым текстом */
  --accent-strong-rgb: 91, 91, 240;
  --bg-page:           #111;
  --bg-glass-rgb:      15, 19, 34;

  /* — своё: бумага и типографская краска — */
  --np-paper:     #f7f3ea;
  --np-paper-2:   #efe8d8;
  --np-ink:       #1c1b22;
  --np-ink-soft:  #4b4954;
  --np-rule:      #1c1b22;
  --np-rule-soft: rgba(28, 27, 34, 0.18);

  --np-serif: Georgia, 'PT Serif', 'Noto Serif', 'Droid Serif', 'Times New Roman', serif;
  --np-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --np-gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-page);
  background-image: radial-gradient(ellipse at top, rgba(var(--accent-strong-rgb), 0.18), transparent 60%);
  color: var(--np-ink);
  font-family: var(--np-serif);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--accent); }

/* ── Полоса над листом (на экране; в печати скрыта) ───────────────────── */
.np-toolbar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px var(--np-gutter);
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  font-family: var(--np-sans); font-size: 14px;
}
.np-toolbar a, .np-toolbar button {
  color: #fff; text-decoration: none; font: inherit; font-weight: 600;
  background: rgba(var(--bg-glass-rgb), 0.8);
  border: 1px solid rgba(var(--accent-dark-rgb), 0.35);
  border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.np-toolbar a:hover, .np-toolbar button:hover { border-color: var(--accent-dark); }

/* ── Лист ─────────────────────────────────────────────────────────────── */
.np-sheet {
  max-width: 1120px;
  margin: 0 auto 48px;
  background: var(--np-paper);
  padding: 0 var(--np-gutter) 40px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  border-top: 8px solid var(--accent-strong);
}

/* ── Шапка (заголовок газеты) ─────────────────────────────────────────── */
.np-masthead { text-align: center; padding-top: 18px; }
.np-masthead-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
  font-family: var(--np-sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--np-ink-soft);
  border-bottom: 1px solid var(--np-rule); padding-bottom: 8px;
}
.np-title {
  margin: 14px 0 4px;
  font-family: var(--np-serif); font-weight: 700;
  font-size: clamp(2.3rem, 9vw, 6.2rem);
  line-height: 1; letter-spacing: -0.02em;
  overflow-wrap: break-word;
}
.np-title em { font-style: normal; color: var(--accent); }
.np-tagline {
  margin: 0 0 12px; font-style: italic; color: var(--np-ink-soft);
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
}
/* двойная линейка — классический газетный разделитель */
.np-rule-double {
  border: 0; height: 6px; margin: 0;
  border-top: 3px solid var(--np-rule); border-bottom: 1px solid var(--np-rule);
}
.np-rule { border: 0; border-top: 1px solid var(--np-rule); margin: 32px 0; }
.np-ornament {
  border: 0; margin: 36px 0; text-align: center; overflow: visible; height: 1px;
  border-top: 1px solid var(--np-rule-soft);
}
.np-ornament::after {
  content: '\2756'; position: relative; top: -0.8em; padding: 0 12px;
  background: var(--np-paper); color: var(--accent); font-size: 18px;
}

/* ── Обложка: главный материал + «В номере» ───────────────────────────── */
.np-cover {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px;
  padding: 28px 0 8px;
}
.np-cover-lead h2 {
  font-size: clamp(1.8rem, 4.4vw, 3rem); line-height: 1.08; margin: 10px 0 12px;
}
.np-toc {
  background: rgb(var(--bg-glass-rgb)); color: #e9e9f2;
  padding: 22px 22px 18px; align-self: start;
  border-top: 4px solid var(--accent-dark);
}
.np-toc h2 {
  margin: 0 0 12px; font-family: var(--np-sans); font-size: 13px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-dark);
}
.np-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.np-toc li {
  counter-increment: toc; display: grid; grid-template-columns: 2.2em 1fr; gap: 4px;
  padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.np-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--np-sans); font-weight: 800; color: var(--accent-dark);
}
.np-toc a { color: #fff; text-decoration: none; font-size: 16px; line-height: 1.35; }
.np-toc a:hover { text-decoration: underline; text-decoration-color: var(--accent-dark); }
.np-toc small { display: block; color: #a9a9bd; font-size: 13px; margin-top: 2px; }

/* ── Материал ─────────────────────────────────────────────────────────── */
.np-article { padding-top: 8px; scroll-margin-top: 16px; }
.np-kicker {
  display: inline-block;
  font-family: var(--np-sans); font-size: 12px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff; background: var(--accent-strong); padding: 4px 10px;
}
.np-kicker-num { opacity: 0.75; margin-right: 6px; }
.np-headline {
  font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.1;
  margin: 12px 0 8px; letter-spacing: -0.01em;
}
/* заголовки не рвутся посреди слова и не вылезают за край на телефоне */
.np-title, .np-headline, .np-cover-lead h2, .np-subhead {
  text-wrap: balance; hyphens: manual; overflow-wrap: break-word;
}
.np-deck {
  font-size: clamp(1.05rem, 2.3vw, 1.3rem); font-style: italic;
  color: var(--np-ink-soft); margin: 0 0 10px; line-height: 1.45;
}
.np-byline {
  font-family: var(--np-sans); font-size: 13px; color: var(--np-ink-soft);
  border-top: 1px solid var(--np-rule-soft); border-bottom: 1px solid var(--np-rule-soft);
  padding: 6px 0; margin: 0 0 20px;
}
.np-subhead { font-size: 1.25rem; margin: 1.2em 0 0.4em; break-after: avoid; }

/* Колонки: на экране 2–3, на телефоне одна. Всё, что не должно рваться
   между колонками, — break-inside: avoid; во всю ширину — .np-span. */
.np-cols { column-gap: 32px; column-rule: 1px solid var(--np-rule-soft); }
.np-cols-2 { column-count: 2; }
.np-cols-3 { column-count: 3; }
.np-cols > * { break-inside: avoid-column; }
.np-cols p { break-inside: auto; }
.np-span { column-span: all; }
.np-body p { margin: 0 0 0.9em; text-align: justify; hyphens: auto; }
.np-body > p:first-of-type::first-letter,
.np-dropcap::first-letter {
  float: left; font-size: 3.6em; line-height: 0.85; font-weight: 700;
  padding: 0.06em 0.1em 0 0; color: var(--accent);
}

/* Врезка-цитата */
.np-pull {
  margin: 0.4em 0 1em; padding: 12px 0;
  border-top: 3px solid var(--accent); border-bottom: 1px solid var(--np-rule);
  font-size: 1.3rem; line-height: 1.35; font-style: italic; text-align: center;
}
.np-pull cite {
  display: block; margin-top: 8px; font-style: normal; font-family: var(--np-sans);
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--np-ink-soft);
}

/* Главная цитата материала — крупно, во всю ширину */
.np-pull-hero {
  font-size: clamp(1.6rem, 4.2vw, 2.6rem); line-height: 1.2;
  padding: 22px 0; margin: 4px 0 24px; border-top-width: 5px; text-wrap: balance;
}
.np-pull-hero cite { font-size: 13px; margin-top: 12px; }

/* Блок-справка на подложке */
.np-box {
  background: var(--np-paper-2); border-left: 4px solid var(--accent);
  padding: 14px 16px; margin: 0 0 1em; font-size: 15px;
}
.np-box h4 {
  margin: 0 0 6px; font-family: var(--np-sans); font-size: 12px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.np-box ul { margin: 0; padding-left: 1.1em; }
.np-box .np-path { list-style: none; padding-left: 0; }
.np-box .np-path li { padding: 4px 0; border-top: 1px solid var(--np-rule-soft); }
.np-box .np-path li:first-child { border-top: 0; }
/* Широкая иллюстрация вне колонок (сетка турнира): без обрезки */
.np-fig-wide .np-frame { background: transparent; }
.np-fig-wide .np-frame img { object-fit: contain; }
.np-box p { margin: 0; }
/* Сноска редакции: рамка вместо подложки, чтобы не путать со справкой */
.np-note { background: transparent; border: 1px solid var(--accent); border-left-width: 4px; font-style: italic; }
.np-note h4 { font-style: normal; }

/* ── Иллюстрации ──────────────────────────────────────────────────────────
   <figure class="np-fig">
     <div class="np-frame" style="--r:16/9" data-ph="cover.jpg · 1600×900">
       <img src="/assets/news/issue-1/cover.jpg" alt="…" onerror="this.closest('.np-fig').classList.add('is-empty')">
     </div>
     <figcaption>Подпись</figcaption>
   </figure>
   Нет файла → вместо картинки заглушка с именем файла и размером из data-ph рамки.
   Положили файл — картинка встаёт сама, HTML не трогать. */
.np-fig { margin: 0 0 1.2em; }
.np-frame {
  position: relative; aspect-ratio: var(--r, 4/3); overflow: hidden;
  background: var(--np-paper-2);
}
.np-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.np-fig.is-empty img { display: none; }
.np-fig.is-empty .np-frame {
  border: 2px dashed rgba(var(--accent-rgb), 0.45);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(var(--accent-rgb), 0.06) 14px 28px),
    var(--np-paper-2);
  display: grid; place-items: center;
}
.np-fig.is-empty .np-frame::after {
  content: 'Иллюстрация\A' attr(data-ph);
  white-space: pre-wrap; text-align: center; padding: 12px;
  font-family: var(--np-sans); font-size: 13px; font-weight: 600; line-height: 1.5;
  color: var(--accent); overflow-wrap: anywhere;
}
.np-person .np-fig.is-empty .np-frame::after { content: attr(data-ph); font-size: 10px; padding: 4px; }
.np-fig figcaption {
  font-family: var(--np-sans); font-size: 12.5px; line-height: 1.45;
  color: var(--np-ink-soft); padding-top: 6px; border-bottom: 1px solid var(--np-rule-soft);
  padding-bottom: 6px;
}

/* ── Пьедестал призёров ───────────────────────────────────────────────── */
.np-podium {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; align-items: end; margin: 8px 0 24px;
}
.np-place { text-align: center; }
.np-place .np-fig { margin-bottom: 8px; }
.np-place .np-frame {
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--np-paper), 0 0 0 5px rgba(var(--accent-rgb), 0.55), 0 6px 18px rgba(0, 0, 0, 0.18);
}
.np-place-1 .np-frame { box-shadow: 0 0 0 3px var(--np-paper), 0 0 0 6px #e6b740, 0 6px 18px rgba(0, 0, 0, 0.18); }
.np-place-step {
  background: rgb(var(--bg-glass-rgb)); color: #fff;
  padding: 12px 10px; border-top: 4px solid var(--accent-dark);
}
.np-place-step b {
  display: block; font-family: var(--np-sans); font-size: 30px; line-height: 1; color: var(--accent-dark);
}
.np-place-name { display: block; font-size: 1.15rem; font-weight: 700; margin-top: 6px; overflow-wrap: anywhere; }
.np-place-note { display: block; font-family: var(--np-sans); font-size: 12.5px; color: #b9b9cc; margin-top: 2px; }
.np-place-1 { order: 2; }
.np-place-2 .np-fig, .np-place-3 .np-fig { margin-left: 8%; margin-right: 8%; }
.np-place-2 { order: 1; }
.np-place-3 { order: 3; }
.np-place-1 .np-place-step { padding-top: 34px; border-top-color: #e6b740; }
.np-place-1 .np-place-step b { color: #e6b740; }
.np-place-2 .np-place-step { padding-top: 20px; }

/* ── Интервью: вопрос — ответ ─────────────────────────────────────────── */
.np-qa { margin: 0; }
.np-qa dt {
  font-family: var(--np-sans); font-weight: 700; font-size: 15px; line-height: 1.45;
  color: var(--accent); margin: 1em 0 0.3em; break-after: avoid;
}
.np-qa dt::before { content: '— '; }
.np-qa dd { margin: 0 0 0.6em; text-align: justify; hyphens: auto; }
.np-qa dd::before { content: '— '; font-weight: 700; }
.np-person {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center;
  margin: 0 0 18px;
}
.np-person .np-fig { margin: 0; }
/* Аватар — круг с кантом, как в профиле игрока */
.np-person .np-frame {
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--np-paper), 0 0 0 5px rgba(var(--accent-rgb), 0.55), 0 6px 18px rgba(0, 0, 0, 0.18);
}
.np-person .np-fig.is-empty .np-frame { border-radius: 50%; }
.np-person p { margin: 0; font-size: 15px; color: var(--np-ink-soft); }
.np-person strong { display: block; font-size: 1.2rem; color: var(--np-ink); }

/* Несколько интервью в одном материале: отступ между собеседниками */
.np-interview + .np-rule { margin: 28px 0; }
.np-interview .np-person { margin-top: 4px; }

/* ── Короткие заметки («Что нового») ──────────────────────────────────── */
.np-briefs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0; border-top: 1px solid var(--np-rule);
}
.np-brief {
  padding: 14px 16px 16px; border-bottom: 1px solid var(--np-rule-soft);
  border-right: 1px solid var(--np-rule-soft);
}
.np-brief h3 { margin: 6px 0 6px; font-size: 1.15rem; line-height: 1.25; }
.np-brief p { margin: 0; font-size: 15px; }
.np-brief .np-brief-note { margin-top: 6px; font-family: var(--np-sans); font-size: 12.5px; color: var(--np-ink-soft); }
.np-brief .np-fig { margin-bottom: 8px; }
.np-tag {
  font-family: var(--np-sans); font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}

/* ── «Что впереди»: календарь ─────────────────────────────────────────── */
.np-agenda { list-style: none; margin: 0; padding: 0; }
.np-agenda li {
  display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--np-rule-soft);
}
.np-agenda time {
  font-family: var(--np-sans); font-weight: 800; font-size: 14px; line-height: 1.3;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em;
}
.np-agenda h3 { margin: 0 0 4px; font-size: 1.15rem; }
.np-agenda p { margin: 0; font-size: 15px; }

/* Спойлер в конце номера */
.np-teaser { margin-top: 32px; padding-top: 20px; border-top: 3px solid var(--np-rule); }
.np-teaser .np-kicker { margin-bottom: 12px; }
.np-teaser .np-fig { margin-bottom: 0; }

/* ── Выходные данные ──────────────────────────────────────────────────── */
.np-colophon {
  margin-top: 40px; padding-top: 12px; border-top: 3px solid var(--np-rule);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font-family: var(--np-sans); font-size: 12.5px; color: var(--np-ink-soft);
}

/* ══ Планшет ══════════════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .np-cols-3 { column-count: 2; }
  .np-cover { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
}

/* ══ Телефон: всё в одну колонку ══════════════════════════════════════════ */
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .np-sheet { margin-bottom: 0; box-shadow: none; padding-bottom: 28px; }
  .np-toolbar { padding-top: 10px; padding-bottom: 10px; }
  .np-masthead-meta { justify-content: center; text-align: center; }
  .np-cover { grid-template-columns: minmax(0, 1fr); }
  .np-cols-2, .np-cols-3 { column-count: 1; }
  .np-body p, .np-qa dd { text-align: left; }
  .np-podium { grid-template-columns: minmax(0, 1fr); }
  .np-place-1, .np-place-2, .np-place-3 { order: 0; }
  .np-place .np-fig, .np-place-2 .np-fig, .np-place-3 .np-fig { margin: 0 auto 8px; max-width: 220px; }
  .np-place-step, .np-place-1 .np-place-step, .np-place-2 .np-place-step { padding-top: 12px; }
  .np-person { grid-template-columns: 84px minmax(0, 1fr); }
  .np-agenda li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .np-brief { border-right: 0; padding-left: 0; padding-right: 0; }
}

/* ══ Печать / «Сохранить как PDF» ═════════════════════════════════════════
   A4, белый фон без подложки страницы, цвета акцента сохраняются
   (print-color-adjust), каждый материал с новой страницы, кроме первого. */
@media print {
  @page { size: A4; margin: 14mm 13mm 16mm; }
  html, body { background: #fff !important; }
  body { font-size: 10.5pt; line-height: 1.45; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .np-toolbar { display: none !important; }
  .np-sheet { max-width: none; margin: 0; padding: 0; box-shadow: none; background: #fff; border-top-width: 5px; }
  .np-ornament::after { background: #fff; }
  .np-title { font-size: 44pt; }
  .np-headline { font-size: 22pt; }
  .np-cover { grid-template-columns: minmax(0, 1fr) 62mm; }
  .np-cols-3 { column-count: 3; }
  .np-cols-2 { column-count: 2; }
  .np-article { break-before: page; }
  .np-article.np-first { break-before: auto; }
  .np-ornament { display: none; }
  .np-pull-hero { font-size: 24pt; }
  .np-teaser { break-inside: avoid; }
  .np-fig, .np-pull, .np-box, .np-podium, .np-person, .np-brief, .np-agenda li { break-inside: avoid; }
  .np-headline, .np-subhead, .np-qa dt { break-after: avoid; }
  .np-toc a { color: #fff; }
  a { color: inherit; text-decoration: none; }
  p, dd { orphans: 3; widows: 3; }
}
