:root {
  --paper: #f6f1e8;
  --paper-deep: #ece3d5;
  --ink: #26231f;
  --muted: #716a61;
  --red: #a9443a;
  --red-deep: #79332f;
  --gold: #c7a86b;
  --sage: #68766a;
  --line: rgba(38, 35, 31, 0.18);
  --line-light: rgba(246, 241, 232, 0.24);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
body.is-locked { overflow: hidden; }
body { overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

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

.falling-petals { position: fixed; inset: 0; z-index: 15; overflow: hidden; pointer-events: none; }
.falling-petals span { position: absolute; top: -14vh; width: var(--petal-size); height: calc(var(--petal-size) * 0.72); border-radius: 82% 0 82% 0; background: var(--petal-color); opacity: var(--petal-opacity); animation: petal-fall var(--petal-duration) linear var(--petal-delay) infinite; }
.falling-petals span:nth-child(1) { left: 3%; --petal-size: 9px; --petal-color: var(--red); --petal-opacity: .5; --petal-duration: 16s; --petal-delay: -12s; --petal-drift-mid: 44px; --petal-drift-end: -16px; }
.falling-petals span:nth-child(2) { left: 11%; --petal-size: 6px; --petal-color: var(--gold); --petal-opacity: .58; --petal-duration: 19s; --petal-delay: -4s; --petal-drift-mid: -30px; --petal-drift-end: 28px; }
.falling-petals span:nth-child(3) { left: 19%; --petal-size: 11px; --petal-color: var(--red); --petal-opacity: .34; --petal-duration: 22s; --petal-delay: -17s; --petal-drift-mid: 34px; --petal-drift-end: -42px; }
.falling-petals span:nth-child(4) { left: 27%; --petal-size: 7px; --petal-color: var(--gold); --petal-opacity: .5; --petal-duration: 17s; --petal-delay: -9s; --petal-drift-mid: -42px; --petal-drift-end: 16px; }
.falling-petals span:nth-child(5) { left: 36%; --petal-size: 10px; --petal-color: var(--red); --petal-opacity: .42; --petal-duration: 21s; --petal-delay: -14s; --petal-drift-mid: 26px; --petal-drift-end: -30px; }
.falling-petals span:nth-child(6) { left: 44%; --petal-size: 6px; --petal-color: var(--gold); --petal-opacity: .62; --petal-duration: 18s; --petal-delay: -6s; --petal-drift-mid: -24px; --petal-drift-end: 34px; }
.falling-petals span:nth-child(7) { left: 51%; --petal-size: 8px; --petal-color: var(--red); --petal-opacity: .4; --petal-duration: 20s; --petal-delay: -19s; --petal-drift-mid: 45px; --petal-drift-end: -8px; }
.falling-petals span:nth-child(8) { left: 59%; --petal-size: 12px; --petal-color: var(--gold); --petal-opacity: .36; --petal-duration: 24s; --petal-delay: -8s; --petal-drift-mid: -32px; --petal-drift-end: 26px; }
.falling-petals span:nth-child(9) { left: 67%; --petal-size: 7px; --petal-color: var(--red); --petal-opacity: .52; --petal-duration: 18s; --petal-delay: -15s; --petal-drift-mid: 32px; --petal-drift-end: -34px; }
.falling-petals span:nth-child(10) { left: 74%; --petal-size: 9px; --petal-color: var(--gold); --petal-opacity: .46; --petal-duration: 21s; --petal-delay: -3s; --petal-drift-mid: -45px; --petal-drift-end: 18px; }
.falling-petals span:nth-child(11) { left: 81%; --petal-size: 6px; --petal-color: var(--red); --petal-opacity: .48; --petal-duration: 16s; --petal-delay: -10s; --petal-drift-mid: 26px; --petal-drift-end: -22px; }
.falling-petals span:nth-child(12) { left: 88%; --petal-size: 11px; --petal-color: var(--gold); --petal-opacity: .34; --petal-duration: 23s; --petal-delay: -20s; --petal-drift-mid: -30px; --petal-drift-end: 40px; }
.falling-petals span:nth-child(13) { left: 94%; --petal-size: 8px; --petal-color: var(--red); --petal-opacity: .44; --petal-duration: 19s; --petal-delay: -7s; --petal-drift-mid: 34px; --petal-drift-end: -18px; }
.falling-petals span:nth-child(14) { left: 7%; --petal-size: 5px; --petal-color: var(--gold); --petal-opacity: .55; --petal-duration: 14s; --petal-delay: -2s; --petal-drift-mid: -18px; --petal-drift-end: 20px; }
.falling-petals span:nth-child(15) { left: 63%; --petal-size: 5px; --petal-color: var(--red); --petal-opacity: .46; --petal-duration: 15s; --petal-delay: -11s; --petal-drift-mid: 18px; --petal-drift-end: -20px; }
.falling-petals span:nth-child(16) { left: 48%; --petal-size: 7px; --petal-color: var(--gold); --petal-opacity: .43; --petal-duration: 20s; --petal-delay: -16s; --petal-drift-mid: -28px; --petal-drift-end: 24px; }

.cover {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 50;
  overflow: hidden;
  background: var(--red-deep);
  color: var(--paper);
  transition: opacity 800ms ease, visibility 800ms ease;
}
.cover::before, .cover::after {
  content: "";
  position: absolute;
  width: min(44vw, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(199, 168, 107, 0.45);
  transform: rotate(45deg);
}
.cover::before { top: -34%; left: -17%; }
.cover::after { right: -17%; bottom: -34%; }
.cover.is-open { opacity: 0; visibility: hidden; pointer-events: none; }
.cover__content { position: relative; z-index: 1; width: min(92vw, 540px); text-align: center; }
.eyebrow { margin: 0; color: var(--red); font-size: 0.67rem; letter-spacing: 0.26em; text-transform: uppercase; }
.cover .eyebrow { color: var(--gold); }
.seal, .footer-seal, .brand-mark__seal { display: grid; place-items: center; font-family: var(--serif); }
.seal {
  width: 78px;
  height: 78px;
  margin: 24px auto 20px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 2.35rem;
  transform: rotate(-3deg);
}
.cover__date { margin: 0; color: rgba(246, 241, 232, 0.7); font-size: 0.85rem; letter-spacing: 0.18em; }
.cover h1 { margin: 18px 0 12px; font-family: var(--serif); font-size: clamp(2.3rem, 7vw, 4rem); font-weight: 500; letter-spacing: 0.12em; }
.cover h1 span, .hero h2 span { color: var(--gold); font-family: var(--sans); font-weight: 300; }
.cover__hint { margin: 0 auto 34px; color: rgba(246, 241, 232, 0.75); font-family: var(--serif); font-size: 0.96rem; letter-spacing: 0.08em; }
.cover__button { min-width: 180px; }
.cover__location { position: absolute; bottom: 30px; left: 50%; margin: 0; color: rgba(246, 241, 232, 0.62); font-size: 0.72rem; letter-spacing: 0.2em; transform: translateX(-50%); }
.cover__ornament { position: absolute; color: var(--gold); font-size: 2rem; font-weight: 200; }
.cover__ornament--top { top: 9%; right: 13%; }
.cover__ornament--bottom { bottom: 9%; left: 13%; }

.site-header { position: absolute; top: 0; right: 0; left: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 22px clamp(22px, 5vw, 72px); }
.brand-mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0.08em; }
.brand-mark i { color: var(--gold); font-family: var(--sans); font-style: normal; font-size: 0.74rem; }
.language-switch { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.language-button { min-height: 27px; padding: 0 9px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 0.64rem; letter-spacing: 0.04em; }
.language-button.is-active { background: var(--ink); color: var(--paper); }
.language-button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.brand-mark__seal { width: 28px; height: 28px; border: 1px solid var(--red); color: var(--red); font-size: 1rem; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 30px); margin-left: auto; margin-right: clamp(18px, 3vw, 42px); }
.site-nav a { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.14em; transition: color 220ms ease; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--red); }
.header-actions { display: flex; gap: 10px; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); transition: background 220ms ease, color 220ms ease, border-color 220ms ease, transform 220ms ease; }
.icon-button:hover, .icon-button:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: translateY(-2px); }
.music-icon--on { display: none; }
.icon-button.is-playing .music-icon--off { display: none; }
.icon-button.is-playing .music-icon--on { display: inline; animation: pulse 1.2s ease-in-out infinite; }

.section { width: min(1180px, calc(100% - 44px)); margin: 0 auto; padding: clamp(92px, 12vw, 160px) 0; }
.section--wide { width: 100%; padding-right: max(22px, calc((100% - 1180px) / 2)); padding-left: max(22px, calc((100% - 1180px) / 2)); }
.hero { min-height: 840px; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(42px, 7vw, 110px); padding-top: 150px; }
.hero__copy { max-width: 470px; }
.hero__label { margin: 34px 0 14px; color: var(--sage); font-size: 0.9rem; letter-spacing: 0.15em; }
.hero h2 { margin: 0; font-family: var(--serif); font-size: 1rem; font-weight: 500; line-height: 1; letter-spacing: 0; }
.hero h2 span { display: block; }
.hero h2 #heroGroom, .hero h2 #heroBride { width: fit-content; max-width: 100%; white-space: nowrap; font-size: clamp(2.7rem, 4.3vw, 3.95rem); line-height: 1.12; letter-spacing: 0.035em; }
.hero h2 #heroJoin { margin: 0.12em 0; font-size: clamp(1.5rem, 2vw, 2rem); line-height: .9; letter-spacing: 0; }
.hero__lead { max-width: 330px; margin: 32px 0 0; color: var(--muted); font-family: var(--serif); font-size: 1.1rem; line-height: 1.9; }
.hero__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.hero__meta > div { display: grid; gap: 6px; }
.meta-label { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.15em; }
.hero__meta strong { font-size: 0.92rem; font-weight: 500; letter-spacing: 0.08em; }
.text-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 42px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); font-size: 0.82rem; letter-spacing: 0.08em; transition: gap 220ms ease; }
.text-link:hover, .text-link:focus-visible { gap: 16px; }
.hero__visual { position: relative; min-height: 620px; }
.hero__image-wrap { position: absolute; top: 4%; right: 5%; bottom: 6%; left: 9%; overflow: hidden; background: var(--paper-deep); }
.hero__image-wrap::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(246, 241, 232, 0.4); box-shadow: inset 0 0 0 12px rgba(246, 241, 232, 0.08); pointer-events: none; }
.hero__image-wrap img { position: absolute; left: 50%; top: 50%; width: auto; height: auto; min-width: 100%; min-height: 100%; max-width: none; max-height: none; transform: translate(-50%, -50%); filter: saturate(0.83) sepia(0.08); }
.hero__stamp { position: absolute; bottom: 9%; left: 0; display: grid; place-items: center; width: 82px; height: 150px; border: 1px solid var(--red); color: var(--red); font-family: var(--serif); font-size: 1.15rem; line-height: 1.55; letter-spacing: 0.2em; }
.hero__caption { position: absolute; right: -6px; top: 19%; margin: 0; color: var(--muted); font-family: var(--serif); font-size: 0.78rem; letter-spacing: 0.2em; writing-mode: vertical-rl; }
#promise-title, #countdown-title, #contact-title, #heroStamp, #introQuote { white-space: pre-line; }

.intro-band { display: grid; grid-template-columns: minmax(40px, 1fr) auto minmax(40px, 1fr); align-items: center; gap: 26px; padding-top: 36px; padding-bottom: 36px; }
.intro-band p { margin: 0; color: var(--red); font-family: var(--serif); font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.9; letter-spacing: 0.08em; text-align: center; }
.intro-band__line { height: 1px; background: var(--line); }
.mobile-only { display: none; }
.section-heading { max-width: 590px; margin-bottom: 65px; }
.section-heading h2 { margin: 18px 0 14px; font-family: var(--serif); font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 500; letter-spacing: 0.08em; }
.section-heading > p:last-child { margin: 0; color: var(--muted); font-family: var(--serif); line-height: 1.8; }

.story__timeline { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px; }
.story__timeline::before { content: ""; position: absolute; top: 28px; right: 9%; left: 9%; height: 1px; background: var(--line); }
.story-card { position: relative; padding-top: 70px; }
.story-card::before { content: ""; position: absolute; top: 21px; left: 0; width: 14px; height: 14px; border: 1px solid var(--red); background: var(--paper); transform: rotate(45deg); }
.story-card__number { position: absolute; top: 0; left: 28px; color: var(--red); font-size: 0.68rem; letter-spacing: 0.16em; }
.story-card__date { margin: 0 0 13px; color: var(--sage); font-size: 0.72rem; letter-spacing: 0.18em; }
.story-card h3 { margin: 0 0 16px; font-family: var(--serif); font-size: 1.55rem; font-weight: 500; letter-spacing: 0.06em; }
.story-card > p:last-child { max-width: 280px; margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.9; }

.promise { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr); align-items: center; gap: clamp(42px, 8vw, 120px); background: var(--paper-deep); }
.promise__image { position: relative; min-height: 560px; overflow: hidden; background: var(--paper-deep); }
.promise__image img { position: absolute; left: 50%; top: 50%; width: auto; height: auto; min-width: 100%; min-height: 100%; max-width: none; max-height: none; transform: translate(-50%, -50%); filter: saturate(0.82); }
.promise__copy { max-width: 480px; padding-right: max(0px, calc((100vw - 1180px) / 2)); }
.promise__copy h2 { margin: 18px 0 20px; font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 4.6rem); font-weight: 500; line-height: 1.24; letter-spacing: 0.08em; }
.promise__copy > p:not(.eyebrow) { margin: 0; color: var(--muted); font-family: var(--serif); line-height: 2; }
.promise__signature { display: inline-block; margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--red); font-family: var(--serif); font-size: 0.92rem; letter-spacing: 0.08em; }

.details-band { position: relative; overflow: hidden; background: var(--red-deep); color: var(--paper); }
.details-band::before, .details-band::after { content: ""; position: absolute; width: 260px; height: 260px; border: 1px solid rgba(199, 168, 107, 0.28); transform: rotate(45deg); }
.details-band::before { top: -180px; right: -90px; }
.details-band::after { bottom: -180px; left: -90px; }
.section-heading--light { position: relative; z-index: 1; }
.section-heading--light .eyebrow { color: var(--gold); }
.section-heading--light h2 { color: var(--paper); }
.section-heading--light > p:last-child { color: rgba(246, 241, 232, 0.7); }
.details-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light); }
.detail-item { min-height: 250px; padding: 28px 36px 30px 0; border-right: 1px solid var(--line-light); }
.detail-item + .detail-item { padding-left: 36px; }
.detail-item:last-child { border-right: 0; }
.detail-item__index { display: block; margin-bottom: 30px; color: var(--gold); font-size: 0.72rem; letter-spacing: 0.18em; }
.detail-item__label { display: block; margin-bottom: 10px; color: rgba(246, 241, 232, 0.6); font-size: 0.72rem; letter-spacing: 0.18em; }
.detail-item strong { display: block; color: var(--paper); font-family: var(--serif); font-size: clamp(1.9rem, 3vw, 2.7rem); font-weight: 500; letter-spacing: 0.04em; }
.detail-item p { margin: 20px 0 0; color: rgba(246, 241, 232, 0.72); font-size: 0.88rem; line-height: 1.8; }
.details-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 30px; margin-top: 42px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 48px; padding: 0 23px; border: 1px solid transparent; font-size: 0.78rem; letter-spacing: 0.12em; transition: transform 220ms ease, background 220ms ease, color 220ms ease, border-color 220ms ease; }
.button:hover, .button:focus-visible { transform: translateY(-2px); }
.button--primary { background: var(--gold); color: var(--red-deep); }
.button--primary:hover, .button--primary:focus-visible { background: var(--paper); }
.button--outline-light { border-color: rgba(246, 241, 232, 0.52); color: var(--paper); background: transparent; }
.button--outline-light:hover, .button--outline-light:focus-visible { border-color: var(--paper); background: var(--paper); color: var(--red-deep); }
.text-link--light { margin-top: 0; border-color: rgba(246, 241, 232, 0.5); color: var(--paper); }

.schedule-list { border-top: 1px solid var(--line); }
.schedule-item { display: grid; grid-template-columns: 160px 1fr; gap: 34px; align-items: baseline; padding: 28px 0; border-bottom: 1px solid var(--line); }
.schedule-item time { color: var(--red); font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: 0.04em; }
.schedule-item strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; letter-spacing: 0.06em; }
.schedule-item p { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.8; }

.countdown { display: grid; grid-template-columns: minmax(220px, 0.75fr) 1.25fr; align-items: center; gap: 70px; }
.countdown__intro h2 { margin: 18px 0 0; font-family: var(--serif); font-size: clamp(2.1rem, 4vw, 3.3rem); font-weight: 500; line-height: 1.35; letter-spacing: 0.08em; }
.countdown__clock { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: clamp(8px, 2.2vw, 28px); }
.countdown-unit { display: grid; gap: 10px; text-align: center; }
.countdown-unit strong { font-family: var(--serif); font-size: clamp(2.7rem, 6vw, 5.2rem); font-weight: 500; line-height: 1; }
.countdown-unit span { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.18em; }
.countdown-divider { color: var(--gold); font-family: var(--serif); font-size: 2rem; transform: translateY(-10px); }

.gallery-section { padding-bottom: 130px; }
.gallery-grid { display: block; }
.gallery-showcase { display: grid; gap: 24px; }
.gallery-stage { display: grid; grid-template-columns: minmax(105px, 0.25fr) minmax(320px, 1fr) minmax(105px, 0.25fr); align-items: center; gap: clamp(14px, 2.8vw, 38px); }
.gallery-main-shell { position: relative; display: grid; place-items: center; min-width: 0; }
.gallery-feature { position: relative; display: block; width: min(100%, 520px); aspect-ratio: 2 / 3; overflow: hidden; padding: 0; border: 1px solid rgba(199, 168, 107, 0.72); background: var(--paper-deep); box-shadow: 0 18px 44px rgba(38, 35, 31, 0.12); text-align: left; cursor: zoom-in; }
.gallery-feature img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; object-position: center; padding: clamp(10px, 1.5vw, 18px); filter: saturate(0.9); transition: filter 420ms ease, opacity 320ms ease; }
.gallery-feature img.visual-crop-applied { padding: 0; }
.gallery-feature:hover img, .gallery-feature:focus-visible img { filter: saturate(1); }
.gallery-feature__veil { position: absolute; right: 0; bottom: 0; left: 0; z-index: 1; height: 34%; background: linear-gradient(180deg, rgba(38, 35, 31, 0), rgba(38, 35, 31, 0.72)); pointer-events: none; }
.gallery-feature__meta { position: absolute; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 28px); left: clamp(16px, 3vw, 32px); z-index: 2; display: flex; align-items: end; justify-content: space-between; gap: 20px; color: #fff; }
.gallery-feature__caption { max-width: 70%; font-family: var(--serif); font-size: clamp(1.05rem, 2vw, 1.65rem); letter-spacing: 0.08em; }
.gallery-feature__count { color: rgba(255, 255, 255, 0.8); font-size: 0.7rem; letter-spacing: 0.16em; white-space: nowrap; }
.gallery-stage__nav { position: absolute; top: 50%; z-index: 4; width: 38px; height: 38px; border-color: rgba(38, 35, 31, 0.2); background: rgba(246, 241, 232, 0.88); color: var(--ink); transform: translateY(-50%); }
.gallery-stage__nav:hover, .gallery-stage__nav:focus-visible { border-color: var(--red); background: var(--red); color: var(--paper); transform: translateY(-50%); }
.gallery-stage__nav--prev { left: 14px; }
.gallery-stage__nav--next { right: 14px; }
.gallery-stage__nav { font-size: 0; }
.gallery-stage__nav::before { width: 9px; height: 9px; border-top: 1.8px solid currentColor; border-right: 1.8px solid currentColor; content: ""; }
.gallery-stage__nav--prev::before { margin-left: 3px; transform: rotate(-135deg); }
.gallery-stage__nav--next::before { margin-right: 3px; transform: rotate(45deg); }
.gallery-preview { position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; overflow: hidden; padding: 0; border: 1px solid rgba(38, 35, 31, 0.14); background: var(--paper-deep); box-shadow: 0 10px 24px rgba(38, 35, 31, 0.08); text-align: left; opacity: 0.64; transition: opacity 280ms ease, transform 280ms ease, border-color 280ms ease; }
.gallery-preview:hover, .gallery-preview:focus-visible { border-color: var(--gold); opacity: 1; transform: translateY(-5px); }
.gallery-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; filter: saturate(0.7); transition: filter 280ms ease; }
.gallery-preview:hover img, .gallery-preview:focus-visible img { filter: saturate(1); }
.gallery-preview__veil { position: absolute; right: 0; bottom: 0; left: 0; height: 34%; background: linear-gradient(180deg, transparent, rgba(38, 35, 31, 0.62)); pointer-events: none; }
.gallery-preview__caption { position: absolute; right: 10px; bottom: 10px; left: 10px; z-index: 1; overflow: hidden; color: #fff; font-family: var(--serif); font-size: 0.68rem; letter-spacing: 0.06em; text-overflow: ellipsis; white-space: nowrap; }
.gallery-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(72px, 9vw); gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-color: var(--red) transparent; }
.gallery-item { position: relative; min-width: 0; aspect-ratio: 2 / 3; overflow: hidden; padding: 0; border: 1px solid transparent; background: var(--paper-deep); text-align: left; scroll-snap-align: center; }
.gallery-item img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; padding: 5px; filter: saturate(0.68); transition: filter 280ms ease; }
.gallery-item img.visual-crop-applied { padding: 0; }
.gallery-item::after { content: ""; position: absolute; inset: 0; background: rgba(38, 35, 31, 0.2); opacity: 0; transition: opacity 260ms ease; pointer-events: none; }
.gallery-item span { position: absolute; right: 7px; bottom: 7px; left: 7px; z-index: 1; overflow: hidden; color: #fff; font-family: var(--serif); font-size: 0.64rem; letter-spacing: 0.06em; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transform: translateY(5px); transition: opacity 260ms ease, transform 260ms ease; }
.gallery-item:hover img, .gallery-item:focus-visible img, .gallery-item.is-active img { filter: saturate(1); }
.gallery-item:hover::after, .gallery-item:focus-visible::after, .gallery-item.is-active::after { opacity: 1; }
.gallery-item:hover span, .gallery-item:focus-visible span, .gallery-item.is-active span { opacity: 1; transform: translateY(0); }
.gallery-item.is-active { border-color: var(--red); }

.rsvp-band { background: var(--paper-deep); }
.rsvp-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(360px, 0.9fr); justify-content: space-between; gap: clamp(60px, 10vw, 150px); }
.rsvp-copy { max-width: 420px; }
.rsvp-copy h2 { margin: 18px 0; font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 4.3rem); font-weight: 500; letter-spacing: 0.08em; }
.rsvp-copy > p { margin: 0; color: var(--muted); font-family: var(--serif); line-height: 1.9; }
.rsvp-copy strong { color: var(--red); font-weight: 500; }
.rsvp-note { display: flex; align-items: center; gap: 18px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); }
.rsvp-note > span { color: var(--red); font-family: var(--serif); font-size: 2.25rem; }
.rsvp-note p { margin: 0; color: var(--muted); font-size: 0.83rem; line-height: 1.7; }
.rsvp-form { padding: 36px; background: var(--paper); border: 1px solid var(--line); }
.field { display: grid; gap: 9px; margin-bottom: 22px; }
.field > span, .field-group legend { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.14em; }
.field input, .field select, .field textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; outline: 0; padding: 10px 0 12px; background: transparent; color: var(--ink); }
.field textarea { resize: vertical; min-height: 82px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(113, 106, 97, 0.64); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); }
.field-group { margin: 0 0 22px; padding: 0; border: 0; }
.field-group legend { margin-bottom: 12px; }
.radio-row { display: flex; gap: 22px; }
.radio-option { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 0.85rem; }
.radio-option input { accent-color: var(--red); }
.button--full { width: 100%; margin-top: 5px; }
.form-status { min-height: 22px; margin: 16px 0 0; color: var(--red); font-size: 0.83rem; line-height: 1.5; }

.notes-band { position: relative; overflow: hidden; background: var(--sage); color: var(--paper); }
.notes-band::before, .notes-band::after { content: ""; position: absolute; width: 230px; height: 230px; border: 1px solid rgba(246, 241, 232, 0.2); transform: rotate(45deg); }
.notes-band::before { top: -160px; right: -80px; }
.notes-band::after { bottom: -160px; left: -80px; }
.notes-band .section-heading, .notes-grid { position: relative; z-index: 1; }
.notes-band .section-heading .eyebrow { color: var(--gold); }
.notes-band .section-heading h2 { color: var(--paper); }
.notes-band .section-heading > p:last-child { color: rgba(246, 241, 232, 0.78); }
.notes-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid rgba(246, 241, 232, 0.24); border-bottom: 1px solid rgba(246, 241, 232, 0.24); }
.note-item { min-height: 220px; padding: 26px 28px 30px 0; border-right: 1px solid rgba(246, 241, 232, 0.24); }
.note-item + .note-item { padding-left: 28px; }
.note-item:last-child { border-right: 0; }
.note-item > span { display: block; margin-bottom: 32px; color: var(--gold); font-size: 0.72rem; letter-spacing: 0.18em; }
.note-item h3 { margin: 0 0 14px; font-family: var(--serif); font-size: 1.35rem; font-weight: 500; letter-spacing: 0.06em; }
.note-item p { margin: 0; color: rgba(246, 241, 232, 0.74); font-size: 0.86rem; line-height: 1.9; }

.contact { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr); align-items: end; gap: clamp(50px, 10vw, 150px); }
.contact__copy { max-width: 460px; }
.contact__copy h2 { margin: 18px 0; font-family: var(--serif); font-size: clamp(2.5rem, 5vw, 4.2rem); font-weight: 500; line-height: 1.25; letter-spacing: 0.08em; }
.contact__copy > p:last-child { margin: 0; color: var(--muted); font-family: var(--serif); line-height: 1.9; }
.contact__actions { display: grid; gap: 18px; }
.contact-link { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.contact-link__label { color: var(--sage); font-size: 0.72rem; letter-spacing: 0.16em; }
.contact-link strong { font-family: var(--serif); font-size: 1.08rem; font-weight: 500; letter-spacing: 0.06em; }
.button--outline { border-color: var(--line); background: transparent; color: var(--ink); }
.button--outline:hover, .button--outline:focus-visible { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.qr-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr); align-items: center; gap: clamp(48px, 10vw, 150px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.qr-section__copy { max-width: 500px; }
.qr-section__copy h2 { margin: 18px 0 16px; font-family: var(--serif); font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 500; line-height: 1.25; letter-spacing: 0.08em; }
.qr-section__copy > p:last-child { margin: 0; color: var(--muted); font-family: var(--serif); line-height: 1.95; }
.qr-media-wrap { display: grid; justify-items: center; }
.qr-media { position: relative; display: grid; place-items: center; width: min(100%, 320px); aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(199, 168, 107, 0.82); background: var(--paper-deep); box-shadow: 0 16px 34px rgba(38, 35, 31, 0.1); }
.qr-media::before, .qr-media::after { position: absolute; width: 22px; height: 22px; border-color: var(--gold); content: ""; pointer-events: none; }
.qr-media::before { top: 14px; left: 14px; border-top: 1px solid; border-left: 1px solid; }
.qr-media::after { right: 14px; bottom: 14px; border-right: 1px solid; border-bottom: 1px solid; }
.qr-media img { position: absolute; inset: 0; z-index: 1; display: none; width: 100%; height: 100%; padding: 18px; object-fit: contain; background: var(--paper); }
.qr-media.has-image img { display: block; }
.qr-media__placeholder { position: relative; z-index: 2; display: grid; place-items: center; width: 68%; aspect-ratio: 1; border: 1px dashed rgba(169, 68, 58, 0.52); color: var(--red); font-family: var(--serif); font-size: 0.95rem; line-height: 1.8; letter-spacing: 0.1em; text-align: center; white-space: pre-line; }
.qr-media.has-image .qr-media__placeholder { display: none; }
.is-edit-mode .qr-media { cursor: pointer; }
.is-edit-mode .qr-media:hover, .is-edit-mode .qr-media:focus-visible { outline: 1px solid var(--red); outline-offset: 5px; }

.site-footer { position: relative; padding-top: 110px; padding-bottom: 120px; text-align: center; }
.footer-seal { width: 66px; height: 66px; margin: 0 auto 26px; border: 1px solid var(--red); color: var(--red); font-size: 2rem; }
.site-footer h2 { margin: 24px 0 14px; font-family: var(--serif); font-size: clamp(1.75rem, 4vw, 2.7rem); font-weight: 500; letter-spacing: 0.08em; }
.site-footer__date { margin: 0; color: var(--muted); font-size: 0.83rem; letter-spacing: 0.2em; }
.site-footer__credit { margin: 42px 0 0; color: var(--sage); font-family: var(--serif); font-size: 0.9rem; letter-spacing: 0.16em; }

.lightbox { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; gap: 20px; padding: 38px 28px; background: rgba(38, 35, 31, 0.94); opacity: 0; visibility: hidden; transition: opacity 260ms ease, visibility 260ms ease; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__figure { display: grid; justify-items: center; gap: 16px; max-height: 100%; margin: 0; }
.lightbox__figure img { width: min(84vw, 920px); max-height: calc(100vh - 120px); object-fit: contain; }
.lightbox__figure figcaption { color: var(--paper); font-family: var(--serif); font-size: 0.9rem; letter-spacing: 0.16em; }
.lightbox .icon-button { justify-self: center; border-color: rgba(246, 241, 232, 0.35); color: var(--paper); }
.lightbox .icon-button:hover, .lightbox .icon-button:focus-visible { background: var(--paper); color: var(--ink); }
.lightbox__close { position: absolute; top: 22px; right: 22px; font-size: 1.45rem; }
.lightbox__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 1;
}
.lightbox__nav::before {
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
}
.lightbox__nav--prev::before { margin-left: 4px; transform: rotate(-135deg); }
.lightbox__nav--next::before { margin-right: 4px; transform: rotate(45deg); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal--delay { transition-delay: 120ms; }
.reveal--delay-2 { transition-delay: 220ms; }

@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes petal-fall {
  0% { transform: translate3d(0, -14vh, 0) rotate(0deg) scale(.88); }
  50% { transform: translate3d(var(--petal-drift-mid), 52vh, 0) rotate(245deg) scale(1); }
  100% { transform: translate3d(var(--petal-drift-end), 116vh, 0) rotate(520deg) scale(.82); }
}

@media (max-width: 880px) {
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 58px; padding-top: 130px; }
  .hero__copy { max-width: 620px; }
  .hero__visual { min-height: 620px; }
  .story__timeline { gap: 22px; }
  .story-card > p:last-child { max-width: none; }
  .countdown { grid-template-columns: 1fr; gap: 48px; }
  .countdown__intro { text-align: center; }
  .rsvp-layout { grid-template-columns: 1fr; gap: 60px; }
  .rsvp-copy { max-width: 620px; }
  .promise { grid-template-columns: 1fr; gap: 46px; }
  .promise__image { min-height: 520px; }
  .promise__image img { min-height: 520px; max-height: 680px; }
  .promise__copy { max-width: 620px; padding-right: 0; }
  .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note-item:nth-child(2) { border-right: 0; }
  .note-item:nth-child(n + 3) { border-top: 1px solid rgba(246, 241, 232, 0.24); }
  .contact { grid-template-columns: 1fr; gap: 48px; }
  .qr-section { grid-template-columns: 1fr; gap: 42px; }
  .qr-section__copy { max-width: 620px; }
}

@media (max-width: 640px) {
  .site-header { padding: 17px 20px; }
  .brand-mark { font-size: 0.82rem; }
  .site-nav { display: none; }
  .section { width: min(100% - 36px, 560px); padding-top: 88px; padding-bottom: 88px; }
  .section--wide { width: 100%; padding-right: 18px; padding-left: 18px; }
  .cover__ornament--top { top: 7%; right: 8%; }
  .cover__ornament--bottom { bottom: 7%; left: 8%; }
  .cover h1 { font-size: clamp(2.2rem, 11vw, 3.3rem); }
  .cover__hint { padding: 0 20px; line-height: 1.8; }
  .hero { padding-top: 120px; }
  .hero h2 #heroGroom, .hero h2 #heroBride { font-size: clamp(2.15rem, 10.5vw, 3.4rem); letter-spacing: 0.025em; }
  .hero h2 #heroJoin { margin: 0.14em 0; font-size: clamp(1.35rem, 6vw, 1.7rem); }
  .falling-petals span:nth-child(n + 11) { display: none; }
  .hero__meta { gap: 12px; }
  .hero__meta strong { font-size: 0.78rem; letter-spacing: 0.04em; }
  .hero__visual { min-height: 460px; }
  .hero__image-wrap { right: 0; left: 14%; }
  .hero__stamp { width: 62px; height: 114px; font-size: 0.92rem; }
  .hero__caption { right: -8px; font-size: 0.66rem; }
  .intro-band { grid-template-columns: 1fr; gap: 18px; padding-top: 22px; padding-bottom: 22px; }
  .intro-band__line { width: 100%; }
  .mobile-only { display: block; }
  .section-heading { margin-bottom: 48px; }
  .story__timeline { grid-template-columns: 1fr; gap: 36px; }
  .story__timeline::before { top: 18px; right: auto; bottom: 18px; left: 6px; width: 1px; height: auto; }
  .story-card { padding-top: 0; padding-left: 42px; }
  .story-card::before { top: 6px; left: 0; width: 12px; height: 12px; }
  .story-card__number { top: -2px; left: 28px; }
  .details-grid { grid-template-columns: 1fr; }
  .detail-item, .detail-item + .detail-item { min-height: 0; padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line-light); }
  .detail-item:last-child { border-bottom: 0; }
  .detail-item__index { margin-bottom: 18px; }
  .details-actions { align-items: flex-start; flex-direction: column; gap: 22px; }
  .promise { width: 100%; padding-right: 18px; padding-left: 18px; }
  .promise__image { min-height: 420px; }
  .promise__image img { min-height: 420px; }
  .promise__copy h2 { font-size: clamp(2.25rem, 12vw, 3.4rem); }
  .schedule-item { grid-template-columns: 92px 1fr; gap: 16px; padding: 22px 0; }
  .schedule-item time { font-size: 1.6rem; }
  .schedule-item strong { font-size: 1.1rem; }
  .countdown__clock { gap: 8px; }
  .countdown-unit strong { font-size: clamp(2rem, 11vw, 3.6rem); }
  .countdown-unit span { font-size: 0.62rem; }
  .countdown-divider { font-size: 1.3rem; }
  .gallery-feature { aspect-ratio: 2 / 3; }
  .gallery-rail { grid-auto-columns: minmax(72px, 22vw); gap: 9px; }
  .gallery-feature__meta { align-items: flex-start; flex-direction: column; gap: 8px; }
  .gallery-feature__caption { max-width: 100%; font-size: 1.1rem; }
  .gallery-item span { display: none; }
  .rsvp-form { padding: 24px 20px; }
  .notes-grid { grid-template-columns: 1fr; }
  .note-item, .note-item + .note-item { min-height: 0; padding: 24px 0; border-right: 0; }
  .note-item:nth-child(n + 2) { border-top: 1px solid rgba(246, 241, 232, 0.24); }
  .note-item > span { margin-bottom: 18px; }
  .contact-link { align-items: flex-start; flex-direction: column; gap: 8px; }
  .qr-section { gap: 32px; }
  .qr-section__copy h2 { font-size: clamp(2.15rem, 11vw, 3.3rem); }
  .qr-media { width: min(78vw, 280px); }
  .qr-media img { padding: 14px; }
  .radio-row { gap: 13px; }
  .lightbox { grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 8px; padding: 28px 12px; }
  .lightbox__figure img { width: min(86vw, 920px); max-height: calc(100vh - 110px); }
}

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

/* Same-page editor controls */
.inline-editor-toolbar {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(199, 168, 107, 0.7);
  background: rgba(246, 241, 232, 0.96);
  box-shadow: 0 12px 36px rgba(38, 35, 31, 0.16);
  backdrop-filter: blur(12px);
}
.inline-editor-toolbar__copy { display: grid; gap: 3px; min-width: 0; }
.inline-editor-toolbar__copy strong { color: var(--red); font-family: var(--serif); font-size: 0.88rem; font-weight: 500; }
.inline-editor-toolbar__copy span { color: var(--muted); font-size: 0.72rem; }
.inline-editor-toolbar__actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.inline-editor-toolbar__actions .button { min-height: 34px; }
#inlineEditorStatus { min-width: 4.5em; color: var(--sage); font-size: 0.72rem; text-align: right; }
#inlineEditorStatus[data-kind="dirty"] { color: var(--red); }
#inlineEditorStatus[data-kind="error"] { color: var(--red); }
.is-edit-mode [contenteditable="true"] { cursor: text; outline: 1px dashed transparent; outline-offset: 5px; transition: outline-color 160ms ease, background 160ms ease; }
.is-edit-mode [contenteditable="true"]:hover, .is-edit-mode [contenteditable="true"]:focus { outline-color: rgba(169, 68, 58, 0.65); background: rgba(199, 168, 107, 0.1); }
.is-edit-mode [data-edit-image] { cursor: pointer; }
.is-edit-mode [data-edit-image]:hover { outline: 2px solid var(--gold); outline-offset: -2px; filter: saturate(1.05); }

.editor-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--red-deep);
  color: var(--paper);
}
.editor-auth-card { width: min(100%, 460px); padding: clamp(28px, 6vw, 56px); border: 1px solid rgba(199, 168, 107, 0.5); text-align: center; }
.editor-auth-card .seal { margin-top: 0; }
.editor-auth-card h1 { margin: 18px 0 12px; font-family: var(--serif); font-size: clamp(1.8rem, 5vw, 2.7rem); font-weight: 500; }
.editor-auth-card > p:not(.eyebrow):not(.editor-auth-error) { margin: 0 auto 26px; color: rgba(246, 241, 232, 0.76); font-family: var(--serif); line-height: 1.8; }
.editor-auth-card form { display: grid; gap: 16px; text-align: left; }
.editor-auth-card label { display: grid; gap: 8px; color: rgba(246, 241, 232, 0.72); font-size: 0.76rem; }
.editor-auth-card input { width: 100%; border: 1px solid rgba(246, 241, 232, 0.35); border-radius: 0; padding: 12px 13px; outline: 0; background: rgba(246, 241, 232, 0.08); color: var(--paper); }
.editor-auth-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(199, 168, 107, 0.18); }
.editor-auth-card .button { width: 100%; }
.editor-auth-error { min-height: 20px; margin: 0; color: #f4b4a9; font-size: 0.78rem; text-align: center; }
.editor-auth-card .text-link { display: inline-flex; margin-top: 24px; border-color: rgba(246, 241, 232, 0.42); color: var(--paper); }

@media (max-width: 720px) {
  .inline-editor-toolbar { right: 10px; bottom: 10px; left: 10px; align-items: stretch; flex-direction: column; gap: 10px; padding: 11px; }
  .inline-editor-toolbar__actions { justify-content: stretch; }
  .inline-editor-toolbar__actions .button { flex: 1 1 calc(50% - 8px); }
  #inlineEditorStatus { flex: 1 1 100%; min-height: 18px; text-align: left; }
}

/* Editor workspace */
.editor-page { min-height: 100vh; background: var(--paper); }
.editor-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; width: min(1440px, calc(100% - 44px)); margin: 0 auto; padding: 48px 0 28px; border-bottom: 1px solid var(--line); }
.editor-header h1 { margin: 10px 0 8px; font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 500; letter-spacing: 0.05em; }
.editor-header > div > p:last-child { margin: 0; color: var(--muted); font-family: var(--serif); line-height: 1.7; }
.editor-shell { display: grid; grid-template-columns: minmax(440px, 0.9fr) minmax(420px, 1.1fr); gap: 28px; width: min(1440px, calc(100% - 44px)); margin: 28px auto 60px; }
.editor-panel, .editor-preview { min-width: 0; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.32); }
.editor-panel { padding: 28px; }
.editor-preview { position: sticky; top: 20px; align-self: start; padding: 20px; }
.editor-panel__top, .editor-preview__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.editor-panel__top h2, .editor-preview__top h2 { margin: 12px 0 0; font-family: var(--serif); font-size: 1.7rem; font-weight: 500; }
.editor-language { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 4px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.button--small { min-height: 34px; padding: 0 12px; font-size: 0.67rem; }
.editor-status { min-height: 22px; margin: 12px 0 0; color: var(--muted); font-size: 0.78rem; }
.editor-status[data-kind="success"] { color: var(--sage); }
.editor-status[data-kind="error"] { color: var(--red); }
.editor-form__section { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.editor-form__section:first-child { border-top: 0; padding-top: 0; }
.editor-form__section h3 { margin: 0 0 16px; font-family: var(--serif); font-size: 1.25rem; font-weight: 500; letter-spacing: 0.05em; }
.editor-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.editor-field { display: grid; gap: 7px; min-width: 0; margin-bottom: 14px; }
.editor-field--wide { grid-column: 1 / -1; }
.editor-field > span { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.08em; }
.editor-field input, .editor-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 0; outline: 0; padding: 10px 11px; background: rgba(246, 241, 232, 0.7); color: var(--ink); line-height: 1.55; }
.editor-field textarea { min-height: 76px; resize: vertical; }
.editor-field input:focus, .editor-field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 2px rgba(169, 68, 58, 0.1); }
.editor-list { margin-top: 20px; }
.editor-list__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.12em; }
.editor-list-item { margin-top: 12px; padding: 16px; border: 1px solid var(--line); background: rgba(246, 241, 232, 0.56); }
.editor-list-item__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.editor-list-item__top strong { font-family: var(--serif); font-size: 1rem; font-weight: 500; }
.editor-list-actions { display: flex; gap: 5px; }
.editor-list-actions .icon-button { width: 30px; height: 30px; font-size: 0.8rem; }
.editor-empty { margin: 0; padding: 18px; border: 1px dashed var(--line); color: var(--muted); font-size: 0.82rem; }
.editor-media-row { display: flex; align-items: center; gap: 14px; margin: 8px 0 16px; }
.editor-media-preview { width: 110px; height: 88px; overflow: hidden; background: var(--paper-deep); border: 1px solid var(--line); }
.editor-media-preview img { width: 100%; height: 100%; object-fit: cover; }
.editor-upload-button { position: relative; overflow: hidden; }
.editor-upload-button input { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; opacity: 0; }
.editor-preview__top { padding-bottom: 16px; }
.editor-preview iframe { display: block; width: 100%; height: min(78vh, 960px); border: 1px solid var(--line); background: var(--paper); }

@media (max-width: 980px) {
  .editor-shell { grid-template-columns: 1fr; }
  .editor-preview { position: static; }
  .editor-preview iframe { height: 720px; }
}

@media (max-width: 640px) {
  .language-switch { gap: 0; }
  .language-button { padding: 0 7px; }
  .editor-header { align-items: flex-start; flex-direction: column; width: min(100% - 36px, 560px); padding-top: 30px; }
  .editor-header .button { width: 100%; }
  .editor-shell { width: min(100% - 36px, 560px); margin-top: 18px; }
  .editor-panel, .editor-preview { padding: 18px; }
  .editor-fields-grid { grid-template-columns: 1fr; gap: 0; }
  .editor-field--wide { grid-column: auto; }
  .editor-toolbar .button { flex: 1 1 100%; }
  .editor-preview iframe { height: 650px; }
}

/* Same-page visual layout editor */
.visual-layout-node { transform-origin: top left; }
.is-edit-mode { padding-bottom: 142px; }
.is-edit-mode .visual-layout-node { outline: 1px dashed transparent; outline-offset: 4px; transition: outline-color 140ms ease, background 140ms ease; }
.is-edit-mode .visual-layout-node:hover, .is-edit-mode .visual-layout-node.is-visual-selected { outline-color: rgba(169, 68, 58, 0.72); }
.is-edit-mode .visual-layout-node.is-visual-selected { background-color: rgba(199, 168, 107, 0.08); }
.is-edit-mode.is-crop-mode img[data-visual-crop-key] { cursor: grab; touch-action: none; }
.is-edit-mode.is-crop-mode img[data-visual-crop-key]:active { cursor: grabbing; }

.visual-editor-toolbar {
  position: fixed;
  z-index: 110;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 11px 12px;
  border: 1px solid rgba(38, 35, 31, 0.22);
  background: rgba(246, 241, 232, 0.96);
  box-shadow: 0 12px 34px rgba(38, 35, 31, 0.16);
  backdrop-filter: blur(12px);
  /* Empty toolbar space should not block an image underneath on small screens. */
  pointer-events: none;
}
.visual-editor-toolbar__top, .visual-editor-toolbar__actions, .visual-editor-toolbar__group, .visual-editor-toolbar__list-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; pointer-events: auto; }
.visual-editor-toolbar__top { justify-content: space-between; }
.visual-editor-toolbar__title { color: var(--red); font-family: var(--serif); font-size: 0.75rem; letter-spacing: 0.14em; }
.visual-editor-toolbar__group { padding: 3px; border: 1px solid var(--line); }
.visual-editor-toolbar__list-actions { padding: 3px; border: 1px solid var(--line); }
.visual-editor-toolbar__actions { justify-content: flex-end; }
.visual-editor-toolbar__status { min-height: 18px; color: var(--muted); font-size: 0.72rem; }
.visual-editor-toolbar__status[data-kind="dirty"] { color: var(--red); }
.visual-editor-toolbar__status[data-kind="error"] { color: var(--red); }
.visual-media-picker { position: fixed; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; pointer-events: none; }
.visual-tool-button {
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.67rem;
  letter-spacing: 0.04em;
}
.visual-tool-button:hover, .visual-tool-button:focus-visible, .visual-tool-button.is-active { border-color: var(--red); background: var(--red); color: var(--paper); }
.visual-tool-button:disabled { cursor: not-allowed; opacity: 0.36; }
.visual-tool-button--icon { width: 31px; padding: 0; font-size: 1.05rem; }
.visual-tool-button--primary { border-color: var(--red); background: var(--red); color: var(--paper); }
.visual-zoom-controls { display: inline-flex; align-items: center; gap: 5px; padding: 3px 5px; border: 1px solid var(--line); }
.visual-zoom-controls input[type="range"] { width: 92px; accent-color: var(--red); }
.visual-zoom-controls .visual-tool-button--icon { width: 28px; min-height: 28px; }

.visual-selection-frame { position: fixed; z-index: 109; display: none; border: 1px solid var(--red); pointer-events: none; }
.visual-selection-frame.is-visible { display: block; }
.visual-selection-frame button { position: absolute; width: 12px; height: 12px; padding: 0; border: 1px solid var(--red); border-radius: 0; background: var(--paper); pointer-events: auto; touch-action: none; }
.visual-move-handle { top: -25px; left: 50%; width: 28px !important; height: 20px !important; color: var(--red); font-size: 0.9rem; line-height: 1; cursor: grab; transform: translateX(-50%); }
.visual-move-handle:active { cursor: grabbing; }
.visual-selection-frame [data-visual-resize="nw"] { top: -6px; left: -6px; cursor: nwse-resize; }
.visual-selection-frame [data-visual-resize="n"] { top: -6px; left: calc(50% - 6px); cursor: ns-resize; }
.visual-selection-frame [data-visual-resize="ne"] { top: -6px; right: -6px; cursor: nesw-resize; }
.visual-selection-frame [data-visual-resize="e"] { top: calc(50% - 6px); right: -6px; cursor: ew-resize; }
.visual-selection-frame [data-visual-resize="se"] { right: -6px; bottom: -6px; cursor: nwse-resize; }
.visual-selection-frame [data-visual-resize="s"] { bottom: -6px; left: calc(50% - 6px); cursor: ns-resize; }
.visual-selection-frame [data-visual-resize="sw"] { bottom: -6px; left: -6px; cursor: nesw-resize; }
.visual-selection-frame [data-visual-resize="w"] { top: calc(50% - 6px); left: -6px; cursor: ew-resize; }

.visual-snap-guides { position: fixed; z-index: 108; inset: 0; pointer-events: none; }
.visual-snap-guides i { position: absolute; display: none; background: rgba(169, 68, 58, 0.7); }
.visual-snap-guides.has-vertical-guide .visual-snap-guides__vertical { top: 0; bottom: 0; left: var(--visual-guide-x); display: block; width: 1px; }
.visual-snap-guides.has-horizontal-guide .visual-snap-guides__horizontal { right: 0; bottom: auto; left: 0; top: var(--visual-guide-y); display: block; height: 1px; }

@media (min-width: 768px) {
  body.is-edit-mode.visual-device-mobile .site-header,
  body.is-edit-mode.visual-device-mobile main,
  body.is-edit-mode.visual-device-mobile .site-footer { width: min(375px, calc(100% - 32px)); margin-right: auto; margin-left: auto; }
  body.is-edit-mode.visual-device-mobile .site-header { right: auto; left: 50%; padding: 17px 20px; transform: translateX(-50%); }
  body.is-edit-mode.visual-device-mobile .site-nav { display: none; }
  body.is-edit-mode.visual-device-mobile .section { width: min(100% - 36px, 560px); padding-top: 88px; padding-bottom: 88px; }
  body.is-edit-mode.visual-device-mobile .section--wide { width: 100%; padding-right: 18px; padding-left: 18px; }
  body.is-edit-mode.visual-device-mobile .hero, body.is-edit-mode.visual-device-mobile .promise, body.is-edit-mode.visual-device-mobile .countdown, body.is-edit-mode.visual-device-mobile .rsvp-layout, body.is-edit-mode.visual-device-mobile .contact { grid-template-columns: 1fr; gap: 48px; }
  body.is-edit-mode.visual-device-mobile .hero { min-height: auto; padding-top: 120px; }
  body.is-edit-mode.visual-device-mobile .hero__visual { min-height: 460px; }
  body.is-edit-mode.visual-device-mobile .story__timeline, body.is-edit-mode.visual-device-mobile .details-grid, body.is-edit-mode.visual-device-mobile .notes-grid { grid-template-columns: 1fr; }
  body.is-edit-mode.visual-device-mobile .story__timeline::before { top: 18px; right: auto; bottom: 18px; left: 6px; width: 1px; height: auto; }
  body.is-edit-mode.visual-device-mobile .story-card { padding-top: 0; padding-left: 42px; }
  body.is-edit-mode.visual-device-mobile .details-grid { border-bottom: 1px solid var(--line-light); }
  body.is-edit-mode.visual-device-mobile .detail-item, body.is-edit-mode.visual-device-mobile .detail-item + .detail-item { min-height: 0; padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line-light); }
  body.is-edit-mode.visual-device-mobile .schedule-item { grid-template-columns: 92px 1fr; gap: 16px; }
  body.is-edit-mode.visual-device-mobile .gallery-stage { grid-template-columns: minmax(0, 1fr) 68px; gap: 10px; }
  body.is-edit-mode.visual-device-mobile .gallery-preview--prev { display: none; }
  body.is-edit-mode.visual-device-mobile .gallery-feature { width: 100%; aspect-ratio: 2 / 3; }
  body.is-edit-mode.visual-device-mobile .gallery-rail { grid-auto-columns: 78px; }
  body.is-edit-mode.visual-device-mobile .promise__image { min-height: 420px; }
  body.is-edit-mode.visual-device-mobile .promise__image img { min-height: 420px; }
}

@media (max-width: 720px) {
  .is-edit-mode { padding-bottom: 225px; }
  .visual-editor-toolbar { right: 8px; bottom: 8px; left: 8px; max-height: 300px; overflow: auto; padding: 9px; }
  .visual-editor-toolbar__top { align-items: flex-start; }
  .visual-editor-toolbar__status { flex: 1 1 100%; }
  .visual-editor-toolbar__actions { justify-content: flex-start; }
  .visual-tool-button { min-height: 34px; }
  .visual-editor-toolbar__list-actions { gap: 4px; }
  .visual-zoom-controls input[type="range"] { width: 82px; }
  .visual-move-handle { top: -31px; width: 34px !important; height: 26px !important; }
  .visual-selection-frame [data-visual-resize="n"], .visual-selection-frame [data-visual-resize="e"], .visual-selection-frame [data-visual-resize="s"], .visual-selection-frame [data-visual-resize="w"] { display: none; }
  .visual-selection-frame button[data-visual-resize] { width: 16px; height: 16px; }
}

@media (max-width: 640px) {
  .gallery-stage { grid-template-columns: minmax(0, 1fr) minmax(64px, 18vw); gap: 10px; }
  .gallery-preview--prev { display: none; }
  .gallery-preview--next { opacity: 0.72; }
  .gallery-stage__nav { width: 34px; height: 34px; }
  .gallery-stage__nav--prev { left: 8px; }
  .gallery-stage__nav--next { right: 8px; }
  .gallery-feature { width: 100%; aspect-ratio: 2 / 3; }
  .gallery-feature__meta { right: 14px; bottom: 15px; left: 14px; }
  .gallery-feature__caption { max-width: 66%; font-size: 1rem; }
  .gallery-feature__count { font-size: 0.64rem; }
  .gallery-preview__caption { display: none; }
  .gallery-rail { grid-auto-columns: minmax(68px, 21vw); gap: 8px; }
}

/* Cloud RSVP management panel */
.rsvp-admin-panel { position: fixed; inset: 0; z-index: 1200; display: none; }
.rsvp-admin-panel.is-open { display: block; }
.rsvp-admin-panel__backdrop { position: absolute; inset: 0; background: rgba(38, 35, 31, 0.68); }
.rsvp-admin-card { position: relative; display: grid; gap: 18px; width: min(1100px, calc(100% - 32px)); max-height: min(820px, calc(100vh - 32px)); margin: 16px auto; padding: clamp(20px, 4vw, 38px); overflow: auto; background: var(--paper); border: 1px solid rgba(199, 168, 107, 0.65); box-shadow: 0 24px 80px rgba(38, 35, 31, 0.28); }
.rsvp-admin-card__top, .rsvp-admin-card__actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rsvp-admin-card__top h2 { margin: 8px 0 0; font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 500; }
.rsvp-admin-card__actions { justify-content: flex-start; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rsvp-admin-filters { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); }
.rsvp-admin-filters button { min-height: 32px; padding: 6px 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; }
.rsvp-admin-filters button.is-active, .rsvp-admin-filters button:hover, .rsvp-admin-filters button:focus-visible { background: var(--red); color: var(--paper); }
.rsvp-admin-status { min-height: 20px; margin: 0; color: var(--muted); font-size: 0.8rem; }
.rsvp-admin-table-wrap { overflow: auto; border: 1px solid var(--line); }
.rsvp-admin-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.82rem; }
.rsvp-admin-table th, .rsvp-admin-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.rsvp-admin-table th { color: var(--muted); background: rgba(246, 241, 232, 0.72); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; }
.rsvp-admin-table tr:last-child td { border-bottom: 0; }
.rsvp-admin-table td:nth-child(5) { max-width: 300px; white-space: pre-wrap; word-break: break-word; }
.rsvp-admin-delete { border: 0; background: transparent; color: var(--red); cursor: pointer; font: inherit; }
.rsvp-admin-empty { padding: 32px !important; color: var(--muted); text-align: center !important; }
@media (max-width: 767px) {
  .rsvp-admin-card { width: calc(100% - 20px); max-height: calc(100vh - 20px); margin: 10px auto; padding: 18px; }
}
