/* V15.2 – hotfix visual + lectura continua + reemplazo limpio */

/* 1) Restablece la identidad premium donde faltaba la clase histórica. */
#aea5-app.ada137-premium.ada151-reader,
#aea5-app.ada137-premium.ada150-reader{--aea-visual-fix:1}

/* 2) Secciones de Lugares / héroes: impedir amontonamiento y botones sin estilo. */
#aea5-app.ada137-premium .ada137-context-rail{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:0!important;
}
#aea5-app.ada137-premium .ada137-context-rail a{
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  align-content:center!important;
  column-gap:12px!important;
  row-gap:4px!important;
  min-height:118px!important;
  white-space:normal!important;
  overflow:visible!important;
}
#aea5-app.ada137-premium .ada137-context-rail a strong,
#aea5-app.ada137-premium .ada137-context-rail a small{
  display:block!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
#aea5-app.ada137-premium .ada137-collage-foot{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:14px!important;
}
#aea5-app.ada137-premium .ada137-collage-foot span{
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
}
#aea5-app.ada137-premium .ada137-hero-actions{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  flex-wrap:wrap!important;
}
#aea5-app.ada137-premium .ada137-secondary-action,
#aea5-app.ada137-premium .ada10-deep-link{
  appearance:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:48px!important;
  padding:0 18px!important;
  border-radius:12px!important;
  font:800 14px/1 Manrope,sans-serif!important;
  text-decoration:none!important;
}

/* 3) El Asistente nunca debe romper layout ni dejar controles con HTML plano. */
#aea5-app.ada151-reader .aea5-angel button,
#aea5-app.ada151-reader .aea5-angel [type="button"],
#aea5-app.ada151-reader .ada7-tour-controls button,
#aea5-app.ada151-reader .ada8-line-focus-controls button,
#aea5-app.ada151-reader .ada7-speech-actions button{
  appearance:none!important;
  border:1px solid rgba(75,96,88,.16)!important;
  background:linear-gradient(180deg,#fffdfa,#f4efe6)!important;
  color:#263632!important;
  border-radius:14px!important;
  box-shadow:0 7px 18px rgba(31,41,37,.08)!important;
}
#aea5-app.ada151-reader .aea5-angel button:hover,
#aea5-app.ada151-reader .ada7-tour-controls button:hover,
#aea5-app.ada151-reader .ada8-line-focus-controls button:hover,
#aea5-app.ada151-reader .ada7-speech-actions button:hover{
  transform:translateY(-1px)!important;
}
#aea5-app.ada151-reader .aea5-angel button strong,
#aea5-app.ada151-reader .aea5-angel button small{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
#aea5-app.ada151-reader .aea5-angel p,
#aea5-app.ada151-reader .aea5-angel li,
#aea5-app.ada151-reader .aea5-angel label,
#aea5-app.ada151-reader .aea5-angel summary,
#aea5-app.ada151-reader .aea5-angel strong,
#aea5-app.ada151-reader .aea5-angel small{
  overflow-wrap:anywhere!important;
}

/* 4) HUD: más sutil, no tapa el texto y marca el punto de arranque. */
.ada150-hud-line{
  background:linear-gradient(90deg,rgba(104,202,228,.05),rgba(104,202,228,.018))!important;
  border-color:rgba(70,184,212,.52)!important;
}
.ada150-hud-line.is-first{
  border-left-width:4px!important;
  box-shadow:0 0 0 2px rgba(75,193,218,.05),0 0 22px rgba(53,155,184,.14)!important;
}
.ada150-hud-marker{z-index:2!important}
.ada150-hud-label{z-index:2!important}

/* 5) Companion / lectura normal: más robusto en móvil. */
#aea5-app.ada151-reader .ada121-companion-bar button,
#aea5-app.ada150-reader .ada121-companion-bar button{
  border-radius:16px!important;
}
@media(max-width:980px){
  #aea5-app.ada137-premium .ada137-context-rail{grid-template-columns:1fr!important}
  #aea5-app.ada137-premium .ada137-context-rail a{min-height:92px!important}
}
@media(max-width:640px){
  #aea5-app.ada137-premium .ada137-hero-actions{flex-direction:column!important;align-items:stretch!important}
  #aea5-app.ada137-premium .ada137-secondary-action,
  #aea5-app.ada137-premium .ada10-deep-link{width:100%!important}
}
