/* Capa 7.0 para pantallas que aún nacieron en 6.x.
   El negatoscopio (html.v7-rx) se queda oscuro. */
html.v7:not(.v7-rx),
html.v7:not(.v7-rx) body{
  background:var(--bg)!important;
  color:var(--ink)!important;
  font-family:var(--f-ui)!important;
}
html.v7:not(.v7-rx) h1,
html.v7:not(.v7-rx) h2,
html.v7:not(.v7-rx) h3{
  font-family:var(--f-display);
  letter-spacing:-.02em;
  color:var(--ink);
}
html.v7:not(.v7-rx) [class*="bg-slate-950"],
html.v7:not(.v7-rx) [class*="bg-slate-900"],
html.v7:not(.v7-rx) [class*="bg-slate-800"],
html.v7:not(.v7-rx) [class*="0b1121"],
html.v7:not(.v7-rx) [class*="0f172a"],
html.v7:not(.v7-rx) [class*="1e293b"]{
  background-color:var(--surface)!important;
  color:var(--ink)!important;
  border-color:var(--line)!important;
}
html.v7:not(.v7-rx) .text-white,
html.v7:not(.v7-rx) .text-slate-100,
html.v7:not(.v7-rx) .text-slate-200{color:var(--ink)!important}
html.v7:not(.v7-rx) .text-slate-300,
html.v7:not(.v7-rx) .text-slate-400,
html.v7:not(.v7-rx) .text-slate-500{color:var(--ink-2)!important}
html.v7:not(.v7-rx) .bg-indigo-600,
html.v7:not(.v7-rx) .bg-indigo-500,
html.v7:not(.v7-rx) .bg-blue-600,
html.v7:not(.v7-rx) .bg-red-600,
html.v7:not(.v7-rx) button.bg-slate-700,
html.v7:not(.v7-rx) a.bg-indigo-600{
  background:var(--grad-brand)!important;
  color:#fff!important;
  border-color:transparent!important;
}
html.v7:not(.v7-rx) .bg-indigo-600 *,
html.v7:not(.v7-rx) .bg-red-600 *,
html.v7:not(.v7-rx) button.bg-slate-700{color:#fff!important}
html.v7:not(.v7-rx) input,
html.v7:not(.v7-rx) select,
html.v7:not(.v7-rx) textarea{
  background:var(--bg)!important;
  color:var(--ink)!important;
  border:1px solid var(--line-strong)!important;
  border-radius:12px;
}
html.v7:not(.v7-rx) table thead,
html.v7:not(.v7-rx) thead th{
  background:var(--surface-2)!important;
  color:var(--ink-2)!important;
}
html.v7:not(.v7-rx) .fixed.inset-0.z-\[80\],
html.v7:not(.v7-rx) #support-modal .glass-modal,
html.v7:not(.v7-rx) #chest-modal .glass-modal,
html.v7:not(.v7-rx) #chest-streak-wrap{
  background:var(--surface)!important;
  color:var(--ink)!important;
}
html.v7 #predictor-goal-select,
html.v7 #predictor-selector-container,
html.v7 #builder-section,
html.v7 #builder-content,
html.v7 #card-medium,
html.v7 #card-long{
  background:var(--surface)!important;
  color:var(--ink)!important;
  border-color:var(--line)!important;
}
html.v7 .xray-card h3,
html.v7 #card-ai-generator h4,
html.v7 #card-ai-generator .text-white{color:var(--ink)!important}
html.v7 .v7-top .chip,
html.v7 #btn-install-pwa,
html.v7 #btn-install-pwa-mob{
  color:var(--ink)!important;
  background:var(--surface)!important;
  border:1px solid var(--line-strong)!important;
}
html.v7 .js-streak-badge,
html.v7 .js-streak-badge b{color:var(--ink)!important}
html.v7 .muertos-garland.is-dashboard-garland{
  margin-top:8px!important;
  position:relative;
  z-index:1;
}
html.v7 .v7-top{z-index:40}
html.v7 .v7-avatar-btn img,
html.v7 .bnav-av img,
html.v7 #yo-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%}
html.v7 .v7-avatar-btn img.hidden,
html.v7 .bnav-av img.hidden,
html.v7 #yo-photo.hidden,
html.v7 #yo-initials.hidden,
html.v7 #shell-avatar-fallback.hidden,
html.v7 #bnav-avatar-fallback.hidden{display:none!important}
html.v7 .v7-avatar-btn:has(img:not(.hidden)) #shell-avatar-fallback,
html.v7 #bnav-avatar:has(img:not(.hidden)) #bnav-avatar-fallback,
html.v7 #yo-avatar-btn:has(img:not(.hidden)) #yo-initials{display:none!important}
html.v7 .yo-avatar .yo-cam,
html.v7 .yo-cam{z-index:4}
html.v7 .av::after{z-index:1}
html.v7 #yo-track-line:empty{display:none}

.study-groups{display:grid;gap:18px}
.study-groups h3{margin:0 0 8px;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3)}
.study-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.study-card{
  min-height:72px;text-align:left;padding:12px;border-radius:16px;
  border:1px solid var(--line);background:var(--surface);color:var(--ink);
  display:flex;flex-direction:column;justify-content:center;gap:2px;cursor:pointer;
}
.study-card b{font-size:15px}
.study-card span{color:var(--ink-3);font-size:12px}
.study-card.is-locked{opacity:1}
.study-card .pro{
  align-self:flex-start;font-size:10px;font-weight:800;letter-spacing:.04em;
  color:var(--warn);background:var(--warn-bg);border-radius:99px;padding:2px 6px;
}
.cos-sheet{
  position:fixed;z-index:70;background:var(--surface);color:var(--ink);
  border:1px solid var(--line);box-shadow:var(--e3);overflow:auto;
}
.cos-sheet[hidden]{display:none!important}
@media (max-width:768px){
  .cos-sheet{
    left:0;right:0;bottom:0;max-height:min(86vh,720px);
    border-radius:20px 20px 0 0;padding:12px 16px calc(20px + env(safe-area-inset-bottom));
  }
}
@media (min-width:769px){
  .cos-sheet{top:0;right:0;width:min(460px,100%);height:100vh;padding:20px 20px 32px}
}
.cos-sheet-bar{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:12px;background:var(--surface);padding-bottom:10px}
.sheet-av{width:56px;height:56px;flex:none}
.share-sheet{position:fixed;inset:0;z-index:80;display:grid;place-items:end center;padding:16px;background:rgb(12 12 20 / .45)}
.share-sheet[hidden]{display:none}
.share-sheet article{width:min(420px,100%);background:var(--surface);color:var(--ink);border-radius:20px;padding:18px;border:1px solid var(--line)}
#support-modal .glass-modal{width:min(440px,100%);max-height:min(86vh,640px)}
@media (max-width:768px){
  #support-modal{align-items:flex-end;padding:0}
  #support-modal .glass-modal{height:min(78vh,640px);border-radius:20px 20px 0 0}
}
.pmd-loader{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--bg);color:var(--ink-2)}
.pmd-loader.hidden{display:none!important}
.pmd-loader-mark{width:36px;height:36px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--brand-600);animation:pmd-spin .8s linear infinite}
@keyframes pmd-spin{to{transform:rotate(360deg)}}
html[data-calm="1"] .pmd-loader-mark,
html[data-calm="1"] .particle,
html[data-calm="1"] .muertos-garland .pp-flag,
html[data-calm="1"] [class*="animate-"]{animation:none!important}
html[data-calm="1"] .particle{display:none!important}
html.v7 #card-monthly-plan,
html.v7 #card-monthly-plan .text-white,
html.v7 #card-monthly-plan .text-purple-200,
html.v7 #card-monthly-plan .text-purple-300,
html.v7 #card-monthly-plan li,
html.v7 #card-monthly-plan span{color:var(--ink)!important}
html.v7 #btn-monthly{color:#14141F!important}
html.v7 .seasonal-edition{color:var(--ink)!important;background:var(--warn-bg)!important;border:1px solid var(--line)}
html.v7 #support-modal .glass-modal,
html.v7 #support-messages-area,
html.v7 #support-form,
html.v7 .notif-center-card,
html.v7 .notif-center-header,
html.v7 .notif-center-list,
html.v7 .notif-center-footer{
  background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important;
}
html.v7 .notif-center-close{position:relative;z-index:5;background:var(--surface-2);color:var(--ink);pointer-events:auto}
html.v7 .home-carousel-card h3,
html.v7 .news-card h3{display:block;margin:0 0 6px;position:relative;z-index:1}
html.v7 .home-carousel{overflow:hidden}
html.v7 #home-carousel-scroller{padding-inline-end:8px}
html.v7 .muertos-garland{z-index:0;margin-top:0!important}
html.v7 .hoy-hello,html.v7 h1,html.v7 h2{position:relative;z-index:2}
html.v7 #btn-install-pwa-mob{display:none!important}
html.v7 .pm-deck,html.v7 .pm-folder,html.v7 .deck-card{
  background:var(--surface)!important;color:var(--ink)!important;border:1px solid var(--line)!important;
}
html.v7-admin aside,html.v7-admin nav{background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
#brand-suffix,#brand-suffix-mob{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important}
.bnav.v7-bnav{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;left:0;right:0;bottom:0;z-index:50;background:var(--surface);border-top:1px solid var(--line);padding:8px 4px calc(10px + env(safe-area-inset-bottom))}
.bnav.v7-bnav a{display:flex;flex-direction:column;align-items:center;gap:2px;color:var(--ink-3);text-decoration:none;font-size:11px;font-weight:650}
.bnav.v7-bnav a.on{color:var(--accent-ink)}
body:has(> .bnav.v7-bnav),body:has(.bnav.v7-bnav){padding-bottom:76px}
@media (min-width:1024px){body:has(.v7-side) .bnav.v7-bnav{display:none}}
@media (prefers-reduced-motion:reduce){
  .pmd-loader-mark,.feedback-sheet,.muertos-garland .pp-flag{animation:none!important}
}

/* Barra lateral de escritorio fuera del dashboard (Praxicards) */
.v7-side-sub{display:none}
@media (min-width:1024px){
  .v7-side-sub{display:flex;flex-direction:column;gap:4px;position:fixed;inset:0 auto 0 0;width:240px;height:100vh;z-index:40;background:var(--surface);border-right:1px solid var(--line);padding:20px 14px}
  .v7-side-sub .v7-logo{display:flex;align-items:center;gap:10px;padding:4px 8px 18px;font:700 19px var(--f-display);color:var(--ink);text-decoration:none}
  .v7-side-sub .v7-nav{display:flex;flex-direction:column;gap:2px}
  .v7-side-sub .nav-link{display:flex;align-items:center;gap:12px;height:42px;padding:0 12px;border-radius:10px;color:var(--ink-2);text-decoration:none;font-weight:500;font-size:15px}
  .v7-side-sub .nav-link:hover{background:var(--surface-2)}
  .v7-side-sub .nav-link.on{background:var(--brand-50);color:var(--accent-ink);font-weight:600}
  .v7-side-sub svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  body:has(.v7-side-sub){padding-left:240px;padding-bottom:0}
  body:has(.v7-side-sub) .bnav.v7-bnav{display:none!important}
}
