#score-sheet-backdrop,.custom-select-backdrop{position:fixed;inset:0;z-index:99;border:0;border-radius:0;padding:0;background:#0003;box-shadow:none;touch-action:none}
#score-sheet-backdrop[hidden]{display:none}.custom-select-backdrop{display:none;z-index:119}
#score-sheet-backdrop,.custom-select-backdrop,.mobile-control-backdrop{background:rgba(0,0,0,.26)!important;box-shadow:none!important}
.custom-select-sheet-head{display:none}
.mobile-control-head,.mobile-control-backdrop{display:none}
@media screen and (max-width:760px){
 .mobile-control-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:98;background:#0003;border:0;border-radius:0;padding:0;touch-action:none}
 .mobile-control-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;font-size:14px;font-weight:600}
 #song-menu .mobile-control-head .icon-button,.mobile-control-head .icon-button{display:grid;place-items:center;flex:none;width:34px;height:34px;min-height:34px;padding:8px;border:0;border-radius:50%;background:#eee;color:#444}
 .mobile-control-head .icon-button svg{display:block;width:18px;height:18px}
 #volume-popover,#scroll-popover,#metro-tempo-popover,#song-menu,#library-menu,#account-menu{position:fixed!important;z-index:100!important;inset:auto 0 var(--keyboard-inset,0px)!important;width:100%!important;max-width:100%!important;max-height:calc(var(--visible-height,100dvh) - 32px)!important;margin:0!important;padding:18px 18px max(22px,env(safe-area-inset-bottom))!important;border-radius:22px 22px 0 0!important;border:1px solid #ddd!important;background:#fff;box-shadow:0 -8px 40px #0002;overflow:auto;animation:mobile-sheet-rise .18s ease-out}
 #volume-popover:not([hidden]){display:grid;grid-template-columns:1fr 32px;gap:12px;align-items:center}#volume-popover .mobile-control-head{grid-column:1/-1;margin-bottom:0}#volume-popover input{width:100%}
 dialog.export-modal[open],dialog.trash-dialog[open]{inset:auto 0 var(--keyboard-inset,0px);width:100%;max-width:100%;max-height:calc(var(--visible-height,100dvh) - 32px);margin:0;border-radius:22px 22px 0 0;padding:20px 16px max(20px,env(safe-area-inset-bottom))}
 #score-popover.score-popover,#score-popover.score-popover[data-kind],body[data-operation-menu=detailed] #score-popover[data-kind=technique]{position:fixed;z-index:100;left:0!important;right:0!important;top:auto!important;bottom:var(--keyboard-inset,0px)!important;width:100%!important;max-width:100%!important;max-height:calc(var(--visible-height,100dvh) - 36px)!important;margin:0;padding:22px 16px max(18px,env(safe-area-inset-bottom));border:1px solid #ddd;border-bottom:0;border-radius:22px 22px 0 0;overflow:auto;overscroll-behavior:contain;box-shadow:0 -8px 40px #0002;animation:mobile-sheet-rise .18s ease-out}
 #score-popover::before{content:'';position:absolute;top:8px;left:calc(50% - 18px);width:36px;height:4px;border-radius:4px;background:#ccc}
 #score-popover .annotation-tail{display:none}
 #score-popover .technique-options{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;justify-items:center}
 body[data-operation-menu=detailed] #score-popover .technique-options{grid-template-columns:1fr;gap:3px;justify-items:stretch}
 #score-popover .chord-picker-browser{max-height:52dvh;overflow:auto;overscroll-behavior:contain}
 dialog[open]{position:fixed;inset:auto 0 var(--keyboard-inset,0px);width:100%;max-width:100%;max-height:calc(var(--visible-height,100dvh) - 32px);margin:0;padding:20px 16px max(20px,env(safe-area-inset-bottom));border-radius:22px 22px 0 0;border-bottom:0;overscroll-behavior:contain;animation:mobile-sheet-rise .18s ease-out}
 #workspace>#range-tools{left:8px!important;right:8px!important;top:auto!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;max-width:calc(100vw - 16px);margin:auto;animation:mobile-sheet-rise .18s ease-out}
 .custom-select-backdrop{display:block}
 .custom-select-popover{z-index:120;left:0!important;right:0!important;top:auto!important;bottom:var(--keyboard-inset,0px)!important;width:100%!important;max-height:calc(var(--visible-height,100dvh) - 44px)!important;padding:12px 12px max(14px,env(safe-area-inset-bottom));border-radius:22px 22px 0 0;box-shadow:0 -8px 36px #0002;animation:mobile-sheet-rise .18s ease-out}
 .custom-select-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 4px 8px;font-size:13px;font-weight:600}.custom-select-sheet-head button{display:grid;place-items:center;flex:none;width:34px;height:34px;min-height:34px;padding:8px;border:0;border-radius:50%;background:#eee;color:#444}
 .custom-select-popover .custom-select-options{max-height:54dvh}
 .custom-select-option{min-height:46px;border-radius:12px}
}
@keyframes mobile-sheet-rise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){#score-popover.score-popover,dialog[open],.custom-select-popover,#song-menu,#library-menu,#account-menu{animation:none!important}}
@media print{#score-sheet-backdrop,.custom-select-backdrop{display:none!important}}
