:root {
  color-scheme: light;
  --bg: #F9F3F1;
  --paper: #FFFDFB;
  --ink: #1E0A14;
  --ink-secondary: #3D1B2B;
  --muted: #614150;
  --magenta: #9E1B4F;
  --magenta-deep: #781039;
  --rose: #D46690;
  --blush: #FCEEF3;
  --gold: #B88846;
  --gold-soft: rgba(184, 136, 70, .25);
  --line: rgba(158, 27, 79, .22);
  --line-soft: rgba(158, 27, 79, .12);
  --line-gold: rgba(184, 136, 70, .32);
  --sage: #8FA67C;
  --glass: rgba(255, 253, 251, .94);
  --shadow: rgba(70, 20, 45, .12);
  --shadow-lg: 0 28px 70px -24px rgba(70, 20, 45, .22), 0 8px 24px -10px rgba(70, 20, 45, .08);
  --display: "Noto Serif Display", "Cormorant Garamond", Georgia, serif;
  --script: "Ephesis", cursive;
  --serif: "Cormorant Garamond", Georgia, serif;
  --vn: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --gl: max(20px, env(safe-area-inset-left, 0px));
  --gr: max(20px, env(safe-area-inset-right, 0px));
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --bottom-h: 200px;
  --kb: 6.4s;
  --ease: cubic-bezier(.22, .68, .16, 1);
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.6 var(--vn);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 1.5px solid var(--magenta); outline-offset: 3px; }
[hidden] { display: none !important; }
button, a, .th, .cell { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  background: var(--bg);
}

.deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}
.deco img { position: absolute; display: block; }
.wash { width: clamp(280px, 24vw, 420px); pointer-events: none; }
.wash.tl { top: -2%; left: -2%; opacity: .92; }
.wash.br { bottom: -2%; right: -2%; opacity: .9; }
.flora { width: clamp(120px, 13vw, 230px); opacity: .85; }
.flora.tr { top: -6%; right: -2%; }
.flora.bl { bottom: -10%; left: -2%; transform: scaleX(-1) rotate(-6deg); }
.app:not(.is-intro) .deco { opacity: .3; }

.layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: calc(var(--st) + 84px) var(--gr) calc(var(--bottom-h) + 18px) var(--gl);
  opacity: 0;
  will-change: opacity, transform;
  backface-visibility: hidden;
  transition: opacity 1.2s ease, transform 1.4s var(--ease);
}
.layer.active { opacity: 1; transform: none; z-index: 2; }
.layer.prep { transition: none; }
.app[data-fx="dream"] .layer.prep { transform: scale(1.035); }
.app[data-fx="dream"] .layer.leave { transform: scale(.985); }
.app[data-fx="slide"] .layer.prep { transform: translateX(calc(var(--dir, 1) * 16%)); }
.app[data-fx="slide"] .layer.leave { transform: translateX(calc(var(--dir, 1) * -16%)); }
.app[data-fx="zoom"] .layer.prep { transform: scale(.84); }
.app[data-fx="zoom"] .layer.leave { transform: scale(1.1); }

.frame {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
  background: var(--paper);
  padding: 14px;
  border-radius: 3px;
  transform: rotate(var(--rot, 0deg));
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line-soft);
}
.frame::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--line-soft);
  pointer-events: none;
}
.fsprig {
  position: absolute;
  z-index: 3;
  width: 118px;
  top: -58px;
  left: -46px;
  transform: rotate(-24deg);
  pointer-events: none;
}
.pic {
  display: flex;
  max-width: 100%;
  overflow: hidden;
}
.pic img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - var(--st) - 96px - var(--bottom-h) - 18px);
  object-fit: contain;
}
.frame figcaption { display: none; }

.kb { animation: var(--kb) linear forwards; will-change: transform; }
.kb.in { animation-name: kbIn; }
.kb.out { animation-name: kbOut; }
.kb.o0 { transform-origin: 30% 40%; }
.kb.o1 { transform-origin: 70% 35%; }
.kb.o2 { transform-origin: 50% 70%; }
.kb.o3 { transform-origin: 36% 62%; }
@keyframes kbIn { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes kbOut { from { transform: scale(1.06); } to { transform: scale(1); } }
.app.paused .kb, .app.is-intro .kb { animation-play-state: paused; }

.shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transition: opacity .8s;
  background: linear-gradient(to bottom, rgba(248, 242, 241, .9), transparent 16%, transparent 60%, rgba(248, 242, 241, .94));
}
.app.is-intro .shade { opacity: 0; }
.petals {
  position: absolute;
  inset: 0;
  z-index: 9;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.chrome {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 6;
  transition: opacity .7s ease, transform .7s var(--ease);
}
.app.idle .chrome,
.app.is-intro .chrome,
.app.is-card .chrome,
.app.is-intro .layer {
  opacity: 0;
  pointer-events: none;
}
.app.idle .chrome.top { transform: translateY(-10px); }
.app.idle .chrome.bottom { transform: translateY(14px); }
.app.idle { cursor: none; }
.app.idle .shade { opacity: .3; }
.app.is-card .layer.active { opacity: .2; }
.app.idle .layer {
  padding-top: calc(var(--st) + 48px);
  padding-bottom: calc(var(--sb) + 34px);
}
.app.idle .pic img { max-height: calc(100dvh - var(--st) - var(--sb) - 82px - 64px); }

.top {
  top: 0;
  padding: calc(var(--st) + 16px) var(--gr) 0 var(--gl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.top .left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand {
  font: 400 clamp(18px, 2.4vw, 24px)/1.2 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--magenta);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 6px;
}
.brand em { font-style: normal; font-family: var(--script); font-size: 1.15em; text-transform: none; color: var(--gold); padding: 0 .25em; }
.tools { display: flex; gap: 8px; }
.ib {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--magenta);
  cursor: pointer;
  box-shadow: 0 6px 16px -10px var(--shadow);
  transition: transform .3s var(--bounce), border-color .25s, background .25s;
}
.ib:hover { background: #fff; border-color: var(--magenta); transform: translateY(-2px); }
.ib svg { width: 20px; height: 20px; }
.eq { display: flex; align-items: flex-end; gap: 2.5px; height: 16px; }
.eq i { width: 2.5px; height: 30%; background: currentColor; border-radius: 2px; transition: height .3s; }
.music.on .eq i { animation: eq 1s ease-in-out infinite alternate; }
.music.on .eq i:nth-child(2) { animation-delay: -.4s; }
.music.on .eq i:nth-child(3) { animation-delay: -.7s; }
.music.on .eq i:nth-child(4) { animation-delay: -.2s; }
@keyframes eq { from { height: 20%; } to { height: 100%; } }

.bottom {
  bottom: 0;
  padding: 0 var(--gr) calc(var(--sb) + 14px) var(--gl);
  display: grid;
  gap: 14px;
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 24px;
}
.cap { display: none; }
.cap-spacer { min-width: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.transport { display: flex; align-items: center; gap: 16px; }
.tb {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--magenta);
  box-shadow: 0 6px 16px -10px var(--shadow);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .3s var(--bounce), border-color .25s, background .25s;
}
.tb:hover { background: #fff; border-color: var(--magenta); transform: translateY(-2px); }
.tb:active { transform: scale(.92); }
.tb svg { width: 20px; height: 20px; }
.tb.play {
  width: 70px;
  height: 70px;
  background: var(--magenta);
  color: #fff;
  border: 0;
  box-shadow: 0 14px 28px -12px rgba(180, 35, 94, .6);
}
.tb.play:hover { background: var(--magenta-deep); transform: scale(1.05); }
.tb.play .ico { width: 24px; height: 24px; }
.ring {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px) !important;
  height: calc(100% + 12px) !important;
  transform: rotate(-90deg);
}
.ring circle { fill: none; stroke: var(--line); stroke-width: 1.2; }
.ring #ring {
  stroke: var(--magenta);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.opts { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill {
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink);
  cursor: pointer;
  font: 600 13px/1 var(--vn);
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background .25s, transform .3s var(--bounce), border-color .25s;
}
.pill small {
  color: var(--magenta);
  font: 600 11px/1 var(--vn);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.pill svg { color: var(--magenta); }
.pill:hover { background: #fff; border-color: var(--magenta); transform: translateY(-2px); }
.count {
  font: 500 13.5px/1 var(--vn);
  color: var(--muted);
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}
.count b { color: var(--magenta); font-weight: 700; }

.strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 4px 4px;
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}
.strip::-webkit-scrollbar { display: none; }
.th {
  flex: none;
  height: 48px;
  padding: 0;
  border: 2px solid var(--paper);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  opacity: .65;
  background: var(--blush);
  box-shadow: 0 4px 12px -6px var(--shadow);
  transition: opacity .35s, transform .4s var(--bounce), border-color .35s;
}
.th img { height: 100%; width: auto; display: block; }
.th:hover { opacity: 1; transform: translateY(-2px); }
.th.on { opacity: 1; border-color: var(--magenta); transform: translateY(-4px); }
.album-progress { height: 2px; background: var(--line-soft); overflow: hidden; }
.album-progress i { display: block; height: 100%; width: 0; background: var(--magenta); transition: width .8s var(--ease); }

.intro {
  position: absolute;
  inset: 0;
  z-index: 8;
  transition: opacity 1.1s ease, visibility 1.1s;
  user-select: text;
  -webkit-user-select: text;
}
.app:not(.is-intro) .intro { opacity: 0; visibility: hidden; pointer-events: none; }
.app:not(.is-intro) .intro * { animation: none !important; }
.intro-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  padding: 0 var(--gr) 0 var(--gl);
}

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: calc(var(--st) + 36px) 0 calc(var(--sb) + 70px);
}
.hero > * { animation: rise .8s var(--ease) both; }
.hero > :nth-child(2) { animation-delay: .08s; }
.hero > :nth-child(3) { animation-delay: .16s; }
.hero > :nth-child(4) { animation-delay: .24s; }
.hero > :nth-child(5) { animation-delay: .32s; }
.hero > :nth-child(6) { animation-delay: .4s; }

.kicker {
  margin: 0;
  font: 600 clamp(16px, 2.4vw, 22px)/1.2 var(--display);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--magenta-deep);
  padding-left: .24em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, .8);
}

.wreath {
  position: relative;
  width: min(440px, 86vw, 48dvh);
  aspect-ratio: 730 / 761;
  container-type: inline-size;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 10px 24px rgba(158, 27, 79, .12));
}
.wreath-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.wreath-text {
  position: relative;
  width: 58%;
  display: grid;
  justify-items: center;
  gap: clamp(4px, 2.2cqi, 10px);
  transform: translateY(-2.5cqi);
}
.names {
  margin: 0;
  font: 400 clamp(32px, 12cqi, 56px)/0.96 var(--script);
  word-spacing: .12em;
  color: #6B0E33;
  display: grid;
  justify-items: center;
  width: 100%;
  -webkit-text-stroke: 0.35px #6B0E33;
  text-shadow: 0 1px 3px rgba(255, 255, 255, .95), 0 0 10px rgba(255, 255, 255, .9);
}
.names .fit { display: block; width: 100%; white-space: nowrap; }
.names .amp { font-size: .48em; line-height: .65; color: var(--gold); -webkit-text-stroke: 0; margin: -2px 0; }
.i-date {
  font: 600 clamp(11.5px, 4cqi, 16px)/1 var(--vn);
  letter-spacing: .22em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  padding-left: .22em;
  text-shadow: 0 1px 2px #fff;
  margin-top: 2px;
}

.invite-label {
  width: min(360px, 82vw);
  font: 600 12.5px/1 var(--vn);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  padding-bottom: 14px;
  border-bottom: 1px dotted rgba(158, 27, 79, .35);
}
.guest-name {
  margin: -4px 0 0;
  max-width: min(520px, 90vw);
  font: 400 clamp(38px, 7vw, 54px)/1.15 var(--script);
  color: var(--magenta-deep);
  overflow-wrap: anywhere;
}
.i-tag {
  margin: 0;
  font: italic 500 19px/1.5 var(--serif);
  color: var(--ink-secondary);
  max-width: 40ch;
}
.i-tag:empty { display: none; }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 28px 0 24px;
  border-radius: 999px;
  border: 1px solid var(--magenta);
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(135deg, #B4235E 0%, #8A1544 100%);
  color: #fff;
  font: 600 13px/1 var(--vn);
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 12px 26px -10px rgba(180, 35, 94, .5);
  transition: transform .35s var(--bounce), background .25s, box-shadow .25s;
}
.start svg { width: 16px; height: 16px; }
.start:hover { transform: translateY(-2px); background: linear-gradient(135deg, #9E1B4F 0%, #781039 100%); box-shadow: 0 16px 32px -10px rgba(180, 35, 94, .6); }
.start:disabled { opacity: .55; cursor: progress; transform: none; }
.start.ghost {
  background: #FFFFFF;
  color: var(--magenta-deep);
  border: 1.5px solid var(--magenta);
  box-shadow: 0 6px 16px -8px var(--shadow);
}
.start.ghost:hover { background: var(--blush); }

.side-pick { display: grid; justify-items: center; gap: 8px; }
.side-label { margin: 0; font: 500 13.5px/1.3 var(--vn); color: var(--muted); }
.side-opts { display: flex; padding: 4px; border: 1px solid var(--line-gold); border-radius: 999px; background: rgba(255, 255, 255, .88); box-shadow: 0 4px 14px -6px var(--shadow); }
.side-opts button {
  height: 36px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--magenta-deep);
  cursor: pointer;
  font: 600 12px/1 var(--vn);
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .25s, color .25s, box-shadow .25s;
}
.side-opts button:hover { background: var(--blush); }
.side-opts button[aria-pressed="true"] { background: linear-gradient(135deg, #B4235E 0%, #8A1544 100%); color: #fff; box-shadow: 0 4px 12px -4px rgba(180, 35, 94, .5); }

.side-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: calc(var(--st) + 20px) var(--gr) calc(var(--sb) + 20px) var(--gl);
  background: rgba(30, 10, 20, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.side-box {
  position: relative;
  overflow: hidden;
  width: min(440px, 100%);
  padding: 56px 28px 44px;
  background: #FFFFFF;
  border-radius: 22px;
  box-shadow: 0 40px 90px -30px rgba(70, 20, 45, .5), 0 10px 26px -14px rgba(70, 20, 45, .25), 0 0 0 1px rgba(184, 136, 70, .25);
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}
.side-box > :not(img, .side-frame) { position: relative; z-index: 1; }
.side-frame {
  position: absolute;
  inset: 12px;
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .85);
  pointer-events: none;
}
.side-wash { position: absolute; width: 90%; left: -30%; bottom: -34%; transform: rotate(200deg); opacity: .3; pointer-events: none; }
.side-flora { position: absolute; width: 28%; opacity: .9; pointer-events: none; }
.side-flora.tr { right: -8%; top: -10%; }
.side-flora.bl { left: -8%; bottom: -10%; width: 24%; transform: scale(-1, -1); opacity: .85; }
.side-kicker { margin: 0; font: 600 11.5px/1 var(--vn); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); padding-left: .24em; }
.side-couple { margin: 2px 0 0; font: 600 clamp(16px, 4vw, 20px)/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--magenta-deep); }
.side-couple em { font: 400 1.5em/1 var(--script); font-style: normal; text-transform: none; letter-spacing: 0; color: var(--gold); padding: 0 .28em 0 .12em; }
.side-orn { display: flex; align-items: center; gap: 10px; width: min(200px, 70%); color: var(--rose); margin: 2px 0 -4px; }
.side-orn span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-gold)); }
.side-orn span:last-child { background: linear-gradient(270deg, transparent, var(--line-gold)); }
.side-orn svg { width: 14px; height: 14px; }
.side-box h2 { margin: 0 0 8px; font: 400 clamp(36px, 9vw, 50px)/1.15 var(--script); color: var(--magenta-deep); white-space: nowrap; }
.side-date { margin: 8px 0 0; font: 600 13px/1 var(--vn); letter-spacing: .24em; color: var(--ink-secondary); font-variant-numeric: tabular-nums; padding-left: .24em; }
.side-date:empty { display: none; }
.side-big { display: grid; gap: 12px; width: min(280px, 100%); }
.side-big button {
  height: 52px;
  border-radius: 999px;
  border: 1px solid var(--magenta);
  background: linear-gradient(135deg, #B4235E 0%, #8A1544 100%);
  color: #fff;
  cursor: pointer;
  font: 600 13px/1 var(--vn);
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 12px 24px -10px rgba(180, 35, 94, .5);
  transition: transform .35s var(--bounce), background .25s;
}
.side-big button + button { background: #FFFFFF; color: var(--magenta-deep); border: 1.5px solid var(--magenta); box-shadow: 0 4px 12px -6px var(--shadow); }
.side-big button:hover { transform: translateY(-2px); }
@keyframes fade-in { from { opacity: 0; } }

.i-stats { display: grid; justify-items: center; gap: 6px; min-height: 20px; }
.cd {
  font: 500 12.5px/1 var(--vn);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.cd b {
  font: 700 32px/1 var(--vn);
  color: var(--magenta-deep);
  margin: 0 .25em;
  vertical-align: -3px;
}
.count-pill { font: 500 14px/1 var(--vn); color: var(--muted); }
.count-pill b { color: var(--magenta-deep); font-weight: 700; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(var(--sb) + 18px);
  transform: translateX(-50%);
  color: var(--magenta);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
.scroll-cue svg { width: 26px; height: 26px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

.invite {
  position: relative;
  overflow: hidden;
  max-width: 920px;
  width: 100%;
  margin: 0 auto calc(var(--sb) + 64px);
  padding: clamp(52px, 7vw, 84px) clamp(20px, 6vw, 72px) clamp(44px, 6vw, 68px);
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFDFB 45%, #FCF6F8 100%);
  border-radius: 20px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: clamp(26px, 4vw, 38px);
  scroll-margin-top: 24px;
  text-align: center;
}
.invite > :not(img, .inv-frame) { position: relative; z-index: 1; }
.inv-frame {
  position: absolute;
  inset: 12px;
  border: 1px solid var(--line-gold);
  border-radius: 12px;
  pointer-events: none;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .85);
}
.inv-wash { position: absolute; width: 75%; max-width: 600px; left: -20%; bottom: -22%; transform: rotate(200deg); opacity: .3; pointer-events: none; }
.inv-flora { position: absolute; width: clamp(100px, 15vw, 150px); opacity: .95; pointer-events: none; z-index: 2; }
.inv-flora.tr { top: -6px; right: -6px; }
.inv-flora.bl { bottom: -6px; left: -6px; transform: rotate(180deg); }

.inv-crest {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gold);
  width: min(220px, 70%);
  margin: 0 auto;
}
.inv-crest span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-gold)); }
.inv-crest span:last-child { background: linear-gradient(270deg, transparent, var(--line-gold)); }
.inv-crest svg { width: 18px; height: 18px; color: var(--magenta); }

.inv-head {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: 600 clamp(14px, 1.8vw, 17px)/1.4 var(--display);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--magenta-deep);
}

.inv-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(340px, 85%);
  margin: 0 auto;
  color: var(--gold);
}
.inv-divider span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-gold), transparent); }
.inv-divider svg { width: 18px; height: 18px; color: var(--rose); opacity: .9; }

.fam {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px clamp(18px, 4vw, 40px);
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}
.fam-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 22px 20px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  box-shadow: 0 4px 16px -8px var(--shadow);
  transition: background .25s, border-color .25s;
}
.fam-col:hover { background: #FFFFFF; border-color: var(--line-gold); }
.fam-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--blush);
  border: 1px solid var(--line-soft);
  font: 600 11.5px/1 var(--vn);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--magenta-deep);
}
.fam-parents {
  display: grid;
  gap: 4px;
  font: 600 clamp(16px, 1.8vw, 18px)/1.5 var(--vn);
  color: var(--ink);
  letter-spacing: .02em;
}
.fam-addr {
  display: block;
  text-align: center;
  font: 500 13.5px/1.4 var(--vn);
  color: var(--muted);
  white-space: nowrap;
}
.fam-addr svg {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 4px;
  color: var(--rose);
}

.lead {
  margin: 0 auto;
  max-width: 44ch;
  font: italic 500 clamp(17px, 2.2vw, 21px)/1.6 var(--serif);
  color: var(--ink-secondary);
  text-wrap: balance;
}

.couple {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: end;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  text-align: left;
}
.couple .p { min-width: 0; }
.couple .p::after {
  content: "";
  display: block;
  width: min(210px, 72%);
  height: 1px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--gold), rgba(184, 136, 70, .18));
}
.couple .p1 { grid-column: 1 / 3; grid-row: 1; }
.couple .and {
  grid-column: 1 / -1;
  grid-row: 2;
  padding: 0 .3em;
  font: 400 clamp(40px, 6vw, 64px)/1 var(--script);
  color: var(--rose);
  align-self: center;
  justify-self: center;
  margin: .12em 0 .05em;
}
.couple .p2 { grid-column: 2 / 4; grid-row: 3; text-align: right; }
.couple .p2::after {
  margin-left: auto;
  background: linear-gradient(270deg, var(--gold), rgba(184, 136, 70, .18));
}
.couple small {
  display: block;
  margin-bottom: clamp(16px, 2.5vw, 24px);
  font: 400 11.5px/1 var(--display);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
}
.couple b {
  display: block;
  font: 300 clamp(38px, 6.4vw, 70px)/1 var(--display);
  text-transform: uppercase;
  color: var(--magenta);
  letter-spacing: .01em;
}
.couple b span { display: block; white-space: nowrap; }

.events {
  display: grid;
  grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr));
  gap: 24px;
  max-width: 840px;
  width: 100%;
  margin: 0 auto;
}
.ev-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: clamp(28px, 4.5vw, 36px) clamp(20px, 4vw, 32px);
  background: #FFFFFF;
  border: 1px solid rgba(184, 136, 70, .35);
  border-radius: 20px;
  box-shadow: 0 10px 28px -12px var(--shadow), 0 0 0 1px rgba(158, 27, 79, .05);
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--bounce), box-shadow .3s;
}
.ev-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -14px var(--shadow); }
.ev-header { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.ev-side-tag {
  display: inline-block;
  font: 600 11px/1 var(--vn);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--magenta);
  background: var(--blush);
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
}
.ev-header h4, .ev-title {
  margin: 0;
  font: 600 clamp(21px, 2.8vw, 26px)/1.25 var(--display);
  color: var(--magenta-deep);
  letter-spacing: .02em;
}
.ev-orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(160px, 60%);
  color: var(--rose);
  opacity: .75;
}
.ev-orn span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-gold), transparent);
}
.ev-orn svg {
  width: 12px;
  height: 12px;
  color: var(--magenta);
  flex-shrink: 0;
}
.ev-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  width: 100%;
}
.ev-kicker {
  display: inline-block;
  font: 600 11px/1 var(--vn);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2px;
}
.ev-time {
  font: 400 clamp(40px, 6.4vw, 52px)/1.05 var(--display);
  color: var(--magenta-deep);
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 3px;
}
.ev-date {
  font: 600 clamp(15px, 2vw, 17px)/1.4 var(--vn);
  color: var(--ink);
  letter-spacing: .02em;
}
.ev-lunar {
  font: italic 500 13.5px/1.3 var(--serif);
  color: var(--muted);
}
.ev-place {
  font: 600 clamp(17px, 2.2vw, 19px)/1.3 var(--vn);
  color: var(--magenta-deep);
  letter-spacing: .01em;
}
.ev-addr {
  display: block;
  text-align: center;
  font: 500 clamp(10px, 2.5vw, 13px)/1.4 var(--vn);
  color: var(--ink-secondary);
  width: 100%;
  margin: 2px auto 0;
  white-space: nowrap;
}
.ev-addr svg {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 4px;
  color: var(--rose);
}
.ev-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px dashed rgba(184, 136, 70, .25);
}
.btn-map {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1.5px solid var(--magenta);
  color: var(--magenta-deep);
  font: 600 12px/1 var(--vn);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px -4px rgba(158, 27, 79, .22);
  transition: background .25s, color .25s, transform .3s var(--bounce);
}
.btn-map:hover { background: var(--magenta); color: #fff; transform: translateY(-2px); }
.btn-map svg { flex-shrink: 0; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.qr svg {
  width: 92px;
  height: 92px;
  padding: 8px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line-gold);
  box-shadow: 0 6px 16px -8px var(--shadow);
}
.qr svg rect { fill: #fff; }
.qr svg path { fill: var(--ink); }
.qr small { font: 500 12px/1 var(--vn); color: var(--muted); letter-spacing: .02em; }

.closing {
  margin: 0 auto;
  max-width: 44ch;
  font: italic 500 clamp(16px, 1.8vw, 19px)/1.7 var(--serif);
  color: var(--ink-secondary);
  text-wrap: balance;
}
.invite .start { justify-self: center; }

.card {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  padding: calc(var(--st) + 24px) var(--gr) calc(var(--sb) + 24px) var(--gl);
  background: rgba(248, 242, 241, .9);
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s;
}
.card.show { opacity: 1; visibility: visible; }
.card-inner {
  position: relative;
  overflow: hidden;
  max-width: 600px;
  width: 100%;
  padding: 64px clamp(22px, 6vw, 56px) 48px;
  background: var(--paper);
  border-radius: 4px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line-soft);
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
  transform: translateY(14px);
  transition: transform 1.2s var(--ease);
}
.card.show .card-inner { transform: none; }
.card-inner > :not(img) { position: relative; z-index: 1; }
.card-flora { position: absolute; width: 18%; right: -3%; top: -10%; opacity: .88; pointer-events: none; }
.card-bit { position: absolute; width: 12%; left: -2%; bottom: -5%; opacity: .85; transform: scaleX(-1) rotate(-12deg); pointer-events: none; }
.card-wash { position: absolute; width: 70%; left: -22%; bottom: -30%; transform: rotate(200deg); opacity: .5; pointer-events: none; }
.card h2 { margin: 0; font: 300 clamp(36px, 6.5vw, 64px)/1.15 var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--magenta); text-wrap: balance; }
.end-sub { margin: 0; font: 400 clamp(15px, 1.8vw, 17px)/1.65 var(--vn); color: var(--ink-secondary); max-width: 44ch; }
.card .actions { margin-top: 8px; }

.grid {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  background: var(--bg);
  padding: calc(var(--st) + 24px) var(--gr) calc(var(--sb) + 48px) var(--gl);
  opacity: 0;
  transition: opacity .45s;
}
.grid.open { opacity: 1; }
.grid-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto 28px;
}
.grid-head h2 { margin: 0; font: 400 clamp(26px, 4vw, 36px)/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--magenta); }
.grid-head .left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.cells { columns: 4 230px; column-gap: 18px; max-width: 1280px; margin: 0 auto; }
.cell {
  display: block;
  width: 100%;
  margin: 0 0 18px;
  padding: 8px 8px 30px;
  border: 0;
  background: var(--paper);
  cursor: pointer;
  position: relative;
  break-inside: avoid;
  border-radius: 3px;
  box-shadow: 0 14px 28px -18px var(--shadow), 0 0 0 1px var(--line-soft);
  transition: transform .4s var(--bounce), box-shadow .3s;
}
.cell:hover { transform: translateY(-4px); box-shadow: 0 22px 36px -18px var(--shadow), 0 0 0 1px var(--line); }
.cell img { width: 100%; height: auto; display: block; opacity: 0; transition: opacity .6s; }
.cell img.ld { opacity: 1; }
.cell span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9px;
  font: 600 12px/1 var(--vn);
  letter-spacing: .1em;
  color: var(--magenta);
}
.cell.on { box-shadow: 0 0 0 2px var(--magenta), 0 14px 28px -18px var(--shadow); }

.empty {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 8px;
  padding: 0 var(--gr) 0 var(--gl);
  background: var(--bg);
}
.empty h2 { margin: 0; font: 400 36px/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--magenta); }
.empty p { margin: 0; color: var(--muted); max-width: 44ch; }
.empty code { color: var(--magenta); }
.toast {
  position: absolute;
  left: 50%;
  top: calc(var(--st) + 80px);
  transform: translateX(-50%);
  z-index: 12;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--magenta);
  color: #fff;
  font: 600 12px/1 var(--vn);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 10px 24px -10px var(--magenta);
}

@media (prefers-reduced-motion: reduce) {
  .kb, .music.on .eq i, .scroll-cue svg { animation: none; }
  .layer { transition: opacity .5s ease; }
  .app .layer.prep, .app .layer.leave { transform: none !important; }
  .cap.swap > *, .hero > * { animation: none; }
  .petals { display: none; }
}

@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; gap: 12px; }
  .transport { justify-content: center; }
  .opts { justify-content: center; }
  .tb.play { width: 62px; height: 62px; }
  .th { height: 42px; }
  .frame { padding: 10px; }
  .frame::after { inset: 5px; }
  .fsprig { width: 88px; top: -44px; left: -34px; }
  .events { grid-template-columns: 1fr; gap: 20px; }
  .fam { grid-template-columns: 1fr; gap: 14px; }
  .fam-col { padding: 18px 16px; }
  .btn-map { width: 100%; max-width: 290px; }
  .wash { width: clamp(110px, 30vw, 160px); }
  .wash.tl { top: -1%; left: -1%; opacity: .75; }
  .wash.br { bottom: -1%; right: -1%; opacity: .72; }
  .inv-flora { width: clamp(75px, 20vw, 110px); }
  .inv-flora.tr { right: -4px; top: -4px; }
  .inv-flora.bl { left: -4px; bottom: -4px; }
}

@media (max-width: 600px) {
  .grid { padding-top: calc(var(--st) + 14px); }
  .grid-head { margin-bottom: 18px; }
  .grid-head h2 { font-size: 38px; }
  .grid-head .left { gap: 12px; }
  .grid-head .pill span { display: none; }
  .cells { columns: 2; column-gap: 12px; }
  .cell { margin-bottom: 12px; padding: 6px 6px 24px; }
  .cell span { bottom: 7px; font-size: 11px; }
  .pill small { display: none; }
  .pill { padding: 0 13px; }
  .count { margin-right: 2px; }
  .top { padding-top: calc(var(--st) + 12px); }
  .brand { font-size: 19px; }
  .layer { padding-top: calc(var(--st) + 80px); }
  .pic img { max-height: calc(100dvh - var(--st) - 96px - var(--bottom-h) - 50px); }
  .hero { gap: 14px; }
  .actions .start { width: min(100%, 290px); }
  .i-tag { font-size: 18px; }
  .couple b { font-size: clamp(34px, 11vw, 46px); }
  .inv-head { font-size: 13px; letter-spacing: .2em; }
  .invite { padding: 36px 16px 32px; border-radius: 16px; gap: 24px; }
  .inv-frame { inset: 8px; border-radius: 10px; }
  .ev-card { padding: 22px 12px; gap: 14px; }
  .ev-time { font-size: clamp(34px, 10vw, 44px); }
  .fam-parents { font-size: 16px; }
  .fam-addr { font-size: 13px; }
  .ev-addr { font-size: clamp(9px, 2.4vw, 11.5px); letter-spacing: -0.01em; }
}

@media (max-width: 380px) {
  .transport { gap: 12px; }
  .tb { width: 44px; height: 44px; }
  .tb.play { width: 56px; height: 56px; }
  .brand { font-size: 16.5px; }
  .ib { width: 40px; height: 40px; }
  .fam-col p { font-size: 15px; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .row { gap: 16px; }
  .opts { gap: 6px; }
  .pill small { display: none; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .top { padding-top: calc(var(--st) + 8px); }
  .bottom { gap: 8px; padding-bottom: calc(var(--sb) + 8px); }
  .row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
  .cap { text-align: left; justify-self: start; }
  .cap .note, .strip { display: none; }
  .transport { gap: 10px; }
  .tb { width: 40px; height: 40px; }
  .tb.play { width: 52px; height: 52px; }
  .tb.play .ico { width: 20px; height: 20px; }
  .ring { inset: -4px; width: calc(100% + 8px) !important; height: calc(100% + 8px) !important; }
  .opts { justify-content: flex-end; }
  .pill { height: 32px; }
  .pill small { display: none; }
  .ib { width: 36px; height: 36px; }
  .brand { font-size: 17px; }
  .layer { padding-top: calc(var(--st) + 56px); padding-bottom: calc(var(--bottom-h) + 8px); }
  .frame { padding: 7px; }
  .frame::after { inset: 4px; }
  .fsprig { width: 66px; top: -32px; left: -24px; }
  .pic img { max-height: calc(100dvh - var(--st) - 64px - var(--bottom-h) - 14px); }
  .app.idle .layer { padding-top: calc(var(--st) + 22px); padding-bottom: calc(var(--sb) + 14px); }
  .app.idle .pic img { max-height: calc(100dvh - var(--st) - var(--sb) - 36px - 42px); }
  .hero { min-height: auto; padding: calc(var(--st) + 20px) 0 calc(var(--sb) + 30px); gap: 10px; }
  .wreath { width: min(320px, 66dvh); }
  .scroll-cue { display: none; }
  .card-inner { padding: 36px 24px 28px; gap: 10px; }
  .card h2 { font-size: 42px; }
}

@media (min-width: 1400px) {
  .brand { font-size: 26px; }
  .th { height: 54px; }
  .cells { columns: 5 240px; }
  .wreath { width: min(500px, 50dvh); }
}
