    :root {
      --grad-1: linear-gradient(135deg, #6366f1 0%, #a855f7 52%, #ec4899 100%);
      --grad-2: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #8b5cf6 100%);
      --grad-3: linear-gradient(135deg, #f472b6 0%, #fb7185 45%, #fbbf24 100%);
      --bg: #0a0e27;
      --text: #ffffff;
      --text-muted: rgba(255,255,255,0.75);
      --text-soft: rgba(255,255,255,0.55);
      --line: rgba(255,255,255,0.1);
      --line-strong: rgba(255,255,255,0.15);
      --glass: rgba(255,255,255,0.02);
      --glass-hover: rgba(255,255,255,0.04);
      --chip: rgba(255,255,255,0.06);
      --chip-active: rgba(255,255,255,0.15);
      --primary: #6366f1;
      --primary-glow: rgba(99, 102, 241, 0.3);
      --accent: #ec4899;
      --accent-glow: rgba(236, 72, 153, 0.25);
    }

    * { box-sizing: border-box; }
    html {
      scroll-behavior: smooth;
      overflow-x: hidden;
      overflow-y: auto;
    }
    body {
      margin: 0;
      min-height: 100vh;
      font-family: "Inter", "Segoe UI", Arial, sans-serif;
      background: linear-gradient(135deg, #0a0e27 0%, #1a1a3e 50%, #0f1535 100%);
      color: var(--text);
      overflow-x: hidden;
      overflow-x: clip;
      display: flow-root;
      position: relative;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    body.nav-open {
      overflow: hidden;
    }

    a { color: inherit; text-decoration: none; }
    button, input { font: inherit; }

    input, textarea, select {
      font-size: 16px !important;
      line-height: 1.5 !important;
      letter-spacing: 0.5px !important;
    }

    html, body {
      touch-action: manipulation;
    }

    * {
      -webkit-tap-highlight-color: transparent;
    }

    .site-loader {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: radial-gradient(circle at center, rgba(99,102,241,0.18), rgba(10,14,39,0.96) 45%, rgba(5,7,17,1) 100%);
      z-index: 9999;
      transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.6s ease;
    }

    .site-loader.hidden {
      opacity: 0;
      visibility: hidden;
      transform: scale(1.03);
      pointer-events: none;
    }

    .site-loader.hidden .loader-art {
      animation-play-state: paused;
    }

    .loader-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 24px;
    }

    .loader-art {
      width: min(420px, 58vw);
      filter: drop-shadow(0 0 28px rgba(162, 110, 255, 0.7));
      animation: loaderFloat 1.8s ease-in-out infinite alternate, loaderPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    }

    .brand-svg {
      width: 100%;
      height: auto;
      display: block;
    }

    @keyframes loaderFloat {
      from { transform: translateY(8px); }
      to { transform: translateY(-8px); }
    }

    @keyframes loaderPop {
      from { opacity: 0; transform: scale(0.82); }
      to { opacity: 1; transform: scale(1); }
    }

    .loader-progress {
      width: min(220px, 50vw);
      height: 3px;
      border-radius: 999px;
      background: rgba(255,255,255,0.08);
      overflow: hidden;
    }

    .loader-progress-fill {
      height: 100%;
      width: 0%;
      border-radius: 999px;
      background: linear-gradient(90deg, #6d4af0, #d0a4ff, #f0d9ff);
      animation: loaderProgress 0.85s ease-out forwards;
    }

    @keyframes loaderProgress {
      from { width: 0%; }
      to { width: 100%; }
    }

    .loader-label {
      font-size: 0.7rem;
      letter-spacing: 0.32em;
      text-transform: uppercase;
      font-weight: 700;
      color: rgba(255,255,255,0.5);
    }

    .page {
      width: min(1560px, calc(100vw - 34px));
      margin: 18px auto 26px;
      background: rgba(15, 21, 53, 0.7);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 24px;
      box-shadow:
        0 50px 150px rgba(0,0,0,0.8),
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 0 150px rgba(99, 102, 241, 0.15),
        inset 0 0 100px rgba(99, 102, 241, 0.05);
      overflow: visible;
      position: relative;
      z-index: 10;
      animation: pageReveal 0.9s ease-out 0.2s backwards;
    }

    @keyframes pageReveal {
      from { opacity: 0; transform: translateY(12px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .topbar {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 18px 12px;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      position: sticky;
      top: 0;
      z-index: 1000;
      width: 100%;
      background: #0d122e;
      border-top-left-radius: inherit;
      border-top-right-radius: inherit;
    }

    @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
      .topbar {
        background: transparent;
      }

      .topbar::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: inherit;
        background: rgba(13, 18, 46, 0.42);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        backdrop-filter: blur(20px) saturate(180%);
        pointer-events: none;
      }
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
      flex-shrink: 0;
      cursor: pointer;
      text-decoration: none;
      transition: opacity 0.3s ease;
    }

    .brand:hover { opacity: 0.8; }

    .brand-svg.compact {
      width: 118px;
      height: auto;
      display: block;
    }

    .nav {
      display: flex;
      align-items: center;
      flex-wrap: nowrap;
      gap: 2px;
      margin: 0;
      min-width: 0;
    }

    .nav.left {
      justify-content: flex-start;
      flex-shrink: 0;
    }

    .nav.right {
      justify-content: flex-end;
      margin-left: auto;
      flex-shrink: 0;
    }

    .nav.right.hidden-until-auth {
      display: none !important;
    }

    .nav-item {
      position: relative;
      display: flex;
      align-items: center;
      color: var(--text-muted);
      font-size: 0.76rem;
      letter-spacing: 0.02em;
      text-transform: uppercase;
      font-weight: 600;
      padding: 8px 14px;
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.3s ease;
      border: 1px solid transparent;
      background: transparent;
    }

    .nav-item:hover {
      background: rgba(99, 102, 241, 0.15);
      color: var(--text);
      border-color: rgba(99, 102, 241, 0.3);
    }

    .nav-item.active {
      background: rgba(99, 102, 241, 0.25);
      border-color: rgba(99, 102, 241, 0.5);
      color: var(--text);
      box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
    }

    .nav-plus-cat {
      width: 18px;
      height: 18px;
      margin-right: 7px;
      border-radius: 50%;
      object-fit: cover;
      flex-shrink: 0;
    }

    .nav-plus-sign {
      background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    @media (min-width: 1001px) and (max-width: 1099px) {
      .topbar .nav-item {
        padding: 8px 6px;
        letter-spacing: 0;
      }
    }

    @media (min-width: 1001px) and (max-width: 1199px) {
      .nav-item {
        padding: 8px 10px;
      }

      .nav-plus-text,
      .profile-name {
        display: none;
      }

      .nav-plus-cat {
        margin-right: 0;
      }
    }

    .nav-dropdown {
      position: relative;
      display: inline-block;
    }

    .dropdown-menu {
      position: absolute;
      top: 100%;
      left: 0;
      background: rgba(12, 14, 17, 0.95);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 8px 0;
      min-width: 180px;
      margin-top: 6px;
      backdrop-filter: blur(10px);
      box-shadow: 0 8px 32px rgba(0,0,0,0.4);
      opacity: 0;
      pointer-events: none;
      z-index: 10000;
      transition: opacity 0.2s ease;
    }

    .dropdown-menu.show {
      opacity: 1;
      pointer-events: auto;
    }

    .dropdown-menu:empty {
      display: none;
    }

    .dropdown-menu a {
      display: block;
      padding: 10px 16px;
      color: var(--text-muted);
      font-size: 0.85rem;
      text-transform: capitalize;
      letter-spacing: 0;
      font-weight: 500;
      transition: all 0.2s ease;
      border-left: 3px solid transparent;
    }

    .dropdown-menu a:hover {
      background: rgba(255,255,255,0.06);
      color: var(--text);
      border-left-color: rgba(255,255,255,0.3);
    }

    .top-actions .dropdown-menu {
      left: auto;
      right: 0;
    }

    .top-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      min-width: auto;
      position: relative;
      z-index: 1001;
      flex-shrink: 0;
    }

    .nav.right.hidden-until-auth ~ .top-actions {
      margin-left: auto;
    }

    .lang-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      border: 1.5px solid rgba(99, 102, 241, 0.5);
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(236, 72, 153, 0.1) 100%);
      color: rgba(255,255,255,0.9);
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      font-size: 0.75rem;
      font-weight: 700;
      position: relative;
      overflow: hidden;
    }

    .lang-btn::before {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .lang-btn:hover {
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(236, 72, 153, 0.2) 100%);
      color: var(--text);
      border-color: rgba(99, 102, 241, 0.8);
      box-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
      transform: translateY(-2px);
    }

    .lang-btn:hover::before { opacity: 1; }

    .profile-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 14px;
      border: 1.5px solid rgba(99, 102, 241, 0.5);
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(236, 72, 153, 0.1) 100%);
      color: var(--text);
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      font-size: 0.85rem;
      font-weight: 600;
      position: relative;
      overflow: hidden;
    }

    .profile-btn::before {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .profile-btn:hover {
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(236, 72, 153, 0.2) 100%);
      border-color: rgba(99, 102, 241, 0.8);
      box-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
      transform: translateY(-2px);
    }

    .profile-btn:hover::before { opacity: 1; }

    .profile-avatar {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(236, 72, 153, 0.2) 100%);
      border: 1.5px solid rgba(99, 102, 241, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.7rem;
      transition: all 0.3s ease;
    }

    .profile-btn:hover .profile-avatar {
      box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
    }

    .profile-avatar.has-image {
      background-size: cover;
      background-position: center;
    }

    .profile-name {
      max-width: 110px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .nav-close {
      display: none;
    }

    .menu-toggle {
      display: none;
      width: 40px;
      height: 40px;
      border: 1px solid rgba(99, 102, 241, 0.4);
      background: rgba(99, 102, 241, 0.1);
      color: var(--text);
      border-radius: 8px;
      cursor: pointer;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
      transition: all 0.2s ease;
      position: relative;
    }

    .menu-toggle:hover {
      background: rgba(99, 102, 241, 0.18);
      border-color: rgba(99, 102, 241, 0.6);
      box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
    }

    @media (max-width: 1000px) {
      .nav { display: none; }
      .menu-toggle { display: flex; }
    }

    .shell {
      padding: 18px 18px 10px;
      position: relative;
      z-index: 20;
    }

    .library-head {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 4px 4px 18px;
    }

    .library-head h1 {
      margin: 0;
      font-size: clamp(1.6rem, 2.4vw, 2.2rem);
      letter-spacing: -0.02em;
      font-weight: 800;
    }

    .library-head p {
      margin: 6px 0 0;
      color: var(--text-muted);
      font-size: 0.9rem;
    }

    .library-head > div:first-child {
      flex: 1 1 240px;
      min-width: 0;
    }

    .library-search-group {
      display: flex;
      align-items: stretch;
      gap: 8px;
      flex: 1 1 400px;
      max-width: 600px;
      min-width: 0;
      margin-left: auto;
    }

    .library-search {
      display: flex;
      align-items: center;
      gap: 10px;
      flex: 1;
      min-width: 0;
      height: 48px;
      padding: 0 8px 0 14px;
      border-radius: 14px;
      border: 1px solid rgba(129, 140, 248, 0.35);
      background: rgba(8, 10, 28, 0.45);
      cursor: text;
      transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    }

    .library-search:hover { border-color: rgba(129, 140, 248, 0.55); }

    .library-search:focus-within {
      border-color: rgba(167, 139, 250, 0.85);
      background: rgba(8, 10, 28, 0.6);
      box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16);
    }

    .library-search-icon {
      flex: none;
      color: rgba(255, 255, 255, 0.45);
      transition: color 0.2s;
    }

    .library-search:focus-within .library-search-icon { color: #c4b5fd; }

    .library-search input {
      flex: 1;
      min-width: 0;
      height: 100%;
      border: none;
      outline: none;
      background: transparent;
      color: rgba(255, 255, 255, 0.92);
      font: inherit;
      font-size: 0.95rem;
    }

    .library-search input::placeholder {
      color: rgba(255, 255, 255, 0.42);
    }

    .library-search-kbd {
      flex: none;
      min-width: 22px;
      padding: 2px 6px;
      border-radius: 6px;
      border: 1px solid rgba(255, 255, 255, 0.18);
      color: rgba(255, 255, 255, 0.5);
      font: inherit;
      font-size: 0.72rem;
      font-weight: 700;
      text-align: center;
    }

    .library-search:focus-within .library-search-kbd,
    .library-search.has-value .library-search-kbd { display: none; }

    .library-search-clear {
      display: grid;
      place-items: center;
      flex: none;
      width: 30px;
      height: 30px;
      padding: 0;
      border: 0;
      border-radius: 9px;
      background: rgba(255, 255, 255, 0.07);
      color: rgba(255, 255, 255, 0.7);
      cursor: pointer;
      transition: background 0.2s, color 0.2s;
    }

    .library-search-clear[hidden] { display: none; }
    .library-search-clear:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

    .library-search-group .ai-open-btn {
      height: auto;
      min-height: 48px;
      margin-left: 0;
      padding: 0 18px;
      border-radius: 14px;
      box-shadow: 0 8px 22px rgba(168, 85, 247, 0.28);
      transition: filter 0.2s, transform 0.2s;
    }

    .library-search-group .ai-open-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

    @media (hover: none) {
      .library-search-kbd { display: none; }
    }

    .chip {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 30px;
      border-radius: 999px;
      padding: 4px 12px;
      background: rgba(99, 102, 241, 0.1);
      border: 1px solid rgba(99, 102, 241, 0.3);
      color: var(--text-muted);
      font-size: 0.8rem;
      line-height: 1;
      white-space: nowrap;
      transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
      cursor: pointer;
    }

    .chip:hover {
      background: rgba(99, 102, 241, 0.2);
      border-color: rgba(99, 102, 241, 0.6);
    }

    .chip:active {
      transform: scale(0.92);
    }

    .chip.active {
      background: rgba(99, 102, 241, 0.3);
      border-color: rgba(99, 102, 241, 0.8);
      color: var(--text);
      box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
    }

    @keyframes chipPop {
      0% { transform: scale(0.85); }
      55% { transform: scale(1.08); }
      100% { transform: scale(1); }
    }

    .chip.pop {
      animation: chipPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .library-count {
      margin-left: auto;
      padding: 0 6px;
      font-size: 0.8rem;
      color: var(--text-soft);
      white-space: nowrap;
    }

    .lib-filters {
      position: relative;
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 10px;
      margin-bottom: 18px;
      border-radius: 18px;
      background: var(--glass);
      border: 1px solid var(--line);
    }

    .lib-filter-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .seg {
      display: inline-flex;
      gap: 2px;
      padding: 3px;
      border-radius: 13px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(8, 10, 28, 0.38);
    }

    .seg .chip {
      min-height: 30px;
      padding: 4px 12px;
      border: 0;
      border-radius: 10px;
      background: transparent;
      font-size: 0.8rem;
      font-weight: 700;
      box-shadow: none;
    }

    .seg .chip:hover {
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
    }

    .seg .chip.active {
      background: rgba(99, 102, 241, 0.34);
      color: var(--text);
      box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.6);
    }

    .lib-pop { position: relative; }

    .lib-pop-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 38px;
      padding: 0 12px;
      border-radius: 13px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(8, 10, 28, 0.38);
      color: var(--text-muted);
      font: inherit;
      font-size: 0.82rem;
      font-weight: 700;
      cursor: pointer;
      transition: border-color 0.2s, background 0.2s, color 0.2s;
    }

    .lib-pop-btn:hover,
    .lib-pop.open .lib-pop-btn {
      border-color: rgba(129, 140, 248, 0.55);
      color: var(--text);
    }

    .lib-pop.has-value .lib-pop-btn {
      border-color: rgba(129, 140, 248, 0.8);
      background: rgba(99, 102, 241, 0.26);
      color: var(--text);
    }

    .lib-pop-value { color: #c7d2fe; }
    .lib-pop-value:empty { display: none; }
    .lib-pop-value::before { content: "· "; opacity: 0.6; }

    .lib-pop-chev { opacity: 0.7; transition: transform 0.2s; }
    .lib-pop.open .lib-pop-chev { transform: rotate(180deg); }

    .lib-pop-panel {
      display: none;
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      z-index: 40;
      width: max-content;
      max-width: min(560px, calc(100vw - 32px));
      padding: 12px;
      border-radius: 16px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: #151a3c;
      box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
    }

    .lib-pop.open .lib-pop-panel {
      display: block;
      animation: libPopIn 0.16s ease-out;
    }

    @keyframes libPopIn {
      from { opacity: 0; transform: translateY(-4px); }
      to { opacity: 1; transform: none; }
    }

    .lib-pop-panel .tag-bar { padding: 0; }

    .lib-pop-letters { width: min(560px, calc(100vw - 32px)); }

    .lib-pop-letters .letter-bar {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
      gap: 6px;
      padding: 0;
      overflow: visible;
    }

    .lib-pop-letters .letter-chip { min-height: 32px; padding: 2px 6px; }
    .lib-pop-letters .letter-chip[data-letter=""] { grid-column: span 2; }

    .lib-scroller { position: relative; }
    .lib-scroller.is-empty { display: none; }

    .lib-scroller > .tag-bar,
    .lib-scroller > .artist-bar {
      flex-wrap: nowrap;
      overflow-x: auto;
      padding: 2px;
      scrollbar-width: none;
    }

    .lib-scroller > .tag-bar::-webkit-scrollbar,
    .lib-scroller > .artist-bar::-webkit-scrollbar { display: none; }

    .lib-scroller .chip { flex: none; }

    .lib-scroller.can-next > .tag-bar,
    .lib-scroller.can-next > .artist-bar {
      -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 72px), transparent);
      mask-image: linear-gradient(90deg, #000 calc(100% - 72px), transparent);
    }

    .lib-scroller.can-prev > .tag-bar,
    .lib-scroller.can-prev > .artist-bar {
      -webkit-mask-image: linear-gradient(90deg, transparent, #000 72px);
      mask-image: linear-gradient(90deg, transparent, #000 72px);
    }

    .lib-scroller.can-prev.can-next > .tag-bar,
    .lib-scroller.can-prev.can-next > .artist-bar {
      -webkit-mask-image: linear-gradient(90deg, transparent, #000 72px, #000 calc(100% - 72px), transparent);
      mask-image: linear-gradient(90deg, transparent, #000 72px, #000 calc(100% - 72px), transparent);
    }

    .lib-scroll-btn {
      position: absolute;
      top: 50%;
      z-index: 2;
      display: none;
      place-items: center;
      width: 30px;
      height: 30px;
      padding: 0;
      border-radius: 50%;
      border: 1px solid rgba(255, 255, 255, 0.16);
      background: #1c2252;
      color: #fff;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
      transform: translateY(-50%);
      cursor: pointer;
    }

    .lib-scroll-btn:hover { background: #262d66; }
    .lib-scroller.can-prev .lib-scroll-btn.prev { display: grid; left: 0; }
    .lib-scroller.can-next .lib-scroll-btn.next { display: grid; right: 0; }

    @media (hover: none) {
      .lib-scroller .lib-scroll-btn { display: none !important; }
    }

    .lib-active {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
      padding: 2px;
    }

    .lib-active[hidden] { display: none; }

    .lib-active-chip {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 28px;
      padding: 0 10px 0 12px;
      border-radius: 999px;
      border: 1px solid rgba(129, 140, 248, 0.6);
      background: rgba(99, 102, 241, 0.2);
      color: var(--text);
      font: inherit;
      font-size: 0.78rem;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.2s;
    }

    .lib-active-chip span:last-child { font-size: 0.68rem; opacity: 0.7; }
    .lib-active-chip:hover { background: rgba(99, 102, 241, 0.34); }

    .lib-active-reset {
      padding: 0 6px;
      border: 0;
      background: transparent;
      color: var(--text-soft);
      font: inherit;
      font-size: 0.78rem;
      text-decoration: underline;
      cursor: pointer;
    }

    .lib-active-reset:hover { color: var(--text); }

    .library-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      width: fit-content;
      max-width: 100%;
      padding: 6px;
      margin-bottom: 14px;
      border-radius: 18px;
      background: var(--glass);
      border: 1px solid var(--line);
    }

    .library-tab {
      appearance: none;
      border: 1px solid transparent;
      background: transparent;
      color: var(--text-muted);
      font-family: inherit;
      font-size: 0.9rem;
      line-height: 1;
      white-space: nowrap;
      padding: 10px 18px;
      border-radius: 14px;
      cursor: pointer;
      transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .library-tab:hover {
      background: rgba(99, 102, 241, 0.15);
      color: var(--text);
    }

    .library-tab:active {
      transform: scale(0.96);
    }

    .library-tab.active {
      background: rgba(99, 102, 241, 0.3);
      border-color: rgba(99, 102, 241, 0.8);
      color: var(--text);
      box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
    }

    .track-cover.sound-cover::after {
      content: "🔊";
      opacity: 1;
    }

    .track-button.sound-action {
      min-width: 0;
      width: 36px;
      padding: 0;
      font-size: 1rem;
    }

    .sound-row .track-name {
      cursor: default;
    }

    .track-button.sound-action.active {
      background: rgba(99, 102, 241, 0.32);
      border-color: rgba(99, 102, 241, 0.85);
      color: var(--text);
    }

    .letter-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .letter-chip {
      min-width: 30px;
      min-height: 26px;
      padding: 2px 8px;
      font-size: 0.76rem;
      font-weight: 600;
    }

    .artist-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .artist-chip {
      font-size: 0.78rem;
    }

    .list-panel {
      background: rgba(99, 102, 241, 0.08);
      border: 1px solid rgba(99, 102, 241, 0.25);
      border-radius: 18px;
      overflow: hidden;
      box-shadow: 0 0 50px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
    }

    .artist-grid {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
      gap: 14px;
    }

    .artist-card {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      min-width: 0;
      padding: 16px 12px 14px;
      border-radius: 18px;
      border: 1px solid rgba(99, 102, 241, 0.16);
      background: linear-gradient(160deg, rgba(99, 102, 241, 0.07) 0%, rgba(236, 72, 153, 0.025) 100%);
      color: var(--text);
      text-align: center;
      text-decoration: none;
      cursor: pointer;
      animation: artistCardIn 0.35s ease both;
      transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    }

    .artist-card:hover,
    .artist-card:focus-visible {
      border-color: rgba(129, 140, 248, 0.5);
      background: linear-gradient(160deg, rgba(99, 102, 241, 0.14) 0%, rgba(236, 72, 153, 0.06) 100%);
      box-shadow: 0 12px 30px rgba(15, 12, 45, 0.45);
      transform: translateY(-3px);
      outline: none;
    }

    @keyframes artistCardIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .artist-card-cover {
      display: grid;
      place-items: center;
      width: min(100%, 136px);
      aspect-ratio: 1;
      margin-bottom: 8px;
      border-radius: 50%;
      background: var(--grad-1);
      background-size: cover;
      background-position: center;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
      font-size: 2.4rem;
      font-weight: 800;
      color: rgba(255, 255, 255, 0.92);
      transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .artist-card:hover .artist-card-cover,
    .artist-card:focus-visible .artist-card-cover {
      transform: scale(1.04);
      box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(129, 140, 248, 0.55);
    }

    .artist-card-name {
      display: -webkit-box;
      max-width: 100%;
      overflow: hidden;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      font-weight: 700;
      font-size: 0.95rem;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }

    .artist-card-meta {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0 8px;
      font-size: 0.8rem;
      color: var(--text-soft);
    }

    .artist-card-likes {
      color: #f9a8d4;
    }

    .artist-card-genre {
      max-width: 100%;
      margin-top: 6px;
      padding: 2px 9px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.06);
      font-size: 0.72rem;
      color: var(--text-muted);
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .artist-hero {
      --artist-tint: 129, 140, 248;
      position: relative;
      margin-bottom: 14px;
      padding: 14px 24px 22px;
      border-radius: 22px;
      scroll-margin-top: 96px;
      border: 1px solid rgba(var(--artist-tint), 0.32);
      background:
        radial-gradient(120% 160% at 0% 0%, rgba(var(--artist-tint), 0.34) 0%, rgba(var(--artist-tint), 0.1) 45%, transparent 75%),
        linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.04) 100%);
      animation: artistCardIn 0.3s ease both;
    }

    .artist-hero[hidden] {
      display: none;
    }

    .artist-back {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      margin-left: -8px;
      padding: 6px 12px 6px 8px;
      border: 0;
      border-radius: 999px;
      background: transparent;
      color: var(--text-muted);
      font: inherit;
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease;
    }

    .artist-back:hover,
    .artist-back:focus-visible {
      background: rgba(255, 255, 255, 0.08);
      color: var(--text);
      outline: none;
    }

    .artist-hero-main {
      display: flex;
      align-items: center;
      gap: 28px;
      margin-top: 10px;
    }

    .artist-hero-cover {
      display: grid;
      flex: none;
      place-items: center;
      width: 172px;
      aspect-ratio: 1;
      border-radius: 50%;
      background: var(--grad-1);
      background-size: cover;
      background-position: center;
      box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(var(--artist-tint), 0.35);
      font-size: 3.6rem;
      font-weight: 800;
      color: rgba(255, 255, 255, 0.92);
    }

    .artist-hero-cover.loading,
    .artist-stat.loading {
      background: linear-gradient(100deg, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.13) 50%, rgba(255, 255, 255, 0.05) 70%);
      background-size: 250% 100%;
      animation: skeletonShimmer 1.3s ease-in-out infinite;
    }

    .artist-hero-body {
      min-width: 0;
    }

    .artist-hero-label {
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--text-soft);
    }

    .artist-hero-name {
      margin: 4px 0 14px;
      font-size: clamp(1.7rem, 4vw, 2.75rem);
      font-weight: 800;
      line-height: 1.08;
      overflow-wrap: anywhere;
    }

    .artist-stats {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 26px;
    }

    .artist-stat {
      display: flex;
      flex-direction: column;
      min-width: 56px;
    }

    .artist-stat.loading {
      width: 64px;
      height: 42px;
      border-radius: 10px;
    }

    .artist-stat b {
      font-size: 1.4rem;
      line-height: 1.15;
    }

    .artist-stat span {
      font-size: 0.78rem;
      color: var(--text-soft);
    }

    .artist-hero-tags {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 8px;
      margin-top: 14px;
    }

    .artist-genre {
      padding: 3px 10px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.06);
      font-size: 0.78rem;
      color: var(--text-muted);
    }

    .artist-since {
      font-size: 0.78rem;
      color: var(--text-soft);
    }

    .artist-hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 18px;
    }

    .artist-play,
    .artist-share {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 40px;
      padding: 0 20px;
      border-radius: 999px;
      font: inherit;
      font-size: 0.9rem;
      font-weight: 700;
      cursor: pointer;
      transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    }

    .artist-play {
      border: 0;
      background: var(--grad-1);
      color: #fff;
      box-shadow: 0 8px 22px rgba(168, 85, 247, 0.35);
    }

    .artist-play:hover:not(:disabled),
    .artist-play:focus-visible {
      transform: translateY(-1px);
      box-shadow: 0 10px 28px rgba(168, 85, 247, 0.5);
      outline: none;
    }

    .artist-play:disabled {
      opacity: 0.55;
      cursor: default;
    }

    .artist-share {
      border: 1px solid rgba(255, 255, 255, 0.16);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text);
    }

    .artist-share:hover,
    .artist-share:focus-visible {
      background: rgba(255, 255, 255, 0.1);
      outline: none;
    }

    .artist-partners {
      margin-top: 20px;
      padding-top: 14px;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .artist-partners-title {
      margin-bottom: 10px;
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--text-soft);
    }

    .artist-partner-list {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding-bottom: 4px;
      scrollbar-width: thin;
    }

    .artist-partner {
      display: inline-flex;
      flex: none;
      align-items: center;
      gap: 8px;
      max-width: 220px;
      padding: 4px 10px 4px 4px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text);
      text-decoration: none;
      font-size: 0.85rem;
      transition: background 0.2s ease, border-color 0.2s ease;
    }

    .artist-partner:hover,
    .artist-partner:focus-visible {
      border-color: rgba(129, 140, 248, 0.5);
      background: rgba(99, 102, 241, 0.14);
      outline: none;
    }

    .artist-partner-cover {
      display: grid;
      flex: none;
      place-items: center;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--grad-1);
      background-size: cover;
      background-position: center;
      font-size: 0.75rem;
      font-weight: 800;
    }

    .artist-partner-name {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .artist-partner-count {
      flex: none;
      min-width: 20px;
      padding: 1px 6px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.1);
      font-size: 0.72rem;
      text-align: center;
      color: var(--text-muted);
    }

    .artist-missing {
      padding: 18px 2px 4px;
      color: var(--text-muted);
    }

    .lib-artist-tracks {
      display: none;
      margin-right: auto;
      font-size: 1.05rem;
      font-weight: 800;
    }

    .lib-filters.artist-mode .lib-artist-tracks {
      display: block;
    }

    .lib-filters.artist-mode .library-count {
      margin-left: 0;
    }

    .lib-filters.artist-mode #lang-bar,
    .lib-filters.artist-mode #genre-bar,
    .lib-filters.artist-mode #letter-pop,
    .lib-filters.artist-mode #tag-pop,
    .lib-filters.artist-mode #artist-bar,
    .lib-filters.artist-mode #lib-active {
      display: none;
    }

    @media (prefers-reduced-motion: reduce) {
      .artist-card,
      .artist-hero {
        animation: none;
      }
      .artist-card,
      .artist-card-cover {
        transition: none;
      }
    }

    @media (max-width: 560px) {
      .artist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
      .artist-card { padding: 14px 8px 12px; border-radius: 16px; }
      .artist-card-cover { width: min(100%, 112px); font-size: 2rem; }
      .artist-hero { padding: 10px 14px 18px; border-radius: 18px; }
      .artist-hero-main { flex-direction: column; gap: 14px; text-align: center; }
      .artist-hero-cover { width: 132px; font-size: 2.8rem; }
      .artist-hero-name { margin-bottom: 12px; }
      .artist-stats,
      .artist-hero-tags,
      .artist-hero-actions { justify-content: center; }
      .artist-play,
      .artist-share { flex: 1 1 0; padding: 0 14px; }
      .lib-filters.artist-mode .lib-artist-tracks { flex: 1 1 100%; }
      .library-tabs { flex-wrap: nowrap; width: 100%; }
      .library-tab { flex: 1 1 auto; min-width: 0; padding: 10px 6px; font-size: 0.82rem; white-space: nowrap; }
      .lib-filters { gap: 8px; padding: 8px; }
      .lib-filter-row { gap: 6px; }
      .seg { width: 100%; }
      .seg .chip { flex: 1 1 0; min-width: 0; padding: 4px 6px; font-size: 0.78rem; }
      .lib-pop { display: contents; }
      .lib-pop-panel {
        position: static;
        order: 10;
        flex: 0 0 100%;
        width: auto;
        max-width: none;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
      }
      .lib-pop-letters { width: auto; }
    }

    .track-list {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(min(480px, 100%), 1fr));
      gap: 12px;
      padding: 14px 14px 16px;
      min-height: 120px;
    }

    .track-row {
      display: grid;
      grid-template-columns: 24px 64px 1fr auto;
      grid-template-areas:
        "index cover meta meta"
        "index cover likes actions";
      align-items: center;
      row-gap: 8px;
      column-gap: 12px;
      padding: 12px 14px;
      border-radius: 14px;
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(236, 72, 153, 0.03) 100%);
      border: 1px solid rgba(99, 102, 241, 0.2);
      transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
      animation: trackRowIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
      cursor: pointer;
    }

    .track-row.skeleton {
      cursor: default;
    }

    @keyframes trackRowIn {
      from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .track-row.skeleton {
      pointer-events: none;
      background: linear-gradient(100deg,
        rgba(99, 102, 241, 0.06) 30%,
        rgba(99, 102, 241, 0.16) 50%,
        rgba(99, 102, 241, 0.06) 70%);
      background-size: 250% 100%;
      animation: trackRowIn 0.3s ease both, skeletonShimmer 1.3s ease-in-out infinite;
    }

    .skeleton-block {
      background: rgba(255,255,255,0.08);
      border-radius: 8px;
    }

    @keyframes skeletonShimmer {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    .track-row:hover {
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(236, 72, 153, 0.08) 100%);
      border-color: rgba(99, 102, 241, 0.6);
      box-shadow: 0 8px 32px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255,255,255,0.1);
      transform: translateY(-3px) translateX(2px);
    }

    .track-row:hover .track-cover {
      transform: scale(1.08) rotateY(5deg);
      box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
    }

    .track-index {
      grid-area: index;
      font-size: 0.88rem;
      color: rgba(255,255,255,0.48);
      text-align: center;
      font-weight: 600;
    }

    .track-cover {
      grid-area: cover;
      width: 64px;
      height: 64px;
      border-radius: 14px;
      background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
      position: relative;
      box-shadow: 0 4px 16px rgba(0,0,0,0.3), inset 0 0 20px rgba(255,255,255,0.1);
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      overflow: hidden;
    }

    .track-cover::before {
      content: "";
      position: absolute;
      inset: 12px;
      border-radius: 8px;
      background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3) 0%, transparent 50%),
                  radial-gradient(circle, rgba(20,20,20,0.9) 0%, rgba(10,10,10,0.95) 100%);
      border: 1.5px solid rgba(255,255,255,0.15);
    }

    .track-cover::after {
      content: "🎵";
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.6rem;
      opacity: 0;
      transition: all 0.3s ease;
    }

    .track-row:hover .track-cover::after { opacity: 1; }

    .track-cover.c1 { background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%); }
    .track-cover.c2 { background: linear-gradient(135deg, #60a5fa 0%, #34d399 100%); }
    .track-cover.c3 { background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%); }
    .track-cover.c4 { background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%); }

    .track-cover.has-image {
      background-size: cover;
      background-position: center;
    }

    .track-cover.has-image::before,
    .track-cover.has-image::after {
      content: none;
    }

    .track-meta {
      grid-area: meta;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
      color: rgba(255,255,255,0.9);
    }

    .track-meta > .track-titles {
      min-width: 0;
      flex: 1 1 auto;
    }

    .track-uploader {
      flex-shrink: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 6px;
      max-width: 122px;
      padding: 3px 10px 3px 3px;
      border-radius: 999px;
      background: rgba(10, 14, 30, 0.55);
      border: 1px solid rgba(255,255,255,0.14);
      color: var(--text-soft);
      font-size: 0.7rem;
      font-weight: 600;
      text-decoration: none;
      transition: all 0.2s ease;
    }

    .track-uploader:hover {
      background: rgba(99, 102, 241, 0.4);
      border-color: rgba(99, 102, 241, 0.7);
      color: var(--text);
    }

    .uploader-avatar {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      flex-shrink: 0;
      background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
      background-size: cover;
      background-position: center;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.58rem;
      font-weight: 800;
      color: #fff;
    }

    .uploader-name {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      min-width: 0;
    }

    .uploader-badge {
      flex-shrink: 0;
      font-size: 0.78rem;
      line-height: 1;
    }

    a.track-name {
      display: block;
      text-decoration: none;
    }

    .track-name {
      font-weight: 700;
      font-size: 1.08rem;
      letter-spacing: -0.02em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .track-sub {
      font-size: 0.78rem;
      color: rgba(255,255,255,0.6);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .track-lyric {
      display: -webkit-box;
      margin-top: 2px;
      font-size: 0.76rem;
      font-style: italic;
      line-height: 1.35;
      color: rgba(196,181,253,0.85);
      overflow: hidden;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow-wrap: anywhere;
    }

    .tag-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .genre-bar .tag-filter-chip.active {
      border-color: rgba(52, 211, 153, 0.7);
    }

    .track-tag.track-genre {
      border-color: rgba(52, 211, 153, 0.5);
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(99, 102, 241, 0.14) 100%);
    }

    .track-tag {
      display: inline-flex;
      align-items: center;
      padding: 2px 9px;
      border-radius: 999px;
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(236, 72, 153, 0.16) 100%);
      border: 1px solid rgba(99, 102, 241, 0.42);
      color: rgba(255, 255, 255, 0.88);
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.2px;
      white-space: nowrap;
    }

    .track-duration {
      grid-area: likes;
      text-align: left;
      font-size: 0.8rem;
      color: rgba(255,255,255,0.75);
      font-weight: 700;
      letter-spacing: 0.3px;
      min-width: 50px;
      display: flex;
      align-items: center;
      gap: 4px;
      flex-wrap: wrap;
      row-gap: 4px;
    }

    .track-actions {
      grid-area: actions;
      display: flex;
      justify-content: flex-end;
      flex-wrap: wrap;
      gap: 8px;
    }

    .track-button {
      min-width: 96px;
      min-height: 36px;
      border: 1.5px solid rgba(99, 102, 241, 0.6);
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(236, 72, 153, 0.15) 100%);
      color: #ffffff;
      border-radius: 10px;
      cursor: pointer;
      font-size: 0.82rem;
      font-weight: 700;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      letter-spacing: 0.4px;
      text-transform: uppercase;
    }

    .track-button:hover {
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(236, 72, 153, 0.3) 100%);
      border-color: rgba(99, 102, 241, 0.9);
      box-shadow: 0 0 25px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
      transform: translateY(-2px);
    }

    .track-button.copied {
      background: linear-gradient(135deg, rgba(52, 211, 153, 0.35) 0%, rgba(52, 211, 153, 0.2) 100%);
      border-color: rgba(52, 211, 153, 0.7);
    }

    .report-button,
    .play-inline-button {
      min-width: 0;
      width: 36px;
      padding: 0;
      font-size: 1rem;
    }

    .report-button {
      border-color: rgba(248, 113, 113, 0.45);
      background: linear-gradient(135deg, rgba(248, 113, 113, 0.14) 0%, rgba(236, 72, 153, 0.1) 100%);
    }

    .report-button:hover {
      border-color: rgba(248, 113, 113, 0.85);
      background: linear-gradient(135deg, rgba(248, 113, 113, 0.3) 0%, rgba(236, 72, 153, 0.2) 100%);
      box-shadow: 0 0 25px rgba(248, 113, 113, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    }

    .play-inline-button {
      border-color: rgba(52, 211, 153, 0.5);
      background: linear-gradient(135deg, rgba(52, 211, 153, 0.16) 0%, rgba(99, 102, 241, 0.1) 100%);
    }

    .play-inline-button:hover {
      border-color: rgba(52, 211, 153, 0.9);
      background: linear-gradient(135deg, rgba(52, 211, 153, 0.32) 0%, rgba(99, 102, 241, 0.2) 100%);
      box-shadow: 0 0 25px rgba(52, 211, 153, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    }

    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(6, 8, 20, 0.72);
      backdrop-filter: blur(4px);
      display: flex;
      align-items: flex-start;
      justify-content: center;
      z-index: 1000;
      padding: 16px;
      overflow-y: auto;
      overscroll-behavior: contain;
      animation: modalFadeIn 0.2s ease both;
    }

    .modal-overlay[hidden] { display: none; }

    .modal-overlay > .modal-box { margin-block: auto; }

    @keyframes modalFadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    .modal-box {
      width: 100%;
      max-width: 420px;
      background: linear-gradient(160deg, #171b3a 0%, #14183a 100%);
      border: 1px solid rgba(99, 102, 241, 0.35);
      border-radius: 18px;
      padding: 24px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03) inset;
      animation: trackRowIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    .modal-box h3 {
      margin: 0 0 6px;
      font-size: 1.2rem;
      font-weight: 800;
      color: var(--text);
    }

    .modal-box p.modal-subtitle {
      margin: 0 0 16px;
      font-size: 0.85rem;
      color: var(--text-soft);
    }

    .modal-box textarea {
      width: 100%;
      min-height: 96px;
      resize: vertical;
      border-radius: 12px;
      border: 1.5px solid var(--line-strong);
      background: rgba(255,255,255,0.04);
      color: var(--text);
      font-family: inherit;
      font-size: 0.9rem;
      padding: 12px;
      box-sizing: border-box;
      transition: border-color 0.2s ease;
    }

    .modal-box textarea:focus {
      outline: none;
      border-color: var(--primary);
    }

    .modal-message {
      margin-top: 10px;
      font-size: 0.82rem;
      min-height: 1.2em;
    }

    .modal-message.error { color: #f87171; }
    .modal-message.success { color: #34d399; }

    .sponsors-list {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px 16px;
      align-items: start;
      max-height: min(440px, 52vh);
      overflow-y: auto;
      overflow-x: hidden;
      margin: 4px 0;
      scrollbar-width: thin;
      scrollbar-color: rgba(99, 102, 241, 0.5) rgba(255,255,255,0.05);
    }

    .sponsors-list::-webkit-scrollbar {
      width: 6px;
    }

    .sponsors-list::-webkit-scrollbar-track {
      background: rgba(255,255,255,0.04);
      border-radius: 8px;
    }

    .sponsors-list::-webkit-scrollbar-thumb {
      background: rgba(99, 102, 241, 0.5);
      border-radius: 8px;
    }

    .sponsors-list::-webkit-scrollbar-thumb:hover {
      background: rgba(99, 102, 241, 0.75);
    }

    .sponsor-item {
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding: 10px 12px;
      border-radius: 10px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.1);
      text-decoration: none;
      transition: all 0.2s ease;
    }

    .sponsor-item:hover {
      background: rgba(99, 102, 241, 0.14);
      border-color: rgba(99, 102, 241, 0.45);
      transform: translateX(2px);
    }

    @media (min-width: 641px) {
      .modal-box.sponsors-wide {
        max-width: 860px;
      }

      .sponsors-list.two-columns {
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
      }
    }

    .sponsor-column {
      display: flex;
      flex-direction: column;
      gap: 8px;
      min-width: 0;
    }

    .sponsor-group-title {
      font-size: 0.7rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-soft);
      margin: 0 2px;
    }

    .sponsor-name {
      font-weight: 700;
      font-size: 0.92rem;
      color: var(--text);
      overflow-wrap: anywhere;
    }

    .howto-steps {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin: 4px 0 6px;
    }

    .howto-step {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 12px;
      border-radius: 12px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.1);
    }

    .howto-step-num {
      flex-shrink: 0;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.35) 0%, rgba(236, 72, 153, 0.25) 100%);
      border: 1px solid rgba(99, 102, 241, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 0.82rem;
      color: var(--text);
    }

    .howto-step-text {
      font-size: 0.85rem;
      color: var(--text-muted);
      line-height: 1.4;
      padding-top: 3px;
    }

    a.modal-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      box-sizing: border-box;
    }

    .modal-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      margin-top: 18px;
    }

    .modal-btn {
      min-height: 40px;
      padding: 0 18px;
      border-radius: 10px;
      font-size: 0.85rem;
      font-weight: 700;
      cursor: pointer;
      border: 1.5px solid var(--line-strong);
      background: transparent;
      color: var(--text);
      transition: all 0.2s ease;
    }

    .modal-btn.primary {
      border-color: rgba(99, 102, 241, 0.7);
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.35) 0%, rgba(236, 72, 153, 0.25) 100%);
    }

    .modal-btn.primary:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }

    .modal-btn:hover:not(:disabled) {
      transform: translateY(-1px);
      border-color: rgba(255,255,255,0.4);
    }

    .toast-container {
      position: fixed;
      top: 16px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 2000;
      display: flex;
      flex-direction: column;
      gap: 10px;
      align-items: center;
      width: 100%;
      max-width: 460px;
      padding: 0 16px;
      box-sizing: border-box;
      pointer-events: none;
    }

    .toast {
      pointer-events: auto;
      width: auto;
      max-width: 100%;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 14px;
      border-radius: 12px;
      background: linear-gradient(160deg, #171b3a 0%, #14183a 100%);
      border: 1px solid rgba(99, 102, 241, 0.4);
      box-shadow: 0 12px 40px rgba(0,0,0,0.45);
      color: var(--text);
      font-size: 0.86rem;
      line-height: 1.4;
      animation: toastIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    .toast.error { border-color: rgba(248, 113, 113, 0.55); }
    .toast.success { border-color: rgba(52, 211, 153, 0.55); }
    .toast.info { border-color: rgba(99, 102, 241, 0.55); }

    .toast.leaving {
      animation: toastOut 0.2s ease forwards;
    }

    .toast-icon { flex-shrink: 0; font-size: 1.05rem; }
    .toast-text { flex: 0 1 auto; min-width: 0; word-break: break-word; }

    .toast-close {
      background: none;
      border: none;
      color: var(--text-soft);
      cursor: pointer;
      font-size: 0.95rem;
      padding: 0;
      line-height: 1;
      flex-shrink: 0;
      width: 26px;
      height: 26px;
      margin: -3px -5px -3px 0;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 7px;
    }

    .toast-close:hover {
      color: var(--text);
      background: rgba(255, 255, 255, 0.08);
    }

    @keyframes toastIn {
      from { opacity: 0; transform: translateY(-14px) scale(0.96); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    @keyframes toastOut {
      from { opacity: 1; transform: translateY(0) scale(1); }
      to { opacity: 0; transform: translateY(-14px) scale(0.96); }
    }

    .search-hint {
      margin: 0 0 12px;
      padding: 10px 14px;
      border-radius: 10px;
      border: 1px solid rgba(99, 102, 241, 0.35);
      background: rgba(99, 102, 241, 0.12);
      color: var(--text-soft, rgba(255,255,255,0.75));
      font-size: 0.85rem;
      text-align: center;
    }

    .empty-state-row, .loading-state-row {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 120px;
      color: var(--text-muted);
      font-size: 0.9rem;
      text-align: center;
      padding: 24px;
    }

    .pagination {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 16px 14px 18px;
    }

    .pagination[hidden] { display: none; }

    .page-btn {
      min-width: 36px;
      min-height: 36px;
      padding: 0 10px;
      border-radius: 10px;
      border: 1px solid rgba(99, 102, 241, 0.3);
      background: rgba(99, 102, 241, 0.1);
      color: var(--text-muted);
      cursor: pointer;
      font-size: 0.85rem;
      font-weight: 600;
      transition: all 0.2s ease;
    }

    .page-btn:hover:not(:disabled) {
      background: rgba(99, 102, 241, 0.25);
      color: var(--text);
      border-color: rgba(99, 102, 241, 0.6);
    }

    .page-btn:disabled {
      opacity: 0.35;
      cursor: not-allowed;
    }

    .page-status {
      font-size: 0.82rem;
      color: var(--text-soft);
      min-width: 90px;
      text-align: center;
    }

    .menu-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0, 0, 0, 0.4);
      backdrop-filter: blur(2px);
      z-index: 998;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .menu-overlay.active {
      opacity: 1;
      pointer-events: all;
    }

    @media (max-width: 1000px) {
      @keyframes slideInRight {
        from { transform: translateX(100%); opacity: 0; }
        to { transform: translateX(0); opacity: 1; }
      }

      @keyframes slideOutRight {
        from { transform: translateX(0); opacity: 1; }
        to { transform: translateX(100%); opacity: 0; }
      }

      .nav.mobile-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: fixed;
        top: 0; right: 0; left: 0; bottom: 0;
        width: 100%;
        height: 100vh;
        overflow-x: hidden;
        background: rgba(10, 12, 20, 0.35);
        padding: 55px 14px 16px;
        gap: 4px;
        z-index: 999;
        animation: slideInRight 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        backdrop-filter: blur(20px);
        overflow-y: auto;
      }

      .nav.left:not(.mobile-open) {
        animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
      }

      .nav.left.mobile-open .nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 12px;
        right: 14px;
        width: 36px;
        height: 36px;
        border-radius: 8px;
        border: 1px solid rgba(99, 102, 241, 0.4);
        background: rgba(99, 102, 241, 0.12);
        color: var(--text);
        font-size: 1rem;
        cursor: pointer;
      }

      .nav.left.mobile-open .nav.right {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
        padding-top: 12px;
        justify-content: flex-start;
        border-top: 1px solid rgba(255,255,255,0.08);
      }

      .nav.left.mobile-open .nav-dropdown {
        display: flex;
        flex-direction: column;
        width: 100%;
      }

      .nav-item {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 12px 14px;
        font-size: 0.92rem;
        letter-spacing: 0;
        text-transform: none;
        font-weight: 600;
        border-radius: 10px;
        color: var(--text-muted);
        border: 1px solid transparent;
        background: transparent;
        box-shadow: none;
        transition: all 0.2s ease;
      }

      .nav-item:hover {
        background: rgba(99, 102, 241, 0.12);
        color: var(--text);
        border-color: transparent;
      }

      .nav-item.active {
        background: rgba(99, 102, 241, 0.16);
        border-color: transparent;
        color: var(--primary);
        border-left: 3px solid var(--primary);
        padding-left: 11px;
        box-shadow: none;
      }

      .nav.left.mobile-open .dropdown-menu {
        position: static;
        opacity: 1;
        pointer-events: auto;
        display: none;
        min-width: 0;
        width: 100%;
        margin: 4px 0 0;
        padding: 2px 0 2px 14px;
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
      }

      .nav.left.mobile-open .dropdown-menu.show {
        display: flex;
        flex-direction: column;
      }

      .nav.left.mobile-open .dropdown-menu a {
        padding: 10px 12px;
        font-size: 0.85rem;
        border-left: 2px solid rgba(255,255,255,0.1);
      }
    }

    @media (max-width: 760px) {
      .page {
        width: min(100vw, calc(100vw - 20px));
        margin: 12px auto 16px;
        border-radius: 16px;
      }

      .topbar { padding: 12px 14px 10px; gap: 10px; }
      .brand { min-width: auto; gap: 8px; font-size: 0.95rem; }
      .brand-svg.compact { width: 92px; }
      .top-actions { gap: 6px; }
      .profile-btn { padding: 0; width: 40px; height: 40px; justify-content: center; gap: 0; }
      .profile-name { display: none; }
      .profile-label { display: none; }

      * { backdrop-filter: none !important; }

      .top-actions {
        gap: 8px;
        margin-left: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
      }

      .library-head { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
      .library-head > div:first-child { flex: 0 0 auto; }
      .library-search-group { flex: 0 0 auto; max-width: none; margin-left: 0; }
      .library-search-group .ai-open-btn { width: auto; padding: 0 14px; }

      .track-list {
        grid-template-columns: 1fr;
      }

      .letter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 10px;
      }

      .letter-bar::-webkit-scrollbar {
        display: none;
      }

      .letter-chip {
        flex: 0 0 auto;
      }
    }


    @media (max-width: 480px) {
      .profile-name {
        max-width: 60px;
      }

      .track-cover { width: 48px; height: 48px; }

      .track-name { font-size: 0.95rem; }

      .track-button {
        min-width: 0;
        min-height: 30px;
        padding: 0 10px;
        font-size: 0.72rem;
      }

      .report-button,
    .play-inline-button {
        width: 30px;
      }

      .track-uploader {
        max-width: 88px;
        font-size: 0.62rem;
      }

      .uploader-avatar {
        width: 15px;
        height: 15px;
      }

      .library-head h1 { font-size: 1.5rem; }
    }

    @media (max-width: 560px) {
      .track-row {
        grid-template-columns: 22px 52px minmax(0, 1fr);
        grid-template-areas:
          "index cover meta"
          "index cover likes"
          "actions actions actions";
        column-gap: 10px;
        row-gap: 6px;
        padding: 10px 12px;
      }

      .track-index { font-size: 0.75rem; }

      .track-cover { width: 52px; height: 52px; border-radius: 12px; }

      .track-uploader {
        max-width: none;
        flex: 0 0 auto;
        padding: 3px;
      }

      .uploader-name { display: none; }

      .track-duration {
        font-size: 0.75rem;
        flex-wrap: wrap;
        row-gap: 4px;
      }

      .track-tag {
        font-size: 0.62rem;
        padding: 2px 7px;
      }

      .track-actions {
        flex-wrap: nowrap;
        gap: 6px;
      }

      .track-button {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 34px;
        padding: 0 8px;
        font-size: 0.72rem;
        white-space: nowrap;
      }

      .report-button,
      .play-inline-button {
        flex: 0 0 auto;
        width: 34px;
      }

      .track-row.skeleton > .skeleton-block:nth-last-child(2) { grid-area: likes; }
      .track-row.skeleton > .skeleton-block:last-child { grid-area: actions; }
    }

    @media (max-width: 340px) {
      .topbar { padding: 10px 6px 8px; gap: 6px; }

      .brand-svg.compact { width: 58px; }

      .top-actions { gap: 4px; }

      .lang-btn,
      .profile-btn,
      .menu-toggle {
        width: 32px;
        height: 32px;
      }

      .at-trigger-btn {
        height: 32px;
        padding: 0 8px;
      }
    }

    @media (max-width: 300px) {
      .track-uploader { display: none; }

      .track-actions { gap: 4px; }

      .track-button {
        padding: 0 4px;
        font-size: 0.62rem;
        letter-spacing: 0;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .report-button,
      .play-inline-button {
        width: 30px;
      }
    }

    .track-cover.sound-cover.drawn {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .track-cover.sound-cover.drawn::before,
    .track-cover.sound-cover.drawn::after {
      content: none;
    }

    .track-cover.sound-cover.drawn span {
      font-size: 1.3rem;
      font-weight: 800;
      letter-spacing: 0.5px;
      color: rgba(255, 255, 255, 0.95);
      text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    .sound-cover.tone-0 { background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%); }
    .sound-cover.tone-1 { background: linear-gradient(135deg, #60a5fa 0%, #34d399 100%); }
    .sound-cover.tone-2 { background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%); }
    .sound-cover.tone-3 { background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%); }
    .sound-cover.tone-4 { background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%); }
    .sound-cover.tone-5 { background: linear-gradient(135deg, #f87171 0%, #fb923c 100%); }
    .sound-cover.tone-6 { background: linear-gradient(135deg, #4ade80 0%, #0ea5e9 100%); }
    .sound-cover.tone-7 { background: linear-gradient(135deg, #818cf8 0%, #22d3ee 100%); }

    .track-list > .order-hint, .track-list > .order-hint ~ .empty-state-row, .track-list > .empty-state-row:has(+ .order-hint) { grid-column: 1 / -1; }

    .order-hint {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      margin: 4px auto 8px;
      max-width: 560px;
      padding: 18px 20px;
      border-radius: 16px;
      border: 1px solid rgba(168, 85, 247, 0.35);
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(236, 72, 153, 0.08) 100%);
      text-align: center;
    }

    .order-hint p { margin: 0; color: var(--text-muted); line-height: 1.5; font-size: 0.92rem; }

    .order-hint-btn {
      display: inline-flex;
      align-items: center;
      min-height: 42px;
      padding: 0 20px;
      border-radius: 12px;
      background: var(--grad-1);
      color: #fff;
      font-weight: 700;
      text-decoration: none;
      box-shadow: 0 8px 24px rgba(168, 85, 247, 0.3);
    }

    .order-hint-btn:hover { filter: brightness(1.08); }

    .track-dead {
      display: inline-flex;
      align-self: flex-start;
      margin-top: 3px;
      padding: 1px 8px;
      border-radius: 999px;
      background: rgba(248, 113, 113, 0.14);
      color: #fca5a5;
      font-size: 0.72rem;
      font-weight: 700;
      cursor: help;
    }

