/* ==========================================================================
   Theme colours. A theme (or the card's own settings) overrides these.
   Defaults = the original "Klasik" design.
   ========================================================================== */
:root {
  /* Body text and labels (names and headings keep their decorative fonts) */
  --ns-font-body: "Plus Jakarta Sans", sans-serif;
  /* Text */
  --ns-ink: #282d2a;                  /* main text */
  --ns-accent-text: #a09060;          /* gold text: names, date, greeting */
  --ns-accent-muted: #bba870;         /* light gold text: relations, focused labels */
  --ns-muted: #708090;                /* bottom bar labels */
  --ns-copyright: #666;

  /* Accent (lines, borders, ornaments) */
  --ns-accent: #7a6200;
  --ns-accent-rgb: 122, 98, 0;        /* for see-through accent: rgba(var(--ns-accent-rgb), .2) */
  --ns-accent-soft: #c2b280;
  --ns-accent-soft-rgb: 194, 178, 128;
  --ns-ornament: #a08a00;
  --ns-particle: #d4b840;
  --ns-frame-rgb: 110, 90, 0;         /* thin frame on the cover */
  --ns-card-shadow-rgb: 80, 65, 0;

  /* Buttons */
  --ns-button: #7a6200;
  --ns-button-rgb: 122, 98, 0;
  --ns-button-hover: #5a4a00;
  --ns-button-light: #9a7e00;
  --ns-on-button: #fff;               /* text/icons on a filled button */

  /* Backgrounds */
  --ns-page-bg: #f3f4f6;              /* around the card */
  --ns-splash-from: #faf8f0;
  --ns-splash-to: #f5f0e5;
  --ns-card-bg: #ffffff;
  --ns-surface-rgb: 255, 255, 255;    /* see-through panels over the artwork (white glow) */
  --ns-bar-bg: #f3f4f6;               /* bottom bar */
  --ns-popup-bg: #f9f5f0;
  --ns-popup-item: #f8f9fa;
  --ns-popup-item-hover: #f0f1f2;
  --ns-input-bg: #fffdf7;
  --ns-input-border: #ddd;
}

/* Form fields and buttons don't take the page font by themselves */
input,
textarea,
select,
button {
  font-family: inherit;
}

body,
html {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  /* align-items: center; */
  background-color: var(--ns-page-bg);
  font-family: var(--ns-font-body);
  height: 100vh;
}

/* First Page Display */

.splash-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, var(--ns-splash-from) 0%, var(--ns-splash-to) 100%);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Cover: fills the phone screen (up to 430px wide, like the card); a tall rounded card on bigger screens */
.invitation-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100%;
  height: 100dvh;
  background: var(--ns-card-bg);
  box-shadow:
    0 22px 60px rgba(var(--ns-card-shadow-rgb), 0.18),
    0 8px 24px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: all 0.8s ease;
  overflow: hidden;
}
@media (min-width: 600px) and (min-height: 640px) {
  .invitation-card {
    height: min(92vh, 880px);
    border-radius: 18px;
  }
}

.card-front {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Wildflower frame + white radial vignette â€” exactly like theme.png */
  background:
    radial-gradient(
      ellipse 68% 56% at 50% 50%,
      rgba(var(--ns-surface-rgb), 1) 0%,
      rgba(var(--ns-surface-rgb), 0.96) 35%,
      rgba(var(--ns-surface-rgb), 0.65) 58%,
      rgba(var(--ns-surface-rgb), 0) 100%
    ),
    url("../images/bg.webp") center / cover no-repeat;
  backface-visibility: hidden;
  box-sizing: border-box;
  overflow: hidden;
  padding: calc(40px + env(safe-area-inset-top)) 28px calc(40px + env(safe-area-inset-bottom));
}

/* Thin olive-gold inner border frame */
.card-front::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  bottom: 14px;
  border: 1px solid rgba(var(--ns-frame-rgb), 0.2);
  pointer-events: none;
  z-index: 0;
}

/* Staggered fade-up entrance for each card element */
.card-front > * {
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: cardFadeUp 0.75s ease forwards;
}
.card-front > *:nth-child(1) {
  animation-delay: 0.1s;
}
.card-front > *:nth-child(2) {
  animation-delay: 0.25s;
}
.card-front > *:nth-child(3) {
  animation-delay: 0.38s;
}
.card-front > *:nth-child(4) {
  animation-delay: 0.52s;
}
.card-front > *:nth-child(5) {
  animation-delay: 0.65s;
}
.card-front > *:nth-child(6) {
  animation-delay: 0.75s;
}
.card-front > *:nth-child(7) {
  animation-delay: 0.85s;
}
.card-front > *:nth-child(8) {
  animation-delay: 0.95s;
}

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

.decorative-border {
  display: none;
}

.inner-border {
  display: none;
}

.spnames {
  font-family: var(--ns-font-names, "Italianno", cursive);
  font-style: var(--ns-names-style, normal);
  font-size: calc(clamp(54px, 16vw, 68px) * var(--ns-names-scale, 1));
  color: var(--ns-ink);
  margin-bottom: 6px;
  text-align: center;
  line-height: 1.1;
}

.date {
  font-family: "Playfair Display", serif;
  font-size: 16px;
  color: var(--ns-accent-text);
  margin-bottom: 30px;
}

.floral-divider {
  width: 140px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='16' viewBox='0 0 140 16'%3E%3Cline x1='0' y1='8' x2='52' y2='8' stroke='%237a6800' stroke-width='0.8' opacity='0.35'/%3E%3Ccircle cx='60' cy='8' r='1.8' fill='%237a6800' opacity='0.4'/%3E%3Ccircle cx='70' cy='8' r='3' fill='%237a6800' opacity='0.5'/%3E%3Ccircle cx='80' cy='8' r='1.8' fill='%237a6800' opacity='0.4'/%3E%3Cline x1='88' y1='8' x2='140' y2='8' stroke='%237a6800' stroke-width='0.8' opacity='0.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  margin: 10px 0;
}

/* "Buka Jemputan": a wax seal in the button colour with the couple's initials (card.php draws the
   uneven wax edge as SVG), and the words in small italic underneath. Flat and printed-looking:
   only a faint highlight and a small shadow, like real wax on paper. */
.open-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border: none;
  background: none;
  color: var(--ns-ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.seal {
  position: relative;
  display: block;
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.22));
  transition: transform 0.2s ease;
}
.seal-svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-8deg); /* a seal is never pressed perfectly straight */
}
.seal-wax {
  fill: var(--ns-button);
}
/* pressed ring: a dark line with a light line just below, so it looks stamped into the wax */
.seal-ring,
.seal-ring-light {
  fill: none;
  stroke-width: 1.3;
}
.seal-ring {
  stroke: rgba(0, 0, 0, 0.28);
}
.seal-ring-light {
  stroke: rgba(255, 255, 255, 0.16);
}
.seal-initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: "Cinzel Decorative", "Playfair Display", serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ns-on-button);
  opacity: 0.9;
  /* stamped look: shadow above, faint light below */
  text-shadow:
    0 -1px 0 rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.18);
}
.seal-dot {
  font-size: 16px;
  opacity: 0.8;
}
.open-button .btn-label {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ns-ink);
  opacity: 0.85;
}
@media (hover: hover) {
  .open-button:hover .seal {
    transform: translateY(-2px);
  }
}
.open-button:active .seal,
.open-button.clicked .seal {
  transform: scale(0.94);
}
.open-button.clicked {
  pointer-events: none;
}
.open-button:focus-visible {
  outline: 2px solid var(--ns-button);
  outline-offset: 4px;
  border-radius: 12px;
}

.corner-flourish {
  display: none;
}

.sptop-left,
.sptop-right,
.spbottom-left,
.spbottom-right {
  display: none;
}

/* Animation classes */
.fade-out {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.8s ease,
    visibility 0.8s;
}

.card-flip {
  transform: scale(1.04);
  opacity: 0;
}

#mainContent {
  display: none;
  opacity: 0;
  transition: opacity 1s ease;
}

#mainContent.show {
  opacity: 1;
}

@media (max-width: 768px) {
  .names {
    font-size: 42px;
  }
}



/* Navbar styles */
/* Bottom navigation: a floating pill in the theme's colours (see-through with blur).
   The area around the pill lets taps through to the card. */
.header_area {
  position: sticky;
  bottom: 0;
  z-index: 999; /* above the popup dimming (998), so the active button stays visible; popups are 1000 */
  padding: 0 12px calc(12px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.et-hero-tabs-container {
  pointer-events: auto;
  display: flex;
  align-items: stretch;
  gap: 2px;
  max-width: 420px;
  margin: 0 auto;
  padding: 6px;
  box-sizing: border-box;
  border-radius: 22px;
  background: rgba(var(--ns-surface-rgb), 0.8);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(var(--ns-accent-rgb), 0.22);
  box-shadow:
    0 10px 30px rgba(var(--ns-card-shadow-rgb), 0.18),
    0 2px 6px rgba(0, 0, 0, 0.06);
}
.et-hero-tab {
  /* share the width; never wider than the screen */
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 16px;
  color: var(--ns-ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.15s ease;
}
.et-hero-tab i {
  font-size: 18px;
  color: var(--ns-accent-text);
  transition: color 0.25s ease;
}
.et-hero-tab span {
  font-family: var(--ns-font-body);
  font-size: calc(10.5px * var(--ns-body-scale, 1));
  font-weight: 600;
  letter-spacing: 0.02em;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.85;
}
.et-hero-tab:active {
  transform: scale(0.95);
}
@media (hover: hover) {
  .et-hero-tab:hover {
    background-color: rgba(var(--ns-button-rgb), 0.08);
  }
}
.et-hero-tab:focus-visible {
  outline: 2px solid var(--ns-button);
  outline-offset: 2px;
}
/* The button whose popup is open */
.et-hero-tab.is-active {
  background-color: rgba(var(--ns-button-rgb), 0.14);
}
.et-hero-tab.is-active i,
.et-hero-tab.is-active span {
  color: var(--ns-button);
  opacity: 1;
}

/* Location Popup Styles */
.location-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--ns-popup-bg);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  width: 90%;
  max-width: 350px;
  text-align: center;
  max-height: 85vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.location-popup h2 {
  margin: 0 0 15px;
  color: var(--ns-ink);
  font-size: 17px;
  font-family: "Playfair Display", serif;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.venue-name {
  font-family: var(--ns-font-body);
  font-weight: 600;
  color: var(--ns-ink);
  margin-bottom: 10px;
}

.address {
  font-size: calc(14px * var(--ns-body-scale, 1));
  font-family: var(--ns-font-body);
  color: var(--ns-ink);
  margin-bottom: 20px;
}

.map-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.map-button {
  padding: 10px 20px;
  border: 1px solid rgba(var(--ns-button-rgb), 0.4);
  border-radius: 25px;
  text-decoration: none;
  color: var(--ns-ink);
  font-size: calc(14px * var(--ns-body-scale, 1));
  font-family: var(--ns-font-body);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}
.map-button:hover {
  background-color: var(--ns-button);
  border-color: var(--ns-button);
  color: var(--ns-on-button);
}

/* Contact popup rows */
.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(var(--ns-accent-rgb), 0.1);
}
.contact-row:first-of-type {
  padding-top: 4px;
}
.contact-row:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}
.contact-row-info {
  text-align: left;
}
.contact-row-name {
  font-family: "Playfair Display", serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ns-ink);
}
.contact-row-relation {
  font-size: 11px;
  color: var(--ns-accent-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 2px;
}
.contact-row-actions {
  display: flex;
  gap: 8px;
}
.contact-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.2s;
}
.call-btn {
  border-color: rgba(var(--ns-button-rgb), 0.45);
  color: var(--ns-ink);
}
.call-btn:hover {
  background-color: var(--ns-button);
  border-color: var(--ns-button);
  color: var(--ns-on-button);
}
.wa-btn {
  border-color: #25d366;
  color: #25d366;
}
.wa-btn:hover {
  background-color: #25d366;
  border-color: #25d366;
  color: #ffffff;
}

/* RSVP popup: header, fields with inline errors, attendance cards, guest stepper, thank-you panel */
.rsvp-popup,
.gift-popup,
.contact-popup,
.loc-popup {
  max-width: 360px;
  padding: 24px 20px 18px;
  border-radius: 22px;
  text-align: left;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}
.rsvp-head {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(var(--ns-button-rgb), 0.15);
}
.rsvp-eyebrow {
  font-family: var(--ns-font-body);
  font-size: calc(10px * var(--ns-body-scale, 1));
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ns-button);
}
.location-popup.rsvp-popup h2,
.location-popup.gift-popup h2,
.location-popup.contact-popup h2,
.location-popup.loc-popup h2 {
  margin: 4px 0 2px;
  font-size: 22px;
  letter-spacing: 4px;
}
.rsvp-sub {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ns-ink);
  opacity: 0.75;
}
.rsvp-field {
  margin-bottom: 12px;
}
.rsvp-label {
  display: block;
  font-size: calc(10px * var(--ns-body-scale, 1));
  font-weight: 600;
  font-family: var(--ns-font-body);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ns-ink);
  opacity: 0.75;
  margin-bottom: 5px;
}
.rsvp-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(var(--ns-button-rgb), 0.22);
  border-radius: 10px;
  font-size: calc(16px * var(--ns-body-scale, 1)); /* 16px or more: iPhone does not zoom in on focus */
  font-family: var(--ns-font-body);
  color: var(--ns-ink);
  background: var(--ns-input-bg);
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rsvp-input::placeholder {
  color: var(--ns-ink);
  opacity: 0.4;
  font-size: 14px;
}
.rsvp-input:focus {
  border-color: var(--ns-button);
  box-shadow: 0 0 0 3px rgba(var(--ns-button-rgb), 0.15);
}
.rsvp-input.is-invalid {
  border-color: #d64545;
}
.rsvp-error {
  display: none;
  margin-top: 6px;
  font-family: var(--ns-font-body);
  font-size: calc(12px * var(--ns-body-scale, 1));
  color: #d64545;
}
.rsvp-error.is-shown {
  display: block;
}
.rsvp-error-form {
  margin: 0 0 12px;
  text-align: center;
}

/* Attendance: three cards with an icon */
.rsvp-radio-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.rsvp-radio-pill {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rsvp-radio-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rsvp-radio-pill span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px 7px;
  border: 1px solid rgba(var(--ns-button-rgb), 0.3);
  border-radius: 10px;
  font-size: calc(12px * var(--ns-body-scale, 1));
  font-weight: 500;
  font-family: var(--ns-font-body);
  color: var(--ns-ink);
  background: var(--ns-input-bg);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.rsvp-radio-pill span i {
  font-size: 15px;
  color: var(--ns-button);
  transition: color 0.2s;
}
.rsvp-radio-pill:active span {
  transform: scale(0.96);
}
.rsvp-radio-pill input[type="radio"]:checked + span {
  background: var(--ns-button);
  color: var(--ns-on-button);
  border-color: var(--ns-button);
  box-shadow: 0 6px 16px rgba(var(--ns-button-rgb), 0.28);
}
.rsvp-radio-pill input[type="radio"]:checked + span i {
  color: var(--ns-on-button);
}
.rsvp-radio-pill input[type="radio"]:focus-visible + span {
  outline: 2px solid var(--ns-button);
  outline-offset: 2px;
}

/* Guest count: - 2 + (folds away for "Tidak") */
.rsvp-guests {
  max-height: 160px;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.35s ease;
}
.rsvp-guests.is-collapsed {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
}
.rsvp-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px;
  border: 1px solid rgba(var(--ns-button-rgb), 0.22);
  border-radius: 10px;
  background: var(--ns-input-bg);
}
.rsvp-stepper:has(.rsvp-step) .rsvp-count {
  flex: 1;
}
.rsvp-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(var(--ns-button-rgb), 0.35);
  background: transparent;
  color: var(--ns-button);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, opacity 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.rsvp-step:not(:disabled):hover {
  background: var(--ns-button);
  color: var(--ns-on-button);
}
.rsvp-step:not(:disabled):active {
  transform: scale(0.9);
}
.rsvp-step:disabled {
  opacity: 0.3;
  cursor: default;
}
.rsvp-count {
  display: block;
  width: 100%;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--ns-ink);
  line-height: 32px;
}
.rsvp-count::after {
  content: " orang";
  font-family: var(--ns-font-body);
  font-size: calc(12px * var(--ns-body-scale, 1));
  font-weight: 500;
  opacity: 0.7;
}
.rsvp-hint {
  margin-top: 4px;
  font-family: var(--ns-font-body);
  font-size: calc(11px * var(--ns-body-scale, 1));
  color: var(--ns-ink);
  opacity: 0.6;
  text-align: center;
}

.rsvp-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 10px;
  background: var(--ns-button);
  color: var(--ns-on-button);
  border: none;
  border-radius: 10px;
  font-size: calc(12px * var(--ns-body-scale, 1));
  font-weight: 600;
  font-family: var(--ns-font-body);
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(var(--ns-button-rgb), 0.22);
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
  margin-top: 4px;
}
.rsvp-submit-btn:hover {
  background: var(--ns-button-hover);
}
.rsvp-submit-btn:active {
  transform: scale(0.98);
}
.rsvp-submit-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}
.rsvp-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: rsvpSpin 0.7s linear infinite;
}
.rsvp-submit-btn.is-sending .rsvp-spinner {
  display: inline-block;
}
@keyframes rsvpSpin {
  to { transform: rotate(360deg); }
}

/* Gift popup: one soft card per account */
.gift-popup .rsvp-sub {
  font-size: 13px;
  line-height: 1.5;
  margin-top: 4px;
}
.gift-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gift-card {
  padding: 16px;
  border: 1px solid rgba(var(--ns-button-rgb), 0.18);
  border-radius: 16px;
  background: rgba(var(--ns-button-rgb), 0.05);
}
/* Bank: a plain small label */
.gift-bank {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--ns-font-body);
  font-size: calc(11px * var(--ns-body-scale, 1));
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ns-button);
}
.gift-holder {
  margin-top: 4px;
  font-family: "Playfair Display", serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ns-ink);
  overflow-wrap: anywhere;
}
/* Account number with a light "Salin" button beside it */
.gift-acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}
.gift-acc {
  font-family: var(--ns-font-body);
  font-size: calc(16px * var(--ns-body-scale, 1));
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 80%, transparent);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.gift-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(var(--ns-button-rgb), 0.4);
  border-radius: 20px;
  background: transparent;
  color: var(--ns-button);
  font-family: var(--ns-font-body);
  font-size: calc(12px * var(--ns-body-scale, 1));
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.gift-copy:hover {
  background: var(--ns-button);
  border-color: var(--ns-button);
  color: var(--ns-on-button);
}
.gift-copy:active {
  transform: scale(0.95);
}
.gift-copy.is-copied {
  background: #2e8b57;
  border-color: #2e8b57;
  color: #fff;
}
/* QR: a clean white tile */
.gift-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
}
.gift-qr img {
  width: 150px;
  height: 150px;
  padding: 8px;
  box-sizing: content-box;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(var(--ns-button-rgb), 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.gift-qr span {
  font-family: var(--ns-font-body);
  font-size: calc(11px * var(--ns-body-scale, 1));
  color: var(--ns-ink);
  opacity: 0.55;
}
.gift-empty {
  text-align: center;
  font-family: var(--ns-font-body);
  font-size: calc(14px * var(--ns-body-scale, 1));
  color: var(--ns-ink);
  opacity: 0.7;
  padding: 10px 0;
}

/* Contact popup: one card per person */
.contact-popup .rsvp-sub {
  font-size: 13px;
  line-height: 1.5;
  margin-top: 4px;
}
.contact-list {
  display: flex;
  flex-direction: column;
}
/* One person per row, thin line between rows */
.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid rgba(var(--ns-button-rgb), 0.15);
}
.contact-row:first-child {
  padding-top: 0;
}
.contact-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.contact-info {
  min-width: 0;
}
.contact-name {
  font-family: "Playfair Display", serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ns-ink);
  overflow-wrap: anywhere;
}
.contact-relation {
  margin-left: 6px;
  font-family: var(--ns-font-body);
  font-size: calc(12px * var(--ns-body-scale, 1));
  font-weight: 400;
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 55%, transparent);
}
.contact-relation::before {
  content: "\00B7  ";
}
.contact-phone {
  margin-top: 2px;
  font-family: var(--ns-font-body);
  font-size: calc(13px * var(--ns-body-scale, 1));
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 65%, transparent);
  font-variant-numeric: tabular-nums;
}
.contact-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.contact-action {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.contact-call {
  border: 1px solid rgba(var(--ns-button-rgb), 0.4);
  color: var(--ns-button);
}
.contact-call:hover {
  background: var(--ns-button);
  border-color: var(--ns-button);
  color: var(--ns-on-button);
}
.contact-wa {
  border: 1px solid rgba(37, 211, 102, 0.6);
  color: #1fa855;
  font-size: 18px;
}
.contact-wa:hover {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

/* Location popup: simple rows (venue with pin, then date and time), then the two buttons */
.loc-venue {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}
.loc-pin {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--ns-button-rgb), 0.12);
  color: var(--ns-button);
  font-size: 16px;
}
.loc-venue-text {
  min-width: 0;
  padding-top: 2px;
}
.loc-name {
  text-wrap: balance;
  font-family: "Playfair Display", serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ns-ink);
}
.loc-address {
  margin-top: 3px;
  font-family: var(--ns-font-body);
  font-size: calc(13px * var(--ns-body-scale, 1));
  line-height: 1.55;
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 65%, transparent);
}
.loc-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--ns-font-body);
  font-size: calc(12px * var(--ns-body-scale, 1));
  font-weight: 600;
  color: var(--ns-button);
  cursor: pointer;
}
.loc-copy.is-copied {
  color: #2e8b57;
}
.loc-when {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(var(--ns-button-rgb), 0.15);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.loc-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--ns-font-body);
  font-size: calc(13px * var(--ns-body-scale, 1));
  line-height: 1.5;
  color: var(--ns-ink);
}
.loc-row i {
  flex-shrink: 0;
  width: 38px;
  text-align: center;
  padding-top: 2px;
  color: var(--ns-button);
}
.loc-nav {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
}
.loc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 12px;
  font-family: var(--ns-font-body);
  font-size: calc(13px * var(--ns-body-scale, 1));
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.loc-btn:active {
  transform: scale(0.97);
}
.loc-btn i {
  font-size: 16px;
}
.loc-maps {
  background: var(--ns-button);
  color: var(--ns-on-button);
}
.loc-maps:hover {
  background: var(--ns-button-hover);
  color: var(--ns-on-button);
}
.loc-waze {
  border: 1px solid rgba(var(--ns-button-rgb), 0.35);
  background: var(--ns-input-bg);
  color: var(--ns-ink);
}
.loc-waze i {
  color: #33ccff;
}
.loc-waze:hover {
  border-color: #33ccff;
  color: var(--ns-ink);
}

/* Large QR viewer (above the popups) */
.qr-viewer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
}
.qr-viewer[hidden] {
  display: none;
}
.qr-viewer-box {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: 40px 20px 20px;
  border-radius: 22px;
  background: #fff;
  text-align: center;
  animation: popInWishBox 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.qr-viewer-box img {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  object-fit: contain;
}
.qr-viewer-close {
  color: #333;
}
.qr-viewer-title {
  margin: 10px 0 16px;
  font-family: var(--ns-font-body);
  font-size: calc(13px * var(--ns-body-scale, 1));
  font-weight: 600;
  color: #333;
}
.qr-viewer-save {
  box-sizing: border-box; /* it is a link: keep the padding inside the full width */
  text-decoration: none;
}
@keyframes popInWishBox {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

/* Thank-you panel after sending */
.rsvp-done {
  text-align: center;
  padding: 4px 0 0;
}
.rsvp-done-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ns-button);
  color: var(--ns-on-button);
  font-size: 28px;
  box-shadow: 0 0 0 8px rgba(var(--ns-button-rgb), 0.12);
  animation: rsvpDonePop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.rsvp-done h3 {
  margin: 0 0 8px;
  font-family: "Playfair Display", serif;
  font-size: 22px;
  color: var(--ns-ink);
}
.rsvp-done p {
  margin: 0 0 22px;
  font-family: var(--ns-font-body);
  font-size: calc(14px * var(--ns-body-scale, 1));
  line-height: 1.6;
  color: var(--ns-ink);
  opacity: 0.8;
}
@keyframes rsvpDonePop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.overlay-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998; /* below the bottom bar (999) and popups (1000) */
}

/* Card footer: hashtag, then "WALIMATULURUS â€¢ 11 JULAI 2026" */
.card-footer {
  text-align: center;
  max-width: 430px;
  margin: 0 auto;
  padding: 28px 16px 18px;
  box-sizing: border-box;
  position: relative;
}
/* thin straight line above the footer, with space around it */
.card-footer::before {
  content: "";
  display: block;
  height: 1px;
  margin: 0 8px 28px;
  background: rgba(var(--ns-button-rgb), 0.3);
}
.card-footer .copyright {
  margin-top: 22px;
  font-family: var(--ns-font-body);
  font-size: calc(11px * var(--ns-body-scale, 1));
  letter-spacing: 0.02em;
  color: var(--ns-copyright);
}
.card-footer-tag {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 24px;
  color: var(--ns-ink);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.card-footer-meta {
  margin-top: 8px;
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(12px * var(--ns-heading-scale, 1));
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ns-copyright);
}

/* Phones: less padding around the Ucapan form so the wishes have room */
@media (max-width: 480px) {
  .slide .ucapan-container {
    padding: 16px 12px;
  }
  .slide .ucapan-card {
    padding: 32px 20px;
  }
}

.slider-container {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.slider {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.slide {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.invitation {
  width: 90vw;
  max-width: 430px;
  height: 90vh;
  background-image: url("../backgrounds/bunga-putih.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.word-invitation {
  max-width: 430px;
  /* height: 85vh; Set height to 85% of the viewport height */
  color: var(--ns-accent-text);
  background-image: url("../images/bg.webp");
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Countdown: a framed card with four tiles (seconds in the accent colour) and a calendar link */
.countdown-container {
  box-sizing: border-box; /* padding inside the width, so it fits narrow phones */
  text-align: center;
  background: url("../images/bg.webp") center / cover no-repeat;
  position: relative;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.countdown-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(var(--ns-surface-rgb), 0.88);
  z-index: 0;
}
.countdown-container > * {
  position: relative;
  z-index: 1;
}
.countdown-card {
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  padding: 26px 18px 20px;
  border: 1px solid rgba(var(--ns-button-rgb), 0.22);
  border-radius: 22px;
  background: rgba(var(--ns-surface-rgb), 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.countdown-container h1 {
  margin: 0 0 20px;
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(14px * var(--ns-heading-scale, 1));
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 70%, transparent);
}
#countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.countdown-item {
  padding: 16px 2px 12px;
  border: 1px solid rgba(var(--ns-button-rgb), 0.22);
  border-radius: 16px;
  background: rgba(var(--ns-button-rgb), 0.05);
}
.countdown-number {
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(clamp(22px, 7.5vw, 30px) * var(--ns-heading-scale, 1));
  font-weight: 700;
  line-height: 1.1;
  color: var(--ns-ink);
  font-variant-numeric: tabular-nums;
}
.countdown-label {
  margin-top: 8px;
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(11px * var(--ns-heading-scale, 1));
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 60%, transparent);
}
.countdown-item.is-seconds .countdown-number,
.countdown-item.is-seconds .countdown-label {
  color: var(--ns-button);
}
.countdown-done {
  grid-column: 1 / -1;
  padding: 6px 0;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ns-ink);
}
/* "Simpan Tarikh dalam Kalendar" under a thin line */
.countdown-calendar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(var(--ns-button-rgb), 0.15);
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(13px * var(--ns-heading-scale, 1));
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ns-ink);
  text-decoration: none;
  transition: color 0.2s;
}
.countdown-calendar i {
  font-size: 17px;
  color: var(--ns-button);
}
.countdown-calendar:hover {
  color: var(--ns-button);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* background-color: rgba(253, 242, 248, 0.7); */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
}

.overlay-greet {
  background: rgba(var(--ns-surface-rgb), 0.93);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px 24px;
  text-align: center;
}
.header {
  font-size: 20px;
  color: var(--ns-accent-text);
  margin-bottom: 15px;
}
.names {
  font-size: 60px;
  /* color: #9d174d; */
  color: var(--ns-accent-text);
  margin-bottom: 25px;
  font-family: "cookie", cursive;
}

.bride {
  font-size: calc(26px * var(--ns-names-scale, 1));
  color: var(--ns-ink);
  font-family: "Playfair Display", serif;
  font-style: italic;
  line-height: 1.6;
}

.hashtag {
  font-size: 17px;
  color: var(--ns-ink);
  font-family: "Playfair Display", serif;
  font-style: italic;
}

/* animation */
.bride i {
  margin-top: 1em;
  display: inline-block;
  animation: fadeInScale 2s ease-in-out;
}

.hashtag i {
  margin-top: 1em;
  display: inline-block;
  animation: fadeInScale 2s ease-in-out;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Additional styling */
.bride i {
  color: var(--ns-ink);
  font-style: italic;
  line-height: 1.6;
}

.date {
  font-size: 20px;
  color: var(--ns-accent-text);
  margin-bottom: 15px;
}
.venue {
  font-family: var(--ns-font-body);
  font-size: calc(20px * var(--ns-body-scale, 1));
  color: var(--ns-accent-text);
}

.greet {
  margin-top: 6px;
  font-size: calc(16px * var(--ns-body-scale, 1));
  font-weight: 400;
  color: var(--ns-ink);
  /* softer grey from the theme's text colour (not opacity: the scroll reveal sets opacity) */
  color: color-mix(in srgb, var(--ns-ink) 72%, transparent);
  font-family: var(--ns-font-body);
  line-height: 1.75;
  max-width: 34em;
}
.parent {
  font-family: "Playfair Display", serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--ns-ink);
  line-height: 1.6;
}

.invite-text {
  font-family: "Cinzel Decorative", serif;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--ns-ink);
  line-height: 1.8;
}
.bismillah-text {
  font-family: "Scheherazade New", "Amiri", serif;
  font-size: 20px;
  color: var(--ns-accent-text);
  letter-spacing: 0;
  line-height: 1.6;
  direction: rtl;
  text-shadow: 0 1px 3px rgba(var(--ns-accent-rgb), 0.15);
}

/* Ucapan form */
.ucapan-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  background-image: url("../images/bg.webp");
  background-size: cover; /* Ensure the background covers the full container */
  background-position: center; /* Center the background image */
  background-repeat: no-repeat;
}

.ucapan-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(var(--ns-surface-rgb),
    0.5
  ); /* Opacity layer over the background */
  z-index: 1; /* Make sure it appears behind the card */
}

.ucapan-card {
  background: rgba(var(--ns-surface-rgb), 0.95);
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 500px;
  position: relative;
  z-index: 2; /* Ensure the card appears on top of the opacity layer */
}

.decorative-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--ns-accent);
}

.top-left {
  top: 15px;
  left: 15px;
  border-right: none;
  border-bottom: none;
}

.top-right {
  top: 15px;
  right: 15px;
  border-left: none;
  border-bottom: none;
}

.bottom-left {
  bottom: 15px;
  left: 15px;
  border-right: none;
  border-top: none;
}

.bottom-right {
  bottom: 15px;
  right: 15px;
  border-left: none;
  border-top: none;
}

.ucapan-card h2 {
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 17px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ns-ink);
  margin-bottom: 30px;
}

.elegant-form .form-group {
  position: relative;
  margin-bottom: 30px;
}

.elegant-form input,
.elegant-form textarea {
  width: 100%;
  padding: 10px 0;
  font-size: 16px;
  color: var(--ns-ink);
  border: none;
  outline: none;
  background: transparent;
  transition: 0.3s;
}

.elegant-form textarea {
  min-height: 55px;
  max-height: 220px;
  resize: none;
  line-height: 1.5;
}
/* Character counter under "Ucapan Anda" (amber near the limit, red over it) */
.wish-counter {
  margin: -20px 0 26px;
  text-align: right;
  font-family: var(--ns-font-body);
  font-size: calc(12px * var(--ns-body-scale, 1));
  color: var(--ns-ink);
  opacity: 0.6;
  transition: color 0.2s, opacity 0.2s;
}
.wish-counter.is-near {
  color: #c27c0e;
  opacity: 1;
}
.wish-counter.is-over {
  color: #d64545;
  opacity: 1;
  font-weight: 600;
}

.elegant-form label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 10px 0;
  font-size: 16px;
  color: var(--ns-accent-text);
  pointer-events: none;
  transition: 0.3s;
}

.elegant-form .line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--ns-accent-soft);
}

.elegant-form input:focus ~ label,
.elegant-form textarea:focus ~ label,
.elegant-form input:valid ~ label,
.elegant-form textarea:valid ~ label {
  top: -20px;
  font-size: 12px;
  color: var(--ns-accent-muted);
}

.elegant-form button {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 2px solid var(--ns-button);
  color: var(--ns-ink);
  font-size: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  border-radius: 5px;
}

.elegant-form button:hover {
  background: var(--ns-button);
  color: white;
}

.notice {
  text-align: center;
  font-size: 12px;
  color: var(--ns-accent-text);
  margin-top: 15px;
}

@media (max-width: 480px) {
  .ucapan-card h2 {
    font-size: 20px;
  }
}

/* Popup styling */
.waze-popup {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.3s ease;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Show popup on hover */
.et-hero-tab.waze:hover .waze-popup {
  display: block;
}

/* Tentative */

.word-tentative {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 20px 0;
}
.card {
  padding: 36px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeIn 1s ease-out;
  border-radius: 16px;
  max-width: 370px;
  width: 85%;
  background: rgba(var(--ns-surface-rgb), 0.93);
  box-shadow:
    0 8px 32px rgba(var(--ns-accent-rgb), 0.14),
    0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(var(--ns-accent-rgb), 0.22);
}
.background-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../images/bg.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  z-index: 0;
}
.card > * {
  position: relative;
  z-index: 1;
}
.leaf {
  position: absolute;
  width: 50px;
  height: 50px;
  background-image: url("../images/flw3.webp");
  background-size: contain;
  animation: floatingLeaf 3s ease-in-out infinite;
}
.leaf-1 {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}
.leaf-2 {
  top: 20%;
  right: 10%;
  animation-delay: 1s;
}
.leaf-3 {
  bottom: 10%;
  left: 15%;
  animation-delay: 2s;
}
.leaf-4 {
  bottom: 20%;
  right: 15%;
  animation-delay: 1.5s;
}

.card h1 {
  font-family: "Playfair Display", serif;
  font-size: 17px;
  color: var(--ns-ink);
  margin: 0 0 28px;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.event-item {
  margin-bottom: 22px;
  animation: fadeIn 1s ease-out;
  animation-fill-mode: both;
}
.event-item:last-of-type {
  margin-bottom: 0;
}
.event-item:nth-child(2) {
  animation-delay: 0.3s;
}
.event-item:nth-child(3) {
  animation-delay: 0.6s;
}
.event-item:nth-child(4) {
  animation-delay: 0.9s;
}
.event-time {
  display: block;
  font-size: calc(13px * var(--ns-body-scale, 1));
  color: var(--ns-ink);
  font-weight: 600;
  letter-spacing: 1px;
  font-family: var(--ns-font-body);
  margin-bottom: 4px;
}
.event-label {
  display: block;
  font-family: var(--ns-font-body);
  font-size: calc(17px * var(--ns-body-scale, 1));
  color: var(--ns-ink);
  line-height: 1.4;
}
@keyframes floatingLeaf {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(5px, 5px) rotate(5deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px;
  }

  .card {
    padding: 24px 18px;
  }

  h1 {
    font-size: 22px;
  }
}

/* Media query for smaller screens */
@media (max-width: 768px) {
  .invitation {
    width: 100vw;
    min-height: 85vh;
    max-height: 850px;
  }
  /* .names {
        font-size: 28px;
    }
    .date {
        font-size: 14px;
    }
    .venue {
        font-size: calc(12px * var(--ns-body-scale, 1));
    }

    .parent {
        font-size: 20px;
    } */
}

.popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--ns-popup-bg);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  width: 90%;
  max-width: 350px;
}

.popup h2 {
  margin: 0 0 15px;
  color: var(--ns-ink);
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.popup-content {
  padding: 20px;
}

.popup-title {
  text-align: center;
  color: var(--ns-ink);
  font-size: 24px;
  margin-bottom: 20px;
  font-family: "Playfair Display", serif;
}

/* RSVP */

.italic-placeholder::placeholder {
  font-style: italic;
}
.modern-form {
  font-family: var(--ns-font-body);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modern-form .form-header {
  font-size: 0.9rem;
  color: var(--ns-accent-text);
  margin-bottom: 1rem;
}

.modern-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modern-form label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ns-ink);
}

.modern-form input[type="text"],
.modern-form input[type="tel"],
.modern-form select {
  color: var(--ns-ink);
  padding: 0.75rem;
  border: 1px solid var(--ns-input-border);
  border-radius: 6px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: white;
}

.modern-form input[type="text"]:focus,
.modern-form input[type="tel"]:focus,
.modern-form select:focus {
  outline: none;
  border-color: var(--ns-accent-soft);
  box-shadow: 0 0 0 3px rgba(var(--ns-accent-soft-rgb), 0.2);
}

.modern-form .radio-group {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.modern-form .radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.modern-form .radio-custom {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--ns-accent-soft);
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.modern-form input[type="radio"] {
  display: none;
}

.modern-form input[type="radio"]:checked + .radio-custom::after {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  background-color: var(--ns-accent-soft);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.modern-form .submit-btn {
  border: 2px solid var(--ns-accent-soft);
  background-color: white;
  color: var(--ns-accent-muted);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.modern-form .submit-btn:hover {
  background-color: var(--ns-accent-soft);
  color: white;
}

/* QR Code  */
.gift-options-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.gift-option {
  background-color: white;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.gift-qr-code {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(var(--ns-accent-rgb), 0.15);
}

.gift-card-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(var(--ns-accent-rgb), 0.1);
  gap: 10px;
}
.gift-card-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}
.gift-qr-wrapper {
  display: flex;
  justify-content: center;
}
.gift-card-details {
  text-align: center;
}
.gift-account {
  font-size: 13px;
  color: var(--ns-ink);
  margin-top: 3px;
}

.gift-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.gift-icon {
  /* width: 30px; */
  height: 30px;
  margin-right: 10px;
}
.qr-code-container {
  display: flex;
  justify-content: center;
  margin: 15px 0;
}
.qr-code {
  width: 200px;
  height: 200px;
}
.gift-details {
  text-align: center;
}
.gift-name,
.gift-account {
  margin: 5px 0;
}
.copy-button {
  color: var(--ns-ink);
  background-color: #f0f0f0;
  border: none;
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.copy-button:hover {
  background-color: #e0e0e0;
}

/* invitation button */
.circular-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
.circular-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--ns-button-rgb), 0.35);
  background: rgba(var(--ns-surface-rgb), 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
}
.circular-button:hover {
  background-color: var(--ns-button);
}
.circular-button i {
  font-size: 16px;
  color: var(--ns-ink);
}
.circular-button:hover i {
  color: var(--ns-on-button);
}

/* Autoplay Music */

@media (max-width: 480px) {
  .popup {
    width: 75%;
  }

  .names {
    font-size: 40px;
  }

  .parent {
    font-size: 20px;
  }

  .bride i {
    font-size: 23px;
  }
  .modern-form {
    gap: 0.5rem;
  }

  .popup-title {
    font-size: 20px;
  }
}

/* ===== Splash Card â€” New Classes ===== */

.card-bismillah {
  font-family: "Amiri", serif;
  font-size: 19px;
  color: var(--ns-ink);
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.card-event-title {
  font-family: var(--ns-font-cover-title, "Goudy Bookletter 1911", serif);
  font-size: calc(13px * var(--ns-heading-scale, 1));
  letter-spacing: 7px;
  text-transform: uppercase;
  color: var(--ns-ink);
  opacity: 0.72;
  margin-bottom: 4px;
}

.card-ornament {
  font-size: 13px;
  color: var(--ns-ornament);
  letter-spacing: 5px;
  margin: 2px 0 18px;
  opacity: 0.65;
}

.sp-ampersand {
  font-family: var(--ns-font-names, "Italianno", cursive);
  font-style: var(--ns-names-style, normal);
  font-size: calc(clamp(44px, 13vw, 54px) * var(--ns-names-scale, 1));
  color: var(--ns-ink);
  display: block;
  line-height: 0.95;
}

.card-invite {
  font-family: var(--ns-font-body);
  font-size: calc(11px * var(--ns-body-scale, 1));
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--ns-ink);
  opacity: 0.75;
  margin: 6px 0 8px;
}

.card-date-display {
  font-family: "Playfair Display", serif;
  font-size: 15px;
  color: var(--ns-ink);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 34px;
}

/* Popup close button */
.popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--ns-ink);
  cursor: pointer;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.popup-close:hover {
  opacity: 1;
}

/* ==========================================================================
   Button style "Berwarna penuh" (filled). Only for cards that choose it:
   card.php adds class "buttons-filled" to <body>. Default = thin outlines above.
   ========================================================================== */
.buttons-filled .circular-button {
  background: var(--ns-button);
  border-color: var(--ns-button);
}
.buttons-filled .circular-button:hover {
  background-color: var(--ns-button-hover);
}
.buttons-filled .circular-button i {
  color: var(--ns-on-button);
}
.buttons-filled .call-btn {
  background-color: var(--ns-button);
  border-color: var(--ns-button);
  color: var(--ns-on-button);
}
.buttons-filled .call-btn:hover {
  background-color: var(--ns-button-hover);
  border-color: var(--ns-button-hover);
}
.buttons-filled .wa-btn {
  background-color: #25d366;
  color: #ffffff;
}
.buttons-filled .map-button {
  background-color: var(--ns-button);
  border-color: var(--ns-button);
  color: var(--ns-on-button);
}
.buttons-filled .map-button:hover {
  background-color: var(--ns-button-hover);
  border-color: var(--ns-button-hover);
}
.buttons-filled .rsvp-radio-pill span {
  border-color: var(--ns-button);
}
.buttons-filled .elegant-form button {
  background: var(--ns-button);
  color: var(--ns-on-button);
}
.buttons-filled .elegant-form button:hover {
  background: var(--ns-button-hover);
}

/* ==========================================================================
   Motion
   card.php adds .motion to <body> only when the guest has not asked for reduced
   motion, so without it (or without JavaScript) everything simply shows.
   ========================================================================== */

/* Seal: a soft ring pulses out every few seconds to invite the tap */
.motion .seal::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px solid var(--ns-button);
  opacity: 0;
  pointer-events: none;
  animation: sealPulse 2.8s ease-out 1.6s infinite;
}
@keyframes sealPulse {
  0% { transform: scale(0.9); opacity: 0.55; }
  70%, 100% { transform: scale(1.55); opacity: 0; }
}
/* On tap: the seal presses, then lifts and fades as the card opens */
.motion .open-button.clicked .seal {
  animation: sealOpen 0.8s cubic-bezier(0.5, 0, 0.3, 1) forwards;
}
.motion .open-button.clicked .seal::after {
  animation: sealBurst 0.6s ease-out forwards;
}
@keyframes sealOpen {
  0% { transform: scale(1); }
  25% { transform: scale(0.88) rotate(-4deg); }
  100% { transform: scale(1.35) rotate(10deg); opacity: 0; }
}
@keyframes sealBurst {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}
/* Cover names: a slow, gentle float */
.motion .spnames {
  animation: cardFadeUp 0.75s ease 0.38s forwards, softFloat 6s ease-in-out 1.2s infinite;
}
@keyframes softFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.motion .card-flip {
  transform: scale(1.08);
  filter: blur(4px);
}

/* Bottom bar slides up once the invitation is open */
.motion #mainContent.show .et-hero-tabs-container {
  animation: navRise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s both;
}
@keyframes navRise {
  from { transform: translateY(120%); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* Scroll reveal: card.php marks pieces with .reveal (and --i for the stagger order)
   and adds .in-view when they scroll into sight */
.motion .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 0.12s);
}
/* S2 main page: same entrance as the S1 cover (cardFadeUp: 12px, 0.75s, small steps) */
.motion .slide.invitation .reveal {
  transform: translateY(12px);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease;
  transition-delay: calc(0.1s + var(--i, 0) * 0.14s);
}
.motion .reveal.reveal-zoom {
  transform: scale(0.85);
}
.motion .reveal.in-view {
  opacity: 1;
  transform: none;
}
/* The older one-off entrance animations would play while hidden, so the reveal replaces them */
.motion .bride i,
.motion .hashtag i,
.motion .event-item {
  animation: none;
}

/* Countdown: the number that changes drops in */
.countdown-number.tick {
  animation: tick 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes tick {
  from { transform: translateY(-35%); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* Popups and the dimming behind them fade in (they switch from display:none, which restarts these) */
.motion .location-popup {
  animation: popIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.motion .overlay-nav {
  animation: fadeIn 0.3s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.motion .circular-button {
  transition: transform 0.2s ease;
}
.motion .circular-button:active {
  transform: scale(0.9);
}

/* Falling petals in soft pastels, added by card.php after the invitation opens */
.petals {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 997; /* under the popup dimming and bottom bar */
}
/* A soft petal: a rounded teardrop in muted pastel, in three shades of the theme's own colours.
   Softened with white (not cream: navy + cream turns grey), so navy gives powder blue, rose gives blush */
.petal {
  position: absolute;
  top: -28px;
  width: 18px;
  height: 15px;
  border-radius: 60% 55% 60% 12%;
  background: #e3c987;
  background: color-mix(in srgb, var(--ns-button) 50%, #fff);
  opacity: 0;
  animation: petalFall var(--dur, 11s) linear var(--delay, 0s) infinite;
}
.petal.tone-2 {
  background: #efdcaa;
  background: color-mix(in srgb, var(--ns-button) 28%, #fff);
}
.petal.tone-3 {
  background: #d9c79a;
  background: color-mix(in srgb, var(--ns-accent-text) 45%, #fff);
}
@keyframes petalFall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.85; }
  50% { transform: translate(var(--sway, 40px), 52vh) rotate(200deg); }
  90% { opacity: 0.75; }
  100% { transform: translate(0, 108vh) rotate(400deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .petals { display: none; }
}

/* Ucapan Tetamu: guests' wishes under the Ucapan form (only when the owner shows them) */
.wishes-wall {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(var(--ns-frame-rgb), 0.25);
}
.wishes-wall h3 {
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ns-ink);
  margin: 0 0 18px;
}
.wishes-empty {
  text-align: center;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ns-ink);
  opacity: 0.7;
}
.wishes-list {
  max-height: 460px;
  /* fade at the bottom: shows there is more to scroll */
  -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent);
  mask-image: linear-gradient(to bottom, #000 85%, transparent);
  padding-bottom: 40px !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -6px;
  padding: 0 6px;
  text-align: left;
}
/* One wish: a soft rounded card, name + time on top, the wish in quotes below */
.wish-item {
  padding: 18px 20px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: rgba(var(--ns-button-rgb), 0.06);
}
.wish-item:last-child {
  margin-bottom: 0;
}
.wish-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.wish-sender {
  font-family: "Playfair Display", serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ns-ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.wish-time {
  flex-shrink: 0;
  font-family: var(--ns-font-body);
  font-size: calc(12px * var(--ns-body-scale, 1));
  color: var(--ns-ink);
  opacity: 0.5;
  white-space: nowrap;
}
.wish-text {
  font-family: var(--ns-font-body);
  font-size: calc(15px * var(--ns-body-scale, 1));
  line-height: 1.7;
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 75%, transparent);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.wish-text::before {
  content: "\201C";
}
.wish-text::after {
  content: "\201D";
}
.motion .wish-new {
  animation: popInWish 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes popInWish {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   S4 Aturcara: a framed card (like S5) with a timeline: time | dot on a line | activity
   ========================================================================== */
.word-tentative {
  position: relative;
  box-sizing: border-box;
  padding: 28px 16px;
  background: rgba(var(--ns-surface-rgb), 0.88);
}
/* the theme's art, faint, behind the whole section */
.word-tentative > .background-image {
  opacity: 0.15;
}
.aturcara-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  padding: 26px 20px 24px;
  border: 1px solid rgba(var(--ns-button-rgb), 0.22);
  border-radius: 22px;
  background: rgba(var(--ns-surface-rgb), 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.aturcara-card h1 {
  margin: 0 0 22px;
  text-align: center;
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(14px * var(--ns-heading-scale, 1));
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 70%, transparent);
}
.timeline {
  display: flex;
  flex-direction: column;
}
.timeline .event-item {
  display: grid;
  grid-template-columns: 92px 30px 1fr;
  align-items: start;
  margin: 0;
  animation: none;
}
.timeline .event-time {
  margin: 0;
  padding: 2px 0 20px;
  text-align: right;
  font-family: var(--ns-font-body);
  font-size: calc(13px * var(--ns-body-scale, 1));
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.4;
  color: var(--ns-button);
}
/* dot + the line down to the next item */
.timeline .event-dot {
  position: relative;
  align-self: stretch;
}
.timeline .event-dot::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--ns-button);
  background: var(--ns-surface, #fff);
  background: rgb(var(--ns-surface-rgb));
  transform: translateX(-50%);
  z-index: 1;
}
.timeline .event-dot::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: -4px;
  left: 50%;
  width: 1px;
  background: rgba(var(--ns-button-rgb), 0.3);
  transform: translateX(-50%);
}
.timeline .event-item:last-child .event-dot::after {
  display: none;
}
.timeline .event-label {
  padding: 0 0 20px;
  text-align: left;
  font-family: var(--ns-font-body);
  font-size: calc(15px * var(--ns-body-scale, 1));
  line-height: 1.45;
  color: var(--ns-ink);
}
.timeline .event-item:last-child .event-time,
.timeline .event-item:last-child .event-label {
  padding-bottom: 0;
}
.aturcara-empty {
  text-align: center;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 16px;
  color: var(--ns-ink);
}

/* ==========================================================================
   S2 Main page: same feel as the S1 cover. Thin inset frame, spaced title,
   names with a soft "&", a small ornament, the full date, and the venue.
   Text colour: the theme's, or the owner's "warna tulisan" (card.php adds that).
   ========================================================================== */
.slide.invitation::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(var(--ns-frame-rgb), 0.22);
  pointer-events: none;
}
/* A soft glow in the page colour behind the text (like S1), so busy artwork never makes it hard to read.
   It fades out towards the edges, so the frame and corner art still show. */
.slide.invitation .overlay {
  padding: 32px 28px;
  background: radial-gradient(
    ellipse 78% 46% at 50% 50%,
    rgba(var(--ns-surface-rgb), 0.94) 0%,
    rgba(var(--ns-surface-rgb), 0.82) 45%,
    rgba(var(--ns-surface-rgb), 0.4) 70%,
    rgba(var(--ns-surface-rgb), 0) 100%
  );
}
.slide.invitation .overlay > * {
  text-shadow: 0 0 14px rgba(var(--ns-surface-rgb), 0.9);
}
/* Own photo with "Lapisan lembut" switched off in Kad Digital: no soft layer at all */
.slide.invitation.no-glow .overlay {
  background: none;
}
.slide.invitation.no-glow .overlay > * {
  text-shadow: none;
}
.slide.invitation .header {
  margin: 0 0 16px;
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(15px * var(--ns-heading-scale, 1));
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--ns-accent-text);
}
/* Couple's names: Italianno, the same script as the S1 cover. It is a fine script, so it is set large */
.slide.invitation .names {
  margin: 0;
  font-family: var(--ns-font-names, "Italianno", cursive);
  font-style: var(--ns-names-style, normal);
  font-size: calc(clamp(62px, 18vw, 76px) * var(--ns-names-scale, 1));
  line-height: 1;
}
.slide.invitation .names-amp {
  display: block;
  margin: 4px 0 6px;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 0.38em;
  line-height: 1.2;
  opacity: 0.75;
}
.slide.invitation .s2-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 140px;
  margin: 20px auto 18px;
  color: var(--ns-accent-text);
  font-size: 10px;
}
.slide.invitation .s2-divider::before,
.slide.invitation .s2-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}
.slide.invitation .date {
  margin: 0 0 10px;
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(16px * var(--ns-heading-scale, 1));
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ns-accent-text);
}
.slide.invitation .venue {
  font-family: var(--ns-font-body);
  font-size: calc(17px * var(--ns-body-scale, 1));
  font-weight: 500;
  color: var(--ns-accent-text);
  /* A long Nama tempat wraps onto even lines instead of one long line */
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}

/* ==========================================================================
   S3 Invitation page: same feel as S1 and S2. Thin inset frame, spaced title,
   bold parents' names, the invitation text, an ornament, the couple's full names
   in italic, the date block, and the round buttons with labels.
   ========================================================================== */
.overlay-greet {
  position: relative;
  padding: 60px 34px 54px;
}
.overlay-greet::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(var(--ns-frame-rgb), 0.22);
  pointer-events: none;
}
.overlay-greet > * {
  margin-top: 0;
  margin-bottom: 0;
}
.s3-title {
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(14px * var(--ns-heading-scale, 1));
  font-weight: 500;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 75%, transparent);
}
.overlay-greet .bismillah-text {
  margin-top: 20px;
}
.overlay-greet .parent {
  margin-top: 30px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}
.s3-amp {
  display: block;
  margin: 6px 0;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.75em;
  line-height: 1.3;
  opacity: 0.6;
}
.overlay-greet .greet {
  margin-top: 26px;
  line-height: 1.85;
}
/* line âœ¦ line (also used by S2) */
.orn-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 140px;
  margin: 34px auto 0;
  color: var(--ns-accent-text);
  font-size: 10px;
}
.orn-divider::before,
.orn-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}
.overlay-greet .bride {
  margin-top: 32px;
  font-size: calc(25px * var(--ns-names-scale, 1));
  line-height: 1.35;
}
.overlay-greet .bride .s3-amp {
  margin: 8px 0;
  font-size: 0.7em;
}
.s3-when {
  margin-top: 38px;
}
.s3-label {
  font-family: var(--ns-font-body);
  font-size: calc(11px * var(--ns-body-scale, 1));
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 55%, transparent);
}
.s3-date {
  margin-top: 12px;
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(15px * var(--ns-heading-scale, 1));
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ns-ink);
}
.s3-note {
  margin-top: 10px;
  font-family: var(--ns-font-body);
  font-size: calc(13px * var(--ns-body-scale, 1));
  font-style: italic;
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 75%, transparent);
}
.s3-time {
  margin-top: 6px;
  font-family: var(--ns-font-body);
  font-size: calc(14px * var(--ns-body-scale, 1));
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 70%, transparent);
}
/* Round buttons with a small label under each */
.overlay-greet .circular-buttons {
  margin-top: 40px;
  gap: 26px;
}
.s3-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.s3-action span {
  font-family: var(--ns-font-body);
  font-size: calc(11px * var(--ns-body-scale, 1));
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 65%, transparent);
}

/* S2 / S3 dividers: one plain thin line (no âœ¦) */
.slide.invitation .s2-divider,
.orn-divider {
  width: 80px;
  height: 1px;
  gap: 0;
  background: currentColor;
  opacity: 0.4;
}
.slide.invitation .s2-divider::before,
.slide.invitation .s2-divider::after,
.orn-divider::before,
.orn-divider::after {
  display: none;
}

/* ==========================================================================
   S6 Ucapan form + S6a Ucapan Tetamu: a framed card like S4 / S5, boxed fields
   like the RSVP popup, and messages shown inside the card
   ========================================================================== */
.ucapan-slide .ucapan-container {
  padding: 28px 16px;
}
.ucapan-slide .ucapan-container::before {
  background-color: rgba(var(--ns-surface-rgb), 0.88);
}
.slide .ucapan-card {
  max-width: 400px;
  box-sizing: border-box;
  padding: 26px 20px 24px;
  border: 1px solid rgba(var(--ns-button-rgb), 0.22);
  border-radius: 22px;
  background: rgba(var(--ns-surface-rgb), 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.ucapan-head {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(var(--ns-button-rgb), 0.15);
}
.slide .ucapan-card h2 {
  margin: 0;
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(14px * var(--ns-heading-scale, 1));
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 75%, transparent);
}
.ucapan-sub {
  margin-top: 6px;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ns-ink);
  opacity: 0.75;
}
.ucapan-form {
  text-align: left;
}
.ucapan-textarea {
  min-height: 84px;
  resize: none;
  line-height: 1.5;
}
.ucapan-form .wish-counter {
  margin: 6px 0 0;
  text-align: right;
}
.ucapan-status {
  display: none;
  margin: 2px 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  text-align: center;
  font-family: var(--ns-font-body);
  font-size: calc(13px * var(--ns-body-scale, 1));
  font-weight: 500;
}
.ucapan-status.is-shown {
  display: block;
}
.ucapan-status.is-ok {
  color: #2e8b57;
  background: rgba(46, 139, 87, 0.1);
}
.ucapan-status.is-error {
  color: #d64545;
  background: rgba(214, 69, 69, 0.08);
}

/* S6a Ucapan Tetamu */
.ucapan-card .wishes-wall {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(var(--ns-button-rgb), 0.15);
}
.ucapan-card .wishes-wall h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 16px;
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(14px * var(--ns-heading-scale, 1));
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 75%, transparent);
}
.ucapan-card .wish-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(var(--ns-button-rgb), 0.06);
}
.ucapan-card .wish-sender {
  font-size: 15px;
}
.ucapan-card .wish-text {
  font-size: 14px;
}

/* ==========================================================================
   P3 Hadiah: tabs (Salam Kaut / Senarai Hadiah) and the gift registry list
   ========================================================================== */
.gift-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: -4px 0 16px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(var(--ns-button-rgb), 0.08);
}
.gift-tab {
  padding: 8px 6px;
  border: none;
  border-radius: 9px;
  background: transparent;
  font-family: var(--ns-font-body);
  font-size: calc(13px * var(--ns-body-scale, 1));
  font-weight: 600;
  color: var(--ns-ink);
  opacity: 0.65;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s, box-shadow 0.2s;
}
.gift-tab.is-active {
  background: var(--ns-popup-bg);
  opacity: 1;
  color: var(--ns-button);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.gift-intro {
  margin: 0 0 14px;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ns-ink);
  opacity: 0.75;
}
.reg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reg-item {
  padding: 14px 16px;
  border: 1px solid rgba(var(--ns-button-rgb), 0.18);
  border-radius: 14px;
  background: rgba(var(--ns-button-rgb), 0.05);
  text-align: left;
}
.reg-item.is-taken {
  opacity: 0.6;
}
.reg-name {
  font-family: "Playfair Display", serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ns-ink);
  overflow-wrap: anywhere;
}
.reg-item.is-taken .reg-name {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.reg-note {
  margin-top: 3px;
  font-family: var(--ns-font-body);
  font-size: calc(13px * var(--ns-body-scale, 1));
  line-height: 1.5;
  color: var(--ns-ink);
  color: color-mix(in srgb, var(--ns-ink) 65%, transparent);
  overflow-wrap: anywhere;
}
.reg-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-family: var(--ns-font-body);
  font-size: calc(12px * var(--ns-body-scale, 1));
  font-weight: 600;
  color: var(--ns-button);
  text-decoration: none;
}
.reg-link i {
  font-size: 11px;
}
.reg-claim-open {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 9px;
  border: 1px solid rgba(var(--ns-button-rgb), 0.4);
  border-radius: 10px;
  background: transparent;
  font-family: var(--ns-font-body);
  font-size: calc(13px * var(--ns-body-scale, 1));
  font-weight: 600;
  color: var(--ns-button);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.reg-claim-open:hover {
  background: var(--ns-button);
  color: var(--ns-on-button);
}
.reg-claim-form {
  margin-top: 12px;
}
.reg-claim-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.reg-claim-cancel,
.reg-claim-confirm {
  padding: 9px;
  border-radius: 10px;
  font-family: var(--ns-font-body);
  font-size: calc(13px * var(--ns-body-scale, 1));
  font-weight: 600;
  cursor: pointer;
}
.reg-claim-cancel {
  border: 1px solid rgba(var(--ns-button-rgb), 0.3);
  background: transparent;
  color: var(--ns-ink);
}
.reg-claim-confirm {
  border: none;
  background: var(--ns-button);
  color: var(--ns-on-button);
}
.reg-claim-confirm:disabled {
  opacity: 0.7;
}
.reg-claim-msg {
  margin-top: 6px;
  font-family: var(--ns-font-body);
  font-size: calc(12px * var(--ns-body-scale, 1));
  color: #d64545;
}
.reg-claim-msg:empty {
  display: none;
}
.reg-taken {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-family: var(--ns-font-body);
  font-size: calc(13px * var(--ns-body-scale, 1));
  font-weight: 600;
  color: #2e8b57;
}

/* Some phone browsers still auto-link numbers inside the popups: keep them looking like plain text */
.location-popup a[x-apple-data-detectors],
#gift-popup a[href^="tel"] {
  color: inherit !important; text-decoration: none !important; font: inherit !important;
}

/* ==========================================================================
   Own design (Kad Digital > Latar Belakang > "Reka bentuk sendiri"), S1 and S2:
   the owner's finished design is shown whole; a soft blurred copy fills any
   space left on taller or wider screens. The card's own text is left out.
   ========================================================================== */
.own-design .own-design-fill,
.own-design .own-design-art {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}
.own-design .own-design-fill {
  background-size: cover;
  filter: blur(24px) saturate(1.05);
  transform: scale(1.15); /* hide the blurred edges */
  opacity: 0.9;
}
.own-design .own-design-art {
  background-size: contain;
}
/* S1: no frame or glow; the seal sits near the bottom over the design */
.card-front.own-design {
  background: var(--ns-card-bg, #fff);
  justify-content: flex-end;
  padding-bottom: calc(5% + env(safe-area-inset-bottom));
}
.card-front.own-design::before {
  display: none;
}
.card-front.own-design > .own-design-fill,
.card-front.own-design > .own-design-art {
  position: absolute;
  z-index: 0;
  opacity: 1;
  animation: none;
}
.card-front.own-design > .own-design-fill {
  opacity: 0.9;
}
/* S2: the design only, no frame */
.slide.invitation.own-design {
  background: var(--ns-card-bg, #fff);
}
.slide.invitation.own-design::after {
  display: none;
}

/* Zoomed photo (pinch / slider in Kad Digital): the photo is on its own layer under the page's content */
.has-bg-zoom > .bg-zoom {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.card-front.has-bg-zoom > .bg-zoom {
  position: absolute;
  opacity: 1;
  animation: none;
}
.bg-zoom-img,
.bg-zoom-glow {
  position: absolute;
  inset: 0;
}
.bg-zoom-img {
  background-size: cover;
  background-repeat: no-repeat;
}
.slide.invitation.has-bg-zoom > .overlay,
.word-invitation.has-bg-zoom > .overlay-greet {
  position: relative;
  z-index: 1;
}
.slide.invitation.has-bg-zoom > .overlay {
  position: absolute;
}

/* ==========================================================================
   Song from YouTube (Kad Digital > 8. Muzik). YouTube's rules: the player stays visible
   (at least 200 x 200), so it sits in its own "Lagu Pilihan" section; a round button plays / pauses it.
   ========================================================================== */
.yt-frame {
  position: relative;
  width: 100%;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  margin-top: 14px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}
.yt-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.music-btn {
  position: fixed;
  right: 14px;
  bottom: calc(104px + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(var(--ns-button-rgb), 0.45);
  border-radius: 50%;
  background: rgba(var(--ns-surface-rgb), 0.92);
  color: var(--ns-button);
  font-size: 17px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
.music-btn[hidden] {
  display: none;
}
/* Playing: filled, and the note turns slowly */
.music-btn.is-playing {
  background: var(--ns-button);
  color: var(--ns-on-button);
}
.motion .music-btn.is-playing i {
  animation: music-spin 4s linear infinite;
}
@keyframes music-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Printed card: Kad Digital > "Simpan PDF" opens the card with ?cetak=1 (the print view).
   card.php builds three A5 pages (.print-card). They are hidden on the normal card; the print view shows them
   on screen at A5 size, shrinks a page's text (--pc-fit) when it is too tall, then prints.
   All sizes are in --u (1mm). Pages are exactly A5 on screen and on paper, so the PDF matches the view.
   (Not vw/vh: in print, Safari takes those from the browser window, not the paper.)
   ========================================================================== */
.print-card,
.print-toolbar {
  display: none;
}
.print-card {
  --u: 1mm;
}
.pc-page {
  position: relative;
  box-sizing: border-box;
  width: calc(148 * var(--u));
  height: calc(210 * var(--u));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ns-card-bg);
  break-after: page;
  page-break-after: always;
}
.pc-page:last-child {
  break-after: auto;
  page-break-after: auto;
}
.pc-layer {
  position: absolute;
  inset: 0;
}
.pc-inner {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: calc(16 * var(--u) * var(--pc-fit, 1)) calc(14 * var(--u) * var(--pc-fit, 1));
  text-align: center;
}
.pc-page .card-bismillah,
.pc-page .bismillah-text {
  margin-bottom: calc(5 * var(--u) * var(--pc-fit, 1));
  font-family: "Scheherazade New", "Amiri", serif;
  font-size: calc(7.06 * var(--u) * var(--pc-fit, 1));
  color: var(--ns-ink);
}
.pc-title {
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(4.23 * var(--u) * var(--pc-fit, 1));
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ns-accent-text);
}
.pc-names {
  margin: calc(6 * var(--u) * var(--pc-fit, 1)) 0 calc(2 * var(--u) * var(--pc-fit, 1));
  font-family: var(--ns-font-names, "Italianno", cursive);
  font-size: calc(14.11 * var(--u) * var(--pc-fit, 1));
  line-height: 1.1;
  color: var(--ns-accent-text);
}
.pc-amp {
  display: block;
  font-size: calc(9.17 * var(--u) * var(--pc-fit, 1));
  color: var(--ns-ink);
}
.pc-rule {
  width: calc(30 * var(--u) * var(--pc-fit, 1));
  height: 1px;
  margin: calc(5 * var(--u) * var(--pc-fit, 1)) auto;
  background: rgba(var(--ns-accent-rgb), 0.5);
}
.pc-invite {
  font-size: calc(3.53 * var(--u) * var(--pc-fit, 1));
  letter-spacing: 1px;
  color: var(--ns-ink);
}
.pc-date {
  margin-top: calc(3 * var(--u) * var(--pc-fit, 1));
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(3.88 * var(--u) * var(--pc-fit, 1));
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ns-ink);
}
/* Nama tempat on the printed pages: a long name wraps onto even lines within 100mm */
.pc-venue,
.pc-place {
  max-width: calc(100 * var(--u));
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}
.pc-venue {
  margin-top: calc(2 * var(--u) * var(--pc-fit, 1));
  font-size: calc(3.53 * var(--u) * var(--pc-fit, 1));
  color: var(--ns-ink);
}
/* Halaman jemputan */
.pc-greet .pc-title {
  margin-bottom: calc(4 * var(--u) * var(--pc-fit, 1));
  font-size: calc(5.29 * var(--u) * var(--pc-fit, 1));
}
.pc-parents,
.pc-brides {
  font-family: "Playfair Display", serif;
  font-size: calc(4.23 * var(--u) * var(--pc-fit, 1));
  line-height: 1.5;
  color: var(--ns-ink);
}
.pc-brides {
  font-size: calc(4.94 * var(--u) * var(--pc-fit, 1));
  color: var(--ns-accent-text);
}
.pc-page .s3-amp {
  display: block;
  margin: calc(1 * var(--u) * var(--pc-fit, 1)) 0;
  font-size: calc(3.88 * var(--u) * var(--pc-fit, 1));
}
.pc-greeting {
  margin-top: calc(4 * var(--u) * var(--pc-fit, 1));
  font-size: calc(3.53 * var(--u) * var(--pc-fit, 1));
  line-height: 1.6;
  color: var(--ns-ink);
}
.pc-when {
  margin-top: calc(5 * var(--u) * var(--pc-fit, 1));
  font-size: calc(3.53 * var(--u) * var(--pc-fit, 1));
  line-height: 1.5;
  color: var(--ns-ink);
}
.pc-label {
  font-size: calc(3.18 * var(--u) * var(--pc-fit, 1));
  font-style: italic;
  color: var(--ns-ink);
  opacity: 0.8;
}
.pc-when-date,
.pc-place {
  font-family: "Playfair Display", serif;
  font-size: calc(4.23 * var(--u) * var(--pc-fit, 1));
  font-weight: 600;
  color: var(--ns-accent-text);
}
.pc-note {
  margin-top: calc(1 * var(--u) * var(--pc-fit, 1));
  font-style: italic;
}
.pc-page .loc-address {
  font-size: calc(3.53 * var(--u) * var(--pc-fit, 1));
  color: var(--ns-ink);
}
/* Aturcara, Lokasi, Hubungi */
.pc-block {
  margin-bottom: calc(7 * var(--u) * var(--pc-fit, 1));
}
.pc-heading {
  margin-bottom: calc(3 * var(--u) * var(--pc-fit, 1));
  font-family: var(--ns-font-heading, "Cinzel", "Playfair Display", serif);
  font-size: calc(4.23 * var(--u) * var(--pc-fit, 1));
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ns-accent-text);
}
.pc-event,
.pc-contact {
  display: flex;
  justify-content: space-between;
  gap: calc(6 * var(--u) * var(--pc-fit, 1));
  max-width: calc(105 * var(--u));
  margin: 0 auto;
  padding: calc(1.6 * var(--u) * var(--pc-fit, 1)) 0;
  border-bottom: 1px solid rgba(var(--ns-accent-rgb), 0.2);
  font-size: calc(3.53 * var(--u) * var(--pc-fit, 1));
  text-align: left;
  color: var(--ns-ink);
  break-inside: avoid;
}
.pc-event-time,
.pc-contact-phone {
  flex: none;
  font-weight: 600;
  white-space: nowrap;
}
.pc-event-label {
  text-align: right;
}
.pc-contact-rel {
  opacity: 0.75;
}
.pc-qrs {
  display: flex;
  justify-content: center;
  gap: calc(12 * var(--u) * var(--pc-fit, 1));
  margin-top: calc(2 * var(--u) * var(--pc-fit, 1));
  break-inside: avoid;
}
.pc-qr-code {
  display: inline-block;
  padding: calc(2 * var(--u) * var(--pc-fit, 1));
  background: #fff;
  border-radius: calc(2 * var(--u));
}
.pc-qr-code img,
.pc-qr-code canvas {
  width: calc(26 * var(--u) * var(--pc-fit, 1));
  height: calc(26 * var(--u) * var(--pc-fit, 1));
}
.pc-qr-label {
  margin-top: calc(1.5 * var(--u) * var(--pc-fit, 1));
  font-size: calc(2.82 * var(--u) * var(--pc-fit, 1));
  color: var(--ns-ink);
}
.pc-tag {
  margin-top: calc(7 * var(--u) * var(--pc-fit, 1));
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: calc(4.59 * var(--u) * var(--pc-fit, 1));
  color: var(--ns-ink);
}

/* Print view on screen: only the toolbar and the pages, like sheets of paper */
html:has(> body.print-view),
body.print-view {
  display: block;
  height: auto;
  background: #e5e5e5;
}
body.print-view > *:not(.print-card):not(.print-toolbar) {
  display: none !important;
}
body.print-view .print-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8mm;
  padding: 8mm 0 16mm;
}
body.print-view .pc-page {
  flex: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}
.print-view .print-toolbar {
  box-sizing: border-box;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  padding: 12px 16px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  color: #333;
  text-align: center;
}
.print-toolbar-btn {
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: #222;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.print-toolbar-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}
.print-toolbar-link {
  padding: 6px 4px;
  border: 0;
  background: none;
  color: #555;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
.print-toolbar-link:disabled {
  opacity: 0.5;
  cursor: wait;
}
.print-toolbar-msg {
  flex-basis: 100%;
  font-size: 13px;
  color: #555;
}
.print-toolbar-msg:empty {
  display: none;
}

@media print {
  /* A5 in whole points: with size A5 (419.53pt wide) Chrome left a thin unpainted line at the right edge */
  @page {
    size: 420pt 595pt;
    margin: 0;
  }
  /* Behind the pages: the card's colour, so a hairline left at a sheet's edge (Safari's sheet is 595pt,
     A5 is 595.28pt) is not white */
  html,
  body,
  body.print-view {
    display: block;
    height: auto;
    background: var(--ns-card-bg);
  }
  body > *:not(.print-card) {
    display: none !important;
  }
  .print-card,
  body.print-view .print-card {
    display: block;
    padding: 0;
    /* The phone-screen zoom (set by card.php) must not shrink the printed pages */
    zoom: 1 !important;
  }
  /* Browsers' A5 sheets are not exactly 148 x 210mm (Chrome 420 x 594.96pt, Safari 420 x 595pt; A5 is
     419.53 x 595.28pt), which left a thin white line at an edge. Pages are 209mm tall (a last page taller than
     the sheet makes Safari add a blank page), and the picture and soft layer are drawn 1mm past the right edge
     and on to 210mm (cut off at the sheet's edge). The last page's picture stops at 209mm for the same reason. */
  .pc-page {
    height: 209mm;
    overflow: visible;
  }
  .pc-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: -1mm;
    height: 210mm;
    background: inherit;
  }
  .pc-page:last-child::before {
    height: 209mm;
  }
  .pc-layer {
    right: -1mm;
  }
  body.print-view .pc-page {
    box-shadow: none;
  }
  .print-card,
  .print-card * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}