/* AS APP · 17 · navegación visual del shell */
body.as-route-home .as-bottom{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:0;
  width:min(var(--as-app-mobile-width),100%);
  display:grid;
  grid-template-columns:repeat(5,1fr);
  backdrop-filter:blur(14px);
  z-index:var(--as-z-permission)!important;
  padding:6px 5px calc(var(--as-space-4) + env(safe-area-inset-bottom));
  box-sizing:border-box;
  background:color-mix(in srgb,var(--as-surface) 96%,transparent)!important;
  border-top:1px solid var(--as-border)!important;
}
body.as-route-home .as-bottom a{
  text-decoration:none!important;
  color:var(--as-text-muted)!important;
  text-align:center;
  font-size:var(--as-size-small);
  line-height:1.08;
}
body.as-route-home .as-bottom .ico{font-size:26px;display:block;margin-bottom:2px;line-height:1}
body.as-route-home .as-bottom a.active{color:var(--as-gold)!important;font-weight:700}
body.as-route-home .as-bottom .as-premium-disabled{color:var(--as-text-dim)!important;cursor:default;pointer-events:none}
body.as-route-home .as-bottom .as-premium-disabled small{display:block;font-size:7px;line-height:1;margin-top:2px;font-weight:700}
body.as-route-home .as-screen-overlay{
  position:fixed!important;
  inset:0!important;
  z-index:var(--as-z-shell-overlay)!important;
}
body.as-route-home.as-video-playing .as-bottom{display:none!important}


/* Android nativo · navegación directa estable sin iframe interno */
html[data-as-platform="android"] body.as-app-ui.as-android-direct .as-bottom{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:0;
  width:min(var(--as-app-mobile-width),100%);
  display:grid;
  grid-template-columns:repeat(5,1fr);
  backdrop-filter:blur(14px);
  z-index:var(--as-z-permission)!important;
  padding:6px 5px calc(var(--as-space-4) + env(safe-area-inset-bottom));
  box-sizing:border-box;
  background:color-mix(in srgb,var(--as-surface) 96%,transparent)!important;
  border-top:1px solid var(--as-border)!important;
}
html[data-as-platform="android"] body.as-app-ui.as-android-direct .as-bottom a{
  text-decoration:none!important;
  color:var(--as-text-muted)!important;
  text-align:center;
  font-size:var(--as-size-small);
  line-height:1.08;
}
html[data-as-platform="android"] body.as-app-ui.as-android-direct .as-bottom .ico{font-size:26px;display:block;margin-bottom:2px;line-height:1}
html[data-as-platform="android"] body.as-app-ui.as-android-direct .as-bottom a.active{color:var(--as-gold)!important;font-weight:700}
html[data-as-platform="android"] body.as-app-ui.as-android-direct .as-bottom .as-premium-disabled{color:var(--as-text-dim)!important;cursor:default;pointer-events:none}
html[data-as-platform="android"] body.as-app-ui.as-android-direct .as-bottom .as-premium-disabled small{display:block;font-size:7px;line-height:1;margin-top:2px;font-weight:700}
html[data-as-platform="android"] body.as-app-ui.as-android-direct.as-video-playing .as-bottom{display:none!important}

/* 2.5.8.142 · Eliminar la banda clara entre la pantalla embebida y la navegación iOS. */
html:has(body.as-route-home),html:has(body.as-route-home) body,
body.as-route-home #page,body.as-route-home #content,
body.as-route-home .as-screen-overlay,body.as-route-home .as-screen-overlay iframe{
  background-color:var(--as-bg,#070707)!important;
}
body.as-route-home .as-bottom::before{
  content:"";position:absolute;left:0;right:0;bottom:100%;height:19px;
  pointer-events:none;background:var(--as-bg,#070707)!important;
}

/* 2.5.8.144: navegación opaca en miniapp Vídeos y Favoritos.
   El contenido de la vista embebida no debe translucirse bajo la barra. */
body.as-route-home .as-bottom{
  isolation:isolate!important;
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  background:#fff!important;
  box-shadow:0 -3px 12px rgba(0,0,0,.06)!important;
}
html.as-theme-dark body.as-route-home .as-bottom,
html[data-theme="dark"] body.as-route-home .as-bottom{
  background:#111214!important;
  border-top-color:#313237!important;
  box-shadow:0 -3px 12px rgba(0,0,0,.4)!important;
}
body.as-route-home .as-bottom::before{
  height:0!important;display:none!important;content:none!important;
}
body.as-route-home .as-bottom::after{
  content:"";position:absolute;inset:0;z-index:-1;
  background:#fff!important;pointer-events:none;
}
html.as-theme-dark body.as-route-home .as-bottom::after,
html[data-theme="dark"] body.as-route-home .as-bottom::after{background:#111214!important}

/* 2.5.8.146: una sola barra inferior. Las subpantallas embebidas
   (incluidas Vídeos favoritos al cambiar de documento) nunca dibujan
   otra barra propia, incluso si un script la inserta posteriormente. */
html.as-inside-frame nav.as-bottom,
html.as-inside-frame .as-android-direct-nav,
html:has(body.as-app-embedded) nav.as-bottom,
html:has(body.as-app-embedded) .as-android-direct-nav {
  display:none!important;
  visibility:hidden!important;
}

/* 2.5.8.149: The parent shell exclusively owns the primary navigation.
   Independent embedded miniapps never render a second global bar. */
/* 2.5.8.150: el panel embebido cubre el viewport COMPLETO.
   El menú opaco queda sobre él; nunca queda una franja de Inicio expuesta. */
body.as-route-home.as-screen-open .as-screen-overlay{
  top:0!important;right:0!important;bottom:0!important;left:0!important;
  height:100dvh!important;max-height:100dvh!important;
  overflow:hidden!important;
  background:var(--as-bg,#fff)!important;
}
body.as-route-home.as-screen-open .as-screen-overlay iframe{
  width:100%!important;height:100%!important;display:block!important;
  border:0!important;background:var(--as-bg,#fff)!important;
}
body.as-route-home.as-screen-open{overflow:hidden!important;}
body.as-route-home.as-screen-open .as-app{pointer-events:none!important;}
body.as-route-home.as-screen-open .as-bottom{pointer-events:auto!important;}

body.as-route-home.as-screen-open .as-bottom{z-index:2147483000!important;}

/* A standalone deep link uses the same navigation component managed by JS,
   never an additional PHP footer. The home shell still owns persistent tabs. */
body.as-app-ui.as-android-direct:not(.as-route-home) .as-bottom{
 position:fixed;left:50%;transform:translateX(-50%);bottom:0;
 width:min(var(--as-app-mobile-width),100%);display:grid;
 grid-template-columns:repeat(5,1fr);z-index:2147483000!important;
 box-sizing:border-box;padding:6px 5px calc(12px + env(safe-area-inset-bottom));
 background:var(--as-surface,#fff)!important;border-top:1px solid var(--as-border,#ddd)!important;
}
body.as-app-ui.as-android-direct:not(.as-route-home) .as-bottom a{
 text-align:center;text-decoration:none!important;color:var(--as-text-muted,#777)!important;
 font-size:12px;line-height:1.1;
}
body.as-app-ui.as-android-direct:not(.as-route-home) .as-bottom a.active{color:var(--as-gold,#b18a45)!important;font-weight:700!important}
body.as-app-ui.as-android-direct:not(.as-route-home) .as-bottom .ico{display:block;font-size:25px;line-height:1.2}
body.as-app-ui.as-android-direct:not(.as-route-home) .as-bottom .as-premium-disabled{pointer-events:none;opacity:.5}
body.as-app-ui.as-android-direct:not(.as-route-home){padding-bottom:calc(82px + env(safe-area-inset-bottom))!important}
