/* ============================================================
   MOTYW: pearl-white  (Perłowa Biel) — motyw 14, v385
   Przebudowa w kierunku „mother of pearl”: koperta z perłowych liści
   miłorzębu z pieczęcią, tłoczona kremowa karta z kwiatami, draperia
   w planie dnia, masa perłowa z owalną kameą, ramka z miłorzębu,
   dusty blue z grawerowanymi amorkami. Grafiki z Canvy (28.10.2026),
   CSS generuje tools/motyw14/css14.py.
   Jednostki: --t-px = 1 px płótna szerokiego na 900 px; --t-H = wysokość
   ekranu w px płótna.
   ============================================================ */
body[data-theme="pearl-white"] {
  --rg-ink:     #39445E;
  --rg-body:    #4E566B;
  --rg-accent:  #6C7D9C;
  --rg-line:    rgba(57, 68, 94, .32);
  --rg-muted:   #858CA0;
  --rg-cream:   #F6F1EA;
  --rg-card:    #F6F1EA;
  --rg-pale:    #F6F1EA;
  --t-blue:     #748CA9;
  --t-ivory:    #FBF8F3;
  --t-pole:     rgba(255, 255, 255, .78);
  --t-perla:    radial-gradient(circle at 35% 30%, #FFFFFF 0%, #F7F2EC 38%, #DCD3C9 76%, #AFA79F 100%);
  --t-sznur:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cdefs%3E%3CradialGradient id='p' cx='.35' cy='.3' r='.75'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.45' stop-color='%23f6f1ec'/%3E%3Cstop offset='.8' stop-color='%23d9d1c8'/%3E%3Cstop offset='1' stop-color='%23aea69e'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='10' cy='10' r='8.6' fill='url(%23p)'/%3E%3Ccircle cx='30' cy='10' r='8.6' fill='url(%23p)'/%3E%3Ccircle cx='50' cy='10' r='8.6' fill='url(%23p)'/%3E%3Ccircle cx='10' cy='30' r='8.6' fill='url(%23p)'/%3E%3Ccircle cx='50' cy='30' r='8.6' fill='url(%23p)'/%3E%3Ccircle cx='10' cy='50' r='8.6' fill='url(%23p)'/%3E%3Ccircle cx='30' cy='50' r='8.6' fill='url(%23p)'/%3E%3Ccircle cx='50' cy='50' r='8.6' fill='url(%23p)'/%3E%3C/svg%3E");
  --rg-script:  'Pinyon Script', 'Great Vibes', cursive;
  --rg-display: 'Cormorant Garamond', serif;
  --rg-serif:   'Cormorant Garamond', serif;
  --rg-label:   'Marcellus', 'Cormorant Garamond', serif;
  --rg-ui:      'Poppins', sans-serif;
  --rg-text:    'Cormorant Garamond', serif;
  background: #F4EEE6 url("../assets/themes/pearl-white/tlo-len.webp") repeat;
  background-size: 360px 360px;
  color: var(--rg-body);
  font-family: var(--rg-text);
}
body[data-theme="pearl-white"] #rgScreens { background: #F4EEE6 url("../assets/themes/pearl-white/tlo-len.webp") repeat; background-size: calc(var(--rg-w, 760px) * .45) auto; }
body[data-theme="pearl-white"]::after { display: none; }
body[data-theme="pearl-white"] .rg-screen {
  --t-px: calc(var(--rg-w, 760px) / 900);
  --t-H: 1500;
  position: relative;
  padding: 0;
  min-height: 0;
  height: calc(var(--t-px) * var(--t-H));
  overflow: visible;
}
body[data-theme="pearl-white"] .rg-date     { --t-H: 2100; }
body[data-theme="pearl-white"] .rg-story    { --t-H: 2150; }
body[data-theme="pearl-white"] .rg-location { --t-H: 2520; }
body[data-theme="pearl-white"] .rg-rsvp     { --t-H: 1180; }
body[data-theme="pearl-white"] .rg-outro    { --t-H: 1840; }
body[data-theme="pearl-white"] #rgScreens .rg-screen + .rg-screen { margin-top: 0; }
body[data-theme="pearl-white"] .rg-screen > .rg-bg { height: calc(var(--t-px) * var(--t-H)); -webkit-mask-image: none; mask-image: none; overflow: visible; }
body[data-theme="pearl-white"] #rgScreens .rg-screen { background: transparent; }
body[data-theme="pearl-white"] .rg-screen > .rg-inner,
body[data-theme="pearl-white"] .rg-location > .rg-dress {
  position: absolute; left: 50%; translate: -50% 0; top: 0;
  width: var(--rg-w, 760px); max-width: 100vw;
  height: calc(var(--t-px) * var(--t-H));
  margin: 0; padding: 0; text-align: center; z-index: 3; background: none;
}
body[data-theme="pearl-white"] .rg-screen > .rg-inner > *,
body[data-theme="pearl-white"] .rg-card > *,
body[data-theme="pearl-white"] .rg-dress-inner > * { position: absolute; margin: 0 !important; }
body[data-theme="pearl-white"] .rg-card { position: absolute; inset: 0; width: auto; max-width: none; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; translate: none; }
body[data-theme="pearl-white"] .rg-card::before { content: none; }
body[data-theme="pearl-white"] .rg-bg img { transform: none !important; translate: none !important; rotate: none !important; animation: none !important; }
body[data-theme="pearl-white"] .rg-bg img[src*="pieczec"], body[data-theme="pearl-white"] .rg-bg img[src*="kopertka"] { filter: drop-shadow(0 calc(var(--t-px) * 8) calc(var(--t-px) * 10) rgba(40, 46, 66, .28)); }
body[data-theme="pearl-white"] .rg-story .rg-bg img[data-foto], body[data-theme="pearl-white"] .rg-story .rg-bg img[src*="zdjecie_owal"] { object-fit: cover; border-radius: 50%; }

/* ── typografia wspólna ── */
body[data-theme="pearl-white"] .rg-h {
  left: 10%; width: 80%; translate: 0 -50%;
  font-family: var(--rg-script); font-weight: 400; font-style: normal;
  font-size: calc(var(--t-px) * 92);
  line-height: 1.15; letter-spacing: 0; text-transform: none;
  color: var(--rg-ink); white-space: nowrap;
}
body[data-theme="pearl-white"] .rg-h::before, body[data-theme="pearl-white"] .rg-h::after { content: none; }
body[data-theme="pearl-white"] .rg-date .rg-welcome-h { display: none; }
body[data-theme="pearl-white"] .rg-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 0 2em; min-height: 0;
  background: transparent; color: var(--rg-ink);
  border: 1px solid rgba(57, 68, 94, .6); border-radius: 0;
  outline: 1px solid rgba(57, 68, 94, .32); outline-offset: calc(var(--t-px) * -8);
  box-shadow: none;
  font-family: var(--rg-label); font-weight: 400;
  font-size: max(10.5px, calc(var(--t-px) * 19));
  letter-spacing: .3em; text-transform: uppercase; white-space: nowrap;
  transition: background .25s, color .25s;
}
body[data-theme="pearl-white"] .rg-btn:hover { background: rgba(57, 68, 94, .07); }

/* ══ EKRAN 2 — TŁOCZONA KARTA Z IMIONAMI · DUSTY BLUE Z LICZNIKIEM ══ */
body[data-theme="pearl-white"] .rg-date .rg-sub {
  --rg-fit: 1;
  left: calc(var(--t-px) * 235); width: calc(var(--t-px) * 430);
  top: calc(var(--t-px) * 330); max-height: calc(var(--t-px) * 210); overflow: hidden;
  font-family: var(--rg-display); font-style: italic; font-weight: 500;
  font-size: calc(max(12px, calc(var(--t-px) * 28)) * var(--rg-k, 1));
  line-height: 1.4; color: var(--rg-body); text-wrap: balance;
}
body[data-theme="pearl-white"] .rg-date .rg-names {
  --rg-fit-w: 1;
  left: calc(var(--t-px) * 225); width: calc(var(--t-px) * 450);
  top: calc(var(--t-px) * 740); translate: 0 -50%;
  font-family: var(--rg-script); font-weight: 400;
  font-size: calc(var(--t-px) * 96 * var(--rg-kw, 1));
  line-height: 1.12; color: var(--rg-ink); white-space: nowrap; overflow-wrap: normal;
}
body[data-theme="pearl-white"] .rg-date .rg-names > span:not(.amp) { display: block; }
body[data-theme="pearl-white"] .rg-date .rg-names .amp { display: block; font-family: var(--rg-display); font-style: italic; font-size: .34em; line-height: 1.5; color: var(--rg-accent); }
body[data-theme="pearl-white"] .rg-date .rg-dateline {
  left: calc(var(--t-px) * 235); width: calc(var(--t-px) * 430);
  top: calc(var(--t-px) * 1010);
  font-family: var(--rg-display); font-weight: 500; font-style: normal;
  font-size: max(12.5px, calc(var(--t-px) * 30));
  line-height: 1.45; letter-spacing: .04em; color: var(--rg-ink); text-wrap: balance;
}
body[data-theme="pearl-white"] .rg-date .rg-dateline::before {
  content: ""; display: block; width: calc(var(--t-px) * 120); height: 1px; margin: 0 auto calc(var(--t-px) * 26);
  background: linear-gradient(90deg, transparent, rgba(57, 68, 94, .5), transparent);
}
body[data-theme="pearl-white"] .rg-date .rg-count-h {
  display: block; left: 10%; width: 80%; top: calc(var(--t-px) * 1660); translate: 0 -50%;
  font-family: var(--rg-display); font-style: normal; font-weight: 400;
  font-size: calc(var(--t-px) * 58); line-height: 1.1; letter-spacing: .02em; color: var(--t-ivory);
  text-shadow: 0 1px 2px rgba(30, 40, 60, .25);
}
body[data-theme="pearl-white"] .rg-date .rg-count {
  left: calc(var(--t-px) * 130); width: calc(var(--t-px) * 640); max-width: none;
  top: calc(var(--t-px) * 1740); height: calc(var(--t-px) * 220);
  box-sizing: border-box; padding: 0 calc(var(--t-px) * 30);
  display: grid; grid-template-columns: repeat(3, 1fr); align-items: center;
  background: var(--t-ivory);
  border: calc(var(--t-px) * 18) solid transparent; border-image: var(--t-sznur) 20 round;
  border-radius: calc(var(--t-px) * 40);
  box-shadow: 0 calc(var(--t-px) * 18) calc(var(--t-px) * 36) calc(var(--t-px) * -14) rgba(24, 32, 52, .45);
  background-clip: padding-box;
}
body[data-theme="pearl-white"] .rg-date .rg-count > div { text-align: center; }
body[data-theme="pearl-white"] .rg-date .rg-count .num {
  font-family: var(--rg-display); font-weight: 500; font-size: max(22px, calc(var(--t-px) * 66));
  line-height: 1; color: var(--rg-ink);
}
body[data-theme="pearl-white"] .rg-date .rg-count .lbl {
  margin-top: calc(var(--t-px) * 10); font-family: var(--rg-label); font-weight: 400;
  font-size: max(9.5px, calc(var(--t-px) * 15)); letter-spacing: .28em; text-transform: uppercase; color: var(--rg-muted);
}

/* ══ EKRAN 3 — PLAN DNIA POD PERŁOWĄ DRAPERIĄ ══
   Sekcja rośnie z liczbą punktów: góra draperii, powtarzany środek, dół. */
body[data-theme="pearl-white"] .rg-schedule { height: auto; min-height: calc(var(--t-px) * 1450); }
body[data-theme="pearl-white"] .rg-schedule > .rg-bg {
  height: 100%;
  background:
    url("../assets/themes/pearl-white/03-schedule/gora.webp") center top / 100% auto no-repeat,
    url("../assets/themes/pearl-white/03-schedule/dol2.webp") center bottom / 100% auto no-repeat,
    url("../assets/themes/pearl-white/03-schedule/srodek.webp") center top / 100% auto repeat-y,
    #F2E8DC;
}
/* v391: ozdoby planu dnia — girlandy z miłorzębu i pereł przy zasłonach
   (pod lambrekinem) i bukiety peonii w dolnych narożnikach, jak w historii. */
body[data-theme="pearl-white"] .rg-schedule > .rg-bg::before,
body[data-theme="pearl-white"] .rg-schedule > .rg-bg::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; z-index: 1; }
body[data-theme="pearl-white"] .rg-schedule > .rg-bg::before {
  top: calc(var(--t-px) * 300); height: calc(var(--t-px) * 690);
  background:
    url("../assets/themes/pearl-white/ozdoby/girlanda_l_m.webp") left calc(var(--t-px) * -6) top / calc(var(--t-px) * 150) auto no-repeat,
    url("../assets/themes/pearl-white/ozdoby/girlanda_p_m.webp") right calc(var(--t-px) * -6) top / calc(var(--t-px) * 150) auto no-repeat;
}
body[data-theme="pearl-white"] .rg-schedule > .rg-bg::after {
  bottom: 0; height: calc(var(--t-px) * 310);
  background:
    url("../assets/themes/pearl-white/ozdoby/naroznik_ld_m.webp") left bottom / calc(var(--t-px) * 285) auto no-repeat,
    url("../assets/themes/pearl-white/ozdoby/naroznik_pd_m.webp") right bottom / calc(var(--t-px) * 285) auto no-repeat;
}
body[data-theme="pearl-white"] .rg-schedule > .rg-inner {
  position: relative; left: auto; translate: none; margin: 0 auto; height: auto;
  padding: calc(var(--t-px) * 250) 0 calc(var(--t-px) * 400);
}
body[data-theme="pearl-white"] .rg-schedule > .rg-inner > * { position: relative; }
body[data-theme="pearl-white"] .rg-schedule .rg-h { left: auto; width: auto; top: auto; translate: none; font-size: calc(var(--t-px) * 110); }
body[data-theme="pearl-white"] .rg-schedule .rg-h::after {
  content: ""; display: block; width: calc(var(--t-px) * 200); height: 1px; margin: calc(var(--t-px) * 22) auto 0;
  background: linear-gradient(90deg, transparent, rgba(57, 68, 94, .45), transparent);
}
body[data-theme="pearl-white"] .rg-schedule .rg-timeline {
  --rg-fit: 0;
  --t-f: max(10.5px, calc(var(--t-px) * 22));
  left: auto; width: calc(var(--t-px) * 520); max-width: 72%;
  margin: calc(var(--t-px) * 70) auto 0 !important; height: auto;
  display: flex; flex-direction: column; gap: 0; padding: 0; overflow: visible; text-align: left;
}
body[data-theme="pearl-white"] .rg-schedule .rg-timeline::before {
  content: ""; position: absolute; left: calc(var(--t-px) * 14); top: calc(var(--t-px) * 30); bottom: calc(var(--t-px) * 60);
  width: 1px; background: linear-gradient(180deg, rgba(57, 68, 94, .45), rgba(57, 68, 94, .2));
}
body[data-theme="pearl-white"] .rg-schedule .rg-timeline::after { content: none; }
body[data-theme="pearl-white"] .rg-schedule .rg-item {
  position: relative; display: grid; grid-template-columns: calc(var(--t-px) * 70) 1fr; align-items: start;
  margin: 0; padding: 0 0 calc(var(--t-px) * 52 * var(--rg-k, 1)); min-height: 0;
}
body[data-theme="pearl-white"] .rg-schedule .rg-item::before, body[data-theme="pearl-white"] .rg-schedule .rg-item::after { content: none; }
body[data-theme="pearl-white"] .rg-schedule .rg-item .ico { display: none; }
body[data-theme="pearl-white"] .rg-schedule .rg-item .pearl {
  display: block; position: relative; z-index: 1; grid-column: 1; grid-row: 1; justify-self: start;
  width: calc(var(--t-px) * 30); height: calc(var(--t-px) * 30); min-width: 11px; min-height: 11px;
  margin-top: calc(var(--t-px) * 16); border-radius: 50%; background: var(--t-perla);
  box-shadow: 0 1px 3px rgba(40, 46, 66, .35);
}
body[data-theme="pearl-white"] .rg-schedule .rg-item .txt { position: static; grid-column: 2; grid-row: 1; margin: 0; padding: 0; text-align: left; }
body[data-theme="pearl-white"] .rg-schedule .rg-item :is(.time, .desc, .godz, .nazwa) { display: block; margin: 0; padding: 0; letter-spacing: 0; text-transform: none; font-style: normal; }
body[data-theme="pearl-white"] .rg-schedule .rg-item .godz::after, body[data-theme="pearl-white"] .rg-schedule .rg-item .nazwa::before { content: none; }
body[data-theme="pearl-white"] .rg-schedule .rg-item .godz { font-family: var(--rg-display); font-weight: 500; font-size: calc(var(--t-f) * 1.9 * var(--rg-k, 1)); line-height: 1.1; color: var(--rg-ink); }
body[data-theme="pearl-white"] .rg-schedule .rg-item .nazwa {
  margin-top: .35em !important; font-family: var(--rg-label); font-weight: 400;
  font-size: max(10px, calc(var(--t-f) * .86 * var(--rg-k, 1))); letter-spacing: .2em !important; text-transform: uppercase !important;
  line-height: 1.4; color: var(--rg-ink);
}
body[data-theme="pearl-white"] .rg-schedule .rg-item .desc {
  font-family: var(--rg-display); font-style: italic !important; font-weight: 500;
  font-size: max(12px, calc(var(--t-f) * 1.05 * var(--rg-k, 1))); line-height: 1.3; margin-top: .2em; color: var(--rg-body);
}
body[data-theme="pearl-white"] .rg-schedule .rg-item .desc:empty { display: none; }

/* ══ EKRAN 4 — HISTORIA: ZDJĘCIE W KAMEI NA MASIE PERŁOWEJ ══ */
body[data-theme="pearl-white"] .rg-story .rg-heart, body[data-theme="pearl-white"] .rg-story .rg-postcard, body[data-theme="pearl-white"] .rg-story .rg-collage { display: none !important; }
body[data-theme="pearl-white"] .rg-story .rg-h { top: calc(var(--t-px) * 150); font-size: calc(var(--t-px) * 96); }
body[data-theme="pearl-white"] .rg-story .rg-cols {
  --rg-fit: 1;
  left: calc(var(--t-px) * 185); width: calc(var(--t-px) * 530);
  top: calc(var(--t-px) * 1570); max-height: calc(var(--t-px) * 520); overflow: hidden;
  display: block; columns: auto; text-align: center;
  font-family: var(--rg-display); font-weight: 500;
  font-size: calc(max(12.5px, calc(var(--t-px) * 25)) * var(--rg-k, 1)); line-height: 1.5;
  color: var(--rg-body); text-wrap: balance;
}
body[data-theme="pearl-white"] :is(.rg-story, .rg-outro) .rg-cols .rg-p { --rg-fit: 0; display: inline; position: static; margin: 0; font: inherit; line-height: inherit; color: inherit; }
body[data-theme="pearl-white"] :is(.rg-story, .rg-outro) .rg-cols .rg-p:first-child::after { content: " "; }

/* ══ EKRAN 5 — MIEJSCE W RAMCE Z MIŁORZĘBU · DRESS CODE W ŁUKU ══ */
body[data-theme="pearl-white"] .rg-location .rg-loc-cards:empty { display: none; }
body[data-theme="pearl-white"] .rg-location .rg-card .rg-h { top: calc(var(--t-px) * 440); font-size: calc(var(--t-px) * 96); }
body[data-theme="pearl-white"] .rg-location .rg-map {
  left: calc(var(--t-px) * 215); width: calc(var(--t-px) * 470);
  top: calc(var(--t-px) * 530); height: calc(var(--t-px) * 300);
  aspect-ratio: auto; min-height: 0; border: calc(var(--t-px) * 6) solid var(--t-ivory); border-radius: 0;
  box-shadow: 0 0 0 1px rgba(57, 68, 94, .25), 0 calc(var(--t-px) * 8) calc(var(--t-px) * 18) rgba(40, 46, 66, .18);
  z-index: 1; background: rgba(255, 255, 255, .8);
}
body[data-theme="pearl-white"] .rg-location .rg-addr {
  --rg-fit: 1;
  left: calc(var(--t-px) * 215); width: calc(var(--t-px) * 470);
  top: calc(var(--t-px) * 870); max-height: calc(var(--t-px) * 170); overflow: hidden;
  font-family: var(--rg-display); font-style: normal; font-weight: 500; letter-spacing: .02em;
  font-size: calc(max(12.5px, calc(var(--t-px) * 26)) * var(--rg-k, 1)); line-height: 1.35;
  color: var(--rg-ink); text-transform: none; text-wrap: balance;
}
body[data-theme="pearl-white"] .rg-location .rg-btn {
  left: 50%; translate: -50% -50%; top: calc(var(--t-px) * 1110); width: auto;
  min-width: calc(var(--rg-w, 760px) * .3); height: calc(var(--t-px) * 72);
}
body[data-theme="pearl-white"] .rg-location .rg-btn .rg-pin { display: none; }
body[data-theme="pearl-white"] .rg-location > .rg-dress { pointer-events: none; overflow: visible; }
body[data-theme="pearl-white"] .rg-location > .rg-dress::after { content: none; }
/* łuk dress code'u: podwójna cienka linia, jak tłoczenie na karcie */
body[data-theme="pearl-white"] .rg-location > .rg-dress::before {
  content: ""; position: absolute;
  left: calc(var(--t-px) * 160); width: calc(var(--t-px) * 580);
  top: calc(var(--t-px) * 1680); height: calc(var(--t-px) * 760);
  border: 1px solid rgba(57, 68, 94, .45); border-radius: calc(var(--t-px) * 290) calc(var(--t-px) * 290) calc(var(--t-px) * 18) calc(var(--t-px) * 18);
  outline: 1px solid rgba(57, 68, 94, .25); outline-offset: calc(var(--t-px) * 10);
  background: rgba(251, 248, 243, .55);
}
body[data-theme="pearl-white"] .rg-dress-inner { position: absolute; inset: 0; width: auto; max-width: none; margin: 0; padding: 0; pointer-events: auto; }
body[data-theme="pearl-white"] .rg-dress .rg-h { top: calc(var(--t-px) * 1850); font-size: calc(var(--t-px) * 92); }
body[data-theme="pearl-white"] .rg-dress-grid {
  left: 50%; translate: -50% -50%; top: calc(var(--t-px) * 1970); width: auto;
  display: flex; justify-content: center; align-items: center;
}
body[data-theme="pearl-white"] .rg-dress .rg-swatches { display: flex; flex-direction: row; gap: calc(var(--t-px) * 22); }
body[data-theme="pearl-white"] .rg-dress .rg-sw {
  position: relative; width: calc(var(--t-px) * 58); height: calc(var(--t-px) * 58); border: 0; border-radius: 50%;
  box-shadow: inset calc(var(--t-px) * -6) calc(var(--t-px) * -8) calc(var(--t-px) * 14) rgba(30, 34, 50, .28), 0 calc(var(--t-px) * 5) calc(var(--t-px) * 8) rgba(40, 46, 66, .25);
}
body[data-theme="pearl-white"] .rg-dress .rg-sw::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .95) 0, rgba(255, 255, 255, .35) 22%, rgba(255, 255, 255, 0) 46%);
}
body[data-theme="pearl-white"] .rg-dress-fig { display: none; }
body[data-theme="pearl-white"] .rg-dress .rg-p {
  --rg-fit: 1;
  left: calc(var(--t-px) * 215); width: calc(var(--t-px) * 470);
  top: calc(var(--t-px) * 2050); max-height: calc(var(--t-px) * 260); overflow: hidden;
  font-family: var(--rg-display); font-style: italic; font-weight: 500;
  font-size: calc(max(12px, calc(var(--t-px) * 24)) * var(--rg-k, 1)); line-height: 1.4;
  color: var(--rg-body); text-wrap: balance;
}
body[data-theme="pearl-white"] #rgLocation { z-index: 3; }

/* ══ EKRAN 6 — RSVP: KREMOWA KARTA NA DUSTY BLUE, KOPERTA Z KORONKĄ ══ */
/* karta RSVP z narożnikami jest w tle (06-rsvp/tlo3.webp) */
body[data-theme="pearl-white"] .rg-rsvp .rg-h { left: 20%; width: 60%; top: calc(var(--t-px) * 290); font-size: calc(var(--t-px) * 100); }
body[data-theme="pearl-white"] .rg-rsvp .rg-q, body[data-theme="pearl-white"] .rg-rsvp .rg-msg-label {
  left: 18%; width: 64%; translate: 0 -50%;
  font-family: var(--rg-label); font-style: normal; font-weight: 400;
  font-size: max(10px, calc(var(--t-px) * 17)); line-height: 1.2; letter-spacing: .22em; text-transform: uppercase; color: var(--rg-muted);
}
body[data-theme="pearl-white"] .rg-rsvp .rg-q { top: calc(var(--t-px) * 415); }
body[data-theme="pearl-white"] .rg-rsvp .rg-msg-label { top: calc(var(--t-px) * 610); }
body[data-theme="pearl-white"] .rg-rsvp .rg-radios { left: 20%; width: 60%; top: calc(var(--t-px) * 492); translate: 0 -50%; display: flex; flex-direction: column; align-items: center; gap: calc(var(--t-px) * 10); }
body[data-theme="pearl-white"] .rg-rsvp .rg-radio { font-family: var(--rg-display); font-style: italic; font-weight: 500; font-size: max(13px, calc(var(--t-px) * 27)); line-height: 1.2; color: var(--rg-ink); }
body[data-theme="pearl-white"] .rg-rsvp .rg-radio .dot { border-color: var(--rg-accent); }
body[data-theme="pearl-white"] .rg-rsvp .rg-sep { display: block; left: 38%; width: 24%; top: calc(var(--t-px) * 565); height: 0; border: 0; border-top: 1px solid var(--rg-line); background: none; }
body[data-theme="pearl-white"] .rg-rsvp .rg-textarea {
  left: calc(var(--t-px) * 215); width: calc(var(--t-px) * 470); top: calc(var(--t-px) * 640); height: calc(var(--t-px) * 120);
  min-height: 0; resize: none; background: var(--t-pole); border: 1px solid var(--rg-line); border-radius: 0;
  box-shadow: inset 0 1px 3px rgba(40, 46, 66, .08); color: var(--rg-body);
  font-family: var(--rg-display); font-style: italic; font-weight: 500; font-size: max(12px, calc(var(--t-px) * 22));
}
body[data-theme="pearl-white"] .rg-rsvp .rg-textarea::placeholder { color: var(--rg-muted); opacity: .85; }
body[data-theme="pearl-white"] .rg-rsvp .rg-btn { left: 50%; translate: -50% -50%; top: calc(var(--t-px) * 840); width: auto; min-width: calc(var(--rg-w, 760px) * .3); height: calc(var(--t-px) * 72); }
body[data-theme="pearl-white"] .rg-rsvp .rg-note {
  --t-notka: max(48%, 17em);
  left: calc((100% - var(--t-notka)) / 2); width: var(--t-notka); top: calc(var(--t-px) * 950); translate: 0 -50%;
  font-family: var(--rg-display); font-style: italic; font-weight: 500;
  font-size: max(11px, calc(var(--t-px) * 19)); line-height: 1.35; color: var(--rg-muted); text-wrap: balance;
}
@media (max-width: 359px) { body[data-theme="pearl-white"] .rg-rsvp .rg-note { --t-notka: max(48%, 18.5em); font-size: 10px; } }

/* ══ EKRAN 7 — PIECZĘĆ, KILKA SŁÓW, IMIONA ══ */
/* duża grafika na dole (fontanna w peoniach): na szerokim ekranie kolumna
   jest węższa od okna — boki grafiki wygaszamy, żeby nie kończyła się ostro */
@media (min-width: 761px) {
  body[data-theme="pearl-white"] .rg-outro .rg-bg img[src*="fontanna"] {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  }
}
body[data-theme="pearl-white"] .rg-outro .rg-outro-card, body[data-theme="pearl-white"] .rg-outro .rg-outro-fig { display: none; }
body[data-theme="pearl-white"] .rg-outro .rg-h { left: 12%; width: 76%; top: calc(var(--t-px) * 600); font-size: calc(var(--t-px) * 80); white-space: normal; text-wrap: balance; }
body[data-theme="pearl-white"] .rg-outro .rg-cols {
  --rg-fit: 1;
  left: calc(var(--t-px) * 150); width: calc(var(--t-px) * 600); top: calc(var(--t-px) * 690);
  max-height: calc(var(--t-px) * 330); overflow: hidden; display: block; columns: auto; text-align: center;
  font-family: var(--rg-display); font-weight: 500; font-size: calc(max(12.5px, calc(var(--t-px) * 25)) * var(--rg-k, 1));
  line-height: 1.5; color: var(--rg-body); text-wrap: balance;
}
body[data-theme="pearl-white"] .rg-outro .rg-monogram {
  --rg-fit-w: 1;
  left: 8%; width: 84%; top: calc(var(--t-px) * 1180); translate: 0 -50%;
  font-family: var(--rg-script); font-weight: 400; font-style: normal;
  font-size: calc(var(--t-px) * 90 * var(--rg-kw, 1)); line-height: 1.2; letter-spacing: 0; text-transform: none;
  color: var(--rg-ink); text-wrap: balance; overflow-wrap: normal;
}
body[data-theme="pearl-white"] .rg-outro .rg-monogram .amp { color: var(--rg-accent); font-size: .55em; }

/* ══ ODSŁONA — KOPERTA Z MIŁORZĘBU OTWIERA KLAPĘ, KARTA WYSUWA SIĘ ══
   Warstwy (01-start): wnętrze koperty · karta w kopercie (skrzydło
   „karta”) · przód koperty z otworem po klapie („przod”) · klapa
   z pieczęcią („klapa”). Kolejność ruchu: pieczęć rozbłyskuje, klapa
   unosi się na zawiasie u góry, karta wysuwa się z koperty, koperta
   opada, a karta rośnie dokładnie do rozmiaru pierwszego ekranu
   (skala 1.2195 wokół 50 % · 44.44 %) — pod spodem czeka
   ta sama karta z imionami. Razem ok. 3,4 s (limit w JS 3,6 s). */
body[data-theme="pearl-white"] .plate-reveal {
  --t14-w: min(100vw, var(--rg-w, 760px), 75svh);
  --t14-dy: calc((100svh - var(--t14-w) * 5 / 3) / -2);
  align-items: center;
  background: #E9E2D8 url("../assets/themes/pearl-white/01-start/rozmyte_m.webp") center / cover no-repeat;
}
body[data-theme="pearl-white"] .plate-bleed { display: none; }
body[data-theme="pearl-white"] .plate-stage { width: var(--t14-w); height: calc(var(--t14-w) * 5 / 3); perspective: 1600px; perspective-origin: 50% 0%; }
body[data-theme="pearl-white"] .plate-canvas .plate-layer { object-fit: fill; }
body[data-theme="pearl-white"] .plate-reveal.opening .plate-layer { transform: none; opacity: 1; }
body[data-theme="pearl-white"] .plate-skrz { will-change: transform, opacity; }
body[data-theme="pearl-white"] .sk-karta { z-index: 2; transform-origin: 50% 44.44%; }
body[data-theme="pearl-white"] .sk-przod { z-index: 3; }
body[data-theme="pearl-white"] .sk-klapa { z-index: 4; transform-origin: 50% 0%; }
body[data-theme="pearl-white"] .sk-pieczec { z-index: 5; transform-origin: 50.0% 49.27%; }
/* połysk przesuwa się po klapie i pieczęci, zanim gość dotknie */
body[data-theme="pearl-white"] .sk-pieczec::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .7) 50%, rgba(255, 255, 255, 0) 60%) 100% 0 / 300% 100% no-repeat;
  -webkit-mask: url("../assets/themes/pearl-white/01-start/pieczec_m.webp") 0 0 / 100% 100% no-repeat; mask: url("../assets/themes/pearl-white/01-start/pieczec_m.webp") 0 0 / 100% 100% no-repeat;
  animation: t14-blysk 5.4s ease-in-out 1s infinite;
}
/* rozbłysk pieczęci */
body[data-theme="pearl-white"] .sk-pieczec::before {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  left: calc(50.0% - 26%); top: calc(49.27% - 15.6%); width: 52%; height: 31.2%; border-radius: 50%;
  background: radial-gradient(closest-side, #fff 0, rgba(255, 255, 255, .9) 22%, rgba(255, 248, 240, .45) 50%, rgba(255, 255, 255, 0) 100%);
  opacity: 0; transform: scale(.4);
}
body[data-theme="pearl-white"] .plate-stage::after {
  content: ""; position: absolute; left: 20%; right: 20%; top: 36%; height: 26%; pointer-events: none; z-index: 5;
  --i: radial-gradient(closest-side, #fff 0, #fff 22%, rgba(230, 224, 240, .85) 40%, rgba(255, 255, 255, 0) 100%);
  background: var(--i) 8% 20% / 4% 2.4% no-repeat, var(--i) 92% 30% / 3% 1.8% no-repeat, var(--i) 22% 92% / 3% 1.8% no-repeat,
              var(--i) 80% 86% / 4% 2.4% no-repeat, var(--i) 50% 0% / 3% 1.8% no-repeat;
  filter: drop-shadow(0 0 1.5px rgba(120, 110, 140, .6));
  animation: t14-iskry 3.6s ease-in-out infinite;
}
@keyframes t14-blysk { 0% { background-position: 100% 0; } 45%, 100% { background-position: 0% 0; } }
@keyframes t14-iskry { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
/* — po dotknięciu — */
body[data-theme="pearl-white"] .plate-reveal.opening .plate-stage::after { animation: t14-zgas .4s ease forwards; }
body[data-theme="pearl-white"] .plate-reveal.opening .sk-pieczec::after { animation: none; opacity: 0; }
body[data-theme="pearl-white"] .plate-reveal.opening .sk-pieczec::before { animation: t14-rozblysk .9s ease-out 0s both; }
body[data-theme="pearl-white"] .plate-reveal.opening .sk-pieczec { animation: t14-pieczec .6s cubic-bezier(.3, 0, .6, 1) 0s both; }
body[data-theme="pearl-white"] .plate-reveal.opening .sk-klapa { animation: t14-klapa 1.2s cubic-bezier(.5, .05, .35, 1) .42s both; }
body[data-theme="pearl-white"] .plate-reveal.opening .sk-karta { animation: t14-karta 2.15s cubic-bezier(.45, 0, .25, 1) 1.15s both; }
body[data-theme="pearl-white"] .plate-reveal.opening .sk-przod,
body[data-theme="pearl-white"] .plate-reveal.opening .plate-canvas > img.plate-layer { animation: t14-opad .95s cubic-bezier(.55, 0, .75, .4) 1.95s both; }
body[data-theme="pearl-white"] .plate-reveal.opening { opacity: 0; transition: opacity .55s ease-in 2.85s; }
body[data-theme="pearl-white"] .plate-reveal.opened { opacity: 0; }
@keyframes t14-zgas { to { opacity: 0; } }
@keyframes t14-rozblysk { 0% { opacity: 0; transform: scale(.4); } 35% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes t14-pieczec { 0% { transform: none; opacity: 1; filter: none; } 35% { transform: scale(1.06); filter: brightness(1.12); opacity: 1; } 100% { transform: scale(1.32); filter: brightness(1.35); opacity: 0; } }
@keyframes t14-klapa {
  0%   { transform: none; opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: rotate05-location/ramka2_m.webp(172deg); opacity: 0; }
}
@keyframes t14-karta {
  0%   { transform: none; }
  38%  { transform: translateY(-15%); }
  100% { transform: translateY(var(--t14-dy, 0px)) scale(1.2195); }
}
@keyframes t14-opad { to { transform: translateY(55%); opacity: 0; } }
/* napis „Dotknij…” — matowe szkło pod pieczęcią */
body[data-theme="pearl-white"] .plate-reveal .plate-cta {
  --t-h: calc(var(--t14-w) * 5 / 3);
  bottom: auto; top: min(calc((100svh - var(--t-h)) / 2 + var(--t-h) * 0.69), calc(100svh - 72px));
  z-index: 6; padding: .95em 2.2em;
  background: rgba(251, 248, 243, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .95); border-radius: 0;
  outline: 1px solid rgba(57, 68, 94, .3); outline-offset: 4px;
  box-shadow: 0 10px 28px rgba(40, 46, 66, .18);
  font-family: var(--rg-label); font-weight: 400; font-size: max(11px, calc(var(--t-h) * .0128));
  letter-spacing: .32em; text-transform: uppercase; color: #39445E; opacity: 1; white-space: nowrap;
  animation: t14-cta 3.4s ease-in-out infinite;
}
body[data-theme="pearl-white"] .plate-reveal.opening .plate-cta { animation: none; opacity: 0; transition: opacity .3s; }
@keyframes t14-cta { 0%, 100% { opacity: 1; } 50% { opacity: .74; } }

/* v395: telefon (ekran wyższy niż 3:5) — koperta wypełnia CAŁY ekran, bez pasów u góry
   i u dołu: plansza ma wysokość ekranu, boki wychodzą poza kadr (pieczęć zostaje na środku).
   Karta wysuwa się i rośnie do pełnej planszy, a potem plansza zwęża się do szerokości
   kolumny zaproszenia i zostaje u góry — tam, gdzie leży karta pierwszego ekranu. */
@media (max-aspect-ratio: 3/5) {
  body[data-theme="pearl-white"] .plate-reveal { --t14-w: 60svh; --t14-dy: 0px; align-items: flex-start; justify-content: center; overflow: hidden; background: #E9E2D8; }
  body[data-theme="pearl-white"] .plate-stage { flex: none; width: 60svh; height: 100svh; }
  body[data-theme="pearl-white"] .plate-reveal.opening .plate-stage { animation: t14-dopasuj 1s cubic-bezier(.45, 0, .25, 1) 2.2s both; }
  body[data-theme="pearl-white"] .plate-reveal .plate-cta { top: min(calc(100svh * .69), calc(100svh - 72px)); }
}
@keyframes t14-dopasuj { to { width: min(100vw, var(--rg-w, 760px)); height: calc(min(100vw, var(--rg-w, 760px)) * 5 / 3); } }

/* ══ TELEFON ══ */
@media (max-width: 480px) {
  body[data-theme="pearl-white"] .rg-schedule .rg-timeline { max-width: 74%; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-theme="pearl-white"] .plate-skrz, body[data-theme="pearl-white"] .plate-skrz::after, body[data-theme="pearl-white"] .plate-skrz::before, body[data-theme="pearl-white"] .plate-stage::after,
  body[data-theme="pearl-white"] .plate-reveal.opening .plate-skrz, body[data-theme="pearl-white"] .plate-reveal.opening .plate-canvas > img.plate-layer,
  body[data-theme="pearl-white"] .plate-reveal.opening .plate-skrz::after, body[data-theme="pearl-white"] .plate-reveal.opening .plate-skrz::before { animation: none !important; transform: none; }
  body[data-theme="pearl-white"] .plate-reveal.opening { transition: opacity .6s ease .3s; }
}
/* Prezenty: kartusz na planszy zastępuje ikonkę; tekst szeryfowy jak w całym motywie. */
body[data-theme="pearl-white"] #rgGifts { --g-ink: #39445E; --g-acc: #6C7D9C; --g-paper: #FBF8F3; }
body[data-theme="pearl-white"] #rgGifts .rg-gifts-orn { display: none; }
body[data-theme="pearl-white"] #rgGifts .rg-gifts-h { font-family: var(--rg-script); font-weight: 400; font-size: clamp(34px, calc(var(--rg-w, 760px) * .1), 72px); }
body[data-theme="pearl-white"] #rgGifts .rg-gifts-text { font-family: var(--rg-display); font-weight: 500; font-size: clamp(15px, calc(var(--rg-w, 760px) * .026), 19px); line-height: 1.5; }
body[data-theme="pearl-white"] #rgGifts :is(.rg-gifts-lbl, .rg-gifts-kopiuj) { font-family: var(--rg-label); font-weight: 400; }

/* ══ v408 (uwagi Dawida) ══════════════════════════════════════════
   Ekran 2: kolejność jak w pozostałych motywach — u góry imiona, pod
   nimi zdanie zapraszające, na końcu data i miejsce. */
body[data-theme="pearl-white"] .rg-date .rg-names { top: calc(var(--t-px) * 515); }
body[data-theme="pearl-white"] .rg-date .rg-sub { top: calc(var(--t-px) * 705); max-height: calc(var(--t-px) * 200); }
body[data-theme="pearl-white"] .rg-date .rg-dateline { top: calc(var(--t-px) * 950); }
/* Zakończenie: imiona jedno pod drugim („Imię", „&", „Imię"), a po bokach
   tekstu i imion perłowe girlandy z miłorzębu (warstwy w js/app.js) —
   sekcja nie wygląda już na pustą między tekstem a fontanną. */
body[data-theme="pearl-white"] .rg-outro .rg-monogram { top: calc(var(--t-px) * 1195); font-size: calc(var(--t-px) * 104 * var(--rg-kw, 1)); line-height: 1.12; }
body[data-theme="pearl-white"] .rg-outro .rg-monogram > span { display: block; }
body[data-theme="pearl-white"] .rg-outro .rg-monogram .amp { font-family: var(--rg-display); font-style: italic; font-size: max(11px, .4em); line-height: 1.6; }
/* Tekst „Kilka słów" wyśrodkowany między nagłówkiem a imionami — krótki
   tekst nie zostawia już dziury nad imionami. */
body[data-theme="pearl-white"] .rg-outro .rg-cols { top: calc(var(--t-px) * 858); translate: 0 -50%; max-height: calc(var(--t-px) * 320); }
body[data-theme="pearl-white"] .rg-date .rg-names .amp { font-size: max(11px, .34em); }

/* v410 (uwaga Dawida): historia w całości na masie perłowej — ekran ma
   wysokość planszy (1500), kamea mniejsza, tekst pod nią w obrębie masy
   (950–1400 px płótna), bez pasa lnu i girland pod spodem. */
body[data-theme="pearl-white"] .rg-story { --t-H: 1500; }
body[data-theme="pearl-white"] .rg-screen.rg-story .rg-cols {
  left: calc(var(--t-px) * 170); width: calc(var(--t-px) * 560);
  top: calc(var(--t-px) * 1175); translate: 0 -50%; max-height: calc(var(--t-px) * 430);
  color: var(--rg-ink);
}
/* Inicjały pary tłoczone w perłowej pieczęci zakończenia (parts.pieczecInicjaly). */
body[data-theme="pearl-white"] .rg-pieczec-ini {
  position: absolute; margin: 0 !important; display: flex; align-items: center; justify-content: center;
  gap: .05em; white-space: nowrap; pointer-events: none; z-index: 2;
  font-family: var(--rg-script); font-weight: 400; font-size: calc(var(--t-px) * 92); line-height: 1;
  color: rgba(150, 136, 112, .66);
  text-shadow: 0 1px 0 rgba(255, 253, 246, .95), 0 -1px 0 rgba(110, 96, 74, .35), 0 0 1px rgba(110, 96, 74, .2);
}
body[data-theme="pearl-white"] .rg-pieczec-ini i { font-family: var(--rg-display); font-style: italic; font-size: .4em; translate: 0 .1em; }

/* v414 (uwaga Dawida): plan dnia krótszy — pod ostatnim punktem było
   ok. 400 px pustego miejsca. Bukiety w rogach mniejsze, dolny margines
   260 zamiast 400 px, sekcja ma co najmniej wysokość góry i dołu planszy. */
body[data-theme="pearl-white"] .rg-schedule { min-height: calc(var(--t-px) * 1250); }
body[data-theme="pearl-white"] .rg-schedule > .rg-inner { padding-bottom: calc(var(--t-px) * 260); }
body[data-theme="pearl-white"] .rg-schedule > .rg-bg::after {
  height: calc(var(--t-px) * 250);
  background-size: calc(var(--t-px) * 225) auto, calc(var(--t-px) * 225) auto;
}

/* Historia: tekst pod kameą w ramce w stylu motywu — perłowe tło, cienka
   ramka w kolorze dusty blue i druga, wewnętrzna linia (jak przyciski). */
body[data-theme="pearl-white"] .rg-screen.rg-story .rg-cols {
  box-sizing: border-box;
  padding: calc(var(--t-px) * 34) calc(var(--t-px) * 40);
  background: rgba(253, 250, 244, .78);
  border: 1px solid rgba(57, 68, 94, .42);
  outline: 1px solid rgba(57, 68, 94, .22);
  outline-offset: calc(var(--t-px) * -9);
  box-shadow: 0 6px 22px rgba(90, 80, 60, .12);
}
