:root {
  --ip-accent: #c45c6a;
  --ip-ink: #2a2420;
  --ip-muted: #7a6f66;
  --ip-bg: #f7f1ea;
  --ip-paper: #fffdf9;
  --ip-font-body: "Plus Jakarta Sans", sans-serif;
  --ip-font-heading: "Playfair Display", serif;
  --ip-font-script: "Dancing Script", cursive;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: auto; /* JS handles smooth — ổn định hơn trên iOS */
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html.has-native-smooth { scroll-behavior: smooth; }
}
body.ip-body {
  overflow-x: clip;
  max-width: 100%;
  margin: 0;
  font-family: var(--ip-font-body);
  color: var(--ip-ink);
  background:
    radial-gradient(900px 400px at 0% 0%, rgba(196,92,106,.12), transparent 55%),
    radial-gradient(800px 360px at 100% 10%, rgba(120,150,120,.12), transparent 50%),
    var(--ip-bg);
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
html.ip-scroll-locked,
html.ip-scroll-locked body.ip-body.is-sealed {
  overflow: hidden;
  height: 100%;
  position: relative;
}
body.ip-body > .ip {
  position: relative;
  z-index: 1;
  overflow-x: clip;
}

/* Theme scenery — texture, watermark, side motifs */
.ip-scenery {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: paint;
}
.ip-scenery__texture {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-size: 240px 240px;
  background-repeat: repeat;
  mix-blend-mode: multiply;
}
.ip-scenery__watermark {
  position: absolute;
  left: 50%;
  top: 38%;
  width: min(72vw, 420px);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0.14;
  object-fit: contain;
}
.ip-scenery__motif {
  position: absolute;
  top: 50%;
  width: auto;
  max-height: min(52vh, 440px);
  transform: translateY(-50%);
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}
.ip-scenery__motif--left {
  left: max(-48px, -4vw);
}
.ip-scenery__motif--right {
  right: max(-48px, -4vw);
}
.ip-scenery__motif--blend {
  opacity: 0.42;
  mix-blend-mode: screen;
}
.ip-scenery__motif--soft {
  opacity: 0.55;
  mix-blend-mode: soft-light;
}
.ip-scenery__floral {
  position: absolute;
  right: max(8px, env(safe-area-inset-right));
  top: 42%;
  width: min(34vw, 160px);
  height: auto;
  z-index: 0;
  opacity: 0.88;
  pointer-events: none;
  transform: translateY(-20%);
  transform-origin: 70% 100%;
}
body.is-opened .ip-scenery--public .ip-scenery__floral {
  animation: ip-flora-sway 7s ease-in-out infinite;
}
body.is-opened .ip-scenery--public .ip-scenery__floral--mirror {
  animation-duration: 8.8s;
  animation-delay: -1.6s;
}
body.is-opened .ip-scenery--public .ip-scenery__motif--left {
  animation: ip-motif-drift 9.5s ease-in-out -1.1s infinite;
}
body.is-opened .ip-scenery--public .ip-scenery__motif--right {
  animation: ip-motif-drift 11.5s ease-in-out -3.2s infinite reverse;
}
@keyframes ip-flora-sway {
  0%, 100% { transform: translateY(-20%) rotate(0deg); }
  50% { transform: translateY(-24%) rotate(8deg); }
}
@keyframes ip-motif-drift {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(calc(-50% - 12px)) translateX(8px); }
}
body.is-sealed .ip-scenery__floral { display: none; }
body.ip-auto-scrolling {
  cursor: default;
}
.ip-sec,
.ip-hero,
.ip-foot {
  scroll-margin-top: 1rem;
}
@media (max-width: 640px) {
  .ip-sec,
  .ip-hero,
  .ip-foot {
    scroll-margin-top: .5rem;
  }
}
.ip-scroll {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  color: #fff; text-decoration: none;
  border: 1px solid rgba(255,255,255,.45); border-radius: 999px;
  padding: .55rem 1.1rem; font-size: .9rem; backdrop-filter: blur(4px);
  transition: transform .25s ease, background .25s ease, border-color .25s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px;
  box-sizing: border-box;
}
.ip-scroll:focus-visible {
  outline: 2px solid rgba(255,255,255,.9);
  outline-offset: 3px;
}
.ip-scroll:active { transform: scale(.98); background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.65); }
.ip-scroll__icon { flex-shrink: 0; opacity: .92; }

.ip {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.ip-hero {
  position: relative;
  min-height: 92vh;
  min-height: 92dvh;
  display: grid;
  place-items: end center;
  align-content: end;
  color: #fff;
  text-align: center;
  padding: 2rem 1.25rem max(2.5rem, env(safe-area-inset-bottom));
  background: linear-gradient(160deg, #d9a3ab, #8f3d4a) center/cover no-repeat;
  background-size: cover;
  background-position: center 28%;
}
.ip-hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 12, 10, 0.28) 0%,
    rgba(20, 12, 10, 0.12) 42%,
    rgba(20, 12, 10, 0.55) 78%,
    rgba(20, 12, 10, 0.78) 100%
  );
}
.ip-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  animation: ipRise .9s ease both;
}
.ip-hero__panel {
  width: 100%;
}
@media (min-width: 641px) {
  .ip-hero--has-cover .ip-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .ip-hero--has-cover .ip-hero__photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
  }
}
@keyframes ipRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Bìa có khung (scene) */
.ip-hero--framed-scene {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: auto;
  padding: 0;
  background: var(--ip-bg);
  color: #fff;
}
.ip-cover-scene {
  width: 100%;
  background: var(--ip-cover-stage-bg, #ebe4d8);
}
.ip-cover-scene__stage {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  aspect-ratio: 390 / 520;
  min-height: clamp(280px, 52vh, 520px);
  background: var(--ip-cover-stage-bg, #ebe4d8);
  overflow: hidden;
}
.ip-cover-scene__layer {
  position: absolute;
  box-sizing: border-box;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.ip-cover-scene__photo {
  overflow: hidden;
  border-radius: 4px;
  background: #d8d0c4;
}
.ip-cover-scene__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.ip-cover-scene__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b6560;
  font-size: .85rem;
}
.ip-cover-scene__frame,
.ip-cover-scene__decor,
.ip-cover-scene__asset {
  object-fit: contain;
  width: 100%;
  height: 100%;
}
.ip-cover-scene__text {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--ip-font-heading, 'Playfair Display'), Georgia, serif;
  font-weight: 600;
  color: #2a2420;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.65);
}
.ip-cover-scene__text span {
  line-height: 1.15;
  padding: 0 .25rem;
}
.ip-cover-scene__text-couple {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08em;
  width: 100%;
  max-width: 100%;
  padding: 0 .25rem;
  line-height: 1.12;
  text-wrap: balance;
}
.ip-cover-scene__text-line {
  display: block;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ip-cover-scene__text-amp {
  display: block;
  font-size: 0.72em;
  opacity: 0.88;
  line-height: 1;
}
body.is-opened .ip-cover-scene__layer[data-ip-motion="settle"] {
  animation: ip-layer-in var(--ip-in-dur, .95s) cubic-bezier(.22, .8, .28, 1) var(--ip-in-delay, .18s) both;
}
body.is-opened .ip-cover-scene__layer[data-ip-motion="rise"] {
  animation: ip-layer-rise var(--ip-in-dur, 1.5s) cubic-bezier(.22, .8, .28, 1) var(--ip-in-delay, .9s) both;
}
body.is-opened .ip-cover-scene__layer[data-ip-motion="sway"] {
  animation:
    ip-layer-sway-in var(--ip-in-dur, 1.25s) cubic-bezier(.22, .8, .28, 1) var(--ip-in-delay, .4s) both,
    ip-layer-sway var(--ip-float-dur, 7s) ease-in-out calc(var(--ip-in-delay, .4s) + var(--ip-in-dur, 1.25s) + var(--ip-float-delay, 0s)) infinite;
  transform-origin: 50% 80%;
  will-change: transform;
}
body.is-opened .ip-cover-scene__layer[data-ip-motion="type"].cover-scene-layer--float {
  animation: ip-layer-drift var(--ip-float-dur, 6.5s) ease-in-out calc(var(--ip-in-delay, .55s) + var(--ip-float-delay, 0s)) infinite;
}
@keyframes ip-layer-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 22px)) rotate(var(--cover-layer-rot, 0deg)); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(var(--cover-layer-rot, 0deg)); }
}
@keyframes ip-layer-rise {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 60px)) rotate(calc(var(--cover-layer-rot, 0deg) + 8deg)); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(var(--cover-layer-rot, 0deg)); }
}
@keyframes ip-layer-sway-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 18px)) rotate(calc(var(--cover-layer-rot, 0deg) - 10deg)); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(var(--cover-layer-rot, 0deg)); }
}
@keyframes ip-layer-sway {
  0%, 100% { transform: translate(-50%, -50%) rotate(var(--cover-layer-rot, 0deg)); }
  50% { transform: translate(-50%, calc(-50% - var(--ip-float-amp, 6px))) rotate(calc(var(--cover-layer-rot, 0deg) + var(--ip-float-sway, 8deg))); }
}
@keyframes ip-layer-drift {
  0%, 100% { transform: translate(-50%, -50%) rotate(var(--cover-layer-rot, 0deg)); }
  50% { transform: translate(-50%, calc(-50% - var(--ip-float-amp, 12px))) rotate(var(--cover-layer-rot, 0deg)); }
}
.ip-glyph {
  display: inline-block;
  opacity: 0;
  animation: ip-glyph-in .72s ease both;
}
@keyframes ip-glyph-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.ip-fx {
  position: fixed;
  inset: 0;
  z-index: 8;
  overflow: hidden;
  pointer-events: none;
}
.ip-fx__p {
  position: absolute;
  top: -30px;
  border-radius: 70% 0 70% 0;
  opacity: .8;
  animation: ip-fall linear forwards;
}
.ip-fx__p--spark {
  border-radius: 50%;
  background: #f3d9a0;
  box-shadow: 0 0 8px #f3d9a0;
  animation: ip-fall linear forwards, ip-twinkle 2s ease-in-out infinite;
}
@keyframes ip-fall {
  to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--r)); }
}
@keyframes ip-twinkle {
  50% { opacity: .2; }
}
body.is-opened .ip-kicker,
body.is-opened .ip-guest-hello,
body.is-opened .ip-date,
body.is-opened .ip-scroll {
  animation: ipRise .9s ease both;
}
body.is-opened .ip-kicker { animation-delay: .28s; }
body.is-opened .ip-guest-hello { animation-delay: .42s; }
body.is-opened .ip-date { animation-delay: 1.05s; }
body.is-opened .ip-scroll { animation-delay: 1.2s; }
body.is-opened .ip-hero--has-cover .ip-hero__photo {
  animation: ip-photo-settle 7.5s ease-out both;
}
@keyframes ip-photo-settle {
  from { transform: scale(1.1); }
  to { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .ip-cover-scene__layer,
  .ip-glyph,
  .ip-fx,
  .ip-scenery__floral,
  .ip-scenery__motif {
    animation: none !important;
  }
  .ip-glyph { opacity: 1; transform: none; }
  .ip-fx { display: none; }
}
.ip-hero--framed-scene .ip-hero__veil {
  display: none;
}
.ip-hero--framed-scene .ip-hero__inner {
  width: 100%;
  max-width: none;
  margin: 0;
}
.ip-hero--framed-scene .ip-hero__panel {
  border-radius: 22px 22px 0 0;
  margin-top: -0.5rem;
  background: linear-gradient(
    180deg,
    rgba(12, 8, 10, 0) 0%,
    rgba(12, 8, 10, 0.55) 22%,
    rgba(12, 8, 10, 0.88) 55%,
    rgba(8, 5, 6, 0.94) 100%
  );
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 1.5rem 1.15rem max(1.1rem, calc(env(safe-area-inset-bottom) + 0.5rem));
}
@media (min-width: 641px) {
  .ip-hero--framed-scene {
    min-height: 92dvh;
  }
  .ip-cover-scene__stage {
    min-height: min(58vh, 520px);
  }
}

.ip-kicker,
.ip-names,
.ip-date {
  text-shadow: 0 2px 18px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.45);
}
.ip-kicker {
  text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; opacity: .92; margin: 0 0 .75rem;
  font-family: var(--ip-font-body), Arial, Helvetica, sans-serif;
}
.ip-names {
  margin: 0; font-family: var(--ip-font-script); font-size: clamp(2.6rem, 9vw, 4.2rem);
  line-height: 1.05; font-weight: 700;
  text-wrap: balance;
}
.ip-names__amp {
  display: block; font-style: normal; font-size: .45em; opacity: .88; margin: .12rem 0;
}
.ip-names__person { display: inline-block; max-width: 100%; }
.ip-date { margin: .85rem 0 1.5rem; letter-spacing: .12em; font-weight: 500; font-size: .95rem; }

.ip-sec {
  margin: 1.25rem; padding: 1.6rem 1.25rem; background: var(--ip-paper);
  border-radius: 22px; border: 1px solid #eadfd0;
  box-shadow: 0 14px 34px rgba(52, 36, 28, .06);
}
.ip-sec h2 {
  margin: 0 0 .85rem; font-family: var(--ip-font-heading); font-size: 1.55rem; text-align: center;
}
.ip-lead { margin: 0; line-height: 1.75; text-align: center; color: #564840; white-space: pre-wrap; }
.ip-muted { color: var(--ip-muted); text-align: center; }
.ip-story { font-style: italic; }

.ip-parents {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; text-align: center;
}
.ip-parents small { display: block; color: var(--ip-muted); margin-bottom: .25rem; letter-spacing: .06em; text-transform: uppercase; font-size: .72rem; }

.ip-event__card { text-align: center; margin-bottom: 1.25rem; }
.ip-event__time { font-size: 1.6rem; font-weight: 700; margin: 0 0 .35rem; color: var(--ip-accent); }
.ip-event__venue { margin: 0; font-size: 1.15rem; font-weight: 600; }
.ip-event__addr { margin: .35rem 0 0; color: var(--ip-muted); }
.ip-map {
  margin: 1.35rem 0 0;
  text-align: center;
}
.ip-map__kicker {
  margin: 0 0 .65rem;
  font-family: var(--ip-font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9a7348;
}
.ip-map__venue {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ip-ink);
}
.ip-map__addr {
  margin: 0 0 1rem;
  font-size: .92rem;
  line-height: 1.65;
  color: var(--ip-muted);
}
.ip-map__frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #e8e0d6;
  box-shadow: 0 12px 32px rgba(52, 36, 28, 0.1);
  aspect-ratio: 16 / 10;
  min-height: 200px;
}
.ip-map__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.ip-map__directions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-top: .85rem;
  font-size: .95rem;
  font-weight: 700;
  color: #5f7a65;
  text-decoration: none;
  white-space: nowrap !important;
}
.ip-map__directions:hover { text-decoration: underline; }
.ip-map__directions-icon {
  display: inline-block;
  transform: rotate(-45deg);
  font-size: 1rem;
}
.ip-events-grid .ip-map {
  margin-top: .75rem;
  text-align: left;
}
.ip-events-grid .ip-map__frame {
  aspect-ratio: 16 / 11;
  min-height: 160px;
}
.ip-events-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.ip-events-grid article {
  background: #f8f1ea; border-radius: 14px; padding: 1rem; text-align: center;
}
.ip-events-grid h3 { margin: 0 0 .45rem; font-size: 1rem; font-family: var(--ip-font-heading); }

.ip-countdown__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .65rem; text-align: center;
}
.ip-countdown__grid div {
  background: #f8f1ea; border-radius: 14px; padding: .85rem .4rem;
}
.ip-countdown__grid strong {
  display: block; font-size: 1.5rem; color: var(--ip-accent); font-family: var(--ip-font-heading);
}
.ip-countdown__grid span { font-size: .75rem; color: var(--ip-muted); }

.ip-lang {
  position: fixed; top: 1rem; right: 1rem; z-index: 60;
  display: inline-flex; gap: .25rem; background: rgba(255,255,255,.92);
  border-radius: 999px; padding: .25rem; box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.ip-lang button {
  border: 0; background: transparent; border-radius: 999px; padding: .35rem .7rem;
  cursor: pointer; font-weight: 600; font-size: .8rem; color: var(--ip-muted, #6b625a);
}
.ip-lang button.is-active { background: var(--ip-accent, #c45c6a); color: #fff; }

.ip-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.45rem;
  border: 0; border-radius: 999px; padding: .7rem 1.25rem; cursor: pointer;
  background: var(--ip-accent); color: #fff; font-weight: 600; text-decoration: none;
  font-family: Arial, Helvetica, sans-serif !important;
  transition: opacity 0.2s ease;
}
.ip-btn:disabled {
  cursor: not-allowed;
}
.ip-btn.is-loading {
  pointer-events: none;
  opacity: 0.92;
}
.ip-btn.is-loading::before {
  content: '';
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ip-btn-spin 0.65s linear infinite;
}
@keyframes ip-btn-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .ip-btn.is-loading::before {
    animation: none;
    border-top-color: rgba(255, 255, 255, 0.35);
  }
}
.ip-btn--soft { background: #efe4d8; color: var(--ip-ink); }
.ip-btn--soft.is-loading::before {
  border-color: rgba(30, 30, 30, 0.18);
  border-top-color: var(--ip-ink, #3d342c);
}
@media (prefers-reduced-motion: reduce) {
  .ip-btn--soft.is-loading::before {
    border-top-color: rgba(30, 30, 30, 0.18);
  }
}

.ip-album {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}
.ip-album figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1;
  min-width: 0;
  position: relative;
  background: #efe4d8;
}
.ip-album img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.ip-album figure:hover img { transform: scale(1.04); }

.ip-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.ip-timeline li { display: grid; grid-template-columns: 70px 1fr; gap: .75rem; align-items: start; }
.ip-timeline time {
  font-weight: 700; color: var(--ip-accent); padding-top: .15rem;
}
.ip-timeline strong { display: block; margin-bottom: .15rem; }
.ip-timeline p { margin: 0; color: var(--ip-muted); font-size: .92rem; }

.ip-swatches { display: flex; justify-content: center; gap: .5rem; margin-top: 1rem; }
.ip-swatches span {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ddd;
}

.ip-tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ip-accent); margin-bottom: .35rem;
}

/* Hộp quà mừng — trigger + modal */
.ip-gift-sec { text-align: center; }
.ip-gift-sec__note {
  margin: 1rem 0 0;
  font-size: .88rem;
  line-height: 1.65;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}
.ip-gift-trigger {
  display: grid;
  justify-items: center;
  gap: .85rem;
  margin: .5rem auto 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.ip-gift-trigger__art {
  position: relative;
  width: min(280px, 72vw);
  height: 168px;
}
.ip-gift-trigger__env {
  position: absolute;
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(80, 50, 30, 0.14);
}
.ip-gift-trigger__env--back {
  right: 8%;
  top: 12%;
  width: 58%;
  height: 72%;
  background: linear-gradient(145deg, #f3e4c8, #e6cfa8);
  transform: rotate(6deg);
  opacity: 0.92;
}
.ip-gift-trigger__env--front {
  left: 10%;
  top: 8%;
  width: 62%;
  height: 78%;
  background: linear-gradient(160deg, #faf3e6 0%, #edd9b8 55%, #d4b896 100%);
  transform: rotate(-4deg);
}
.ip-gift-trigger__env--front::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 38%;
  background: linear-gradient(180deg, #8b5a2b, #6d4522);
  border-radius: 10px 10px 0 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.ip-gift-trigger__label {
  font-size: .92rem;
  font-weight: 600;
  color: #7a5c3a;
  letter-spacing: .02em;
}
.ip-gift-trigger:hover .ip-gift-trigger__label { color: var(--ip-accent); }
.ip-gift-trigger:active .ip-gift-trigger__art { transform: scale(0.98); }

body.ip-gift-open { overflow: hidden; }

.ip-gift-modal {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
.ip-gift-modal[hidden] { display: none !important; }
.ip-gift-modal:not([hidden]) { display: grid; }

.ip-gift-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, 0.55);
  backdrop-filter: blur(4px);
}

.ip-gift-modal__sheet {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  border-radius: 18px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.28);
  animation: ipLbUp .28s ease;
}
.ip-gift-modal__sheet--cols-1 {
  width: min(400px, 100%);
}

.ip-gift-modal__head {
  position: relative;
  display: grid;
  place-items: center;
  padding: 1rem 2.75rem;
  background: linear-gradient(180deg, #d4a24a, #c08a2e);
  color: #fff;
  border-radius: 18px 18px 0 0;
}
.ip-gift-modal__head h2 {
  margin: 0;
  font-family: var(--ip-font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap !important;
}
.ip-gift-modal__close {
  position: absolute;
  top: 50%;
  right: .65rem;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.95;
}
.ip-gift-modal__close:hover { opacity: 1; }

.ip-gift-modal__body {
  padding: 1.25rem 1.15rem 1.5rem;
  background: #faf6f0;
  border-radius: 0 0 18px 18px;
}

.ip-gift-modal__grid {
  display: grid;
  gap: 1.1rem;
  align-items: start;
}
.ip-gift-modal__grid--1 {
  grid-template-columns: 1fr;
  max-width: 320px;
  margin: 0 auto;
}
.ip-gift-modal__grid--2 {
  grid-template-columns: 1fr 1fr;
}

.ip-gift-card {
  text-align: center;
}
.ip-gift-card__who {
  margin: 0 0 .75rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #b8860b;
  line-height: 1.35;
}
.ip-gift-card__qr-wrap {
  margin: 0 auto .75rem;
  padding: .65rem;
  max-width: 200px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(60, 40, 20, 0.1);
}
.ip-gift-card__qr-wrap--empty {
  min-height: 140px;
  display: grid;
  place-items: center;
  color: var(--ip-muted);
  font-size: .85rem;
}
.ip-gift-card__qr {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.ip-gift-card__save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin: 0 0 .85rem;
  padding: .45rem 1rem;
  border: 0;
  border-radius: 999px;
  background: #efe4d4;
  color: #7a5c3a;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap !important;
}
.ip-gift-card__save:hover { background: #e6d6c0; }
.ip-gift-card__bank {
  margin: 0 0 .25rem;
  font-size: .88rem;
  color: var(--ip-muted);
}
.ip-gift-card__number {
  margin: 0 0 .35rem;
  font-family: ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ip-ink);
  cursor: pointer;
}
.ip-gift-card__holder {
  margin: 0;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: #c08a2e;
}

@media (max-width: 640px) {
  .ip-gift-modal__grid--2 {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }
  .ip-gift-modal__sheet--cols-2 {
    width: min(400px, 100%);
  }
}

.ip-form { display: grid; gap: .75rem; max-width: 420px; margin: 1rem auto 0; }
.ip-form .ip-btn { width: 100%; }
.ip-form label { display: grid; gap: .3rem; font-size: .88rem; font-weight: 600; color: #51453d; }
.ip-form input, .ip-form select, .ip-form textarea {
  border: 1px solid #e4d7c9; border-radius: 12px; padding: .7rem .85rem; font: inherit; background: #fff;
}
.ip-form-msg { text-align: center; color: #2e7d32; margin: .25rem 0 0; }

.ip-sec--guestbook .ip-guestbook-lead {
  text-align: center; margin: 0 0 1rem; color: var(--ip-muted); font-size: .95rem; line-height: 1.55;
}
.ip-sig-wall {
  position: relative; min-height: 260px; margin: 0 0 1.35rem;
  border: 2px solid color-mix(in srgb, var(--ip-accent) 55%, #1e3a5f);
  border-radius: 6px; background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
  overflow: hidden;
}
.ip-sig-wall__empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 1rem; text-align: center; color: var(--ip-muted); font-size: .92rem;
}
.ip-sig-wall__item,
.ip-sig-wall__legacy {
  position: absolute;
  left: var(--sig-x, 10%);
  top: var(--sig-y, 12%);
  transform: translate(-50%, -50%) rotate(var(--sig-rot, 0deg)) scale(var(--sig-scale, 1));
  max-width: min(42%, 168px);
  width: auto;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.ip-sig-wall__legacy {
  margin: 0; padding: .35rem .5rem; font-size: .82rem; line-height: 1.35;
  font-style: italic; color: #2a2a2a; max-width: min(48%, 200px);
  background: rgba(255,255,255,.75); border-radius: 4px;
}
.ip-guestbook-form { margin-top: .25rem; }
.ip-sig-pad-wrap { margin: .65rem 0 1rem; }
.ip-sig-pad-toggle {
  width: 100%; min-height: 48px; font-weight: 600; letter-spacing: .04em;
  background: color-mix(in srgb, var(--ip-accent) 88%, #1a2744); border-color: transparent;
}
.ip-sig-pad-toggle[aria-expanded="true"] { opacity: .92; }
.ip-sig-pad-panel { margin-top: .75rem; }
.ip-sig-pad-label {
  margin: 0 0 .35rem; font-size: .85rem; color: var(--ip-muted); text-align: center;
  font-family: var(--ip-font-heading);
}
.ip-sig-pad {
  display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 640 / 220;
  touch-action: none; cursor: crosshair;
  border: 2px solid color-mix(in srgb, var(--ip-accent) 70%, #e8a87c);
  border-radius: 8px; background: #f4f4f6;
}
.ip-sig-pad-actions {
  display: flex; gap: .5rem; margin-top: .55rem; flex-wrap: nowrap;
}
.ip-sig-pad-actions .ip-btn { flex: 1; min-height: 44px; white-space: nowrap !important; }
.ip-btn--accent {
  background: color-mix(in srgb, var(--ip-accent) 92%, #c45c20);
  border-color: transparent; color: #fff;
}
.ip-btn--accent:active { opacity: .92; }
@media (max-width: 640px) {
  .ip-sig-wall {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem .45rem;
    min-height: 0;
    padding: .85rem .75rem;
    align-content: start;
  }
  .ip-sig-wall__empty {
    position: static;
    grid-column: 1 / -1;
    min-height: 5.5rem;
  }
  .ip-sig-wall__item,
  .ip-sig-wall__legacy {
    position: static;
    left: auto;
    top: auto;
    transform: rotate(var(--sig-rot, 0deg)) scale(min(var(--sig-scale, 1), 1));
    max-height: 56px;
    max-width: 100%;
    width: auto;
    margin: 0 auto;
    justify-self: center;
  }
  .ip-sig-wall__legacy {
    text-align: center;
    max-width: 100%;
    font-size: .78rem;
  }
}

.ip-wishes { display: grid; gap: .75rem; margin-top: 1.25rem; }
.ip-wishes blockquote {
  margin: 0; padding: 1rem; border-radius: 14px; background: #f8f1ea; border-left: 3px solid var(--ip-accent);
}
.ip-wishes p { margin: 0 0 .45rem; line-height: 1.55; }
.ip-wishes cite { color: var(--ip-muted); font-style: normal; font-size: .9rem; }

.ip-foot {
  text-align: center; padding: 2rem 1.25rem 3rem; color: var(--ip-muted);
}
.ip-foot p {
  font-family: var(--ip-font-heading); font-style: italic; font-size: 1.15rem; color: #4d4038; margin: 0 0 .75rem;
}

.ip-music {
  position: fixed; right: 14px; bottom: 14px; z-index: 30;
  border: 0; border-radius: 999px; padding: .65rem 1rem;
  min-height: 44px;
  background: rgba(255,253,249,.94); color: var(--ip-ink); box-shadow: 0 10px 28px rgba(0,0,0,.14);
  cursor: pointer; font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: .45rem;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  backdrop-filter: blur(8px);
}
.ip-music__dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--ip-accent); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(196,92,106,.45); animation: ipPulse 1.6s infinite;
}
.ip-music.is-off .ip-music__dot { animation: none; background: #bbb; }
.ip-music.is-attention {
  box-shadow: 0 0 0 3px rgba(196, 92, 106, 0.35), 0 10px 28px rgba(0, 0, 0, 0.14);
  animation: ipMusicNudge 1.8s ease-in-out infinite;
}
@keyframes ipMusicNudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
.ip-music__label {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}
@keyframes ipPulse {
  0% { box-shadow: 0 0 0 0 rgba(196,92,106,.45); }
  70% { box-shadow: 0 0 0 10px rgba(196,92,106,0); }
  100% { box-shadow: 0 0 0 0 rgba(196,92,106,0); }
}

.template-classic-rose { --ip-accent: #c45c6a; --ip-bg: #f7f1ea; --ip-paper: rgba(255, 253, 249, 0.94); }
.template-tradition-red {
  --ip-accent: #b42318;
  --ip-bg: #2f0808;
  --ip-paper: rgba(255, 250, 242, 0.96);
  --ip-ink: #2a1814;
}
.template-minimal-cream { --ip-accent: #8a6a4f; --ip-bg: #f0e8dc; --ip-paper: rgba(255, 252, 247, 0.92); }
.template-garden-sage { --ip-accent: #5f7a65; --ip-bg: #e8efe9; --ip-paper: rgba(255, 253, 250, 0.93); }

body.ip-body.template-tradition-red {
  background:
    radial-gradient(ellipse 130% 70% at 50% -10%, rgba(180, 40, 30, 0.55), transparent 58%),
    radial-gradient(ellipse 90% 50% at 0% 100%, rgba(120, 20, 15, 0.35), transparent 50%),
    linear-gradient(175deg, #5c1210 0%, #2f0808 45%, #1a0505 100%);
  color: var(--ip-ink);
}
body.ip-body.template-minimal-cream {
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(255, 255, 255, 0.65), transparent 55%),
    linear-gradient(180deg, #f5ede3 0%, #ebe2d6 100%);
}
body.ip-body.template-garden-sage {
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(125, 154, 132, 0.22), transparent 50%),
    radial-gradient(ellipse 70% 45% at 0% 100%, rgba(95, 122, 101, 0.18), transparent 45%),
    var(--ip-bg);
}
body.ip-body.template-classic-rose .ip-scenery__motif--soft { mix-blend-mode: normal; opacity: 0.7; }
body.ip-body.template-minimal-cream .ip-scenery__watermark { opacity: 0.11; top: 32%; }
body.ip-body.template-garden-sage .ip-scenery__watermark { opacity: 0.16; top: 36%; }

/* Envelope */
.ip-envelope {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,.12), transparent 45%),
    linear-gradient(160deg, #5c2a32, #2a1518 70%);
  transition: opacity 1s ease, visibility 1s ease;
}
.ip-envelope__heart {
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
  margin: 0 0 .4rem;
  animation: ip-beat 1.3s ease-in-out infinite;
}
@keyframes ip-beat {
  0%, 60%, 100% { transform: scale(1); }
  30% { transform: scale(1.25); }
}
.ip-envelope__scenery .ip-scenery__motif--left {
  animation: ip-motif-drift 8.2s ease-in-out infinite;
}
.ip-envelope__scenery .ip-scenery__motif--right {
  animation: ip-motif-drift 10.4s ease-in-out -2.1s infinite reverse;
}
.ip-envelope__scenery .ip-scenery__floral {
  animation: ip-env-flora 7s ease-in-out infinite;
  transform-origin: 70% 20%;
}
.ip-envelope__scenery .ip-scenery__floral--mirror {
  animation-name: ip-env-flora-mirror;
  animation-duration: 9s;
  animation-delay: -1.5s;
}
@keyframes ip-env-flora {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(8deg); }
}
@keyframes ip-env-flora-mirror {
  0%, 100% { transform: scaleX(-1) rotate(0deg); }
  50% { transform: scaleX(-1) rotate(-8deg); }
}
.ip-envelope__scenery {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ip-envelope__scenery .ip-scenery__texture {
  opacity: 0.22;
  mix-blend-mode: soft-light;
}
.ip-envelope__scenery .ip-scenery__watermark {
  top: 50%;
  width: min(85vw, 480px);
  opacity: 0.2;
}
.ip-envelope__scenery .ip-scenery__motif {
  max-height: min(62vh, 520px);
  top: 50%;
}
.ip-envelope__scenery .ip-scenery__motif--left {
  left: max(-56px, -5vw);
}
.ip-envelope__scenery .ip-scenery__motif--right {
  right: max(-56px, -5vw);
}
.ip-envelope__scenery .ip-scenery__motif--blend {
  opacity: 0.55;
  mix-blend-mode: screen;
}
.ip-envelope__scenery .ip-scenery__motif--soft {
  opacity: 0.45;
  mix-blend-mode: screen;
}
.ip-envelope__scenery .ip-scenery__floral {
  position: absolute;
  top: auto;
  bottom: 18%;
  right: 8%;
  width: min(36vw, 200px);
  transform: none;
  opacity: 0.92;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
}
.ip-envelope.template-tradition-red .ip-envelope__scenery .ip-scenery__motif--blend {
  opacity: 0.62;
}
.ip-envelope.template-minimal-cream .ip-envelope__scenery .ip-scenery__watermark {
  opacity: 0.16;
}
.ip-envelope .ip-envelope__scenery .ip-scenery__floral:not(.ip-scenery__floral--mirror) {
  top: 10%;
  bottom: auto;
  right: 5%;
  width: min(34vw, 150px);
  opacity: 0.8;
}
.ip-envelope .ip-envelope__scenery .ip-scenery__floral--mirror {
  top: 10%;
  bottom: auto;
  left: 5%;
  right: auto;
  width: min(34vw, 150px);
  opacity: 0.8;
  transform: scaleX(-1);
}
.ip-envelope.template-minimal-cream .ip-envelope__scenery .ip-scenery__floral:not(.ip-scenery__floral--mirror) {
  top: auto;
  bottom: 14%;
  right: 4%;
  width: min(40vw, 190px);
}
.ip-envelope.template-minimal-cream .ip-envelope__scenery .ip-scenery__floral--mirror {
  top: auto;
  bottom: 14%;
  left: 4%;
  transform: scaleX(-1);
}
.ip-envelope.template-garden-sage .ip-envelope__scenery .ip-scenery__watermark {
  opacity: 0.22;
  top: 48%;
}
.ip-envelope.template-tradition-red {
  background:
    radial-gradient(ellipse 90% 55% at 50% 20%, rgba(220, 160, 90, 0.15), transparent 55%),
    linear-gradient(165deg, #6b1512 0%, #3a0808 55%, #1f0404 100%);
}
.ip-envelope.template-minimal-cream {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.35), transparent 50%),
    linear-gradient(160deg, #5a0f14, #2d080c 75%);
}
.ip-envelope.template-garden-sage {
  background:
    radial-gradient(circle at 50% 30%, rgba(180, 210, 190, 0.2), transparent 48%),
    linear-gradient(160deg, #3f5646, #243328 72%);
}
.ip-envelope.template-classic-rose {
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 200, 210, 0.18), transparent 48%),
    linear-gradient(160deg, #8f3d4a, #4a1f28 72%);
}
.ip-envelope.is-opening { opacity: 0; visibility: hidden; pointer-events: none; }
.ip-envelope.is-opening .ip-envelope__card {
  animation: none;
  transform: scale(1.15);
  filter: blur(10px);
  opacity: 0;
}
.ip-envelope.is-gone { visibility: hidden; display: none; }
.ip-envelope__card {
  position: relative;
  z-index: 2;
  width: min(88vw, 360px); text-align: center; color: #fff;
  padding: 2.4rem 1.5rem; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.32);
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  animation: ipEnvIn 1.2s ease both;
  transition: transform .9s ease, filter .9s ease, opacity .9s ease;
}
@keyframes ipEnvIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.ip-envelope__to { margin: 0 0 .5rem; letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; opacity: .85; }
.ip-envelope__names { margin: 0 0 .75rem; font-family: var(--ip-font-script); font-size: clamp(2rem, 8vw, 2.8rem); font-weight: 700; }
.ip-envelope__hint { margin: 0 0 1.2rem; opacity: .8; font-size: .9rem; }
.ip-envelope__btn {
  border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.12);
  color: #fff; border-radius: 999px; padding: .7rem 1.4rem; font: inherit; font-weight: 600; cursor: pointer;
}
body.is-sealed {
  overflow: hidden;
  touch-action: none;
}
body.is-sealed .ip-scenery--public {
  visibility: hidden;
}
body.is-sealed .ip {
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body.is-opened {
  overflow-x: clip;
  height: auto;
}
body.is-opened .ip-scenery--public {
  visibility: visible;
}
body.is-opened .ip {
  visibility: visible;
  pointer-events: auto;
  position: relative;
  width: 100%;
  max-width: 720px;
  height: auto;
  overflow: visible;
  overflow-x: clip;
  clip: auto;
  white-space: normal;
  animation: ipRise .6s ease both;
}
.ip-guest-hello {
  margin: 0 0 .55rem; font-size: .95rem; opacity: .95;
  background: rgba(255,255,255,.14); display: inline-block; padding: .35rem .8rem; border-radius: 999px;
}

/* Templates — distinct chrome */
.template-classic-rose .ip-hero {
  background-color: #9e3f4d;
}
.template-tradition-red .ip-hero {
  background: linear-gradient(160deg, #8b1510, #4a0808) center/cover;
}
.template-tradition-red .ip-sec {
  border-radius: 6px;
  border-color: rgba(226, 196, 138, 0.65);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.template-tradition-red .ip-sec h2 {
  color: #9a1b12;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 1.35rem;
}
.template-tradition-red .ip-scenery__motif--blend {
  opacity: 0.48;
}
body.ip-body.template-tradition-red .ip-scenery__texture {
  opacity: 0.25;
  mix-blend-mode: soft-light;
}
.template-minimal-cream .ip-hero {
  background: linear-gradient(160deg, #d7c4ae, #8a6a4f) center/cover;
  min-height: 78vh;
}
.template-minimal-cream .ip-names { font-family: var(--ip-font-heading) !important; font-style: italic; }
.template-minimal-cream .ip-sec {
  box-shadow: 0 12px 32px rgba(80, 60, 40, 0.06);
  border-color: #e0d4c4;
  backdrop-filter: blur(4px);
}
.template-minimal-cream .ip-sec h2 {
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 1.25rem;
  color: #6b1a1a;
}
.template-garden-sage .ip-hero {
  background: linear-gradient(160deg, #7d9a84, #3f5646) center/cover;
}
.template-garden-sage .ip-sec {
  border-radius: 28px; border-color: #c9d9cc;
}
.template-garden-sage .ip-btn { background: #5f7a65; }

.ip-album button {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  position: absolute;
  inset: 0;
}

body.ip-lightbox-open { overflow: hidden; }

.ip-lightbox {
  --ip-lb-glass: rgba(255, 255, 255, 0.1);
  --ip-lb-glass-border: rgba(255, 255, 255, 0.16);
  --ip-lb-scrim: rgba(8, 8, 10, 0.82);
  --ip-lb-nav-gutter: 52px;
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding:
    max(.5rem, env(safe-area-inset-top))
    max(.5rem, env(safe-area-inset-right))
    max(.65rem, env(safe-area-inset-bottom))
    max(.5rem, env(safe-area-inset-left));
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif !important;
  overflow: hidden;
}
.ip-lightbox[hidden] { display: none !important; }
.ip-lightbox:not([hidden]) { display: flex; }

.ip-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.06), transparent 55%),
    var(--ip-lb-scrim);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  animation: ipLbFade .28s ease;
}

.ip-lightbox__chrome {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  max-width: min(1040px, 100%);
  width: 100%;
  margin: 0 auto;
  padding: .35rem .15rem .65rem;
  pointer-events: none;
}
.ip-lightbox__chrome > * { pointer-events: auto; }

.ip-lightbox__counter {
  margin: 0;
  padding: .45rem .85rem;
  font-size: .8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: var(--ip-lb-glass);
  border: 1px solid var(--ip-lb-glass-border);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
}

.ip-lightbox__tools {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem;
  border-radius: 999px;
  background: var(--ip-lb-glass);
  border: 1px solid var(--ip-lb-glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
}

.ip-lightbox__dialog {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  width: min(1040px, 100%);
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  margin: 0 auto;
  padding: 0 .25rem .25rem;
  animation: ipLbUp .32s cubic-bezier(.22, 1, .36, 1);
  box-sizing: border-box;
}

.ip-lightbox__stage {
  margin: 0;
  min-height: 0;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--ip-lb-nav-gutter);
  touch-action: pan-y pinch-zoom;
  box-sizing: border-box;
}

.ip-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: min(68vh, 780px);
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 6px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 28px 80px rgba(0, 0, 0, 0.55);
  cursor: zoom-in;
  transition: opacity .22s ease, transform .28s cubic-bezier(.22, 1, .36, 1), filter .22s ease;
  background: transparent;
  image-rendering: auto;
  -webkit-user-drag: none;
  user-select: none;
}
.ip-lightbox__img.is-loading {
  opacity: 0.4;
  filter: blur(2px);
}
.ip-lightbox__img.is-zoomed {
  cursor: zoom-out;
  transform: scale(1.5);
  max-height: min(78vh, 900px);
}

.ip-lightbox__nav,
.ip-lightbox__tool,
.ip-lightbox__thumb-scroll {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ip-lb-glass-border);
  background: var(--ip-lb-glass);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background .2s ease, border-color .2s ease, transform .2s ease, opacity .2s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.ip-lightbox__nav:hover,
.ip-lightbox__tool:hover,
.ip-lightbox__thumb-scroll:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}
.ip-lightbox__tool:active,
.ip-lightbox__thumb-scroll:active {
  transform: scale(0.96);
}
.ip-lightbox__nav:active {
  transform: translateY(-50%) scale(0.96);
}

.ip-lightbox__tool {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.ip-lightbox__tool:hover {
  background: rgba(255, 255, 255, 0.12);
}
.ip-lightbox__tool.ip-lightbox__fs {
  opacity: 0.9;
}
.ip-lightbox__icon {
  display: block;
  flex-shrink: 0;
}

.ip-lightbox__fs-icon {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 2px;
  box-sizing: border-box;
  position: relative;
}
.ip-lightbox__fs-icon::before,
.ip-lightbox__fs-icon::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  border: 2px solid currentColor;
}
.ip-lightbox__fs-icon::before {
  top: -4px;
  left: -4px;
  border-right: 0;
  border-bottom: 0;
}
.ip-lightbox__fs-icon::after {
  bottom: -4px;
  right: -4px;
  border-left: 0;
  border-top: 0;
}
.ip-lightbox.is-native-fs .ip-lightbox__fs-icon {
  border: none;
}
.ip-lightbox.is-native-fs .ip-lightbox__fs-icon::before,
.ip-lightbox.is-native-fs .ip-lightbox__fs-icon::after {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
}
.ip-lightbox.is-native-fs .ip-lightbox__fs-icon::before {
  margin: -5px 0 0 -5px;
  border-right: 0;
  border-bottom: 0;
}
.ip-lightbox.is-native-fs .ip-lightbox__fs-icon::after {
  margin: 5px 0 0 5px;
  border-left: 0;
  border-top: 0;
}

.ip-lightbox__nav {
  position: fixed;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.ip-lightbox__nav:hover { transform: translateY(-50%) scale(1.05); }
.ip-lightbox__nav--prev { left: max(8px, env(safe-area-inset-left)); }
.ip-lightbox__nav--next { right: max(8px, env(safe-area-inset-right)); }
.ip-lightbox__nav[hidden] { display: none !important; }

.ip-lightbox__hint {
  margin: 0;
  font-size: .72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  user-select: none;
}

.ip-lightbox__thumbs-shell {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .35rem;
  width: min(100%, 760px);
}
.ip-lightbox__thumbs-shell[hidden] { display: none !important; }

.ip-lightbox__thumbs-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  padding: .5rem .55rem;
  border-radius: 16px;
  background: rgba(12, 12, 14, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 40px rgba(0, 0, 0, 0.35);
}
.ip-lightbox__thumbs-wrap::before,
.ip-lightbox__thumbs-wrap::after {
  content: '';
  position: absolute;
  top: .35rem;
  bottom: .35rem;
  width: 28px;
  z-index: 2;
  pointer-events: none;
  border-radius: 12px;
}
.ip-lightbox__thumbs-wrap::before {
  left: .35rem;
  background: linear-gradient(90deg, rgba(12, 12, 14, 0.95), transparent);
}
.ip-lightbox__thumbs-wrap::after {
  right: .35rem;
  background: linear-gradient(270deg, rgba(12, 12, 14, 0.95), transparent);
}

.ip-lightbox__thumbs {
  display: flex;
  gap: .45rem;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: .15rem .2rem;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.ip-lightbox__thumbs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.ip-lightbox__thumbs.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
.ip-lightbox__thumbs[hidden] { display: none !important; }

.ip-lightbox__thumb-scroll {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.ip-lightbox__thumb-scroll[hidden] { display: none !important; }

.ip-lightbox__thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  opacity: 0.55;
  transform: scale(0.94);
  transition: opacity .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.ip-lightbox__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.ip-lightbox__thumb:hover { opacity: 0.85; }
.ip-lightbox__thumb.is-active {
  opacity: 1;
  transform: scale(1);
  border-color: color-mix(in srgb, var(--ip-accent, #c45c6a) 88%, #fff);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 20px color-mix(in srgb, var(--ip-accent, #c45c6a) 45%, transparent);
}

.ip-lightbox:fullscreen,
.ip-lightbox:-webkit-full-screen {
  padding: 0;
  background: #050506;
}
.ip-lightbox:fullscreen .ip-lightbox__backdrop,
.ip-lightbox:-webkit-full-screen .ip-lightbox__backdrop {
  background: #050506;
  backdrop-filter: none;
}
.ip-lightbox:fullscreen .ip-lightbox__dialog,
.ip-lightbox:-webkit-full-screen .ip-lightbox__dialog {
  width: 100%;
  height: 100%;
  max-height: none;
  padding-bottom: 1rem;
}
.ip-lightbox:fullscreen .ip-lightbox__img,
.ip-lightbox:-webkit-full-screen .ip-lightbox__img {
  max-height: calc(100vh - 140px);
  max-width: min(96vw, 1600px);
}

@keyframes ipLbFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ipLbUp {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .ip-lightbox__backdrop,
  .ip-lightbox__dialog,
  .ip-lightbox__img,
  .ip-lightbox__thumb {
    animation: none !important;
    transition: none !important;
  }
  .ip-lightbox__thumbs { scroll-behavior: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .ip-envelope, .ip-envelope__card, .ip-envelope__heart, body.is-opened .ip, .ip-hero__inner, .ip-sec, .ip-foot { animation: none !important; transition: none !important; }
  .ip-music.is-attention { animation: none !important; }
  .ip-sec, .ip-foot { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 640px) {
  .ip {
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }
  .ip {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .ip-hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-content: stretch;
    justify-content: flex-end;
    place-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    min-height: 100dvh;
    min-height: 100svh;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .ip-hero > .ip-hero__media,
  .ip-hero > .ip-hero__inner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-shrink: 0;
  }
  .ip-hero--has-cover {
    min-height: 0;
    justify-content: flex-start;
    padding-bottom: 0;
    background: #0c0908;
  }
  .ip-hero--has-cover .ip-hero__media {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    max-width: 100%;
    height: clamp(240px, 48dvh, 420px);
    flex: 0 0 auto;
    overflow: hidden;
    pointer-events: none;
  }
  .ip-hero--has-cover .ip-hero__photo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
  }
  .ip-hero--has-cover .ip-hero__media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(180deg, transparent 0%, rgba(8, 5, 6, 0.5) 50%, rgba(8, 5, 6, 0.88) 100%);
    pointer-events: none;
  }
  .ip-hero--has-cover .ip-hero__veil {
    display: none;
  }
  .ip-hero__veil {
    display: none;
  }
  .ip-hero__inner {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
  }
  .ip-hero__panel {
    padding:
      1.85rem 1.15rem
      max(1.1rem, calc(env(safe-area-inset-bottom) + 0.5rem));
    background: linear-gradient(
      180deg,
      rgba(12, 8, 10, 0) 0%,
      rgba(12, 8, 10, 0.55) 22%,
      rgba(12, 8, 10, 0.88) 55%,
      rgba(8, 5, 6, 0.94) 100%
    );
    border-radius: 26px 26px 0 0;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.22);
  }
  .ip-hero--has-cover .ip-hero__panel {
    border-radius: 20px 20px 0 0;
    padding-top: 1.35rem;
    margin-top: -0.75rem;
  }
  .ip-hero:not(.ip-hero--has-cover) {
    background-size: cover;
    background-position: center 28%;
  }
  .ip-hero:not(.ip-hero--has-cover) .ip-hero__veil {
    display: block;
    background: linear-gradient(
      180deg,
      rgba(12, 8, 8, 0.38) 0%,
      rgba(12, 8, 8, 0.06) 32%,
      rgba(12, 8, 8, 0.22) 58%,
      rgba(12, 8, 8, 0.62) 100%
    );
  }
  .ip-names {
    font-size: clamp(1.9rem, 8.5vw, 2.85rem);
    line-height: 1.1;
  }
  .ip-names__amp { margin: .08rem 0; }
  .ip-date { margin: .6rem 0 1rem; font-size: .9rem; letter-spacing: .14em; }
  .ip-kicker { font-size: .65rem; letter-spacing: .2em; margin-bottom: .5rem; opacity: .95; }
  .ip-guest-hello {
    font-size: .86rem;
    margin-bottom: .5rem;
    max-width: 100%;
    text-shadow: none;
  }
  .ip-sec {
    margin: .75rem .65rem;
    padding: 1.35rem 1.05rem;
    border-radius: 18px;
  }
  .ip-sec h2 { font-size: 1.35rem; }
  .ip-lead { font-size: .98rem; line-height: 1.7; }
  .ip-parents, .ip-events-grid { grid-template-columns: 1fr; }
  .ip-countdown__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
  }
  .ip-timeline li { grid-template-columns: 58px 1fr; gap: .55rem; }
  .ip-album { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
  .ip-scenery__motif {
    display: none;
  }
  .ip-scenery__watermark {
    width: min(70vw, 260px);
    opacity: 0.07;
    top: 32%;
  }
  .ip-scenery__floral {
    width: min(24vw, 96px);
    opacity: 0.55;
    top: 38%;
  }
  body.is-opened .ip-scenery__floral {
    opacity: 0.42;
  }
  .ip-lightbox {
    --ip-lb-nav-gutter: 46px;
    padding:
      max(.35rem, env(safe-area-inset-top))
      max(.25rem, env(safe-area-inset-right))
      max(.45rem, env(safe-area-inset-bottom))
      max(.25rem, env(safe-area-inset-left));
  }
  .ip-lightbox__chrome {
    flex-shrink: 0;
    padding: .2rem 0 .45rem;
  }
  .ip-lightbox__dialog {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    padding: 0;
    gap: .5rem;
    justify-content: flex-end;
  }
  .ip-lightbox__stage {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 var(--ip-lb-nav-gutter);
    align-self: stretch;
  }
  .ip-lightbox__img {
    max-width: 100%;
    max-height: min(
      calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 11.5rem),
      72dvh
    );
    border-radius: 4px;
  }
  .ip-lightbox__img.is-zoomed {
    transform: scale(1.15);
    max-height: min(
      calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 9rem),
      78dvh
    );
  }
  .ip-lightbox__nav {
    width: 40px;
    height: 40px;
    top: 50%;
    opacity: .94;
  }
  .ip-lightbox__nav--prev { left: max(2px, env(safe-area-inset-left)); }
  .ip-lightbox__nav--next { right: max(2px, env(safe-area-inset-right)); }
  .ip-lightbox__nav .ip-lightbox__icon { width: 22px; height: 22px; }
  .ip-lightbox__thumb { width: 44px; height: 44px; flex: 0 0 44px; }
  .ip-lightbox__thumbs-shell {
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    padding: 0 .15rem;
    box-sizing: border-box;
  }
  .ip-lightbox__thumbs-wrap {
    padding: .4rem .45rem;
    border-radius: 14px;
  }
  .ip-lightbox__thumb-scroll { display: none !important; }
  .ip-lightbox__hint { display: none; }
  .ip-lightbox__counter { font-size: .7rem; padding: .38rem .65rem; }
  .ip-form input, .ip-form select, .ip-form textarea { font-size: 16px; }
  .ip-envelope__card {
    width: min(92vw, 360px);
    padding: 2rem 1.25rem max(2rem, env(safe-area-inset-bottom));
  }
  .ip-envelope__btn { min-height: 48px; padding: .75rem 1.5rem; font-size: 1rem; }
  .ip-envelope__scenery .ip-scenery__motif {
    display: block;
    max-height: min(36vh, 220px);
    opacity: 0.28;
  }
  .ip-envelope__scenery .ip-scenery__motif--left { left: -12vw; }
  .ip-envelope__scenery .ip-scenery__motif--right { right: -12vw; }
  .ip-envelope__scenery .ip-scenery__motif--blend { opacity: 0.32; }
  .ip-envelope__scenery .ip-scenery__watermark {
    opacity: 0.08;
    width: min(76vw, 280px);
  }
  .ip-envelope .ip-envelope__scenery .ip-scenery__floral:not(.ip-scenery__floral--mirror),
  .ip-envelope .ip-envelope__scenery .ip-scenery__floral--mirror {
    width: min(30vw, 110px);
  }
  .ip-scroll {
    width: 100%;
    max-width: 22rem;
    margin: .15rem auto 0;
    min-height: 48px;
    padding: .7rem 1.35rem;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .03em;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.55);
  }
  @media (max-width: 640px) and (max-height: 520px) {
    .ip-hero__panel { padding-top: 1.1rem; }
    .ip-names { font-size: clamp(1.55rem, 7vw, 2.1rem); }
    .ip-date { margin-bottom: .75rem; }
  }
  .ip-music {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: .55rem .85rem;
    max-width: calc(100vw - 20px);
  }
  .ip-music__label { max-width: 7.5rem; font-size: .88rem; }
  .ip-lang { top: max(.75rem, env(safe-area-inset-top)); right: max(.75rem, env(safe-area-inset-right)); }
  .ip-foot { padding-bottom: max(3rem, env(safe-area-inset-bottom)); }
}

/* Kit + Studio layout tokens & section skins */
body.ip-body.layout-kit {
  background-color: var(--ip-paper, #faf5f0);
  color: var(--ip-ink, inherit);
}
body.ip-body.layout-kit .ip-sec--skin-soft-card {
  margin-left: auto;
  margin-right: auto;
  max-width: 36rem;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 1rem;
  padding: 1.25rem 1.1rem;
  box-shadow: 0 8px 28px rgba(40, 20, 20, 0.06);
}
body.ip-body.layout-kit .ip-sec--skin-tradition-card {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(155, 28, 28, 0.15);
  border-radius: .75rem;
  background: linear-gradient(180deg, rgba(255, 252, 250, 0.92), rgba(245, 230, 228, 0.85));
}
body.ip-body.layout-kit .ip-sec--skin-minimal-line .ip-event__card,
body.ip-body.layout-kit .ip-sec--skin-minimal-line {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
body.ip-body .ip-sec,
body.ip-body .ip-foot {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1s ease, transform 1s ease;
}
body.ip-body .ip-sec[data-ip-reveal="left"],
body.ip-body .ip-foot[data-ip-reveal="left"] { transform: translateX(-40px); }
body.ip-body .ip-sec[data-ip-reveal="right"],
body.ip-body .ip-foot[data-ip-reveal="right"] { transform: translateX(40px); }
body.ip-body .ip-sec.is-revealed,
body.ip-body .ip-foot.is-revealed {
  opacity: 1;
  transform: none;
}
.ip-hero__panel--framed:not(:has(> :not([hidden]))) {
  display: none;
}
.ip-btn:focus-visible,
.ip-envelope__btn:focus-visible,
.ip-scroll:focus-visible,
.ip-music:focus-visible,
.ip-lang__btn:focus-visible {
  outline: 2px solid var(--ip-accent, #c45c6a);
  outline-offset: 3px;
}

/* Minimal Red Wine Skin */
body.ip-body.layout-kit .ip-sec--skin-minimal-wine-card {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(109, 16, 29, 0.12);
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(251, 247, 242, 0.95));
  box-shadow: 0 12px 36px rgba(109, 16, 29, 0.05);
  padding: 1.5rem 1.25rem;
}

/* Calendar Widget */
.ip-calendar-widget {
  margin: 1.5rem auto 1.25rem;
  max-width: 22rem;
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1.25rem 1rem 1rem;
  box-shadow: 0 8px 30px rgba(50, 20, 25, 0.07);
  border: 1px solid rgba(109, 16, 29, 0.1);
  text-align: center;
}
.ip-calendar-widget__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1rem;
}
.ip-calendar-widget__icon {
  font-size: 1.15rem;
}
.ip-calendar-widget__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ip-accent, #6d101d);
  font-family: var(--ip-font-heading, inherit);
  text-transform: capitalize;
}
.ip-calendar-widget__grid {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.ip-calendar-widget__row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .25rem;
}
.ip-calendar-widget__row--head {
  font-size: .8rem;
  font-weight: 700;
  color: var(--ip-muted, #8a7873);
  padding-bottom: .35rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.ip-calendar-widget__cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  font-size: .88rem;
  font-weight: 500;
  color: var(--ip-ink, #2b1014);
  border-radius: 50%;
  transition: all .2s ease;
}
.ip-calendar-widget__cell--empty {
  visibility: hidden;
}
.ip-calendar-widget__cell.is-wedding {
  background: var(--ip-accent, #6d101d);
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(109, 16, 29, 0.35);
  animation: ipHeartBeat 2s infinite ease-in-out;
}
.ip-calendar-widget__heart {
  position: absolute;
  top: -6px;
  right: -4px;
  font-size: .75rem;
  color: #ff3b56;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
@keyframes ipHeartBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.ip-calendar-widget__action {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px dashed rgba(109, 16, 29, 0.15);
}
.ip-btn--calendar {
  width: 100%;
  font-size: .88rem;
  padding: .6rem 1rem;
  gap: .5rem;
  box-shadow: 0 4px 12px rgba(109, 16, 29, 0.18);
}

/* 3D Coverflow Album */
.ip-album-swiper-wrap {
  width: 100%;
  padding: 1.5rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}
.ip-album-swiper {
  width: 100%;
  padding-top: 10px;
  padding-bottom: 30px;
}
.ip-album-swiper .swiper-slide {
  background-position: center;
  background-size: cover;
  width: 260px;
  max-width: 75vw;
  height: 360px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.22);
}
.ip-album-swiper__item {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.ip-album-swiper__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  pointer-events: none;
}
.ip-album-pagination .swiper-pagination-bullet {
  background: var(--ip-accent, #6d101d);
  opacity: 0.4;
  transition: opacity .2s, transform .2s;
}
.ip-album-pagination .swiper-pagination-bullet-active {
  opacity: 1;
  transform: scale(1.25);
}
.ip-album-prev,
.ip-album-next {
  color: var(--ip-accent, #6d101d) !important;
  transform: scale(0.7);
  width: 52px !important;
  height: 52px !important;
  margin-top: -26px !important;
}
.ip-map__directions { min-height: 44px; padding-left: 1rem; padding-right: 1rem; }
/* When swiper is active, hide standard grid */
.ip-album-swiper-wrap + .ip-album--grid {
  display: none;
}

/* ===== Block variants & content blocks ===== */
.ip-parents--stacked { grid-template-columns: 1fr; gap: .75rem; }

.ip-sec--v-minimal .ip-countdown__grid div { background: transparent; padding: .35rem .2rem; border-right: 1px solid rgba(0,0,0,.08); border-radius: 0; }
.ip-sec--v-minimal .ip-countdown__grid div:last-child { border-right: 0; }
.ip-sec--v-minimal .ip-countdown__grid strong { font-size: 2rem; }
.ip-sec--v-circle .ip-countdown__grid div {
  background: transparent; border: 2px solid var(--ip-accent); border-radius: 50%;
  aspect-ratio: 1; display: grid; place-content: center; padding: .2rem;
}
.ip-sec--v-circle .ip-countdown__grid strong { font-size: 1.35rem; line-height: 1; }

.ip-sec--v-quote .ip-story { position: relative; padding: 1.4rem .4rem 0; font-size: 1.05rem; }
.ip-sec--v-quote .ip-story::before {
  content: "\201C"; position: absolute; top: -.6rem; left: 50%; transform: translateX(-50%);
  font: 700 3.2rem/1 var(--ip-font-heading); color: var(--ip-accent); opacity: .45;
}

.ip-album--polaroid { gap: 1rem .8rem; padding: .4rem; }
.ip-album--polaroid figure {
  aspect-ratio: auto; background: #fff; padding: 8px 8px 26px; border-radius: 4px; overflow: visible;
  box-shadow: 0 8px 20px rgba(52, 36, 28, .14);
}
.ip-album--polaroid figure:nth-child(odd) { transform: rotate(-2.2deg); }
.ip-album--polaroid figure:nth-child(even) { transform: rotate(2deg); }
.ip-album--polaroid figure button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.ip-album--polaroid img { aspect-ratio: 1; border-radius: 2px; }
.ip-album--grid figure button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }

.ip-timeline--cards { grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; padding-bottom: .4rem; scroll-snap-type: x mandatory; }
.ip-timeline--cards li {
  grid-template-columns: 1fr; text-align: center; gap: .35rem; padding: 1rem .8rem; border-radius: 14px;
  background: #f8f1ea; scroll-snap-align: start;
}
.ip-timeline--cards time { font-size: 1.25rem; padding: 0; }

.ip-text-block .ip-lead { white-space: pre-wrap; }
.ip-sec--v-left.ip-text-block h2,
.ip-sec--v-left.ip-text-block .ip-lead { text-align: left; }
.ip-sec--v-card.ip-text-block {
  background: color-mix(in srgb, var(--ip-accent) 9%, #fff) !important;
  border-color: color-mix(in srgb, var(--ip-accent) 22%, #fff) !important;
}

.ip-quote { margin: 0; text-align: center; }
.ip-quote p {
  margin: 0; font: italic 600 1.25rem/1.6 var(--ip-font-heading); color: var(--ip-ink); white-space: pre-wrap;
}
.ip-quote p::before { content: "\201C"; display: block; font-size: 2.6rem; line-height: .8; color: var(--ip-accent); opacity: .5; }
.ip-quote cite { display: block; margin-top: .7rem; font-style: normal; color: var(--ip-muted); font-size: .9rem; }
.ip-sec--v-script .ip-quote p { font: 400 1.7rem/1.45 var(--ip-font-script); }

.ip-image-block { padding: .9rem; }
.ip-image { margin: 0; text-align: center; }
.ip-image img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: cover; }
.ip-image figcaption { margin-top: .65rem; color: var(--ip-muted); font-size: .92rem; font-style: italic; }
.ip-image--rounded img { border-radius: 18px; }
.ip-image--arch img { border-radius: 999px 999px 18px 18px; max-width: 360px; margin: 0 auto; aspect-ratio: 3 / 4; }
.ip-image--polaroid { background: #fff; padding: 10px 10px 18px; max-width: 380px; margin: 0 auto; box-shadow: 0 12px 28px rgba(52, 36, 28, .16); transform: rotate(-1.5deg); }
.ip-sec--v-full.ip-image-block { padding: 0; overflow: hidden; background: transparent !important; border: 0 !important; box-shadow: none !important; margin-left: 0 !important; margin-right: 0 !important; max-width: none !important; }
.ip-sec--v-full .ip-image figcaption { padding: 0 1rem .4rem; }

.ip-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #1c1917; }
.ip-video--vertical { aspect-ratio: 9 / 16; max-width: 340px; margin: 0 auto; }
.ip-video iframe, .ip-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

.ip-button-block__row { margin: 1rem 0 0; text-align: center; }
.ip-button-block .ip-btn { white-space: nowrap !important; min-height: 44px; }
.ip-btn--outline { background: transparent; color: var(--ip-accent); box-shadow: inset 0 0 0 1.5px var(--ip-accent); }

.ip-divider { display: flex; align-items: center; justify-content: center; gap: .9rem; margin: .6rem auto; max-width: 30rem; padding: 0 1.25rem; color: var(--ip-accent); }
.ip-divider::before, .ip-divider::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .35; }
.ip-divider span { font-size: 1.3rem; letter-spacing: .25em; opacity: .85; }
.ip-divider--line span { display: none; }
.ip-divider--line::after { display: none; }
.ip-divider--hearts span, .ip-divider--dots span { font-size: .95rem; }

.ip-spacer--s { height: 1rem; }
.ip-spacer--m { height: 2.5rem; }
.ip-spacer--l { height: 5rem; }

@media (max-width: 480px) {
  .ip-quote p { font-size: 1.1rem; }
}

