/* MABNI 3.8.1 clean dark mode tokens. Final adjustments live in mabni-v38-stability.css. */
:root{
  --mabni-theme-bg:#f4f7fb;
  --mabni-theme-panel:#ffffff;
  --mabni-theme-surface:#f8fbff;
  --mabni-theme-surface-2:#eef6ff;
  --mabni-theme-workspace:#ffffff;
  --mabni-theme-text:#10213d;
  --mabni-theme-muted:#5f6d7c;
  --mabni-theme-line:rgba(16,33,61,.12);
  --mabni-theme-shadow:0 18px 45px rgba(11,31,58,.10);
  --mabni-theme-input:#ffffff;
  --mabni-theme-chip:#eef6ff;
  --mabni-theme-brand:#6f3cc3;
  --mabni-theme-accent:#00b8d9;
}
html[data-mabni-theme="dark"]{
  color-scheme:dark;
  --mabni-theme-bg:#07101f;
  --mabni-theme-panel:#0f1a2e;
  --mabni-theme-surface:#13213a;
  --mabni-theme-surface-2:#0b1425;
  --mabni-theme-workspace:#08111f;
  --mabni-theme-text:#f3f8ff;
  --mabni-theme-muted:#b7c6dc;
  --mabni-theme-line:rgba(174,190,215,.26);
  --mabni-theme-shadow:0 22px 52px rgba(0,0,0,.45);
  --mabni-theme-input:#0b1425;
  --mabni-theme-chip:#182843;
  --mabni-theme-brand:#a78bfa;
  --mabni-theme-accent:#38e8ff;
}
html[data-mabni-theme="dark"],html[data-mabni-theme="dark"] body{
  background:radial-gradient(circle at 12% 0%,rgba(56,232,255,.12),transparent 32%),radial-gradient(circle at 86% 8%,rgba(167,139,250,.16),transparent 30%),linear-gradient(135deg,#07101f,#0a1020 54%,#11142b)!important;
  color:var(--mabni-theme-text)!important;
}
html[data-mabni-theme="dark"] *{border-color:var(--mabni-theme-line)}
html[data-mabni-theme="dark"] :where(h1,h2,h3,h4,h5,h6,strong,label,.eyebrow,.workspace-concept-brand strong,.dialog-head h2,.lesson-card-head strong,.mp-course-hero h3,.mp-world-copy h3,.mission-level-copy h3){color:var(--mabni-theme-text)!important}
html[data-mabni-theme="dark"] :where(p,small,span,.muted,.lead,.workspace-note,.mission-copy,.dialog-card p,.dialog-card small,.class-login-message,.saved-empty,.mp-world-copy p,.mp-course-hero p,.mission-level-copy p,.bubble-choice-btn span,.lesson-card-panel p,.student-login-panel p,.online-class-panel p,.local-student-panel p){color:var(--mabni-theme-muted)!important}
html[data-mabni-theme="dark"] :where(.topbar,.game-shell,.left-panel,.right-panel,.mission-bar,.learning-focus-card,.visualization,.workspace-head,#blocklyArea,.feedback,.run-feedback-details,.dialog-card,.student-login-panel,.online-class-panel,.local-student-panel,.local-name-card,.class-code-card,.saved-user,.class-student-card,.teacher-summary,.teacher-wizard,.wizard-card,.wizard-option,.teacher-home-action,.choice,.custom-preview,.movement-option,.movement-editor,.lesson-card-panel,.mission-level-card,.mp-course-btn,.mp-world-card,.mp-course-hero,.course-tab,.course-tab-v22,.event-game-pad,.settings-menu,.hint-text){
  background:linear-gradient(180deg,var(--mabni-theme-panel),var(--mabni-theme-surface-2))!important;
  color:var(--mabni-theme-text)!important;
  border-color:var(--mabni-theme-line)!important;
  box-shadow:var(--mabni-theme-shadow)!important;
}
html[data-mabni-theme="dark"] :where(#blocklyArea,.blocklyWorkspace,.visualization,#svgMaze){background:var(--mabni-theme-workspace)!important;fill:var(--mabni-theme-workspace)!important}
html[data-mabni-theme="dark"] .blocklyMainBackground{fill:var(--mabni-theme-workspace)!important;stroke:var(--mabni-theme-line)!important}
html[data-mabni-theme="dark"] .blocklyToolboxDiv{background:#0b1425!important;color:var(--mabni-theme-text)!important;border-color:var(--mabni-theme-line)!important}
html[data-mabni-theme="dark"] .blocklyFlyoutBackground{fill:#101a2e!important}.blocklyText{font-family:Inter,system-ui,sans-serif!important}
html[data-mabni-theme="dark"] .blocklyText{fill:#f8fbff!important}
html[data-mabni-theme="dark"] :where(input,textarea,select){background:var(--mabni-theme-input)!important;color:var(--mabni-theme-text)!important;border-color:var(--mabni-theme-line)!important;-webkit-text-fill-color:var(--mabni-theme-text)!important}
html[data-mabni-theme="dark"] :where(input::placeholder,textarea::placeholder){color:#8da2c2!important;-webkit-text-fill-color:#8da2c2!important}
html[data-mabni-theme="dark"] :where(button.secondary,.secondary,button:not(.primary):not(.big-run):not(.event-start):not(.event-stop):not(.danger):not(.level-chip),.settings-button){background:#15243e!important;color:#f3f8ff!important;border-color:var(--mabni-theme-line)!important}
html[data-mabni-theme="dark"] :where(.primary,.big-run,.event-start){color:#07101f!important}
html[data-mabni-theme="dark"] .level-chip{background:#13213a!important;color:#f3f8ff!important;border-color:var(--mabni-theme-line)!important;box-shadow:none!important}
html[data-mabni-theme="dark"] .level-chip.active{background:linear-gradient(135deg,#a78bfa,#38e8ff)!important;color:#07101f!important}
html[data-mabni-theme="dark"] .level-chip.done{background:linear-gradient(135deg,#ffd166,#f59e0b)!important;color:#1d1300!important}
html[data-mabni-theme="dark"] :where(.mission-chip,.goal-pill,.lesson-chip,.level-chip-title,.objective-blocks span,.feedback-label,#capacityBubble,.progress-indicator){background:var(--mabni-theme-chip)!important;color:#e8f8ff!important;border-color:var(--mabni-theme-line)!important}
html[data-mabni-theme="dark"] #signinDialog *,html[data-mabni-theme="dark"] #teacherDialog *,html[data-mabni-theme="dark"] #avatarDialog *,html[data-mabni-theme="dark"] #lessonDialog *{color:inherit}
html[data-mabni-theme="dark"] #signinDialog :where(.muted-text,.saved-empty,.class-login-head p,.class-student-card span,.saved-user span),html[data-mabni-theme="dark"] #teacherDialog :where(.muted,.advanced-note,.empty-friendly),html[data-mabni-theme="dark"] #avatarDialog :where(p,small),html[data-mabni-theme="dark"] #lessonDialog :where(p,span,small){color:var(--mabni-theme-muted)!important}
html[data-mabni-theme="dark"] .class-login-message.good{color:#7df2a2!important}html[data-mabni-theme="dark"] .class-login-message.bad{color:#ff8a96!important}
html[data-mabni-theme="dark"] .event-game-pad{background:linear-gradient(180deg,#101a2e,#0a1324)!important;border-color:#38e8ff!important}
html[data-mabni-theme="dark"] .event-game-score{background:#08111f!important;color:#e8f8ff!important;border-color:#38e8ff!important}
html[data-mabni-theme="dark"] .theme-glyph{filter:none!important}
.theme-toggle-clean{min-width:86px!important}
