.print-only { display: none; }

/* Wyłączenie automatycznego podkreślania adresów i telefonów przez iOS Safari */
a[x-apple-data-detectors] {
  color: inherit !important;
  text-decoration: none !important;
  font-size: inherit !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

/* ================= GÓRNY PANEL ATELIER PRO STUDIO ================= */
.pro-studio-header {
  background: rgba(253, 252, 249, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e7e0d6;
  box-shadow: 0 4px 20px -10px rgba(41, 37, 36, 0.08);
  position: relative;
}

.pro-studio-header::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, #9d174d 0%, #c59b27 50%, #9d174d 100%);
  opacity: 0.85;
}

.pro-nav-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  background-color: #f3efe8;
  border: 1px solid #e4ddd3;
  padding: 5px;
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 960px) {
  .pro-nav-track {
    display: flex;
    width: 100%;
    gap: 5px;
    padding: 4px;
    border-radius: 12px;
  }
  .pro-nav-track > .pro-nav-item {
    flex: 1 1 0%;
  }
}

.pro-nav-item.hidden {
  display: none !important;
}

.pro-nav-item {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
  padding: 0 6px;
  border-radius: 8px;
  font-weight: 600;
  color: #57534e;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  text-align: center;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

@media (min-width: 640px) {
  .pro-nav-item {
    height: 36px;
    gap: 6px;
    padding: 0 8px;
  }
}

.pro-nav-item:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.75);
  color: #1c1917;
}

.pro-nav-label {
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

@media (min-width: 768px) {
  .pro-nav-label {
    font-size: 12px;
  }
}

.pro-nav-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 18px;
  height: 17px;
  padding: 0 5px;
  border-radius: 9999px;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background-color: rgba(120, 113, 108, 0.16);
  color: #44403c;
}

.tab-btn.active {
  background: linear-gradient(135deg, #9d174d 0%, #831843 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px -2px rgba(131, 24, 67, 0.35);
}

.tab-btn.active .pro-nav-counter {
  background-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.pro-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.pro-toolbar-btn-primary {
  background: linear-gradient(135deg, #9d174d 0%, #831843 100%);
  color: #ffffff;
  border: 1px solid #831843;
  box-shadow: 0 2px 6px rgba(131, 24, 67, 0.22);
}
.pro-toolbar-btn-primary:hover {
  background: linear-gradient(135deg, #831843 0%, #6b1436 100%);
}

.pro-toolbar-btn-gold {
  background-color: #fbf7ef;
  color: #78350f;
  border: 1px solid #d4af37;
}
.pro-toolbar-btn-gold:hover {
  background-color: #f5ebd6;
}

.pro-toolbar-btn-subtle {
  background-color: #ffffff;
  color: #44403c;
  border: 1px solid #d6d3d1;
}
.pro-toolbar-btn-subtle:hover {
  background-color: #f5f5f4;
  color: #1c1917;
}

.pro-toolbar-btn-ghost {
  background-color: transparent;
  color: #57534e;
  border: 1px solid #e7e5e4;
}
.pro-toolbar-btn-ghost:hover {
  background-color: #f5f5f4;
  color: #1c1917;
}

.pro-toolbar-btn-emerald {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.pro-toolbar-btn-emerald:hover {
  background-color: #d1fae5;
}

/* ================= KARTY WYBORU 1A i 1B W STYLU STUDIO PRO ================= */
.pro-option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 8px;
  background-color: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  height: 100%;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.pro-option-card:hover { border-color: #f472b6; transform: translateY(-1px); }
.pro-option-pill {
  margin-top: 4px; padding: 2px 8px; border-radius: 9999px;
  background-color: #f1f5f9; color: #475569;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.pro-dimension-badge {
  margin-top: 4px; padding: 2px 8px; border-radius: 6px;
  background-color: #fdf2f8; border: 1px solid #fbcfe8;
  color: #9d174d; font-size: 10px; font-weight: 700;
}
.fmt-select-btn.active {
  border-color: #be185d !important;
  background-color: #fff1f2 !important;
  box-shadow: 0 4px 12px rgba(190, 24, 93, 0.14);
}
.fmt-select-btn.active .pro-option-pill { background-color: #be185d; color: #ffffff; }
.fmt-select-btn.active::after {
  content: '✓'; position: absolute; top: 5px; right: 6px;
  width: 15px; height: 15px; border-radius: 9999px;
  background-color: #be185d; color: #ffffff;
  font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

/* ================= ZWIJANY PASEK SPOTIFY ================= */
#spotify-collapsible-drawer { max-height: 110px; opacity: 1; overflow: hidden; transition: max-height 0.35s ease, opacity 0.25s ease; }
#spotify-collapsible-drawer.spotify-drawer-collapsed { max-height: 0; opacity: 0; pointer-events: none; }

/* ================= ANIMACJA WEJŚCIOWA WYKRESU KOŁOWEGO RSVP (FADE-IN + GROW) ================= */
@keyframes rsvpChartFadeGrow {
  0% {
    opacity: 0;
    transform: scale(0.84);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.rsvp-chart-animate {
  animation: rsvpChartFadeGrow 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: center center;
}


/* ================= KARTA POWITALNA (OKŁADKA PAPETERII Z OPASKĄ I PIECZĘCIĄ) ================= */
.envelope-box {
  position: relative;
  border-radius: 14px;
  box-shadow: 0 28px 60px -15px rgba(0, 0, 0, 0.58) !important;
  overflow: hidden;
}
.welcome-card-inner-frame {
  border: 1px solid rgba(120, 113, 108, 0.28);
  border-radius: 8px;
  position: relative;
}
.welcome-card-banderole {
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  background-color: rgba(255, 255, 255, 0.14);
}
.wax-seal-btn { background: radial-gradient(circle at 30% 30%, #be123c 0%, #881337 65%, #4c0519 100%); border: 2px solid #d4af37; box-shadow: inset 0 2px 4px rgba(255,255,255,0.4), inset 0 -3px 6px rgba(0,0,0,0.5), 0 8px 18px rgba(0,0,0,0.3); position: relative; }
.wax-seal-btn::after { content: ''; position: absolute; inset: 4px; border-radius: 9999px; border: 1px dashed rgba(253, 230, 138, 0.7); pointer-events: none; }
.gold-seal-btn { background: radial-gradient(circle at 30% 30%, #fef08a 0%, #d4af37 65%, #854d0e 100%); border: 2px solid #fef9c3; box-shadow: inset 0 2px 4px rgba(255,255,255,0.6), 0 8px 18px rgba(0,0,0,0.3); position: relative; }
.green-seal-btn { background: radial-gradient(circle at 30% 30%, #10b981 0%, #065f46 65%, #022c22 100%); border: 2px solid #d4af37; box-shadow: inset 0 2px 4px rgba(255,255,255,0.35), 0 8px 18px rgba(0,0,0,0.3); position: relative; }
.lemon-seal-btn { background: radial-gradient(circle at 35% 35%, #fef08a 0%, #facc15 60%, #ca8a04 100%); border: 2px solid #ca8a04; box-shadow: inset 0 2px 5px rgba(255,255,255,0.6), inset 0 -3px 6px rgba(161, 98, 7, 0.4), 0 8px 20px rgba(202, 138, 4, 0.35); position: relative; }
.lemon-seal-btn::after { content: ''; position: absolute; inset: 5px; border-radius: 9999px; border: 1.5px dashed #ffffff; pointer-events: none; }

/* ================= SZTYWNE WYRÓWNANIE I PROPORCJE KART ZAPROSZENIA ================= */
.wedding-stationery {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: all 0.25s ease;
  width: 100%;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.wedding-stationery::before,
.wedding-stationery::after {
  z-index: 0 !important;
  pointer-events: none !important;
}

#onscreen-print-preview-content .wedding-stationery,
#print-preview-modal-body .wedding-stationery,
#print-area .wedding-stationery,
#top-level-print-root .wedding-stationery {
  overflow: hidden !important;
}

.inv-inner-stack {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
}

.qr-section-stack {
  position: relative !important;
  z-index: 60 !important;
  flex-shrink: 0 !important;
}

.qr-print-box,
[data-qr-box],
[id^="print-qr-"],
[id^="default-print-qr-"],
[id^="print-sheet-qr-"] {
  position: relative !important;
  z-index: 60 !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  padding: 5px !important;
  border-radius: 6px !important;
  border: 1px solid #e2e8f0 !important;
  box-sizing: content-box !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.qr-print-box img,
.qr-print-box canvas,
.qr-print-box svg,
.qr-code-print-img,
.qr-inline-svg,
[data-qr-box] img,
[data-qr-box] canvas,
[data-qr-box] svg {
  position: relative !important;
  z-index: 65 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 0 auto !important;
  background: #ffffff !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.pictogram-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin: 0.45rem auto;
  padding: 0.25rem 0.65rem;
  max-width: 100%;
}

.pictogram-row-compact {
  gap: 0.55rem !important;
  margin: 0.15rem auto !important;
  padding: 0.08rem 0.35rem !important;
  transform: scale(0.82);
  transform-origin: center center;
}

.inv-ill-box svg,
.inv-ill-box img {
  display: block;
  margin: 0 auto;
}

.stationery-format-single .inv-ill-box svg,
.stationery-format-single .inv-ill-box img {
  max-height: 48px !important;
  width: auto !important;
}

.card-size-c6.stationery-format-single .inv-ill-box svg,
.card-size-c6.stationery-format-single .inv-ill-box img {
  max-height: 40px !important;
  width: auto !important;
}

.stationery-format-folded .inv-ill-box svg,
.stationery-format-folded .inv-ill-box img {
  max-height: 54px !important;
  width: auto !important;
}

.card-size-c6.stationery-format-folded .inv-ill-box svg,
.card-size-c6.stationery-format-folded .inv-ill-box img {
  max-height: 44px !important;
  width: auto !important;
}

.card-size-b6 { max-width: 440px; min-height: 620px; }
.card-size-c6 { max-width: 395px; min-height: 550px; }

/* ================= IMIONA + GOŚĆ / PARA (PEŁNA CZYTELNOŚĆ I ZAWIJANIE PRZY DŁUGICH NAZWISKACH) ================= */
.wedding-stationery .couple-text,
.wedding-stationery .couple-single-line {
  font-size: clamp(1.02rem, 3.8vw, 1.38rem);
  line-height: 1.24;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  width: 100%;
  padding: 0 4px;
  box-sizing: border-box;
  text-align: center;
}

.wedding-stationery.stationery-format-single .couple-text,
.wedding-stationery.stationery-format-single .couple-single-line {
  font-size: clamp(0.92rem, 3.2vw, 1.18rem);
  line-height: 1.18;
}

.wedding-stationery .couple-text.couple-text-long {
  font-size: clamp(0.88rem, 3.0vw, 1.12rem) !important;
  line-height: 1.2;
  letter-spacing: 0.05em !important;
}

.wedding-stationery .guest-text {
  width: 100%;
  max-width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 4px;
  box-sizing: border-box;
}

.wedding-stationery .guest-main-line {
  font-size: clamp(0.95rem, 3.5vw, 1.22rem);
  line-height: 1.26;
  font-weight: 700;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.wedding-stationery.stationery-format-single .guest-main-line {
  font-size: clamp(0.86rem, 3.0vw, 1.06rem);
  line-height: 1.2;
}

.wedding-stationery .guest-main-line.guest-line-long {
  font-size: clamp(0.82rem, 2.7vw, 1.0rem) !important;
  line-height: 1.22;
}

.wedding-stationery .guest-partner-line {
  font-size: clamp(0.8rem, 2.8vw, 0.96rem);
  line-height: 1.24;
  font-weight: 600;
  opacity: 0.9;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  text-align: center;
}

.wedding-stationery.stationery-format-single .guest-partner-line {
  font-size: clamp(0.75rem, 2.5vw, 0.88rem);
  line-height: 1.18;
}

.wedding-stationery .guest-partner-line.guest-line-long {
  font-size: clamp(0.74rem, 2.4vw, 0.88rem) !important;
  line-height: 1.2;
}

.wedding-stationery .date-text { font-size: 1.14rem; line-height: 1.3; width: 100%; text-align: center; }
.wedding-stationery.stationery-format-single .date-text { font-size: 0.98rem; line-height: 1.22; }
.wedding-stationery .inv-body-text { font-size: 0.94rem; line-height: 1.48; width: 100%; text-align: center; }
.wedding-stationery.stationery-format-single .inv-body-text { font-size: 0.82rem; line-height: 1.32; }

/* 1. Cytryny Amalfi (Gładki kremowy papier bez kropek) */
.stationery-lemons {
  background-color: #fcfbf8;
  background-image: linear-gradient(180deg, #fcfbf8 0%, #f7f4ec 100%);
  color: #262626;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 1px solid #e5dfd3;
  box-shadow: 0 16px 36px -12px rgba(0,0,0,0.08);
}
.stationery-lemons .couple-text, .stationery-lemons .guest-text, .stationery-lemons .date-text {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1a1a1a;
}

/* 2. Łuk Toskański (Arch) */
.stationery-arch {
  background-color: #f7f5ef;
  background-image: linear-gradient(180deg, #faf9f5 0%, #f3efe4 100%);
  color: #1b3528;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 2px solid #84a98c;
  outline: 1px solid rgba(132, 169, 140, 0.55);
  outline-offset: -8px;
  border-radius: 215px 215px 16px 16px;
  box-shadow: 0 18px 40px -12px rgba(27, 53, 40, 0.12);
}
.stationery-arch .couple-text, .stationery-arch .date-text {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1b3528;
}

/* 3. Eukaliptus Botanical (Gładki papier czerpany bez kropek) */
.stationery-eucalyptus {
  background-color: #fdfcf9;
  background-image: linear-gradient(180deg, #fdfcf9 0%, #f6f3eb 100%);
  color: #2b2b2b;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 1px solid #e5e0d3;
}
.stationery-eucalyptus .couple-text, .stationery-eucalyptus .date-text {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.stationery-eucalyptus .guest-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 600;
}

/* 4. Majowy Bez (lilac) — akwarelowy papier botaniczny bez przezroczystych gradientów powodujących czarne tło w druku iOS/WebKit */
.stationery-lilac {
  background-color: #ffffff;
  background-image: radial-gradient(circle at 50% 24%, #ffffff 0%, #fdfbff 62%, #f5eeff 100%);
  color: #3b1d54;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 1.5px solid #c4b5fd;
  box-shadow: 0 16px 36px -12px rgba(107, 33, 168, 0.12);
}
.stationery-lilac .couple-text, .stationery-lilac .date-text {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4c1d95;
}
.stationery-lilac .guest-text { font-family: 'Playfair Display', Georgia, serif; font-style: italic; color: #581c87; }

/* 5. Strelicja – Bird of Paradise (strelicja) — pełne kryjące kolory bez 'transparent' */
.stationery-strelicja {
  background-color: #fffdf9;
  background-image: linear-gradient(225deg, #fff1dc 0%, #fffdf9 52%, #f0fdf6 100%);
  color: #1c2e24;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 1.5px solid #d97706;
  box-shadow: 0 18px 40px -12px rgba(180, 83, 9, 0.14);
}
.stationery-strelicja .couple-text, .stationery-strelicja .date-text {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a3412;
}
.stationery-strelicja .guest-text { font-family: 'Cinzel', Georgia, serif; color: #064e3b; letter-spacing: 0.06em; }

/* 6. Złote Art Deco */
.stationery-glamour {
  background-color: #111827;
  background-image: linear-gradient(180deg, #162032 0%, #090d16 100%);
  color: #f8fafc;
  font-family: 'Cinzel', Georgia, serif;
  border: 3px double #d4af37;
  box-shadow: 0 20px 45px -15px rgba(0,0,0,0.65);
}
.stationery-glamour .couple-text { font-family: 'Cinzel Decorative', serif; color: #fde047; letter-spacing: 0.06em; }
.stationery-glamour .guest-text, .stationery-glamour .date-text { color: #fef08a; letter-spacing: 0.08em; }

/* 7. Akwarelowa Piwonia & Róża (blush) — wysoka czytelność imion i długich nazwisk */
.stationery-blush {
  background-color: #fffcf9;
  background-image: linear-gradient(135deg, #fdeef6 0%, #fffcf9 50%, #fff3e4 100%);
  color: #4a2c35;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 1.5px solid #d4a373;
  box-shadow: 0 16px 36px -12px rgba(131, 24, 67, 0.14);
}
.stationery-blush .couple-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.04rem, 3.7vw, 1.38rem);
  color: #831843;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.stationery-blush .guest-text, .stationery-blush .date-text {
  font-family: 'Playfair Display', Georgia, serif;
  color: #6b1d3e;
  letter-spacing: 0.04em;
}

/* 8. Prowansalska Lawenda (lavender) */
.stationery-lavender {
  background-color: #fcfaff;
  background-image: linear-gradient(225deg, #f3e8ff 0%, #fcfaff 65%);
  color: #3b2751;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 1.5px solid #c084fc;
}
.stationery-lavender .couple-text { font-family: 'Playfair Display', Georgia, serif; letter-spacing: 0.08em; text-transform: uppercase; color: #581c87; }
.stationery-lavender .guest-text { font-style: italic; color: #4c1d95; }

/* 9. Leśna Paproć & Miedź (forest) */
.stationery-forest {
  background-color: #064e3b;
  background-image: linear-gradient(180deg, #064e3b 0%, #022c22 100%);
  color: #ecfdf5;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 3px double #d97706;
}
.stationery-forest .couple-text { font-family: 'Cinzel', Georgia, serif; color: #fde68a; letter-spacing: 0.08em; }
.stationery-forest .guest-text, .stationery-forest .date-text { color: #fef3c7; letter-spacing: 0.06em; }

/* 10. Klasyczna Perła & Wianuszek (classic) */
.stationery-classic {
  background-color: #fdfbf5;
  color: #292524;
  font-family: 'Playfair Display', Georgia, serif;
  border: 3px double #b89f65;
}
.stationery-classic .couple-text {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.04rem, 3.7vw, 1.38rem);
  color: #3f3a34;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 11. Minimalistyczne Boho (boho) */
.stationery-boho {
  background-color: #faf6f0;
  background-image: linear-gradient(180deg, #efe5d8 0%, #faf6f0 48%, #f3ebe0 100%);
  color: #5c4033;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 1.5px solid #c89f81;
  outline: 1px solid rgba(200, 159, 129, 0.55);
  outline-offset: -8px;
  border-radius: 215px 215px 16px 16px;
  box-shadow: 0 18px 38px -12px rgba(127, 85, 57, 0.14);
}
.stationery-boho .couple-text, .stationery-boho .date-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7f5539;
}
.stationery-boho .guest-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  color: #6f452c;
}

/* 12. Geometryczne Złoto (geogold) */
.stationery-geogold {
  background-color: #faf8f2;
  background-image: linear-gradient(215deg, #fefae0 0%, #ffffff 40%, #faf8f2 72%, #f5f0e1 100%);
  color: #27272a;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 3px double #c59b27;
  box-shadow: 0 18px 40px -12px rgba(184, 134, 11, 0.16);
}
.stationery-geogold .couple-text, .stationery-geogold .date-text {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #854d0e;
}
.stationery-geogold .guest-text {
  font-family: 'Cinzel', Georgia, serif;
  letter-spacing: 0.06em;
  color: #3f3f46;
}

/* 13. Akwarela Morska (seawatercolor) */
.stationery-seawatercolor {
  background-color: #f0f9ff;
  background-image: linear-gradient(135deg, #e0f2fe 0%, #f8fafc 50%, #ecfeff 100%);
  color: #0f3e5c;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 1.5px solid #7dd3fc;
  box-shadow: 0 18px 38px -12px rgba(2, 132, 199, 0.14);
}
.stationery-seawatercolor .couple-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.04rem, 3.7vw, 1.38rem);
  color: #0369a1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stationery-seawatercolor .date-text {
  font-family: 'Cinzel', Georgia, serif;
  color: #075985;
  letter-spacing: 0.1em;
}
.stationery-seawatercolor .guest-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: #0c4a6e;
}

/* 14. Rustykalna Gipsówka Kraft (rustic) — wyraźna, kontrastowa czcionka szeryfowa */
.stationery-rustic {
  background-color: #efe8dc;
  background-image: linear-gradient(180deg, #efe8dc 0%, #e4d8c5 100%);
  color: #2f241d;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 2px dashed #8d7765;
  box-shadow: 0 16px 36px -12px rgba(61, 49, 42, 0.16);
}
.stationery-rustic .couple-text {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.02rem, 3.6vw, 1.35rem);
  color: #3b281c;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.stationery-rustic .guest-text, .stationery-rustic .date-text {
  font-family: 'Playfair Display', Georgia, serif;
  color: #3b281c;
  letter-spacing: 0.04em;
}

/* 15. Królewski Burgund & Różowe Złoto (velvetburgundy) */
.stationery-velvetburgundy {
  background-color: #3b0a18;
  background-image: linear-gradient(180deg, #581327 0%, #2e0713 70%, #1c040b 100%);
  color: #fce7f3;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 3px double #e5b887;
  box-shadow: 0 20px 45px -15px rgba(46, 7, 19, 0.6);
}
.stationery-velvetburgundy .couple-text {
  font-family: 'Cinzel Decorative', serif;
  color: #f4c2c2;
  letter-spacing: 0.07em;
}
.stationery-velvetburgundy .guest-text, .stationery-velvetburgundy .date-text {
  font-family: 'Cinzel', Georgia, serif;
  color: #fde68a;
  letter-spacing: 0.06em;
}

/* 16. Szampańska Magnolia & Perła (magnolia) */
.stationery-magnolia {
  background-color: #fdfaf5;
  background-image: linear-gradient(135deg, #fffdf9 0%, #fbf3e4 52%, #f5e6d0 100%);
  color: #3d2e1e;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 3px double #c59b27;
  box-shadow: 0 18px 40px -12px rgba(180, 130, 50, 0.16);
}
.stationery-magnolia .couple-text, .stationery-magnolia .date-text {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.04rem, 3.7vw, 1.38rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c3d1e;
}
.stationery-magnolia .guest-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: #4a3219;
}

/* 17. Styl Hipisowski — Flower Power & Retro Groovy (hippie) */
.stationery-hippie {
  background-color: #fff8ed;
  background-image:
    radial-gradient(circle at 12% 15%, rgba(251, 146, 60, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 88% 82%, rgba(236, 72, 153, 0.14) 0%, transparent 45%),
    linear-gradient(135deg, #fffdf7 0%, #fff3db 52%, #fde4c3 100%);
  color: #431407;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 2.5px solid #d97706;
  border-radius: 36px 36px 16px 16px;
  box-shadow: 0 18px 40px -12px rgba(217, 119, 6, 0.22);
}
.stationery-hippie .couple-text {
  font-family: 'Great Vibes', 'Playfair Display', cursive, serif;
  font-weight: 600;
  font-size: clamp(1.32rem, 4.4vw, 1.82rem);
  letter-spacing: 0.03em;
  color: #b45309;
  text-transform: none;
}
.stationery-hippie .date-text {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #9a3412;
}
.stationery-hippie .guest-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: #7c2d12;
}

/* 18. Lagotto Romagnolo — Włoski Pies Truflowy & Toskania (lagotto) */
.stationery-lagotto {
  background-color: #fbf7f2;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(139, 90, 43, 0.1) 0%, transparent 48%),
    radial-gradient(circle at 85% 88%, rgba(197, 155, 39, 0.12) 0%, transparent 48%),
    linear-gradient(135deg, #fdfbf8 0%, #f7efe4 54%, #ede0cf 100%);
  color: #3b2314;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 3px double #8b5a2b;
  box-shadow: 0 18px 40px -12px rgba(92, 58, 33, 0.18);
}
.stationery-lagotto .couple-text, .stationery-lagotto .date-text {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.04rem, 3.7vw, 1.38rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c3a21;
}
.stationery-lagotto .guest-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: #4a2c11;
}

/* 19. Styl Podróżników — Mapa, Kompas & Podróż Życia (traveler) */
.stationery-traveler {
  background-color: #faf4e8;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(30, 58, 95, 0.08) 0%, transparent 48%),
    radial-gradient(circle at 86% 84%, rgba(180, 83, 9, 0.14) 0%, transparent 48%),
    linear-gradient(135deg, #fdfaf2 0%, #f7ebd4 52%, #ede0c4 100%);
  color: #1e293b;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 3px double #b45309;
  outline: 1px dashed rgba(30, 58, 95, 0.42);
  outline-offset: -8px;
  box-shadow: 0 18px 40px -12px rgba(146, 64, 14, 0.2);
}
.stationery-traveler .couple-text, .stationery-traveler .date-text {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.04rem, 3.7vw, 1.38rem);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #1e3a5f;
}
.stationery-traveler .guest-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: #78350f;
}

/* 20. Styl Wiosenny — Kwiat Jabłoni, Tulipany & Świeża Zieleń (spring) */
.stationery-spring {
  background-color: #f9fdf9;
  background-image:
    radial-gradient(circle at 14% 16%, rgba(244, 114, 182, 0.14) 0%, transparent 46%),
    radial-gradient(circle at 86% 84%, rgba(74, 222, 128, 0.16) 0%, transparent 46%),
    linear-gradient(135deg, #ffffff 0%, #f6fcf7 50%, #fdf2f8 100%);
  color: #1e3a29;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border: 2px solid #4ade80;
  outline: 1.5px solid rgba(244, 114, 182, 0.68);
  outline-offset: -8px;
  border-radius: 16px;
  box-shadow: 0 18px 40px -12px rgba(22, 101, 52, 0.15);
}
.stationery-spring .couple-text, .stationery-spring .date-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.08rem, 3.8vw, 1.44rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #166534;
}
.stationery-spring .guest-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: #9d174d;
}

/* ================= KSZTAŁT ŁUKU (ARCH / BOHO / CUSTOM ARCH) + OCHRONA TEKSTU PRZED WYJŚCIEM POZA ŁUK ================= */
.wedding-stationery.stationery-arch,
.wedding-stationery.stationery-boho,
.wedding-stationery.stationery-shape-arch {
  border-radius: 210px 210px 16px 16px !important;
  overflow: hidden !important;
}
.bifold-half-panel > .wedding-stationery.stationery-arch,
.bifold-half-panel > .wedding-stationery.stationery-boho,
.bifold-half-panel > .wedding-stationery.stationery-shape-arch {
  border-radius: 165px 165px 14px 14px !important;
  overflow: hidden !important;
}
.wedding-stationery.stationery-shape-arch .arch-top-guard,
.wedding-stationery.stationery-arch .arch-top-guard,
.wedding-stationery.stationery-boho .arch-top-guard {
  max-width: 68% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  box-sizing: border-box !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}
.wedding-stationery.stationery-shape-arch .couple-text,
.wedding-stationery.stationery-arch .couple-text,
.wedding-stationery.stationery-boho .couple-text {
  max-width: 82% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow-wrap: break-word !important;
}

/* ================= FORMAT SKŁADANY (ROZKŁADÓWKA 50% + 50% Z LINIĄ BIGOWANIA NA ŚRODKU) ================= */
.bifold-open-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  border-radius: 16px;
  align-items: stretch;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
.bifold-spread-b6 {
  max-width: 760px;
  min-height: 538px;
}
.bifold-spread-c6 {
  max-width: 680px;
  min-height: 479px;
}
.bifold-half-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.bifold-half-panel > .wedding-stationery {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
.bifold-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  border-left: 1.5px dashed rgba(100, 116, 139, 0.55);
  z-index: 40;
  pointer-events: none;
}

/* ================= PLANER SALI ================= */
#venue-canvas {
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 20px 20px;
  touch-action: none;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.venue-table { position: absolute; cursor: grab; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,0.12); user-select: none; }
.venue-table.selected { outline: 3px solid #be185d; outline-offset: 3px; }
@keyframes pulse-green { 0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); } 50% { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); } }
.guest-target-table { background-color: #10b981 !important; color: white !important; border-color: #047857 !important; animation: pulse-green 1.8s infinite; }

/* Płynna animacja przełączania pomiędzy salami weselnymi w zakładce '3. Sala' */
@keyframes venueRoomFadeIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes venueItemFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.venue-room-fade-in {
  animation: venueRoomFadeIn 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.venue-item-fade-in {
  animation: venueItemFadeIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.venue-room-tab-btn {
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.18s ease, box-shadow 0.22s ease;
}
.venue-room-tab-btn:active {
  transform: scale(0.97);
}

/* ================= WIRTUALNA KSIĘGA GOŚCI W FORMIE KSIĄŻKI (ROZKŁADÓWKA LEWA: WPIS / PRAWA: ZDJĘCIA) ================= */
.guestbook-book-shell {
  background: linear-gradient(145deg, #6b3e2e 0%, #4a281d 50%, #3a1d14 100%);
  padding: 10px 12px 14px 12px;
  border-radius: 20px;
  box-shadow:
    0 22px 44px -14px rgba(42, 20, 12, 0.42),
    inset 0 1px 2px rgba(255, 235, 215, 0.28),
    inset 0 -3px 6px rgba(0, 0, 0, 0.45);
  border: 1.5px solid #85523e;
  position: relative;
}

.guestbook-book-pages-stack {
  background: #e9e2d4;
  padding: 4px 5px 6px 5px;
  border-radius: 14px;
  box-shadow:
    0 3px 0 #d6ccb8,
    0 6px 0 #c2b69f;
}

.guestbook-spread {
  display: grid;
  grid-template-columns: 1fr;
  background: #fdfbf7;
  border-radius: 11px;
  overflow: hidden;
  position: relative;
  min-height: 410px;
  border: 1px solid #dfd5c3;
  transform-origin: center center;
}

@media (min-width: 640px) {
  .guestbook-spread {
    grid-template-columns: 1fr 1fr;
  }
}

.guestbook-page-left {
  position: relative;
  padding: 26px 24px 22px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(90deg, #faf6ee 0%, #fdfbf7 82%, #efe8da 100%);
  border-bottom: 1px dashed #d6cbb5;
}

@media (min-width: 640px) {
  .guestbook-page-left {
    border-bottom: none;
    border-right: 1px solid #d5c9b4;
    padding: 30px 28px 24px 30px;
  }
}

.guestbook-page-right {
  position: relative;
  padding: 26px 26px 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(90deg, #efe8da 0%, #fdfbf7 18%, #faf6ee 100%);
}

@media (min-width: 640px) {
  .guestbook-page-right {
    padding: 30px 30px 24px 28px;
  }
}

.guestbook-spine-overlay {
  display: none;
}

@media (min-width: 640px) {
  .guestbook-spine-overlay {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 28px;
    transform: translateX(-50%);
    background: linear-gradient(
      90deg,
      rgba(90, 62, 43, 0) 0%,
      rgba(90, 62, 43, 0.10) 35%,
      rgba(68, 42, 26, 0.22) 50%,
      rgba(90, 62, 43, 0.10) 65%,
      rgba(90, 62, 43, 0) 100%
    );
    pointer-events: none;
    z-index: 10;
  }
}

.guestbook-polaroid {
  background: #ffffff;
  padding: 9px 9px 22px 9px;
  border-radius: 6px;
  border: 1px solid #e5dec9;
  box-shadow:
    0 10px 24px -8px rgba(45, 30, 18, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.guestbook-polaroid:hover {
  transform: translateY(-2px) rotate(0deg) !important;
  box-shadow: 0 16px 30px -8px rgba(45, 30, 18, 0.30);
}

@keyframes bookFlipNextAnim {
  0% {
    opacity: 0.35;
    transform: perspective(1200px) rotateY(-12deg) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: perspective(1200px) rotateY(0deg) scale(1);
  }
}

@keyframes bookFlipPrevAnim {
  0% {
    opacity: 0.35;
    transform: perspective(1200px) rotateY(12deg) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: perspective(1200px) rotateY(0deg) scale(1);
  }
}

/* ================= ANIMACJA TADA / DRŻENIE PRZYCISKU #btn-submit-guest-rsvp ================= */
@keyframes rsvpTadaShake {
  0% {
    transform: scale3d(1, 1, 1) translateX(0);
  }
  10%, 20% {
    transform: scale3d(0.95, 0.95, 0.95) rotate3d(0, 0, 1, -2.5deg) translateX(-4px);
  }
  30%, 50%, 70%, 90% {
    transform: scale3d(1.05, 1.05, 1.05) rotate3d(0, 0, 1, 2.5deg) translateX(4px);
  }
  40%, 60%, 80% {
    transform: scale3d(1.05, 1.05, 1.05) rotate3d(0, 0, 1, -2.5deg) translateX(-4px);
  }
  100% {
    transform: scale3d(1, 1, 1) translateX(0);
  }
}

@keyframes rsvpIdleAttentionTada {
  0%, 78%, 100% {
    transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, 0deg);
  }
  81%, 84% {
    transform: scale3d(0.97, 0.97, 0.97) rotate3d(0, 0, 1, -2deg) translateX(-2px);
  }
  87%, 93% {
    transform: scale3d(1.035, 1.035, 1.035) rotate3d(0, 0, 1, 2deg) translateX(2px);
  }
  90%, 96% {
    transform: scale3d(1.035, 1.035, 1.035) rotate3d(0, 0, 1, -2deg) translateX(-2px);
  }
}

#btn-submit-guest-rsvp.rsvp-btn-incomplete-idle {
  animation: rsvpIdleAttentionTada 3.2s ease-in-out infinite;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.22), 0 6px 16px -3px rgba(190, 24, 93, 0.35);
}

#btn-submit-guest-rsvp.rsvp-btn-tada-shake {
  animation: rsvpTadaShake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.42), 0 10px 22px -4px rgba(190, 24, 93, 0.45) !important;
}

#btn-submit-guest-rsvp.rsvp-btn-saved-success {
  background-color: #16a34a !important;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.28), 0 8px 20px -4px rgba(21, 128, 61, 0.45) !important;
}

.rsvp-field-missing-highlight {
  border-color: #f43f5e !important;
  background-color: #fff1f2 !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18);
  transition: all 0.25s ease;
}

.book-flip-next {
  animation: bookFlipNextAnim 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.book-flip-prev {
  animation: bookFlipPrevAnim 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ================= PODGLĄD WYDRUKU NA EKRANIE ORAZ DRUK SERYJNY POD KOPERTY B6 I C6 ================= */
#onscreen-print-preview-content .print-page-break,
#print-preview-modal-body .print-page-break,
#onscreen-print-preview-content .serial-invitation-sheet,
#print-preview-modal-body .serial-invitation-sheet,
#onscreen-print-preview-content .serial-envelope-sheet,
#print-preview-modal-body .serial-envelope-sheet,
#onscreen-print-preview-content .serial-print-sheet,
#print-preview-modal-body .serial-print-sheet,
#onscreen-print-preview-content .print-a4-sheet-portrait,
#print-preview-modal-body .print-a4-sheet-portrait,
#onscreen-print-preview-content .print-a4-sheet-landscape,
#print-preview-modal-body .print-a4-sheet-landscape {
  display: block;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  padding: 1.25rem 1rem 1.5rem 1rem;
  margin: 0 auto 1.75rem auto;
  box-sizing: border-box;
  page-break-after: always;
  break-after: page;
  page-break-inside: avoid;
  break-inside: avoid;
}

#onscreen-print-preview-content .print-crop-b6,
#print-preview-modal-body .print-crop-b6 {
  margin: 0 auto;
  width: 100%;
  max-width: 454px; /* proporcja 120 × 170 mm */
  min-height: 642px;
  height: 642px;
  max-height: 642px;
  outline: 1.5px dashed #64748b;
  outline-offset: 3px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

#onscreen-print-preview-content .print-crop-c6,
#print-preview-modal-body .print-crop-c6 {
  margin: 0 auto;
  width: 100%;
  max-width: 397px; /* proporcja 105 × 148 mm (A6) */
  min-height: 559px;
  height: 559px;
  max-height: 559px;
  outline: 1.5px dashed #64748b;
  outline-offset: 3px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

#onscreen-print-preview-content .print-crop-folded-b6,
#print-preview-modal-body .print-crop-folded-b6 {
  margin: 0 auto;
  width: 100%;
  max-width: 760px; /* proporcja rozkładówki 240 × 170 mm */
  min-height: 538px;
  height: 538px;
  max-height: 538px;
  outline: 1.5px dashed #64748b;
  outline-offset: 3px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

#onscreen-print-preview-content .print-crop-folded-c6,
#print-preview-modal-body .print-crop-folded-c6 {
  margin: 0 auto;
  width: 100%;
  max-width: 680px; /* proporcja rozkładówki 210 × 148 mm */
  min-height: 479px;
  height: 479px;
  max-height: 479px;
  outline: 1.5px dashed #64748b;
  outline-offset: 3px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

#onscreen-print-preview-content .print-crop-b6 > .wedding-stationery,
#print-preview-modal-body .print-crop-b6 > .wedding-stationery,
#onscreen-print-preview-content .print-crop-c6 > .wedding-stationery,
#print-preview-modal-body .print-crop-c6 > .wedding-stationery,
#onscreen-print-preview-content .print-crop-folded-b6 > .bifold-open-grid,
#print-preview-modal-body .print-crop-folded-b6 > .bifold-open-grid,
#onscreen-print-preview-content .print-crop-folded-c6 > .bifold-open-grid,
#print-preview-modal-body .print-crop-folded-c6 > .bifold-open-grid {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 auto !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
}

#onscreen-print-preview-content .print-envelope-b6,
#print-preview-modal-body .print-envelope-b6 {
  margin: 0 auto;
  max-width: 665px; /* proporcja koperty B6: 176 × 125 mm */
  min-height: 472px;
  height: 472px;
  max-height: 472px;
  outline: 1.5px dashed #94a3b8;
  outline-offset: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#onscreen-print-preview-content .print-envelope-c6,
#print-preview-modal-body .print-envelope-c6 {
  margin: 0 auto;
  max-width: 612px; /* proporcja koperty C6: 162 × 114 mm */
  min-height: 431px;
  height: 431px;
  max-height: 431px;
  outline: 1.5px dashed #94a3b8;
  outline-offset: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ================= OTWIERANIE PROSTOKĄTNEJ KARTY POWITALNEJ Z EFEKTAMI SZABLONU ================= */
#envelope-welcome-overlay {
  opacity: 1;
  transition: opacity 1.6s cubic-bezier(0.22, 1, 0.36, 1), backdrop-filter 1.6s ease;
}

#envelope-welcome-overlay.envelope-stage-3-dissolve {
  opacity: 0;
  pointer-events: none;
}

.envelope-3d-stage {
  perspective: 1600px;
  position: relative;
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
}

#env-welcome-card {
  position: relative;
  transform-style: preserve-3d;
  transition:
    transform 1.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 1.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 1.45s ease,
    filter 1.45s ease;
  z-index: 25;
}

.envelope-stage-1-flap #env-welcome-card {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 34px 72px -12px rgba(0, 0, 0, 0.65), 0 0 38px rgba(255, 255, 255, 0.28) !important;
}

.envelope-stage-1-flap #env-seal-container button {
  transform: scale(1.18) translateY(-4px);
  opacity: 0;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.85));
  transition:
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.85s ease,
    filter 0.85s ease;
}

.envelope-stage-1-flap #env-seal-container p {
  opacity: 0;
  transition: opacity 0.55s ease;
}

.envelope-stage-2-extract #env-welcome-card {
  transform: translateY(-28px) rotateX(8deg) scale(1.06);
  opacity: 0;
  pointer-events: none;
}

@keyframes portalCardCeremonialReveal {
  0% {
    opacity: 0.15;
    transform: translateY(26px) scale(0.94);
    filter: blur(3px);
  }
  45% {
    opacity: 0.82;
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

#guest-portal-card.portal-card-opening-reveal {
  animation: portalCardCeremonialReveal 2.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes themeCeremonialEmblemBloom {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55) rotate(-8deg);
  }
  28% {
    opacity: 0.96;
    transform: translate(-50%, -54%) scale(1.18) rotate(3deg);
  }
  65% {
    opacity: 0.82;
    transform: translate(-50%, -62%) scale(1.28) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -74%) scale(1.48) rotate(6deg);
  }
}

.theme-ceremonial-center-emblem {
  position: fixed;
  left: 50%;
  top: 46%;
  z-index: 75;
  pointer-events: none;
  animation: themeCeremonialEmblemBloom 3.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.theme-ceremonial-emblem-badge {
  width: 92px;
  height: 92px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32), 0 0 36px rgba(255, 255, 255, 0.55);
}

@keyframes floatingPetalFall {
  0% {
    opacity: 0;
    transform: translateY(-20px) translateX(0) rotate(0deg) scale(calc(var(--petal-scale, 1) * 0.72));
  }
  15% {
    opacity: 0.95;
  }
  50% {
    opacity: 0.9;
    transform: translateY(42vh) translateX(calc(var(--petal-drift-x, 45px) * 0.55)) rotate(calc(var(--petal-rot, 220deg) * 0.5)) scale(var(--petal-scale, 1));
  }
  82% {
    opacity: 0.75;
  }
  100% {
    opacity: 0;
    transform: translateY(92vh) translateX(var(--petal-drift-x, 45px)) rotate(var(--petal-rot, 220deg)) scale(calc(var(--petal-scale, 1) * 1.08));
  }
}

.theme-floating-petal {
  position: fixed;
  top: -28px;
  pointer-events: none;
  z-index: 72;
  font-size: 21px;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.14));
  animation: floatingPetalFall 4.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.theme-floating-svg-motif {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.theme-floating-svg-motif svg {
  width: 26px !important;
  height: 26px !important;
}

/* ================= KODY SMART QR: MAKSYMALNY KONTRAST I OSTROŚĆ PIKSELI (EKRAN + DRUK) ================= */
.qr-print-box,
[data-qr-box] {
  background-color: #ffffff !important;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 0 0 2px #ffffff, 0 2px 6px rgba(15, 23, 42, 0.08);
}

.qr-print-box img,
.qr-print-box svg,
.qr-print-box canvas,
.qr-code-print-img,
.qr-inline-svg {
  display: block;
  margin: 0 auto;
  background-color: #ffffff !important;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}

@media print {
  @page {
    margin: 6mm;
  }
  html, body {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .no-print,
  #admin-app-view,
  #guest-portal-view,
  #auth-modal,
  #pwa-install-guide-modal,
  #gb-photo-lightbox-modal,
  #print-preview-modal {
    display: none !important;
  }
  #print-area,
  .print-only {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }
  .print-page-break,
  .serial-invitation-sheet,
  .serial-envelope-sheet,
  .serial-print-sheet {
    display: block !important;
    width: 100% !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    overflow: hidden !important;
    position: relative !important;
    background: #ffffff !important;
  }
  .print-page-break:last-child,
  .serial-invitation-sheet:last-child,
  .serial-envelope-sheet:last-child,
  .serial-print-sheet:last-child,
  .print-a4-sheet-portrait:last-child,
  .print-a4-sheet-landscape:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  /* Usunięcie cieni i wielowarstwowych gradientów podczas druku (eliminuje czarne artefakty w WebKit/iOS)
     oraz ścisła izolacja karty (overflow: hidden + break-inside: avoid), aby kod QR nigdy nie przeskoczył na następną stronę */
  .wedding-stationery {
    box-shadow: none !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .qr-print-box,
  [data-qr-box],
  [id^="print-qr-"],
  [id^="default-print-qr-"],
  [id^="print-sheet-qr-"] {
    position: relative !important;
    z-index: 60 !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    padding: 5px !important;
    border-radius: 7px !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 0 0 2px #ffffff !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .qr-print-box svg,
  .qr-print-box img,
  .qr-print-box canvas,
  .qr-code-print-img,
  .qr-inline-svg,
  [data-qr-box] svg,
  [data-qr-box] img,
  [data-qr-box] canvas {
    position: relative !important;
    z-index: 65 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 auto !important;
    background: #ffffff !important;
    image-rendering: -moz-crisp-edges !important;
    image-rendering: crisp-edges !important;
    image-rendering: pixelated !important;
    shape-rendering: crispEdges !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .stationery-lemons { background: #fcfbf8 !important; background-image: none !important; }
  .stationery-arch { background: #f7f5ef !important; background-image: none !important; }
  .stationery-eucalyptus { background: #fdfcf9 !important; background-image: none !important; }
  .stationery-lilac { background: #fdfaff !important; background-image: none !important; }
  .stationery-strelicja { background: #fffdf9 !important; background-image: none !important; }
  .stationery-glamour { background: #111827 !important; background-image: none !important; }
  .stationery-blush { background: #fffcf9 !important; background-image: none !important; }
  .stationery-lavender { background: #fcfaff !important; background-image: none !important; }
  .stationery-forest { background: #064e3b !important; background-image: none !important; }
  .stationery-classic { background: #fdfbf5 !important; background-image: none !important; }
  .stationery-boho { background: #faf6f0 !important; background-image: none !important; }
  .stationery-geogold { background: #faf8f2 !important; background-image: none !important; }
  .stationery-seawatercolor { background: #f0f9ff !important; background-image: none !important; }
  .stationery-rustic { background: #efe8dc !important; background-image: none !important; }
  .stationery-velvetburgundy { background: #3b0a18 !important; background-image: none !important; }
  .stationery-magnolia { background: #fdfaf5 !important; background-image: none !important; }
  .stationery-hippie { background: #fff8ed !important; background-image: none !important; }
  .stationery-lagotto { background: #fbf7f2 !important; background-image: none !important; }
  .stationery-traveler { background: #faf4e8 !important; background-image: none !important; }
  .stationery-spring { background: #f9fdf9 !important; background-image: none !important; }

  @page portrait-sheet {
    size: A4 portrait;
    margin: 0mm;
  }

  @page landscape-sheet {
    size: A4 landscape;
    margin: 0mm;
  }

  .print-a4-sheet-portrait {
    page: portrait-sheet;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 277mm !important;
    height: 277mm !important;
    max-height: 277mm !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .print-a4-sheet-landscape {
    page: landscape-sheet;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 192mm !important;
    height: 192mm !important;
    max-height: 192mm !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .print-crop-b6 {
    margin: 0 auto !important;
    width: 120mm !important;
    height: 170mm !important;
    min-height: 170mm !important;
    max-height: 170mm !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-crop-c6 {
    margin: 0 auto !important;
    width: 105mm !important;
    height: 148mm !important;
    min-height: 148mm !important;
    max-height: 148mm !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-crop-folded-b6 {
    margin: 0 auto !important;
    width: 240mm !important;
    height: 170mm !important;
    min-height: 170mm !important;
    max-height: 170mm !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-crop-folded-c6 {
    margin: 0 auto !important;
    width: 210mm !important;
    height: 148mm !important;
    min-height: 148mm !important;
    max-height: 148mm !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Linie cięcia drukarskiego są widoczne TYLKO na przodzie (print-crop-front-cut), a tył (print-crop-back-bleed) nie ma zewnętrznej przerywanej obwódki */
  .print-crop-front-cut {
    outline: 0.6pt dashed #64748b !important;
    outline-offset: 0px !important;
  }
  .print-crop-back-bleed {
    outline: none !important;
  }

  .print-crop-b6 > .wedding-stationery,
  .print-crop-c6 > .wedding-stationery,
  .print-crop-folded-b6 > .bifold-open-grid,
  .print-crop-folded-c6 > .bifold-open-grid {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .print-envelope-b6 {
    margin: 8mm auto;
    width: 176mm !important;
    height: 125mm !important;
    outline: 0.5pt dashed #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-envelope-c6 {
    margin: 8mm auto;
    width: 162mm !important;
    height: 114mm !important;
    outline: 0.5pt dashed #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .winietka-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; padding: 10mm; }
  .winietka-card { border: 1px dashed #94a3b8; padding: 6mm 4mm; text-align: center; page-break-inside: avoid !important; break-inside: avoid !important; overflow: hidden !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bilecik-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6mm; padding: 8mm; }
  .bilecik-card { border: 1px dashed #94a3b8; padding: 4.5mm 3.5mm; text-align: center; page-break-inside: avoid !important; break-inside: avoid !important; overflow: hidden !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}