:root {
  --bg0: #070709;
  --bg1: #0d0d12;
  --bg2: #14141b;
  --bg3: #1e1e28;
  --line: rgba(255, 31, 61, 0.16);
  --line-strong: rgba(255, 31, 61, 0.38);
  --red: #ff1f3d;
  --red-deep: #c40f2e;
  --pink: #ff9da6;
  --txt: #ededf2;
  --mut: #a8a8b8;
  --dim: #808093;
  --ok: #00ff9c;
  --warn: #ffb300;
  --glass: rgba(13, 13, 18, 0.78);
  --glow-low: 0 0 0 1px rgba(255, 31, 61, 0.14);
  --glow-med: 0 0 24px rgba(255, 31, 61, 0.15);
  --glow-high: 0 8px 48px rgba(196, 15, 46, 0.35);
  --fh: 'Orbitron', sans-serif;
  --fb: 'Rajdhani', sans-serif;
  --fm: 'Share Tech Mono', monospace;
  --r-s: 3px;
  --r-m: 5px;
  --r-l: 8px;
  --notch: 12px;
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --dur-micro: 150ms;
  --dur-ui: 300ms;
  --player-h: 76px;
  --nav-h: 62px;
}
[data-theme='light'] {
  --bg0: #f2efea;
  --bg1: #faf8f4;
  --bg2: #ffffff;
  --bg3: #efe9e0;
  --line: rgba(217, 4, 41, 0.22);
  --line-strong: rgba(217, 4, 41, 0.45);
  --red: #d90429;
  --red-deep: #a4031f;
  --pink: #8a0f26;
  --txt: #17141a;
  --mut: #55505a;
  --dim: #6b6570;
  --glass: rgba(250, 248, 244, 0.82);
  --glow-low: 0 0 0 1px rgba(217, 4, 41, 0.18);
  --glow-med: 0 2px 18px rgba(217, 4, 41, 0.12);
  --glow-high: 0 8px 40px rgba(164, 3, 31, 0.22);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  min-height: 100dvh;
  font-family: var(--fb);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--txt);
  background: var(--bg0);
  overflow-x: hidden;
  transition: background-color var(--dur-ui) ease-out, color var(--dur-ui) ease-out;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: var(--red); text-decoration: none; }
:focus-visible { outline: 2px dashed var(--red); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--red); color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-deep); }

#bgfx { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.9; }
.scanlines {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(255, 255, 255, 0.012) 2px 3px);
  mix-blend-mode: overlay;
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(196, 15, 46, 0.05) 100%);
}

.boot {
  position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; gap: 18px;
  background: var(--bg0); text-align: center;
}
.boot-logo {
  font-family: var(--fh); font-weight: 800; font-size: clamp(34px, 8vw, 64px);
  letter-spacing: 0.08em; color: var(--txt);
}
.boot-logo b { color: var(--red); text-shadow: 0 0 24px rgba(255, 31, 61, 0.6); }
.boot-line { font-family: var(--fm); font-size: 12px; color: var(--dim); min-height: 18px; }
.boot-line::after { content: '_'; animation: caret 1s steps(2) infinite; color: var(--red); }
@keyframes caret { 50% { opacity: 0; } }

.app { position: relative; z-index: 2; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px);
  position: sticky; top: 0; z-index: 30;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--fh); font-weight: 800; letter-spacing: 0.1em; font-size: 17px; color: var(--txt); user-select: none; white-space: nowrap; cursor: pointer; }
.brand b { color: var(--red); }
.brand-sub { font-family: var(--fm); font-size: 9px; color: var(--dim); letter-spacing: 0.3em; display: block; margin-top: -3px; }
.net-chip {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--fm); font-size: 10px; letter-spacing: 0.12em;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-m); color: var(--mut);
}
.net-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.net-chip.off .dot { background: var(--red); box-shadow: 0 0 8px var(--red); }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border-radius: var(--r-m); color: var(--mut); position: relative; flex: 0 0 auto;
  transition: color var(--dur-micro) ease-out, background-color var(--dur-micro) ease-out, transform var(--dur-micro) ease-out;
}
.icon-btn:hover { color: var(--red); background: rgba(255, 31, 61, 0.08); transform: translateY(-1px); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn .badge {
  position: absolute; top: 6px; right: 6px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-family: var(--fm); font-size: 9px; line-height: 15px; text-align: center;
  box-shadow: 0 0 10px rgba(255, 31, 61, 0.7);
}
.shell { display: flex; flex: 1; min-height: 0; }
.sidebar {
  width: 240px; flex: 0 0 auto; display: none; flex-direction: column; gap: 4px;
  padding: 20px 14px; border-right: 1px solid var(--line);
  position: sticky; top: 57px; height: calc(100dvh - var(--player-h) - 57px);
}
.side-brand { position: relative; padding: 0 10px 18px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.snav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border-radius: var(--r-m); text-align: left;
  color: var(--mut); font-weight: 600; letter-spacing: 0.06em; font-size: 14px;
  border-left: 2px solid transparent;
  transition: color var(--dur-micro) ease-out, background-color var(--dur-micro) ease-out, border-color var(--dur-micro) ease-out, transform var(--dur-micro) ease-out;
}
.snav-item .num { font-family: var(--fm); font-size: 10px; color: var(--dim); }
.snav-item svg { width: 19px; height: 19px; flex: 0 0 auto; }
.snav-item:hover { color: var(--txt); background: rgba(255, 31, 61, 0.06); transform: translateX(3px); }
.snav-item.active { color: var(--red); border-left-color: var(--red); background: rgba(255, 31, 61, 0.09); text-shadow: 0 0 14px rgba(255, 31, 61, 0.45); }
.snav-item.active .num { color: var(--red); }
.side-foot { margin-top: auto; padding: 12px 10px; font-family: var(--fm); font-size: 9px; color: var(--dim); line-height: 1.9; letter-spacing: 0.08em; border-top: 1px dashed var(--line); }
main#views { flex: 1; min-width: 0; padding: 0 16px calc(var(--player-h) + var(--nav-h) + env(safe-area-inset-bottom, 0px) + 28px); }
.view { display: none; max-width: 1100px; margin: 0 auto; }
.view.active { display: block; }

.overline { font-family: var(--fm); font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--red); }
h1.page-title { font-family: var(--fh); font-size: clamp(26px, 5vw, 40px); font-weight: 800; letter-spacing: 0.03em; line-height: 1.1; margin: 6px 0 4px; }
h1.page-title em { font-style: normal; color: var(--red); text-shadow: 0 0 18px rgba(255, 31, 61, 0.5); }
.status-line { font-family: var(--fm); font-size: 11px; color: var(--dim); letter-spacing: 0.08em; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.section-head h2 { font-family: var(--fh); font-size: 15px; font-weight: 700; letter-spacing: 0.14em; color: var(--txt); }
.section-head h2::before { content: '// '; color: var(--red); }
.section-head .link { font-family: var(--fm); font-size: 11px; color: var(--mut); letter-spacing: 0.1em; }
.section-head .link:hover { color: var(--red); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--fm); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 20px; border-radius: var(--r-m); color: var(--txt);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: transform var(--dur-micro) ease-out, box-shadow var(--dur-micro) ease-out, background-color var(--dur-micro) ease-out, color var(--dur-micro) ease-out;
  user-select: none;
}
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: linear-gradient(135deg, var(--red), var(--red-deep)); color: #fff; box-shadow: 0 0 22px rgba(255, 31, 61, 0.35); }
.btn.primary:hover { box-shadow: 0 0 34px rgba(255, 31, 61, 0.55); transform: translateY(-1px); }
.btn.primary:active { transform: scale(0.97); }
.btn.ghost { border: 1px solid var(--line-strong); background: transparent; color: var(--mut); }
.btn.ghost:hover { color: var(--red); border-color: var(--red); background: rgba(255, 31, 61, 0.07); }
.btn.danger { border: 1px solid rgba(255, 61, 90, 0.5); color: #ff6b81; background: transparent; }
.btn.danger:hover { background: rgba(255, 61, 90, 0.12); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.hero { padding: 26px 0 6px; }
.continue-card {
  margin-top: 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); padding: 14px; border-radius: var(--r-l);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.continue-card .btn { flex: 0 0 auto; }
.continue-card .art { width: 64px; height: 64px; flex: 0 0 auto; }
.continue-card .meta { min-width: 0; flex: 1; }
.continue-card .t { font-weight: 700; font-size: 16px; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue-card .a { font-family: var(--fm); font-size: 11px; color: var(--dim); }
.stat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip-stat {
  font-family: var(--fm); font-size: 10px; letter-spacing: 0.1em; color: var(--mut);
  border: 1px dashed var(--line); padding: 6px 12px; border-radius: 999px;
}
.chip-stat b { color: var(--red); }

.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; }
.album-card { scroll-snap-align: start; width: 150px; text-align: left; border-radius: var(--r-l); padding: 6px; transition: transform var(--dur-micro) ease-out; }
.album-card:hover { transform: translateY(-3px); }
.album-card .art { width: 138px; height: 138px; }
.art {
  aspect-ratio: 1; border-radius: var(--r-m); position: relative; overflow: visible;
  background: var(--bg2);
}
.art .art-img { width: 100%; height: 100%; border-radius: inherit; overflow: hidden; }
.art img, .art canvas.artgen { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.album-card .t { font-weight: 700; font-size: 13px; letter-spacing: 0.04em; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-card .a { font-family: var(--fm); font-size: 10px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.track-list { display: flex; flex-direction: column; }
.track-row {
  display: grid; grid-template-columns: 34px 46px 1fr auto; align-items: center; gap: 12px;
  padding: 9px 8px; border-bottom: 1px solid var(--line); border-radius: var(--r-m);
  text-align: left; position: relative;
  transition: transform var(--dur-micro) ease-out, background-color var(--dur-micro) ease-out;
}
.track-row:hover { background: rgba(255, 31, 61, 0.05); transform: translateX(4px); }
.track-row .idx { font-family: var(--fm); font-size: 11px; color: var(--dim); text-align: right; }
.track-row .art { width: 46px; height: 46px; }
.track-row .tt { font-weight: 600; font-size: 14.5px; letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.track-row .ta { font-family: var(--fm); font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-row .tdur { font-family: var(--fm); font-size: 11px; color: var(--mut); }
.track-row .acts { display: flex; align-items: center; gap: 2px; }
.track-row .icon-btn { width: 38px; height: 38px; }
@media (max-width: 480px) {
  .track-row { grid-template-columns: 46px 1fr auto; }
  .track-row .idx { display: none; }
}
.track-row.playing { background: rgba(255, 31, 61, 0.09); box-shadow: inset 2px 0 0 var(--red); }
.track-row.playing .tt { color: var(--red); text-shadow: 0 0 12px rgba(255, 31, 61, 0.4); }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 3px; background: var(--red); border-radius: 1px; animation: eq 0.9s ease-in-out infinite alternate; box-shadow: 0 0 6px rgba(255, 31, 61, 0.8); }
.eq i:nth-child(1) { height: 6px; animation-delay: 0s; }
.eq i:nth-child(2) { height: 12px; animation-delay: 0.25s; }
.eq i:nth-child(3) { height: 8px; animation-delay: 0.5s; }
.eq.paused i { animation-play-state: paused; }
@keyframes eq { from { transform: scaleY(0.4); } to { transform: scaleY(1); } }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.fchip {
  font-family: var(--fm); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 10px 16px; min-height: 38px; border-radius: 999px; border: 1px solid var(--line); color: var(--mut);
  transition: color var(--dur-micro) ease-out, border-color var(--dur-micro) ease-out, background-color var(--dur-micro) ease-out;
}
.fchip:hover { color: var(--txt); border-color: var(--line-strong); }
.fchip.on { color: #fff; background: linear-gradient(135deg, var(--red), var(--red-deep)); border-color: transparent; box-shadow: 0 0 16px rgba(255, 31, 61, 0.4); }
.search-wrap { position: relative; margin-top: 20px; }
.search-wrap svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--dim); pointer-events: none; }
.search-input {
  width: 100%; padding: 14px 16px 14px 44px;
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-m);
  color: var(--txt); caret-color: var(--red); outline: none; font-size: 15px;
  transition: border-color var(--dur-micro) ease-out, box-shadow var(--dur-micro) ease-out;
}
.search-input::placeholder { color: var(--dim); font-family: var(--fm); font-size: 12px; letter-spacing: 0.08em; }
.search-input:focus { border-color: var(--red); box-shadow: var(--glow-med); }
select.sel {
  appearance: none; -webkit-appearance: none;
  background: var(--bg1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23ff1f3d' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 9px 32px 9px 12px; font-family: var(--fm); font-size: 11px; letter-spacing: 0.08em; color: var(--mut);
}
.empty {
  padding: 42px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-l);
  color: var(--dim); font-family: var(--fm); font-size: 12px; letter-spacing: 0.1em; line-height: 2;
}
.empty b { color: var(--red); }

.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.pl-card {
  text-align: left; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 14px; position: relative;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: transform var(--dur-micro) ease-out, box-shadow var(--dur-micro) ease-out, border-color var(--dur-micro) ease-out;
}
.pl-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--glow-med); }
.pl-card .pl-art { display: flex; gap: 3px; margin-bottom: 12px; }
.pl-card .pl-art i { flex: 1; aspect-ratio: 1; background: linear-gradient(135deg, var(--bg3), var(--bg2)); border-radius: 3px; }
.pl-card .n { font-weight: 700; font-size: 14px; letter-spacing: 0.05em; }
.pl-card .c { font-family: var(--fm); font-size: 10px; color: var(--dim); margin-top: 2px; }
.rel-card {
  border: 1px solid var(--line); border-left: 2px solid var(--red); border-radius: var(--r-m);
  background: var(--glass); padding: 16px; margin-bottom: 12px;
}
.rel-card .rh { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rel-card .rt { font-family: var(--fh); font-weight: 700; font-size: 15px; letter-spacing: 0.08em; }
.badge-new {
  font-family: var(--fm); font-size: 9px; letter-spacing: 0.14em; color: #fff;
  background: var(--red); padding: 3px 8px; border-radius: 2px; box-shadow: 0 0 12px rgba(255, 31, 61, 0.6);
  animation: pulse-badge 2s ease-in-out infinite;
}
.badge-soon { font-family: var(--fm); font-size: 9px; letter-spacing: 0.14em; color: var(--warn); border: 1px solid var(--warn); padding: 2px 8px; border-radius: 2px; }
@keyframes pulse-badge { 50% { box-shadow: 0 0 22px rgba(255, 31, 61, 0.9); } }
.rel-card .rd { font-family: var(--fm); font-size: 10.5px; color: var(--dim); }
.rel-card ul { margin-top: 10px; }

.set-group { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--glass); padding: 6px 0; margin-bottom: 18px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: none; }
.set-row .lbl { font-weight: 600; font-size: 14px; letter-spacing: 0.03em; }
.set-row .sub { font-family: var(--fm); font-size: 10px; color: var(--dim); margin-top: 2px; line-height: 1.8; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.seg button { padding: 9px 14px; font-family: var(--fm); font-size: 10.5px; letter-spacing: 0.1em; color: var(--mut); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: none; }
.seg button.on { background: linear-gradient(135deg, var(--red), var(--red-deep)); color: #fff; }
.switch { width: 46px; height: 26px; border-radius: 999px; border: 1px solid var(--line-strong); position: relative; transition: background-color var(--dur-micro) ease-out; flex: 0 0 auto; }
.switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--dim); transition: transform var(--dur-micro) ease-out, background-color var(--dur-micro) ease-out; }
.switch[aria-checked='true'] { background: rgba(255, 31, 61, 0.25); }
.switch[aria-checked='true'] i { transform: translateX(20px); background: var(--red); box-shadow: 0 0 10px rgba(255, 31, 61, 0.8); }
.meter { height: 8px; border-radius: 999px; background: var(--bg3); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--red-deep), var(--red)); box-shadow: 0 0 12px rgba(255, 31, 61, 0.6); width: 0; transition: width var(--dur-ui) ease-out; }

.playerbar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  z-index: 40; height: var(--player-h);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 0 12px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(calc(100% + var(--nav-h)));
  transition: transform var(--dur-ui) var(--ease-out);
}
.playerbar.show { transform: translateY(0); }
.pb-art { width: 52px; height: 52px; border-radius: var(--r-s); overflow: hidden; border: 1px solid var(--line); padding: 0; flex: 0 0 auto; }
.pb-info { min-width: 0; }
.pb-t { font-weight: 700; font-size: 13.5px; letter-spacing: 0.05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-a { font-family: var(--fm); font-size: 10px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-seekrow { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.pb-time { font-family: var(--fm); font-size: 9px; color: var(--dim); min-width: 30px; }
.pb-ctrl { display: flex; align-items: center; gap: 2px; }
.pb-play {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red), var(--red-deep)); color: #fff;
  box-shadow: 0 0 18px rgba(255, 31, 61, 0.5); flex: 0 0 auto;
  transition: transform var(--dur-micro) ease-out, box-shadow var(--dur-micro) ease-out;
}
.pb-play:hover { box-shadow: 0 0 30px rgba(255, 31, 61, 0.75); }
.pb-play:active { transform: scale(0.92); }
.pb-play svg { width: 19px; height: 19px; }
input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--red) var(--fill, 0%), var(--bg3) var(--fill, 0%)); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 2px; background: var(--red); margin-top: -3.5px; box-shadow: 0 0 8px rgba(255, 31, 61, 0.9); }
input[type='range']::-moz-range-track { height: 4px; border-radius: 2px; background: var(--bg3); }
input[type='range']::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--red); }
input[type='range']::-moz-range-thumb { width: 11px; height: 11px; border: none; border-radius: 2px; background: var(--red); box-shadow: 0 0 8px rgba(255, 31, 61, 0.9); }

.sheet {
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--bg0) 88%, var(--red-deep) 12%);
  transform: translateY(102%); visibility: hidden;
  transition: transform 340ms var(--ease-out), visibility 0s linear 340ms;
}
.sheet.open {
  visibility: visible; transform: translateY(0);
  transition: transform 420ms var(--ease-out);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.sheet-head .ttl { font-family: var(--fm); font-size: 10px; letter-spacing: 0.3em; color: var(--dim); }
.np-body { flex: 1; overflow-y: auto; padding: 8px 20px 30px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.np-art { width: min(72vw, 320px); aspect-ratio: 1; position: relative; }
.np-art .ring {
  position: absolute; inset: -14px; border-radius: 50%;
  border: 1px dashed var(--line-strong);
}
.np-art .disc { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 2px solid var(--line-strong); box-shadow: var(--glow-high); }
.np-art .disc img, .np-art .disc canvas { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.np-art.spin .disc { animation: spin 7s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.np-tt { font-family: var(--fh); font-weight: 800; font-size: clamp(18px, 5vw, 26px); letter-spacing: 0.06em; text-align: center; }
.np-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.tagchip { font-family: var(--fm); font-size: 9.5px; letter-spacing: 0.12em; color: var(--mut); border: 1px dashed var(--line); padding: 4px 10px; border-radius: 999px; }
#viz { width: min(86vw, 420px); height: 74px; }
.np-seek { width: min(86vw, 420px); display: flex; align-items: center; gap: 10px; }
.np-ctrl { display: flex; align-items: center; gap: 18px; }
.np-play {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red), var(--red-deep)); color: #fff; box-shadow: 0 0 26px rgba(255, 31, 61, 0.55);
  transition: transform var(--dur-micro) ease-out, box-shadow var(--dur-micro) ease-out;
}
.np-play:hover { box-shadow: 0 0 44px rgba(255, 31, 61, 0.8); }
.np-play:active { transform: scale(0.93); }
.np-play svg { width: 26px; height: 26px; }
.np-side { display: flex; gap: 6px; }
.queue { width: min(88vw, 460px); }
.queue h3 { font-family: var(--fm); font-size: 10px; letter-spacing: 0.26em; color: var(--dim); margin-bottom: 8px; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.bnav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--dim); font-family: var(--fm); font-size: 8.5px; letter-spacing: 0.14em; position: relative; min-width: 44px; }
.bnav-item svg { width: 20px; height: 20px; transition: transform var(--dur-micro) var(--ease-out); }
.bnav-item.active { color: var(--red); }
.bnav-item.active svg { filter: drop-shadow(0 0 8px rgba(255, 31, 61, 0.9)); }
.bnav-item::before { content: ''; position: absolute; top: 0; left: 50%; width: 0; height: 2px; background: var(--red); box-shadow: 0 0 10px var(--red); translate: -50% 0; transition: width var(--dur-ui) var(--ease-out); }
.bnav-item.active::before { width: 42%; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(4, 4, 6, 0.6); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity var(--dur-ui) ease-out, visibility var(--dur-ui); }
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.notif-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95; width: min(88vw, 380px);
  background: var(--bg1); border-left: 1px solid var(--line-strong); box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
  transform: translateX(105%); transition: transform 280ms var(--ease-out);
  display: flex; flex-direction: column;
}
.notif-drawer.open { transform: translateX(0); }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.notif-head h3 { font-family: var(--fh); font-size: 13px; letter-spacing: 0.14em; }
.notif-list { flex: 1; overflow-y: auto; padding: 10px; }
.notif-item { padding: 13px 12px; border-bottom: 1px solid var(--line); border-radius: var(--r-m); }
.notif-item.unread { background: rgba(255, 31, 61, 0.07); }
.notif-item .nt { font-weight: 700; font-size: 13.5px; letter-spacing: 0.04em; display: flex; gap: 8px; align-items: center; }
.notif-item.unread .nt { color: var(--red); }
.notif-item .nb { font-family: var(--fm); font-size: 10.5px; color: var(--mut); margin-top: 4px; line-height: 1.8; }
.notif-item .nd { font-family: var(--fm); font-size: 9px; color: var(--dim); margin-top: 6px; }

.toasts { position: fixed; z-index: 120; right: 14px; bottom: calc(var(--player-h) + var(--nav-h) + 16px); display: flex; flex-direction: column; gap: 8px; max-width: min(86vw, 340px); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--bg2); border: 1px solid var(--line-strong); border-left: 3px solid var(--red);
  border-radius: var(--r-m); box-shadow: var(--glow-high);
  font-family: var(--fm); font-size: 11px; letter-spacing: 0.06em; line-height: 1.7; color: var(--txt);
}
.toast.ok { border-left-color: var(--ok); }
.toast.warn { border-left-color: var(--warn); }
.toast svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--red); }
.toast.ok svg { color: var(--ok); }
.toast.warn svg { color: var(--warn); }

.modal-backdrop { position: fixed; inset: 0; z-index: 130; background: rgba(4, 4, 6, 0.65); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity var(--dur-ui) ease-out, visibility var(--dur-ui); }
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal {
  width: min(92vw, 400px); background: var(--bg1); border: 1px solid var(--line-strong); border-radius: var(--r-l);
  box-shadow: var(--glow-high); overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.modal-head { padding: 16px 18px 10px; font-family: var(--fh); font-size: 13px; letter-spacing: 0.12em; color: var(--red); }
.modal-body { padding: 4px 18px 16px; }
.modal-body input[type='text'], .modal-body input[type='search'] {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 12px 14px; color: var(--txt); caret-color: var(--red); outline: none;
}
.modal-body input:focus { border-color: var(--red); box-shadow: var(--glow-med); }
.modal-acts { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 18px; }
.picklist { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.pickitem { text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-m); font-weight: 600; font-size: 13.5px; }
.pickitem:hover { border-color: var(--red); background: rgba(255, 31, 61, 0.07); }

.glitch { position: relative; display: inline-block; }
.glitch.glitching::before, .glitch.glitching::after {
  content: attr(data-text); position: absolute; inset: 0; overflow: hidden;
}
.glitch.glitching::before { color: var(--red); transform: translate(-2px, -1px); clip-path: inset(12% 0 58% 0); animation: glitch-a 240ms steps(3) both; }
.glitch.glitching::after { color: var(--pink); transform: translate(2px, 1px); clip-path: inset(62% 0 8% 0); animation: glitch-b 240ms steps(3) both; }
@keyframes glitch-a { 33% { clip-path: inset(38% 0 40% 0); } 66% { clip-path: inset(70% 0 6% 0); } }
@keyframes glitch-b { 33% { clip-path: inset(6% 0 74% 0); } 66% { clip-path: inset(44% 0 30% 0); } }
.skel { border-radius: var(--r-m); background: linear-gradient(100deg, var(--bg2) 40%, var(--bg3) 50%, var(--bg2) 60%); background-size: 200% 100%; animation: shim 1.1s linear infinite; }
@keyframes shim { to { background-position: -200% 0; } }
.dl-ring circle { fill: none; stroke-width: 2.5; }
.dl-ring .track { stroke: var(--bg3); }
.dl-ring .prog { stroke: var(--red); stroke-dasharray: 44; stroke-dashoffset: 44; stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(255, 31, 61, 0.8)); transition: stroke-dashoffset 200ms linear; }
.brk { position: relative; }
.brk::before, .brk::after { content: ''; position: absolute; width: 10px; height: 10px; pointer-events: none; }
.brk::before { top: -5px; left: -5px; border-top: 1px solid var(--red); border-left: 1px solid var(--red); }
.brk::after { bottom: -5px; right: -5px; border-bottom: 1px solid var(--red); border-right: 1px solid var(--red); }
.offline-banner {
  display: none; margin: 14px 0 0; padding: 10px 14px; border: 1px dashed var(--warn); border-radius: var(--r-m);
  font-family: var(--fm); font-size: 10.5px; letter-spacing: 0.1em; color: var(--warn);
}
.offline-banner.show { display: block; animation: fade-up 300ms var(--ease-out) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (hover: hover) and (pointer: fine) {
  .track-row .acts .dl-btn { opacity: 0.55; }
  .track-row:hover .acts .dl-btn { opacity: 1; }
}
@media (pointer: coarse) {
  .track-row .icon-btn { width: 44px; height: 44px; }
  .track-row { grid-template-columns: 46px 1fr auto; }
}
@media (max-width: 1079px) { .sidebar { display: none; } }
@media (min-width: 1080px) {
  .topbar { display: none; }
  .bottomnav { display: none; }
  main#views { padding-bottom: calc(var(--player-h) + 36px); }
  .playerbar {
    bottom: 0; grid-template-columns: minmax(180px, 24%) 1fr auto; gap: 20px; padding: 0 22px;
    border-top: 1px solid var(--line);
  }
  .pb-info { display: flex; flex-direction: column-reverse; }
  .toasts { bottom: calc(var(--player-h) + 16px); }
  .shell { padding-top: 0; }
  .sidebar { display: flex; top: 0; height: calc(100dvh - var(--player-h)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
.fx-off .eq i, .fx-off .np-art.spin .disc { animation: none !important; }
.fx-off .scanlines, .fx-off #bgfx { display: none; }
