:root {
  --bg-black: #000000;
  --bg-red: #391014;
  --bg-red-deep: #2a0b0e;
  --blood: #6b0f14;
  --blood-dark: #3d0609;
  --text: #f5e6e8;
  --text-dim: #c9aeb2;
  --bg-shift: 5.8s;
  --reveal-img: 2.25s;
  --reveal-img-delay: 1.7s;
  --reveal-title: 1.65s;
  --reveal-title-delay: 2.75s;
  --reveal-sub: 1.9s;
  --reveal-sub-delay: 4.4s;
  --drop-duration: 2.8s;
  /* Капли только после смены фона на красный — не видны на чёрном */
  --drop-phase-start: calc(var(--bg-shift) + 0.25s);
  --nav-h: 3.75rem;
  --section-bg: #240c10;
  --section-bg-alt: #1c090c;
  /* Золочение — точечно, на красном; основной текст остаётся белым/кремовым */
  --gold: #d4b45c;
  --gold-soft: #e8cf8a;
  --gold-line: rgba(212, 184, 100, 0.38);
  --gold-edge: rgba(212, 184, 100, 0.22);
  --gold-glow: rgba(232, 200, 120, 0.22);
}

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

html {
  margin: 0;
  min-height: 100%;
  /* Полоса прокрутки не исчезает — макет не прыгает по горизонтали */
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: clip;
  font-family: "PT Serif", "Times New Roman", Times, serif;
  background-color: var(--bg-red);
  color: var(--text);
}

html.nav-sticky {
  scroll-padding-top: calc(var(--nav-h) + 0.5rem);
}

@keyframes heroBgToRed {
  from {
    background-color: var(--bg-black);
  }
  to {
    background-color: var(--bg-red);
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--text);
  color: var(--bg-black);
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-nav {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 200;
  transition:
    top 0.35s ease,
    bottom 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease;
}

.site-nav--bottom {
  top: auto;
  bottom: 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
}

.site-nav--sticky {
  top: 0;
  bottom: auto;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  min-height: var(--nav-h);
  padding: 0.45rem clamp(1rem, 4vw, 2rem);
  background: rgba(20, 6, 8, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 248, 235, 0.07);
  border-bottom: 1px solid transparent;
  box-shadow: inset 0 1px 0 var(--gold-edge);
}

.site-nav--sticky .site-nav__inner {
  border-top-color: transparent;
  border-bottom: 1px solid var(--gold-line);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.site-nav__logo {
  font-family: "Cormorant Infant", serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
}

.site-nav__logo:hover {
  color: #fff;
  text-shadow:
    0 0 12px rgba(0, 0, 0, 0.5),
    0 0 20px var(--gold-glow);
}

.site-nav__logo-full {
  display: none;
}

.site-nav__toggle {
  display: none;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 245, 220, 0.14);
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav__list a:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(212, 184, 100, 0.75);
  text-underline-offset: 0.18em;
}

.site-nav__item--dropdown {
  position: relative;
}

.site-nav__details {
  position: relative;
}

.site-nav__summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-dim);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.2rem 0;
  user-select: none;
}

.site-nav__summary::-webkit-details-marker {
  display: none;
}

.site-nav__summary:hover,
.site-nav__details[open] > .site-nav__summary {
  color: var(--text);
}

.site-nav__caret {
  display: inline-block;
  margin-left: 0.15rem;
  opacity: 0.75;
  border: 4px solid transparent;
  border-top-color: currentColor;
  vertical-align: 0.15em;
  transition: transform 0.2s ease;
}

.site-nav--sticky .site-nav__details[open] .site-nav__caret {
  transform: rotate(180deg);
}

.site-nav--bottom .site-nav__details[open] .site-nav__caret {
  transform: rotate(180deg);
}

.site-nav__submenu {
  position: absolute;
  left: 0;
  z-index: 250;
  min-width: 16rem;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: rgba(12, 4, 6, 0.97);
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.site-nav--sticky .site-nav__submenu {
  top: calc(100% + 0.35rem);
  bottom: auto;
}

.site-nav--bottom .site-nav__submenu {
  bottom: calc(100% + 0.35rem);
  top: auto;
}

.site-nav__submenu a {
  display: block;
  padding: 0.45rem 0.9rem;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--gold-edge);
  text-decoration: none;
}

.site-nav__submenu li:last-child a {
  border-bottom: none;
}

.site-nav__submenu a:hover {
  background: rgba(212, 184, 100, 0.08);
  text-decoration: none;
}

@media (max-width: 720px) {
  .site-nav__toggle {
    display: block;
  }

  .site-nav__list {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0 0.75rem;
    gap: 0;
  }

  .site-nav__list a {
    display: block;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--gold-edge);
  }

  .site-nav__item--dropdown {
    width: 100%;
    border-bottom: 1px solid var(--gold-edge);
  }

  .site-nav__summary {
    display: block;
    padding: 0.55rem 0;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid transparent;
  }

  .site-nav__submenu {
    position: static;
    min-width: 0;
    margin: 0 0 0.35rem;
    padding: 0;
    border: none;
    border-left: 2px solid var(--gold-edge);
    border-radius: 0;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.2);
  }

  .site-nav__submenu a {
    padding: 0.45rem 0.75rem 0.45rem 1rem;
    border-bottom: 1px solid rgba(212, 184, 100, 0.12);
  }

  .site-nav--open .site-nav__list {
    display: flex;
  }
}

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  padding-bottom: calc(var(--nav-h) + clamp(1rem, 4vw, 2.5rem));
  overflow-x: clip;
  background-color: var(--bg-black);
  animation: heroBgToRed var(--bg-shift) ease-in-out forwards;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2.5vh, 2.25rem);
  max-width: min(94vw, 720px);
  width: 100%;
}

.acronym-block {
  position: relative;
  text-align: center;
  width: 100%;
}

.acronym {
  font-family: "Cormorant Infant", "PT Serif", serif;
  font-weight: 700;
  font-size: clamp(2.25rem, 9vw, 4.75rem);
  letter-spacing: 0.06em;
  line-height: 1;
  margin: 0;
  text-shadow:
    0 0 24px rgba(0, 0, 0, 0.9),
    0 2px 0 var(--bg-red-deep),
    0 0 42px var(--gold-glow),
    0 0 1px rgba(212, 184, 100, 0.35);
  opacity: 0;
  transform: translateY(-12px);
  animation: revealUp var(--reveal-title) ease-out var(--reveal-title-delay) forwards;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blood-drops {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 0.15em);
  height: 0;
  pointer-events: none;
  z-index: 2;
}

.blood-drops:not(.blood-drops--ready) .drop {
  opacity: 0;
  visibility: hidden;
  animation: none;
}

.blood-drops--ready .drop {
  visibility: visible;
}

.drop {
  position: fixed;
  left: var(--left);
  top: var(--top);
  width: clamp(3px, 0.5vw, 6px);
  height: clamp(10px, 1.2vw, 16px);
  margin-left: -2px;
  background: linear-gradient(180deg, var(--blood) 0%, var(--blood-dark) 100%);
  border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  box-shadow: 0 0 6px rgba(80, 0, 10, 0.5);
  opacity: 0;
  animation: drip var(--drop-duration) linear infinite;
  animation-delay: calc(var(--drop-phase-start) + var(--d));
  animation-fill-mode: backwards;
  /* fixed: не участвует в высоте документа — скроллбар не мигает */
}

@keyframes drip {
  0% {
    transform: translateY(0) scaleY(1);
    opacity: 0;
  }
  4% {
    opacity: 0.94;
  }
  78% {
    opacity: 0.52;
  }
  100% {
    transform: translateY(110vh) scaleY(1.12);
    opacity: 0;
  }
}

.portrait-wrap {
  position: relative;
  display: block;
  max-width: min(88vw, 420px);
  width: 100%;
  align-self: center;
}

.portrait {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.72));
  opacity: 0;
  transform: scale(0.98);
  animation: revealPortrait var(--reveal-img) ease-out var(--reveal-img-delay) forwards;
}

@keyframes revealPortrait {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.subtitle {
  margin: 0;
  text-align: center;
  font-size: clamp(0.9rem, 2.8vw, 1.2rem);
  line-height: 1.45;
  color: var(--text-dim);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transform: translateY(14px);
  animation: revealUp var(--reveal-sub) ease-out var(--reveal-sub-delay) forwards;
}

@media (min-width: 900px) {
  .hero__inner {
    max-width: min(94vw, 980px);
    gap: clamp(1rem, 3vh, 2.5rem);
  }

  .acronym {
    font-size: clamp(3.5rem, 7.5vw, 6.25rem);
  }

  .portrait-wrap {
    max-width: min(78vw, 580px);
  }

  .subtitle {
    font-size: clamp(1.05rem, 2vw, 1.55rem);
    max-width: 36em;
  }
}

@media (min-width: 1400px) {
  .hero__inner {
    max-width: min(92vw, 1100px);
  }

  .acronym {
    font-size: clamp(4.5rem, 6vw, 7rem);
  }

  .portrait-wrap {
    max-width: min(72vw, 680px);
  }

  .subtitle {
    font-size: clamp(1.2rem, 1.6vw, 1.75rem);
  }
}

@media (max-width: 480px) {
  .blood-drops .drop:nth-child(n + 9) {
    display: none;
  }
}

.section {
  scroll-margin-top: calc(var(--nav-h) + 0.75rem);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem);
}

.section:nth-of-type(odd) {
  background: var(--section-bg);
}

.section:nth-of-type(even) {
  background: var(--section-bg-alt);
}

.section__inner {
  max-width: 42rem;
  margin: 0 auto;
}

.section__inner--narrow {
  max-width: 32rem;
}

.section__inner--about {
  max-width: 52rem;
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
}

.about-copy .section__title {
  margin-top: 0;
}

.about-figure {
  margin: 0;
  justify-self: center;
  max-width: min(88vw, 320px);
}

.about-figure__img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.92;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.45));
}

@media (min-width: 768px) {
  .section__inner--about {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
    gap: 2rem 2.25rem;
  }

  .about-figure {
    order: 2;
    max-width: 100%;
  }

  .about-copy {
    order: 1;
  }
}

@media (min-width: 1100px) {
  .section__inner--about {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  }

  .about-figure {
    max-width: min(100%, 320px);
  }
}

.section__inner--path {
  max-width: 52rem;
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
}

.path-copy .section__title {
  margin-top: 0;
}

.path-figure {
  margin: 0;
  justify-self: center;
  max-width: min(88vw, 320px);
}

.path-figure__img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.92;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.45));
}

@media (min-width: 768px) {
  .section__inner--path {
    grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
    gap: 2rem 2.25rem;
  }

  .path-figure {
    order: 1;
    max-width: 100%;
  }

  .path-copy {
    order: 2;
  }
}

@media (min-width: 1100px) {
  .section__inner--path {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  }

  .path-figure {
    max-width: min(100%, 320px);
  }
}

.section__title {
  font-family: "Cormorant Infant", serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 4.5vw, 2.35rem);
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
  color: #fff;
  position: relative;
  padding-bottom: 0.55rem;
}

.section__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3.35rem;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(212, 184, 100, 0.12) 100%);
}

.section__lead {
  font-size: 1.15rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}

.section__text {
  line-height: 1.65;
  margin: 0 0 1rem;
  color: var(--text-dim);
}

.section__text:last-child {
  margin-bottom: 0;
}

.section__note {
  font-size: 0.95rem;
  color: var(--text-dim);
  opacity: 0.9;
  margin: 1.25rem 0 0;
  font-style: italic;
}

.path-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.7;
  color: var(--text-dim);
}

.path-list li {
  margin-bottom: 0.35rem;
}

.faq-snippet {
  margin: 1.5rem 0 0;
}

.faq-snippet dt {
  font-weight: 700;
  color: var(--text);
  margin-top: 1rem;
}

.faq-snippet dt:first-child {
  margin-top: 0;
}

.faq-snippet dd {
  margin: 0.35rem 0 0;
  color: var(--text-dim);
  line-height: 1.6;
}

.material-cards {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.material-cards li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--gold-edge);
  line-height: 1.5;
  color: var(--text-dim);
}

.material-cards a {
  color: var(--gold-soft);
  font-weight: 700;
  text-decoration: none;
}

.material-cards a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(212, 184, 100, 0.65);
}

/* ——— Баннер вступления (главная) ——— */
.section--join-banner .section__inner {
  text-align: center;
}

.join-banner {
  display: block;
  max-width: min(72rem, 100%);
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
  transition: filter 0.18s ease;
}

.join-banner:hover {
  filter: brightness(1.05);
}

.join-banner:focus-visible {
  outline: 2px solid rgba(212, 184, 100, 0.55);
  outline-offset: 4px;
}

.join-banner__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(62vh, 520px);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.15);
  transform: scale(1);
  transition: transform 0.22s ease;
  transform-origin: center center;
}

.join-banner:hover .join-banner__img {
  transform: scale(1.06);
}

.join-banner:focus-visible .join-banner__img {
  transform: scale(1.04);
}

.join-banner__text {
  margin: 0.9rem 0 0;
  font-family: "Cormorant Infant", serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 3.2vw, 1.55rem);
  color: var(--gold-soft);
  letter-spacing: 0.02em;
}

@media (min-width: 900px) {
  .join-banner {
    /* На десктопе немного шире колонки (≈ +10%), но не выходим за экран */
    width: min(calc(100% + 10%), calc(100vw - 2rem));
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ——— Почётные члены: баннер-картинка + лайтбокс ——— */
.members-banner {
  margin: 0.75rem 0 1.1rem;
}

.members-banner__trigger {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 10px;
  overflow: hidden;
}

.members-banner__trigger:focus-visible {
  outline: 2px solid rgba(212, 184, 100, 0.55);
  outline-offset: 4px;
}

.members-banner__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(62vh, 560px);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.15);
  transform: scale(1);
  transition: transform 0.22s ease, filter 0.18s ease;
  transform-origin: center center;
}

.members-banner__trigger:hover .members-banner__img {
  transform: scale(1.04);
  filter: brightness(1.06);
}

.hprot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.hprot-lightbox--open {
  display: flex !important;
}

.hprot-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(2px);
}

.hprot-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hprot-lightbox__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 3.5rem);
  object-fit: contain;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.hprot-lightbox__close {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.hprot-lightbox__close:hover {
  background: rgba(0, 0, 0, 0.6);
}

.contact-form {
  margin-top: 1.5rem;
}

.form-row {
  margin-bottom: 1.1rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  color: var(--text);
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid rgba(212, 184, 100, 0.42);
  outline-offset: 1px;
}

.form-row--captcha input {
  max-width: 8rem;
}

.form-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
  opacity: 0.85;
}

.form-backend-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 1rem;
}

.form-backend-hint code {
  font-size: 0.8em;
  color: #e8d2a0;
}

.btn-submit {
  font: inherit;
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  color: var(--bg-red-deep);
  background: linear-gradient(180deg, #faf2dc 0%, #deb864 42%, #a67c28 100%);
  border: 1px solid rgba(180, 140, 55, 0.55);
  border-radius: 4px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 240, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.35);
}

.btn-submit:hover {
  filter: brightness(1.05);
}

.form-status {
  min-height: 1.5em;
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.site-footer {
  padding: 2.5rem clamp(1rem, 4vw, 2rem) 2rem;
  background: #140506;
  border-top: 1px solid var(--gold-line);
}

.site-footer__inner {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.site-footer__figure {
  margin: 0 auto 1.25rem;
}

.site-footer__figure img {
  display: block;
  margin: 0 auto;
  height: auto;
  max-height: 6.5rem;
  width: auto;
  max-width: min(11rem, 100%);
  opacity: 0.92;
  filter: drop-shadow(0 0.15rem 0.45rem rgba(0, 0, 0, 0.45));
}

.site-footer__brand {
  font-family: "Cormorant Infant", serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 1rem;
  color: #faf6ec;
  letter-spacing: 0.04em;
}

.site-footer__disclaimer,
.site-footer__copy {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0.5rem 0;
}

.reduced-motion body {
  background-color: var(--bg-red);
}

.reduced-motion .hero {
  animation: none;
  background-color: var(--bg-red);
}

.reduced-motion .acronym,
.reduced-motion .subtitle {
  animation: none;
  opacity: 1;
  transform: none;
}

.reduced-motion .portrait {
  animation: none;
  opacity: 1;
  transform: none;
}

.reduced-motion .blood-drops {
  display: none;
}

.reduced-motion .drop {
  animation: none;
  display: none;
}

.reduced-motion .site-footer__figure img {
  filter: none;
}

html.nav-sticky .blood-drops .drop {
  visibility: hidden;
  animation: none;
}

.site-audio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.audio-float {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 190;
  filter: drop-shadow(-4px 0 12px rgba(0, 0, 0, 0.45));
}

.audio-float__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.25rem;
  width: 2.85rem;
  padding: 0.6rem 0.45rem 0.6rem 0.55rem;
  margin: 0;
  border: 1px solid var(--gold-line);
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: rgba(20, 6, 8, 0.94);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.audio-float__btn:hover {
  background: rgba(55, 18, 28, 0.96);
  color: #fff;
}

.audio-float__btn:focus-visible {
  outline: 2px solid rgba(212, 184, 100, 0.55);
  outline-offset: 2px;
}

.audio-float__btn.is-muted {
  color: var(--text-dim);
}

.audio-float__btn .audio-float__icon {
  flex-shrink: 0;
  display: block;
}

/* Только одна иконка за раз (атрибут hidden у SVG ведёт себя неодинаково) */
.audio-float__btn .audio-float__icon--on {
  display: block;
}

.audio-float__btn .audio-float__icon--off {
  display: none;
}

.audio-float__btn.is-muted .audio-float__icon--on {
  display: none;
}

.audio-float__btn.is-muted .audio-float__icon--off {
  display: block;
}

/* ——— Внутренние страницы ——— */

.page-main {
  padding: calc(var(--nav-h) + 1.75rem) clamp(1rem, 4vw, 2rem) 3rem;
  max-width: 46rem;
  margin: 0 auto;
  min-height: 60vh;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--gold-line);
}

.page-header h1 {
  font-family: "Cormorant Infant", serif;
  font-weight: 700;
  font-size: clamp(1.85rem, 4.5vw, 2.5rem);
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
  color: #fff;
  position: relative;
  padding-bottom: 0.55rem;
}

.page-header h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3.35rem;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(212, 184, 100, 0.12) 100%);
}

.page-header .page-lead {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.55;
  font-size: 1.05rem;
}

.zapovedi-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: zap;
}

.zapovedi-list > li {
  counter-increment: zap;
  margin-bottom: 1.75rem;
  padding: 1.1rem 1.15rem;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 6px;
  border-left: 3px solid rgba(212, 180, 95, 0.72);
  box-shadow: inset 2px 0 0 0 rgba(107, 20, 30, 0.35);
}

.zapovedi-list > li::before {
  content: counter(zap) ".";
  font-family: "Cormorant Infant", serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
  display: block;
  margin-bottom: 0.35rem;
}

.zapovedi-list .zapoved-text {
  margin: 0;
  line-height: 1.6;
  color: var(--text);
  font-weight: 700;
}

.zapovedi-list .zapoved-comment {
  margin: 0.45rem 0 0;
  line-height: 1.55;
  color: var(--text-dim);
  font-size: 0.98rem;
}

.zapovedi-postscript {
  margin-top: 2.5rem;
  padding: 1.25rem 1.15rem;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-dim);
}

.zapovedi-postscript strong {
  color: var(--text);
}

.member-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.member-card {
  position: relative;
  padding: 1.15rem 1.2rem;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 6px;
  border: 1px solid rgba(212, 184, 100, 0.14);
}

.member-card--link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.member-card--link:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 184, 100, 0.28);
  background: rgba(0, 0, 0, 0.26);
}

.member-card--link:focus-visible {
  outline: 2px solid rgba(212, 184, 100, 0.55);
  outline-offset: 3px;
}

.member-card.is-excluded,
.member-card--link.is-excluded {
  opacity: 0.78;
  filter: grayscale(0.25);
}

.member-card__stamp {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  transform: rotate(-10deg);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 120, 120, 0.35);
  background: rgba(0, 0, 0, 0.32);
  color: rgba(255, 190, 170, 0.95);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.members-empty {
  margin: 1rem 0 0;
  padding: 1.15rem;
  text-align: center;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px dashed var(--gold-edge);
}

.members-pagination {
  margin: 1.1rem 0 0;
}

.members-pagination__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--gold-edge);
  border-radius: 8px;
}

.members-page-btn {
  font: inherit;
  font-size: 0.88rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  cursor: pointer;
}

.members-page-btn:hover:not(:disabled) {
  border-color: var(--gold-line);
  color: #fff;
}

.members-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.members-page-nums {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.members-page-num {
  min-width: 2.1rem;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.85rem;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}

.members-page-num:hover:not(.is-current) {
  color: var(--text);
  border-color: var(--gold-edge);
}

.members-page-num.is-current {
  color: #fff;
  font-weight: 700;
  border-color: var(--gold-line);
  background: rgba(107, 15, 20, 0.4);
  cursor: default;
}

.members-page-ellipsis {
  color: var(--text-dim);
  padding: 0 0.2rem;
  user-select: none;
}

.members-page-info {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-left: auto;
}

@media (min-width: 720px) {
  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .member-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.member-card h2 {
  font-family: "Cormorant Infant", serif;
  font-size: 1.25rem;
  margin: 0 0 0.4rem;
  color: #fff;
}

.member-card p {
  margin: 0;
  line-height: 1.55;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.member-card__badge {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(232, 208, 150, 0.92);
  margin-bottom: 0.35rem;
}

.vote-intro {
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.vote-fieldset {
  border: 1px solid rgba(212, 184, 100, 0.2);
  border-radius: 8px;
  padding: 1rem 1.15rem 1.25rem;
  margin: 0 0 1.25rem;
  background: rgba(0, 0, 0, 0.18);
}

.vote-fieldset legend {
  padding: 0 0.5rem;
  font-weight: 700;
  color: var(--text);
}

.vote-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.75rem 0 0;
}

.vote-options label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  line-height: 1.45;
  color: var(--text-dim);
  padding: 0.5rem 0.6rem;
  border-radius: 4px;
}

.vote-options label:hover {
  background: rgba(255, 255, 255, 0.05);
}

.vote-options input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.vote-options .vote-name {
  font-weight: 700;
  color: var(--text);
}

.vote-status {
  min-height: 2.5em;
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.requisites-box {
  margin-top: 1.5rem;
  padding: 1.25rem 1.35rem;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 8px;
  border: 1px solid var(--gold-line);
}

.requisites-box h2 {
  font-family: "Cormorant Infant", serif;
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

.requisites-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.requisites-table th,
.requisites-table td {
  text-align: left;
  padding: 0.55rem 0.65rem 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.requisites-table th {
  color: var(--text-dim);
  font-weight: 400;
  width: 38%;
  max-width: 11rem;
}

.requisites-table td {
  color: var(--text);
  word-break: break-word;
}

.requisites-placeholder {
  color: #c99;
  font-style: italic;
}

.help-note {
  margin-top: 1.75rem;
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-dim);
  background: rgba(100, 30, 40, 0.2);
  border-radius: 6px;
}

/* ——— Сбор ХРПОТ (ЮMoney) ——— */
.page-main--fundraise {
  position: relative;
  isolation: isolate;
  max-width: min(58rem, 100%);
  padding-left: clamp(1rem, 4vw, 2.25rem);
  padding-right: clamp(1rem, 4vw, 2.25rem);
}

/* Фон: золотистая голова (SVG), масштаб от viewport, без участия в кликах */
.page-main--fundraise::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("/assets/images/lenin-fundraise-bg.svg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center min(18vh, 6rem);
  background-size: min(118vmin, 52rem) auto;
  opacity: 0.2;
  mix-blend-mode: soft-light;
}

@media (max-width: 639px) {
  .page-main--fundraise::before {
    background-position: center min(12vh, 3rem);
    background-size: min(135vmin, 100vw) auto;
    opacity: 0.16;
  }
}

@media (prefers-contrast: more) {
  .page-main--fundraise::before {
    opacity: 0.09;
    mix-blend-mode: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-main--fundraise::before {
    background-attachment: scroll;
  }
}

.page-main--fundraise > * {
  position: relative;
  z-index: 1;
}

/* ——— 10 заповедей — фон (SVG) ——— */
.page-main--zapovedi {
  position: relative;
  isolation: isolate;
}

.page-main--zapovedi::before {
  content: "";
  /* Фон на весь viewport (не обрезается шириной page-main) */
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("/assets/images/zapovedi-bg.svg");
  background-repeat: no-repeat;
  background-position: center min(14vh, 5rem);
  /* Не обрезаем края: вписываем целиком по экрану */
  background-size: contain;
  opacity: 0.12;
  mix-blend-mode: soft-light;
  filter: saturate(0.9);
}

@media (max-width: 639px) {
  .page-main--zapovedi::before {
    background-position: center min(10vh, 3rem);
    background-size: min(165vmin, 100vw) auto;
    opacity: 0.1;
  }
}

@media (prefers-contrast: more) {
  .page-main--zapovedi::before {
    opacity: 0.06;
    mix-blend-mode: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-main--zapovedi::before {
    opacity: 0.1;
  }
}

.page-main--zapovedi > * {
  position: relative;
  z-index: 1;
}

/* ——— Катехизис — фон (SVG) ——— */
.page-main--catechism {
  position: relative;
  isolation: isolate;
}

.page-main--catechism::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("/assets/images/katekhizis-bg.svg");
  background-repeat: no-repeat;
  background-position: center min(14vh, 5rem);
  background-size: contain;
  opacity: 0.09;
  mix-blend-mode: soft-light;
  filter: saturate(0.92);
}

@media (max-width: 639px) {
  .page-main--catechism::before {
    background-position: center min(10vh, 3rem);
    opacity: 0.075;
  }
}

@media (prefers-contrast: more) {
  .page-main--catechism::before {
    opacity: 0.05;
    mix-blend-mode: normal;
  }
}

.page-main--catechism > * {
  position: relative;
  z-index: 1;
}

.fundraise-section {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
}

.fundraise-copy {
  width: 100%;
  max-width: none;
}

.fundraise-section__title {
  font-family: "Cormorant Infant", serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
  color: var(--gold-soft);
  border-bottom: 1px solid var(--gold-line);
  padding-bottom: 0.65rem;
}

.fundraise-prose {
  font-size: clamp(1.03rem, 1.5vw, 1.12rem);
  line-height: 1.78;
  color: var(--text);
  max-width: none;
}

.fundraise-prose p {
  margin: 0 0 1.15rem;
}

.fundraise-prose p:last-child {
  margin-bottom: 0;
}

.fundraise-prose strong {
  color: var(--gold-soft);
  font-weight: 700;
}

.fundraise-epigraph {
  margin: 0 0 1.5rem;
  padding: 1.2rem 1.25rem 1.2rem 1.35rem;
  border-left: 3px solid var(--gold);
  background: rgba(212, 180, 92, 0.08);
  font-family: "Cormorant Infant", serif;
  font-size: clamp(1.15rem, 2.2vw, 1.38rem);
  font-style: italic;
  line-height: 1.62;
  color: var(--text);
}

.fundraise-widget-wrap {
  width: 100%;
  margin: 0;
  padding: clamp(1.15rem, 3vw, 1.75rem);
  background: rgba(0, 0, 0, 0.28);
  border-radius: 12px;
  border: 1px solid var(--gold-line);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.fundraise-widget__title {
  font-family: "Cormorant Infant", serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 2.8vw, 1.55rem);
  margin: 0 0 0.5rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.fundraise-widget-wrap .fundraise-caption {
  margin: 0 0 1.1rem;
  font-size: 0.98rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 42rem;
}

.fundraise-widget-frame {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  line-height: 0;
}

.fundraise-widget {
  width: 100%;
  max-width: 560px;
  height: clamp(520px, 72vh, 720px);
  margin: 0 auto;
  display: block;
  border: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.fundraise-cta {
  margin-top: 1rem;
  text-align: center;
}

.fundraise-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--bg-black);
  background: linear-gradient(180deg, var(--gold-soft) 0%, var(--gold) 100%);
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid var(--gold-line);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.fundraise-cta a:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.fundraise-cta a:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

.site-nav__list a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
}

/* ——— Галерея фотоархива ——— */

.gallery-lead {
  margin: 0 0 1.5rem;
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 1.05rem;
}

.gallery-montage {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.gallery-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.gallery-card {
  margin: 0;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  border: 1px solid var(--gold-edge);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 80px;
  flex: 0 0 auto;
}

.gallery-card__tile {
  position: relative;
  display: block;
}

.gallery-card__trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  cursor: zoom-in;
  overflow: hidden;
  background: #0a0405;
  color: inherit;
  font: inherit;
  text-align: left;
}

.gallery-card__trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.gallery-card__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1.25;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-card:hover .gallery-card__overlay,
.gallery-card:focus-within .gallery-card__overlay {
  opacity: 1;
}

.gallery-card__trigger:hover img,
.gallery-card__trigger:focus img {
  transform: scale(1.04);
  filter: brightness(1.08);
}

.gallery-card__trigger:focus-visible {
  outline: 2px solid rgba(212, 184, 100, 0.55);
  outline-offset: 2px;
}

body.gallery-lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top, 0.5rem) env(safe-area-inset-right, 0.5rem) env(safe-area-inset-bottom, 0.5rem)
    env(safe-area-inset-left, 0.5rem);
}

.gallery-lightbox.gallery-lightbox--open {
  display: flex !important;
}

.gallery-pagination {
  margin: 0 0 1.25rem;
}

.gallery-pagination__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--gold-edge);
  border-radius: 8px;
}

.gallery-page-btn {
  font: inherit;
  font-size: 0.88rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  cursor: pointer;
}

.gallery-page-btn:hover:not(:disabled) {
  border-color: var(--gold-line);
  color: #fff;
}

.gallery-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gallery-page-nums {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.gallery-page-num {
  min-width: 2.1rem;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.85rem;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}

.gallery-page-num:hover:not(.is-current) {
  color: var(--text);
  border-color: var(--gold-edge);
}

.gallery-page-num.is-current {
  color: #fff;
  font-weight: 700;
  border-color: var(--gold-line);
  background: rgba(107, 15, 20, 0.4);
  cursor: default;
}

.gallery-page-ellipsis {
  color: var(--text-dim);
  padding: 0 0.2rem;
  user-select: none;
}

.gallery-page-info {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-left: auto;
}

@media (max-width: 560px) {
  .gallery-page-info {
    width: 100%;
    margin-left: 0;
  }
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}

.gallery-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 1200px);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--gold-line);
  background: var(--section-bg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.gallery-lightbox__close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox__close:hover {
  border-color: var(--gold-line);
  color: #fff;
}

.gallery-lightbox__img-wrap {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.25rem 0.25rem 0.25rem;
}

.gallery-lightbox__img-wrap img {
  max-width: 100%;
  /* Картинка не должна выдавливать описание: держим верхний лимит. */
  max-height: min(62vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}

.gallery-lightbox__caption {
  margin: 0.5rem 0.15rem 0.25rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  /* Длинные тексты — скроллим внутри caption, ниже картинки */
  max-height: 26vh;
  overflow: auto;
  overscroll-behavior: contain;
}

.gallery-card__meta {
  padding: 0.5rem 0.65rem 0.65rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.gallery-card__title {
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 0.2rem;
}

.gallery-card__cap {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  line-height: 1.35;
  opacity: 0.92;
}

.gallery-empty {
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px dashed var(--gold-edge);
}

@media (min-width: 720px) {
  .gallery-montage {
    gap: 0.65rem;
  }
  .gallery-row {
    gap: 0.65rem;
  }
}

/* ——— Админка (минимальные доп. стили) ——— */

.admin-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-body > .site-nav {
  flex-shrink: 0;
}

.admin-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.admin-shell .page-main.admin-wrap {
  flex: 1 0 auto;
}

.admin-shell .site-footer.admin-footer {
  flex-shrink: 0;
  margin-top: auto;
}

.admin-footer .site-footer__inner {
  padding: 1.25rem clamp(1rem, 4vw, 2rem);
}

.admin-footer .site-footer__figure {
  margin: 0 auto 0.5rem;
}

.admin-wrap {
  max-width: 56rem;
  width: 100%;
}

.admin-appbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  background: linear-gradient(180deg, rgba(36, 12, 16, 0.98) 0%, rgba(28, 9, 12, 0.94) 100%);
  border: 1px solid var(--gold-line);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

.admin-appbar__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.admin-tab {
  font: inherit;
  font-size: 0.88rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-dim);
  cursor: pointer;
}

.admin-tab:hover {
  color: var(--text);
  border-color: var(--gold-edge);
}

.admin-tab--active,
.admin-tab[aria-selected="true"] {
  color: #fff;
  border-color: var(--gold-line);
  background: rgba(107, 15, 20, 0.45);
}

.admin-appbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.admin-btn-secondary {
  background: linear-gradient(180deg, #3a2830 0%, #221418 100%) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

.admin-btn-logout {
  font: inherit;
  font-size: 0.88rem;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 120, 120, 0.35);
}

.admin-btn-logout:hover {
  border-color: rgba(255, 160, 140, 0.55);
  background: rgba(80, 20, 24, 0.35);
}

.admin-toolbar-hint {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-dim);
}

.admin-toolbar-hint code {
  font-size: 0.78rem;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
}

/* Экран входа: блок по центру по вертикали */
.admin-wrap:has(#login-section:not([hidden])) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(1.5rem, 5vh, 3rem);
  padding-bottom: clamp(1.5rem, 5vh, 3rem);
}

.admin-wrap:has(#login-section:not([hidden])) .admin-page-header {
  text-align: center;
  border-bottom: none;
  padding-bottom: 0.75rem;
  margin-bottom: 0.25rem;
}

.admin-wrap:has(#login-section:not([hidden])) .admin-page-header h1::after {
  left: 50%;
  transform: translateX(-50%);
}

.admin-wrap:has(#login-section:not([hidden])) .admin-page-lead {
  margin: 0 auto 1.25rem;
  max-width: 36rem;
}

.admin-login,
.admin-panel {
  margin-top: 1rem;
}

.admin-wrap:has(#login-section:not([hidden])) .admin-login {
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 22rem;
  padding: 1.6rem 1.4rem 1.5rem;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--gold-line);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.admin-login-form {
  margin: 0;
}

.admin-login-actions {
  margin: 1.1rem 0 0;
}

.admin-login-submit {
  width: 100%;
}

.admin-login-status {
  margin: 0.85rem 0 0;
  min-height: 1.35em;
}

.admin-login label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.admin-login input[type="password"] {
  width: 100%;
  max-width: none;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  box-sizing: border-box;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.admin-status {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.admin-field {
  margin-bottom: 1.15rem;
}

.admin-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--text);
}

.admin-field input[type="text"],
.admin-field textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.admin-field textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.admin-field textarea.admin-textarea--code {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  min-height: 8rem;
}

.admin-fieldset {
  margin: 2rem 0;
  padding: 1rem 1.1rem 1.25rem;
  border: 1px solid var(--gold-line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}

.admin-fieldset legend {
  padding: 0 0.5rem;
  font-family: "Cormorant Infant", serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
}

.admin-faq-row {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gold-edge);
}

.admin-faq-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.admin-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.admin-gallery-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-gallery-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.65rem;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 6px;
  border: 1px solid var(--gold-edge);
}

.admin-gallery-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.admin-gallery-item__text {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.admin-gallery-item__actions {
  flex-shrink: 0;
}

/* ——— Админка: список членов ——— */
.admin-members-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.admin-member-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  border: 1px solid var(--gold-edge);
}

.admin-member-row__main {
  flex: 1;
  min-width: 14rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.35;
}

.admin-member-row__main strong {
  color: #fff;
}

.admin-member-row__meta {
  font-size: 0.82rem;
  color: var(--text-dim);
  opacity: 0.95;
}

.admin-member-row__actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

/* ——— Биоблия ——— */

.page-main--biobliya {
  max-width: 40rem;
}

.page-main--biobliya {
  position: relative;
  isolation: isolate;
}

.page-main--biobliya::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("/assets/images/biobliya-bg.svg");
  background-repeat: no-repeat;
  background-position: center min(14vh, 5rem);
  background-size: contain;
  opacity: 0.085;
  mix-blend-mode: soft-light;
  filter: saturate(0.92);
}

@media (max-width: 639px) {
  .page-main--biobliya::before {
    background-position: center min(10vh, 3rem);
    opacity: 0.07;
  }
}

@media (prefers-contrast: more) {
  .page-main--biobliya::before {
    opacity: 0.05;
    mix-blend-mode: normal;
  }
}

.page-main--biobliya > * {
  position: relative;
  z-index: 1;
}

.biobliya {
  margin: 0;
  padding: 0;
}

.biobliya-chapter {
  margin: 2.25rem 0 0;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--gold-line);
}

.biobliya-chapter:first-of-type {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
}

.biobliya-chapter h2 {
  font-family: "Cormorant Infant", serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  margin: 0 0 1.1rem;
  letter-spacing: 0.03em;
  color: #fff;
}

.biobliya-verse {
  margin: 0.65rem 0 0;
  line-height: 1.75;
  color: var(--text-dim);
  border-left: 2px solid rgba(212, 184, 100, 0.25);
  padding-left: 0.85rem;
}

.biobliya-verse:first-of-type {
  margin-top: 0;
}

.biobliya-vn {
  display: inline-block;
  min-width: 1.75em;
  margin-right: 0.35rem;
  font-size: 0.82em;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  opacity: 0.88;
  vertical-align: baseline;
  user-select: none;
}

.biobliya-verse--closing {
  margin-top: 1rem;
  color: var(--text);
}

/* ——— Страница катехизиса ——— */

.page-main--catechism {
  max-width: 44rem;
}

.catechism-hero-figure {
  margin: 0 0 1rem;
}

.catechism-hero-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(62vh, 520px);
  object-fit: contain;
  margin: 0 auto;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
}

.catechism-article {
  margin: 0;
  padding: 0;
}

.catechism-part {
  margin: 2rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--gold-line);
}

.catechism-part:first-of-type {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
}

.catechism-part__title {
  font-family: "Cormorant Infant", serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 3.2vw, 1.45rem);
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: #fff;
}

.catechism-qa {
  margin: 0 0 1.15rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  border-left: 3px solid rgba(212, 180, 95, 0.55);
}

.catechism-qa:last-child {
  margin-bottom: 0;
}

.catechism-q {
  font-weight: 700;
  font-size: 1.02rem;
  margin: 0 0 0.5rem;
  line-height: 1.45;
  color: var(--text);
}

.catechism-a {
  margin: 0;
  line-height: 1.65;
  color: var(--text-dim);
}

.biobliya-chapter--amen {
  margin-top: 2.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gold-line);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, transparent 100%);
  border-radius: 0 0 8px 8px;
  margin-left: -0.35rem;
  margin-right: -0.35rem;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
  padding-bottom: 0.5rem;
}
