/* ===== Design Tokens ===== */
:root {
  --champagne: #c9a86c;
  --champagne-light: #e8d5a8;
  --champagne-dark: #a88b4a;
  --dusty-rose: #c4a4a4;
  --dusty-rose-deep: #b08a8a;
  --ivory: #faf7f2;
  --ivory-deep: #f3ede4;
  --cream: #fffdf9;
  --text: #5c4a3a;
  --text-soft: #8a7460;
  --text-muted: #a89888;
  --line: rgba(201, 168, 108, 0.35);
  --shadow: 0 8px 32px rgba(92, 74, 58, 0.08);
  --radius: 12px;
  --font-serif: "Noto Serif SC", "Cormorant Garamond", "Songti SC", serif;
  --font-display: "Cormorant Garamond", "Noto Serif SC", serif;
  --font-script: "Great Vibes", cursive;
  --section-pad: clamp(64px, 12vh, 100px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-serif);
  color: var(--text);
  background: var(--ivory);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
label {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 28px;
  font-size: 14px;
  letter-spacing: 0.12em;
  border-radius: 999px;
  transition: all 0.35s var(--ease);
}

.btn-outline {
  color: var(--champagne-dark);
  background: transparent;
  border: 1px solid var(--champagne);
}

.btn-outline:hover,
.btn-outline:active {
  background: rgba(201, 168, 108, 0.12);
}

.btn-solid {
  color: #fff;
  background: linear-gradient(135deg, var(--champagne), var(--champagne-dark));
  border: 1px solid transparent;
  box-shadow: 0 6px 20px rgba(201, 168, 108, 0.3);
}

.btn-solid:hover,
.btn-solid:active {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201, 168, 108, 0.4);
}

/* ===== Ornament ===== */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
}

.ornament-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--champagne), transparent);
}

.ornament-diamond {
  width: 7px;
  height: 7px;
  background: var(--champagne);
  transform: rotate(45deg);
  opacity: 0.85;
}

/* ===== Section common ===== */
.section {
  position: relative;
  padding: var(--section-pad) 24px;
  min-height: auto;
}

.section-inner {
  max-width: 720px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-en {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--champagne-dark);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text);
}

.section-desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-soft);
  letter-spacing: 0.08em;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Dot Nav ===== */
.dot-nav {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(201, 168, 108, 0.35);
  border: 1px solid transparent;
  transition: all 0.3s var(--ease);
}

.dot.active {
  background: var(--champagne);
  box-shadow: 0 0 0 3px rgba(201, 168, 108, 0.25);
  transform: scale(1.25);
}

/* ===== Cover ===== */
.cover {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cover-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, #f5ebe0 0%, #e8d5c4 40%, #d4b5a8 70%, #c9a89a 100%),
    url("../相册/IMG_9935.jpg") center / cover no-repeat;
  background-blend-mode: soft-light;
  transform: scale(1.05);
  transition: background-image 0.6s ease;
}

.cover-bg.has-custom {
  background-blend-mode: normal;
}

.cover-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(250, 247, 242, 0.15) 0%, rgba(92, 74, 58, 0.35) 100%),
    linear-gradient(180deg, rgba(250, 247, 242, 0.45) 0%, rgba(250, 247, 242, 0.2) 40%, rgba(92, 74, 58, 0.45) 100%);
  pointer-events: none;
}

.petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.petal {
  position: absolute;
  top: -40px;
  width: 14px;
  height: 18px;
  background: radial-gradient(ellipse at 30% 30%, #f5d0d0, var(--dusty-rose));
  border-radius: 80% 0 80% 0;
  opacity: 0.75;
  animation: petal-fall linear infinite;
  will-change: transform;
}

.petal:nth-child(odd) {
  background: radial-gradient(ellipse at 30% 30%, #f0e0c0, var(--champagne-light));
  border-radius: 0 80% 0 80%;
}

@keyframes petal-fall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(110vh) rotate(720deg) translateX(40px);
    opacity: 0;
  }
}

.cover-tools {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(201, 168, 108, 0.45);
  color: var(--champagne-dark);
  transition: all 0.3s ease;
}

.tool-btn svg {
  width: 18px;
  height: 18px;
}

.tool-btn-text {
  width: auto;
  padding: 0 12px;
  border-radius: 20px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.tool-btn.playing .icon-music-off,
.tool-btn:not(.playing) .icon-music-on {
  display: none;
}

.tool-btn.playing .icon-music-on,
.tool-btn:not(.playing) .icon-music-off {
  display: block;
}

.tool-btn.playing {
  animation: music-pulse 2s ease-in-out infinite;
}

@keyframes music-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(201, 168, 108, 0.35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(201, 168, 108, 0);
  }
}

.cover-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 40px 28px;
  color: #fff;
  text-shadow: 0 2px 16px rgba(60, 40, 30, 0.35);
}

.cover-eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 12px;
}

.cover .ornament-line {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}

.cover .ornament-diamond {
  background: #fff;
}

.cover-title {
  font-family: var(--font-script);
  font-size: clamp(42px, 12vw, 64px);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 8px 0 20px;
  color: #fffef9;
}

.cover-names {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}

.cover-names .name {
  font-size: clamp(22px, 5.5vw, 28px);
  font-weight: 500;
  letter-spacing: 0.2em;
}

.cover-names .ampersand {
  font-family: var(--font-script);
  font-size: 28px;
  color: var(--champagne-light);
}

.cover-date,
.cover-place {
  font-size: 14px;
  letter-spacing: 0.16em;
  opacity: 0.92;
}

.cover-place {
  margin-top: 8px;
  font-size: 13px;
  opacity: 0.8;
}

.scroll-hint {
  position: absolute;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  letter-spacing: 0.18em;
  animation: hint-float 2.2s ease-in-out infinite;
}

.scroll-arrow {
  width: 18px;
  height: 18px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

@keyframes hint-float {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.7;
  }
  50% {
    transform: translateX(-50%) translateY(8px);
    opacity: 1;
  }
}

/* ===== Countdown ===== */
.countdown-section {
  background:
    radial-gradient(ellipse at top, rgba(196, 164, 164, 0.12), transparent 55%),
    var(--ivory);
}

.countdown-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}

.flip-unit {
  text-align: center;
}

.flip-card {
  perspective: 600px;
  height: 72px;
  margin-bottom: 10px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
}

.flip-card.flipping .flip-card-inner {
  transform: rotateX(-180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  background: linear-gradient(180deg, #fffefb 0%, #f3ebe0 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.flip-face span {
  font-family: var(--font-display);
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 500;
  color: var(--champagne-dark);
  letter-spacing: 0.04em;
}

.flip-back {
  transform: rotateX(180deg);
}

.flip-label {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-soft);
}

.countdown-passed {
  text-align: center;
  padding: 24px;
}

.passed-title {
  font-family: var(--font-script);
  font-size: 40px;
  color: var(--dusty-rose-deep);
  margin-bottom: 8px;
}

.passed-desc {
  color: var(--text-soft);
  letter-spacing: 0.08em;
}

/* ===== Gallery — editorial luxury ===== */
.gallery-section {
  background:
    linear-gradient(180deg, #fbf8f3 0%, #f5efe7 40%, #faf7f2 100%);
  overflow: hidden;
}

.gallery-section .section-inner {
  max-width: 680px;
}

/* Horizontal showcase rail */
.gallery-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 20px;
  margin: 0 -8px 4px;
  scrollbar-width: none;
}

.gallery-rail::-webkit-scrollbar {
  display: none;
}

.rail-card {
  flex: 0 0 72%;
  scroll-snap-align: center;
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(92, 74, 58, 0.14);
}

.rail-card:first-child {
  margin-left: 8px;
}

.rail-card:last-child {
  margin-right: 8px;
}

.rail-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.rail-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.rail-card .rail-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 16px 16px;
  background: linear-gradient(transparent, rgba(40, 28, 20, 0.55));
  color: #fffef9;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.22em;
}

.rail-card:active img {
  transform: scale(1.04);
}

.gallery-rail-hint {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* Editorial magazine blocks */
.gallery-editorial {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.gallery-scene-header {
  text-align: center;
  padding: 12px 0 4px;
}

.gallery-scene-header .scene-en {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--champagne-dark);
  margin-bottom: 6px;
}

.gallery-scene-header .scene-zh {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text);
}

.gallery-scene-header .ornament {
  margin: 12px 0 0;
}

.gallery-block {
  position: relative;
}

.gallery-block-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 4px 0 8px;
}

.gallery-block-divider .line {
  flex: 1;
  max-width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--champagne), transparent);
}

.gallery-block-divider .label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--champagne-dark);
  text-transform: uppercase;
}

.gallery-shot {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #ebe3d8;
  animation: fade-in 0.6s var(--ease) both;
}

.gallery-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.85s var(--ease);
}

.gallery-shot:active img,
.gallery-shot:hover img {
  transform: scale(1.05);
}

/* Full bleed feature */
.block-full .gallery-shot {
  aspect-ratio: 3 / 4;
  box-shadow: 0 16px 40px rgba(92, 74, 58, 0.12);
}

.block-full .shot-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 55%, rgba(40, 28, 20, 0.28) 100%);
  pointer-events: none;
}

.block-full .shot-meta {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  color: #fffef9;
  pointer-events: none;
}

.block-full .shot-meta .en {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.3em;
  opacity: 0.85;
  margin-bottom: 4px;
}

.block-full .shot-meta .zh {
  font-size: 13px;
  letter-spacing: 0.18em;
}

/* Duo side by side */
.block-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.block-duo .gallery-shot {
  aspect-ratio: 3 / 4;
  box-shadow: 0 10px 28px rgba(92, 74, 58, 0.1);
}

/* Asymmetric: large + stacked */
.block-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 10px;
  align-items: stretch;
}

.block-split .split-main {
  aspect-ratio: auto;
  min-height: 280px;
  height: 100%;
  box-shadow: 0 12px 32px rgba(92, 74, 58, 0.11);
}

.block-split .split-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.block-split .split-side .gallery-shot {
  flex: 1;
  min-height: 135px;
  box-shadow: 0 8px 24px rgba(92, 74, 58, 0.1);
}

/* Polaroid accent on select shots */
.gallery-shot.is-polaroid {
  background: #fffefb;
  padding: 8px 8px 28px;
  box-shadow: 0 10px 30px rgba(92, 74, 58, 0.12) !important;
}

.gallery-shot.is-polaroid img {
  aspect-ratio: 3 / 4;
  height: auto;
}

.gallery-shot.is-polaroid .poli-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  font-family: var(--font-script);
  font-size: 16px;
  color: var(--text-soft);
  pointer-events: none;
}

.gallery-shot .delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(92, 74, 58, 0.7);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.gallery-shot.default .delete-btn {
  display: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 560px) {
  .rail-card {
    flex-basis: 42%;
  }

  .block-duo {
    gap: 14px;
  }

  .block-split {
    gap: 14px;
  }

  .gallery-editorial {
    gap: 36px;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(22, 16, 12, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px 64px;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(201, 168, 108, 0.25);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  opacity: 0.85;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--champagne-light);
  font-size: 22px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(201, 168, 108, 0.45);
  border-radius: 50%;
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav.prev {
  left: 10px;
}

.lightbox-nav.next {
  right: 10px;
}

.lightbox-counter {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 253, 249, 0.7);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.2em;
}

/* ===== Info ===== */
.info-section {
  background:
    linear-gradient(180deg, var(--ivory-deep), var(--ivory));
}

.info-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 36px;
}

@media (min-width: 520px) {
  .info-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.info-card {
  text-align: center;
  padding: 28px 20px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.info-card-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--champagne);
  border-radius: 50%;
  color: var(--champagne-dark);
  font-size: 15px;
  letter-spacing: 0.1em;
}

.info-card h3 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.info-time {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--champagne-dark);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.info-note {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.address-block {
  text-align: center;
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(201, 168, 108, 0.06), rgba(196, 164, 164, 0.08)),
    var(--cream);
}

.address-label {
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--champagne-dark);
  margin-bottom: 10px;
}

.address-main {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.address-sub {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 22px;
  letter-spacing: 0.08em;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 30, 24, 0.45);
}

.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--cream);
  border-radius: 20px 20px 0 0;
  padding: 28px 20px calc(20px + env(safe-area-inset-bottom));
  text-align: center;
  animation: sheet-up 0.35s var(--ease);
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modal-sheet h3 {
  font-size: 17px;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.modal-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.modal-option {
  display: block;
  width: 100%;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0.08em;
  transition: background 0.2s;
}

.modal-option:active {
  background: var(--ivory-deep);
}

.modal-cancel {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== RSVP ===== */
.rsvp-section {
  background: var(--ivory);
}

.rsvp-form {
  max-width: 420px;
  margin: 0 auto;
  padding: 28px 22px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: var(--text-soft);
}

.form-group label span {
  color: var(--dusty-rose-deep);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefb;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.25s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--champagne);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #c07070;
}

.form-error {
  min-height: 18px;
  margin-top: 4px;
  font-size: 12px;
  color: #c07070;
}

.rsvp-form .btn {
  width: 100%;
  margin-top: 8px;
}

.rsvp-success {
  text-align: center;
  padding: 48px 24px;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--champagne);
  color: var(--champagne-dark);
  font-size: 28px;
}

.success-title {
  font-size: 20px;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.success-desc {
  color: var(--text-soft);
  font-size: 14px;
}

/* ===== Traffic ===== */
.traffic-section {
  background:
    radial-gradient(ellipse at bottom, rgba(201, 168, 108, 0.08), transparent 50%),
    var(--ivory-deep);
}

.traffic-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .traffic-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.traffic-card {
  padding: 28px 22px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.traffic-card h3 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--champagne-dark);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.traffic-card p {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.85;
  letter-spacing: 0.04em;
}

/* ===== Wishes ===== */
.wishes-section {
  background: var(--cream);
}

.wishes-wall {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
}

.wish-card {
  padding: 20px 22px;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: fade-in 0.45s var(--ease);
}

.wish-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.wish-name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--champagne-dark);
}

.wish-time {
  font-size: 11px;
  color: var(--text-muted);
}

.wish-text {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.8;
}

.wishes-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 0.08em;
}

/* ===== Finale ===== */
.finale-section {
  min-height: 90vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(180deg, var(--ivory) 0%, #f0e4d8 50%, #e8d4c8 100%);
  padding-bottom: calc(var(--section-pad) + env(safe-area-inset-bottom));
}

.finale-content {
  text-align: center;
  padding: 20px 0;
}

.finale-en {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--champagne-dark);
  margin-bottom: 12px;
}

.finale-title {
  font-family: var(--font-script);
  font-size: clamp(36px, 10vw, 52px);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 4px;
}

.finale-names {
  font-size: 18px;
  letter-spacing: 0.2em;
  margin: 20px 0 12px;
}

.finale-date,
.finale-place {
  font-size: 13px;
  color: var(--text-soft);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.finale-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}

.finale-actions .btn {
  min-width: 200px;
}

/* Poster modal */
.poster-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.poster-modal[hidden] {
  display: none !important;
}

.poster-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(30, 22, 18, 0.72);
}

.poster-modal-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--cream);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  text-align: center;
  animation: sheet-up 0.35s var(--ease);
}

.poster-modal-sheet h3 {
  font-size: 16px;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.poster-modal-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.06em;
}

.poster-preview-wrap {
  margin: 0 auto 18px;
  max-width: 260px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
}

.poster-preview-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.poster-modal-sheet .btn {
  width: 100%;
  margin-bottom: 10px;
}

/* ===== Desktop polish ===== */
@media (min-width: 768px) {
  .dot-nav {
    right: 24px;
    gap: 14px;
  }

  .dot {
    width: 9px;
    height: 9px;
  }

  .section {
    padding-left: 40px;
    padding-right: 40px;
  }

  .cover-tools {
    right: 28px;
    top: 28px;
  }

  .finale-actions {
    flex-direction: row;
    justify-content: center;
  }
}
