:root {
  --bg: #FBF5EC;
  --bg-2: #F4EADD;
  --paper: #FFFDF9;
  --ink: #1D1D1F;
  --muted: #86868B;
  --line: rgba(29, 29, 31, .08);
  --gold: #B08D57;
  --gold-soft: #D9C4A0;
  --card: rgba(255, 255, 255, .72);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Manrope', -apple-system, system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(20px, 6vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Пока идёт интро, страница не прокручивается и полос прокрутки нет */
html:has(body.is-locked), body.is-locked { overflow: hidden; height: 100svh; }
/* Страховка: ничто не может сделать страницу шире экрана */
html, body { overflow-x: clip; }
img { display: block; max-width: 100%; }

/* ---------- Бумажная карточка: общий вид всех блоков ----------
   Светлая «бумага», мягкая тёплая тень и тонкая золотая рамка внутри, как тиснение на приглашении */
.intro__card, .hero__card, .section {
  position: relative;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(176, 141, 87, .08), 0 40px 90px -40px rgba(120, 88, 40, .35);
}
.intro__card::before, .hero__card::before, .section::before {
  content: '';
  position: absolute;
  inset: 10px;
  z-index: 2;
  border: 1px solid rgba(176, 141, 87, .35);
  border-radius: 20px;
  pointer-events: none;
}
button { font: inherit; color: inherit; }

.amp { font-style: italic; font-weight: 300; color: var(--gold); }
.eyebrow {
  margin: 0 0 18px;
  font: 500 11px/1 var(--sans);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
}
.title {
  margin: 0 0 20px;
  font: 300 clamp(36px, 10vw, 64px)/1.05 var(--serif);
  letter-spacing: -.01em;
}
.title--sm { font-size: clamp(30px, 8vw, 44px); }
.lead { margin: 0 auto; max-width: 34ch; color: #55555a; font-size: 17px; line-height: 1.65; }

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 16px 30px;
  font: 500 15px/1 var(--sans);
  letter-spacing: .02em;
  transition: transform .4s var(--ease), background .3s, opacity .3s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.96); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--wide { width: 100%; padding: 19px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- ИНТРО ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: opacity 1.2s var(--ease), visibility 1.2s;
}
.intro.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
/* Фон под видео — цвет его краёв, чтобы на любых пропорциях экрана не было полос */
.intro { background: radial-gradient(90% 60% at 50% 42%, #FEFAF4 0%, var(--bg) 100%); }
.intro__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1.4s var(--ease), transform 2s var(--ease), filter 1.4s var(--ease);
}
/* На широких экранах (компьютер) показываем видео целиком */
@media (min-aspect-ratio: 4/5) { .intro__video { object-fit: contain; } }
/* После видео: оно мягко растворяется, по центру проявляется карточка */
.intro.is-card .intro__video { opacity: 0; transform: scale(1.05); filter: blur(8px); }
.intro__skip {
  position: absolute;
  right: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: opacity .5s;
}
.intro.is-card .intro__skip { opacity: 0; pointer-events: none; }
/* Карточка-приглашение: светлая «бумага», мягкая тень и тонкая золотая рамка внутри, как тиснение */
.intro__card {
  position: relative;
  width: min(calc(100vw - 48px), 380px);
  padding: clamp(44px, 8svh, 64px) 32px clamp(36px, 6svh, 52px);
  text-align: center;
  opacity: 0;
  transform: translateY(24px) scale(.96);
  pointer-events: none;
  transition: opacity 1.4s var(--ease) .7s, transform 1.6s var(--ease) .7s;
}
.intro.is-card .intro__card { opacity: 1; transform: none; pointer-events: auto; }
/* Обращение к гостю — главная строка карточки */
.intro__greet { margin: 0 0 6px; font: italic 300 clamp(22px, 6.4vw, 30px)/1.2 var(--serif); color: var(--gold); }
.intro__greet[hidden] { display: none; }
.intro__guest {
  margin: 0 auto;
  max-width: 11ch;
  font: 300 clamp(42px, 12vw, 68px)/1.04 var(--serif);
  letter-spacing: -.01em;
  text-wrap: balance;
}
.intro__rule { display: block; width: 36px; height: 1px; margin: 28px auto 24px; background: var(--gold); opacity: .6; }
.intro__from { margin: 0; font-size: 15px; line-height: 1.6; color: #55555a; }
.intro__date { margin: 14px 0 0; font-size: 12px; letter-spacing: .3em; color: var(--muted); }
.intro__card .btn { margin-top: 36px; }

/* ---------- МУЗЫКА ---------- */
.music {
  position: fixed;
  z-index: 50;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .65);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .8s;
}
.is-open .music { opacity: 1; }
.music__bars { display: flex; gap: 3px; align-items: flex-end; height: 14px; }
.music__bars i { width: 2px; height: 4px; background: var(--ink); border-radius: 1px; transition: height .3s; }
.music[aria-pressed="true"] .music__bars i { animation: bar 1s ease-in-out infinite; }
.music__bars i:nth-child(2) { animation-delay: -.3s !important; }
.music__bars i:nth-child(3) { animation-delay: -.6s !important; }
.music__bars i:nth-child(4) { animation-delay: -.15s !important; }
@keyframes bar { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* ---------- HERO ---------- */
.hero { height: 100svh; position: relative; }
.hero__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px 0;
}
.hero__card {
  position: relative;
  width: min(calc(100vw - 48px), 420px);
  height: min(calc(100svh - 48px), 780px);
  /* Фото стоит на нижнем крае карточки; золотая рамка проходит поверх фото, как паспарту */
  overflow: hidden;
}
.hero__text {
  position: relative;
  padding: clamp(40px, 8svh, 72px) 20px 0;
  text-align: center;
}
/* Фото пары стоит на нижнем крае карточки */
.hero__photo {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 64%;
  width: auto;
  max-width: 94%;
  object-fit: contain;
  object-position: bottom;
  transform: translate(-50%, 60px);
  opacity: 0;
  transition: opacity 1.6s var(--ease) .4s, transform 1.8s var(--ease) .4s;
  will-change: transform;
}
.is-open .hero__photo { opacity: var(--po, 1); transform: translate(-50%, 0) scale(var(--ps, 1)); transform-origin: 50% 100%; }
.is-open .hero__photo.is-settled { transition: none; }
.hero__names { margin: 0 0 12px; font: 300 clamp(46px, 13.5vw, 84px)/.95 var(--serif); letter-spacing: -.02em; white-space: nowrap; }
.hero__date { margin: 0; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
[data-hero] { will-change: transform, opacity; }

/* ---------- СЕКЦИИ ---------- */
.section {
  width: min(calc(100vw - 48px), 560px);
  margin: 0 auto 24px;
  padding: clamp(40px, 7svh, 64px) clamp(22px, 6vw, 40px);
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(40px) scale(.98);
  filter: blur(6px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; filter: none; }

/* Обращение */
.greet__text {
  margin: 0 auto;
  max-width: 18ch;
  font: 400 clamp(30px, 8.4vw, 52px)/1.2 var(--serif);
  letter-spacing: -.005em;
}
.greet__text .w { color: rgba(29, 29, 31, .14); transition: color .5s; }
.greet__text .w.on { color: var(--ink); }

/* История — телефон с перепиской */
.phone {
  margin: 36px auto;
  max-width: 340px;
  border-radius: 38px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 1px 0 var(--line), 0 40px 80px -30px rgba(80, 60, 30, .25), 0 0 0 1px var(--line);
  text-align: left;
  transform-style: preserve-3d;
}
.phone.is-in { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s ease-out, opacity 1.2s var(--ease), filter 1.2s; }
.phone__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.phone__head b { display: block; font-weight: 600; font-size: 14px; }
.phone__head span { font-size: 11px; color: #4fae4e; }
.phone__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e9d6b5, #c9a46e);
  color: #fff;
  font: 500 16px var(--serif);
  object-fit: cover;
}
.phone__chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 10px 20px;
  min-height: 300px;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(180deg, #F4F1EC, #EEE9E1);
}
.msg {
  max-width: 82%;
  padding: 8px 12px 8px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.4;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
  opacity: 0;
  transform: translateY(14px) scale(.9);
  transform-origin: left bottom;
  transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.msg time { float: right; margin: 6px 0 -4px 10px; font-size: 10.5px; color: #9a9a9e; }
.msg--out { align-self: flex-end; background: #E2F3CF; transform-origin: right bottom; border-bottom-right-radius: 6px; }
.msg--in { align-self: flex-start; border-bottom-left-radius: 6px; }
.msg.on { opacity: 1; transform: none; }
/* Цитата истории, как в Telegram: превью + имя. Нажатие открывает саму историю */
.msg__reply {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 6px;
  padding: 4px 10px 4px 4px;
  border: 0;
  border-left: 2px solid #5aa847;
  border-radius: 4px 8px 8px 4px;
  background: rgba(90, 168, 71, .12);
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s;
}
.msg__reply:active { background: rgba(90, 168, 71, .22); }
.msg__reply b { display: block; color: #4a9a39; font-weight: 600; }
.msg__reply span { color: #6b8f60; }
.msg__thumb {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  overflow: hidden;
}
.msg__thumb img { width: 100%; height: 100%; object-fit: cover; }
/* Значок «играть» поверх превью, мягко пульсирует, чтобы было понятно, что можно нажать */
.msg__thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 16px no-repeat;
  animation: storyPulse 2.4s ease-in-out infinite;
}
@keyframes storyPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* Прожектор на историю: экран приглушается тенью вокруг «окошка» над цитатой, рядом подсказка */
.spot { position: fixed; inset: 0; z-index: 110; cursor: pointer; }
.spot[hidden] { display: none; }
.spot__hole {
  position: fixed;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(24, 18, 10, .55);
  transition: box-shadow .5s var(--ease);
  animation: spotIn .6s var(--ease);
}
/* Пульсирующая золотая рамка вокруг истории */
.spot__hole::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 15px;
  border: 2px solid var(--gold-soft);
  animation: spotPulse 1.6s ease-in-out infinite;
}
.spot__tip {
  position: fixed;
  max-width: min(280px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 16px;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .35);
  animation: tipIn .5s var(--ease) .2s both;
}
/* Хвостик подсказки, указывает на историю */
.spot__tip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: var(--arrow, 50%);
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 2px;
}
.spot.is-out { opacity: 0; transition: opacity .35s; }
@keyframes spotIn { from { box-shadow: 0 0 0 9999px rgba(24, 18, 10, 0); } }
@keyframes spotPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(1.06); } }
@keyframes tipIn { from { opacity: 0; transform: translateY(8px); } }

/* Просмотр истории на весь экран */
.story-view {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 12, .92);
  animation: storyIn .35s var(--ease);
}
.story-view[hidden] { display: none; }
@keyframes storyIn { from { opacity: 0; } }
.story-view__frame {
  position: relative;
  width: min(100vw, calc(100svh * 9 / 16));
  aspect-ratio: 9 / 16;
  max-height: 100svh;
  overflow: hidden;
  background: #000;
  animation: storyZoom .45s var(--ease);
}
@keyframes storyZoom { from { transform: scale(.88); } }
@media (min-width: 600px) { .story-view__frame { border-radius: 18px; max-height: 94svh; width: min(100vw, calc(94svh * 9 / 16)); } }
.story-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-view__bar {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  left: 10px;
  right: 10px;
  z-index: 2;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .35);
  overflow: hidden;
}
.story-view__bar i { display: block; height: 100%; width: 0; background: #fff; }
.story-view__head {
  position: absolute;
  top: calc(22px + env(safe-area-inset-top));
  left: 12px;
  right: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: 14px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
.story-view__head img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255, 255, 255, .8); }
.story-view__head b { flex: 1; font-weight: 600; }
.story-view__head button {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #fff;
  opacity: 0;
  height: 0;
  padding-block: 0;
  transition: opacity .3s, height .3s, padding .3s;
}
.typing.on { opacity: 1; height: 36px; padding-block: 15px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #b9b9bd; animation: dot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.story__after { font: italic 300 24px/1.4 var(--serif); color: var(--ink); }

/* Галерея */
/* Галерея — слайдер на всю ширину экрана, без карточки. Ширина фото от ширины экрана (cqw):
   фото ~70%, по краям выглядывают соседние — сразу видно, что ленту можно листать */
.gallery { margin: 0 0 24px; overflow: hidden; container-type: inline-size; }
.gallery__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px calc((100cqw - min(70cqw, 380px)) / 2) 22px;
  scrollbar-width: none;
  perspective: 1000px;
}
.gallery__track::-webkit-scrollbar { display: none; }
.shot {
  flex: 0 0 min(70cqw, 380px);
  aspect-ratio: 3 / 4;
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  scroll-snap-align: center;
  background: linear-gradient(135deg, #EFE8DD, #E4D9C7);
  transform: rotateY(var(--ry, 0deg)) scale(var(--s, 1));
  transition: transform .15s linear;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
/* Точки под лентой, как в галерее телефона: текущая длиннее и золотая */
.gallery__dots { display: flex; justify-content: center; gap: 6px; padding: 0 20px; }
.gallery__dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--gold-soft);
  cursor: pointer;
  transition: width .35s var(--ease), background .35s;
}
.gallery__dots button.is-on { width: 20px; background: var(--gold); }
.shot img.is-missing { display: none; }

/* Когда и где */
/* Календарь месяца */
.cal { margin: 0 auto 28px; max-width: 360px; }
.cal__month { margin: 0 0 18px; font: 300 clamp(34px, 10vw, 46px)/1 var(--serif); }
.cal__week, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__week { margin-bottom: 6px; }
.cal__week span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cal__week span:nth-child(n+6) { color: var(--gold); }
.cal__day {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font: 400 17px/1 var(--serif);
  color: #55555a;
  opacity: 0;
}
.cal.is-in .cal__day { animation: calDay .5s var(--ease) both; animation-delay: calc(var(--i) * 14ms + .2s); }
@keyframes calDay { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* День свадьбы: крупнее, золотой круг «рисуется» линией */
.cal__day--wedding {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.cal__ring { position: absolute; inset: -14%; width: 128%; height: 128%; overflow: visible; pointer-events: none; }
.cal__ring path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 190;
  stroke-dashoffset: 190;
  transition: stroke-dashoffset 1.6s var(--ease) .9s;
}
.cal.is-in .cal__ring path { stroke-dashoffset: 0; }
.cal__day--wedding:active { transform: scale(.94); }
/* Сердечко, всплывающее при нажатии на день */
.cal__heart { position: absolute; left: 50%; top: 0; color: var(--gold); font-size: 16px; pointer-events: none; animation: heartUp 1.1s var(--ease) forwards; }
@keyframes heartUp { from { opacity: 1; transform: translate(-50%, 0) scale(.6); } to { opacity: 0; transform: translate(-50%, -38px) scale(1.2); } }
.cal__tip { min-height: 1.5em; margin: 12px 0 0; font: italic 300 19px/1.4 var(--serif); color: var(--gold); transition: opacity .3s; }
.cal__tip:empty { opacity: 0; }

.when__info { text-align: center; }
.when__rule { display: block; width: 36px; height: 1px; margin: 24px auto; background: var(--gold); opacity: .6; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tile__label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tile__value { font: 400 44px/1.05 var(--serif); }
.tile__value--sm { font-size: 30px; }
.tile__note { color: #55555a; font-size: 15px; }

/* Таймер */
.timer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.timer div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.timer b {
  font: 300 clamp(44px, 13vw, 88px)/1 var(--serif);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--ink) 30%, var(--gold) 140%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.timer span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Пожелания */
.wish { padding: 0; }
.wish__icon { width: 48px; margin: 0 auto 20px; color: var(--gold); }

/* Анкета */
.form { display: grid; gap: 18px; margin-top: 36px; text-align: left; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > span { font-size: 13px; color: var(--muted); padding-left: 4px; }
.field input, .field textarea {
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: 16px;
  padding: 16px 18px;
  font: 400 16px/1.4 var(--sans);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .25s;
  resize: none;
}
.field input:focus, .field textarea:focus { outline: 0; box-shadow: 0 0 0 2px var(--ink); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.seg--count { grid-template-columns: repeat(4, 1fr); }
/* Настоящие радио/чекбоксы спрятаны внутри своих подписей (иначе они вылезают за экран и ломают масштаб) */
.seg label, .chips label { position: relative; }
.seg input, .chips input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.seg span {
  display: block;
  padding: 13px 8px;
  border-radius: 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s;
}
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span, .chips input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.form__more { display: grid; gap: 18px; overflow: hidden; max-height: 0; opacity: 0; transition: max-height .7s var(--ease), opacity .5s; }
.form__more.is-open { max-height: 800px; opacity: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
  font-size: 14px;
  cursor: pointer;
  transition: background .25s, color .25s, box-shadow .25s;
  -webkit-tap-highlight-color: transparent;
}
.chips input:checked + span { background: var(--ink); color: #fff; box-shadow: 0 0 0 1px var(--ink); }

.form__status { min-height: 1.4em; margin: 0; text-align: center; font-size: 14px; color: #b3402f; }

.thanks { margin-top: 36px; padding: 48px 24px; border-radius: 32px; background: #fff; box-shadow: 0 0 0 1px var(--line); animation: pop 1s var(--ease); }
.thanks__ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 3px solid var(--gold-soft);
  border-top-color: var(--gold);
  animation: spin 2.4s var(--ease) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }

/* Подвал */
.footer { padding: 48px var(--gutter) calc(60px + env(safe-area-inset-bottom)); text-align: center; }
.footer__names { margin: 0 0 18px; font: 300 clamp(44px, 12vw, 72px)/1 var(--serif); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
