
/* MABNI 1.2.17 - clean dark mode, draggable splitter, home/guide cleanup */
:root{--mabni-left-col:52vw;--mabni-top-h:70px;}

/* Draggable center bar must actually resize the panels. */
@media (min-width: 951px){
  .game-shell{
    grid-template-columns:minmax(380px,var(--mabni-left-col,52vw)) 12px minmax(360px,1fr)!important;
  }
  .layout-splitter{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:12px!important;
    min-width:12px!important;
    cursor:col-resize!important;
    border-radius:999px!important;
    background:linear-gradient(180deg,#dff4ff,#bfe5fb)!important;
    border:1px solid #9fcfec!important;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.65),0 8px 20px rgba(15,44,74,.12)!important;
    touch-action:none!important;
    user-select:none!important;
    z-index:20!important;
  }
  .layout-splitter::before{
    content:'⋮';
    color:#427ea7;
    font-weight:1000;
    font-size:18px;
    line-height:1;
  }
  .layout-splitter i{display:none!important;}
  body.resizing-layout .layout-splitter{
    background:linear-gradient(180deg,#7dd3fc,#38bdf8)!important;
    box-shadow:0 0 0 4px rgba(56,189,248,.18),0 14px 35px rgba(14,116,144,.2)!important;
  }
}

/* Smaller screens: stack cleanly and keep Run dock reachable. */
@media (max-width:950px){
  body{overflow:auto!important;}
  .game-shell{display:block!important;height:auto!important;min-height:100dvh!important;overflow:visible!important;}
  .layout-splitter{display:none!important;}
  .left-panel,.right-panel{height:auto!important;min-height:0!important;overflow:visible!important;margin-bottom:12px!important;}
  .visualization{min-height:260px!important;}
  .run-dock{position:sticky!important;bottom:0!important;z-index:60!important;}
}

/* Coherent night mode: one clean dark skin instead of fifty patch layers yelling at each other. */
html[data-theme="night"], html.theme-night{background:#071320!important;color-scheme:dark!important;}
html[data-theme="night"] body, body.theme-night{
  background:#071320!important;
  color:#eaf6ff!important;
}
html[data-theme="night"] .topbar,
html.theme-night .topbar{
  background:linear-gradient(180deg,#0b1b2e,#091728)!important;
  border-color:#274767!important;
  box-shadow:0 8px 24px rgba(0,0,0,.28)!important;
}
html[data-theme="night"] .game-shell,
html.theme-night .game-shell{
  background:#071320!important;
}
html[data-theme="night"] .left-panel,
html[data-theme="night"] .right-panel,
html[data-theme="night"] .mission-bar,
html[data-theme="night"] .workspace-head,
html[data-theme="night"] .run-dock,
html[data-theme="night"] .dialog-card,
html[data-theme="night"] .settings-menu,
html.theme-night .left-panel,
html.theme-night .right-panel,
html.theme-night .mission-bar,
html.theme-night .workspace-head,
html.theme-night .run-dock,
html.theme-night .dialog-card,
html.theme-night .settings-menu{
  background:#0e2134!important;
  border-color:#284967!important;
  color:#eaf6ff!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
html[data-theme="night"] .visualization,
html.theme-night .visualization{
  background:#10283a!important;
  border-color:#2d5575!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025)!important;
}
html[data-theme="night"] .workspace-concept-brand,
html.theme-night .workspace-concept-brand{
  background:#10243a!important;
  border-color:#376184!important;
  color:#eef8ff!important;
  box-shadow:none!important;
}
html[data-theme="night"] .workspace-concept-brand span,
html[data-theme="night"] .workspace-concept-brand strong,
html[data-theme="night"] #workspaceConceptKicker,
html[data-theme="night"] #workspaceConceptName,
html.theme-night .workspace-concept-brand span,
html.theme-night .workspace-concept-brand strong,
html.theme-night #workspaceConceptKicker,
html.theme-night #workspaceConceptName{
  color:#eef8ff!important;
  opacity:1!important;
  text-shadow:none!important;
}
html[data-theme="night"] .level-chip,
html.theme-night .level-chip{
  background:#10243a!important;
  color:#d9f1ff!important;
  border-color:#376184!important;
  box-shadow:none!important;
}
html[data-theme="night"] .level-chip.active,
html.theme-night .level-chip.active{
  background:linear-gradient(180deg,#ffc94a,#f59e0b)!important;
  color:#132033!important;
  border-color:#fbbf24!important;
}
html[data-theme="night"] .level-chip::before,
html[data-theme="night"] .level-chip::after,
html.theme-night .level-chip::before,
html.theme-night .level-chip::after{display:none!important;}
html[data-theme="night"] .secondary,
html[data-theme="night"] .theme-icon-btn,
html[data-theme="night"] .customize-brush-btn,
html[data-theme="night"] .user-chip-btn,
html.theme-night .secondary,
html.theme-night .theme-icon-btn,
html.theme-night .customize-brush-btn,
html.theme-night .user-chip-btn{
  background:#10243a!important;
  color:#eef8ff!important;
  border-color:#376184!important;
  box-shadow:none!important;
}
html[data-theme="night"] .big-run,
html.theme-night .big-run{
  background:linear-gradient(180deg,#11a3e8,#0067a8)!important;
  color:white!important;
}
html[data-theme="night"] #blocklyArea,
html.theme-night #blocklyArea{
  background:#0b1727!important;
  border-color:#284967!important;
}
html[data-theme="night"] .blocklyMainBackground{fill:#0b1727!important;stroke:#284967!important;}
html[data-theme="night"] .blocklyToolboxDiv{background:#10243a!important;border-color:#284967!important;}
html[data-theme="night"] .blocklyFlyoutBackground{fill:#10243a!important;}
html[data-theme="night"] .blocklyTreeLabel{color:#eef8ff!important;}
html[data-theme="night"] .layout-splitter{
  background:linear-gradient(180deg,#174766,#0f344d)!important;
  border-color:#3a6a8c!important;
}

/* Landing/home cleanup */
.landing-v17-actions{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin:22px 0 18px;}
.teacher-guide-hero{margin-top:18px;padding:18px;border:1px solid rgba(0,78,146,.14);border-radius:24px;background:linear-gradient(135deg,#f8fbff,#eef8ff);}
.teacher-guide-hero h2{margin:0 0 6px;color:#0b2d4d}.teacher-guide-hero p{margin:0;color:#52667f;line-height:1.5}.teacher-guide-hero .landing-v9-secondary{margin-top:12px;}
