:root {
  --ivory: #fbf7f0;
  --ivory-deep: #f3ebe0;
  --crimson: #9e2326;
  --crimson-soft: #b83b3e;
  --gold: #c69f63;
  --gold-dark: #936f38;
  --ink: #2b221e;
  --ink-muted: #6e6058;
  --dusk-bg: #241b17;
  --dusk-card: #332620;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-display: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1c1613;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.stage-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(198, 159, 99, 0.16), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(158, 35, 38, 0.18), transparent 50%),
    linear-gradient(135deg, #1b1512 0%, #2a201b 55%, #18120f 100%);
  z-index: 0;
}

.workspace {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 18px;
}

/* Mobile H5 Phone Shell */
.phone-shell {
  position: relative;
  width: min(408px, 100%);
  height: min(832px, 94dvh);
  border-radius: 32px;
  overflow: hidden;
  background: var(--ivory);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 240, 215, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  user-select: none;
}

@media (max-width: 760px) {
  .workspace {
    padding: 0;
  }
  .phone-shell {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .desktop-panel {
    display: none !important;
  }
}

/* Music Button */
.music-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 40;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  background: rgba(35, 25, 22, 0.45);
  backdrop-filter: blur(8px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.music-btn.playing .music-disc {
  animation: spinSlow 4.5s linear infinite;
}

.music-btn:not(.playing)::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.85);
  transform: rotate(-45deg);
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

/* Petal Canvas */
.petal-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 25;
}

/* Right-side Page Dots */
.page-dots {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.page-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  border: none;
  padding: 0;
  background: rgba(198, 159, 99, 0.42);
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-dot.active {
  height: 18px;
  background: var(--crimson);
  box-shadow: 0 0 6px rgba(158, 35, 38, 0.45);
}

/* H5 Viewport & Track */
.h5-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

.h5-track {
  width: 100%;
  height: 100%;
  transition: transform 0.68s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.page {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page-ivory {
  background:
    radial-gradient(circle at 50% 0%, rgba(198, 159, 99, 0.12), transparent 55%),
    linear-gradient(180deg, #fcf9f3 0%, #f5ede1 100%);
}

.page-crimson-ivory {
  background:
    radial-gradient(circle at 15% 15%, rgba(158, 35, 38, 0.08), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(198, 159, 99, 0.14), transparent 45%),
    linear-gradient(180deg, #fcf7f2 0%, #f4e8df 100%);
}

.page-dusk {
  background:
    radial-gradient(circle at 50% 15%, rgba(212, 148, 86, 0.2), transparent 55%),
    linear-gradient(180deg, #2b201a 0%, #1c1512 100%);
  color: #f8efe4;
}

/* Entrance Animations */
.anim-el {
  opacity: 0;
  transition: opacity 0.72s ease, transform 0.78s cubic-bezier(0.22, 1, 0.36, 1);
}

.anim-el[data-anim="fade-up"] { transform: translateY(24px); }
.anim-el[data-anim="fade-down"] { transform: translateY(-20px); }
.anim-el[data-anim="fade-left"] { transform: translateX(24px); }
.anim-el[data-anim="fade-right"] { transform: translateX(-24px); }
.anim-el[data-anim="zoom-in"] { transform: scale(0.93); }

.page.is-active .anim-el {
  opacity: 1;
  transform: none;
}

.page.is-active .anim-el:nth-child(2) { transition-delay: 0.12s; }
.page.is-active .anim-el:nth-child(3) { transition-delay: 0.22s; }
.page.is-active .anim-el:nth-child(4) { transition-delay: 0.32s; }

/* Up Swipe Hint */
.swipe-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  animation: floatUpCue 1.8s ease-in-out infinite;
}

.swipe-hint .chevron {
  width: 10px;
  height: 10px;
  border-top: 1.8px solid rgba(255, 255, 255, 0.88);
  border-left: 1.8px solid rgba(255, 255, 255, 0.88);
  transform: rotate(45deg);
  margin-bottom: -5px;
}

.swipe-hint.dark .chevron {
  border-color: rgba(147, 111, 56, 0.72);
}

.swipe-hint .hint-text {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.86);
}

@keyframes floatUpCue {
  0%, 100% { transform: translate(-50%, 2px); opacity: 0.55; }
  50% { transform: translate(-50%, -5px); opacity: 1; }
}

/* ==================== PAGE 1: COVER ==================== */
.cover-bg {
  position: absolute;
  inset: 0;
}

.cover-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.page.is-active .ken-burns {
  animation: kenBurns 16s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.07); }
}

.cover-scrim-top {
  position: absolute;
  inset: 0 0 auto 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(24, 18, 15, 0.62) 0%, rgba(24, 18, 15, 0) 100%);
}

.cover-scrim-bottom {
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(0deg, rgba(22, 16, 14, 0.88) 0%, rgba(22, 16, 14, 0.48) 55%, rgba(22, 16, 14, 0) 100%);
}

.cover-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 22px 58px;
  color: #fff;
}

.cover-top {
  text-align: center;
  padding-top: 6px;
}

.en-kicker {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 4px;
  color: rgba(255, 241, 214, 0.92);
}

.seal-badge {
  width: 44px;
  height: 44px;
  margin: 10px auto 8px;
  border-radius: 50%;
  background: rgba(158, 35, 38, 0.92);
  border: 1.5px solid rgba(241, 212, 162, 0.85);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.seal-char {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: #fcebd0;
}

.cn-subkicker {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(255, 246, 232, 0.9);
}

.cover-card {
  background: rgba(28, 21, 18, 0.45);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(235, 202, 149, 0.42);
  border-radius: 20px;
  padding: 20px 18px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
}

.couple-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 6.2vw, 29px);
  font-weight: 600;
  letter-spacing: 2px;
  color: #fff9f0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.heart-amp {
  font-size: 18px;
  color: #e66b6e;
  animation: heartbeat 1.7s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.18); }
  45% { transform: scale(1); }
  65% { transform: scale(1.12); }
}

.gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px auto;
  width: 78%;
}

.gold-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(235, 202, 149, 0.8), transparent);
}

.gold-divider i {
  font-style: normal;
  font-size: 10px;
  color: #e6c289;
}

.cover-date {
  font-family: var(--font-serif);
  font-size: 13.5px;
  color: #f7e7ce;
  letter-spacing: 0.8px;
}

.cover-place {
  margin-top: 5px;
  font-size: 12px;
  color: rgba(255, 244, 228, 0.85);
}

.open-btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 99px;
  border: 1px solid rgba(242, 212, 160, 0.72);
  background: linear-gradient(135deg, rgba(158, 35, 38, 0.92), rgba(188, 56, 58, 0.92));
  color: #fff7ec;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(158, 35, 38, 0.45);
}

/* ==================== SHARED INNER LAYOUT ==================== */
.page-inner {
  position: relative;
  z-index: 5;
  height: 100%;
  padding: 24px 22px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.corner-ornament {
  position: absolute;
  width: 56px;
  height: 56px;
  border: 1.5px solid rgba(198, 159, 99, 0.35);
  pointer-events: none;
  z-index: 2;
}

.corner-ornament.top-left {
  top: 14px;
  left: 14px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 12px;
}

.corner-ornament.top-right {
  top: 14px;
  right: 14px;
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 12px;
}

.section-header {
  text-align: center;
  flex-shrink: 0;
}

.en-label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold-dark);
}

.en-label.crimson { color: var(--crimson); }
.en-label.gold { color: #e2be84; }

.cn-heading {
  margin-top: 3px;
  font-family: var(--font-serif);
  font-size: clamp(19px, 5vw, 22px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 1.5px;
}

.cn-heading.light { color: #fbf2e4; }

.poetic-sub {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.poetic-sub.light { color: rgba(248, 239, 228, 0.74); }

/* ==================== PAGE 2: INTRO ==================== */
.intro-layout {
  justify-content: space-evenly;
}

.arch-photo-wrap {
  position: relative;
  width: 72%;
  max-width: 268px;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arch-frame {
  width: 100%;
  height: 100%;
  max-height: 340px;
  border-radius: 140px 140px 14px 14px;
  padding: 6px;
  border: 1.5px solid rgba(198, 159, 99, 0.65);
  background: #fff;
  box-shadow: 0 14px 30px rgba(68, 46, 32, 0.12);
}

.arch-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 134px 134px 10px 10px;
  display: block;
}

.floating-tag {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ivory);
  border: 1px solid rgba(198, 159, 99, 0.55);
  padding: 3px 12px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold-dark);
  white-space: nowrap;
}

.couple-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
  flex-shrink: 0;
}

.person-box {
  text-align: center;
  min-width: 96px;
}

.role-pill {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--gold-dark);
}

.person-name {
  display: block;
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink);
  letter-spacing: 1.5px;
}

.pair-knot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--crimson);
  color: #fcebd0;
  font-family: var(--font-serif);
  font-size: 14px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(158, 35, 38, 0.28);
}

.letter-box {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(198, 159, 99, 0.36);
  border-radius: 14px;
  padding: 12px 15px;
  text-align: center;
  flex-shrink: 0;
}

.letter-box p {
  font-family: var(--font-serif);
  font-size: 12.5px;
  line-height: 1.75;
  color: #483b34;
}

/* ==================== PAGE 3: CALENDAR & COUNTDOWN ==================== */
.calendar-layout {
  justify-content: space-evenly;
  gap: 10px;
}

.wide-hero-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 220px;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid rgba(198, 159, 99, 0.5);
  box-shadow: 0 10px 24px rgba(68, 46, 32, 0.14);
  flex-shrink: 0;
}

.wide-hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wide-hero-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(36, 27, 23, 0.65);
  backdrop-filter: blur(6px);
  color: #f8e6c8;
  padding: 4px 10px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 2px;
}

.calendar-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(198, 159, 99, 0.42);
  border-radius: 16px;
  padding: 13px 14px;
  box-shadow: 0 8px 22px rgba(68, 46, 32, 0.08);
  flex: 0 0 auto;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(198, 159, 99, 0.42);
}

.cal-month {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-right: 8px;
}

.cal-lunar {
  font-size: 11px;
  color: var(--ink-muted);
}

.cal-auspicious {
  font-family: var(--font-serif);
  font-size: 11px;
  color: var(--crimson);
  border: 1px solid rgba(158, 35, 38, 0.45);
  background: rgba(158, 35, 38, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
}

.cal-weekdays,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 5px 3px;
}

.cal-weekdays span {
  font-size: 11px;
  color: var(--gold-dark);
  padding-bottom: 4px;
}

.cal-day {
  position: relative;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  color: var(--ink);
  border-radius: 50%;
}

.cal-day.empty { visibility: hidden; }

.cal-day.wedding-day {
  background: var(--crimson);
  color: #fff6ea;
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(158, 35, 38, 0.22);
  animation: pulseSeal 2s ease-in-out infinite;
}

.cal-day.wedding-day::after {
  content: "囍";
  position: absolute;
  top: -5px;
  right: -6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff6ea;
  border: 1px solid var(--crimson);
  display: grid;
  place-items: center;
  font-size: 8px;
  line-height: 1;
  color: var(--crimson);
  font-family: var(--font-serif);
}

@keyframes pulseSeal {
  0%, 100% { box-shadow: 0 0 0 2px rgba(158, 35, 38, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(158, 35, 38, 0.12); }
}

.countdown-card {
  background: linear-gradient(135deg, #2e231e, #413028);
  color: #faeedc;
  border-radius: 16px;
  padding: 12px 14px;
  text-align: center;
  border: 1px solid rgba(198, 159, 99, 0.4);
  flex-shrink: 0;
}

.cd-label {
  font-size: 11px;
  letter-spacing: 3px;
  color: #e4c188;
  margin-bottom: 8px;
}

.cd-boxes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cd-unit {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(235, 202, 149, 0.28);
  border-radius: 10px;
  min-width: 54px;
  padding: 6px 4px;
}

.cd-unit b {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
  color: #fff8ee;
}

.cd-unit span {
  font-size: 10px;
  color: rgba(248, 232, 206, 0.78);
}

.cd-sep {
  font-weight: 700;
  color: #d3ad73;
}

/* ==================== GALLERIES ==================== */
.gallery-layout {
  justify-content: space-between;
  gap: 10px;
}

.photo-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  padding: 4px;
  border: 1px solid rgba(198, 159, 99, 0.42);
  box-shadow: 0 8px 20px rgba(48, 34, 24, 0.1);
}

.photo-card img,
.photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
  display: block;
  cursor: zoom-in;
}

/* Page 4 Collage 1 */
.collage-grid-1 {
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.collage-side-col {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  min-height: 0;
}

.collage-grid-1 .photo-card {
  height: 100%;
  min-height: 0;
}

.photo-strip {
  position: relative;
  height: 124px;
  border-radius: 12px;
  overflow: hidden;
  padding: 4px;
  background: #fff;
  border: 1px solid rgba(198, 159, 99, 0.42);
  box-shadow: 0 6px 16px rgba(48, 34, 24, 0.08);
  flex-shrink: 0;
}

.photo-strip img {
  object-position: center 48%;
}

.photo-strip figcaption {
  position: absolute;
  right: 10px;
  bottom: 8px;
  background: rgba(24, 18, 15, 0.6);
  color: #fff6ea;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  pointer-events: none;
}

/* Page 5 Collage 2 */
.collage-grid-2 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.cat-hero {
  flex: 1.25;
  min-height: 0;
}

.collage-bottom-row {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.collage-bottom-row .photo-card {
  height: 100%;
  min-height: 0;
}

/* Page 6 Dusk Sunset */
.dusk-hero-card {
  position: relative;
  flex: 1.35;
  min-height: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.dusk-hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  cursor: zoom-in;
}

.dusk-gold-frame {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(235, 198, 138, 0.55);
  border-radius: 12px;
  pointer-events: none;
}

.dusk-wide-card {
  flex: 0.72;
  min-height: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(235, 198, 138, 0.4);
}

.dusk-wide-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.dusk-quote {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 1.5px;
  color: #e9c996;
  flex-shrink: 0;
}

/* Page 7 Polaroid Party */
.polaroid-stack {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.polaroid {
  background: #fff;
  padding: 7px 7px 26px;
  border-radius: 8px;
  border: 1px solid rgba(198, 159, 99, 0.35);
  box-shadow: 0 10px 24px rgba(45, 32, 22, 0.14);
  position: relative;
}

.polaroid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  cursor: zoom-in;
}

.polaroid figcaption {
  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold-dark);
}

.p-main {
  flex: 1.15;
  min-height: 0;
  width: 86%;
  margin: 0 auto;
  transform: rotate(-1.2deg);
}

.polaroid-row {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.p-left { transform: rotate(-2deg); min-height: 0; }
.p-right { transform: rotate(2deg); min-height: 0; }

/* ==================== PAGE 8: VENUE & SCHEDULE ==================== */
.venue-layout {
  justify-content: space-evenly;
}

.venue-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(198, 159, 99, 0.45);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(62, 42, 28, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.venue-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.v-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(158, 35, 38, 0.08);
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.venue-row strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--crimson);
  margin-bottom: 2px;
}

.venue-row p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}

.venue-row .muted {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.venue-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
  padding-top: 4px;
}

.btn-outline,
.btn-crimson,
.btn-glass {
  border-radius: 99px;
  padding: 10px 14px;
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.2s ease;
}

.btn-outline:active,
.btn-crimson:active,
.btn-glass:active {
  transform: scale(0.97);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-dark);
}

.btn-crimson {
  background: linear-gradient(135deg, var(--crimson), var(--crimson-soft));
  border: none;
  color: #fff8ee;
  box-shadow: 0 6px 16px rgba(158, 35, 38, 0.3);
}

.btn-crimson.wide {
  width: 100%;
  padding: 12px 16px;
  font-weight: 500;
  letter-spacing: 1px;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 240, 215, 0.45);
  color: #fff7eb;
  backdrop-filter: blur(6px);
}

.timeline-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(198, 159, 99, 0.36);
  border-radius: 16px;
  padding: 15px 18px;
}

.timeline-title {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--gold-dark);
  margin-bottom: 12px;
}

.timeline-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.timeline-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.t-time {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--crimson);
  width: 46px;
}

.t-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 159, 99, 0.22);
}

.t-desc {
  color: var(--ink);
  font-family: var(--font-serif);
}

.venue-note {
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted);
  font-family: var(--font-serif);
}

/* ==================== PAGE 9: ENDING & RSVP ==================== */
.ending-bg {
  position: absolute;
  inset: 0;
}

.ending-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.ending-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 16, 14, 0.48) 0%, rgba(22, 16, 14, 0.35) 45%, rgba(22, 16, 14, 0.88) 100%);
}

.ending-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 58px 18px 26px;
}

.danmaku-stage {
  position: relative;
  height: 92px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.danmaku-lane {
  display: flex;
  gap: 12px;
  white-space: nowrap;
  width: max-content;
  animation: danmakuScroll 26s linear infinite;
}

.danmaku-lane:nth-child(2) {
  animation-duration: 32s;
  animation-delay: -9s;
}

@keyframes danmakuScroll {
  0% { transform: translateX(60px); }
  100% { transform: translateX(-50%); }
}

.danmaku-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(24, 18, 15, 0.56);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(242, 212, 160, 0.38);
  color: #fff6e8;
  font-size: 12px;
}

.danmaku-pill b {
  color: #f0ca8a;
  font-weight: 500;
}

.ending-card {
  background: rgba(28, 21, 18, 0.58);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(235, 202, 149, 0.45);
  border-radius: 22px;
  padding: 20px 18px;
  text-align: center;
  color: #fff7eb;
}

.monogram {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 3px;
  color: #ecd09c;
  padding: 4px 14px;
  border-bottom: 1px solid rgba(236, 208, 156, 0.45);
  margin-bottom: 8px;
}

.ending-card h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 2px;
}

.ending-date {
  margin-top: 5px;
  font-size: 12px;
  color: rgba(255, 240, 218, 0.86);
}

.ending-wish {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 12.5px;
  color: #e6c68f;
}

.ending-btns {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ending-sub-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ==================== DESKTOP PANEL ==================== */
.desktop-panel {
  width: 340px;
  color: #f6ede2;
}

.panel-card {
  background: rgba(38, 29, 24, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 190, 132, 0.28);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4);
}

.panel-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #f0ca8a;
  background: rgba(198, 159, 99, 0.14);
  border: 1px solid rgba(198, 159, 99, 0.35);
  padding: 3px 10px;
  border-radius: 99px;
}

.panel-header h1 {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 1.5px;
}

.panel-header p {
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(246, 237, 226, 0.8);
}

.panel-addr {
  line-height: 1.5;
  color: rgba(235, 202, 149, 0.88) !important;
}

.panel-section-title {
  font-size: 12px;
  color: #d9b882;
  margin-bottom: 10px;
}

.panel-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.panel-nav-btn {
  padding: 7px 6px;
  border-radius: 9px;
  border: 1px solid rgba(255, 240, 215, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #f3e8da;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.panel-nav-btn.active {
  background: var(--crimson);
  border-color: rgba(240, 202, 138, 0.65);
  color: #fff;
}

.panel-step-btns,
.panel-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.panel-tools {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.panel-step-btns button,
.panel-tools button {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(226, 190, 132, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #f8efe4;
  font-size: 12.5px;
  cursor: pointer;
}

.panel-step-btns button:hover,
.panel-tools button:hover,
.panel-nav-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.panel-tip {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(246, 237, 226, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

/* ==================== MODALS & TOAST ==================== */
.toast {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  z-index: 60;
  background: rgba(28, 21, 18, 0.9);
  color: #fff7eb;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal-backdrop[hidden] { display: none; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 11, 9, 0.78);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.lightbox-box {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-box img {
  max-width: 90vw;
  max-height: 76vh;
  border-radius: 12px;
  border: 1.5px solid rgba(235, 202, 149, 0.5);
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 10px;
  font-family: var(--font-serif);
  color: #faeedc;
  font-size: 14px;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(24, 18, 15, 0.85);
  color: #fff;
  cursor: pointer;
}

.lightbox-nav {
  margin-top: 10px;
  display: flex;
  gap: 16px;
}

.lightbox-nav button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(235, 202, 149, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.sheet-box {
  width: min(390px, 100%);
  background: var(--ivory);
  color: var(--ink);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(198, 159, 99, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  max-height: 86vh;
  overflow-y: auto;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sheet-head h3 {
  font-family: var(--font-serif);
  font-size: 18px;
}

.sheet-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.sheet-addr {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.map-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-link-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 11px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(198, 159, 99, 0.45);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.map-link-btn:hover {
  background: #faf2e6;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rsvp-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(198, 159, 99, 0.5);
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rsvp-records {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rsvp-record-item {
  background: #fff;
  border: 1px solid rgba(198, 159, 99, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.rsvp-record-item strong {
  color: var(--crimson);
}

.rsvp-record-meta {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 3px;
}
