/* Phone navigation: library, search, cassette and favorites share one audio element. */
.phone-only,.layout-label,.album-card-copy,.album-chevron,#mini-cover{display:none}
@media(max-width:1080px){
  body.mobile-app{--phone-nav:calc(72px + env(safe-area-inset-bottom));--phone-mini:66px;--phone-header:calc(56px + env(safe-area-inset-top));background:#141617;overscroll-behavior-y:none}
  body.mobile-app .phone-only{display:flex}
  body.mobile-app .app-shell{min-height:100dvh}
  body.mobile-app .topbar{position:sticky;top:0;z-index:25;display:flex;flex-wrap:nowrap;gap:8px;height:var(--phone-header);min-height:56px;padding:env(safe-area-inset-top) 16px 0;background:#141617f5;backdrop-filter:blur(18px);border-bottom:1px solid #ffffff06}
  body.mobile-app .mobile-brand{flex:1;font-size:1.7rem;line-height:1;text-align:left;color:#e9e9e4}
  body.mobile-app .demo-label,body.mobile-app .topbar .search-box{display:none}
  body.mobile-app .topbar .icon-button{display:flex;align-items:center;justify-content:center;width:44px;height:44px;flex-shrink:0;margin:0}
  body.mobile-app .topbar svg{width:22px;height:22px;fill:none;stroke:currentColor}
  body.mobile-app .topbar #search-toggle{display:flex}
  body.mobile-app main{position:relative;max-width:720px;padding:18px 18px calc(var(--phone-nav) + var(--phone-mini) + 24px);margin:auto}
  body.mobile-app .page-heading{display:flex;align-items:center;min-height:54px;margin:0 0 17px;gap:8px}
  body.mobile-app h1{font-size:1.5rem;font-weight:650;letter-spacing:-.65px;line-height:1.25}
  body.mobile-app .page-greeting,body.mobile-app .library-footer,body.mobile-app #recent-section{display:none}
  body.mobile-app .screen-count{display:block;margin-top:5px;font-size:.875rem;line-height:1.4;color:#9aa3a1}
  body.mobile-app .page-heading .text-button{margin-left:auto;font-size:.875rem;min-height:44px;max-width:none}
  body.mobile-app #filters-toggle{display:none}
  body.mobile-app .library-status{margin:0;min-height:0;font-size:.875rem;line-height:1.4}
  body.mobile-app .library-status p{display:none}
  body.mobile-app .library-status #refresh-library{position:absolute;right:16px;top:17px;min-height:44px;width:44px;padding:0;display:grid;place-items:center;color:#a7acab}
  body.mobile-app .refresh-label{display:none}
  body.mobile-app #refresh-library svg{width:20px;height:20px}
  body.mobile-app.library-loading .screen-count{opacity:.6}
  body.mobile-app.library-error .library-status p{display:block;color:#deb6aa;padding:0 0 16px}
  body.mobile-app .library-heading{position:sticky;top:var(--phone-header);z-index:20;display:flex;flex-direction:column;align-items:stretch;gap:12px;margin:0 0 12px;padding:6px 0;background:#141617f5;backdrop-filter:blur(16px)}
  body.mobile-app .library-heading>div:first-child{display:none}
  body.mobile-app .view-switch{display:flex;gap:4px;padding:4px;background:#202427;border:1px solid #ffffff05;border-radius:10px}
  body.mobile-app .view-switch button{display:flex;justify-content:center;align-items:center;gap:8px;flex:1;width:auto;height:44px;font-size:.9375rem;border-radius:7px;color:#a0a9a7}
  body.mobile-app .view-switch button.active{background:#353c3e;color:#f0f0e9;box-shadow:0 2px 5px #0002}
  body.mobile-app .view-switch svg{width:18px;height:18px}
  body.mobile-app .layout-label{display:inline}
  body.mobile-app .album-grid{display:flex;gap:0;padding:0;max-width:none}
  body.mobile-app .album-spine{padding:0;border-bottom:1px solid #ffffff07}
  body.mobile-app .spine-open{display:grid;grid-template-columns:82px minmax(0,1fr) 20px;align-items:center;gap:14px;min-height:98px;padding:12px 0;text-align:left}
  body.mobile-app .spine-case{height:60px;width:82px;border-width:1px;border-radius:4px;box-shadow:inset 0 2px 3px #e7e9e825,inset 0 -3px 3px #0008,0 3px 5px #0004}
  body.mobile-app .spine-case:before{width:7px}body.mobile-app .spine-case:after{width:6px}
  body.mobile-app .spine-edge{inset:3px 8px}
  body.mobile-app .spine-label,body.mobile-app .spine-caption{display:none}
  body.mobile-app .spine-cover{opacity:.9;filter:saturate(.75) contrast(1.05)}
  body.mobile-app .album-card-copy{display:block;min-width:0}
  body.mobile-app .album-card-copy strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font:600 1rem/1.35 Manrope,sans-serif;color:#e8ece5;letter-spacing:-.15px}
  body.mobile-app .album-card-copy small{display:block;margin-top:4px;font-size:.875rem;line-height:1.4;color:#a5aeaa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.mobile-app .album-card-copy em{display:block;margin-top:3px;font-size:.8125rem;line-height:1.4;font-style:normal;color:#7f8986}
  body.mobile-app .album-chevron{display:flex;color:#7f8a86}
  body.mobile-app .album-chevron svg{width:19px;height:19px}
  body.mobile-app .album-spine.is-current .album-card-copy strong{color:#d9e3cf}
  body.mobile-app .track-list{gap:0}
  body.mobile-app .track-row,body.mobile-app .queue-drawer .track-row{grid-template-columns:44px minmax(0,1fr) 44px 38px;gap:8px;min-height:66px;padding:5px 0;border-bottom:1px solid #ffffff05;border-radius:0}
  body.mobile-app .track-number,body.mobile-app .track-album{display:none}
  body.mobile-app .track-row>button:nth-child(2){display:grid;place-items:center;width:44px;min-height:52px}
  body.mobile-app .track-cover{width:44px;height:44px;border-radius:5px}
  body.mobile-app .track-main{min-height:52px;display:flex;flex-direction:column;justify-content:center;padding:4px 0}
  body.mobile-app .track-main strong{font-size:.9375rem;line-height:1.4;letter-spacing:0;font-weight:550;max-width:100%}
  body.mobile-app .track-main small{font-size:.8125rem;margin-top:3px;line-height:1.4;max-width:100%}
  body.mobile-app .track-duration{font-size:.875rem;color:#99a39d}
  body.mobile-app .track-row.is-current{box-shadow:inset 2px 0 #a4b09b;background:#c5d0bd05}
  body.mobile-app .track-row.is-current .track-main strong{color:#d5dfca}
  body.mobile-app .mobile-nav{z-index:38;height:var(--phone-nav);padding:8px 6px calc(8px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;background:#171b1df5;border-top:1px solid #d2d7ce10}
  body.mobile-app .mobile-nav button{height:56px;min-width:0;min-height:44px;justify-content:center;gap:5px;font-size:.875rem;line-height:1.2;color:#89938e}
  body.mobile-app .mobile-nav button.active{color:#dce7d1;font-weight:650}
  body.mobile-app .mobile-nav svg{width:22px;height:22px;stroke-width:1.6}
  body.mobile-app .mobile-player{display:flex;flex-direction:row;align-items:center;left:0;right:0;bottom:var(--phone-nav);height:var(--phone-mini);gap:0;padding:8px 10px 9px 14px;border:0;border-top:1px solid #c4cbb914;border-bottom:1px solid #0003;background:#292f31fa;box-shadow:0 -4px 18px #0002;border-radius:0;z-index:37;overflow:hidden}
  body.mobile-app .mobile-player:after{content:'';position:absolute;bottom:0;left:14px;right:14px;height:2px;background:linear-gradient(to right,#bac6ae var(--progress,0%),#434b48 var(--progress,0%));pointer-events:none}
  body.mobile-app .mobile-timeline,body.mobile-app #mobile-cassette,body.mobile-app #mobile-remaining,body.mobile-app #mobile-previous{display:none}
  body.mobile-app .mobile-meta{display:block;min-width:0;min-height:44px;flex:1}
  body.mobile-app .mobile-meta .mobile-track{display:flex;align-items:center;width:100%;gap:11px;min-height:44px;padding:0}
  body.mobile-app #mini-cover{display:block;width:42px;height:42px;flex-shrink:0;object-fit:cover;border-radius:4px;border:1px solid #ffffff12}
  body.mobile-app .mobile-track>span:last-child{display:block;min-width:0}
  body.mobile-app .mobile-meta .mobile-track strong{font-size:.9375rem;font-weight:550;letter-spacing:0;line-height:1.3;color:#e9ede5}
  body.mobile-app .mobile-meta .mobile-track small{font-size:.8125rem;line-height:1.3;color:#a2aea4;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.mobile-app .mobile-controls{display:flex;align-items:center;width:88px;gap:0;margin:0 0 0 8px;flex-shrink:0}
  body.mobile-app .mobile-controls #mobile-play,body.mobile-app .mobile-controls #mobile-next{display:grid;place-items:center;width:44px;min-width:44px;height:44px!important;min-height:44px;padding:0;background:none;border:0;border-radius:6px;box-shadow:none;color:#d7dfd2}
  body.mobile-app .mobile-controls #mobile-play svg{width:23px;height:23px;fill:currentColor;stroke:none;margin:0}
  body.mobile-app .mobile-controls #mobile-next svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7}
  body.mobile-app .mobile-controls #mobile-play:active,body.mobile-app .mobile-controls #mobile-next:active{background:#ffffff09;transform:none}
  body.mobile-app #discovery-banner{margin:0;border:0;background:none;border-radius:0;padding:0}
  body.mobile-app #discovery-banner .desktop-mix{display:none}
  body.mobile-app .empty-state,body.mobile-app.library-empty .empty-state{padding:44px 10px;max-width:360px;margin:0 auto}
  body.mobile-app .empty-state h3,body.mobile-app.library-empty .empty-state h3{font-size:1.25rem}
  body.mobile-app .empty-state p,body.mobile-app.library-empty .empty-state p{font-size:.9375rem;line-height:1.6;margin:12px auto 22px}
  body.mobile-app .toast{bottom:calc(var(--phone-nav) + var(--phone-mini) + 12px);font-size:.875rem;z-index:55}
  body.mobile-app .phone-player-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px;width:100%}
  body.mobile-app .phone-player-actions button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:48px;flex:1;padding:4px 0;color:#a7b0aa;font-size:.8125rem}
  body.mobile-app .phone-player-actions svg{width:19px;height:19px;flex-shrink:0}
  body.mobile-app #phone-favorite[aria-pressed=true]{color:#d9e5ce}
  body.mobile-app #phone-favorite[aria-pressed=true] svg{fill:#c5d0bd}
  body.mobile-app .album-screen-bar{position:sticky;top:var(--phone-header);z-index:22;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;margin:-9px 0 14px;background:#141617f5;backdrop-filter:blur(16px);color:#8d9890;font-size:.875rem}
  body.mobile-app .album-screen-bar>span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}
  body.mobile-app .album-screen-bar>button{flex-shrink:0}
  body.mobile-app .album-screen-bar button{gap:2px;min-height:44px;margin-left:-8px;font-size:.9375rem;color:#d1dac9}
  body.mobile-app .album-screen-bar svg{width:22px;height:22px}
  body.mobile-app .album-screen .album-detail-top{display:grid;grid-template-columns:88px minmax(0,1fr);gap:4px 16px;align-items:center;margin:0 0 12px}
  body.mobile-app .album-screen .album-detail-top>div:last-child{display:contents}
  body.mobile-app .album-screen .album-tape-header{grid-column:1;grid-row:1/4;width:88px;align-self:start;margin:0}
  body.mobile-app .album-screen .album-tape-header img{width:88px;height:88px;object-fit:cover;border-radius:6px;box-shadow:0 4px 16px #0004}
  body.mobile-app .album-screen .album-tape-header strong,body.mobile-app .album-screen .album-type{display:none}
  body.mobile-app .album-screen .album-detail-top h2{grid-column:2;grid-row:1;font:650 1.25rem/1.3 Manrope,sans-serif;letter-spacing:-.4px;margin:0;color:#e9ede5;overflow-wrap:anywhere}
  body.mobile-app .album-screen .album-detail-top p{grid-column:2;grid-row:2;margin:0;font-size:.9375rem;color:#abb5ab;line-height:1.4}
  body.mobile-app .album-screen .album-detail-top small{grid-column:2;grid-row:3;margin:0;font-size:.875rem;color:#89958c;line-height:1.4}
  body.mobile-app .album-screen .primary-button{grid-column:1/-1;grid-row:4;margin:17px 0 12px;width:100%;min-height:48px;font-size:.9375rem;letter-spacing:.02em;text-transform:none;background:#353d3c;color:#e1e9dc}
  body.mobile-app .album-screen .primary-button svg{width:17px;height:17px}
  body.mobile-app .album-screen .track-row{grid-template-columns:44px minmax(0,1fr) 44px 38px}
  body.mobile-app .album-screen .track-number{display:grid;min-height:48px;font-size:.875rem}
  body.mobile-app .album-screen .track-number svg{width:17px;height:17px}
  body.mobile-app .album-screen .track-row>button:nth-child(2){display:none}
  body.mobile-app .album-screen .track-main small{display:none}
  body.mobile-app .queue-drawer{inset:0 0 0;max-height:100dvh;height:100dvh;padding:max(12px,env(safe-area-inset-top)) 18px max(20px,env(safe-area-inset-bottom));border-radius:0;background:#202628;overscroll-behavior:contain}
  body.mobile-app .drawer-heading{position:sticky;top:0;z-index:2;background:#202628;padding:8px 0 16px;margin:0;border-bottom:1px solid #ffffff08}
  body.mobile-app .drawer-heading h2{font-size:1.25rem}
  body.mobile-app .drawer-heading p{font-size:.875rem;line-height:1.4}
  body.mobile-app .player-options-dialog{border-radius:20px 20px 0 0;inset:auto 0 0;width:100%;max-width:100%;padding:15px 16px max(16px,env(safe-area-inset-bottom));margin:0;max-height:90dvh}
  body.mobile-app .player-options-list .player-option{font-size:.9375rem;min-height:54px}
  body.mobile-app[data-screen=search] .topbar .mobile-brand,body.mobile-app[data-screen=search] #search-toggle{display:none}
  body.mobile-app[data-screen=search] .topbar .search-box{display:flex;order:0;flex:1;margin:0;width:auto;min-width:0;height:44px;padding:0 11px;border-radius:8px}
  body.mobile-app[data-screen=search] .search-box input{font-size:1rem}
  body.mobile-app[data-screen=search] .search-box input::placeholder{font-size:.875rem}
  body.mobile-app[data-screen=search] .page-heading{min-height:34px;margin-bottom:18px}
  body.mobile-app[data-screen=search] .screen-count{display:none}
  body.mobile-app[data-screen=search] .library-status #refresh-library{display:none}
  body.mobile-app[data-screen=search] .filters-section{margin:0 0 22px}
  body.mobile-app[data-screen=search] .section-heading{margin:0 0 10px}
  body.mobile-app[data-screen=search] .section-heading h2{font-size:.9375rem}
  body.mobile-app[data-screen=search] .mood-filters{flex-wrap:wrap;margin:0;padding:0;gap:8px;overflow:visible}
  body.mobile-app[data-screen=search] .mood-chip{font-size:.875rem;border-radius:8px;min-height:44px;padding:8px 12px}
  body.mobile-app[data-screen=search] .genre-line{display:block;border-top:0;padding:0;margin:17px 0 0}
  body.mobile-app[data-screen=search] .genre-label{display:block;font-size:.9375rem;color:#dce3d5;padding:0;margin-bottom:10px}
  body.mobile-app[data-screen=search] .genre-filters{display:flex;gap:8px}
  body.mobile-app[data-screen=search] .genre-chip{padding:8px 16px;border:1px solid #ffffff0a;border-radius:8px;background:#242a2b;min-height:44px;font-size:.9375rem}
  body.mobile-app[data-screen=search] .genre-chip.active{background:#394137;border-color:#a5b19350;color:#e1ead7}
  body.mobile-app[data-screen=search] .genre-chip:after{content:none}
  body.mobile-app .browse-random{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;margin-top:24px;padding:12px 14px;border-radius:9px;background:#262d2d;color:#d9e3d0;font-size:.9375rem;text-align:left}
  body.mobile-app .browse-random>span:nth-child(2){flex:1}
  body.mobile-app .browse-random svg{width:21px;height:21px}
  body.mobile-app .browse-random>span:last-child svg{width:15px;height:15px;fill:currentColor}
  body.mobile-app[data-screen=favorites] .library-heading{display:none}
  body.mobile-app[data-screen=album] .page-heading,body.mobile-app[data-screen=album] .library-status{display:none}
  body.mobile-app[data-screen=player] .topbar{display:none}
  body.mobile-app[data-screen=player] main{height:calc(100dvh - var(--phone-nav));min-height:0;padding:0 20px;margin:0 auto;overflow:hidden;max-width:600px}
  body.mobile-app[data-screen=player] .page-heading,body.mobile-app[data-screen=player] .library-status,body.mobile-app[data-screen=player] .mobile-player{display:none}
  body.mobile-app[data-screen=player] #discovery-banner,body.mobile-app[data-screen=player] #player-home-slot{height:100%;width:100%}
  body.mobile-app[data-screen=player] .player-panel{position:relative;display:flex;flex-direction:column;width:100%;height:100%;padding:max(8px,env(safe-area-inset-top)) 0 12px;overflow:hidden;background:none;align-items:stretch}
  body.mobile-app[data-screen=player] .player-panel-header{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;min-height:44px;flex-shrink:0;margin:0}
  body.mobile-app[data-screen=player] .player-panel-header>span{font:500 .875rem/1.4 Manrope,sans-serif;letter-spacing:0;text-transform:none;color:#a5b0a6;padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.mobile-app[data-screen=player] .player-art-wrap{position:relative;aspect-ratio:1/1.59;width:min(100%,calc((100dvh - var(--phone-nav) - env(safe-area-inset-top) - 340px)/1.59));max-width:310px;min-width:0;flex-shrink:0;margin:auto auto 4px;transform:rotate(-.2deg)}
  body.mobile-app[data-screen=player] #player-cassette{position:absolute;left:50%;top:50%;width:159%;transform:translate(-50%,-50%) rotate(-90deg)}
  body.mobile-app[data-screen=player] .timeline{margin:10px 0 0;padding:0;width:100%;flex-shrink:0}
  body.mobile-app[data-screen=player] .timeline input{height:44px;background-size:100% 2px}
  body.mobile-app[data-screen=player] .timeline input::-webkit-slider-thumb{opacity:1;width:8px;height:8px}
  body.mobile-app[data-screen=player] .timeline input::-moz-range-thumb{opacity:1;width:8px;height:8px}
  body.mobile-app[data-screen=player] .player-track-info{min-height:48px;gap:10px;align-items:center}
  body.mobile-app[data-screen=player] .player-track-info h2{font-size:1.125rem;line-height:1.35;font-weight:600;letter-spacing:-.15px;color:#e8ece2}
  body.mobile-app[data-screen=player] .player-track-info p{font-size:.875rem;margin-top:4px;color:#9ca99b}
  body.mobile-app[data-screen=player] .remaining-time{font-size:.875rem;color:#b2bfaa;letter-spacing:0}
  body.mobile-app[data-screen=player] .time-labels{position:static;width:100%;height:auto;overflow:visible;clip:auto;clip-path:none;white-space:normal;display:flex;margin-top:7px;font-size:.8125rem;line-height:1.4;color:#8e9d8d}
  body.mobile-app[data-screen=player] .playback-controls{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;gap:16px;margin:12px 0 0;width:100%;flex-shrink:0}
  body.mobile-app[data-screen=player] .playback-controls .play-button{max-width:none;width:100%;height:52px!important;min-height:52px;background:#2e3538;border:1px solid #ffffff04}
  body.mobile-app[data-screen=player] .playback-controls .skip-button{width:48px;height:52px}
  body.mobile-app[data-screen=player] .playback-controls .skip-button svg{width:24px;height:24px;stroke-width:1.7}
  body.mobile-app[data-screen=player] .phone-player-actions{flex-shrink:0;margin-top:10px}
  body.mobile-app[data-screen=player] .up-next,body.mobile-app[data-screen=player] .player-bottom{display:none}
  body.mobile-app[data-screen=player] .toast{bottom:calc(var(--phone-nav) + 12px)}
  body.mobile-app.keyboard-open .mobile-nav,body.mobile-app.keyboard-open .mobile-player{display:none}
  body.mobile-app.keyboard-open main{padding-bottom:24px}
  body.mobile-app.library-empty .mobile-player{display:none}
  body.mobile-app.library-empty main{padding-bottom:calc(var(--phone-nav) + 20px)}
}
@media(max-width:1080px) and (max-height:699px) and (orientation:portrait){
  body.mobile-app[data-screen=player] main{padding:0 16px}
  body.mobile-app[data-screen=player] .player-panel{padding-top:4px;padding-bottom:4px}
  body.mobile-app[data-screen=player] .player-art-wrap{aspect-ratio:1.59;width:min(100%,calc((100dvh - var(--phone-nav) - 300px)*1.59));max-width:360px;margin:auto auto 0}
  body.mobile-app[data-screen=player] #player-cassette{position:static;width:100%;transform:none}
  body.mobile-app[data-screen=player] .timeline{margin-top:4px}
  body.mobile-app[data-screen=player] .timeline input{height:44px}
  body.mobile-app[data-screen=player] .player-track-info{min-height:44px}
  body.mobile-app[data-screen=player] .playback-controls{margin-top:6px}
  body.mobile-app[data-screen=player] .phone-player-actions{margin-top:4px}
  body.mobile-app[data-screen=player] .phone-player-actions button{min-height:44px}
}
@media(max-width:1080px) and (max-height:500px) and (orientation:landscape){
  body.mobile-app{--phone-nav:calc(60px + env(safe-area-inset-bottom))}
  body.mobile-app .mobile-nav{padding-top:3px;padding-bottom:calc(3px + env(safe-area-inset-bottom))}
  body.mobile-app .mobile-nav button{height:50px;gap:3px;font-size:.8125rem}
  body.mobile-app[data-screen=player] main{max-width:900px;padding:0 20px}
  body.mobile-app[data-screen=player] .player-panel{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);grid-template-rows:44px minmax(0,1fr) 56px 44px;gap:0 22px;padding:4px 0 8px}
  body.mobile-app[data-screen=player] .player-panel-header{grid-column:1/-1;grid-row:1}
  body.mobile-app[data-screen=player] .player-art-wrap{grid-column:1;grid-row:2/5;aspect-ratio:1.59;width:100%;max-width:360px;margin:auto;align-self:center}
  body.mobile-app[data-screen=player] #player-cassette{position:static;width:100%;transform:none}
  body.mobile-app[data-screen=player] .timeline{grid-column:2;grid-row:2;align-self:end;margin:0}
  body.mobile-app[data-screen=player] .timeline input{height:44px}
  body.mobile-app[data-screen=player] .player-track-info{min-height:42px}
  body.mobile-app[data-screen=player] .player-track-info h2{font-size:1rem}
  body.mobile-app[data-screen=player] .time-labels{margin-top:2px}
  body.mobile-app[data-screen=player] .playback-controls{grid-column:2;grid-row:3;align-self:center;gap:8px;margin:0}
  body.mobile-app[data-screen=player] .phone-player-actions{grid-column:2;grid-row:4;margin:0}
  body.mobile-app[data-screen=player] .phone-player-actions button{min-height:44px;font-size:.8125rem}
}
@media(prefers-reduced-motion:reduce){body.mobile-app .spine-case{transition:none}}
