﻿
  /* Font fallback metric overrides — minimize CLS on font swap */
  @font-face {
    font-family: 'Source Sans 3';
    src: local('Arial'), local('Helvetica Neue'), local('Helvetica');
    ascent-override: 97.74%; descent-override: 26.92%;
    line-gap-override: 0%; size-adjust: 100.03%;
    unicode-range: U+0000-00FF;
  }
  @font-face {
    font-family: 'Merriweather';
    src: local('Georgia'), local('Times New Roman');
    ascent-override: 94%; descent-override: 31%;
    line-gap-override: 0%; size-adjust: 98%;
    unicode-range: U+0000-00FF;
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --blue-dark: #1d4ed8;
    --blue-mid:  #3b82f6;
    --blue-light:#dce8ff;
    --red:       #d52b1e;
    --red-light: #fde8e6;
    --green:     #1a7a4a;
    --green-light:#e6f7ee;
    --amber:     #b45309;
    --amber-light:#fef3c7;
    --teal:      #0891b2;
    --purple:    #6d28d9;
    --orange:    #c2410c;
    --indigo:    #4338ca;
    --gray-100:  #f0f4ff;
    --gray-200:  #dde4f0;
    --gray-400:  #6b7a96;
    --gray-700:  #2d3a55;
    --text:      #000000;
    --text-muted:#3a4d70;
    --border:    #ccd6ee;
    --white:     #ffffff;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow:    0 2px 6px rgba(0,51,160,0.10), 0 6px 20px rgba(0,51,160,0.07);
    --shadow-hover: 0 6px 16px rgba(0,51,160,0.18), 0 12px 36px rgba(0,51,160,0.13);
    --chile-red:  #d52b1e;
    --chile-blue: #1d4ed8;
  }

  body {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 19px;
    color: var(--text);
    background: #faf8f3;
    line-height: 1.65;
    min-height: 100vh;
  }

  /* ── HERO MI VEJEZ ── */
  .site-hero {
    background: linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 55%, #3b82f6 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .site-hero::after { display: none; }
  .hero-ilustracion {
    width: 100%;
    display: block;
    line-height: 0;
    background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%);
  }
  .hero-ilustracion svg {
    width: 100%;
    height: auto;
    display: block;
    max-height: 340px;
  }
  @media (max-width: 640px) {
    .hero-ilustracion { display: none; }
  }
  .hero-contenido {
    padding: 0.6rem 1.2rem 0.8rem;
    position: relative;
    z-index: 2;
  }
  .hero-titulo {
    font-family: 'Merriweather', serif;
    font-size: clamp(1.6rem, 5vw, 2.8rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.35rem;
    text-shadow: 0 3px 20px rgba(0,0,0,0.45);
    letter-spacing: -0.01em;
    line-height: 1.15;
  }
  .hero-estrella {
    display: inline-block;
    animation: estrellaGiro 4s ease-in-out infinite;
    margin-right: 6px;
  }
  @media (prefers-reduced-motion: reduce) {
    .hero-estrella { animation: none; }
  }
  @keyframes estrellaGiro {
    0%,100% { transform: rotate(0deg) scale(1); }
    50%      { transform: rotate(18deg) scale(1.15); }
  }
  .hero-sub {
    font-size: 1.15rem;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.01em;
    margin: 0.6rem auto 1rem;
    max-width: 620px;
    line-height: 1.6;
  }
  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 100px;
    padding: 5px 16px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 1.1rem;
  }
  .btn-compartir-wa {
    display: inline-flex; align-items: center; gap: 8px;
    background: #0a7a3d; color: white;
    border: 1.5px solid rgba(255,255,255,0.4); border-radius: 100px;
    padding: 9px 20px; font-size: 0.92rem; font-weight: 700;
    text-decoration: none; cursor: pointer;
    transition: background .2s, transform .15s, border-color .2s;
    margin-top: 6px;
  }
  /* Vuelto a verde sólido a pedido del usuario (27/07) — la versión
     translúcida (auditoría UX 23/07, para no competir con el buscador de
     comuna) se revirtió porque se prefiere que "compartir" sea reconocible
     de un vistazo como acción de WhatsApp. */
  .btn-compartir-wa:hover { background: #086b35; border-color: rgba(255,255,255,0.6); transform: translateY(-1px); }
  .btn-compartir-wa:focus-visible { outline: 3px solid #fbbf24; outline-offset: 3px; }
  @media (max-width: 640px) {
    .hero-titulo { font-size: 2rem; }
    .hero-ilustracion svg { max-height: 200px; }
    .hero-sub { font-size: 1.05rem; }
  }

  /* ── FRANJA BANDERA ── */
  .flag-stripe {
    height: 10px;
    background: linear-gradient(90deg, var(--chile-red) 33.3%, #fff 33.3% 66.6%, var(--chile-blue) 66.6%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  }

  /* ── BANNER ECONÓMICO ── */
  .info-banner {
    background: #1e3a8a;
    color: rgba(255,255,255,0.92);
    font-size: 1rem;
    padding: 12px 1.4rem;
    font-family: 'Source Sans 3', sans-serif;
  }
  .info-banner-inner {
    display: flex;
    gap: 6px 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
  }
  .banner-sep   { color: rgba(255,255,255,0.25); }
  .banner-item  { display: flex; align-items: center; gap: 6px; }
  .banner-label { color: rgba(255,255,255,0.92); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; }
  .banner-val   { color: #fbbf24; font-weight: 800; font-size: 1.1rem; }
  .banner-fecha { color: rgba(255,255,255,0.88); font-weight: 600; font-size: 0.95rem; }
  .banner-hora  { color: #6ee7b7; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.04em; }
  .banner-loading { opacity: 0.45; font-style: italic; }
  @keyframes bannerPulse { 0%,100%{color:#fbbf24} 50%{color:#34d399} }
  .banner-updated { animation: bannerPulse 1.2s ease; }
  @media (max-width: 600px) {
    .info-banner  { padding: 8px 1rem; }
    .banner-sep   { display: none; }
    .banner-val   { font-size: 1.15rem; }
    .banner-label { font-size: 0.88rem; }
    .info-banner-inner { gap: 6px 18px; justify-content: center; }
  }
  /* Las 3 barras de arriba (fono mayor, indicadores, emergencias) ocupan
     media pantalla en mobile por el line-height por defecto al pasar a 2
     líneas — se aprieta el interlineado y el padding vertical acá, SIN
     tocar font-size (los adultos mayores necesitan el texto grande, el
     problema era el espacio entre líneas, no el tamaño). Auditoría UX 23/07. */
  @media (max-width: 600px) {
    .fono-mayor-bar, .emergency-strip { line-height: 1.25; }
    .fono-mayor-bar  { padding: 6px 12px; }
    .emergency-strip { padding: 0.6rem 0.75rem; }
    .emergency-strip span { margin: 0 0.4rem; }
  }

  /* ── HEADER ── */
  .site-header {
    background: linear-gradient(150deg, #1e3a8a 0%, #1d4ed8 50%, #3b82f6 100%);
    color: white;
    padding: 1rem 1.5rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid var(--chile-red);
  }
  .site-header::before {
    content:'';
    position:absolute; top:-40%; left:-5%;
    width:55%; height:220%;
    background:rgba(255,255,255,0.05);
    transform:rotate(-18deg);
    pointer-events:none;
  }
  .site-header h1 {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.6rem;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  .site-header p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    max-width: 580px;
    margin: 0 auto 1rem;
  }
  .header-actions {
    display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 0.9rem;
  }
  .btn-aa {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Source Sans 3', sans-serif;
    transition: background 0.15s;
    letter-spacing: 0.03em;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .btn-aa:hover { background: rgba(255,255,255,0.25); }
  .btn-aa.activo { background: white; color: var(--blue-dark); }
  .emergency-strip {
    background: linear-gradient(90deg, #a01010 0%, #d52b1e 40%, #d52b1e 60%, #a01010 100%);
    color: white;
    text-align: center;
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 3px 12px rgba(213,43,30,0.45);
  }
  .emergency-strip span { margin: 0 0.6rem; font-size: 1.05rem; }
  .emergency-strip a {
    color: #ffd700 !important;
    text-decoration: none !important;
    font-weight: 800 !important;
    background: rgba(0,0,0,0.18);
    padding: 3px 10px;
    border-radius: 20px;
    transition: background 0.15s;
  }
  .emergency-strip a:hover { background: rgba(0,0,0,0.35); }

  /* ── LAYOUT ── */
  .container { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

  /* ── SELECTOR BOX ── */
  .selector-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--chile-blue);
    transition: box-shadow .3s, border-color .3s;
  }
  @keyframes pulseBorde {
    0%,100% { box-shadow: var(--shadow); border-color: var(--border); }
    50% { box-shadow: 0 0 0 5px rgba(29,78,216,0.28); border-color: var(--blue); }
  }
  .selector-card.highlight-pulse { animation: pulseBorde .55s ease 3; }
  .cat-aviso-ciudad {
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px;
    padding: 11px 16px; font-size: 0.92rem; color: #1d4ed8; font-weight: 600;
    text-align: center; margin-bottom: 14px; display: none;
  }
  #cat-section.sin-comuna .cat-aviso-ciudad { display: block; }
  #cat-section.sin-comuna .cat-tile { opacity: 0.72; }
  .selector-card h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--blue-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .selector-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
  }
  .sel-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 160px;
  }
  .sel-group label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
  }
  .sel-group select {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    color: var(--text);
    background: var(--gray-100);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 15px 14px;
    cursor: pointer;
    min-height: 56px;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
  }
  .sel-group select:focus { outline: none; border-color: var(--blue-mid); box-shadow: 0 0 0 3px rgba(26,92,184,0.13); }
  .sel-group select:disabled { opacity: 0.6; cursor: not-allowed; background: #f0f4ff; color: #6b7280; }
  .sel-grupo-hint { font-size: 0.78rem; color: var(--blue); margin-top: 5px; display: none; font-weight: 600; }
  .sel-grupo-hint.visible { display: block; }

  .location-badge {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    padding: 10px 16px;
    background: var(--blue-light);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--blue-dark);
    font-weight: 500;
  }
  .location-badge svg { flex-shrink: 0; }

  /* ── TABS (category filter) ── */
  .tab-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
  }
  .tab-btn {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 100px;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    min-height: 44px;
  }
  .tab-btn:hover { border-color: var(--chile-blue); color: var(--chile-blue); }
  .tab-btn.active { background: var(--chile-blue); border-color: var(--chile-blue); color: white; }
  .tab-btn:focus-visible { outline: 3px solid var(--chile-blue); outline-offset: 3px; }
  .btn-aa:focus-visible, .btn-volver:focus-visible, .btn-whatsapp:focus-visible { outline: 3px solid #fbbf24; outline-offset: 3px; }

  /* ── MAP ── */
  .map-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow);
    position: relative;
  }
  .map-wrap iframe { width: 100%; height: 320px; border: none; display: block; }
  .gmaps-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--blue-dark);
    color: white;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 16px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 10px;
  }
  .gmaps-btn:hover { background: var(--blue-mid); }

  /* ── SECTION LABEL ── */
  .section-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 2rem 0 0.85rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .section-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  }
  .dot-red    { background: var(--red); }
  .dot-green  { background: var(--green); }
  .dot-blue   { background: var(--blue-mid); }
  .dot-amber  { background: var(--amber); }
  .dot-teal   { background: var(--teal); }
  .dot-purple { background: var(--purple); }
  .dot-orange { background: var(--orange); }
  .dot-indigo { background: var(--indigo); }

  /* Skip link accesibilidad */
  .skip-link {
    position: absolute; top: -9999px; left: 1rem; z-index: 9999;
    background: var(--blue); color: #fff; padding: 0.5rem 1rem;
    border-radius: 0 0 8px 8px; font-weight: 700; font-size: 1rem;
    text-decoration: none;
  }
  .skip-link:focus { top: 0; }

  /* Texto solo para lectores de pantalla */
  .visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }

  /* ── CARDS GRID ── */
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
  }
  .live-feed-section {
    background: #f0f4ff;
    border: 1.5px solid #c7d9f5;
    border-radius: 14px;
    padding: 1rem 1.1rem 1.1rem;
    margin-top: 18px;
  }
  /* ── CONTENIDO LOCAL SUPABASE (Plan Básico municipios) ── */
  .supa-local-section { margin-bottom: 18px; }
  .supa-local-hdr { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--blue); background: rgba(29,78,216,.08); border-left: 3px solid var(--blue); padding: 6px 12px; border-radius: 0 6px 6px 0; margin-bottom: 8px; }
  .supa-local-card { background: var(--card, #fff); border: 1.5px solid rgba(29,78,216,.18); border-radius: 12px; padding: 14px 16px; box-shadow: 0 2px 8px rgba(29,78,216,.06); margin-bottom: 8px; }
  .supa-sec-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #5a6a85); margin-bottom: 6px; }
  .supa-row { display: flex; flex-direction: column; gap: 2px; padding: 7px 0; border-bottom: 1px solid var(--border, #e5e7eb); }
  .supa-row:last-child { border-bottom: none; }
  .supa-label { font-size: .88rem; font-weight: 600; color: var(--text); }
  .supa-val { font-size: .85rem; color: var(--muted, #5a6a85); margin-top: 1px; }
  .supa-val a, .supa-row a { color: var(--blue); text-decoration: none; }
  .supa-list { margin: 6px 0 4px 18px; font-size: .88rem; color: var(--text); line-height: 1.7; }
  .live-feed-titulo {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 10px;
  }
  .live-feed-items { display: flex; flex-direction: column; gap: 8px; }
  .live-feed-item {
    display: flex;
    flex-direction: column;
    padding: 10px 13px;
    background: var(--white);
    border-radius: 9px;
    border: 1px solid #dde6f7;
    text-decoration: none;
    color: #1e293b;
    transition: background 0.15s;
  }
  .live-feed-item:hover { background: #e8f0fe; }
  .live-feed-item:focus-visible { background: #e8f0fe; outline: 3px solid var(--blue); outline-offset: -2px; }
  .live-feed-item-titulo { font-size: 0.9rem; font-weight: 600; line-height: 1.45; }
  .live-feed-item-fecha { font-size: 0.85rem; color: var(--text-muted); margin-top: 3px; }

  .card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.18s, box-shadow 0.18s;
  }
  .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
  }
  /* Tarjeta patrocinada (Caja de Compensación nivel Plata/Oro) — posición
     preferencial y resalte visual, ver s.destacada en buildCard(). */
  .card-destacada {
    border: 2px solid var(--amber);
    box-shadow: 0 0 0 3px var(--amber-light), var(--shadow);
  }
  .card-badge-destacado {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--amber); color: #fff;
    font-size: 0.72rem; font-weight: 700;
    padding: 3px 10px; border-radius: 20px;
    letter-spacing: .02em; text-transform: uppercase;
    flex-shrink: 0;
  }
  .card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.1rem 0.85rem;
    border-bottom: 1px solid var(--gray-200);
  }
  .card-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
  }
  .card-title { font-size: 1.02rem; font-weight: 700; color: var(--text); line-height: 1.3; margin: 0; }
  .card-sub   { font-size: 0.95rem; color: var(--text-muted); margin-top: 3px; }

  .card-body { padding: 0.75rem 1.1rem; flex: 1; }
  .info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--gray-200);
  }
  .info-row:last-child { border-bottom: none; }
  .info-icon { font-size: 15px; color: var(--gray-400); margin-top: 3px; flex-shrink: 0; }
  .info-label { font-size: 1rem; color: var(--text-muted); margin-bottom: 2px; font-weight: 700; letter-spacing: 0.01em; }
  .info-value { font-size: 1.05rem; color: var(--text); line-height: 1.6; }
  .info-value.big { font-size: 1.55rem; font-weight: 700; color: var(--blue-dark); line-height: 1.15; }
  .info-value a { color: var(--blue-mid); text-decoration: none; }
  .info-value a:hover { text-decoration: underline; }
  .card-cta-btn {
    display: block; width: 100%; text-align: center;
    background: var(--chile-blue); color: #fff;
    font-weight: 700; font-size: 0.97rem;
    padding: 0.7rem 1rem; border-radius: var(--radius-md);
    text-decoration: none; letter-spacing: 0.3px;
    transition: background 0.15s;
  }
  .card-cta-btn:hover { background: #1e3a8a; }
  .card-cta-btn.rojo { background: var(--chile-red); }
  .card-cta-btn.rojo:hover { background: #a01010; }
  .tel-link { color: var(--blue-mid); text-decoration: none; font-weight: 600; border-bottom: 1.5px dotted var(--blue-mid); }
  .tel-link:hover { border-bottom-style: solid; }

  .badge-em   { display: inline-block; background: var(--red); color: #fff; font-size: 0.85rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; margin-top: 4px; }
  .badge-free { display: inline-block; background: var(--green); color: #fff; font-size: 0.85rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; margin-top: 4px; }
  .badge-local{ display: inline-block; background: var(--amber); color: #fff; font-size: 0.85rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; margin-top: 4px; }

  .local-tag {
    font-size: 0.7rem; font-weight: 700; background: var(--amber-light); color: var(--amber);
    padding: 3px 10px; border-radius: 100px; margin-left: 6px; vertical-align: middle;
  }

  /* ── NIVEL DE RELEVANCIA GEOGRÁFICA (comunal / regional / nacional) ── */
  .nivel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 10px 0 6px;
    margin-top: 4px;
  }
  .card-body .nivel-header:first-child { margin-top: 0; padding-top: 0; }
  .nivel-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
  .nivel-comunal  .nivel-dot { background: var(--blue-mid); }
  .nivel-regional .nivel-dot { background: var(--teal); }
  .nivel-nacional .nivel-dot { background: var(--gray-400); }
  body.texto-grande .nivel-header    { font-size: 0.92rem; }
  body.texto-muygrande .nivel-header { font-size: 1rem; }

  /* ── EMPTY STATE ── */
  .empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
  }
  .empty-state svg { display: block; margin: 0 auto 1rem; opacity: 0.35; }
  .empty-state p { font-size: 1.05rem; }

  /* ── PANEL NÚMEROS DE EMERGENCIA ── */
  .emerg-panel {
    background: #fff;
    border: 2px solid #d52b1e;
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 18px rgba(213,43,30,0.13);
  }
  .emerg-panel-titulo {
    text-align: center;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #d52b1e;
    margin-bottom: 0.85rem;
  }
  .emerg-lista     { display: flex; flex-direction: column; gap: 10px; }
  .emerg-grid      { display: none; }
  .emerg-grid-full { display: none; }
  .emerg-grid-top  { display: none; }
  .emerg-grid-mid  { display: none; }
  .emerg-grid-bot  { display: none; }
  .emerg-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    border: none;
    cursor: pointer;
    min-height: 68px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.13);
  }
  .emerg-btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.18); }
  .emerg-btn:active { transform: scale(0.97); }
  .emerg-icono  { font-size: 2rem; line-height: 1; flex-shrink: 0; width: 36px; text-align: center; }
  .emerg-numero { font-size: 2rem; font-weight: 900; line-height: 1; letter-spacing: -0.02em; flex-shrink: 0; white-space: nowrap; }
  .emerg-label  { font-size: 0.92rem; font-weight: 700; line-height: 1.3; opacity: 1; flex: 1; }
  .emerg-btn.rojo   { background: #d52b1e; color: white; }
  .emerg-btn.azul   { background: #1d4ed8; color: white; }
  .emerg-btn.verde  { background: #1a7a4a; color: white; }
  .emerg-btn.gris   { background: #2d3a55; color: white; }
  .emerg-btn.naranjo{ background: #b45309; color: white; }
  .emerg-btn.teal   { background: #0e7490; color: white; }
  @media (max-width: 360px) {
    .emerg-numero { font-size: 1.6rem; }
    .emerg-icono  { font-size: 1.7rem; }
    .emerg-btn    { padding: 12px 14px; gap: 10px; }
  }

  /* ── FAMILIAR DE CONFIANZA ── */
  .emerg-familiar-box { background: #f0fdf4; border: 2px solid #16a34a; border-radius: 14px; padding: 16px; margin-top: 10px; }
  .emerg-familiar-titulo { font-size: 1rem; font-weight: 800; color: #15803d; margin-bottom: 12px; text-align: center; }
  .emerg-familiar-contacto { background: white; border: 1px solid #d1fae5; border-radius: 10px; padding: 12px; margin-bottom: 10px; }
  .emerg-familiar-contacto-titulo { font-size: 0.85rem; font-weight: 700; color: #166534; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
  .emerg-familiar-label { display: block; font-size: 1rem; font-weight: 700; color: #1f2937; margin-bottom: 4px; margin-top: 10px; }
  .emerg-familiar-input { display: block; width: 100%; box-sizing: border-box; padding: 13px 14px; border-radius: 10px; border: 2px solid #6ee7b7; font-size: 1.15rem; background: white; color: #111827; outline: none; }
  .emerg-familiar-input:focus { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.15); }
  .emerg-familiar-input::placeholder { color: #9ca3af; }
  .emerg-familiar-guardar { margin-top: 14px; width: 100%; padding: 15px; border-radius: 10px; border: none; background: #16a34a; color: white; font-size: 1.15rem; font-weight: 800; cursor: pointer; }
  .emerg-familiar-guardar:active { background: #15803d; transform: scale(0.98); }
  .emerg-familiar-editar { margin-top: 8px; width: 100%; background: white; border: 1px solid #6ee7b7; color: #166534; border-radius: 8px; padding: 10px; font-size: 0.95rem; cursor: pointer; font-weight: 600; }
  .emerg-familiar-toast { text-align: center; font-size: 1.05rem; font-weight: 800; color: #16a34a; background: #dcfce7; border-radius: 8px; padding: 10px; display: none; margin-top: 8px; }
  .emerg-btn.verde { background: #16a34a; color: white; }
  .emerg-familiar-llamadas { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }

  /* ── RECORDATORIOS ── */
  .rec-section { padding: 0 0 1rem; }
  .rec-form-card { background: #fff7ed; border: 2px solid #f97316; border-radius: 14px; padding: 18px; margin-bottom: 16px; }
  .rec-form-titulo { font-size: 1.1rem; font-weight: 800; color: #c2410c; margin-bottom: 14px; }
  .rec-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
  .rec-cat { padding: 8px 14px; border-radius: 20px; border: 2px solid #fed7aa; background: white; font-size: 0.95rem; font-weight: 700; cursor: pointer; color: #9a3412; transition: all 0.15s; min-height: 44px; }
  .rec-cat.active { background: #f97316; color: white; border-color: #f97316; }
  .rec-label { display: block; font-size: 1rem; font-weight: 700; color: #1f2937; margin: 10px 0 4px; }
  .rec-input { display: block; width: 100%; box-sizing: border-box; padding: 13px 14px; border-radius: 10px; border: 2px solid #fed7aa; font-size: 1.1rem; background: white; color: #111827; outline: none; }
  .rec-input:focus { border-color: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,0.15); }
  .rec-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .rec-guardar { margin-top: 14px; width: 100%; padding: 15px; border-radius: 10px; border: none; background: #f97316; color: white; font-size: 1.1rem; font-weight: 800; cursor: pointer; }
  .rec-guardar:active { background: #ea580c; transform: scale(0.98); }
  .rec-toast { display: none; text-align: center; font-weight: 800; color: #b64d05; background: #ffedd5; border-radius: 8px; padding: 10px; margin-top: 8px; }
  .rec-lista-titulo { font-size: 1rem; font-weight: 800; color: #374151; margin: 16px 0 10px; }
  .rec-item { background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; margin-bottom: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
  .rec-item-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
  .rec-item-icono { font-size: 1.6rem; flex-shrink: 0; }
  .rec-item-info { flex: 1; }
  .rec-item-nombre { font-size: 1.05rem; font-weight: 800; color: #111827; }
  .rec-item-detalle { font-size: 0.88rem; color: #6b7280; margin-top: 2px; }
  .rec-item-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
  .rec-btn-gcal { flex: 1; padding: 10px 8px; border-radius: 8px; border: none; background: #4285f4; color: white; font-size: 0.88rem; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center; display: block; }
  .rec-btn-ical { flex: 1; padding: 10px 8px; border-radius: 8px; border: none; background: #6d28d9; color: white; font-size: 0.88rem; font-weight: 700; cursor: pointer; text-align: center; }
  .rec-btn-del  { padding: 10px 12px; border-radius: 8px; border: none; background: #fdecea; color: #b91c1c; font-size: 0.88rem; font-weight: 700; cursor: pointer; }
  .rec-vacia { text-align: center; color: #6d7787; font-size: 0.95rem; padding: 20px 0; }
  /* Indicador alarmas activas */
  .rec-indicador { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 0.9rem; font-weight: 700; }
  .rec-indicador.activo { background: #dcfce7; color: #166534; }
  .rec-indicador.inactivo { background: #fef2f2; color: #991b1b; }
  .rec-indicador-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
  .rec-indicador.activo .rec-indicador-dot { background: #22c55e; animation: pulsar 1.5s infinite; }
  .rec-indicador.inactivo .rec-indicador-dot { background: #ef4444; }
  @keyframes pulsar { 0%,100%{opacity:1} 50%{opacity:0.4} }
  /* Pastillero del día */
  .rec-pastillero { background: #fffbeb; border: 2px solid #fbbf24; border-radius: 12px; padding: 14px; margin-bottom: 14px; }
  .rec-pastillero-titulo { font-size: 0.9rem; font-weight: 800; color: #92400e; margin-bottom: 10px; }
  .rec-pastillero-items { display: flex; flex-direction: column; gap: 6px; }
  .rec-pastillero-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: white; border-radius: 8px; border: 1px solid #fde68a; }
  .rec-pastillero-hora { font-size: 1.1rem; font-weight: 900; color: #92400e; min-width: 50px; }
  .rec-pastillero-nombre { font-size: 0.95rem; font-weight: 700; color: #1f2937; flex: 1; }
  .rec-pastillero-ok { padding: 8px 14px; border-radius: 6px; border: none; font-size: 0.95rem; font-weight: 700; cursor: pointer; min-height: 44px; }
  .rec-pastillero-ok.tomado { background: #bbf7d0; color: #14532d; }
  .rec-pastillero-ok.pendiente { background: #ea580c; color: white; }
  /* Plantillas */
  .rec-plantillas { margin-bottom: 14px; }
  .rec-plantillas-titulo { font-size: 0.85rem; font-weight: 700; color: #9a3412; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
  .rec-plantillas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .rec-plantilla-btn { padding: 12px 8px; border-radius: 10px; border: 2px solid #fed7aa; background: white; font-size: 0.9rem; font-weight: 700; color: #c2410c; cursor: pointer; text-align: center; line-height: 1.3; }
  .rec-plantilla-btn:active { background: #fff7ed; }
  /* Notas */
  .rec-notas { display: block; width: 100%; box-sizing: border-box; padding: 10px 14px; border-radius: 10px; border: 2px solid #fed7aa; font-size: 1rem; background: white; color: #374151; resize: none; font-family: inherit; margin-top: 4px; }
  .rec-notas:focus { border-color: #f97316; outline: none; }
  /* Pastillas counter */
  .rec-pastillas-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
  /* Export/Import */
  .rec-backup { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
  .rec-btn-export { flex:1; padding: 11px 8px; border-radius: 8px; border: none; background: #1d4ed8; color: white; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
  .rec-btn-import { flex:1; padding: 11px 8px; border-radius: 8px; border: 2px solid #1d4ed8; background: white; color: #1d4ed8; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
  /* WhatsApp en recordatorio */
  .rec-btn-wa { flex:1; padding: 10px 8px; border-radius: 8px; border: none; background: #0a7a3d; color: white; font-size: 0.88rem; font-weight: 700; cursor: pointer; }
  /* Cuidador */
  .rec-cuidador-box { background: #f0f9ff; border: 2px solid #0284c7; border-radius: 14px; padding: 16px; margin: 14px 0; }
  .rec-cuidador-titulo { font-size: 1rem; font-weight: 800; color: #0c4a6e; margin-bottom: 12px; }
  .rec-cuidador-btn { margin-top: 10px; width: 100%; padding: 11px; border-radius: 8px; border: none; background: #027cba; color: white; font-size: 1rem; font-weight: 700; cursor: pointer; }
  .rec-btn-resumen { width: 100%; padding: 15px; border-radius: 10px; border: none; background: #0a7a3d; color: white; font-size: 1.1rem; font-weight: 800; cursor: pointer; margin-top: 10px; }
  .rec-btn-resumen:active { background: #16a34a; transform: scale(0.98); }
  .rec-cuidador-hint { font-size: 0.88rem; color: #374151; margin-top: 8px; text-align: center; }
  /* Banner alarma pantalla completa */
  .alarm-banner { position: fixed; inset: 0; z-index: 9999; background: rgba(0,51,160,0.95); display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; text-align: center; padding: 2rem; }
  .alarm-banner-icono { font-size: 5rem; margin-bottom: 1rem; animation: rebote 0.6s infinite alternate; }
  @keyframes rebote { from{transform:scale(1)} to{transform:scale(1.15)} }
  .alarm-banner-titulo { font-size: 1.4rem; font-weight: 800; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
  .alarm-banner-nombre { font-size: 1.8rem; font-weight: 900; margin-bottom: 0.5rem; }
  .alarm-banner-notas { font-size: 1rem; opacity: 0.85; margin-bottom: 2rem; }
  .alarm-banner-ok { background: white; color: #1d4ed8; border: none; border-radius: 14px; padding: 1rem 3rem; font-size: 1.3rem; font-weight: 800; cursor: pointer; margin-bottom: 12px; width: 100%; max-width: 300px; }
  .alarm-banner-tomado { background: #22c55e; color: white; border: none; border-radius: 14px; padding: 0.9rem 2rem; font-size: 1.1rem; font-weight: 700; cursor: pointer; width: 100%; max-width: 300px; }

  /* ── BOTTOM NAVIGATION BAR ── */
  .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 990; background: white; border-top: 1px solid #e5e7eb; display: flex; align-items: stretch; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(0,0,0,0.10); }
  .bottom-nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px 4px; border: none; background: none; cursor: pointer; color: #6b7280; font-size: 1rem; font-weight: 700; min-height: 56px; text-decoration: none; transition: color 0.15s, background 0.15s; }
  .bottom-nav-btn:active { background: #f3f4f6; }
  .bottom-nav-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; border-radius: 8px; }

  /* ── Asistente IA ─────────────────────────────────────────────────────────── */
  .asistente-wrap { display:flex; flex-direction:column; gap:16px; }
  .asistente-intro { background:linear-gradient(135deg,#1d4ed8,#4338ca); border-radius:16px; padding:20px 24px; color:white; }
  .asistente-intro-titulo { font-size:1.2rem; font-weight:800; margin-bottom:4px; }
  .asistente-intro-sub { font-size:0.9rem; opacity:0.88; margin-bottom:14px; line-height:1.5; }
  .asistente-sugs { display:flex; flex-wrap:wrap; gap:8px; }
  .asistente-sug { background:rgba(255,255,255,0.17); border:1px solid rgba(255,255,255,0.28); border-radius:100px; padding:6px 14px; font-size:0.82rem; color:white; cursor:pointer; font-family:inherit; transition:background .2s; }
  .asistente-sug:hover { background:rgba(255,255,255,0.30); }
  .asistente-chat { background:var(--white); border-radius:16px; border:1px solid var(--border); overflow:hidden; }
  .asistente-mensajes { min-height:0; max-height:400px; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:12px; }
  .asistente-mensajes:empty { padding:0; }
  .msg-user { align-self:flex-end; background:#1d4ed8; color:white; border-radius:18px 18px 4px 18px; padding:10px 16px; max-width:82%; font-size:0.97rem; line-height:1.5; word-break:break-word; }
  .msg-bot { align-self:flex-start; background:#f1f5f9; color:#0f172a; border-radius:18px 18px 18px 4px; padding:12px 16px; max-width:90%; font-size:0.97rem; line-height:1.65; word-break:break-word; }
  .msg-bot strong { color:#1d4ed8; }
  .msg-loading { align-self:flex-start; display:flex; gap:5px; padding:14px 18px; }
  .msg-loading span { width:9px; height:9px; border-radius:50%; background:#94a3b8; animation:dotPulse 1.2s infinite; }
  .msg-loading span:nth-child(2) { animation-delay:.2s; }
  .msg-loading span:nth-child(3) { animation-delay:.4s; }
  @keyframes dotPulse { 0%,60%,100%{transform:none;opacity:.45} 30%{transform:translateY(-7px);opacity:1} }
  @keyframes dotPulseReducido { 0%,60%,100%{opacity:.45} 30%{opacity:1} }
  .asistente-input-row { display:flex; gap:10px; padding:12px 14px; background:var(--white); border-radius:16px; border:1.5px solid var(--blue); align-items:flex-end; }
  .asistente-input { flex:1; border:1.5px solid var(--border); border-radius:12px; padding:10px 14px; font-size:1rem; font-family:inherit; resize:none; outline:none; line-height:1.4; max-height:120px; transition:border-color .2s; background:var(--white); color:var(--text); }
  .asistente-input:focus { border-color:var(--blue); }
  .asistente-send { background:var(--blue); color:white; border:none; border-radius:12px; padding:10px 16px; cursor:pointer; flex-shrink:0; transition:background .2s; }
  .asistente-send:hover { background:#1e40af; }
  .asistente-send:disabled { background:#94a3b8; cursor:not-allowed; }
  .mic-teclado-aviso { font-size:0.82rem; color:var(--text-muted); text-align:center; margin-top:6px; }
  .asistente-footer { font-size:0.75rem; color:var(--text-muted); text-align:center; }
  /* Buscador IA */
  .busq-ia-btn { display:block; width:100%; margin-top:8px; background:#eff6ff; border:1px solid #bfdbfe; border-radius:8px; padding:8px 14px; font-size:0.88rem; color:#1d4ed8; font-weight:600; cursor:pointer; font-family:inherit; text-align:left; transition:background .2s; }
  .busq-ia-btn:hover { background:#dbeafe; }
  .busq-ia-resultado { padding:14px 16px; }
  .busq-ia-resp { font-size:0.92rem; color:var(--text); line-height:1.55; margin-bottom:10px; }
  .busq-ia-nav { display:inline-flex; align-items:center; gap:6px; background:var(--blue); color:white; border:none; border-radius:10px; padding:8px 16px; font-size:0.9rem; font-weight:600; cursor:pointer; font-family:inherit; }
  .busq-ia-nav:hover { background:#1e40af; }
  .bottom-nav-btn.activo { color: #1d4ed8; }
  .bottom-nav-btn.activo .bnav-icono { transform: scale(1.1); }
  .bottom-nav-btn.activo::after {
    content: '';
    display: block;
    width: 20px; height: 3px;
    background: currentColor;
    border-radius: 2px;
    margin-top: 2px;
  }
  .bottom-nav-btn.bnav-emerg { color: #d52b1e; }
  .bottom-nav-btn.bnav-emerg.activo { color: #d52b1e; }
  .bnav-icono { font-size: 1.9rem; line-height: 1; transition: transform 0.15s; }
  body { padding-bottom: 64px; }
  @media (prefers-color-scheme: dark) {
    .bottom-nav { background: #1f2937; border-top-color: #374151; }
    .bottom-nav-btn { color: #9ca3af; }
    .bottom-nav-btn.activo { color: #60a5fa; }
  }

  /* ── FAB SAMU ── */
  /* display:none por defecto — en mobile el hero es más alto que el
     viewport, así que estos flotantes tapaban el botón "Compartir con mi
     familia" y el buscador en el primer pantallazo (auditoría UX 23/07).
     JS los muestra recién al pasar el hero, mismo patrón que #btn-top. */
  .btn-fab-samu { position: fixed; bottom: 145px; right: 18px; z-index: 998; display: none; align-items: center; gap: 8px; background: #d52b1e; color: white; font-weight: 800; font-size: 1rem; padding: 12px 16px; border-radius: 50px; text-decoration: none; box-shadow: 0 4px 16px rgba(213,43,30,0.35); transition: transform 0.15s, box-shadow 0.15s; min-height: 48px; }
  .btn-fab-samu:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(213,43,30,0.45); }
  .btn-fab-samu:active { transform: scale(0.96); }
  .btn-fab-samu-txt { font-size: 1rem; font-weight: 900; }
  @media (max-width: 480px) { .btn-fab-samu { bottom: 138px; right: 14px; padding: 11px 14px; } }

  /* ── BOTÓN FLOTANTE SUGERENCIAS WHATSAPP ── */
  .btn-sugerencias {
    position: fixed;
    bottom: 80px;
    right: 18px;
    z-index: 999;
    display: none;
    align-items: center;
    gap: 10px;
    background: #1d4ed8;
    color: white;
    font-weight: 800;
    font-size: 1rem;
    padding: 13px 18px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(0,0,0,0.22);
    transition: transform 0.15s, box-shadow 0.15s;
    border: none;
    cursor: pointer;
    min-height: 52px;
  }
  .btn-sugerencias:hover  { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.28); }
  .btn-sugerencias:active { transform: scale(0.96); }
  .btn-sugerencias-icono  { font-size: 1.5rem; line-height: 1; }
  @media (max-width: 480px) {
    .btn-sugerencias { bottom: 72px; right: 14px; padding: 12px 15px; font-size: 0.93rem; }
  }

  /* ── AVISO BENEFICIO DESTACADO ── */
  .aviso-beneficio {
    background: linear-gradient(135deg, #fff8f0 0%, #fff3e0 100%);
    border: 2px solid #f97316;
    border-left: 6px solid #d52b1e;
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 2px 12px rgba(213,43,30,0.10);
  }
  .aviso-beneficio-icono {
    font-size: 2.4rem;
    line-height: 1;
    flex-shrink: 0;
  }
  .aviso-beneficio-cuerpo { flex: 1; min-width: 0; }
  .aviso-beneficio-titulo {
    font-size: 1.05rem;
    font-weight: 800;
    color: #7c1f0a;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .aviso-chip {
    background: #d52b1e;
    color: white;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 100px;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }
  .aviso-beneficio-desc {
    font-size: 0.97rem;
    color: #5c3000;
    line-height: 1.5;
    margin-bottom: 0.6rem;
  }
  .aviso-beneficio-pasos {
    font-size: 0.9rem;
    color: #6b3d00;
    margin-bottom: 0.7rem;
    line-height: 1.6;
  }
  .aviso-beneficio-pasos strong { color: #7c1f0a; }
  .aviso-beneficio-btns {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .aviso-btn-prim {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #d52b1e;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    padding: 12px 20px;
    min-height: 48px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background 0.15s;
  }
  .aviso-btn-prim:hover { background: #a01010; }
  .aviso-btn-sec {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: white;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 1rem;
    padding: 12px 20px;
    min-height: 48px;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: 1.5px solid #1d4ed8;
    transition: background 0.15s;
  }
  .aviso-btn-sec:hover { background: #dce8ff; }
  @media (max-width: 500px) {
    .aviso-beneficio { flex-direction: column; gap: 0.6rem; }
    .aviso-beneficio-icono { font-size: 2rem; }
  }

  /* ── FOOTER ── */
  .site-footer {
    background: #001040;
    border-top: 5px solid var(--chile-red);
    color: rgba(255,255,255,0.92);
    text-align: center;
    padding: 2rem 1.5rem calc(220px + env(safe-area-inset-bottom, 0px));
    font-size: 0.93rem;
    margin-top: 3rem;
    line-height: 1.7;
  }
  .site-footer strong { color: #fbbf24; }
  .site-footer a { color: #93c5fd; text-decoration: underline; text-underline-offset: 3px; }

  /* ── PASOS ── */
  .step-badge {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--chile-red); color: white;
    font-size: 1rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; box-shadow: 0 2px 8px rgba(213,43,30,0.35);
  }
  .step-header {
    display: flex; align-items: center; gap: 12px; margin-bottom: 1.1rem;
  }
  .step-header h2 { font-size: 1.1rem; font-weight: 700; color: var(--chile-blue); margin: 0; }

  /* ── TILES CATEGORÍAS ── */
  .cat-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow);
    animation: fadeUp 0.28s ease;
  }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @media (prefers-reduced-motion: reduce) {
    .cat-section, .content-area { animation: none; }
  }
  .category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  @media (max-width: 390px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
  }
  .cat-tile {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 11px; padding: 24px 10px;
    border-radius: var(--radius-lg);
    border: 2.5px solid transparent;
    background: var(--tl, #f5f6f8);
    color: var(--tc, #3d4451);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.15s ease;
    font-family: 'Source Sans 3', sans-serif;
    text-align: center; min-height: 140px;
  }
  .cat-tile:hover {
    border-color: var(--tc, #3d4451);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  }
  .cat-tile.active {
    background: var(--tc, #1c2333);
    color: white !important;
    border-color: var(--tc, #1c2333);
    box-shadow: 0 4px 18px rgba(0,0,0,0.22);
    transform: translateY(-2px);
  }
  .cat-tile-icon  { font-size: 3.2rem; line-height: 1; }
  .cat-tile-icon svg, .bnav-icono svg { width: 1em; height: 1em; display: block; }
  .cat-tile-label { font-size: 1.05rem; font-weight: 700; line-height: 1.25; }
  .cat-tile:focus-visible { outline: 3px solid var(--tc, var(--blue-mid)); outline-offset: 3px; }
  /* El botón de favorito (cat-fav-btn) ya NO va dentro de .cat-tile — un
     <button> con otro <button> adentro es HTML inválido y confunde a
     lectores de pantalla (WCAG 4.1.2). Ahora es hermano del tile dentro de
     este wrapper, que ocupa exactamente el espacio que antes ocupaba el
     tile en la grilla y sirve de referencia para el position:absolute. */
  .cat-tile-wrap { position: relative; display: flex; }
  .cat-tile-wrap .cat-tile { flex: 1; width: 100%; }
  .cat-fav-btn {
    position: absolute; top: 0; right: 0;
    background: none; border: none; cursor: pointer;
    font-size: 1.1rem; padding: 0; line-height: 1;
    opacity: 0.55; transition: opacity 0.15s, transform 0.15s;
    z-index: 2; min-width: 44px; min-height: 44px;
    display: flex; align-items: center; justify-content: center;
  }
  .cat-fav-btn:hover, .cat-fav-btn.activo { opacity: 1; transform: scale(1.2); }

  /* ── FAVORITOS (Mis Accesos Directos) ── */
  .favoritos-section { margin-bottom: 14px; }
  .favoritos-titulo {
    font-size: 0.9rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 8px; display: flex; align-items: center; gap: 5px;
  }
  .favoritos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  @media (max-width: 480px) { .favoritos-grid { grid-template-columns: repeat(2, 1fr); } }
  .fav-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; padding: 10px 6px; background: var(--card-bg, #ffffff);
    border-radius: var(--radius-md, 10px); border: 2px solid var(--blue-mid);
    cursor: pointer; transition: all 0.15s; min-height: 80px;
    font-size: 0.88rem; font-weight: 700; color: var(--blue);
    text-align: center; line-height: 1.2;
  }
  .fav-tile:hover  { background: var(--blue-light, #e8f0fc); transform: translateY(-2px); }
  .fav-tile:active { transform: scale(0.96); }
  .fav-tile-icon   { font-size: 1.7rem; line-height: 1; }
  body.texto-grande  .fav-tile { font-size: 0.96rem; min-height: 90px; }
  body.texto-muygrande .fav-tile { font-size: 1.05rem; min-height: 100px; }

  /* ── WELCOME / EMPTY STATES ── */
  .welcome-state {
    text-align: center; padding: 3rem 1rem 3.5rem;
    color: var(--text-muted);
  }
  .welcome-icon { font-size: 4rem; margin-bottom: 1rem; line-height: 1; }
  .welcome-state h3 { font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
  .welcome-state p  { font-size: 1rem; max-width: 440px; margin: 0 auto; }

  /* ── CONTENIDO ACTIVO ── */
  .content-area { animation: fadeUp 0.22s ease; }

  /* ── BARRA DE ACCIONES ── */
  .action-bar {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    align-items: center; margin-bottom: 1rem;
    padding: 0.6rem 0;
  }
  .btn-volver {
    display: inline-flex; align-items: center; gap: 6px;
    background: white; border: 1.5px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-muted);
    font-size: 0.88rem; font-weight: 600; padding: 11px 18px; min-height: 48px;
    cursor: pointer; font-family: 'Source Sans 3', sans-serif;
    transition: border-color 0.15s, color 0.15s; text-decoration: none;
  }
  .btn-volver:hover { border-color: var(--blue-mid); color: var(--blue-mid); }
  .btn-whatsapp {
    display: inline-flex; align-items: center; gap: 6px;
    background: #0a7a3d; color: white; border: none;
    border-radius: var(--radius-md); font-size: 0.88rem; font-weight: 600;
    padding: 11px 18px; min-height: 48px; cursor: pointer;
    font-family: 'Source Sans 3', sans-serif; text-decoration: none;
    transition: background 0.15s;
  }
  .btn-whatsapp:hover { background: #096b36; }
  .session-badge {
    margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
    background: var(--green-light); color: var(--green);
    font-size: 0.78rem; font-weight: 700; padding: 4px 12px;
    border-radius: 100px;
  }

  /* ── BARRA STICKY DE SECCIÓN ── */
  #sticky-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 800;
    background: rgba(13,59,122,0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    display: none;
    align-items: center;
    gap: 12px;
    will-change: transform;
    transform: translateZ(0);
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 3px 16px rgba(0,0,0,0.35);
    border-bottom: 2px solid rgba(251,191,36,0.5);
  }
  #sticky-nav .sticky-icon { font-size: 1.3rem; }
  #sticky-nav .sticky-label { flex: 1; }
  #sticky-nav .sticky-back {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 10px 18px;
    min-height: 44px;
    border-radius: 100px;
    cursor: pointer;
    font-family: 'Source Sans 3', sans-serif;
  }
  #sticky-nav .sticky-back:hover { background: rgba(255,255,255,0.28); }

  /* ── BOTÓN SUBIR (flotante) ── */
  #btn-top {
    position: fixed; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); left: 18px;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--blue-dark); color: white;
    border: 2px solid rgba(255,255,255,0.2);
    font-size: 1.3rem; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    display: none; align-items: center; justify-content: center;
    z-index: 995; transition: background 0.15s, transform 0.15s;
    will-change: transform;
  }
  #btn-top:hover { background: var(--blue-mid); transform: translateY(-3px); }

  /* ── MODO TEXTO GRANDE ── */
  /* Texto Grande (120%) */
  body.texto-grande { font-size: 21px; }
  body.texto-grande .info-label { font-size: 1.05rem; }
  body.texto-grande .info-value { font-size: 1.12rem; }
  body.texto-grande .info-value.big { font-size: 1.75rem; }
  body.texto-grande .card-title { font-size: 1.18rem; }
  body.texto-grande .card-sub { font-size: 1rem; }
  body.texto-grande .cat-tile-label { font-size: 1.15rem; }
  body.texto-grande .cat-tile { min-height: 125px; }
  body.texto-grande .sel-group select { font-size: 1.15rem; padding: 13px 14px; }
  body.texto-grande .hoy-item { font-size: 1rem; }
  body.texto-grande .badge-em, body.texto-grande .badge-free, body.texto-grande .badge-local { font-size: 0.88rem; }
  body.texto-grande .hoy-sec-label { font-size: 0.88rem; }
  body.texto-grande .ben-card-badge { font-size: 0.78rem; }
  body.texto-grande .busq-sub { font-size: 0.9rem; }
  body.texto-grande .nc-fecha { font-size: 0.88rem; }
  body.texto-grande .hoy-item.ver-mas { font-size: 0.86rem; }
  body.texto-grande .bottom-nav-btn { font-size: 1rem; }
  body.texto-grande .cat-fav-btn { font-size: 1.2rem; }
  /* Texto Muy Grande (140%) */
  body.texto-muygrande { font-size: 24px; }
  body.texto-muygrande .info-label { font-size: 1.1rem; }
  body.texto-muygrande .info-value { font-size: 1.2rem; }
  body.texto-muygrande .info-value.big { font-size: 1.9rem; }
  body.texto-muygrande .card-title { font-size: 1.25rem; }
  body.texto-muygrande .card-sub { font-size: 1.05rem; }
  body.texto-muygrande .cat-tile-label { font-size: 1.25rem; }
  body.texto-muygrande .cat-tile { min-height: 140px; }
  body.texto-muygrande .sel-group select { font-size: 1.25rem; padding: 14px 16px; }
  body.texto-muygrande .hoy-item { font-size: 1.05rem; }
  body.texto-muygrande .badge-em, body.texto-muygrande .badge-free, body.texto-muygrande .badge-local { font-size: 0.95rem; }
  body.texto-muygrande .hoy-sec-label { font-size: 0.94rem; }
  body.texto-muygrande .ben-card-badge { font-size: 0.82rem; }
  body.texto-muygrande .busq-sub { font-size: 0.95rem; }
  body.texto-muygrande .nc-fecha { font-size: 0.92rem; }
  body.texto-muygrande .hoy-item.ver-mas { font-size: 0.9rem; }
  body.texto-muygrande .bottom-nav-btn { font-size: 0.84rem; }
  body.texto-muygrande .cat-fav-btn { font-size: 1.3rem; }

  /* ── BUSCADOR GLOBAL ── */
  .header-search {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.24);
    border: 1.5px solid rgba(255,255,255,0.55);
    border-radius: 30px;
    padding: 0 12px;
    gap: 6px;
    flex: 1;
    max-width: 340px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transition: background 0.2s, border-color 0.2s;
  }
  /* Fondo/borde más marcados que antes (0.15/0.35 → 0.24/0.55) + sombra
     propia — es el buscador, la acción principal del hero, y antes se
     perdía visualmente contra "Compartir con mi familia" que tenía
     relleno sólido (auditoría UX 23/07). */
  .header-search:focus-within {
    background: rgba(255,255,255,0.32);
    border-color: rgba(255,255,255,0.8);
  }
  .header-search-icon { font-size: 1rem; opacity: 0.75; flex-shrink: 0; }
  #buscador-global {
    background: none;
    border: none;
    outline: none;
    color: white;
    font-size: 1rem;
    width: 100%;
    padding: 8px 0;
    font-family: inherit;
    min-width: 0;
  }
  #buscador-global::placeholder { color: rgba(255,255,255,0.55); }
  #buscador-global::-webkit-search-cancel-button { display: none; }
  #buscador-limpiar {
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
  }
  #buscador-limpiar:hover { color: white; }
  .busqueda-sin-cat {
    text-align: center;
    color: #64748b;
    padding: 1.5rem 1rem;
    font-size: 0.95rem;
  }

  /* ── DROPDOWN DE BÚSQUEDA ── */
  #busqueda-dropdown {
    position: fixed;
    z-index: 9000;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.22);
    border: 1px solid #e2e8f0;
    max-height: 70vh;
    overflow-y: auto;
    min-width: 300px;
    max-width: 420px;
  }
  .busq-grupo {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 10px 16px 4px;
  }
  .busq-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s;
  }
  .busq-item:last-child { border-bottom: none; }
  .busq-item:hover { background: #f0f7ff; }
  .busq-item:active { background: #dbeafe; }
  .busq-icon { font-size: 1.5rem; flex-shrink: 0; width: 36px; text-align: center; }
  .busq-texto { flex: 1; min-width: 0; }
  .busq-titulo { font-size: 0.97rem; font-weight: 700; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .busq-sub { font-size: 0.78rem; color: #64748b; margin-top: 1px; }
  .busq-flecha { color: #94a3b8; font-size: 1.1rem; flex-shrink: 0; }
  .busq-vacio { padding: 20px 16px; color: #64748b; font-size: 0.95rem; text-align: center; }
  .busq-sin-comuna { padding: 10px 16px 14px; color: #0369a1; font-size: 0.82rem; background: #f0f9ff; border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }

  /* ── BARRA DE BÚSQUEDA DE TARJETAS ── */
  .search-bar-wrap { margin-bottom: 1rem; }
  .search-bar-input {
    width: 100%; max-width: 420px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem; color: var(--text);
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 100px;
    padding: 13px 18px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .search-bar-input:focus {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(26,92,184,0.13);
  }

  .search-nada { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); font-size: 0.97rem; }

  /* ── IMPRESIÓN ── */
  @media print {
    .info-banner, .emergency-strip, .flag-stripe,
    .selector-card, .cat-section, .hoy-strip,
    .action-bar, #btn-top,
    .header-actions, .site-footer, .gmaps-btn { display:none !important; }
    .site-header { padding: 1rem; }
    .container { padding: 0; }
    .card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; margin-bottom: 12px; }
    body { font-size: 11pt; }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
  }

  @media (max-width: 700px) {
    .site-header h1 { font-size: 1.35rem; }
    .cards-grid { grid-template-columns: 1fr; }
    .selector-row { flex-direction: column; }
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .cat-tile { min-height: 115px; padding: 18px 10px; }
    .cat-tile-icon { font-size: 2.4rem; }
    .cat-tile-label { font-size: 0.97rem; }
    #btn-top { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); left: 14px; width: 50px; height: 50px; font-size: 1.1rem; }
  }
  @media (max-width: 400px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-tile { min-height: 100px; padding: 14px 8px; }
    .cat-tile-label { font-size: 0.95rem; }
  }

  /* ── BANNER BENEFICIOS NO RECLAMADOS ── */
  .banner-beneficios {
    background: linear-gradient(90deg, #92400e 0%, #b45309 100%);
    color: white;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    position: relative;
    box-shadow: 0 2px 8px rgba(180,83,9,0.25);
  }
  .banner-beneficios-ico { font-size: 1.5rem; flex-shrink: 0; }
  .banner-beneficios-txt { flex: 1; font-size: 0.95rem; line-height: 1.45; }
  .banner-beneficios-txt strong { display: block; font-size: 1rem; margin-bottom: 2px; }
  .banner-beneficios-cta {
    background: #fbbf24; color: #1c1917; font-weight: 800;
    border: none; border-radius: 100px; padding: 7px 16px;
    font-size: 0.88rem; cursor: pointer; white-space: nowrap;
    font-family: inherit; flex-shrink: 0; min-height: 38px;
    transition: background .2s;
  }
  .banner-beneficios-cta:hover { background: #f59e0b; }
  .banner-beneficios-x {
    background: none; border: none; color: rgba(255,255,255,0.65);
    font-size: 1.2rem; cursor: pointer; padding: 4px 6px;
    flex-shrink: 0; line-height: 1; border-radius: 4px;
  }
  .banner-beneficios-x:hover { color: white; background: rgba(255,255,255,0.15); }

  /* Banner de patrocinio RSE (Caja de Compensación nivel Oro) — mismo
     patrón que .banner-beneficios, azul en vez de ámbar para diferenciarlos
     cuando aparecen juntos. Ver CAJA_PATROCINIO en index.html. */
  .banner-caja-patrocinio {
    background: linear-gradient(90deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
    color: white;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    position: relative;
    box-shadow: 0 2px 8px rgba(29,78,216,0.25);
  }
  .banner-caja-patrocinio-ico { font-size: 1.5rem; flex-shrink: 0; }
  .banner-caja-patrocinio-txt { flex: 1; font-size: 0.95rem; line-height: 1.45; }
  .banner-caja-patrocinio-txt strong { display: block; font-size: 1rem; margin-bottom: 2px; }
  .banner-caja-patrocinio-cta {
    background: #fbbf24; color: #1c1917; font-weight: 800;
    border: none; border-radius: 100px; padding: 7px 16px;
    font-size: 0.88rem; cursor: pointer; white-space: nowrap;
    font-family: inherit; flex-shrink: 0; min-height: 38px;
    transition: background .2s;
  }
  .banner-caja-patrocinio-cta:hover { background: #f59e0b; }
  .banner-caja-patrocinio-x {
    background: none; border: none; color: rgba(255,255,255,0.65);
    font-size: 1.2rem; cursor: pointer; padding: 4px 6px;
    flex-shrink: 0; line-height: 1; border-radius: 4px;
  }
  .banner-caja-patrocinio-x:hover { color: white; background: rgba(255,255,255,0.15); }

  /* ── ALERTA DE NUEVOS BENEFICIOS ── */
  .alerta-sub-card {
    display: none;
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #fff;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    margin: 0 0 1rem;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
  }
  .alerta-sub-card .asc-ico { font-size: 1.4rem; flex-shrink: 0; }
  .alerta-sub-card .asc-txt { flex: 1; min-width: 140px; }
  .alerta-sub-card .asc-titulo { display: block; font-weight: 700; font-size: .97rem; margin-bottom: 2px; }
  .alerta-sub-card .asc-desc { font-size: .84rem; opacity: .9; }
  .alerta-sub-card .asc-form { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
  .alerta-sub-card .asc-input {
    flex: 1; min-width: 170px;
    border: 1.5px solid rgba(255,255,255,.3);
    border-radius: 8px; padding: .57rem .85rem;
    font-size: .9rem; background: rgba(255,255,255,.13); color: #fff;
    transition: border-color .18s; font-family: inherit;
  }
  .alerta-sub-card .asc-input:focus { outline: none; border-color: rgba(255,255,255,.75); }
  .alerta-sub-card .asc-input::placeholder { color: rgba(255,255,255,.58); }
  .alerta-sub-card .asc-btn {
    background: #fbbf24; color: #1e3a8a; border: none;
    border-radius: 8px; padding: .57rem 1.1rem;
    font-size: .9rem; font-weight: 700; cursor: pointer; white-space: nowrap;
    transition: background .18s; font-family: inherit;
  }
  .alerta-sub-card .asc-btn:hover { background: #f59e0b; }
  .alerta-sub-card .asc-btn:disabled { opacity: .7; cursor: default; }
  .alerta-sub-card .asc-ok {
    display: none; width: 100%;
    text-align: center; font-weight: 600; font-size: .95rem; padding: .3rem 0;
  }
  .alerta-sub-card .asc-cerrar {
    position: absolute; top: .3rem; right: .35rem;
    background: none; border: none; color: rgba(255,255,255,.6);
    font-size: .95rem; cursor: pointer;
    border-radius: 4px; line-height: 1;
    min-width: 24px; min-height: 24px;
    display: flex; align-items: center; justify-content: center;
  }
  .alerta-sub-card .asc-cerrar:hover { color: #fff; background: rgba(255,255,255,.15); }

  /* ── SERVICIOS CERCANOS (Google Maps) ── */
  .mapa-gmaps-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:8px; }
  .mapa-gmaps-btn {
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
    padding:20px 12px; border-radius:14px; border:1.5px solid var(--border);
    background:white; cursor:pointer; font-family:inherit; min-height:88px;
    transition:border-color .15s, background .15s;
  }
  .mapa-gmaps-btn:hover { border-color:var(--green); background:#f0fdf4; }
  .mapa-gmaps-btn:active { background:#dcfce7; }
  .mapa-gmaps-btn:focus-visible { outline:3px solid var(--green); outline-offset:2px; }
  .mapa-gmaps-icono { font-size:2rem; line-height:1; }
  .mapa-gmaps-label { font-size:.92rem; font-weight:700; color:var(--text); }
  .mapa-nota { font-size:.75rem; color:var(--text-muted); text-align:center; }

  /* ── CALCULADORA FEATURED ── */
  .cat-wizard-featured {
    background: linear-gradient(120deg, #1e3a8a 0%, #4338ca 100%);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: opacity .15s;
    box-shadow: 0 4px 14px rgba(67,56,202,0.3);
  }
  .cat-wizard-featured:hover { opacity: .92; }
  .cat-wizard-featured:focus-visible { outline: 3px solid #fbbf24; outline-offset: 3px; }
  .cwf-icon { font-size: 2rem; flex-shrink: 0; }
  .cwf-body { flex: 1; }
  .cwf-titulo { font-size: 1.05rem; font-weight: 800; color: white; margin-bottom: 3px; }
  .cwf-sub { font-size: 0.85rem; color: rgba(255,255,255,.80); line-height: 1.4; }
  .cwf-arrow { font-size: 1.4rem; color: #fbbf24; flex-shrink: 0; font-weight: 900; }

  /* ── PREGUNTA RÁPIDA ── */
  .pregunta-rapida {
    background: var(--white);
    border: 1.5px solid #c7d2fe;
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 6px rgba(79,70,229,0.08);
  }
  .pq-titulo {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--purple);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .pq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .pq-chip {
    background: #eef2ff; color: #3730a3;
    border: 1.5px solid #c7d2fe; border-radius: 100px;
    padding: 7px 15px; font-size: 0.88rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: all .15s; min-height: 38px;
  }
  .pq-chip:hover { background: #e0e7ff; border-color: #818cf8; }
  .pq-chip:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }

  /* ── FRANJA HOY ── */
  .hoy-strip {
    background: linear-gradient(135deg, #0d3b7a 0%, #1a5cb8 100%);
    color: white;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin: 0.6rem 0 0.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: fadeUp 0.3s ease;
  }
  .hoy-header {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
  }
  .hoy-title { font-weight: 700; font-size: 0.93rem; color: #fde68a; white-space: nowrap; flex: 1; min-width: 0; }
  .hoy-clima { color: #a7f3d0; font-size: 0.82rem; white-space: nowrap; }
  .hoy-refresh-btn {
    background: rgba(255,255,255,0.18); border: 1.5px solid rgba(255,255,255,0.35);
    color: white; border-radius: 100px; padding: 3px 10px; font-size: 0.76rem;
    font-weight: 700; cursor: pointer; font-family: inherit;
    transition: background 0.15s; white-space: nowrap; margin-left: auto;
  }
  .hoy-refresh-btn:hover { background: rgba(255,255,255,0.3); }
  .hoy-refresh-btn.girando { animation: giraBtnIcon 0.9s linear infinite; }
  @keyframes giraBtnIcon { to { transform: rotate(360deg); } }
  .hoy-section { display: flex; flex-direction: column; gap: 0.3rem; }
  .hoy-sec-header {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    cursor: pointer; user-select: none;
  }
  .hoy-sec-label {
    font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em;
    text-transform: uppercase; white-space: nowrap;
  }
  .hoy-sec-label.dcto   { color: #fbbf24; }
  .hoy-sec-label.banco  { color: #34d399; }
  .hoy-sec-label.viaje  { color: #7dd3fc; }
  .hoy-sec-toggle-btn {
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.75); border-radius: 100px;
    padding: 1px 8px; font-size: 0.7rem; font-weight: 700;
    cursor: pointer; font-family: inherit; white-space: nowrap;
    min-height: 24px; min-width: 24px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .hoy-items-row {
    display: flex; flex-wrap: wrap; gap: 0.3rem;
  }
  .hoy-item {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 16px;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    color: white;
    text-decoration: none;
    transition: background 0.15s;
    line-height: 1.35;
  }
  .hoy-item:hover { background: rgba(255,255,255,0.25); }
  .hoy-item.dcto   { background: rgba(251,191,36,0.18);  border-color: rgba(251,191,36,0.4); }
  .hoy-item.turno  { background: rgba(52,211,153,0.18);  border-color: rgba(52,211,153,0.45); }
  .hoy-item.banco  { background: rgba(16,185,129,0.18);  border-color: rgba(16,185,129,0.45); }
  .hoy-item.libre  { color: rgba(255,255,255,0.75); font-style: italic; }
  .hoy-item.viaje  { background: rgba(14,165,233,0.18);  border-color: rgba(14,165,233,0.5); }
  .hoy-item.crucero{ background: rgba(99,102,241,0.18);  border-color: rgba(99,102,241,0.5); }
  .hoy-item.ver-mas{ opacity: 0.6; font-size: 0.82rem; }
  .hoy-act { font-size: 0.7rem; opacity: 0.5; margin-top: 0.1rem; }
  .hoy-compartir-btn {
    background: #0a7a3d; color: white; border: none; border-radius: 10px;
    padding: 0.7rem 1rem; font-size: 0.86rem; font-weight: 700;
    font-family: inherit; cursor: pointer; min-height: 44px;
    transition: background 0.15s;
  }
  .hoy-compartir-btn:hover { background: #096b36; }
  @media (max-width: 480px) {
    .hoy-item { font-size: 0.76rem; padding: 0.3rem 0.6rem; }
    .hoy-title { font-size: 0.85rem; }
  }
  /* Banner estado de conexión */
  .red-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    background: #c0392b; color: white; text-align: center;
    padding: 8px 16px; font-size: 0.92rem; font-weight: 700;
    animation: slideDown 0.3s ease;
  }
  .green-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    background: #1a7a4a; color: white; text-align: center;
    padding: 8px 16px; font-size: 0.92rem; font-weight: 700;
    animation: slideDown 0.3s ease;
  }
  @keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
  /* Indicador en vivo del banner superior */
  .live-dot {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: #34d399; margin-right: 5px; vertical-align: middle;
    animation: pulseLive 2s ease-in-out infinite;
  }
  @keyframes pulseLive { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.45;transform:scale(.7)} }

  /* ── NOTICIAS ── */
  .noticias-section { margin-top: 1.6rem; }
  .noticias-titulo { font-size: 1.05rem; font-weight: 700; color: var(--blue-dark); margin-bottom: 0.7rem; }
  .noticias-grid { display: grid; gap: 0.55rem; }
  .noticia-card {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text);
    display: block;
    transition: box-shadow 0.15s, border-color 0.15s;
  }
  .noticia-card:hover { box-shadow: var(--shadow-hover); border-color: var(--blue-mid); }
  .nc-fuente { font-size: 0.82rem; font-weight: 700; color: #0e7490; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.2rem; }
  .nc-titulo { font-size: 1.0rem; font-weight: 600; color: var(--blue-dark); line-height: 1.4; }
  .nc-fecha { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.2rem; }
  .noticias-act { font-size: 0.82rem; color: var(--text-muted); text-align: right; margin-top: 0.5rem; }
  .noticias-fallback { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }
  .noticias-fallback a { color: var(--blue-mid); }

  /* ── LECTOR DE VOZ ── */
  .btn-tts-global {
    position:fixed;
    bottom:calc(132px + env(safe-area-inset-bottom, 0px));
    left:18px;
    z-index:1200;
    background:#1a7a4a; color:white;
    border:none; border-radius:50%;
    width:54px; height:54px;
    font-size:1.5rem; cursor:pointer;
    box-shadow:0 3px 12px rgba(0,0,0,0.3);
    display:flex; align-items:center; justify-content:center;
    transition:background 0.2s;
  }
  .btn-tts-global:hover { background:#15603a; }
  .btn-tts-global.hablando { background:#c0392b; animation:pulseTTS 1s ease-in-out infinite; }
  @keyframes pulseTTS { 0%,100%{transform:scale(1)} 50%{transform:scale(1.1)} }
  @media (max-width: 480px) { .btn-tts-global { bottom:calc(128px + env(safe-area-inset-bottom, 0px)); left:14px; width:50px; height:50px; font-size:1.3rem; } }

  @media (prefers-color-scheme: dark) {
    :root {
      --white:      #1a1f2e;
      --gray-100:   #1e2435;
      --gray-200:   #2a3047;
      --border:     #3a4260;
      --text:       #e8edf8;
      --text-muted: #9ab0d8;
    }
    body { background: #111827; }
    .selector-card,
    .cat-section,
    .card,
    .emerg-panel,
    .aviso-beneficio { background: #1a1f2e; border-color: #3a4260; }
    .card-head, .info-row { border-color: #2a3047; }
    .site-footer { background: #0a1228; }
    .breadcrumb { background: #1e2435; border-color: #2a3a60; }
    .sel-group select { background: #1e2435; color: #e8edf8; border-color: #3a4260; }
    .aviso-beneficio { background: #1e1410; border-color: #7c3412; }
    .aviso-beneficio-titulo { color: #fdba74; }
    .aviso-beneficio-desc, .aviso-beneficio-pasos { color: #fed7aa; }
  }

  @media (prefers-reduced-motion: reduce) {
    .hero-estrella { animation: none; }
    .live-dot      { animation: none; }
    .content-area  { animation: none; }
    .cat-section   { animation: none; }
    .banner-updated { animation: none; }
    .rec-indicador.activo .rec-indicador-dot { animation: none; }
    .alarm-banner-icono { animation: none; }
    .hoy-refresh-btn.girando { animation: none; }
    .btn-tts-global.hablando { animation: none; }
    .marca-primaria-ring { animation: none; }
    .marca-centro-ring { animation: none; }
    .red-banner, .green-banner { animation: none; }
    #splash-puntos span { animation: none; }
    .selector-card.highlight-pulse { animation: none; }
    #splash-logo, #splash-nombre, #splash-tagline, #splash-puntos { animation: none; }
    #push-novedad-banner { animation: none; }
    .msg-loading span { animation: dotPulseReducido 1.2s infinite; }
  }

  /* ── FONO MAYOR DESTACADO ── */
  .fono-mayor-bar {
    background:linear-gradient(90deg,#d52b1e,#a01010);
    color:white; text-align:center;
    padding:8px 16px; font-size:0.95rem; font-weight:600;
    letter-spacing:0.01em;
  }
  .fono-mayor-bar a { color:#ffffff; text-decoration:none; font-size:1.1rem; font-weight:800; background:rgba(0,0,0,0.18); padding:2px 10px; border-radius:20px; }

  /* Marcadores de mapa — legacy, mantenido por compatibilidad */
  .marca-primaria-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid currentColor;
    animation: marcaPulso 2.2s ease-in-out infinite;
    pointer-events: none;
  }
  @keyframes marcaPulso {
    0%,100% { transform: scale(1);   opacity: 0.65; }
    50%      { transform: scale(1.5); opacity: 0;    }
  }
  .marca-centro-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .marca-centro-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid #fbbf24;
    animation: marcaPulso 1.8s ease-in-out infinite;
    pointer-events: none;
  }

  /* ── BREADCRUMB ── */
  .breadcrumb {
    background: #eff6ff;
    border-bottom: 1px solid #bfdbfe;
    padding: 0.45rem 1rem;
  }
  .breadcrumb ol {
    max-width: 900px;
    margin: 0 auto;
    list-style: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
  }
  .breadcrumb li {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: #1e40af;
    font-weight: 500;
  }
  .breadcrumb li + li::before {
    content: '›';
    margin-right: 0.3rem;
    color: #93c5fd;
    font-weight: 700;
  }
  .breadcrumb li span { color: #334155; }
  .breadcrumb li strong { color: #1e3a8a; }

  /* ── SPLASH SCREEN ── */
  #splash {
    position: fixed; inset: 0; z-index: 9999;
    background: linear-gradient(160deg, #1a5cb8 0%, #071f4a 100%);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  #splash.oculto {
    opacity: 0;
    transform: scale(1.04);
    pointer-events: none;
  }
  #splash-logo {
    width: 148px; height: 148px;
    border-radius: 32px;
    box-shadow: 0 0 60px rgba(251,191,36,0.35), 0 8px 32px rgba(0,0,0,0.5);
    animation: splashPop 0.7s cubic-bezier(.34,1.56,.64,1) both;
  }
  #splash-nombre {
    margin-top: 28px;
    font-size: 2.8rem;
    font-family: 'Arial Black', Arial, sans-serif;
    font-weight: 900;
    letter-spacing: 6px;
    color: #fbbf24;
    text-shadow: 0 0 24px rgba(251,191,36,0.5);
    animation: splashFade 0.6s 0.3s both;
  }
  #splash-tagline {
    margin-top: 10px;
    font-size: 1rem;
    color: rgba(255,255,255,0.72);
    letter-spacing: 1px;
    animation: splashFade 0.6s 0.5s both;
  }
  #splash-puntos {
    margin-top: 48px;
    display: flex; gap: 10px;
    animation: splashFade 0.6s 0.7s both;
  }
  #splash-puntos span {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,0.3);
    animation: splashDot 1.2s 0.8s infinite ease-in-out;
  }
  #splash-puntos span:nth-child(2) { animation-delay: 1s; }
  #splash-puntos span:nth-child(3) { animation-delay: 1.2s; }
  @keyframes splashPop {
    from { opacity:0; transform: scale(0.6); }
    to   { opacity:1; transform: scale(1); }
  }
  @keyframes splashFade {
    from { opacity:0; transform: translateY(12px); }
    to   { opacity:1; transform: translateY(0); }
  }
  @keyframes splashDot {
    0%,100% { background: rgba(255,255,255,0.25); transform: scale(1); }
    50%      { background: #fbbf24; transform: scale(1.4); }
  }
  /* ── Wizard Beneficios Inteligentes ── */
  .wiz-wrap { padding:0 4px; }
  .wiz-paso { font-size:0.78rem; font-weight:600; color:#6b7280; margin-bottom:6px; }
  .wiz-prog-wrap { background:#e5e7eb; border-radius:10px; height:7px; margin-bottom:20px; }
  .wiz-prog-bar { background:var(--blue,#1d4ed8); border-radius:10px; height:100%; transition:width .35s ease; }
  .wiz-icono-q { font-size:2rem; text-align:center; margin-bottom:8px; }
  .wiz-pregunta { font-size:1.08rem; font-weight:800; color:var(--text); line-height:1.45; margin-bottom:5px; }
  .wiz-pregunta-desc { font-size:0.83rem; color:#6b7280; margin-bottom:16px; }
  .wiz-opts { display:flex; flex-direction:column; gap:10px; margin-bottom:20px; }
  .wiz-opt { display:flex; align-items:center; gap:12px; padding:15px 16px; border-radius:14px; border:2px solid #e5e7eb; background:var(--card,#fff); font-size:0.97rem; font-weight:600; color:var(--text); cursor:pointer; font-family:inherit; text-align:left; width:100%; transition:all .15s; min-height:56px; }
  .wiz-opt:hover { border-color:#93c5fd; background:#f0f9ff; }
  .wiz-opt.sel { border-color:var(--blue,#1d4ed8); background:#eff6ff; color:#1e40af; }
  .wiz-opt-radio { font-size:1.1rem; flex-shrink:0; }
  .wiz-nav { display:flex; gap:10px; }
  .wiz-btn-prev { flex-shrink:0; padding:12px 18px; border-radius:12px; border:2px solid #e5e7eb; background:var(--card,#fff); font-size:0.92rem; font-weight:700; cursor:pointer; font-family:inherit; color:var(--text); min-height:56px; }
  .wiz-btn-next { flex:1; padding:13px 20px; border-radius:12px; border:none; background:var(--blue,#1d4ed8); color:#fff; font-size:0.97rem; font-weight:700; cursor:pointer; font-family:inherit; transition:opacity .15s; min-height:56px; }
  /* 0.45 dejaba el texto blanco en ~2.3:1 de contraste contra el fondo del
     wizard — casi ilegible con baja visión. 0.65 sube a ~3.2:1, sigue
     leyéndose "apagado"/no clickeable pero se puede leer qué dice el botón.
     Auditoría UX 24/07. */
  .wiz-btn-next:disabled { opacity:.65; cursor:not-allowed; }
  /* Resultados */
  .wiz-results-count { font-size:1.05rem; font-weight:800; color:var(--blue); }
  .wiz-results-sub { font-size:0.85rem; color:#6b7280; margin-top:2px; margin-bottom:4px; }
  .wiz-grupo-label { display:flex; align-items:center; gap:7px; margin:20px 0 8px; font-size:0.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:#6b7280; }
  .wiz-grupo-label::after { content:''; flex:1; height:1px; background:#e5e7eb; }
  .ben-card { background:var(--card,#fff); border-radius:14px; border:1.5px solid #e5e7eb; margin-bottom:10px; overflow:hidden; }
  .ben-card-head { display:flex; align-items:flex-start; gap:12px; padding:13px 14px 8px; }
  .ben-card-icon { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:1.3rem; flex-shrink:0; }
  .ben-card-titulo { font-size:0.97rem; font-weight:700; color:var(--text); line-height:1.35; }
  .ben-card-desc { font-size:0.84rem; color:#4b5563; line-height:1.5; margin-top:4px; }
  .ben-card-badge { display:inline-block; font-size:0.68rem; font-weight:700; background:#eff6ff; color:#1e40af; border-radius:8px; padding:2px 7px; margin-top:6px; }
  .ben-card-footer { display:flex; gap:8px; padding:4px 14px 12px; flex-wrap:wrap; }
  .ben-card-btn { display:inline-flex; align-items:center; gap:5px; padding:7px 13px; border-radius:9px; border:none; font-size:0.82rem; font-weight:700; cursor:pointer; font-family:inherit; text-decoration:none; }
  .ben-card-btn.prim { background:var(--blue,#1d4ed8); color:#fff; }
  .ben-card-btn.sec { background:#f3f4f6; color:#374151; border:1.5px solid #e5e7eb; }
  .wiz-reiniciar { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; padding:12px; border-radius:12px; border:2px solid #e5e7eb; background:transparent; font-size:0.9rem; font-weight:600; cursor:pointer; font-family:inherit; color:#6b7280; margin-top:18px; }
  .wiz-reiniciar:hover { border-color:#93c5fd; color:#1e40af; }
  @media (prefers-color-scheme: dark) {
    .wiz-opt { background:#1f2937; border-color:#374151; color:#e5e7eb; }
    .wiz-opt:hover { border-color:#60a5fa; background:#1e3a5f; }
    .wiz-opt.sel { border-color:#3b82f6; background:#1e3a5f; color:#93c5fd; }
    .wiz-btn-prev { background:#1f2937; border-color:#374151; color:#e5e7eb; }
    .ben-card { background:#1f2937; border-color:#374151; }
    .ben-card-titulo { color:#f9fafb; }
    .ben-card-desc { color:#9ca3af; }
    .ben-card-btn.sec { background:#374151; color:#e5e7eb; border-color:#4b5563; }
    .wiz-reiniciar { border-color:#374151; color:#9ca3af; }
    .wiz-grupo-label::after { background:#374151; }
  }
  /* ── Credibilidad — Footer de cada tarjeta ── */
  .card-fuente { display:flex; align-items:center; gap:7px; padding:8px 14px 10px; border-top:1px solid rgba(0,0,0,.06); flex-wrap:wrap; }
  .card-fuente-badge { display:inline-flex; align-items:center; gap:3px; background:#eff6ff; border-radius:10px; padding:2px 8px; font-size:0.72rem; font-weight:700; color:#1e40af; white-space:nowrap; }
  .card-fuente-fecha { font-size:0.71rem; color:#6d7787; white-space:nowrap; }
  @media (prefers-color-scheme: dark) {
    .card-fuente { border-top-color:rgba(255,255,255,.08); }
    .card-fuente-badge { background:#1e3a5f; color:#93c5fd; }
    .card-fuente-fecha { color:#818896; }
  }
  /* ── Descuentos — Pills de subcategorías ── */
  .desc-cats-bar { display:flex; flex-wrap:wrap; gap:8px; padding:2px 0 10px; margin-bottom:4px; }
  .desc-cat-pill { flex-shrink:0; padding:7px 14px; border-radius:20px; border:1.5px solid #d1d5db; background:var(--card,#fff); color:var(--text,#1f2937); font-size:0.82rem; font-weight:600; cursor:pointer; font-family:inherit; transition:all .15s; white-space:nowrap; }
  .desc-cat-pill.active { background:var(--blue,#1d4ed8); color:#fff; border-color:var(--blue,#1d4ed8); }
  .desc-cat-pill:hover:not(.active) { background:#f0f4ff; border-color:#93c5fd; }
  .desc-cercanos-btn { display:flex; align-items:center; gap:8px; width:100%; padding:11px 16px; border-radius:12px; border:none; background:linear-gradient(135deg,#059669,#10b981); color:#fff; font-size:0.9rem; font-weight:700; cursor:pointer; font-family:inherit; margin-bottom:14px; justify-content:center; box-shadow:0 2px 8px rgba(5,150,105,.22); transition:opacity .15s; }
  .desc-cercanos-btn:hover { opacity:.9; }
  .desc-cercanos-btn:disabled { opacity:.6; cursor:not-allowed; }
  @media (prefers-color-scheme: dark) {
    .desc-cat-pill { background:#1f2937; color:#e5e7eb; border-color:#374151; }
    .desc-cat-pill.active { background:#1d4ed8; color:#fff; border-color:#1d4ed8; }
    .desc-cat-pill:hover:not(.active) { background:#1e3a5f; border-color:#60a5fa; }
  }
  /* ── Separadores de grupo en el grid ──────── */
  .cat-group-label { grid-column:1/-1; font-size:0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--text-muted,#9ca3af); padding:8px 2px 2px; border-top:1px solid rgba(0,0,0,.07); margin-top:2px; }
  .cat-group-label:first-child { border-top:none; margin-top:0; padding-top:0; }
  @media (prefers-color-scheme:dark) { .cat-group-label { border-top-color:rgba(255,255,255,.07); } }
  :root[data-theme="dark"] .cat-group-label { border-top-color:rgba(255,255,255,.07); }
  /* ── Onboarding wizard ───────────────────── */
  #ob-overlay { position:fixed; inset:0; z-index:9998; background:var(--bg,#faf8f3); display:none; align-items:center; justify-content:center; padding:24px 20px; overflow-y:auto; }
  .ob-wrap { width:100%; max-width:420px; }
  .ob-logo { text-align:center; margin-bottom:22px; font-size:1.15rem; font-weight:800; color:var(--red,#d52b1e); letter-spacing:-0.01em; }
  .ob-paso { font-size:0.75rem; font-weight:700; color:var(--teal,#0d9488); text-transform:uppercase; letter-spacing:0.06em; margin-bottom:6px; }
  .ob-prog { height:5px; background:#e5e7eb; border-radius:3px; margin-bottom:24px; }
  .ob-prog-bar { height:5px; background:var(--teal,#0d9488); border-radius:3px; transition:width .3s; }
  .ob-icono { font-size:2.6rem; text-align:center; margin-bottom:10px; }
  .ob-pregunta { font-size:1.22rem; font-weight:700; color:var(--text); text-align:center; margin-bottom:20px; line-height:1.35; }
  .ob-opts { display:flex; flex-direction:column; gap:10px; margin-bottom:20px; }
  .ob-opt { border:2px solid #e5e7eb; border-radius:14px; padding:15px 18px; font-size:1.02rem; font-weight:600; background:none; color:var(--text); cursor:pointer; text-align:left; transition:border-color .15s,background .15s; font-family:inherit; min-height:56px; }
  .ob-opt:hover { border-color:var(--teal,#0d9488); }
  .ob-opt.sel { border-color:var(--teal,#0d9488); background:#f0fdf4; color:#065f46; }
  .ob-select { width:100%; padding:15px 14px; border-radius:12px; border:2px solid #e5e7eb; font-size:1rem; font-family:inherit; background:var(--bg,#faf8f3); color:var(--text); min-height:56px; }
  .ob-nav { display:flex; align-items:center; gap:12px; }
  .ob-skip { font-size:0.85rem; color:var(--text-muted,#9ca3af); background:none; border:none; cursor:pointer; padding:10px 4px; font-family:inherit; white-space:nowrap; min-height:44px; }
  .ob-next { flex:1; background:var(--teal,#0d9488); color:#fff; border:none; border-radius:12px; padding:15px; font-size:1rem; font-weight:700; cursor:pointer; font-family:inherit; transition:opacity .15s; min-height:56px; }
  .ob-next:disabled { opacity:.35; cursor:default; }
  @media (prefers-color-scheme:dark) {
    .ob-opt.sel { background:#064e3b; color:#6ee7b7; }
    .ob-select { background:#1e293b; border-color:#374151; }
  }
  :root[data-theme="dark"] .ob-opt.sel { background:#064e3b; color:#6ee7b7; }
  :root[data-theme="dark"] .ob-select { background:#1e293b; border-color:#374151; }

  /* ── Modo familiar ── */
  .familiar-toggle-wrap {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
  }
  .familiar-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    user-select: none;
  }
  .familiar-toggle-label input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--blue);
    cursor: pointer;
    flex-shrink: 0;
  }
  .familiar-nombre-wrap {
    display: none;
    margin-top: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
  }
  .familiar-nombre-input {
    flex: 1;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #111827;
    background: #fff;
    outline: none;
  }
  .familiar-nombre-input:focus { border-color: var(--blue); }
  .familiar-guardar-btn {
    background: var(--blue); color: #fff;
    border: none; border-radius: 8px;
    padding: 8px 14px; font-size: 0.88rem;
    font-weight: 700; cursor: pointer;
    font-family: inherit; white-space: nowrap;
  }
  .familiar-chip {
    display: none;
    margin-top: 8px;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    padding: 5px 12px 5px 10px;
    font-size: 0.82rem;
    color: #1d4ed8;
    font-weight: 600;
    width: fit-content;
    cursor: pointer;
  }
  .familiar-chip.activo { display: inline-flex; }
  .familiar-chip-x {
    font-size: 0.82rem;
    color: #6b7280;
    margin-left: 2px;
    font-weight: 400;
  }
  @media (prefers-color-scheme: dark) {
    .familiar-toggle-label { color: #d1d5db; }
    .familiar-toggle-wrap { border-top-color: #374151; }
    .familiar-nombre-input { background: #1f2937; border-color: #374151; color: #f9fafb; }
    .familiar-chip { background: #1e3a5f; border-color: #1d4ed8; color: #93c5fd; }
  }
  :root[data-theme="dark"] .familiar-toggle-label { color: #d1d5db; }
  :root[data-theme="dark"] .familiar-toggle-wrap { border-top-color: #374151; }
  :root[data-theme="dark"] .familiar-nombre-input { background: #1f2937; border-color: #374151; color: #f9fafb; }
  :root[data-theme="dark"] .familiar-chip { background: #1e3a5f; border-color: #1d4ed8; color: #93c5fd; }

  /* ── Banner opt-in notificaciones de novedades ── */
  #push-novedad-banner {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9100;
    background: #0d3b7a;
    color: #fff;
    padding: 12px 16px;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    animation: slideDown 0.3s ease;
  }
  #push-novedad-banner.visible { display: flex; }
  @keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
  }
  .push-novedad-txt {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
    min-width: 180px;
  }
  .push-novedad-txt strong { font-size: 0.95rem; }
  .push-novedad-btns { display: flex; gap: 8px; flex-shrink: 0; }
  .push-btn-activar {
    background: #fbbf24; color: #0d2144;
    border: none; border-radius: 8px;
    padding: 8px 16px; font-weight: 800;
    font-size: 0.88rem; cursor: pointer;
    font-family: inherit;
  }
  .push-btn-activar:active { opacity: 0.85; }
  .push-btn-cerrar {
    background: rgba(255,255,255,0.15); color: #fff;
    border: 1px solid rgba(255,255,255,0.3); border-radius: 8px;
    padding: 8px 14px; font-size: 0.88rem;
    cursor: pointer; font-family: inherit;
  }
  @media (prefers-color-scheme: dark) {
    #push-novedad-banner { background: #071f4a; }
  }
  :root[data-theme="dark"] #push-novedad-banner { background: #071f4a; }
