/* =====================================================================
   ProfeYa V71 · contraste móvil en modo oscuro
   Corrige textos oscuros heredados dentro de tarjetas oscuras.
   ===================================================================== */

/* Inicio · Nivel / Racha / Logros */
html[data-theme="dark"] #homeView .premiumStat{
  color:#f8faff!important;
  border-color:#445274!important;
}
html[data-theme="dark"] #homeView .premiumStat:after{
  background:rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] #homeView .premiumStat>div:nth-child(2)>span,
html[data-theme="dark"] #homeView .premiumStat>div:nth-child(2)>span b{
  color:#c7d1e8!important;
}
html[data-theme="dark"] #homeView .premiumStat strong,
html[data-theme="dark"] #homeView .premiumStat strong em{
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
html[data-theme="dark"] #homeView .premiumStat small{
  color:#b8c4de!important;
}
html[data-theme="dark"] #homeView .miniLevelTrack{
  background:#2b3655!important;
}

/* Las tres tarjetas conservan personalidad, pero con suficiente contraste. */
html[data-theme="dark"] #homeView .premiumStat.xpStat{
  background:linear-gradient(145deg,#2a2358,#183655)!important;
}
html[data-theme="dark"] #homeView .premiumStat.streakStat{
  background:linear-gradient(145deg,#512925,#402442)!important;
}
html[data-theme="dark"] #homeView .premiumStat.achievementStat{
  background:linear-gradient(145deg,#17453a,#163b4f)!important;
}

/* Otras tarjetas de Inicio que usan fondos oscuros con estilos heredados claros. */
html[data-theme="dark"] #homeView :is(
  .requestTopicHomeCard,.smartStudyCard,#weakAreasSection,#nextStudyTestSection,
  .organizeHomeCard,.examHomeCard,#recentAchievementsSection,.planUsageCard
) :is(h1,h2,h3,strong){
  color:#f8faff!important;
  -webkit-text-fill-color:initial!important;
}
html[data-theme="dark"] #homeView :is(
  .requestTopicHomeCard,.smartStudyCard,#weakAreasSection,#nextStudyTestSection,
  .organizeHomeCard,.examHomeCard,#recentAchievementsSection,.planUsageCard
) :is(p,small){
  color:#bac5dd!important;
}
html[data-theme="dark"] #homeView :is(
  .requestTopicHomeCard,.smartStudyCard,#weakAreasSection,#nextStudyTestSection,
  .organizeHomeCard,.examHomeCard,#recentAchievementsSection,.planUsageCard
) .eyebrow{
  color:#b9a8ff!important;
}

/* Próximo paso: títulos y resumen siempre legibles sobre la tarjeta azul. */
html[data-theme="dark"] #homeView .smartStudyCard :is(h2,h3,strong),
html[data-theme="dark"] #homeView #nextStudyTestSection :is(h2,h3,strong){
  color:#ffffff!important;
}
html[data-theme="dark"] #homeView .smartStudyCard :is(p,small),
html[data-theme="dark"] #homeView #nextStudyTestSection :is(p,small){
  color:#c3cee4!important;
}

/* Mascota: textos secundarios sin perder contraste. */
html[data-theme="dark"] #homeView .petHomeCard .petHomeCopy :is(h2,strong){
  color:#ffffff!important;
}
html[data-theme="dark"] #homeView .petHomeCard .petHomeCopy p{
  color:#c1cce2!important;
}
html[data-theme="dark"] #homeView .petHomeStats span{
  color:#eef3ff!important;
}

/* Logros recientes */
html[data-theme="dark"] #homeView .achievementChip{
  background:linear-gradient(135deg,#161f39,#15233b)!important;
  border-color:#334463!important;
}
html[data-theme="dark"] #homeView .achievementChip strong{
  color:#ffffff!important;
}
html[data-theme="dark"] #homeView .achievementChip small{
  color:#b8c4da!important;
}

/* Navegación inferior: etiquetas más claras en pantallas pequeñas. */
html[data-theme="dark"] .bottomAppNav button{
  color:#b9c4dc!important;
}
html[data-theme="dark"] .bottomAppNav button b{
  color:inherit!important;
}
html[data-theme="dark"] .bottomAppNav button.active{
  color:#ffffff!important;
}
html[data-theme="dark"] .bottomAppNav button.active b{
  color:#ffffff!important;
}

/* Tarjetas de progreso: refuerzo de contraste para títulos dinámicos. */
html[data-theme="dark"] #progressView :is(
  .progressStatCard,.progressMasterCard,.progressMascotCard
) :is(h2,h3,strong){
  color:#ffffff!important;
}
html[data-theme="dark"] #progressView :is(
  .progressStatCard,.progressMasterCard,.progressMascotCard
) :is(p,small,span){
  color:#bdc8df!important;
}

/* En claro no tocamos la identidad visual. */
html[data-theme="light"] #homeView .premiumStat strong,
html[data-theme="light"] #homeView .premiumStat strong em{
  color:#0b1555!important;
  -webkit-text-fill-color:#0b1555!important;
}
