/* ============================================================ */
/* CLUB VIP ZOORIGEN · ESTRUCTURA DEL PANEL                      */
/* Barra superior, barra inferior del celular, cajón "Más",      */
/* WhatsApp flotante. Usa las variables --zoo-* de club.css, así */
/* que sigue solo el modo día / noche (club-theme.css).          */
/* Se carga DESPUÉS de club.css, club-mobile.css y club-theme.css */
/* ============================================================ */

:root {
  --zs-glass: rgba(16, 16, 16, 0.82);
  --zs-pill: rgba(255, 255, 255, 0.06);
  --zs-pill-line: rgba(255, 255, 255, 0.10);
  --zs-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
  --zs-bar-h: 64px;
}
[data-theme="light"] {
  --zs-glass: rgba(245, 246, 244, 0.86);
  --zs-pill: rgba(30, 30, 30, 0.05);
  --zs-pill-line: rgba(30, 30, 30, 0.12);
  --zs-shadow: 0 14px 34px rgba(33, 33, 33, 0.14);
}

/* La columna principal ya no corta a los lados con overflow:hidden (eso rompía el sticky de la barra). */
.club-main { overflow: visible !important; overflow-x: clip !important; }

/* ═══════════════ BARRA SUPERIOR ═══════════════ */
.club-main > .zs-topbar { max-width: none !important; }
.zs-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -28px -36px 22px;
  padding: 14px 36px;
  background: var(--zs-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--zoo-border);
}
.zs-search { position: relative; flex: 1 1 auto; max-width: 440px; min-width: 0; }
.zs-search__ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--zoo-text-dim); display: inline-flex; pointer-events: none; }
.zs-search input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 40px;
  border-radius: 999px;
  border: 1px solid var(--zs-pill-line);
  background: var(--zs-pill);
  color: var(--zoo-text);
  font: inherit;
  font-size: .9rem;
  outline: none;
  transition: border-color .15s, background .15s;
}
.zs-search input::placeholder { color: var(--zoo-text-dim); }
.zs-search input:focus { border-color: var(--zoo-amber); background: var(--zoo-bg-card); }
.zs-search input::-webkit-search-cancel-button { display: none; }

.zs-results {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 8px);
  background: var(--zoo-bg-card);
  border: 1px solid var(--zoo-border-strong);
  border-radius: 16px;
  box-shadow: var(--zs-shadow);
  padding: 8px;
  max-height: 60vh;
  overflow-y: auto;
  z-index: 70;
}
.zs-results[hidden] { display: none; }
.zs-results__t { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--zoo-text-dim); padding: 8px 10px 4px; }
.zs-results__vacio { padding: 14px; color: var(--zoo-text-muted); font-size: .88rem; }
.zs-res { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; color: var(--zoo-text); }
.zs-res:hover, .zs-res:focus-visible { background: color-mix(in srgb, var(--zoo-text) 7%, transparent); outline: none; }
.zs-res__ico { width: 32px; height: 32px; border-radius: 10px; background: var(--zs-pill); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--zoo-green-500); }
.zs-res strong { display: block; font-size: .9rem; font-weight: 600; line-height: 1.25; }
.zs-res small { display: block; color: var(--zoo-text-dim); font-size: .76rem; }

.zs-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.zs-btn, .zs-actions .notif-icon {
  height: 42px;
  min-width: 42px;
  border-radius: 999px;
  border: 1px solid var(--zs-pill-line);
  background: var(--zs-pill);
  color: var(--zoo-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  cursor: pointer;
  position: relative;
  transition: border-color .15s, background .15s, transform .15s;
}
.zs-btn:hover, .zs-actions .notif-icon:hover { border-color: var(--zoo-amber); background: rgba(232, 163, 23, 0.12); transform: none; }
.zs-btn:focus-visible, .zs-avatar:focus-visible, .zs-tab:focus-visible { outline: 2px solid var(--zoo-amber); outline-offset: 2px; }
.zs-theme__txt { font-size: .84rem; font-weight: 600; }
.zs-salir { display: none; color: var(--zoo-orange); border-color: rgba(213, 90, 40, 0.35); }
.zs-actions .notif-badge { top: -3px; right: -3px; }
/* el puntito naranja fijo de club.css avisaba siempre; ahora solo avisa el contador real */
.zs-actions .notif-icon::after { display: none; }

.zs-avatar { display: inline-flex; align-items: center; gap: 10px; padding: 3px 14px 3px 3px; border-radius: 999px; border: 1px solid var(--zs-pill-line); background: var(--zs-pill); color: var(--zoo-text); }
.zs-avatar:hover { border-color: var(--zoo-amber); }
.zs-avatar__circle { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--zoo-font-heading); font-weight: 700; font-size: .82rem; color: #fff; background: var(--zoo-solid, #1F5F3A); border: 2px solid var(--zoo-amber); flex-shrink: 0; }
.zs-avatar__name { font-size: .86rem; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Campana: el panel ya tenía estilo en club-mobile.css; solo lo anclamos bajo la barra */
.notif-panel.zs-notif { top: 74px; right: 24px; background: var(--zoo-bg-card); }

/* ═══════════════ BARRA INFERIOR (CELULAR Y TABLETA) ═══════════════ */
.zs-bottom, .zs-drawer, .zs-velo { display: none; }

/* Ventana "Instalar app" */
.zs-inst { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 20px; }
.zs-inst__velo { position: absolute; inset: 0; background: rgba(15, 15, 15, .55); }
.zs-inst__caja { position: relative; width: 100%; max-width: 380px; padding: 28px 24px 24px; border-radius: 20px; background: var(--zoo-bg-card); border: 1px solid var(--zoo-border-strong); box-shadow: var(--zs-shadow); text-align: center; }
.zs-inst__caja h2 { margin: 0 0 8px; font-family: var(--zoo-font-display); font-size: 1.2rem; color: var(--zoo-text); }
.zs-inst__caja p { margin: 0 0 10px; font-size: .9rem; line-height: 1.55; color: var(--zoo-text-muted); }
.zs-inst__caja ol { margin: 6px 0 4px; padding-left: 20px; text-align: left; font-size: .88rem; line-height: 1.6; color: var(--zoo-text-muted); }
.zs-inst__icono { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: rgba(232, 163, 23, 0.16); color: var(--zoo-amber); }
.zs-inst__x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: transparent; border: 0; color: var(--zoo-text-muted); cursor: pointer; }
.zs-inst__btn { display: block; width: 100%; margin-top: 8px; padding: 13px 16px; border: 0; border-radius: 12px; background: var(--zoo-amber); color: #1F1D17; font: 700 .95rem var(--zoo-font-display); cursor: pointer; }

/* el menú lateral deja un respiro abajo (ya no hay botón flotante que tape las últimas opciones) */
.club-sidebar { padding-bottom: 24px; }

.badge--nuevo { background: var(--zoo-ok-txt) !important; color: #0F1215 !important; }
[data-theme="light"] .badge--nuevo { background: var(--zoo-ok-tinte) !important; color: var(--zoo-ok-txt) !important; border: 1px solid var(--zoo-ok-borde); }

@media (max-width: 1180px) {
  .zs-avatar__name { display: none; }
  .zs-avatar { padding: 3px; }
}

@media (max-width: 980px) {
  body { padding-bottom: 0; }
  .club-layout { grid-template-columns: 1fr !important; }
  .club-sidebar, .club-sidebar-overlay, .mobile-menu-btn { display: none !important; }
  body .club-layout > .club-main { padding: 0 16px calc(var(--zs-bar-h) + 38px + env(safe-area-inset-bottom)) !important; }

  .zs-topbar { margin: 0 -16px 18px; padding: 10px 16px; gap: 10px; }
  .zs-search { max-width: none; }
  .zs-search input { height: 40px; }
  .zs-btn, .zs-actions .notif-icon { height: 38px; min-width: 38px; padding: 0; }
  .zs-theme__txt, .zs-avatar__name { display: none; }
  .zs-actions { gap: 8px; }
  .zs-avatar { padding: 2px; border: 2px solid var(--zoo-amber); background: transparent; }
  .zs-avatar__circle { width: 30px; height: 30px; border: 0; font-size: .75rem; }
  .zs-salir { display: inline-flex; }
  .zs-help { display: none; }
  .notif-panel.zs-notif { top: 64px; right: 12px; left: 12px; width: auto; max-width: none; }

  /* Barra inferior: panel flotante de esquinas redondeadas con las etiquetas siempre visibles; la pestaña activa lleva
     una "pastilla" dorada detrás del ícono (color sólido, sin degradados). */
  .zs-bottom {
    display: flex;
    position: fixed;
    left: 12px; right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    height: var(--zs-bar-h);
    padding: 6px 4px;
    gap: 0;
    z-index: 80;
    background: var(--zs-glass);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid var(--zoo-border-strong);
    border-radius: 20px;
    box-shadow: var(--zs-shadow);
  }
  .zs-tab {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border-radius: 14px;
    color: var(--zoo-text-muted);
    font-size: .75rem; font-weight: 600; letter-spacing: 0;
    transition: color .2s;
  }
  .zs-tab__ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; max-width: 48px; height: 28px; border-radius: 14px;
    transition: background .2s, color .2s;
  }
  .zs-tab.is-active { color: var(--zoo-text); font-weight: 800; }
  .zs-tab.is-active .zs-tab__ico { background: #E8B431; color: #2B2000; }

  .zs-velo { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .22s; }
  .zs-velo.is-open { opacity: 1; pointer-events: auto; }
  .zs-drawer {
    display: flex; flex-direction: column;
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(88%, 340px);
    z-index: 100;
    background: var(--zoo-bg-darker);
    border-left: 1px solid var(--zoo-border-strong);
    transform: translateX(100%);
    transition: transform .26s ease;
    overflow-y: auto;
    padding: 0 14px calc(18px + env(safe-area-inset-bottom));
  }
  .zs-drawer.is-open { transform: none; box-shadow: -24px 0 60px rgba(0, 0, 0, 0.45); }
  body.zs-noscroll { overflow: hidden; }
  .zs-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 4px 12px; border-bottom: 1px solid var(--zoo-border); position: sticky; top: 0; background: var(--zoo-bg-darker); z-index: 2; }
  .zs-drawer__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .zs-drawer__who strong { display: block; font-size: .98rem; color: var(--zoo-text); }
  .zs-drawer__who small { display: block; color: var(--zoo-marca-claro); font-size: .76rem; font-weight: 600; }
  .zs-drawer__close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--zs-pill-line); background: var(--zs-pill); color: var(--zoo-text); display: inline-flex; align-items: center; justify-content: center; }
  .zs-drawer__nav { display: flex; flex-direction: column; gap: 3px; padding-top: 6px; }
  .zs-drawer__link { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 12px; color: var(--zoo-text-muted); font-size: .95rem; font-weight: 500; }
  .zs-drawer__link .icon { width: 20px; display: inline-flex; justify-content: center; flex-shrink: 0; }
  .zs-drawer__link.is-active { background: var(--zoo-bg-card-2); color: var(--zoo-text); font-weight: 600; box-shadow: inset 3px 0 0 var(--zoo-amber); }
  .zs-drawer__link .badge { margin-left: auto; font-size: .75rem; padding: 2px 8px; border-radius: 10px; font-weight: 800; }
  .zs-drawer .club-sidebar__section { padding: 14px 10px 6px; }
  .zs-drawer__foot { margin-top: 16px; display: grid; gap: 8px; }
  .zs-drawer__btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 14px; border: 1px solid var(--zs-pill-line); background: var(--zs-pill); color: var(--zoo-text); font-weight: 600; font-size: .9rem; }
  .zs-drawer__btn--salir { color: var(--zoo-orange); border-color: rgba(213, 90, 40, 0.35); }
}

@media (max-width: 420px) {
  .zs-actions { gap: 6px; }
  .zs-btn, .zs-actions .notif-icon { height: 36px; min-width: 36px; }
  .zs-tab__txt { font-size: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .zs-drawer, .zs-velo, .zs-tab { transition: none; }
}

/* Modo día: cajón y menú lateral claros */
[data-theme="light"] .zs-drawer, [data-theme="light"] .zs-drawer__head { background: #ffffff; }
[data-theme="light"] .zs-drawer { border-left-color: #D8D2C4; }
[data-theme="light"] .zs-drawer__link { color: #3E4A56; }
[data-theme="light"] .zs-drawer__link.is-active { background: #F1ECDF; color: #1F2933; border-left: 3px solid #E8A317; box-shadow: none; }
[data-theme="light"] .zs-drawer__who strong { color: #1F2933; }
[data-theme="light"] .zs-tab.is-active { color: #1F2933; }
[data-theme="light"] .zs-bottom { border-color: #D8D2C4; }
[data-theme="light"] .zs-tab { color: #52606D; }
[data-theme="light"] .zs-avatar__circle { color: #fff; }
[data-theme="light"] .zs-res__ico { color: #3E4A56; }

/* ═══════════════ CAMPANA DE AVISOS (club-avisos.js) ═══════════════ */
.notif-panel.zs-notif { width: 392px; max-height: min(74vh, 640px); flex-direction: column; border-radius: 18px; }
.av-cab { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--zoo-border); }
.av-cab__t { display: flex; align-items: center; gap: 8px; color: var(--zoo-text); font-size: .98rem; }
.av-cab__n { margin-left: auto; font-size: .75rem; font-weight: 800; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; color: var(--zoo-text-muted); background: var(--zs-pill); border: 1px solid var(--zs-pill-line); }
.av-cab__n.hay { color: #fff; background: var(--zoo-orange); border-color: transparent; }
.av-cerrar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--zs-pill-line); background: var(--zs-pill); color: var(--zoo-text-muted); }
.av-lista { overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.av-fila { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 11px 38px 11px 10px; border-radius: 14px; }
.av-fila.is-enlace { cursor: pointer; }
.av-fila.is-enlace:hover, .av-fila:focus-visible { background: color-mix(in srgb, var(--zoo-text) 7%, transparent); outline: none; }
.av-fila.is-nueva { background: rgba(232, 163, 23, 0.07); }
.av-ico { width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--av, #6FBF73); background: color-mix(in srgb, var(--av, #6FBF73) 16%, transparent); }
.av-cuerpo { min-width: 0; flex: 1; }
.av-titulo { font-size: .88rem; font-weight: 700; color: var(--zoo-text); line-height: 1.3; }
.av-texto { font-size: .8rem; color: var(--zoo-text-muted); line-height: 1.45; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.av-hora { font-size: .75rem; color: var(--zoo-text-dim); margin-top: 4px; }
.av-punto { position: absolute; top: 14px; right: 36px; width: 8px; height: 8px; border-radius: 50%; background: var(--zoo-orange); }
.av-borrar { position: absolute; top: 8px; right: 6px; width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--zoo-text-dim); opacity: .7; }
.av-borrar:hover { color: var(--zoo-orange); background: rgba(213, 90, 40, 0.12); opacity: 1; }
.av-vacio { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 34px 22px; color: var(--zoo-text-muted); }
.av-vacio strong { color: var(--zoo-text); font-family: var(--zoo-font-heading); }
.av-vacio span { font-size: .84rem; line-height: 1.5; }
.av-pie { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--zoo-border); font-size: .75rem; color: var(--zoo-text-dim); }
.av-todo { font-size: .78rem; font-weight: 700; color: var(--zoo-orange); padding: 4px 8px; border-radius: 8px; }
.av-todo:hover { background: rgba(213, 90, 40, 0.12); }

@media (max-width: 980px) { .notif-panel.zs-notif { width: auto; } }

/* Perfil: en pantallas chicas el botón "Editar nombre" baja a su propia línea en vez de salirse de la tarjeta */
@media (max-width: 560px) {
  .profile-card { flex-wrap: wrap; }
  .profile-card .profile-edit-btn { margin-left: 0; width: 100%; }
}

/* Barra superior flotante (tarjeta redondeada) como alintecfood; el buscador solo aparece en celular y tableta */
@media (min-width: 981px) {
  .zs-topbar { margin: 0 0 20px; top: 12px; padding: 10px 14px 10px 18px; border-radius: 22px; border: 1px solid var(--zoo-border-strong); background: var(--zoo-bg-card); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .zs-search { display: none; }
  .zs-quien { display: inline-flex; }
}
.zs-quien { display: none; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--zs-pill-line); font: 700 .75rem/1 'JetBrains Mono', ui-monospace, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--zoo-text-muted); }

@media (min-width: 981px) { .zs-quien { display: inline-flex; } }

/* ============================================================ */
/* CONTINUIDAD AL CAMBIAR DE APARTADO (primer pintado completo)  */
/* La barra lateral, la barra superior y la inferior vienen      */
/* escritas en el HTML de cada página (tools/generar-cromo-      */
/* club.js). Aquí van las reglas que las dejan correctas SIN     */
/* esperar a Firebase ni al JavaScript: la membresía sale de     */
/* <html data-plan> (la pone el script del <head> desde          */
/* localStorage "zoo_plan", solo el estado, nunca nombre ni      */
/* correo) y el modo día/noche de <html data-theme>.             */
/* ============================================================ */

/* Bloque de plan de la barra lateral antes de conocer la sesión */
.zs-pv { display: none; }
.club-sidebar__brand-text small::before,
.zs-plan-esq .plan-label::before { content: "\200b"; }
html[data-plan="active"] .zs-pv--active,
html[data-plan="cancelled_active"] .zs-pv--cancelled_active,
html[data-plan="past_due"] .zs-pv--past_due,
html[data-plan="expired"] .zs-pv--expired,
html[data-plan="free"] .zs-pv--free { display: inline; }
html[data-plan="active"] .zs-pv--vip,
html[data-plan="cancelled_active"] .zs-pv--vip,
html[data-plan="past_due"] .zs-pv--libre,
html[data-plan="expired"] .zs-pv--libre,
html[data-plan="free"] .zs-pv--libre { display: inline; }
html[data-plan="past_due"] .zs-pv--boton,
html[data-plan="expired"] .zs-pv--boton,
html[data-plan="free"] .zs-pv--boton { display: block; }
.zs-plan-punto { background: #a0a8a4; }
html[data-plan="active"] .zs-plan-punto { background: #6FBF73; }
html[data-plan="cancelled_active"] .zs-plan-punto,
html[data-plan="past_due"] .zs-plan-punto,
html[data-plan="expired"] .zs-plan-punto,
html[data-plan="free"] .zs-plan-punto { background: #E8A317; }
.zs-plan-esq .plan-label { color: var(--zoo-amber, #E8A317); }
html[data-plan="active"] .zs-plan-esq .plan-label,
html[data-plan="cancelled_active"] .zs-plan-esq .plan-label { color: var(--zoo-ok-txt); }

/* Barra superior estática: el nombre y las iniciales llegan con la sesión, sin mover nada */
.zs-quien:not(.is-listo) { visibility: hidden; }
.zs-theme__v { display: inline-flex; align-items: center; gap: 8px; }
html[data-theme="dark"] .zs-theme__luna,
html:not([data-theme="dark"]) .zs-theme__sol { display: none; }

/* El lienzo toma el color de la página desde el primer pintado (antes del cambio de modo no había ninguno) */
html[data-theme="dark"] { color-scheme: dark; background-color: #0F1215; }
html[data-theme="light"] { color-scheme: light; background-color: #F6F4EF; }

/* ═══════ Transición entre páginas (View Transitions entre documentos) ═══════
   Cada apartado sigue siendo una página distinta. Donde el navegador lo permite (Chrome, Edge, Safari 18.2+), la barra
   lateral y la superior se quedan fijas y solo el contenido se funde en 0,16 s. Donde no, cambia de página como siempre.
   Con "reducir movimiento" no hay animación. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.club-sidebar { view-transition-name: zs-lateral; }
.zs-topbar { view-transition-name: zs-superior; }
.zs-bottom { view-transition-name: zs-inferior; }
::view-transition-group(zs-lateral), ::view-transition-group(zs-superior),
::view-transition-group(zs-inferior) { animation-duration: 0s; }
::view-transition-old(zs-lateral), ::view-transition-old(zs-superior),
::view-transition-old(zs-inferior) { display: none; }
::view-transition-new(zs-lateral), ::view-transition-new(zs-superior),
::view-transition-new(zs-inferior) { animation: none; }
::view-transition-old(root) { animation: zsSale .16s ease both; }
::view-transition-new(root) { animation: zsEntra .16s ease both; }
@keyframes zsSale { to { opacity: 0; } }
@keyframes zsEntra { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Aviso de "Acceso gratuito" (club.js lo mete en #zsAvisoReserva): para quien no es miembro el hueco ya existe desde el primer
   pintado, con la altura y el color del aviso, así que al llegar la sesión el contenido no baja. Miembros: no ocupa nada. */
.zs-aviso-reserva { display: none; }
html[data-plan="past_due"] .zs-aviso-reserva,
html[data-plan="expired"] .zs-aviso-reserva,
html[data-plan="free"] .zs-aviso-reserva { display: block; height: 62px; margin-bottom: 16px; border-radius: 14px; background: var(--zoo-bg-card); border: 1px solid var(--zoo-border); border-left: 5px solid #E8A317; }
@media (max-width: 460px) {
  html[data-plan="past_due"] .zs-aviso-reserva,
  html[data-plan="expired"] .zs-aviso-reserva,
  html[data-plan="free"] .zs-aviso-reserva { height: 126px; }
}
/* en Perfil y Suscripción el aviso no se muestra nunca */
body[data-zoo="perfil"] .zs-aviso-reserva,
body[data-zoo="suscripcion"] .zs-aviso-reserva { display: none !important; }

/* Íconos en línea: el tamaño ya no depende de la hoja que inyecta herramientas-iconos.js */
.zi { width: 1.1em; height: 1.1em; vertical-align: -0.2em; flex: none; display: inline-block; }

/* Foro: quien no es miembro nunca ve las cifras de la tarjeta (club-foro.html las oculta al armar la vista previa). Con el estado
   de la membresía ya en <html data-plan>, la tarjeta nace sin ellas y no se encoge al llegar la sesión. */
html[data-plan="free"] body[data-zoo="foro"] .zs-seccion__cifras,
html[data-plan="expired"] body[data-zoo="foro"] .zs-seccion__cifras,
html[data-plan="past_due"] body[data-zoo="foro"] .zs-seccion__cifras { display: none; }

/* Cursos: la nota de ruta/prueba y el filtro por área se llenan con datos; reservan el alto que tendrán (1280, 768 y 390 px). */
#unlockInfo:empty { min-height: 71px; }
/* Cursos, prueba gratuita: <html data-prueba> la pone el script del <head> con lo último que supo la página. Pendiente: nace con el
   alto de la tarjeta de selección (más su margen). Elegida: ya no hay tarjeta ni nota, así que no se reserva nada. */
html[data-prueba="pendiente"] #unlockInfo:empty { min-height: 141px; margin-bottom: 20px; }
html[data-prueba="elegida"] #unlockInfo:empty { min-height: 0; }
@media (max-width: 560px) {
  html[data-prueba="pendiente"] #unlockInfo:empty { min-height: 135px; margin-bottom: 14px; }
  html[data-prueba="elegida"] #unlockInfo:empty { min-height: 0; }
}
@media (max-width: 360px) { html[data-prueba="pendiente"] #unlockInfo:empty { min-height: 171px; } }
#filterBar:empty { min-height: 40px; }
@media (max-width: 980px) { #filterBar:empty { min-height: 96px; } }
@media (max-width: 560px) { #unlockInfo:empty { min-height: 104px; } #filterBar:empty { min-height: 210px; } }
/* Foro, vista previa de quien no es miembro: el aviso (debajo de la tarjeta) y la caja de escribir (debajo del botón) los mete
   el JavaScript; sus huecos ya existen desde el primer pintado y desaparecen al llegar cada pieza (alto medido a 1280/768/390 px). */
html[data-plan="free"] body[data-zoo="foro"] #zsSeccion:not(:has(.pw-aviso)),
html[data-plan="expired"] body[data-zoo="foro"] #zsSeccion:not(:has(.pw-aviso)),
html[data-plan="past_due"] body[data-zoo="foro"] #zsSeccion:not(:has(.pw-aviso)) { padding-bottom: 66px; }
html[data-plan="free"] body[data-zoo="foro"] .foro-main-actions:not(:has(+ #foroComposer)),
html[data-plan="expired"] body[data-zoo="foro"] .foro-main-actions:not(:has(+ #foroComposer)),
html[data-plan="past_due"] body[data-zoo="foro"] .foro-main-actions:not(:has(+ #foroComposer)) { margin-bottom: 188px; }
@media (max-width: 560px) {
  html[data-plan="free"] body[data-zoo="foro"] #zsSeccion:not(:has(.pw-aviso)),
  html[data-plan="expired"] body[data-zoo="foro"] #zsSeccion:not(:has(.pw-aviso)),
  html[data-plan="past_due"] body[data-zoo="foro"] #zsSeccion:not(:has(.pw-aviso)) { padding-bottom: 105px; }
  html[data-plan="free"] body[data-zoo="foro"] .foro-main-actions:not(:has(+ #foroComposer)),
  html[data-plan="expired"] body[data-zoo="foro"] .foro-main-actions:not(:has(+ #foroComposer)),
  html[data-plan="past_due"] body[data-zoo="foro"] .foro-main-actions:not(:has(+ #foroComposer)) { margin-bottom: 208px; }
}

/* Perfil: en pantallas chicas un nombre completo ocupa dos renglones; se reservan desde el primer pintado. */
@media (max-width: 560px) { #profileName { min-height: 60px; } }

/* Videos: a quien no es miembro el JavaScript le pone un aviso en #lockedNotice; su hueco (alto + 20 px de margen, medido a
   1280/768/390 px) existe desde el primer pintado. */
html[data-plan="free"] body[data-zoo="videos"] #lockedNotice:empty,
html[data-plan="expired"] body[data-zoo="videos"] #lockedNotice:empty,
html[data-plan="past_due"] body[data-zoo="videos"] #lockedNotice:empty { min-height: 86px; }
@media (max-width: 980px) {
  html[data-plan="free"] body[data-zoo="videos"] #lockedNotice:empty,
  html[data-plan="expired"] body[data-zoo="videos"] #lockedNotice:empty,
  html[data-plan="past_due"] body[data-zoo="videos"] #lockedNotice:empty { min-height: 90px; }
}

/* ═══════════════ BARRA INFERIOR: JUEGO DE PESTAÑAS SEGÚN LA CUENTA ═══════════════
   Miembro (active / cancelled_active): Inicio, Cursos, PDFs, Vivo, Pro y Más.
   Cuenta gratuita (cualquier otro estado, o aún sin saberlo): Inicio, Cursos, PDFs, Retos, Logros y Más. */
html:not([data-plan="active"]):not([data-plan="cancelled_active"]) .zs-tab--solo-vip { display: none; }
html[data-plan="active"] .zs-tab--solo-libre,
html[data-plan="cancelled_active"] .zs-tab--solo-libre { display: none; }
/* "Más" (y las pestañas compartidas) solo se marcan en el juego en que corresponde */
html:not([data-plan="active"]):not([data-plan="cancelled_active"]) .zs-tab.is-active.zs-tab--act-vip,
html[data-plan="active"] .zs-tab.is-active.zs-tab--act-libre,
html[data-plan="cancelled_active"] .zs-tab.is-active.zs-tab--act-libre { color: var(--zoo-text-muted); font-weight: 600; }
html:not([data-plan="active"]):not([data-plan="cancelled_active"]) .zs-tab.is-active.zs-tab--act-vip .zs-tab__ico,
html[data-plan="active"] .zs-tab.is-active.zs-tab--act-libre .zs-tab__ico,
html[data-plan="cancelled_active"] .zs-tab.is-active.zs-tab--act-libre .zs-tab__ico { background: transparent; color: inherit; }
[data-theme="light"] .zs-tab.is-active.zs-tab--act-vip { color: #52606D; }

/* Aviso de "Acceso gratuito" (lo crea club.js): tarjeta de superficie con filo dorado a la izquierda, candado en un círculo
   dorado tenue y botón azul pizarra. Colores lisos, sin degradados; sigue el modo día y noche. */
.zoo-pay-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 12px 16px;
  background: var(--zoo-bg-card); color: var(--zoo-text);
  border: 1px solid var(--zoo-border); border-left: 5px solid #E8A317; border-radius: 14px;
  cursor: pointer;
}
.zoo-pay-banner__ico {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(232, 163, 23, 0.16); color: #E8A317; font-size: 1.25rem;
}
[data-theme="light"] .zoo-pay-banner { background: #FFFFFF; border-color: #E4DCC8; border-left-color: #E8A317; }
[data-theme="light"] .zoo-pay-banner__ico { background: #FBF1D4; color: #8A5A00; }
.zoo-pay-banner__txt { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zoo-pay-banner__t { font-family: var(--zoo-font-display); font-weight: 800; font-size: .98rem; color: var(--zoo-text); }
.zoo-pay-banner__s { font-size: .84rem; line-height: 1.4; color: var(--zoo-text-muted); }
.zoo-pay-banner__btn {
  flex: none; padding: 9px 18px; border-radius: 10px;
  background: #24384F; color: #fff;
  font-family: var(--zoo-font-display); font-weight: 800; font-size: .88rem; white-space: nowrap;
  transition: background .18s;
}
.zoo-pay-banner:hover .zoo-pay-banner__btn { background: #1B2B3E; }
.zoo-pay-banner:focus-visible { outline: 3px solid var(--zoo-amber, #E8A317); outline-offset: 2px; }
[data-theme="dark"] .zoo-pay-banner__btn { background: #E8A317; color: #1F1D17; }
[data-theme="dark"] .zoo-pay-banner:hover .zoo-pay-banner__btn { background: #F2B23A; }


/* ============================================================ */
/* "TU ESPACIO": panel del avatar (arriba a la derecha)          */
/* Cajón por la derecha en todas las pantallas (en celular      */
/* ocupa todo el ancho). Color sólido, tokens del Club, día y    */
/* noche. Se crea al primer toque; sin JavaScript el avatar es   */
/* un enlace a Mi perfil.                                         */
/* ============================================================ */
.zs-pm-velo { position: fixed; inset: 0; z-index: 95; background: rgba(10, 12, 14, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .22s; }
.zs-pm-velo.is-open { opacity: 1; pointer-events: auto; }
.zs-pm {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 96; width: min(400px, 100%); display: flex; flex-direction: column;
  background: var(--zoo-bg-card, #171B20); color: var(--zoo-text, #fff); border-left: 1px solid var(--zoo-border, #2b323a);
  box-shadow: -24px 0 60px rgba(0, 0, 0, .35); transform: translateX(105%); visibility: hidden; transition: transform .26s ease, visibility 0s linear .26s;
}
.zs-pm.is-open { transform: none; visibility: visible; transition: transform .26s ease; }
.zs-pm__cab { position: relative; flex: none; padding: clamp(16px, 4vw, 22px); padding-top: calc(clamp(16px, 4vw, 22px) + env(safe-area-inset-top)); color: #fff; background: var(--zoo-solid, #1F5F3A); }
.zs-pm__kick { margin: 0; padding-right: 44px; color: #D9E8A8; font: 700 .75rem/1.2 var(--zoo-font-body); letter-spacing: .16em; text-transform: uppercase; }
.zs-pm__x {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .4); cursor: pointer;
}
.zs-pm__x:hover { background: rgba(255, 255, 255, .28); }
.zs-pm__id { display: flex; align-items: center; gap: 14px; margin-top: 14px; min-width: 0; }
.zs-pm__foto {
  flex: none; width: clamp(52px, 14vw, 64px); height: clamp(52px, 14vw, 64px); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #1F1D17; background: var(--zoo-amber, #E8A317); border: 3px solid #fff; font: 800 clamp(1.05rem, 4vw, 1.3rem)/1 var(--zoo-font-display);
}
.zs-pm__id h2 { margin: 0; color: #fff; font: 800 clamp(1.05rem, .95rem + .5vw, 1.25rem)/1.15 var(--zoo-font-display); overflow-wrap: anywhere; }
.zs-pm__correo { margin: 3px 0 8px; color: #D6E8DC; font-size: .85rem; overflow-wrap: anywhere; }
.zs-pm__plan { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font: 700 .75rem/1.2 var(--zoo-font-body); color: #fff; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .34); }
.zs-pm__plan--active, .zs-pm__plan--admin, .zs-pm__plan--cancelled_active { color: #1F1D17; background: var(--zoo-amber, #E8A317); border-color: transparent; }
.zs-pm__detalle { margin: 10px 0 0; color: #E6F2E9; font-size: .84rem; line-height: 1.45; }
.zs-pm__cuerpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px clamp(14px, 4vw, 18px) calc(18px + env(safe-area-inset-bottom)); }
.zs-pm__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--zoo-border, #2b323a); border-radius: 14px; overflow: hidden; }
.zs-pm__stats > div { padding: 12px 6px; text-align: center; border-left: 1px solid var(--zoo-border, #2b323a); min-width: 0; }
.zs-pm__stats > div:first-child { border-left: 0; }
.zs-pm__stats b { display: block; color: var(--zoo-text, #fff); font: 800 1.2rem/1.2 var(--zoo-font-display); overflow-wrap: anywhere; }
.zs-pm__stats span { color: var(--zoo-text-muted, #aab); font: 600 .75rem/1.2 var(--zoo-font-body); letter-spacing: .08em; text-transform: uppercase; }
.zs-pm__stats + .zs-pm__libre { margin-top: 12px; }
.zs-pm__libre { padding: 14px; border-radius: 14px; background: var(--zoo-tint, #1E2329); border: 1px solid var(--zoo-border, #2b323a); border-left: 5px solid var(--zoo-amber, #E8A317); }
.zs-pm__libre strong { display: block; font: 800 1rem/1.25 var(--zoo-font-display); }
.zs-pm__libre p { margin: 6px 0 12px; color: var(--zoo-text-muted, #aab); font-size: .86rem; line-height: 1.5; }
.zs-pm__sus {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; text-decoration: none;
  color: #1F1D17; background: var(--zoo-amber, #E8A317); font: 800 .92rem/1.2 var(--zoo-font-display);
}
.zs-pm__sus:hover { filter: brightness(1.06); }
.zs-pm__atajos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.zs-pm__atajo {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px; border-radius: 14px; text-decoration: none;
  color: var(--zoo-text, #fff); background: var(--zoo-bg-card-2, #1E2329); border: 1px solid var(--zoo-border, #2b323a);
}
.zs-pm__atajo:hover { border-color: var(--zoo-amber, #E8A317); }
.zs-pm__atajo b { display: block; font: 700 .86rem/1.2 var(--zoo-font-body); }
.zs-pm__atajo small { display: block; margin-top: 2px; color: var(--zoo-text-muted, #aab); font-size: .75rem; line-height: 1.25; }
.zs-pm__ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--zoo-acc-txt, #6FBF73); background: var(--zoo-tint, #1E2329); }
.zs-pm__pie { display: grid; gap: 8px; margin-top: 16px; }
.zs-pm__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; cursor: pointer;
  color: var(--zoo-text, #fff); background: var(--zs-pill, transparent); border: 1px solid var(--zs-pill-line, #2b323a); font: 600 .9rem/1.2 var(--zoo-font-body);
}
.zs-pm__btn:hover { border-color: var(--zoo-amber, #E8A317); }
.zs-pm__btn--salir { color: var(--zoo-orange, #D55A28); border-color: rgba(213, 90, 40, .4); }
.zs-pm .zs-theme { display: flex; }
.zs-pm__x:focus-visible, .zs-pm__atajo:focus-visible, .zs-pm__btn:focus-visible, .zs-pm__sus:focus-visible { outline: 3px solid var(--zoo-amber, #E8A317); outline-offset: 2px; }
@media (max-width: 360px) { .zs-pm__atajos { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .zs-pm, .zs-pm-velo { transition: none; } }
.zs-pm .zs-theme__txt { display: inline; }

/* Aviso de "Acceso gratuito" más compacto en celular: ícono y botón más chicos (el botón conserva 40 px de alto) */
@media (max-width: 460px) {
  .zoo-pay-banner { gap: 8px 10px; margin-bottom: 14px; padding: 10px 12px; }
  .zoo-pay-banner__ico { width: 34px; height: 34px; font-size: 1.05rem; }
  .zoo-pay-banner__t { font-size: .92rem; }
  .zoo-pay-banner__s { font-size: .8rem; line-height: 1.35; }
  .zoo-pay-banner .zoo-pay-banner__btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 6px 14px; }
}
@media (min-width: 361px) and (max-width: 460px) {
  .zoo-pay-banner { flex-wrap: nowrap; }
  .zoo-pay-banner .zoo-pay-banner__btn { width: auto; flex: none; }
  .zoo-pay-banner__txt { flex: 1 1 0; }
}
/* Hueco del aviso en celular: el aviso compacto mide 78 px (361-460 px) y 126 px (hasta 360 px) */
@media (max-width: 460px) {
  html[data-plan="past_due"] .zs-aviso-reserva,
  html[data-plan="expired"] .zs-aviso-reserva,
  html[data-plan="free"] .zs-aviso-reserva { height: 78px; margin-bottom: 14px; }
}
@media (max-width: 360px) {
  html[data-plan="past_due"] .zs-aviso-reserva,
  html[data-plan="expired"] .zs-aviso-reserva,
  html[data-plan="free"] .zs-aviso-reserva { height: 126px; }
}

/* ═══════ VER COMO USUARIO (solo para cuentas administradoras) ═══════
   Franja discreta arriba de todo mientras la cuenta administradora ve el Club como lo vería un miembro. El script del <head>
   pone <html data-como="user"> antes del primer pintado: la altura queda reservada (body::before) y club.js solo escribe el
   texto y el regreso al panel encima. Color sólido, sin degradados. */
html[data-como="user"] body { position: relative; }
html[data-como="user"] body::before { content: ""; display: block; height: 36px; background: #FBEFD0; border-bottom: 1px solid #E3C77E; }
html[data-como="user"][data-theme="dark"] body::before { background: #2A2415; border-bottom-color: #4D4126; }
.zs-como {
  position: absolute; top: 0; left: 0; right: 0; z-index: 130; height: 36px;
  display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 12px;
  font: 600 .8rem/1.2 var(--zoo-font-body, 'Inter', system-ui, sans-serif); color: #4A3500; text-align: center;
}
.zs-como a { color: #4A3500; text-decoration: underline; text-underline-offset: 3px; font-weight: 800; padding: 6px 4px; }
.zs-como a:focus-visible { outline: 2px solid #8A5A00; outline-offset: 2px; border-radius: 4px; }
html[data-theme="dark"] .zs-como { color: #F2D58A; }
html[data-theme="dark"] .zs-como a { color: #F6C443; }
@media (max-width: 420px) { .zs-como { font-size: .75rem; gap: 2px; padding: 0 8px; } }
