/* Respect hidden artwork, even when older hero rules use display:block. */
html.ritm-webapp[data-theme] #hero.home-pro-hero>.home-pro-cover[hidden]{display:none!important}
html.ritm-webapp[data-theme] #hero.home-pro-hero:has(>.home-pro-cover[hidden]){grid-template-columns:minmax(0,1fr)!important}
/* Hidden home content must not show through a search/library/artist page. */
html.ritm-webapp body:has(.vw.open) #ritm-web-home{visibility:hidden;pointer-events:none}
html.ritm-webapp body:has(.vw.open)>header.ritm-clean-header{visibility:hidden;pointer-events:none}
html.ritm-webapp :is(.vw,.vb,.workspace-section,.web-welcome){min-width:0}
html.ritm-webapp .workspace-search input{min-width:0}
html.ritm-webapp .workspace-section-head h2{overflow-wrap:anywhere}
@media(min-width:1100px){
 html.ritm-webapp[data-theme] body{padding:78px 24px 16px;min-width:0}
 html.ritm-webapp[data-theme] body.web-has-track{padding-bottom:112px}
 html.ritm-webapp[data-theme] #ritm-desktop-nav{position:fixed;inset:0 0 auto;height:72px;width:100%;display:flex;align-items:center;flex-direction:row;gap:20px;padding:10px max(24px,calc((100vw - 1320px)/2));background:#101014f5;border:0;border-bottom:1px solid #ffffff14;border-radius:0;z-index:50;overflow:visible;backdrop-filter:blur(12px)}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-brand{display:flex;align-items:center;gap:9px;padding:0;margin:0;min-height:44px;flex:none}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-brand>img{width:34px;height:34px;border-radius:8px}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-brand strong{display:flex;align-items:baseline;gap:4px;font-size:24px;letter-spacing:1px;line-height:1;color:#f5f4f7}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-brand strong span{font-size:8px;letter-spacing:1px;color:#c3bac7}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-primary{display:flex;align-items:center;gap:3px;flex:1;justify-content:center;min-width:0}
 html.ritm-webapp[data-theme] #ritm-desktop-nav :is(button,.desktop-primary>a){display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-width:0;min-height:44px;margin:0;padding:9px 11px;background:transparent;border:0;border-radius:8px;color:#c9c6d1;font:600 13px/1.3 system-ui,sans-serif;white-space:nowrap;text-decoration:none;box-shadow:none}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-primary>button>svg{display:none}
 html.ritm-webapp[data-theme] #ritm-desktop-nav :is(button,a):hover{background:#ffffff0a;color:#fff}
 html.ritm-webapp[data-theme] #ritm-desktop-nav [aria-current=page]{color:#ff8b9f;background:#a9273b24}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-bottom{display:flex;align-items:center;flex-direction:row;gap:4px;padding:0;margin:0;flex:none}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-bottom svg{width:18px;height:18px;flex-basis:18px}
 html.ritm-webapp[data-theme] #ritm-desktop-nav [data-artist-tool]{background:#c82342;color:white}
 html.ritm-webapp[data-theme] body>header.ritm-clean-header{max-width:1320px;margin:0 auto 12px;padding:4px 0 12px;min-height:56px;position:relative;top:auto;background:transparent}
 html.ritm-webapp[data-theme] header.ritm-clean-header .workspace-search{width:min(100%,760px);max-width:760px;min-height:46px;height:46px;border-radius:12px;background:#19191f}
 html.ritm-webapp[data-theme] #ritm-web-home{max-width:1320px;margin:0 auto;padding:26px 32px 32px;min-height:calc(100dvh - 172px);border-radius:16px;background:#141418}
 html.ritm-webapp[data-theme] #hero.home-pro-hero{max-width:none;grid-template-columns:minmax(0,1fr) 270px;gap:32px;min-height:310px;padding:32px 40px;margin:0 0 28px}
 html.ritm-webapp[data-theme] #hero.home-pro-hero>.home-pro-cover{width:270px;height:270px;max-width:none;object-fit:contain}
 html.ritm-webapp[data-theme] #hero.home-pro-hero .hn{font-size:clamp(36px,3.5vw,52px);line-height:1.12;max-width:20ch}
 html.ritm-webapp[data-theme] #hero.home-pro-hero #hs{font-size:15px;line-height:1.65;max-width:58ch}
 html.ritm-webapp[data-theme] #hero.home-pro-hero #hp{font-size:14px;min-height:46px;padding:12px 22px}
 html.ritm-webapp[data-theme] .workspace-section-head h2{font-size:24px}
 html.ritm-webapp[data-theme] .workspace-rail{grid-auto-columns:minmax(174px,1fr);gap:20px}
 html.ritm-webapp[data-theme] .vw{left:max(24px,calc((100vw - 1320px)/2));right:max(24px,calc((100vw - 1320px)/2));top:84px;bottom:12px;width:auto;max-width:none;margin:0;border-radius:14px;z-index:6;background:#141418;box-shadow:none}
 html.ritm-webapp[data-theme] .web-has-track .vw{bottom:108px}
 html.ritm-webapp[data-theme] #mini{left:0;right:0;bottom:0;max-width:none;transform:none;width:100%;padding-inline:max(24px,calc((100vw - 1320px)/2));z-index:60}
 html.ritm-webapp[data-theme] body:has(#full.open),html.ritm-webapp[data-theme] body:has(#artist-studio:not([hidden])){padding:0}
 html.ritm-webapp[data-theme] body:has(#full.open)>#ritm-desktop-nav,html.ritm-webapp[data-theme] body:has(#artist-studio:not([hidden]))>#ritm-desktop-nav{display:none}
 html.ritm-webapp[data-theme] body>.nav{display:none!important}
}
@media(min-width:1100px) and (max-width:1240px){html.ritm-webapp[data-theme] #ritm-desktop-nav{gap:10px;padding-inline:18px}html.ritm-webapp[data-theme] #ritm-desktop-nav :is(button,.desktop-primary>a){font-size:12px;padding-inline:8px}html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-brand strong span{display:none}}
@media(max-width:600px){html.ritm-webapp[data-theme] #hero.home-pro-hero:has(>.home-pro-cover[hidden]){min-height:180px!important}.mag-home-rail{scroll-padding-inline:0}.ritm-menu-toggle,.workspace-search-toggle{min-height:44px;min-width:44px}html.ritm-webapp[data-theme] #mini{overflow:hidden}}
@media(prefers-reduced-motion:reduce){html.ritm-webapp #ritm-desktop-nav{backdrop-filter:none}}
/* Keep native pinch-to-zoom available for readers and low-vision users. */
html.ritm-webapp,html.ritm-webapp body{touch-action:auto}
html.ritm-webapp body:has(#full.open) #ritm-web-home,html.ritm-webapp body:has(#full.open)>header.ritm-clean-header{visibility:hidden;pointer-events:none}
@media(min-width:1100px){html.ritm-webapp[data-theme] #hero.home-pro-hero:has(>.home-pro-cover[hidden]){min-height:220px;padding:28px 34px}html.ritm-webapp[data-theme] #hero.home-pro-hero:has(>.home-pro-cover[hidden]) .hn{font-size:36px;max-width:none}}
/* Search owns three rows: heading, visible query, and independently scrolling results. */
html.ritm-webapp[data-theme] #vs.ritm-framed{padding:0!important;overflow:hidden;scroll-padding:0}
html.ritm-webapp[data-theme] #vs.ritm-framed.open{display:grid;grid-template-rows:auto auto minmax(0,1fr)}
html.ritm-webapp[data-theme] #vs>.vh{position:static!important;top:auto!important;margin:0;flex-shrink:0;padding:10px 16px;min-height:64px;background:var(--bg,#101014)}
html.ritm-webapp[data-theme] #vs>.search-query-bar{position:relative;z-index:1;box-sizing:border-box;padding:10px 16px 14px;margin:0;width:100%;background:var(--bg,#101014);border-bottom:1px solid var(--ui-border,#ffffff14)}
html.ritm-webapp[data-theme] #vs>.search-query-bar>input{display:block;box-sizing:border-box;width:100%;min-width:0;height:48px;margin:0;padding:11px 14px;font:16px/1.4 system-ui,sans-serif;color:var(--tx,#fff);background:var(--card,#17171d);border:1px solid var(--ui-border,#ffffff24);border-radius:12px;scroll-margin:0}
html.ritm-webapp[data-theme] #vs>.vb.ritm-scroll-pane{min-height:0;height:auto;max-height:none;overflow-y:auto;overflow-x:hidden;padding:16px 16px 32px;scroll-padding-top:16px}
@media(max-width:1099px){html.ritm-webapp[data-theme] #vs{top:0!important;left:0;right:0;border-radius:0}html.ritm-webapp[data-theme] #vs>.vh{padding-top:calc(10px + var(--ritm-safe-top,env(safe-area-inset-top,0px)));min-height:calc(64px + var(--ritm-safe-top,env(safe-area-inset-top,0px)))}html.ritm-webapp[data-theme] #vs .category-browse{margin-top:0;padding-top:0}}
/* Library: a fixed heading above compact collections and followed artists. */
html.ritm-webapp[data-theme] #vl.ritm-framed{padding:0!important;overflow:hidden;scroll-padding:0}
html.ritm-webapp[data-theme] #vl.ritm-framed.open{display:grid;grid-template-rows:auto minmax(0,1fr)}
html.ritm-webapp[data-theme] #vl>.vh{position:static!important;top:auto!important;margin:0;padding:10px 16px;min-height:64px;background:var(--bg,#101014);gap:12px}
html.ritm-webapp[data-theme] #vl>.vh>b{min-width:0;font-size:clamp(18px,4.6vw,24px);line-height:1.25;overflow-wrap:anywhere}
html.ritm-webapp[data-theme] #vl>.vh>[data-library-new]{margin-left:auto;width:44px;height:44px;min-width:44px;flex:0 0 44px;border:1px solid var(--ui-border);border-radius:50%;background:var(--card);color:var(--tx)}
html.ritm-webapp[data-theme] #vl>.vb.ritm-scroll-pane{min-height:0;height:auto;max-height:none;overflow:auto;padding:16px 16px 32px;scroll-padding-top:16px;max-width:100%;margin:0}
html.ritm-webapp[data-theme] #vl .library-collections{display:grid;gap:8px}
html.ritm-webapp[data-theme] #vl .library-item{box-sizing:border-box;min-width:0;min-height:76px;padding:12px;gap:12px;border:1px solid var(--ui-border,#ffffff14);border-radius:14px;background:var(--card,#17171d);text-align:left;cursor:pointer}
html.ritm-webapp[data-theme] #vl .library-item>span:last-child{flex:1;min-width:0}
html.ritm-webapp[data-theme] #vl .library-item b{font-size:15px;line-height:1.35;display:block;overflow-wrap:anywhere}
html.ritm-webapp[data-theme] #vl .library-item small{font-size:12px;line-height:1.4;margin-top:4px}
html.ritm-webapp[data-theme] #vl .library-item>.lkbox{width:42px;height:42px;font-size:22px;border-radius:10px}
html.ritm-webapp[data-theme] #vl .library-item>svg{width:28px;height:28px;flex:0 0 28px;margin:0 7px}
html.ritm-webapp[data-theme] #vl .library-following{margin-top:24px}
html.ritm-webapp[data-theme] #vl .library-following h3{font-size:18px;margin:0 0 12px}
html.ritm-webapp[data-theme] #vl .library-artist-grid{display:grid;gap:8px}
html.ritm-webapp[data-theme] #vl .artist-library-row{min-width:0;gap:12px;padding:8px;min-height:64px;border-radius:12px;font-size:14px}
html.ritm-webapp[data-theme] #vl .artist-library-row b{min-width:0;overflow-wrap:anywhere;line-height:1.35}
html.ritm-webapp[data-theme] #vl .artist-library-row .artist-photo{width:44px;height:44px;flex:0 0 44px}
html.ritm-webapp[data-theme] #vl .library-sync{font-size:11px;line-height:1.5;margin:20px 0 0;color:var(--mu)}
html.ritm-webapp[data-theme] #vl :is(.library-item,.artist-library-row):hover{background:#ffffff0a}
html.ritm-webapp[data-theme] #vl :is(button):focus-visible{outline:2px solid #ff9aa6;outline-offset:3px}
@media(max-width:1099px){html.ritm-webapp[data-theme] #vl{top:0!important;left:0;right:0;border-radius:0}html.ritm-webapp[data-theme] #vl>.vh{padding-top:calc(10px + var(--ritm-safe-top,env(safe-area-inset-top,0px)));min-height:calc(64px + var(--ritm-safe-top,env(safe-area-inset-top,0px)))}}
@media(min-width:700px){html.ritm-webapp[data-theme] #vl .library-collections{grid-template-columns:repeat(2,minmax(0,1fr))}html.ritm-webapp[data-theme] #vl .library-artist-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}html.ritm-webapp[data-theme] #vl>.vb.ritm-scroll-pane{padding:24px;max-width:1080px;width:100%;margin:0 auto}}
/* Desktop listening uses the entire viewport after removal of the old sidebar. */
@media(min-width:1100px){
 html.ritm-webapp[data-theme] #full.ritm-player-pro.open:not(.ritm-player-expanded){left:0;right:0;grid-template-columns:minmax(0,1.15fr) minmax(320px,1fr);column-gap:clamp(24px,4vw,64px);padding-inline:max(28px,calc((100vw - 1320px)/2))}
 html.ritm-webapp[data-theme] #full.ritm-player-pro.open:not(.ritm-player-expanded)>.art{width:min(100%,max(180px,calc(100dvh - 370px)));max-width:560px}
 html.ritm-webapp[data-theme] #full.ritm-player-pro.open:not(.ritm-player-expanded) #ft{font-size:28px;line-height:1.2}
 html.ritm-webapp[data-theme] #full.ritm-player-pro.open:not(.ritm-player-expanded) #fa{font-size:16px;line-height:1.5}
 html.ritm-webapp[data-theme] #full.ritm-player-pro.open:not(.ritm-player-expanded)>.act button{font-size:14px;min-height:44px;height:44px}
 html.ritm-webapp[data-theme] #full.ritm-player-pro.open:not(.ritm-player-expanded)>#desktop-listening-panel{border:1px solid var(--ui-border,#ffffff18);border-radius:18px;background:#15151b88}
 html.ritm-webapp[data-theme] #full:not(.ritm-player-expanded) #desktop-listening-panel .clean-queue-row b{font-size:15px;line-height:1.4}
 html.ritm-webapp[data-theme] #full:not(.ritm-player-expanded) #desktop-listening-panel .clean-queue-row small{font-size:12px;line-height:1.5}
 html.ritm-webapp[data-theme] #full.ritm-player-pro.open:not(.ritm-player-expanded)>.ctl #pp{width:72px;height:72px}
}
@media(min-width:1100px) and (max-height:650px){
 html.ritm-webapp[data-theme] #full.ritm-player-pro.open:not(.ritm-player-expanded)>.art{width:min(100%,max(140px,calc(100dvh - 300px)))}
 html.ritm-webapp[data-theme] #full.ritm-player-pro.open:not(.ritm-player-expanded) #ft{font-size:24px}
 html.ritm-webapp[data-theme] #full.ritm-player-pro.open:not(.ritm-player-expanded)>.ctl #pp{width:58px;height:58px}
}
/* Desktop navigation, search and account tools share one horizontal bar. */
@media(min-width:1100px){
 html.ritm-webapp[data-theme] #ritm-desktop-nav{gap:14px;padding-inline:max(20px,calc((100vw - 1360px)/2));height:76px}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-primary{flex:0 0 auto;gap:2px;width:auto;min-width:0;overflow:visible}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-primary :is(button,a){font-size:13px;padding:10px 12px;white-space:nowrap}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-search-slot{flex:1 1 260px;min-width:160px;max-width:440px;margin-left:auto}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .workspace-search{display:flex!important;align-items:center;gap:8px;position:static;width:100%;max-width:none;min-width:0;height:44px;min-height:44px;box-sizing:border-box;padding:0 12px;margin:0;border:1px solid #ffffff20;border-radius:12px;background:#1b1b22}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .workspace-search>svg{display:none}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .workspace-search input{flex:1;min-width:0;width:100%;height:42px;border:0;background:transparent;color:var(--tx);font:14px system-ui;outline-offset:0}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .workspace-search button{flex:0 0 36px;min-width:36px;width:36px;height:40px;min-height:40px;padding:8px;border:0;background:transparent;color:var(--tx)}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .workspace-search button svg{width:20px;height:20px}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-utility-slot{display:flex;align-items:center;gap:6px;flex:0 0 auto}
 html.ritm-webapp[data-theme] #ritm-desktop-nav :is(.ritm-notification-bell,.ritm-menu-toggle,[data-shell-route=profile]){display:flex!important;align-items:center;justify-content:center;position:relative;margin:0;padding:10px;min-width:44px;width:44px;min-height:44px;height:44px;border:1px solid #ffffff18;border-radius:12px;background:#19191f;color:var(--tx)}
 html.ritm-webapp[data-theme] #ritm-desktop-nav [data-shell-route=profile]>span{display:none}
 html.ritm-webapp[data-theme] #ritm-desktop-nav :is(.ritm-notification-bell,.ritm-menu-toggle,[data-shell-route=profile]) svg{width:22px;height:22px;flex:0 0 22px}
 html.ritm-webapp[data-theme] body>header.ritm-clean-header{display:none!important}
 html.ritm-webapp[data-theme] body{padding-top:88px}
 html.ritm-webapp[data-theme] .vw{top:88px}
}
@media(min-width:1100px) and (max-width:1240px){html.ritm-webapp[data-theme] #ritm-desktop-nav{gap:8px;padding-inline:16px}html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-primary :is(button,a){padding-inline:8px;font-size:12px}html.ritm-webapp[data-theme] #ritm-desktop-nav .desktop-brand strong{font-size:22px}}
/* Search has one visible input on desktop: the field in the navigation bar. */
@media(min-width:1100px){
 html.ritm-webapp[data-theme] #vs>.search-query-bar{display:none!important}
 html.ritm-webapp[data-theme] #vs.ritm-framed.open{grid-template-rows:auto minmax(0,1fr)}
}
@media(min-width:1100px){
 html.ritm-webapp[data-theme] #ritm-desktop-nav .workspace-search:focus-within{border-color:#f06078;outline:none;box-shadow:none}
 html.ritm-webapp[data-theme] #ritm-desktop-nav .workspace-search input:is(:focus,:focus-visible){outline:none;box-shadow:none;border:0;border-radius:0}
}
