/* Paint the scroll container itself so the lower menu never turns white. */
:root{--qm-web-sidebar-bg:linear-gradient(165deg,#f6faf7,#e4efe7)}
:root[data-theme=madinah]{--qm-web-sidebar-bg:linear-gradient(165deg,#f5f9fc,#e1edf5)}
:root[data-theme=classic]{--qm-web-sidebar-bg:linear-gradient(165deg,#fdf9f2,#f0e5d5)}
:root[data-theme=purple]{--qm-web-sidebar-bg:linear-gradient(165deg,#faf7fd,#eae2f2)}
:root[data-theme=neutral]{--qm-web-sidebar-bg:linear-gradient(165deg,#f8f7f3,#e8ebe4)}
:root[data-theme=night]{--qm-web-sidebar-bg:linear-gradient(165deg,#1a261f,#111a15)}
#sidebar.sidebar{background:var(--qm-web-sidebar-bg)!important;background-attachment:scroll!important}
#sidebar.sidebar::before{content:none!important;display:none!important}
#sidebar.sidebar #qmAudioNav>span:first-child{font-size:0!important}
#sidebar.sidebar #qmAudioNav>span:first-child::before{content:"🎧"!important;display:block;font:20px/1 "Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif!important}
#sidebar.sidebar :is(#qmWebHafalanNav,#qmHafalanNav)>span:first-child::before{content:"🗂️"!important}
#sidebar.sidebar .qm-web-brand-copy{display:grid;gap:3px;min-width:0;letter-spacing:0}
#sidebar.sidebar .qm-web-brand-copy strong{font:750 13px/1.4 system-ui;color:inherit}
#sidebar.sidebar .qm-web-brand-copy small{font:600 10px/1.4 system-ui;color:var(--muted,#637369)}
:root[data-theme=night] #sidebar.sidebar .sidebar-note{background:#131e17!important;border-color:#405347!important;color:#c9d2c5!important}
:root[data-theme=night] #sidebar.sidebar .sidebar-note::before{background:#294234!important;color:#c5d0c0!important;box-shadow:none!important}
@media(max-width:900px){
 #sidebar.sidebar .nav-item,#sidebar.sidebar .sidebar-group>summary{min-height:46px;box-sizing:border-box;align-items:center;gap:12px;font:600 16px/1.45 system-ui,sans-serif}
 #sidebar.sidebar .sidebar-group>summary>strong{font:650 16px/1.45 system-ui,sans-serif}
 #sidebar.sidebar .nav-item>span:first-child,#sidebar.sidebar .sidebar-group>summary>span:first-child{width:32px;height:32px;min-width:32px;flex:0 0 32px;display:grid;place-items:center}
 #sidebar.sidebar .sidebar-note{box-sizing:border-box;margin-bottom:12px!important}
}

:root[data-theme=night] #sidebar.sidebar #sidebarRefresh{background:#1b2920!important;border-color:#405347!important;color:#c3cebf!important}
:root[data-theme=night] #sidebar.sidebar #sidebarRefresh::after{background:#263b2d!important;color:#a7b8a9!important}
