/* ===================== THEMES ===================== */
:root {
  --radius: 18px;
  --shadow: 0 12px 32px -14px rgba(35, 38, 28, .28);
  --script: 'Great Vibes', 'Brush Script MT', cursive;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --col: 480px;
}
[data-theme="ivory"] {
  --bg: #f8f5f2; --surface: #fffdfb; --surface-2: #f0e9e4;
  --primary: #3b3541; --primary-dark: #26222b; --accent: #b5826e;
  --text: #2b262e; --muted: #776f75; --line: #e6ddd7;
  --script: 'Cormorant Garamond', Georgia, serif; --script-style: italic; --script-weight: 500;
}
[data-theme="sage"] {
  --bg: #f4f1e8; --surface: #fffdf8; --surface-2: #e9e4d6;
  --primary: #6b7b5b; --primary-dark: #4a573e; --accent: #b8955a;
  --text: #2f3429; --muted: #72766a; --line: #dcd5c3;
}
[data-theme="navy"] {
  --bg: #f3f1ec; --surface: #fffefb; --surface-2: #e4e3dd;
  --primary: #2a3b5c; --primary-dark: #1a263e; --accent: #c2a36b;
  --text: #1f2533; --muted: #6a6f7c; --line: #d8d6ce;
}
[data-theme="terracotta"] {
  --bg: #f7efe6; --surface: #fffaf4; --surface-2: #eedfcf;
  --primary: #a85d3e; --primary-dark: #7c3f27; --accent: #6f7f5c;
  --text: #3a2a22; --muted: #7d6b60; --line: #e2cfbd;
}
[data-theme="blush"] {
  --bg: #faf3f1; --surface: #fffbfa; --surface-2: #f1e2df;
  --primary: #b07c80; --primary-dark: #85565a; --accent: #b59a64;
  --text: #3b2c2e; --muted: #806c6e; --line: #ead7d4;
}
[data-theme="crimson"] {
  --bg: #fbf3e6; --surface: #fffaf2; --surface-2: #f3e3cc;
  --primary: #9e1b26; --primary-dark: #6f0f18; --accent: #c9963c;
  --text: #3a1d1a; --muted: #7d625b; --line: #ecd6b9;
}
[data-theme="emerald"] {
  --bg: #f2f5ef; --surface: #fcfdfa; --surface-2: #e2eadf;
  --primary: #14594a; --primary-dark: #0b3b31; --accent: #c9a45c;
  --text: #1f2d28; --muted: #64746d; --line: #d3dfd6;
}
[data-theme="noir"] {
  --bg: #15161a; --surface: #1d1f24; --surface-2: #2a2c32;
  --primary: #c9a96e; --primary-dark: #a88748; --accent: #e3cf9f;
  --text: #ece8df; --muted: #a29d92; --line: #3a3c42;
}

/* ===================== BASE ===================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; height: 100vh; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }
p { margin: 0 0 1rem; }
.script { font-family: var(--script); font-weight: var(--script-weight, 400); }
.script, .section-title, .monogram, .person-nick, .amp, .event h3 { font-style: var(--script-style, normal); }
.center { text-align: center; }
.bank-number, .countdown b, .event-date, .pass-code, .provider, .stat b, .tl-year {
  font-variant-numeric: lining-nums tabular-nums;
}
.eyebrow {
  letter-spacing: .35em; text-transform: uppercase;
  font-size: .7rem; color: var(--muted); margin: 0 0 .5rem; font-weight: 400;
}
.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.15em; }
.btn-icon { display: inline-flex; }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 999px; padding: .8rem 1.5rem;
  font: 500 .82rem/1 var(--sans); letter-spacing: .08em;
  cursor: pointer; border: 1px solid var(--primary);
  transition: background .25s, color .25s, transform .2s, box-shadow .25s;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-dark); }
[data-theme="noir"] .btn-primary { color: #15161a; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: .55rem 1rem; font-size: .72rem; }
.btn-block { width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ===================== ORNAMENTS ===================== */
.divider { width: 160px; height: 24px; color: var(--accent); margin: .4rem auto 1.6rem; display: block; }
.corner { position: absolute; width: 130px; height: 130px; color: var(--primary); opacity: .45; pointer-events: none; }
.corner.light { color: #fff; opacity: .35; }
.corner.tl { top: 0; left: 0; }
.corner.tr { top: 0; right: 0; transform: scaleX(-1); }
.corner.bl { bottom: 0; left: 0; transform: scaleY(-1); }
.corner.br { bottom: 0; right: 0; transform: scale(-1, -1); }

/* ===================== COVER / ENVELOPE ===================== */
.cover {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; text-align: center;
  padding: 2rem 1.25rem; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, var(--surface) 0%, transparent 70%),
    radial-gradient(ellipse at 50% 100%, var(--surface-2) 0%, transparent 60%),
    var(--bg);
  transition: transform 1.2s cubic-bezier(.7, 0, .2, 1), opacity 1.2s;
}
.cover.gone { transform: translateY(-100%); opacity: .4; }
.cover-inner { position: relative; z-index: 1; max-width: 420px; animation: fadeUp 1.2s both; }
.cover-names { font-size: clamp(3rem, 13vw, 4.4rem); color: var(--primary-dark); line-height: 1.15; margin: 0; }
.cover-date { font-family: var(--serif); letter-spacing: .3em; color: var(--muted); margin: .2rem 0 1.6rem; }
.envelope { position: relative; width: min(250px, 70vw); aspect-ratio: 3 / 2; margin: 0 auto 1.6rem; perspective: 900px; }
.env-back { position: absolute; inset: 0; background: var(--primary-dark); border-radius: 8px; box-shadow: var(--shadow); }
.env-letter {
  position: absolute; left: 7%; right: 7%; top: 8%; bottom: 6%; z-index: 1;
  background: var(--surface); border-radius: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--primary-dark);
  transition: transform .9s .35s cubic-bezier(.3, .8, .3, 1);
}
.env-letter .script { font-size: 2.1rem; line-height: 1.1; }
.env-letter small { letter-spacing: .25em; font-size: .6rem; color: var(--muted); }
.env-pocket {
  position: absolute; inset: 0; z-index: 2; border-radius: 8px;
  background: var(--primary);
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
}
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 62%; z-index: 3;
  background: var(--primary-dark);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform .7s ease, z-index 0s .35s;
}
.seal {
  position: absolute; z-index: 4; left: 50%; top: 62%;
  transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 35% 30%, #e2c58a, var(--accent) 55%, #84652f);
  color: #fff8e6; font: 600 1rem var(--serif); letter-spacing: .06em; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3), inset 0 0 0 4px rgba(255, 255, 255, .18);
  transition: transform .4s, opacity .4s;
  animation: pulse 2.4s ease-in-out infinite;
}
.envelope.open .seal { opacity: 0; transform: translate(-50%, -50%) scale(.3); pointer-events: none; animation: none; }
.envelope.open .env-flap { transform: rotateX(180deg); z-index: 0; }
.envelope.open .env-letter { transform: translateY(-48%); }
.cover-to { font-size: .8rem; color: var(--muted); margin: 0; letter-spacing: .05em; }
.guest-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; margin: .1rem 0 1.2rem; color: var(--text); line-height: 1.3; }
.cover-note { font-size: .7rem; color: var(--muted); margin: 1.1rem auto 0; max-width: 30ch; font-style: italic; }

/* ===================== LAYOUT ===================== */
.main {
  position: relative; max-width: var(--col); margin: 0 auto;
  background: var(--surface); min-height: 100vh;
  box-shadow: 0 0 50px rgba(0, 0, 0, .07); overflow: hidden;
}
.section { padding: 5rem 1.6rem; text-align: center; position: relative; }
.section.alt { background: var(--bg); }
.section-title { font-family: var(--script); font-weight: 400; font-size: 3.1rem; color: var(--primary-dark); line-height: 1.2; }
.lead { color: var(--muted); max-width: 36ch; margin: 0 auto 2.2rem; font-size: .95rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.3rem; box-shadow: var(--shadow); text-align: left;
}
.sub-title { font-size: 1.6rem; color: var(--primary-dark); text-align: center; margin: 0 0 1rem; }
.sub-title small { font-family: var(--sans); font-size: .8rem; color: var(--muted); }

.side-panel { display: none; }
@media (min-width: 1024px) {
  .side-panel {
    display: flex; position: fixed; top: 0; bottom: 0; left: 0; right: var(--col);
    align-items: center; justify-content: center; text-align: center; color: #fff; overflow: hidden;
  }
  .side-bg {
    position: absolute; inset: 0;
    background:
      linear-gradient(rgba(20, 24, 18, .3), rgba(20, 24, 18, .62)),
      var(--hero-img, radial-gradient(circle at 25% 20%, rgba(255, 255, 255, .14), transparent 45%), linear-gradient(160deg, var(--primary), var(--primary-dark)));
    background-size: cover; background-position: center;
    animation: kenburns 30s ease-in-out infinite alternate;
  }
  .side-content { position: relative; padding: 2rem; }
  .side-content .eyebrow { color: rgba(255, 255, 255, .8); }
  .side-content h2 { font-size: clamp(4rem, 7vw, 7rem); line-height: 1.15; }
  .side-date { font-family: var(--serif); font-size: 1.3rem; letter-spacing: .15em; }
  .side-content .hashtag { color: #fff; opacity: .85; }
  .main { margin-right: 0; margin-left: auto; }
}

/* ===================== HERO ===================== */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  color: #fff; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(25, 30, 22, .2), rgba(25, 30, 22, .6)),
    var(--hero-img, radial-gradient(circle at 30% 18%, rgba(255, 255, 255, .16), transparent 45%), linear-gradient(165deg, var(--primary), var(--primary-dark)));
  background-size: cover; background-position: center;
  animation: kenburns 24s ease-in-out infinite alternate;
}
.hero-content { position: relative; z-index: 1; padding-bottom: 2rem; }
.hero .eyebrow { color: rgba(255, 255, 255, .85); }
.hero-names { font-size: clamp(3.4rem, 15vw, 5rem); line-height: 1.15; margin: .2rem 0; text-shadow: 0 2px 20px rgba(0, 0, 0, .2); }
.hero-date { font-family: var(--serif); font-size: 1.15rem; letter-spacing: .14em; margin: 0 0 2rem; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; max-width: 320px; margin: 0 auto 2rem; }
.countdown div {
  background: rgba(255, 255, 255, .13); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 14px; padding: .75rem 0 .55rem;
}
.countdown b { display: block; font: 500 1.75rem/1.05 var(--serif); }
.countdown span { font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.countdown-done { font-family: var(--serif); font-size: 1.3rem; font-style: italic; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .7); }
.hero .btn-ghost:hover { background: #fff; color: var(--primary-dark); }
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 38px; border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 14px; z-index: 1;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px;
  background: #fff; border-radius: 2px; animation: scrollDot 1.8s infinite;
}

/* ===================== QUOTE ===================== */
.quote-section { padding: 4rem 1.8rem; }
blockquote { margin: 0 auto; max-width: 36ch; font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.6; }
blockquote p { margin: 0; }
cite {
  display: block; margin-top: 1.1rem; font-style: normal; letter-spacing: .25em;
  font: 500 .72rem var(--sans); color: var(--accent); text-transform: uppercase;
}

/* ===================== COUPLE ===================== */
.couple { display: grid; gap: .5rem; }
.portrait {
  width: 190px; height: 250px; margin: 0 auto 1.3rem;
  border-radius: 999px 999px 22px 22px; overflow: hidden;
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); outline: 1px solid var(--line); outline-offset: 7px;
  display: grid; place-items: center;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.monogram { font-family: var(--script); font-size: 6.5rem; color: var(--primary); line-height: 1; }
.person-nick { font-family: var(--script); font-weight: 400; font-size: 2.7rem; color: var(--primary-dark); line-height: 1.15; }
.person-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin: .1rem 0 .3rem; }
.person-parents { color: var(--muted); font-size: .88rem; margin: 0 auto .9rem; max-width: 30ch; }
.ig {
  display: inline-flex; gap: .4rem; align-items: center; color: var(--primary); font-size: .8rem;
  text-decoration: none; border: 1px solid var(--line); padding: .35rem .95rem; border-radius: 999px; transition: .2s;
}
.ig:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.amp { font-family: var(--script); font-size: 4.2rem; color: var(--accent); line-height: 1; margin: 1.2rem 0 .6rem; }

/* ===================== EVENTS ===================== */
.event {
  background: var(--surface); border-radius: var(--radius); padding: 2.2rem 1.4rem 1.8rem;
  margin: 0 0 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--line); position: relative;
}
.section:not(.alt) .event { background: var(--bg); }
.event::before {
  content: ""; position: absolute; inset: 7px; border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 5px); pointer-events: none;
}
.event h3 { font-family: var(--script); font-weight: 400; font-size: 2.5rem; color: var(--primary-dark); line-height: 1.2; }
.event-date { display: flex; align-items: center; justify-content: center; gap: .9rem; margin: .9rem 0 1.1rem; font-family: var(--serif); }
.event-date .day { font-size: 3.2rem; line-height: 1; color: var(--accent); padding: 0 1rem; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.event-date .side { font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; width: 92px; line-height: 1.5; }
.meta { display: flex; flex-direction: column; align-items: center; gap: .25rem; color: var(--muted); font-size: .9rem; margin-bottom: 1.3rem; }
.meta strong { color: var(--text); font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.meta .time { display: inline-flex; align-items: center; gap: .4rem; color: var(--text); font-weight: 400; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; position: relative; }
.map { margin-top: 1.1rem; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.map iframe { width: 100%; height: 230px; border: 0; display: block; }
.info-card { text-align: center; margin-bottom: 1.5rem; }
.info-card h3 { font-size: 1.5rem; color: var(--primary-dark); margin-bottom: .4rem; display: flex; align-items: center; justify-content: center; gap: .5rem; }
.info-card p { color: var(--muted); font-size: .9rem; }
.swatches { display: flex; gap: .6rem; justify-content: center; margin: .2rem 0 1rem; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow); }

/* ===================== STORY ===================== */
.timeline { list-style: none; padding: 0; margin: 0 auto; position: relative; text-align: left; max-width: 380px; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 2.1rem 3rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 8px; top: 5px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.tl-year { font-size: .72rem; letter-spacing: .25em; color: var(--accent); font-weight: 500; }
.timeline h3 { font-size: 1.4rem; color: var(--primary-dark); line-height: 1.3; }
.timeline p { margin: .3rem 0 0; color: var(--muted); font-size: .92rem; }

/* ===================== GALLERY ===================== */
.gallery { columns: 2; column-gap: .6rem; }
.gallery button {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  margin: 0 0 .6rem; border-radius: 12px; overflow: hidden; cursor: zoom-in;
  break-inside: avoid; box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .35);
}
.gallery img { width: 100%; height: auto; transition: transform .7s ease; }
.gallery button:hover img { transform: scale(1.05); }
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(12, 12, 10, .94);
  display: flex; align-items: center; justify-content: center; animation: fadeIn .25s;
}
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lb-btn {
  position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.7rem; line-height: 1; cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: .8rem; letter-spacing: .25em; margin: 0; }

/* ===================== RSVP ===================== */
.field { display: block; border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.field > span, .field legend {
  display: block; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .45rem; font-weight: 500; padding: 0;
}
input, select, textarea {
  width: 100%; font: 400 1rem var(--sans); color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: .8rem .95rem;
  transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: block; text-align: center; padding: .75rem .3rem; border: 1px solid var(--line); border-radius: 12px;
  font-size: .82rem; cursor: pointer; transition: .2s; background: var(--bg); line-height: 1.3;
}
.choice input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); }
[data-theme="noir"] .choice input:checked + span { color: #15161a; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-error { color: #b2493a; font-size: .85rem; }
.form .btn + .btn { margin-top: .6rem; }
.done { text-align: center; animation: fadeUp .6s; }
.done-icon {
  width: 58px; height: 58px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; margin: 0 auto 1rem; font-size: 1.5rem;
}
.done-title { font-family: var(--serif); font-size: 1.2rem; }
.pass {
  margin: 1rem auto 1.2rem; padding: 1.3rem 1rem; border: 1px dashed var(--accent);
  border-radius: 16px; max-width: 270px; background: var(--bg); position: relative;
}
.pass-qr img { width: 172px; height: 172px; margin: .4rem auto .6rem; image-rendering: pixelated; background: #fff; padding: 6px; border-radius: 10px; }
.pass-code { font: 600 1.15rem var(--serif); letter-spacing: .22em; color: var(--primary-dark); margin: 0; }
.pass-name { font-weight: 500; margin: .1rem 0 .6rem; }
.pass-text { font-size: .78rem; color: var(--muted); margin: 0; }

.wishes { margin-top: 3rem; text-align: left; }
.wishes-list { list-style: none; padding: 0 .2rem 0 0; margin: 0 0 1rem; display: grid; gap: .7rem; max-height: 560px; overflow: auto; }
.wish {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem;
  display: grid; grid-template-columns: auto 1fr; gap: .8rem; animation: fadeUp .5s both;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; font: 600 1.05rem var(--serif);
}
[data-theme="noir"] .avatar { color: #15161a; }
.wish-head { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.wish-name { font-weight: 500; }
.badge { font-size: .62rem; padding: .12rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); letter-spacing: .05em; }
.badge.yes { background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary-dark); }
.wish p { margin: .2rem 0; font-size: .92rem; white-space: pre-line; overflow-wrap: anywhere; }
.wish time { font-size: .7rem; color: var(--muted); }
.empty { text-align: center; color: var(--muted); font-size: .9rem; padding: 1.2rem; list-style: none; }

/* ===================== GIFT ===================== */
.gift-list { display: grid; gap: 1rem; }
.bank-card {
  position: relative; border-radius: 18px; padding: 1.3rem 1.4rem; color: #fff; text-align: left;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: var(--shadow); overflow: hidden; aspect-ratio: 1.75 / 1;
  display: flex; flex-direction: column; justify-content: space-between;
}
[data-theme="noir"] .bank-card { color: #15161a; }
.bank-card::before, .bank-card::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.bank-card::before { width: 240px; height: 240px; right: -90px; top: -110px; }
.bank-card::after { width: 160px; height: 160px; left: -60px; bottom: -90px; }
.bank-top, .bank-bottom { display: flex; justify-content: space-between; align-items: center; gap: .5rem; position: relative; z-index: 1; }
.bank-bottom { align-items: flex-end; }
.chip { width: 42px; height: 31px; border-radius: 7px; background: linear-gradient(135deg, #f0dca6, #b8955a); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.provider { font: 600 1.25rem var(--serif); letter-spacing: .12em; }
.bank-number { font: 500 1.5rem var(--serif); letter-spacing: .14em; position: relative; z-index: 1; }
.holder { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .92; line-height: 1.4; }
.bank-card .btn { background: rgba(255, 255, 255, .18); color: inherit; border-color: rgba(255, 255, 255, .45); flex: none; }
.bank-card .btn:hover { background: rgba(255, 255, 255, .3); }
.gift-extra { text-align: center; }
.gift-extra h3 { font-size: 1.3rem; color: var(--primary-dark); margin: .3rem 0 .6rem; }
.gift-extra p { color: var(--muted); font-size: .9rem; margin-bottom: .6rem; }
.gift-extra strong { color: var(--text); font-weight: 500; }
.qris img { width: 220px; margin: .5rem auto 0; border-radius: 10px; background: #fff; padding: 8px; }
.gift-icon { font-size: 1.6rem; color: var(--accent); }

/* ===================== CLOSING ===================== */
.closing { padding-bottom: 7.5rem; }
.closing-names { font-size: 3.6rem; color: var(--primary-dark); line-height: 1.2; margin: .2rem 0; }
.hashtag { color: var(--accent); letter-spacing: .12em; font-weight: 500; margin-bottom: 1.6rem; }
.footer { margin-top: 3rem; color: var(--muted); font-size: .72rem; letter-spacing: .05em; }

/* ===================== NAV + FABS ===================== */
.bottom-nav {
  position: fixed; bottom: 12px; left: 50%; z-index: 50;
  transform: translateX(-50%) translateY(160%);
  display: flex; gap: .1rem; padding: .35rem;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
  transition: transform .7s .4s cubic-bezier(.3, .8, .3, 1);
  max-width: calc(100vw - 20px);
}
body.opened .bottom-nav { transform: translateX(-50%); }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: .45rem .55rem; border-radius: 999px; color: var(--muted);
  text-decoration: none; font-size: .58rem; letter-spacing: .04em; min-width: 50px; transition: .25s;
}
.bottom-nav a.active { background: var(--primary); color: #fff; }
[data-theme="noir"] .bottom-nav a.active { color: #15161a; }
.bottom-nav .ic { width: 18px; height: 18px; }
@media (min-width: 1024px) { .bottom-nav { left: calc(100% - var(--col) / 2); } }

.fabs {
  position: fixed; right: 14px; bottom: 90px; z-index: 50;
  display: flex; flex-direction: column; gap: .55rem;
  opacity: 0; pointer-events: none; transition: opacity .5s .6s;
}
body.opened .fabs { opacity: 1; pointer-events: auto; }
.fab {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--primary-dark); display: grid; place-items: center;
  cursor: pointer; box-shadow: var(--shadow); font: 600 .72rem var(--sans); letter-spacing: .05em;
}
.fab.playing { background: var(--primary); color: #fff; border-color: var(--primary); }
.fab.playing .ic { animation: spin 3.5s linear infinite; }

/* ===================== PETALS / TOAST ===================== */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.petal {
  position: absolute; top: -6vh;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, #fff), var(--accent));
  border-radius: 80% 0 80% 0; animation: fall linear infinite;
}
.toast {
  position: fixed; left: 50%; bottom: 100px; z-index: 300;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--surface); padding: .6rem 1.2rem; border-radius: 999px;
  font-size: .85rem; transition: .3s; box-shadow: var(--shadow); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===================== MOTION ===================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, .3), inset 0 0 0 4px rgba(255, 255, 255, .18), 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); }
  50% { box-shadow: 0 4px 12px rgba(0, 0, 0, .3), inset 0 0 0 4px rgba(255, 255, 255, .18), 0 0 0 12px transparent; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.12) translateY(-1%); } }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@keyframes fall {
  0% { transform: translate3d(0, -6vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift, 60px), 110vh, 0) rotate(620deg); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}


/* ===================== PLATFORM ADDITIONS ===================== */
.preview-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 400;
  background: #b2493a; color: #fff; text-align: center;
  font: 500 .75rem/1.2 var(--sans); letter-spacing: .05em; padding: .45rem .8rem;
}
.loading-more { text-align: center; color: var(--muted); font-size: .8rem; }
.rsvp-closed { text-align: center; color: var(--muted); font-style: italic; }
.powered { display: block; margin-top: .4rem; color: var(--muted); text-decoration: none; opacity: .8; }
.powered:hover { opacity: 1; text-decoration: underline; }


/* ===================== MEDIA, SOCIAL & LIVE ===================== */
.religion-symbol { color: var(--accent); margin: 0 auto .9rem; line-height: 1.2; }
.religion-symbol span { font-size: 2.1rem; display: inline-block; }
.religion-symbol.arabic span { font-size: 1.7rem; font-family: 'Amiri', 'Traditional Arabic', 'Scheherazade New', serif; direction: rtl; }
.religion-symbol.small span { font-size: 1.6rem; }
.religion-symbol.small.arabic span { font-size: 1.35rem; }
.religion-symbol svg { display: block; margin: 0 auto; }

.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media video, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media.slides img { opacity: 0; transition: opacity 1.6s ease; transform: scale(1.04); }
.hero-media.slides img.active { opacity: 1; animation: kenburns 9s ease-in-out forwards; }
.has-media .hero-bg { background: linear-gradient(180deg, rgba(25, 30, 22, .25), rgba(25, 30, 22, .65)); animation: none; }

.gallery button { position: relative; }
.gallery video { width: 100%; height: auto; display: block; background: #000; }
.media-badge {
  position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, .55); color: #fff;
  font: 600 .6rem/1 var(--sans); letter-spacing: .12em; padding: .3rem .45rem; border-radius: 6px;
}
.media-badge.play { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; padding: 0; }
.lightbox video { max-width: 92vw; max-height: 82vh; border-radius: 8px; background: #000; }
.video-box { margin-top: 2rem; }
.video-frame { position: relative; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: #000; aspect-ratio: 16 / 9; }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#livePlayer .video-frame { margin: .4rem 0 1rem; }

.live-badge, .live-pill {
  display: inline-flex; align-items: center; gap: .35rem; background: #d62f2f; color: #fff;
  font: 600 .65rem/1 var(--sans); letter-spacing: .12em; padding: .3rem .55rem; border-radius: 999px;
}
.live-pill { position: fixed; top: 14px; left: 14px; z-index: 60; text-decoration: none; padding: .45rem .75rem; box-shadow: 0 4px 14px rgba(214, 47, 47, .45); }
.live-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }

.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.closing .hashtag a { color: inherit; text-decoration: none; border-bottom: 1px dashed currentColor; }

.wish-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.like {
  border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 999px;
  padding: .15rem .6rem; font: 500 .75rem var(--sans); cursor: pointer; transition: .2s;
}
.like.on { color: #d6455d; border-color: #f1c3cc; background: #fdf0f2; }
.wish-reply { margin-top: .5rem; padding: .55rem .75rem; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 0 10px 10px 0; }
.wish-reply b { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.wish-reply p { margin: .15rem 0 0; font-size: .88rem; }

.gift-form { text-align: left; margin-top: 1rem; }
.gift-done { color: var(--primary-dark); font-weight: 500; margin: .8rem 0 0; }

.sheet { position: fixed; inset: 0; z-index: 250; background: rgba(12, 12, 10, .5); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s; }
.sheet-panel { width: 100%; max-width: 480px; background: var(--surface); border-radius: 22px 22px 0 0; padding: 1.3rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom)); animation: fadeUp .25s; }
.sheet-title { font-family: var(--serif); font-size: 1.3rem; text-align: center; margin: 0 0 1rem; color: var(--primary-dark); }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-bottom: 1rem; }
.share-grid button { border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .35rem; color: var(--text); font-family: var(--sans); }
.share-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; font: 700 1.05rem var(--sans); }
.share-ic.wa { background: #25d366; }
.share-ic.fb { background: #1877f2; font-family: Georgia, serif; font-size: 1.5rem; }
.share-ic.x { background: #111; }
.share-ic.tg { background: #2aabee; }
.share-ic.ig { background: radial-gradient(circle at 30% 110%, #fdd56b 0%, #f56040 40%, #c13584 70%, #5851db 100%); font-size: 1.5rem; }
.share-ic.copy { background: var(--primary); }
.sheet-panel .btn + .btn { margin-top: .5rem; }

/* Unified demo: switch religion/tradition in place (only rendered on /i/demo) */
.tradition-bar {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 150;
  display: flex; align-items: center; gap: .5rem; max-width: calc(100% - 20px);
  padding: 5px 6px 5px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 500 .74rem var(--sans); color: var(--muted);
}
.tradition-label { white-space: nowrap; }
.tradition-list { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.tradition-list::-webkit-scrollbar { display: none; }
.tradition-list button {
  flex: none; border: 0; border-radius: 999px; padding: 6px 11px; cursor: pointer;
  background: transparent; color: var(--text); font: inherit; font-weight: 600;
}
.tradition-list button:hover { background: var(--surface-2); }
.tradition-list button.active { background: var(--primary); color: #fff; }

/* Ornament styles: arch frames and botanical corners only with 'leaves' */
body[data-ornament="none"] .corner { display: none; }
body[data-ornament="line"] .corner { opacity: .55; }
body[data-ornament="line"] .portrait,
body[data-ornament="none"] .portrait { border-radius: 22px; }

#mealField input[name="dietNote"] { margin-top: .6rem; }
#mealChoices { flex-wrap: wrap; }
