:root {
  --page: #090a0a;
  --panel: #111313;
  --panel-raised: #181a1a;
  --panel-hover: #242727;
  --text: #f4f5f2;
  --muted: #a7aaa7;
  --quiet: #757976;
  --line: rgba(244, 245, 242, 0.1);
  --accent: #61e2d1;
  --accent-ink: #071715;
  --danger: #ff7780;
  --radius: 8px;
  --player-height: 88px;
}

* { box-sizing: border-box; }
html { background: var(--page); color: var(--text); font: 15px/1.45 "Segoe UI Variable", "Segoe UI", system-ui, sans-serif; }
body { margin: 0; min-width: 320px; min-height: 100dvh; overflow: hidden; background: var(--page); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { border: 0; background: transparent; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
button:active:not(:disabled), a:active { transform: scale(0.98); }

.app-shell {
  display: grid;
  grid-template-columns: minmax(250px, 318px) minmax(540px, 1fr);
  grid-template-rows: 58px minmax(0, 1fr) var(--player-height);
  gap: 8px;
  width: 100%;
  height: 100dvh;
  padding: 0 8px;
  background: var(--page);
}
.app-shell.has-now-panel { grid-template-columns: minmax(250px, 318px) minmax(540px, 1fr) minmax(280px, 324px); }
.app-shell:not(.has-track) { grid-template-rows: 58px minmax(0, 1fr) 0; }
.app-shell:not(.has-track) .player-bar { display: none; }

.global-header {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 48px 88px minmax(280px, 420px) 1fr;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; }
.brand-button img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.history-buttons { display: flex; gap: 7px; }
.round-button { background: #1b1d1d; border: 1px solid var(--line); }
.round-button { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: 17px; }

.global-search { position: relative; min-width: 0; }
.global-search > i { position: absolute; left: 16px; top: 50%; translate: 0 -50%; color: var(--muted); font-size: 20px; pointer-events: none; }
.global-search input {
  width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 22px;
  padding: 0 72px 0 46px; background: #202222; color: var(--text); outline: none;
}
.global-search input:hover { background: #282a2a; }
.global-search input:focus { border-color: rgba(244,245,242,.75); box-shadow: 0 0 0 1px rgba(244,245,242,.75); }
.global-search input::placeholder { color: #b5b8b5; }
.search-key { position: absolute; right: 14px; top: 50%; translate: 0 -50%; padding-left: 12px; border-left: 1px solid var(--line); color: var(--quiet); font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.text-button { min-height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; border-radius: 20px; font-weight: 700; }
.text-button:hover { background: var(--panel-hover); }
.account-control { position: relative; }
.account-avatar-button { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 3px; border-radius: 50%; background: #171919; }
.account-avatar-button:hover { background: #292b2b; transform: scale(1.03); }
.account-avatar-button > .avatar-fallback, .account-avatar-image { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; }
.account-avatar-image img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { display: grid; place-items: center; border-radius: 50%; background: #424545; color: #f6f7f4; font-weight: 780; text-transform: uppercase; }
.account-tooltip { position: absolute; z-index: 70; top: 46px; right: 0; max-width: 180px; padding: 6px 9px; border-radius: 4px; background: #282a2a; box-shadow: 0 5px 16px rgba(0,0,0,.42); font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateY(-3px); transition: opacity .12s ease, transform .12s ease; }
.account-avatar-button:hover .account-tooltip, .account-avatar-button:focus-visible .account-tooltip { opacity: 1; transform: translateY(0); }
.account-menu { position: absolute; z-index: 65; top: 46px; right: 0; width: 238px; padding: 4px; border-radius: 5px; background: #282a2a; box-shadow: 0 14px 42px rgba(0,0,0,.58); }
.account-menu button { width: 100%; min-height: 42px; padding: 0 12px; border-radius: 3px; text-align: left; font-size: 13px; font-weight: 620; }
.account-menu button:hover { background: #3a3c3c; }
.account-menu-divider { height: 1px; margin: 4px 8px; background: rgba(244,245,242,.12); }

.library-sidebar, .main-view, .now-panel { min-height: 0; overflow: hidden; border-radius: var(--radius); background: var(--panel); }
.library-sidebar { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; padding: 15px 10px 8px; }
.library-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 12px; }
.sidebar-title { min-width: 0; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 16px; font-weight: 750; }
.sidebar-title:hover { color: var(--text); }
.sidebar-title i { font-size: 24px; }
.compact-button { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 18px; background: #222424; font-weight: 750; font-size: 13px; }
.compact-button:hover { background: #2e3030; }
.filter-row { display: flex; gap: 7px; padding: 0 2px 12px; overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; min-height: 33px; padding: 0 12px; border-radius: 17px; background: #272929; font-size: 13px; font-weight: 650; }
.filter-chip:hover { background: #343636; }
.filter-chip.active { background: var(--text); color: #151616; }
.library-tools { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 0 7px; color: var(--muted); font-size: 12px; }
.library-search { position: relative; display: block; min-width: 0; max-width: 166px; }
.library-search i { position: absolute; left: 8px; top: 50%; translate: 0 -50%; pointer-events: none; }
.library-search input { width: 34px; height: 32px; border: 0; border-radius: 4px; background: transparent; color: var(--text); padding: 0 8px 0 29px; outline: none; transition: width .18s ease, background .18s ease; }
.library-search input:focus, .library-search input:not(:placeholder-shown) { width: 166px; background: #242626; }
.library-search input::placeholder { color: var(--muted); }
.library-list { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 0 12px; scrollbar-color: #555 transparent; }
.library-item { width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 11px; min-height: 64px; padding: 6px; border-radius: 6px; text-align: left; }
.library-item:hover, .library-item.active { background: #202222; }
.library-art { width: 52px; height: 52px; border-radius: 4px; object-fit: cover; background: #282b2b; }
.library-art.artist { border-radius: 50%; }
.liked-art { display: grid; place-items: center; color: var(--text); background: linear-gradient(135deg, #3f55c4, #8ce5d8); }
.library-copy { min-width: 0; display: grid; gap: 2px; }
.library-copy strong, .library-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-copy strong { font-size: 14px; font-weight: 680; }
.library-copy span { color: var(--muted); font-size: 12px; }
.library-empty { padding: 28px 14px; color: var(--muted); font-size: 13px; text-align: center; }

.main-view { grid-column: 2; grid-row: 2; overflow-y: auto; scrollbar-color: #555 transparent; scroll-behavior: smooth; }
.main-inner { min-height: 100%; padding: 26px 28px 56px; }
.view-heading { margin: 0 0 22px; font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.045em; line-height: 1.05; }
.section { margin-top: 34px; }
.section:first-child { margin-top: 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.035em; }
.section-heading button { color: var(--muted); font-size: 12px; font-weight: 750; }

.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick-card { min-width: 0; display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 11px; padding: 0; border-radius: 5px; overflow: hidden; background: rgba(244,245,242,.1); text-align: left; }
.quick-card:hover { background: rgba(244,245,242,.16); }
.quick-card img { width: 62px; height: 62px; object-fit: cover; }
.quick-card strong { padding-right: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

.card-scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(142px, 1fr); grid-template-rows: 1fr; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: #444 transparent; }
.media-card { min-width: 0; scroll-snap-align: start; display: grid; gap: 8px; align-content: start; padding: 10px; border-radius: 6px; text-align: left; }
.media-card:hover { background: #1c1e1e; }
.media-card img { width: 100%; aspect-ratio: 1; border-radius: 5px; object-fit: cover; background: #292b2b; box-shadow: 0 9px 24px rgba(0,0,0,.24); }
.media-card.artist img { border-radius: 50%; }
.media-card strong, .media-card span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card strong { font-size: 14px; }
.media-card span { color: var(--muted); font-size: 12px; }

.skeleton { position: relative; overflow: hidden; background: #242626; color: transparent; }
.skeleton::after { content: ""; position: absolute; inset: 0; translate: -100% 0; background: linear-gradient(90deg, transparent, rgba(244,245,242,.08), transparent); animation: shimmer 1.25s infinite; }
@keyframes shimmer { to { translate: 100% 0; } }

.now-panel { grid-column: 3; grid-row: 2; display: none; flex-direction: column; padding: 14px; }
.app-shell.has-now-panel .now-panel { display: flex; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 36px; margin-bottom: 10px; }
.panel-heading strong { font-size: 14px; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--muted); font-size: 19px; }
.icon-button:hover { color: var(--text); background: rgba(244,245,242,.08); }
.now-panel-content { min-height: 0; overflow-y: auto; }
.now-cover { width: 100%; aspect-ratio: 1; border-radius: 7px; object-fit: cover; }
.now-copy { display: flex; align-items: center; gap: 10px; padding: 17px 2px 18px; }
.now-copy > div { min-width: 0; display: grid; flex: 1; }
.now-copy strong { font-size: 21px; letter-spacing: -0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-copy span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-about { overflow: hidden; border-radius: 7px; background: #1b1d1d; }
.now-about img { width: 100%; aspect-ratio: 1.45; object-fit: cover; }
.now-about div { padding: 14px; }
.now-about strong { display: block; margin-bottom: 4px; }
.now-about p { margin: 0; color: var(--muted); font-size: 13px; }
.empty-panel { height: 100%; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--quiet); text-align: center; padding: 30px; }
.empty-panel i { font-size: 34px; }
.empty-panel p { margin: 0; }

.profile-hero { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: end; gap: 24px; min-height: 255px; padding: 36px 28px 24px; background: linear-gradient(180deg, #575a59, #292b2b); }
.profile-avatar-button { position: relative; width: 190px; height: 190px; padding: 0; border-radius: 50%; overflow: hidden; background: #424545; box-shadow: 0 14px 34px rgba(0,0,0,.42); }
.profile-avatar-button.static { display: block; }
.profile-avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; font-size: 68px; }
.profile-avatar-button > span:last-child:not(.avatar-fallback) { position: absolute; inset: 0; display: grid; place-content: center; gap: 3px; color: #fff; background: rgba(0,0,0,.58); font-size: 13px; font-weight: 650; opacity: 0; transition: opacity .14s ease; }
.profile-avatar-button > span:last-child i { display: block; font-size: 40px; }
.profile-avatar-button:hover > span:last-child, .profile-avatar-button:focus-visible > span:last-child { opacity: 1; }
.profile-hero-copy { min-width: 0; padding-bottom: 7px; }
.profile-hero-copy > span { font-size: 12px; font-weight: 700; }
.profile-hero-copy h1 { margin: 6px 0 11px; font-size: clamp(52px, 7vw, 92px); line-height: .95; letter-spacing: -.06em; overflow-wrap: anywhere; }
.profile-hero-copy p { margin: 0; color: #d6d8d5; font-size: 13px; }
.profile-body { --hero-color: #292b2b; }
.profile-actions { display: flex; align-items: center; gap: 4px; min-height: 52px; margin-bottom: 8px; }
.profile-more-wrap { position: relative; }
.profile-more-menu { position: absolute; z-index: 20; top: 41px; left: 0; width: 190px; padding: 4px; border-radius: 5px; background: #282a2a; box-shadow: 0 12px 34px rgba(0,0,0,.54); }
.profile-more-menu button { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 10px; border-radius: 3px; text-align: left; font-size: 12px; font-weight: 650; }
.profile-more-menu button:hover { background: #3a3c3c; }
.profile-more-menu i { font-size: 17px; }
.profile-body .section-heading > span { color: var(--muted); font-size: 11px; }
.profile-artists .media-card img { border-radius: 50%; }
.settings-page { min-height: 100%; }

.player-bar { position: relative; grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: minmax(210px, 30%) minmax(360px, 1fr) minmax(220px, 30%); align-items: center; gap: 20px; min-width: 0; padding: 7px 10px; background: var(--page); }
.player-bar.has-device-status { padding-bottom: 22px; }
.device-status-bar { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 17px; display: flex; align-items: center; justify-content: flex-end; gap: 5px; padding: 0 10px; border-radius: 3px 3px 0 0; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; }
.device-status-bar i { font-size: 13px; }
.player-track { min-width: 0; display: grid; grid-template-columns: 58px minmax(0, 1fr) 40px; align-items: center; gap: 11px; }
.player-track img, .player-cover-placeholder { width: 58px; height: 58px; border-radius: 4px; object-fit: cover; background: #202222; }
.player-cover-placeholder { display: grid; place-items: center; color: var(--quiet); }
.player-track > div:not(.player-cover-placeholder) { min-width: 0; display: grid; }
.player-track strong, .player-track span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-track strong { font-size: 13px; }
.player-track span { color: var(--muted); font-size: 11px; }
.player-track .save-track { color: var(--accent); }
.player-center { min-width: 0; display: grid; justify-items: stretch; gap: 3px; }
.player-controls { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; }
.player-controls .icon-button.active { color: var(--accent); }
.play-button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--text); color: #111313; font-size: 16px; }
.play-button:hover { transform: scale(1.04); }
.timeline { display: grid; grid-template-columns: 38px minmax(60px, 1fr) 38px; align-items: center; gap: 7px; color: var(--muted); font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
input[type="range"] { --range: 0%; width: 100%; height: 4px; margin: 0; appearance: none; border: 0; border-radius: 3px; background: linear-gradient(90deg, var(--text) var(--range), #4b4e4d var(--range)); accent-color: var(--text); }
input[type="range"]::-webkit-slider-thumb { width: 12px; height: 12px; appearance: none; border-radius: 50%; background: var(--text); opacity: 0; }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:focus-visible::-webkit-slider-thumb { opacity: 1; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--text); opacity: 0; }
input[type="range"]:hover::-moz-range-thumb, input[type="range"]:focus-visible::-moz-range-thumb { opacity: 1; }
.player-extras { justify-self: end; width: min(100%, 296px); display: grid; grid-template-columns: 38px 38px 18px minmax(70px, 120px); align-items: center; justify-content: end; gap: 5px; color: var(--muted); }
.device-control { position: relative; width: 38px; height: 38px; }
.device-control > .icon-button.active { color: var(--accent); }
.device-popover { position: absolute; z-index: 80; right: -34px; bottom: 50px; width: min(390px, calc(100vw - 24px)); max-height: min(520px, calc(100vh - 120px)); overflow: hidden; padding: 8px; border: 1px solid rgba(244,245,242,.08); border-radius: 8px; background: #171919; box-shadow: 0 18px 52px rgba(0,0,0,.62); color: var(--text); }
.device-popover-heading { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 7px 0 10px; }
.device-popover-heading strong { font-size: 16px; letter-spacing: -.02em; }
.device-list { display: grid; gap: 4px; max-height: 430px; overflow-y: auto; padding-bottom: 2px; scrollbar-color: #555 transparent; }
.device-row { width: 100%; min-height: 64px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 22px; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 7px; text-align: left; }
.device-row:hover, .device-row:focus-visible { background: #252828; }
.device-row > i { font-size: 25px; color: #d8dad7; }
.device-row-copy { min-width: 0; display: grid; gap: 2px; }
.device-row-copy strong, .device-row-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-row-copy strong { font-size: 14px; }
.device-row-copy span { color: var(--muted); font-size: 11px; }
.device-row.active { background: #222525; }
.device-row.active > i, .device-row.active strong, .device-row.active > .ph-broadcast { color: var(--accent); }
.device-row > .ph-broadcast { font-size: 16px; color: transparent; }
.device-empty, .device-loading { min-height: 108px; display: grid; place-content: center; justify-items: center; gap: 9px; padding: 18px; color: var(--muted); font-size: 12px; text-align: center; }
.device-loading > span:first-child { width: 20px; height: 20px; border: 2px solid rgba(244,245,242,.18); border-top-color: var(--accent); border-radius: 50%; animation: device-spin .8s linear infinite; }
@keyframes device-spin { to { rotate: 360deg; } }

.hero-detail { --hero-color: #234c49; position: relative; display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: end; gap: 24px; min-height: 286px; padding: 42px 28px 24px; background: linear-gradient(180deg, color-mix(in srgb, var(--hero-color), #171919 20%), color-mix(in srgb, var(--hero-color), #0e1010 48%)); }
.hero-detail.artist-hero { grid-template-columns: 1fr; min-height: 330px; align-items: end; overflow: hidden; }
.artist-hero .hero-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; filter: saturate(.86) contrast(1.02); }
.artist-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,10,10,.05), rgba(9,10,10,.86)); }
.hero-cover { width: 210px; height: 210px; object-fit: cover; border-radius: 5px; box-shadow: 0 16px 38px rgba(0,0,0,.42); }
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.hero-copy .type { margin: 0 0 7px; font-size: 12px; font-weight: 700; }
.hero-copy h1 { margin: 0; font-size: clamp(38px, 5vw, 76px); line-height: .98; letter-spacing: -0.055em; overflow-wrap: anywhere; }
.hero-copy .meta { margin: 14px 0 0; color: #d6d8d5; font-size: 13px; }
.hero-copy .description { max-width: 65ch; margin: 8px 0 0; color: #c5c8c5; }
.artist-hero .hero-copy h1 { font-size: clamp(50px, 7vw, 94px); }
.detail-body { min-height: 360px; padding: 20px 28px 58px; background: linear-gradient(180deg, color-mix(in srgb, var(--hero-color), #111313 72%), var(--panel) 235px); }
.action-row { display: flex; align-items: center; gap: 10px; min-height: 58px; margin-bottom: 16px; }
.large-play { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 22px; }
.large-play:hover { transform: scale(1.04); filter: brightness(1.05); }
.circle-action { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(244,245,242,.34); border-radius: 50%; color: var(--muted); font-size: 20px; }
.circle-action:hover, .circle-action.saved { color: var(--text); border-color: var(--text); }
.circle-action.saved { color: var(--accent); border-color: var(--accent); }
.circle-action.danger-action:hover { color: var(--danger); border-color: var(--danger); }
.outline-button, .secondary-button, .primary-button { min-height: 39px; border-radius: 20px; padding: 0 17px; font-weight: 750; white-space: nowrap; }
.outline-button, .secondary-button { border: 1px solid rgba(244,245,242,.34); background: transparent; color: var(--text); }
.outline-button:hover, .secondary-button:hover { border-color: var(--text); }
.primary-button { background: var(--accent); color: var(--accent-ink); }
.primary-button:hover { filter: brightness(1.05); }
.action-spacer { flex: 1; }

.track-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.track-table th { height: 34px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; text-align: left; }
.track-table th:first-child, .track-table td:first-child { width: 44px; text-align: center; }
.track-table th:last-child, .track-table td:last-child { width: 100px; text-align: right; }
.track-table td { height: 58px; padding: 5px 10px; vertical-align: middle; }
.track-table tr.track-row { border-radius: 5px; }
.track-table tr.track-row:hover { background: rgba(244,245,242,.07); }
.track-table tr.track-row button { text-align: inherit; }
.track-number { color: var(--muted); font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.track-title-cell { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 11px; }
.track-title-cell.no-cover { grid-template-columns: minmax(0, 1fr); }
.track-title-cell img { width: 42px; height: 42px; border-radius: 3px; object-fit: cover; }
.track-title-cell > div { min-width: 0; display: grid; }
.track-title-cell strong, .track-title-cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-title-cell strong { font-size: 14px; font-weight: 620; }
.track-title-cell span, .album-cell { color: var(--muted); font-size: 12px; }
.track-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.track-actions .icon-button { width: 34px; height: 34px; font-size: 17px; }
.track-actions .liked { color: var(--accent); }
.track-row.unavailable { opacity: .52; }

.search-page { padding-top: 24px; }
.search-title { margin-bottom: 18px; }
.search-title h1 { margin: 0 0 4px; font-size: 32px; letter-spacing: -0.045em; }
.search-title p { margin: 0; color: var(--muted); }
.top-results { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.2fr); gap: 18px; }
.top-result { min-height: 216px; padding: 19px; border-radius: 7px; background: #191b1b; }
.top-result:hover { background: #202222; }
.top-result img { width: 92px; height: 92px; border-radius: 5px; object-fit: cover; }
.top-result.artist img { border-radius: 50%; }
.top-result h2 { margin: 17px 0 5px; font-size: 28px; letter-spacing: -0.04em; }
.top-result p { margin: 0; color: var(--muted); font-size: 13px; }
.search-songs { padding: 12px 0; }
.search-song { display: grid; grid-template-columns: 44px minmax(0, 1fr) 34px; align-items: center; gap: 10px; min-height: 62px; padding: 5px 8px; border-radius: 5px; }
.search-song:hover { background: rgba(244,245,242,.07); }
.search-song img { width: 44px; height: 44px; border-radius: 3px; object-fit: cover; }
.search-song > button:not(.icon-button) { min-width: 0; display: grid; text-align: left; }
.search-song strong, .search-song span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-song strong, .search-song span { display: block; min-width: 0; }
.search-song span { color: var(--muted); font-size: 12px; }
.search-empty, .error-state { display: grid; place-items: center; min-height: 50vh; padding: 30px; color: var(--muted); text-align: center; }
.error-state i { margin-bottom: 10px; font-size: 34px; color: var(--danger); }

.auth-view { min-height: 100dvh; overflow-y: auto; padding: 48px 24px 72px; background: #101111; }
.auth-shell { width: min(420px, 100%); margin: 0 auto; }
.auth-mark { width: 42px; height: 42px; margin: 0 auto 28px; border-radius: 50%; object-fit: cover; }
.auth-heading { margin: 0 0 34px; font-size: clamp(36px, 6vw, 46px); line-height: 1.03; letter-spacing: -0.055em; text-align: center; }
.auth-form { display: grid; gap: 11px; }
.auth-form label, .modal label, .modal legend { color: #e7e9e6; font-size: 13px; font-weight: 750; }
.auth-form input, .auth-form select, .modal input[type="text"], .modal input[type="search"], .modal input:not([type]), .modal textarea {
  width: 100%; border: 1px solid #4b4e4d; border-radius: 5px; background: #202222; color: var(--text); padding: 11px 12px; outline: none;
}
.auth-form input, .auth-form select { min-height: 49px; background: #151717; }
.auth-form input:focus, .auth-form select:focus, .modal input:focus, .modal textarea:focus { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.auth-form input::placeholder { color: #858985; }
.password-field { position: relative; }
.password-field input { padding-right: 46px; }
.password-field .icon-button { position: absolute; right: 3px; top: 2px; }
.form-error { min-height: 20px; margin: 2px 0; color: var(--danger); font-size: 12px; }
.auth-submit { width: 100%; min-height: 49px; margin-top: 5px; border-radius: 25px; background: #29d86f; color: #07130b; font-weight: 800; }
.auth-submit:hover { background: #35e57b; transform: scale(1.01); }
.auth-switch { display: grid; justify-items: center; gap: 10px; margin-top: 70px; color: #c5c8c5; font-size: 14px; }
.auth-switch button { color: var(--text); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.auth-back-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; margin-bottom: 20px; }
.auth-back { display: grid; place-items: center; width: 42px; height: 42px; color: var(--muted); font-size: 25px; }
.auth-step-copy { display: grid; gap: 2px; }
.auth-step-copy span { color: #c5c8c5; font-size: 13px; }
.auth-step-copy strong { font-size: 15px; }
.auth-progress { height: 2px; margin-bottom: 14px; background: #737774; }
.auth-progress span { display: block; width: var(--step); height: 100%; background: #29d86f; transition: width .2s ease; }
.auth-identifier { margin: -20px 0 24px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.password-rules { display: grid; gap: 8px; margin: 4px 0 18px; color: #e5e7e4; font-size: 13px; font-weight: 650; }
.password-rule { display: flex; align-items: center; gap: 8px; }
.password-rule i { color: var(--muted); }
.password-rule.valid i { color: #29d86f; }
.gender-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 2px 0 13px; }
.gender-option { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 650 !important; }
.gender-option input { width: 18px; min-height: 18px; margin: 0; accent-color: #29d86f; }
.date-fields { display: grid; grid-template-columns: 78px minmax(130px, 1fr) 96px; gap: 9px; margin-bottom: 13px; }
.otp-heading { margin: 0 0 26px; font-size: 27px; line-height: 1.12; letter-spacing: -0.04em; }
.otp-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.otp-grid input { min-width: 0; height: 54px; padding: 0; font-size: 25px; font-weight: 750; text-align: center; }
.resend-button { justify-self: center; min-height: 38px; margin: 8px 0 27px; padding: 0 15px; border: 1px solid #747875; border-radius: 20px; font-size: 12px; font-weight: 750; }
.auth-note { margin: 0 0 24px; color: var(--muted); text-align: center; }

.modal { width: min(510px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #282a2a; color: var(--text); box-shadow: 0 24px 80px rgba(0,0,0,.58); }
.modal::backdrop { background: rgba(5,6,6,.72); backdrop-filter: blur(4px); }
.modal form, .modal:not(.wide-modal) { padding: 22px; }
.wide-modal { width: min(680px, calc(100% - 28px)); padding: 22px; }
.modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-heading h2 { margin: 0; font-size: 22px; letter-spacing: -0.035em; }
.modal form { display: grid; gap: 8px; }
.modal textarea { resize: vertical; min-height: 74px; }
.playlist-cover-picker { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 14px; padding: 8px 0 4px; }
.playlist-cover-picker img { width: 88px; height: 88px; border-radius: 5px; object-fit: cover; background: #202222; }
.playlist-cover-picker > div { display: grid; justify-items: start; gap: 7px; }
.playlist-cover-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.playlist-cover-picker small { color: var(--muted); }
.visually-hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.profile-editor { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 24px; }
.profile-photo-picker { position: relative; display: block; width: 150px; height: 150px; border-radius: 50%; overflow: hidden; cursor: pointer; background: #424545; }
.profile-photo-picker > .avatar-fallback, .profile-photo-preview, .profile-photo-preview img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; font-size: 54px; }
.profile-photo-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; color: white; background: rgba(0,0,0,.58); font-size: 12px; opacity: 0; transition: opacity .14s ease; }
.profile-photo-overlay i { font-size: 36px; }
.profile-photo-picker:hover .profile-photo-overlay, .profile-photo-picker:focus-within .profile-photo-overlay { opacity: 1; }
.profile-name-field { display: grid; gap: 7px; }
.profile-upload-note { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; }
.file-button { display: inline-flex; align-items: center; cursor: pointer; }
.text-danger { min-height: 28px; color: var(--danger); font-size: 12px; font-weight: 750; }
.modal fieldset { display: grid; gap: 7px; margin: 9px 0 0; padding: 0; border: 0; }
.visibility-option { display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: 9px; padding: 10px; border-radius: 6px; background: #202222; }
.visibility-option input { margin-top: 3px; accent-color: var(--accent); }
.visibility-option span { display: grid; gap: 1px; }
.visibility-option small { color: var(--muted); font-weight: 450; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.danger-button { min-height: 39px; padding: 0 17px; border-radius: 20px; background: #d94b56; color: #fff5f5; font-weight: 780; }
.confirm-modal > p { margin: 0 0 14px; color: var(--muted); }
.dialog-search { position: relative; display: block; margin-bottom: 14px; }
.dialog-search i { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--muted); }
.dialog-search input { padding-left: 38px !important; }
.dialog-results { max-height: 52vh; overflow-y: auto; }
.dialog-track { width: 100%; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 7px; border-radius: 5px; text-align: left; }
.dialog-track:hover { background: rgba(244,245,242,.07); }
.dialog-track img { width: 46px; height: 46px; border-radius: 3px; object-fit: cover; }
.dialog-track > span { min-width: 0; display: grid; }
.dialog-track strong, .dialog-track small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-track small { color: var(--muted); }
.dialog-track > i { color: var(--accent); font-size: 21px; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 104px; translate: -50% 18px; padding: 11px 17px; border-radius: 6px; background: #e9ebe7; color: #111313; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .18s ease, translate .18s ease; }
.toast.show { opacity: 1; translate: -50% 0; }
.mobile-nav { display: none; }

@media (max-width: 1480px) {
  .app-shell, .app-shell.has-now-panel { grid-template-columns: minmax(245px, 300px) minmax(540px, 1fr); }
  .app-shell.has-now-panel .now-panel { display: none; }
  .main-view { grid-column: 2; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-scroller { grid-auto-columns: minmax(150px, 20%); }
}

@media (max-width: 900px) {
  :root { --player-height: 72px; }
  body { overflow: hidden; }
  .app-shell { grid-template-columns: 1fr; grid-template-rows: 56px minmax(0, 1fr) var(--player-height) 62px; gap: 0; padding: 0; }
  .app-shell:not(.has-track) { grid-template-rows: 56px minmax(0, 1fr) 0 62px; }
  .global-header { grid-column: 1; grid-row: 1; grid-template-columns: 44px minmax(0, 1fr) auto; padding: 0 10px; border-bottom: 1px solid var(--line); }
  .history-buttons, .search-key, .library-sidebar, .now-panel, .header-actions .text-button { display: none; }
  .global-search { grid-column: 2; }
  .global-search input { height: 39px; padding-right: 15px; }
  .header-actions { grid-column: 3; }
  .account-avatar-button { width: 39px; height: 39px; padding: 3px; }
  .account-avatar-button > .avatar-fallback, .account-avatar-image { width: 33px; height: 33px; }
  .account-tooltip { display: none; }
  .main-view { grid-column: 1; grid-row: 2; border-radius: 0; }
  .main-inner { padding: 20px 16px 38px; }
  .player-bar { grid-column: 1; grid-row: 3; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin: 0 8px 2px; padding: 7px; border-radius: 7px; background: #252828; }
  .player-track { grid-template-columns: 48px minmax(0, 1fr) 36px; gap: 9px; }
  .player-track img, .player-cover-placeholder { width: 48px; height: 48px; }
  .player-center { display: block; }
  .player-controls .icon-button, .player-controls #shuffleButton, .player-controls #previousButton, .player-controls #repeatButton { display: none; }
  .player-controls { gap: 2px; }
  .play-button { width: 36px; height: 36px; background: transparent; color: var(--text); }
  .timeline, .player-extras { display: none; }
  .mobile-nav { grid-column: 1; grid-row: 4; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: var(--page); }
  .mobile-nav button { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); font-size: 10px; }
  .mobile-nav button i { font-size: 23px; }
  .mobile-nav button.active { color: var(--text); }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-card { grid-template-columns: 52px minmax(0, 1fr); }
  .quick-card img { width: 52px; height: 52px; }
  .card-scroller { grid-auto-columns: 154px; }
  .hero-detail { grid-template-columns: 132px minmax(0, 1fr); gap: 16px; min-height: 220px; padding: 26px 16px 18px; }
  .hero-cover { width: 132px; height: 132px; }
  .hero-copy h1 { font-size: clamp(30px, 9vw, 48px); }
  .hero-detail.artist-hero { min-height: 300px; }
  .artist-hero .hero-copy h1 { font-size: 50px; }
  .detail-body { padding: 16px 12px 40px; }
  .album-cell, .track-table th:nth-child(3) { display: none; }
  .track-table th:last-child, .track-table td:last-child { width: 80px; }
  .top-results { grid-template-columns: 1fr; }
  .profile-hero { grid-template-columns: 132px minmax(0, 1fr); gap: 16px; min-height: 210px; padding: 24px 16px 18px; }
  .profile-avatar-button { width: 132px; height: 132px; }
  .profile-avatar { font-size: 46px; }
  .profile-hero-copy h1 { font-size: clamp(38px, 10vw, 58px); }
}

@media (max-width: 520px) {
  .auth-view { padding: 28px 20px 56px; }
  .auth-heading { font-size: 36px; }
  .auth-switch { margin-top: 54px; }
  .gender-options { grid-template-columns: 1fr; gap: 12px; }
  .date-fields { grid-template-columns: 64px minmax(110px, 1fr) 80px; gap: 7px; }
  .otp-grid { gap: 6px; }
  .global-search input::placeholder { color: transparent; }
  .main-inner { padding-inline: 12px; }
  .quick-card strong { font-size: 12px; }
  .hero-detail { grid-template-columns: 1fr; justify-items: center; align-items: end; padding-top: 20px; }
  .hero-copy { width: 100%; }
  .hero-cover { width: 180px; height: 180px; }
  .hero-copy .description { display: none; }
  .artist-hero { justify-items: start; }
  .track-table th:first-child, .track-table td:first-child { width: 30px; }
  .track-table td { padding-inline: 5px; }
  .track-title-cell { grid-template-columns: 40px minmax(0, 1fr); gap: 8px; }
  .track-title-cell img { width: 40px; height: 40px; }
  .profile-editor { grid-template-columns: 108px minmax(0, 1fr); gap: 16px; }
  .profile-photo-picker { width: 108px; height: 108px; }
  .profile-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .modal::backdrop { backdrop-filter: none; }
}
