html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark;background:#111b22;color:#e5eef1;--line:#33444e;--muted:#acbfc7;--green:#47ccb1}
#theme-toggle{min-height:38px}
html[data-theme="dark"] body,html[data-theme="dark"] main{background:#111b22}
html[data-theme="dark"] header{background:#111b22}
html[data-theme="dark"] aside{background:#18252d}
html[data-theme="dark"] button{background:#233640;color:#e5eef1;border-color:#46606c}
html[data-theme="dark"] button:hover{background:#304752}
html[data-theme="dark"] .primary{background:#147d6e;border-color:#249d89;color:#fff}
html[data-theme="dark"] .primary:hover{background:#116b5e}
html[data-theme="dark"] .active{background:#214c43!important;color:#8ee8ce!important;border-color:#55baa0!important}
html[data-theme="dark"] label{color:#b6cbd3}
html[data-theme="dark"] input:not([type=checkbox]):not([type=range]),html[data-theme="dark"] select{background:#101e27;color:#ecf3f6;border-color:#4a626e}
html[data-theme="dark"] input::placeholder{color:#94abb7}
html[data-theme="dark"] .hole{border-color:var(--line)}
html[data-theme="dark"] .hole.selected,html[data-theme="dark"] .hole.dragging{background:#25493f}
html[data-theme="dark"] #count,html[data-theme="dark"] .head-modules>div{background:#253a44;color:#c9dce2;border-color:#48606a}
html[data-theme="dark"] .head-modules>div.selected{background:#224b40;color:#a0efd6;border-color:#59bb9e}
html[data-theme="dark"] .notice{background:#342d22;color:#f1d49d;border-color:#d8ae61}
html[data-theme="dark"] .ok{color:#75dcb5}
html[data-theme="dark"] .error,html[data-theme="dark"] #scene-error{color:#ffa59e}
html[data-theme="dark"] .warning,html[data-theme="dark"] .head-cycle b[data-virtual=true]{color:#f0cb88}
html[data-theme="dark"] .statusbar,html[data-theme="dark"] .hole-index,html[data-theme="dark"] .hole-drag{color:#abc4cc}
html[data-theme="dark"] #socket-controls:not([hidden]){background:#203b36;border-color:#4c8d7e}
html[data-theme="dark"] #code{background:#0c171e;color:#bdddd6}
html[data-theme="dark"] .line-no{color:#9cb8b1}
html[data-theme="dark"] #viewer{border-color:#435a63}
/* Keep the technical 3D rendering and tool colors untouched. */
html[data-theme="dark"] .view-meta{background:#14242dec;padding:10px 12px;border-radius:6px;top:12px;left:12px}
html[data-theme="dark"] .view-meta span,html[data-theme="dark"] .view-bottom span{color:#bbd1d5}
html[data-theme="dark"] .view-bottom,html[data-theme="dark"] #scene-error{background:#14242df5}
@media(max-width:750px){.header-right{width:100%}.header-right button{min-height:40px}#theme-toggle{margin-right:auto}}
