:root {
  --bg: #e9efec; --paper: #fff; --ink: #14302c; --mute: #5b6f6a; --line: #cbd8d3;
  --gold: #f0a63a; --focus: #0b6bcb;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body.ed-page { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--body); }

.ed-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .9rem 1.1rem; }
.ed-logo { font: 700 1.5rem var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.ed-top-note { font-size: .8rem; color: var(--mute); text-align: right; }

.ed-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; max-width: 1180px; margin: 0 auto; padding: 0 1rem 3rem; }
/* Phone: preview first, then "Generar" right under it, then the steps. Desktop: form left, sticky preview right. */
.ed-form { display: flex; flex-direction: column; }
.ed-final { order: -1; }
@media (min-width: 900px) {
  .ed-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 3rem; align-items: start; padding: 0 2rem 4rem; }
  .ed-side { position: sticky; top: 1rem; order: 2; }
  .ed-final { order: 0; }
}

/* form */
.ed-step { background: var(--paper); border-radius: 18px; padding: 1.25rem 1.1rem; margin-bottom: 1rem; display: grid; gap: .9rem; box-shadow: 0 1px 0 var(--line); }
.ed-step h2 { margin: 0; font: 700 1.3rem var(--display); letter-spacing: -.01em; display: flex; align-items: center; gap: .6rem; }
.ed-n { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--ink); color: var(--gold); font-size: .95rem; }
label, .ed-label { display: grid; gap: .3rem; font-weight: 600; font-size: .92rem; }
label small { font-weight: 400; color: var(--mute); }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: #f6f9f8; width: 100%;
  border: 1.5px solid var(--line); border-radius: 10px; padding: .7rem .8rem; min-height: 46px;
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ed-wa { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem; } /* country column as wide as "GT +502" needs */
.ed-wa select { width: auto; padding-right: 2rem; }

/* event cards */
.ed-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 112px), 1fr)); gap: .6rem; } /* columns fit the space: fixed 5 x 1fr overflowed narrow form columns */
.ed-event {
  font: 600 1rem var(--display); padding: 1.1rem .5rem; min-height: 64px; border-radius: 14px; cursor: pointer;
  background: #f6f9f8; color: var(--ink); border: 1.5px solid var(--line);
}
.ed-event[aria-checked="true"] { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 3px 0 var(--gold); }

/* themes */
.ed-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 88px), 1fr)); gap: .7rem; }
.ed-theme { position: relative; display: grid; gap: .3rem; padding: .35rem; border-radius: 12px; border: 2px solid transparent; background: none; cursor: pointer; font: inherit; color: var(--ink); text-align: center; }
.ed-theme[aria-checked="true"] { border-color: var(--ink); background: #f6f9f8; }
.ed-thumb { aspect-ratio: 3 / 4; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); position: relative; pointer-events: none; }
/* Rendered at 1/.3 of the thumb size, scaled to .3: always fills the thumb whatever the grid width. */
.ed-thumb-in { width: calc(100% / .3); height: calc(100% / .3); transform: scale(.3); transform-origin: 0 0; position: absolute; left: 0; top: 0; contain: paint; }
.ed-thumb-in .inv-envelope, .ed-thumb-in .inv-brand { display: none; }
.ed-theme-name { font-size: .82rem; font-weight: 600; }
.ed-lock { position: absolute; top: .6rem; right: .6rem; font-size: .68rem; font-weight: 600; background: var(--ink); color: var(--gold); border-radius: 99px; padding: .1rem .5rem; }
.ed-theme:not(.is-locked) .ed-lock { display: none; }

/* code + buttons + results */
.ed-code { display: grid; gap: .4rem; border-top: 1px dashed var(--line); padding-top: 1rem; }
.ed-code-row { display: flex; gap: .5rem; }
.ed-btn {
  font: 600 1rem var(--body); min-height: 46px; padding: .6rem 1.1rem; border-radius: 10px; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
}
.ed-btn:hover { background: #f1f6f4; }
.ed-btn--main { background: var(--ink); color: #fff; }
.ed-btn--main:hover { background: #1f4a44; }
.ed-nav .ed-btn--main { min-height: 54px; font-size: 1.1rem; }
.ed-msg { margin: 0; font-size: .88rem; color: var(--mute); }
.ed-msg:empty { display: none; }
.ed-msg--ok { color: #1c6b3a; font-weight: 600; }
.ed-msg--err { color: #b3261e; font-weight: 600; }
.ed-card { background: #fff7e6; border: 1.5px solid var(--gold); border-radius: 14px; padding: 1rem; display: grid; gap: .7rem; }
.ed-card[hidden] { display: none; }
.ed-card h3 { margin: 0; font: 700 1.15rem var(--display); }
.ed-card p { margin: 0; }
.ed-actions { display: grid; gap: .5rem; }
@media (min-width: 600px) { .ed-actions { grid-template-columns: repeat(2, 1fr); } }

/* phone preview */
.ed-side-label { margin: 0 0 .6rem; text-align: center; font-size: .85rem; color: var(--mute); font-weight: 600; }
.ed-phone { width: 320px; max-width: 100%; height: min(620px, 78svh); margin: 0 auto; padding: 12px; background: #0f1d1b; border-radius: 40px; box-shadow: 0 18px 40px rgba(20, 48, 44, .25); }
.ed-screen {
  width: 100%; height: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; border-radius: 28px; background: #fff;
  transform: translateZ(0); /* contains the fixed watermark inside the phone */
  position: relative; margin: 0; padding: 0;
}
.ed-screen .inv > :not(.inv-deco), .ed-thumb .inv > :not(.inv-deco) { animation: none; } /* rebuilt per keystroke */
.ed-phone .ed-screen.inv-root { display: block; min-height: 0; padding: 0; } /* invite.css: .inv-root is flex and padded on wide screens */
/* invite.css turns the card into a floating rounded box on wide viewports; inside the phone and thumbs it must fill. */
.ed-screen .inv, .ed-thumb .inv { min-height: 100% !important; border-radius: 0; box-shadow: none; }
.ed-thumb .inv { height: 100%; }
.ed-screen .inv-brand { position: sticky; bottom: 10px; margin: 0 10px 10px; padding-inline: 10px; font-size: .64rem; } /* invite.css sizes it by viewport; the preview is narrower */

@media (prefers-reduced-motion: no-preference) {
  .ed-event, .ed-theme, .ed-btn { transition: background .15s, box-shadow .15s, border-color .15s; }
}

/* step 2 extras */
.ed-link { justify-self: start; min-height: 44px; padding: 0 .2rem; background: none; border: 0; font: 600 .95rem var(--body); color: var(--focus); text-decoration: underline; cursor: pointer; }
.ed-check { display: flex; align-items: center; gap: .7rem; min-height: 44px; cursor: pointer; }
.ed-check input { width: 1.4rem; height: 1.4rem; min-height: 0; flex: none; accent-color: var(--ink); }
.ed-sub { display: grid; gap: .9rem; padding: .9rem; border-left: 3px solid var(--gold); background: #f6f9f8; border-radius: 0 10px 10px 0; }
.ed-sub[hidden] { display: none; }
.ed-more { border-top: 1px dashed var(--line); padding-top: .4rem; }
.ed-more summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.ed-more summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ed-more-in { display: grid; gap: .9rem; padding-top: .5rem; }
input[aria-invalid="true"] { border-color: #b3261e; }
.ed-msg:empty { display: none; }

/* guest links */
.ed-guests { display: grid; gap: .7rem; border-top: 1px dashed var(--gold); padding-top: .9rem; }
.ed-guests > div { display: grid; gap: .7rem; }
.ed-guests [hidden] { display: none; }
.ed-lock-ico { vertical-align: -3px; margin-right: .2rem; }
.ed-glist { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ed-gitem { display: grid; gap: .4rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .6rem; }
.ed-gname { font-weight: 600; overflow-wrap: anywhere; }
@media (min-width: 600px) { .ed-gitem { grid-template-columns: 1fr auto; align-items: center; } }

/* premium customizer */
.ed-custom { display: grid; gap: .9rem; margin: 0; padding: 1rem; border: 1.5px dashed var(--gold); border-radius: 14px; }
.ed-custom legend { padding: 0 .4rem; font: 700 1.05rem var(--display); }
.ed-lock--inline { position: static; vertical-align: 2px; margin-left: .3rem; }
.ed-color[hidden] { display: none; }
.ed-color input { padding: .2rem; height: 46px; cursor: pointer; }
@media (min-width: 600px) { .ed-custom { grid-template-columns: 1fr 1fr; } .ed-custom > .ed-check, .ed-custom > .ed-color { grid-column: 1 / -1; } }

/* map pin (Waze) */
.ed-pin { display: grid; gap: .35rem; justify-items: start; margin-top: -.3rem; }
.ed-pin-btn { gap: .5rem; }
.ed-pin-btn::before { content: ''; width: 1.1em; height: 1.1em; background: currentColor; -webkit-mask: var(--pin) center / contain no-repeat; mask: var(--pin) center / contain no-repeat;
  --pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5 7 13 7 13s7-8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E"); }
.ed-pin [hidden] { display: none; }
.ed-map-dlg { width: min(640px, calc(100vw - 1.5rem)); max-height: calc(100svh - 1.5rem); padding: 1.1rem; border: 0; border-radius: 20px; color: var(--ink); box-shadow: 0 24px 60px rgba(20, 48, 44, .35); }
.ed-map-dlg::backdrop { background: rgba(15, 29, 27, .55); }
.ed-map-dlg[open] { display: grid; gap: .7rem; }
.ed-map-dlg h3 { margin: 0; font: 700 1.3rem var(--display); }
.ed-map-help { margin: 0; font-size: .92rem; color: var(--mute); }
.ed-map-dlg { overflow-y: auto; }
.ed-map { height: min(42svh, 420px); border-radius: 14px; border: 1.5px solid var(--line); z-index: 0; }
.ed-map-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; align-items: center; }
.ed-map-actions .ed-link { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 600px) { .ed-map { height: min(52svh, 420px); } .ed-map-actions { grid-template-columns: 1fr auto auto; } .ed-map-actions .ed-link { grid-column: auto; } }
.ed-pin-icon { background: none; border: 0; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35)); }

/* ===== App polish ===== */
:root { --ink2: #1f4a44; --soft: 0 1px 2px rgba(20,48,44,.06), 0 10px 30px -12px rgba(20,48,44,.18); }
body.ed-page { background: radial-gradient(120% 60% at 90% -10%, #fbe9c8 0, transparent 55%), radial-gradient(90% 50% at -10% 0, #d3ece3 0, transparent 60%), var(--bg); background-attachment: fixed; }
.ed-top { max-width: 1180px; margin: 0 auto; align-items: center; }
.ed-logo { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; }
.ed-logo svg { width: 30px; height: 30px; }
.ed-top-note { max-width: 15rem; line-height: 1.3; }
.ed-step { border-radius: 24px; padding: 1.4rem 1.2rem; box-shadow: var(--soft); border: 1px solid rgba(203,216,211,.7); }
.ed-step h2 { font-size: 1.35rem; }
.ed-n { width: 2.1rem; height: 2.1rem; background: linear-gradient(135deg, var(--ink), var(--ink2)); box-shadow: 0 0 0 3px #fbe9c8; font-weight: 700; }
input, select, textarea { border-radius: 14px; background: #f6f9f8; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); background: #fff; box-shadow: 0 0 0 4px rgba(11,107,203,.14); }
.ed-btn { border-radius: 14px; }
.ed-btn:active { transform: scale(.97); }
.ed-card { border-radius: 20px; background: linear-gradient(160deg, #fff9ec, #fff3d6); box-shadow: var(--soft); }
.ed-sub { border-radius: 0 14px 14px 0; }
.ed-custom { border-radius: 18px; background: #fffdf7; }
.ed-hint { display: none; }

/* event cards with icon + check */
.ed-event { position: relative; display: grid; justify-items: center; align-content: center; gap: .25rem; border-radius: 18px; padding: .8rem .4rem; min-height: 84px; line-height: 1.15; }
.ed-ev-ico { width: 30px; height: 30px; color: var(--ink); --ico-accent: var(--gold); }
.ed-event[aria-checked="true"] .ed-ev-ico { color: #fff; }
.ed-event[aria-checked="true"] { background: linear-gradient(160deg, var(--ink), var(--ink2)); box-shadow: 0 8px 18px -6px rgba(20,48,44,.55), 0 0 0 3px var(--gold); }
.ed-event[aria-checked="true"]::after { content: "✓"; position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--ink); font: 700 .8rem/22px var(--body); text-align: center; }

/* theme cards */
.ed-theme { border-radius: 16px; padding: .4rem; background: #f6f9f8; border-color: transparent; }
.ed-theme:hover { box-shadow: 0 10px 22px -10px rgba(20,48,44,.4); }
.ed-theme[aria-checked="true"] { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px var(--gold), 0 10px 22px -10px rgba(20,48,44,.45); }
.ed-theme[aria-checked="true"]::after { content: "✓"; position: absolute; top: .1rem; left: .1rem; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--gold); font: 700 .85rem/24px var(--body); text-align: center; z-index: 1; }
.ed-thumb { border-radius: 11px; }
.ed-lock { top: .75rem; right: .75rem; z-index: 1; }

/* Generar */
.ed-nav .ed-btn--main { position: relative; overflow: hidden; border: 0; flex: 1; border-radius: 18px; min-height: 58px; font-size: 1.15rem; background: linear-gradient(135deg, var(--ink), var(--ink2)); box-shadow: 0 10px 24px -8px rgba(20,48,44,.6); }
.ed-nav #gen::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent); transform: translateX(-120%); }
.ed-final { background: none; box-shadow: none; border: 0; padding: 0; }

/* toast */
.ed-toast { position: fixed; left: 50%; bottom: 1.2rem; z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: .75rem 1.2rem; border-radius: 99px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.ed-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.ed-side-label { background: #fff; display: block; width: max-content; max-width: 100%; margin: 0 auto .7rem; padding: .3rem .9rem; border-radius: 99px; box-shadow: var(--soft); }
.ed-phone { box-shadow: 0 24px 50px -12px rgba(20,48,44,.45); }

@media (max-width: 899px) {
  .ed-phone { height: min(430px, 54svh); width: 270px; border-radius: 34px; padding: 10px; }
  .ed-screen { border-radius: 24px; }
  .ed-hint { display: block; margin: .6rem 0 0; text-align: center; font-weight: 600; color: var(--ink); font-size: .92rem; }
  .ed-top-note { display: none; }
}
.ed-code-row input { flex: 1 1 auto; min-width: 0; }
@media (max-width: 330px) { .ed-code-row { flex-wrap: wrap; } .ed-code-row input, .ed-code-row .ed-btn { flex: 1 1 100%; } }

@media (prefers-reduced-motion: no-preference) {
  .ed-event, .ed-theme, .ed-btn { transition: background .15s, box-shadow .2s, border-color .15s, transform .2s; }
  .ed-theme:hover { transform: translateY(-3px); }
  .ed-theme:active { transform: scale(.96); }
  input, select, textarea { transition: box-shadow .2s, border-color .2s, background .2s; }
  .ed-event[aria-checked="true"] { animation: ed-pop .35s cubic-bezier(.3,1.6,.5,1); }
  .ed-event[aria-checked="true"]::after, .ed-theme[aria-checked="true"]::after { animation: ed-pop .35s cubic-bezier(.3,1.8,.5,1); }
  .ed-nav #gen::after { animation: ed-shine 3.2s ease-in-out infinite; }
  .ed-nav #gen:hover { transform: translateY(-2px); }
  .ed-card:not([hidden]) { animation: ed-rise .4s cubic-bezier(.2,1.2,.4,1); }
  #result:not([hidden]) { animation: ed-celebrate .55s cubic-bezier(.2,1.5,.4,1); }
  .ed-toast { transition: opacity .2s, transform .25s; }
  .ed-more[open] .ed-more-in { animation: ed-rise .3s ease-out; }
}
@keyframes ed-pop { 0% { transform: scale(.88); } 100% { transform: scale(1); } }
@keyframes ed-shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(380%); } }
@keyframes ed-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ed-celebrate { 0% { opacity: 0; transform: translateY(18px) scale(.94); } 60% { opacity: 1; transform: scale(1.02); } 100% { transform: none; } }

/* ===== Wizard ===== */
.ed-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ed-step[hidden] { display: none; }
.ed-step h2[tabindex="-1"]:focus { outline: none; }
.ed-final:not(:has(.ed-card:not([hidden]))) { display: none; }
.ed-prog { order: -2; display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-bottom: 1rem; }
.ed-prog button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 56px; padding: .4rem .2rem; border-radius: 16px; cursor: pointer;
  font: 600 .88rem var(--body); color: var(--mute); background: var(--paper); border: 1.5px solid var(--line); }
.ed-pn { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #e4ecea; color: var(--ink); font-size: .85rem; }
.ed-prog button.is-done { color: var(--ink); }
.ed-prog button.is-done .ed-pn { background: var(--gold); }
.ed-prog button[aria-current="step"] { color: #fff; background: linear-gradient(160deg, var(--ink), var(--ink2)); border-color: var(--ink); }
.ed-prog button[aria-current="step"] .ed-pn { background: var(--gold); color: var(--ink); }
.ed-nav { display: flex; gap: .6rem; margin-bottom: 1rem; }
.ed-nav [hidden] { display: none; }
.ed-nav .ed-btn:not(.ed-btn--main) { flex: 0 0 auto; min-height: 54px; }
@media (max-width: 899px) {
  .ed-nav { position: sticky; bottom: 0; z-index: 20; margin: 0 -1rem; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(20,48,44,.3); }
  .ed-layout { padding-bottom: 0; }
  input, select, textarea { scroll-margin-bottom: 110px; }
  .ed-toast { bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}

/* free vs premium */
.ed-cmp { width: 100%; border-collapse: collapse; font-size: .88rem; background: #fff; border-radius: 12px; overflow: hidden; }
.ed-cmp caption { text-align: left; font-weight: 600; padding-bottom: .3rem; }
.ed-cmp th, .ed-cmp td { padding: .45rem .5rem; border-top: 1px solid var(--line); }
.ed-cmp thead th { border-top: 0; background: #f6f9f8; font-weight: 700; text-align: center; }
.ed-cmp thead th:last-child { background: var(--ink); color: var(--gold); }
.ed-cmp tbody th { text-align: left; font-weight: 600; }
.ed-cmp td { text-align: center; width: 5.2rem; color: var(--ink); }
.ed-cmp td:last-child { background: #fff8e6; color: #1c6b3a; font-weight: 700; }
.ed-buy-actions { display: grid; gap: .5rem; }
@media (max-width: 360px) { .ed-cmp { font-size: .82rem; } .ed-cmp td { width: 4.2rem; } }

/* ===== Toque hecho a mano (mismo lenguaje que la portada) ===== */
:root { --hand: "Caveat", "Segoe Print", cursive; --flor: #c22e4d; }
body.ed-page { background: #e6efea url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .07 0 0 0 0 .14 0 0 0 0 .12 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* papel: tarjetas como notas, sin degradados */
.ed-step:not(.ed-final) { position: relative; background: #fffdf8; border: 0; border-radius: 6px 20px 10px 22px; box-shadow: 0 1px 0 rgba(20,48,44,.08), 0 18px 30px -22px rgba(20,48,44,.5); }
.ed-step:not(.ed-final)::before { content: ""; position: absolute; top: -9px; left: 26%; width: 84px; height: 20px; translate: -50% 0; rotate: -2deg; background: rgba(245,179,24,.55); border-radius: 2px; }
.ed-step[data-step="2"]::before { background: rgba(127,182,217,.6); rotate: 3deg; }
.ed-step[data-step="3"]::before { background: rgba(226,61,94,.4); }
.ed-n { width: auto; height: auto; background: none; box-shadow: none; color: var(--flor); font: 700 2.3rem/.8 var(--hand); rotate: -6deg; }
/* pasos de arriba: número a mano, subrayado en el actual */
.ed-prog button, .ed-prog button[aria-current="step"] { background: transparent; border: 0; color: var(--mute); min-height: 52px; font-size: .9rem; }
.ed-pn, .ed-prog button.is-done .ed-pn, .ed-prog button[aria-current="step"] .ed-pn { width: auto; height: auto; background: none; color: inherit; font: 700 1.7rem/.9 var(--hand); }
.ed-prog button.is-done { color: var(--ink); }
.ed-prog button.is-done .ed-pn { color: #187a42; }
.ed-prog button[aria-current="step"] { color: var(--ink); font-weight: 700; }
.ed-prog button[aria-current="step"] .ed-pn { color: var(--flor); }
.ed-prog button { position: relative; }
.ed-prog button[aria-current="step"]::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 2px; height: 9px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9c30-6 62-7 96-4 30 3 62 2 98-4' fill='none' stroke='%23f5b318' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
/* eventos con ilustración */
.ed-events { grid-template-columns: repeat(auto-fill, minmax(min(100%, 118px), 1fr)); gap: .7rem; }
.ed-event { background: #fff; border: 1.5px solid #e7e0d2; border-radius: 16px; padding: .5rem .4rem .7rem; min-height: 0; font-weight: 600; }
.ed-ev-ico { width: 64px; height: 64px; border-radius: 12px; }
.ed-event:hover { border-color: var(--gold); }
.ed-event[aria-checked="true"] { background: #fff; color: var(--ink); border-color: var(--flor); box-shadow: 0 0 0 2px var(--flor), 0 12px 20px -14px rgba(20,48,44,.6); rotate: -2deg; }
.ed-event[aria-checked="true"] .ed-ev-ico { color: inherit; }
.ed-event[aria-checked="true"]::after, .ed-theme[aria-checked="true"]::after { content: ""; width: 26px; height: 26px; border-radius: 0; background: var(--flor); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 11c2 1.5 3.4 3 4.6 5C10 10 13 6 17.5 3' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 11c2 1.5 3.4 3 4.6 5C10 10 13 6 17.5 3' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.ed-event[aria-checked="true"]::after { top: -10px; right: -6px; }
.ed-theme[aria-checked="true"] { border-color: var(--flor); box-shadow: 0 0 0 2px var(--flor), 0 10px 22px -12px rgba(20,48,44,.45); rotate: -1.5deg; }
.ed-theme[aria-checked="true"]::after { top: -10px; right: -6px; left: auto; z-index: 2; }
/* botón principal como el de la portada */
.ed-nav .ed-btn--main { background: var(--flor); border-radius: 999px; box-shadow: 0 6px 0 #8f1f38; }
.ed-nav .ed-btn--main:hover { background: #a82643; }
.ed-nav .ed-btn--main:active { transform: translateY(3px); box-shadow: 0 3px 0 #8f1f38; }
.ed-nav #gen::after { display: none; }
.ed-btn--main { background: var(--ink); }
#buy-wa, #share-wa, #guests-buy { background: #187a42; border-color: #187a42; }
/* notas a mano */
.ed-side-label { background: none; box-shadow: none; padding: 0; font: 700 1.5rem/1.1 var(--hand); color: var(--ink); rotate: -2deg; display: flex; align-items: flex-end; justify-content: center; gap: .2rem; }
.ed-hand-arrow { width: 40px; height: 28px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; translate: 0 10px; }
.ed-hint { font: 700 1.4rem/1.1 var(--hand) !important; color: var(--ink); display: flex !important; justify-content: center; align-items: flex-end; gap: .2rem; rotate: -1.5deg; }
@media (min-width: 900px) { .ed-hint { display: none !important; } }
.ed-custom legend { font-weight: 700; }
.ed-card { background: #fffdf8; border: 0; border-radius: 6px 20px 10px 22px; box-shadow: 0 1px 0 rgba(20,48,44,.08), 0 18px 30px -22px rgba(20,48,44,.5); position: relative; }
.ed-card::before { content: ""; position: absolute; top: -9px; left: 50%; width: 84px; height: 20px; translate: -50% 0; rotate: 2deg; background: rgba(245,179,24,.55); border-radius: 2px; }
#result > h3 { font: 700 2rem/1 var(--hand); color: var(--flor); rotate: -1.5deg; }
@media (max-width: 899px) { .ed-nav { background: rgba(255,253,248,.97); } }
@media (max-width: 640px) { .ed-ev-ico { width: 52px; height: 52px; } .ed-event { padding: .45rem .3rem .6rem; } }

/* Editar mi invitación (paso 1) */
.ed-edit { border-top: 1.5px dashed #e2d8c4; padding-top: .8rem; }
.ed-edit summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font: 700 1.35rem/1.1 var(--hand); color: var(--flor); list-style: none; }
.ed-edit summary::-webkit-details-marker { display: none; }
.ed-edit summary::after { content: "+"; margin-left: .5rem; font: 700 1.3rem/1 var(--body); }
.ed-edit[open] summary::after { content: "–"; }
.ed-edit-in { display: grid; gap: .5rem; padding-top: .3rem; }
.ed-edit-in label { font-weight: 600; font-size: .92rem; }
.ed-keep { font-weight: 600; color: var(--ink); }
.ed-keep a { color: inherit; }
.ed-linkbtn { display: block; margin-top: .45rem; min-height: 44px; padding: .4rem .9rem; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font: 600 .9rem var(--body); cursor: pointer; }

/* Personalizador: elegir letra, adorno y fondo viéndolos, no por nombre */
.ed-pickf { display: grid; gap: .45rem; grid-column: 1 / -1; min-width: 0; }
.ed-pickf > span { font-weight: 600; }
.ed-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: .5rem; max-height: 272px; overflow-y: auto; padding: 4px 6px 4px 2px; overscroll-behavior: contain; }
.ed-pick-b { display: grid; gap: .3rem; justify-items: center; align-content: center; min-height: 54px; padding: .5rem .45rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: 500 .82rem/1.15 var(--body); text-align: center; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ed-pick-b:hover { border-color: var(--mute); }
.ed-pick-b:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ed-pick-b[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--gold); background: #fffdf7; }
.ed-pick-font > span { max-width: 100%; font-size: 1.2rem; line-height: 1.3; font-weight: 400; white-space: nowrap; }
.ed-pick-b .ed-orn { color: #9a3b5c; }
.ed-pick-b .ed-bg { color: #9a3b5c; border: 1px solid #eee6da; }
