/* SalConAmigos · Paridad visual escritorio/móvil/TWA · V4 · 23-10-2026
 * Una sola identidad y los mismos contenidos y accesos en todos los tamaños.
 * No cambia lógica PHP, sesiones, inscripciones, datos ni fechas de los temas.
 * Requiere la plantilla común sca-design-system.css y html.sca-ui.
 */
html.sca-ui {
  --sca-font: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  --sca-title-1: clamp(1.8rem,3.2vw,2.45rem);
  --sca-title-2: clamp(1.4rem,2.4vw,1.85rem);
  --sca-title-3: 1.18rem;
  --sca-paridad-gap: clamp(12px,2vw,22px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.sca-ui body { font-family:var(--sca-font); }
html.sca-ui :is(h1,h2,h3,button,input,select,textarea) { font-family:var(--sca-font); }
html.sca-ui :is(.heroCard,.planCard,.roleCard,.card,.formCard,.quickBtn,.infoCard,.faqCard) { max-width:100%; }
html.sca-ui :is(.heroCard,.planCard,.roleCard,.card,.formCard,.quickBtn,.infoCard,.faqCard) img { max-width:100%; height:auto; }
html.sca-ui :is(.topbar,.hero,.quickSection,.section,.wrap,.plan-wrap) { min-width:0; }
html.sca-ui .heroCard > *, html.sca-ui .planGrid > *, html.sca-ui .quickGrid > * { min-width:0; }
html.sca-ui .topbar nav { flex-wrap:wrap; }
html.sca-ui .topbar .brand img { object-fit:contain; flex:none; }
/* Un mismo encuadre completo: no recortar la fotografía de portada en móvil. */
html.sca-ui:not(.sca-halloween2026) .hero .heroImage { background-size:contain; background-position:center; }
html.sca-ui .hero .heroActions .btn { white-space:normal; }
html.sca-ui .sca-home-steps li, html.sca-ui .planCard { overflow-wrap:break-word; }
/* Evita texto ilegible en fondos oscuros, también al usar móvil o TWA. */
html.sca-ui.sca-halloween2026 .plansSection .sectionTitle,
html.sca-ui.sca-halloween2026 .aboutSection .sca-home-intro { color:#fff0df; }
html.sca-ui.sca-halloween2026 .plansSection .sectionTitle :is(h2,p),
html.sca-ui.sca-halloween2026 .aboutSection .sca-home-intro :is(h2,p) { color:#ffe9d6; }
html.sca-ui.sca-halloween2026 .plansSection > div[style] > span[style] { color:#ffdfc3 !important; }
@media (max-width:700px) {
  html.sca-ui { --sca-title-1:clamp(1.75rem,7vw,2.15rem); --sca-title-2:clamp(1.45rem,5vw,1.85rem); }
  html.sca-ui body > header .topbar {
    display:flex; flex-wrap:wrap; align-items:center; justify-content:center;
    width:100%; gap:9px; padding:10px 12px;
  }
  html.sca-ui body > header .topbar .brand { width:100%; justify-content:center; gap:9px; text-align:left; }
  html.sca-ui body > header .topbar .brand img { width:40px; height:40px; }
  html.sca-ui body > header .topbar .brand strong { font-size:1.08rem; }
  html.sca-ui body > header .topbar .brand span { display:block; font-size:.74rem; line-height:1.2; }
  /* Todos los enlaces principales del PC siguen disponibles en el teléfono y TWA. */
  html.sca-ui body > header .topbar nav {
    display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px; width:100%; min-width:0;
  }
  html.sca-ui body > header .topbar nav .btn,
  html.sca-ui body > header .topbar nav .btn.ghost {
    display:inline-flex; min-width:0; width:100%; min-height:44px;
    padding:10px 5px; border-radius:12px; font-size:.83rem;
    line-height:1.2; white-space:normal; text-align:center;
  }
  html.sca-ui .hero .pill { display:inline-flex; max-width:100%; white-space:normal; width:fit-content; }
  html.sca-ui .hero .heroNote { display:flex; }
  html.sca-ui:not(.sca-halloween2026) .hero .heroImage { aspect-ratio:7 / 4; background-size:contain; background-position:center; }
  html.sca-ui .hero .subtitle { display:block; overflow:visible; }
  html.sca-ui .quickSection .quickGrid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  html.sca-ui .quickSection .quickBtn { align-items:flex-start; text-align:left; min-height:0; padding:14px; }
  html.sca-ui .quickSection .quickBtn span { display:block; font-size:.84rem; }
  html.sca-ui .introSection .seoText p:nth-child(2) { display:block; }
  html.sca-ui .creatorIdentity { display:grid; }
  html.sca-ui .creatorBlock { display:grid; grid-template-columns:1fr; }
  html.sca-ui .plansSection .sectionTitle > .btn { display:inline-flex; }
  html.sca-ui .pressMini, html.sca-ui .pressCard { max-width:100%; }
  html.sca-ui .plansSection .planGrid { display:grid; grid-template-columns:1fr; overflow:visible; }
  html.sca-ui .plansSection .planCard { min-width:0; }
  html.sca-ui .plansSection .sca-plan-actions { flex-direction:column; }
  html.sca-ui .plansSection .sca-plan-actions > * { flex:0 0 auto; width:100%; }
}
@media(max-width:365px) {
  html.sca-ui body > header .topbar nav .btn { font-size:.75rem; padding-inline:4px; }
  html.sca-ui .hero .heroActions { display:grid; grid-template-columns:1fr; }
  html.sca-ui .quickSection .quickGrid { grid-template-columns:1fr; }
}
@media(prefers-reduced-motion:reduce) {
  html.sca-ui :is(.planCard,.quickBtn,.heroCard) { transition:none; }
}

/* V4.1 | Ayuda en móvil: botón accesible sin tapar los formularios o tarjetas.
 * El motor JS coloca el enlace al final de <body>. En teléfono pasa a fluir
 * con el contenido en lugar de superponerse; PC conserva botón flotante. */
@media (max-width: 900px) {
  html.sca-ui a.sca-ayuda-flotante {
    position: static !important;
    inset: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    top: auto !important;
    display: flex;
    width: max-content;
    max-width: calc(100% - 32px);
    min-height: 44px;
    margin: 20px auto 30px;
    padding: 12px 16px;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
    transform: none !important;
  }
}
