/* ============================================================
   ЯКатолик — портал
   Темы: «Свет» (#ede9e2) · «Сумерки»
   ============================================================ */

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

  /* Светлая тема — бежевый #ede9e2 */
  --paper: #F6F3EE;
  --ground: #ede9e2;
  --surface: #FBFAF7;
  --surface-2: #E3DFD7;
  --ink: #2B241E;
  --charcoal: #382E27;
  --stone-700: #675C52;
  --stone-500: #897C70;
  --stone-300: #C7B9A8;
  --stone-100: #E5D8C8;

  --bronze: #A9784E;
  --bronze-dark: #85562F;
  --bronze-deep: #674126;
  --accent: #AC5633;
  --accent-2: #C76F43;
  --accent-soft: rgba(172, 86, 51, .12);
  --highlight: #B98525;

  --marian: #4778AC;
  --vatican: #9B7416;
  --sage: #6E8252;
  --rose: #A84F65;
  --line: #DDD6CA;
  --line-strong: #CBC3B6;
  --v1: #2F8178;
  --v1-soft: rgba(47, 129, 120, .12);
  --v2: #B86D29;
  --v2-soft: rgba(184, 109, 41, .12);
  --shadow-card: 0 1px 2px rgba(68, 45, 27, .07), 0 8px 24px rgba(68, 45, 27, .08);
  --shadow-lift: 0 12px 32px rgba(68, 45, 27, .14);
}

:root[data-theme="twilight"] {
  color-scheme: dark;
  --paper: #2A282D;
  --ground: #201E24;
  --surface: #2E2C33;
  --surface-2: #34323A;
  --ink: #FFFFFF;
  --charcoal: #EDEDED;
  --stone-700: #B4AFA8;
  --stone-500: #9E9E9E;
  --stone-300: #5A554F;
  --stone-100: #3F3C3A;
  --bronze: #C99A6B;
  --bronze-dark: #D8B98A;
  --bronze-deep: #B89B6B;
  --accent: #AC5633;
  --accent-2: #C9713F;
  --accent-soft: rgba(172, 86, 51, .18);
  --highlight: #FFD700;
  --marian: #6FA0D8;
  --vatican: #E8B931;
  --sage: #9AAD77;
  --rose: #E37A90;
  --line: #3A3840;
  --line-strong: #4A4650;
  --v1: #5FC0B2;
  --v1-soft: rgba(95, 192, 178, .16);
  --v2: #E0954A;
  --v2-soft: rgba(224, 149, 74, .16);
  --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; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--stone-700); 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: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line); }
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  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; }
.logo .mark { width: 34px; height: 34px; border-radius: 9px; overflow: hidden; flex: none; display: block; box-shadow: var(--shadow-card); }
.logo .mark img, .logo .mark svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.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: wrap; }
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);
}

/* ---------- 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; transition: opacity .6s ease; background-size: cover; background-position: center; background-color: var(--surface); }
.hero-slide.active { opacity: 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; padding: 32px 32px 36px; 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-bottom: 14px;
}
.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: start;
}
.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: grid;
  gap: 16px;
}
.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 .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; }
.home-aside .widget h3 {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.home-aside .widget-saint {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* Авторы на мобилке (сайдбар скрыт) */
.authors-block--mobile-only { display: none; }
@media (max-width: 880px) {
  .authors-block--mobile-only { display: block; }
}

/* Статическая страница «О проекте / приложение» */
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: 16px;
  overflow: hidden;
  min-height: 240px;
  background: var(--surface-2);
}
.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 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .page-static .principles,
  .page-static .figures,
  .page-static .partner-grid,
  .page-static .contact-grid { 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;
}
.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-menu {
  position: absolute; left: 0; top: calc(100% + 6px); display: grid; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
  box-shadow: var(--shadow-card); min-width: 140px; z-index: 5;
}
.ps-share-menu a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 13px; }
.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: color-mix(in srgb, var(--surface) 78%, transparent);
    backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 10px 34px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .1);
  }
  /* До 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); }
  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) {
  :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: 22px 20px 28px; }
  .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; }
  .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: 18px 16px 26px; }
  .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; }
.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%; }
@media (prefers-reduced-motion: reduce) { .sk, .spinner { animation: none; } }

/* Резервируем высоту, чтобы не было скачков при подгрузке */
.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-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: normal;
  font-weight: 600;
}
.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 {
  margin: 1.8em 0; border-radius: 16px; overflow: hidden; background: var(--surface);
}
.article-body .archive-figure img, .article-body .inline-figure img { width: 100%; display: block; }
.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-grid, .web-video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 880px) { .video-grid, .web-video-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .video-grid, .web-video-grid { grid-template-columns: 1fr; } }
.video-card {
  display: block; border-radius: 16px; overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-card); transition: transform .2s, box-shadow .2s; color: inherit;
}
.video-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.video-thumb, .video-thumb-img {
  position: relative; display: block; height: 160px; background: var(--surface-2) center/cover;
}
.video-thumb .play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.7);
  display: grid; place-items: center; color: #fff; font-style: normal; font-size: 12px;
}
.video-thumb .duration {
  position: absolute; right: 10px; bottom: 10px; padding: 4px 8px; border-radius: 6px;
  background: rgba(0,0,0,.65); color: #fff; font-size: 10px; font-weight: 700;
}
.video-card h3 { margin: 0; padding: 14px 14px 4px; font-size: 16px; line-height: 1.25; }
.video-card-desc { margin: 0; padding: 0 14px 14px; color: var(--stone-700); font-size: 12.5px; }
.video-card .story-meta { padding: 12px 14px 0; }
.video-dialog {
  border: 0; border-radius: 18px; padding: 0; max-width: min(920px, 94vw); width: 100%;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift);
}
.video-dialog::backdrop { background: rgba(10, 8, 12, .78); }
.video-dialog-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.video-dialog-bar p { margin: 0; font-weight: 700; }
.video-dialog video { width: 100%; display: block; background: #000; max-height: 70vh; }
.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; }
.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-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 { 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); }
.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 {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
}
.theme-toggle {
  height: 42px; display: inline-flex; align-items: center; gap: 8px;
  padding: 0 11px 0 8px; 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;
}
.theme-toggle.is-twilight .theme-toggle-track i { transform: translateX(20px); }
.theme-toggle:not(.is-twilight) .theme-sun { color: var(--bronze-dark); }
.theme-toggle.is-twilight .theme-moon { color: var(--bronze-dark); }
.theme-toggle-name { min-width: 64px; text-align: left; }

: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 { gap: 6px; }
  .theme-toggle {
    width: 54px; 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: brightness(1.04); }
.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(20,15,12,.12) 10%, rgba(20,15,12,.86) 100%),
    var(--card-image),
    var(--card-tone);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* ---------- 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-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;
}

/* ---------- 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;
  }
  .author-row:nth-child(odd) { padding-right: 8px; }
  .author-row:nth-child(even) { padding-left: 8px; }
}
.author-head {
  display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: start;
  padding: 18px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 22px;
}
.author-head .author-ava { width: 120px; height: 120px; font-size: 32px; }
.author-bio { margin: 10px 0 14px; color: var(--stone-700); line-height: 1.6; max-width: 560px; }
.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-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); }

@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: 6px; }
  .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; }
}
@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; 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; 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-cover {
  position: relative; aspect-ratio: 3 / 4; display: grid; place-items: center;
  color: #fff;
}
.lib-cover-mark {
  font-family: var(--serif); font-size: 56px; font-weight: 600; opacity: .88; line-height: 1;
}
.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: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; padding-top: 8px;
}
.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-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-download-block { margin-top: 28px; }
.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 { grid-template-columns: 200px 1fr; gap: 20px; }
}
@media (max-width: 880px) {
  .lib-hub-sections { grid-template-columns: 1fr; }
  .lib-filters { grid-template-columns: 1fr 1fr; }
  .lib-grid { grid-template-columns: repeat(2, 1fr); }
  .lib-book { grid-template-columns: 1fr; }
  .lib-book-cover { max-width: 220px; }
  .lib-meta { 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-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;
}
.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: 42px; height: 42px; border-radius: 12px; }
.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 { border-radius: 16px; min-height: 140px; }
.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; }

@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; }
  .af-org-hero { min-height: 100px; }
}
@media (min-width: 981px) {
  .af-filters-backdrop { display: none !important; }
}
