/* order.css — Página "Escribe tu carta a Santa" (A4). Usa SOLO variables de tokens.css. */

[hidden] { display: none !important; }

body.page-order {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background:
    radial-gradient(90% 60% at 50% 0%, var(--night-700) 0%, transparent 70%),
    var(--night-950);
}

.noscript { padding: var(--sp-5); text-align: center; color: var(--text); }

/* ---------- Fondo mágico y capas ---------- */
.magic-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.topbar, .wrap { position: relative; z-index: 1; }

/* ---------- Barra superior ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-md);
  min-height: 44px;
}
.brand-mark { width: 36px; height: 36px; flex: 0 0 auto; }

/* ---------- Cabecera ---------- */
.wrap { padding: 0 var(--gutter) var(--sp-8); max-width: 720px; margin: 0 auto; }
.hero { text-align: center; padding: var(--sp-4) 0 var(--sp-5); }
.kicker {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.kicker-ink { color: var(--santa-red-600); }
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-2xl);
  line-height: 1.1;
  color: var(--text);
  text-shadow: 0 0 24px color-mix(in srgb, var(--gold) 40%, transparent);
}
.hero-sub { margin: var(--sp-3) auto 0; max-width: 34ch; color: var(--text-soft); font-size: var(--fs-md); }

/* ---------- Camino de huellas (progreso) ---------- */
.trail { position: relative; margin: var(--sp-5) 0 var(--sp-3); }
.trail-bar {
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  top: 22px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--night-600);
  overflow: hidden;
}
.trail-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  transition: width var(--t-slow) var(--ease-out);
}
.trail-list {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-2);
}
.trail-list li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.trail-dot {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--night-800);
  border: 2px solid var(--glass-border);
  color: var(--text-soft);
  transition: all var(--t-med) var(--ease-out);
}
.trail-dot svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trail-label { font-size: var(--fs-xs); font-weight: 700; color: var(--text-faint); line-height: 1.2; }
.trail li.is-current .trail-dot {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: var(--glow-gold);
  transform: scale(1.08);
}
.trail li.is-current .trail-label { color: var(--text); }
.trail li.is-done .trail-dot { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.trail li.is-done .trail-label { color: var(--text-soft); }

.step-count {
  margin: 0 0 var(--sp-4);
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-soft);
  min-height: 1.4em;
}

/* ---------- Avisos ---------- */
.notice {
  padding: var(--sp-4);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-4);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(6px);
}
.notice p { margin: 0 0 var(--sp-2); }
.notice p:last-child { margin-bottom: 0; }
.notice-closed { border-color: var(--st-failed); }
.notice-warn { border-color: var(--st-received); }

/* ---------- Pergamino ---------- */
.form-wrap { animation: none; } /* arquitecto: un formulario no debe moverse mientras se escribe */
@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.parchment {
  position: relative;
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 10% 0%, color-mix(in srgb, var(--snow) 55%, var(--parchment)) 0%, transparent 60%),
    linear-gradient(180deg, var(--parchment), var(--parchment-2));
  border: 2px solid var(--gold-deep);
  outline: 1px solid color-mix(in srgb, var(--gold-deep) 55%, transparent);
  outline-offset: -9px;
  border-radius: var(--r-lg);
  padding: var(--sp-7) var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-2), inset 0 0 60px color-mix(in srgb, var(--gold-deep) 22%, transparent);
}
@media (min-width: 560px) {
  .parchment { padding: var(--sp-7) var(--sp-7) var(--sp-6); }
}

.seal {
  position: absolute;
  top: -20px;
  right: 16px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--st-rejected) 0%, var(--santa-red) 45%, var(--santa-red-800) 100%);
  box-shadow: var(--shadow-1), inset 0 -3px 6px color-mix(in srgb, var(--night-950) 40%, transparent);
  transform: rotate(-8deg);
}
.seal svg { width: 34px; height: 34px; fill: var(--gold-soft); }
.seal-big { position: relative; top: auto; right: auto; margin: 0 auto var(--sp-4); width: 72px; height: 72px; transform: rotate(-6deg); }
.seal-big svg { width: 42px; height: 42px; }

.step { animation: none; }
.step.is-entering { animation: step-in var(--t-med) var(--ease-out) both; }
@keyframes step-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.step-title {
  margin: 0 0 var(--sp-2);
  padding-right: 64px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-xl);
  line-height: 1.2;
  color: var(--ink);
}
.step-title:focus { outline: none; }
.step-lead { margin: 0 0 var(--sp-5); color: var(--ink-soft); }

/* ---------- Campos ---------- */
.field { display: grid; gap: 6px; margin: 0 0 var(--sp-5); border: 0; padding: 0; min-width: 0; }
.field-row { display: grid; gap: 0; }
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; gap: 0 var(--sp-4); }
}
.legend, .lbl {
  padding: 0;
  font-weight: 800;
  font-size: var(--fs-md);
  color: var(--ink);
  line-height: 1.3;
}
.legend { margin-bottom: var(--sp-2); }
.opt { font-weight: 600; color: var(--ink-soft); font-size: var(--fs-sm); }
.hint { margin: 0; font-size: var(--fs-sm); color: var(--ink-soft); }
.field-error {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--santa-red-600);
}

input[type="text"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 2px solid var(--parchment-2);
  background: var(--snow);
  color: var(--ink);
  font-size: 16px; /* evita el zoom automático en iOS */
  line-height: 1.4;
}
textarea { min-height: 110px; resize: vertical; }
select { appearance: auto; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--ink-soft) 70%, transparent); }
input:focus, select:focus, textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--gold) 70%, transparent);
  outline-offset: 2px;
  border-color: var(--santa-red);
}
[aria-invalid="true"] {
  border-color: var(--santa-red) !important;
  background: color-mix(in srgb, var(--st-rejected) 12%, var(--snow)) !important;
}
.check input[aria-invalid="true"] { outline: 2px solid var(--santa-red); }

.counter { font-size: var(--fs-xs); color: var(--ink-soft); text-align: right; }

/* ---------- Tarjetas de destinatario ---------- */
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 14px 8px 12px;
  border-radius: var(--r-md);
  border: 2px solid color-mix(in srgb, var(--ink-soft) 35%, transparent);
  background: color-mix(in srgb, var(--snow) 70%, var(--parchment));
  cursor: pointer;
  text-align: center;
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast), box-shadow var(--t-fast);
}
.pick-card:hover { transform: translateY(-2px); }
.pick-card:has(input:checked) {
  border-color: var(--santa-red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 55%, transparent), var(--shadow-1);
  background: var(--snow);
}
.pick-card:focus-within { outline: 3px solid var(--gold-deep); outline-offset: 3px; }
.pick-art { width: 72px; height: 72px; display: block; }
.pick-art svg { width: 72px; height: 72px; display: block; }
.pick-name { font-weight: 800; color: var(--ink); line-height: 1.2; }

.ill-skin { fill: var(--gold-soft); }
.ill-hair { fill: var(--gold-deep); }
.ill-dark { fill: var(--ink); }
.ill-red { fill: var(--santa-red); }
.ill-snow { fill: var(--snow); }
.ill-pink { fill: var(--aurora-pink); }
.ill-blue { fill: var(--aurora-blue); }
.ill-body { fill: var(--pine); }
.ill-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }

/* ---------- Tonos ---------- */
.tone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 560px) { .tone-grid { grid-template-columns: repeat(3, 1fr); } }
.tone {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 2px solid color-mix(in srgb, var(--ink-soft) 35%, transparent);
  background: color-mix(in srgb, var(--snow) 70%, var(--parchment));
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.tone:has(input:checked) {
  border-color: var(--santa-red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 55%, transparent);
  background: var(--snow);
}
.tone:focus-within { outline: 3px solid var(--gold-deep); outline-offset: 3px; }
.tone-name { font-weight: 800; color: var(--ink); }
.tone-desc { font-size: var(--fs-xs); color: var(--ink-soft); line-height: 1.35; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 2px dashed var(--ink-soft);
  background: var(--snow);
  color: var(--ink);
  font-weight: 700;
  font-size: var(--fs-sm);
  cursor: pointer;
  text-align: left;
}
.chip:hover { border-style: solid; border-color: var(--santa-red); }

/* ---------- Billete dorado (Pago Móvil) ---------- */
.ticket {
  position: relative;
  margin: 0 0 var(--sp-5);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 45%, var(--gold-deep));
  color: var(--ink);
  box-shadow: var(--glow-gold);
}
.ticket::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px dashed color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius: var(--r-sm);
  pointer-events: none;
}
.ticket-title {
  position: relative;
  margin: 0 0 var(--sp-2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-lg);
}
.ticket-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 10px;
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}
.ticket-row:last-child { border-bottom: 0; }
.ticket-label {
  grid-column: 1;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ticket-value {
  grid-column: 1;
  font-weight: 800;
  font-size: var(--fs-md);
  overflow-wrap: anywhere;
}
.copy-btn {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 0;
  background: var(--ink);
  color: var(--gold-soft);
  font-weight: 800;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.copy-btn.is-copied { background: var(--pine); color: var(--snow); }

/* ---------- Comprobante ---------- */
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 150px;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 2px dashed var(--ink-soft);
  background: color-mix(in srgb, var(--snow) 80%, var(--parchment));
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.drop:focus-visible { outline: 3px solid var(--santa-red); outline-offset: 3px; }
.drop.is-over {
  border-style: solid;
  border-color: var(--santa-red);
  background: color-mix(in srgb, var(--gold-soft) 60%, var(--snow));
}
.drop-icon { width: 40px; height: 40px; }
.drop-icon svg { width: 40px; height: 40px; fill: none; stroke: var(--santa-red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { font-weight: 800; }
.drop-sub { font-size: var(--fs-sm); color: var(--ink-soft); }

.receipt-preview {
  display: grid;
  justify-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--snow);
  border: 2px solid var(--parchment-2);
}
.receipt-thumb { max-height: 240px; width: auto; max-width: 100%; border-radius: var(--r-sm); box-shadow: var(--shadow-1); }
.receipt-pdf { margin: 0; font-weight: 800; font-size: var(--fs-lg); color: var(--ink); }
.receipt-name { margin: 0; font-size: var(--fs-sm); color: var(--ink-soft); overflow-wrap: anywhere; text-align: center; }

/* ---------- Consentimiento y honeypot ---------- */
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; cursor: pointer; font-weight: 700; color: var(--ink); }
.check input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: var(--santa-red);
}
.check input:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; }

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Revisión ---------- */
.review-group { padding: var(--sp-3) 0; border-bottom: 1px dashed color-mix(in srgb, var(--ink) 25%, transparent); }
.review-group:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.review-head h3 { margin: 0; font-family: var(--font-display); font-size: var(--fs-lg); color: var(--ink); }
.review-row { display: grid; grid-template-columns: 1fr; gap: 0; padding: 4px 0; }
@media (min-width: 480px) { .review-row { grid-template-columns: 130px 1fr; gap: 8px; } }
.review-row dt { font-weight: 800; color: var(--ink-soft); font-size: var(--fs-sm); }
.review-row dd { margin: 0 0 6px; overflow-wrap: anywhere; color: var(--ink); }
@media (min-width: 480px) { .review-row dd { margin: 0; } }
.review-row dd.pre { white-space: pre-line; }
.btn-link {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--santa-red-600);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Mensajes y navegación ---------- */
.form-status { min-height: 1.4em; margin: var(--sp-3) 0 0; font-weight: 800; color: var(--santa-red-600); }
.nav-row { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); }
#prev { flex: 0 0 auto; }
#next { flex: 1 1 auto; }

.btn, .btn-main {
  min-height: 52px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  border: 0;
  background: linear-gradient(180deg, var(--santa-red), var(--santa-red-600));
  color: var(--snow);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--fs-md);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.btn:focus-visible, .btn-main:focus-visible, .btn-ghost:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn-main:disabled, .btn:disabled, #next:disabled { opacity: .65; cursor: wait; }
.btn-ghost {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: 2px solid var(--ink-soft);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.btn-ghost:disabled { opacity: .5; }

#next.btn-send {
  min-height: 60px;
  font-size: 1.1rem;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: var(--ink);
  box-shadow: var(--glow-gold);
}
#next.is-loading { background: var(--ink-soft); color: var(--snow); box-shadow: none; }

.privacy { margin: var(--sp-5) 0 0; text-align: center; font-size: var(--fs-xs); color: var(--text-faint); }

/* ---------- Éxito ---------- */
.success { width: 100%; max-width: 560px; margin: var(--sp-5) auto 0; }
.success-card { text-align: center; animation: fade-up .9s var(--ease-out) both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.success-title {
  margin: 0 0 var(--sp-3);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-xl);
  color: var(--ink);
  line-height: 1.2;
}
.success-title:focus { outline: none; }
.success-number { margin: 0 0 var(--sp-1); color: var(--ink-soft); }
.success-number strong { color: var(--santa-red-600); font-size: var(--fs-lg); }
.success-ahead { margin: 0 0 var(--sp-5); color: var(--ink); font-weight: 700; }
.code-box {
  margin: 0 auto var(--sp-4);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 2px dashed var(--gold-deep);
  background: var(--snow);
  max-width: 380px;
}
.code-label { margin: 0 0 var(--sp-1); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.code {
  margin: 0 0 var(--sp-3);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 1.1rem + 2vw, 2rem);
  letter-spacing: .1em;
  color: var(--ink);
  overflow-wrap: anywhere;
  user-select: all;
}
.success-note { margin: 0 0 var(--sp-5); color: var(--ink-soft); }
.success .btn-main { width: 100%; max-width: 420px; }

/* ---------- Animación de envío: pergamino -> sobre -> cielo ---------- */
.sendfx {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--night-800) 85%, transparent), color-mix(in srgb, var(--night-950) 96%, transparent));
}
.fx-stage { position: relative; width: min(300px, 80vw); height: 240px; }

.fx-letter {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 70%;
  height: 72%;
  transform: translateX(-50%);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--parchment), var(--parchment-2));
  box-shadow: var(--shadow-2);
  transition: transform .9s var(--ease-out), opacity .6s var(--ease-out);
}
.fx-lines {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 18%;
  bottom: 18%;
  background: repeating-linear-gradient(180deg, transparent 0 14px, color-mix(in srgb, var(--ink-soft) 45%, transparent) 14px 16px);
}

.fx-envelope {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 80%;
  height: 50%;
  transform: translate(-50%, 0) scale(.7);
  opacity: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  box-shadow: var(--shadow-2);
  transition: transform .8s var(--ease-out) .2s, opacity .4s ease .2s;
}
.fx-envelope::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 55%;
  background: var(--gold-soft);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.fx-seal {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--st-rejected), var(--santa-red) 45%, var(--santa-red-800));
  opacity: 0;
  transform: scale(2.4);
  transition: transform .45s var(--ease-bounce), opacity .25s ease;
}
.fx-seal svg { width: 30px; height: 30px; fill: var(--gold-soft); }

.fx-trail {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 6px;
  height: 0;
  margin-left: -3px;
  border-radius: 6px;
  background: linear-gradient(to top, transparent, var(--gold) 60%, var(--gold-soft));
  box-shadow: var(--glow-gold);
  opacity: 0;
}

.sendfx.is-on .fx-letter { transform: translateX(-50%) scale(1); }
.sendfx.is-fold .fx-letter { transform: translate(-50%, 70px) scale(.42) rotate(-4deg); opacity: 0; }
.sendfx.is-fold .fx-envelope { opacity: 1; transform: translate(-50%, 0) scale(1); }
.sendfx.is-seal .fx-seal { opacity: 1; transform: scale(1) rotate(-8deg); }
.sendfx.is-fly .fx-envelope {
  transform: translate(-50%, -115vh) scale(.35) rotate(-6deg);
  opacity: 0;
  transition: transform 1.2s cubic-bezier(.5, 0, .8, .4), opacity 1s ease .4s;
}
.sendfx.is-fly .fx-seal { opacity: 0; transition: opacity .3s ease; }
.sendfx.is-fly .fx-trail {
  height: 115vh;
  opacity: 1;
  transition: height 1.2s cubic-bezier(.5, 0, .8, .4), opacity .6s ease;
}

/* ---------- Ajustes finos para 360 px ---------- */
@media (max-width: 380px) {
  .trail-label { font-size: .7rem; }
  .trail-dot { width: 42px; height: 42px; }
  .pick-art, .pick-art svg { width: 62px; height: 62px; }
  .step-title { padding-right: 56px; }
  .seal { width: 50px; height: 50px; }
}

/* Arquitecto: subtítulo legible sobre la aurora */
.hero-sub { color: var(--snow-200); text-shadow: 0 1px 12px rgba(5, 10, 26, .95), 0 0 2px rgba(5, 10, 26, .9); }

/* =====================================================================
   Arquitecto: varios mensajes en una sola carta (un solo Pago Móvil)
   ===================================================================== */
.msg-bar {
  margin: 0 0 var(--sp-5); padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md); background: rgba(127, 18, 34, .06); border: 1px dashed rgba(127, 18, 34, .3);
}
.msg-bar[hidden] { display: none; }
.msg-bar-title { margin: 0 0 var(--sp-2); font-weight: 800; color: var(--ink); font-size: var(--fs-sm); }
.msg-bar-sub { font-weight: 600; color: var(--ink-soft); }
.msg-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.msg-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 100%;
  padding: 6px 14px 6px 6px; border-radius: var(--r-pill); cursor: pointer;
  background: #fffaf0; border: 1.5px solid #d9c49a; color: var(--ink); font-weight: 700; font-size: var(--fs-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.msg-chip:hover { border-color: var(--gold-deep); transform: translateY(-1px); }
.msg-chip-n {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: #e9dcc0; color: var(--ink); font-weight: 800;
}
.msg-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16ch; }
.msg-chip.is-done .msg-chip-n { background: #1f6b4a; color: #fff; }
.msg-chip.is-current { border-color: var(--santa-red); box-shadow: 0 0 0 3px rgba(215, 38, 61, .18); }
.msg-chip.is-current .msg-chip-n { background: var(--santa-red); color: #fff; }
.msg-chip-add { padding: 6px 16px; border-style: dashed; color: var(--santa-red-600); background: transparent; }
.msg-remove {
  width: 32px; height: 32px; margin-left: -4px; border-radius: 50%; cursor: pointer; flex: 0 0 auto;
  border: 1px solid rgba(127, 18, 34, .3); background: #fff; color: var(--santa-red-600); font-size: 1.15rem; line-height: 1;
}
.msg-remove:hover { background: var(--santa-red); color: #fff; }

.more-msg {
  margin-top: var(--sp-6); padding: var(--sp-4); border-radius: var(--r-md);
  display: grid; grid-template-columns: auto 1fr; gap: var(--sp-3) var(--sp-4); align-items: center;
  background: linear-gradient(135deg, rgba(246, 196, 83, .2), rgba(63, 214, 208, .12));
  border: 1.5px solid rgba(200, 146, 42, .45);
}
.more-msg[hidden] { display: none; }
.more-msg-art svg { width: 48px; height: 48px; }
.more-msg-title { margin: 0; font-weight: 800; color: var(--ink); }
.more-msg-desc { margin: 2px 0 0; color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.45; }
.more-msg .btn-add { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 620px) {
  .more-msg { grid-template-columns: auto 1fr auto; }
  .more-msg .btn-add { grid-column: auto; }
}
.ticket-note {
  margin: 4px 0 8px; padding: 8px 12px; border-radius: var(--r-sm); font-weight: 700; font-size: var(--fs-sm);
  background: rgba(31, 107, 74, .12); color: #155238;
}
.ticket-note[hidden] { display: none; }
.success-list { list-style: none; margin: var(--sp-4) auto 0; padding: 0; display: grid; gap: 6px; max-width: 420px; text-align: left; }
.success-list[hidden] { display: none; }
.success-item { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: var(--r-sm); background: rgba(127, 18, 34, .06); }
.success-item-num { font-weight: 800; color: var(--santa-red-600); font-variant-numeric: tabular-nums; }
.success-item-name { font-weight: 700; color: var(--ink); }

/* Arquitecto: el cielo no se estira cuando la barra del navegador móvil aparece o desaparece */
.magic-bg { height: 100vh; height: 100lvh; bottom: auto; }

/* ---------- Monto en bolívares a la tasa BCV del día ---------- */
.ticket-amount {
  position: relative; margin: 10px -6px 4px; padding: 6px 12px 10px; border-radius: var(--r-sm);
  background: rgba(255, 250, 240, .55); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--santa-red-600) 45%, transparent);
}
.ticket-amount[hidden] { display: none; }
.ticket-row--amount { border-bottom: 0; }
.ticket-row--amount .ticket-label { color: var(--santa-red-800); }
.ticket-value--big {
  font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem); line-height: 1.1;
  color: var(--santa-red-800); font-variant-numeric: tabular-nums;
}
.ticket-rate { position: relative; margin: 0; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-soft); }
.ticket-rate.is-updated { animation: rate-flash 1.6s var(--ease-out); }
@keyframes rate-flash { 0%, 40% { color: var(--pine-deep); } 100% { color: var(--ink-soft); } }

/* WhatsApp: es donde llegan los audios */
.req-badge {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--r-pill); vertical-align: middle;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .03em; color: #fff; background: var(--santa-red-600);
}
.phone-alert {
  margin: 6px 0 8px; padding: 10px 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); line-height: 1.45;
  background: rgba(31, 107, 74, .12); border-left: 4px solid var(--pine); color: var(--ink);
}
.phone-alert strong { color: var(--pine-deep); }

/* ---------- Paquetes (regalos) ---------- */
.pkg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) { .pkg-grid { grid-template-columns: repeat(4, 1fr); } }
.pkg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 16px 10px 12px;
  border-radius: var(--r-md);
  border: 2px solid color-mix(in srgb, var(--ink-soft) 35%, transparent);
  background: color-mix(in srgb, var(--snow) 70%, var(--parchment));
  cursor: pointer;
  text-align: center;
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast), box-shadow var(--t-fast);
}
.pkg-card:hover { transform: translateY(-2px); }
.pkg-card:has(input:checked) {
  border-color: var(--santa-red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 55%, transparent), var(--shadow-1);
  background: var(--snow);
}
.pkg-card:focus-within { outline: 3px solid var(--gold-deep); outline-offset: 3px; }
.pkg-card--star { border-color: color-mix(in srgb, var(--gold-deep) 70%, transparent); }
.pkg-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--santa-red);
  color: var(--snow);
  font-size: var(--fs-xs);
  font-weight: 800;
}
.pkg-emoji { font-size: 1.9rem; line-height: 1.1; }
.pkg-name { font-weight: 800; color: var(--ink); line-height: 1.2; }
.pkg-meta { font-size: var(--fs-xs); color: var(--ink-soft); line-height: 1.3; }
.pkg-price { display: flex; flex-direction: column; margin-top: 4px; color: var(--santa-red-600); line-height: 1.2; }
.pkg-price strong { font-size: 1.15rem; }
.pkg-bs { font-size: var(--fs-xs); color: var(--ink-soft); font-weight: 700; }

.pkg-plan:empty { display: none; }
.pkg-plan {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px dashed color-mix(in srgb, var(--gold-deep) 60%, transparent);
  background: color-mix(in srgb, var(--parchment-2) 55%, transparent);
  color: var(--ink);
}
.pkg-plan-title { margin: 0 0 6px; font-weight: 800; }
.pkg-plan-list { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.pkg-plan-list li { line-height: 1.35; }
.pkg-plan-name { font-weight: 700; }
.pkg-plan-when { display: block; font-size: var(--fs-xs); color: var(--ink-soft); }
@media (min-width: 560px) { .pkg-plan-when { display: inline; margin-left: 6px; } .pkg-plan-when::before { content: "· "; } }
.pkg-plan-note { margin: 8px 0 0; font-size: var(--fs-sm); color: var(--ink-soft); }

/* ---------- Elfo ---------- */
.elf-box {
  padding: 12px 14px 4px;
  border-radius: var(--r-md);
  border: 2px solid color-mix(in srgb, var(--pine) 45%, transparent);
  background: color-mix(in srgb, var(--pine) 7%, transparent);
}
.elf-box > .legend { padding: 0 6px; }
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg-opt span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--ink-soft) 35%, transparent);
  background: color-mix(in srgb, var(--snow) 70%, var(--parchment));
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.seg-opt input:checked + span { border-color: var(--santa-red); background: var(--snow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 55%, transparent); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.pkg-plan-listen { display: inline-block; margin-top: 8px; color: var(--santa-red-600); font-weight: 800; }


/* ---------- Paso 1 equilibrado (regalo → para quién → sus datos) ---------- */
.field { align-content: start; }            /* campos vecinos alineados aunque una etiqueta ocupe 2 líneas */
.legend--num { display: flex; align-items: center; gap: 10px; }
.legend--block { margin: var(--sp-2) 0 var(--sp-3); }
.num {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--santa-red); color: var(--snow); font-size: .9rem; font-weight: 800;
  box-shadow: 0 2px 0 var(--santa-red-800);
}

/* Tarjetas de regalo y de destinatario: misma familia visual, un solo estado «elegido» claro */
.pkg-card, .pick-card { border-width: 2px; }
.pkg-card:has(input:checked), .pick-card:has(input:checked) {
  border-color: var(--santa-red);
  background: var(--snow);
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--santa-red) 60%, transparent);
}
.pkg-card:has(input:checked)::after, .pick-card:has(input:checked)::after {
  content: "✓"; position: absolute; top: -9px; right: -9px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--snow);
  display: grid; place-items: center; background: var(--santa-red); color: var(--snow); font-size: .8rem; font-weight: 800;
}
.pkg-card:focus-within, .pick-card:focus-within { outline: 3px solid color-mix(in srgb, var(--gold) 80%, transparent); outline-offset: 2px; }
.pkg-card:has(input:focus:not(:focus-visible)), .pick-card:has(input:focus:not(:focus-visible)) { outline: none; }
.pkg-price { margin-top: auto; padding-top: 6px; }   /* precios alineados abajo en las 4 tarjetas */

.pick-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .pick-grid { grid-template-columns: repeat(4, 1fr); } }
.pick-card { padding: 12px 8px 10px; gap: 2px; justify-content: flex-start; }
.pick-art, .pick-art svg { width: 54px; height: 54px; }
.pick-name { margin-top: 4px; font-size: var(--fs-md); }
.pick-desc { font-size: var(--fs-xs); color: var(--ink-soft); line-height: 1.25; }
@media (max-width: 380px) { .pick-art, .pick-art svg { width: 48px; height: 48px; } }

/* ---------- Paso 2: lo esencial, detalles opcionales agrupados y tono ---------- */
.opt-box {
  margin: 0 0 var(--sp-5); padding: 14px 14px 2px; border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--gold-deep) 35%, transparent);
  background: color-mix(in srgb, var(--parchment-2) 40%, transparent);
}
.opt-box > .legend { margin: 0 0 4px; flex-wrap: wrap; }
.opt-box__lead { margin: 0 0 var(--sp-3); }
.opt-grid { display: grid; gap: 0 var(--sp-4); }
@media (min-width: 720px) {
  .opt-grid { grid-template-columns: 1fr 1fr; }
  .opt-grid > .field:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.opt-grid textarea { min-height: 76px; }
.opt-grid .lbl { font-size: var(--fs-sm); }
.opt-grid .lbl .opt { display: none; }  /* el bloque ya dice «todos opcionales» */
.pkg-plan-summary { cursor: pointer; font-weight: 800; color: var(--santa-red-600); margin: 2px 0 6px; list-style-position: inside; }
.pkg-plan-more:not([open]) .pkg-plan-summary { margin-bottom: 0; }

/* ---------- Cuándo recibir los audios (paquetes) ---------- */
.delivery-box { margin-top: var(--sp-4); display: grid; gap: 8px; }
.delivery-grid { display: grid; gap: 8px; }
@media (min-width: 560px) { .delivery-grid { grid-template-columns: 1fr 1fr; } }
.delivery-opt {
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-items: start;
  padding: 12px 14px; border-radius: var(--r-md); cursor: pointer;
  border: 2px solid color-mix(in srgb, var(--ink-soft) 35%, transparent);
  background: color-mix(in srgb, var(--snow) 70%, var(--parchment));
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.delivery-opt:has(input:checked) {
  border-color: var(--santa-red); background: var(--snow);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 55%, transparent);
}
.delivery-opt:focus-within { outline: 3px solid var(--gold-deep); outline-offset: 3px; }
.delivery-ico { grid-row: span 2; font-size: 1.4rem; line-height: 1.2; }
.delivery-name { font-weight: 800; color: var(--ink); }
.delivery-desc { font-size: var(--fs-xs); color: var(--ink-soft); line-height: 1.4; }
.delivery-tag {
  display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: var(--r-pill); vertical-align: 1px;
  font-size: var(--fs-xs); font-weight: 800; color: var(--pine-deep); background: color-mix(in srgb, var(--aurora-green) 35%, transparent);
}

/* ---------- Contadores de caracteres ---------- */
.hint.count { text-align: right; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; margin-top: 2px; }
.hint.count.is-near { color: var(--santa-red-600); font-weight: 800; }

/* ---------- Monto pagado: confirmación ---------- */
#hint-payment_amount.is-ok { color: var(--pine); font-weight: 700; }
#hint-payment_amount.is-warn { color: var(--santa-red-600); font-weight: 700; }

/* ---------- Qué comprobante sirve ---------- */
.receipt-rules {
  margin: 10px 0 6px; padding: 10px 14px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--parchment-2) 65%, transparent);
  border-left: 4px solid var(--gold-deep);
  font-size: var(--fs-sm); line-height: 1.45; color: var(--ink);
}
.receipt-rules p { margin: 0; }
.receipt-rules p + p { margin-top: 6px; }

/* ---------- Diálogo de confirmación (estilo carta) ---------- */
.dlg-backdrop {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: var(--gutter);
  background: color-mix(in srgb, var(--night-950) 72%, transparent); backdrop-filter: blur(3px);
  animation: dlg-fade var(--t-fast) var(--ease-out);
}
.dlg-backdrop[hidden] { display: none; }
.dlg {
  width: min(420px, 100%); padding: var(--sp-6) var(--sp-5) var(--sp-5); text-align: center;
  animation: dlg-pop var(--t-med) var(--ease-bounce);
}
.dlg-art { display: block; font-size: 2.4rem; line-height: 1; margin-bottom: var(--sp-2); }
.dlg-title { margin: 0 0 var(--sp-2); font-family: var(--font-display); font-size: var(--fs-lg); color: var(--ink); }
.dlg-msg { margin: 0 0 var(--sp-5); color: var(--ink-soft); line-height: 1.5; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; }
.dlg-actions > * { flex: 1 1 150px; }
.btn-danger { background: linear-gradient(180deg, var(--santa-red-600), var(--santa-red-800)); }
body.dlg-open { overflow: hidden; }
@keyframes dlg-fade { from { opacity: 0; } }
@keyframes dlg-pop { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .dlg-backdrop, .dlg { animation: none; } }

/* Fecha límite de cada paquete */
.pkg-until { display: block; margin-top: 4px; font-size: .78rem; font-weight: 700; opacity: .85; }
.pkg-card.is-off { opacity: .5; cursor: not-allowed; filter: grayscale(.6); }
.pkg-card.is-off:hover { transform: none; }

/* ---------- Cupón de regalo ---------- */
.coupon { margin: 0 0 var(--sp-5); display: grid; gap: var(--sp-2); }
.coupon-ask { border-radius: var(--r-md); border: 2px dashed color-mix(in srgb, var(--gold-deep) 70%, transparent); background: rgba(246, 196, 83, .12); }
.coupon-sum { cursor: pointer; padding: 12px 16px; font-weight: 800; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 8px; }
.coupon-sum::-webkit-details-marker { display: none; }
.coupon-sum::after { content: "▾"; margin-left: auto; color: var(--ink-soft); transition: transform var(--t-fast); }
.coupon-ask[open] .coupon-sum::after { transform: rotate(180deg); }
.coupon-sum:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: var(--r-md); }
.coupon-field { padding: 0 16px 14px; margin: 0; }
.coupon-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.coupon-row input { flex: 1 1 200px; font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .06em; }
.coupon-apply { flex: none; }
.coupon-ok {
  padding: 16px 18px; border-radius: var(--r-md); color: var(--ink);
  background: linear-gradient(135deg, rgba(246, 196, 83, .35), rgba(94, 242, 176, .22));
  border: 2px solid var(--gold-deep); box-shadow: 0 6px 24px rgba(200, 146, 42, .25);
}
.coupon-ok p { margin: 0 0 var(--sp-2); }
.coupon-ok-title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 800; }
.coupon-ok .mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }
.coupon-fix { justify-self: start; }
.coupon-banner {
  margin: var(--sp-3) auto 0; max-width: 46ch; padding: 10px 16px; border-radius: var(--r-pill);
  background: rgba(246, 196, 83, .16); border: 1px solid var(--gold); color: var(--gold-soft); font-size: var(--fs-sm);
}
.coupon-banner--bad {
  max-width: 58ch; background: rgba(200, 29, 52, .18); border-color: rgba(255, 122, 140, .65);
  color: #ffd9df;
}
.coupon-pkg-note { margin: 0 0 var(--sp-3); padding: 10px 14px; border-radius: var(--r-md); background: rgba(246, 196, 83, .16); color: var(--ink); font-size: var(--fs-sm); }
