/* Moduverso 0.19.7 · tema oscuro real, no filtro de inversión de colores.
   Tema claro heredado permanece intacto; los ajustes son locales por navegador.
   Mantener este archivo después de app.css para sobrescribir estilos heredados. */
.theme-switcher{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);font-weight:650}
.theme-switcher select{min-height:44px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);padding:8px 9px;max-width:135px}
.theme-switcher select:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
html[data-theme="dark"] {
  --bg:#15121b;
  --paper:#24202e;
  --paper2:#302a3b;
  --surface:#24202e;
  --card:#24202e;
  --ink:#f2ecf5;
  --muted:#c9c0d1;
  --muted-text:#c9c0d1;
  --line:#5b4e68;
  --accent:#c5a2ff;
  --accent2:#413154;
  --teal:#9bd9c9;
  --gold:#f3be70;
  --red:#f4a3b2;
  --ux-accent:#c5a2ff;
  --ux-dim:#c9c0d1;
  --shadow:0 16px 42px rgba(0,0,0,.27);
}
html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
html[data-theme="dark"] .sidebar{background:#1d1927;color:var(--ink)}
html[data-theme="dark"] .sidebar-foot{color:#d4c4e0;border-top-color:var(--line)}
html[data-theme="dark"] .brand small,
html[data-theme="dark"] .nav-group{color:#c4afd6}
html[data-theme="dark"] .nav-item{color:#e0d5eb}
html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .nav-item:focus-visible,
html[data-theme="dark"] .nav-group-toggle:hover,
html[data-theme="dark"] .nav-group-toggle:focus-visible{background:#3b304b;color:#fff}
html[data-theme="dark"] .nav-item.active{background:#655080;color:#fff}
html[data-theme="dark"] :is(.card,.module-card,.list-item,.ux-option,.mood-calendar-day,.cal-day,.visibility-group,.vis-mod,details.v13-course-index,.daily-stat){background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.btn,.chip,.subtabs button,.theme-switcher select){background:var(--paper);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] :is(.btn:hover,.chip:hover,.subtabs button:hover,.theme-switcher select:hover){border-color:var(--accent)}
html[data-theme="dark"] .btn.primary{background:#7354a5;border-color:#8b70b7;color:#fff}
html[data-theme="dark"] .btn.soft{background:var(--accent2);color:#f0e0ff}
html[data-theme="dark"] .btn.warn{color:var(--red)}
html[data-theme="dark"] .subtabs button.active{background:#53406b;border-color:#9f83bc;color:#fff}
html[data-theme="dark"] :is(.hero,.ux-launch){background:linear-gradient(120deg,#352841,#263a3b);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.hero p,.ux-launch>p,.ux-option p,.ux-result>.small,.ux-filter summary){color:var(--muted)}
html[data-theme="dark"] .hero:after{color:#ffffff18}
html[data-theme="dark"] :is(.ux-shortcut:hover,.mood-calendar-day:hover){background:#30273d}
html[data-theme="dark"] .ux-short-icon{color:var(--accent)}
html[data-theme="dark"] .ux-route-launch{background:#30273d;border-color:var(--line)}
html[data-theme="dark"] .ux-resume{background:#263a34;border-color:#467367}
html[data-theme="dark"] .ux-progress{background:var(--paper2)}
html[data-theme="dark"] :is(.ux-step-state,.route-step,.note,.ux-json-readonly,.ux-undo){background:#30293a;border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .ux-undo{background:#413526}
html[data-theme="dark"] :is(.ux-step-state small,.ux-option p.small){color:var(--muted)}
html[data-theme="dark"] .ux-ingredient-row{border-color:var(--line)}
html[data-theme="dark"] .ux-check-grid{border-color:var(--line)}
html[data-theme="dark"] :is(.field,.field input,.field select,.field textarea,.ux-intent-form input){color:var(--ink)}
html[data-theme="dark"] :is(.field input,.field select,.field textarea,.ux-intent-form input,dialog input,dialog select,dialog textarea){background:var(--paper2);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#c6bad0;opacity:1}
html[data-theme="dark"] :is(input,textarea,select){accent-color:var(--accent)}
html[data-theme="dark"] option{background:#302a3b;color:#f2ecf5}
html[data-theme="dark"] dialog{background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] dialog::backdrop{background:rgba(4,3,8,.78)}
html[data-theme="dark"] :is(.notice,.empty,.tag,.pill,.preview-label){background:var(--paper2);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .notice.warning{background:#453522;color:#ffe3a3;border-color:#765a31}
html[data-theme="dark"] .notice.success{background:#244039;color:#b9f0d8;border-color:#46796a}
html[data-theme="dark"] .pill.teal{background:#24423b;color:#c1f0dd}
html[data-theme="dark"] .pill.gold{background:#47371f;color:#ffdc9b}
html[data-theme="dark"] .pill.rose{background:#4e2e3a;color:#ffd0dd}
html[data-theme="dark"] .pill.purple{background:#433054;color:#f0d8ff}
html[data-theme="dark"] .tag{background:#392d49;color:#e6d2f5}
html[data-theme="dark"] :is(.daily-source-status>span,.daily-inbox-history){background:#342b3d;color:#f1e8f5;border:1px solid var(--line)}
html[data-theme="dark"] .daily-source-status b{color:#f1d9ed}
html[data-theme="dark"] .int-stats-cell.yes{background:#5e437c;color:#fff}
html[data-theme="dark"] .int-stats-cell.none{background:var(--paper2);color:var(--muted)}
html[data-theme="dark"] .mood-calendar-grid :is(.mood-calendar-day,.mood-calendar-head){color:var(--ink)}
html[data-theme="dark"] .mood-calendar-marker{color:#211725}
html[data-theme="dark"] .emotion-tile{background:color-mix(in srgb,var(--emotion) 16%,var(--paper));color:var(--ink)}
html[data-theme="dark"] .emotion-tile.selected{background:color-mix(in srgb,var(--emotion) 31%,var(--paper))}
html[data-theme="dark"] .heat-day{border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .heat-day.void{background:transparent;border-color:transparent}
html[data-theme="dark"] .heat-day:not(.void):not([class*="v"]):not([class*="sym-"]):not([class*="energy-"]){background:var(--paper2)}
html[data-theme="dark"] .heat-day[class*="v"]:not(.void){color:#30213f}
html[data-theme="dark"] :is(.heat-day.v4,.heat-day.v5,.heat-day.sym-v4,.heat-day.sym-v5,.heat-day.energy-v4,.heat-day.energy-v5){color:#fff!important}
html[data-theme="dark"] .cal-day.outside{background:transparent}
html[data-theme="dark"] .cal-event{background:#45345e;color:#e9d9ff}
html[data-theme="dark"] .cal-event.review{background:#4b3d27;color:#ffe0a1}
html[data-theme="dark"] .cal-event.medical{background:#24473c;color:#c3efdc}
html[data-theme="dark"] .bar{background:var(--paper2)}
html[data-theme="dark"] .ux-bottom-nav{background:#201a2a;border-color:var(--line)}
html[data-theme="dark"] .ux-bottom-nav button{color:#d5c7e2}
html[data-theme="dark"] .ux-bottom-nav button.current{background:#564169;color:#fff}
html[data-theme="dark"] #firebaseBridgePanel{background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .preview-label{background:#3c3034;color:#f5d7ae}
html[data-theme="dark"] body.contrast-high{
  --bg:#0a0910;
  --paper:#181421;
  --paper2:#24202f;
  --surface:#181421;
  --card:#181421;
  --ink:#fff;
  --muted:#efe3ff;
  --muted-text:#efe3ff;
  --line:#aaa0b9;
  --accent:#d6bbff;
  --accent2:#422f5c
}
html[data-theme="dark"] body.contrast-high :is(.small,.card p){color:var(--muted)}
html[data-theme="dark"] :focus-visible{outline-color:var(--accent)}
@media(max-width:760px){
  .theme-switcher{font-size:11px}
  .theme-switcher select{min-height:44px;padding:7px 8px;max-width:112px}
}
