/* Shared compact controls, including selects created by the score editor. */
:root{--select-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23958b7f' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E")}
select:not([multiple]):not([size]){appearance:none!important;-webkit-appearance:none!important;background-image:var(--select-chevron)!important;background-repeat:no-repeat!important;background-position:right 10px center!important;background-size:14px 14px!important;padding-right:32px!important;cursor:pointer;text-overflow:ellipsis;transition:border-color .18s,box-shadow .18s}
select:not([multiple]):not([size]):hover{border-color:#cfb99c}
select:focus-visible{outline:2px solid #e7b276;outline-offset:2px;box-shadow:0 0 0 3px #f9eddc}
select:disabled{cursor:not-allowed;opacity:.5}
select option{background:#fffdf9;color:#454c50}
.score-toolbar select{border:1px solid #eae4db;border-radius:8px;padding:7px 9px;background-color:#fffdf9;min-height:32px}
summary{list-style:none;display:flex;align-items:center;gap:10px}
summary::-webkit-details-marker{display:none}
summary::after{content:'';width:7px;height:7px;flex:none;border-right:1.5px solid #a3998c;border-bottom:1.5px solid #a3998c;transform:rotate(45deg);margin:0 3px 4px;transition:transform .18s}
details[open]>summary::after{transform:rotate(225deg);margin-bottom:0}
.language-toggle{position:relative;isolation:isolate;display:grid;grid-template-columns:1fr 1fr;align-items:center;width:80px;height:33px;padding:3px;border:1px solid #e7dfd4;border-radius:20px;background:#eeebe5;color:#9c9389;flex:none;cursor:pointer;box-shadow:inset 0 1px 2px #46351c04}
.language-toggle::before{content:'';position:absolute;z-index:-1;inset:3px auto 3px 3px;width:calc(50% - 3px);background:#fffdf8;border-radius:16px;box-shadow:0 1px 4px #49351c17;transition:transform .2s}
.language-toggle[aria-checked=true]::before{transform:translateX(100%)}
.language-toggle>span{font-size:11px;line-height:1;font-weight:600;pointer-events:none}
.language-toggle[aria-checked=false]>span:first-child,.language-toggle[aria-checked=true]>span:last-child{color:#b2783e}
.header-actions{gap:18px;flex-wrap:nowrap}
.account-toggle{border-radius:24px;padding:5px;gap:9px;transition:background .18s}
.account-toggle:hover,.account-toggle[aria-expanded=true]{background:#f1eade}
.account-toggle #account-name{max-width:110px}
.account-dropdown{top:calc(100% + 8px);right:0;padding:7px;width:185px;border-color:#eae2d7;box-shadow:0 12px 40px #392c1814}
.account-dropdown:before{content:'';position:absolute;left:0;right:0;top:-14px;height:14px}
.account-dropdown button,.account-dropdown a{font-size:12px;padding:11px 12px}
.library-search-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex:0 1 460px;min-width:0}
.library-search-actions .library-controls{flex:1;min-width:0;margin:0}
.library-search-actions #library-upload{flex:none;white-space:nowrap;border-radius:24px;padding:13px 18px;font-size:12px;min-height:44px}
.library-heading{gap:24px}
@media(max-width:1000px){.library-heading{flex-wrap:wrap}.library-search-actions{flex:1 1 380px}.header-actions{gap:12px}}
@media(max-width:600px){.header-actions{gap:10px}.language-toggle{width:72px;height:31px}.account-toggle{padding:3px}.account-dropdown{right:0;width:180px}.library-search-actions{width:100%;margin-top:18px;gap:9px}.library-search-actions .library-controls{margin:0;width:auto}.library-search-actions #library-upload{padding:10px 13px;font-size:11px;min-height:40px}.library-search-actions .library-controls input{width:100%;font-size:11px}.score-toolbar>div{gap:10px}.score-toolbar select{max-width:120px}.account-toggle #account-name{display:none}}
@media(prefers-reduced-motion:reduce){.language-toggle::before,summary::after{transition:none}}
@media(forced-colors:active){select:not([multiple]):not([size]){appearance:auto!important;-webkit-appearance:auto!important;background-image:none!important}.language-toggle[aria-checked=false]>span:first-child,.language-toggle[aria-checked=true]>span:last-child{outline:1px solid Highlight;padding:4px;border-radius:12px}}
