/* Approved MusicSlate Home, scoped to this workspace. Storage and navigation stay in library.js. */
#library-home{--home-bg:#e9eff3;--home-ink:#172f4d;--home-muted:#40576e;--home-line:#657f98;--home-surface:#f8fbfc;--home-primary:#172f4d;--home-music:linear-gradient(90deg,#d0e0ef 0%,#cce3e4 60%,#d4e6dc 100%);--home-organize:linear-gradient(90deg,#dcd5eb,#d5cee5)}
[data-library-theme=dark] #library-home{--home-bg:#141f29;--home-ink:#eef4fc;--home-muted:#c1d0e2;--home-line:#7892ad;--home-surface:#233440;--home-music:linear-gradient(90deg,#223448 0%,#233b40 60%,#293b36 100%);--home-organize:linear-gradient(90deg,#3d374d,#343248)}
html:has(#library-home:not([hidden])),body:has(#library-home:not([hidden])){background:#e9eff3}
html[data-library-theme=dark]:has(#library-home:not([hidden])),[data-library-theme=dark] body:has(#library-home:not([hidden])){background:#141f29}
body #library-home{min-height:100vh;min-height:100dvh;box-sizing:border-box;max-width:none;margin:0;padding:0 0 calc(var(--workspace-footer-height,70px) + var(--workspace-footer-inset,0px) + 24px);color:var(--home-ink);background:var(--home-bg);font:16px/1.5 system-ui,sans-serif}
body #library-home .workspace-banner{box-shadow:none;height:auto;min-height:72px;padding:14px 0;display:block}
#library-home .home-header-inner{box-sizing:border-box;width:100%;max-width:1120px;margin:auto;padding-inline:max(28px,env(safe-area-inset-left)) max(28px,env(safe-area-inset-right));display:flex;align-items:center;justify-content:space-between;gap:16px}
body #library-home .workspace-banner h1{font-size:22px;letter-spacing:-.025em}
body #library-home #home-about{border:1px solid #ffffff70;border-radius:8px;flex:0 0 44px}
#library-home .home-content{box-sizing:border-box;max-width:1120px;margin:auto;padding:22px 28px 24px}
#library-home #home-update-status:empty{display:none}
#library-home #home-song-view{margin:0 0 10px;gap:4px;font-size:12px;color:var(--home-ink)}
#library-home .song-view-segments{padding:0;border:1px solid var(--home-line);border-radius:8px;background:var(--home-surface);color:var(--home-ink)}
#library-home .song-view-segments::before{content:none}
#library-home .song-view-segments span{box-sizing:border-box;min-width:72px;height:44px;margin:0;padding:8px 14px;font-size:13px}
#library-home .song-view-segments input:checked+span{background:var(--home-primary);color:white}
#library-home #home-search-form{position:relative;max-width:820px;margin:0 0 22px;gap:8px}
#library-home #home-search{box-sizing:border-box;min-height:46px;padding:10px 14px 10px 40px;border:1px solid var(--home-line);border-radius:10px;background:var(--home-surface);color:var(--home-ink);font:16px system-ui,sans-serif}
#library-home #home-search::placeholder{color:var(--home-muted);opacity:1}
#library-home #home-search-form::before{content:'';position:absolute;left:15px;top:16px;width:11px;height:11px;border:1.7px solid var(--home-muted);border-radius:50%;pointer-events:none}
#library-home #home-search-form::after{content:'';position:absolute;left:26px;top:28px;width:6px;border-top:1.7px solid var(--home-muted);transform:rotate(45deg);pointer-events:none}
html body #library-home #home-search-form button[type=submit]{background:var(--home-primary);color:white;border:1px solid var(--home-primary);border-radius:10px;padding:0 18px;min-height:46px;font:600 13px system-ui,sans-serif}
#library-home h2{font:650 15px/1.5 system-ui,sans-serif;letter-spacing:-.01em;margin:0 0 12px;color:var(--home-ink)}
body #library-home nav.home-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
body #library-home nav.home-cards>button{box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;gap:14px;min-height:92px;width:100%;padding:16px 18px;border:1.5px solid var(--home-line);border-radius:10px;background:var(--home-music);color:var(--home-ink);box-shadow:0 2px 5px #172d3920;text-align:left;transform:none}
body #library-home nav.home-cards>button[data-home-source=all]{background:linear-gradient(105deg,#b6d4f2 0%,#a5d5e3 45%,#9bd7cc 100%);border:2px solid #172f4d;border-left-width:5px;padding-left:14px}
body #library-home .home-organize-section{border-top:1px solid var(--home-line);margin-top:22px;padding-top:18px}
body #library-home .home-organize-section nav.home-cards>button:is(#home-lists,#home-files){min-height:80px;background:var(--home-organize);border-color:var(--home-line)}
#library-home .home-card-icon{display:flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px}
#library-home .home-card-icon svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#library-home .home-card-copy{flex:1;min-width:0}
#library-home nav.home-cards strong{font-size:16px;line-height:1.3;font-weight:650}
#library-home nav.home-cards small{font-size:13px;line-height:1.45;margin-top:4px;color:var(--home-muted)}
#library-home nav.home-cards>button>svg{flex:none;width:18px;height:18px}
body #library-home nav.home-cards>button:hover{filter:brightness(.97);border-color:var(--home-ink);transform:none}
body #library-home nav.home-cards>button:active{box-shadow:inset 0 2px 5px #0003}
body #library-home :is(button,input):focus-visible,#library-home .song-view-segments input:focus-visible+span{outline:3px solid #995100;outline-offset:3px}
body #library-home .library-home-footer{justify-content:center;padding:8px max(16px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:var(--home-surface);border-color:var(--home-line);box-shadow:none}
body #library-home .home-toolbar{display:grid;grid-template-columns:repeat(6,minmax(44px,1fr));max-width:680px;gap:6px;margin:auto}
body #library-home .home-toolbar button[id][type]{box-sizing:border-box;width:100%;min-width:44px;height:auto;min-height:52px;display:flex;flex-direction:row;gap:6px;padding:4px 8px;font:550 12px/1.5 system-ui,sans-serif;background:transparent;color:var(--home-ink);border:1px solid transparent;border-radius:8px;margin:0}
body #library-home .home-toolbar #home-settings{margin:0}
body #library-home .home-toolbar svg{width:23px;height:23px;flex:none}
/* Enlarged labels wrap within their own target; the existing footer observer reserves the resulting height. */
body #library-home .home-toolbar :is(.footer-destination-label,.home-settings-label){display:inline;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
body #library-home .home-toolbar #home-current{background:var(--app-header-background);color:white;font-size:14px}
body #library-home .home-toolbar #home-current svg{width:30px;height:30px}
body #library-home .home-toolbar button[id][type]:hover{background:#e3ebf0}
body #library-home .piano-keyboard-icon{color:#172f4d}
body #library-home .piano-keyboard-icon .white-keys{fill:white}
body #library-home .piano-keyboard-icon .black-keys{fill:currentColor;stroke-width:1}
[data-library-theme=dark] body #library-home nav.home-cards>button[data-home-source=all]{background:linear-gradient(105deg,#213e61 0%,#244b5a 45%,#23534b 100%);border-color:#b7cceb}
[data-library-theme=dark] body #library-home nav.home-cards>button:hover{filter:brightness(1.12)}
[data-library-theme=dark] body #library-home .home-toolbar button[id][type]:hover{background:#304653}
[data-library-theme=dark] body #library-home :is(button,input):focus-visible,[data-library-theme=dark] #library-home .song-view-segments input:focus-visible+span{outline-color:#ffc36f}
@media(max-width:900px){body #library-home .home-toolbar{grid-template-columns:96px repeat(5,minmax(44px,1fr))}body #library-home .home-toolbar button[id][type]:not(#home-current){flex-direction:column;gap:2px}}
@media(max-width:700px){#library-home .home-content{padding-top:16px}body #library-home nav.home-cards{grid-template-columns:1fr}body #library-home nav.home-cards>button,body #library-home .home-organize-section nav.home-cards>button:is(#home-lists,#home-files){min-height:76px;padding:12px 14px}body #library-home nav.home-cards>button[data-home-source=all]{padding-left:11px}}
@media(max-width:600px){body #library-home .workspace-banner{padding:10px 0;min-height:64px}#library-home .home-header-inner{padding-inline:max(16px,env(safe-area-inset-left)) max(16px,env(safe-area-inset-right))}body #library-home .workspace-banner h1{font-size:20px}#library-home .home-content{padding-inline:16px}#library-home .home-card-icon{flex-basis:30px;width:30px;height:30px}#library-home .home-card-icon svg{width:25px;height:25px}body #library-home nav.home-cards>button{gap:10px}#library-home nav.home-cards strong{font-size:15px}#library-home nav.home-cards small{font-size:12px}body #library-home .library-home-footer{padding:6px max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}body #library-home .home-toolbar{grid-template-columns:repeat(6,minmax(44px,1fr));gap:2px}body #library-home .home-toolbar button[id][type]{padding:4px 0;gap:3px;font-size:10px;font-weight:600}body #library-home .home-toolbar #home-current span{display:none}body #library-home .home-toolbar svg{width:22px;height:22px}html body #library-home #home-search-form button[type=submit]{padding:0 12px}}
@media(min-width:1024px) and (hover:hover) and (pointer:fine){#library-home{--home-primary:#245584}body #library-home nav.home-cards>button[data-home-source=all]{border-color:#45698b;border-left-width:4px;padding-left:15px}[data-library-theme=dark] body #library-home nav.home-cards>button[data-home-source=all]{border-color:#90aac6}}

/* Neutral button surfaces; retain category cues and approved dimensions. */
body #library-home nav.home-cards>button{background:#fff;border-color:#8093a6;box-shadow:0 2px 3px #172f4d26,inset 0 1px #fff;border-left:4px solid #477b89}
body #library-home nav.home-cards>button[data-home-source=all]{background:#fff;border-color:#52779b;border-left-color:#28688c}
body #library-home .home-organize-section nav.home-cards>button:is(#home-lists,#home-files){background:#fff;border-color:#8791a6;border-left-color:#837098}
body #library-home nav.home-cards>button:hover{background:#f5f7f9;filter:none;border-color:#355b78;box-shadow:0 3px 6px #172f4d30}
body #library-home nav.home-cards>button:active{background:#e9eef2;box-shadow:inset 0 2px 4px #172f4d25}
[data-library-theme=dark] body #library-home nav.home-cards>button,[data-library-theme=dark] body #library-home nav.home-cards>button[data-home-source=all],[data-library-theme=dark] body #library-home .home-organize-section nav.home-cards>button:is(#home-lists,#home-files){background:#24333f;border-color:#8b9bad;border-left-color:#7ba6ba;box-shadow:0 2px 4px #0005}
[data-library-theme=dark] body #library-home .home-organize-section nav.home-cards>button:is(#home-lists,#home-files){border-left-color:#b2a1c5}
[data-library-theme=dark] body #library-home nav.home-cards>button:hover{background:#2f414f;filter:none}
[data-library-theme=dark] body #library-home nav.home-cards>button:active{background:#1d2b36;box-shadow:inset 0 2px 4px #0005}
body #library-home nav.home-cards>button[data-home-source]:not([data-home-source=all]){background:#fff}
body #library-home nav.home-cards>button[data-home-source]:not([data-home-source=all]):hover{background:#f5f7f9}
body #library-home nav.home-cards>button[data-home-source]:not([data-home-source=all]):active{background:#e9eef2}
[data-library-theme=dark] body #library-home nav.home-cards>button[data-home-source]:not([data-home-source=all]){background:#24333f}
[data-library-theme=dark] body #library-home nav.home-cards>button[data-home-source]:not([data-home-source=all]):hover{background:#2f414f}
[data-library-theme=dark] body #library-home nav.home-cards>button[data-home-source]:not([data-home-source=all]):active{background:#1d2b36}
