:root {
  --olive-900: #233026;
  --olive-800: #2a3a2f;
  --olive-700: #3d5141;
  --olive-600: #495f4d;
  --olive-soft: #e8ebe4;
  --cream-100: #f5f0e5;
  --cream-200: #e9dfcf;
  --cream-panel: #faf7f2;
  --page-warm: #fbfaf7;
  --gold-muted: #c9b58e;
  --white: #ffffff;
  --font-serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-script: "Great Vibes", cursive;
  --text-on-light: #1a221c;
  --text-muted-on-light: #4d5c4f;
  --line-dark-bg: rgba(233, 223, 207, 0.22);
  --line-on-panel: rgba(45, 62, 50, 0.1);
  --line-on-panel-strong: rgba(45, 62, 50, 0.16);
  --shadow-panel: 0 20px 50px rgba(35, 48, 38, 0.08);
  --ref-bg: #4b5335;
  --ref-bg-deep: #3d442e;
  --ref-card: #ffffff;
  --ref-btn: #4d5c43;
  --ref-btn-hover: #3d4a36;
  --ref-muted: #5c6656;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 112.5%;
}

@media (max-width: 680px) {
  html {
    font-size: 106%;
  }
}

body {
  margin: 0;
  color: var(--text-on-light);
  background: linear-gradient(180deg, var(--white) 0%, var(--page-warm) 35%, var(--cream-100) 100%);
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: 0.012em;
  font-size: 1rem;
  line-height: 1.65;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
  letter-spacing: 0.02em;
}

p {
  margin: 0;
  line-height: 1.82;
  font-size: 1.08rem;
}

/* ——— Hero: фото + тёмный слой; типографика как в референсе ——— */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 2rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--olive-900);
  background-image: linear-gradient(rgba(20, 28, 22, 0.22),
      rgba(35, 48, 38, 0.58)),
    url("https://images.unsplash.com/photo-1519225421980-715cb0215aed?q=80&w=2000&auto=format&fit=crop");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 75% 30%, rgba(201, 181, 142, 0.12), transparent 55%),
    linear-gradient(to bottom, rgba(42, 58, 47, 0.08), rgba(35, 48, 38, 0.35));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.35rem, 4vw, 2.25rem);
  width: 100%;
  max-width: min(980px, 100%);
}

.hero-photos {
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0.35rem, 2.5vw, 1rem);
  width: 100%;
}

.hero-portrait {
  flex: 0 1 min(240px, 42vw);
  margin: 0;
}

.hero-pair:not(.hero-pair--solo) .hero-portrait:first-of-type {
  transform: rotate(-2.5deg);
}

.hero-pair:not(.hero-pair--solo) .hero-portrait:last-of-type {
  transform: rotate(2.5deg);
}

.hero-pair--solo {
  justify-content: center;
}

.hero-pair--solo .hero-portrait {
  flex: 0 1 min(300px, 78vw);
  transform: none;
}

.hero-portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.hero-caption {
  margin-top: 0.45rem;
  text-align: center;
  font-size: clamp(1.15rem, 3.5vw, 1.65rem);
  color: rgba(245, 240, 229, 0.85);
  opacity: 0.92;
}

.hero-portrait-join {
  flex: 0 0 auto;
  align-self: center;
  margin-bottom: clamp(2rem, 10vw, 4rem);
  font-size: clamp(2rem, 7vw, 3.25rem);
  color: var(--cream-100);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.hero-wide {
  width: 100%;
  max-width: min(720px, 100%);
  margin: 0;
}

.hero-wide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.32);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(900px, 100%);
  text-align: center;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--line-dark-bg);
  background: rgba(35, 48, 38, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.is-hidden {
  display: none !important;
}

.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.btn-shimmer::after {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(105deg,
      transparent 35%,
      rgba(255, 255, 255, 0.22) 48%,
      transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.65s ease;
}

.btn-shimmer:hover::after {
  transform: translateX(120%);
}

.hero-names {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.2em 0.45em;
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1.05;
}

.hero-names .script {
  color: var(--cream-100);
  font-size: clamp(3rem, 11vw, 6.25rem);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.2);
}

.hero-names .hero-amp {
  font-size: clamp(2rem, 7vw, 3.75rem);
  margin: 0 0.06em;
  opacity: 0.92;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--gold-muted);
  margin-bottom: 1rem;
}

.hero .hero-date {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 500;
  color: var(--cream-100);
}

.hero .hero-text {
  margin: 1.5rem auto 2.15rem;
  max-width: 34rem;
  color: var(--cream-200);
  font-size: 1.15rem;
  line-height: 1.78;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.hero .btn-primary,
.hero .btn-secondary {
  border: 1px solid var(--gold-muted);
  background: rgba(201, 181, 142, 0.18);
  color: var(--cream-100);
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 0.85rem 1.35rem;
}

.hero .btn-primary:hover,
.hero .btn-secondary:hover {
  background: rgba(201, 181, 142, 0.3);
  border-color: var(--cream-200);
}

/* ——— Контент: единый светлый фон, секции без «карточек» и без фото-фона ——— */
.section {
  width: min(1120px, calc(100% - 2.25rem));
  margin-left: auto;
  margin-right: auto;
}

main>.section {
  padding: clamp(3.25rem, 8vw, 5.25rem) 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-bottom: 1px solid var(--line-on-panel);
}

main>.section:last-of-type {
  border-bottom: none;
}

.section h2,
.section h3 {
  color: var(--olive-900);
}

.section h2 {
  font-size: clamp(2.35rem, 5.5vw, 3.85rem);
  margin-bottom: 1.1rem;
  letter-spacing: 0.035em;
  line-height: 1.12;
}

.section h3 {
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.25;
}

/* Локальные фото в секциях + аккуратная заглушка, если файла ещё нет */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
}

.section-photo {
  margin: 0 0 1.75rem;
}

.section-photo--cinema {
  width: 100%;
  max-width: none;
}

.section-photo--band {
  width: 100%;
  max-width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.section-photo--letter {
  width: 100%;
  max-width: min(920px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.section-photo--tall {
  width: 100%;
  max-width: min(340px, 92%);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .section-photo--tall {
    margin-left: auto;
    margin-right: auto;
    max-width: min(300px, 88%);
  }
}

.section-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line-on-panel-strong);
  box-shadow: 0 16px 42px rgba(35, 48, 38, 0.09);
}

.media-frame--ratio-cinema img {
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.media-frame--ratio-wide img {
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.media-frame--ratio-letter img {
  aspect-ratio: 5 / 4;
  object-fit: cover;
}

.media-frame--ratio-tall img {
  aspect-ratio: 3 / 5;
  object-fit: cover;
}

.media-frame--missing {
  min-height: 11rem;
  background: repeating-linear-gradient(-38deg,
      rgba(73, 95, 77, 0.07),
      rgba(73, 95, 77, 0.07) 14px,
      rgba(73, 95, 77, 0.025) 14px,
      rgba(73, 95, 77, 0.025) 28px);
  border: 1px dashed rgba(73, 95, 77, 0.3);
  border-radius: 14px;
}

.media-frame--missing img {
  display: none !important;
}

.media-frame--missing::after {
  content: "Не удалось загрузить фото. Проверьте файл в public/images/ (" attr(data-file) ")";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-muted-on-light);
  line-height: 1.5;
}

.hero .media-frame--missing {
  min-height: 14rem;
  border-color: rgba(255, 255, 255, 0.35);
  background: repeating-linear-gradient(-38deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.06) 14px,
      rgba(255, 255, 255, 0.02) 14px,
      rgba(255, 255, 255, 0.02) 28px);
}

.hero .media-frame--missing::after {
  color: rgba(245, 240, 229, 0.88);
}

.media-frame--missing .hero-caption {
  display: none;
}

.gallery-grid .media-frame--missing {
  min-height: 15rem;
}

.section-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.25rem 0 0.15rem;
}

.section-divider__leaf {
  width: 11px;
  height: 11px;
  border: 1px solid var(--olive-600);
  opacity: 0.28;
  transform: rotate(45deg);
}

.invitation p,
.location p,
.dress-code p {
  max-width: 42rem;
  color: var(--text-muted-on-light);
  font-size: 1.18rem;
  line-height: 1.82;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.35rem;
  margin-top: 0.35rem;
}

.timeline-item {
  padding: 1.45rem 1.35rem;
  border: 1px solid var(--line-on-panel-strong);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.timeline-card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 38px rgba(35, 48, 38, 0.12);
}

.timeline-item .time {
  display: inline-block;
  margin-bottom: 0.65rem;
  color: var(--olive-600);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.07em;
}

.timeline-item h3 {
  margin-bottom: 0.45rem;
  font-size: 1.48rem;
}

.timeline-item p {
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--text-muted-on-light);
}

.location-actions {
  margin-top: 1.35rem;
}

.location-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 0 0 1.5rem;
  align-items: stretch;
  min-height: min(360px, 52vw);
}

.location-split__photo {
  margin: 0;
  min-height: 280px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-on-panel-strong);
  box-shadow: 0 16px 42px rgba(35, 48, 38, 0.09);
}

.location-split__photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.location-split__map {
  min-height: 280px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-on-panel-strong);
  box-shadow: 0 16px 42px rgba(35, 48, 38, 0.09);
  background: var(--cream-panel);
}

.location-split__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
}

@media (max-width: 768px) {
  .location-split {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .location-split__map {
    min-height: 260px;
  }

  .location-split__map iframe {
    min-height: 260px;
  }
}

.palette {
  margin-top: 1.55rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.palette span {
  width: 82px;
  height: 82px;
  border: 1px solid var(--line-on-panel-strong);
  box-shadow: 0 4px 14px rgba(35, 48, 38, 0.08);
  border-radius: 4px;
}

.palette--lift span {
  cursor: default;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.palette--lift span:hover {
  transform: translateY(-7px);
  box-shadow: 0 12px 26px rgba(35, 48, 38, 0.14);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.35rem;
  margin-top: 0.35rem;
}

.gallery-grid .gallery-tilt {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(73, 95, 77, 0.22);
  border-radius: 14px;
  aspect-ratio: 4 / 5;
  box-shadow: 0 14px 36px rgba(35, 48, 38, 0.1);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.gallery-tilt {
  transform: rotate(-1.1deg);
}

.gallery-tilt--alt {
  transform: rotate(1.1deg);
}

.gallery-tilt:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 20px 48px rgba(35, 48, 38, 0.14);
}

.gallery-grid .gallery-tilt img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
  filter: saturate(0.85);
}

.gallery-grid .gallery-tilt:hover img {
  transform: scale(1.06);
  filter: saturate(1) contrast(1.03);
}

.rsvp-form {
  display: grid;
  gap: 1.15rem;
  max-width: 42rem;
  margin-top: 0.35rem;
}

.form-row {
  display: grid;
  gap: 0.45rem;
}

.section label {
  font-size: 1.05rem;
  color: var(--text-muted-on-light);
  font-weight: 600;
}

.section input,
.section select,
.section textarea {
  width: 100%;
  border: 1px solid var(--line-on-panel-strong);
  background: var(--white);
  color: var(--text-on-light);
  padding: 0.88rem 0.95rem;
  font: inherit;
  font-size: 1.06rem;
  border-radius: 3px;
}

.section textarea {
  resize: vertical;
}

.section .btn-primary,
.section .btn-secondary {
  border: 1px solid var(--olive-600);
  background: var(--olive-600);
  color: var(--cream-100);
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82rem;
  padding: 0.9rem 1.45rem;
  border-radius: 3px;
}

.section .btn-primary:hover,
.section .btn-secondary:hover {
  background: var(--olive-800);
  border-color: var(--olive-800);
  transform: translateY(-1px);
}

.form-message {
  min-height: 1.5rem;
  color: var(--olive-700);
  font-size: 1.06rem;
}

.form-message.is-success {
  color: var(--olive-600);
  animation: success-pop 0.65s ease;
}

@keyframes success-pop {
  0% {
    transform: scale(0.94);
    opacity: 0.65;
  }

  55% {
    transform: scale(1.03);
    opacity: 1;
  }

  100% {
    transform: scale(1);
  }
}

.footer {
  text-align: center;
  padding: 3rem 1rem 4rem;
  color: var(--text-muted-on-light);
  font-size: 1.12rem;
  line-height: 1.75;
}

.script-footer {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  color: var(--olive-700);
  line-height: 1.2;
}

.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  body.page-ref.reveal-js .invite-card.reveal:not(.visible) {
    opacity: 0.9;
    transform: translate3d(0, 18px, 0);
  }

  body.page-ref.reveal-js .invite-card.reveal.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Админка: отдельная «карточка» на светлом фоне */
.admin-page {
  min-height: 100vh;
  padding: 1rem 0 2rem;
}

main.section.admin-container {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line-on-panel-strong);
  background: var(--white);
  box-shadow: var(--shadow-panel);
}

.admin-container h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.stat-card {
  border: 1px solid var(--line-on-panel);
  background: var(--cream-panel);
  padding: 0.8rem;
}

.stat-card p {
  color: var(--text-muted-on-light);
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.stat-card strong {
  font-size: 1.6rem;
  font-family: var(--font-serif);
  color: var(--olive-900);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  border: 1px solid var(--line-on-panel);
  padding: 0.55rem;
  text-align: left;
  font-size: 0.92rem;
  vertical-align: top;
  color: var(--text-on-light);
}

thead th {
  color: var(--olive-700);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  background: var(--olive-soft);
}

.admin-table__actions {
  width: 1%;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

.admin-delete-btn {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(120, 55, 55, 0.35);
  border-radius: 6px;
  background: rgba(255, 245, 245, 0.95);
  color: #7a3030;
  font: inherit;
  font-size: 0.86rem;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.admin-delete-btn:hover:not(:disabled) {
  background: #7a3030;
  border-color: #7a3030;
  color: #fff;
}

.admin-delete-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

@media (max-width: 680px) {
  .section {
    width: calc(100% - 1.25rem);
  }

  main>.section {
    padding: clamp(2.5rem, 10vw, 3.5rem) 0;
  }

  .hero-pair {
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
  }

  .hero-portrait-join {
    margin-bottom: 0;
    margin-top: 0.15rem;
  }

  .hero-pair:not(.hero-pair--solo) .hero-portrait:first-of-type,
  .hero-pair:not(.hero-pair--solo) .hero-portrait:last-of-type {
    transform: none;
    max-width: min(280px, 88vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-shimmer::after {
    transition: none !important;
  }

  .timeline-card-hover:hover {
    transform: none;
  }
}

/* ——— Макет: светлый фон на весь экран, две колонки вровень по ширине ——— */
html:has(body.page-ref) {
  height: 100%;
  font-size: clamp(118%, 0.9vw + 0.55rem, 132%);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.page-ref {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow-x: clip;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  /* Шкала заголовков приглашения: один размер капс, два уровня скрипта */
  --ref-title-caps: clamp(2.75rem, 10.5vw, 4.35rem);
  --ref-title-script-ornament: clamp(1.65rem, 5.5vw, 2.45rem);
  --ref-title-script-lede: clamp(2.05rem, 6.6vw, 3.1rem);
  --ref-hero-script: var(--ref-title-script-ornament);
  --ref-hero-wedding: var(--ref-title-caps);
  --ref-sec-script: var(--ref-title-script-ornament);
  --ref-sec-serif: var(--ref-title-caps);
  --ref-section-title-script: var(--ref-title-script-ornament);
  --ref-section-title-caps: var(--ref-title-caps);
  --ref-space-xs: clamp(0.35rem, 1.4vw, 0.55rem);
  --ref-space-sm: clamp(0.55rem, 2vw, 0.95rem);
  --ref-space-md: clamp(1rem, 3.6vw, 1.65rem);
  --ref-space-lg: clamp(1.5rem, 5vw, 2.35rem);
  --ref-space-xl: clamp(2rem, 6.8vw, 3.35rem);
  --ref-letter-body: 0.004em;
  --ref-letter-caps: 0.026em;
  --ref-letter-btn: 0.03em;
  --ref-letter-display: clamp(0.04em, 0.5vw, 0.075em);
  --ref-letter-wedding: 0.055em;
  --ref-title-gap-top: clamp(2.35rem, 7.2vw, 3.75rem);
  --ref-hero-photo-filter: none;
  background: linear-gradient(180deg,
      #fdfcfa 0%,
      var(--page-warm) 38%,
      var(--cream-100) 100%);
  color: var(--text-on-light);
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.68;
  letter-spacing: var(--ref-letter-body);
  position: relative;
}

/* Основной текст под заголовками: крупнее и жирнее */
body.page-ref .ref-body-caps {
  font-size: clamp(0.98rem, 2.15vw, 1.14rem);
  font-weight: 600;
  line-height: 1.34;
}

body.page-ref .ref-body-caps.ref-body-caps--date {
  font-size: clamp(0.88rem, 1.95vw, 1.02rem);
  font-weight: 600;
}

.ref-body-caps--chat-lead {
  margin: 0 auto var(--ref-space-sm);
  text-align: center;
  text-transform: none;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.ref-body-caps--chat-contact {
  margin: var(--ref-space-sm) auto var(--ref-space-md);
  text-align: center;
}

.ref-chat-phone {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(35, 48, 38, 0.22);
}

.ref-chat-phone:hover {
  border-bottom-color: rgba(35, 48, 38, 0.45);
}

body.page-ref::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.page-ref__columns {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.invite-card {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  border-radius: 0;
  display: block;
}

.invite-card+.invite-card {
  border-top: 1px solid var(--line-on-panel);
}

.invite-card__inner {
  max-width: min(42rem, 100%);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(1.1rem, 2.8vw, 1.85rem) clamp(0.95rem, 3vw, 1.35rem) clamp(1.25rem, 3.2vw, 2rem);
  text-align: center;
}

body.page-ref .invite-card .invite-card__inner {
  max-width: min(48rem, 100%);
  padding: clamp(1.2rem, 3.2vw, 2.05rem) clamp(1.05rem, 4.2vw, 1.75rem) clamp(1.45rem, 3.6vw, 2.2rem);
}

.ref-wedding-day {
  margin: 0 0 0.02rem;
  text-align: center;
}

.ref-wedding-day__stack {
  position: relative;
  display: inline-block;
}

.ref-wedding-day__wedding {
  display: block;
  margin: 0 auto;
  padding: 0.12rem 0.2rem 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(3.15rem, 12.2vw, 5.05rem);
  line-height: 0.88;
  letter-spacing: var(--ref-letter-wedding);
  color: var(--olive-900);
}

.ref-wedding-day__the {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-14%, -38%) rotate(-11deg);
  font-family: var(--font-script);
  font-size: clamp(2rem, 6.6vw, 2.95rem);
  font-weight: 400;
  color: var(--olive-600);
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}

.ref-wedding-day__day {
  position: absolute;
  right: 0;
  bottom: 0;
  transform: translate(12%, 36%) rotate(7deg);
  font-family: var(--font-script);
  font-size: clamp(2rem, 6.6vw, 2.95rem);
  font-weight: 400;
  color: var(--olive-600);
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}

.ref-date {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: var(--ref-title-script-lede);
  letter-spacing: 0.02em;
  color: var(--olive-900);
  line-height: 1.12;
  margin: clamp(0.35rem, 1.4vw, 0.7rem) 0 0;
}

.ref-couple-heading {
  margin: 0;
  padding: 0 0.35rem;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.6rem, 9.2vw, 4rem);
  letter-spacing: 0.035em;
  line-height: 1.06;
  color: var(--olive-900);
  text-align: center;
  text-transform: none;
}

.ref-invite-heading {
  margin: clamp(0.75rem, 2.8vw, 1.35rem) 0 clamp(0.4rem, 1.6vw, 0.85rem);
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2rem, 7.2vw, 2.95rem);
  letter-spacing: 0.03em;
  color: var(--olive-900);
  text-align: center;
  line-height: 1.12;
  text-transform: none;
}

.ref-invite-lead {
  margin: 0 auto var(--ref-space-md);
  max-width: min(36rem, 100%);
  font-family: var(--font-serif);
  font-size: clamp(0.98rem, 2.15vw, 1.14rem);
  font-weight: 500;
  line-height: 1.62;
  letter-spacing: var(--ref-letter-body);
  color: var(--olive-900);
  text-align: center;
  text-transform: none;
}

.ref-dress-copy {
  margin: 0 auto var(--ref-space-md);
  max-width: min(38rem, 100%);
  padding: 0 clamp(0.15rem, 1.8vw, 0.85rem);
  font-family: var(--font-serif);
  font-size: clamp(0.98rem, 2.15vw, 1.12rem);
  font-weight: 500;
  line-height: 1.58;
  letter-spacing: var(--ref-letter-body);
  color: var(--olive-900);
  text-align: center;
  text-transform: none;
}

body.page-ref .ref-dress-title + .ref-dress-copy {
  margin-top: var(--ref-space-xs);
}

.ref-hero-stack {
  width: 100%;
  max-width: min(350px, 86vw);
  margin: 0 auto var(--ref-space-xs);
  padding-bottom: clamp(0.45rem, 2vw, 1rem);
}

@media (min-width: 720px) {
  .ref-hero-stack {
    max-width: min(450px, 86vw);
  }
}

.ref-hero-photo-wrap {
  position: relative;
  width: 100%;
  overflow: visible;
}

.ref-hero-photo-wrap .ref-hero {
  position: relative;
  z-index: 0;
  margin: 0;
  max-width: none;
  min-height: 10rem;
  border-radius: clamp(22px, 6vw, 38px);
  overflow: hidden;
}

.ref-hero-photo-wrap .ref-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center center;
  background-color: #e5ebe0;
  border-radius: clamp(22px, 6vw, 38px);
  border: 1px solid var(--line-on-panel-strong);
  box-shadow: 0 14px 34px rgba(35, 48, 38, 0.12);
  -webkit-filter: var(--ref-hero-photo-filter);
  filter: var(--ref-hero-photo-filter);
}

.ref-hero {
  margin: 0 auto 0.65rem;
  max-width: min(300px, 84vw);
}

.ref-hero-stack+.ref-body-caps {
  margin-top: var(--ref-space-sm);
}

.ref-monogram-block {
  position: absolute;
  left: clamp(0.4rem, 2.5vw, 1rem);
  bottom: clamp(0.65rem, 4.5vw, 1.5rem);
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 0;
  z-index: 2;
  pointer-events: none;
  max-width: calc(100% - 0.5rem);
}

.ref-monogram-card {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid rgba(45, 62, 50, 0.12);
  box-shadow: 0 12px 32px rgba(35, 48, 38, 0.14);
  padding: 0.15rem 0.42rem 0.1rem;
  line-height: 0.88;
}

.ref-hero-photo-wrap .ref-monogram-block {
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 3;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* половина квадрата на фото, половина ниже края; смещение влево */
  transform: translate(clamp(-1.45rem, -5.8vw, -0.42rem), 50%);
}

.ref-hero-photo-wrap .ref-monogram-card {
  box-sizing: border-box;
  container-type: size;
  container-name: hero-mono;
  /* строго квадрат: одна сторона + aspect-ratio, без разъезжающихся width/height */
  width: min(11.25rem, 52%);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  border: none;
  border-bottom: 3px solid rgba(45, 62, 50, 0.28);
  /* левая грань — только мягкая тень влево, без линии border */
  box-shadow: -12px 0 26px -14px rgba(35, 48, 38, 0.26);
}

/* Буквы почти на весь квадрат; С и В — прописной капс (как «СВАДЬБА»), не скрипт */
.ref-hero-photo-wrap .ref-monogram {
  margin: 0;
  line-height: 0.74;
  letter-spacing: 0;
  font-family: var(--font-serif);
  font-style: normal;
  font-size: clamp(3.85rem, 34vw, 6.85rem);
}

.ref-hero-photo-wrap .ref-monogram--sv {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ref-hero-photo-wrap .ref-monogram--sv .ref-monogram__c,
.ref-hero-photo-wrap .ref-monogram--sv .ref-monogram__v {
  display: block;
  font: inherit;
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 700;
  letter-spacing: var(--ref-letter-wedding);
  color: var(--olive-900);
  line-height: 0.72;
}

.ref-hero-photo-wrap .ref-monogram--sv .ref-monogram__c {
  position: relative;
  z-index: 2;
  transform: translate(clamp(0.06rem, 0.45vw, 0.18rem), clamp(-1.1rem, -3.6vw, -0.38rem));
}

.ref-hero-photo-wrap .ref-monogram--sv .ref-monogram__v {
  position: relative;
  z-index: 1;
  margin-left: clamp(-2.15rem, -9.5vw, -1.05rem);
  transform: translate(clamp(0.02rem, 0.25vw, 0.1rem), clamp(0.08rem, 0.9vw, 0.28rem));
}

@supports (font-size: 1cqmin) {
  .ref-hero-photo-wrap .ref-monogram {
    font-size: clamp(3.85rem, 80cqmin, 7.45rem);
  }

  .ref-hero-photo-wrap .ref-monogram--sv .ref-monogram__v {
    margin-left: clamp(-2.2rem, -15cqmin, -1.05rem);
  }
}

.ref-monogram {
  display: block;
  margin: 0;
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(2.2rem, 8.5vw, 3.35rem);
  letter-spacing: var(--ref-letter-wedding);
  line-height: 0.95;
  color: var(--olive-900);
}

.ref-names {
  margin: 0;
}

.ref-names--below {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* ниже квадрата / фото */
  margin: clamp(2.1rem, 9.6vw, 4.25rem) auto 0;
  padding: 0 clamp(0.25rem, 2vw, 1rem) 0.2rem;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  font-size: clamp(2.15rem, 8.8vw, 3.55rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--olive-900);
  text-rendering: optimizeLegibility;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  position: relative;
  z-index: 4;
}

/* Как в примере: слева ниже — Виктория, справа выше — Семен, слегка заходят друг на друга */
.ref-names__pair {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0.05rem, 0.8vw, 0.45rem);
  transform: translateX(clamp(0.85rem, 3.4vw, 2.1rem));
}

.ref-names__left {
  flex: 0 0 auto;
  transform: translateY(clamp(0.35rem, 1.8vw, 0.85rem));
}

.ref-names__right {
  flex: 0 0 auto;
  margin-left: clamp(-2.05rem, -7.5vw, -0.55rem);
  transform: translate(clamp(-0.9rem, -3.4vw, -0.22rem), clamp(-1.58rem, -6.4vw, -0.68rem));
}

.ref-names__line {
  display: block;
}

.ref-body-caps {
  margin: 0 auto var(--ref-space-md);
  max-width: min(31rem, 100%);
  padding-left: clamp(0.35rem, 2.2vw, 1rem);
  padding-right: clamp(0.35rem, 2.2vw, 1rem);
  box-sizing: border-box;
  font-family: var(--font-serif);
  font-size: clamp(0.88rem, 2.05vw, 1.05rem);
  font-weight: 500;
  line-height: 1.34;
  letter-spacing: var(--ref-letter-caps);
  text-transform: uppercase;
  color: var(--olive-900);
  overflow-wrap: break-word;
}

.ref-body-caps--invite {
  margin-bottom: clamp(0.25rem, 1vw, 0.45rem);
  line-height: 1.26;
}

.ref-body-caps--ceremony {
  margin-top: 0;
  margin-bottom: var(--ref-space-md);
}

.ref-body-caps__ceremony-title,
.ref-body-caps__ceremony-when {
  display: block;
}

.ref-body-caps__ceremony-when {
  margin-top: 0.2em;
}

.ref-body-caps--date {
  margin-top: 0;
  margin-bottom: var(--ref-space-md);
  font-size: clamp(0.78rem, 1.75vw, 0.93rem);
  font-weight: 500;
  letter-spacing: 0.045em;
  line-height: 1.22;
}

.ref-body-caps--narrow {
  max-width: min(32rem, 100%);
  margin-top: var(--ref-space-xs);
  margin-bottom: 0;
}

.ref-body-caps--loc-addr {
  text-align: center;
}

.ref-body-caps__addr-head,
.ref-body-caps__addr-rest {
  display: block;
  max-width: 100%;
}

.ref-body-caps__addr-rest {
  margin-top: 0.2em;
}

/* Адрес места — отдельный блок; фото и карта рядом ниже */
.ref-location-head {
  margin: var(--ref-space-sm) auto var(--ref-space-md);
  max-width: min(44rem, 100%);
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.ref-location-head .ref-body-caps--loc-addr {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: min(36rem, 100%);
}

.ref-location-photo-map {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3.2vw, 1.5rem);
  align-items: stretch;
  margin: var(--ref-space-md) auto var(--ref-space-md);
  max-width: min(44rem, 100%);
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .ref-location-photo-map {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 42%);
    align-items: stretch;
  }
}

.ref-location-photo-map .ref-location-photo {
  margin: 0;
  max-width: 100%;
  min-width: 0;
  width: 100%;
  min-height: 8rem;
}

.ref-location-photo-map .ref-location-photo img {
  background-color: #e5ebe0;
}

.ref-location-photo-map__map {
  position: relative;
  width: 100%;
  align-self: stretch;
  border-radius: clamp(14px, 3.2vw, 22px);
  border: 1px solid var(--line-on-panel-strong);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(35, 48, 38, 0.08);
  background: rgba(245, 250, 246, 0.55);
}

.ref-location-photo-map__map iframe {
  display: block;
  width: 100%;
  height: clamp(200px, 38vw, 300px);
  border: 0;
}

.ref-chat-anchor {
  height: 0;
  overflow: hidden;
  scroll-margin-top: 1.25rem;
}

.ref-body-caps--dress {
  max-width: 33rem;
  margin-bottom: var(--ref-space-md);
}

.ref-body-caps--details {
  max-width: 33rem;
  margin-bottom: var(--ref-space-sm);
}

/* «Место торжества»: обе строки одной антиквой (без скрипта) */
.ref-place-heading {
  margin: var(--ref-title-gap-top) auto var(--ref-space-sm);
  padding: 0;
  text-align: center;
  line-height: 0.95;
}

.ref-place-heading__line {
  display: inline-block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.32rem, 6.2vw, 2.65rem);
  color: var(--olive-900);
  text-transform: uppercase;
  letter-spacing: var(--ref-letter-display);
  line-height: 0.92;
  white-space: nowrap;
}

.ref-place-heading__line--top {
  font-size: clamp(1.85rem, 6.8vw, 2.85rem);
  margin-bottom: 0.06em;
}

.ref-place-heading__line--bottom {
  font-size: var(--ref-section-title-caps);
  line-height: 0.92;
}

.ref-section-title {
  margin: 1.25rem 0 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
  line-height: 1;
}

.ref-section-title--stack {
  display: block;
  margin-top: var(--ref-title-gap-top);
  margin-bottom: var(--ref-space-sm);
}

.ref-section-title--stack.ref-section-title--spaced {
  margin-top: clamp(2.85rem, 8.5vw, 4.35rem);
  margin-bottom: var(--ref-space-md);
}

.ref-section-title__stack {
  position: relative;
  display: inline-block;
}

.ref-section-title--stack .ref-section-title__big {
  display: block;
  margin: 0 auto;
  padding: 0.1rem 0.25rem 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--ref-section-title-caps);
  line-height: 0.92;
  letter-spacing: var(--ref-letter-display);
  color: var(--olive-900);
}

.ref-section-title--stack .ref-section-title__small {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-20%, -46%) rotate(-10deg);
  font-family: var(--font-script);
  font-size: var(--ref-section-title-script);
  font-weight: 400;
  color: var(--olive-600);
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}

.ref-section-title--spaced {
  margin-top: 1.35rem;
}

.ref-section-title__small {
  font-size: var(--ref-sec-script);
  color: var(--olive-900);
}

.ref-section-title__big {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--ref-sec-serif);
  letter-spacing: clamp(0.07em, 1vw, 0.18em);
  color: var(--olive-900);
}

.ref-location-photo {
  margin: var(--ref-space-xl) auto var(--ref-space-md);
  max-width: min(36rem, calc(100% - 1.25rem));
}

.ref-location-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: clamp(20px, 4.5vw, 28px);
  border: 1px solid var(--line-on-panel-strong);
}

.btn-ref {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  min-height: 2.85rem;
  margin: 0 0 0.6rem;
  padding: 0.65rem 1.35rem;
  box-sizing: border-box;
  font-family: var(--font-serif);
  font-size: clamp(0.78rem, 1.6vw, 0.95rem);
  font-weight: 500;
  letter-spacing: var(--ref-letter-btn);
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  color: #faf7f2;
  background: var(--ref-btn);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  line-height: 1.35;
  white-space: normal;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body.page-ref .invite-card .btn-ref {
  border-radius: 0;
}

body.page-ref .invite-card .btn-ref--wide {
  display: flex;
  width: min(82%, 24rem);
  max-width: calc(100% - 1.5rem);
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--ref-space-xs);
  margin-bottom: var(--ref-space-md);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

a.btn-ref:hover,
button.btn-ref:hover {
  background: var(--ref-btn-hover);
  color: #fff;
}

.ref-location-photo-map+.btn-ref {
  display: flex;
  width: min(78%, 22rem);
  max-width: calc(100% - 1.5rem);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--ref-space-lg);
  border-radius: 0;
}

/* Great Vibes визуально легче капса — масштаб крупнее той же опоры, что «ТОРЖЕСТВО» */
.ref-timing-title,
.ref-dress-title {
  margin: var(--ref-title-gap-top) 0 var(--ref-space-md);
  font-family: var(--font-script);
  font-size: calc(var(--ref-section-title-caps) * 1.18);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 0.95;
  color: var(--olive-900);
  text-align: center;
  text-transform: none;
  text-rendering: optimizeLegibility;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.ref-schedule {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: min(32rem, 100%);
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.ref-schedule li {
  display: grid;
  grid-template-columns: minmax(4.25em, 5.5em) minmax(0, 1fr);
  column-gap: clamp(0.65rem, 2.5vw, 1.15rem);
  row-gap: 0.15rem;
  align-items: start;
  margin-bottom: var(--ref-space-md);
  padding-bottom: var(--ref-space-xs);
  border-bottom: 1px solid rgba(45, 62, 50, 0.08);
  font-family: var(--font-serif);
  color: var(--olive-900);
}

.ref-schedule li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.ref-schedule__time {
  margin: 0;
  padding-top: 0.12em;
  font-size: clamp(1.52rem, 4.35vw, 2.12rem);
  font-weight: 500;
  letter-spacing: 0.028em;
  text-align: right;
  line-height: 1.15;
}

.ref-schedule__text {
  text-align: left;
}

.ref-schedule__event {
  display: block;
  margin-bottom: 0.28em;
  font-size: clamp(0.95rem, 2.25vw, 1.12rem);
  font-weight: 500;
  letter-spacing: var(--ref-letter-caps);
  line-height: 1.35;
  text-transform: uppercase;
}

.ref-schedule__desc {
  display: block;
  font-size: clamp(0.62rem, 1.5vw, 0.74rem);
  font-weight: 500;
  letter-spacing: 0.042em;
  line-height: 1.48;
  color: var(--ref-muted);
  text-transform: uppercase;
}

body.page-ref .ref-schedule__time,
body.page-ref .ref-schedule__event {
  font-weight: 600;
}

body.page-ref .palette.palette--arches {
  margin-top: var(--ref-space-sm);
  margin-bottom: var(--ref-space-xs);
  justify-content: center;
  gap: clamp(0.55rem, 2.4vw, 1.1rem);
  flex-wrap: nowrap;
}

body.page-ref .palette.palette--arches span {
  width: clamp(68px, 14vw, 96px);
  height: clamp(192px, 40vw, 264px);
  border-radius: 999px 999px 0 0;
  border: 1px solid rgba(45, 62, 50, 0.12);
  box-shadow: none;
  flex-shrink: 1;
}

.ref-rule {
  display: block;
  width: 100%;
  max-width: min(22rem, 78%);
  height: 1px;
  margin: var(--ref-space-md) auto;
  padding: 0;
  border: 0;
  background: rgba(35, 48, 38, 0.88);
}

.ref-note {
  margin: var(--ref-space-xs) auto var(--ref-space-md);
  max-width: min(28rem, 100%);
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  letter-spacing: 0.025em;
  line-height: 1.6;
  color: var(--ref-muted);
  text-transform: none;
  font-weight: 500;
}

.ref-rsvp-lead {
  margin-top: var(--ref-space-md);
  margin-bottom: var(--ref-space-sm);
}

/* Как у «Важного»: шире колонка, без переноса «по одному слову» */
.ref-body-caps.ref-rsvp-lead {
  max-width: min(46rem, 100%);
  word-break: normal;
  hyphens: manual;
  overflow-wrap: break-word;
}

.rsvp-form--ref {
  max-width: min(26rem, 100%);
  margin: 0 auto;
  text-align: left;
}

.rsvp-form--modal {
  max-width: none;
  margin: 0;
  gap: 1.1rem;
}

.rsvp-form--ref .form-row {
  text-align: left;
}

.rsvp-form__group {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.rsvp-form__group-title {
  display: block;
  width: 100%;
  margin: 0 0 0.65rem;
  padding: 0 0 0.45rem;
  border-bottom: 2px solid rgba(77, 92, 67, 0.22);
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--olive-800);
  line-height: 1.3;
}

.rsvp-form__group--optional .rsvp-form__group-title {
  color: var(--ref-muted);
  border-bottom-color: rgba(45, 62, 50, 0.12);
}

.rsvp-modal .rsvp-field {
  gap: 0.35rem;
  margin-bottom: 0.7rem;
  padding: 0.72rem 0.8rem;
  background: #fff;
  border: 1px solid rgba(45, 62, 50, 0.14);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(35, 48, 38, 0.04);
}

.rsvp-modal .rsvp-field:last-child {
  margin-bottom: 0;
}

.rsvp-field__label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: var(--olive-800);
  line-height: 1.25;
}

.rsvp-field__req {
  color: #8b4a3a;
  font-weight: 700;
}

.rsvp-field__hint {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ref-muted);
  font-weight: 400;
}

.rsvp-modal .rsvp-field__control {
  width: 100%;
  border: 1px solid rgba(45, 62, 50, 0.2);
  background: #faf9f6;
  color: var(--text-on-light);
  padding: 0.85rem 0.9rem;
  font: inherit;
  font-size: 1.05rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
  text-transform: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.rsvp-modal .rsvp-field__control:hover {
  border-color: rgba(77, 92, 67, 0.35);
}

.rsvp-modal .rsvp-field__control:focus {
  outline: none;
  border-color: var(--olive-600);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(73, 95, 77, 0.18);
}

.rsvp-modal select.rsvp-field__control {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23495f4d' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px 8px;
  cursor: pointer;
}

.rsvp-form__actions {
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(45, 62, 50, 0.12);
  text-align: center;
}

.rsvp-modal .btn-ref--submit {
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
}

.rsvp-modal .rsvp-form--ref label:not(.rsvp-field__label):not(.rsvp-check-option):not(.rsvp-couple-btn) {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ref-muted);
}

.rsvp-modal .rsvp-form--ref input:not(.rsvp-field__control):not(.rsvp-check-option input):not(.rsvp-couple-check),
.rsvp-modal .rsvp-form--ref select:not(.rsvp-field__control),
.rsvp-modal .rsvp-form--ref textarea:not(.rsvp-field__control) {
  width: 100%;
  border: 1px solid var(--line-on-panel-strong);
  background: #fff;
  color: var(--text-on-light);
  padding: 0.92rem 1rem;
  font: inherit;
  font-size: 1.08rem;
  border-radius: 4px;
  letter-spacing: 0.025em;
  text-transform: none;
}

.form-message--ref {
  text-align: center;
  text-transform: none;
  letter-spacing: 0.025em;
  font-size: 1.05rem;
}

.ref-footer {
  margin-top: var(--ref-space-xl);
  padding-top: var(--ref-space-md);
  border-top: 1px solid rgba(45, 62, 50, 0.12);
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: 100%;
}

.ref-footer__love {
  margin: 0 0 var(--ref-space-sm);
  font-size: clamp(2rem, 5vw, 2.85rem);
  color: var(--olive-900);
  word-spacing: clamp(0.28em, 2vw, 0.55em);
  letter-spacing: 0.045em;
  overflow-wrap: anywhere;
}

.ref-footer__names {
  margin: 0;
  font-size: clamp(2.25rem, 5.6vw, 3.25rem);
  color: var(--olive-900);
  word-spacing: clamp(0.32em, 2.2vw, 0.65em);
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

body.page-ref .invite-card--lower .invite-card__inner {
  padding-bottom: max(2.25rem, calc(env(safe-area-inset-bottom, 0px) + 1.5rem));
}

body.page-ref .invite-card .media-frame--missing {
  min-height: 10rem;
}

body.page-ref .invite-card .media-frame--missing::after {
  font-size: 0.78rem;
  letter-spacing: 0.022em;
  text-transform: none;
}

body.modal-open {
  overflow: hidden;
}

.rsvp-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.65rem, env(safe-area-inset-top)) max(0.65rem, env(safe-area-inset-right)) max(0.65rem, env(safe-area-inset-bottom)) max(0.65rem, env(safe-area-inset-left));
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.rsvp-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rsvp-modal__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(35, 48, 38, 0.42);
  cursor: pointer;
}

.rsvp-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(34rem, calc(100% - 1rem));
  max-height: min(92dvh, 92vh, 100%);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #faf8f4;
  border: 1px solid var(--line-on-panel-strong);
  border-radius: 10px;
  box-shadow: 0 22px 60px rgba(35, 48, 38, 0.22);
  overflow: hidden;
}

.rsvp-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-shrink: 0;
  padding: 0.72rem 0.9rem;
  border-bottom: 1px solid var(--line-on-panel);
  background: rgba(255, 255, 255, 0.65);
}

.rsvp-modal__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3.2vw, 1.85rem);
  font-weight: 600;
  color: var(--olive-900);
  letter-spacing: 0.035em;
}

.rsvp-modal__close {
  flex-shrink: 0;
  width: 2.85rem;
  height: 2.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-on-panel-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--olive-700);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.rsvp-modal__close:hover {
  background: var(--olive-soft);
  color: var(--olive-900);
}

.rsvp-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.75rem 0.9rem 0.95rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.rsvp-modal .rsvp-form--ref {
  gap: 0.85rem;
}

.rsvp-modal__hint {
  margin: 0 0 0.85rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--olive-800);
  background: rgba(232, 235, 228, 0.65);
  border-left: 3px solid var(--olive-600);
  border-radius: 0 6px 6px 0;
}

.rsvp-modal .form-row {
  gap: 0.38rem;
}

.rsvp-vote-prompt {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--olive-800);
  background: rgba(232, 235, 228, 0.55);
  border-radius: 8px;
}

.rsvp-vote-prompt[hidden] {
  display: none !important;
}

.rsvp-form__main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 2400px;
  opacity: 1;
  transition:
    opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    max-height 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

.rsvp-form--thanks .rsvp-form__main {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.rsvp-thanks {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 10rem;
  padding: 1.35rem 0.75rem 1.85rem;
  text-align: center;
}

.rsvp-thanks.is-visible {
  margin: 0.15rem 0 0.35rem;
}

.rsvp-thanks__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  max-width: 22rem;
}

.rsvp-thanks__title {
  margin: 0 0 0.15rem;
  font-size: clamp(2.35rem, 9vw, 3.35rem);
  line-height: 1.15;
  color: var(--olive-700);
}

.rsvp-thanks__lead {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--olive-800);
}

.rsvp-thanks__note {
  margin: 0.1rem 0 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--olive-700);
  background: rgba(232, 235, 228, 0.55);
  border-radius: 8px;
}

.rsvp-thanks__note:empty {
  display: none;
}

.rsvp-thanks__sign {
  margin: 0.35rem 0 0;
  font-size: clamp(1.55rem, 5.5vw, 2rem);
  line-height: 1.2;
  color: var(--olive-600);
}

.rsvp-steps {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rsvp-step {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(12px);
  margin: 0;
  pointer-events: none;
  transition:
    opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    max-height 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    margin 0.48s ease;
}

.rsvp-step.is-visible {
  max-height: 1400px;
  opacity: 1;
  transform: translateY(0);
  margin: 0.35rem 0 0.15rem;
  pointer-events: auto;
}

.rsvp-step[hidden] {
  display: block !important;
  max-height: 0 !important;
  opacity: 0 !important;
  margin: 0 !important;
  pointer-events: none !important;
}

.rsvp-attending-no {
  margin: 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--olive-800);
  background: rgba(232, 235, 228, 0.5);
  border-radius: 8px;
}

.rsvp-guest2-block {
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(77, 92, 67, 0.28);
  border-radius: 10px;
  background: rgba(232, 238, 228, 0.88);
}

.rsvp-guest2-block .rsvp-guest2__title {
  margin: 0 0 0.5rem;
}

.rsvp-form__actions.rsvp-step.is-visible {
  margin-top: 0.65rem;
}

.rsvp-form.rsvp-path-no .rsvp-form__actions.rsvp-step {
  transition-delay: 0.12s;
}

.rsvp-field--couple {
  position: relative;
  z-index: 5;
  margin: 0.15rem 0 0.1rem;
}

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

.rsvp-modal .rsvp-form--ref .rsvp-couple-check {
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  background: transparent !important;
}

.rsvp-couple-btn {
  display: block;
  width: 100%;
  margin: 0;
  cursor: pointer;
}

.rsvp-couple-btn__card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-height: 3.75rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid rgba(77, 92, 67, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.rsvp-couple-btn__box {
  flex: 0 0 1.65rem;
  width: 1.65rem;
  height: 1.65rem;
  margin-top: 0.1rem;
  border: 2px solid rgba(77, 92, 67, 0.55);
  border-radius: 6px;
  background: #fff;
  position: relative;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.rsvp-couple-btn__box::after {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.14rem;
  width: 0.45rem;
  height: 0.85rem;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.rsvp-couple-btn__title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--olive-800);
  line-height: 1.25;
}

.rsvp-couple-btn__hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(58, 68, 52, 0.72);
}

.rsvp-couple-btn input:focus-visible + .rsvp-couple-btn__card,
.rsvp-couple-btn.is-checked .rsvp-couple-btn__card {
  outline: none;
}

.rsvp-couple-btn input:focus-visible + .rsvp-couple-btn__card {
  outline: 2px solid rgba(77, 92, 67, 0.55);
  outline-offset: 2px;
}

.rsvp-couple-btn input:checked + .rsvp-couple-btn__card,
.rsvp-couple-btn.is-checked .rsvp-couple-btn__card {
  border-color: rgba(77, 92, 67, 0.65);
  background: rgba(232, 238, 228, 0.95);
  box-shadow: 0 4px 14px rgba(58, 68, 52, 0.08);
}

.rsvp-couple-btn input:checked + .rsvp-couple-btn__card .rsvp-couple-btn__box,
.rsvp-couple-btn.is-checked .rsvp-couple-btn__box {
  border-color: var(--olive-700, #4d5c43);
  background: var(--olive-700, #4d5c43);
}

.rsvp-couple-btn input:checked + .rsvp-couple-btn__card .rsvp-couple-btn__box::after,
.rsvp-couple-btn.is-checked .rsvp-couple-btn__box::after {
  transform: rotate(45deg) scale(1);
  opacity: 1;
}

.rsvp-couple-btn:hover .rsvp-couple-btn__card {
  border-color: rgba(77, 92, 67, 0.5);
  background: rgba(255, 255, 255, 0.94);
}

.rsvp-check-group {
  display: grid;
  gap: 0.28rem;
}

.rsvp-check-group--inline {
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.rsvp-check-group--stack {
  grid-template-columns: 1fr;
  gap: 0.42rem;
}

.rsvp-check-option {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-weight: inherit;
  color: inherit;
}

label.rsvp-check-option--wide {
  width: 100%;
}

.rsvp-check-option:not(.rsvp-check-option--wide) input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  border: 0;
}

.rsvp-check-option:not(.rsvp-check-option--wide) .rsvp-check-option__card {
  pointer-events: none;
}

.rsvp-check-option__card {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.15rem;
  padding: 0.38rem 0.55rem;
  border: 1px solid rgba(77, 92, 67, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.rsvp-check-option--wide .rsvp-check-option__card {
  align-items: flex-start;
  gap: 0.85rem;
  min-height: 3.75rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid rgba(77, 92, 67, 0.35);
  border-radius: 12px;
  pointer-events: auto;
}

.rsvp-check-option__box {
  flex: 0 0 1.05rem;
  width: 1.05rem;
  height: 1.05rem;
  border: 1.5px solid rgba(77, 92, 67, 0.55);
  border-radius: 50%;
  background: #fff;
  position: relative;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.rsvp-check-option--wide .rsvp-check-option__box {
  flex: 0 0 1.65rem;
  width: 1.65rem;
  height: 1.65rem;
  margin-top: 0.1rem;
  border-width: 2px;
  border-radius: 6px;
}

.rsvp-check-option:not(.rsvp-check-option--wide) .rsvp-check-option__box::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border: none;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.rsvp-check-option--wide .rsvp-check-option__box::after {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.14rem;
  width: 0.45rem;
  height: 0.85rem;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  border-radius: 0;
  background: transparent;
  transform: rotate(45deg) scale(0);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.rsvp-check-option__text {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--olive-800);
  line-height: 1.2;
}

.rsvp-check-option--wide .rsvp-check-option__text {
  font-size: 1rem;
  line-height: 1.25;
}

.rsvp-check-option__title {
  display: block;
  font-size: 1.05rem;
}

.rsvp-check-option__hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(58, 68, 52, 0.72);
}

.rsvp-check-option input:focus-visible + .rsvp-check-option__card,
#couplePairCheck:focus-visible + .rsvp-check-option--wide .rsvp-check-option__card {
  outline: 2px solid rgba(77, 92, 67, 0.55);
  outline-offset: 2px;
}

.rsvp-check-option input:checked + .rsvp-check-option__card,
#couplePairCheck:checked + .rsvp-check-option--wide .rsvp-check-option__card {
  border-color: rgba(77, 92, 67, 0.65);
  background: rgba(232, 238, 228, 0.95);
  box-shadow: 0 4px 14px rgba(58, 68, 52, 0.08);
}

.rsvp-check-option input:checked + .rsvp-check-option__card .rsvp-check-option__box,
#couplePairCheck:checked + .rsvp-check-option--wide .rsvp-check-option__card .rsvp-check-option__box {
  border-color: var(--olive-700, #4d5c43);
  background: var(--olive-700, #4d5c43);
}

.rsvp-check-option:not(.rsvp-check-option--wide) input:checked + .rsvp-check-option__card .rsvp-check-option__box::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

#couplePairCheck:checked + .rsvp-check-option--wide .rsvp-check-option__card .rsvp-check-option__box::after {
  transform: rotate(45deg) scale(1);
  opacity: 1;
}

.rsvp-check-option:hover .rsvp-check-option__card,
label.rsvp-check-option--wide:hover .rsvp-check-option__card {
  border-color: rgba(77, 92, 67, 0.5);
  background: rgba(255, 255, 255, 0.94);
}

.rsvp-guest2__title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--olive-800);
  text-transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .rsvp-step {
    transition: none !important;
    transform: none !important;
  }
}

.rsvp-modal .rsvp-field--nested {
  margin-bottom: 0.55rem;
  padding: 0.55rem 0.6rem;
  background: #fff;
}

.rsvp-modal .rsvp-field--nested:last-child {
  margin-bottom: 0;
}

/* ——— Приглашение: телефоны ——— */
@media (max-width: 719px) {
  .ref-body-caps--ceremony {
    margin-bottom: var(--ref-space-lg);
  }

  .ref-place-heading {
    margin-top: clamp(2.85rem, 11.5vw, 4.1rem);
  }

  .ref-location-photo-map + .btn-ref {
    margin-bottom: var(--ref-space-xl);
  }

  .ref-timing-title {
    margin-top: clamp(3rem, 12.5vw, 4.35rem);
  }

  body.page-ref .invite-card--lower .invite-card__inner {
    padding-bottom: max(3rem, calc(env(safe-area-inset-bottom, 0px) + 2rem));
  }

  .ref-footer {
    margin-top: var(--ref-space-lg);
  }

  .ref-footer__love,
  .ref-footer__names {
    word-spacing: 0.1em;
    letter-spacing: 0.03em;
  }

  .ref-footer__love {
    font-size: clamp(1.85rem, 8.5vw, 2.45rem);
    margin-bottom: 0.08em;
  }

  .ref-footer__names {
    font-size: clamp(1.95rem, 9vw, 2.65rem);
  }

  body.page-ref .palette.palette--arches {
    flex-wrap: nowrap;
    gap: clamp(0.25rem, 1.5vw, 0.5rem);
  }

  body.page-ref .palette.palette--arches span {
    flex: 1 1 0;
    min-width: 0;
    width: clamp(42px, 13.5vw, 64px);
    max-width: 64px;
    height: auto;
    aspect-ratio: 68 / 192;
  }

  .ref-names--below {
    margin-top: clamp(2.55rem, 11.5vw, 4.15rem);
  }

  .ref-names__pair {
    transform: translateX(clamp(0.85rem, 3.4vw, 2.1rem)) translateY(0.4rem);
  }
}

/* ——— Приглашение: телефоны и узкие экраны ——— */
@media (max-width: 520px) {
  html:has(body.page-ref) {
    font-size: clamp(100%, 2.5vw + 0.65rem, 124%);
  }

  body.page-ref {
    --ref-title-caps: clamp(2.15rem, 11vw, 3.65rem);
    --ref-title-script-ornament: clamp(1.45rem, 5.5vw, 2.35rem);
    --ref-title-script-lede: clamp(1.75rem, 6.2vw, 2.65rem);
    --ref-title-gap-top: clamp(1.65rem, 6vw, 2.85rem);
  }

  body.page-ref .invite-card .invite-card__inner {
    padding: clamp(0.95rem, 3.5vw, 1.45rem) clamp(0.65rem, 4vw, 1rem) clamp(1.1rem, 3.5vw, 1.65rem);
  }

  .ref-couple-heading {
    font-size: clamp(2.35rem, 10.5vw, 3.35rem);
  }

  .ref-body-caps--ceremony {
    margin-bottom: var(--ref-space-xl);
  }

  .ref-place-heading {
    margin-top: clamp(3.25rem, 13.5vw, 4.6rem);
  }

  .ref-location-photo-map + .btn-ref {
    margin-bottom: clamp(2.25rem, 9vw, 3.35rem);
  }

  .ref-timing-title {
    margin-top: clamp(3.4rem, 14.5vw, 4.85rem);
  }

  .ref-hero-stack {
    max-width: min(320px, 92vw);
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }

  .ref-names--below {
    margin-top: clamp(3rem, 14vw, 4.5rem);
    font-size: clamp(1.65rem, 7.5vw, 2.65rem);
  }

  .ref-names__pair {
    transform: translateX(clamp(0.75rem, 3.2vw, 1.85rem)) translateY(0.55rem);
  }

  .ref-body-caps {
    padding-left: clamp(0.2rem, 1.5vw, 0.65rem);
    padding-right: clamp(0.2rem, 1.5vw, 0.65rem);
  }

  body.page-ref .ref-body-caps {
    font-size: clamp(0.9rem, 3.8vw, 1.06rem);
  }

  .ref-body-caps--loc-addr .ref-body-caps__addr-rest {
    letter-spacing: 0.018em;
  }

  .ref-location-photo-map {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    padding: 0 0.15rem;
    box-sizing: border-box;
  }

  .ref-location-photo-map__map iframe {
    height: clamp(210px, 52vw, 280px);
    min-height: 200px;
  }

  .ref-schedule {
    max-width: 100%;
    padding: 0 0.1rem;
    box-sizing: border-box;
  }

  .ref-schedule li {
    grid-template-columns: 1fr;
    row-gap: 0.35rem;
    column-gap: 0;
    padding-bottom: var(--ref-space-sm);
  }

  .ref-schedule__time {
    text-align: left;
    padding-top: 0;
    font-size: clamp(1.35rem, 5.5vw, 1.85rem);
  }

  .ref-schedule__desc {
    font-size: clamp(0.68rem, 2.8vw, 0.78rem);
    line-height: 1.42;
  }

  body.page-ref .palette.palette--arches {
    flex-wrap: nowrap;
    gap: clamp(0.15rem, 1.1vw, 0.32rem);
    max-width: 100%;
    padding: 0 0.1rem;
    box-sizing: border-box;
  }

  body.page-ref .palette.palette--arches span {
    flex: 1 1 0;
    min-width: 0;
    width: calc((100% - 4 * clamp(0.15rem, 1.1vw, 0.32rem)) / 5);
    max-width: 52px;
    height: auto;
    aspect-ratio: 68 / 192;
  }

  body.page-ref .invite-card .btn-ref--wide {
    width: min(92%, 26rem);
    min-height: 3rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
  }

  .ref-location-photo-map+.btn-ref {
    width: min(90%, 24rem);
    min-height: 3rem;
  }

  .rsvp-modal__panel {
    max-width: calc(100% - 0.35rem);
    max-height: min(94dvh, 94vh, 100%);
    border-radius: 8px;
  }

  .rsvp-modal__head {
    padding: 0.65rem 0.7rem;
  }

  .rsvp-modal__body {
    padding: 0.65rem 0.7rem 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0));
  }

  .rsvp-modal__close {
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    min-height: 3rem;
  }

  .rsvp-modal .rsvp-field__control {
    font-size: max(1rem, 16px);
    padding: 0.85rem 0.75rem;
  }

  .rsvp-modal .rsvp-field {
    padding: 0.65rem 0.7rem;
  }

  .rsvp-modal .btn-ref--submit {
    min-height: 3rem;
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .ref-place-heading__line--top {
    font-size: clamp(1.45rem, 7.5vw, 2.35rem);
  }

  .ref-timing-title,
  .ref-dress-title {
    font-size: clamp(1.45rem, 7.2vw, 2.1rem);
  }
}