:root {
  --bg: #0a0806;
  --gold: #c9a227;
  --gold-light: #f4e4b0;
  --cream: #f5e6c8;
  --maroon: #4a1c22;
  --muted: #b8a88a;
  --font-script: "Great Vibes", cursive;
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --font-display: "Cinzel", serif;
  --font-ui: "Plus Jakarta Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background: #1b1712;
  color: var(--cream);
  font-family: var(--font-ui);
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #11100c;
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
  color: var(--gold-light);
}

.toolbar h1 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
}

.toolbar p {
  font-size: 12px;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.5;
}

.toolbar button {
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, #efd171, #c9a227);
  color: #1a1206;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
}

.preview {
  padding: 28px 16px 48px;
  display: grid;
  gap: 28px;
  justify-items: center;
  overflow-x: auto;
}

.sheet-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 8px;
}

.sheet {
  width: 297mm;
  height: 210mm;
  display: flex;
  background: var(--bg);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  position: relative;
}

.sheet::after {
  content: "";
  position: absolute;
  top: 8mm;
  bottom: 8mm;
  left: 50%;
  width: 0;
  border-left: 1px dashed rgba(212, 175, 55, 0.35);
  pointer-events: none;
}

.panel {
  width: 148.5mm;
  height: 210mm;
  padding: 12mm 11mm;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(90, 40, 20, 0.28), transparent 60%),
    var(--bg);
}

.ornament {
  width: 100%;
  height: 18mm;
}

.kicker {
  font-family: var(--font-display);
  font-size: 8.5pt;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.script {
  font-family: var(--font-serif);
  font-style: italic;
}

.names {
  font-family: var(--font-script);
  font-size: 42pt;
  line-height: 0.9;
  color: var(--cream);
}

.amp {
  display: block;
  font-size: 0.55em;
  color: var(--gold);
}

.gold-line {
  width: 28mm;
  height: 1px;
  margin: 4mm auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.photo {
  width: 58mm;
  height: 58mm;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5pt solid var(--gold);
  box-shadow: 0 0 0 3mm rgba(201, 162, 39, 0.12);
  margin: 4mm 0 5mm;
}

.photo.small {
  width: 38mm;
  height: 38mm;
  margin: 2mm 0 3mm;
}

.couple-row {
  display: flex;
  gap: 6mm;
  width: 100%;
  justify-content: center;
  margin-top: 3mm;
}

.person {
  flex: 1;
}

.person h3 {
  font-family: var(--font-script);
  font-size: 22pt;
  color: var(--gold-light);
}

.person .full {
  font-family: var(--font-display);
  font-size: 6.5pt;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 1mm 0 2mm;
}

.person p,
.body-text,
.place {
  font-family: var(--font-serif);
  font-size: 10pt;
  line-height: 1.5;
  color: var(--muted);
}

.thanks-title {
  font-family: var(--font-script);
  font-size: 36pt;
  color: var(--cream);
  line-height: 1;
  margin-top: 4mm;
}

.cover-wedding {
  font-family: var(--font-script);
  font-size: 38pt;
  line-height: 0.85;
  margin-top: 8mm;
}

.cover-meta {
  font-family: var(--font-serif);
  font-size: 10pt;
  color: var(--gold-light);
  margin-top: 1.5mm;
}

.guest-box {
  width: 100%;
  height: 28mm;
  margin: 4mm 0 3mm;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(255, 248, 230, 0.04);
}

.tiny {
  font-family: var(--font-serif);
  font-size: 8pt;
  font-style: italic;
  color: var(--muted);
}

.letter {
  justify-content: center;
}

.bismillah {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12pt;
  color: var(--gold-light);
  margin-bottom: 2mm;
}

.salam {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 10pt;
  color: var(--cream);
  margin: 1.5mm 0 3mm;
}

.letter-text {
  font-family: var(--font-serif);
  font-size: 9.2pt;
  line-height: 1.55;
  color: var(--muted);
  max-width: 118mm;
}

.kicker-long {
  letter-spacing: 0.12em;
  font-size: 7.5pt;
}

.person-name {
  font-family: var(--font-script);
  font-size: 26pt;
  color: var(--gold-light);
  line-height: 1;
  margin-top: 4mm;
}

.person-nick {
  font-family: var(--font-display);
  font-size: 8pt;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 1mm 0 1.5mm;
}

.amp-inline {
  font-family: var(--font-script);
  font-size: 22pt;
  color: var(--gold);
  margin: 2mm 0;
}

.hosts {
  font-family: var(--font-serif);
  font-size: 9pt;
  line-height: 1.55;
  color: var(--cream);
  margin-top: 2mm;
}

.arabic {
  font-family: "Amiri", serif;
  font-size: 13pt;
  line-height: 1.8;
  color: var(--gold-light);
  direction: rtl;
  margin: 3mm 0;
}

.date-block {
  margin: 3mm 0 2mm;
}

.date-block .num {
  font-family: var(--font-display);
  font-size: 42pt;
  line-height: 0.9;
  color: var(--cream);
}

.date-block .meta {
  font-family: var(--font-serif);
  font-size: 12pt;
  color: var(--gold-light);
}

.account {
  margin-top: auto;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 4mm;
  padding: 4mm 5mm;
  width: 100%;
}

.account h4 {
  font-family: var(--font-display);
  font-size: 8pt;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 1.5mm;
}

.account .no {
  font-family: var(--font-display);
  font-size: 16pt;
  letter-spacing: 0.1em;
  color: var(--gold-light);
}

.wayang {
  position: absolute;
  bottom: 10mm;
  width: 28mm;
  opacity: 0.85;
}

.wayang.left { left: 3mm; }
.wayang.right { right: 3mm; transform: scaleX(-1); }

.fold-note {
  position: absolute;
  bottom: 4mm;
  font-size: 7pt;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(201, 162, 39, 0.45);
}

@media screen {
  .sheet-wrap {
    width: min(96vw, 980px);
    overflow: hidden;
  }

  .sheet {
    transform: scale(0.5);
    transform-origin: top left;
    margin-bottom: -105mm;
  }
}

@media print {
  .toolbar,
  .sheet-label {
    display: none !important;
  }

  html,
  body {
    background: #fff;
  }

  .preview {
    padding: 0;
    gap: 0;
  }

  .sheet {
    box-shadow: none;
    page-break-after: always;
    break-after: page;
    zoom: 1;
    transform: none;
  }

  .sheet:last-child {
    page-break-after: auto;
  }

  .sheet::after {
    display: none;
  }

  @page {
    size: A4 landscape;
    margin: 0;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
