/* ================================================================
   Moklav UIUX — Canonical Theme Toggle (HB-DARK-1, package v2.10)
   One toggle for every surface: www · tools · panel · dnscheck ·
   japanlife. Round 32px button, half-circle glyph 18px, optically
   centred, recognisable at a glance in light and dark bars.
   Pairs with the language dropdown (same tokens, same dark rules).
   ================================================================ */
.mk-tgl{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex:none;padding:0;border-radius:999px;border:1px solid var(--mk-line,#e3e6eb);background:var(--mk-card,#fff);color:var(--mk-ink,#181F32);cursor:pointer;vertical-align:middle;transition:background .15s,border-color .15s}
.mk-tgl:hover{background:var(--mk-soft,#e3f5fc);border-color:#bfe6f7}
.mk-tgl:focus-visible{outline:2px solid var(--mk-cyan,#50BDEB);outline-offset:2px}
.mk-tgl svg{width:18px;height:18px;display:block;flex:none}
[data-theme="dark"] .mk-tgl,.mk-dark .mk-tgl{background:#182238;border-color:#2a3452;color:#e7eaf0}
[data-theme="dark"] .mk-tgl:hover,.mk-dark .mk-tgl:hover{background:#1d2c49}

/* 360 fit (HB-DARK-1 cell): toggle compacts with the cluster at <=380px. */
@media (max-width:380px){
  .mk-tgl{width:30px;height:30px}
  .mk-tgl svg{width:16px;height:16px}
}

/* Manual toggle owns the --mk-* tokens (HB-DARK-1, Watanabe's executed
   root cause): brand.css flips its --mk-* tokens ONLY under
   @media (prefers-color-scheme: dark), so a manual toggle never moved
   surfaces aliased to those tokens (tools body: --bg: var(--mk-bg)
   stayed on the OS value). These blocks mirror brand.css's OWN values
   (light :root set and its media-query dark set, read from the live
   /static/brand-ui/brand.css) keyed to the manual data-theme instead —
   the visitor's explicit choice wins over the OS in both directions. */
:root[data-theme="light"]{--mk-brand:#181F32;--mk-brand-hover:#7fd0f1;--mk-brand-soft:#e3f5fc;--mk-ink:#181F32;--mk-mut:#5b6474;--mk-bg:#f6f7f9;--mk-line:#e3e6eb;--mk-card:#fff}
:root[data-theme="dark"]{--mk-brand:#50BDEB;--mk-brand-hover:#7fd0f1;--mk-brand-soft:#15304a;--mk-ink:#e7eaf0;--mk-mut:#9aa3b2;--mk-bg:#0f1424;--mk-line:#2a3452;--mk-card:#181F32}
