/* A shared search layout; each room supplies its own color and type tokens. */
html body :is(#view-profile,#view-search) .taste-workspace{grid-template-columns:minmax(0,1fr);gap:24px}
html body :is(#view-profile,#view-search) .taste-workspace>.panel{min-width:0;padding:24px}
body .search-heading{display:flex;align-items:start;justify-content:space-between;gap:20px;margin-bottom:20px}
body .search-heading h2{font-size:24px;margin:4px 0 8px}
body .search-heading p{margin:0}
body .search-catalog-note{max-width:210px;color:var(--muted);font-size:12px;text-align:right;line-height:1.6}
body #song-search label{font-size:12px;margin:0 0 8px}
html body .taste-add .search-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:12px;margin:0}
body .search-input-wrap{display:flex;align-items:center;gap:12px;min-width:0;border:1px solid var(--line);background:var(--bg);border-radius:12px;padding:0 6px 0 16px}
body .search-input-wrap:focus-within{border-color:var(--accent);outline:2px solid var(--accent);outline-offset:2px}
body .search-input-wrap>svg{width:21px;height:21px;flex:none;color:var(--muted)}
html body :is(#view-profile,#view-search) .search-input-wrap #song-query{flex:1;min-width:0;width:100%;height:54px;min-height:54px;margin:0;padding:12px 0;border:0;background:transparent;color:var(--text);box-shadow:none;outline:0;font-size:16px;border-radius:0}
body #song-query::-webkit-search-cancel-button{display:none}
html body .taste-add .search-controls #clear-song-search{flex:none;width:44px;height:44px;padding:0;margin:0;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:var(--muted);font:26px/1 system-ui}
html body .taste-add .search-controls #clear-song-search:hover{background:var(--surface);color:var(--text)}
html body .taste-add .search-controls>.primary{min-height:54px;padding:12px 28px;margin:0;border-radius:12px}
body .taste-add .search-hint{margin:10px 0 0;font-size:12px;color:var(--muted)}
html body .taste-add #song-search-types{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 0}
html body .taste-add #song-search-types button{flex:0 1 auto;width:auto;min-height:44px;margin:0;padding:8px 14px;border-radius:9px;font-size:13px}
html body .taste-add #song-search-types button[aria-pressed=true]{background:var(--accent);color:var(--bg);border-color:var(--accent)}
html body .taste-add .search-language-control{display:flex;align-items:end;flex-wrap:wrap;gap:10px 20px;margin-top:14px;min-width:0}
html body .taste-add .search-language-control label{display:grid;gap:7px;margin:0;flex:0 1 210px;min-width:0}
html body .taste-add #song-language{width:100%;min-height:44px;margin:0;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);font:inherit}
html body .taste-add #song-language:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
body .search-language-control p{flex:1 1 240px;margin:0 0 9px;font-size:12px;color:var(--muted)}
body #song-search-results .search-edition-label{font-size:11px;color:var(--muted);margin:5px 0;overflow-wrap:anywhere}
html body #song-search-results .search-release-edition{margin-top:14px;padding:14px 16px 0;border:1px solid var(--line);border-radius:12px;min-width:0}
body .search-release-edition>h4{font-size:15px;margin:0 0 5px;overflow-wrap:anywhere;color:var(--text)}
body .search-release-edition>p{font-size:12px;margin:0 0 10px;color:var(--muted);overflow-wrap:anywhere}
body .search-release-edition details>summary{min-height:44px;padding:12px 0;cursor:pointer}
html body #song-search-results .search-unlabeled-matches{margin-top:16px;border:1px solid var(--line);border-radius:10px;padding:0 14px;min-width:0}
body .search-unlabeled-matches>summary{min-height:48px;padding:14px 0;cursor:pointer;overflow-wrap:anywhere}
body .search-unlabeled-matches>summary>span{margin-left:8px;color:var(--muted)}
body .search-edition-empty{margin:18px 0;color:var(--muted);font-size:13px}
body .search-album-choices{margin:22px 0 28px;min-width:0}
body .search-album-choices>h3,body .search-album-navigation>h3{font-size:18px;margin:12px 0 6px;color:var(--text)}
body .search-album-choices>p,body .search-album-navigation>p{font-size:12px;color:var(--muted);margin:0 0 14px;overflow-wrap:anywhere}
body .search-album-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:14px;min-width:0}
body .search-album-card{min-width:0}
html body #song-search-results .search-album-card>button{display:flex;flex-direction:column;align-items:stretch;gap:6px;width:100%;height:100%;min-width:0;margin:0;padding:12px;text-align:left;white-space:normal;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);font:inherit}
body .search-album-card>button>strong{font-size:14px;line-height:1.4;overflow-wrap:anywhere}
body .search-album-card>button>span:not(.search-album-cover){font-size:12px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
body .search-album-card .search-album-cover{position:relative;display:grid;place-items:center;aspect-ratio:1;background:var(--bg);border-radius:8px;overflow:hidden;font-size:32px;color:var(--accent);margin-bottom:5px}
body .search-album-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
html body #song-search-results .search-album-card .search-album-open{color:var(--accent);margin-top:auto;padding-top:8px;min-height:28px}
body .search-album-choices>details{margin-top:12px;border:1px solid var(--line);border-radius:10px;padding:0 12px}
body .search-album-choices>details>summary{padding:14px 0;min-height:48px;cursor:pointer;font-size:13px}
body .search-album-choices>details>.search-album-grid{padding-bottom:12px}
html body #song-search-results :is([data-search-album],[data-search-back]):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
html body #song-search-results [data-search-back]{min-height:44px;margin:0 0 12px;padding:10px 14px}
body .search-album-navigation{margin:20px 0}
body .search-reference-choices,body .search-reference-album{margin:24px 0;min-width:0}
body :is(.search-reference-choices,.search-reference-album)>h3{font-size:18px;margin:12px 0 8px}
body :is(.search-reference-choices,.search-reference-album)>p{font-size:13px;color:var(--muted);line-height:1.6;overflow-wrap:anywhere}
body .search-reference-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px}
body .search-reference-card{display:flex;flex-direction:column;align-items:start;gap:8px;min-width:0;padding:16px;border:1px solid var(--line);border-radius:12px;overflow-wrap:anywhere}
body .search-reference-card h4,body .search-reference-track h4{font-size:15px;color:var(--text);margin:0;line-height:1.5}
body .search-reference-card p,body .search-reference-track p{font-size:12px;color:var(--muted);margin:0;line-height:1.5}
html body #song-search-results :is([data-reference-album],[data-reference-track]){min-height:44px;margin:0;padding:10px 12px;width:auto;font-size:12px;white-space:normal}
body .search-reference-card>button{margin-top:auto!important}
body :is(.search-reference-card,.search-reference-album,.search-reference-track) a{color:var(--accent);font-size:12px}
body .search-reference-choices>details{margin-top:12px}
body .search-reference-choices>details>summary{min-height:44px;padding:12px 0;cursor:pointer;font-size:13px}
body .search-reference-tracks{list-style:none;margin:0;padding:0}
body .search-reference-track{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:16px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}
body .search-reference-notice{padding:12px;border:1px solid var(--line);border-radius:9px}
@media(max-width:550px){body .search-reference-grid{grid-template-columns:minmax(0,1fr)}body .search-reference-track{grid-template-columns:minmax(0,1fr)}body .search-reference-track>button{justify-self:start}}
html body #song-search-results :is([data-reference-album],[data-reference-track]):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:550px){body .search-album-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}html body #song-search-results .search-album-card>button{padding:9px}}
body .search-results-heading{display:flex;justify-content:space-between;align-items:baseline;gap:16px;margin:26px 0 0}
body .search-results-heading h3{font-size:18px;margin:0}
body #song-search-query{overflow-wrap:anywhere;text-align:right}
body #song-search-status{font-size:12px;color:var(--muted);margin:12px 0}
body #song-search-status:empty{display:none}
body .search-placeholder,body .search-empty{text-align:center;padding:36px 20px;color:var(--muted);border:1px dashed var(--line);border-radius:12px;margin-top:20px}
body .search-placeholder>span,body .search-empty>span{font-size:30px;color:var(--accent);display:block;margin-bottom:12px}
body .search-placeholder h3,body .search-empty h3{font-size:17px;color:var(--text);margin:0 0 8px}
body .search-placeholder p,body .search-empty p{margin:0 auto;max-width:48ch}
body .search-empty button{margin:16px 0 0;min-height:44px}
body #song-search-results{min-width:0}
html body #song-search-results .search-group-title{display:flex;align-items:center;gap:10px;margin:18px 0 10px;font-size:13px;font-weight:600;color:var(--text)}
body .search-group-title>span,body :is(.search-other-matches,.search-more-matches)>summary>span{display:inline-grid;place-items:center;min-width:24px;padding:2px 6px;border:1px solid var(--line);border-radius:6px;font-size:11px;font-variant-numeric:tabular-nums;color:var(--muted)}
html body #song-search-results :is(.search-other-matches,.search-more-matches){margin:12px 0 0;padding:0;border:1px solid var(--line);border-radius:10px;background:transparent;min-width:0}
html body #song-search-results :is(.search-other-matches,.search-more-matches)>summary{padding:14px 16px;min-height:48px;cursor:pointer;font-size:13px;color:var(--text);overflow-wrap:anywhere}
body :is(.search-other-matches,.search-more-matches)>summary>span{margin-left:8px}
body :is(.search-other-matches,.search-more-matches)>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:8px}
body :is(.search-other-matches,.search-more-matches)>[role=list]{padding:0 14px}
html body #song-search-results .song-search-result{display:grid;grid-template-columns:64px minmax(0,1fr) auto auto;align-items:center;gap:12px 18px;border-top:1px solid var(--line);padding:18px 0;margin:0;min-width:0}
body .search-cover{position:relative;width:64px;height:64px;border-radius:9px;overflow:hidden;display:grid;place-items:center;background:var(--bg);border:1px solid var(--line);color:var(--accent);font-size:25px}
body .search-cover .catalog-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
html body #song-search-results .search-cover{grid-column:1;grid-row:1}
html body #song-search-results .search-track-copy{grid-column:2;grid-row:1}
html body #song-search-results .search-duration{grid-column:3;grid-row:1}
html body #song-search-results .search-track-actions{grid-column:4;grid-row:1}
body .search-track-copy{min-width:0;overflow-wrap:anywhere}
html body .taste-workspace .search-track-copy h3{font-size:16px;line-height:1.4;margin:0 0 3px;color:var(--text)}
html body .taste-workspace .search-track-copy p{font-size:13px;line-height:1.5;margin:0;color:var(--muted)}
body .search-top-match{display:block;font-size:10px;color:var(--accent);margin-bottom:4px;letter-spacing:.05em}
body .search-album{opacity:.8}
body .search-track-services .song-services{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
html body .search-track-services .service-link{display:flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;padding:8px;border-radius:50%}
body .search-track-services .service-link span{display:none}
body .search-track-services .service-link svg{width:17px;height:17px;flex:none}
body .search-duration{font-size:12px;font-variant-numeric:tabular-nums;color:var(--muted)}
body .search-track-actions{display:flex;gap:8px;align-items:center}
html body #song-search-results .search-track-actions button{min-height:44px;min-width:44px;margin:0;padding:10px 14px;font-size:12px;white-space:nowrap;border-radius:9px}
body .search-add:disabled{cursor:default;opacity:.8;color:var(--accent)}
html body #song-search-results .collection-quick{grid-column:2/-1;display:flex;justify-content:flex-start;align-items:center;gap:8px;margin:0;padding:0;border:0}
html body #song-search-results .collection-quick button{width:auto;min-width:44px;min-height:44px;height:auto;padding:8px 10px!important;margin:0;font-size:11px!important}
body #song-search-results .collection-quick button::after{display:none}
html body .taste-library .taste-library-heading{align-items:center}
html body .taste-library .taste-song{grid-template-columns:62px minmax(0,1fr) 44px;align-items:start;gap:12px}
html body .taste-library .taste-song>button{grid-column:3;grid-row:1;width:44px;min-height:44px;max-width:none;margin:0;padding:8px;justify-self:end}
body .taste-library .taste-song-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}
body .taste-library .taste-song-actions .song-services{margin:0}
html body .taste-library .taste-song-actions .taste-explore{max-width:none;min-height:40px;display:inline-flex;align-items:center;gap:6px;padding:8px 12px;margin:0}
body .taste-library .taste-explore>span{display:inline;margin:0}
@media(max-width:850px){
 body .search-catalog-note{display:none}
 html body #song-search-results .song-search-result{grid-template-columns:56px minmax(0,1fr) auto;gap:10px 14px}
 body .search-cover{width:56px;height:56px;align-self:start}
 html body #song-search-results .search-track-actions{grid-column:2/-1;grid-row:2;flex-wrap:wrap}
 html body #song-search-results .collection-quick{grid-row:3}
}
@media(max-width:550px){
 html body :is(#view-profile,#view-search) .taste-workspace>.panel{padding:16px}
 body .search-heading{margin-bottom:16px}
 html body .taste-add .search-controls{grid-template-columns:minmax(0,1fr);gap:8px}
 html body .taste-add .search-controls>.primary{padding:10px 14px}
 body .search-input-wrap{gap:8px;padding-left:10px}
 body .search-input-wrap>svg{width:18px;height:18px}
 html body .taste-add .search-controls #clear-song-search{width:36px;min-width:36px}
 body .search-results-heading{align-items:start;flex-direction:column;gap:5px}
 body #song-search-query{text-align:left;font-size:12px}
 body .search-placeholder,body .search-empty{padding:28px 12px}
 html body #song-search-results .song-search-result{grid-template-columns:48px minmax(0,1fr) auto;gap:10px}
 body .search-cover{width:48px;height:48px}
 html body .taste-workspace .search-track-copy h3{font-size:15px}
 html body #song-search-results .search-track-actions button{padding:9px 12px}
 html body .taste-library .taste-song{grid-template-columns:50px minmax(0,1fr) 40px;gap:8px}
 html body .taste-library .taste-song>button{width:40px;min-width:40px}
 body .search-duration{font-size:11px}
}
@media(max-width:700px){html body nav[aria-label="Main navigation"]{grid-template-columns:repeat(6,minmax(0,1fr))!important}html body nav[aria-label="Main navigation"] .nav-link{min-width:0;padding-inline:2px;font-size:9px}}
@media(max-width:380px){html body #song-search-results .search-preview span{display:none}html body #song-search-results .search-preview{padding-inline:12px}}
@media(prefers-reduced-motion:no-preference){body .search-loading>span{animation:search-pulse 1.3s ease-in-out infinite}@keyframes search-pulse{50%{opacity:.35}}}

body .search-partial{padding:16px 0;border-top:1px solid var(--line);color:var(--muted)}body .search-partial p{margin:0 0 10px}body .search-partial button{min-height:44px;margin:0}

body .search-reference-credit{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;width:100%}
body .search-reference-credit>p{flex-basis:100%}
body .search-reference-credits{width:100%;min-width:0;border-top:1px solid var(--line)}
body .search-reference-credits>summary,body .search-recording-target>details>summary{min-height:44px;padding:12px 0;cursor:pointer;font-size:13px;overflow-wrap:anywhere}
body .search-reference-credits>.search-reference-credit{padding:12px 0;border-top:1px solid var(--line)}
body .search-reference-credits>p,body .search-recording-target>p,body .search-recording-target>details>p{font-size:13px;color:var(--muted);line-height:1.6;overflow-wrap:anywhere}
body .search-recording-target{min-width:0;overflow-wrap:anywhere}
body .search-recording-target>h3{font-size:18px}

body .search-other-albums>summary{min-height:44px;padding:12px 0;cursor:pointer;font-size:13px;overflow-wrap:anywhere}
body .search-other-albums>p{font-size:13px;color:var(--muted);line-height:1.6}
body .search-album-choices>.search-other-albums{margin-top:12px}

body .search-reference-track-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
@media(max-width:550px){body .search-reference-track-actions{justify-self:start}}

/* One song layout and action order across catalog and metadata tracklists. */
body #song-search-results{scroll-margin-top:100px}
body .search-album-header{display:grid;gap:8px;margin-bottom:22px;min-width:0}
body .search-album-header>[data-search-back]{justify-self:start;min-height:44px;margin:0 0 10px;padding:10px 14px}
html body #song-search-results .search-album-header>h3{font-size:clamp(24px,4vw,36px);line-height:1.2;margin:0;overflow-wrap:anywhere}
body .search-album-header>.eyebrow{font-size:10px;letter-spacing:.12em;margin:0}
body .search-album-header .search-album-credit{font-size:15px;margin:0}
body .search-album-header .search-reference-notice{font-size:13px;line-height:1.6;max-width:60ch;margin:4px 0 0}
html body #song-search-results .song-search-result.search-reference-track{grid-template-columns:40px minmax(0,1fr) auto;align-items:start;padding:20px 0;gap:12px 16px;border-radius:0;border:0;border-top:1px solid var(--line);background:transparent}
body .search-track-number{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;padding-top:4px;text-align:center}
html body #song-search-results .search-reference-track .search-track-actions{flex-wrap:wrap;justify-content:flex-end}
html body #song-search-results .search-reference-track .collection-quick{grid-column:2/-1;grid-row:2;padding-top:0;flex-wrap:wrap}
@media(max-width:850px){html body #song-search-results .search-reference-track .search-track-actions{grid-column:2/-1;grid-row:2;justify-content:flex-start}html body #song-search-results .search-reference-track .collection-quick{grid-row:3}}
@media(max-width:550px){html body #song-search-results .song-search-result.search-reference-track{grid-template-columns:26px minmax(0,1fr);gap:10px;padding:18px 0}body .search-album-header{margin-bottom:16px}html body #song-search-results .search-reference-track :is(.search-track-actions,.collection-quick){gap:8px}html body #song-search-results .search-reference-track button{max-width:100%;white-space:normal;min-height:44px}}
