:root {
  --page-bg: #fff7f3;
  --outer-bg: #efe3d7;
  --card-fill: #f6eadd;
  --card-border: rgba(124, 106, 96, 0.18);
  --primary: #7c6a60;
  --primary-dark: #5e4e45;
  --muted: #918077;
  --eyebrow: #827771;
  --light-text: #f3ece7;
  --calendar-bg: #7c6a60;

  --font-serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --font-body: "EB Garamond", "Cormorant Garamond", Georgia, serif;
  --font-script: "The Nautigal", cursive;
  --font-ui: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, sans-serif;

  --ease-luxury: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--outer-bg);
  color: var(--primary);
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.envelope-locked {
  overflow: hidden;
  height: 100dvh;
}

/* Preserve line-breaks edited in Canvas Studio everywhere */
[data-canvas-id] {
  white-space: pre-line;
}

.hidden {
  display: none !important;
}

/* =========================================================
   0. CANVAS STUDIO EDITOR UI (CHẾ ĐỘ CHỈNH SỬA NHƯ CANVA)
   ========================================================= */
body.canvas-mode {
  padding-top: 106px;
}

body.canvas-mode .envelope-overlay {
  top: 106px;
}

.canvas-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: rgba(34, 28, 25, 0.97);
  backdrop-filter: blur(12px);
  color: #f7efe8;
  font-family: var(--font-ui);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.ct-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
}

.ct-row-top {
  justify-content: space-between;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 7px;
}

.ct-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ct-badge {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 9px;
  border-radius: 6px;
}

.ct-screen-tabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}

.ct-tab {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
}

.ct-tab.active {
  background: #fff7f3;
  color: #2b211c;
  font-weight: 600;
}

.ct-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ct-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 11px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.ct-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #f5ebe2;
}

.ct-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.ct-btn-save {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
  font-weight: 600;
}

.ct-btn-save:hover {
  background: #059669;
}

.ct-btn-preview {
  background: #c89f7c;
  border-color: #c89f7c;
  color: #231b17;
  font-weight: 600;
}

.ct-field {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.07);
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ct-lbl {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}

.ct-select {
  background: #2f2723;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 3px 6px;
  font-family: inherit;
  font-size: 12px;
  max-width: 155px;
}

.ct-stepper {
  display: inline-flex;
  align-items: center;
}

.ct-step-btn {
  width: 22px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  border-radius: 4px;
}

.ct-num {
  width: 50px;
  height: 24px;
  text-align: center;
  background: #1a1513;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  margin: 0 2px;
}

.ct-num-sm { width: 48px; }
.ct-num-xs { width: 42px; }

.ct-xy {
  display: inline-flex;
  gap: 3px;
}

.ct-btn-group {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.ct-icon-btn {
  min-width: 26px;
  height: 24px;
  border: none;
  background: transparent;
  color: #f3eae2;
  font-family: inherit;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  padding: 0 5px;
}

.ct-icon-btn.active {
  background: #6366f1;
  color: #fff;
}

.ct-color {
  width: 26px;
  height: 24px;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}

.ct-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  margin-left: auto;
}

/* Canvas Editable Element Outlines */
body.canvas-mode [data-canvas-id] {
  cursor: text;
  border-radius: 4px;
  transition: outline 0.12s ease, background-color 0.12s ease;
}

body.canvas-mode [data-canvas-id]:hover {
  outline: 1.5px dashed rgba(99, 102, 241, 0.65);
  outline-offset: 3px;
}

body.canvas-mode [data-canvas-id].canvas-selected {
  outline: 2px solid #6366f1 !important;
  outline-offset: 4px;
  background-color: rgba(99, 102, 241, 0.06);
}

.canvas-drag-handle {
  position: fixed;
  z-index: 145;
  background: #6366f1;
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: grab;
  user-select: none;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.canvas-drag-handle:active {
  cursor: grabbing;
}

.enter-canvas-fab {
  position: fixed;
  left: 16px;
  bottom: 20px;
  z-index: 65;
  background: rgba(42, 34, 30, 0.9);
  color: #fffaf5;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  padding: 9px 15px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.enter-canvas-fab:hover {
  transform: translateY(-2px);
  background: #6366f1;
}

/* =========================================================
   FALLING PETALS CANVAS
   ========================================================= */
#petals-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 60;
}

/* =========================================================
   1. INTERACTIVE ENVELOPE OVERLAY
   ========================================================= */
.envelope-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  transition: opacity 0.95s var(--ease-luxury), visibility 0.95s;
}

.envelope-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #f3e6da 0%, #e8d5c4 52%, #dcc6b2 100%);
}

.envelope-stage {
  position: relative;
  width: 100%;
  max-width: 400px;
  z-index: 2;
}

.env-floral {
  position: absolute;
  width: 175px;
  pointer-events: none;
  z-index: 4;
  filter: drop-shadow(4px 6px 8px rgba(94, 78, 69, 0.16));
  transition: transform 1.1s var(--ease-luxury), opacity 0.9s ease;
}

.env-floral-tl {
  top: -36px;
  left: -34px;
  transform: rotate(18deg);
  animation: mbFloatTl 5.5s ease-in-out infinite;
}

.env-floral-br {
  bottom: -34px;
  right: -32px;
  transform: scale(-1, -1) rotate(18deg);
  animation: mbFloatBr 6s ease-in-out infinite;
}

@keyframes mbFloatTl {
  0%, 100% { transform: rotate(18deg) translateY(0); }
  50% { transform: rotate(20deg) translateY(-8px); }
}

@keyframes mbFloatBr {
  0%, 100% { transform: scale(-1, -1) rotate(18deg) translateY(0); }
  50% { transform: scale(-1, -1) rotate(20deg) translateY(-8px); }
}

.envelope-card {
  position: relative;
  background: rgba(255, 250, 245, 0.96);
  border-radius: 18px;
  padding: 12px;
  box-shadow:
    0 24px 60px rgba(94, 78, 69, 0.18),
    0 2px 8px rgba(94, 78, 69, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.95s var(--ease-luxury), opacity 0.85s ease;
}

.envelope-inner-border {
  border: 1px solid rgba(124, 106, 96, 0.24);
  border-radius: 12px;
  padding: 34px 22px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.monogram-emboss {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.95), -0.5px -0.5px 1px rgba(94, 78, 69, 0.28);
  margin-bottom: 14px;
}

.monogram-divider {
  width: 1px;
  height: 26px;
  background: rgba(124, 106, 96, 0.45);
}

.env-eyebrow {
  font-family: var(--font-serif);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--muted);
  text-transform: uppercase;
}

.env-couple {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(30px, 8vw, 38px);
  line-height: 1.15;
  color: var(--primary);
}

.env-amp {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 38px;
  line-height: 0.85;
  color: var(--muted);
}

.env-divider {
  margin: 16px auto 12px;
  width: 72%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.env-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 106, 96, 0.45), transparent);
}

.env-date {
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.env-guest-box {
  margin-top: 18px;
  width: 100%;
  background: rgba(124, 106, 96, 0.075);
  border: 1px dashed rgba(124, 106, 96, 0.28);
  border-radius: 10px;
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.env-invite-label {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.env-guest-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-dark);
}

.wax-seal-btn {
  margin-top: 24px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  color: inherit;
}

.wax-seal-ring {
  position: absolute;
  top: -5px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1.5px solid rgba(124, 106, 96, 0.35);
  animation: pulseRing 2.2s ease-out infinite;
}

@keyframes pulseRing {
  0% { transform: scale(0.92); opacity: 0.85; }
  100% { transform: scale(1.36); opacity: 0; }
}

.wax-seal-disc {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #9b8579, #7c6a60 62%, #5e4e45 100%);
  color: #f9f2ec;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 18px rgba(94, 78, 69, 0.32),
    inset 0 2px 3px rgba(255, 255, 255, 0.3),
    inset 0 -3px 5px rgba(45, 35, 30, 0.35);
  border: 2px solid rgba(235, 220, 206, 0.55);
  transition: transform 0.3s ease;
}

.wax-seal-btn:hover .wax-seal-disc {
  transform: scale(1.07);
}

.open-btn-pill {
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--primary);
  color: #fffaf5;
  padding: 9px 26px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(124, 106, 96, 0.25);
  transition: background 0.25s ease, transform 0.25s ease;
}

.envelope-overlay.is-opening .env-floral-tl {
  animation: none;
  transform: translate(-110px, -90px) rotate(-25deg) scale(1.1);
  opacity: 0;
}

.envelope-overlay.is-opening .env-floral-br {
  animation: none;
  transform: translate(110px, 90px) scale(-1, -1) rotate(-25deg);
  opacity: 0;
}

.envelope-overlay.is-opening .envelope-card {
  transform: translateY(-28px) scale(1.04);
  opacity: 0;
}

.envelope-overlay.is-opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* =========================================================
   2. FLOATING CONTROLS (EQUALIZER BARS LIKE SCREENSHOT)
   ========================================================= */
.floating-controls {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.floating-controls.visible {
  opacity: 1;
  transform: translateY(0);
}

.float-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 250, 245, 0.72);
  background: rgba(114, 98, 90, 0.88);
  backdrop-filter: blur(8px);
  color: #fffaf5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(94, 78, 69, 0.26);
  transition: transform 0.25s ease, background 0.25s ease;
}

.float-btn:hover {
  transform: scale(1.08);
  background: var(--primary-dark);
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 15px;
}

.eq-bars i {
  display: block;
  width: 2.5px;
  height: 5px;
  background: #fffaf5;
  border-radius: 2px;
  transition: height 0.2s ease;
}

.float-btn.is-playing .eq-bars i:nth-child(1) { animation: eqBounce 0.85s ease-in-out infinite 0s; }
.float-btn.is-playing .eq-bars i:nth-child(2) { animation: eqBounce 0.7s ease-in-out infinite 0.2s; }
.float-btn.is-playing .eq-bars i:nth-child(3) { animation: eqBounce 0.95s ease-in-out infinite 0.1s; }
.float-btn.is-playing .eq-bars i:nth-child(4) { animation: eqBounce 0.78s ease-in-out infinite 0.32s; }

@keyframes eqBounce {
  0%, 100% { height: 4px; }
  50% { height: 15px; }
}

.float-btn.active-scroll {
  background: var(--primary-dark);
  box-shadow: 0 0 0 3px rgba(124, 106, 96, 0.28);
}

/* =========================================================
   3. INVITATION CARD CONTAINER
   ========================================================= */
.page-outer {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 0;
}

@media (min-width: 600px) {
  .page-outer {
    padding: 28px 16px;
  }
}

.invitation-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  background-color: var(--page-bg);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 20px 65px rgba(94, 78, 69, 0.16);
}

@media (min-width: 600px) {
  .invitation-card {
    border-radius: 22px;
    border: 1px solid rgba(124, 106, 96, 0.16);
  }
}

.content-narrow {
  max-width: 470px;
  margin-left: auto;
  margin-right: auto;
}

.paper-grain-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    repeating-linear-gradient(0deg, rgba(145, 128, 119, 0.025) 0px, rgba(145, 128, 119, 0.025) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(145, 128, 119, 0.02) 0px, rgba(145, 128, 119, 0.02) 1px, transparent 1px, transparent 4px);
}

/* Side Switcher Bar */
.side-switcher-bar {
  position: relative;
  z-index: 15;
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

.side-pill-group {
  display: inline-flex;
  background: rgba(246, 234, 221, 0.9);
  border: 1px solid rgba(124, 106, 96, 0.2);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.side-pill {
  border: none;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.side-pill.active {
  background: var(--primary);
  color: #fffaf5;
  box-shadow: 0 2px 8px rgba(124, 106, 96, 0.25);
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero-section {
  position: relative;
  z-index: 5;
  padding: 28px 20px 58px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.watermark-leaf {
  position: absolute;
  pointer-events: none;
  opacity: 0.09;
}

.watermark-hero-left {
  left: -58px;
  top: 12px;
  width: 210px;
}

.watermark-arch {
  position: absolute;
  top: 170px;
  left: 50%;
  transform: translateX(-50%);
  width: 115%;
  max-width: none;
  opacity: 0.065;
  pointer-events: none;
}

.monogram-top {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
}

.monogram-line {
  width: 1px;
  height: 22px;
  background: rgba(124, 106, 96, 0.45);
}

.eyebrow-heading {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eyebrow);
}

.hero-couple {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Proportionally scale wide Canvas-positioned Hero typography on narrow mobile screens so nothing clips */
@media (max-width: 520px) {
  .hero-couple,
  .hero-date-line {
    zoom: 0.72;
  }
}

.hero-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(30px, 8.2vw, 39px);
  color: var(--primary);
}

.hero-amp {
  font-family: var(--font-script);
  font-size: 44px;
  line-height: 0.9;
  color: var(--muted);
}

.hero-date-line {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.26em;
  color: var(--muted);
}

.hero-polaroid-stage {
  position: relative;
  margin-top: 28px;
  width: 84%;
  max-width: 335px;
}

.polaroid-tape {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 92px;
  height: 26px;
  background: rgba(232, 214, 194, 0.72);
  border-left: 1px dashed rgba(124, 106, 96, 0.25);
  border-right: 1px dashed rgba(124, 106, 96, 0.25);
  z-index: 6;
  box-shadow: 0 2px 5px rgba(94, 78, 69, 0.08);
}

.polaroid-frame {
  background: #ffffff;
  padding: 13px 13px 18px;
  border-radius: 3px;
  transform: rotate(-3.8deg);
  box-shadow:
    0 16px 36px rgba(94, 78, 69, 0.2),
    0 2px 6px rgba(94, 78, 69, 0.1);
  transition: transform 0.6s var(--ease-luxury);
}

.hero-polaroid-stage:hover .polaroid-frame {
  transform: rotate(-1.5deg) translateY(-3px);
}

.polaroid-photo-wrap {
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: #f2ebe4;
}

.polaroid-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.polaroid-caption {
  padding-top: 12px;
  text-align: center;
}

.script-caption {
  font-family: var(--font-script);
  font-size: 28px;
  color: var(--primary);
}

@keyframes mbFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.float-ornament {
  position: absolute;
  pointer-events: none;
  z-index: 12;
  filter: drop-shadow(3px 5px 5px rgba(94, 78, 69, 0.18));
  animation: mbFloat 5.2s ease-in-out infinite;
}

.hero-floral-bl {
  bottom: -24px;
  left: -26px;
  width: 126px;
}

/* =========================================================
   LINEN CARDS (CARD 1, CARD 2, TIMELINE)
   ========================================================= */
.linen-section {
  position: relative;
  z-index: 6;
  width: 89%;
  margin-bottom: 38px;
}

.sec1-leaf-left { left: -34px; top: 28%; width: 86px; animation-delay: 0.4s; }
.sec1-flower-right { right: -30px; bottom: -18px; width: 105px; animation-delay: 0.9s; }
.sec2-leaf-right { right: -32px; top: 14%; width: 84px; animation-delay: 0.6s; }
.sec2-flower-left { left: -30px; bottom: -18px; width: 102px; animation-delay: 0.2s; }

.linen-card {
  position: relative;
  background-color: var(--card-fill);
  background-image: radial-gradient(rgba(124, 106, 96, 0.05) 1px, transparent 0);
  background-size: 16px 16px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 34px 20px 36px;
  text-align: center;
  box-shadow: 4px 6px 18px rgba(94, 78, 69, 0.12);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
}

.family-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 12px;
  align-items: start;
}

.family-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.family-role {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 2px;
}

.family-honorific {
  font-family: var(--font-serif);
  font-size: 12.5px;
  color: var(--muted);
}

.family-parent {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.35;
}

.family-divider {
  width: 1px;
  height: 62px;
  align-self: center;
  background: rgba(124, 106, 96, 0.34);
}

.ornament-line {
  width: 72%;
  height: 1px;
  margin: 22px auto;
  background: linear-gradient(90deg, transparent, rgba(124, 106, 96, 0.45), transparent);
}

.announcement-text {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--primary);
  line-height: 1.5;
  padding: 0 6px;
}

.couple-formal-block {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.formal-name {
  font-family: var(--font-serif);
  font-size: clamp(23px, 6.2vw, 28px);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--primary-dark);
}

.dharma-name {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-top: 1px;
}

.birth-order {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 2px;
}

.formal-amp {
  font-family: var(--font-script);
  font-size: 38px;
  line-height: 0.85;
  color: var(--muted);
  margin: 2px 0;
}

.ceremony-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ceremony-label {
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.ceremony-venue {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
  margin-top: 2px;
}

.ceremony-sub {
  font-family: var(--font-serif);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.ceremony-date-big {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-top: 2px;
}

.lunar-note {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 13.5px;
  color: var(--muted);
}

/* =========================================================
   COUPLE PORTRAIT DUO
   ========================================================= */
.duo-portrait-section {
  position: relative;
  z-index: 6;
  padding: 6px 24px 36px;
  text-align: center;
}

.duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mini-polaroid {
  background: #ffffff;
  padding: 8px 8px 13px;
  border-radius: 3px;
  box-shadow: 0 10px 24px rgba(94, 78, 69, 0.14);
}

.mini-polaroid.tilt-left { transform: rotate(-2.5deg); }
.mini-polaroid.tilt-right { transform: rotate(2.5deg); margin-top: 14px; }

.mini-photo {
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  background: #f2ebe4;
}

.mini-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-polaroid figcaption {
  padding-top: 9px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.duo-role {
  font-family: var(--font-ui);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.mini-polaroid strong {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
}

.love-quote {
  margin: 26px auto 0;
  max-width: 340px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* =========================================================
   3D COVERFLOW SWIPE ALBUM (MATCHING REFERENCE SCREENSHOT)
   ========================================================= */
.gallery-section {
  position: relative;
  z-index: 6;
  padding: 18px 0 48px;
  text-align: center;
  overflow: hidden;
}

.watermark-botanical-br {
  position: absolute;
  right: -24px;
  bottom: -10px;
  width: 240px;
  opacity: 0.12;
  pointer-events: none;
}

.coverflow-wrapper {
  position: relative;
  width: 100%;
  margin-top: 24px;
  height: clamp(350px, 86vw, 445px);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: pan-y;
}

.coverflow-stage {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1150px;
  transform-style: preserve-3d;
}

.cf-slide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(232px, 62vw, 305px);
  aspect-ratio: 3 / 4.18;
  border-radius: 16px;
  overflow: hidden;
  background: #f2e8df;
  cursor: grab;
  will-change: transform, opacity;
  box-shadow: 0 20px 44px rgba(68, 52, 42, 0.22);
  transition:
    transform 0.56s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.56s ease,
    filter 0.56s ease;
}

.cf-slide.is-dragging {
  transition: none !important;
  cursor: grabbing;
}

.cf-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
  display: block;
  pointer-events: none;
}

/* Circular translucent navigation arrows matching screenshot */
.cf-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(74, 65, 60, 0.72);
  backdrop-filter: blur(4px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: background 0.22s ease, transform 0.22s ease;
}

.cf-arrow:hover {
  background: rgba(52, 44, 40, 0.9);
  transform: translateY(-50%) scale(1.08);
}

.cf-prev {
  left: clamp(14px, 11%, 82px);
}

.cf-next {
  right: clamp(14px, 11%, 82px);
}

.cf-counter {
  margin-top: 16px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 300;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* =========================================================
   CARD 2: PARTY, CALENDAR & COUNTDOWN
   ========================================================= */
.invite-eyebrow {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.guest-callout {
  margin: 8px auto;
  display: inline-block;
  min-width: 180px;
  padding: 4px 16px 6px;
  border-bottom: 1px dotted rgba(124, 106, 96, 0.55);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  font-style: italic;
  color: var(--primary-dark);
}

.invite-subtext {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.party-couple {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: clamp(24px, 6.5vw, 30px);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--primary-dark);
}

.date-highlight-row {
  margin: 20px auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.date-part {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--primary);
  min-width: 86px;
}

.date-vline {
  width: 1.5px;
  height: 34px;
  background: var(--primary);
  opacity: 0.55;
}

.date-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
}

.date-day-num {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 700;
  color: var(--primary-dark);
}

.date-month-label {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 3px;
}

.reception-times {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.mini-calendar-box {
  margin: 22px auto 0;
  max-width: 300px;
  background: var(--calendar-bg);
  color: var(--light-text);
  border-radius: 12px;
  padding: 14px 16px 18px;
  box-shadow: 0 8px 20px rgba(94, 78, 69, 0.22);
}

.cal-title {
  font-family: var(--font-script);
  font-size: 30px;
  color: #f8efe8;
  margin-bottom: 6px;
}

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

.cal-weekdays {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(243, 236, 231, 0.72);
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(243, 236, 231, 0.2);
  margin-bottom: 6px;
}

.cal-days span {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 14px;
  position: relative;
}

.cal-days .wedding-day {
  color: #7c6a60;
  font-weight: 700;
  z-index: 1;
}

.cal-days .wedding-day b {
  position: relative;
  z-index: 2;
  font-size: 13.5px;
}

.cal-heart {
  position: absolute;
  width: 32px;
  height: 30px;
  fill: #f8efe8;
  z-index: 1;
  animation: heartBeat 1.9s ease-in-out infinite;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.13); }
}

.countdown-wrap {
  margin-top: 24px;
}

.countdown-label {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 10px;
}

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

.cd-item {
  min-width: 58px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(124, 106, 96, 0.22);
  border-radius: 9px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cd-num {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--primary-dark);
}

.cd-unit {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.cd-colon {
  font-weight: 700;
  color: var(--muted);
}

.party-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  background: var(--primary);
  color: #fffaf5;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(124, 106, 96, 0.24);
  transition: transform 0.25s ease, background 0.25s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-full { width: 100%; }

.btn-text-link {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* =========================================================
   VENUE & GOOGLE MAPS
   ========================================================= */
.venue-section {
  position: relative;
  z-index: 6;
  padding: 4px 24px 42px;
  text-align: center;
}

.venue-pre {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.venue-name {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
}

.venue-hall {
  margin-top: 2px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--primary);
}

.venue-address {
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.5;
}

.map-frame-wrap {
  margin: 18px auto 0;
  width: 100%;
  height: 265px;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(124, 106, 96, 0.35);
  box-shadow: 0 10px 24px rgba(94, 78, 69, 0.12);
}

.map-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.venue-btns {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--primary-dark);
  border: 1px solid var(--primary);
  border-radius: 999px;
  padding: 10px 22px;
  background: rgba(246, 234, 221, 0.55);
  transition: all 0.25s ease;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fffaf5;
}

/* =========================================================
   TIMELINE
   ========================================================= */
.timeline-list {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
  position: relative;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: rgba(124, 106, 96, 0.28);
}

.timeline-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
}

.tl-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fffaf5;
  border: 1px solid rgba(124, 106, 96, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.tl-icon svg { width: 24px; height: 24px; }

.tl-time {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #fffaf5;
  background: var(--primary);
  padding: 2px 9px;
  border-radius: 999px;
}

.tl-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 4px;
}

.tl-desc {
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.45;
}

/* =========================================================
   GUESTBOOK & GIFT & FOOTER
   ========================================================= */
.guestbook-section {
  position: relative;
  z-index: 6;
  width: 89%;
  margin-bottom: 38px;
}

.paper-note-card {
  position: relative;
  background: #fdf9f4;
  border: 1px solid rgba(124, 106, 96, 0.22);
  border-radius: 12px;
  padding: 32px 20px 28px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(94, 78, 69, 0.11);
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #b59e90, #7c6a60);
  margin: -18px auto 12px;
  box-shadow: 0 3px 6px rgba(94, 78, 69, 0.28);
}

.gb-subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14.5px;
  color: var(--muted);
  margin-top: 4px;
}

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

.form-input,
.form-textarea {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--primary-dark);
  background: rgba(246, 234, 221, 0.35);
  border: 1px solid rgba(124, 106, 96, 0.32);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary);
  background: #ffffff;
}

.wish-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wish-chip {
  border: 1px solid rgba(124, 106, 96, 0.25);
  background: rgba(246, 234, 221, 0.55);
  color: var(--primary);
  font-family: var(--font-ui);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.wishes-list {
  margin-top: 18px;
  max-height: 270px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  padding-right: 4px;
}

.wish-card {
  background: rgba(246, 234, 221, 0.55);
  border: 1px solid rgba(124, 106, 96, 0.2);
  border-radius: 9px;
  padding: 11px 13px;
}

.wish-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.wish-author {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
}

.wish-time {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--muted);
}

.wish-body {
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--primary);
}

.gift-section {
  position: relative;
  z-index: 6;
  padding: 4px 26px 40px;
  text-align: center;
}

.gift-desc {
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--muted);
}

.gift-envelope-btn {
  margin: 20px auto 0;
  width: 230px;
  height: 138px;
  background: linear-gradient(160deg, #ede0d2, #dfd0c0);
  border: 1px solid rgba(124, 106, 96, 0.35);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 16px;
  box-shadow: 0 12px 26px rgba(94, 78, 69, 0.16);
  overflow: hidden;
  transition: transform 0.3s var(--ease-luxury), box-shadow 0.3s ease;
}

.gift-envelope-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(94, 78, 69, 0.24);
}

.gift-env-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  background: #f6eadd;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-bottom: 1px solid rgba(124, 106, 96, 0.25);
}

.gift-env-seal {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fffaf5;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 4px 10px rgba(94, 78, 69, 0.28);
}

.gift-env-label {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--primary-dark);
}

.footer-section {
  position: relative;
  z-index: 6;
  padding: 8px 24px 42px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-polaroid {
  width: 74%;
  max-width: 260px;
  background: #ffffff;
  padding: 10px 10px 22px;
  border-radius: 3px;
  transform: rotate(2.2deg);
  box-shadow: 0 14px 32px rgba(94, 78, 69, 0.18);
}

.footer-polaroid img {
  width: 100%;
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
  display: block;
}

.thankyou-script {
  margin-top: 22px;
  font-family: var(--font-script);
  font-size: 52px;
  line-height: 1;
  color: var(--primary);
}

.thankyou-formal {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary-dark);
}

.footer-names {
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
}

.footer-host-tools {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.host-tool-link {
  background: none;
  border: 1px dashed rgba(124, 106, 96, 0.32);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  opacity: 0.82;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.host-tool-link:hover {
  opacity: 1;
  background: rgba(246, 234, 221, 0.7);
}

/* =========================================================
   SCROLL REVEAL MOTION
   ========================================================= */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-polaroid {
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.85s var(--ease-luxury), transform 0.85s var(--ease-luxury);
}

.reveal-up { transform: translateY(28px); }
.reveal-left { transform: translateX(-24px) rotate(-5deg); }
.reveal-right { transform: translateX(24px) rotate(5deg); }
.reveal-polaroid { transform: translateY(32px) scale(0.96); }

.in-view {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.mini-polaroid.tilt-left.in-view { transform: rotate(-2.5deg); }
.mini-polaroid.tilt-right.in-view { transform: rotate(2.5deg); }

/* =========================================================
   MODALS & LIGHTBOX
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: rgba(46, 36, 31, 0.76);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--page-bg);
  border: 1px solid rgba(124, 106, 96, 0.28);
  border-radius: 16px;
  padding: 26px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.modal-wide { max-width: 440px; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(124, 106, 96, 0.12);
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 15px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  text-align: center;
  color: var(--primary-dark);
}

.modal-sub {
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 14px;
  text-align: center;
  color: var(--muted);
}

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

.field-label {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--primary-dark);
  margin-bottom: -4px;
}

.radio-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.radio-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(124, 106, 96, 0.3);
  background: rgba(246, 234, 221, 0.4);
  cursor: pointer;
}

.code-input {
  font-size: 12px;
  background: #f4ebe2;
}

.success-banner {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #ede1d4;
  color: var(--primary-dark);
  font-family: var(--font-ui);
  font-size: 12.5px;
  text-align: center;
}

.gift-grid {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gift-card {
  background: var(--card-fill);
  border: 1px solid rgba(124, 106, 96, 0.24);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.gift-role {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.gift-holder {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 2px;
}

.gift-qr-img {
  margin: 10px auto;
  width: 170px;
  height: 170px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  border: 1px solid rgba(124, 106, 96, 0.2);
}

.gift-bank-line {
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--primary-dark);
}

.copy-stk-btn {
  margin-top: 8px;
  border: 1px solid var(--primary);
  background: #fffaf5;
  color: var(--primary-dark);
  font-family: var(--font-ui);
  font-size: 11.5px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.lb-figure {
  max-width: 92vw;
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lb-img {
  max-width: 92vw;
  max-height: 80dvh;
  object-fit: contain;
  border: 6px solid #ffffff;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.lb-counter {
  margin-top: 10px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: #f6eadd;
}

.lb-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
}

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.lb-prev { left: 12px; }
.lb-next { right: 12px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(45, 36, 32, 0.95);
  color: #fffaf5;
  font-family: var(--font-ui);
  font-size: 12.5px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
}
