/* =========================================================
   Наш класс · 1997 → 2027
   Тёплый бумажный альбом: крем, чернила, бургунди, олива
   ========================================================= */

:root {
  --paper: #f3ead9;
  --paper-2: #faf4e8;
  --paper-3: #e9ddc7;
  --cream: #fcf7ec;
  --ink: #2a2016;
  --ink-soft: #433426;
  --muted: #75634f;
  --muted-2: #99866d;
  --burgundy: #8d3f2d;
  --burgundy-dark: #6e2e20;
  --olive: #596546;
  --olive-dark: #333a2d;
  --gold: #b2874b;
  --line: rgba(74, 53, 33, .18);
  --line-strong: rgba(74, 53, 33, .34);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --hand: 'Caveat', 'Segoe Script', cursive;
  --shadow-sm: 0 2px 10px rgba(60, 40, 20, .07);
  --shadow: 0 20px 50px rgba(60, 40, 20, .13);
  --radius: 4px;
  --radius-lg: 10px;
  --container: 1180px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 100px; }
.section, [id] { scroll-margin-top: 90px; }

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 4%, rgba(255, 255, 255, .5), transparent 32%),
    radial-gradient(circle at 92% 20%, rgba(178, 135, 75, .07), transparent 30%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(90, 66, 40, .034) 39px 40px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(141, 63, 45, .2); }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.02;
}
h1 em, h2 em, h3 em { font-style: italic; color: var(--burgundy); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; }
blockquote { margin: 0; }

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  left: 16px; top: -80px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--paper-2);
  font-size: 13px;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
}

/* ---------- Типографика и кнопки ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--burgundy);
}
.eyebrow > span {
  display: inline-block;
  width: 34px; height: 1px;
  background: currentColor;
  flex: 0 0 auto;
}
.eyebrow--light { color: #d8b98f; }

.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--burgundy);
  color: #fdf3e4;
  box-shadow: 0 7px 18px rgba(141, 63, 45, .16);
}
.btn-primary:hover { background: var(--burgundy-dark); box-shadow: 0 10px 24px rgba(141, 63, 45, .22); }
.btn-ghost { border-color: var(--line-strong); background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(255, 250, 240, .55); }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: #fffaf0; }
.btn-lg { padding: 15px 27px; font-size: 14.5px; }
.btn-small { padding: 8px 14px; font-size: 12px; }
.btn-block { width: 100%; }
.btn b { font-weight: 800; }

.muted-small { font-size: 11px; color: var(--muted); letter-spacing: .02em; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, .48);
  font-size: 11.5px;
  color: var(--muted);
}
.pill b { color: var(--ink); font-weight: 700; }

.stamp {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  border: 1px solid var(--burgundy);
  border-radius: 50%;
  color: var(--burgundy);
  transform: rotate(7deg);
  flex: 0 0 auto;
}
.stamp b { font-family: var(--serif); font-size: 25px; line-height: 1; }
.stamp span { margin-top: 2px; font-size: 7px; letter-spacing: .14em; text-transform: uppercase; }
.stamp--large { width: 86px; height: 86px; }
.stamp--large b { font-size: 34px; }
.stamp--large span { font-size: 8px; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(243, 234, 217, .9);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 10px 30px rgba(60, 40, 20, .06); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 86px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border: 1px solid var(--burgundy);
  border-radius: 50%;
  color: var(--burgundy);
  transform: rotate(-6deg);
}
.brand-mark b { font-family: var(--serif); font-size: 19px; line-height: 1; }
.brand-mark small { font-size: 5.5px; letter-spacing: .1em; text-transform: uppercase; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.brand-text small { margin-top: 2px; font-size: 8px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 25px; margin-left: auto; }
.site-nav > a:not(.btn) {
  position: relative;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color .18s ease;
  padding: 6px 0;
}
.site-nav > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--burgundy);
  transition: right .2s ease;
}
.site-nav > a:not(.btn):hover,
.site-nav > a.is-active { color: var(--ink); }
.site-nav > a:not(.btn):hover::after,
.site-nav > a.is-active::after { right: 0; }
.site-nav .nav-admin { color: var(--burgundy); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.header-cta { flex: 0 0 auto; }
.nav-mobile-cta { display: none; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-left: auto;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 1.5px;
  margin: 4px auto;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- Уведомления ---------- */

.notice { position: relative; z-index: 40; font-size: 13px; }
.notice--success { background: #e5ead9; border-bottom: 1px solid rgba(89, 101, 70, .25); color: #3c4a2d; }
.notice--error { background: #f3dcd4; border-bottom: 1px solid rgba(141, 63, 45, .28); color: #6e2e20; }
.notice-inner { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.notice-mark {
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  flex: 0 0 auto;
}

/* ---------- Главный экран ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 72px;
}
.hero::before {
  content: "1997";
  position: absolute;
  right: -20px; bottom: -56px;
  font-family: var(--serif);
  font-size: 290px;
  line-height: .8;
  letter-spacing: -.08em;
  color: rgba(74, 53, 33, .035);
  pointer-events: none;
  white-space: nowrap;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 64px;
  align-items: center;
}
.hero-copy { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(58px, 7.1vw, 98px);
  line-height: .87;
  letter-spacing: -.035em;
}
.hero h1 em { color: var(--burgundy); }
.hero-lead {
  max-width: 525px;
  margin: 26px 0 28px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 36px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}
.hero-meta-item { display: flex; flex-direction: column; min-width: 112px; }
.hero-meta-label {
  margin-bottom: 5px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--burgundy);
}
.hero-meta-item strong { font-size: 13.5px; font-weight: 600; }
.hero-meta-item small { margin-top: 2px; font-size: 10.5px; color: var(--muted); }

.hero-collage {
  position: relative;
  min-height: 535px;
}
.hero-halo {
  position: absolute;
  inset: 28px 18px 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(178, 135, 75, .18), transparent 68%);
  filter: blur(2px);
}
.polaroid {
  position: absolute;
  margin: 0;
  padding: 12px 12px 0;
  background: var(--cream);
  box-shadow: var(--shadow);
}
.polaroid img { width: 100%; object-fit: cover; }
.polaroid figcaption {
  padding: 11px 2px 14px;
  font-family: var(--hand);
  font-size: 21px;
  line-height: 1;
  text-align: center;
  color: #5c4734;
}
.polaroid--main {
  top: 4px; left: 7%; width: 77%;
  transform: rotate(-2.4deg);
}
.polaroid--main img { aspect-ratio: 4 / 3.15; }
.polaroid--small { width: 29%; padding: 8px 8px 0; z-index: 2; }
.polaroid--small img { aspect-ratio: 4 / 5; }
.polaroid--small figcaption { padding: 7px 0 9px; font-size: 17px; }
.polaroid--one { right: 1%; top: 16%; transform: rotate(6deg); }
.polaroid--two { left: 0; bottom: 6%; transform: rotate(-7deg); }
.hero-stamp {
  position: absolute;
  right: 10%; bottom: 10%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 98px; height: 98px;
  border: 1px solid var(--burgundy);
  border-radius: 50%;
  color: var(--burgundy);
  background: rgba(243, 234, 217, .82);
  transform: rotate(8deg);
  box-shadow: var(--shadow-sm);
}
.hero-stamp b { font-family: var(--serif); font-size: 40px; line-height: 1; }
.hero-stamp span { margin-top: 2px; font-size: 8px; letter-spacing: .14em; text-transform: uppercase; }
.hand-note {
  position: absolute;
  left: 34%; bottom: 3%;
  z-index: 3;
  font-family: var(--hand);
  font-size: 23px;
  color: var(--burgundy);
  transform: rotate(-4deg);
}
.hero-line { position: absolute; height: 1px; background: rgba(74, 53, 33, .2); }
.hero-line--one { width: 85px; right: 3%; top: 8%; transform: rotate(32deg); }
.hero-line--two { width: 50px; right: 1%; top: 13%; transform: rotate(32deg); }

/* ---------- Цифры ---------- */

.stats-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255, 250, 240, .28); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { display: flex; flex-direction: column; padding: 25px 26px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { font-family: var(--serif); font-size: 36px; font-weight: 600; line-height: 1; font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; }
.stat span { margin-top: 6px; font-size: 9px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }

/* ---------- Секции ---------- */

.section { padding: 82px 0; position: relative; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 38px;
}
.section-head h2 { font-size: clamp(38px, 4.6vw, 58px); line-height: .98; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head--compact { margin-bottom: 26px; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color .2s ease, color .2s ease;
}
.section-link:hover { color: var(--burgundy); border-color: var(--burgundy); }

/* ---------- Карточки класса ---------- */

.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.people-grid--page { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.person-card {
  display: flex;
  flex-direction: column;
  padding: 9px 9px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(252, 247, 236, .68);
  box-shadow: var(--shadow-sm);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.person-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.person-card__photo {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper-3);
}
.person-card__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .4s ease; filter: saturate(.86) contrast(.98); }
.person-card:hover .person-card__photo img { transform: scale(1.035); filter: saturate(.96) contrast(1); }
.person-card__stamp {
  position: absolute;
  top: 12px; right: 12px;
  display: grid;
  place-items: center;
  padding: 7px 9px;
  border: 1px solid rgba(252, 247, 236, .7);
  border-radius: 50%;
  background: rgba(42, 32, 22, .24);
  color: #fff6e7;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .08em;
  backdrop-filter: blur(4px);
}
.person-card__arrow {
  position: absolute;
  right: 12px; bottom: 12px;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  font-size: 14px;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .25s ease, transform .25s ease;
}
.person-card:hover .person-card__arrow { opacity: 1; transform: none; }
.person-card__body { padding: 16px 8px 0; }
.person-card__role { margin-bottom: 3px; font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--burgundy); }
.person-card h3 { font-size: clamp(23px, 2.2vw, 29px); line-height: .98; }
.person-card h3 span { font-style: italic; color: var(--ink-soft); }
.person-card__meta { margin-top: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.person-card__quote {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

.empty-state {
  padding: 55px 30px;
  border: 1px dashed var(--line-strong);
  text-align: center;
  background: rgba(252, 247, 236, .42);
}
.empty-stamp {
  display: inline-grid;
  place-items: center;
  width: 66px; height: 66px;
  margin-bottom: 16px;
  border: 1px solid var(--burgundy);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--burgundy);
  transform: rotate(6deg);
}
.empty-state h3 { font-size: 30px; }
.empty-state p { max-width: 420px; margin: 10px auto 20px; color: var(--muted); font-size: 14px; }

/* ---------- Цитата класса ---------- */

.memory-band {
  position: relative;
  overflow: hidden;
  padding: 78px 0;
  background: var(--olive-dark);
  color: #efe3cd;
}
.memory-band::before {
  content: "“";
  position: absolute;
  left: 2%; top: -80px;
  font-family: var(--serif);
  font-size: 420px;
  line-height: 1;
  color: rgba(239, 227, 205, .07);
  pointer-events: none;
}
.memory-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: center; }
.memory-copy { position: relative; z-index: 1; }
.memory-copy blockquote {
  margin: 12px 0 20px;
  font-family: var(--serif);
  font-size: clamp(30px, 3.7vw, 48px);
  font-style: italic;
  line-height: 1.1;
  color: #fbf3e5;
}
.memory-author { margin-bottom: 24px; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: #c2b292; }
.memory-photo { position: relative; transform: rotate(2.5deg); background: var(--cream); padding: 10px 10px 0; box-shadow: 0 24px 50px rgba(0, 0, 0, .26); }
.memory-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.memory-photo-caption { display: block; padding: 10px 2px 12px; font-family: var(--hand); font-size: 20px; text-align: center; color: #5c4734; }

/* ---------- Вечер на главной ---------- */

.section--event { background: rgba(233, 221, 199, .35); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.event-grid { display: grid; grid-template-columns: 1.16fr .84fr; gap: 58px; align-items: start; }
.event-copy h2 { font-size: clamp(39px, 4.8vw, 60px); margin-bottom: 20px; }
.event-copy .lead { font-size: 15.5px; }
.event-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 30px 0 26px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.event-fact { display: flex; flex-direction: column; }
.event-fact-label { margin-bottom: 5px; font-size: 8px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--burgundy); }
.event-fact strong { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.event-fact small { margin-top: 2px; font-size: 10.5px; color: var(--muted); }
.program-list { margin-bottom: 22px; }
.program-item { display: flex; align-items: baseline; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.program-item:last-child { border-bottom: 0; }
.program-time { flex: 0 0 52px; font-family: var(--serif); font-size: 21px; color: var(--burgundy); }
.program-item div { display: flex; flex-direction: column; }
.program-item b { font-size: 13px; font-weight: 700; }
.program-item div span { font-size: 11.5px; color: var(--muted); }
.event-note { margin: 14px 0 22px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.event-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.countdown-card {
  position: relative;
  padding: 46px 32px 30px;
  border: 1px solid var(--line);
  background: var(--cream);
  box-shadow: var(--shadow);
  text-align: center;
}
.countdown-card .stamp { position: absolute; top: -33px; left: 50%; transform: translateX(-50%) rotate(7deg); background: var(--paper); }
.countdown-caption { margin-top: 12px; font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 16px; }
.countdown div { display: flex; flex-direction: column; }
.countdown b { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1; font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; }
.countdown span { margin-top: 5px; font-size: 7.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.countdown-divider { height: 1px; margin: 22px 0 15px; background: var(--line); }
.countdown-date { font-family: var(--serif); font-size: 20px; }
.countdown-note { margin-top: 2px; font-size: 12px; color: var(--muted); }
.countdown-card .btn { margin-top: 20px; }
.countdown-hint { margin-top: 10px; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }

/* ---------- Фото полоса ---------- */

.section--gallery { padding-bottom: 88px; }
.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 145px);
  gap: 13px;
}
.photo-tile { position: relative; overflow: hidden; background: var(--paper-3); display: block; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease, filter .3s ease; filter: saturate(.8) contrast(.98); }
.photo-tile:hover img { transform: scale(1.04); filter: saturate(.95); }
.photo-tile::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(27, 19, 12, .65)); pointer-events: none; }
.photo-tile span { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; color: #fff2dc; font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.photo-tile--1 { grid-column: span 2; grid-row: span 2; }
.photo-tile--2 { grid-column: span 2; }
.photo-tile--3, .photo-tile--4 { grid-column: span 1; }
.photo-tile--5, .photo-tile--6 { grid-column: span 2; }

/* ---------- Присоединиться ---------- */

.section--join { padding-top: 10px; }
.join-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 60px;
  padding: 54px 58px;
  background: var(--burgundy);
  color: #f9eddb;
}
.join-card::after {
  content: "30";
  position: absolute;
  right: -20px; bottom: -80px;
  font-family: var(--serif);
  font-size: 330px;
  line-height: 1;
  letter-spacing: -.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(249, 237, 219, .16);
  pointer-events: none;
}
.join-copy { position: relative; z-index: 1; }
.join-copy h2 { font-size: clamp(40px, 4.8vw, 58px); margin-bottom: 16px; }
.join-copy p { max-width: 460px; margin-bottom: 24px; color: #e7d0b4; font-size: 14.5px; line-height: 1.6; }
.join-steps { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; }
.join-step { display: flex; align-items: flex-start; gap: 15px; padding: 15px 0; border-bottom: 1px solid rgba(249, 237, 219, .18); }
.join-step:first-child { border-top: 1px solid rgba(249, 237, 219, .18); }
.join-step b { flex: 0 0 30px; font-family: var(--serif); font-size: 18px; color: #e2bd8b; }
.join-step span { font-size: 12.5px; line-height: 1.5; color: #f2e0c8; }
.join-note { margin-top: 16px; font-size: 10px; line-height: 1.5; color: #d9b994; letter-spacing: .02em; }

/* ---------- Внутренние заголовки ---------- */

.page-hero { padding: 64px 0 36px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(52px, 6.5vw, 82px); line-height: .9; }
.page-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.page-lead { max-width: 680px; margin-top: 18px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.page-hero-link { display: inline-flex; margin-top: 16px; }
.page-hero-meta { display: flex; flex-direction: column; align-items: flex-end; padding-bottom: 6px; }
.page-hero-meta b { font-family: var(--serif); font-size: 54px; line-height: .9; color: var(--burgundy); font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; }
.page-hero-meta span { font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.page-hero--class { padding-top: 58px; }
.page-hero--gallery { background: rgba(233, 221, 199, .3); }
.page-hero--anketa h1 { font-size: clamp(52px, 6.2vw, 78px); }
.anketa-side-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: rgba(252, 247, 236, .6);
  transform: rotate(-2deg);
}
.anketa-side-note b { font-family: var(--serif); font-size: 32px; line-height: 1; color: var(--burgundy); }
.anketa-side-note span { font-size: 9px; line-height: 1.35; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* ---------- Класс: поиск ---------- */

.section--people { padding-top: 38px; }
.people-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(440px, 100%);
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(252, 247, 236, .72);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search-field:focus-within { border-color: var(--burgundy); box-shadow: 0 0 0 3px rgba(141, 63, 45, .08); }
.search-field svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.6; flex: 0 0 auto; }
.search-field input { width: 100%; padding: 12px 0; border: 0; background: transparent; font-size: 13px; outline: 0; color: var(--ink); }
.search-field input::placeholder { color: var(--muted-2); }
.people-empty { padding: 30px 0; color: var(--muted); font-size: 14px; }
.people-empty a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }

.roster-block { margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--line); }
.roster-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.roster-head h2 { font-size: clamp(34px, 4.1vw, 47px); line-height: .98; font-variant-numeric: lining-nums; }
.roster-head .eyebrow { margin-bottom: 9px; }
.roster-count { padding-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.roster-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 38px; border-top: 1px solid var(--line); }
.roster-item {
  display: flex;
  align-items: baseline;
  gap: 11px;
  min-height: 40px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.roster-num { flex: 0 0 21px; color: var(--muted-2); font-family: var(--sans); font-size: 7.5px; font-weight: 600; letter-spacing: .05em; }
.roster-name { font-family: var(--serif); font-size: 18px; line-height: 1.1; }
.roster-status { margin-left: auto; color: var(--muted-2); font-size: 7px; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.roster-item--linked { color: var(--burgundy); }
.roster-item--linked:hover .roster-name { text-decoration: underline; text-underline-offset: 3px; }
.roster-badge { margin-left: auto; color: var(--olive); font-size: 7px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.roster-foot { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 22px; flex-wrap: wrap; }
.roster-foot p { max-width: 570px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }

/* ---------- Профиль ---------- */

.profile-hero { padding: 28px 0 34px; border-bottom: 1px solid var(--line); }
.admin-view-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 18px; padding: 9px 12px; background: var(--ink); color: #e8d8bf; font-size: 10px; }
.admin-view-bar span { color: #bcaa90; letter-spacing: .08em; text-transform: uppercase; font-size: 8px; }
.admin-view-bar a { color: #e2c59c; font-weight: 700; }
.admin-view-bar a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 30px; font-size: 10px; letter-spacing: .04em; color: var(--muted); }
.breadcrumbs a:hover { color: var(--burgundy); }
.breadcrumbs span:last-child { color: var(--ink-soft); }
.profile-title h1 { font-size: clamp(52px, 7vw, 90px); line-height: .86; }
.profile-title h1 em { color: var(--burgundy); }
.profile-subtitle { margin-top: 12px; font-size: 14px; color: var(--muted); }
.status-banner { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 10px 14px; border: 1px dashed var(--line-strong); font-size: 12px; }
.status-banner a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }
.status-banner--pending { background: rgba(178, 135, 75, .08); }
.status-banner--rejected { background: rgba(141, 63, 45, .08); }

.section--profile { padding-top: 46px; }
.profile-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 64px; align-items: start; }
.profile-aside { position: sticky; top: 112px; }
.profile-portrait { margin: 0 0 32px; padding: 10px 10px 0; background: var(--cream); box-shadow: var(--shadow); transform: rotate(-1.2deg); }
.profile-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.profile-portrait figcaption { padding: 11px 2px 13px; font-family: var(--hand); font-size: 21px; text-align: center; color: #5c4734; }
.profile-contacts, .profile-share { padding: 22px 0; border-top: 1px solid var(--line); }
.profile-contacts h2, .profile-share h2 { margin-bottom: 10px; font-size: 18px; }
.profile-contacts p { font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.profile-contacts a { display: block; margin-top: 5px; font-size: 12.5px; color: var(--burgundy); overflow-wrap: anywhere; }
.profile-contacts a:hover { text-decoration: underline; text-underline-offset: 3px; }
.share-row { display: flex; gap: 7px; }
.share-row a, .share-row button {
  display: grid;
  place-items: center;
  width: 37px; height: 37px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.share-row a:hover, .share-row button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper-2); }
.back-link { display: inline-block; margin-top: 12px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.back-link:hover { color: var(--burgundy); }

.profile-intro { max-width: 760px; font-family: var(--serif); font-size: clamp(21px, 2.2vw, 28px); line-height: 1.45; color: var(--ink-soft); }
.profile-block { margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--line); }
.profile-label { display: block; margin-bottom: 7px; font-size: 8.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--burgundy); }
.profile-block h2 { margin-bottom: 13px; font-size: 31px; }
.profile-block p { max-width: 760px; font-size: 16px; line-height: 1.7; color: var(--ink-soft); white-space: pre-line; }
.profile-block--accent { margin-top: 32px; padding: 24px 26px; border: 0; border-left: 2px solid var(--burgundy); background: rgba(141, 63, 45, .055); }
.profile-block--accent h2 { font-size: 27px; }
.profile-memory { margin-top: 36px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-memory blockquote { max-width: 760px; font-family: var(--serif); font-size: clamp(25px, 3vw, 37px); font-style: italic; line-height: 1.18; color: var(--ink-soft); }
.profile-gallery { margin-top: 38px; }
.profile-block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.profile-block-head h2 { font-size: 31px; }
.profile-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.profile-photo { display: block; overflow: hidden; background: var(--paper-3); }
.profile-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s ease; }
.profile-photo:hover img { transform: scale(1.04); }
.profile-bottom { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 42px; padding-top: 26px; border-top: 1px solid var(--line); }

/* ---------- Галерея ---------- */

.section--gallery-page { padding-top: 40px; }
.class-photo { width: min(880px, 100%); margin: 0 auto 46px; padding: 11px 11px 0; background: var(--cream); box-shadow: var(--shadow); transform: rotate(-.7deg); }
.class-photo img { width: 100%; aspect-ratio: 1280 / 942; object-fit: cover; }
.class-photo figcaption { padding: 11px 2px 13px; font-family: var(--hand); font-size: 22px; text-align: center; color: #5c4734; }
.masonry { columns: 3 260px; column-gap: 22px; }
.gallery-card { break-inside: avoid; margin: 0 0 24px; }
.gallery-card__image { display: block; overflow: hidden; background: var(--paper-3); }
.gallery-card__image img { width: 100%; transition: transform .6s ease, filter .4s ease; filter: saturate(.85); }
.gallery-card:hover img { transform: scale(1.025); filter: saturate(.98); }
.gallery-card figcaption { display: flex; flex-direction: column; gap: 2px; padding: 9px 2px 0; }
.gallery-card figcaption a { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.gallery-card figcaption span { font-size: 10.5px; color: var(--muted); }

/* Лайтбокс */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(20, 15, 10, .93);
}
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: min(1100px, 88vw); max-height: 82vh; object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.lightbox__caption { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(700px, 86vw); text-align: center; color: #e8d8bf; font-size: 12px; letter-spacing: .04em; }
.lightbox__close, .lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border: 1px solid rgba(248, 240, 225, .35);
  border-radius: 50%;
  background: transparent;
  color: #f8f0e1;
  font-size: 22px;
  cursor: pointer;
}
.lightbox__close { top: 22px; right: 22px; }
.lightbox__nav--prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(248, 240, 225, .12); }

/* ---------- Вечер ---------- */

.event-hero { padding: 62px 0 54px; background: rgba(233, 221, 199, .34); border-bottom: 1px solid var(--line); }
.event-hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; align-items: center; }
.event-hero h1 { font-size: clamp(50px, 6.5vw, 86px); line-height: .9; }
.event-hero .page-lead { font-size: 16px; }
.event-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.event-hero-card { position: relative; padding: 46px 28px 26px; border: 1px solid var(--line); background: var(--cream); box-shadow: var(--shadow); text-align: center; }
.event-hero-card .stamp { position: absolute; top: -33px; left: 50%; transform: translateX(-50%) rotate(7deg); background: var(--paper); }
.event-page-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: start; }
.section--event-page { padding-top: 58px; }
.program-timeline { margin-top: 10px; }
.program-timeline-item { display: grid; grid-template-columns: 54px 38px 1fr; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.program-timeline-item:last-child { border-bottom: 0; }
.program-time { padding-top: 4px; font-family: var(--serif); font-size: 22px; color: var(--burgundy); }
.program-dot { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 8px; font-weight: 700; color: var(--burgundy); }
.program-text b { font-size: 14px; }
.program-text p { margin-top: 2px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.event-route {
  display: grid;
  grid-template-columns: 1fr 30px 1fr;
  gap: 10px;
  align-items: stretch;
  margin: 26px 0 18px;
}
.event-route-card {
  display: flex;
  flex-direction: column;
  padding: 17px 18px;
  border: 1px solid var(--line);
  background: rgba(252, 247, 236, .55);
}
.event-route-card--accent { border-color: rgba(141, 63, 45, .24); background: rgba(141, 63, 45, .055); }
.event-route-card h3 { margin: 3px 0 5px; font-size: 23px; }
.event-route-card p { font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.event-route-link {
  align-self: flex-start;
  margin-top: 13px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--burgundy);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.event-route-link:hover { border-color: var(--burgundy); }
.event-route-arrow { display: grid; place-items: center; color: var(--burgundy); font-family: var(--serif); font-size: 24px; }
.event-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.event-info-card { padding: 22px; border: 1px solid var(--line); background: rgba(252, 247, 236, .55); }
.event-info-card h3 { margin: 4px 0 8px; font-size: 23px; }
.event-info-card p { font-size: 12px; line-height: 1.55; color: var(--muted); }
.event-info-card .section-link { margin-top: 12px; }
.event-contact-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 26px; padding: 20px 22px; background: var(--ink); color: var(--paper-2); }
.event-contact-band strong { display: block; margin-top: 3px; font-family: var(--serif); font-size: 22px; font-weight: 500; }
.event-contact-band .profile-label { color: #cfa878; }
.event-contact-links { display: flex; flex-wrap: wrap; gap: 14px; }
.event-contact-links a { font-size: 12px; color: #e6d5ba; }
.event-contact-links a:hover { color: #fff; }

.rsvp-card { position: sticky; top: 108px; padding: 30px; border: 1px solid var(--line); background: var(--cream); box-shadow: var(--shadow); }
.rsvp-card h2 { font-size: 36px; margin-bottom: 8px; }
.rsvp-lead { margin-bottom: 16px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.rsvp-count { margin-bottom: 16px; padding: 8px 10px; background: rgba(89, 101, 70, .09); font-size: 11px; color: var(--olive); }
.rsvp-success { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; padding: 10px 12px; border-left: 2px solid var(--olive); background: rgba(89, 101, 70, .1); font-size: 11px; color: #47553a; }
.rsvp-success b { font-size: 12px; }
.rsvp-success span { color: var(--muted); }
.rsvp-form .field { margin-bottom: 14px; }
.rsvp-form .field-row { gap: 10px; }
.rsvp-form .field-row .field { flex: 1; }
.rsvp-form .btn { margin-top: 6px; }

.section--qr { background: rgba(233, 221, 199, .3); border-top: 1px solid var(--line); }
.qr-row { display: grid; grid-template-columns: 1fr 300px; gap: 70px; align-items: center; }
.qr-row h2 { font-size: clamp(38px, 4.7vw, 56px); margin-bottom: 16px; }
.qr-row .lead { margin-bottom: 22px; }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; background: var(--cream); border: 1px solid var(--line); box-shadow: var(--shadow); transform: rotate(1.5deg); }
.qr-card img { width: 100%; max-width: 240px; }
.qr-card span { font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Анкета ---------- */

.section--anketa { padding-top: 40px; }
.form-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); gap: 54px; align-items: start; }
.form-aside { position: sticky; top: 112px; }
.form-aside .profile-label { margin-bottom: 16px; }
.steps-list { list-style: none; }
.steps-list li { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.steps-list li:first-child { border-top: 1px solid var(--line); }
.steps-list li > b { flex: 0 0 26px; font-family: var(--serif); font-size: 17px; color: var(--burgundy); }
.steps-list strong { display: block; margin-bottom: 2px; font-size: 12px; }
.steps-list span { display: block; font-size: 11px; line-height: 1.5; color: var(--muted); }
.form-aside-note { margin-top: 22px; padding: 16px; border: 1px solid var(--line); background: rgba(252, 247, 236, .55); }
.form-aside-note p { font-size: 10.5px; line-height: 1.55; color: var(--muted); }
.form-aside-note .draft-hint { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 9px; color: var(--muted-2); }
.draft-note { margin-bottom: 18px; padding: 9px 12px; border-left: 2px solid var(--olive); background: rgba(89, 101, 70, .09); font-size: 10.5px; line-height: 1.45; color: var(--olive); }
.form-aside-note a { display: inline-block; margin-top: 8px; font-size: 10px; font-weight: 700; color: var(--burgundy); }
.form-aside-quote { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-aside-quote p { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.35; color: var(--ink-soft); }

.form-card { padding: 30px 32px; border: 1px solid var(--line); background: var(--cream); box-shadow: var(--shadow-sm); }
.form-section { padding: 0 0 26px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { border-bottom: 0; margin-bottom: 0; }
.form-section-head { display: flex; gap: 13px; margin-bottom: 20px; }
.form-section-head > span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--burgundy); border-radius: 50%; color: var(--burgundy); font-size: 8px; font-weight: 700; flex: 0 0 28px; }
.form-section-head h2 { font-size: 27px; }
.form-section-head p { margin-top: 2px; font-size: 11px; color: var(--muted); }

.field { display: flex; flex-direction: column; margin-bottom: 16px; min-width: 0; }
.field-label { display: block; margin-bottom: 6px; font-size: 8.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field-label i { color: var(--burgundy); font-style: normal; }
.field-label small { font-size: 8px; font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--muted-2); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fdf9f0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.45;
  outline: 0;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input::placeholder, .field textarea::placeholder { color: #a9987f; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--burgundy); box-shadow: 0 0 0 3px rgba(141, 63, 45, .08); }
.field-row { display: flex; gap: 16px; }
.field-row > .field { flex: 1; }
.field-hint { display: block; margin-top: 6px; font-size: 9.5px; line-height: 1.45; color: var(--muted-2); }
.form-hint { margin-top: 12px; font-size: 10px; line-height: 1.5; color: var(--muted-2); text-align: center; }
.form-hint a { text-decoration: underline; text-underline-offset: 3px; }
.form-errors { margin-bottom: 22px; padding: 16px 18px; border-left: 3px solid var(--burgundy); background: #f6e2db; color: #6e2e20; font-size: 12px; line-height: 1.5; }
.form-errors b { display: block; margin-bottom: 5px; }
.form-errors ul { padding-left: 17px; }
.form-errors li + li { margin-top: 3px; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
fieldset.field { margin: 0; padding: 0; border: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 7px; }
.choice { position: relative; display: inline-flex; cursor: pointer; }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fdf9f0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.choice:hover span { border-color: var(--line-strong); }
.choice input:checked + span { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--burgundy); outline-offset: 2px; }
.check-field { display: flex; align-items: flex-start; gap: 9px; margin: 12px 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.check-field input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--burgundy); }
.check-field a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }
.check-field--consent { padding: 15px; border: 1px dashed var(--line-strong); margin-bottom: 18px; }

.photo-drop { position: relative; padding: 8px; border: 1px dashed var(--line-strong); background: rgba(253, 249, 240, .55); }
.photo-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-drop__label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 150px; padding: 22px; text-align: center; cursor: pointer; transition: background .2s ease; }
.photo-drop__label:hover { background: rgba(141, 63, 45, .04); }
.photo-drop__icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 5px; border: 1px solid var(--burgundy); border-radius: 50%; color: var(--burgundy); font-size: 22px; font-weight: 300; }
.photo-drop__label strong { font-size: 13px; }
.photo-drop__label > span:not(.photo-drop__icon) { font-size: 11px; color: var(--muted); }
.photo-drop__label small { margin-top: 3px; font-size: 9px; color: var(--muted-2); }
.photo-previews { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-top: 0; }
.photo-previews:not(:empty) { padding: 7px; }
.photo-preview { position: relative; overflow: hidden; aspect-ratio: 1; background: var(--paper-3); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview span { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 4px; background: rgba(27, 19, 12, .65); color: #f8f0e1; font-size: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.form-submit { padding-top: 6px; }
.form-submit .btn { margin-top: 16px; }

.status-success { background: #e5ead9; }
.form-errors + .form-section { margin-top: 0; }

/* ---------- Спасибо ---------- */

.success-main { padding: 70px 0 90px; }
.success-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.success-card { padding: 46px 42px; border: 1px solid var(--line); background: var(--cream); box-shadow: var(--shadow); }
.success-card .stamp { margin-bottom: 22px; }
.success-card h1 { font-size: clamp(44px, 5.5vw, 68px); line-height: .92; }
.success-card .lead { margin: 18px 0 24px; font-size: 14px; }
.success-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.success-note { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--muted); }
.success-note a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }
.success-polaroid { justify-self: center; width: 330px; max-width: 100%; padding: 10px 10px 0; background: var(--cream); box-shadow: var(--shadow); transform: rotate(3deg); }
.success-polaroid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.success-polaroid span { display: block; padding: 12px 2px 13px; font-family: var(--hand); font-size: 21px; text-align: center; color: #5c4734; }

/* ---------- Приватность ---------- */

.privacy-layout { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 70px; align-items: start; }
.privacy-aside { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 9px; }
.privacy-aside .profile-label { margin-bottom: 6px; }
.privacy-aside a { font-size: 11px; color: var(--muted); }
.privacy-aside a:hover { color: var(--burgundy); }
.privacy-content section { padding: 0 0 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.privacy-content h2 { margin-bottom: 12px; font-size: 32px; }
.privacy-content p { font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.privacy-content p + p { margin-top: 10px; }
.privacy-content a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }
.privacy-updated { font-size: 10px; color: var(--muted-2); }

/* ---------- Ошибка ---------- */

.error-main { padding: 80px 0 100px; }
.error-wrap { display: flex; justify-content: center; }
.error-card { position: relative; width: min(620px, 100%); padding: 56px 50px; border: 1px solid var(--line); background: var(--cream); box-shadow: var(--shadow); text-align: center; }
.error-code { position: absolute; right: 24px; top: 8px; font-family: var(--serif); font-size: 84px; line-height: 1; color: rgba(141, 63, 45, .1); }
.error-card .eyebrow { justify-content: center; }
.error-card h1 { font-size: 45px; }
.error-card .lead { margin: 16px auto 24px; font-size: 14px; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Подвал ---------- */

.site-footer { padding: 62px 0 24px; background: #211a12; color: #e8d8bf; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .6fr .75fr .8fr; gap: 42px; }
.brand--footer .brand-mark { border-color: #cba77a; color: #d9b878; }
.brand--footer .brand-text strong { color: #f4e6d1; }
.brand--footer .brand-text small { color: #a18d73; }
.footer-quote { max-width: 300px; margin: 22px 0 18px; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.35; color: #d6c2a4; }
.footer-share { display: flex; flex-wrap: wrap; gap: 7px; }
.footer-share a, .footer-share button {
  padding: 7px 10px;
  border: 1px solid rgba(232, 216, 191, .24);
  border-radius: 999px;
  background: transparent;
  color: #cdb89b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
}
.footer-share button { font-size: 8px; }
.footer-share a:hover, .footer-share button:hover { border-color: #d9b878; color: #f4e6d1; }
.footer-col h3 { margin-bottom: 12px; font-size: 9px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: #c09b6d; }
.footer-col p, .footer-col a { display: block; margin-bottom: 6px; font-size: 11.5px; line-height: 1.5; color: #bcaa90; }
.footer-col a:hover { color: #f4e6d1; }
.footer-link-arrow { margin-top: 12px; color: #e2c59c !important; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 42px; padding-top: 16px; border-top: 1px solid rgba(232, 216, 191, .16); font-size: 9px; letter-spacing: .03em; color: #8f7d66; }
.footer-bottom a { color: #bcaa90; }
.footer-bottom a:hover { color: #f4e6d1; }
.footer-made { text-align: center; }

/* ---------- Анимация появления ---------- */

.reveal.is-armed { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */

@media (max-width: 1120px) {
  .site-nav { gap: 18px; }
  .people-grid--page { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-grid { gap: 40px; }
  .hero-collage { min-height: 480px; }
  .profile-layout { grid-template-columns: 290px minmax(0, 1fr); gap: 44px; }
  .event-grid, .event-page-grid { gap: 38px; }
}

@media (max-width: 980px) {
  .header-inner { min-height: 76px; }
  .site-nav {
    position: absolute;
    top: 76px; left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 12px 24px 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(60, 40, 20, .1);
  }
  .nav-open .site-nav { display: flex; }
  .site-nav > a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .site-nav > a:not(.btn)::after { display: none; }
  .site-nav .nav-admin { margin-top: 8px; border: 0; }
  .nav-mobile-cta { display: inline-flex; margin-top: 14px; }
  .header-cta { display: none; }
  .nav-toggle { display: block; }
  .hero { padding: 52px 0 50px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { max-width: 680px; }
  .hero-collage { width: min(560px, 100%); min-height: 500px; margin: 0 auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section { padding: 62px 0; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 14px; }
  .section-head h2 { font-size: 44px; }
  .people-grid, .people-grid--page { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memory-grid { grid-template-columns: 1fr; gap: 36px; }
  .memory-photo { width: min(420px, 100%); justify-self: end; }
  .event-grid, .event-page-grid, .event-hero-grid { grid-template-columns: 1fr; }
  .countdown-card, .event-hero-card, .rsvp-card { max-width: 520px; width: 100%; }
  .countdown-card { margin: 0 auto; }
  .rsvp-card { position: static; }
  .photo-strip { grid-template-rows: repeat(3, 130px); }
  .join-card { grid-template-columns: 1fr; gap: 28px; padding: 40px; }
  .page-hero { padding-top: 46px; }
  .profile-layout { grid-template-columns: 1fr; gap: 40px; }
  .profile-aside { position: static; display: grid; grid-template-columns: 260px 1fr; gap: 22px 30px; align-items: start; }
  .profile-portrait { grid-row: span 3; margin: 0; }
  .profile-contacts, .profile-share { border-top: 0; padding: 0; }
  .profile-share { margin-top: 4px; }
  .back-link { margin-top: 0; }
  .form-layout { display: flex; flex-direction: column; gap: 28px; }
  .form-card { order: 1; }
  .form-aside { order: 2; position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
  .form-aside .profile-label { grid-column: 1 / -1; margin-bottom: 0; }
  .steps-list { grid-column: 1; }
  .form-aside-note { grid-column: 2; margin-top: 0; }
  .form-aside-quote { grid-column: 1 / -1; margin-top: 0; padding-top: 0; border-top: 0; }
  .success-wrap { grid-template-columns: 1fr; }
  .success-polaroid { justify-self: start; width: min(360px, 100%); }
  .qr-row { grid-template-columns: 1fr 260px; gap: 40px; }
  .privacy-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 40px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 32px); }
  .header-inner { min-height: 70px; }
  .site-nav { top: 70px; padding-inline: 16px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-text strong { font-size: 18px; }
  .brand-text small { font-size: 7px; }
  .hero { padding: 40px 0 38px; }
  .hero h1 { font-size: clamp(47px, 13vw, 68px); }
  .hero-lead { font-size: 15px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-meta { gap: 18px; }
  .hero-meta-item { flex: 1 1 40%; }
  .hero-collage { min-height: 430px; }
  .polaroid--main { width: 78%; left: 3%; }
  .polaroid--small { width: 32%; }
  .polaroid--one { right: -1%; top: 26%; }
  .polaroid--two { left: -1%; bottom: 2%; }
  .hero-stamp { width: 78px; height: 78px; right: 3%; bottom: 2%; }
  .hero-stamp b { font-size: 31px; }
  .hand-note { left: 32%; bottom: 2%; font-size: 19px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 18px 16px; }
  .stat:first-child { padding-left: 16px; }
  .stat b { font-size: 30px; }
  .section { padding: 50px 0; }
  .section-head h2 { font-size: 37px; }
  .people-grid, .people-grid--page { grid-template-columns: 1fr; gap: 16px; }
  .people-toolbar { flex-direction: column; align-items: stretch; }
  .roster-head { align-items: flex-start; flex-direction: column; gap: 7px; }
  .roster-grid { grid-template-columns: 1fr; }
  .roster-foot { align-items: flex-start; flex-direction: column; }
  .search-field { width: 100%; }
  .person-card__quote { font-size: 12px; }
  .memory-band { padding: 54px 0; }
  .memory-copy blockquote { font-size: 31px; }
  .memory-photo { justify-self: start; width: min(360px, 100%); }
  .event-facts { grid-template-columns: 1fr; gap: 13px; }
  .event-fact { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .event-fact:last-child { border-bottom: 0; }
  .countdown-card, .event-hero-card { padding-inline: 20px; }
  .countdown b { font-size: 28px; }
  .photo-strip { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 150px); }
  .photo-tile--1, .photo-tile--2, .photo-tile--5, .photo-tile--6 { grid-column: span 1; grid-row: span 1; }
  .join-card { padding: 30px 24px; }
  .join-copy h2 { font-size: 38px; }
  .page-hero { padding: 38px 0 28px; }
  .page-hero-row { flex-direction: column; align-items: flex-start; gap: 20px; }
  .page-hero h1 { font-size: 50px; }
  .page-hero-meta { flex-direction: row; align-items: baseline; gap: 8px; }
  .page-hero-meta b { font-size: 40px; }
  .anketa-side-note { transform: none; }
  .profile-hero { padding-top: 18px; }
  .breadcrumbs { margin-bottom: 22px; }
  .profile-title h1 { font-size: 51px; }
  .profile-aside { display: block; }
  .profile-portrait { width: min(300px, 100%); margin-bottom: 24px; }
  .profile-contacts { padding: 18px 0; border-top: 1px solid var(--line); }
  .profile-share { padding-top: 0; }
  .profile-intro { font-size: 21px; }
  .profile-block h2, .profile-block-head h2 { font-size: 26px; }
  .profile-block p { font-size: 14.5px; }
  .profile-memory blockquote { font-size: 26px; }
  .profile-photo-grid { grid-template-columns: 1fr; }
  .profile-bottom .btn { width: 100%; }
  .masonry { columns: 2 160px; column-gap: 12px; }
  .gallery-card { margin-bottom: 16px; }
  .event-hero { padding: 38px 0 34px; }
  .event-hero h1 { font-size: 49px; }
  .event-page-grid { gap: 34px; }
  .program-timeline-item { grid-template-columns: 46px 30px 1fr; gap: 10px; }
  .program-dot { width: 28px; height: 28px; font-size: 7px; }
  .event-route { grid-template-columns: 1fr; gap: 4px; }
  .event-route-arrow { height: 22px; transform: rotate(90deg); }
  .event-info-grid { grid-template-columns: 1fr; }
  .event-contact-band { align-items: flex-start; flex-direction: column; }
  .rsvp-card { padding: 24px 20px; }
  .rsvp-form .field-row { flex-direction: column; gap: 0; }
  .qr-row { grid-template-columns: 1fr; gap: 30px; }
  .qr-card { width: min(260px, 100%); justify-self: center; }
  .form-card { padding: 22px 18px; }
  .form-aside { grid-template-columns: 1fr; }
  .form-aside-note { grid-column: auto; }
  .form-aside-quote { grid-column: auto; }
  .field-row { flex-direction: column; gap: 0; }
  .photo-previews { grid-template-columns: repeat(3, 1fr); }
  .success-main { padding: 46px 0 60px; }
  .success-card { padding: 32px 22px; }
  .privacy-layout { grid-template-columns: 1fr; gap: 26px; }
  .privacy-aside { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .privacy-aside .profile-label { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-made { text-align: left; }
  .lightbox { padding: 12px; }
  .lightbox__nav { top: auto; bottom: 70px; transform: none; }
  .lightbox__nav--prev { left: 20px; }
  .lightbox__nav--next { right: 20px; }
}

@media (max-width: 440px) {
  .hero-meta-item { flex: 1 1 100%; }
  .choice-row { flex-direction: column; }
  .choice { width: 100%; }
  .stat b { font-size: 27px; }
  .stat span { font-size: 8px; }
  .masonry { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal.is-armed { opacity: 1; transform: none; }
}

/* ---------- Мини-чат ---------- */

.page-hero--chat { background: rgba(233, 221, 199, .24); }
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.chat-main { min-width: 0; }

.chat-board {
  border: 1px solid var(--line);
  background: var(--cream);
  box-shadow: var(--shadow-sm);
}
.chat-board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 17px;
  border-bottom: 1px solid var(--line);
}
.chat-board-head .eyebrow { margin-bottom: 7px; }
.chat-board-head h2 { font-size: 33px; line-height: .98; }
.chat-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 3px;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--olive);
  white-space: nowrap;
}
.chat-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--olive);
  box-shadow: 0 0 0 4px rgba(89, 101, 70, .12);
  animation: chat-pulse 2.4s ease-in-out infinite;
}
@keyframes chat-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(89, 101, 70, .1); }
  50% { box-shadow: 0 0 0 5px rgba(89, 101, 70, .16); }
}

.chat-feed {
  max-height: min(56vh, 560px);
  min-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 24px 24px;
  scrollbar-color: rgba(117, 99, 79, .32) transparent;
  scrollbar-width: thin;
}
.chat-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 30px;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.2;
  text-align: center;
  color: var(--muted);
}
.chat-empty[hidden] { display: none; }

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.chat-message:last-child { border-bottom: 0; }
.chat-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1;
  letter-spacing: .02em;
}
.chat-avatar--0 { color: var(--burgundy); background: rgba(141, 63, 45, .08); }
.chat-avatar--1 { color: var(--olive); background: rgba(89, 101, 70, .09); }
.chat-avatar--2 { color: #7f5a28; background: rgba(178, 135, 75, .13); }
.chat-avatar--3 { color: #5b4b68; background: rgba(91, 75, 104, .08); }
.chat-bubble { min-width: 0; flex: 1; }
.chat-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.chat-meta b { font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.1; }
.chat-meta b a { text-decoration: underline; text-decoration-color: rgba(141, 63, 45, .35); text-underline-offset: 3px; }
.chat-meta b a:hover { color: var(--burgundy); }
.chat-meta time {
  flex: 0 0 auto;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}
.chat-bubble p {
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-new {
  display: block;
  position: relative;
  z-index: 2;
  margin: -46px auto 14px;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--burgundy);
  cursor: pointer;
}
.chat-new[hidden] { display: none; }

.chat-form {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--cream);
  box-shadow: var(--shadow-sm);
}
.chat-form-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.chat-form-head h2 { margin-top: 5px; font-size: 30px; line-height: .98; }
.chat-counter {
  padding-bottom: 2px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted-2);
  white-space: nowrap;
}
.chat-form .field { margin-bottom: 14px; }
.chat-form textarea { min-height: 92px; resize: vertical; }
.chat-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.chat-form-foot p {
  max-width: 470px;
  font-size: 9px;
  line-height: 1.55;
  color: var(--muted-2);
}
.chat-form-foot .btn { flex: 0 0 auto; }

.chat-closed {
  margin-top: 18px;
  padding: 34px 28px;
  border: 1px dashed var(--line-strong);
  background: rgba(252, 247, 236, .55);
  text-align: center;
}
.chat-closed h2 { margin: 7px 0 9px; font-size: 32px; }
.chat-closed p { max-width: 470px; margin: 0 auto 16px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

.chat-aside {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-aside-card {
  padding: 22px 22px 23px;
  border: 1px solid var(--line);
  background: rgba(252, 247, 236, .6);
}
.chat-aside-card--warm { background: rgba(233, 221, 199, .35); }
.chat-aside-card h2 { margin: 8px 0 10px; font-size: 26px; line-height: 1.04; }
.chat-aside-card p { font-size: 11px; line-height: 1.55; color: var(--muted); }
.chat-rules { margin-top: 2px; list-style: none; counter-reset: chatrule; }
.chat-rules li {
  position: relative;
  padding: 10px 0 10px 25px;
  border-top: 1px solid var(--line);
  counter-increment: chatrule;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted);
}
.chat-rules li::before {
  content: counter(chatrule, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 11px;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--burgundy);
}
.chat-rules b { font-weight: 600; color: var(--ink-soft); }
.chat-aside-link {
  display: inline-flex;
  margin-top: 12px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--burgundy);
}
.chat-aside-link:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 980px) {
  .chat-layout { grid-template-columns: 1fr; gap: 30px; }
  .chat-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .chat-aside-card:first-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .chat-board-head { align-items: flex-start; flex-direction: column; gap: 8px; padding: 18px 17px 15px; }
  .chat-board-head h2 { font-size: 29px; }
  .chat-feed { max-height: min(58vh, 460px); min-height: 230px; padding: 0 16px 18px; }
  .chat-empty { min-height: 230px; font-size: 20px; }
  .chat-message { gap: 10px; padding: 14px 0; }
  .chat-avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: 12px; }
  .chat-meta { align-items: flex-start; flex-direction: column; gap: 2px; }
  .chat-meta b { font-size: 16px; }
  .chat-meta time { font-size: 7px; }
  .chat-bubble p { font-size: 13px; }
  .chat-form { padding: 20px 17px; }
  .chat-form-head { align-items: flex-start; }
  .chat-form-head h2 { font-size: 27px; }
  .chat-form-foot { align-items: stretch; flex-direction: column; }
  .chat-form-foot .btn { width: 100%; }
  .chat-aside { grid-template-columns: 1fr; }
  .chat-aside-card:first-child { grid-column: auto; }
  .chat-closed { padding: 28px 18px; }
}

/* ---------- Помним и «до 9 класса» ---------- */

.page-hero-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 16px; }
.page-hero-links .page-hero-link { margin-top: 0; }

.memory-star { margin-right: 2px; color: var(--gold); font-style: normal; font-size: 11px; }
.roster-item--memory { color: var(--ink-soft); }
.roster-status--memory, .roster-badge--memory { color: #8a6a2f; }
.roster-status--left { color: var(--olive); }

.left-block { margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--line); }
.left-block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 9px; }
.left-block-head h2 { font-size: clamp(34px, 4.1vw, 47px); line-height: .98; }
.left-block-head .eyebrow { margin-bottom: 9px; }
.left-block-lead { max-width: 720px; margin-bottom: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.left-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 38px; border-top: 1px solid var(--line); }
.left-item { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 40px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.left-name { font-family: var(--serif); font-size: 18px; line-height: 1.1; }
.left-badge { color: var(--olive); font-size: 7px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
a.left-item:hover .left-name { text-decoration: underline; text-underline-offset: 3px; }

.memory-block {
  position: relative;
  margin-top: 56px;
  padding: 34px 34px 36px;
  border: 1px solid rgba(178, 135, 75, .38);
  background: linear-gradient(135deg, rgba(233, 221, 199, .5), rgba(252, 247, 236, .72));
  overflow: hidden;
}
.memory-block::before {
  content: "✦";
  position: absolute;
  right: 16px;
  top: -14px;
  font-family: var(--serif);
  font-size: 128px;
  line-height: 1;
  color: rgba(178, 135, 75, .12);
  pointer-events: none;
}
.memory-block-head { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 8px; }
.memory-block-head .eyebrow { margin-bottom: 9px; color: #8a6a2f; }
.memory-block-head h2 { font-size: clamp(34px, 4.1vw, 48px); line-height: .98; }
.memory-count { padding-bottom: 4px; color: #8a6a2f; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.memory-lead { position: relative; z-index: 1; max-width: 560px; margin-bottom: 22px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.memory-list { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 38px; border-top: 1px solid rgba(178, 135, 75, .3); }
.memory-name { display: flex; align-items: baseline; gap: 9px; padding: 10px 0; border-bottom: 1px solid rgba(178, 135, 75, .22); font-family: var(--serif); font-size: 19px; line-height: 1.15; color: var(--ink-soft); }
.memory-name i { color: var(--gold); font-style: normal; font-size: 11px; }
a.memory-name:hover { color: var(--burgundy); }
.profile-memory { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 5px 10px; border: 1px solid rgba(178, 135, 75, .42); border-radius: 99px; color: #8a6a2f; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 680px) {
  .page-hero-links { gap: 5px 14px; }
  .left-block, .memory-block { margin-top: 40px; }
  .left-block-head, .memory-block-head { align-items: flex-start; flex-direction: column; gap: 7px; }
  .left-grid, .memory-list { grid-template-columns: 1fr; }
  .memory-block { padding: 26px 18px 28px; }
  .memory-block-head h2 { font-size: 32px; }
  .memory-name { font-size: 18px; }
}

/* ---------- Вход, регистрация и закрытые данные ---------- */

.site-nav .nav-account { color: var(--burgundy); font-weight: 700; }

.auth-section { padding: 64px 0 86px; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) 460px; align-items: start; gap: 70px; }
.auth-copy h1 { font-size: clamp(52px, 6vw, 76px); line-height: .9; }
.auth-copy .page-lead { max-width: 520px; }
.auth-card { padding: 32px 32px 28px; border: 1px solid var(--line); background: var(--cream); box-shadow: var(--shadow-sm); }
.auth-card h2 { margin: 7px 0 18px; font-size: 38px; line-height: .98; }
.auth-form .field { margin-bottom: 14px; }
.auth-form .field-row { gap: 12px; }
.auth-links { margin-top: 18px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.auth-links a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }
.auth-note { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 9.5px; line-height: 1.55; color: var(--muted-2); }
.auth-note a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }

.account-status { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; padding: 14px 16px; border-left: 3px solid var(--olive); background: rgba(89, 101, 70, .08); }
.account-status b { font-size: 11px; }
.account-status span { font-size: 10.5px; line-height: 1.5; color: var(--muted); }
.account-status--pending { border-left-color: var(--gold); background: rgba(178, 135, 75, .1); }
.account-fields { margin: 0 0 20px; }
.account-fields > div { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.account-fields dt { font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.account-fields dd { margin: 0; font-family: var(--serif); font-size: 17px; text-align: right; overflow-wrap: anywhere; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-actions form { margin: 0; }

.private-gate { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 24px; border: 1px dashed var(--line-strong); background: rgba(252, 247, 236, .55); text-align: center; }
.private-gate--wide { margin-top: 24px; }
.private-gate-icon { color: var(--gold); font-size: 22px; line-height: 1; }
.private-gate b { font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1.05; }
.private-gate p { max-width: 430px; font-size: 11.5px; line-height: 1.55; color: var(--muted); }
.private-gate .btn { margin-top: 4px; }
.private-gate .btn + .btn { margin-left: 6px; }
.private-gate-text { font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.private-gate-text a { display: inline; color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }

.private-photo { display: grid; place-items: center; align-content: center; gap: 3px; min-height: 320px; border: 1px dashed var(--line-strong); background: rgba(233, 221, 199, .35); text-align: center; }
.private-photo span { font-family: var(--serif); font-size: 29px; color: var(--muted); }
.private-photo small { font-size: 7.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }

.person-card__private { display: grid; place-items: center; align-content: center; gap: 3px; width: 100%; height: 100%; min-height: 210px; background: linear-gradient(135deg, rgba(233, 221, 199, .65), rgba(252, 247, 236, .6)); text-align: center; }
.person-card__private b { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--muted); }
.person-card__private small { font-size: 7px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }

@media (max-width: 980px) {
  .auth-layout { grid-template-columns: 1fr; gap: 30px; }
  .auth-copy h1 { font-size: clamp(46px, 10vw, 64px); }
  .auth-card { max-width: 560px; }
}

@media (max-width: 680px) {
  .auth-section { padding: 40px 0 58px; }
  .auth-card { padding: 24px 18px 22px; }
  .auth-card h2 { font-size: 32px; }
  .auth-form .field-row { flex-direction: column; gap: 0; }
  .account-fields > div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .account-fields dd { text-align: left; }
  .private-gate { padding: 28px 18px; }
  .private-gate b { font-size: 23px; }
  .private-gate .btn { width: 100%; }
  .private-gate .btn + .btn { margin-left: 0; }
  .private-photo { min-height: 260px; }
}
