/* ============ MON ROI — королевский эмо-кор ============ */
/* Палитра: темнота залов, свечное золото, пергамент, сургуч */
:root {
  --ink: #0b0806;
  --ink-soft: #14100b;
  --candle: #e8c06a;
  --gold-dim: #8a6b35;
  --parchment: #e9ddc8;
  --parchment-dim: #b3a68c;
  --wax: #9e2b25;
  --wax-dark: #6e1d19;
  --teal: #2e5c66;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--parchment);
  font-family: 'Cormorant', Georgia, serif;
  font-size: 19px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

::selection { background: var(--wax); color: var(--parchment); }

/* ---------- шапка ---------- */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .5s ease, transform .5s ease, background .5s ease;
  pointer-events: none;
}
.top.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(11,8,6,.92), rgba(11,8,6,.72) 70%, transparent);
}
.top .mark {
  font-family: 'Prata', serif;
  font-size: 20px;
  letter-spacing: .14em;
  color: var(--candle);
  text-decoration: none;
}
.top nav { display: flex; gap: 26px; }
.top nav a {
  color: var(--parchment-dim);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: color .25s;
}
.top nav a:hover, .top nav a:focus-visible { color: var(--candle); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--candle);
  outline-offset: 3px;
}

/* ---------- герой: скролл-скраб ---------- */
.hero { height: 480vh; position: relative; }
.hero-stick {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.hero-stick canvas,
.hero-stick .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}
.hero-hint {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  text-align: center;
  z-index: 3;
  transition: opacity .6s ease;
}
.hero-hint .l1 {
  font-size: 15px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--candle);
  text-shadow: 0 2px 14px rgba(0,0,0,.8);
}
.hero-hint .arr {
  width: 1px;
  height: 46px;
  margin: 14px auto 0;
  background: linear-gradient(var(--candle), transparent);
  animation: drip 2.2s ease-in-out infinite;
}
@keyframes drip {
  0%, 100% { transform: scaleY(.4); transform-origin: top; opacity: .4; }
  50% { transform: scaleY(1); opacity: 1; }
}
.hero-veil {
  position: absolute;
  inset: auto 0 0 0;
  height: 26vh;
  z-index: 2;
  background: linear-gradient(180deg, transparent, var(--ink));
  pointer-events: none;
}

/* ---------- день рождения: поздравление на главном экране ---------- */
/* Панель висит поверх баннера, под шапкой. Показывает её main.js по календарю,
   назавтра она так же сама уходит. */
.prazdnik {
  position: absolute;
  left: 50%;
  top: 26px;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 28px);
  width: min(660px, 92vw);
  padding: 20px clamp(20px, 3vw, 34px);
  text-align: center;
  border: 1px solid rgba(232,192,106,.34);
  background:
    radial-gradient(ellipse 80% 130% at 50% 0%, rgba(232,192,106,.16), transparent 72%),
    linear-gradient(165deg, rgba(20,16,11,.9), rgba(11,8,6,.84));
  box-shadow: 0 26px 70px rgba(0,0,0,.55);
}
.prazdnik[hidden] { display: none; }
.prazdnik-nadpis {
  position: relative;
  z-index: 1;
  font-family: 'Prata', serif;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.24;
  color: var(--candle);
  animation: mertsanie 3.6s ease-in-out infinite;
}
@keyframes mertsanie {
  0%, 100% { text-shadow: 0 0 24px rgba(232,192,106,.28); }
  50% { text-shadow: 0 0 34px rgba(232,192,106,.6); }
}
/* видео вертикальное и короткое: идёт по кругу, без звука и без кнопок.
   Доля задана заранее, чтобы полоса не дёрнулась, когда ролик догрузится. */
.prazdnik-kino {
  position: relative;
  z-index: 1;
  flex: none;
  width: clamp(78px, 8vw, 96px);
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border: 1px solid rgba(232,192,106,.34);
}
.prazdnik-kino[hidden] { display: none; }

/* золотые искры: два слоя звёздной пыли поднимаются с разной скоростью */
.iskry {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.iskry::before, .iskry::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2.4px 2.4px at 18% 22%, rgba(255,236,190,.95), transparent 62%),
    radial-gradient(1.8px 1.8px at 72% 10%, rgba(232,192,106,.9), transparent 62%),
    radial-gradient(3px 3px at 44% 62%, rgba(255,236,190,.8), transparent 62%),
    radial-gradient(1.8px 1.8px at 88% 46%, rgba(232,192,106,.95), transparent 62%),
    radial-gradient(2.4px 2.4px at 8% 84%, rgba(255,236,190,.7), transparent 62%),
    radial-gradient(1.6px 1.6px at 58% 88%, rgba(232,192,106,.8), transparent 62%),
    radial-gradient(2px 2px at 30% 44%, rgba(255,236,190,.6), transparent 62%);
  background-size: 150px 150px;
  animation: iskry 13s linear infinite;
}
.iskry::after {
  opacity: .6;
  animation: iskry-daleko 21s linear infinite;
}
@keyframes iskry {
  from { background-position: 0 0; }
  to { background-position: 0 -150px; }
}
@keyframes iskry-daleko {
  from { background-position: 74px 40px; }
  to { background-position: 74px -110px; }
}

/* ---------- отсчёт до релиза ---------- */
.otschet {
  position: relative;
  padding: clamp(46px, 9vh, 96px) 24px;
  text-align: center;
  border-top: 1px solid rgba(232,192,106,.2);
  border-bottom: 1px solid rgba(232,192,106,.2);
  background:
    radial-gradient(ellipse 60% 120% at 50% 50%, rgba(232,192,106,.09), transparent 70%),
    linear-gradient(180deg, var(--ink), var(--ink-soft) 50%, var(--ink));
}
.otschet-in { width: min(700px, 100%); margin: 0 auto; }
.otschet-nad {
  font-size: 14px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-dim);
}
.otschet-pesnya {
  font-family: 'Prata', serif;
  font-size: clamp(27px, 3.6vw, 46px);
  line-height: 1.2;
  color: var(--candle);
  margin-top: 12px;
}
.otschet-tablo {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 1.6vw, 20px);
  margin-top: clamp(26px, 3.4vw, 44px);
}
.otschet-tablo[hidden] { display: none; }
.tablo-yach {
  padding: clamp(14px, 1.8vw, 24px) 8px;
  border: 1px solid rgba(232,192,106,.3);
  background: linear-gradient(165deg, rgba(20,16,11,.92), rgba(11,8,6,.86));
  box-shadow: 0 18px 50px rgba(0,0,0,.4);
}
.tablo-cifra {
  display: block;
  font-family: 'Prata', serif;
  font-size: clamp(28px, 7vw, 52px);
  line-height: 1;
  color: var(--parchment);
  font-variant-numeric: tabular-nums; /* цифры одной ширины — табло не дёргается */
}
.tablo-podpis {
  display: block;
  margin-top: 12px;
  font-size: clamp(9px, 1.1vw, 12px);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--parchment-dim);
}
.otschet-vyshla {
  margin-top: clamp(26px, 3.4vw, 44px);
  font-family: 'Prata', serif;
  font-size: clamp(24px, 3vw, 38px);
  color: var(--parchment);
}

/* ---------- манифест ---------- */
.manifest {
  position: relative;
  padding: 21vh 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(232,192,106,.07), transparent),
    var(--ink);
}
.manifest h1 {
  font-family: 'Prata', serif;
  font-weight: 400;
  font-size: clamp(34px, 6.4vw, 88px);
  line-height: 1.14;
  color: var(--parchment);
}
.manifest h1 em {
  font-style: normal;
  color: var(--candle);
}
.manifest .sub {
  margin-top: 30px;
  font-size: clamp(19px, 2vw, 24px);
  color: var(--parchment-dim);
  font-style: italic;
}
.manifest .story {
  max-width: 620px;
  margin: 56px auto 0;
  font-size: 21px;
  color: var(--parchment-dim);
}
.manifest .story b { color: var(--parchment); font-weight: 600; }

/* орнаментальный разделитель */
.orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 auto 42px;
  color: var(--gold-dim);
}
.orn::before, .orn::after {
  content: "";
  height: 1px;
  width: min(160px, 22vw);
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}
.orn::after { background: linear-gradient(270deg, transparent, var(--gold-dim)); }
.orn svg { flex: none; }

/* ---------- залы участников ---------- */
.hall {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 14vh 0;
}
.hall-bg {
  position: absolute;
  inset: -12% 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  z-index: 0;
}
.hall-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--ink) 0%, transparent 18%, transparent 82%, var(--ink) 100%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 30%, rgba(11,8,6,.72));
}
.hall:not(.flip) .hall-bg::after {
  background:
    linear-gradient(90deg, transparent 34%, rgba(11,8,6,.66) 72%),
    linear-gradient(180deg, var(--ink) 0%, transparent 18%, transparent 82%, var(--ink) 100%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 30%, rgba(11,8,6,.6));
}
.hall.flip .hall-bg::after {
  background:
    linear-gradient(270deg, transparent 34%, rgba(11,8,6,.66) 72%),
    linear-gradient(180deg, var(--ink) 0%, transparent 18%, transparent 82%, var(--ink) 100%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 30%, rgba(11,8,6,.6));
}

/* табличка зала: текст на приглушённой панели */
.hall-text {
  background: linear-gradient(165deg, rgba(11,8,6,.72), rgba(20,16,11,.6));
  -webkit-backdrop-filter: blur(9px) saturate(.92);
  backdrop-filter: blur(9px) saturate(.92);
  border: 1px solid rgba(232,192,106,.22);
  padding: clamp(28px, 3.4vw, 52px);
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
}
.hall-in {
  position: relative;
  z-index: 1;
  width: min(1180px, 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: clamp(28px, 5vw, 84px);
  align-items: center;
}
.hall.flip .hall-in { grid-template-columns: 1fr 380px; }
.hall.flip .hall-foto { order: 2; }

.hall-card {
  position: relative;
  border: 1px solid rgba(232,192,106,.36);
  padding: 10px;
  background: rgba(11,8,6,.55);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.hall-card::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(232,192,106,.18);
  pointer-events: none;
}
.hall-card img { width: 100%; }
.hall-card figcaption {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 13px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--parchment);
  background: rgba(11,8,6,.72);
  padding: 6px 14px;
  border: 1px solid rgba(232,192,106,.3);
}

/* ---------- печать с тайным именем ---------- */
/* Печать сидит на нижнем крае снимка, будто им прихватили фотографию к странице.
   Записка выходит из-под воска вверх, по низу карточки — лицо остаётся открытым. */
/* правый нижний угол занят воском, поэтому подпись зала уходит к левому краю */
.hall-card:has(.tayna) figcaption { left: 14px; transform: none; }
.tayna {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
}
.pechat {
  position: absolute;
  right: 14px;
  bottom: -16px; /* сходит с края карточки на страницу */
  z-index: 1;    /* воск лежит поверх записки */
  display: block;
  width: clamp(80px, 23vw, 92px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%; /* обводка при выборе с клавиатуры идёт по кругу воска */
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.6));
  transition: transform .35s ease, filter .35s ease;
}
/* целый и сломанный воск лежат в одном квадрате, друг на друге */
.pechat img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .3s ease;
}
/* подсветка при наведении — единственный намёк, что с печатью можно повозиться */
.pechat:hover, .pechat:focus-visible {
  transform: scale(1.08);
  filter: drop-shadow(0 4px 14px rgba(232,192,106,.55));
}
/* в покое печать целая, половинки ждут своей очереди */
.pechat-slomannaya { opacity: 0; }
.tayna.slomana .pechat-tselaya { opacity: 0; }
.tayna.slomana .pechat-slomannaya { opacity: 1; }

/* записка: клочок старинной бумаги, что лежал под печатью */
.tayna-imya {
  position: absolute;
  right: 40px;
  bottom: 16px; /* нижний угол уходит в разлом, под нижнюю половину воска */
  max-width: min(230px, 74vw);
  /* справа поле пошире: этим краем бумага ныряет под воск, имя туда не заезжает */
  padding: 15px 78px 17px 20px;
  text-align: center;
  font-style: italic;
  font-weight: 500;
  font-size: 21px;
  line-height: 1.24;
  letter-spacing: .02em;
  color: #402c14;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.55));
  /* тянем записку за тот угол, что торчит из разлома */
  transform-origin: 100% 100%;
  /* спрятанное имя не найдёт ни поиск по странице, ни экранный диктор */
  visibility: hidden;
  opacity: 0;
  transform: translateY(16px) rotate(28deg) scale(.96);
  transition: opacity .5s ease .18s, transform .5s ease .18s;
}
/* сама бумага: состаренная, с неровным рваным краем */
.tayna-imya::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 90% at 86% 88%, rgba(112,72,28,.4), transparent 72%),
    radial-gradient(40% 70% at 32% 96%, rgba(126,88,38,.26), transparent 70%),
    radial-gradient(64% 80% at 14% 6%, rgba(255,249,228,.6), transparent 72%),
    linear-gradient(168deg, #e7dab6, #d6c398 56%, #bfa87a);
  clip-path: polygon(0% 0.5%, 12.5% 7.5%, 25% 1.5%, 37.5% 6.9%, 50% 1.7%, 62.5% 2.7%,
    75% 4.8%, 87.5% 2.4%, 100% 2.6%, 98.7% 33.3%, 98% 66.7%, 98% 100%, 87.5% 97.7%,
    75% 98.5%, 62.5% 92.5%, 50% 94.4%, 37.5% 99.6%, 25% 99.6%, 12.5% 97.9%, 0% 99.8%,
    1% 66.7%, 1.7% 33.3%);
}
.tayna.slomana .tayna-imya {
  visibility: visible;
  opacity: 1;
  transform: rotate(28deg);
}

.hall-eyebrow {
  font-size: 14px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--candle);
  margin-bottom: 16px;
}
.hall-name {
  font-family: 'Prata', serif;
  font-weight: 400;
  font-size: clamp(46px, 7vw, 96px);
  line-height: 1;
  color: var(--parchment);
  margin-bottom: 6px;
}
.hall-role {
  font-size: 21px;
  font-style: italic;
  color: var(--parchment-dim);
  margin-bottom: 34px;
}

/* тихая строка про день рождения: место занимает, только когда её показали */
.dr-stroka {
  margin-bottom: 28px;
  font-size: 14px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-dim);
}
.dr-stroka[hidden] { display: none; }
.dr-stroka.segodnya { color: var(--candle); }

.ledger {
  border-top: 1px solid rgba(232,192,106,.28);
  max-width: 460px;
}
.ledger div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(232,192,106,.14);
  font-size: 17px;
}
.ledger dt {
  color: var(--parchment-dim);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 13.5px;
  padding-top: 3px;
}
.ledger dd { color: var(--parchment); text-align: right; }

.hall-quote {
  margin-top: 36px;
  max-width: 520px;
  font-size: clamp(22px, 2.4vw, 30px);
  font-style: italic;
  line-height: 1.45;
  color: var(--candle);
}
.hall-quote::before { content: "« "; color: var(--gold-dim); }
.hall-quote::after { content: " »"; color: var(--gold-dim); }

/* ---------- мини-галерея участника ---------- */
.hall-card.klik { cursor: pointer; transition: border-color .3s; }
.hall-card.klik:hover, .hall-card.klik:focus-visible { border-color: rgba(232,192,106,.7); }
.mini-gal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.mini-kadr {
  width: 62px;
  height: 84px;
  padding: 3px;
  border: 1px solid rgba(232,192,106,.36);
  background: rgba(11,8,6,.55);
  cursor: pointer;
  transition: border-color .25s, transform .25s;
}
.mini-kadr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
  transition: opacity .25s;
}
.mini-kadr:hover, .mini-kadr:focus-visible {
  border-color: rgba(232,192,106,.8);
  transform: translateY(-2px);
}
.mini-kadr:hover img, .mini-kadr:focus-visible img { opacity: 1; }

/* ---------- просмотр фотографий ---------- */
.prosmotr {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prosmotr[hidden] { display: none; }
.prosmotr-fon {
  position: absolute;
  inset: 0;
  background: rgba(11,8,6,.94);
}
.prosmotr-telo {
  position: relative;
  z-index: 1;
  max-width: min(88vw, 820px);
  border: 1px solid rgba(232,192,106,.36);
  background: rgba(11,8,6,.75);
  padding: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.prosmotr-telo img {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  margin: 0 auto;
}
.prosmotr-telo figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 12px 6px 4px;
  font-style: italic;
  font-size: 17px;
  color: var(--parchment-dim);
}
.prosmotr-schet {
  font-style: normal;
  font-size: 13px;
  letter-spacing: .2em;
  color: var(--gold-dim);
  white-space: nowrap;
}
.prosmotr-knopka {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(232,192,106,.36);
  background: rgba(11,8,6,.6);
  color: var(--candle);
  font-family: 'Prata', serif;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .25s, background .25s;
}
.prosmotr-knopka:hover, .prosmotr-knopka:focus-visible {
  border-color: rgba(232,192,106,.8);
  background: rgba(232,192,106,.08);
}
.prosmotr-nazad { left: 20px; top: 50%; transform: translateY(-50%); }
.prosmotr-vpered { right: 20px; top: 50%; transform: translateY(-50%); }
.prosmotr-zakryt { top: 20px; right: 20px; width: 46px; height: 46px; font-size: 24px; }

/* ---------- маршрут: станции-клипы ---------- */
/* Старинная схема пути: рельсы со шпалами, на них круглые станции со знаками.
   На компьютере путь идёт вправо и переносится рядами, на телефоне — сверху вниз.
   Рельсы рисует каждая станция сама: половину к прошлой станции, половину к следующей. */
.marshrut {
  position: relative;
  padding: 16vh 24px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 45%, rgba(232,192,106,.06), transparent),
    var(--ink);
}
/* под схемой старинная карта: приглушена, чтобы не спорить с золотом вывесок,
   края растворяются в темноте страницы. На узком телефоне кадрируется по центру */
.marshrut-fon {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .45;
  -webkit-mask-image: radial-gradient(ellipse 70% 50%, #000 40%, transparent);
  mask-image: radial-gradient(ellipse 70% 50%, #000 40%, transparent);
}
.marshrut-in { position: relative; max-width: 1080px; margin: 0 auto; }
.put {
  --kuda: 90deg; /* куда идёт путь: вправо */
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  row-gap: 64px;
}
.stantsiya {
  position: relative;
  padding: 0 22px;
  text-align: center;
}
.stantsiya::before, .stantsiya::after {
  content: "";
  position: absolute;
  top: 44px; /* по центру кружка станции */
  height: 8px;
  transform: translateY(-50%);
  border-block: 1px solid rgba(232,192,106,.6);
  background: repeating-linear-gradient(var(--kuda), rgba(232,192,106,.45) 0 1px, transparent 1px 9px);
}
.stantsiya::before { left: 0; right: 50%; }
.stantsiya::after { left: 50%; right: 0; }
/* путь начинается с первой станции, а не из-за края */
.stantsiya:first-child::before { content: none; }
/* где группа ещё не была, рельсы бледнее */
.skoro::before, .skoro::after, .stantsiya:has(+ .skoro)::after { opacity: .4; }
/* за последней станцией путь уходит в туман */
.stantsiya:last-child::after {
  -webkit-mask-image: linear-gradient(var(--kuda), #000, transparent);
  mask-image: linear-gradient(var(--kuda), #000, transparent);
}

/* станция: кружок в двойном золотом ободке, внутри знак */
.stantsiya-znak {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: 0 auto;
  border: 1px solid rgba(232,192,106,.7);
  border-radius: 50%;
  color: var(--candle);
  background: radial-gradient(circle at 50% 38%, #2b1512, var(--ink) 72%);
  box-shadow: 0 0 0 5px var(--ink), 0 0 0 6px rgba(232,192,106,.28), 0 0 44px rgba(232,192,106,.16);
}
.stantsiya-znak svg { width: 54px; height: 54px; }

/* вывеска: эмалевая табличка на бархате, в двойной рамке */
.vyveska {
  display: inline-block;
  margin-top: 28px;
  padding: 7px 16px 6px;
  font-family: 'Prata', serif;
  font-size: 14px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--candle);
  border: 1px solid rgba(232,192,106,.6);
  outline: 1px solid rgba(232,192,106,.22);
  outline-offset: 3px;
  background: linear-gradient(180deg, rgba(110,29,25,.7), rgba(58,15,12,.85));
}
.stantsiya h3 {
  margin-top: 18px;
  font-family: 'Prata', serif;
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.25;
  color: var(--parchment);
}
.stantsiya-epokha {
  margin-top: 6px;
  font-size: 15px;
  letter-spacing: .08em;
  color: var(--candle);
}
.stantsiya-opisanie {
  max-width: 300px;
  margin: 12px auto 0;
  font-size: 19px;
  font-style: italic;
  line-height: 1.45;
  color: var(--parchment-dim);
}

/* следующая станция — силуэт в тумане: знак угадывается, подробностей нет */
.skoro .stantsiya-znak {
  border-style: dashed;
  color: var(--gold-dim);
  background: var(--ink);
  box-shadow: 0 0 0 5px var(--ink);
}
.skoro .stantsiya-znak svg { opacity: .6; filter: blur(.6px); }
.skoro .vyveska {
  color: var(--parchment-dim);
  border-style: dashed;
  outline: 0;
  background: rgba(11,8,6,.6); /* тёмная подложка: линии карты не лезут под буквы */
}
.skoro h3 { color: var(--parchment-dim); }

/* ---------- двери в комнаты героев ---------- */
/* Арки в двойной золотой раме: на компьютере в ряд, на телефоне сеткой 2×2.
   Табличка висит внизу двери, замок — на её кольце и сходит за нижний край рамы,
   как печать с карточки участника. Классы igraet и zamerla ставит main.js. */
.dveri {
  position: relative;
  padding: 16vh 24px;
  background:
    radial-gradient(ellipse 60% 45% at 50% 55%, rgba(232,192,106,.08), transparent),
    var(--ink);
}
.dveri-in { max-width: 1080px; margin: 0 auto; }
.dveri-ryad {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 44px clamp(18px, 2.6vw, 34px);
}
.dver-knopka {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 1px solid rgba(232,192,106,.5);
  border-radius: 999px 999px 0 0;
  background: var(--ink-soft);
  box-shadow: 0 0 0 5px var(--ink), 0 0 0 6px rgba(232,192,106,.24), 0 26px 60px rgba(0,0,0,.5);
  cursor: pointer;
  transition: border-color .3s, box-shadow .3s;
}
.dver-knopka:hover, .dver-knopka:focus-visible {
  border-color: rgba(232,192,106,.85);
  box-shadow: 0 0 0 5px var(--ink), 0 0 0 6px rgba(232,192,106,.45), 0 0 48px rgba(232,192,106,.24);
}
/* ролик лежит на картинке кадр в кадр: невидим до первого кадра и остаётся на последнем */
.dver-kartinka, .dver-kino {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.dver-kino { opacity: 0; transition: opacity .25s ease; }
.dver.igraet .dver-kino, .dver.zamerla .dver-kino { opacity: 1; }

/* табличка: эмаль на бархате, как вывески маршрута */
.tablichka {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 84%;
  padding: 6px 11px 5px;
  font-family: 'Prata', serif;
  font-size: clamp(11px, 1.1vw, 13px);
  line-height: 1.35;
  letter-spacing: .05em;
  text-align: center;
  text-wrap: balance; /* «Не беспокоить / до 7 октября», а не «октября» одно на строке */
  color: var(--candle);
  border: 1px solid rgba(232,192,106,.6);
  outline: 1px solid rgba(232,192,106,.22);
  outline-offset: 2px;
  background: linear-gradient(180deg, rgba(110,29,25,.94), rgba(58,15,12,.96));
  box-shadow: 0 8px 20px rgba(0,0,0,.55);
  transition: opacity .4s ease .2s;
}
/* замок висит на кольце: кольцо заходит на нижний край таблички, вокруг кольца замок и качается.
   Размер в долях двери — замок держит пропорции на любом экране */
.zamok {
  position: absolute;
  top: 90%;
  left: 38%;
  width: 24%;
  transform-origin: 50% 6%;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.65));
  transition: opacity .4s ease .2s;
}
/* пока герой манит, табличка с замком уходят; возвращаются с задержкой, когда кадр замер */
.dver.igraet .tablichka, .dver.igraet .zamok { opacity: 0; transition-delay: 0s; }
.dver.zamerla .zamok { animation: zvyak 1.4s ease-out .3s both; }
/* звяк: замок подпрыгивает на кольце, падает и затихает, раскачиваясь */
@keyframes zvyak {
  0% { transform: translateY(-4px) rotate(0); }
  12% { transform: translateY(1px) rotate(0); }
  28% { transform: rotate(-16deg); }
  46% { transform: rotate(11deg); }
  63% { transform: rotate(-6deg); }
  80% { transform: rotate(3deg); }
  100% { transform: rotate(0); }
}

/* подпись уходит ниже замка, что свисает за раму; отступ тоже в долях ширины двери */
.dver-podpis {
  margin-top: 24%;
  text-align: center;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--parchment-dim);
}

/* ---------- музыка ---------- */
.music {
  position: relative;
  min-height: 100vh;
  padding: 16vh 24px;
  overflow: hidden;
}
.music .hall-bg { inset: -10% 0; }
.music-in { position: relative; z-index: 1; width: min(1080px, 94vw); margin: 0 auto; }
.music h2, .marshrut h2, .dveri h2, .finale h2 {
  font-family: 'Prata', serif;
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 62px);
  text-align: center;
  color: var(--parchment);
  margin-bottom: 12px;
}
.music .lead, .marshrut .lead, .dveri .lead {
  text-align: center;
  font-style: italic;
  color: var(--parchment);
  font-size: 21px;
  margin-bottom: 64px;
}
.music h2, .music .lead, .finale h2, .finale .sub {
  text-shadow: 0 2px 22px rgba(0,0,0,.9), 0 0 6px rgba(0,0,0,.6);
}
.programme {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(22px, 3vw, 44px);
}
.track {
  position: relative;
  border: 1px solid rgba(232,192,106,.34);
  background: linear-gradient(160deg, rgba(20,16,11,.92), rgba(11,8,6,.86));
  padding: 40px 36px 34px;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), border-color .45s;
}
.track:hover { transform: translateY(-6px); border-color: rgba(232,192,106,.7); }
.track .no {
  font-family: 'Prata', serif;
  font-size: 15px;
  letter-spacing: .3em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.track h3 {
  font-family: 'Prata', serif;
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 36px);
  color: var(--candle);
  margin-bottom: 10px;
}
.track .meta {
  font-size: 15px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  margin-bottom: 24px;
}
.track blockquote {
  border-left: 2px solid var(--wax);
  padding-left: 18px;
  font-style: italic;
  font-size: 20px;
  line-height: 1.7;
  color: var(--parchment);
}
.track .note { margin-top: 22px; font-size: 17px; color: var(--parchment-dim); }

/* ---------- клип трека ---------- */
/* Превью — кадр из ролика под сургучной кнопкой. Ролик вертикальный, а кадр
   с ютуба приходит широким, с чёрными полями по бокам: держим окошко 3:4,
   и обрезка забирает ровно поля, оставляя картинку. */
.klip {
  position: relative;
  display: block;
  width: min(240px, 100%);
  aspect-ratio: 3 / 4;
  margin-top: 26px;
  padding: 0;
  border: 1px solid rgba(232,192,106,.34);
  background: var(--ink);
  font-family: 'Cormorant', Georgia, serif;
  cursor: pointer;
  transition: border-color .3s, box-shadow .3s;
}
.klip:hover, .klip:focus-visible {
  border-color: rgba(232,192,106,.7);
  box-shadow: 0 0 36px rgba(232,192,106,.22);
}
.klip-kadr {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .82;
  transition: opacity .3s;
}
.klip:hover .klip-kadr, .klip:focus-visible .klip-kadr { opacity: 1; }

/* кнопка «играть» — тот же сургуч с золотым ободком, что и печать внизу страницы */
.klip-pusk {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--wax);
  border: 2px solid var(--wax-dark);
  box-shadow: 0 0 0 1px rgba(232,192,106,.55), 0 10px 30px rgba(0,0,0,.6),
              0 0 44px rgba(232,192,106,.2);
}
/* треугольник смещён вправо: у круглой кнопки так он и выглядит по центру */
.klip-pusk::after {
  content: "";
  position: absolute;
  left: 54%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 13px solid transparent;
  border-right: 0;
  border-left: 21px solid var(--candle);
}
.klip-podpis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 10px 10px;
  background: linear-gradient(transparent, rgba(11,8,6,.9));
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--candle);
}

/* ---------- окно с клипом ---------- */
.kino {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kino[hidden] { display: none; }
.kino-fon {
  position: absolute;
  inset: 0;
  background: rgba(11,8,6,.94);
}
/* ролик вертикальный: окно тоже 3:4 — по ширине экрана на телефоне,
   по высоте на большом мониторе, и чёрных полей по бокам не остаётся */
.kino-ramka {
  position: relative;
  z-index: 1;
  width: min(92vw, 60vh);
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(232,192,106,.36);
  background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.kino-ramka iframe { display: block; width: 100%; height: 100%; border: 0; }
.kino-zakryt {
  position: absolute;
  z-index: 2;
  top: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(232,192,106,.36);
  background: rgba(11,8,6,.6);
  color: var(--candle);
  font-family: 'Prata', serif;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .25s, background .25s;
}
.kino-zakryt:hover, .kino-zakryt:focus-visible {
  border-color: rgba(232,192,106,.8);
  background: rgba(232,192,106,.08);
}

/* ---------- ссылки на площадки (у трека и в финале) ---------- */
.set {
  display: inline-block;
  color: var(--parchment-dim);
  text-decoration: none;
  font-size: 13.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid rgba(232,192,106,.28);
  transition: color .25s, border-color .25s, background .25s;
}
.set:hover, .set:focus-visible {
  color: var(--candle);
  border-color: rgba(232,192,106,.7);
  background: rgba(232,192,106,.06);
}
.track-ssylki, .seti {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.seti { justify-content: center; }

/* ---------- финал ---------- */
.finale {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 18vh 24px;
}
.finale-in {
  position: relative;
  z-index: 1;
  padding: 70px clamp(30px, 6vw, 90px);
  background: radial-gradient(ellipse 65% 60% at 50% 50%, rgba(11,8,6,.62) 0%, rgba(11,8,6,.34) 55%, transparent 78%);
}
.finale .sub {
  font-style: italic;
  font-size: 22px;
  color: var(--parchment);
  margin: 18px 0 46px;
}
.handle {
  display: inline-block;
  color: var(--candle);
  font-size: 16px;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 17px 34px;
  border: 1px solid rgba(179,166,140,.45);
}
.handle + .handle { margin-top: 14px; }
.finale .mail {
  margin-top: 26px;
  font-size: 15px;
  letter-spacing: .08em;
  color: rgba(179,166,140,.75);
}
.finale .mail a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(179,166,140,.35);
  padding-bottom: 2px;
}
.finale .mail a:hover { color: var(--candle); border-color: var(--candle); }
.finale .fine {
  margin-top: 70px;
  font-size: 14px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(179,166,140,.55);
}

/* ---------- сургучная печать-прогресс ---------- */
.seal {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 64px;
  height: 64px;
  z-index: 50;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.6));
  transition: transform .3s;
}
.seal:hover { transform: scale(1.08); }
.seal svg { width: 100%; height: 100%; }
.seal .ring { transition: stroke-dashoffset .15s linear; }

/* ---------- появление ---------- */
.rv {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.rv.in { opacity: 1; transform: none; }
.rv2 { transition-delay: .15s; }
.rv3 { transition-delay: .3s; }

/* ---------- адаптив ---------- */
@media (max-width: 900px) {
  body { font-size: 17px; }
  .top { padding: 12px 16px; }
  .top nav { gap: 14px; }
  .top nav a { font-size: 12px; letter-spacing: .12em; }
  .hall-in, .hall.flip .hall-in { grid-template-columns: 1fr; gap: 34px; }
  .hall.flip .hall-foto { order: 0; }
  .hall-foto { max-width: 420px; margin: 0 auto; width: 100%; }
  .programme { grid-template-columns: 1fr; }
  /* табло остаётся в четыре колонки: узкий экран берём полями, а не переносом */
  .otschet { padding-left: 14px; padding-right: 14px; }
  .otschet-nad { font-size: 12px; letter-spacing: .26em; }
  .tablo-yach { padding: 14px 4px; }
  .tablo-podpis { letter-spacing: .12em; }
  .prazdnik { top: 18px; padding: 14px 16px; gap: 14px; }
  .seal { width: 52px; height: 52px; right: 16px; bottom: 16px; }
  .hero { height: 380vh; }
  .prosmotr-nazad { left: 10px; }
  .prosmotr-vpered { right: 10px; }
  .prosmotr-nazad, .prosmotr-vpered { top: auto; bottom: 14px; transform: none; width: 46px; height: 46px; }
  .prosmotr-zakryt { top: 12px; right: 12px; }
  .prosmotr-telo { max-width: 94vw; }
  .prosmotr-telo img { max-height: 66vh; }
  .klip { width: min(300px, 100%); }
  .kino-zakryt { top: 12px; right: 12px; }
  /* маршрут идёт сверху вниз: станции на рельсах слева, текст справа */
  .put { --kuda: 180deg; grid-template-columns: 1fr; row-gap: 0; }
  .stantsiya { min-height: 132px; padding: 0 0 48px 94px; text-align: left; }
  .stantsiya::before, .stantsiya::after {
    left: 36px;
    right: auto;
    width: 8px;
    height: auto;
    transform: translateX(-50%);
    border-block: 0;
    border-inline: 1px solid rgba(232,192,106,.6);
  }
  .stantsiya::before { top: 0; height: 36px; }
  .stantsiya::after { top: 36px; bottom: 0; }
  .stantsiya-znak { position: absolute; left: 0; top: 0; width: 72px; height: 72px; }
  .stantsiya-znak svg { width: 44px; height: 44px; }
  .vyveska { margin-top: 18px; }
  .stantsiya-opisanie { margin-left: 0; }
  /* двери сеткой 2×2: узкий экран берём полями, а на планшете сетка не шире 560px,
     иначе каждая дверь вырастает выше экрана */
  .dveri { padding-left: 16px; padding-right: 16px; }
  .dveri-ryad { grid-template-columns: repeat(2, 1fr); max-width: 560px; margin: 0 auto; }
  .tablichka { font-size: clamp(11px, 2.4vw, 13px); }
  .dver-podpis { font-size: 11px; letter-spacing: .14em; }
}

/* Узкий телефон: с четырьмя пунктами меню наезжало на знак MON ROI */
@media (max-width: 480px) {
  .top .mark { font-size: 17px; }
  .top nav { gap: 10px; }
  .top nav a { font-size: 11px; letter-spacing: .08em; }
}

/* Телефон стоймя: баннер-герой виден целиком — вся надпись и все четверо.
   Полоса кадра держит пропорции постера (вид poster из sborka/foto.mjs), поэтому
   кроп в main.js ничего не отрезает, а поля сверху и снизу — темнота страницы. */
@media (max-width: 900px) and (orientation: portrait) {
  .hero-stick canvas,
  .hero-stick .poster {
    inset: 50% 0 auto;
    height: auto;
    aspect-ratio: 1920 / 1080;
    transform: translateY(-50%);
    object-fit: contain;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .hero { height: 100vh; }
  .hero-hint .arr { animation: none; }
  .prazdnik-nadpis, .iskry::before, .iskry::after { animation: none; }
  .hall-bg { position: absolute; transform: none !important; }
  .mini-kadr, .mini-kadr img, .hall-card.klik, .prosmotr-knopka,
  .pechat, .pechat img, .tayna-imya, .klip, .klip-kadr, .kino-zakryt { transition: none; }
  .mini-kadr:hover, .mini-kadr:focus-visible { transform: none; }
  .pechat:hover, .pechat:focus-visible { transform: none; }
  .dver.zamerla .zamok { animation: none; }
  .dver-knopka, .dver-kino, .tablichka, .zamok { transition: none; }
}
