/* Accessible compact color picker. Controls only; no general layout changes. */
.ml-theme-control{position:relative;display:flex;align-items:center;align-self:center;}
.ml-theme-toggle{display:inline-flex;align-items:center;gap:.42rem;min-height:40px;padding:.43rem .71rem;
 border:1px solid var(--ml-border);border-radius:6px;background:var(--ml-inset);color:var(--ml-fg);
 font:inherit;font-size:.9rem;font-weight:650;line-height:1.25;cursor:pointer;white-space:nowrap;}
.ml-theme-toggle:hover,.ml-theme-toggle[aria-expanded="true"]{border-color:var(--ml-purple);background:var(--ml-raised);}
.ml-theme-toggle svg{width:16px;height:16px;stroke:var(--ml-purple);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.ml-theme-menu{position:absolute;right:0;top:calc(100% + 9px);z-index:150;width:min(470px,calc(100vw - 24px));
 padding:12px;background:var(--ml-surface);color:var(--ml-fg);border:1px solid var(--ml-border);
 border-radius:8px;box-shadow:0 16px 38px rgba(0,0,0,.3);}
.ml-theme-menu[hidden],.ml-theme-empty[hidden],.ml-theme-option[hidden],.ml-theme-group[hidden]{display:none!important;}
.ml-theme-menu-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;font-size:.89rem;}
.ml-theme-current{color:var(--ml-muted);font-size:.8rem;}
.ml-theme-search{width:100%;margin:0 0 10px;padding:9px 11px;min-height:39px;border-radius:5px;
 border:1px solid var(--ml-border-hover);background:var(--ml-inset);color:var(--ml-fg);font:inherit;font-size:.88rem;}
.ml-theme-search::placeholder{color:var(--ml-muted);opacity:1;}
.ml-theme-choices{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px;max-height:min(58vh,446px);overflow-y:auto;
 padding-right:4px;overscroll-behavior:contain;scrollbar-color:var(--ml-border-hover) var(--ml-surface);}
.ml-theme-group{grid-column:1/-1;margin:7px 0 2px;padding:5px 3px 3px;border-bottom:1px solid var(--ml-border);
 font-size:.69rem;letter-spacing:.07em;text-transform:uppercase;color:var(--ml-muted);font-weight:750;}
.ml-theme-option{display:flex;align-items:center;gap:8px;width:100%;min-width:0;min-height:42px;padding:6px;
 color:var(--ml-fg);background:transparent;border:1px solid transparent;border-radius:5px;
 text-align:left;font-family:inherit;font-size:.79rem;line-height:1.2;cursor:pointer;}
.ml-theme-option:hover{background:var(--ml-raised);}
.ml-theme-option[aria-pressed="true"]{background:var(--ml-inset);border-color:var(--ml-purple);}
.ml-theme-swatches{display:flex;align-items:center;gap:2px;flex:0 0 auto;border:1px solid var(--ml-border);border-radius:3px;overflow:hidden;}
.ml-theme-swatch{display:block;width:9px;height:22px;}
.ml-theme-option-name{flex:1;min-width:0;white-space:normal;font-weight:620;}
.ml-theme-check{flex:0 0 12px;color:var(--ml-cyan);font-size:.93rem;font-weight:800;}
.ml-theme-empty{margin:9px 4px 3px;color:var(--ml-muted);font-size:.84rem;}
.ml-theme-toggle:focus-visible,.ml-theme-search:focus-visible,.ml-theme-option:focus-visible{outline:2px solid var(--ml-purple)!important;outline-offset:2px!important;}
@media(max-width:991.98px){.ml-theme-control{align-self:flex-start;margin:.3rem .5rem;}.ml-theme-menu{position:fixed;left:auto;right:12px;top:75px;width:min(470px,calc(100vw - 24px));}}
@media(max-width:495px){.ml-theme-choices{grid-template-columns:1fr;}.ml-theme-menu{left:12px;right:12px;top:70px;width:calc(100vw - 24px);max-height:76vh;overflow-y:auto;}.ml-theme-option{font-size:.86rem;}}
@media(prefers-reduced-motion:reduce){.ml-theme-menu,.ml-theme-option{transition:none!important;}}
