:root {
  --studio-bg: #13100d;
  --paper: #faf6ec;
  --paper-warm: #f2ead8;
  --ink: #342b1d;
  --ink-muted: #6c5d45;
  --gold: #c39a48;
  --gold-light: #e7cb88;
  --gold-deep: #8d6822;
  --wax: #7a2121;
  --mx: 50%;
  --my: 50%;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at 50% 42%, #292119 0%, #17130f 55%, #0d0a08 100%);
  color: var(--ink);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

#studio-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#sparks-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 65;
}

.candle-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(231, 203, 136, 0.08) 0%, transparent 45%);
}

/* ==========================================
   MINIMALIST STUDIO BAR
   ========================================== */
.studio-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.studio-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(247, 238, 218, 0.72);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.studio-actions {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.studio-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(231, 203, 136, 0.24);
  background: rgba(24, 19, 15, 0.65);
  backdrop-filter: blur(10px);
  color: #f3ead6;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}

.studio-btn:hover {
  border-color: var(--gold-light);
  background: rgba(40, 32, 24, 0.85);
}

.install-btn {
  border-color: rgba(231, 203, 136, 0.5);
  background: rgba(195, 154, 72, 0.18);
  color: var(--gold-light);
}

.install-toast {
  position: fixed;
  top: 58px;
  right: 18px;
  z-index: 65;
  max-width: min(300px, 88vw);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(231, 203, 136, 0.35);
  background: rgba(24, 19, 15, 0.92);
  backdrop-filter: blur(12px);
  color: #f7eed6;
  font-size: 11px;
  line-height: 1.45;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

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

.eq-bars i {
  display: block;
  width: 2px;
  height: 4px;
  background: var(--gold-light);
  border-radius: 1px;
}

.eq-bars.playing i:nth-child(1) { animation: eq 0.8s ease-in-out infinite; }
.eq-bars.playing i:nth-child(2) { animation: eq 0.6s ease-in-out 0.2s infinite; }
.eq-bars.playing i:nth-child(3) { animation: eq 0.9s ease-in-out 0.4s infinite; }

@keyframes eq {
  0%, 100% { height: 3px; }
  50% { height: 10px; }
}

/* ==========================================
   3D PHYSICAL BOOKLET STAGE
   ========================================== */
.book-viewport {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 2200px;
  padding: 56px 20px 44px;
}

.book-tilt {
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out;
}

.book-3d {
  --page-w: min(400px, 43vw);
  --page-h: min(550px, 74vh);
  position: relative;
  width: var(--page-w);
  height: var(--page-h);
  transform-style: preserve-3d;
  transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Centering logic: closed = centered single width; open = spine centered so 2 pages fill screen */
.book-3d.state-closed {
  transform: translateX(0) rotateX(4deg) rotateY(-8deg);
}

.book-3d.state-spread-1,
.book-3d.state-spread-2 {
  transform: translateX(50%) rotateX(2deg) rotateY(0deg);
}

.book-shadow {
  position: absolute;
  inset: 14px -8px -18px -8px;
  background: rgba(0, 0, 0, 0.65);
  filter: blur(28px);
  transform: translateZ(-24px);
  border-radius: 8px;
  transition: all 0.9s ease;
}

.book-3d.state-spread-1 .book-shadow,
.book-3d.state-spread-2 .book-shadow {
  left: -100%;
  right: 0;
}

/* Leaves & 3D Page Turning */
.leaf {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 1.05s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.leaf-cover { z-index: 30; }
.leaf-inner { z-index: 20; }
.leaf-base  { z-index: 10; }

.book-3d.state-spread-1 .leaf-cover {
  transform: rotateY(-174deg);
  z-index: 15;
}

.book-3d.state-spread-2 .leaf-cover {
  transform: rotateY(-175deg);
  z-index: 12;
}

.book-3d.state-spread-2 .leaf-inner {
  transform: rotateY(-173deg);
  z-index: 25;
}

.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background: var(--paper);
  border-radius: 2px 8px 8px 2px;
  overflow: hidden;
  box-shadow: inset 0 0 32px rgba(130, 105, 65, 0.12);
}

.face-back {
  transform: rotateY(180deg);
  border-radius: 8px 2px 2px 8px;
}

/* Spine & Gutter Shading */
.page-gutter-left {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 26px;
  background: linear-gradient(90deg, rgba(48, 36, 20, 0.18), transparent);
  pointer-events: none;
  z-index: 4;
}

.page-gutter-right {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 26px;
  background: linear-gradient(270deg, rgba(48, 36, 20, 0.18), transparent);
  pointer-events: none;
  z-index: 4;
}

.paper-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 252, 240, 0.38) 0%, transparent 55%);
  mix-blend-mode: soft-light;
}

/* ==========================================
   COVER FACE (WITH GENERATED ARTWORK)
   ========================================== */
.cover-face {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.art-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.soft-art {
  opacity: 0.42;
}

.foil-frame {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(184, 145, 70, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: radial-gradient(circle at center, rgba(250, 246, 236, 0.86) 28%, rgba(250, 246, 236, 0.35) 100%);
}

.cover-kicker {
  font-size: 9px;
  letter-spacing: 0.32em;
  color: var(--gold-deep);
  font-weight: 600;
  margin-bottom: 18px;
}

.monogram-crest {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--gold-deep);
  background: rgba(255, 252, 244, 0.85);
  box-shadow: 0 6px 18px rgba(141, 104, 34, 0.14);
  margin-bottom: 18px;
}

.monogram-crest em {
  font-family: 'Great Vibes', cursive;
  font-size: 1.4rem;
  font-style: normal;
}

.cover-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.cover-date {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.cover-cta {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cta-line {
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.cta-text {
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--gold-deep);
  font-weight: 600;
}

/* ==========================================
   SPREAD 1 LEFT: BOTANICAL ART & DOA
   ========================================== */
.spread-art-face {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inner-frame {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(184, 145, 70, 0.4);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle, rgba(250, 246, 236, 0.88) 40%, rgba(250, 246, 236, 0.65) 100%);
}

.arabic-bismillah {
  font-size: 1.25rem;
  color: var(--gold-deep);
  margin-bottom: 14px;
}

.script-title {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  color: var(--gold-deep);
  line-height: 1.15;
}

.spread-couple {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
}

.spread-couple em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-deep);
}

.tiny-rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 18px auto;
}

.arabic-doa {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.doa-trans {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* ==========================================
   SPREAD 1 RIGHT: HANDWRITTEN LETTER
   ========================================== */
.letter-face,
.finale-face,
.keepsake-face {
  padding: 28px 26px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.letter-content {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 0 8px;
}

.wax-mini-crest {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9f2d2d, var(--wax));
  color: #f9e6cf;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(76, 17, 17, 0.3);
}

.letter-eyebrow {
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--gold-deep);
  font-weight: 600;
  margin-bottom: 16px;
}

.handwritten-letter {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.12rem, 1.9vw, 1.32rem);
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 22px;
}

.handwritten-letter::first-letter {
  font-size: 2.3rem;
  font-weight: 600;
  color: var(--gold-deep);
  line-height: 0.8;
  padding-right: 3px;
}

.letter-signoff {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.signoff-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.signoff-name {
  font-family: 'Great Vibes', cursive;
  font-size: 1.85rem;
  color: var(--gold-deep);
}

.page-nav-bottom {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(184, 145, 70, 0.25);
}

.page-turn-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 6px 4px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.page-turn-btn:hover {
  color: var(--gold-deep);
}

.primary-turn {
  color: var(--gold-deep);
  font-weight: 600;
}

/* ==========================================
   SPREAD 2 LEFT: KEEPSAKE FRAME & PILLARS
   ========================================== */
.keepsake-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.polaroid-arch {
  width: 82%;
  background: #fff;
  padding: 10px 10px 14px;
  border: 1px solid rgba(184, 145, 70, 0.32);
  box-shadow: 0 10px 26px rgba(52, 43, 29, 0.12);
  transform: rotate(-1.5deg);
  text-align: center;
}

.polaroid-arch img {
  width: 100%;
  height: 195px;
  object-fit: cover;
  object-position: center 45%;
  display: block;
}

.polaroid-caption {
  display: block;
  margin-top: 10px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.pillars-list {
  width: 88%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pillar-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(184, 145, 70, 0.22);
  font-size: 12px;
}

.pillar-item strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.08rem;
  color: var(--gold-deep);
}

.pillar-item span {
  color: var(--ink-muted);
  font-size: 11px;
}

/* ==========================================
   SPREAD 2 RIGHT: FINALE & SPARKS
   ========================================== */
.finale-content {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10px;
}

.finale-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}

.finale-secret {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.finale-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(240px, 100%);
}

.gold-seal-action {
  padding: 11px 20px;
  border: 1px solid var(--gold-deep);
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fffdf6;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gold-seal-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(141, 104, 34, 0.32);
}

.subtle-action-btn {
  padding: 10px 18px;
  border: 1px solid rgba(184, 145, 70, 0.45);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}

.subtle-action-btn:hover {
  background: rgba(184, 145, 70, 0.1);
}

.copy-toast {
  margin-top: 10px;
  font-size: 11px;
  color: #2f6f3e;
  font-weight: 500;
}

.official-invite-link {
  margin-top: 22px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold-deep);
  text-decoration: none;
  font-weight: 600;
}

.official-invite-link:hover {
  text-decoration: underline;
}

/* Stage Hint */
.stage-hint {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 234, 214, 0.52);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

/* ==========================================
   MOBILE ADAPTATION (5-PAGE TOUCH BOOKLET)
   ========================================== */
@media (max-width: 760px) {
  .book-viewport {
    padding: 58px 12px 24px;
    perspective: 1400px;
  }

  .book-3d {
    --page-w: min(362px, 91vw);
    --page-h: min(565px, 76vh);
  }

  /* Thick physical cotton-paper stack edges on mobile */
  .book-3d::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px 6px 12px 12px;
    pointer-events: none;
    z-index: 5;
    box-shadow:
      0 3px 0 #e7dec6,
      0 6px 0 #d7cab0,
      0 9px 0 #c6b696,
      0 26px 50px rgba(0, 0, 0, 0.65);
  }

  /* Gold top-bound spine bar for the 3D top-hinged folio */
  .book-3d::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 14px;
    right: 14px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold-deep), var(--gold-light), var(--gold-deep));
    z-index: 60;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    pointer-events: none;
  }

  .studio-brand {
    display: none;
  }

  .studio-bar {
    padding: 12px 14px;
    justify-content: flex-end;
  }

  .stage-hint {
    display: none;
  }

  /* On mobile, use direct per-face perspective(1400px) rotateX() with flat containers for 100% accurate hit-testing */
  .book-tilt,
  .book-3d,
  .book-3d .leaf {
    transform-style: flat !important;
  }

  .book-3d.state-closed,
  .book-3d.state-spread-1,
  .book-3d.state-spread-2 {
    transform: none !important;
  }

  .book-3d .book-shadow {
    display: none;
  }

  .book-3d .leaf {
    pointer-events: none;
    transform: none !important;
    z-index: auto !important;
  }

  .book-3d .face {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    backface-visibility: hidden !important;
    border-radius: 6px 6px 12px 12px !important;
    transform-origin: center top !important;
    transform: perspective(1400px) rotateX(0deg) !important;
    opacity: 1;
    pointer-events: none;
    transition: transform 0.85s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.42s ease 0.22s !important;
    box-shadow: inset 0 0 34px rgba(130, 105, 65, 0.16);
  }

  /* Subtle botanical watermark + inner gold frame on EVERY mobile inner page so none look dry */
  .book-3d .letter-face::before,
  .book-3d .keepsake-face::before,
  .book-3d .finale-face::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('botanical-art.jpg') center/cover no-repeat;
    opacity: 0.22;
    pointer-events: none;
    z-index: 0;
  }

  .book-3d .letter-face::after,
  .book-3d .keepsake-face::after,
  .book-3d .finale-face::after {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(184, 145, 70, 0.38);
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle at center, rgba(250, 246, 236, 0.84) 35%, rgba(250, 246, 236, 0.42) 100%);
  }

  /* Staggered bloom animation when a mobile page becomes active */
  .book-3d .face.mobile-active .letter-content,
  .book-3d .face.mobile-active .keepsake-content,
  .book-3d .face.mobile-active .finale-content,
  .book-3d .face.mobile-active .inner-frame {
    animation: mobileBloom 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
  }

  @keyframes mobileBloom {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* Explicit 3D page stack order on mobile */
  .book-3d .cover-face      { z-index: 50 !important; }
  .book-3d .spread-art-face { z-index: 40 !important; }
  .book-3d .letter-face     { z-index: 30 !important; }
  .book-3d .keepsake-face   { z-index: 20 !important; }
  .book-3d .finale-face     { z-index: 10 !important; }

  /* Turned pages physically lift up in 3D around the top spine */
  .book-3d .face.mobile-turned {
    transform: perspective(1400px) rotateX(155deg) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .book-3d .face.mobile-active {
    transform: perspective(1400px) rotateX(0deg) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .page-gutter-left,
  .page-gutter-right {
    display: none;
  }

  .letter-face,
  .finale-face,
  .keepsake-face,
  .spread-art-face {
    padding: 20px 16px 16px;
    flex-direction: column;
    justify-content: space-between;
  }

  .spread-art-face .inner-frame {
    flex: 1;
    margin-bottom: 10px;
    padding: 18px 14px;
  }

  .handwritten-letter {
    font-size: 1.08rem;
    line-height: 1.58;
  }

  .polaroid-arch {
    width: 78%;
  }

  .polaroid-arch img {
    height: 155px;
  }

  .mobile-nav-bar {
    display: flex !important;
  }
}

.mobile-nav-bar {
  display: none;
  position: relative;
  z-index: 5;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(184, 145, 70, 0.25);
  width: 100%;
}

.mobile-page-indicator {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
}

.mobile-dots,
.mobile-only-inline {
  display: none;
}

@media (max-width: 760px) {
  .mobile-only-inline {
    display: inline-block;
  }
  .mobile-dots {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 45;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .m-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    background: rgba(231, 203, 136, 0.28);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
  }

  .m-dot.active {
    width: 22px;
    border-radius: 999px;
    background: var(--gold-light);
    box-shadow: 0 0 10px rgba(231, 203, 136, 0.55);
  }
}

/* ==========================================
   MODAL
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(12, 9, 6, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: min(440px, 100%);
  background: var(--paper);
  border: 1px solid rgba(184, 145, 70, 0.4);
  padding: 26px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.45);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink-muted);
  cursor: pointer;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--ink);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(184, 145, 70, 0.4);
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
