/* =====================================================
   WyslijMmie — e-kartki i pocztówki
   Kreator ([wyslijmnie_ekartki]) + strona kartki (/kartka/{kod}/).
   Kolory interfejsu biorą tokeny motywu, gdy są (z zapasowymi wartościami).
   ===================================================== */

@font-face {
  font-family: 'Caveat'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(fonts/caveat-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Caveat'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(fonts/caveat-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.ec-creator, .ec-page {
  --ec-ink: var(--text, #14214f);
  --ec-muted: var(--muted, #5c6185);
  --ec-line: var(--line, #e3e1ef);
  --ec-line-2: var(--line-strong, #cfcce3);
  --ec-card-bg: var(--card, #fff);
  --ec-soft: var(--lav, #eceaf7);
  --ec-coral: var(--coral, #f24868);
  --ec-coral-ink: var(--coral-ink, #c8264b);
  --ec-cta: var(--cta-bg, #14214f);
  --ec-cta-fg: var(--cta-fg, #fff);
  --ec-hand: 'Caveat', 'Segoe Print', 'Comic Sans MS', cursive;
  --ec-serif: var(--font-text, 'Literata', Georgia, serif);
  --ec-sans: var(--font-ui, 'Onest', system-ui, sans-serif);
}

/* ── Ilustracje (klasy z ecards-designs.php) ───────── */
.ec-art { display: block; width: 100%; height: auto; overflow: visible; }
.ec-art .c1 { fill: var(--ec-c1); } .ec-art .c2 { fill: var(--ec-c2); } .ec-art .c3 { fill: var(--ec-c3); }
.ec-art .c4 { fill: var(--ec-c4); } .ec-art .ck { fill: var(--ec-ck); } .ec-art .cw { fill: var(--ec-cw); }
.ec-art .cl { fill: var(--ec-cl, #d8d4cc); }
.ec-art .sk  { fill: none; stroke: var(--ec-ck); }
.ec-art .sk1 { fill: none; stroke: var(--ec-c1); }
.ec-art .sk2 { fill: none; stroke: var(--ec-c2); }
.ec-art .sk3 { fill: none; stroke: var(--ec-c3); }
.ec-art .c4s { stroke: var(--ec-c4); }
.ec-art .cwS { fill: none; stroke: var(--ec-cw); }

/* ── Przód kartki ─────────────────────────────────── */
.ec-front {
  position: relative; height: 100%; container-type: inline-size;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 9% 8% 6%; background: var(--ec-bg); color: var(--ec-fg); overflow: hidden;
}
.ec-front::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: radial-gradient(currentColor 1px, transparent 1.6px);
  background-size: 14px 14px;
}
.ec-front__art { position: relative; flex: 1; width: 82%; display: flex; align-items: center; justify-content: center; min-height: 0; }
.ec-front__art .ec-art { max-height: 100%; }
.ec-front__headline {
  position: relative; margin: 4% 0 0; text-align: center; text-wrap: balance;
  font-family: var(--ec-serif); font-style: italic; font-weight: 600;
  font-size: clamp(12px, 9.5cqi, 40px); line-height: 1.12; letter-spacing: -.01em;
}
.ec-front__brand {
  position: relative; margin-top: 4%;
  font-family: var(--ec-sans); font-weight: 600; font-size: clamp(6px, 2.6cqi, 11px); letter-spacing: .08em; opacity: .5;
}

/* znaczek pocztowy (perforacja) */
.ec-stamp-paper {
  --r: 3px; display: block; background: #fff; padding: 5px;
  -webkit-mask:
    radial-gradient(var(--r), #0000 97%, #000) round calc(-1.5 * var(--r)) calc(-1.5 * var(--r)) / calc(3 * var(--r)) calc(3 * var(--r)),
    linear-gradient(#000 0 0) no-repeat 50% / calc(100% - 3 * var(--r)) calc(100% - 3 * var(--r));
          mask:
    radial-gradient(var(--r), #0000 97%, #000) round calc(-1.5 * var(--r)) calc(-1.5 * var(--r)) / calc(3 * var(--r)) calc(3 * var(--r)),
    linear-gradient(#000 0 0) no-repeat 50% / calc(100% - 3 * var(--r)) calc(100% - 3 * var(--r));
}
.ec-back__stamp-art { display: flex; align-items: center; justify-content: center; height: 100%; padding: 8%; background: var(--ec-bg); }

/* ══════════════════════════════════════════════════
   KARTKA W KOPERCIE
   ══════════════════════════════════════════════════ */
.ec-scene { display: flex; flex-direction: column; align-items: center; gap: 26px; width: 100%; }
.ec-scene--kartka { --w: min(88vw, 480px); }
.ec-envelope { position: relative; width: var(--w); aspect-ratio: 1.55; margin-top: calc(var(--w) * .42); perspective: 1400px; }
.ec-envelope__back {
  position: absolute; inset: 0; border-radius: 10px;
  background: linear-gradient(#dcd8ee, #ebe8f6); box-shadow: 0 30px 60px -20px rgba(0,0,0,.55);
}
.ec-card {
  position: absolute; z-index: 2; left: 26%; width: 48%; top: 4%; aspect-ratio: 3 / 4;
  border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.18);
  transition: transform .9s cubic-bezier(.3,.8,.25,1);
}
.ec-card__front { height: 100%; border-radius: inherit; overflow: hidden; }
.ec-card__inside { display: none; }
.ec-envelope__front {
  position: absolute; inset: 0; z-index: 3; border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #f8f6fd, #efecf9);
  clip-path: polygon(0 34%, 50% 70%, 100% 34%, 100% 100%, 0 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 8% 7%;
}
.ec-envelope__front::after {   /* pasek „air mail” */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px;
  background: repeating-linear-gradient(-45deg, #f24868 0 9px, #fff 9px 14px, #14214f 14px 23px, #fff 23px 28px);
}
.ec-envelope__to { margin: 0; font-family: var(--ec-hand); font-weight: 700; font-size: clamp(22px, 7vw, 34px); color: #14214f; line-height: 1; }
.ec-envelope__to span { font-weight: 500; font-size: .7em; color: #5c6185; margin-right: 4px; }
.ec-envelope__from { margin: 6px 0 0; font-family: var(--ec-hand); font-size: clamp(16px, 4.6vw, 22px); color: #5c6185; }
.ec-envelope__stamp { position: absolute; right: 6%; top: 52%; width: 15%; aspect-ratio: 5 / 6; transform: rotate(6deg); filter: drop-shadow(0 2px 3px rgba(0,0,0,.2)); }
.ec-envelope__stamp .ec-stamp-paper { height: 100%; padding: 4px; }
.ec-envelope__flap {
  position: absolute; left: 0; right: 0; top: 0; height: 64%; z-index: 4;
  background: linear-gradient(180deg, #e6e2f4, #f1eef9);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0; transform: rotateX(0deg);
  transition: transform .7s cubic-bezier(.5,0,.3,1), z-index 0s .35s;
}
.ec-envelope__flap::after {   /* lakowa pieczęć */
  content: "♥"; position: absolute; left: 50%; bottom: -1px; transform: translate(-50%, 0);
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #ff7d97, #d92b50 70%); color: #ffd9e1; font-size: 20px;
  box-shadow: 0 3px 8px rgba(120,0,30,.35);
}
.ec-scene--kartka[data-state="opening"] .ec-envelope__flap,
.ec-scene--kartka[data-state="out"] .ec-envelope__flap { transform: rotateX(180deg); z-index: 1; }
.ec-scene--kartka[data-state="opening"] .ec-envelope__flap::after,
.ec-scene--kartka[data-state="out"] .ec-envelope__flap::after { opacity: 0; transition: opacity .2s; }
.ec-scene--kartka[data-state="out"] .ec-card { transform: translateY(-78%) rotate(-2deg); }

/* otwarta kartka: przód + środek */
.ec-scene--kartka[data-state="open"] .ec-envelope { display: none; }
.ec-opened {
  display: grid; grid-template-columns: 1fr 1fr; width: min(92vw, 860px);
  filter: drop-shadow(0 30px 50px rgba(0,0,0,.45)); perspective: 1600px;
}
.ec-opened .ec-card__front { aspect-ratio: 3 / 4; height: auto; border-radius: 6px 0 0 6px; }
.ec-opened .ec-card__inside {
  display: block; position: relative; background: #fffdf9; border-radius: 0 6px 6px 0;
  transform-origin: 0 50%; animation: ec-unfold 1s cubic-bezier(.3,.8,.25,1) both .1s;
}
.ec-opened .ec-card__inside::before {     /* zgięcie */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 18px;
  background: linear-gradient(90deg, rgba(0,0,0,.09), transparent);
}
@keyframes ec-unfold { from { transform: rotateY(-120deg); } to { transform: none; } }
.ec-inside { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 9% 9% 8%; color: #2a2f4a; }
.ec-inside__to { margin: 0 0 4%; font-family: var(--ec-hand); font-weight: 700; font-size: clamp(22px, 3.4vw, 34px); color: var(--ec-c1, #c8264b); }
.ec-inside__msg { flex: 1; min-height: 0; overflow: hidden; font-family: var(--ec-serif); font-size: clamp(14px, 1.9vw, 21px); line-height: 1.6; }
.ec-inside__from { margin: 4% 0 0; align-self: flex-end; font-family: var(--ec-hand); font-weight: 700; font-size: clamp(22px, 3.2vw, 32px); color: #14214f; }
.ec-inside__from::before { content: "— "; }

/* ══════════════════════════════════════════════════
   POCZTÓWKA
   ══════════════════════════════════════════════════ */
.ec-postcard { width: min(92vw, 680px); aspect-ratio: 3 / 2; perspective: 1800px; }
.ec-postcard__inner {
  position: relative; width: 100%; height: 100%; transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(.3,.75,.2,1);
}
.ec-postcard[data-side="back"] .ec-postcard__inner { transform: rotateY(180deg); }
.ec-postcard__face {
  position: absolute; inset: 0; border-radius: 8px; overflow: hidden;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  box-shadow: 0 30px 60px -18px rgba(0,0,0,.55);
}
.ec-postcard__face--back { transform: rotateY(180deg); background: #fffdf8; }
.ec-postcard .ec-front { flex-direction: row; justify-content: center; gap: 4%; padding: 6% 7%; }
.ec-postcard .ec-front__art { flex: 0 0 46%; width: auto; height: 100%; }
.ec-postcard .ec-front__headline { flex: 1; margin: 0; text-align: left; font-size: clamp(16px, 6.6cqi, 48px); }
.ec-postcard .ec-front__brand { position: absolute; right: 4%; bottom: 5%; margin: 0; }

.ec-back { position: absolute; inset: 0; display: grid; grid-template-columns: 1.25fr 1fr; padding: 6% 5% 6% 6%; color: #2a2f4a; container-type: inline-size; }
.ec-back__msg { display: flex; flex-direction: column; min-height: 0; padding-right: 6%; border-right: 1.5px solid #ded9cf; }
.ec-back__text { flex: 1; min-height: 0; overflow: hidden; margin: 0; font-family: var(--ec-hand); font-weight: 600; font-size: clamp(15px, 4.6cqi, 30px); line-height: 1.25; color: #233064; }
.ec-back__from { margin: 3% 0 0; align-self: flex-end; font-family: var(--ec-hand); font-weight: 700; font-size: clamp(16px, 4.8cqi, 30px); color: var(--ec-c1, #c8264b); }
.ec-back__from::before { content: "— "; }
.ec-back__side { position: relative; display: flex; flex-direction: column; padding-left: 8%; }
.ec-back__stamp { align-self: flex-end; width: 34%; aspect-ratio: 5 / 6; transform: rotate(4deg); filter: drop-shadow(0 2px 3px rgba(0,0,0,.18)); }
.ec-back__stamp .ec-stamp-paper { height: 100%; }
.ec-postmark { position: absolute; right: 22%; top: 18%; width: 52%; color: #3a4170; opacity: .55; transform: rotate(-12deg); }
.ec-back__addr { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.ec-back__addr span { font-family: var(--ec-sans); font-size: clamp(9px, 2.6cqi, 13px); color: #8a8ead; }
.ec-back__addr strong {
  font-family: var(--ec-hand); font-weight: 700; font-size: clamp(17px, 5.2cqi, 32px); color: #14214f;
  padding-bottom: 4px; border-bottom: 1.5px solid #ded9cf;
}
.ec-back__addr::after { content: ""; display: block; height: 1.5px; margin-top: 16%; background: #ded9cf; }

/* ── przyciski (wspólne) ──────────────────────────── */
.ec-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--ec-sans); font-size: 15px; font-weight: 700; line-height: 1; text-decoration: none;
  transition: transform .15s, background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.ec-btn:hover { text-decoration: none; }
.ec-btn:active { transform: translateY(1px); }
.ec-btn--primary { background: var(--ec-cta); color: var(--ec-cta-fg); box-shadow: 0 10px 24px -12px rgba(242,72,104,.7); }
.ec-btn--primary:hover { filter: brightness(1.06); color: var(--ec-cta-fg); }
.ec-btn--ghost { background: transparent; color: var(--ec-ink); border: 1.5px solid var(--ec-line-2); }
.ec-btn--ghost:hover { border-color: var(--ec-ink); color: var(--ec-ink); }
.ec-btn--soft { background: var(--ec-soft); color: var(--ec-ink); min-height: 40px; padding: 0 16px; font-size: 14px; }
.ec-btn--soft:hover { background: var(--ec-line); }
.ec-btn--lg { min-height: 56px; padding: 0 32px; font-size: 17px; }
.ec-btn:disabled { opacity: .6; cursor: wait; }

/* ══════════════════════════════════════════════════
   STRONA KARTKI DLA ODBIORCY
   ══════════════════════════════════════════════════ */
body.wm-ecard-page {
  margin: 0; padding: 0 !important; min-height: 100vh; color: #eceaf6;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(242,72,104,.28), transparent 70%),
    radial-gradient(50% 45% at 90% 20%, rgba(110,120,255,.25), transparent 70%),
    radial-gradient(70% 60% at 50% 110%, rgba(255,154,98,.18), transparent 70%),
    #0e1638;
}
.wm-ecard-page .mobile-bottom-nav, .wm-ecard-page #mysticky-wrap { display: none !important; }
.ec-page {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: max(26px, env(safe-area-inset-top)) 16px max(30px, env(safe-area-inset-bottom));
  font-family: var(--ec-sans); text-align: center; overflow-x: hidden;
}
.ec-page__logo img { display: block; height: 34px; width: auto; }
.ec-page__lead { margin: 6px 0 0; font-size: clamp(20px, 4.6vw, 30px); font-weight: 800; letter-spacing: -.01em; color: #fff; }
.ec-page .ec-btn--ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.ec-page .ec-btn--ghost:hover { border-color: #fff; color: #fff; }
.ec-page .ec-btn--primary { background: linear-gradient(100deg, #ff7a93, #ff9e7a); color: #0e1638; }
.ec-page__after { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; animation: ec-fade .6s ease both; }
.ec-page__after[hidden] { display: none; }
.ec-page__foot { margin-top: auto; padding-top: 24px; font-size: 13px; color: rgba(236,234,246,.6); }
.ec-page__foot a { color: #ff9db1; }
.ec-missing { max-width: 460px; padding: 40px 0; }
.ec-missing h1 { font-size: 28px; margin: 0 0 10px; color: #fff; }
.ec-missing p { color: rgba(236,234,246,.8); margin: 0 0 22px; line-height: 1.6; }
@keyframes ec-fade { from { opacity: 0; transform: translateY(10px); } }

/* ══════════════════════════════════════════════════
   KREATOR
   ══════════════════════════════════════════════════ */
.ec-creator {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 36px; align-items: start;
  font-family: var(--ec-sans); color: var(--ec-ink);
}
.ec-form { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.ec-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.ec-step__title { display: flex; align-items: center; gap: 12px; padding: 0; margin: 0 0 14px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.ec-step__num {
  width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0;
  background: var(--ec-coral); color: #fff; font-size: 15px;
}
.ec-formats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ec-format {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center;
  padding: 16px; border-radius: 16px; border: 1.5px solid var(--ec-line); background: var(--ec-card-bg); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.ec-format input { position: absolute; opacity: 0; pointer-events: none; }
.ec-format__icon { grid-row: 1 / span 2; font-size: 28px; }
.ec-format__name { font-weight: 700; font-size: 16px; }
.ec-format__desc { font-size: 13px; color: var(--ec-muted); line-height: 1.45; }
.ec-format:hover { border-color: var(--ec-line-2); }
.ec-format:has(input:checked) { border-color: var(--ec-coral); box-shadow: 0 0 0 3px rgba(242,72,104,.15); }
.ec-format:has(input:focus-visible) { outline: 2.5px solid var(--ec-coral); outline-offset: 2px; }

.ec-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.ec-design { position: relative; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.ec-design input { position: absolute; opacity: 0; pointer-events: none; }
.ec-design__thumb {
  aspect-ratio: 3 / 4; border-radius: 10px; background: var(--ec-bg); padding: 14%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--ec-line); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.ec-design__name { font-size: 13px; font-weight: 600; text-align: center; color: var(--ec-muted); }
.ec-design:hover .ec-design__thumb { transform: translateY(-2px); box-shadow: 0 10px 20px -12px rgba(20,33,79,.35); }
.ec-design:has(input:checked) .ec-design__thumb { border-color: var(--ec-coral); box-shadow: 0 0 0 3px rgba(242,72,104,.25); }
.ec-design:has(input:checked) .ec-design__name { color: var(--ec-ink); }
.ec-design:has(input:focus-visible) .ec-design__thumb { outline: 2.5px solid var(--ec-coral); outline-offset: 2px; }
.ec-design__now { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; background: linear-gradient(100deg, #ff7a93, #ffa07a); color: #0c1333; font-size: 10.5px; font-weight: 800; white-space: nowrap; box-shadow: 0 4px 10px -4px rgba(242,72,104,.6); }

.ec-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ec-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ec-field--wide { grid-column: 1 / -1; }
.ec-field__label { font-size: 14px; font-weight: 700; }
.ec-field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ec-field__count { font-size: 12.5px; color: var(--ec-muted); font-variant-numeric: tabular-nums; }
.ec-field input, .ec-field textarea, .ec-mail input, .ec-result__link input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--ec-line-2);
  background: var(--paper, #f5f4fa); color: var(--ec-ink); font-family: var(--ec-sans); font-size: 15.5px;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.ec-field textarea { resize: vertical; min-height: 140px; line-height: 1.6; font-family: var(--ec-serif); font-size: 16.5px; }
.ec-field input:focus, .ec-field textarea:focus, .ec-mail input:focus, .ec-result__link input:focus {
  outline: none; border-color: var(--ec-coral); box-shadow: 0 0 0 4px rgba(242,72,104,.14); background: var(--ec-card-bg);
}
.ec-field__tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.ec-field__hint { font-size: 13px; color: var(--ec-muted); }
.ec-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ec-submit { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ec-submit__note { margin: 0; font-size: 13.5px; color: var(--ec-muted); }
.ec-msg { margin: 0; font-size: 14px; font-weight: 600; min-height: 1.2em; }
.ec-msg.is-err { color: var(--ec-coral-ink); }
.ec-msg.is-ok { color: var(--success, #1f7a4d); }

.ec-preview { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 12px; }
.admin-bar .ec-preview { top: 128px; }
.ec-preview__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ec-preview__label { font-size: 13px; font-weight: 700; color: var(--ec-muted); }
.ec-preview__tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--ec-soft); }
.ec-preview__tabs button {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  font: 700 13px var(--ec-sans); color: var(--ec-muted);
}
.ec-preview__tabs button.is-active { background: var(--ec-card-bg); color: var(--ec-ink); box-shadow: 0 1px 3px rgba(20,33,79,.12); }
.ec-preview__stage {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 360px; padding: 22px; border-radius: 20px;
  background: radial-gradient(70% 60% at 30% 20%, rgba(242,72,104,.18), transparent 70%), #0e1638;
}
.ec-preview__stage > * { width: 100%; }
.ec-prev-card { aspect-ratio: 3 / 4; max-width: 300px; margin: 0 auto; border-radius: 6px; overflow: hidden; box-shadow: 0 20px 40px -14px rgba(0,0,0,.6); position: relative; }
.ec-prev-card .ec-inside { position: absolute; }
.ec-prev-card--inside { background: #fffdf9; }
.ec-prev-post { aspect-ratio: 3 / 2; border-radius: 6px; overflow: hidden; box-shadow: 0 20px 40px -14px rgba(0,0,0,.6); position: relative; }
.ec-prev-post--back { background: #fffdf8; }
.ec-prev-post .ec-front { flex-direction: row; justify-content: center; gap: 4%; padding: 6% 7%; }
.ec-prev-post .ec-front__art { flex: 0 0 46%; width: auto; height: 100%; }
.ec-prev-post .ec-front__headline { flex: 1; margin: 0; text-align: left; font-size: clamp(12px, 6.6cqi, 40px); }
.ec-prev-post .ec-front__brand { position: absolute; right: 4%; bottom: 5%; margin: 0; }

.ec-result {
  grid-column: 1 / -1; padding: 30px; border-radius: 22px; color: #eceaf6;
  background: radial-gradient(60% 80% at 10% 0%, rgba(242,72,104,.25), transparent 70%), #0e1638;
}
.ec-result[hidden] { display: none; }
.ec-result__eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #ff9db1; }
.ec-result__title { margin: 0 0 18px; font-size: clamp(24px, 3vw, 32px); font-weight: 800; color: #fff; letter-spacing: -.01em; }
.ec-result__link { display: flex; gap: 10px; flex-wrap: wrap; }
.ec-result__link input { flex: 1; min-width: 220px; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.ec-result .ec-btn--primary { background: linear-gradient(100deg, #ff7a93, #ff9e7a); color: #0e1638; }
.ec-result .ec-btn--ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.ec-share { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ec-share__btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: #fff;
  font: 700 14.5px var(--ec-sans); text-decoration: none;
}
.ec-share__btn:hover { background: rgba(255,255,255,.14); color: #fff; text-decoration: none; }
.ec-share__btn[hidden] { display: none; }
.ec-mail { margin-top: 16px; }
.ec-mail[hidden] { display: none; }
.ec-mail .ec-field__label { display: block; margin-bottom: 6px; color: #fff; }
.ec-mail input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.ec-result .ec-msg.is-ok { color: #6ee7a8; }
.ec-result .ec-msg.is-err { color: #ff9db1; }
.ec-result__more { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.ec-creator.is-done .ec-form, .ec-creator.is-done .ec-preview { display: none; }

/* zalogowany / gość */
.ec-check { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.ec-check input { width: 18px; height: 18px; accent-color: var(--ec-coral); }
.ec-perks {
  padding: 22px 24px; border-radius: 18px; border: 1.5px dashed var(--ec-line-2);
  background: linear-gradient(135deg, rgba(242,72,104,.06), rgba(110,120,255,.05));
}
.ec-perks__title { margin: 0 0 10px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.ec-perks__list { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.ec-perks__list li { position: relative; padding-left: 26px; font-size: 14.5px; line-height: 1.5; color: var(--ec-muted); }
.ec-perks__list li strong { color: var(--ec-ink); }
.ec-perks__list li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--ec-coral); color: #fff;
}
.ec-perks__cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* panel: „Moje kartki” */
.ec-mine__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ec-mine__head h3 { margin: 0 !important; }
.ec-mine { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ec-mine__item {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--ec-line); background: var(--ec-card-bg);
}
.ec-mine__thumb { aspect-ratio: 3 / 4; border-radius: 8px; background: var(--ec-bg); padding: 10%; display: flex; align-items: center; }
.ec-mine__body p { margin: 0 !important; }
.ec-mine__title { font-weight: 700; color: var(--ec-ink) !important; }
.ec-mine__meta { font-size: 13px; color: var(--ec-muted); }
.ec-mine__status { font-size: 13px; font-weight: 600; color: var(--ec-muted) !important; }
.ec-mine__status.is-opened { color: var(--success, #1f7a4d) !important; }
.ec-mine__actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ec-mine__empty { padding: 26px; border-radius: 14px; border: 1.5px dashed var(--ec-line-2); text-align: center; }
@media (max-width: 640px) {
  .ec-mine__item { grid-template-columns: 52px minmax(0, 1fr); }
  .ec-mine__actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ── responsywność ───────────────────────────────── */
@media (max-width: 960px) {
  .ec-creator { grid-template-columns: 1fr; }
  .ec-preview { position: static; order: -1; }
  .ec-preview__stage { min-height: 280px; }
  .ec-prev-card { max-width: 220px; }
}
@media (max-width: 640px) {
  .ec-formats, .ec-fields { grid-template-columns: 1fr; }
  .ec-designs { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .ec-opened { grid-template-columns: 1fr; width: min(92vw, 400px); }
  .ec-opened .ec-card__front { border-radius: 6px 6px 0 0; }
  .ec-opened .ec-card__inside { aspect-ratio: 3 / 3.4; border-radius: 0 0 6px 6px; transform-origin: 50% 0; animation-name: ec-unfold-v; }
  .ec-opened .ec-card__inside::before { width: auto; height: 14px; right: 0; background: linear-gradient(180deg, rgba(0,0,0,.08), transparent); }
  .ec-inside__msg { font-size: 15.5px; }
  .ec-postcard { aspect-ratio: 3 / 4; width: min(88vw, 400px); }
  .ec-postcard .ec-front { flex-direction: column; gap: 0; padding: 9% 8% 6%; }
  .ec-postcard .ec-front__art { flex: 1; width: 82%; height: auto; }
  .ec-postcard .ec-front__headline { flex: 0 0 auto; margin-top: 4%; text-align: center; font-size: clamp(16px, 9.5cqi, 40px); }
  .ec-postcard .ec-front__brand { position: relative; right: auto; bottom: auto; margin-top: 4%; }
  .ec-postcard .ec-back__text { font-size: clamp(18px, 7cqi, 30px); }
  .ec-result { padding: 22px 18px; }
  .ec-back { grid-template-columns: 1fr; grid-template-rows: auto 1fr; padding: 5%; gap: 4%; }
  .ec-back__msg { order: 2; border-right: 0; padding-right: 0; }
  .ec-back__side { order: 1; flex-direction: row; align-items: center; justify-content: space-between; padding-left: 0; }
  .ec-back__stamp { width: 14%; order: 2; }
  .ec-postmark { display: none; }
  .ec-back__addr { margin: 0; flex-direction: row; align-items: baseline; gap: 6px; }
  .ec-back__addr::after { display: none; }
}
@keyframes ec-unfold-v { from { transform: rotateX(110deg); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .ec-card, .ec-envelope__flap, .ec-postcard__inner { transition: none !important; }
  .ec-opened .ec-card__inside { animation: none !important; }
}

/* ══════════════════════════════════════════════════
   v1.1 — WŁASNY WYGLĄD: pisma, ramki, zdjęcie, desenie, naklejki
   ══════════════════════════════════════════════════ */
.ec-front {
  --ec-hand: 'Caveat', 'Segoe Print', 'Comic Sans MS', cursive;
  --ec-serif: var(--font-text, 'Literata', Georgia, serif);
  --ec-sans: var(--font-ui, 'Onest', system-ui, sans-serif);
}
.ec-design__thumb--front .ec-frame--znaczek, .ec-pick .ec-frame--znaczek { --r: 3px; }
.ec-front--own::before { display: none; }
.ec-front--noart { justify-content: flex-end; }
.ec-front--noart .ec-front__headline { margin-top: auto; }
.ec-front--photo .ec-front__headline, .ec-front--photo .ec-front__brand { text-shadow: 0 2px 10px rgba(0,0,0,.55), 0 1px 2px rgba(0,0,0,.4); }
.ec-front--photo::before {
  content: ""; display: block; position: absolute; left: 0; right: 0; bottom: 0; top: auto; height: 45%; opacity: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.45));
}
.ec-font--odreczny .ec-front__headline { font-family: var(--ec-hand); font-style: normal; font-weight: 700; font-size: clamp(14px, 12cqi, 52px); line-height: 1.02; }
.ec-font--nowoczesny .ec-front__headline { font-family: var(--ec-sans); font-style: normal; font-weight: 800; letter-spacing: -.02em; font-size: clamp(12px, 9cqi, 38px); }
.ec-front__headline { color: var(--ec-fg); }

/* ramki */
.ec-frame--biala::after, .ec-frame--zlota::after, .ec-frame--lotnicza::after { content: ""; position: absolute; pointer-events: none; z-index: 2; }
.ec-frame--biala::after { inset: 0; box-shadow: inset 0 0 0 4.5cqi #fffdf8, inset 0 0 0 calc(4.5cqi + 1px) rgba(0,0,0,.08); }
.ec-frame--zlota::after { inset: 3.4cqi; border: .9cqi solid #c99a2e; outline: .45cqi solid #e3c06a; outline-offset: 1.1cqi; border-radius: 1cqi; }
.ec-frame--lotnicza::after {
  inset: 0; border: 3cqi solid transparent;
  border-image: repeating-linear-gradient(-45deg, #f24868 0 6px, #fff 6px 10px, #14214f 10px 16px, #fff 16px 20px) 30;
}
.ec-frame--znaczek {
  --r: 5px;
  -webkit-mask:
    radial-gradient(var(--r), #0000 97%, #000) round calc(-1.5 * var(--r)) calc(-1.5 * var(--r)) / calc(3 * var(--r)) calc(3 * var(--r)),
    linear-gradient(#000 0 0) no-repeat 50% / calc(100% - 3 * var(--r)) calc(100% - 3 * var(--r));
          mask:
    radial-gradient(var(--r), #0000 97%, #000) round calc(-1.5 * var(--r)) calc(-1.5 * var(--r)) / calc(3 * var(--r)) calc(3 * var(--r)),
    linear-gradient(#000 0 0) no-repeat 50% / calc(100% - 3 * var(--r)) calc(100% - 3 * var(--r));
}

/* naklejki */
.ec-stickers { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ec-sticker {
  position: absolute; transform: translate(-50%, -50%); line-height: 1; user-select: none; -webkit-user-select: none;
  font-size: calc(var(--s, 1) * 13cqi); filter: drop-shadow(0 2px 3px rgba(0,0,0,.25));
}
.ec-stickers.is-editable .ec-sticker { pointer-events: auto; cursor: grab; touch-action: none; border-radius: 8px; outline: none; }
.ec-stickers.is-editable .ec-sticker:active { cursor: grabbing; }
.ec-stickers.is-editable .ec-sticker.is-sel, .ec-stickers.is-editable .ec-sticker:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ec-coral); }

/* znaczek w podglądzie środka kartki */
.ec-prev-card__stamp { position: absolute; right: 6%; top: 5%; width: 16%; aspect-ratio: 5 / 6; transform: rotate(6deg); filter: drop-shadow(0 2px 3px rgba(0,0,0,.2)); }
.ec-prev-card__stamp .ec-stamp-paper { height: 100%; padding: 3px; }
.ec-prev-card--inside .ec-inside { padding-top: 22%; }

/* ── kreator: krok „Dopasuj wygląd” ───────────────── */
.ec-step__opt { font-size: 13px; font-weight: 600; color: var(--ec-muted); }
.ec-own { border: 1.5px solid var(--ec-line); border-radius: 18px; background: var(--ec-card-bg); }
.ec-own[open] { border-color: var(--ec-line-2); }
.ec-own__sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; font-weight: 700; font-size: 15.5px; }
.ec-own__sum::-webkit-details-marker { display: none; }
.ec-own__sum::after { content: "▾"; margin-left: 4px; color: var(--ec-muted); transition: transform .2s; }
.ec-own[open] .ec-own__sum::after { transform: rotate(180deg); }
.ec-own__sum-t { flex: 1; }
.ec-own__state { padding: 4px 10px; border-radius: 999px; background: var(--ec-soft); color: var(--ec-muted); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.ec-own__state.is-on { background: linear-gradient(100deg, #ff7a93, #ffa07a); color: #0c1333; }
.ec-own__body { display: grid; gap: 20px; padding: 18px 18px 20px; border-top: 1px solid var(--ec-line); }
.ec-own__group { display: grid; gap: 10px; min-width: 0; }
.ec-own__group--row { grid-template-columns: 1fr 1fr; gap: 18px; }
.ec-own__label { margin: 0; font-size: 14px; font-weight: 800; }
.ec-own__label span { font-weight: 500; color: var(--ec-muted); font-size: 13px; margin-left: 4px; }
.ec-own__hint { margin: 0; font-size: 13px; color: var(--ec-muted); line-height: 1.5; }
.ec-own__panel[hidden] { display: none; }
.ec-own__panel { display: grid; gap: 10px; }

.ec-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.ec-seg__opt, .ec-chip { position: relative; cursor: pointer; }
.ec-seg__opt input, .ec-chip input, .ec-sw input[type="radio"], .ec-pick input { position: absolute; opacity: 0; pointer-events: none; }
.ec-seg__opt span, .ec-chip span {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--ec-line-2); background: var(--ec-card-bg); font-size: 14px; font-weight: 700; color: var(--ec-ink);
  transition: border-color .15s, background-color .15s, color .15s;
}
.ec-seg__opt:hover span, .ec-chip:hover span { border-color: var(--ec-ink); }
.ec-seg__opt input:checked + span, .ec-chip input:checked + span { background: var(--ec-ink); border-color: var(--ec-ink); color: var(--ec-card-bg); }
.ec-seg__opt input:focus-visible + span, .ec-chip input:focus-visible + span, .ec-sw input:focus-visible + span { outline: 2.5px solid var(--ec-coral); outline-offset: 2px; }
.ec-pick input:focus-visible ~ .ec-pick__art, .ec-pick input:focus-visible ~ .ec-stamp-paper, .ec-pick input:focus-visible + span { outline: 2.5px solid var(--ec-coral); outline-offset: 2px; }
.ec-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ec-chip--font-odreczny span { font-family: var(--ec-hand); font-size: 19px; font-weight: 700; }
.ec-chip--font-elegancki span { font-family: var(--ec-serif); font-style: italic; }
.ec-chip--font-nowoczesny span { font-family: var(--ec-sans); font-weight: 800; }

.ec-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.ec-sw { position: relative; cursor: pointer; }
.ec-sw > span {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--sw); border: 1.5px solid rgba(20,33,79,.18); box-shadow: inset 0 0 0 2px rgba(255,255,255,.6);
  font-size: 13px; font-weight: 800; color: var(--ec-muted); transition: transform .15s, box-shadow .15s;
}
.ec-sw:hover > span { transform: scale(1.08); }
.ec-sw input:checked + span { box-shadow: 0 0 0 2px var(--ec-card-bg), 0 0 0 4.5px var(--ec-coral); }
.ec-sw--auto > span { background: conic-gradient(#f24868, #ffb938, #39b07a, #4c7bf3, #f24868); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.ec-sw--pick input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.ec-sw--pick > span { background: conic-gradient(from 90deg, #ff6b6b, #ffd166, #6ee7a8, #6ec7ff, #b39bff, #ff6b6b); color: #fff; font-size: 18px; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.ec-swatches--wide { gap: 10px; }
.ec-sw--grad { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ec-sw--grad > span { width: 64px; height: 44px; border-radius: 12px; }
.ec-sw--grad em { font-style: normal; font-size: 11.5px; color: var(--ec-muted); max-width: 72px; text-align: center; line-height: 1.2; }

.ec-picker { display: grid; grid-auto-flow: column; grid-auto-columns: 62px; gap: 8px; overflow-x: auto; padding: 6px 4px 12px; scrollbar-width: thin; }
.ec-pick { position: relative; cursor: pointer; display: flex; }
.ec-pick__art {
  display: flex; align-items: center; justify-content: center; width: 62px; aspect-ratio: 3 / 4; padding: 8px; border-radius: 10px;
  background: var(--ec-bg); border: 1.5px solid var(--ec-line); transition: border-color .15s, transform .15s;
}
.ec-pick:hover .ec-pick__art { transform: translateY(-2px); }
.ec-pick input:checked ~ .ec-pick__art { border-color: var(--ec-coral); box-shadow: 0 0 0 3px rgba(242,72,104,.25); }
.ec-pick--txt span {
  display: grid; place-items: center; width: 62px; aspect-ratio: 3 / 4; padding: 6px; border-radius: 10px; text-align: center;
  border: 1.5px dashed var(--ec-line-2); font-size: 12px; font-weight: 700; color: var(--ec-muted); line-height: 1.2;
}
.ec-pick--txt input:checked + span { border-style: solid; border-color: var(--ec-coral); color: var(--ec-ink); box-shadow: 0 0 0 3px rgba(242,72,104,.25); }
.ec-picker--stamps { grid-auto-columns: 54px; }
.ec-pick--stamp { width: 54px; aspect-ratio: 5 / 6; filter: drop-shadow(0 2px 3px rgba(20,33,79,.22)); transition: transform .15s; }
.ec-pick--stamp .ec-stamp-paper { width: 100%; height: 100%; padding: 4px; }
.ec-pick--stamp:hover { transform: rotate(-4deg) scale(1.05); }
.ec-pick--stamp input:checked ~ .ec-stamp-paper { background: #f24868; }
.ec-picker--stamps .ec-pick--txt span { width: 54px; aspect-ratio: 5 / 6; }

.ec-photo-drop {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; cursor: pointer;
  border: 2px dashed var(--ec-line-2); background: var(--ec-soft); font-weight: 700; font-size: 15px;
  transition: border-color .15s, background-color .15s;
}
.ec-photo-drop:hover { border-color: var(--ec-coral); }
.ec-photo-drop input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.ec-photo-drop__ico { font-size: 28px; }
.ec-locked { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 18px; border-radius: 16px; background: linear-gradient(135deg, rgba(242,72,104,.08), rgba(110,120,255,.07)); }
.ec-locked p { flex-basis: 100%; margin: 0 0 4px; font-size: 14.5px; line-height: 1.5; color: var(--ec-muted); }
.ec-locked strong { color: var(--ec-ink); }

.ec-stk-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.ec-stk {
  width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--ec-line); background: var(--ec-card-bg);
  font-size: 24px; line-height: 1; cursor: pointer; transition: transform .15s, border-color .15s;
}
.ec-stk:hover { transform: translateY(-2px) rotate(-6deg); border-color: var(--ec-line-2); }
.ec-stk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ec-muted); }
.ec-stk-tools[hidden] { display: none; }
.ec-stk-tools .ec-btn { min-height: 36px; padding: 0 14px; }
.ec-preview__hint { margin: 0; font-size: 13px; color: var(--ec-muted); text-align: center; }
.ec-preview__hint[hidden] { display: none; }

/* galeria społeczności w kroku 2 */
.ec-sub { margin: 22px 0 12px; font-size: 15px; font-weight: 800; }
.ec-sub span { font-weight: 500; font-size: 13px; color: var(--ec-muted); margin-left: 6px; }
.ec-design__thumb--front { padding: 0; overflow: hidden; }
.ec-design__thumb--front .ec-front { width: 100%; height: 100%; }
.ec-design__by { margin-top: -4px; font-size: 11.5px; text-align: center; color: var(--ec-muted); }

/* zgłoszenie do galerii */
.ec-share-design { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--ec-soft); }
.ec-share-design[hidden], .ec-share-design__fields[hidden], [data-share-photo][hidden] { display: none; }
.ec-share-design__fields { display: grid; gap: 10px; }
.ec-result__note { margin: -8px 0 16px; padding: 10px 14px; border-radius: 12px; background: rgba(110,231,168,.12); color: #b6f5d2; font-size: 14.5px; }
.ec-result__note[hidden] { display: none; }

/* zgłaszanie kartki (strona odbiorcy) */
.ec-report { width: min(92vw, 520px); margin-top: 12px; text-align: left; font-size: 14px; color: rgba(236,234,246,.75); }
.ec-report summary { cursor: pointer; text-align: center; }
.ec-report summary span { color: #ff9db1; text-decoration: underline; }
.ec-report__form { display: grid; gap: 12px; margin-top: 14px; padding: 18px; border-radius: 16px; background: rgba(255,255,255,.06); }
.ec-report fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.ec-report legend { font-weight: 700; color: #fff; margin-bottom: 6px; }
.ec-report__l { display: grid; gap: 6px; }
.ec-report textarea, .ec-report input[type="email"] { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font: inherit; }
.ec-report .ec-btn { justify-self: start; min-height: 40px; }

@media (max-width: 640px) {
  .ec-own__group--row { grid-template-columns: 1fr; }
  .ec-own__body { padding: 14px 14px 18px; }
  .ec-own__sum { padding: 14px; }
  .ec-own__state { display: none; }
}

/* ── v1.1.2: znaczki jak prawdziwe + stempel na kopercie ── */
.ec-stamp-paper { container-type: inline-size; background: #fffdf8; }
.ec-stamp { display: flex; flex-direction: column; height: 100%; background: var(--ec-bg); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.ec-stamp .ec-back__stamp-art { flex: 1; min-height: 0; height: auto; padding: 10% 12% 2%; background: transparent; }
.ec-stamp__txt {
  display: flex; justify-content: space-between; align-items: baseline; gap: 3%; padding: 0 7% 7%;
  color: var(--ec-fg); font-family: var(--ec-sans, 'Onest', system-ui, sans-serif); line-height: 1; white-space: nowrap;
}
.ec-stamp__txt b { font-size: 9.5cqi; font-weight: 800; letter-spacing: .04em; }
.ec-stamp__txt i { font-size: 10.5cqi; font-style: normal; font-weight: 800; }
.ec-envelope__stamp { width: 17%; aspect-ratio: 4 / 5; }
.ec-envelope__postmark { position: absolute; right: 13%; top: 56%; width: 22%; color: #3a4170; opacity: .5; transform: rotate(-10deg); pointer-events: none; z-index: 1; }
.ec-envelope__postmark .ec-postmark { display: block !important; position: static; width: 100%; transform: none; opacity: 1; }
.ec-back__stamp { aspect-ratio: 4 / 5; }
.ec-pick--stamp { aspect-ratio: 4 / 5; }

/* ── wybór wzoru, ilustracji i znaczka: wszystko widać od razu (bez przewijania w bok) ── */
.ec-picker { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); overflow: visible; padding: 4px 2px; }
.ec-picker--stamps { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.ec-pick__art, .ec-pick--txt span, .ec-picker--stamps .ec-pick--txt span { width: 100%; }
.ec-pick--stamp { width: 100%; }
@media (max-width: 640px) {
  .ec-designs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 7px; }
  .ec-design { gap: 4px; }
  .ec-design__thumb { padding: 12%; border-radius: 8px; }
  .ec-design__name { font-size: 11px; line-height: 1.2; }
  .ec-design__now { top: -6px; padding: 1px 5px; font-size: 8.5px; }
  .ec-design__by { font-size: 10px; }
  .ec-picker { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .ec-picker--stamps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ec-pick--txt span { font-size: 10px; padding: 3px; }
  .ec-stk-pick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
  .ec-stk { width: 100%; height: auto; aspect-ratio: 1; font-size: 21px; }
  .ec-swatches { gap: 7px; }
  .ec-sw > span { width: 34px; height: 34px; }
}
@media (max-width: 380px) {
  .ec-designs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ec-picker, .ec-picker--stamps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
