/* Shared foundation controls. Lesson layouts and art keep their existing styles. */
.ml-site-controls{position:relative;z-index:40;display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;max-width:1120px;margin:0 auto;padding:8px 16px;color:inherit}
.ml-site-controls .ml-language{margin:0}
.ml-zone-music{position:relative;display:flex;flex-wrap:nowrap;gap:4px;margin:0;color:inherit}
.ml-zone-music .music-btn,.ml-zone-music summary,.ml-zone-music select{min-height:44px;border:1px solid currentColor;border-radius:10px;padding:6px 10px;background:transparent;color:inherit;font:600 14px system-ui;cursor:pointer}
.ml-zone-music summary{list-style:none;display:grid;place-items:center;min-width:44px}
.ml-zone-music summary::-webkit-details-marker{display:none}
.ml-zone-music select{max-width:100%;background:#f4f1ea;color:#202033}
.ml-music-options{position:absolute;right:0;top:calc(100% + 6px);display:flex;align-items:center;flex-wrap:wrap;gap:8px;width:min(310px,calc(100vw - 32px));padding:12px;border:1px solid #d9c48e;border-radius:12px;background:#202033;color:#f4f1ea;box-shadow:0 5px 20px #0005;z-index:60}
.ml-zone-music .music-volume{display:flex;flex-wrap:wrap}
.ml-zone-music .music-volume input{width:130px;min-height:44px}
.ml-zone-music button:focus-visible,.ml-zone-music summary:focus-visible{outline:3px solid #d9c48e;outline-offset:2px}
.ml-chinese-notice{max-width:1100px;margin:0 auto;padding:6px 16px;font-size:14px}
.ml-chinese-notice[hidden]{display:none}
@media(max-width:420px){.ml-site-controls{padding:6px 8px;gap:6px}.ml-zone-music .music-btn{padding:6px 8px}}

#ml-shell-head:has(.ml-site-controls){flex-wrap:wrap}#ml-shell-head .ml-site-controls{padding:0}#ml-shell-head .ml-shell-controls{flex-wrap:wrap}#ml-shell-head:has(.ml-site-controls) .ml-shell-name{min-width:0}

#ml-shell-head:has(.ml-site-controls){height:auto;min-height:52px}
@media(max-width:600px){
 #ml-shell-head:has(.ml-site-controls) .ml-shell-name{flex-basis:100%}
 #ml-shell-head:has(.ml-site-controls) .ml-shell-controls{width:100%;justify-content:space-between}
 #ml-shell-head:has(.ml-site-controls) .ml-shell-brand{font-size:13px}
}
/* Directory navigation already carries the brand; keep its control strip compact. */
body.ml-shell-directory #ml-shell-head:has(.ml-site-controls){height:52px;min-height:52px;flex-wrap:nowrap}
body.ml-shell-directory #ml-shell-head:has(.ml-site-controls) .ml-shell-name{display:none}
body.ml-shell-directory #ml-shell-head:has(.ml-site-controls) .ml-shell-controls{width:100%;justify-content:space-between}
body.ml-shell-directory #ml-shell-head:has(.ml-site-controls) .ml-shell-lang{margin-left:auto}
/* Home keeps its fixed site navigation above the language bar and mobile menu. */
body[data-zone="home"]>.ml-site-controls{margin-top:var(--nav-h,74px);z-index:15}
/* Foundation controls are screen chrome, not part of a worksheet or certificate. */
@media print{.ml-site-controls,.ml-toolbar,.ml-language,#ml-shell-head,#ml-shell-foot{display:none!important}}

/* The embedding page owns shared controls; child lesson settings remain available. */
body.ml-embedded .ml-language,body.ml-embedded>.ml-site-controls,body.ml-embedded>.ml-toolbar{display:none!important}
