*{ box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .55s var(--easeOut), transform .65s var(--easeOut);
}

body.isReady{ opacity:1; transform:none; }

.book {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  overflow: hidden;
}

.page {
  width:100%;
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding: clamp(18px, 4vw, 54px);
  padding-top: calc(clamp(18px, 4vw, 54px) + var(--safeTop));
  padding-bottom: calc(clamp(18px, 4vw, 54px) + var(--safeBot));
  background: var(--bg);
}

.page:not(.hero):not(.fullPhoto)::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:-1px;
  height:68px;
  pointer-events:none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 92%, transparent), transparent);
  opacity:.9;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translate3d(0,22px,0) scale(.985);
  filter: blur(6px);
  transition: opacity .85s var(--easeOut), transform .95s var(--easeOut), filter .95s var(--easeOut);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
  filter: blur(0);
}

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

/* HERO */
.hero{ padding:0; }

.heroWrap{
  position:absolute;
  inset:0;
  overflow:hidden;
  background:#ddd;
}

.heroWrap img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position: var(--heroPos, 50% 50%);
}

.heroWrap::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(800px 520px at 50% 56%, rgba(0,0,0,.34), rgba(0,0,0,0) 62%),
    linear-gradient(to bottom, rgba(0,0,0,.18), rgba(0,0,0,.44));
}

.heroText{
  position:relative;
  z-index:2;
  height:100%;
  width:100%;
  color: var(--heroText);
  padding: clamp(18px, 3.6vw, 44px);
  padding-top: calc(clamp(18px, 3.6vw, 44px) + var(--safeTop));
  padding-bottom: calc(clamp(18px, 3.6vw, 44px) + var(--safeBot));
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  text-shadow: var(--heroShadow);
}

.heroRow{
  display:flex;
  justify-content:space-between;
  gap:16px;
}

.heroRow--bottom{
  align-items:flex-end;
  gap:18px;
}

.heroName{
  font-family: var(--serif);
  font-weight:500;
  line-height:.92;
}

.heroName--left{
  font-size: clamp(48px, 7.6vw, 106px);
  line-height:.9;
  text-align:left;
}

.heroName--right{
  font-size: clamp(56px, 9vw, 106px);
  text-align:right;
}

.heroWord{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: clamp(96px, 18vw, 240px);
  letter-spacing:.18em;
  opacity:.35;
  text-transform:uppercase;
  user-select:none;
  white-space:nowrap;
  pointer-events:none;
}

.heroDate{
  font-family: var(--serif);
  font-size: clamp(18px, 2.6vw, 28px);
  letter-spacing:.08em;
  white-space:nowrap;
}

.heroSubtitle{
  position:absolute;
  left:50%;
  transform: translateX(-50%);
  text-align:center;
  font-family: var(--serif);
  text-transform:uppercase;
  color: rgba(255,255,255,.92);
  max-width: min(92vw, 860px);
  padding: 0 16px;
  white-space: normal;
  text-shadow: 0 10px 30px rgba(0,0,0,.45);
  top: calc(50% + 120px);
}

.heroSubtitleLine{
  display:block;
  line-height:1.35;
  letter-spacing:.22em;
  font-size:13px;
}

.heroSubtitleLine--sub{ opacity:.95; }

.heroSubtitleLine--city{
  margin-top:8px;
  font-size:11px;
  letter-spacing:.28em;
  opacity:.72;
}

/* STORY + TIMER */
.welcomeWrap{
  width:min(1120px, 100%);
  margin:0 auto;
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(18px, 4vw, 56px);
  align-items:center;
  position:relative;
}

.welcomeWrap::after{
  content:"";
  position:absolute;
  left: calc(50% + 10px);
  top:12px;
  bottom:12px;
  width:1px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
  display:none;
}

.welcomeText{
  text-align:center;
  padding-top:4px;
}

.introTitle{
  font-family: var(--serif);
  font-weight:300;
  text-transform:uppercase;
  letter-spacing:.22em;
  font-size: clamp(26px, 4.6vw, 58px);
  line-height:1.05;
  margin:0 0 16px;
}

.introKicker{
  font-family: var(--serif);
  text-transform:uppercase;
  letter-spacing:.22em;
  font-size:13px;
  color: var(--textSoft);
  margin:0 0 10px;
}

.introHairline{
  width:120px;
  height:1px;
  background: var(--border);
  margin:14px auto 14px;
}

.introText{
  margin:0 auto;
  max-width:660px;
  font-family: var(--serif);
  font-weight:400;
  color: var(--textMuted);
  font-size: clamp(13px, 1.9vw, 16px);
  line-height:1.95;
  white-space: pre-line;
}

.countBox{ text-align:center; }

.countTitle{
  font-family: var(--serif);
  text-transform:uppercase;
  letter-spacing:.22em;
  font-size:13px;
  color: var(--textSoft);
  margin:0 0 10px;
}

.countLead{
  font-family: var(--serif);
  font-weight:400;
  font-size: clamp(18px, 2.6vw, 26px);
  margin:0 0 14px;
  letter-spacing:.02em;
  color: var(--textMuted);
}

.countGrid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:10px;
  max-width:520px;
  margin:0 auto;
}

.pill{
  background: var(--pill);
  border-radius:16px;
  padding:12px 10px;
  position:relative;
  overflow:hidden;
  border:1px solid var(--border);
}

.pill::before{
  content:"";
  position:absolute;
  inset:-40px;
  background: radial-gradient(220px 120px at 50% 0%, color-mix(in srgb, var(--rose) 18%, transparent), rgba(0,0,0,0) 60%);
  opacity:.75;
  pointer-events:none;
}

.pill .num{
  position:relative;
  z-index:2;
  font-family: var(--serif);
  font-size: clamp(22px, 3.4vw, 34px);
  line-height:1;
  color: var(--text);
}

.pill .lbl{
  position:relative;
  z-index:2;
  margin-top:6px;
  font-size:10px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color: var(--textSoft);
}

.countNote{
  margin-top:12px;
  color: var(--textMuted);
  font-size:12px;
  letter-spacing:.06em;
}

/* FULL PHOTO */
.fullPhoto{
  padding:0;
  min-height:100vh;
  background:#000;
}

.fullPhoto img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* PLAN */
.planWrap{
  width:min(1240px, 100%);
  margin:0 auto;
  display:grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items:start;
}

.calBlock{ padding-top:6px; }

.calTop{
  font-family: var(--serif);
  text-transform:uppercase;
  letter-spacing:.22em;
  font-size:14px;
  color: var(--textSoft);
  margin:0 0 20px;
}

.calMonthRow{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.calMonthName{
  font-family: var(--serif);
  font-size: clamp(64px, 7vw, 98px);
  line-height:1;
  letter-spacing:.01em;
  color: var(--text);
}

.calArrows{
  color: var(--textSoft);
  font-size:22px;
  letter-spacing:.2em;
  user-select:none;
  transform: translateY(-10px);
}

.calGrid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:16px 22px;
  margin-top:16px;
  max-width:680px;
}

.dow{
  text-align:center;
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color: var(--textSoft);
  padding:8px 0 10px;
}

.day{
  height:44px;
  display:grid;
  place-items:center;
  font-size:16px;
  color: var(--calNum);
  position:relative;
}

.day.empty{ color:transparent; }

.day.selected{
  color: var(--calNumHi);
  font-weight:600;
}

.day.selected .heart{
  position:absolute;
  left:50%;
  top:50%;
  width:66px;
  height:60px;
  transform: translate(-50%, -50%);
  pointer-events:none;
}

.day.selected .heart path{
  fill: var(--heartFill);
  stroke: var(--rose);
  stroke-width:2.6;
}

.day.selected .num{
  position:relative;
  z-index:2;
}

.progBlock{ padding-top:6px; }

.progKicker{
  margin:0 0 8px;
  font-size:11px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color: var(--textSoft);
}

.progTitle{
  font-family: var(--serif);
  text-transform:uppercase;
  letter-spacing:.22em;
  font-size:14px;
  color: var(--textSoft);
  margin:0 0 22px;
}

.progList{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.progItem{
  display:grid;
  grid-template-columns: 104px 1fr;
  gap:18px;
  align-items:start;
}

.pTime{
  font-family: var(--serif);
  font-size:36px;
  color: var(--progTime);
  letter-spacing:.02em;
  line-height:1;
  padding-top:2px;
}

.pBody{
  position:relative;
  padding:4px 0 14px;
}

.pTitle{
  font-family: var(--serif);
  font-size:14px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: var(--text);
  margin:0 0 6px;
}

.pSub{
  font-size:11px;
  letter-spacing:.06em;
  color: var(--textMuted);
  margin:0;
}

.pRule{
  position:absolute;
  left:0;
  right:18px;
  bottom:0;
  height:1px;
  background: var(--progRule);
}

.pArrow{
  position:absolute;
  right:0;
  bottom:-6px;
  width:10px;
  height:10px;
  border-right:2px solid var(--progArrow);
  border-bottom:2px solid var(--progArrow);
  transform: rotate(-45deg);
  border-radius:1px;
}

/* LOCATION */
.page .iviLoc{ padding-top:10px; }

.iviLoc{
  width:min(1120px, 100%);
  margin:0 auto;
  padding:0;
  text-align:left;
}

.iviLocHead{
  margin:0 0 32px;
  text-align:center;
}

.iviLocKicker{
  font-family: var(--serif);
  letter-spacing:.22em;
  text-transform:uppercase;
  font-size:12px;
  color: var(--textSoft);
  margin-bottom:12px;
}

.iviLocTitle{
  margin:0;
  font-family: var(--serif);
  font-weight:400;
  font-size: clamp(32px, 4vw, 48px);
  color: var(--text);
  line-height:1.1;
}

.iviLocGrid{
  display:grid;
  gap:24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.iviLocCard{
  border-radius:24px;
  overflow:hidden;
  background:#ffffff;
  box-shadow: 0 20px 40px rgba(0,0,0,.06);
  border:none;
}

.iviLocPhoto{ position:relative; overflow:hidden; }

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

.iviLocBody{
  padding:24px 24px 28px;
  text-align:left;
}

.iviLocBadge{
  display:inline-block;
  padding:8px 16px;
  border-radius:999px;
  border:1px solid #e0e0e0;
  background:transparent;
  color: var(--textMuted);
  font-family: var(--serif);
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size:10px;
  margin-bottom:14px;
}

.iviLocName{
  margin:0 0 8px;
  font-family: var(--serif);
  font-size:24px;
  color: var(--text);
  line-height:1.2;
}

.iviLocAddr{
  color: var(--textMuted);
  line-height:1.6;
  font-family: var(--serif);
  font-size:15px;
  margin-bottom:6px;
}

.iviLocNote{
  margin-top:6px;
  color: var(--textSoft);
  font-size:13px;
}

.iviLocActions{
  margin-top:24px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.iviBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:52px;
  width:100%;
  padding:0 20px;
  border-radius:999px;
  text-decoration:none;
  font-family: var(--serif);
  letter-spacing:.16em;
  text-transform:uppercase;
  font-size:11px;
  font-weight:600;
  transition: transform .18s ease;
}

.iviBtn:hover{
  transform: translateY(-1px);
}

.iviBtnPrimary{
  background:#c18a74;
  color:#fff;
  box-shadow: 0 10px 20px rgba(193, 138, 116, 0.25);
}

.iviBtnGhost{
  border:1px solid #ddd;
  background:transparent;
  color: var(--textMuted);
}

.iviBtn.is-disabled{
  opacity:.5;
  pointer-events:none;
}

/* DRESSCODE */
.iviDress{
  width:min(1120px, 100%);
  margin:0 auto;
  text-align:center;
}

.iviDressWrap{
  width:min(980px, 100%);
  margin:0 auto;
}

.iviDressKicker{
  font-family: var(--serif);
  letter-spacing:.22em;
  text-transform:uppercase;
  font-size:13px;
  color: var(--textSoft);
}

.iviDressTitle{
  margin:10px 0 0;
  font-family: var(--serif);
  font-weight:400;
  font-size: clamp(22px, 3vw, 34px);
  color: var(--text);
  line-height:1.18;
}

.iviDressSwatches{
  margin:16px auto 0;
  display:flex;
  justify-content:center;
  gap:14px;
  flex-wrap:wrap;
}

.iviDressDot{
  width:56px;
  height:56px;
  border-radius:999px;
  background: var(--c);
  border:1px solid var(--border);
  box-shadow: 0 14px 40px rgba(0,0,0,.10);
  position:relative;
}

.iviDressDot::after{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius:inherit;
  background: radial-gradient(90px 70px at 50% 0%, color-mix(in srgb, var(--rose) 18%, transparent), transparent 60%);
  opacity:.55;
  pointer-events:none;
}

.iviDressText{
  margin:14px auto 0;
  max-width:760px;
  font-family: var(--serif);
  color: var(--textMuted);
  line-height:1.85;
  font-size:14px;
  white-space: pre-line;
}

/* GALLERY */
.gWrap{
  width: min(1120px, 100%);
  margin: 0 auto;
}

.gTitle{
  text-align:center;
  font-family: var(--serif);
  text-transform:uppercase;
  letter-spacing:.22em;
  font-size:14px;
  color: var(--textSoft);
  margin:0 0 12px;
}

.gHead{
  text-align:center;
  font-family: var(--serif);
  font-weight:400;
  font-size: clamp(22px, 3vw, 34px);
  margin:0 0 24px;
  color: var(--text);
}

/* Главное: убираем column-count и делаем нормальный grid */
.page--gallery .iviGalleryGrid--grid{
  display:grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
  align-items:start;
  width:min(980px, 100%);
  margin:0 auto;
  padding-top:10px;
}

/* На случай если gallery.php подмешивает свои width */
.page--gallery .iviGalleryGrid--grid > *{
  min-width:0;
}

.page--gallery .iviGalleryItem{
  display:block;
  width:100% !important;
  margin:0 !important;
  break-inside: auto;
  border-radius:16px;
  overflow:hidden;
  background: rgba(0,0,0,.02);
  border:1px solid var(--border);
  box-shadow: 0 14px 40px rgba(0,0,0,.10);
}

.page--gallery .iviGalleryItem a,
.page--gallery .iviGalleryItem picture{
  display:block;
  width:100%;
}

.page--gallery .iviGalleryItem img{
  width:100% !important;
  height:auto !important;
  display:block;
  max-width:none !important;
  transform: scale(1.01);
  transition: transform .55s var(--easeOut);
}

.page--gallery .iviGalleryItem:hover img{
  transform: scale(1.05);
}

/* RSVP */
#rsvp.rsvpSection{
  width:min(980px, 100%);
  margin:0 auto;
  scroll-margin-top:18px;
}

#rsvp.rsvpSection h2{
  margin:0;
  font-family: var(--serif);
  font-weight:400;
  font-size: clamp(24px, 3.2vw, 38px);
  letter-spacing:.02em;
  text-align:center;
  color: var(--text);
}

#rsvp .rose-line-svg{
  margin:12px auto 18px;
  width: fit-content;
  color: var(--textSoft);
}

#rsvp .rsvpFormCard{
  border-radius:24px;
  border:1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 18px 55px rgba(0,0,0,.08);
  overflow:hidden;
  padding:18px;
}

#rsvp .rsvpHint{
  margin:0 0 12px;
  color: var(--textMuted);
  font-size:13px;
  line-height:1.65;
  text-align:center;
  font-family: var(--serif);
}

#rsvpForm .row2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

#rsvpForm .label{
  display:block;
  font-size:11px;
  color: var(--textSoft);
  margin:0 0 7px 2px;
  letter-spacing:.18em;
  text-transform:uppercase;
  font-family: var(--serif);
}

#rsvpForm .field{
  width:100%;
  border-radius:16px;
  padding:14px 14px;
  border:1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  outline:none;
  font:inherit;
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
}

#rsvpForm .field:focus{
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--rose) 18%, transparent), 0 10px 26px rgba(0,0,0,.06);
}

#rsvpForm .chips{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding:8px;
  border-radius:18px;
  background: var(--surface2);
  border:1px solid var(--border);
}

#rsvpForm .chip{
  flex: 1 1 140px;
  border:1px solid var(--border);
  background: var(--chipBg);
  color: var(--chipText);
  border-radius:999px;
  padding:12px 12px;
  cursor:pointer;
  font-family: var(--serif);
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:12px;
  transition:.18s;
}

#rsvpForm .chip[data-active="true"]{
  background: var(--btnBg);
  color: var(--btnText);
  border-color: rgba(255,255,255,.20);
  box-shadow: 0 16px 42px rgba(0,0,0,.18);
}

#rsvpForm .btn.btn-full{
  width:100%;
  justify-content:center;
  margin-top:12px;
  padding:16px 18px;
  border:0;
  border-radius:999px;
  background: var(--btnBg);
  color: var(--btnText);
  cursor:pointer;
  font-family: var(--serif);
  letter-spacing:.16em;
  text-transform:uppercase;
  box-shadow: 0 18px 55px rgba(0,0,0,.18);
  transition:.18s;
}

/* Floating RSVP */
.floatRsvp{
  position: fixed;
  left:12px;
  right:12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index:9000;
  display:none;
  transform: translateY(0);
  opacity:1;
  transition:.28s;
  pointer-events:none;
}

.floatRsvp .floatBtn{
  pointer-events:auto;
  width:100%;
  border:0;
  border-radius:999px;
  padding:16px 18px;
  background: var(--btnBg);
  color: var(--btnText);
  font-family: var(--serif);
  letter-spacing:.16em;
  text-transform:uppercase;
  box-shadow: 0 18px 55px rgba(0,0,0,.22);
  cursor:pointer;
}

.floatRsvp.isHidden{
  transform: translateY(140%);
  opacity:0;
  pointer-events:none;
}

/* Footer */
.footTextBlock{
  margin:18px auto 0;
  max-width:820px;
  padding-top:18px;
  border-top:1px solid var(--border);
  text-align:center;
  padding-bottom:120px;
}

.footSmallTop{
  font-family: var(--serif);
  letter-spacing:.12em;
  font-size:16px;
  color: var(--textSoft);
  margin-bottom:8px;
}

.footNames{
  font-family: var(--serif);
  font-weight:600;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height:1.08;
  color: var(--text);
  margin-bottom:10px;
}

.footLine1{
  font-family: var(--serif);
  font-size:18px;
  color: var(--textMuted);
  letter-spacing:.06em;
  margin-bottom:10px;
}

.footHeart{
  display:inline-block;
  margin-left:8px;
  color: var(--textMuted);
}

.footLine2{
  font-family: var(--serif);
  font-size:16px;
  color: var(--textSoft);
  letter-spacing:.08em;
}

/* PAGES */
.page--hero{ min-height:100vh; }
.page--story{ min-height:50vh; }
.page--full{ min-height:100vh; }

/* Tablet */
@media (max-width:980px){
  .welcomeWrap{
    grid-template-columns:1fr;
    gap:22px;
    margin-top:40px;
    margin-bottom:40px;
  }

  .planWrap{
    grid-template-columns:1fr;
    gap:60px;
  }

  .iviLocGrid{
    grid-template-columns:1fr;
    gap:20px;
  }

  .iviLocCard{
    max-width:none;
    margin:0;
  }

  #rsvpForm .row2{
    grid-template-columns:1fr;
  }

  .floatRsvp{ display:block; }
}

@media (min-width:981px){
  .welcomeWrap::after{ display:block; }
  .welcomeText{
    text-align:left;
    padding-right:22px;
  }
  .countBox{ padding-left:22px; }
  .introKicker{ text-align:left; }
  .introHairline{
    margin-left:0;
    margin-right:0;
  }
  .introText{
    margin-left:0;
    margin-right:0;
  }
}

/* Subtitle responsive */
@media (max-width:800px){
  .heroSubtitle{ top: calc(50% + 70px); }
}

@media (max-width:520px){
  .hero{
    min-height:100svh;
  }

  .heroText{
    display:block;
    padding:18px 18px calc(22px + var(--safeBot));
    padding-top: calc(18px + var(--safeTop));
  }

  .heroWord{
    left:50%;
    top:50%;
    transform:translate(-50%, -50%);
    font-size:84px;
    letter-spacing:.12em;
    opacity:.16;
    line-height:1;
  }

  .heroRow--top{
    position:absolute;
    top: calc(55px + var(--safeTop));
    left:18px;
    right:18px;
    display:block;
    z-index:3;
  }

  .heroRow--bottom{
    position:absolute;
    left:18px;
    right:18px;
    bottom: calc(55px + var(--safeBot));
    display:block;
    z-index:3;
    text-align:right;
    margin:0;
  }

  .heroName{
    max-width:78%;
    line-height:.9;
    word-break:break-word;
  }

  .heroName--left{
    font-size: clamp(34px, 11vw, 52px);
    text-align:left;
    margin:0;
  }

  .heroName--right{
    margin-left:auto;
    font-size: clamp(34px, 11vw, 52px);
    text-align:right;
  }

  .heroDate{
    position:static;
    display:block;
    margin-top:8px;
    margin-left:2px;
    font-size:16px;
    line-height:1.2;
    opacity:.92;
    text-align:left;
  }

  .heroSubtitle{
    left:50%;
    transform:translateX(-50%);
    top:auto;
    bottom: calc(118px + var(--safeBot));
    width:min(88vw, 320px);
    max-width:min(88vw, 320px);
    padding:10px 12px;
    border-radius:14px;
    background: rgba(0,0,0,.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border:1px solid rgba(255,255,255,.14);
  }

  .heroSubtitleLine{
    font-size:11px;
    letter-spacing:.18em;
    line-height:1.35;
  }

  .heroSubtitleLine--city{
    margin-top:6px;
    font-size:10px;
    letter-spacing:.22em;
  }

  .iviLocActions{
    grid-template-columns:1fr;
  }

  .page--gallery .iviGalleryGrid--grid{
    grid-template-columns:1fr;
    gap:12px;
    width:100%;
  }
}

@media (max-width:500px){
  .iviLocActions{ grid-template-columns:1fr; }
}

@media (max-width:380px){
  .heroSubtitle{ bottom: calc(182px + var(--safeBot)); }
}

@media (max-width:920px){
  .page--gallery .iviGalleryGrid--grid{
    column-count:2;
    column-gap:12px;
  }
}

@media (max-width:980px) and (min-width:521px){
  .heroWord{ opacity:.26; }

  .heroRow{
    display:block;
    position:static;
  }

  .heroName--left{
    position:absolute;
    left:24px;
    top: calc(120px + var(--safeTop));
    z-index:3;
  }

  .heroDate{
    position:absolute;
    left:24px;
    top: calc(200px + var(--safeTop));
    z-index:3;
  }

  .heroName--right{
    position:absolute;
    right:24px;
    bottom: calc(120px + var(--safeBot));
    z-index:3;
  }

  .heroSubtitle{
    top:auto;
    bottom: calc(210px + var(--safeBot));
  }
}

/* =========================================================
   RSVP FIX — readable form, labels, consent checkbox, legal links
========================================================= */

#rsvp.rsvpSection,
#rsvpInner.rsvpSection{
  width: min(980px, 100%);
  margin: 0 auto;
  scroll-margin-top: 18px;
}

#rsvp .rsvpFormCard,
#rsvpInner .rsvpFormCard{
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 18px 55px rgba(0,0,0,.08);
  overflow: hidden;
  padding: clamp(18px, 3vw, 28px);
}

#rsvpForm{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Строки формы */
#rsvpForm .formRow{
  display: block;
  margin: 0;
}

#rsvpForm .row2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Label стали читабельнее и с нормальными отступами */
#rsvpForm .label{
  display: block;
  margin: 0 0 9px 4px;
  padding: 0;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--textSoft);
}

/* Поля */
#rsvpForm .field{
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  padding: 14px 14px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  outline: none;
  font: inherit;
  font-size: 15px;
  line-height: 1.35;
  box-shadow: 0 10px 26px rgba(0,0,0,.045);
}

#rsvpForm textarea.field{
  min-height: 78px;
  resize: vertical;
}

#rsvpForm .field::placeholder{
  color: color-mix(in srgb, var(--textMuted) 74%, transparent);
}

#rsvpForm .field:focus{
  border-color: color-mix(in srgb, var(--rose) 42%, var(--border));
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--rose) 14%, transparent),
    0 10px 26px rgba(0,0,0,.055);
}

/* Чипы */
#rsvpForm .chips{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px;
  border-radius: 18px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

#rsvpForm .chip{
  flex: 1 1 140px;
  min-height: 42px;
  border: 1px solid var(--border);
  background: var(--chipBg);
  color: var(--chipText);
  border-radius: 999px;
  padding: 11px 14px;
  cursor: pointer;
  font-family: var(--serif);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1.15;
  transition:
    background .18s ease,
    color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

#rsvpForm .chip:hover{
  transform: translateY(-1px);
}

#rsvpForm .chip[data-active="true"]{
  background: var(--btnBg);
  color: var(--btnText);
  border-color: color-mix(in srgb, var(--btnBg) 80%, #fff);
  box-shadow: 0 12px 34px rgba(0,0,0,.14);
}

/* Итого гостей */
#rsvpForm .rsvpTotal{
  margin: -2px 0 0;
  color: var(--textMuted);
  font-size: 15px;
  line-height: 1.45;
}

#rsvpForm .rsvpTotal b{
  color: var(--text);
}

/* Consent — красивая галочка и нормальная читаемость */
#rsvpForm .consent{
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  align-items: flex-start;
  margin: 2px 0 0;
  padding: 2px 4px 0;
  color: var(--textMuted);
  font-size: 15px;
  line-height: 1.55;
  cursor: pointer;
}

#rsvpForm .consent input[type="checkbox"]{
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  border-radius: 5px;
  border: 1px solid color-mix(in srgb, var(--textMuted) 42%, transparent);
  background: var(--surface2);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 18px;
  transition:
    background .16s ease,
    border-color .16s ease,
    box-shadow .16s ease;
}

#rsvpForm .consent input[type="checkbox"]::before{
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--btnText);
  border-bottom: 2px solid var(--btnText);
  transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transform-origin: center;
  transition: transform .16s ease;
}

#rsvpForm .consent input[type="checkbox"]:checked{
  background: var(--btnBg);
  border-color: var(--btnBg);
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
}

#rsvpForm .consent input[type="checkbox"]:checked::before{
  transform: rotate(-45deg) translate(1px, -1px) scale(1);
}

#rsvpForm .consent input[type="checkbox"]:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--rose) 18%, transparent),
    0 8px 24px rgba(0,0,0,.14);
}

#rsvpForm .consent > span{
  min-width: 0;
}

#rsvpForm .consent small{
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--textSoft);
  opacity: 1;
}

/* Ссылки в согласии */
#rsvpForm .consent a{
  color: color-mix(in srgb, var(--btnBg) 78%, var(--text));
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--btnBg) 42%, transparent);
  padding-bottom: 1px;
  transition:
    color .18s ease,
    border-color .18s ease,
    background .18s ease;
}

#rsvpForm .consent a:hover{
  color: var(--text);
  border-bottom-color: var(--text);
}

#rsvpForm .consent a:focus-visible{
  outline: none;
  border-radius: 6px;
  background: color-mix(in srgb, var(--rose) 12%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--rose) 14%, transparent);
}

/* Кнопка */
#rsvpForm .btn.btn-full{
  width: 100%;
  justify-content: center;
  margin-top: 2px;
  padding: 16px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--btnBg);
  color: var(--btnText);
  cursor: pointer;
  font-family: var(--serif);
  letter-spacing: .16em;
  text-transform: uppercase;
  box-shadow: 0 18px 55px rgba(0,0,0,.16);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    opacity .18s ease;
}

#rsvpForm .btn.btn-full:hover{
  transform: translateY(-1px);
  box-shadow: 0 22px 62px rgba(0,0,0,.20);
}

/* Ошибки */
#rsvpForm .field.is-invalid{
  border-color: rgba(176, 54, 54, .34) !important;
  background: rgba(176, 54, 54, .035) !important;
}

#rsvpForm .chip.is-invalid{
  border-color: rgba(176, 54, 54, .34) !important;
}

#rsvpForm .consent input[type="checkbox"].is-invalid,
#rsvpForm .consent:has(input[type="checkbox"].is-invalid) input[type="checkbox"]{
  border-color: rgba(176, 54, 54, .44) !important;
  box-shadow: 0 0 0 4px rgba(176, 54, 54, .08);
}

/* Dark mode */
html[data-dark="1"] #rsvpForm .field{
  box-shadow: 0 10px 26px rgba(0,0,0,.16);
}

html[data-dark="1"] #rsvpForm .consent{
  color: var(--textMuted);
}

html[data-dark="1"] #rsvpForm .consent small{
  color: var(--textSoft);
}

html[data-dark="1"] #rsvpForm .consent a{
  color: color-mix(in srgb, var(--btnBg) 72%, #ffffff);
  border-bottom-color: color-mix(in srgb, var(--btnBg) 52%, transparent);
}

html[data-dark="1"] #rsvpForm .consent a:hover{
  color: #ffffff;
  border-bottom-color: rgba(255,255,255,.72);
}

/* Mobile */
@media (max-width: 720px){
  #rsvp .rsvpFormCard,
  #rsvpInner .rsvpFormCard{
    padding: 16px;
    border-radius: 22px;
  }

  #rsvpForm{
    gap: 14px;
  }

  #rsvpForm .row2{
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #rsvpForm .label{
    margin-bottom: 8px;
    font-size: 10px;
    letter-spacing: .16em;
  }

  #rsvpForm .field{
    min-height: 50px;
    font-size: 15px;
  }

  #rsvpForm .chips{
    gap: 8px;
    padding: 7px;
  }

  #rsvpForm .chip{
    flex: 1 1 100%;
    min-height: 42px;
    font-size: 11px;
  }

  #rsvpForm .consent{
    grid-template-columns: 21px 1fr;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
  }

  #rsvpForm .consent small{
    font-size: 11px;
    line-height: 1.5;
  }
}
/* =========================================================
   CONTACTS: exact dark-theme override for shared contacts.php
   ========================================================= */
html[data-dark="1"] {
  --contacts-bg: var(--bg);
  --contacts-section-bg: var(--bg);
  --contacts-card-bg: color-mix(in srgb, var(--bg) 82%, white 18%);
  --contacts-card: color-mix(in srgb, var(--bg) 82%, white 18%);
  --contacts-text: var(--text);
  --contacts-title: var(--text);
  --contacts-muted: color-mix(in srgb, var(--text) 68%, transparent);
  --contacts-accent: var(--rose);
  --contacts-border: color-mix(in srgb, var(--text) 16%, transparent);
}

html[data-dark="1"] body :is(
  #contacts,
  [id*="contact" i],
  section[class*="contact" i],
  .contacts,
  .contacts-section,
  .contactsSection,
  .contacts-block,
  .contactsBlock,
  .ivi-contacts,
  .iviContacts,
  .iviContactsSection
) {
  background: var(--bg) !important;
  color: var(--text) !important;
}

html[data-dark="1"] body :is(
  #contacts,
  [id*="contact" i],
  section[class*="contact" i],
  .contacts,
  .contacts-section,
  .contactsSection,
  .contacts-block,
  .contactsBlock,
  .ivi-contacts,
  .iviContacts,
  .iviContactsSection
) :is(
  [class*="card" i],
  [class*="item" i],
  [class*="person" i],
  article
) {
  background: color-mix(in srgb, var(--bg) 82%, white 18%) !important;
  color: var(--text) !important;
  border-color: color-mix(in srgb, var(--text) 16%, transparent) !important;
  box-shadow: 0 22px 60px rgba(0,0,0,.28) !important;
}

html[data-dark="1"] body :is(
  #contacts,
  [id*="contact" i],
  section[class*="contact" i],
  .contacts,
  .contacts-section,
  .contactsSection,
  .contacts-block,
  .contactsBlock,
  .ivi-contacts,
  .iviContacts,
  .iviContactsSection
) :is(h1,h2,h3,h4,h5,strong,[class*="name" i],[class*="title" i]) {
  color: var(--text) !important;
  opacity: 1 !important;
}

html[data-dark="1"] body :is(
  #contacts,
  [id*="contact" i],
  section[class*="contact" i],
  .contacts,
  .contacts-section,
  .contactsSection,
  .contacts-block,
  .contactsBlock,
  .ivi-contacts,
  .iviContacts,
  .iviContactsSection
) :is(p,small,span,[class*="role" i],[class*="phone" i],[class*="subtitle" i]) {
  color: color-mix(in srgb, var(--text) 72%, transparent) !important;
  opacity: 1 !important;
}

html[data-dark="1"] body :is(
  #contacts,
  [id*="contact" i],
  section[class*="contact" i],
  .contacts,
  .contacts-section,
  .contactsSection,
  .contacts-block,
  .contactsBlock,
  .ivi-contacts,
  .iviContacts,
  .iviContactsSection
) a {
  color: var(--text) !important;
  background: color-mix(in srgb, var(--rose) 16%, transparent) !important;
  border-color: color-mix(in srgb, var(--rose) 45%, transparent) !important;
  opacity: 1 !important;
}

html[data-dark="1"] body :is(
  #contacts,
  [id*="contact" i],
  section[class*="contact" i],
  .contacts,
  .contacts-section,
  .contactsSection,
  .contacts-block,
  .contactsBlock,
  .ivi-contacts,
  .iviContacts,
  .iviContactsSection
) :is(svg,i) {
  color: var(--rose) !important;
  stroke: currentColor;
  opacity: 1 !important;
}

/* =========================================================
   AMOURA: location contrast + Details + Contacts
   ========================================================= */

/* Location cards must inherit the active theme instead of staying white. */
.page--loc .iviLocCard{
  background:var(--surface) !important;
  border:1px solid var(--border) !important;
  box-shadow:0 22px 60px rgba(0,0,0,calc(.08 + var(--isDark) * .18)) !important;
}

.page--loc .iviLocBody{
  background:transparent !important;
}

.page--loc .iviLocBadge{
  border-color:var(--border) !important;
  background:var(--surface2) !important;
  color:var(--textSoft) !important;
}

.page--loc .iviLocName{
  color:var(--text) !important;
}

.page--loc .iviLocAddr{
  color:var(--textMuted) !important;
}

.page--loc .iviLocNote{
  color:var(--textSoft) !important;
}

.page--loc .iviBtnPrimary{
  background:var(--rose) !important;
  color:var(--btnText) !important;
  border:1px solid transparent !important;
  box-shadow:0 12px 28px color-mix(in srgb,var(--rose) 28%,transparent) !important;
}

.page--loc .iviBtnGhost{
  background:var(--surface2) !important;
  color:var(--textMuted) !important;
  border:1px solid var(--border) !important;
}

html[data-dark="1"] .page--loc .iviLocCard{
  background:color-mix(in srgb,var(--bg) 84%,white 16%) !important;
}

html[data-dark="1"] .page--loc .iviLocBadge,
html[data-dark="1"] .page--loc .iviBtnGhost{
  background:rgba(255,255,255,.055) !important;
}

.page--details,
.page--contacts{
  min-height:auto;
  justify-content:flex-start;
  padding-top:clamp(72px,8vw,118px);
  padding-bottom:clamp(72px,8vw,118px);
}

.amouraSectionShell{
  width:min(1120px,100%);
  margin:0 auto;
}

/* Details block has intentionally neutral HTML, so style it by its section id. */
.page--details #details{
  width:100%;
  margin:0;
  color:var(--text);
}

.page--details #details > header{
  max-width:760px;
  margin:0 auto clamp(34px,5vw,60px);
  text-align:center;
}

.page--details #details > header > p:first-child{
  margin:0 0 12px;
  font-family:var(--serif);
  font-size:12px;
  line-height:1.4;
  letter-spacing:.24em;
  text-transform:uppercase;
  color:var(--rose);
}

.page--details #details h2{
  margin:0;
  font-family:var(--serif);
  font-size:clamp(38px,5.5vw,72px);
  font-weight:400;
  line-height:1.02;
  letter-spacing:-.025em;
  color:var(--text);
}

.page--details #details > header > p:last-child:not(:first-child){
  max-width:650px;
  margin:18px auto 0;
  font-family:var(--serif);
  font-size:15px;
  line-height:1.8;
  color:var(--textMuted);
}

.page--details #details > div{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));
  gap:18px;
}

.page--details #details article{
  min-width:0;
  min-height:260px;
  padding:30px 30px 32px;
  position:relative;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:24px;
  background:
    radial-gradient(360px 190px at 100% 0%,color-mix(in srgb,var(--rose) 12%,transparent),transparent 62%),
    var(--surface);
  box-shadow:0 18px 54px rgba(0,0,0,calc(.055 + var(--isDark) * .11));
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}

.page--details #details article::before{
  content:"";
  position:absolute;
  left:0;
  top:28px;
  bottom:28px;
  width:2px;
  border-radius:0 3px 3px 0;
  background:var(--rose);
  opacity:.9;
}

.page--details #details article > span{
  position:absolute;
  top:24px;
  right:26px;
  font-family:var(--serif);
  font-size:54px;
  line-height:1;
  color:color-mix(in srgb,var(--rose) 38%,transparent);
}

.page--details #details h3{
  margin:0 0 10px;
  padding-right:42px;
  font-family:var(--serif);
  font-size:clamp(24px,2.5vw,32px);
  font-weight:400;
  line-height:1.15;
  color:var(--text);
}

.page--details #details article p{
  margin:0;
  font-size:14px;
  line-height:1.75;
  color:var(--textMuted);
}

/* Contacts shared block integration. */
.page--contacts .ivi-contacts{
  --ivi-contacts-bg:transparent !important;
  --ivi-contacts-card:var(--surface) !important;
  --ivi-contacts-text:var(--text) !important;
  --ivi-contacts-muted:var(--textMuted) !important;
  --ivi-contacts-accent:var(--rose) !important;
  --ivi-contacts-line:var(--border) !important;
  width:100% !important;
  padding:0 !important;
  background:transparent !important;
  color:var(--text) !important;
}

.page--contacts .ivi-contacts__inner{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
}

.page--contacts .ivi-contacts__head{
  max-width:760px !important;
  margin:0 auto clamp(34px,5vw,56px) !important;
  text-align:center !important;
}

.page--contacts .ivi-contacts__kicker{
  color:var(--rose) !important;
  font-family:var(--serif) !important;
  letter-spacing:.24em !important;
}

.page--contacts .ivi-contacts__title{
  color:var(--text) !important;
  font-family:var(--serif) !important;
  font-size:clamp(38px,5.5vw,72px) !important;
  font-weight:400 !important;
  line-height:1.02 !important;
  letter-spacing:-.025em !important;
}

.page--contacts .ivi-contacts__text{
  color:var(--textMuted) !important;
  font-family:var(--serif) !important;
  line-height:1.8 !important;
}

.page--contacts .ivi-contacts__grid{
  gap:18px !important;
}

.page--contacts .ivi-contact{
  border:1px solid var(--border) !important;
  border-radius:24px !important;
  background:
    radial-gradient(360px 190px at 100% 0%,color-mix(in srgb,var(--rose) 10%,transparent),transparent 62%),
    var(--surface) !important;
  box-shadow:0 18px 54px rgba(0,0,0,calc(.055 + var(--isDark) * .11)) !important;
  color:var(--text) !important;
}

.page--contacts .ivi-contact__name{
  color:var(--text) !important;
  font-family:var(--serif) !important;
}

.page--contacts .ivi-contact__role,
.page--contacts .ivi-contact__phone,
.page--contacts .ivi-contact__meta{
  color:var(--textMuted) !important;
}

.page--contacts .ivi-contact a{
  color:var(--text) !important;
  border-color:var(--border) !important;
}

@media(max-width:760px){
  .page--details,
  .page--contacts{
    padding-top:66px;
    padding-bottom:66px;
  }

  .page--details #details > div{
    grid-template-columns:1fr;
  }

  .page--details #details article{
    min-height:220px;
    padding:26px 24px 28px;
  }
}
