html, body { height: 100%; }
body.player-page { background: #000; overflow: hidden; }
.app { display: grid; grid-template-columns: 296px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 84px; gap: 8px; height: 100dvh; padding: 8px 8px 0; background: #000; }
.panel { background: var(--bg); border-radius: 10px; }
.noscript { padding: 40px; }

/* sidebar */
.side { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.side-top { padding: 20px 14px 10px; }
.side-brand { display: inline-block; padding: 0 10px 14px; }
.side-nav a { display: flex; align-items: center; gap: 16px; height: 44px; padding: 0 10px; border-radius: 6px; font: 700 15px var(--body); color: var(--muted); transition: color .15s; }
.side-nav a:hover, .side-nav a.on { color: var(--text); }
.side-nav svg { width: 24px; height: 24px; }
.side-nav .count { margin-left: auto; min-width: 24px; padding: 3px 7px; border-radius: 999px; background: var(--s3); font: 700 11.5px var(--body); color: var(--muted); text-align: center; }
.side-lib { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 14px 8px 8px; }
.lib-head { display: flex; align-items: center; padding: 4px 10px 12px; font: 700 15px var(--body); color: var(--muted); }
.lib-head span { display: flex; align-items: center; gap: 14px; }
.lib-head svg { width: 24px; height: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px 10px; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; background: var(--s3); font: 600 13px var(--body); transition: background .15s; }
.chip:hover { background: #333; }
.chip.on { background: #fff; color: #111; }
.lib-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3a3a3a transparent; }
.lib-list a { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 6px; transition: background .15s; }
.lib-list a:hover { background: var(--s2); }
.lib-list img, .lib-list .mix-cover { width: 48px; height: 48px; border-radius: 4px; flex: none; }
.lib-list span { display: flex; flex-direction: column; min-width: 0; }
.lib-list b { font: 600 15px/1.3 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-list small { font-size: 13px; color: var(--muted); }
.lib-list li[hidden] { display: none; }

/* main */
.main { position: relative; overflow-y: auto; overflow-x: hidden; padding: 22px 28px 40px; outline: none; scrollbar-width: thin; scrollbar-color: #3a3a3a transparent; }
.main[data-view="now"] { padding: 0; overflow: hidden; }
.main[data-view="album"], .main[data-view="mix"], .main[data-view="playlist"] { padding: 0 0 40px; }
.home-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.home-head h1 { margin: 0; font: 780 36px/1 var(--display); letter-spacing: -0.02em; }
.streak { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.streak b { color: var(--text); }
.no-from .tracks-head, .no-from .track { grid-template-columns: 44px minmax(0, 1fr) 110px; }
.no-from .t-from, .no-from .tracks-head span:nth-child(3) { display: none; }
.flame { width: 10px; height: 10px; border-radius: 50% 50% 50% 0; background: var(--green); transform: rotate(-45deg); box-shadow: 0 0 12px rgba(30, 215, 96, .6); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #ff6b4a; color: #1a0703; font: 800 15px var(--body); box-shadow: 0 0 0 4px #1f1f1f; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 34px; }
.tile { position: relative; display: flex; align-items: center; gap: 12px; height: 60px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .07); font: 700 14.5px var(--body); transition: background .15s; }
.tile:hover { background: rgba(255, 255, 255, .14); }
.tile img, .tile .mix-cover, .saved-tile { width: 60px; height: 60px; border-radius: 0; flex: none; }
.saved-tile { display: grid; place-items: center; background: var(--green); color: var(--on-green); }
.saved-tile svg { width: 26px; height: 26px; }
.eq { display: none; margin-left: auto; margin-right: 14px; gap: 2px; align-items: flex-end; height: 14px; }
.playing .eq { display: flex; }
.eq i { width: 3px; background: var(--green); border-radius: 1px; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

.row { margin-bottom: 30px; }
.row-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.row-head h2 { margin: 0; font: 780 24px var(--display); letter-spacing: -0.012em; }
.row-more { font: 700 13px var(--body); color: var(--muted); }
.row-more:hover { color: var(--text); text-decoration: underline; }
.row-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); grid-template-rows: auto; grid-auto-rows: 0; overflow: hidden; margin: 0 -12px; }
.card { display: flex; flex-direction: column; padding: 12px; border-radius: 8px; transition: background .2s; min-width: 0; }
.card:hover { background: var(--s1); }
.card-art { position: relative; display: block; margin-bottom: 10px; border-radius: 6px; }
.card-art img { border-radius: 6px; width: 100%; }
.sleeve-art img { box-shadow: 0 14px 26px -16px var(--tint), 0 8px 16px -8px rgba(0, 0, 0, .7); }
.list-art { overflow: hidden; }
.list-tag { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); font: 800 17px/1 var(--display); letter-spacing: -0.012em; border-radius: 0 0 6px 6px; }
.card b { font: 650 15px/1.3 var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card b :lang(zh-Hans) { font-weight: 500; color: var(--muted); font-size: 13px; }
.card small { margin-top: 3px; font-size: 13.5px; color: var(--muted); }
.card-play { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: var(--on-green); box-shadow: 0 8px 16px rgba(0, 0, 0, .4); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; cursor: pointer; }
.card-play svg { width: 22px; height: 22px; }
.card:hover .card-play, .card:focus-visible .card-play { opacity: 1; transform: none; }
.card-play:hover { transform: scale(1.06) !important; }

/* collection (album / mix / playlist) */
.col-head { display: flex; align-items: flex-end; gap: 28px; padding: 64px 28px 26px; background: var(--tint); }
.col-head.light { color: #111; }
.col-head.light .col-sub, .col-head.light .col-meta, .col-head.light .col-kind { color: rgba(0, 0, 0, .7); }
.col-sleeve { width: 196px; flex: none; border-radius: 6px; overflow: hidden; box-shadow: 0 24px 50px rgba(0, 0, 0, .5); }
.col-square { width: 232px; flex: none; border-radius: 6px; overflow: hidden; box-shadow: 0 24px 50px rgba(0, 0, 0, .5); }
.col-mix { width: 232px; flex: none; font-size: 26px; box-shadow: 0 24px 50px rgba(0, 0, 0, .35); }
.col-kind { margin: 0 0 6px; font: 700 13px var(--body); }
.col-info h1 { margin: 0; font: 780 clamp(44px, 6vw, 88px)/0.94 var(--display); letter-spacing: -0.025em; }
.col-info h1 :lang(zh-Hans) { display: block; margin-top: 10px; font: 700 0.42em/1 var(--zh); letter-spacing: .04em; opacity: .85; }
.col-sub { margin: 16px 0 4px; font: 600 14px var(--body); color: rgba(255, 255, 255, .8); }
.col-meta { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .8); }
.col-meta b { color: inherit; }
.col-head:not(.light) .col-meta b { color: #fff; }
.col-actions { display: flex; align-items: center; gap: 18px; padding: 22px 28px 6px; }
.big-play { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: var(--on-green); transition: transform .12s; }
.big-play:hover { transform: scale(1.05); background: #3be477; }
.big-play svg { width: 26px; height: 26px; }
.col-actions .pill { background: none; box-shadow: inset 0 0 0 1px #6a6a6a; }
.col-actions .pill[aria-pressed="true"] { box-shadow: none; }
.col-offline { margin-left: auto; font-size: 13px; color: var(--faint); }
.col-blurb { margin: 8px 28px 18px; max-width: 46em; color: var(--muted); font-size: 15px; }
.tracks { list-style: none; margin: 0; padding: 0 16px; }
.tracks-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) 28% 110px; gap: 16px; padding: 0 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; font: 600 13px var(--body); color: var(--muted); }
.tracks-head svg { width: 16px; height: 16px; justify-self: end; }
.tracks-head span:last-child { display: flex; justify-content: flex-end; }
.track { display: grid; grid-template-columns: 44px minmax(0, 1fr) 28% 110px; gap: 16px; align-items: center; width: 100%; padding: 8px 12px; border-radius: 6px; text-align: left; transition: background .15s; }
.track:hover { background: rgba(255, 255, 255, .08); }
.t-n { position: relative; font: 600 15px var(--body); color: var(--muted); text-align: center; }
.t-n svg { display: none; width: 16px; height: 16px; margin: 0 auto; color: var(--text); }
.track:hover .t-n span { display: none; }
.track:hover .t-n svg { display: block; }
.t-main { display: flex; flex-direction: column; min-width: 0; }
.t-main b { font: 600 16px/1.3 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-main small { font-size: 13.5px; color: var(--muted); }
.track.current b, .track.current .t-n { color: var(--green); }
.t-from { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-len { display: flex; justify-content: flex-end; align-items: center; gap: 10px; font: 500 14px var(--body); color: var(--muted); font-variant-numeric: tabular-nums; }
.t-len em { padding: 3px 7px; border-radius: 4px; background: rgba(30, 215, 96, .14); color: var(--green); font: 700 10.5px var(--body); font-style: normal; letter-spacing: .06em; text-transform: uppercase; }

/* now playing */
.now { display: grid; grid-template-columns: 360px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100%; background: var(--tint); }
.now-side { display: flex; flex-direction: column; padding: 26px 28px; background: rgba(0, 0, 0, .22); overflow-y: auto; }
.now-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 26px; font: 700 14px var(--body); color: rgba(255, 255, 255, .8); }
.now-back svg { width: 18px; height: 18px; }
.now-back:hover { color: #fff; }
.now-sleeve { width: 220px; border-radius: 6px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); margin-bottom: 24px; }
.now-side h1 { margin: 0; font: 780 32px/1 var(--display); letter-spacing: -0.015em; }
.now-side h1 :lang(zh-Hans) { display: block; margin-top: 8px; font: 700 20px var(--zh); opacity: .8; }
.now-sub { margin: 10px 0 18px; color: rgba(255, 255, 255, .75); font-weight: 600; font-size: 14px; }
.now-cast { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.now-cast li { display: flex; align-items: center; gap: 10px; font: 600 14px var(--body); color: rgba(255, 255, 255, .6); transition: color .2s; }
.now-cast i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.now-cast li[data-who="B"] i { background: #9fe8bb; }
.now-cast li.on { color: #fff; }
.now-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.now-tools .pill { background: rgba(0, 0, 0, .3); }
.now-tools .pill[aria-pressed="true"] { background: var(--green); color: var(--on-green); }
.now-lyrics { height: 100%; padding: 0 56px; }
.now-lyrics .ly-t { font-size: 40px; }
.now-lyrics .ly-t:lang(zh-Hans) { font-size: 42px; }
.now-lyrics .ly-tr { font-size: 20px; }
.now-lyrics .ly-py { font-size: 17px; }

/* saved, search */
.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0 0 6px; font: 780 40px var(--display); letter-spacing: -0.015em; }
.page-head p { margin: 0; color: var(--muted); }
.phrases { list-style: none; margin: 0; padding: 0; }
.phrases li { display: grid; grid-template-columns: 44px 48px minmax(0, 1fr) 26% 36px; gap: 16px; align-items: center; padding: 10px 12px; border-radius: 8px; }
.phrases li:hover { background: rgba(255, 255, 255, .06); }
.phrases .empty { display: block; padding: 20px 0; }
.phrases .empty a { display: inline-flex; padding: 12px 20px; border-radius: 999px; background: var(--green); color: var(--on-green); font-weight: 700; }
.phrase-play { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: var(--on-green); }
.phrase-play svg { width: 18px; height: 18px; }
.phrase-art img { width: 48px; height: 48px; border-radius: 4px; }
.phrase-main { display: flex; flex-direction: column; }
.phrase-main b { font-size: 18px; font-weight: 700; }
.phrase-main .py { font-size: 13px; color: var(--muted); }
.phrase-main small { font-size: 14px; color: var(--muted); }
.phrase-from { font-size: 13.5px; color: var(--faint); }
.phrase-rm { display: grid; place-items: center; width: 32px; height: 32px; color: var(--faint); border-radius: 50%; }
.phrase-rm:hover { color: var(--text); background: var(--s3); }
.phrase-rm svg { width: 16px; height: 16px; }
.search-box { display: flex; align-items: center; gap: 12px; max-width: 460px; height: 50px; padding: 0 18px; border-radius: 999px; background: var(--s3); box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .15s; }
.search-box:focus-within { box-shadow: inset 0 0 0 2px #fff; }
.search-box svg { width: 22px; height: 22px; color: var(--muted); }
.search-box input { flex: 1; height: 100%; border: 0; outline: none; background: none; font-size: 15px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.cat { position: relative; height: 112px; padding: 14px 16px; border-radius: 8px; overflow: hidden; background: var(--bg); text-align: left; }
.cat::after { content: ""; position: absolute; right: -18px; bottom: -22px; width: 86px; height: 86px; border-radius: 14px; background: rgba(0, 0, 0, .22); transform: rotate(24deg); }
.cat b { position: relative; z-index: 1; font: 780 22px/1 var(--display); letter-spacing: -0.012em; }
.no-hits { color: var(--muted); }
.lib-mobile .lib-list { overflow: visible; }

/* player bar */
.bar { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 16px; padding: 0 10px; }
.bar-now { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bar-thumb img { width: 56px; height: 56px; border-radius: 4px; }
.bar-meta { display: flex; flex-direction: column; min-width: 0; }
.bar-title { font: 600 14.5px/1.3 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-title:hover { text-decoration: underline; }
.bar-sub { font-size: 12.5px; color: var(--muted); }
.icon-btn { position: relative; display: grid; place-items: center; width: 34px; height: 34px; color: var(--muted); transition: color .15s, transform .1s; }
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn[aria-pressed="true"] { color: var(--green); }
.icon-btn[aria-pressed="true"]::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--green); }
.speed-txt { font: 800 12px var(--body); }
.icon-btn .py-glyph { font-size: 16px; font-weight: 700; }
.bar-center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-controls { display: flex; align-items: center; gap: 14px; }
.play-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #000; transition: transform .1s; }
.play-btn:hover { transform: scale(1.06); }
.play-btn svg { width: 18px; height: 18px; }
.play-btn svg + svg, .playing .play-btn svg:first-child { display: none; }
.playing .play-btn svg + svg { display: block; }
.bar-progress { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 560px; font: 500 12px var(--body); color: var(--muted); font-variant-numeric: tabular-nums; }
.track-bar { position: relative; flex: 1; height: 14px; cursor: pointer; touch-action: none; }
.track-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 4px; border-radius: 4px; background: #4d4d4d; }
.track-bar span { position: absolute; left: 0; top: 5px; height: 4px; width: 0; border-radius: 4px; background: #fff; }
.track-bar:hover span { background: var(--green); }
.track-bar span::after { content: ""; position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .15s; }
.track-bar:hover span::after { opacity: 1; }
.bar-right { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.bar-line { margin-left: 8px; font: 600 12px var(--body); color: var(--faint); white-space: nowrap; }
[data-view="now"] [data-lyrics-btn] { color: var(--green); }
.tabs { display: none; }
.app .toast { bottom: 104px; }

@media (max-width: 1000px) {
  .app { grid-template-columns: 84px minmax(0, 1fr); }
  .side-brand .logo-word, .side-nav span, .side-nav .count, .lib-head span, .chips, .lib-list span { display: none; }
  .side-brand { padding: 0 0 10px 12px; }
  .lib-head { justify-content: center; }
  .lib-list a { justify-content: center; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .now { grid-template-columns: 300px minmax(0, 1fr); }
  .bar-line { display: none; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; gap: 0; padding: 0; background: var(--bg); }
  .side { display: none; }
  .main { border-radius: 0; padding: 14px 16px 24px; }
  .home-head { margin-bottom: 16px; }
  .home-head h1 { font-size: 26px; }
  .streak { font-size: 12.5px; }
  .streak-more { display: none; }
  .now-lyrics .ly-pad { height: 14%; }
  .tiles { gap: 6px; margin-bottom: 24px; }
  .tile { height: 52px; font-size: 13px; gap: 9px; }
  .tile img, .tile .mix-cover, .saved-tile { width: 52px; height: 52px; }
  .row { margin-bottom: 22px; }
  .row-head h2 { font-size: 20px; }
  .row-items { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin: 0 -8px; }
  .card { padding: 8px; }
  .card-play { display: none; }
  .bar { position: relative; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 0 8px 6px; padding: 7px 8px 9px; border-radius: 8px; background: var(--now-tint, #6b2318); }
  .bar-thumb img { width: 40px; height: 40px; }
  .bar-now .icon-btn, .bar-right, .bar-controls .icon-btn { display: none; }
  .bar-center { flex-direction: row; }
  .bar-controls { gap: 0; }
  .play-btn { background: none; color: #fff; width: 40px; height: 40px; }
  .play-btn svg { width: 24px; height: 24px; }
  .bar-progress { position: absolute; left: 8px; right: 8px; bottom: 2px; width: auto; max-width: none; }
  .bar-progress > span { display: none; }
  .track-bar { height: 3px; }
  .track-bar::before, .track-bar span { top: 0; height: 2px; }
  .track-bar::before { background: rgba(255, 255, 255, .25); }
  .tabs { display: flex; justify-content: space-around; padding: 8px 0 calc(10px + env(safe-area-inset-bottom)); background: #000; }
  .tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; font: 600 10.5px var(--body); color: var(--muted); }
  .tabs a.on { color: #fff; }
  .tabs svg { width: 24px; height: 24px; }
  .main[data-view="now"] { padding: 0; }
  .now { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .now-side { display: grid; grid-template-columns: 92px minmax(0, 1fr); grid-template-areas: "back back" "art title" "art sub" "tools tools"; gap: 0 14px; padding: 14px 16px 12px; overflow: visible; }
  .now-back { grid-area: back; margin-bottom: 12px; }
  .now-sleeve { grid-area: art; width: 92px; margin: 0; }
  .now-side h1 { grid-area: title; align-self: end; font-size: 21px; }
  .now-side h1 :lang(zh-Hans) { font-size: 14px; margin-top: 4px; }
  .now-sub { grid-area: sub; margin: 6px 0 0; font-size: 12.5px; }
  .now-cast { display: none; }
  .now-tools { grid-area: tools; margin-top: 14px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .now-tools .pill { flex: none; height: 32px; padding: 0 12px; font-size: 12.5px; }
  .now-lyrics { padding: 0 18px; }
  .now-lyrics .ly-t, .now-lyrics .ly-t:lang(zh-Hans) { font-size: 26px; }
  .now-lyrics .ly-tr { font-size: 16px; }
  .now-lyrics .ly-py { font-size: 14px; }
  .now-mobile-controls { display: flex; }
  .col-head { flex-direction: column; align-items: flex-start; padding: 24px 16px 20px; gap: 18px; }
  .col-sleeve { width: 150px; }
  .col-square, .col-mix { width: 180px; }
  .col-info h1 { font-size: 44px; }
  .col-actions { padding: 16px 16px 4px; }
  .col-offline { display: none; }
  .col-blurb { margin: 8px 16px 14px; }
  .tracks { padding: 0 4px; }
  .tracks-head { display: none; }
  .track { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; }
  .t-from { display: none; }
  .t-len { gap: 6px; }
  .phrases li { grid-template-columns: 40px minmax(0, 1fr) 32px; }
  .phrase-art, .phrase-from { display: none; }
  .cats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cat { height: 92px; }
  .cat b { font-size: 18px; }
  .app .toast { bottom: 140px; }
}
