/* ==========================================================================
   Recursos Worship — Programa de afiliados · landing (2026)
   Se carga después de css/styles.css y css/nav.css (mismo sistema que la home);
   aquí solo va lo propio de esta página. Todo plano: sin sombras ni glows.
   Acento: el morado de la home (no se redefine la paleta).
   --------------------------------------------------------------------------
   1. Base de la página
   2. Hero (panel limpio + prueba social)
   3. Para quién + tira
   4. Cómo funciona (tres pasos animados)
   5. Compartir lo que ya te sirve (50 %)
   6. Lo que vas a compartir (superficie + tipos de recurso)
   7. Por qué compartirlo (6 razones)
   8. Ejemplo de comisiones
   9. Escenario LED + cifras, testimonios, FAQ y CTA
   10. Responsive
   11. Movimiento reducido
   12. Registro (popup)
   ========================================================================== */

/* 1. Base ------------------------------------------------------------------ */
.af-page {
  --strip-h: 220px;     /* alto de la tira */
  --av-ring: var(--panel);
}
.af-page section[id] { scroll-margin-top: 96px; }

/* Avatares con iniciales (como en la página real: JR, ML, CP, +) */
.af-avatars { display: inline-flex; flex: none; padding-left: 8px; }
.af-avatars i {
  display: grid; place-items: center;
  width: 28px; height: 28px; margin-left: -8px;
  border-radius: 999px; border: 2px solid var(--av-ring);
  background: var(--accent-soft-2); color: var(--accent-ink);
  font-style: normal; font-size: 10.5px; font-weight: 650; letter-spacing: 0.01em;
}
.af-avatars i:last-child { background: var(--accent); color: #fff; font-size: 14px; }

/* 2. Hero ------------------------------------------------------------------ */
/* Sin tarjetas de vista previa ni degradado en el titular (pedido): panel limpio, algo más bajo que el de la home */
.af-page .hero { min-height: clamp(600px, 84svh, 860px); }
.af-title { max-width: 24ch; }
.af-hero .hero-proof { gap: 10px 24px; }
.af-proof { gap: 10px !important; }
.af-proof strong { color: var(--ink); font-weight: 600; }
:root[data-theme="dark"] .af-hero { --av-ring: #000; }

/* 3. Para quién + tira ------------------------------------------------------- */
.af-who .ico { width: 18px; height: 18px; opacity: 0.8; }
/* Tarjetas de ancho variable: todas a la misma altura, el ancho sale de la proporción */
.af-strip .s-card { width: calc(var(--strip-h) * var(--ar, 1.7778)); }
.af-strip .s-media { height: var(--strip-h); }

/* 4. Cómo funciona --------------------------------------------------------- */
.af-how .head { margin-bottom: clamp(32px, 4vw, 56px); }
.af-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.4vw, 22px); }
.af-step { display: grid; gap: 22px; align-content: start; }
.af-step-visual {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-xl);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
}
.af-step-copy { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; align-items: center; padding: 0 4px; }
.af-step-num { grid-row: span 2; align-self: start; display: inline-grid; place-items: center; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-family: "Geist Mono", ui-monospace, monospace; font-size: 12.5px; font-weight: 500; }
.af-step h3 { font-size: clamp(19px, 1.5vw, 22px); font-weight: 620; letter-spacing: -0.02em; line-height: 1.2; }
.af-step p { grid-column: 2; color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 36ch; }

/* Tarjeta base de los tres pasos */
.af-link-card, .af-chat, .af-panel { position: relative; border-radius: 18px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }

/* Paso 1: el enlace aparece, se copia y queda listo */
.af-link-card { width: 82%; display: grid; gap: 10px; padding: 16px; }
.af-link-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); padding-bottom: 6px; }
.af-link-head img { width: 20px; height: 20px; }
.af-link-label { font-size: 12px; font-weight: 560; color: var(--muted); }
.af-link-field { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 5px 0 12px; border-radius: 12px; background: var(--surface); }
.af-link-url { flex: 1; min-width: 0; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.af-link-url b { color: var(--accent-fg); font-weight: 500; }
.af-link-copy { flex: none; display: inline-grid; place-items: center; height: 32px; padding: 0 12px; border-radius: 9px; background: var(--ink); color: var(--on-ink); font-size: 12.5px; font-weight: 600; }
.af-link-toast {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 12px 0 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 12.5px; font-weight: 600;
  opacity: 0; transform: translateY(6px);
}
.af-steps.is-live .af-link-url { animation: afType 6s steps(30, end) infinite; }
.af-steps.is-live .af-link-copy { animation: afPress 6s var(--ease-quint) infinite; }
.af-steps.is-live .af-link-toast { animation: afToast 6s var(--ease-quint) infinite; }
@keyframes afType {
  0%, 6% { clip-path: inset(0 100% 0 0); }
  38%, 100% { clip-path: inset(0 0 0 0); }
}
@keyframes afPress {
  0%, 46% { transform: none; }
  49% { transform: scale(0.92); }
  53%, 100% { transform: none; }
}
@keyframes afToast {
  0%, 52% { opacity: 0; transform: translateY(6px); filter: blur(4px); }
  60%, 90% { opacity: 1; transform: none; filter: none; }
  100% { opacity: 0; transform: none; filter: blur(4px); }
}

/* Paso 2: el mensaje se envía al grupo de la iglesia */
.af-chat { width: 84%; display: grid; overflow: hidden; }
.af-chat-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.af-chat-top b { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; }
.af-chat-top small { display: block; font-size: 11.5px; color: var(--muted); }
.af-chat-av { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-fg); flex: none; }
.af-chat-body { display: grid; justify-items: end; gap: 6px; padding: 12px 12px 10px; background: var(--surface); }
.af-bubble { max-width: 88%; padding: 8px 11px; border-radius: 14px 14px 4px 14px; background: var(--accent-soft); color: var(--ink); font-size: 12.5px; line-height: 1.35; }
.af-preview { width: 88%; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.af-preview img { width: 74px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.af-preview b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.af-preview small { display: block; font-size: 11px; line-height: 1.3; color: var(--muted); }
.af-ticks { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.af-ticks svg { width: 17px; height: 12px; color: var(--accent-fg); }
.af-steps.is-live .af-bubble { animation: afMsg 7s var(--ease-quint) infinite; }
.af-steps.is-live .af-preview { animation: afMsg 7s var(--ease-quint) infinite; animation-delay: 0.45s; }
.af-steps.is-live .af-ticks { animation: afMsg 7s var(--ease-quint) infinite; animation-delay: 0.9s; }
@keyframes afMsg {
  0%, 4% { opacity: 0; transform: translateY(10px) scale(0.98); filter: blur(4px); }
  14%, 86% { opacity: 1; transform: none; filter: none; }
  96%, 100% { opacity: 0; transform: none; filter: blur(4px); }
}

/* Paso 3: el panel de afiliado se llena y llega la comisión */
.af-panel { width: 80%; display: grid; gap: 12px; padding: 16px 16px 18px; }
.af-panel-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); padding-bottom: 2px; }
.af-panel-head .ico { color: var(--accent-fg); }
.af-panel-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 10px; }
.af-panel-row small { font-size: 12px; color: var(--muted); }
.af-panel-row i { height: 8px; border-radius: 99px; background: var(--fill); position: relative; overflow: hidden; }
.af-panel-row i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform-origin: left; transform: scaleX(var(--w, 0.5)); }
.af-panel-toast {
  justify-self: center; margin-top: 4px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 10px; border-radius: 14px;
  background: var(--ink); color: var(--on-ink);
  white-space: nowrap;
  opacity: 0; transform: translateY(8px);
}
.af-panel-toast b { display: block; font-size: 14px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.2; }
.af-panel-toast small { display: block; font-size: 11px; opacity: 0.7; }
.af-panel-dot { width: 26px; height: 26px; border-radius: 999px; background: var(--accent); flex: none; position: relative; }
.af-panel-dot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; margin: -1px 0 0 -5px; background: #fff; border-radius: 2px; }
.af-panel-dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 10px; margin: -5px 0 0 -1px; background: #fff; border-radius: 2px; }
.af-steps.is-live .af-panel-row i::after { animation: afGrow 6.5s var(--ease-quint) infinite; }
.af-steps.is-live .af-panel-row:nth-of-type(3) i::after { animation-delay: 0.15s; }
.af-steps.is-live .af-panel-row:nth-of-type(4) i::after { animation-delay: 0.3s; }
.af-steps.is-live .af-panel-toast { animation: afPop 6.5s var(--ease-quint) infinite; }
@keyframes afGrow {
  0%, 4% { transform: scaleX(0); }
  32%, 100% { transform: scaleX(var(--w, 0.5)); }
}
@keyframes afPop {
  0%, 36% { opacity: 0; transform: translateY(8px); filter: blur(4px); }
  44%, 88% { opacity: 1; transform: none; filter: none; }
  98%, 100% { opacity: 0; transform: none; filter: blur(4px); }
}

/* 5. Compartir lo que ya te sirve ------------------------------------------ */
.af-why .intro-grid { align-items: center; }
.af-half {
  display: grid; gap: 18px; align-content: start;
  padding: clamp(28px, 3vw, 44px);
  border-radius: var(--r-xl);
  background: var(--surface);
}
.af-half-num { font-size: clamp(112px, 13vw, 200px); font-weight: 650; line-height: 0.85; letter-spacing: -0.065em; font-variant-numeric: tabular-nums; color: var(--ink); }
.af-half-num span { font-size: 0.42em; letter-spacing: -0.02em; color: var(--accent-fg); margin-left: 0.04em; }
.af-half-label { font-size: clamp(18px, 1.45vw, 21px); font-weight: 560; letter-spacing: -0.015em; line-height: 1.35; color: var(--ink); max-width: 28ch; }
.af-half-list { display: grid; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line-2); }
.af-half-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); }
.af-half-list .ico { margin-top: 2px; color: var(--accent-fg); }

/* 6. Lo que vas a compartir ------------------------------------------------- */
.af-share { padding-top: var(--space-md); }
.af-share .head { margin-bottom: clamp(32px, 4vw, 56px); }
.af-showcase { padding-top: 0; }
.af-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.2vw, 18px); margin-top: clamp(40px, 5vw, 72px); }
.af-type { display: grid; align-content: start; padding: 10px; border-radius: var(--r-lg); background: var(--surface); transition: background-color var(--t-ui); }
.af-type:hover { background: var(--surface-2); }
.af-type-media { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #0d0d10; }
.af-type-media video { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-quint); }
.af-type:hover .af-type-media video { transform: scale(1.03); }
/* Plantillas de Canva: tres piezas reales (historia, post, historia) sobre una superficie */
.af-type-canva { display: flex; align-items: center; justify-content: center; gap: 4%; background: var(--surface-2); }
.af-type-canva img { flex: none; height: 72%; width: auto; border-radius: 8px; transition: transform 1s var(--ease-quint); }
.af-type-canva img:nth-child(2) { height: 52%; }
.af-type:hover .af-type-canva img:nth-child(1) { transform: translateY(-4px) rotate(-2deg); }
.af-type:hover .af-type-canva img:nth-child(3) { transform: translateY(-4px) rotate(2deg); }
.af-type-copy { display: grid; gap: 4px; padding: 14px 6px 6px; }
.af-type-copy h3 { font-size: 17px; font-weight: 620; letter-spacing: -0.015em; line-height: 1.25; }
.af-type-copy p { font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.af-share-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; margin-top: clamp(32px, 4vw, 48px); }
.af-share-foot .lead { max-width: 60ch; }

/* 7. Por qué compartirlo --------------------------------------------------- */
.af-reason-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.2vw, 18px); }
.af-reason { display: grid; gap: 12px; align-content: start; padding: clamp(24px, 2.4vw, 36px); border-radius: var(--r-xl); background: var(--surface); }
.af-reason-ico { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 10px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-fg); }
.af-reason h3 { font-size: clamp(19px, 1.5vw, 22px); font-weight: 620; letter-spacing: -0.02em; line-height: 1.2; }
.af-reason p { font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 40ch; }

/* 8. Ejemplo de comisiones ------------------------------------------------- */
.af-calc-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.af-calc-copy { display: grid; gap: 18px; }
.af-calc-facts { display: grid; margin: 12px 0 0; border-top: 1px solid var(--line-2); }
.af-calc-facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.af-calc-facts dt { font-size: 15.5px; color: var(--muted); }
.af-calc-facts dd { margin: 0; font-size: clamp(22px, 1.9vw, 28px); font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.af-calc-facts dd.is-accent { color: var(--accent-fg); }

.af-calc { display: grid; gap: 10px; padding: clamp(24px, 3vw, 44px); border-radius: var(--r-xl); background: var(--surface); }
.af-calc-q { font-size: 17px; color: var(--muted); }
.af-calc-q b { color: var(--ink); font-weight: 600; }
.af-calc-total { display: flex; align-items: baseline; gap: 12px; font-size: clamp(60px, 7vw, 104px); font-weight: 650; line-height: 1; letter-spacing: -0.055em; font-variant-numeric: tabular-nums; }
.af-calc-total small { font-size: clamp(16px, 1.3vw, 19px); font-weight: 560; letter-spacing: -0.01em; color: var(--muted); }
.af-bars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1vw, 14px); margin-top: 22px; }
.af-bars button { display: grid; gap: 4px; justify-items: start; padding: 10px; border-radius: 18px; text-align: left; transition: background-color var(--t-ui); }
.af-bars button:hover { background: var(--fill); }
.af-bar { width: 100%; height: clamp(110px, 12vw, 170px); display: flex; align-items: flex-end; margin-bottom: 8px; }
.af-bar i { width: 100%; height: calc(var(--h, 0.5) * 100%); min-height: 14px; border-radius: 12px; background: var(--fill-hover); transition: background-color 0.3s var(--ease-ui); }
.af-bars button[aria-checked="true"] .af-bar i { background: var(--accent); }
.af-bars b { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.af-bars small { font-size: 13.5px; color: var(--muted); }
.af-bars button[aria-checked="true"] b { color: var(--accent-fg); }
.af-calc-note { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; color: var(--muted); }

/* 9. Escenario LED + cifras, testimonios, FAQ y CTA -------------------------- */
.af-led { padding-bottom: var(--space-lg); }
.af-stats { margin-top: clamp(48px, 6vw, 80px); }
.af-testi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.2vw, 18px); }
.af-testi-grid .t-card { width: auto; }
.af-testi-grid .avatar { font-size: 13px; }
.af-mail { color: var(--accent-fg); font-weight: 560; overflow-wrap: anywhere; }
.af-mail:hover { text-decoration: underline; text-underline-offset: 3px; }
.af-cta { --av-ring: var(--accent-deep); }
.af-cta-note { display: flex; align-items: center; gap: 12px; font-size: 15px !important; color: rgba(255, 255, 255, 0.7) !important; }
.af-cta-note strong { color: #fff; }
.af-cta .af-avatars i { background: rgba(255, 255, 255, 0.16); color: #fff; }
.af-cta .af-avatars i:last-child { background: #fff; color: var(--accent-deep); }

/* 10. Responsive ----------------------------------------------------------- */
@media (max-width: 1200px) {
  .af-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .af-page { --strip-h: 180px; }
  .af-steps { grid-template-columns: 1fr; max-width: 560px; }
  .af-reason-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .af-calc-grid { grid-template-columns: 1fr; }
  .af-testi-grid { grid-template-columns: 1fr; max-width: 640px; }
}
@media (max-width: 560px) {
  .af-page { --strip-h: 160px; }
  .af-title { max-width: none; }
  .af-hero .hero-proof { gap: 10px 16px; }
  .af-reason-grid { grid-template-columns: 1fr; }
  .af-types { gap: 10px; }
  .af-type { padding: 8px; border-radius: 20px; }
  .af-type-media { border-radius: 13px; }
  .af-type-copy { padding: 12px 4px 4px; }
  .af-type-copy h3 { font-size: 15px; }
  .af-type-copy p { font-size: 13.5px; }
  .af-link-card, .af-chat, .af-panel { width: 88%; }
  .af-bars button { padding: 8px 6px; }
  .af-bars b { font-size: 16px; }
  .af-calc-facts div { flex-direction: column; gap: 2px; }
  .af-cta-note { align-items: flex-start; }
  .af-stats .stat:nth-child(3) { padding-left: 0; }
  .af-share-foot .btn { width: 100%; }
}

/* 11. Movimiento reducido -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .af-steps .af-link-toast, .af-steps .af-panel-toast { opacity: 1; }
  .af-steps .af-link-toast, .af-steps .af-panel-toast { transform: none; }
  .af-steps.is-live *, .af-steps.is-live *::after { animation: none !important; }
}

/* 12. Registro (popup) ------------------------------------------------------
   <dialog> nativo (showModal): capa superior, resto de la página inerte. El diálogo
   no tiene fondo ni relleno; el panel interior lo ocupa todo, así un clic cuyo
   destino es el propio <dialog> solo puede ser en el fondo (cierra). Plano: el
   panel lleva un borde de 1 px, sin sombra; el fondo es un velo sobrio sin desenfoque. */
html.af-reg-lock { overflow: hidden; scrollbar-gutter: stable; }
.af-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.af-reg {
  --af-danger: #d92d20;
  --af-field: var(--surface);
  --af-sheet: var(--panel);
  width: min(620px, calc(100% - 32px)); max-width: none;
  max-height: min(820px, calc(100svh - 48px));
  margin: auto; padding: 0; border: 0;
  border-radius: 24px;
  background: transparent; color: var(--ink);
  overflow: hidden;
}
:root[data-theme="dark"] .af-reg { --af-danger: #ff6b6b; --af-field: rgba(255, 255, 255, 0.06); --af-sheet: #1f1f1f; }
.af-reg[open] { display: flex; flex-direction: column; }
.af-reg::backdrop { background: rgba(14, 12, 20, 0.48); }
:root[data-theme="dark"] .af-reg::backdrop { background: rgba(0, 0, 0, 0.68); }
.af-reg [hidden] { display: none !important; }

.af-reg-panel {
  flex: 0 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  border-radius: inherit;
  background: var(--af-sheet);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.af-reg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 26px 28px 0; }
.af-reg-head h2 { font-size: clamp(21px, 1.7vw, 24px); font-weight: 650; letter-spacing: -0.03em; line-height: 1.15; outline: none; }
.af-reg-head p { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--muted); max-width: 44ch; }
.af-reg-x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin: -4px -6px 0 0; border-radius: 999px; background: var(--fill); color: var(--ink-2); transition: background-color var(--t-ui); }
.af-reg-x:hover { background: var(--fill-hover); }
.af-reg-x svg { width: 16px; height: 16px; }

.af-reg-form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.af-reg-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 20px 28px 0; }
.af-reg-progress i { height: 4px; border-radius: 99px; background: var(--fill); transition: background-color 0.4s var(--ease-quint); }
.af-reg-form[data-step="1"] .af-reg-progress i:nth-child(-n+1),
.af-reg-form[data-step="2"] .af-reg-progress i:nth-child(-n+2),
.af-reg-form[data-step="3"] .af-reg-progress i { background: var(--accent); }
.af-reg-stepname { padding: 10px 28px 0; font-size: 13px; font-weight: 560; color: var(--muted); }
.af-reg-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 28px 24px; }

.af-reg-step { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; min-width: 0; margin: 0; padding: 0; border: 0; }
.af-reg-step.is-entering { animation: supportingReveal 0.5s var(--ease-quint) both; }
.af-field { display: grid; gap: 7px; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
.af-field.is-wide { grid-column: 1 / -1; }
.af-field > label, .af-field > legend { padding: 0; font-size: 14px; font-weight: 560; line-height: 1.35; color: var(--ink-2); }
.af-field > legend { margin-bottom: 9px; }
.af-opt { margin-left: 6px; font-size: 12.5px; font-weight: 450; color: var(--muted-2); }

.af-input {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 12px;
  background: var(--af-field); color: var(--ink);
  font: inherit; font-size: 16px; line-height: 1.3;
  outline: none;
  transition: border-color var(--t-ui), background-color var(--t-ui), box-shadow var(--t-ui);
}
.af-input::placeholder { color: var(--muted-2); }
.af-input:hover { border-color: var(--line-2); }
.af-input:focus, .af-input:focus-visible { outline: none; border-color: var(--accent); background: var(--af-sheet); box-shadow: inset 0 0 0 1px var(--accent); }
.af-input[aria-invalid="true"] { border-color: var(--af-danger); }
.af-input[aria-invalid="true"]:focus { box-shadow: inset 0 0 0 1px var(--af-danger); }
textarea.af-input { height: auto; min-height: 92px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.af-select { position: relative; display: block; }
.af-select select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.af-select::after { content: ""; position: absolute; right: 17px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.af-hint { font-size: 13px; line-height: 1.4; color: var(--muted); }
.af-count { justify-self: end; font-size: 12.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.af-err { font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--af-danger); }

/* Opciones en pastillas (radio o casilla real, invisible pero enfocable) */
.af-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.af-chip { position: relative; display: inline-flex; }
.af-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.af-chip span {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: 999px;
  background: var(--af-field); color: var(--ink-2);
  font-size: 14px; font-weight: 540; white-space: nowrap;
  box-shadow: inset 0 0 0 1px transparent;
  transition: background-color var(--t-ui), color var(--t-ui), box-shadow var(--t-ui);
}
.af-chip:hover span { background: var(--fill-hover); }
.af-chip input:checked + span { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent); }
.af-chip input[type="checkbox"]:checked + span::before { content: ""; width: 13px; height: 13px; background: currentColor; -webkit-mask: url(/wp-content/plugins/recursos-worship-core/src/Modules/ThemeCanvas/site/assets/icons/presenter/icons__local-media__check.svg) center / contain no-repeat; mask: url(/wp-content/plugins/recursos-worship-core/src/Modules/ThemeCanvas/site/assets/icons/presenter/icons__local-media__check.svg) center / contain no-repeat; }
.af-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Casilla de términos */
.af-check { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.af-check input { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: 0; opacity: 0; cursor: pointer; }
.af-box { position: relative; width: 22px; height: 22px; border-radius: 7px; background: var(--af-field); box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color var(--t-ui), box-shadow var(--t-ui); }
.af-box::after { content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); opacity: 0; transition: opacity var(--t-ui); }
.af-check input:checked + .af-box { background: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.af-check input:checked + .af-box::after { opacity: 1; }
.af-check input:focus-visible + .af-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.af-check input[aria-invalid="true"] + .af-box { box-shadow: inset 0 0 0 1.5px var(--af-danger); }
.af-check a { color: var(--accent-fg); text-decoration: underline; text-underline-offset: 2px; }

/* Aviso de error de envío */
.af-reg-alert { margin: 0 28px 14px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--af-danger) 10%, transparent); color: var(--af-danger); font-size: 14px; line-height: 1.45; }
.af-reg-alert span { display: block; margin-top: 2px; color: var(--ink-2); }
.af-reg-alert a { color: var(--accent-fg); text-decoration: underline; text-underline-offset: 2px; }

.af-reg-foot { display: flex; align-items: center; gap: 10px; padding: 14px 28px 20px; border-top: 1px solid var(--line); }
.af-reg-foot .btn { height: 44px; }
.af-reg-next { margin-left: auto; min-width: 150px; }
.af-reg-foot [aria-disabled="true"] { cursor: progress; opacity: 0.75; }
.af-reg-next.is-loading::before { content: ""; width: 15px; height: 15px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: afSpin 0.8s linear infinite; }
@keyframes afSpin { to { transform: rotate(360deg); } }

/* Éxito */
.af-reg-done { display: grid; justify-items: center; gap: 14px; padding: 30px 28px; text-align: center; outline: none; }
.af-done-ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-fg); }
.af-reg-done h3 { font-size: clamp(24px, 2vw, 28px); font-weight: 650; letter-spacing: -0.03em; line-height: 1.15; }
.af-reg-done > p { max-width: 42ch; font-size: 16px; line-height: 1.5; color: var(--muted); }
.af-done-ref { font-family: "Geist Mono", ui-monospace, monospace; font-size: 12.5px; font-weight: 500; }
.af-reg-done .btn { margin-top: 6px; min-width: 160px; }
.af-reg-done > .af-done-help { font-size: 13.5px; }
.af-done-help a { color: var(--accent-fg); }

/* Entrada y salida (revelado con desenfoque, como el resto de la página) */
.af-reg[open] .af-reg-panel { animation: afRegIn 0.45s var(--ease-quint) both; }
.af-reg[open]::backdrop { animation: fadeIn 0.3s var(--ease-ui) both; }
.af-reg.is-closing .af-reg-panel { animation: afRegOut 0.2s var(--ease-ui) both; }
.af-reg.is-closing::backdrop { animation: afFadeOut 0.2s var(--ease-ui) both; }
@keyframes afRegIn { from { opacity: 0; transform: translateY(16px) scale(0.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes afRegOut { to { opacity: 0; transform: translateY(10px) scale(0.985); filter: blur(4px); } }
@keyframes afSheetIn { from { opacity: 0; transform: translateY(40px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes afSheetOut { to { opacity: 0; transform: translateY(32px); filter: blur(4px); } }
@keyframes afFadeOut { to { opacity: 0; } }

/* Móvil: hoja inferior a todo el ancho */
@media (max-width: 560px) {
  .af-reg { width: 100%; margin: auto 0 0; max-height: calc(100svh - 16px); border-radius: 24px 24px 0 0; }
  .af-reg-panel { box-shadow: inset 0 1px 0 0 var(--line); }
  .af-reg[open] .af-reg-panel { animation-name: afSheetIn; }
  .af-reg.is-closing .af-reg-panel { animation-name: afSheetOut; }
  .af-reg-head { padding: 22px 20px 0; }
  .af-reg-progress { padding: 18px 20px 0; }
  .af-reg-stepname { padding: 10px 20px 0; }
  .af-reg-body { padding: 16px 20px 22px; }
  .af-reg-step { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .af-reg-alert { margin: 0 20px 12px; }
  .af-reg-foot { padding: 12px 20px max(16px, env(safe-area-inset-bottom)); }
  .af-reg-next { flex: 1 1 auto; min-width: 0; }
  .af-reg-done { padding: 26px 20px max(26px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .af-reg[open] .af-reg-panel, .af-reg.is-closing .af-reg-panel, .af-reg-step.is-entering { animation: none !important; }
}
