/* ============================================================
   MOTYW: deco-emerald  (Szmaragd i złoto, art déco) — motyw 12
   Ciemny szmaragd, złota rama z wachlarzem, magnolie, orchidee, monstera.

   14.10 — PRZEBUDOWA NA MALOWANYCH PLANSZACH Z CANVY
   Dotąd motyw był rysowany wektorowo (płaskie łuki, koła i kreski)
   i przy motywach 1, 3 i 9 wyglądał ubogo. Teraz każdy ekran to
   malowana plansza 900 × 1500 wygenerowana w Canvie w jednym stylu
   (pierwsza plansza była wzorem dla pozostałych), a ikonki
   harmonogramu to osobne, wycięte z tła ilustracje — po jednej na
   punkt, cyklicznie, więc lista działa przy 1–6 punktach.
   Teksty leżą w PUSTYCH polach planszy i stoją środkiem na środku
   swojego pola (top = środek, translate 0 −50 %). Jednostki:
   --t-1p = 1 % wysokości płótna, --t-px = 1 piksel planszy (900).
   ============================================================ */

body[data-theme="deco-emerald"] {
  --rg-ink:     #E7C977;
  --rg-body:    #EFE6CF;
  --rg-accent:  #D9B45F;
  --rg-line:    rgba(217, 180, 95, .55);
  --rg-muted:   #C9B98E;
  --rg-cream:   #0B3127;
  --rg-card:    #0B3127;
  --rg-pale:    #0B3127;
  --t-btn-txt:  #0B3127;
  --t-pole:     rgba(5, 32, 25, .55);
  --rg-script:  'Great Vibes', cursive;
  --rg-display: 'Poiret One', 'Marcellus', serif;
  --rg-serif:   'Poiret One', 'Marcellus', serif;
  --rg-ui:      'Poppins', sans-serif;
  --rg-text:    'Poppins', sans-serif;
  background: #0B3127;
  color: var(--rg-body);
  font-family: var(--rg-text);
}
body[data-theme="deco-emerald"] #rgScreens { background: #0B3127; }
body[data-theme="deco-emerald"]::after { display: none; }
body[data-theme="deco-emerald"] .rg-screen {
  --t-1p: calc(var(--rg-w, 760px) * 5 / 3 / 100);
  --t-px: calc(var(--rg-w, 760px) / 900);
}
/* Zakładka między ekranami liczona od płótna (bazowe 7vw na monitorze
   to 8 % płótna), wygaszenie krótkie — plansze są pełne aż do krawędzi. */
body[data-theme="deco-emerald"] #rgScreens .rg-screen + .rg-screen {
  margin-top: calc(var(--rg-w, 760px) * -0.05);
}
body[data-theme="deco-emerald"] .rg-screen > .rg-bg {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
}
body[data-theme="deco-emerald"] .rg-date > .rg-bg {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 97%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 97%, transparent 100%);
}

/* ── RUCH ─────────────────────────────────────────────────────
   Plansze niosą tekst, więc nie jadą paralaksą ani dryfem. Żyją:
   drzwi odsłony, ikonki harmonogramu (każda we własnej fazie)
   i bardzo powolny oddech zdjęcia w ramce. */
body[data-theme="deco-emerald"] .rg-bg img { transform: none !important; animation: none; }
@keyframes t12-ikona {
  0%, 100% { translate: 0 0;   rotate: -2.5deg; }
  50%      { translate: 0 -6%; rotate: 2.5deg; }
}
@keyframes t12-zdjecie {
  0%, 100% { scale: 1; }
  50%      { scale: 1.035; }
}
body[data-theme="deco-emerald"] .rg-story .rg-bg img[data-foto],
body[data-theme="deco-emerald"] .rg-story .rg-bg img[src*="04-story/zdjecie"],
body[data-theme="deco-emerald"] .rg-story .rg-bg img[data-warstwa*="04-story/zdjecie"] {
  animation: t12-zdjecie 16s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  body[data-theme="deco-emerald"] .rg-bg img,
  body[data-theme="deco-emerald"] .rg-schedule .rg-item .ico { animation: none !important; }
}

/* ── RAMA PŁÓTNA ─────────────────────────────────────────────── */
body[data-theme="deco-emerald"] .rg-screen {
  position: relative;
  padding-top: 0;
  padding-bottom: 0;
  min-height: calc(var(--t-1p) * 100);
  height: calc(var(--t-1p) * 100);
}
body[data-theme="deco-emerald"] .rg-outro-inline { height: calc(var(--t-1p) * 100); min-height: 0; }
body[data-theme="deco-emerald"] .rg-screen > .rg-bg { height: calc(var(--t-1p) * 100); }
body[data-theme="deco-emerald"] .rg-screen > .rg-inner,
body[data-theme="deco-emerald"] .rg-location > .rg-dress,
body[data-theme="deco-emerald"] .rg-outro-inline {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  top: 0;
  width: var(--rg-w, 760px);
  max-width: 100vw;
  height: calc(var(--t-1p) * 100);
  margin: 0;
  padding: 0;
  text-align: center;
  z-index: 3;
  background: none;
}
body[data-theme="deco-emerald"] .rg-screen > .rg-inner > *,
body[data-theme="deco-emerald"] .rg-card > *,
body[data-theme="deco-emerald"] .rg-dress-inner > *,
body[data-theme="deco-emerald"] .rg-outro-inline .rg-inner > * {
  position: absolute;
  margin: 0 !important;
}
body[data-theme="deco-emerald"] .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="deco-emerald"] .rg-card::before { content: none; }
body[data-theme="deco-emerald"] .rg-h {
  font-family: var(--rg-display);
  font-style: normal;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .16em;
  line-height: 1.1;
  color: var(--rg-ink);
  white-space: nowrap;
}
body[data-theme="deco-emerald"] .rg-h::before,
body[data-theme="deco-emerald"] .rg-h::after { content: none; }
/* wspólny opis */
body[data-theme="deco-emerald"] .t-opis,
body[data-theme="deco-emerald"] .rg-date .rg-sub,
body[data-theme="deco-emerald"] .rg-location .rg-addr,
body[data-theme="deco-emerald"] .rg-dress .rg-p {
  font-family: var(--rg-text);
  font-style: normal;
  font-weight: 300;
  letter-spacing: 0;
  text-transform: none;
  color: var(--rg-body);
  text-wrap: balance;
}

/* ══ EKRAN 2 — IMIONA, ZAPROSZENIE, DATA, LICZNIK ═══════════════ */
body[data-theme="deco-emerald"] .rg-date .rg-names {
  left: 20%;
  width: 60%;
  top: calc(var(--t-1p) * 32);
  translate: 0 -50%;
  font-family: var(--rg-script);
  font-weight: 400;
  font-size: calc(var(--t-px) * 86);
  line-height: 1.02;
  letter-spacing: 0;
  color: var(--rg-ink);
  overflow-wrap: anywhere;
}
body[data-theme="deco-emerald"] .rg-date .rg-names > span:not(.amp) { display: block; }
body[data-theme="deco-emerald"] .rg-date .rg-names .amp {
  display: block;
  font-size: .42em;
  line-height: 1.25;
  margin: 0;
  color: var(--rg-accent);
}
body[data-theme="deco-emerald"] .rg-date .rg-sub {
  left: 26%;
  width: 48%;
  top: calc(var(--t-1p) * 44.2);
  translate: 0 -50%;
  font-size: max(10.5px, calc(var(--t-px) * 19));
  line-height: 1.4;
}
body[data-theme="deco-emerald"] .rg-date .rg-dateline {
  left: 20%;
  width: 60%;
  top: calc(var(--t-1p) * 51);
  translate: 0 -50%;
  font-family: var(--rg-display);
  font-style: normal;
  font-weight: 400;
  font-size: max(13px, calc(var(--t-px) * 30));
  line-height: 1.2;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--rg-accent);
  text-wrap: balance;
}
body[data-theme="deco-emerald"] .rg-date .rg-count {
  left: 29%;
  width: 42%;
  max-width: none;
  top: calc(var(--t-1p) * 58.4);
  translate: 0 -50%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0;
}
body[data-theme="deco-emerald"] .rg-date .rg-count > div { position: relative; flex: 1 1 0; text-align: center; }
body[data-theme="deco-emerald"] .rg-date .rg-count > div + div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  height: 64%;
  width: 1px;
  background: var(--rg-line);
}
body[data-theme="deco-emerald"] .rg-date .rg-count .num {
  font-family: var(--rg-display);
  font-weight: 400;
  font-style: normal;
  font-size: max(20px, calc(var(--t-px) * 46));
  line-height: 1.1;
  color: var(--rg-ink);
}
body[data-theme="deco-emerald"] .rg-date .rg-count .lbl {
  font-family: var(--rg-text);
  font-weight: 400;
  font-size: max(9.5px, calc(var(--t-px) * 14));
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rg-muted);
}

/* Audyt 14.10 — ekran z imionami jako STOS wyśrodkowany w łuku.
   Każdy element miał własny, sztywny środek, więc dłuższe zaproszenie
   (do 110 znaków) albo długie imię wchodziły na sąsiadów. Teraz imiona,
   zdanie, data i licznik stoją jeden pod drugim ze stałym odstępem,
   a cała grupa trzyma środek łuku. Imiona dopasowują się do szerokości,
   zdanie ma sufit 4 linii i w razie potrzeby się zmniejsza. */
body[data-theme="deco-emerald"] .rg-date > .rg-inner {
  top: calc(var(--t-1p) * 20.5);
  height: calc(var(--t-1p) * 45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--t-1p) * 3.4);
}
body[data-theme="deco-emerald"] .rg-date > .rg-inner > * {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  translate: none !important;
  flex: 0 0 auto;
}
body[data-theme="deco-emerald"] .rg-date .rg-names {
  --rg-fit-w: 1;
  white-space: nowrap;
  overflow-wrap: normal;
  font-size: calc(var(--t-px) * 86 * var(--rg-kw, 1));
}
body[data-theme="deco-emerald"] .rg-date .rg-sub {
  --rg-fit: 1;
  max-height: calc(max(10.5px, calc(var(--t-px) * 19)) * 1.4 * 4.05);
  overflow: hidden;
  font-size: calc(max(10.5px, calc(var(--t-px) * 19)) * var(--rg-k, 1));
}

/* ══ EKRAN 3 — HARMONOGRAM: IKONKA + OPIS, 1–6 PUNKTÓW ═════════ */
body[data-theme="deco-emerald"] .rg-schedule .rg-h {
  left: 10%;
  width: 80%;
  top: calc(var(--t-1p) * 17.6);
  translate: 0 -50%;
  font-size: calc(var(--t-px) * 50);
}
body[data-theme="deco-emerald"] .rg-schedule .rg-timeline {
  --rg-fit: 1;
  --t-ico: 6.8;
  --t-f: max(10.5px, calc(var(--t-px) * 21));
  left: 21%;
  width: 58%;
  top: calc(var(--t-1p) * 22.6);
  height: calc(var(--t-1p) * 52);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: visible;
}
body[data-theme="deco-emerald"] .rg-schedule .rg-timeline::before,
body[data-theme="deco-emerald"] .rg-schedule .rg-timeline::after { content: none; }
body[data-theme="deco-emerald"] .rg-schedule .rg-timeline:has(.rg-item:nth-child(5)) { --t-ico: 5.6; --t-f: max(10px, calc(var(--t-px) * 19.5)); }
body[data-theme="deco-emerald"] .rg-schedule .rg-timeline:has(.rg-item:nth-child(6)) { --t-ico: 4.8; --t-f: max(10px, calc(var(--t-px) * 18.5)); }
body[data-theme="deco-emerald"] .rg-schedule .rg-item {
  position: relative;
  flex: 0 0 auto;  /* bez ściskania — inaczej przepełnienie nie było widać i --rg-k nie malał */
  display: grid;
  grid-template-columns: 28% 1fr;
  align-items: center;
  column-gap: 5%;
  margin: 0;
  padding: calc(var(--t-1p) * 1.1 * var(--rg-k, 1)) 0;
  min-height: 0;
  text-align: left;
}
body[data-theme="deco-emerald"] .rg-schedule .rg-item + .rg-item::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  height: 0;
  border-top: 1px solid var(--rg-line);
  opacity: .85;
}
body[data-theme="deco-emerald"] .rg-schedule .rg-item::after { content: none; }
body[data-theme="deco-emerald"] .rg-schedule .rg-item .ico {
  position: static;
  display: block;
  justify-self: center;
  width: 100%;
  height: calc(var(--t-1p) * var(--t-ico) * var(--rg-k, 1));
  object-fit: contain;
  margin: 0;
  animation: t12-ikona 7s ease-in-out infinite;
}
body[data-theme="deco-emerald"] .rg-schedule .rg-item:nth-child(2n) .ico { animation-delay: -2.3s; }
body[data-theme="deco-emerald"] .rg-schedule .rg-item:nth-child(3n) .ico { animation-delay: -4.6s; }
body[data-theme="deco-emerald"] .rg-schedule .rg-item .pearl { display: none; }
body[data-theme="deco-emerald"] .rg-schedule .rg-item .txt {
  position: static;
  margin: 0;
  padding: 0;
  text-align: left;
}
body[data-theme="deco-emerald"] .rg-schedule .rg-item .time,
body[data-theme="deco-emerald"] .rg-schedule .rg-item .desc,
body[data-theme="deco-emerald"] .rg-schedule .rg-item .godz,
body[data-theme="deco-emerald"] .rg-schedule .rg-item .nazwa {
  display: block;
  margin: 0;
  padding: 0;
  letter-spacing: 0;
  text-transform: none;
  font-style: normal;
}
body[data-theme="deco-emerald"] .rg-schedule .rg-item .godz::after,
body[data-theme="deco-emerald"] .rg-schedule .rg-item .nazwa::before { content: none; }
body[data-theme="deco-emerald"] .rg-schedule .rg-item .godz {
  font-family: var(--rg-text);
  font-weight: 500;
  font-size: calc(var(--t-f) * .88 * var(--rg-k, 1));
  letter-spacing: .14em;
  line-height: 1.3;
  color: var(--rg-accent);
}
body[data-theme="deco-emerald"] .rg-schedule .rg-item .nazwa {
  font-family: var(--rg-display);
  font-style: normal;
  font-weight: 400;
  font-size: calc(var(--t-f) * 1.32 * var(--rg-k, 1));
  line-height: 1.1;
  color: var(--rg-ink);
}
body[data-theme="deco-emerald"] .rg-schedule .rg-item .desc {
  font-family: var(--rg-text);
  font-weight: 300;
  font-size: calc(var(--t-f) * .92 * var(--rg-k, 1));
  line-height: 1.35;
  margin-top: .2em;
  color: var(--rg-body);
}
body[data-theme="deco-emerald"] .rg-schedule .rg-item .desc:empty { display: none; }

/* ══ EKRAN 4 — HISTORIA: ZDJĘCIE W RAMCE PLANSZY ═══════════════
   Zdjęcie pary jest warstwą POD planszą, a w planszy okno jest
   wycięte do przezroczystości — ramka zawsze leży na zdjęciu. */
body[data-theme="deco-emerald"] .rg-story .rg-heart,
body[data-theme="deco-emerald"] .rg-story .rg-postcard,
body[data-theme="deco-emerald"] .rg-story .rg-collage { display: none !important; }
body[data-theme="deco-emerald"] .rg-story .rg-bg img[data-foto],
body[data-theme="deco-emerald"] .rg-story .rg-bg img[src*="04-story/zdjecie"],
body[data-theme="deco-emerald"] .rg-story .rg-bg img[data-warstwa*="04-story/zdjecie"] { object-fit: cover; }
body[data-theme="deco-emerald"] .rg-story .rg-h {
  left: 10%;
  width: 80%;
  top: calc(var(--t-1p) * 60.4);
  translate: 0 -50%;
  font-size: calc(var(--t-px) * 40);
}
/* Delikatna poświata pod opisem — tekst leży między kwiatami. */
body[data-theme="deco-emerald"] .rg-story .rg-inner::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: calc(var(--t-1p) * (72.6 - 19 / 2 - 4));
  height: calc(var(--t-1p) * (19 + 8));
  background: radial-gradient(ellipse at center, rgba(8, 40, 32, .82) 0%, rgba(8, 40, 32, .82) 45%, transparent 72%);
  pointer-events: none;
}
body[data-theme="deco-emerald"] .rg-story .rg-cols {
  --rg-fit: 1;
  left: 24%;
  width: 52%;
  top: calc(var(--t-1p) * 72.6);
  translate: 0 -50%;
  max-height: calc(var(--t-1p) * 19);
  overflow: hidden;
  display: block;
  columns: auto;
  text-align: center;
  font-family: var(--rg-text);
  font-weight: 300;
  font-size: calc(max(10.5px, calc(var(--t-px) * 19)) * var(--rg-k, 1));
  line-height: 1.5;
  color: var(--rg-body);
  text-wrap: balance;
}
body[data-theme="deco-emerald"] .rg-story .rg-cols .rg-p,
body[data-theme="deco-emerald"] .rg-outro-inline .rg-cols .rg-p {
  --rg-fit: 0;
  display: inline;
  position: static;
  margin: 0;
  font: inherit;
  line-height: inherit;
  color: inherit;
}
body[data-theme="deco-emerald"] .rg-story .rg-cols .rg-p:first-child::after,
body[data-theme="deco-emerald"] .rg-outro-inline .rg-cols .rg-p:first-child::after { content: " "; }

/* ══ EKRAN 5 — LOKALIZACJA + DRESS CODE ════════════════════════
   Mapa leży w oknie ramki planszy. Nad mapą idzie nakładka — ta sama
   plansza z wyciętym oknem — więc ramka (także jej ścięte rogi) zawsze
   przykrywa krawędź mapy. Nakładka nie łapie kliknięć. */
body[data-theme="deco-emerald"] .rg-location .rg-loc-cards:empty { display: none; }
body[data-theme="deco-emerald"] .rg-location .rg-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: url("../assets/themes/deco-emerald/05-location/nakladka.webp") center / 100% 100% no-repeat;
  pointer-events: none;
}
body[data-theme="deco-emerald"] .rg-location .rg-map {
  left: 13.2%;
  width: 72.9%;
  top: calc(var(--t-1p) * 12.1);
  height: calc(var(--t-1p) * 31.4);
  aspect-ratio: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  z-index: 1;
  background: rgba(5, 32, 25, .55);
}
body[data-theme="deco-emerald"] .rg-location .rg-h,
body[data-theme="deco-emerald"] .rg-location .rg-addr,
body[data-theme="deco-emerald"] .rg-location .rg-btn { z-index: 3; }
body[data-theme="deco-emerald"] .rg-location .rg-card .rg-h {
  left: 10%;
  width: 80%;
  top: calc(var(--t-1p) * 48.6);
  translate: 0 -50%;
  font-size: calc(var(--t-px) * 50);
}
body[data-theme="deco-emerald"] .rg-location .rg-addr {
  left: 26%;
  width: 48%;
  top: calc(var(--t-1p) * 53.4);
  translate: 0 -50%;
  font-size: max(10.5px, calc(var(--t-px) * 19));
  line-height: 1.35;
}
body[data-theme="deco-emerald"] .rg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.4em;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: var(--rg-accent);
  color: var(--t-btn-txt);
  box-shadow: none;
  font-family: var(--rg-text);
  font-weight: 500;
  font-size: max(10px, calc(var(--t-px) * 18));
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}
body[data-theme="deco-emerald"] .rg-btn:hover { filter: brightness(.92); }
body[data-theme="deco-emerald"] .rg-location .rg-btn {
  left: 50%;
  translate: -50% -50%;
  top: calc(var(--t-1p) * 58.6);
  width: auto;
  min-width: calc(var(--rg-w, 760px) * .22);
  height: calc(var(--t-1p) * 3.6);
}
body[data-theme="deco-emerald"] .rg-location .rg-btn .rg-pin { display: none; }
body[data-theme="deco-emerald"] .rg-location > .rg-dress { pointer-events: none; overflow: visible; }
body[data-theme="deco-emerald"] .rg-location > .rg-dress::before,
body[data-theme="deco-emerald"] .rg-location > .rg-dress::after { content: none; }
body[data-theme="deco-emerald"] .rg-dress-inner {
  position: absolute;
  inset: 0;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  pointer-events: auto;
}
body[data-theme="deco-emerald"] .rg-dress .rg-h {
  left: 10%;
  width: 80%;
  top: calc(var(--t-1p) * 75.2);
  translate: 0 -50%;
  font-size: calc(var(--t-px) * 40);
}
body[data-theme="deco-emerald"] .rg-dress-grid {
  left: 50%;
  translate: -50% -50%;
  top: calc(var(--t-1p) * 80.6);
  width: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(var(--rg-w, 760px) * .03);
}
body[data-theme="deco-emerald"] .rg-dress .rg-swatches { display: flex; flex-direction: row; gap: calc(var(--rg-w, 760px) * .03); }
body[data-theme="deco-emerald"] .rg-dress .rg-sw {
  width: calc(var(--rg-w, 760px) * .062);
  height: calc(var(--rg-w, 760px) * .062);
  border: 2px solid #D9B45F;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
body[data-theme="deco-emerald"] .rg-dress-fig { display: none; }
body[data-theme="deco-emerald"] .rg-dress .rg-p {
  left: 30%;
  width: 40%;
  top: calc(var(--t-1p) * 86.2);
  translate: 0 -50%;
  font-size: max(10px, calc(var(--t-px) * 17));
  line-height: 1.4;
}
body[data-theme="deco-emerald"] #rgLocation { z-index: 3; }

/* ══ EKRAN 6 — RSVP + ZAKOŃCZENIE ══════════════════════════════ */
body[data-theme="deco-emerald"] .rg-rsvp .rg-h {
  left: 20%;
  width: 60%;
  top: calc(var(--t-1p) * 17.2);
  translate: 0 -50%;
  font-size: calc(var(--t-px) * 50);
}
body[data-theme="deco-emerald"] .rg-rsvp .rg-q,
body[data-theme="deco-emerald"] .rg-rsvp .rg-msg-label {
  left: 20%;
  width: 60%;
  translate: 0 -50%;
  font-family: var(--rg-text);
  font-style: normal;
  font-weight: 400;
  font-size: max(9.5px, calc(var(--t-px) * 16));
  line-height: 1.2;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rg-muted);
}
body[data-theme="deco-emerald"] .rg-rsvp .rg-q { top: calc(var(--t-1p) * 21.6); }
body[data-theme="deco-emerald"] .rg-rsvp .rg-msg-label { top: calc(var(--t-1p) * 32.2); }
body[data-theme="deco-emerald"] .rg-rsvp .rg-radios {
  left: 20%;
  width: 60%;
  top: calc(var(--t-1p) * 25.8);
  translate: 0 -50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--t-1p) * .6);
}
body[data-theme="deco-emerald"] .rg-rsvp .rg-radio {
  font-family: var(--rg-text);
  font-style: normal;
  font-weight: 300;
  font-size: max(11px, calc(var(--t-px) * 20));
  line-height: 1.2;
  color: var(--rg-body);
}
body[data-theme="deco-emerald"] .rg-rsvp .rg-radio .dot { border-color: var(--rg-accent); }
body[data-theme="deco-emerald"] .rg-rsvp .rg-sep {
  display: block;
  left: 36%;
  width: 28%;
  top: calc(var(--t-1p) * 29.6);
  height: 0;
  border: 0;
  border-top: 1px solid var(--rg-line);
  background: none;
}
body[data-theme="deco-emerald"] .rg-rsvp .rg-textarea {
  left: 26%;
  width: 48%;
  top: calc(var(--t-1p) * 33.8);
  height: calc(var(--t-1p) * 5.4);
  min-height: 0;
  resize: none;
  background: var(--t-pole);
  border: 1px solid var(--rg-line);
  border-radius: 2px;
  box-shadow: none;
  color: var(--rg-body);
  font-family: var(--rg-text);
  font-weight: 300;
  font-size: max(11px, calc(var(--t-px) * 16));
}
body[data-theme="deco-emerald"] .rg-rsvp .rg-textarea::placeholder { color: var(--rg-muted); opacity: .8; }
body[data-theme="deco-emerald"] .rg-rsvp .rg-btn {
  left: 50%;
  translate: -50% -50%;
  top: calc(var(--t-1p) * 43);
  width: auto;
  min-width: calc(var(--rg-w, 760px) * .26);
  height: calc(var(--t-1p) * 3.8);
}
body[data-theme="deco-emerald"] .rg-rsvp .rg-note {
  --t-notka: max(40%, 17em);
  left: calc((100% - var(--t-notka)) / 2);
  width: var(--t-notka);
  top: calc(var(--t-1p) * 47.6);
  translate: 0 -50%;
  font-family: var(--rg-text);
  font-style: normal;
  font-weight: 300;
  font-size: max(9.5px, calc(var(--t-px) * 14));
  line-height: 1.35;
  color: var(--rg-muted);
  text-wrap: balance;
}
@media (max-width: 359px) {
  body[data-theme="deco-emerald"] .rg-rsvp .rg-note { --t-notka: max(40%, 18.5em); font-size: 9px; }
}
body[data-theme="deco-emerald"] .rg-outro-inline { pointer-events: none; }
body[data-theme="deco-emerald"] .rg-outro-inline .rg-bg,
body[data-theme="deco-emerald"] .rg-outro-inline .rg-outro-card,
body[data-theme="deco-emerald"] .rg-outro-inline .rg-outro-fig { display: none; }
body[data-theme="deco-emerald"] .rg-outro-inline .rg-inner {
  position: absolute;
  inset: 0;
  translate: none;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  pointer-events: auto;
}
body[data-theme="deco-emerald"] .rg-outro-inline .rg-monogram {
  left: 10%;
  width: 80%;
  top: calc(var(--t-1p) * 53.2);
  translate: 0 -50%;
  font-family: var(--rg-script);
  font-weight: 400;
  font-style: normal;
  font-size: calc(var(--t-px) * 46);
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--rg-ink);
}
body[data-theme="deco-emerald"] .rg-outro-inline .rg-monogram .amp { color: var(--rg-accent); font-size: .7em; }
body[data-theme="deco-emerald"] .rg-outro-inline .rg-h {
  left: 10%;
  width: 80%;
  top: calc(var(--t-1p) * 57.4);
  translate: 0 -50%;
  font-size: calc(var(--t-px) * 34);
  letter-spacing: .1em;
  white-space: normal;
  text-wrap: balance;
}
body[data-theme="deco-emerald"] .rg-outro-inline .rg-cols {
  --rg-fit: 1;
  left: 24%;
  width: 52%;
  top: calc(var(--t-1p) * 68.4);
  translate: 0 -50%;
  max-height: calc(var(--t-1p) * 14);
  overflow: hidden;
  display: block;
  columns: auto;
  text-align: center;
  font-family: var(--rg-text);
  font-weight: 300;
  font-size: calc(max(10px, calc(var(--t-px) * 18)) * var(--rg-k, 1));
  line-height: 1.45;
  color: var(--rg-body);
  text-wrap: balance;
}

/* ══ ODSŁONA — DRZWI Z PLANSZY ═════════════════════════════════
   Pod drzwiami leży ta sama plansza co ekran z imionami, a plansza
   odsłony ma wymiar płótna i jest wyrównana do góry — po otwarciu
   drzwi widać dokładnie ekran, który zostaje po zniknięciu nakładki.
   Każde skrzydło obraca się wokół SWOJEJ zewnętrznej krawędzi. */
body[data-theme="deco-emerald"] .plate-reveal { align-items: flex-start; background: #0B3127; }
/* v350: na wysokich telefonach (19,5:9) plansza 3:5 kończyła się na ~77 %
   wysokości, a pod nią był pusty pas koloru tła. Pas wypełnia teraz
   rozmyta dolna część tej samej planszy — wygląda jak jej przedłużenie. */
body[data-theme="deco-emerald"] .plate-bleed { display: block; }
body[data-theme="deco-emerald"] .plate-bleed img { object-position: 50% 100%; filter: blur(26px) saturate(.95); transform: scale(1.12); }
body[data-theme="deco-emerald"] .plate-bleed::after { background: rgba(8,36,29,.40); }
body[data-theme="deco-emerald"] .plate-stage {
  width: min(100vw, var(--rg-w, 760px));
  height: calc(min(100vw, var(--rg-w, 760px)) * 5 / 3);
}
body[data-theme="deco-emerald"] .plate-canvas { perspective: 1800px; perspective-origin: 50% 50%; }
body[data-theme="deco-emerald"] .plate-canvas .plate-layer { object-fit: fill; }
body[data-theme="deco-emerald"] .plate-skrz {
  z-index: 3;
  transform: rotate3d(0, 1, 0, 0deg);
  /* Drzwi otwierają się w swoim tempie (1,35 s) — tego nie ruszamy. */
  transition: transform 1.35s cubic-bezier(.42, .02, .24, 1), opacity .4s linear;
}
body[data-theme="deco-emerald"] .sk-lewo  { transform-origin: 0% 50%; }
body[data-theme="deco-emerald"] .sk-prawo { transform-origin: 100% 50%; }
body[data-theme="deco-emerald"] .plate-reveal.opening .sk-lewo {
  transform: rotateY(105deg);
  opacity: 0;
  transition-delay: 0s, 1.1s;
}
body[data-theme="deco-emerald"] .plate-reveal.opening .sk-prawo {
  transform: rotateY(-105deg);
  opacity: 0;
  transition-delay: .12s, 1.22s;
}
body[data-theme="deco-emerald"] .plate-reveal.opening .plate-layer { transform: none; opacity: 1; }
/* v350: skrócone tylko to, co jest PO otwarciu. Wcześniej nakładka stała
   jeszcze ~1 s po otwartych drzwiach i znikała skokiem po 2,4 s. Teraz
   zaczyna gasnąć, gdy skrzydła są prawie otwarte, i znika razem z końcem
   ich ruchu (~1,45 s) — zaproszenie pojawia się od razu. */
body[data-theme="deco-emerald"] .plate-reveal.opening { opacity: 0; transition: opacity .4s ease 1.05s; }
body[data-theme="deco-emerald"] .plate-reveal.opened { opacity: 0; }
body[data-theme="deco-emerald"] .plate-reveal.opening .plate-cta { animation: none; opacity: 0; transition: opacity .3s; }
body[data-theme="deco-emerald"] .plate-cta {
  --t-h: calc(min(100vw, var(--rg-w, 760px)) * 5 / 3);
  bottom: auto;
  top: calc(var(--t-h) * 0.88);
  z-index: 6;
  padding: .8em 1.8em;
  background: rgba(8, 36, 29, .9);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
  font-family: var(--rg-text);
  font-weight: 500;
  font-size: max(11px, calc(var(--t-h) * .0128));
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #E7C977;
  opacity: 1;
  white-space: nowrap;
  /* podstawowe pulsowanie schodziło do 34 % krycia — na drzwiach napis
     prawie znikał; tu pulsuje tylko lekko */
  animation: t12-cta 3.4s ease-in-out infinite;
}
@keyframes t12-cta { 0%, 100% { opacity: 1; } 50% { opacity: .78; } }
@media (prefers-reduced-motion: reduce) {
  body[data-theme="deco-emerald"] .plate-skrz,
  body[data-theme="deco-emerald"] .plate-reveal.opening .plate-skrz { transition: opacity .3s linear; transform: none; }
}

/* ══ TELEFON ══════════════════════════════════════════════════
   Przy podłodze stopnia pisma (10–10,5 px) opisy są względnie większe
   niż na planszy — dostają szersze pola. */
@media (max-width: 480px) {
  body[data-theme="deco-emerald"] .rg-date .rg-sub { left: 22%; width: 56%; }
  body[data-theme="deco-emerald"] .rg-story .rg-cols { left: 20%; width: 60%; font-size: calc(10px * var(--rg-k, 1)); }
  body[data-theme="deco-emerald"] .rg-dress .rg-p { left: 24%; width: 52%; }
  body[data-theme="deco-emerald"] .rg-outro-inline .rg-cols { left: 22%; width: 56%; }
  body[data-theme="deco-emerald"] .rg-schedule .rg-timeline { left: 18%; width: 64%; }
}

/* ══ ELEMENTY RUCHOME (14.10) ═══════════════════════════════════
   Osobne ilustracje z Canvy (wycięte z tła), NAD planszą i POD tekstem:
     • złoto-zielone liście palmy zwisają z górnych narożników
       i kołyszą się od zaczepu (prawy liść to lustro lewego),
     • gałązki magnolii w dolnych narożnikach falują od łodygi,
     • złoty pył powoli unosi się nad całym ekranem i migocze,
     • po złotym wachlarzu ramy co kilka sekund przechodzi blask. */
@keyframes t12-palma {
  0%, 100% { rotate: -2.5deg; }
  50%      { rotate: 3deg; }
}
@keyframes t12-magnolia {
  0%, 100% { rotate: -1.8deg; translate: 0 0; }
  50%      { rotate: 2deg;    translate: 0 calc(var(--t-1p) * -.4); }
}
body[data-theme="deco-emerald"] .rg-bg img[src*="ruch/palma"] {
  transform-origin: 0% 0%;
  animation: t12-palma 8s ease-in-out infinite;
}
body[data-theme="deco-emerald"] .rg-bg img[src*="ruch/palma"][style^="left:8"] {
  scale: -1 1;
  /* lustro względem środka liścia — przy osi na prawej krawędzi
     odbicie wyrzucało liść poza kadr */
  transform-origin: 50% 0%;
  animation-duration: 9s;
  animation-delay: -3.5s;
}
body[data-theme="deco-emerald"] .rg-bg img[src*="ruch/magnolia"] {
  transform-origin: 40% 100%;
  animation: t12-magnolia 7s ease-in-out infinite -1.5s;
}
body[data-theme="deco-emerald"] .rg-bg img[src*="ruch/magnolia"][style^="left:7"],
body[data-theme="deco-emerald"] .rg-bg img[src*="ruch/magnolia"][style^="left:8"] {
  scale: -1 1;
  transform-origin: 50% 100%;
  animation-delay: -4.5s;
}
/* Złoty pył: drobne punkty w trzech warstwach o różnej skali,
   przesuwane w górę z różną prędkością (paralaksa pyłu). */
@keyframes t12-pyl {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: 0 -900px, 0 -600px, 0 -400px; }
}
@keyframes t12-migot {
  0%, 100% { opacity: .55; }
  50%      { opacity: .95; }
}
body[data-theme="deco-emerald"] .rg-screen > .rg-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(246, 214, 130, .95) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 70% 60%, rgba(246, 214, 130, .8) 0 1px, transparent 2px),
    radial-gradient(circle at 45% 80%, rgba(255, 236, 170, .9) 0 1.8px, transparent 3px);
  background-size: 230px 300px, 170px 200px, 310px 400px;
  mix-blend-mode: screen;
  animation: t12-pyl 60s linear infinite, t12-migot 4.5s ease-in-out infinite;
}
/* Blask po złotym wachlarzu (góra ramy, x 34–66 %, y 2–20 %). */
@keyframes t12-blask {
  0%, 62%  { background-position: -160% 0; }
  100%     { background-position: 260% 0; }
}
body[data-theme="deco-emerald"] :is(.rg-date, .rg-schedule, .rg-story, .rg-rsvp) > .rg-bg::before {
  content: "";
  position: absolute;
  left: 30%;
  width: 40%;
  top: 1.5%;
  height: 19%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 240, 190, .55) 50%, transparent 65%) no-repeat;
  background-size: 60% 100%;
  mix-blend-mode: overlay;
  -webkit-mask-image: radial-gradient(ellipse 55% 60% at 50% 45%, #000 40%, transparent 75%);
          mask-image: radial-gradient(ellipse 55% 60% at 50% 45%, #000 40%, transparent 75%);
  animation: t12-blask 7s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  body[data-theme="deco-emerald"] .rg-bg img[src*="ruch/"],
  body[data-theme="deco-emerald"] .rg-screen > .rg-bg::after,
  body[data-theme="deco-emerald"] .rg-screen > .rg-bg::before { animation: none !important; }
}
