:root {
  --accent: #e0223f;
  --bg: #0c090f;
  --bg2: #110d14;
  --panel: #17121b;
  --panel2: #201922;
  --line: rgba(236, 229, 217, .08);
  --text: #ece5d9;
  --muted: #a39aa6;
  --dim: #6f6573;
  --radius: 4px;
  --sidebar: 268px;
  --right: 340px;
  --bar: 92px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --display: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --gothic: "Pirata One", Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); overflow: hidden; -webkit-font-smoothing: antialiased; user-select: none; opacity: 0; transition: opacity .25s; }
body.ready { opacity: 1; }
input, textarea, select, button { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; color: var(--text); }
.warn-text { color: #ffb347; }
[hidden] { display: none !important; }
kbd { font: 600 11px var(--font); padding: 2px 7px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); border-bottom-width: 2px; color: var(--text); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.22); }
::-webkit-scrollbar-track { background: transparent; }
.ic { flex: none; display: block; }

/* ---------- Layout ---------- */
#app { display: grid; height: 100vh; grid-template-columns: var(--sidebar) 1fr 0; grid-template-rows: 1fr var(--bar); gap: 8px; padding: 8px; transition: grid-template-columns .3s cubic-bezier(.2,.8,.2,1); }
body.panel-open #app { grid-template-columns: var(--sidebar) 1fr var(--right); }
#sidebar, #main, #rightpanel { background: var(--bg2); border-radius: var(--radius); min-height: 0; overflow: hidden; }
#sidebar { display: flex; flex-direction: column; padding: 14px 10px 10px; }
#main { position: relative; display: flex; flex-direction: column; background:
  radial-gradient(1200px 380px at 30% -120px, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), var(--bg2); transition: background .8s; }
#rightpanel { display: flex; flex-direction: column; }
body:not(.panel-open) #rightpanel { visibility: hidden; }
#playerbar { grid-column: 1 / -1; }

/* ---------- Sidebar ---------- */
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; text-decoration: none !important; }
.brand img { border-radius: 9px; box-shadow: 0 4px 18px color-mix(in srgb, var(--accent) 40%, transparent); }
.brand span { font: 700 19px var(--display); letter-spacing: -.02em; }
.brand b { font-weight: 300; margin-left: 4px; color: var(--muted); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav.bottom { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.side-link { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; text-decoration: none !important; transition: color .15s, background .15s; }
.side-link:hover { color: var(--text); background: rgba(255,255,255,.04); }
.side-link.active { color: var(--text); background: rgba(255,255,255,.07); }
.side-nav .side-link.active .ic { color: var(--accent); }
.side-lib { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 10px; }
.side-lib-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; color: var(--muted); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
#side-playlists { overflow-y: auto; flex: 1; padding-right: 2px; }
.side-pl { display: flex; align-items: center; gap: 12px; padding: 6px 8px; font-weight: 400; }
.side-pl > div:last-child { min-width: 0; display: flex; flex-direction: column; }
.side-pl b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-pl span { font-size: 12.5px; color: var(--muted); }
.update-badge { display: flex; gap: 8px; align-items: center; margin: 0 4px 6px; padding: 9px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); font-weight: 600; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 40%, transparent); } }
#account { padding: 8px 4px 0; }
.acct { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 10px; text-align: left; }
.acct:hover { background: rgba(255,255,255,.05); }
.acct span { display: flex; flex-direction: column; min-width: 0; }
.acct b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct small { color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--panel2); }
.avatar.lg { width: 64px; height: 64px; }

/* ---------- Topbar ---------- */
#topbar { display: flex; align-items: center; gap: 12px; padding: 14px 22px 10px; position: relative; z-index: 3; }
.nav-btns { display: flex; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); transition: color .15s, background .15s, transform .1s; }
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,.07); }
.icon-btn:active { transform: scale(.92); }
.icon-btn:disabled { opacity: .35; pointer-events: none; }
.icon-btn.round { background: rgba(0,0,0,.35); color: var(--text); }
.icon-btn.lg { width: 48px; height: 48px; }
.icon-btn.on { color: var(--accent); position: relative; }
.icon-btn.on::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.like.on { color: var(--accent); }
.like.on::after { display: none; }
.search-box { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 44px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid transparent; color: var(--muted); transition: background .15s, border-color .15s; }
.search-box:focus-within { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: var(--text); }
.search-box input { flex: 1; background: none; border: 0; outline: 0; font-size: 14.5px; }
.kbd-hint { font-size: 12px; color: var(--dim); border: 1px solid var(--line); padding: 4px 9px; border-radius: 8px; }
.kbd-hint:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.top-right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
#scan-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.reconnect { display: flex; gap: 12px; align-items: center; margin: 0 22px 8px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.reconnect span { flex: 1; }

/* ---------- View ---------- */
#view { flex: 1; overflow-y: auto; padding: 0 22px 40px; scroll-behavior: smooth; }
#view.fade-in { animation: fadeUp .35s cubic-bezier(.2,.8,.2,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Art ---------- */
.art { flex: none; background: var(--panel2) center/cover no-repeat; border-radius: 8px; position: relative; overflow: hidden; }
.art.xs { width: 44px; height: 44px; border-radius: 7px; }
.art.sm { width: 42px; height: 42px; border-radius: 6px; }
.art.lg { width: 96px; height: 96px; }
.art.xl { width: 232px; height: 232px; border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.art.round { border-radius: 50%; }
.art.ghost { display: grid; place-items: center; color: var(--dim); background: var(--panel); }
.art.mosaic { display: grid; grid-template-columns: 1fr 1fr; }
.art.mosaic i { background: center/cover; }
.art.letter { display: grid; place-items: center; }
.art.letter span { font: 800 2.2em var(--display); color: rgba(255,255,255,.9); text-transform: uppercase; }
.art.xs.letter span { font-size: 18px; }
.art.xl.letter span { font-size: 96px; }
.liked-art { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #4b2bff, #c58cff 70%, #ffd0f0); }
.smart-art { display: grid; place-items: center; color: #fff; }
.s-recent { background: linear-gradient(135deg, #0f8b8d, #34e1c0); }
.s-top { background: linear-gradient(135deg, #ff3d3d, #ff9a3d); }
.s-forgotten { background: linear-gradient(135deg, #7a2cff, #ff5ccf); }
.s-fresh { background: linear-gradient(135deg, #2a3c8c, #66a6ff); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; height: 40px; border-radius: 999px; font-weight: 700; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); transition: transform .1s, background .15s, filter .15s; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: rgba(255,255,255,.14); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: transparent; color: #0b0b0f; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { background: #e5484d; border-color: transparent; color: #fff; }
.btn.ghost { background: transparent; }
.btn.lg { height: 50px; padding: 0 26px; font-size: 15px; }
.btn.sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.link-btn { color: var(--muted); font-weight: 600; font-size: 13px; }
.link-btn:hover { color: var(--text); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 12.5px; font-weight: 600; color: var(--text); border: 1px solid transparent; }
.chip:hover { background: rgba(255,255,255,.12); }
.chip.on { background: var(--accent); color: #0b0b0f; }
.chip.icon-only { padding: 6px 8px; }
.chip:disabled { opacity: .45; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 11.5px; font-weight: 600; color: var(--muted); }
.big-play { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #0b0b0f; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); transition: transform .15s, filter .15s; }
.big-play:hover { transform: scale(1.06); filter: brightness(1.08); }
.input { width: 100%; padding: 11px 14px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid var(--line); outline: 0; user-select: text; }
.input:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: rgba(255,255,255,.08); }
textarea.input { resize: vertical; font-family: var(--font); line-height: 1.6; }
.select { width: auto; padding: 8px 12px; }
.select option { background: var(--panel2); }

/* ---------- Home ---------- */
.home-hero { padding: 10px 0 8px; }
.home-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 18px; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.quick-tile { display: flex; align-items: center; gap: 14px; height: 64px; padding-right: 12px; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.07); text-align: left; font-weight: 700; transition: background .2s; position: relative; }
.quick-tile:hover { background: rgba(255,255,255,.13); }
.quick-tile .art { width: 64px; height: 64px; border-radius: 0; display: grid; place-items: center; }
.quick-tile > span:not(.qt-play) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt-play { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #0b0b0f; opacity: 0; transform: translateY(4px); transition: .2s; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.quick-tile:hover .qt-play { opacity: 1; transform: none; }
.shelf { margin-top: 32px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.shelf-head h2, .sec-title { font-size: 22px; font-weight: 800; }
.more-link { color: var(--muted); font-weight: 700; font-size: 13px; }
.cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 190px); gap: 14px; overflow-x: auto; padding: 4px 4px 12px; margin: 0 -4px; scroll-snap-type: x proximity; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.card { position: relative; padding: 12px; border-radius: 12px; cursor: pointer; transition: background .2s; scroll-snap-align: start; }
.card:hover { background: rgba(255,255,255,.06); }
.card .art { width: 100%; aspect-ratio: 1; height: auto; box-shadow: 0 10px 28px rgba(0,0,0,.45); margin-bottom: 12px; }
.card .art.xs { width: 100%; }
.card-t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-s { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-play { position: absolute; right: 20px; top: calc(100% - 108px); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #0b0b0f; box-shadow: 0 8px 22px rgba(0,0,0,.5); opacity: 0; transform: translateY(8px); transition: .22s cubic-bezier(.2,.8,.2,1); }
.card:hover .card-play { opacity: 1; transform: none; }
.card-play:hover { transform: scale(1.07) !important; }
.mix-art { display: flex; align-items: flex-end; }
.mix-band { position: absolute; left: 0; right: 0; bottom: 0; height: 32%; opacity: .92; mix-blend-mode: hard-light; }
.mix-label { position: relative; padding: 10px 12px; font: 700 15px/1.1 var(--display); color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.mix-label b { font-size: 22px; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 36px; padding: 18px; border-radius: 16px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 18%, var(--panel)), var(--panel)); border: 1px solid var(--line); cursor: pointer; }
.stats div { display: flex; flex-direction: column; }
.stats b { font: 800 28px var(--display); }
.stats span { color: var(--muted); font-size: 12.5px; }
.mini-list .tracks .row.head { display: none; }
.mini-list .tracks { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; gap: 28px; margin: -14px -22px 0; padding: 70px 30px 26px; background: linear-gradient(180deg, color-mix(in srgb, var(--tint, #444) 70%, transparent), color-mix(in srgb, var(--tint, #444) 18%, transparent)); transition: background .6s; }
.page-head.simple { display: block; background: none; padding: 16px 0 10px; margin: 0; }
.page-head.simple h1 { font-size: 34px; font-weight: 800; }
.page-head.simple p { max-width: 720px; }
.ph-meta { min-width: 0; }
.kicker { font-size: 12.5px; font-weight: 700; }
.ph-meta h1 { font-size: clamp(36px, 6vw, 84px); font-weight: 900; line-height: 1; margin: 8px 0 14px; letter-spacing: -.035em; word-break: break-word; }
.ph-meta h1.long { font-size: clamp(30px, 4vw, 54px); }
.desc { color: rgba(255,255,255,.75); margin: 0 0 8px; }
.meta { margin: 0; color: rgba(255,255,255,.85); font-size: 13.5px; }
.actions { display: flex; align-items: center; gap: 14px; padding: 22px 0 16px; }
.sort { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- Track table ---------- */
.tracks { --cols: 44px minmax(220px, 4fr) minmax(140px, 3fr) 44px 64px 40px; }
.row { display: grid; grid-template-columns: var(--cols); align-items: center; gap: 12px; min-height: 56px; padding: 0 12px; border-radius: 8px; transition: background .12s; }
.tracks:has(.row.head > :nth-child(6):last-child) { }
.row:not(.head):hover { background: rgba(255,255,255,.06); }
.row.sel { background: rgba(255,255,255,.1); }
.row.head { min-height: 36px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 8px; position: sticky; top: -1px; background: var(--bg2); z-index: 1; }
.tracks:not(:has(.c-album)) { --cols: 44px minmax(220px, 1fr) 44px 64px 40px; }
.c-num { position: relative; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; display: grid; justify-items: end; }
.c-num > * { grid-area: 1 / 1; }
.row-play { color: var(--text); opacity: 0; }
.row:hover .row-play { opacity: 1; }
.row:hover .n { opacity: 0; }
.row.playing .n { opacity: 0; }
.row.playing .t { color: var(--accent); }
.eqbars { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.eqbars i { width: 3px; background: var(--accent); border-radius: 2px; animation: eqb .9s ease-in-out infinite; }
.eqbars i:nth-child(2) { animation-delay: -.3s; } .eqbars i:nth-child(3) { animation-delay: -.6s; }
@keyframes eqb { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.row.playing .eqbars { display: flex; }
.row.playing:hover .eqbars, body:not(.is-playing) .row.playing .eqbars i { animation-play-state: paused; }
.row.playing:hover .eqbars { display: none; }
.eqbars.on { display: flex; position: absolute; inset: 0; justify-content: center; align-items: center; background: rgba(0,0,0,.45); }
.c-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tt { min-width: 0; }
.t { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a, .c-album { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row:hover .a a, .row:hover .c-album a { color: var(--text); }
.c-like .like { opacity: 0; }
.row:hover .c-like .like, .c-like .like.on { opacity: 1; }
.c-dur { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.c-more .more { opacity: 0; }
.row:hover .more { opacity: 1; }
.row.missing { opacity: .5; }
.row.missing:hover { opacity: .8; }
.row.dragging { opacity: .35; }
.row.drop { box-shadow: inset 0 2px 0 var(--accent); }
.empty-mini { text-align: center; padding: 60px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-mini h3 { color: var(--text); font-size: 22px; }
.empty-hero { max-width: 640px; margin: 60px auto; text-align: center; }
.empty-hero img { border-radius: 22px; box-shadow: 0 20px 60px color-mix(in srgb, var(--accent) 35%, transparent); }
.empty-hero h1 { font-size: 40px; font-weight: 900; margin: 20px 0 10px; }
.empty-hero p { color: var(--muted); font-size: 16px; }
.empty-hero .btn-row { justify-content: center; margin: 24px 0; }
.empty-hero a { color: var(--accent); }

/* ---------- Search / browse ---------- */
.search-top { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 24px; padding-top: 8px; }
.search-top h2 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.top-result { position: relative; padding: 20px; border-radius: 12px; background: rgba(255,255,255,.05); cursor: pointer; transition: background .2s; }
.top-result:hover { background: rgba(255,255,255,.1); }
.top-result h3 { font-size: 30px; font-weight: 800; margin: 18px 0 4px; }
.top-result .big-play { position: absolute; right: 20px; bottom: 20px; opacity: 0; transform: translateY(8px); transition: .2s; }
.top-result:hover .big-play { opacity: 1; transform: none; }
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.genre { position: relative; height: 120px; border-radius: 12px; overflow: hidden; text-align: left; padding: 14px; display: flex; flex-direction: column; }
.genre span { font: 800 22px var(--display); position: relative; z-index: 1; }
.genre small { opacity: .8; position: relative; z-index: 1; }
.genre i { position: absolute; width: 90px; height: 90px; right: -14px; bottom: -8px; transform: rotate(24deg); border-radius: 6px; background: center/cover; box-shadow: 0 6px 18px rgba(0,0,0,.4); transition: transform .3s; }
.genre:hover i { transform: rotate(16deg) scale(1.06); }

/* ---------- Right panel ---------- */
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 6px 16px; }
.panel-tabs { display: flex; gap: 6px; }
.panel-tab { padding: 6px 14px; border-radius: 999px; font-weight: 700; color: var(--muted); background: rgba(255,255,255,.05); }
.panel-tab.on { color: #0b0b0f; background: var(--text); }
.panel-body { flex: 1; overflow-y: auto; padding: 6px 12px 16px; min-height: 0; }
.panel-body h3 { font-size: 15px; margin: 10px 6px 8px; }
.q-head { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-right: 6px; }
.q-row { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.q-row:hover { background: rgba(255,255,255,.06); }
.q-row.now .t { color: var(--accent); }
.q-row .tt { flex: 1; }
.q-rm { width: 28px; height: 28px; opacity: 0; }
.q-row:hover .q-rm { opacity: 1; }

/* ---------- Lyrics ---------- */
.lyrics { display: flex; flex-direction: column; min-height: 0; }
.lyrics.small { height: 100%; }
.lyr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 4px 4px 10px; }
.lyr-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--muted); }
.badge.ok { background: color-mix(in srgb, #3ddc84 20%, transparent); color: #7ff0b0; }
.badge.warn { background: color-mix(in srgb, #ffb347 20%, transparent); color: #ffd08a; }
.lyr-lines { flex: 1; overflow-y: auto; padding: 0 6px; scroll-behavior: smooth; mask-image: linear-gradient(transparent, #000 8%, #000 88%, transparent); }
.lyr-pad { height: 45%; }
.ln { margin: 0; padding: 7px 4px; font: 700 20px/1.35 var(--display); color: rgba(255,255,255,.38); cursor: pointer; transition: color .3s, transform .3s, opacity .3s; transform-origin: left center; border-radius: 8px; }
.ln:hover { color: rgba(255,255,255,.7); }
.ln.past { color: rgba(255,255,255,.55); }
.ln.active { color: #fff; transform: scale(1.03); }
.lyr-lines:not(.est) .ln.active { background: linear-gradient(90deg, #fff calc(var(--p, 0) * 100%), rgba(255,255,255,.5) calc(var(--p, 0) * 100% + 6%)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ln.gap { font-size: 16px; }
.big .ln { font-size: clamp(24px, 2.6vw, 38px); padding: 10px 6px; }
.blank { display: inline-block; min-width: 3ch; color: var(--accent); letter-spacing: .08em; -webkit-text-fill-color: var(--accent); }
.gw.hit { color: #3ddc84; -webkit-text-fill-color: #3ddc84; }
.gw.miss { color: #ff6b6b; -webkit-text-fill-color: #ff6b6b; text-decoration: line-through wavy; }
.guess-bar { padding: 10px 4px 2px; display: grid; gap: 8px; }
.guess-score { font-size: 13px; color: var(--muted); }
.guess-score b { color: var(--accent); font-size: 18px; }
.lyr-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 30px; color: var(--muted); min-height: 220px; }
.sync-help { color: var(--muted); font-size: 13px; padding: 0 4px 8px; }
.stamp { display: inline-block; width: 46px; font: 600 12px var(--font); color: var(--accent); }
.tap-btn { margin: 10px auto 4px; display: flex; gap: 10px; align-items: center; padding: 14px 40px; border-radius: 999px; background: var(--accent); color: #0b0b0f; font-weight: 800; font-size: 16px; }
.tap-btn:active { transform: scale(.95); }
.spinner { width: 26px; height: 26px; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Player bar ---------- */
#playerbar { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(320px, 1.4fr) minmax(200px, 1fr); align-items: center; gap: 16px; padding: 0 10px; border-radius: var(--radius); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, var(--bg)), var(--bg) 40%); }
.pb-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pb-art { width: 62px; height: 62px; border-radius: 8px; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.5); transition: transform .2s; }
.pb-art:hover { transform: scale(1.05); }
.pb-art.empty { background-image: url(../img/logo.png); background-size: 60%; background-color: var(--panel); }
.pb-meta { min-width: 0; }
.pb-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.pb-artist { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.pb-title:hover, .pb-artist:hover { text-decoration: underline; color: var(--text); }
.pb-center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pb-controls { display: flex; align-items: center; gap: 14px; }
.play-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--text); color: #0b0b0f; display: grid; place-items: center; transition: transform .1s; }
.play-btn:hover { transform: scale(1.07); }
.play-btn:active { transform: scale(.95); }
.play-btn.big { width: 66px; height: 66px; }
.pb-progress { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 640px; }
.time { font-size: 11.5px; color: var(--muted); min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.pb-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
#mini-exit { display: none; }
.range { -webkit-appearance: none; appearance: none; flex: 1; height: 4px; border-radius: 4px; outline: 0; cursor: pointer; background: linear-gradient(90deg, var(--text) var(--v, 0%), rgba(255,255,255,.18) var(--v, 0%)); }
.range:hover { background: linear-gradient(90deg, var(--accent) var(--v, 0%), rgba(255,255,255,.18) var(--v, 0%)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .15s; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.range:hover::-webkit-slider-thumb, .range:active::-webkit-slider-thumb { opacity: 1; }
.range.vol { flex: none; width: 100px; }

/* ---------- Now Playing ---------- */
#nowplaying { position: fixed; inset: 0; z-index: 50; background: #050507; transform: translateY(100%); transition: transform .5s cubic-bezier(.2,.8,.2,1); overflow: hidden; }
#nowplaying.open { transform: none; }
#np-bg { position: absolute; inset: -20%; background: center/cover; filter: blur(70px) saturate(1.6) brightness(.45); transform: scale(1.1); animation: drift 30s ease-in-out infinite alternate; }
#np-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 40%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%), linear-gradient(transparent 50%, rgba(0,0,0,.6)); }
@keyframes drift { to { transform: scale(1.25) rotate(4deg); } }
#np-close { position: absolute; top: 18px; left: 18px; z-index: 2; }
.np-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(320px, 520px) minmax(0, 1fr); gap: 6vw; height: 100%; padding: 6vh 6vw 14vh; align-items: center; }
.np-left { display: flex; flex-direction: column; gap: 18px; }
.np-art { width: 100%; aspect-ratio: 1; height: auto; border-radius: 16px; transition: transform .08s linear; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.np-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.np-meta h1 { font-size: 30px; font-weight: 900; }
.np-meta p { margin: 2px 0 0; font-size: 17px; color: rgba(255,255,255,.75); }
.np-meta .muted { font-size: 14px; }
.pb-progress.big { max-width: none; }
.pb-controls.big { justify-content: center; gap: 26px; }
.np-right { height: 76vh; }
#np-viz { position: absolute; left: 0; right: 0; bottom: 0; height: 13vh; width: 100%; z-index: 0; opacity: .85; pointer-events: none; }

/* ---------- Mini player ---------- */
body.mini #app { grid-template-columns: 1fr; grid-template-rows: 1fr; padding: 0; gap: 0; }
body.mini #sidebar, body.mini #main, body.mini #rightpanel { display: none; }
body.mini #playerbar { grid-template-columns: auto 1fr; grid-template-rows: auto auto; border-radius: 0; height: 100vh; padding: 12px 14px; gap: 6px 14px; -webkit-app-region: drag; background: radial-gradient(circle at 0 0, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%), var(--bg); }
body.mini .pb-left { grid-column: 1 / -1; }
body.mini .pb-art { width: 74px; height: 74px; }
body.mini .pb-center { grid-column: 1 / -1; flex-direction: row-reverse; gap: 12px; }
body.mini .pb-controls { gap: 6px; }
body.mini .pb-controls .js-shuffle, body.mini .pb-controls .js-repeat { display: none; }
body.mini .pb-right { position: absolute; top: 10px; right: 10px; }
body.mini .pb-right > :not(#mini-exit):not(#pb-like) { display: none; }
body.mini #mini-exit { display: grid; }
body.mini button, body.mini input, body.mini .pb-title { -webkit-app-region: no-drag; }

/* ---------- Import ---------- */
.import-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 18px; }
.import-card { padding: 22px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.import-card h3 { font-size: 20px; }
.import-card ol { margin: 0; padding-left: 18px; color: var(--muted); flex: 1; }
.import-card li { margin: 5px 0; }
.import-card a { color: var(--accent); }
.import-card .btn { align-self: flex-start; }
.brandmark { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.spotify .brandmark { background: linear-gradient(135deg, #1db954, #12823b); }
.apple .brandmark { background: linear-gradient(135deg, #fa2d48, #a8178a); }
.paste .brandmark { background: linear-gradient(135deg, #6c7bff, #3a2b8f); }
.imp-list { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.imp-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.imp-name { flex: 1; min-width: 200px; font-weight: 700; }
.meter { width: 120px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; }
.meter div { height: 100%; background: var(--accent); }
.imp-list summary { cursor: pointer; color: var(--muted); margin-top: 10px; font-weight: 600; }
.imp-rows { max-height: 320px; overflow-y: auto; margin-top: 8px; }
.imp-row { display: grid; grid-template-columns: 10px 2fr 1.5fr 110px 50px; gap: 10px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.imp-row .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; }
.imp-row.miss .dot { background: #6c6a7a; }
.imp-row.miss { color: var(--muted); }
.imp-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.check input { display: none; }
.check span { display: inline-block; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--muted); vertical-align: middle; cursor: pointer; }
.check input:checked + span { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0b0f' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat; border-color: var(--accent); }

/* ---------- Settings & stats ---------- */
.set-sec { max-width: 860px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.set-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 10px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0; }
.acct-row { display: flex; align-items: center; gap: 16px; }
.acct-row > div { flex: 1; }
.folders { display: grid; gap: 6px; margin: 10px 0; }
.folder { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 14px; border-radius: 10px; background: var(--panel); }
.folder span { display: flex; gap: 10px; align-items: center; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.18); transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.swatches { display: flex; gap: 8px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--bg); }
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 20px; }
.keys div { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.panel-card { padding: 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.panel-card h2 { font-size: 18px; margin-bottom: 12px; }
.bar-row { display: grid; grid-template-columns: 22px 140px 1fr 70px; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.bar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.bar { height: 8px; border-radius: 8px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar div { height: 100%; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #fff)); border-radius: 8px; }
.rank { color: var(--muted); font-weight: 700; }
.quiz-big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quiz-big div { display: flex; flex-direction: column; }
.quiz-big b { font: 900 34px var(--display); color: var(--accent); }
.quiz-big span { color: var(--muted); font-size: 12.5px; }

/* ---------- Equalizer ---------- */
.eq { display: flex; justify-content: space-around; padding: 20px 0 16px; }
.eq-band { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.eq-band input { writing-mode: vertical-lr; direction: rtl; width: 6px; height: 160px; accent-color: var(--accent); }
.eq-val { font-weight: 700; font-size: 12.5px; color: var(--accent); min-height: 18px; }
.eq-band label { color: var(--muted); font-size: 12px; }

/* ---------- Overlays ---------- */
#modal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); }
#modal.open { display: grid; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: min(520px, calc(100vw - 32px)); max-height: 86vh; display: flex; flex-direction: column; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 90px rgba(0,0,0,.6); animation: pop .25s cubic-bezier(.2,.8,.2,1); }
.modal-card.wide { width: min(720px, calc(100vw - 32px)); }
@keyframes pop { from { transform: scale(.96) translateY(8px); opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 8px 22px; }
.modal-head h2 { font-size: 20px; }
.modal-body { padding: 8px 22px 22px; overflow-y: auto; display: grid; gap: 12px; user-select: text; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.add-results { max-height: 52vh; overflow-y: auto; }
.add-row { display: flex; align-items: center; gap: 12px; padding: 6px 4px; }
.add-row .tt { flex: 1; }
.update-card { display: flex; gap: 16px; align-items: center; }
.update-card img { border-radius: 14px; }
.notes { white-space: pre-wrap; max-height: 200px; overflow-y: auto; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.04); color: var(--muted); font-size: 13px; }
.progress { height: 6px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
#ctxmenu { position: fixed; z-index: 90; display: none; min-width: 220px; max-width: 300px; padding: 6px; border-radius: 12px; background: #22222d; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 18px 50px rgba(0,0,0,.55); }
#ctxmenu.open { display: block; animation: pop .14s; }
.ctx-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 8px; text-align: left; font-weight: 500; }
.ctx-item span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-item:hover { background: rgba(255,255,255,.08); }
.ctx-item.danger { color: #ff7b7b; }
.ic-sp { width: 16px; }
#ctxmenu .sep { height: 1px; margin: 5px 6px; background: var(--line); }
#palette { position: fixed; inset: 0; z-index: 85; display: none; justify-content: center; align-items: flex-start; padding-top: 12vh; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); }
#palette.open { display: flex; }
.pal-card { width: min(640px, calc(100vw - 32px)); border-radius: 18px; background: var(--panel); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 90px rgba(0,0,0,.6); overflow: hidden; animation: pop .18s; }
.pal-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal-input input { flex: 1; background: none; border: 0; outline: 0; font-size: 17px; color: var(--text); }
.pal-list { max-height: 56vh; overflow-y: auto; padding: 6px; }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 10px; text-align: left; }
.pal-item .tt { flex: 1; }
.pal-item.sel, .pal-item:hover { background: rgba(255,255,255,.08); }
.pal-ic { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.06); color: var(--accent); }
.pal-foot { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.pal-empty { padding: 20px; text-align: center; }
#toast { position: fixed; left: 50%; bottom: calc(var(--bar) + 30px); transform: translate(-50%, 20px); z-index: 95; padding: 11px 18px; border-radius: 12px; background: #fff; color: #0b0b0f; font-weight: 600; box-shadow: 0 12px 40px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: .25s cubic-bezier(.2,.8,.2,1); max-width: min(560px, calc(100vw - 32px)); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Smaller windows / phones (web player) ---------- */
@media (max-width: 1100px) {
  body.panel-open #app { grid-template-columns: var(--sidebar) 1fr; }
  #rightpanel { position: fixed; right: 8px; top: 8px; bottom: calc(var(--bar) + 16px); width: min(var(--right), calc(100vw - 16px)); z-index: 30; box-shadow: -10px 0 40px rgba(0,0,0,.5); }
  .c-album { display: none; }
  .tracks { --cols: 40px minmax(160px, 1fr) 44px 60px 40px !important; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .two-col, .search-top { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --bar: 132px; }
  #app, body.panel-open #app { grid-template-columns: 1fr; grid-template-rows: 1fr var(--bar); padding: 0; gap: 0; }
  #sidebar { display: none; }
  #main { border-radius: 0; }
  #view { padding: 0 16px 30px; }
  #topbar { padding: 12px 16px 8px; }
  .kbd-hint, .nav-btns { display: none; }
  #playerbar { grid-template-columns: 1fr; border-radius: 0; padding: 8px 16px 12px; gap: 6px; }
  .pb-right { display: none; }
  .page-head { flex-direction: column; align-items: flex-start; padding: 50px 16px 20px; margin: -12px -16px 0; }
  .art.xl { width: 160px; height: 160px; }
  .mini-list .tracks { grid-template-columns: 1fr; }
  .np-grid { grid-template-columns: 1fr; overflow-y: auto; padding: 60px 16px 120px; }
  .np-right { height: 60vh; }
  .quick { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .c-dur, .row.head { display: none; }
  .tracks { --cols: 30px minmax(0, 1fr) 40px 36px !important; }
  .tracks .c-dur { display: none; }
}

/* ---------- Community, uploads, admin ---------- */
.s-community { background: linear-gradient(135deg, #e0223f, #3a0d1f); }
.upload-form { max-width: 860px; display: grid; gap: 16px; }
.up-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px; border-radius: 16px; border: 2px dashed rgba(255,255,255,.15); background: rgba(255,255,255,.03); text-align: center; color: var(--muted); }
.up-drop b { color: var(--text); font-size: 16px; }
.up-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.up-grid label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
.up-file { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); flex-wrap: wrap; }
.up-file span { flex: 1; min-width: 120px; }
.upload-form details summary { cursor: pointer; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.rights { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.rights input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; }
.up-list { display: grid; gap: 6px; max-width: 860px; }
.up-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--panel); }
.up-row .tt { flex: 1; }
.adm-list { display: grid; gap: 12px; margin-top: 16px; max-width: 900px; }
.adm-card { padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 10px; }
.adm-head { display: flex; gap: 14px; align-items: center; }
.adm-cover { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; display: grid; place-items: center; background: var(--panel2); color: var(--muted); flex: none; }
.adm-card audio { width: 100%; }
.adm-lyrics { white-space: pre-wrap; max-height: 260px; overflow-y: auto; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.04); font: 13px/1.5 var(--font); color: var(--muted); user-select: text; }
#menu-btn { display: none; }
@media (max-width: 760px) {
  #menu-btn { display: inline-grid; }
  body.menu-open #sidebar { display: flex; position: fixed; inset: 0 25% 0 0; z-index: 60; border-radius: 0; box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  .up-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Onslaught identity: gothic headings, blood & bone, hard edges.
   (Overrides the base layout above.)
   ===================================================================== */
body { background: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(196, 23, 58, .16), transparent 70%), var(--bg); }
h1, .shelf-head h2, .sec-title, .set-sec h2, .panel-card h2, .search-top h2, .modal-head h2 { font-family: var(--gothic); font-weight: 400; letter-spacing: .01em; }
.shelf-head h2, .sec-title { font-size: 30px; }
.shelf-head { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.more-link { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--accent); }

/* Frame: one continuous surface with hairline dividers instead of floating rounded cards */
#app { gap: 0; padding: 0; }
#sidebar, #main, #rightpanel { border-radius: 0; }
#sidebar { background: #0e0a11; border-right: 1px solid var(--line); }
#rightpanel { background: #0e0a11; border-left: 1px solid var(--line); }
#main { background: transparent; }
.brand span { font: 400 26px var(--gothic); letter-spacing: .02em; text-shadow: 0 0 18px rgba(196, 23, 58, .55); }
.brand b { font-weight: 400; color: var(--accent); margin-left: 6px; }
.brand img { border-radius: 4px; box-shadow: 0 0 22px rgba(196, 23, 58, .45); }
.side-link { border-radius: 0; border-left: 2px solid transparent; padding-left: 14px; }
.side-link.active { background: linear-gradient(90deg, rgba(196, 23, 58, .18), transparent); border-left-color: var(--accent); }
.side-lib-head { letter-spacing: .18em; font-size: 11px; }
.side-pl .art { border-radius: 2px; }

/* Controls: hard edges, outlined */
.btn { border-radius: 2px; text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; font-weight: 700; border: 1px solid rgba(236, 229, 217, .16); background: rgba(236, 229, 217, .04); }
.btn:hover { border-color: var(--accent); background: rgba(196, 23, 58, .12); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 22px rgba(196, 23, 58, .35); }
.btn.lg { height: 48px; }
.chip, .pill, .badge, .panel-tab, .kbd-hint { border-radius: 2px; }
.chip.on, .panel-tab.on { background: var(--accent); color: #fff; }
.icon-btn { border-radius: 2px; }
.icon-btn.round { border-radius: 2px; background: rgba(12, 9, 15, .7); border: 1px solid var(--line); }
.search-box { border-radius: 2px; background: rgba(236, 229, 217, .04); border: 1px solid var(--line); height: 40px; }
.search-box:focus-within { border-color: var(--accent); background: rgba(196, 23, 58, .06); }
.input { border-radius: 2px; }
.switch span, .switch span::after { border-radius: 2px; }
.art { border-radius: 2px; }
.art.round { border-radius: 50%; }
.art.xl { border-radius: 2px; box-shadow: 0 0 0 1px rgba(236, 229, 217, .1), 0 24px 60px rgba(0, 0, 0, .6); }

/* Play buttons: a red diamond, not a green-style circle */
.big-play, .card-play, .qt-play { border-radius: 3px; transform: rotate(45deg); background: var(--accent); color: #fff; box-shadow: 0 0 26px rgba(196, 23, 58, .5); }
.big-play > *, .card-play > *, .qt-play > * { transform: rotate(-45deg); }
.big-play { width: 50px; height: 50px; margin: 0 6px; }
.big-play:hover { transform: rotate(45deg) scale(1.07); }
.card-play { opacity: 0; transform: rotate(45deg) translateY(6px); }
.card:hover .card-play, .card-play:hover { opacity: 1; transform: rotate(45deg) !important; }
.top-result .big-play, .top-result:hover .big-play { transform: rotate(45deg); }
.play-btn { border-radius: 3px; transform: rotate(45deg); background: var(--text); width: 36px; height: 36px; }
.play-btn > * { transform: rotate(-45deg); }
.play-btn:hover { transform: rotate(45deg) scale(1.07); background: #fff; }
.play-btn:active { transform: rotate(45deg) scale(.95); }
.play-btn.big { width: 58px; height: 58px; background: var(--accent); color: #fff; box-shadow: 0 0 34px rgba(196, 23, 58, .55); }

/* Home hero */
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; padding-top: 6px; }
.hero-main { position: relative; display: flex; align-items: flex-end; gap: 26px; min-height: 280px; padding: 28px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(110deg, rgba(12, 9, 15, .96) 35%, rgba(12, 9, 15, .55)), var(--hero) center/cover, var(--panel); }
.hero-main::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 15% 100%, rgba(196, 23, 58, .35), transparent 55%); pointer-events: none; }
.hero-art { position: relative; width: 190px; height: 190px; flex: none; box-shadow: 0 0 0 1px rgba(236, 229, 217, .12), 0 20px 50px rgba(0, 0, 0, .6); }
.hero-text { position: relative; min-width: 0; }
.hero-text h1 { font-size: clamp(34px, 5.5cqi, 68px); line-height: 1; margin: 6px 0 8px; text-shadow: 0 0 30px rgba(196, 23, 58, .5); overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-text p { color: var(--muted); margin: 0 0 6px; }
.hero-side { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); background: var(--panel); }
.hero-side h3 { font: 400 22px var(--gothic); margin: 0 0 4px; }
.quick-tile { height: 46px; border-radius: 2px; background: transparent; border: 1px solid transparent; font-weight: 600; }
.quick-tile:hover { background: rgba(196, 23, 58, .1); border-color: rgba(196, 23, 58, .35); }
.quick-tile .art { width: 46px; height: 46px; }
.qt-play { width: 28px; height: 28px; margin-right: 6px; }
.quick-tile:hover .qt-play { transform: rotate(45deg); }

/* Cards: title sits on the artwork */
.card { padding: 0; border-radius: 2px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.card:hover { background: var(--panel2); border-color: rgba(196, 23, 58, .5); }
.card .art { margin: 0; border-radius: 0; box-shadow: none; transition: transform .4s; }
.card:hover .art { transform: scale(1.04); }
.card .art.round { border-radius: 0; }
.card-t, .card-s { padding: 0 12px; }
.card-t { padding-top: 10px; }
.card-s { padding-bottom: 12px; }
.card-play { right: 16px; top: auto; bottom: 64px; width: 40px; height: 40px; }
.mix-label b { display: block; font: 400 26px var(--gothic); color: #fff; }
.mix-band { height: 4px; top: 0; bottom: auto; mix-blend-mode: normal; opacity: 1; }
.stats { border-radius: 0; background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--accent); }
.stats b { font-family: var(--gothic); font-weight: 400; font-size: 36px; }

/* Page headers: framed art beside gothic title, no colour wash */
.page-head { margin: 0; padding: 30px 0 22px; background: none; border-bottom: 1px solid var(--line); align-items: center; }
.page-head .art.xl { width: 200px; height: 200px; }
.ph-meta h1 { font-family: var(--gothic); font-weight: 400; letter-spacing: .01em; text-shadow: 0 0 30px color-mix(in srgb, var(--tint, #c4173a) 60%, transparent); }
.kicker { text-transform: uppercase; letter-spacing: .2em; font-size: 11px; color: var(--accent); }
.page-head.simple h1 { font-size: 46px; font-weight: 400; }
.liked-art { background: radial-gradient(circle at 30% 30%, #ef5b74, #7d0e25 70%); color: #ece5d9; }

/* Track list: ledger style with a red marker on the playing row */
.row { border-radius: 0; border-left: 2px solid transparent; }
.row:not(.head):nth-child(even) { background: rgba(236, 229, 217, .015); }
.row:not(.head):hover { background: rgba(196, 23, 58, .08); }
.row.playing { border-left-color: var(--accent); background: rgba(196, 23, 58, .1) !important; }
.row.head { background: var(--bg); letter-spacing: .16em; font-size: 10.5px; }

/* Player: a slab with a full-width red progress line on top */
#playerbar { position: relative; border-radius: 0; background: #0e0a11; border-top: 1px solid var(--line); }
#playerbar .pb-progress:not(.big) { position: absolute; left: 0; right: 0; top: -1px; max-width: none; gap: 0; }
#playerbar .pb-progress:not(.big) .time { display: none; }
#playerbar .pb-progress:not(.big) .range { height: 3px; border-radius: 0; background: linear-gradient(90deg, var(--accent) var(--v, 0%), rgba(236, 229, 217, .08) var(--v, 0%)); }
.pb-center { justify-content: center; }
.pb-art { border-radius: 2px; }
.range { border-radius: 0; }
.range::-webkit-slider-thumb { border-radius: 1px; width: 10px; height: 14px; background: var(--text); }

/* Lyrics & Now Playing */
.ln { font-family: var(--display); font-weight: 600; }
.big .ln { font-family: var(--gothic); font-weight: 400; font-size: clamp(30px, 3.2vw, 48px); letter-spacing: .01em; }
.ln.active { text-shadow: 0 0 24px rgba(196, 23, 58, .55); }
#np-bg { filter: blur(80px) saturate(1.1) brightness(.35) sepia(.25) hue-rotate(-15deg); }
.np-art { border-radius: 2px; }
.np-meta h1 { font-family: var(--gothic); font-weight: 400; font-size: 44px; }

/* Overlays */
.modal-card, .pal-card, #ctxmenu, .import-card, .imp-list, .panel-card, .adm-card, .up-file, .folder, .up-row { border-radius: 2px; }
#toast { border-radius: 2px; background: var(--text); border-left: 4px solid var(--accent); }
.import-card .brandmark, .pal-ic { border-radius: 2px; }
.genre { border-radius: 2px; }
.genre span { font-family: var(--gothic); font-weight: 400; font-size: 28px; }
.empty-hero h1 { font-weight: 400; font-size: 56px; text-shadow: 0 0 30px rgba(196, 23, 58, .5); }
.empty-hero img { border-radius: 6px; }
.tap-btn { border-radius: 2px; color: #fff; }

/* Layout follows the space the content area actually has (sidebar and queue panel take some). */
#view { container-type: inline-size; }
@container (max-width: 980px) {
  .home-hero { grid-template-columns: 1fr; }
  .hero-side { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .hero-side h3 { grid-column: 1 / -1; }
}
@container (max-width: 620px) {
  .hero-main { flex-direction: column; align-items: flex-start; min-height: 0; padding: 18px; }
  .hero-art { width: 120px; height: 120px; }
}
@container (max-width: 760px) {
  .c-album { display: none; }
  .tracks, .tracks:not(:has(.c-album)) { --cols: 40px minmax(160px, 1fr) 44px 60px 40px; }
  .mini-list .tracks { grid-template-columns: 1fr; }
  .search-top, .two-col { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) { #playerbar .pb-progress:not(.big) { top: 0; } }

/* Smart playlist & radio art in the Onslaught palette */
.s-recent { background: radial-gradient(circle at 30% 25%, #6b1730, #1a0a12 75%); }
.s-top { background: radial-gradient(circle at 30% 25%, #e0223f, #3d0714 75%); }
.s-forgotten { background: radial-gradient(circle at 30% 25%, #7a2a5a, #1c0b18 75%); }
.s-fresh { background: radial-gradient(circle at 30% 25%, #4a3a4f, #120d15 75%); }
.smart-art { color: #ece5d9; box-shadow: inset 0 0 0 1px rgba(236, 229, 217, .08); }
.mix-band { background: var(--accent) !important; }