/* ============================================================
   ЯКатолик — портал
   Темы: «Свет» (крем и олива) · «Сумерки» (тёмная зелень)
   ============================================================ */

/* Times New Roman под метрики Cormorant Garamond: пока грузится веб-шрифт, заголовки переносятся так же и не прыгают. */
@font-face {
  font-family: 'Cormorant Fallback';
  src: local('Times New Roman'), local('TimesNewRomanPSMT');
  font-weight: 100 549;
  size-adjust: 95.5%;
  ascent-override: 96.8%;
  descent-override: 30%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Cormorant Fallback';
  src: local('Times New Roman Bold'), local('TimesNewRomanPS-BoldMT');
  font-weight: 550 900;
  size-adjust: 90.4%;
  ascent-override: 102.2%;
  descent-override: 31.8%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;
  --ff: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Cormorant Garamond', 'Cormorant Fallback', Georgia, serif;
  --maxw: 1180px;
  --gutter: 24px;
  --ls: normal;

  /* Светлая тема: фон #EAE5DB, карточки #F7F5EF, шапка и низ #F3F1EA */
  --paper: #F3F1EA;
  --ground: #EAE5DB;
  --surface: #F7F5EF;
  --chrome: #F3F1EA;
  --surface-2: #E6E1D6;
  --ink: #1C1A14;
  --charcoal: #2A281F;
  --stone-700: #5C624C;
  --stone-500: #7A8170;
  --stone-300: #C9C6B6;
  --stone-100: #E7E3D6;

  --bronze: #687040;
  --bronze-dark: #545C32;
  --bronze-deep: #3E4624;
  --accent: #5E6738;
  --accent-2: #7A8450;
  --accent-soft: rgba(104, 112, 64, .14);
  --highlight: #8A7A32;

  --marian: #4778AC;
  --vatican: #9B7416;
  --sage: #6E8252;
  --rose: #A84F65;
  --line: #E4DDD0;
  --line-strong: #D2CBBC;
  --v1: #3E6F62;
  --v1-soft: rgba(62, 111, 98, .12);
  --v2: #8A7040;
  --v2-soft: rgba(138, 112, 64, .12);
  --shadow-card: 0 1px 2px rgba(50, 48, 28, .06), 0 8px 24px rgba(50, 48, 28, .07);
  --shadow-lift: 0 12px 32px rgba(50, 48, 28, .12);
}

:root[data-theme="twilight"] {
  color-scheme: dark;
  --paper: #101816;
  --chrome: #1D2824;
  --ground: #131E1A;
  --surface: #1D2824;
  --surface-2: #26332D;
  --ink: #F3F0E6;
  --charcoal: #E4E1D4;
  --stone-700: #C5C8B4;
  --stone-500: #9AA394;
  --stone-300: #4A5850;
  --stone-100: #2A3832;
  --bronze: #8F9658;
  --bronze-dark: #C5C99A;
  --bronze-deep: #687040;
  --accent: #687040;
  --accent-2: #8F9658;
  --accent-soft: rgba(143, 150, 88, .2);
  --highlight: #D4C36A;
  --marian: #6FA0D8;
  --vatican: #E8B931;
  --sage: #9AAD77;
  --rose: #E37A90;
  --line: #2C3832;
  --line-strong: #3A4840;
  --v1: #5FC0B2;
  --v1-soft: rgba(95, 192, 178, .16);
  --v2: #C6A35A;
  --v2-soft: rgba(198, 163, 90, .18);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .3);
  --shadow-lift: 0 6px 22px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--ff);
  letter-spacing: var(--ls);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
  touch-action: manipulation;
}
a, button, summary, .theme-toggle, .cal-btn, .tab-item, .theme-opt {
  touch-action: manipulation;
}
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; text-wrap: balance; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
/* Атрибут hidden сильнее любых display у классов (кнопки «ещё», плееры, панели). */
[hidden] { display: none !important; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--bronze-dark); font-weight: 700; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 10px; letter-spacing: .07em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 100px; line-height: 1.7; }
.chip.v1 { color: var(--v1); background: var(--v1-soft); }
.chip.v2 { color: var(--v2); background: var(--v2-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.v1 { background: var(--v1); }
.dot.v2 { background: var(--v2); }

/* ---------- Masthead ---------- */
.masthead { position: sticky; top: 0; z-index: 40;
  background: var(--chrome);
  border-bottom: 1px solid var(--line); }
:root[data-theme="twilight"] .masthead {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: nowrap;
  padding-top: 13px;
  padding-bottom: 13px;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.logo { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.logo .mark { width: auto !important; height: 36px !important; border-radius: 0; overflow: visible; flex: none; display: block; box-shadow: none; background: none; }
.logo .mark img, .logo .mark svg, .logo img {
  display: block; width: auto !important; height: 36px !important; max-width: none !important; object-fit: contain;
}
.logo .wm { display: none; }
.masthead .logo .mark,
.masthead .logo .mark img { height: 36px !important; }
.logo .wm { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: .01em; color: var(--ink); white-space: nowrap; }
nav.top { display: flex; gap: 2px; flex-wrap: nowrap; flex: 1; justify-content: center; min-width: 0; }
nav.top a { font-size: 13.5px; font-weight: 600; padding: 8px 12px; border-radius: 100px; color: var(--stone-700); transition: .16s; }
nav.top a:hover { background: var(--accent-soft); color: var(--bronze-dark); }
.search { border: 1px solid var(--line-strong); background: var(--ground); border-radius: 100px; padding: 8px 15px;
  font-size: 12.5px; color: var(--stone-700); display: inline-flex; align-items: center; gap: 7px; cursor: pointer; transition: .16s; }
.search:hover { border-color: var(--bronze); color: var(--ink); }
.cal-btn {
  flex: none; width: 42px; height: 42px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); background: var(--ground); color: var(--bronze-dark);
  transition: border-color .15s, background .15s, color .15s;
}
.cal-btn svg { width: 20px; height: 20px; display: block; }
.cal-btn:hover, .cal-btn.on {
  border-color: var(--bronze); background: var(--accent-soft); color: var(--ink);
}
.masthead-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.app-btn,
.head-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--ground);
  color: var(--bronze-dark);
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.app-btn svg,
.head-book svg { width: 18px; height: 18px; display: block; flex: none; }
.app-btn span,
.head-book span { display: none; }
.app-btn:hover,
.head-book:hover {
  border-color: var(--bronze); background: var(--accent-soft); color: var(--ink);
}

/* ---------- Blocks ---------- */
/* Only vertical — shorthand padding: N 0 would wipe .wrap side gutters on <section class="block wrap"> */
section.block { padding-top: 36px; padding-bottom: 36px; }
.block-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.block-head h2 { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.block-head h2 a { color: inherit; text-decoration: none; }
.block-head h2 a:hover { color: var(--bronze-dark); }
.rule { flex: 1; height: 1px; background: var(--line); }
.kicker { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.eyebrow.inline { font-size: 11px; }

/* ---------- Hero slider (lead visual + editorial side stack) ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: 0 32px;
  align-items: stretch;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.hero-main {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: clamp(320px, 36vw, 440px);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--surface-2);
}
.hero-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .6s ease; background-size: cover; background-position: center; background-color: var(--surface); display: flex; flex-direction: column; }
.hero-slide.active { opacity: 1; pointer-events: auto; z-index: 1; }
.hero-slide::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15, 9, 6, 0) 32%, rgba(15, 9, 6, .88) 100%); }
.hero-cap { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 22px 28px 56px 32px; color: #fff; }
.hero-cap .rub {
  display: inline-block; font-weight: 800; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 4px 11px; border-radius: 4px; margin: 0;
}
.hero-cap h3 {
  color: #fff; font-family: var(--serif); font-size: clamp(28px, 2.9vw, 40px);
  line-height: 1.12; max-width: 18ch; font-weight: 600; letter-spacing: -.02em; margin: 0;
}
.hero-dots { position: absolute; z-index: 3; bottom: 18px; right: 20px; display: flex; gap: 8px; align-items: center; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .5);
  cursor: pointer; padding: 0; transition: width .22s ease, background .22s ease; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.hero-dots button.on { background: #fff; width: 24px; border-radius: 6px; }
.hero-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
  min-width: 0;
  padding-left: 28px;
  border-left: 1px solid var(--line);
  align-content: stretch;
}
.mini {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  align-content: start;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-bottom: 0;
  text-decoration: none;
  color: inherit;
  transition: color .15s ease;
}
.mini:first-child { padding-top: 0; }
.mini:last-child { border-bottom: 0; padding-bottom: 0; }
.mini:hover { transform: none; box-shadow: none; }
.mini:hover h4 { color: var(--bronze-dark); }
.mini .thumb {
  width: 100%; height: clamp(112px, 12vw, 140px); border-radius: 14px;
  background-size: cover; background-position: center; background-color: var(--surface-2);
}
.mini .rub { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--bronze-dark); }
.mini h4 {
  margin: 2px 0 0; font-family: var(--serif); font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.22; font-weight: 600; letter-spacing: -.01em; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- News (desktop pack: lead + side stack) ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button,
.tabs a {
  font-family: var(--ff); font-weight: 600; font-size: 13.5px; color: var(--stone-700); background: var(--surface);
  border: 1px solid var(--line); padding: 8px 18px; border-radius: 100px; cursor: pointer; transition: .18s;
  text-decoration: none; display: inline-flex; align-items: center;
}
.tabs button:hover,
.tabs a:hover { color: var(--ink); border-color: var(--bronze); }
.tabs button.on,
.tabs a.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.news-grid { display: block; }
.news-pack {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 0 36px;
  align-items: start;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  min-height: 0;
}
.news-pack > .ncard--lead,
.news-pack > .news-side {
  min-height: 0;
  height: auto;
  align-self: start;
}
.news-side {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  padding-left: 36px;
  border-left: 1px solid var(--line);
}

.ncard {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 20px 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: color .15s ease;
}
.news-side .ncard:first-child { padding-top: 20px; }
.news-side .ncard:last-child { border-bottom: 0; padding-bottom: 4px; }
.ncard:hover { transform: none; box-shadow: none; }
.ncard:hover h4 { color: var(--bronze-dark); }
.ncard .thumb {
  width: 168px; height: 126px; border-radius: 4px;
  background-image: var(--img, none);
  background-size: cover; background-position: center; background-color: var(--surface-2);
}
.ncard-body { min-width: 0; display: grid; gap: 6px; align-content: start; }
.ncard .rub {
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--bronze-dark);
}
.ncard .date {
  font-size: 12px; color: var(--stone-500); font-variant-numeric: tabular-nums; margin-top: 2px;
}
.ncard h4 {
  margin: 0; font-family: var(--serif); font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.22; font-weight: 600; letter-spacing: -.01em; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ncard-excerpt {
  margin: 2px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--stone-700);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Lead story — large image, editorial weight */
.news-pack { align-items: start; }
.ncard--lead {
  grid-column: 1;
  grid-row: 1;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 20px 0 0;
  border-bottom: 0;
  height: auto;
  align-self: start;
  align-content: start;
}
.ncard--lead .thumb {
  width: 100%;
  height: clamp(200px, 22vw, 290px);
  border-radius: 14px;
}
.ncard--lead h4 {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.12;
  letter-spacing: -.02em;
  -webkit-line-clamp: 4;
}
.ncard--lead .ncard-excerpt { -webkit-line-clamp: 3; font-size: 16px; line-height: 1.5; max-width: 38em; }
.ncard--lead .rub { font-size: 11.5px; }
.ncard--lead .date { margin-top: 4px; }

/* Ссылка «Все новости / голоса» — сразу под блоком новостей */
.news-foot {
  margin: 16px 0 0;
  padding-top: 4px;
}
a.loadmore.news-more {
  margin: 0;
  width: auto;
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 0 0 3px;
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--bronze-dark) 55%, transparent);
  font-size: 13px;
  font-weight: 700;
  color: var(--bronze-dark);
  text-align: left;
  box-shadow: none;
}
a.loadmore.news-more:hover {
  color: var(--ink); border-bottom-color: var(--ink); background: transparent;
}

.loadmore { margin: 20px auto 0; display: block; font-family: var(--ff); font-weight: 700; font-size: 13px;
  color: var(--bronze-dark); background: transparent; border: 0; padding: 11px 8px; border-radius: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--bronze-dark) 55%, transparent); cursor: pointer; }
.loadmore:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Fresh articles + aside ---------- */
.block-fresh .block-head { margin-bottom: 14px; }
.body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  gap: 0 40px;
  align-items: stretch;
}
.home-aside {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.home-aside .widget,
.home-aside #aside-day {
  flex: 1 1 auto;
  height: auto;
}
.body-grid > .body-main,
.body-grid > .news-grid,
.body-grid > .fresh-home { min-width: 0; }
.body-main { min-width: 0; }

/* Одинаковые превью 3×2 — новости / статьи / голоса */
.home-equal {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 20px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  align-items: start;
}
.home-equal .art--tile .ph {
  height: clamp(130px, 12vw, 168px);
}
.home-equal .art--tile h4 {
  font-size: clamp(16px, 1.2vw, 19px);
  -webkit-line-clamp: 3;
}
.home-equal .art--tile .date {
  margin-top: 4px;
  font-size: 12px;
  color: var(--stone-500);
}

/* Миниатюра автора на карточках (как в сайдбаре) */
.card-authors {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 6px;
}
.card-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  max-width: 100%;
  text-decoration: none;
  color: inherit;
}
.card-authors .card-author { margin: 0; }
.card-author .author-ava {
  width: 26px;
  height: 26px;
  font-size: 10px;
}
.card-author-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--bronze-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-author--feed { margin: 0 0 8px; }
.card-authors.card-author--feed,
.feed-body > .card-authors { margin: 0 0 8px; }
.art--tile .card-author,
.art--tile .card-authors,
.ncard .card-author,
.ncard .card-authors { margin-bottom: 4px; }
.byline--authors {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}
.byline-authors {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.byline-author-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  max-width: 100%;
}
.byline-author-row .author-ava {
  width: 44px;
  height: 44px;
  font-size: 13px;
  flex: none;
}
.byline-author-row .byline-name {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}
.byline-author-row:hover .byline-name { color: var(--bronze-dark); }
.byline-ava {
  display: block;
  text-decoration: none;
  flex: none;
}
.byline-ava .author-ava { width: 44px; height: 44px; font-size: 13px; }
.byline-name {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
a.byline-name:hover { color: var(--bronze-dark); }

/* Фотосток: кнопка назад (Android) */
.ps-back-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
}
.ps-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font: 700 14px var(--ff);
  cursor: pointer;
}
.ps-back:hover { background: var(--accent-soft); color: var(--bronze-dark); }
.ps-back.mast-back {
  width: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
}
.ps-back-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--bronze-dark);
  text-decoration: none;
}
.photo-page .masthead .wrap {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: 10px;
}
@media (max-width: 880px) {
  .photo-page .masthead .wrap {
    grid-template-columns: 40px 1fr auto;
  }
  .photo-page .masthead .top { display: none; }
  .photo-page main.wrap {
    padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
  }
}
.home-aside {
  padding-top: 0;
  border-top: 0;
  border-left: 0;
  padding-left: 0;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}
.home-aside .widget {
  padding: 22px 20px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-sizing: border-box;
}
.home-aside .widget--accent {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(172, 86, 51, .14), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-card);
}
.home-aside .widget h3 { margin: 0 0 12px; }
.home-aside .widget h3 a { color: inherit; text-decoration: none; }
.home-aside .widget-date {
  margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--bronze-dark);
}
.home-aside .widget-saint {
  margin: 0 0 8px; font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.3;
}
.home-aside .aside-day-fields {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin: 0 0 12px;
}
.home-aside .aside-day-rank {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--bronze-dark);
}
.home-aside .aside-day-color {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--stone-700);
}
.home-aside .aside-day-block {
  margin: 0 0 12px;
}
.home-aside .aside-day-block h4 {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--stone-500);
}
.home-aside .aside-day-block p,
.home-aside .aside-day-block div {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--stone-700);
}
.home-aside .aside-day-quote { font-style: italic; }
.home-aside .widget-read,
.home-aside .widget-copy {
  margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--stone-700);
}
.authors-aside { display: grid; gap: 10px; margin: 0 0 12px; }
.authors-aside .author-row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center;
  text-decoration: none; color: inherit; min-width: 0;
}
.authors-aside .author-ava {
  width: 36px; height: 36px; font-size: 11px; flex: none;
}
.authors-aside .author-row-text {
  min-width: 0; display: grid; gap: 1px;
}
.authors-aside .author-row strong {
  font-size: 13px; display: block; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.authors-aside .author-row small { font-size: 11px; color: var(--stone-500); }
.authors-aside .author-row-role { display: none; }
.audio-aside { display: grid; gap: 10px; margin: 0 0 12px; }
.audio-aside .audio-row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center;
  text-decoration: none; color: inherit; min-width: 0;
}
.audio-aside .audio-ava {
  width: 36px; height: 36px; border-radius: 8px; flex: none;
  background: var(--accent-soft) center / cover no-repeat;
}
.audio-aside .audio-row-text {
  min-width: 0; display: grid; gap: 1px;
}
.audio-aside .audio-row strong {
  font-size: 13px; display: block; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.audio-aside .audio-row small { font-size: 11px; color: var(--stone-500); }
.home-aside .widget h3 {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.home-aside .widget-saint {
  display: block;
  overflow: visible;
}
.home-aside .widget-saint a { color: inherit; }
/* Авторы на мобилке (сайдбар скрыт) */
.authors-block--mobile-only { display: none; }
@media (max-width: 880px) {
  .authors-block--mobile-only { display: block; }
}

.app-download {
  scroll-margin-top: 88px;
  margin: 8px 0 36px;
  padding: 28px 26px 26px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(172, 86, 51, .14), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-card);
  max-width: 42rem;
}
.app-download .eyebrow { margin: 0 0 10px; color: var(--bronze-dark); }
.app-download h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.15;
}
.app-download p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--stone-700);
}

/* Статическая страница «О проекте / приложение» */
main.page-static {
  padding-top: 20px;
  padding-bottom: 64px;
}
.page-static .breadcrumbs {
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 8px;
}
.page-static .static-head {
  max-width: 42rem;
  margin: 8px 0 22px;
}
.page-static .static-head .eyebrow { margin: 0 0 10px; color: var(--bronze-dark); }
.page-static .static-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.1;
  font-weight: 600;
  color: var(--ink);
}
.page-static .static-head h1 em {
  font-style: italic;
  color: var(--bronze-dark);
}
.page-static .static-photo {
  margin: 0 0 28px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface-2);
  width: 100%;
  max-width: none;
}
.page-static .static-photo picture {
  display: block;
  width: 100%;
  height: 100%;
}
.page-static .static-photo img {
  display: block;
  width: 100%;
  height: min(42vw, 360px);
  object-fit: cover;
  object-position: center 18%;
}
.page-static .app-download-photo {
  margin: 16px 0 0;
  border-radius: 12px;
  overflow: hidden;
}
.page-static .app-download-photo img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}
.page-static .app-download-body p { margin: 0 0 10px; }
.page-static a.partner { text-decoration: none; color: inherit; }
.page-static a.partner:hover { color: var(--bronze-dark); }
.page-static .contact-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.page-static .static-photo .hero-photo {
  min-height: 240px;
  height: min(42vw, 360px);
  background-image:
    linear-gradient(135deg, rgba(172, 86, 51, .18), rgba(45, 32, 24, .08)),
    var(--img, none);
  background-color: var(--surface-2);
  background-size: cover;
  background-position: var(--pos, center);
}
.page-static .img-people-3 {
  --img: url("church.webp");
  --pos: 50% 40%;
}
.page-static .static-body {
  max-width: 42rem;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--stone-700);
}
.page-static .static-body .lead-paragraph {
  font-size: 18.5px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 18px;
}
.page-static .static-body h2 {
  margin: 28px 0 12px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 600;
  color: var(--ink);
}
.page-static .static-body p { margin: 0 0 14px; }
.page-static .principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 36px 0;
}
.page-static .principle {
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.page-static .principle span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--bronze-dark);
  margin-bottom: 8px;
}
.page-static .principle h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}
.page-static .principle p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--stone-700);
}
.page-static .figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 8px;
}
.page-static .figure-item {
  padding: 18px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.page-static .figure-item b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.02em;
}
.page-static .figure-item span {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--stone-500);
}
.page-static .support-block {
  margin: 40px 0 28px;
  padding: 36px 28px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(172, 86, 51, .12), transparent 55%),
    var(--surface);
  text-align: left;
}
.page-static .support-inner { max-width: 36rem; }
.page-static .support-block .eyebrow { margin: 0 0 10px; color: var(--bronze-dark); }
.page-static .support-block h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.12;
  font-weight: 600;
  color: var(--ink);
}
.page-static .support-text {
  margin: 0 0 22px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--stone-700);
  max-width: 34em;
}
.page-static .amount-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}
.page-static .amount {
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--stone-700);
  font: 600 13px var(--ff);
  cursor: pointer;
}
.page-static .amount:hover { color: var(--bronze-dark); border-color: var(--bronze); }
.page-static .amount.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.page-static .solid-button,
.page-static a.solid-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.page-static .solid-button:hover { background: var(--bronze-dark); color: #fff; }
.page-static .note {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--stone-500);
}
.page-static .section {
  margin: 36px 0 0;
  padding: 0;
}
.page-static .section-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
  margin-bottom: 16px;
}
.page-static .section-top .eyebrow { margin: 0; width: 100%; color: var(--bronze-dark); }
.page-static .section-top h2 {
  margin: 0;
  flex: 1;
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 600;
}
.page-static .section-top .text-link {
  color: var(--bronze-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--bronze-dark) 45%, transparent);
}
.page-static .partner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.page-static .partner {
  display: grid;
  place-items: center;
  min-height: 110px;
  padding: 20px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--stone-700);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.3;
  text-align: center;
}
.page-static .contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.page-static .contact {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.page-static .contact .eyebrow { margin: 0 0 8px; color: var(--bronze-dark); }
.page-static .contact a {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  word-break: break-word;
}
.page-static .contact a:hover { color: var(--bronze-dark); }
@media (max-width: 900px) {
  .page-static .figures,
  .page-static .partner-grid,
  .page-static .contact-grid,
  .page-static .contact-grid--three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .page-static .principles,
  .page-static .figures,
  .page-static .partner-grid,
  .page-static .contact-grid,
  .page-static .contact-grid--three { grid-template-columns: 1fr; }
  .page-static .support-block { padding: 24px 18px; }
  .page-static .figures { grid-template-columns: 1fr 1fr; }
}
.fresh-home {
  display: grid;
  gap: 22px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.fresh-home > .ncard--lead {
  padding-top: 0;
  border-bottom: 0;
}
.fresh-home > .ncard--lead .thumb {
  height: clamp(180px, 20vw, 240px);
}
.fresh-home > .ncard--lead h4 {
  font-size: clamp(20px, 2vw, 28px);
  -webkit-line-clamp: 3;
}
.fresh-home-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 20px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.fresh-home-row .art--tile .ph { height: 120px; }
.fresh-home-row .art--tile h4 {
  font-size: clamp(15px, 1.15vw, 17px);
  -webkit-line-clamp: 3;
}
.art-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
.fresh-pack { margin-bottom: 0; }
.fresh-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 24px;
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.art {
  display: grid;
  gap: 12px;
  align-content: start;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
  color: inherit;
  transition: color .15s ease;
}
.art:hover { transform: none; box-shadow: none; }
.art:hover h4 { color: var(--bronze-dark); }
.art .ph {
  height: clamp(180px, 17vw, 220px);
  border-radius: 4px;
  background-color: var(--surface-2);
  background-image: var(--img, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.art--tile .ph { height: clamp(160px, 14vw, 190px); }
.art .in { padding: 0; display: grid; gap: 6px; }
.art .rub { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--bronze-dark); }
.art h4 {
  margin: 0; font-family: var(--serif); font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.22; font-weight: 600; letter-spacing: -.01em; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.art--tile h4 { font-size: clamp(17px, 1.25vw, 20px); -webkit-line-clamp: 3; }
.art .date {
  font-size: 12px; color: var(--stone-500); font-variant-numeric: tabular-nums; margin-top: 2px;
}
.art p {
  font-size: 14px; line-height: 1.45; color: var(--stone-700); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

aside { display: flex; flex-direction: column; gap: 0; }
/* На мобиле сайдбар не встаёт между Статьями и Голосами — таббар уже закрывает Карту/Спросить */
@media (max-width: 880px) {
  .body-grid > aside.home-aside { display: none; }
}
.widget {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.home-aside .widget:first-child {
  /* не сбрасываем padding — иначе «День Церкви» липнет к краям карточки */
  border-top: 0;
}
.widget:first-child { padding-top: 4px; border-top: 0; }
.home-aside .widget.widget--accent:first-child,
.home-aside .widget.widget--accent {
  padding: 22px 20px 18px;
  flex: 1 1 auto;
}
.widget h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 9px; margin-bottom: 14px; font-weight: 700; }
.widget.future { background: var(--surface-2); box-shadow: none; border: 1px dashed var(--line-strong); }
.widget.future::after { content: "роадмап"; position: absolute; top: 15px; right: 15px; font-weight: 700; font-size: 9px;
  letter-spacing: .07em; text-transform: uppercase; color: var(--v2); background: var(--v2-soft); padding: 3px 9px; border-radius: 100px; }
.widget.live::after { content: "работает"; position: absolute; top: 15px; right: 15px; font-weight: 700; font-size: 9px;
  letter-spacing: .07em; text-transform: uppercase; color: var(--v1); background: var(--v1-soft); padding: 3px 9px; border-radius: 100px; }
.wdot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.wdot.f { background: var(--v2); }
.wdot.l { background: var(--v1); }
.afisha-item { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.afisha-item:first-of-type { border-top: 0; }
.afisha-date { text-align: center; line-height: 1; flex: none; width: 44px; }
.afisha-date b { display: block; font-size: 22px; color: var(--bronze-dark); font-weight: 800; }
.afisha-date span { font-size: 10px; text-transform: uppercase; color: var(--stone-500); letter-spacing: .05em; }
.afisha-item h4 { font-size: 13px; font-weight: 600; line-height: 1.3; }
.afisha-item small { color: var(--stone-500); font-size: 11.5px; }
.future ul, .widget ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.future li, .widget ul li { font-size: 13px; color: var(--stone-700); display: flex; gap: 9px; align-items: flex-start; }
.future li::before, .widget ul li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--v2); margin-top: 7px; flex: none; opacity: .7; }
.widget.live ul li::before { background: var(--v1); }
.day-row { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0; border-top: 1px solid var(--line); }
.day-row:first-of-type { border-top: 0; }
.day-row span:first-child { color: var(--stone-700); }
.day-row b { font-weight: 600; }
.widget .wlink { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 12.5px; font-weight: 700; color: var(--bronze-dark); }

/* ---------- Sitemap ---------- */
.sitemap-sec { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tree { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 4px; }
.branch { border-radius: 16px; background: var(--ground); box-shadow: var(--shadow-card); overflow: hidden; }
.branch > .node { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700; }
.branch > .node .ic { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.branch ul { list-style: none; margin: 0; padding: 10px 16px 16px; }
.branch li { font-size: 13px; padding: 6px 0; display: flex; align-items: center; gap: 8px; }
.branch li small { color: var(--stone-500); font-variant-numeric: tabular-nums; margin-left: auto; font-size: 11px; }
.tag { font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 100px; }
.tag.v1 { color: var(--v1); background: var(--v1-soft); }
.tag.v2 { color: var(--v2); background: var(--v2-soft); }

/* ---------- Roadmap cols ---------- */
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { border-radius: 20px; padding: 24px; background: var(--surface); box-shadow: var(--shadow-card); }
.panel.v1head { border-top: 3px solid var(--v1); }
.panel.v2head { border-top: 3px solid var(--v2); }
.panel h3 { font-size: 16px; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font-weight: 700; }
.panel > p { color: var(--stone-700); font-size: 13px; margin: 0 0 16px; }
.flist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.flist li { display: flex; gap: 12px; font-size: 14px; align-items: flex-start; }
.flist .mk { flex: none; margin-top: 1px; font-weight: 800; color: var(--v1); }
.v2head .flist .mk { color: var(--v2); }
.flist b { font-weight: 600; }
.flist small { display: block; color: var(--stone-500); font-size: 12.5px; font-weight: 400; margin-top: 2px; }
.flist li.ai { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 12px; padding: 11px 13px; margin: -2px 0 4px; }
.flist li.ai .mk { color: var(--accent-2); font-size: 15px; }
.flist li.ai b { color: var(--bronze-dark); }

/* ---------- Footer ---------- */
.portal-footer { background: var(--surface-2); border-top: 1px solid var(--line); margin-top: 12px; }
.portal-footer .wrap {
  padding: 28px max(var(--gutter), env(safe-area-inset-right)) 28px max(var(--gutter), env(safe-area-inset-left));
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 8px; color: var(--stone-700); font-size: 12.5px;
}
.portal-footer .logo { display: inline-flex; align-items: center; gap: 11px; }
.portal-footer .logo .wm { font-size: 19px; }
.portal-footer .footer-tagline { margin: 0; padding-left: 41px; font-size: 12.5px; color: var(--stone-500); }

/* ---------- Photostock ---------- */
/* ---------- Photostock (editorial stock) ---------- */
.ps-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px 36px; align-items: start;
}
.ps-search--hero {
  display: flex; align-items: center; min-height: 56px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  box-shadow: var(--shadow-card); margin-bottom: 14px;
}
.ps-search--hero input {
  width: 100%; border: 0; outline: none; background: transparent;
  font-family: var(--ff); font-size: 16px; color: var(--ink);
}
.ps-popular { margin: 0 0 18px; font-size: 13.5px; color: var(--stone-700); line-height: 1.7; }
.ps-popular-label { font-weight: 700; margin-right: 6px; }
.ps-tag {
  display: inline-block; margin: 0 6px 6px 0; color: var(--bronze-dark); text-decoration: none; font-weight: 600;
}
.ps-tag:hover { text-decoration: underline; }
.ps-grid-tiles {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.ps-tile {
  display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2);
}
.ps-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-aside h3 {
  margin: 0 0 12px; font-family: var(--serif); font-size: 22px; font-weight: 600;
}
.ps-ph-list { display: grid; gap: 10px; }
.ps-ph-row {
  display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center;
  text-decoration: none; color: inherit;
}
.ps-ph-row strong { display: block; font-size: 14px; }
.ps-ph-row small { color: var(--stone-500); font-size: 12px; }
.ps-ph-row .author-ava { width: 42px; height: 42px; font-size: 13px; filter: grayscale(1); }
.ps-card-layout {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr); gap: 28px; align-items: start;
}
.ps-card-figure { margin: 0; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.ps-card-figure img { width: 100%; display: block; }
.ps-card-meta h1 { margin: 0 0 12px; font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); }
.ps-card-meta h1 a { color: inherit; text-decoration: none; }
.ps-card-meta h1 a:hover { color: var(--bronze-dark); }
.ps-card-tags { margin: 0 0 18px; }
.ps-card-actions { display: grid; gap: 10px; margin-bottom: 18px; }
.ps-license { margin: 0; font-size: 12.5px; color: var(--stone-500); line-height: 1.4; }
.ps-share { position: relative; }
.ps-share-pop[hidden] { display: none !important; }
.ps-share-pop {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 880px) {
  .ps-share-pop { align-items: center; }
}
.ps-share-scrim {
  position: absolute; inset: 0; border: 0; background: rgba(20, 16, 12, .45); cursor: pointer;
}
.ps-share-sheet {
  position: relative; z-index: 1; width: min(420px, calc(100% - 24px));
  margin: 0 12px 18px; padding: 16px 16px 18px;
  border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-card);
  display: grid; gap: 8px;
}
.ps-share-sheet p {
  margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--stone-500);
}
.ps-share-sheet a,
.ps-share-copy {
  display: block; text-align: left; text-decoration: none; color: var(--ink);
  font: 700 15px/1.2 var(--ff); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; cursor: pointer;
}
.ps-share-sheet a:hover,
.ps-share-copy:hover { border-color: var(--bronze-dark); }
.ps-ph-head { margin-bottom: 22px; }
.ps-ph-bio { margin: 10px 0; font-size: 15px; line-height: 1.5; color: var(--stone-700); max-width: 40em; }
.ps-ph-count { margin: 0; color: var(--stone-500); font-size: 13px; }
.ps-social { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.ps-social a { font-weight: 700; font-size: 13px; color: var(--bronze-dark); text-decoration: none; }
@media (max-width: 880px) {
  .ps-layout, .ps-card-layout { grid-template-columns: 1fr; }
  .ps-grid-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-aside { order: -1; }
}
.ps-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.ps-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 100px; padding: 10px 18px; }
.ps-search input { flex: 1; background: transparent; border: 0; color: var(--ink); font-family: var(--ff); font-size: 14px; outline: none; }
.ps-search input::placeholder { color: var(--stone-500); }
.ps-sources { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 24px; }
.ps-sources button { font-family: var(--ff); font-weight: 600; font-size: 12.5px; color: var(--stone-700); background: var(--surface);
  border: 1px solid var(--line); padding: 7px 15px; border-radius: 100px; cursor: pointer; transition: .16s; }
.ps-sources button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ps-quick { display: flex; gap: 7px; flex-wrap: wrap; }
.ps-quick button { font-family: var(--ff); font-size: 12px; color: var(--stone-700); background: var(--accent-soft);
  border: 0; padding: 6px 13px; border-radius: 100px; cursor: pointer; }
.ps-quick button:hover { color: #fff; background: var(--accent); }
.ps-grid { columns: 4 240px; column-gap: 16px; }
.ps-card { break-inside: avoid; margin: 0 0 16px; border-radius: 14px; overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-card); position: relative; }
.ps-card img { width: 100%; display: block; background: var(--surface-2); }
.ps-meta { padding: 11px 13px; }
.ps-meta .t { font-size: 12.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ps-meta .a { font-size: 11px; color: var(--stone-500); margin-top: 5px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ps-lic { font-size: 8.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--v1); background: var(--v1-soft); padding: 2px 7px; border-radius: 100px; flex: none; }
.ps-status { color: var(--stone-500); font-size: 13px; padding: 30px 0; text-align: center; }
.ps-src-tag { position: absolute; top: 9px; left: 9px; font-size: 9px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #fff; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); padding: 3px 8px; border-radius: 100px; }

/* ---------- Bottom tab bar (mobile) ---------- */
.app-tabbar { display: none; }
@media (max-width: 880px) {
  .app-tabbar {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
    display: flex; justify-content: space-around; align-items: stretch; gap: 2px;
    padding: 8px 6px; border-radius: 26px;
    background: var(--chrome);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    border: 1px solid var(--line);
    box-shadow: 0 8px 28px rgba(50, 48, 28, .12);
  }
  [data-theme="twilight"] .app-tabbar {
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 10px 34px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
  }
  /* До 6 пунктов: Главная + 5 разделов; подпись резервирует 2 строки */
  .tab-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: flex-start; gap: 2px; padding: 5px 1px 3px;
    color: var(--stone-500); border-radius: 14px; text-align: center; min-width: 0;
  }
  .tab-item svg { width: 20px; height: 20px; flex: none; display: block; }
  .tab-item span {
    font-size: 8.5px; font-weight: 700; letter-spacing: .01em; line-height: 1.12;
    min-height: calc(1.12em * 2);
    max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
  .tab-item.active { color: var(--bronze-dark); position: relative; }
  .tab-item.active::after {
    content: ''; position: absolute; left: 50%; bottom: 1px; width: 14px; height: 2px;
    margin-left: -7px; border-radius: 2px; background: currentColor;
  }
  body { padding-bottom: 98px; }

  /* На карте — тот же таббар с иконками (2 строки у «Духовная жизнь», без обрезки) */
  body.map-page { padding-bottom: 0; }
  body.map-page .app-tabbar {
    padding: 7px 6px 6px; border-radius: 24px;
  }
  body.map-page .tab-item { padding: 5px 2px 3px; gap: 2px; }
  body.map-page .tab-item svg { width: 20px; height: 20px; }
  body.map-page .tab-item span { font-size: 8.5px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  input, select, textarea { font-size: 16px !important; }
  :root { --gutter: 24px; }
  .wrap {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
  .masthead .wrap { padding-top: 12px; padding-bottom: 12px; }
  section.block { padding-top: 28px; padding-bottom: 28px; }
  .block-head { flex-wrap: wrap; gap: 8px 10px; margin-bottom: 16px; }
  .block-head .rule { display: none; }
  .block-head .eyebrow.inline { width: 100%; margin-left: 22px; }
  .hero { grid-template-columns: 1fr; gap: 12px; border-top: 0; padding-top: 0; }
  .hero-main { min-height: 360px; border-radius: 20px; box-shadow: var(--shadow-lift); }
  .hero-cap { padding: 18px 20px 52px; }
  .hero-cap h3 { font-size: 22px; max-width: none; font-family: var(--serif); }
  .hero-cap .rub { border-radius: 100px; }
  .hero-side {
    display: flex; flex-direction: column;
    padding-left: 0; border-left: 0; gap: 10px;
    grid-template-columns: 1fr;
  }
  .mini {
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    border-bottom: 0;
    background: var(--surface);
    box-shadow: var(--shadow-card);
  }
  .mini:first-child { padding-top: 12px; }
  .mini:last-child { padding-bottom: 12px; }
  .mini .thumb { width: 96px; height: 74px; border-radius: 11px; }
  .mini h4 {
    font-family: var(--ff); font-size: 14.5px; font-weight: 600; letter-spacing: 0;
    -webkit-line-clamp: 2;
  }
  .body-grid, .art-grid, .tree, .cols2, .fresh-row, .fresh-home-row { grid-template-columns: 1fr; gap: 14px; }
  .body-grid { gap: 22px; }
  .home-aside { border-left: 0; padding-left: 0; border-top: 0; padding-top: 0; }
  .art-grid { gap: 14px; }
  /* Новости / Голоса / Свежие: ровный список без lead */
  .news-list,
  .news-pack,
  .fresh-home,
  .home-equal {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 0;
    padding-top: 0;
  }
  .home-equal .art--tile {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-card);
  }
  .home-equal .art--tile .ph {
    width: 108px;
    height: 84px;
    border-radius: 11px;
  }
  .home-equal .art--tile h4 {
    font-family: var(--ff);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    -webkit-line-clamp: 3;
  }
  .news-list .ncard {
    grid-template-columns: 108px minmax(0, 1fr);
  }
  .news-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 0;
    border-left: 0;
  }
  .ncard,
  .ncard--lead,
  .fresh-home > .ncard--lead {
    grid-template-columns: 108px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    border-bottom: 0;
    background: var(--surface);
    box-shadow: var(--shadow-card);
    height: auto;
  }
  .ncard .thumb,
  .ncard--lead .thumb,
  .fresh-home > .ncard--lead .thumb {
    width: 108px;
    height: 84px;
    border-radius: 11px;
  }
  .ncard h4,
  .ncard--lead h4,
  .fresh-home > .ncard--lead h4 {
    font-family: var(--ff);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.25;
    -webkit-line-clamp: 3;
  }
  .ncard-excerpt { display: none; }
  .ncard .date { margin-top: 0; font-size: 11.5px; }
  .fresh-home-row,
  .fresh-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
  .fresh-home-row .art--tile,
  .fresh-row .art--tile,
  .home-equal .art--tile,
  .art {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-card);
  }
  .fresh-home-row .art--tile .ph,
  .fresh-row .art--tile .ph,
  .home-equal .art--tile .ph,
  .art .ph {
    width: 108px;
    height: 84px;
    border-radius: 11px;
  }
  .fresh-home-row .art--tile h4,
  .fresh-row .art--tile h4,
  .home-equal .art--tile h4,
  .art h4 {
    font-family: var(--ff);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    -webkit-line-clamp: 3;
  }
  .art p { display: none; }
  .lead-item { grid-template-columns: 1fr; gap: 16px; }
  .lead-item .card-image, .lead-item .story-image { max-height: none; aspect-ratio: 16 / 10; }
  nav.top { display: none; }
  .search { padding: 8px 12px; font-size: 12px; }
  .cal-btn { width: 40px; height: 40px; border-radius: 12px; }
  .app-btn, .head-book { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; }
  .app-btn span, .head-book span { display: none; }
  .panel { padding: 18px; border-radius: 16px; }
  .widget { padding: 16px 0; }
  .portal-footer .wrap { padding-top: 22px; padding-bottom: 22px; }
  .ps-grid { columns: 2 160px; }
  .page-shell {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
}
@media (max-width: 520px) {
  :root { --gutter: 24px; }
  .wrap {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
  .masthead .wrap {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
  .logo { gap: 9px; min-width: 0; }
  .logo .wm { font-size: 17px; overflow: hidden; text-overflow: ellipsis; }
  .logo .mark { width: 30px; height: 30px; }
  section.block { padding-top: 22px; padding-bottom: 22px; }
  .hero-main { min-height: 340px; border-radius: 18px; }
  .hero-cap { padding: 16px 16px 48px; }
  .hero-cap h3 { font-size: 20px; line-height: 1.2; }
  .hero-dots { right: 14px; bottom: 14px; gap: 9px; }
  .hero-dots button { width: 11px; height: 11px; }
  .hero-dots button.on { width: 26px; }
  .mini { grid-template-columns: 92px minmax(0, 1fr); padding: 11px; }
  .mini .thumb { width: 92px; height: 70px; border-radius: 10px; }
  .mini h4 { font-size: 13.5px; }
  .ncard,
  .ncard--lead,
  .fresh-home > .ncard--lead,
  .fresh-home-row .art--tile,
  .fresh-row .art--tile,
  .art {
    grid-template-columns: 100px minmax(0, 1fr);
    padding: 11px;
  }
  .ncard .thumb,
  .ncard--lead .thumb,
  .fresh-home > .ncard--lead .thumb,
  .fresh-home-row .art--tile .ph,
  .fresh-row .art--tile .ph,
  .art .ph {
    width: 100px;
    height: 78px;
    border-radius: 10px;
  }
  .ncard h4,
  .ncard--lead h4,
  .fresh-home > .ncard--lead h4,
  .art h4 { font-size: 14.5px; }
  .feed-item { grid-template-columns: 112px 1fr; gap: 14px; padding: 13px 0; }
  .feed-thumb { height: 78px; border-radius: 10px; }
  .feed-item h3 { font-size: 15.5px; -webkit-line-clamp: 3; }
  .feed-author { margin-top: 6px; font-size: 11.5px; }
  .tabs { gap: 6px; margin-bottom: 14px; }
  .tabs button { padding: 8px 14px; font-size: 13px; }
  .loadmore, .load-more { width: auto; max-width: 100%; box-sizing: border-box; margin-left: auto; margin-right: auto; }
  .flist li { font-size: 13.5px; }
  .tree { gap: 12px; }
  .ps-grid { columns: 1; }
  .page-shell {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
    padding-bottom: 72px;
  }
  .article-head, .article-body, .article-foot, .article-hero, .article-reading {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
  .article-reading .article-body,
  .article-reading .article-foot {
    padding-left: 0;
    padding-right: 0;
  }
  .article-hero {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
  .related-inner {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
}
@media (prefers-reduced-motion: reduce) { .hero-slide, .mini, .art, .ncard { transition: none; } }

/* ---------- Map page ---------- */
body.map-page {
  overflow: hidden; height: 100dvh; height: 100vh; padding-bottom: 0;
  display: flex; flex-direction: column;
}
body.map-page .masthead { flex: none; }
body.map-page .app-tabbar { flex: none; }
.map-shell {
  display: grid; grid-template-columns: 360px 1fr; flex: 1; min-height: 0;
  background: var(--ground);
}
.map-stage { position: relative; min-width: 0; min-height: 0; }
#map-canvas { width: 100%; height: 100%; background: #1a1820; z-index: 1; }
.map-side {
  display: flex; flex-direction: column; border-right: 1px solid var(--line);
  background: var(--surface); z-index: 2; min-height: 0;
}
.map-side-head { padding: 18px 18px 10px; border-bottom: 1px solid var(--line); flex: none; }
.map-meta { margin: 8px 0 12px; font-size: 12.5px; color: var(--stone-500); }
.map-search { width: 100%; margin-bottom: 10px; }
.map-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.map-actions button {
  flex: 1; font-family: var(--ff); font-weight: 700; font-size: 12.5px;
  color: var(--bronze-dark); background: var(--accent-soft); border: 0;
  padding: 9px 10px; border-radius: 100px; cursor: pointer;
}
.map-actions button:hover { background: var(--accent); color: #fff; }
.map-status { font-size: 11.5px; color: var(--stone-500); margin: 4px 0 0; min-height: 1.3em; }
.map-status[data-kind="warn"] { color: var(--v2); }
.map-status[data-kind="ok"] { color: var(--v1); }
.map-status[data-kind="err"] { color: var(--rose); }
.map-list { flex: 1; overflow: auto; padding: 8px; min-height: 0; }
.map-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%;
  text-align: left; background: transparent; border: 1px solid transparent;
  border-radius: 14px; padding: 12px 13px; cursor: pointer; color: var(--ink);
  font-family: var(--ff); margin-bottom: 4px;
}
.map-item:hover { background: var(--surface-2); }
.map-item.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.map-item .kind { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bronze-dark); }
.map-item strong { font-size: 14px; font-weight: 700; line-height: 1.25; }
.map-item small { font-size: 12px; color: var(--stone-500); }
.map-item.has-photo { padding: 0; overflow: hidden; }
.map-item.has-photo .map-item-body {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 13px 12px;
}
.map-item-cover {
  display: block; width: 100%; height: 116px;
  background-color: var(--surface-2); background-size: cover; background-position: center;
}
.map-item-body { display: contents; }
.map-empty { color: var(--stone-500); font-size: 13px; padding: 24px 12px; text-align: center; }

/* Floating controls (mobile; hidden on desktop) */
.map-float { display: none; }

/* Booking-style temple sheet */
.map-sheet {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
}
.map-sheet[hidden] { display: none !important; }
.map-sheet-backdrop {
  position: absolute; inset: 0; background: rgba(10, 9, 12, .35);
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.map-sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: min(78dvh, 720px);
  background: var(--surface); border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 40px rgba(0,0,0,.45);
  transform: translateY(110%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  pointer-events: auto; display: flex; flex-direction: column; overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}
.map-sheet.is-open { pointer-events: auto; }
.map-sheet.is-open .map-sheet-backdrop { opacity: 1; pointer-events: auto; }
.map-sheet.is-open .map-sheet-panel { transform: translateY(0); }
.map-sheet-handle {
  width: 42px; height: 4px; border-radius: 999px; background: var(--line-strong);
  margin: 10px auto 0; flex: none;
}
.map-sheet-body { overflow: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.map-sheet-media { position: relative; flex: none; }
.map-sheet-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(20,18,22,.55); color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer; backdrop-filter: blur(8px);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}
.map-sheet-hero {
  height: 200px; background: var(--surface-2); flex: none; overflow: hidden;
}
.map-sheet-hero img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.map-sheet-hero-empty {
  background: linear-gradient(145deg, #3a3430, #2a2522);
}
.map-sheet-content { padding: 16px 18px 22px; }
.map-sheet-content .kind {
  margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--bronze-dark);
}
.map-sheet-content h3 {
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(24px, 5vw, 30px); letter-spacing: -.02em; line-height: 1.1;
}
.map-sheet-content .diocese { margin: 8px 0 0; font-size: 13px; color: var(--v1); font-weight: 600; }
.map-sheet-content .addr { margin: 10px 0 0; font-size: 14px; color: var(--stone-700); line-height: 1.45; }
.map-sheet-content .hours {
  margin: 10px 0 0; font-size: 13.5px; color: var(--ink);
}
.map-sheet-content .hours span { color: var(--stone-500); font-weight: 700; margin-right: 6px; }
.map-sheet-content .desc {
  margin: 12px 0 0; font-size: 13.5px; color: var(--stone-700); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.map-cta-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px; margin-top: 16px;
}
.map-cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 14px; border-radius: 14px; font-size: 13.5px; font-weight: 700;
  text-decoration: none; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line);
}
.map-cta.primary {
  background: var(--accent); border-color: transparent; color: #fff;
}
.map-cta:hover { border-color: var(--bronze); }

/* Desktop: sheet as side card over list area */
@media (min-width: 881px) {
  .map-sheet { inset: auto; left: 0; top: 60px; bottom: 0; width: 360px; z-index: 5; }
  .map-sheet-backdrop { display: none; }
  .map-sheet-panel {
    border-radius: 0; max-height: none; height: 100%;
    box-shadow: none; border-right: 1px solid var(--line);
  }
  .map-sheet-handle { display: none; }
  .map-sheet-hero { height: 200px; }
  body.map-sheet-open .map-side { visibility: hidden; }
}

.temple-marker { background: transparent !important; border: 0 !important; }
.temple-marker .pin {
  display: block; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(172, 86, 51, .35), 0 4px 12px rgba(0, 0, 0, .45);
  transition: transform .15s, box-shadow .15s;
}
.temple-marker.is-active .pin {
  width: 18px; height: 18px; background: var(--highlight);
  box-shadow: 0 0 0 5px rgba(255, 215, 0, .28), 0 6px 16px rgba(0, 0, 0, .55);
  transform: scale(1.05);
}

.leaflet-control-zoom a {
  background: var(--surface) !important; color: var(--ink) !important;
  border-color: var(--line) !important; width: 34px !important; height: 34px !important;
  line-height: 34px !important; border-radius: 10px !important;
}
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow-card) !important; }
.leaflet-control-attribution { display: none !important; }

@media (max-width: 880px) {
  body.map-page { padding-bottom: 0; }
  body.map-page .masthead { display: none; }
  .map-shell {
    grid-template-columns: 1fr;
    height: calc(100dvh - 88px - env(safe-area-inset-bottom));
    height: calc(100vh - 88px);
  }
  .map-side { display: none; }
  .map-stage { height: 100%; }
  #map-canvas { height: 100%; min-height: 0; }
  .map-float {
    display: flex; gap: 8px; align-items: center;
    position: absolute; top: max(12px, env(safe-area-inset-top));
    left: 12px; right: 12px; z-index: 4; pointer-events: none;
  }
  .map-float-search {
    flex: 1; display: flex; align-items: center; gap: 8px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line); border-radius: 16px; padding: 11px 14px;
    box-shadow: var(--shadow-card); pointer-events: auto;
  }
  .map-float-search input {
    flex: 1; border: 0; outline: none; background: transparent;
    color: var(--ink); font: inherit; font-size: 14px; font-weight: 600;
  }
  .map-float-search input::placeholder { color: var(--stone-500); font-weight: 500; }
  .map-float-actions { display: flex; gap: 8px; pointer-events: auto; }
  .map-float-actions button {
    width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px); color: var(--ink); font-weight: 800; font-size: 12px;
    cursor: pointer; box-shadow: var(--shadow-card);
  }
  .leaflet-bottom.leaflet-right { bottom: 18px; right: 10px; margin-bottom: 0 !important; }
  body.map-sheet-open .leaflet-control-zoom { opacity: .35; pointer-events: none; }
  .map-sheet-panel {
    bottom: calc(88px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - 88px - env(safe-area-inset-bottom) - 56px);
  }
  .map-sheet-hero { height: 210px; }
}

/* ============================================================
   Inner pages — same dark portal language as index
   ============================================================ */
body:not(.map-page) { padding-bottom: 0; }
@media (max-width: 880px) {
  body:not(.map-page):not(.chat-page) { padding-bottom: 92px; }
  body.chat-page { padding-bottom: 0; }
}

.page-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px max(var(--gutter), env(safe-area-inset-right)) 64px max(var(--gutter), env(safe-area-inset-left));
}
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 22px 0; color: var(--stone-500); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.breadcrumbs a:hover { color: var(--bronze-dark); }
#article-root > .breadcrumbs {
  max-width: 720px; margin-left: auto; margin-right: auto;
  padding-left: max(22px, env(safe-area-inset-left));
  padding-right: max(22px, env(safe-area-inset-right));
}
.page-shell .breadcrumbs { padding-left: 0; padding-right: 0; }
.tag-head { padding: 8px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tag-head h1 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -.02em;
}
.page-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 28px 40px; align-items: end; padding: 18px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.page-head h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(38px, 4.6vw, 54px); letter-spacing: -.025em; line-height: 1.02; }
.page-rubric { margin: 8px 0 0; font-size: 13px; color: var(--bronze-dark); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.page-desc { margin: 0; color: var(--stone-700); font-size: 14.5px; line-height: 1.6; max-width: 42ch; }
@media (max-width: 880px) {
  .page-head { grid-template-columns: 1fr; gap: 12px; }
}

.archive-toolbar { margin: 0 0 18px; }
.archive-search-shell { display: block; margin-bottom: 14px; }
.archive-search-shell input {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 100px;
  padding: 12px 18px; color: var(--ink); font-family: var(--ff); font-size: 14px; outline: none;
}
.archive-search-shell input:focus { border-color: var(--bronze); }
.archive-search-shell input::placeholder { color: var(--stone-500); }
.chips { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.chips .chip, .video-tabs .chip {
  flex: none; font-family: var(--ff); font-weight: 600; font-size: 13px; color: var(--stone-700);
  background: var(--surface); border: 1px solid var(--line); padding: 8px 16px; border-radius: 100px; cursor: pointer;
}
.chips .chip:hover, .video-tabs .chip:hover { color: var(--ink); border-color: var(--bronze); }
.chips .chip.active, .video-tabs .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.rubric-bar { margin: 0 0 18px; color: var(--stone-500); font-size: 12.5px; }
.category-layout { display: block; }
.lead-item {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px 36px;
  align-items: center;
  padding: 8px 0 28px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.lead-item .card-image, .lead-item .story-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  max-height: 420px;
  border-radius: 6px;
  margin: 0;
  background-color: var(--surface-2);
  background-image: var(--img);
  background-size: cover;
  background-position: center 22%;
  background-repeat: no-repeat;
  box-shadow: none;
}
.lead-item .lead-copy { min-width: 0; }
.lead-item h2 {
  margin: 0 0 12px; font-family: var(--serif); font-weight: 600;
  font-size: clamp(26px, 2.8vw, 38px); line-height: 1.12; letter-spacing: -.02em;
}
.lead-item h2 a:hover { color: var(--bronze-dark); }
.lead-item p:not(.story-meta) { margin: 0; max-width: 620px; color: var(--stone-700); font-size: 15px; line-height: 1.6; }
@media (max-width: 880px) {
  .lead-item {
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
    padding: 4px 0 20px;
  }
  .lead-item .card-image,
  .lead-item .story-image {
    max-height: none;
    aspect-ratio: 16 / 10;
    order: -1;
  }
  .lead-item h2 {
    font-size: clamp(22px, 6vw, 28px);
    margin: 0 0 0;
  }
  .lead-item .lead-excerpt,
  .lead-item .lead-copy > p:not(.story-meta) {
    display: none;
  }
}
.story-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bronze-dark); margin: 0 0 8px; }
.story-meta time { color: var(--stone-500); font-weight: 600; }
.feed-item { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.feed-body { min-width: 0; }
.feed-item .story-meta { margin: 0 0 6px; }
.feed-item h3 { margin: 0; font-size: clamp(16px, 1.7vw, 20px); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feed-item h3 a:hover { color: var(--bronze-dark); }
.feed-author { margin: 8px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--bronze-dark); }
.byline-chip { color: var(--bronze-dark); font-weight: 700; }
.feed-thumb {
  display: block; height: 100px; border-radius: 12px;
  background-color: var(--surface-2);
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------- Skeletons & spinner (анти-скачок) ---------- */
@keyframes sk-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.sk {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--stone-100) 37%, var(--surface-2) 63%);
  background-size: 200% 100%; animation: sk-shimmer 1.25s linear infinite; border-radius: 8px;
}
.sk-line { border-radius: 6px; }
.ncard .thumb.sk, .art .ph.sk, .feed-thumb.sk, .mini .thumb.sk, .lead-item .card-image.sk {
  background-image: linear-gradient(90deg, var(--surface-2) 25%, var(--stone-100) 37%, var(--surface-2) 63%) !important;
  background-size: 200% 100% !important; background-repeat: no-repeat;
  animation: sk-shimmer 1.25s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--line-strong); border-top-color: var(--accent);
  animation: spin .8s linear infinite; margin: 22px auto;
}
.loading-row { display: flex; justify-content: center; padding: 20px; }
.article-skel {
  max-width: 720px; margin: 0 auto; padding: 28px 22px 8px;
}
.article-skel-hero {
  max-width: 1100px; margin: 22px auto 0; padding: 0 22px;
}
.article-skel-hero .sk { height: min(42vw, 280px); min-height: 180px; border-radius: 20px; }
.article-skel-lines { max-width: 720px; margin: 28px auto 0; padding: 0 22px 40px; display: grid; gap: 12px; }
.article-skel .sk-title { height: 34px; width: 92%; border-radius: 10px; }
.article-skel .sk-eyebrow { height: 12px; width: 28%; }
.article-skel .sk-meta { height: 14px; width: 46%; margin-top: 18px; }
.article-skel-lines .sk { height: 14px; }
.article-skel-lines .sk:nth-child(4n) { width: 78%; }
.article-skel-lines .sk:nth-child(5n) { width: 88%; }
.page-skel { display: grid; gap: 12px; padding: 18px 0 40px; }
.page-skel-crumb { width: 30%; height: 11px; }
.page-skel-title { width: 52%; height: 34px; border-radius: 10px; margin-top: 10px; }
.page-skel-desc { width: 78%; height: 14px; }
.page-skel-grid { display: grid; gap: 14px; margin-top: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.page-skel-card { height: 118px; border-radius: 18px; }
.page-skel--tiles { padding-top: 6px; }
.page-skel--tiles .page-skel-grid { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.page-skel--tiles .page-skel-card { height: auto; aspect-ratio: 4 / 3; border-radius: 12px; }
.page-skel--events .page-skel-card { height: 320px; }
.page-skel--day .page-skel-card { height: 440px; border-radius: 22px; }
.page-skel-strip { display: flex; gap: 8px; overflow: hidden; margin-top: 14px; }
.page-skel-strip .sk { flex: none; width: 46px; height: 62px; border-radius: 12px; }
.vp-card[aria-hidden="true"] { min-height: 98px; }
.skel-rows { display: grid; gap: 8px; }
.skel-row { border-radius: 14px; }
.page-fail { padding: 40px 0 8px; text-align: center; color: var(--stone-500); font-size: 14px; }
.page-fail p { margin: 0; }
.ps-skel-ava { width: 42px; height: 42px; border-radius: 50%; }
.ps-skel-name { width: 60%; height: 14px; }
.ps-ph-list[aria-hidden="true"] .ps-ph-row { min-height: 47px; }
.ps-popular-skel { display: grid; gap: 13px; padding: 6px 0 4px; }
.ps-popular-skel .sk { height: 16px; }
.ps-popular-skel .sk:nth-child(1) { width: 92%; }
.ps-popular-skel .sk:nth-child(2) { width: 78%; }
.ps-popular-skel .sk:nth-child(3) { width: 86%; }
.ps-popular-skel .sk:nth-child(4) { width: 54%; }
@media (min-width: 881px) { .ps-popular-skel .sk:nth-child(n+3) { display: none; } }
@media (prefers-reduced-motion: reduce) { .sk, .spinner { animation: none; } }

/* Пока данные в пути, футер ниже первого экрана — иначе он прыгает вниз при каждой подгрузке. */
body > main { min-height: 100vh; min-height: 100svh; }
.tabs:empty { min-height: 37px; }
.chips:empty { min-height: 43px; }
.rubric-count:empty::before { content: '\00a0'; }
.portal-footer .footer-legal-wrap { padding-top: 0; align-items: center; text-align: center; }
.portal-footer .footer-legal-wrap .footer-legal { margin: 0 auto; }

/* Резервируем высоту, чтобы не было скачков при подгрузке */
.news-grid, .art-grid { min-height: 180px; }
#feed { min-height: 220px; }
.load-more, .loadmore {
  margin: 28px auto 28px; display: block; font-family: var(--ff); font-weight: 700; font-size: 14px;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  padding: 12px 18px; min-height: 44px; border-radius: 12px; cursor: pointer;
  position: relative; z-index: 2; text-align: center; text-decoration: none; box-sizing: border-box;
}
.load-more:hover, .loadmore:hover { color: var(--bronze-dark); border-color: var(--bronze-dark); background: var(--surface); }
@media (max-width: 880px) {
  .load-more:not(.news-more), .loadmore:not(.news-more) { margin-bottom: 96px; }
}
.load-more:disabled { opacity: .55; cursor: wait; }
.archive-empty, .archive-loading { color: var(--stone-500); font-size: 14px; padding: 28px 0; }
.article-missing {
  max-width: 640px; margin: 0 auto; padding: 48px 22px 80px;
}
.article-missing h1 {
  margin: 8px 0 14px; font-family: var(--serif); font-weight: 600;
  font-size: clamp(28px, 4vw, 40px); line-height: 1.15;
}
.article-missing p { margin: 0 0 12px; color: var(--stone-700); font-size: 16px; line-height: 1.55; }
.pages-item .pages-excerpt { margin: 8px 0 0; font-size: 13.5px; color: var(--stone-700); line-height: 1.45; }
.pages-item { grid-template-columns: 1fr; }

/* Article */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 50; background: transparent; pointer-events: none; }
.read-progress i { display: block; height: 100%; width: 0; background: var(--accent); }
main.article { padding-bottom: 48px; }
.article-head { max-width: 720px; margin: 0 auto; padding: 28px 22px 0; }
.article-head h1 { margin: 0 0 18px; font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 4.5vw, 48px); line-height: 1.12; }
.article-lead { margin: -6px 0 18px; font-size: 20px; line-height: 1.5; color: var(--charcoal); }
.article-lead p { margin: 0 0 .45em; }
.article-lead p:last-child { margin: 0; }
.article-lead a {
  color: #2a5bd7; text-decoration: underline; text-underline-offset: 2px;
  font-style: inherit;
}
.article-lead em a,
.article-lead i a,
.article-lead a em,
.article-lead a i { font-style: italic; }
.article-lead a:hover { color: #1f4fc4; }
[data-theme="twilight"] .article-lead a { color: #7eb0ff; }
[data-theme="twilight"] .article-lead a:hover { color: #a8c8ff; }
.article-hero { width: 100%; max-width: 1100px; margin: 28px auto 0; padding: 0 22px; }
.article-hero .hero-photo {
  height: min(52vw, 480px); min-height: 220px; border-radius: 20px;
  background-color: var(--surface-2);
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lift);
}
.article-hero figcaption { margin: 12px 0 0; color: var(--stone-500); font-size: 12.5px; }
.article-body { max-width: 720px; margin: 0 auto; padding: 36px 22px 0; font-size: 18px; line-height: 1.75; color: var(--charcoal); }
.article-body p { margin: 0 0 1.35em; }
.article-body h2 { margin: 2em 0 .7em; font-family: var(--serif); font-size: clamp(24px, 2.5vw, 32px); color: var(--ink); }
.article-body strong, .article-body b { font-weight: 700; color: var(--ink); }
.article-body em, .article-body i { font-style: italic; }
/* Ссылки в тексте — как на источнике: явно цветные и подчёркнутые */
.article-body a {
  color: #2f6fed;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-style: inherit;
  font-weight: 600;
}
.article-body em a,
.article-body i a,
.article-body a em,
.article-body a i { font-style: italic; }
.article-body a:hover { color: #1f4fc4; }
[data-theme="twilight"] .article-body a { color: #7eb0ff; }
[data-theme="twilight"] .article-body a:hover { color: #a8c8ff; }
.article-body .embed-link { margin: 1.1em 0; }
.article-body .embed-link a {
  display: inline; padding: 0; border: 0; background: none; border-radius: 0;
  font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.05em;
  color: var(--ink); text-decoration: underline; text-underline-offset: 3px;
}
.article-body .embed-link a:hover { color: var(--bronze-dark); }
.articles-search { margin: 0 0 18px; }
.articles-search-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--stone-500); }

/* Колонка чтения: тело + связанные + источники в одной ширине */
.article-reading {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 22px 8px;
  box-sizing: border-box;
}
.article-reading .article-body { max-width: none; margin: 0; padding: 36px 0 0; }
.article-reading .article-foot { max-width: none; margin: 28px 0 0; padding: 0; }

.article-related-links,
.article-sources {
  margin: 36px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}
.article-related-links h3,
.article-sources h3 {
  margin: 0 0 14px;
  font-family: var(--ff);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--stone-500);
}
.article-related-links ul,
.article-sources ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.article-related-links li,
.article-sources li {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.article-related-links li:last-child,
.article-sources li:last-child { border-bottom: 0; }
.article-related-links a {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.article-related-links a:hover { color: var(--bronze-dark); text-decoration: underline; text-underline-offset: 3px; }
.article-sources a {
  color: var(--bronze-dark);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-sources a:hover { color: var(--ink); }
.article-body .archive-figure, .article-body .inline-figure, .article-body figure {
  margin: 1.8em 0; border-radius: 16px; overflow: hidden; background: var(--surface);
  max-width: 100%;
}
.article-body .archive-figure img, .article-body .inline-figure img, .article-body img {
  width: 100%; max-width: 100%; height: auto; display: block;
}
.article-body p, .article-body li, .article-body h2, .article-body h3 {
  overflow: visible; max-height: none;
}
.article-body figcaption { padding: 10px 14px; font-size: 12.5px; color: var(--stone-500); }
.article-body blockquote {
  margin: 1.6em 0; padding: 14px 18px; border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 12px 12px 0; color: var(--stone-700); font-style: italic;
}
.article-foot { max-width: 720px; margin: 40px auto 0; padding: 0 22px; }
.related-section { margin-top: 48px; padding: 36px 0; background: var(--surface); border-top: 1px solid var(--line); }
.related-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.related-head { margin-bottom: 18px; }
.related-head h2 { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
.secondary-stories { display: grid; gap: 12px; }
.compact-story {
  display: grid; grid-template-columns: 1fr 96px; gap: 14px; padding: 14px;
  background: var(--ground); border-radius: 14px; box-shadow: var(--shadow-card);
}
.compact-story h3 { margin: 0; font-size: 15px; line-height: 1.25; }
.compact-story p { margin: 6px 0 0; font-size: 12.5px; color: var(--stone-700); }
.story-thumb {
  display: block; border-radius: 10px; min-height: 72px;
  background-color: var(--surface-2);
  background-image: var(--img, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Video / audio / radio — сетка как у видеохостинга */
.video-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.video-band { margin: 28px 0 8px; }
.video-band .block-head { margin-bottom: 16px; }
.yt-featured-host { margin: 0 0 8px; }
.yt-featured {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(240px, .85fr);
  gap: 22px 28px; align-items: center;
}
.yt-featured-media { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.yt-featured-copy h2 {
  margin: 0 0 10px; font-family: var(--serif); font-weight: 600;
  font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; line-height: 1.12;
}
.yt-featured-copy p { margin: 0 0 12px; color: var(--stone-700); font-size: 15px; line-height: 1.5; max-width: 42ch; }
.yt-featured-by {
  display: flex !important; align-items: center; gap: 10px;
  font-size: 13px !important; font-weight: 600; color: var(--stone-500) !important;
}
.yt-featured-by .yt-ava { width: 36px; height: 36px; }
.yt-watch {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 18px; border: 0; border-radius: 100px;
  background: var(--accent); color: #fff; font: 700 14px/1 var(--ff); cursor: pointer;
}
.yt-film-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px;
}
.yt-card, .yt-short { min-width: 0; }
.yt-open {
  display: grid; gap: 10px; width: 100%; padding: 0; border: 0;
  background: none; color: inherit; text-align: left; font: inherit; cursor: pointer;
}
.yt-thumb {
  position: relative; display: block; overflow: hidden; border-radius: 12px;
  background: #1a1613;
}
.yt-thumb--wide { aspect-ratio: 16 / 9; }
.yt-thumb--portrait { aspect-ratio: 9 / 16; }
.yt-thumb img, .yt-thumb-empty {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.yt-thumb-empty { background: #2a241f; }
.yt-play {
  position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(12, 10, 8, .42); border: 1.5px solid rgba(255,255,255,.88);
  opacity: 0; transition: opacity .18s;
}
.yt-play::after {
  content: ""; position: absolute; top: 50%; left: 54%; width: 0; height: 0;
  border-style: solid; border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
  transform: translate(-50%, -50%);
}
.yt-open:hover .yt-play, .yt-featured-media:hover .yt-play { opacity: 1; }
.yt-time {
  position: absolute; right: 8px; bottom: 8px; padding: 3px 6px; border-radius: 5px;
  background: rgba(10, 8, 8, .78); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.yt-meta { display: grid; gap: 3px; min-width: 0; }
.yt-meta--ch { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: start; }
.yt-ava {
  width: 36px; height: 36px; border-radius: 50%;
  background: #111 center/cover no-repeat;
  flex: none; display: grid; place-items: center;
}
.yt-ava.is-empty { font-weight: 800; font-size: 13px; color: #c4b8a8; background: #2a241f; }
.yt-meta-text { display: grid; gap: 3px; min-width: 0; }
.yt-meta strong {
  font-size: 14.5px; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.yt-meta em { font-style: normal; font-size: 12.5px; color: var(--stone-500); }
.vp-rail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.vp-rail { align-items: start; }
.vp-card {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
  text-decoration: none; color: inherit;
  min-width: 0;
}
.vp-card:hover { border-color: var(--bronze); }
.vp-logo {
  width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2) center/cover;
  flex: 0 0 auto; display: grid; place-items: center; font-weight: 800;
}
.vp-logo.is-empty { color: var(--stone-500); }
.vp-copy { display: grid; gap: 2px; min-width: 0; }
.vp-copy strong { font-size: 16px; }
.vp-copy small { color: var(--stone-500); }
@media (max-width: 720px) {
  .vp-rail { grid-template-columns: 1fr; }
}
.yt-shorts-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 12px;
  overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.yt-shorts-rail .yt-short { scroll-snap-align: start; }
.yt-shorts-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 12px;
}
.yt-short .yt-meta strong { font-size: 13.5px; -webkit-line-clamp: 3; }
@media (max-width: 980px) {
  .yt-featured { grid-template-columns: 1fr; gap: 14px; }
  .yt-film-grid { grid-template-columns: 1fr 1fr; }
  .yt-shorts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .yt-film-grid { grid-template-columns: 1fr; }
  .yt-shorts-rail { grid-auto-columns: 138px; }
  .yt-shorts-grid { grid-template-columns: 1fr 1fr; }
  .yt-play { opacity: .9; width: 44px; height: 44px; }
}
.video-dialog {
  border: 0; border-radius: 18px; padding: 0; max-width: min(960px, 94vw); width: 100%;
  background: #111; color: #fff; box-shadow: var(--shadow-lift);
}
.video-dialog.is-short { max-width: min(420px, 92vw); }
.video-dialog::backdrop { background: rgba(10, 8, 12, .82); }
.video-dialog-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; }
.video-dialog-bar p { margin: 0; font-weight: 700; font-size: 14px; }
.video-dialog video,
.video-dialog .video-embed {
  width: 100%; display: block; background: #000; max-height: 72vh; border: 0;
}
.video-dialog [hidden] { display: none !important; }
.video-dialog .video-embed { aspect-ratio: 16 / 9; min-height: 240px; }
.video-dialog.is-short video,
.video-dialog.is-short .video-embed {
  max-height: 78vh; aspect-ratio: 9 / 16; object-fit: contain; margin: 0 auto;
}
.vp-cycle .yt-thumb img { object-fit: contain; background: #2a241f; }
.ghost-button {
  font-family: var(--ff); font-weight: 700; font-size: 12.5px; color: var(--bronze-dark);
  background: var(--accent-soft); border: 0; padding: 8px 16px; border-radius: 100px; cursor: pointer;
}

.audio-player-bar {
  margin: 0 0 22px; padding: 16px 18px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card);
}
.audio-player-bar p { margin: 0 0 10px; font-weight: 700; font-size: 14px; }
.audio-player-bar audio, .radio-card audio { width: 100%; }
.audio-list { display: flex; flex-direction: column; gap: 10px; }
.audio-item, .audio-row {
  display: flex; justify-content: space-between; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-card); cursor: pointer; border: 0; width: 100%; text-align: left; color: inherit; font-family: var(--ff);
}
.audio-item:hover, .audio-row:hover { background: var(--surface-2); }
.audio-item strong, .audio-row strong { display: block; font-size: 14.5px; }
.audio-item small, .audio-row small { color: var(--stone-500); font-size: 12px; }

.cast-hub { max-width: 880px; margin-bottom: 36px; }
.cast-head h2 {
  margin: 4px 0 16px;
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.cast-kicker {
  margin: 22px 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--stone-500);
}
.cast-rail,
.cast-latest {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 0 12px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cast-rail::-webkit-scrollbar,
.cast-latest::-webkit-scrollbar { display: none; }
.cast-tile {
  flex: 0 0 138px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}
.cast-tile-art,
.cast-row-art,
.cast-ep-art,
.cast-show-art {
  display: block;
  background: var(--surface-2) center / cover no-repeat;
  box-shadow: 0 10px 24px rgba(20, 15, 12, .16);
}
.cast-tile-art {
  width: 138px;
  height: 138px;
  border-radius: 18px;
}
.cast-tile strong {
  display: block;
  margin: 8px 2px 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
}
.cast-tile em {
  display: block;
  margin: 2px 2px 0;
  font-style: normal;
  font-size: 12px;
  color: var(--stone-500);
}
.cast-ep {
  flex: 0 0 min(78vw, 280px);
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
}
.cast-ep-art { width: 72px; height: 72px; border-radius: 14px; }
.cast-ep-body small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--bronze-dark);
}
.cast-ep-body strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.25;
}
.cast-ep-body em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 12px;
  color: var(--stone-500);
}
.cast-list { display: flex; flex-direction: column; gap: 10px; }
.cast-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.cast-row-main {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.cast-row-art { width: 72px; height: 72px; border-radius: 16px; }
.cast-row-meta strong { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; }
.cast-row-meta em {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  font-style: normal;
  font-size: 13px;
  line-height: 1.4;
  color: var(--stone-500);
}
.cast-row-meta small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bronze-dark);
}
/* Высота карточек не зависит от длины текста — заглушки из разметки совпадают с ними до пикселя. */
.cast-tile strong,
.cast-ep-body strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}
.cast-row-meta em { min-height: 2.8em; }
@media (max-width: 560px) {
  .cast-row-meta strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
  }
}
.cast-skel { pointer-events: none; }
.cast-skel .sk-line { color: transparent; }
.cast-skel strong.sk-line { width: 82%; }
.cast-skel em.sk-line,
.cast-skel small.sk-line { width: 56%; }
.cast-skel .cast-listen { background: var(--surface-2); color: transparent; }
.cast-listen,
.cast-open,
.cast-soon-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 800 13px var(--ff);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.cast-listen:hover,
.cast-open:hover,
.cast-soon-close:hover { opacity: .88; }
.cast-show-hero {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 22px;
  align-items: end;
  margin: 8px 0 18px;
}
.cast-show-art {
  width: 168px;
  height: 168px;
  border-radius: 22px;
}
.cast-show-meta h1 {
  margin: 4px 0 8px;
  font-family: var(--serif);
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.05;
  letter-spacing: -.03em;
}
.cast-show-host { margin: 0 0 10px; color: var(--stone-500); font-size: 14px; }
.cast-show-blurb { margin: 0 0 18px; font-size: 16px; line-height: 1.5; color: var(--stone-700); }
.cast-back { margin: 8px 0 0; }
.cast-soon {
  position: fixed;
  inset: 0;
  z-index: 2800;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
  background: rgba(20, 15, 12, .42);
}
.cast-soon[hidden] { display: none !important; }
.cast-soon-card {
  width: min(440px, 100%);
  padding: 22px 20px 18px;
  border-radius: 22px 22px 18px 18px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(20, 15, 12, .22);
}
.cast-soon-card h2 {
  margin: 4px 0 8px;
  font-family: var(--serif);
  font-size: 28px;
}
.cast-soon-card p { margin: 0 0 16px; color: var(--stone-700); }
.cast-soon-close { width: 100%; min-height: 44px; }
@media (max-width: 720px) {
  .cast-show-hero { grid-template-columns: 1fr; }
  .cast-show-art { width: 160px; height: 160px; }
}
.cast-ep-list { display: grid; gap: 8px; margin: 28px 0 0; }
.cast-ep-btn {
  display: grid;
  grid-template-columns: 72px 1fr 18px;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}
.cast-ep-btn.is-active { outline: 2px solid var(--ink); }
.cast-ep-code {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--stone-500);
}
.cast-ep-meta strong { display: block; font-size: 15px; line-height: 1.3; }
.cast-ep-meta em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 12px;
  color: var(--stone-500);
}

.audio-shell { padding-bottom: 48px; }
.ytm-album { max-width: 880px; }
.ytm-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: end;
  margin: 8px 0 28px;
}
.ytm-cover {
  aspect-ratio: 1;
  width: 100%;
  border-radius: 8px;
  background: var(--surface-2) center / cover no-repeat;
  box-shadow: 0 18px 40px rgba(20, 15, 12, .22);
}
.ytm-hero-meta h1 {
  margin: 4px 0 8px;
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -.03em;
}
.ytm-sub { margin: 0 0 18px; color: var(--stone-700); font-size: 15px; }
.ytm-try { display: flex; align-items: center; gap: 12px; }
.ytm-try > span {
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--stone-500);
}
.ytm-stack { display: flex; }
.ytm-stack span {
  width: 36px; height: 36px; border-radius: 6px; margin-left: -10px;
  background: var(--surface-2) center / cover no-repeat;
  border: 2px solid var(--bg);
  box-shadow: 0 4px 10px rgba(20,15,12,.16);
}
.ytm-stack span:first-child { margin-left: 0; }
.ytm-tracks { display: flex; flex-direction: column; }
.ytm-row {
  display: grid;
  grid-template-columns: 44px 1fr 18px;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 10px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ytm-row:hover, .ytm-row.is-active { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
.ytm-row-art {
  width: 44px; height: 44px; border-radius: 6px;
  background: var(--surface-2) center / cover no-repeat;
}
.ytm-row-meta strong { display: block; font-size: 15px; font-weight: 700; }
.ytm-row-meta em { display: block; margin-top: 2px; font-style: normal; font-size: 12.5px; color: var(--stone-500); }
.ytm-row.is-active strong { color: var(--bronze-dark); }
.ytm-row-go { color: var(--stone-500); font-size: 22px; line-height: 1; }
.ytm-more { margin: 22px 0 0; }

body.audio-player-open {
  overflow: hidden;
  position: fixed;
  inset: 0;
  width: 100%;
}
.ytm-now {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(12,10,8,.18) 10%, rgba(12,10,8,.88) 72%),
    var(--audio-artwork) center / cover no-repeat,
    #1a1613;
  padding: calc(18px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
}
.ytm-now[hidden] { display: none !important; }
.ytm-now-shade { flex: 1; }
.ytm-now-col { max-width: 560px; width: 100%; margin: 0 auto; }
.ytm-now h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.12;
}
.ytm-now p { margin: 0 0 22px; opacity: .78; font-size: 15px; }
.ytm-close {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  left: 12px;
  width: 44px; height: 44px;
  border: 0; background: transparent; color: #fff;
  cursor: pointer;
}
.ytm-close svg { width: 28px; height: 28px; }
.ytm-seek {
  position: relative;
  height: 18px;
  touch-action: none;
  cursor: pointer;
}
.ytm-seek::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 8px; height: 3px;
  border-radius: 99px; background: rgba(255,255,255,.28);
}
.ytm-seek i {
  position: absolute; left: 0; top: 8px; height: 3px; width: 0;
  border-radius: 99px; background: #fff;
}
.ytm-seek b {
  position: absolute; top: 4px; left: 0; width: 11px; height: 11px;
  margin-left: -5px; border-radius: 50%; background: #fff;
  opacity: 0; pointer-events: none;
}
.ytm-seek:active b, .ytm-now.is-playing .ytm-seek:hover b { opacity: 1; }
.ytm-times {
  display: flex; justify-content: space-between;
  margin: 6px 0 18px; font-size: 12px; opacity: .7;
}
.ytm-ctrls {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.ytm-ctrls button {
  border: 0; background: transparent; color: #fff; cursor: pointer;
  min-width: 44px; min-height: 44px; font: 700 13px var(--ff);
}
.ytm-ctrls svg { width: 26px; height: 26px; display: block; margin: 0 auto; }
.ytm-play {
  width: 72px; height: 72px; border-radius: 50% !important;
  background: #fff !important; color: #1a1613 !important;
}
.ytm-play svg { width: 30px; height: 30px; }
.ytm-play .i-pause { display: none; }
.ytm-now.is-playing .ytm-play .i-play { display: none; }
.ytm-now.is-playing .ytm-play .i-pause { display: block; }
@media (max-width: 720px) {
  .ytm-hero { grid-template-columns: 1fr; gap: 18px; }
  .ytm-cover { max-width: 280px; }
}
.text-link { color: var(--bronze-dark); font-weight: 700; font-size: 13.5px; }
.text-link:hover { text-decoration: underline; }

.radio-card {
  margin: 8px 0 22px; padding: 22px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-card);
}
.radio-card h2 { margin: 8px 0 16px; font-size: 22px; }
.radio-live {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--bronze-dark);
}
.radio-live i {
  width: 8px; height: 8px; border-radius: 50%; background: #c4554a;
  box-shadow: 0 0 0 0 rgba(196, 85, 74, .55); animation: radio-pulse 1.8s ease-out infinite;
}
@keyframes radio-pulse {
  70% { box-shadow: 0 0 0 8px rgba(196, 85, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(196, 85, 74, 0); }
}
.cast-tile-art--live {
  display: grid; place-items: center; color: var(--bronze-dark); background: var(--surface-2);
}
.cast-tile-art--live svg { width: 46px; height: 46px; }
.cast-row-art.cast-tile-art--live svg { width: 30px; height: 30px; }
.radio-note { margin: 14px 0 0; color: var(--stone-500); font-size: 12.5px; }
.radio-schedule-block { padding: 18px; border-radius: 16px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.radio-schedule-block h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.radio-schedule { margin: 0; white-space: pre-wrap; font-family: var(--ff); font-size: 13px; color: var(--stone-700); line-height: 1.55; }

/* Chat — оболочка привязана к visualViewport (iOS keyboard) */
html.chat-lock {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body.chat-page {
  margin: 0;
  padding: 0 !important;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--ground);
}
body.chat-page .app-tabbar { display: none !important; }
body.chat-page .portal-footer { display: none !important; }
.chat-app {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  /* top/height выставляет js/chat.js по visualViewport */
  will-change: transform, height, top;
}
body.chat-page .masthead {
  flex: none;
  position: relative;
  z-index: 2;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body.chat-page .masthead .wrap {
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px;
  padding-top: 10px; padding-bottom: 10px;
}
body.chat-page .masthead .top,
body.chat-page .masthead .search,
body.chat-page .masthead .cal-btn,
body.chat-page .masthead .app-btn,
body.chat-page .masthead .masthead-tools { display: none !important; }
body.chat-page .masthead .logo { justify-self: center; grid-column: 2; }
body.chat-page .chat-back {
  grid-column: 1; justify-self: start; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 20px; line-height: 1;
}
body.chat-page .chat-back:hover { background: var(--accent-soft); color: var(--bronze-dark); }
.chat-shell {
  flex: 1; display: flex; flex-direction: column; max-width: 780px; width: 100%;
  margin: 0 auto; padding: 8px 14px 10px; min-height: 0; overflow: hidden;
  box-sizing: border-box;
}
.chat-intro { flex: none; padding: 2px 4px 10px; }
.chat-intro h1 { margin: 4px 0 6px; font-family: var(--serif); font-size: clamp(24px, 4vw, 36px); }
.chat-intro-text { margin: 0; color: var(--stone-700); font-size: 13.5px; line-height: 1.45; max-width: 52ch; }
.chat-panel {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-card); overflow: hidden;
}
.chat-messages {
  flex: 1; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; min-height: 0;
}
.chat-bubble {
  max-width: min(88%, 560px); padding: 12px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap;
}
.chat-bubble.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.chat-bubble.assistant { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 6px; }
.chat-sources { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.chat-sources a {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--bronze-dark);
  padding: 8px 10px; border-radius: 10px; background: var(--accent-soft);
}
.chat-composer {
  flex: none; display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px;
  border-top: 1px solid var(--line); background: var(--surface);
}
.chat-composer textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 120px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: var(--ground); color: var(--ink);
  font-family: var(--ff);
  /* ≥16px — iOS не зумит страницу при фокусе */
  font-size: 16px; line-height: 1.35; padding: 11px 14px; outline: none;
  touch-action: manipulation;
}
.chat-composer textarea:focus { border-color: var(--bronze); }
.chat-send {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--accent); color: #fff;
  cursor: pointer; flex: none; touch-action: manipulation;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; line-height: 0;
}
.chat-send svg { width: 20px; height: 20px; display: block; }
.chat-send:disabled { opacity: .45; cursor: default; }
.chat-hint { flex: none; margin: 0; padding: 0 14px 10px; font-size: 11px; color: var(--stone-500); }

@media (max-width: 880px) {
  body.chat-page.chat-keyboard .chat-intro { display: none; }
  body.chat-page.chat-keyboard .chat-hint { display: none; }
  body.chat-page.chat-keyboard .chat-shell { padding: 6px 10px 8px; }
  body.chat-page.chat-keyboard .masthead .wrap { padding-top: 6px; padding-bottom: 6px; }
  .chat-shell { padding: 4px 10px 8px; }
  .chat-panel { border-radius: 16px; }
}

/* Footer (portal) */
.site-footer {
  background: var(--surface-2); border-top: 1px solid var(--line); margin-top: 12px;
  padding: 28px 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--stone-700); font-size: 12.5px; max-width: none;
}
.portal-footer {
  background: var(--surface-2); border-top: 1px solid var(--line); margin-top: 12px;
  padding: 0; color: var(--stone-700); font-size: 12.5px;
}
.portal-footer .wrap {
  padding: 28px max(var(--gutter), env(safe-area-inset-right)) 28px max(var(--gutter), env(safe-area-inset-left));
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
.portal-footer .footer-tagline {
  margin: 0; padding-left: 41px; font-size: 12.5px; color: var(--stone-500);
}
.portal-footer .footer-links {
  display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 10px; padding-left: 41px;
}
.portal-footer .footer-links a {
  font-size: 13px; font-weight: 700; color: var(--stone-700);
}
.portal-footer .footer-links a:hover { color: var(--bronze-dark); }
.footer-theme-wrap { display: flex; justify-content: center; width: 100%; }
.portal-footer .wrap.footer-theme-wrap {
  flex-direction: row;
  align-items: center;
  justify-content: center;
}
.footer-theme-wrap .footer-theme,
.portal-footer .footer-theme-wrap .footer-theme {
  margin: 4px auto 0;
  padding-left: 0;
}
.footer-theme { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-left: 41px; }
.site-footer .footer-theme { margin: 0 0 0 auto; padding-left: 0; }
.footer-theme-label { font-size: 13px; font-weight: 700; color: var(--stone-700); }
.footer-theme .theme-toggle {
  width: auto; height: 32px; padding: 0 2px; border-radius: 999px; background: transparent;
}
@media (max-width: 880px) {
  .footer-theme { padding-left: 0; }
  .site-footer .footer-theme { width: 100%; margin-left: 0; justify-content: flex-start; }
}
body.chat-page .masthead .footer-theme {
  grid-column: 3; justify-self: end; margin: 0; padding: 0;
}
body.chat-page .masthead .theme-toggle {
  width: auto; height: auto; padding: 0; border: 0; background: transparent;
}
.site-footer .footer-brand, .portal-footer .logo { display: inline-flex; align-items: center; gap: 11px; }
.site-footer .brand-logo { width: 34px; height: 34px; border-radius: 9px; }
.site-footer .footer-brand > div { display: flex; flex-direction: column; gap: 2px; }
.site-footer strong { color: var(--ink); display: block; font-family: var(--serif); font-size: 18px; font-weight: 600; }
.site-footer .footer-brand p { margin: 0; font-size: 12.5px; color: var(--stone-500); }
.site-footer .footer-copy { margin: 0; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-links a { color: var(--stone-700); font-weight: 600; }
.footer-links a:hover { color: var(--bronze-dark); }

/* Оформление рядом с календарём: только переключатель */
.header-tools,
.masthead-tools {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
}
.theme-toggle {
  width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border-radius: 14px;
  border: 1px solid var(--line-strong); background: var(--ground); color: var(--ink);
  font: 700 11.5px/1 var(--ff); cursor: pointer; white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.theme-toggle:hover { border-color: var(--bronze); background: var(--surface-2); }
.theme-toggle-track {
  position: relative; width: 44px; height: 24px; border-radius: 999px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px; background: var(--surface-2); color: var(--stone-500);
  box-shadow: inset 0 0 0 1px var(--line);
}
.theme-toggle-track svg { width: 13px; height: 13px; display: block; z-index: 1; }
.theme-toggle-track i {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-card);
  transition: transform .2s ease;
}
[data-theme="twilight"] .theme-toggle-track i { transform: translateX(20px); }
:root:not([data-theme="twilight"]) .theme-sun { color: var(--bronze-dark); }
[data-theme="twilight"] .theme-moon { color: var(--bronze-dark); }
.theme-toggle-name { display: none; }

:root:not([data-theme="twilight"]) .app-tabbar {
  border-color: rgba(68, 45, 27, .12);
  box-shadow: 0 10px 34px rgba(68, 45, 27, .14), inset 0 1px 0 rgba(255, 255, 255, .75);
}
:root:not([data-theme="twilight"]) .author-ava.initials {
  background: linear-gradient(145deg, #E6D7C5, #D8C4AE);
}
:root:not([data-theme="twilight"]) .map-sheet-close {
  background: rgba(28, 25, 23, .72);
}

@media (max-width: 880px) {
  .header-tools,
  .masthead-tools { gap: 6px; }
  .theme-toggle {
    width: 40px; height: 40px; justify-content: center;
    padding: 0; border-radius: 12px;
  }
  .theme-toggle-name { display: none; }
}

.build-stamp {
  margin: 12px 0 0;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--stone-500);
  opacity: .7;
}

/* Legacy brandbar hide if leftover */
.site-brandbar { display: none !important; }

/* Desktop: show tabbar only mobile — already in portal.css */

/* Cover helper used by Vera.coverStyle */
.card-image, .story-image, .feed-thumb, .story-thumb, .hero-photo {
  background-image: var(--img);
  background-size: cover;
  background-position: center;
}

/* Chat rows (actual DOM from chat.js) */
.chat-row { display: flex; width: 100%; }
.chat-row-user { justify-content: flex-end; }
.chat-row-assistant { justify-content: flex-start; }
.chat-row-error .chat-bubble { border: 1px solid var(--rose); }
.chat-bubble {
  max-width: min(88%, 560px); padding: 12px 14px; border-radius: 16px;
  font-size: 14.5px; line-height: 1.55; background: var(--surface-2); color: var(--ink);
}
.chat-row-user .chat-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.chat-row-assistant .chat-bubble { border-bottom-left-radius: 6px; }
.chat-bubble-text { white-space: pre-wrap; }
.chat-sources { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.chat-sources-label { margin: 0 0 4px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bronze-dark); opacity: .9; }
.chat-source {
  display: block; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); text-decoration: none;
}
.chat-source-title { display: block; font-size: 12.5px; font-weight: 700; color: var(--bronze-dark); }
.chat-source-excerpt { display: block; font-size: 11.5px; color: var(--stone-700); margin-top: 3px; }
.chat-nav { margin-top: 12px; }
.chat-nav-label {
  margin: 0 0 8px; font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--bronze-dark); opacity: .9;
}
.chat-nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-nav-link {
  display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--bronze-dark); font-size: 12.5px; font-weight: 700;
  text-decoration: none; border: 1px solid transparent;
  transition: border-color .15s, transform .15s;
}
.chat-nav-link:hover { border-color: var(--bronze); transform: translateY(-1px); }
/* ---------- Guide walkers (О Церкви / Духовная жизнь) ---------- */
.route-grid {
  display: grid;
  gap: 18px 20px;
  margin: 10px 0 32px;
}
.route-grid--hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.route-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.route-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.route-card {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 220px; padding: 22px 20px 18px; border-radius: 6px;
  text-decoration: none; color: #fff; position: relative; overflow: hidden;
  transition: filter .2s ease;
}
.route-grid--3 .route-card { min-height: 200px; }
.route-grid--2 .route-card { min-height: 210px; }
.route-card:hover { transform: none; box-shadow: none; filter: none; }
.route-card.wide { grid-column: 1 / -1; min-height: 150px; }
.route-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  opacity: .8; margin-bottom: 10px;
}
.route-card strong {
  font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.12; letter-spacing: -.02em;
}
.route-grid--3 .route-card strong { font-size: clamp(18px, 1.6vw, 24px); }
.route-sub {
  display: block; margin-top: 10px; font-size: 14px; font-weight: 500;
  letter-spacing: 0; opacity: .88; line-height: 1.4; max-width: 36ch;
}
.route-card.tone-a { --card-tone: linear-gradient(145deg, #3d4f6b, #6b86b0); background: var(--card-tone); }
.route-card.tone-b { --card-tone: linear-gradient(145deg, #5a3d2b, #a67c52); background: var(--card-tone); }
.route-card.tone-c { --card-tone: linear-gradient(145deg, #3f5240, #7a8f6a); background: var(--card-tone); }
.route-card.tone-d { --card-tone: linear-gradient(145deg, #5c3a45, #b06a7a); background: var(--card-tone); }
.route-card.tone-e { --card-tone: linear-gradient(145deg, #2f4558, #5d7a8c); background: var(--card-tone); }
.route-card.tone-f { --card-tone: linear-gradient(145deg, #4a3b28, #c9a227); background: var(--card-tone); }
.route-card.tone-wide { --card-tone: linear-gradient(145deg, #4a3b28, #c9a227); background: var(--card-tone); }
.route-card.tone-accent { --card-tone: linear-gradient(145deg, #6b3a1e, #c9713f); background: var(--card-tone); }
.route-card.has-image {
  background-image:
    linear-gradient(180deg, rgba(18,14,12,.18) 0%, rgba(18,14,12,.22) 42%, rgba(18,14,12,.72) 100%),
    var(--card-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(.82) contrast(.88) brightness(.96);
}
.route-card.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(36, 28, 22, .14);
  mix-blend-mode: multiply;
}
.route-card.has-image > * { position: relative; z-index: 1; }
/* ---------- Articles hub ---------- */
.articles-toolbar { margin: 0 0 26px; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 16px; border-radius: 12px;
  font: 700 13px/1 var(--ff); text-decoration: none; box-sizing: border-box;
}
.btn-primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.articles-block { margin: 0 0 36px; padding-top: 8px; border-top: 1px solid var(--line); }
.articles-block:first-of-type { border-top: 0; padding-top: 0; }
.articles-block .block-head { margin-bottom: 12px; }
.articles-block-desc {
  margin: -4px 0 16px; font-size: 15px; color: var(--stone-700); max-width: 58ch; line-height: 1.5;
}
.articles-link-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px;
  border-top: 1px solid var(--line);
}
.articles-link-list li { border-bottom: 1px solid var(--line); }
.articles-link-list a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 0; border-radius: 0;
  background: transparent; box-shadow: none;
  text-decoration: none; color: inherit;
  transition: color .15s;
}
.articles-link-list a:hover { transform: none; box-shadow: none; }
.articles-link-list a:hover strong { color: var(--bronze-dark); }
.articles-link-list strong {
  font-family: var(--serif); font-size: clamp(17px, 1.4vw, 20px); font-weight: 600; line-height: 1.25;
}
.articles-link-list span { font-size: 12.5px; color: var(--stone-500); }
.articles-more { margin: 14px 0 0; }

.guide-hub-intro, .guide-route-tip {
  max-width: 62ch; margin: -4px 0 22px; color: var(--stone-700); line-height: 1.55; font-size: 16px;
}
.guide-route-tip {
  padding: 14px 0 14px 16px; border-radius: 0; background: transparent;
  border: 0; border-left: 3px solid var(--bronze); color: var(--ink);
}
.guide-body { max-width: 680px; font-size: 17px; line-height: 1.65; color: var(--stone-700); margin: 8px 0 28px; }
.guide-body .guide-lead { font-size: 18px; color: var(--ink); }
.guide-body h2 {
  margin: 28px 0 10px; font-family: var(--serif); font-size: 22px; letter-spacing: -.01em;
  text-transform: none; color: var(--ink); font-weight: 600;
}
.guide-body p { margin: 0 0 14px; }
.guide-body ul, .guide-body ol { margin: 0 0 16px; padding-left: 1.25em; }
.guide-body li { margin: 0 0 8px; }
.guide-body .guide-note {
  padding: 14px 0 14px 16px; border-radius: 0; background: transparent;
  border-left: 3px solid var(--bronze); color: var(--ink); font-size: 15.5px;
}
.guide-body .guide-quote {
  margin: 0 0 18px;
  padding: 2px 0 2px 16px;
  border: 0;
  border-left: 3px solid var(--bronze);
  background: transparent;
}
.guide-body .guide-quote p {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
}
.guide-body .guide-quote cite {
  display: block;
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  color: var(--stone-500);
}
.guide-body .guide-rich img,
.guide-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 12px 0 18px;
}
.guide-body .guide-rich figure { margin: 12px 0 18px; }
.guide-body .guide-rich blockquote { margin: 0 0 18px; }
.guide-also { margin: 0 0 28px; max-width: 680px; }
.guide-also h3 { margin: 0 0 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--bronze-dark); }
.guide-also ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.guide-also li { border-bottom: 1px solid var(--line); }
.guide-also a {
  display: block; padding: 12px 0; font-weight: 600; font-family: var(--serif); font-size: 17px;
}
.guide-also a:hover { color: var(--bronze-dark); }
.guide-stepnav {
  display: grid; gap: 14px; margin: 12px 0 32px; padding: 18px 0 0;
  border-radius: 0; background: transparent; border: 0;
  border-top: 1px solid var(--line); box-shadow: none;
}
.guide-stepnav-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--stone-500);
}
.guide-stepnav-meta a { font-weight: 700; color: var(--bronze-dark); }
.guide-stepnav-pill {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 28px; padding: 0; border-radius: 0;
  background: transparent; border: 0;
  font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink);
}
.guide-stepnav-pill b {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 11px; line-height: 1;
}
.guide-stepnav-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px;
}
.guide-stepnav-actions a {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left; padding: 14px 0; border-radius: 0; text-decoration: none;
  min-height: 0; justify-content: center; border-top: 1px solid var(--line);
  background: transparent !important; border-color: var(--line) !important; color: inherit;
}
.guide-stepnav-actions a span {
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bronze-dark);
}
.guide-stepnav-actions a strong {
  font-family: var(--serif); font-size: 16px; line-height: 1.3; font-weight: 600;
}
.guide-stepnav-next { align-items: flex-end; text-align: right; }
.guide-more, .guide-feed { margin: 32px 0; padding-top: 8px; border-top: 1px solid var(--line); }
.guide-more h2, .guide-feed h2 {
  margin: 0 0 16px; font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 2.4vw, 30px);
}
.guide-steps {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 0;
  border-top: 1px solid var(--line);
}
.guide-steps li {
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; overflow: hidden;
}
.guide-steps--route { max-width: 720px; margin: 8px 0 28px; }
.guide-step-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  min-height: 72px;
  text-decoration: none;
  color: inherit;
}
a.guide-step-row:hover { background: transparent; }
a.guide-step-row:hover strong { color: var(--bronze-dark); }
.guide-step-n {
  width: 28px; height: 28px; margin: 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  font-weight: 800; font-size: 13px; line-height: 1;
  font-variant-numeric: tabular-nums;
  background: transparent; color: var(--bronze-dark);
  border: 1px solid var(--line-strong);
  flex: none;
}
.guide-step-body {
  padding: 16px 8px 16px 0;
  display: grid; gap: 4px; align-content: center; min-width: 0;
}
.guide-step-body strong {
  font-family: var(--serif); font-size: clamp(17px, 1.4vw, 20px); color: var(--ink); line-height: 1.25; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.guide-step-body em {
  font-style: normal; font-size: 13.5px; color: var(--stone-500); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.guide-steps li.is-current {
  border-color: var(--line);
  background: color-mix(in srgb, var(--accent-soft) 40%, transparent);
}
.guide-steps li.is-current .guide-step-n {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.guide-steps li.is-current .guide-step-body em { color: var(--bronze-dark); font-weight: 600; }
.nav-groups {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin-top: 12px;
}
.nav-group {
  padding: 16px 16px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.nav-group h2 {
  margin: 0 0 12px; font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.01em;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.route-grid--2 .route-card.wide { grid-column: auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.nav-list li {
  border-radius: 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); overflow: hidden;
}
.nav-list a {
  display: grid; gap: 4px; padding: 13px 0; font-weight: 600; text-decoration: none; color: var(--ink);
  font-family: var(--serif); font-size: 16.5px;
}
.nav-list a:hover { background: transparent; color: var(--bronze-dark); }
.nav-list a span { font-family: var(--ff); font-weight: 500; font-size: 12.5px; color: var(--stone-500); }
.nav-list .nav-muted { display: block; padding: 12px 0; color: var(--stone-500); }
@media (max-width: 720px) {
  .guide-stepnav-actions { grid-template-columns: 1fr; }
  .guide-stepnav-next { align-items: flex-start; text-align: left; }
}
.prayer-list { display: grid; gap: 10px; margin: 8px 0 28px; }
.prayer-item {
  border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; background: var(--surface);
}
.prayer-item summary {
  cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none;
}
.prayer-item summary::-webkit-details-marker { display: none; }
.prayer-item p, .prayer-item .prayer-text {
  margin: 0 0 14px; color: var(--stone-700); line-height: 1.65;
  white-space: pre-wrap;
}
.prayer-item .prayer-lead {
  margin: 0 0 10px;
  font-size: 14.5px;
  color: var(--stone-500);
  white-space: pre-wrap;
}

/* ---------- Authors (editorial / NYT-like on desktop) ---------- */
.authors-block {
  background: transparent;
  border-radius: 0;
  margin-top: 8px;
}
.authors-block .wrap { padding-top: 8px; padding-bottom: 8px; }
.authors-home {
  display: grid; gap: 0; margin-top: 10px;
  border-top: 1px solid var(--line);
}
.author-row {
  display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center;
  padding: 18px 0; border-radius: 0; text-decoration: none;
  background: transparent; box-shadow: none; border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: color .15s ease;
}
.author-row:hover { transform: none; box-shadow: none; }
.author-row:hover strong { color: var(--bronze-dark); }
.author-row-text { display: grid; gap: 3px; min-width: 0; }
.author-row strong {
  display: block; font-family: var(--serif); font-weight: 600;
  font-size: clamp(18px, 1.7vw, 24px); line-height: 1.2; color: var(--ink);
  letter-spacing: -.01em;
}
.author-row-role {
  font-family: var(--ff); font-style: normal; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--stone-500);
}
.author-row small { color: var(--stone-500); font-size: 12.5px; }
.author-ava {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--surface-2) center/cover no-repeat; display: grid; place-items: center;
  font-weight: 800; color: var(--bronze-dark); font-size: 16px; flex: none;
}
.author-ava:not(.initials) {
  border: 1px solid color-mix(in srgb, var(--line-strong) 70%, transparent);
  box-shadow: none;
}
.author-ava.initials {
  background: linear-gradient(145deg, #3a3430, #2a2522);
  color: var(--bronze-dark); border: 1px solid var(--line-strong);
}
.authors-block .loadmore {
  width: auto; margin: 18px 0 0; padding: 0 0 4px; min-height: 0;
  background: transparent; border: 0; border-radius: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--bronze-dark) 55%, transparent);
  font-size: 13px; font-weight: 700; color: var(--bronze-dark);
  display: inline-block; text-align: left;
}
.authors-block .loadmore:hover {
  color: var(--ink); border-bottom-color: var(--ink); background: transparent;
}
.authors-toolbar { display: grid; gap: 12px; margin: 0 0 18px; }
.authors-toolbar input[type="search"] {
  width: 100%; box-sizing: border-box; padding: 12px 0; border-radius: 0;
  border: 0; border-bottom: 1px solid var(--line-strong); background: transparent; color: var(--ink); font: inherit;
}
.authors-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px;
  border-top: 1px solid var(--line);
}
.author-card {
  display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center;
  justify-items: start; padding: 22px 0;
  border-radius: 0; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; box-shadow: none; color: var(--ink);
  text-decoration: none; transition: color .15s ease;
}
.author-card:hover { transform: none; box-shadow: none; }
.author-card:hover strong { color: var(--bronze-dark); }
.author-card-body { display: grid; gap: 4px; min-width: 0; }
.author-card strong {
  font-family: var(--serif); font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 600; line-height: 1.2; color: var(--ink);
}
.author-role { font-size: 11px; color: var(--stone-500); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.author-count { font-size: 12.5px; color: var(--stone-500); }

@media (min-width: 900px) {
  .authors-home {
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
  }
  .authors-home .author-row:nth-child(odd) { padding-right: 8px; }
  .authors-home .author-row:nth-child(even) { padding-left: 8px; }
}
.author-page { --author-ink: var(--ink); --author-wash: var(--paper, #f6f2ea); }
.author-hero { padding: 8px 0 10px; margin-bottom: 8px; }
.author-hero-card {
  display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 28px; align-items: start;
  padding: 28px 0 10px;
  background: transparent;
  border: 0;
}
.author-hero .author-ava,
.author-head .author-ava {
  width: 168px; height: 168px; font-size: 42px;
  box-shadow: none;
  border: 1px solid var(--line-strong);
}
.author-hero h1 {
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(34px, 4.4vw, 52px); letter-spacing: -.03em; line-height: 1.05;
  color: var(--ink);
}
.author-head {
  display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 22px; align-items: start;
  padding: 18px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 22px;
}
.author-bio { margin: 10px 0 14px; color: var(--stone-700); line-height: 1.6; max-width: 560px; }
.author-bio p { margin: 0 0 .7em; }
.author-bio p:last-child { margin-bottom: 0; }
.author-bio a { color: #2a5bd7; text-decoration: underline; }
.author-socials { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.author-social {
  display: inline-block; padding: 6px 10px; border-radius: 999px; background: var(--accent-soft);
  font-size: 12px; font-weight: 700; color: var(--bronze-dark); text-decoration: none;
}
.author-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.author-stats span { font-size: 13px; color: var(--stone-500); }
.author-stats b { color: var(--ink); font-size: 18px; margin-right: 4px; }
.author-stats a { color: inherit; text-decoration: none; }
.author-stats a:hover b { color: var(--bronze-dark); }
.author-stats .is-zero { opacity: .55; }
.author-biblio { display: grid; gap: 0; }
.author-biblio-item {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 18px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.author-biblio-item:hover strong { color: var(--bronze-dark); }
.author-biblio-item time {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--stone-500); padding-top: 4px;
}
.author-biblio-item strong {
  font-family: var(--serif); font-size: clamp(18px, 1.5vw, 22px); font-weight: 600; line-height: 1.25;
}
.author-biblio-item span {
  display: block; margin-top: 6px; font-size: 13.5px; color: var(--stone-700); line-height: 1.45;
}
.author-pubs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px;
}
.author-pub {
  display: grid; grid-template-rows: auto 1fr; gap: 0; padding: 0; border: 0;
  border-radius: 0; overflow: visible; text-decoration: none; color: inherit;
  background: transparent; box-shadow: none;
  transition: color .15s ease;
}
.author-pub:hover { transform: none; box-shadow: none; }
.author-pub:hover strong { color: var(--bronze-dark); }
.author-pub-cover {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  max-height: 260px;
  border-radius: 4px;
  background-color: var(--surface-2);
  background-size: cover;
  background-position: center 22%;
  background-repeat: no-repeat;
}
.author-pub-body { display: grid; gap: 6px; padding: 12px 0 0; }
.author-pub time { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--stone-500); }
.author-pub strong {
  font-family: var(--serif); font-size: clamp(17px, 1.35vw, 20px); font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.author-pub-body > span {
  font-size: 13.5px; color: var(--stone-700); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 720px) {
  .author-pubs { grid-template-columns: 1fr; gap: 20px; }
  .author-pub-cover { max-height: none; aspect-ratio: 16 / 10; }
}

/* ---------- Cycles ---------- */
.author-cycles { margin: 8px 0 28px; }
.author-cycles h2, .cycle-list h2 {
  margin: 0 0 14px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800;
}
.cycle-cards { display: grid; gap: 12px; }
.cycle-card {
  display: grid; gap: 8px; padding: 18px 16px; border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow-card); border: 1px solid var(--line);
  text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s;
}
.cycle-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.cycle-card-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--bronze-dark);
}
.cycle-card strong { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.15; }
.cycle-card-meta { font-size: 12.5px; color: var(--stone-500); font-weight: 600; }
.cycle-card-intro {
  font-size: 13.5px; color: var(--stone-700); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cycle-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 22px; }
.cycle-items { display: grid; gap: 8px; }
.cycle-item {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start;
  padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.cycle-item:hover { border-color: var(--bronze); }
.cycle-num {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--bronze-dark); font-weight: 800; font-size: 13px;
}
.cycle-item-body strong { font-size: 15px; line-height: 1.35; }
.article-cycle { margin: 0 0 10px; }
.article-cycle a {
  display: inline-flex; font-size: 12px; font-weight: 800; letter-spacing: .04em;
  color: var(--bronze-dark); background: var(--accent-soft); padding: 6px 10px; border-radius: 999px;
}
.article-cycle a:hover { color: var(--ink); }
.article-cycle-more {
  margin: 36px 0 8px; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
}
.article-cycle-more h2 {
  font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 0 0 8px;
}
.article-cycle-more-lead { margin: 0 0 14px; font-size: 14px; }
.article-cycle-more-lead a { color: var(--bronze-dark); font-weight: 700; }
.article-cycle-more ol { margin: 0; padding: 0 0 0 20px; display: grid; gap: 8px; }
.article-cycle-more li { line-height: 1.4; }
.article-cycle-more a { color: inherit; }
.article-cycle-more a:hover { color: var(--bronze-dark); }
.cycle-page { padding-bottom: 28px; }
.cycle-head { max-width: 42rem; padding: 18px 0 10px; }
.cycle-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(38px, 4.6vw, 54px);
  letter-spacing: -.025em;
  line-height: 1.05;
}
.cycle-byline { margin: 12px 0 0; font-size: 15px; font-weight: 700; }
.cycle-byline a { color: var(--bronze-dark); }
.cycle-intro {
  margin: 18px 0 8px;
  max-width: none;
  color: var(--stone-700);
  font-size: 16px;
  line-height: 1.65;
  column-count: 2;
  column-gap: 40px;
}
.cycle-intro p { margin: 0 0 12px; }
.cycle-hero { margin-top: 28px; }
@media (max-width: 880px) {
  .cycle-intro { column-count: 1; font-size: 15px; }
}

@media (max-width: 980px) {
  .authors-grid { grid-template-columns: repeat(2, 1fr); }
  .nav.top { gap: 10px; flex-wrap: wrap; }
  .route-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art .ph { height: clamp(160px, 28vw, 200px); }
  .fresh-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fresh-row .art--tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  /* 2 колонки убирают «дыру», когда карточек 4–5; wide остаётся на всю ширину */
  .route-grid,
  .route-grid--hub,
  .route-grid--2,
  .route-grid--3 { grid-template-columns: 1fr; gap: 12px; }
  .route-card,
  .route-grid--3 .route-card,
  .route-grid--2 .route-card { min-height: 168px; padding: 18px 16px 16px; border-radius: 16px; }
  .route-card.wide { grid-column: auto; min-height: 140px; }
  .route-card strong,
  .route-grid--3 .route-card strong { font-size: clamp(20px, 5vw, 26px); }
  .articles-link-list { grid-template-columns: 1fr; gap: 0; }
  .nav-groups { grid-template-columns: 1fr; gap: 22px; }
  .route-kicker { font-size: 8px; margin-bottom: 6px; }
  .authors-grid { grid-template-columns: 1fr 1fr; }
  .author-head { grid-template-columns: 72px 1fr; gap: 14px; }
  .author-head .author-ava { width: 72px; height: 72px; font-size: 20px; }
  .author-hero-card { grid-template-columns: 1fr; gap: 16px; padding: 12px 0 4px; border-radius: 0; }
  .author-hero .author-ava { width: 96px; height: 96px; font-size: 28px; }
  .author-biblio-item { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 520px) {
  .authors-grid { grid-template-columns: 1fr; }
}

.chat-welcome { padding: 8px 4px 16px; }
.chat-welcome-title { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--stone-500); }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-suggestions button {
  font-family: var(--ff); font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 100px;
  padding: 8px 14px; cursor: pointer;
}
.chat-suggestions button:hover { border-color: var(--bronze); color: var(--bronze-dark); }

/* ---------- Home duo / trio: Афиша + Библиотека + Фото ---------- */
.home-duo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch;
}
.home-duo.home-trio {
  grid-template-columns: 1fr 1fr 1fr;
}
.home-panel {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px 18px 16px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card);
  min-height: 100%;
}
.home-panel--events {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(172, 86, 51, .16), transparent 55%),
    var(--surface);
}
.home-panel--library {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(90, 120, 90, .14), transparent 55%),
    var(--surface);
}
.home-panel--photo {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(74, 127, 201, .14), transparent 55%),
    var(--surface);
  overflow: hidden;
}
.home-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  /* не растягиваем по высоте трио — иначе квадраты «уезжают» и появляется скролл */
  flex: 0 0 auto;
  align-content: start;
  align-items: stretch;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}
.home-photo-tile {
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: none;
  border-radius: 12px;
  background-color: var(--surface-2);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  text-decoration: none;
  overflow: hidden;
}
.home-panel-head { display: grid; gap: 6px; }
.home-panel-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--bronze-dark);
}
.home-panel-head h2 {
  margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.05;
}
.home-panel-head h2 a { color: inherit; text-decoration: none; }
.home-panel-head h2 a:hover { color: var(--bronze-dark); }
.home-panel-head p { margin: 0; font-size: 13.5px; color: var(--stone-700); line-height: 1.4; }
.home-panel-list { display: grid; gap: 8px; flex: 1; }
.home-event {
  display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: start;
  padding: 10px 10px; border-radius: 14px; text-decoration: none; color: inherit;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  border: 1px solid transparent; transition: border-color .15s, background .15s;
}
.home-event:hover { border-color: var(--line-strong); background: var(--surface-2); }
.home-event-date {
  display: grid; place-items: center; align-content: center; gap: 1px;
  min-height: 52px; border-radius: 12px;
  background: color-mix(in srgb, var(--bronze-dark) 18%, var(--surface));
  color: var(--bronze-dark); font-size: 11px; font-weight: 800; text-align: center; line-height: 1.1;
  padding: 6px 4px; text-transform: uppercase; letter-spacing: .04em;
}
.home-event-date b { font-weight: 800; font-size: 18px; letter-spacing: 0; text-transform: none; }
.home-event-date span { font-size: 10px; opacity: .9; }
.home-event.is-today {
  border-color: color-mix(in srgb, var(--bronze-dark) 35%, transparent);
  background: color-mix(in srgb, var(--bronze-dark) 8%, var(--surface));
}
.home-event-chip {
  display: inline-flex; align-self: start;
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--bronze-dark); margin-bottom: 2px;
}
.home-event-body { display: grid; gap: 3px; min-width: 0; }
.home-event-body strong {
  font-size: 14px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.home-event-body small {
  font-size: 12px; color: var(--stone-500);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home-panel-shelf {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1;
}
.home-lib-card {
  display: grid; gap: 8px; text-decoration: none; color: inherit; min-width: 0;
}
.home-lib-cover {
  display: grid; align-content: end; aspect-ratio: 3 / 4; border-radius: 12px; padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.home-lib-cover em {
  font-style: normal; font-family: var(--serif); font-size: 13px; font-weight: 600;
  color: #f4efe6; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.home-lib-meta { display: grid; gap: 2px; min-width: 0; }
.home-lib-meta strong {
  font-size: 12.5px; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.home-lib-meta small { font-size: 11px; color: var(--stone-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-panel-more {
  display: inline-flex; align-self: flex-start; margin-top: auto;
  font-size: 13px; font-weight: 700; color: var(--bronze-dark); text-decoration: none;
}
.home-panel-more:hover { text-decoration: underline; }
.home-panel-empty { margin: 0; font-size: 13px; color: var(--stone-500); }
@media (max-width: 880px) {
  .home-duo,
  .home-duo.home-trio { grid-template-columns: 1fr; gap: 14px; }
  .home-panel-head h2 { font-size: 24px; }
}

/* ---------- Library ---------- */
.lib-home-cta {
  display: grid; gap: 8px; padding: 20px 18px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow-card); text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.lib-home-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.lib-home-cta-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--bronze-dark);
}
.lib-home-cta strong {
  font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1;
}
.lib-home-cta span:last-child { font-size: 13.5px; color: var(--stone-700); line-height: 1.45; }
.lib-hub-sections {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin: 0 0 22px;
}
.lib-hub-tile {
  display: grid; gap: 8px; padding: 20px 18px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow-card); text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.lib-hub-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.lib-hub-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--bronze-dark);
}
.lib-hub-tile strong { font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.lib-hub-tile span { font-size: 13px; color: var(--stone-700); line-height: 1.45; }
.lib-toolbar {
  display: grid; gap: 12px; margin: 0 0 16px; padding: 14px; border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow-card);
}
.lib-toolbar.tight {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; padding: 0; background: transparent; box-shadow: none; margin-bottom: 12px;
}
.lib-toolbar input[type="search"] {
  width: 100%; font: inherit; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--ground); color: var(--ink);
}
.lib-scope { display: flex; flex-wrap: wrap; gap: 14px 18px; font-size: 13px; color: var(--stone-700); }
.lib-scope label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.lib-count { margin: 0 0 14px; font-size: 13px; color: var(--stone-500); font-weight: 600; }
.lib-toolbar.tight .lib-count { margin: 0; }
.lib-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.lib-card {
  display: grid; grid-template-rows: auto 1fr auto; border-radius: 16px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-card); text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.lib-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.lib-card-hit { display: grid; text-decoration: none; color: inherit; min-width: 0; }
.lib-card > .lib-card-author { padding: 0 14px 14px; }
.lib-cover {
  position: relative; aspect-ratio: 3 / 4; display: grid; place-items: center;
  color: #fff;
}
.lib-cover-mark {
  display: none;
}
.lib-cover-badges {
  position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 6px;
}
.lib-card-body { padding: 14px 14px 16px; display: grid; gap: 6px; align-content: start; }
.lib-card-cat {
  margin: 0; font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--bronze-dark);
}
.lib-card-title {
  margin: 0; font-size: 16px; line-height: 1.25; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.lib-card-sub {
  margin: 0; font-size: 12.5px; color: var(--stone-700); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lib-card-author { margin: 2px 0 0; font-size: 12.5px; color: var(--stone-500); }
.lib-badge {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(6px);
}
.lib-badge-18 { background: #8b1e2d; color: #fff; }
.lib-badge-warn { background: #6b4a1b; color: #fff; }
.lib-flag-row .lib-badge { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.lib-flag-row .lib-badge-18 { background: #8b1e2d; color: #fff; border-color: transparent; }
.lib-flag-row .lib-badge-warn { background: #6b4a1b; color: #fff; border-color: transparent; }
.lib-cats {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px;
}
.lib-cats a {
  padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 12.5px; font-weight: 700; color: var(--stone-700);
  text-decoration: none;
}
.lib-cats a.on, .lib-cats a:hover { color: var(--ink); border-color: var(--bronze); }
.lib-filters {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 18px;
  padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card);
}
.lib-field { display: grid; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--stone-500); }
.lib-field.grow { grid-column: 1 / -1; }
.lib-field input, .lib-field select {
  font: inherit; font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--ground); color: var(--ink);
}
.lib-filters-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.lib-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 12px; border: 0; cursor: pointer; text-decoration: none;
  font: inherit; font-size: 13px; font-weight: 700; background: var(--ink); color: #fff;
}
.lib-btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.lib-btn:hover { opacity: .92; }
.tabs .tab-link {
  display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--stone-700); text-decoration: none;
  border: 1px solid transparent;
}
.tabs .tab-link.on, .tabs .tab-link:hover { color: var(--ink); border-color: var(--line); background: var(--surface); }
.lib-book { display: block; padding-top: 8px; }
.lib-book-top {
  display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start;
}
.lib-book-cover {
  position: relative; aspect-ratio: 3 / 4; border-radius: 18px; display: grid; place-items: center;
  color: #fff; box-shadow: var(--shadow-lift);
}
.lib-book-cover > span {
  font-family: var(--serif); font-size: 72px; font-weight: 600; opacity: .9;
}
.lib-book-main h1 {
  margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -.02em; line-height: 1.05;
}
.lib-book-alt { margin: 8px 0 0; font-size: 16px; color: var(--stone-700); }
.lib-book-author { margin: 12px 0 0; font-size: 15px; font-weight: 600; }
.lib-author-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.lib-author-link:hover { color: var(--bronze-dark); }
.lib-author-head { margin: 0 0 16px; font-size: 15px; color: var(--stone-700); }
.lib-subcats { margin-top: -6px; }
.lib-page-text { margin: 32px 0 0; max-width: 72ch; }
.lib-page-body { font-size: 16px; line-height: 1.7; color: var(--ink); }
.lib-page-body p { margin: 0 0 .9em; }
.lib-page-body p:last-child { margin-bottom: 0; }
.lib-page-body h2 {
  margin: 1.4em 0 .45em; font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -.02em;
}
.lib-page-body h3 { margin: 1.2em 0 .35em; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.lib-page-body ul, .lib-page-body ol { margin: 0 0 1em; padding-left: 1.3em; }
.lib-page-body li { margin: 0 0 .35em; }
.lib-page-body blockquote, .lib-page-body .guide-quote {
  margin: 0 0 1em; padding: 12px 16px; border-left: 3px solid var(--bronze);
  background: var(--surface-2); font-family: var(--serif); font-size: 18px;
}
.lib-page-body .guide-note {
  margin: 0 0 1em; padding: 10px 14px; border-radius: 10px;
  background: var(--surface-2); font-size: 14px; color: var(--stone-700);
}
.lib-page-body figure, .lib-page-body .rte-figure { margin: 14px 0 18px; }
.lib-page-body img { max-width: 100%; height: auto; border-radius: 12px; }
.lib-page-body figcaption, .lib-page-body .rte-caption {
  margin: 6px 0 0; font-size: 13px; color: var(--stone-500);
}
.lib-flag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lib-annotation { margin: 18px 0 0; font-size: 15px; line-height: 1.65; color: var(--stone-700); max-width: 62ch; }
.lib-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin-top: 22px;
  border-top: 1px solid var(--line);
}
.lib-meta > div {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.lib-meta span { color: var(--stone-500); font-weight: 600; }
.lib-meta strong { font-weight: 600; }
.lib-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.lib-tag {
  padding: 6px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--stone-700); text-decoration: none;
}
.lib-tag:hover { border-color: var(--bronze); color: var(--ink); }
.lib-book-top .lib-meta { margin-top: 16px; }
.lib-download-block { margin-top: 28px; }
.lib-book-top .lib-download-block { margin-top: 18px; }
.lib-download-block h2, .lib-quotes h2 {
  margin: 0 0 12px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800;
}
.lib-dl-row { display: flex; flex-wrap: wrap; gap: 10px; }
.lib-dl {
  display: grid; gap: 2px; min-width: 110px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; font: inherit;
}
.lib-dl strong { font-size: 14px; }
.lib-dl span { font-size: 11px; color: var(--stone-500); }
.lib-dl:hover { border-color: var(--bronze); }
.lib-buy { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--bronze-dark); }
.lib-quotes { margin-top: 28px; display: grid; gap: 10px; }
.lib-quote {
  margin: 0; padding: 14px 16px; border-left: 3px solid var(--bronze);
  background: var(--surface-2); font-family: var(--serif); font-size: 18px; line-height: 1.4;
}
.lib-future-note {
  margin: 28px 0 0; font-size: 12.5px; color: var(--stone-500); line-height: 1.5;
}
.lib-donate {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(20, 18, 16, .45); padding: 20px;
}
.lib-donate[hidden] { display: none !important; }
.lib-donate-card {
  position: relative; width: min(420px, 100%); padding: 24px 22px 20px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow-lift);
}
.lib-donate-card h3 { margin: 8px 0 10px; font-family: var(--serif); font-size: 28px; font-weight: 600; }
.lib-donate-card p { margin: 0; font-size: 14px; color: var(--stone-700); line-height: 1.55; }
.lib-donate-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.lib-donate-close {
  position: absolute; top: 10px; right: 12px; border: 0; background: transparent;
  font-size: 24px; line-height: 1; cursor: pointer; color: var(--stone-500);
}
@media (max-width: 980px) {
  .lib-grid { grid-template-columns: repeat(3, 1fr); }
  .lib-book-top { grid-template-columns: 200px 1fr; gap: 20px; }
}
@media (max-width: 880px) {
  .lib-hub-sections { grid-template-columns: 1fr 1fr; }
  .lib-filters { grid-template-columns: 1fr 1fr; }
  .lib-grid { grid-template-columns: repeat(2, 1fr); }
  .lib-book-top { grid-template-columns: 1fr; }
  .lib-book-cover { max-width: 220px; }
  .lib-meta { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .lib-hub-sections { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .lib-filters { grid-template-columns: 1fr; }
  .lib-hub-tile strong { font-size: 24px; }
}

/* Авторы → Афиша/Библиотека: компактно, но с небольшим отступом */
.authors-block.block { padding-bottom: 10px; margin-bottom: 0; }
.authors-block .wrap { padding-bottom: 4px; padding-top: 4px; }
.authors-block .loadmore { margin-top: 10px; margin-bottom: 0; }
.home-cta-stack.block { padding-top: 22px; padding-bottom: 32px; }
@media (max-width: 880px) {
  .authors-block.block { padding-top: 18px; padding-bottom: 8px; }
  .home-cta-stack.block { padding-top: 18px; padding-bottom: 24px; }
}

/* ---------- Calendar ---------- */
.cal-hero {
  margin: 8px 0 18px; padding: 22px 20px; border-radius: 22px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(172,86,51,.22), transparent 55%),
    linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.cal-hero-date { margin: 4px 0 0; font-size: 13px; color: var(--stone-500); font-weight: 600; }
.cal-hero-main { margin-top: 14px; }
.cal-hero h1 {
  margin: 10px 0 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(26px, 4.5vw, 38px); letter-spacing: -.02em; line-height: 1.08;
}
.cal-hero-meta { margin: 10px 0 0; font-size: 13px; color: var(--stone-700); }
.cal-hero-meta b { color: var(--ink); }
.cal-hero-fields {
  display: grid; gap: 14px; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.cal-block h3 {
  margin: 0 0 6px; font-size: 10px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--bronze-dark);
}
.cal-block-body p, .cal-block-body a {
  margin: 0; font-size: 14px; color: var(--stone-700); line-height: 1.55;
}
.cal-saint-link {
  color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--line-strong);
}
.cal-saint-link:hover { color: var(--bronze-dark); border-color: var(--bronze-dark); }
.cal-quote { font-family: var(--serif); font-size: 16px !important; font-style: italic; color: var(--ink) !important; }
.cal-rank {
  display: inline-flex; padding: 4px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: var(--surface); border: 1px solid var(--line); color: var(--stone-700);
}
.cal-rank-solemn { background: rgba(232,185,49,.16); color: var(--vatican); border-color: transparent; }
.cal-rank-feast { background: var(--accent-soft); color: var(--bronze-dark); border-color: transparent; }
.cal-rank-mem { background: var(--v1-soft); color: var(--v1); border-color: transparent; }
.cal-rank-sun { background: rgba(111,160,216,.16); color: var(--marian); border-color: transparent; }
.cal-rank-feria { background: var(--surface-2); color: var(--stone-700); }

.cal-week-wrap { margin: 0 0 18px; }
.cal-week-title {
  margin: 0 0 10px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800;
}
.cal-week {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px;
  margin: 0; overflow: visible;
}
.cal-week-day {
  min-width: 0; width: 100%; padding: 10px 2px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; font: inherit;
  display: grid; gap: 4px; justify-items: center;
}
.cal-week-day .w {
  font-size: clamp(9px, 2.4vw, 11px); font-weight: 800; letter-spacing: .04em;
  text-transform: lowercase; color: var(--stone-500);
}
.cal-week-day .n { font-size: clamp(15px, 3.8vw, 20px); font-weight: 800; line-height: 1; }
.cal-week-day .dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.cal-week-day .dot.hot { background: var(--accent); }
.cal-week-day .dot.event { background: var(--v1); }
.cal-week-day.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.cal-week-day.is-today .n { color: var(--bronze-dark); }

.cal-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.cal-filters button {
  padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--stone-700); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.cal-filters button.on, .cal-filters button:hover { color: var(--ink); border-color: var(--bronze); }

.cal-feed h2, .cal-upcoming h2 {
  margin: 0 0 12px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800;
}
.cal-cards { display: grid; gap: 10px; margin-bottom: 28px; }
.cal-card {
  display: grid; gap: 8px; padding: 16px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card);
  text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s;
}
.cal-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.cal-card-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cal-chip {
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--bronze-dark);
}
.cal-chip.ghost { background: var(--surface-2); color: var(--stone-500); }
.cal-time { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--v1); }
.cal-card strong { font-size: 17px; line-height: 1.25; }
.cal-place { font-size: 12.5px; color: var(--stone-500); font-weight: 600; }
.cal-card p { margin: 0; font-size: 13.5px; color: var(--stone-700); line-height: 1.5; }

.cal-agenda { display: grid; gap: 8px; }
.cal-agenda-row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center;
  width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: inherit; font: inherit; cursor: pointer;
}
.cal-agenda-row:hover { border-color: var(--bronze); }
.cal-agenda-date { display: grid; justify-items: center; line-height: 1; }
.cal-agenda-date b { font-size: 20px; font-weight: 800; }
.cal-agenda-date small { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--stone-500); margin-top: 4px; }
.cal-agenda-body { display: grid; gap: 3px; min-width: 0; }
.cal-agenda-body strong { font-size: 14.5px; line-height: 1.3; }
.cal-agenda-body small { font-size: 12px; color: var(--stone-500); }
.cal-agenda-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--vatican); }
.cal-empty { margin: 12px 0 0; color: var(--stone-500); }
.cal-footnote { margin: 16px 0 0; font-size: 12px; color: var(--stone-500); line-height: 1.5; }
.cal-footnote a { color: var(--bronze-dark); font-weight: 700; }
.cal-afisha-hint {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin: 0 0 18px; padding: 14px 16px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
}
.cal-afisha-hint p { margin: 0; font-size: 13.5px; color: var(--stone-700); }
.cal-afisha-list {
  margin: 8px 0 0; padding: 0 0 0 18px; font-size: 13px; color: var(--stone-700); line-height: 1.45;
}
.cal-afisha-list li { margin: 0 0 4px; }
.afisha-day { margin: 0 0 24px; }
.afisha-day h2 {
  margin: 0 0 10px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: var(--stone-500);
}
.afisha-day.is-focus h2 { color: var(--bronze-dark); }

@media (max-width: 720px) {
  .cal-hero { padding: 18px 16px; border-radius: 18px; }
  .cal-week { gap: 4px; }
  .cal-week-day { padding: 8px 1px 10px; border-radius: 12px; }
}

/* ---------- Афиша (events) ---------- */
.af-month { margin: 0 0 18px; }
.af-month-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px;
}
.af-month-bar h2 {
  margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 600; text-align: center;
}
.af-month-nav {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 22px; cursor: pointer;
}
.af-month-strip {
  display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.af-day {
  flex: 0 0 auto; width: 52px; padding: 8px 4px 10px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: grid; gap: 3px; justify-items: center; cursor: pointer; font: inherit;
  scroll-snap-align: start;
}
.af-day .w { font-size: 10px; font-weight: 800; color: var(--stone-500); text-transform: lowercase; }
.af-day .n { font-size: 17px; font-weight: 800; line-height: 1; }
.af-day.has-events .n { color: var(--bronze-dark); }
.af-day.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.af-day.is-today { box-shadow: inset 0 0 0 1px var(--bronze); }
.af-day-caption { margin: 0; font-size: 13px; color: var(--stone-700); }
.af-text-btn {
  border: 0; background: none; color: var(--bronze-dark); font: inherit; font-weight: 700; cursor: pointer; padding: 0;
}

.af-cats {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin: 0 0 14px;
  -webkit-overflow-scrolling: touch;
}
.af-cat {
  flex: none; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--stone-700); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  white-space: nowrap;
}
.af-cat.on, .af-cat:hover { color: var(--ink); border-color: var(--bronze); background: var(--accent-soft); }

.af-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px;
}
.af-filter-toggle {
  display: none; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer;
}
.af-count { margin: 0; font-size: 13px; color: var(--stone-500); font-weight: 600; }

.af-layout {
  display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; margin-bottom: 36px;
}
.af-filters {
  position: sticky; top: 12px;
  padding: 16px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.af-filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.af-filters-head h2 { margin: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }
.af-filters-close { display: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-size: 22px; cursor: pointer; }
.af-field { margin: 0 0 14px; padding: 0; border: 0; }
.af-field legend {
  padding: 0; margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--bronze-dark);
}
.af-check {
  display: flex; align-items: center; gap: 8px; margin: 0 0 6px;
  font-size: 13px; color: var(--stone-700); cursor: pointer;
}
.af-check input { accent-color: var(--accent); }
.af-range { display: grid; gap: 8px; margin-top: 8px; }
.af-range label { display: grid; gap: 4px; font-size: 12px; color: var(--stone-500); font-weight: 600; }
.af-range input, .af-field input[type="search"], .af-field input[type="date"] {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--ground); color: var(--ink); font: inherit; font-size: 14px;
}
.af-reset {
  width: 100%; padding: 10px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer;
}
.af-filters-backdrop { display: none; }

.af-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.af-card {
  display: grid; grid-template-rows: auto 1fr; border-radius: 18px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card);
  text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; min-width: 0;
}
.af-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.af-card-cover {
  display: flex; align-items: flex-end; min-height: 110px; padding: 12px;
  background-size: cover; background-position: center; position: relative;
}
.af-card-cover.has-photo::after,
.home-lib-cover.has-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(18,14,12,.12), rgba(18,14,12,.55));
}
.af-card-cover.has-photo > *,
.home-lib-cover.has-photo > * { position: relative; z-index: 1; }
.home-lib-cover.has-photo {
  background-size: cover; background-position: center; position: relative;
}
.af-card-date { display: grid; gap: 2px; color: #f4efe6; }
.af-card-date b { font-size: 14px; font-weight: 800; }
.af-card-date small { font-size: 12px; opacity: .85; }
.af-card-body { display: grid; gap: 6px; padding: 12px 14px 14px; }
.af-card-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.af-card-body strong {
  font-size: 15px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.af-card-org { font-size: 11.5px; color: var(--stone-500); font-weight: 600; }

.af-section-title {
  margin: 0 0 14px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800;
}
.af-partners { margin: 8px 0 28px; }
.af-partner-block { margin: 0 0 22px; }
.af-partner-head { margin-bottom: 10px; }
.af-partner-title {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--serif); font-size: clamp(20px, 3vw, 26px); font-weight: 600;
  color: inherit; text-decoration: none; line-height: 1.2;
}
.af-partner-title:hover { color: var(--bronze-dark); }
.af-partner-rail {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory;
}
.af-partner-rail .af-card {
  flex: 0 0 min(280px, 78vw); scroll-snap-align: start;
}

.af-org-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.af-org-card {
  display: grid; gap: 8px; padding: 16px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: transform .15s, box-shadow .15s;
}
.af-org-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.af-org-mark {
  width: 48px; height: 48px; border-radius: 50%;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.af-org-card strong { font-size: 15px; line-height: 1.3; }
.af-org-card span {
  font-size: 13px; color: var(--stone-700); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.af-org-card em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--bronze-dark); }

.af-org-profile {
  display: grid; grid-template-columns: 160px 1fr; gap: 20px; margin: 8px 0 28px;
  padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
}
.af-org-hero {
  width: 120px; height: 120px; min-height: 120px; border-radius: 50%;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.af-org-profile-body h1 {
  margin: 6px 0 8px; font-family: var(--serif); font-size: clamp(26px, 4vw, 36px); font-weight: 600;
}
.af-org-city { margin: 0 0 8px; font-size: 13px; color: var(--stone-500); font-weight: 600; }
.af-org-blurb { margin: 0 0 14px; color: var(--stone-700); line-height: 1.55; max-width: 56ch; }
.af-org-contacts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.af-org-events { margin-bottom: 28px; }

.af-event { display: block; padding-top: 8px; }
.af-event-top {
  display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 28px; align-items: start;
}
.af-event-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 0;
  border-radius: 18px;
  background-size: cover;
  background-position: center top;
  box-shadow: var(--shadow-lift);
}
.af-event-main h1 {
  margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -.02em; line-height: 1.05;
}
.af-event-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.af-event-lead {
  margin: 16px 0 0; font-size: 16px; line-height: 1.65; color: var(--stone-700); max-width: 62ch;
}
.af-event-desc p, .af-event-desc ul, .af-event-desc ol { margin: 0 0 .75em; }
.af-event-desc > :last-child { margin-bottom: 0; }
.af-event-desc ul, .af-event-desc ol { padding-left: 1.3em; }
.af-event-desc li { margin: .25em 0; }
.af-event-desc a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.af-event-out {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 22px; padding: 12px 16px; border-radius: 12px;
  background: var(--ink); color: #fff; text-decoration: none; font-size: 14px; font-weight: 700;
}
.af-event-out:hover { opacity: .92; }
@media (max-width: 880px) {
  .af-event-top { grid-template-columns: 1fr; gap: 18px; justify-items: center; }
  .af-event-cover { width: min(72vw, 280px); aspect-ratio: 3 / 4; min-height: 0; }
  .af-event-main { width: 100%; }
}

@media (max-width: 980px) {
  .af-grid { grid-template-columns: repeat(2, 1fr); }
  .af-layout { grid-template-columns: 1fr; }
  .af-filter-toggle { display: inline-flex; }
  .af-filters {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 70;
    max-height: min(78dvh, 640px); overflow: auto; border-radius: 22px 22px 0 0;
    transform: translateY(110%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .af-filters-close { display: inline-flex; align-items: center; justify-content: center; }
  .af-layout.filters-open .af-filters { transform: translateY(0); }
  .af-filters-backdrop {
    display: block; position: fixed; inset: 0; z-index: 65;
    background: rgba(10, 9, 12, .45); border: 0; padding: 0; cursor: pointer;
  }
  .af-filters-backdrop[hidden] { display: none !important; }
  body.af-filters-open { overflow: hidden; }
}
@media (max-width: 720px) {
  .af-org-grid { grid-template-columns: 1fr; }
  .af-org-profile { grid-template-columns: 1fr; justify-items: start; }
  .af-org-hero { width: 88px; height: 88px; min-height: 88px; }
}
@media (min-width: 981px) {
  .af-filters-backdrop { display: none !important; }
}

/* 19 Sep: chrome, about, rails, links, library, calendar */
.portal-footer .footer-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; width: 100%;
}
.portal-footer .footer-links--row {
  display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0;
}
.portal-footer .footer-legal {
  padding-left: 0; max-width: 52rem; line-height: 1.5; color: var(--stone-500);
  font-size: 12.5px; margin: 8px 0 0;
}
.article-body a, .article-lead a, .lib-annotation a, .static-body a, .guide-body a {
  color: #2f6fed;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.article-body a:hover, .article-lead a:hover, .lib-annotation a:hover, .static-body a:hover, .guide-body a:hover {
  color: #1f4fc4;
}
[data-theme="twilight"] .article-body a,
[data-theme="twilight"] .article-lead a,
[data-theme="twilight"] .lib-annotation a,
[data-theme="twilight"] .static-body a,
[data-theme="twilight"] .guide-body a { color: #7eb0ff; }
[data-theme="twilight"] .article-body a:hover,
[data-theme="twilight"] .article-lead a:hover,
[data-theme="twilight"] .lib-annotation a:hover,
[data-theme="twilight"] .static-body a:hover,
[data-theme="twilight"] .guide-body a:hover { color: #a8c8ff; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; }
.article-tag {
  display: inline-flex; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--bronze-dark); text-decoration: none; font-size: 13px;
}
.article-tag:hover { border-color: var(--bronze-dark); }
.lib-book-cover.has-photo > span { display: none; }
.lib-annotation p { margin: 0 0 12px; }
.af-month-rail, .rail-wrap {
  display: flex; align-items: center; gap: 8px;
}
.af-month-rail .af-month-strip, .rail-wrap .yt-shorts-rail, .rail-wrap .af-month-strip {
  flex: 1 1 auto; min-width: 0;
}
.rail-arrow {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.rail-arrow:hover { border-color: var(--bronze); color: var(--bronze-dark); }
@media (max-width: 720px) {
  .rail-arrow { display: none; }
}
.vp-card { overflow: hidden; align-items: flex-start; }
.vp-copy { min-width: 0; overflow: hidden; }
.vp-copy strong { overflow-wrap: anywhere; word-break: break-word; }
.page-static .static-photo img {
  height: auto; object-fit: cover; object-position: center 18%;
}
.page-static .app-download-photo img {
  max-height: none; height: auto; object-fit: cover; object-position: center 20%;
}
@media (min-width: 881px) {
  .page-static .app-download-photo img { max-height: min(56vh, 520px); }
  .page-static .static-photo {
    position: relative;
    width: 100%;
    max-width: none;
    aspect-ratio: 12 / 5;
    max-height: 460px;
  }
  .page-static .static-photo picture,
  .page-static .static-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
  }
}
@media (max-width: 880px) {
  .page-static .static-photo {
    position: relative;
    width: 100%;
    max-width: none;
    aspect-ratio: 4 / 3;
    max-height: 420px;
    min-height: 0;
    height: auto;
  }
  .page-static .static-photo picture,
  .page-static .static-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
  }
  .page-static .static-photo img {
    object-fit: cover;
    object-position: center center;
  }
}
.about-wait { min-height: 100vh; }
.about-wait-photo { margin-top: 14px; aspect-ratio: 4 / 5; border-radius: 16px; }
@media (min-width: 881px) {
  .about-wait-photo { aspect-ratio: 50 / 31; max-height: min(68vh, 680px); }
}
.page-static .principles { align-items: start; }
.page-static .principle--person {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center;
}
.page-static .principle-photo {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  filter: grayscale(1); background: var(--surface-2);
}
.page-static .principle--person span { display: none; }
.app-download--wide { width: 100%; max-width: none; }
.app-subtitle { margin: 0 0 16px; color: var(--stone-700); }
.app-link-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 20px;
}
.app-store-btn {
  display: flex; align-items: center; justify-content: center; min-height: 52px;
  padding: 12px 10px; border-radius: 14px; background: var(--bronze-dark); color: #fff;
  text-decoration: none; font-weight: 700; text-align: center;
}
.app-store-btn:hover { filter: brightness(1.05); color: #fff; }
.support-qr-row { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 18px; }
.support-qr { margin: 0; text-align: center; }
.support-qr img { width: 160px; height: 160px; object-fit: contain; background: #fff; border-radius: 12px; }
.support-qr figcaption { margin-top: 8px; font-size: 13px; color: var(--stone-700); }
.contact-grid--partners { align-items: stretch; }
.page-static .contact-grid--partners .contact {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; min-height: 110px;
}
.page-static .contact-value {
  font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.35; color: var(--ink);
}
.page-static .contact-value a {
  font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.page-static .contact--social .contact-value {
  display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; align-items: baseline;
}
.about-intro { max-width: none; }
.about-team-title {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  color: var(--ink);
}
.page-static .principles { margin-top: 16px; }
.about-support {
  padding: 26px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}
.about-support h2,
.about-support h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.about-support p {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--stone-700);
}
.about-support .support-qr { margin: 0; }
.about-support .support-qr img {
  width: min(100%, 228px);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 8px;
}
.app-support-row .principles { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.app-authors > h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}
.byline-authors { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.feed-author { margin: 0 0 6px; font-size: 0.92rem; }
.feed-author a { color: inherit; text-decoration: none; }
.lead-excerpt p { margin: 0 0 0.55em; }
.lead-excerpt p:last-child { margin-bottom: 0; }
.authors-aside .author-row { padding-left: 0; padding-right: 0; }
@media (min-width: 881px) {
  .about-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 28px 48px;
    align-items: start;
    max-width: none;
  }
  .about-intro .static-body { max-width: none; }
  .app-support-row {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 24px 32px;
    align-items: center;
    margin-top: 28px;
  }
  .about-support--app {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 156px;
    column-gap: 22px;
    row-gap: 8px;
    align-items: center;
    padding: 22px 22px 22px 26px;
  }
  .about-support--app h3,
  .about-support--app p { grid-column: 1; margin: 0; }
  .about-support--app h3 { font-size: 26px; }
  .about-support--app .support-qr {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
  }
  .about-support--app .support-qr img {
    width: 148px;
    height: 148px;
    margin: 0;
  }
}
@media (max-width: 880px) {
  .page-static .static-head { margin-bottom: 16px; }
  .page-static .static-head h1 { font-size: 34px; }
  .about-intro { display: flex; flex-direction: column; gap: 22px; }
  .about-support { padding: 22px 18px 18px; border-radius: 20px; }
  .about-support h2 { font-size: 26px; }
  .about-support .support-qr img { width: min(72vw, 220px); }
  .about-team-title { margin-top: 28px; }
  .page-static .principles { margin-top: 14px; margin-bottom: 28px; }
  .app-download--wide { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
  .app-support-row { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; }
  .about-support--app .support-qr img { width: min(64vw, 200px); }
}
@media (max-width: 880px) {
  .app-link-row { grid-template-columns: 1fr 1fr; }
  .page-static .principle--person { grid-template-columns: 56px minmax(0, 1fr); }
  .page-static .principle-photo { width: 56px; height: 56px; }
}
.cal-block-body, .cal-block-body p, .cal-block-body a, .cal-block-body span {
  font-family: var(--ff); font-size: 15px; line-height: 1.55; color: var(--ink);
}
.cal-quote, .cal-block-body .cal-quote {
  font-family: var(--ff); font-size: 15px !important; font-style: italic; color: var(--ink) !important;
}
.cal-saint-link { font-weight: 600; color: var(--bronze-dark); }

.comp-head { padding: 8px 0 4px; }
.comp-head h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 4.4vw, 50px); line-height: 1.05; }
.comp-by { margin: 8px 0 18px; color: var(--stone-700); font-size: 16px; }
.comp-gates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comp-gate {
  position: relative; display: block; aspect-ratio: 16 / 10; padding: 0; border: 0; border-radius: 18px;
  overflow: hidden; cursor: pointer; color: #fff; text-align: left;
  background: #1a1613 center / cover no-repeat;
}
.comp-gate span {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: flex-start;
  padding: 36px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(15, 9, 6, .86));
}
.comp-gate small { font-size: 11px; font-weight: 700; letter-spacing: .08em; opacity: .85; }
.comp-gate strong { font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); font-weight: 600; line-height: 1.05; }
.comp-gate em { margin-top: 2px; font-style: normal; font-size: 13px; opacity: .82; }
.ytm-now.ytm-now--face {
  background:
    linear-gradient(180deg, rgba(12, 10, 8, .12) 8%, rgba(12, 10, 8, .9) 72%),
    url("assets/cards/articles-spirituality.webp") center 42% / cover no-repeat,
    #161310;
}
.radio-desk {
  display: grid;
  grid-template-columns: minmax(280px, 460px) minmax(0, 1fr);
  gap: 28px 48px;
  align-items: start;
  padding: 18px 0 8px;
}
.radio-cover {
  margin: 0;
  width: 100%;
  min-width: 0;
  border-radius: 24px;
  overflow: hidden;
  background: #d7ecf8;
  box-shadow: 0 18px 48px rgba(20, 16, 12, .16);
  line-height: 0;
}
.radio-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}
.radio-panel h1 {
  margin: 6px 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(42px, 5vw, 68px);
  line-height: .95;
  letter-spacing: -.03em;
}
.radio-tag {
  margin: 0 0 16px;
  max-width: 36em;
  font-size: 18px;
  line-height: 1.4;
  color: var(--stone-700);
}
.radio-about { margin: 28px 0 0; max-width: 40em; }
.radio-about p {
  margin: 0 0 12px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--stone-700);
}
.radio-about a { color: var(--bronze-dark); font-weight: 700; }
.radio-go {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 26px 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ground);
  font: 700 16px var(--ff);
  cursor: pointer;
}
.radio-go svg { width: 22px; height: 22px; display: block; }
.radio-go .i-pause { display: none; }
.radio-desk.is-on .radio-go .i-play { display: none; }
.radio-desk.is-on .radio-go .i-pause { display: block; }
.radio-desk:not(.is-on) .radio-live i { background: var(--stone-500); animation: none; box-shadow: none; }
.radio-vol {
  display: grid;
  gap: 8px;
  margin: 26px 0 0;
  max-width: 260px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--stone-500);
}
.radio-vol input { width: 100%; accent-color: var(--bronze-dark); }
@media (max-width: 800px) {
  .radio-desk { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 22px; }
  .radio-cover { width: min(100%, 460px); }
  .radio-panel { width: min(100%, 460px); }
  .radio-panel .radio-live { justify-content: center; }
  .radio-about { text-align: left; margin-top: 8px; }
  .radio-tag { margin-bottom: 14px; }
  .radio-go { width: 100%; justify-content: center; }
  .radio-vol { margin-left: auto; margin-right: auto; }
}
@media (max-width: 720px) {
  .comp-gates { grid-template-columns: 1fr; }
  .comp-gate { aspect-ratio: 16 / 9; }
}
.comp-back {
  border: 0; background: transparent; padding: 0; margin: 0 0 8px; cursor: pointer;
  color: var(--bronze-dark); font: 700 14px var(--ff);
}
.comp-part-title {
  margin: 0 0 8px; font-family: var(--serif); font-size: clamp(32px, 4vw, 44px); font-weight: 600;
}
.comp-shelf { margin: 26px 0 0; }
.comp-shelf header { display: flex; align-items: baseline; gap: 12px; margin: 0 0 8px; }
.comp-shelf h3 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 600; }
.comp-shelf header span { color: var(--stone-500); font-size: 13px; }
.comp-list { display: flex; flex-direction: column; }
.comp-q {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; align-items: baseline;
  width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: inherit; cursor: pointer; padding: 12px 4px; font: 500 15.5px/1.35 var(--ff);
}
.comp-q b { color: var(--stone-500); font-weight: 700; font-size: 13px; }
.comp-q:hover, .comp-q.is-on { color: var(--bronze-dark); }
.comp-note { margin: 0 0 8px; color: var(--stone-700); }
body.comp-open { overflow: hidden; }
