  
  :root{
    --bg:#0a0e0d;
    --bg-2:#0d1211;
    --surface:#121715;
    --surface-2:#181f1c;
    --surface-3:#212a26;
    --border:#1f2925;
    --border-soft:#171f1c;
    --text:#eef6f3;
    --text-muted:#8ea39b;
    --text-faint:#54655d;
    --accent:#5eead4;
    --accent-deep:#22c3a6;
    --mood-cheerful:#ffd166;
    --mood-upbeat:#ff8a5c;
    --mood-calm:#5eead4;
    --mood-sad:#7c9cff;
    --mood-romantic:#ff6fa5;
    --mood-thoughtful:#b18aff;
    --online:#57e08a;
    --offline:#ff6b6b;
    --warn:#ffb454;
    --r-sm:10px;
    --r-md:14px;
    --r-lg:22px;
    --r-pill:999px;
    --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:24px; --sp-6:32px; --sp-7:48px; --sp-8:64px;
    --shadow-lift: 0 20px 50px -20px rgba(0,0,0,.6);
    --font-display:'Unbounded', 'Segoe UI', sans-serif;
    --font-body:'Manrope', 'Segoe UI', sans-serif;
    --font-mono:'JetBrains Mono', ui-monospace, monospace;
  }

  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  body{
    background:var(--bg);
    color:var(--text);
    font-family:var(--font-body);
    -webkit-font-smoothing:antialiased;
    overflow:hidden;
    height:100vh;
    width:100vw;
    position:relative;
  }
  h1,h2,h3,h4{font-family:var(--font-display); margin:0; text-wrap:balance; font-weight:700;}
  p{margin:0;}
  button{font-family:inherit; color:inherit; background:none; border:none; cursor:pointer; -webkit-tap-highlight-color:transparent;}
  input,select{font-family:inherit; color:inherit; background:none; border:none;}
  input:focus, button:focus-visible{outline:none;}
  button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible{
    outline:2px solid var(--accent); outline-offset:2px; border-radius:6px;
  }
  ::selection{background:var(--accent); color:#04231d;}
  .mono{font-family:var(--font-mono); font-variant-numeric:tabular-nums;}
  .hidden{display:none !important;}
  .icon{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;display:block;flex:none;}
  .icon-fill{fill:currentColor;stroke:none;}
  a{color:inherit;}

  @media (prefers-reduced-motion: reduce){
    *{animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important;}
  }

  .scroll{overflow-y:auto; scrollbar-width:thin; scrollbar-color:var(--surface-3) transparent;}
  .scroll::-webkit-scrollbar{width:8px;}
  .scroll::-webkit-scrollbar-thumb{background:var(--surface-3); border-radius:8px;}
  .scroll-x{scrollbar-width:thin; scrollbar-color:var(--surface-3) transparent;}
  .scroll-x::-webkit-scrollbar{height:8px;}
  .scroll-x::-webkit-scrollbar-thumb{background:var(--surface-3); border-radius:8px;}

  .sprite{position:absolute; width:0; height:0; overflow:hidden;}

  
  #auth{
    position:fixed; inset:0; z-index:50;
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:22px;
    background:var(--bg);
    overflow:hidden;
  }
  #auth::before{
    content:''; position:absolute; inset:0; z-index:0;
    background:
      radial-gradient(ellipse 60% 46% at 50% 4%, rgba(94,234,212,.16), transparent 62%),
      linear-gradient(180deg, rgba(10,14,13,.1) 0%, rgba(10,14,13,.5) 45%, var(--bg) 90%);
    pointer-events:none;
  }
  .auth-term-flavor{
    position:absolute; top:26px; left:30px; z-index:2;
    font-family:var(--font-mono); font-size:12.5px; line-height:1.7; color:var(--text-faint); opacity:.6;
    pointer-events:none;
  }
  .auth-term-flavor .p1{color:var(--accent); opacity:.85;}

  #authArc{
    position:absolute; inset:0; z-index:1; overflow:hidden;
    -webkit-mask-image:linear-gradient(100deg, black, black 46%, transparent 82%);
    mask-image:linear-gradient(100deg, black, black 46%, transparent 82%);
  }
  .arc-wrap{
    position:absolute; left:-300px; top:50%; width:600px; height:600px;
    animation:arcspin 150s linear infinite;
  }
  @keyframes arcspin{from{transform:translateY(-50%) rotate(0deg);} to{transform:translateY(-50%) rotate(360deg);}}
  .arc-tile{
    position:absolute; width:58px; height:58px; border-radius:10px;
    background-size:cover; background-position:center;
    box-shadow:0 10px 26px -10px rgba(0,0,0,.8);
    border:1px solid rgba(255,255,255,.07); opacity:.92;
    animation:arcspinrev 150s linear infinite;
  }
  @keyframes arcspinrev{from{transform:rotate(0deg);} to{transform:rotate(-360deg);}}

  .auth-card{
    position:relative; z-index:3;
    display:flex; flex-direction:column; align-items:center; text-align:center;
    width:min(92vw, 440px);
    padding:34px 32px 30px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:20px;
  }
  .auth-tag{position:absolute; top:16px; right:18px; font-family:var(--font-mono); font-size:10.5px; letter-spacing:.18em; color:var(--text-faint); text-transform:uppercase;}
  .mascot{width:62px; height:62px; margin-bottom:14px; filter:drop-shadow(0 10px 22px rgba(94,234,212,.3));}
  .mascot-lid{transform-origin:center;}
  .brand-row{display:flex; align-items:baseline; gap:9px; margin-bottom:6px;}
  .brand-word{font-family:var(--font-display); font-weight:800; font-size:27px; color:var(--text); letter-spacing:.01em;}
  .brand-ver{font-family:var(--font-mono); font-size:13px; font-weight:700; color:var(--accent); background:rgba(94,234,212,.12); padding:2px 9px; border-radius:7px;}
  .auth-sub{font-size:11px; letter-spacing:.13em; text-transform:uppercase; color:var(--text-faint); margin-bottom:26px;}

  .login-form{width:100%; display:flex; flex-direction:column; gap:13px;}
  .field-label{font-size:12px; color:var(--text-muted); text-align:left; margin-bottom:-5px;}
  .field-input{
    width:100%; background:var(--bg-2); border:1px solid var(--border); border-radius:10px;
    padding:12px 14px; font-size:14.5px; color:var(--text); font-family:var(--font-mono);
  }
  .field-input::placeholder{color:var(--text-faint);}
  .field-input:focus{border-color:var(--accent);}

  .term-prompt{display:flex; align-items:center; gap:6px; font-family:var(--font-mono); font-size:13px; color:var(--text-faint); margin:2px 0; justify-content:flex-start;}
  .cursor-blink{width:7px; height:14px; background:var(--accent); animation:blink 1s steps(1) infinite;}
  @keyframes blink{0%,49%{opacity:1;}50%,100%{opacity:0;}}

  .login-error{color:var(--offline); font-size:12.5px; text-align:left; margin:-4px 0 0;}
  .btn-login{
    width:100%; border-radius:12px; padding:14px; background:var(--accent); color:#04231d;
    font-weight:800; font-size:14.5px; letter-spacing:.03em; margin-top:4px; transition:background .15s ease, transform .12s ease;
  }
  .btn-login:hover{background:var(--accent-deep);}
  .btn-login:active{transform:scale(.98);}
  .shake{animation:shake .34s;}
  @keyframes shake{0%,100%{transform:translateX(0);}25%{transform:translateX(-7px);}75%{transform:translateX(7px);}}

  .auth-status-row{position:relative; z-index:3; display:flex; align-items:center; gap:18px; font-size:12px; color:var(--text-faint); flex-wrap:wrap; justify-content:center; max-width:90vw;}
  .status-item{display:flex; align-items:center; gap:6px;}
  .status-item b{color:var(--text-muted); font-weight:600;}
  .status-item .dot{width:7px; height:7px; border-radius:50%; background:var(--online);}
  .status-item .dot.warn{background:var(--warn);}
  .status-item .dot.off{background:var(--offline);}

  @media (max-width:760px){ #authArc{display:none;} }

  
  #app{display:flex; height:100vh; width:100vw;}
  #app.hidden{display:none;}

  .rail{
    width:84px; flex:none; display:flex; flex-direction:column; align-items:center;
    padding:var(--sp-5) 0; gap:var(--sp-6);
    border-right:1px solid var(--border-soft);
    background:var(--bg-2);
  }
  .rail-logo{writing-mode:vertical-rl; text-orientation:mixed; font-family:var(--font-display); font-weight:800; font-size:12px; letter-spacing:.16em; color:var(--text-muted);}
  .rail-nav{display:flex; flex-direction:column; gap:var(--sp-3); flex:1;}
  .rail-btn{
    width:52px; height:52px; border-radius:var(--r-md); display:flex; align-items:center; justify-content:center;
    color:var(--text-faint); position:relative; transition:background .15s ease, color .15s ease;
  }
  .rail-btn .icon{width:21px; height:21px;}
  .rail-btn:hover{color:var(--text); background:var(--surface);}
  .rail-btn.active{color:#04231d; background:var(--accent);}
  .rail-btn.active::before{
    content:''; position:absolute; left:-16px; top:50%; transform:translateY(-50%);
    width:4px; height:22px; border-radius:var(--r-pill); background:var(--accent);
  }

  .main-col{flex:1; min-width:0; display:flex; flex-direction:column; height:100vh;}
  .topbar{display:flex; align-items:center; justify-content:space-between; padding:var(--sp-5) var(--sp-6) var(--sp-4); flex:none;}
  .greet-title{font-size:24px;}
  .greet-title span{color:var(--accent);}
  .greet-sub{color:var(--text-muted); font-size:13.5px; margin-top:2px;}

  .profile-menu-wrap{position:relative;}
  .profile-chip{
    display:flex; align-items:center; gap:var(--sp-2);
    padding:6px 14px 6px 6px; border-radius:var(--r-pill); background:var(--surface);
    border:1px solid var(--border-soft);
  }
  .profile-chip:hover{background:var(--surface-2);}
  .mini-mascot{width:32px; height:32px; flex:none; display:block;}
  .profile-chip .pname{font-size:13.5px; font-weight:600;}
  .profile-chip .icon{width:14px; height:14px; color:var(--text-faint);}
  .role-tag{font-size:9.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--accent); background:rgba(94,234,212,.12); padding:2px 7px; border-radius:999px;}

  .dropdown{
    position:absolute; right:0; top:calc(100% + 8px); z-index:30;
    background:var(--surface-2); border:1px solid var(--border); border-radius:var(--r-md);
    padding:6px; min-width:170px; box-shadow:var(--shadow-lift);
  }
  .dropdown button{display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:10px 12px; border-radius:9px; font-size:13.5px; font-weight:600; color:var(--text-muted);}
  .dropdown button:hover{background:var(--surface-3); color:var(--text);}
  .dropdown .icon{width:16px; height:16px;}

  .content{flex:1; min-height:0; padding:0 var(--sp-6) var(--sp-4); display:flex; flex-direction:column;}
  section.view{flex:1; min-height:0; display:flex; flex-direction:column;}

  
  .search-box-wrap{position:relative; flex:none; margin-bottom:26px;}
  .search-box{
    display:flex; align-items:center; gap:14px;
    background:linear-gradient(180deg, var(--surface-2), var(--surface));
    border:1px solid var(--border-soft); border-radius:18px; padding:9px 18px 9px 9px;
    box-shadow:0 1px 0 rgba(255,255,255,.03) inset, 0 24px 44px -30px rgba(0,0,0,.7);
    transition:border-color .18s ease, box-shadow .18s ease;
  }
  .search-icon-wrap{
    width:38px; height:38px; border-radius:50%; flex:none;
    display:flex; align-items:center; justify-content:center;
    background:rgba(94,234,212,.13); color:var(--accent);
    transition:background .18s ease, transform .18s ease;
  }
  .search-box:focus-within .search-icon-wrap{ background:rgba(94,234,212,.22); transform:scale(1.04); }
  .search-icon-wrap .icon{width:17px; height:17px;}
  .search-box input{flex:1; font-size:16px; font-weight:500;}
  .search-box input::placeholder{color:var(--text-faint); font-weight:400;}
  .search-clear{color:var(--text-faint); display:flex; padding:8px; border-radius:50%; flex:none;}
  .search-clear:hover{color:var(--text); background:var(--surface-3);}

  .search-suggest{
    position:absolute; left:0; right:0; top:calc(100% + 8px); z-index:15;
    background:var(--surface-2); border:1px solid var(--border); border-radius:16px; padding:8px;
    box-shadow:var(--shadow-lift); max-height:280px; overflow-y:auto;
  }
  .suggest-row{display:flex; align-items:center; gap:12px; padding:10px 11px; border-radius:11px; cursor:pointer; font-size:13.5px;}
  .suggest-row:hover{background:var(--surface-3);}
  .suggest-row .s-icon{
    width:28px; height:28px; border-radius:50%; flex:none;
    display:flex; align-items:center; justify-content:center;
    background:var(--surface-3); color:var(--text-faint);
  }
  .suggest-row .s-icon .icon{width:13px; height:13px;}
  .suggest-row b{font-weight:600;}
  .suggest-row .s-artist{color:var(--text-faint); font-size:12px;}

  .search-section{margin-bottom:28px;}
  .search-section:last-of-type{margin-bottom:20px;}
  .recent-label{font-size:11.5px; text-transform:uppercase; letter-spacing:.1em; color:var(--text-faint); font-weight:700; margin-bottom:var(--sp-3);}
  .recent-row{display:flex; flex-wrap:wrap; gap:var(--sp-2);}
  .recent-chip{display:flex; align-items:center; gap:8px; background:var(--surface); border:1px solid var(--border-soft); border-radius:var(--r-pill); padding:8px 8px 8px 16px; font-size:13px; color:var(--text-muted); transition:border-color .15s ease, color .15s ease, transform .15s ease;}
  .recent-chip:hover{color:var(--text); border-color:var(--surface-3); transform:translateY(-1px);}
  .recent-chip .x{width:20px; height:20px; border-radius:var(--r-pill); display:flex; align-items:center; justify-content:center; color:var(--text-faint);}
  .recent-chip .x:hover{background:var(--surface-3); color:var(--text);}
  .recent-chip-empty{color:var(--text-faint); font-size:13.5px;}
  .clear-history{font-size:12px; color:var(--text-faint); font-weight:600; margin-left:var(--sp-1);}
  .clear-history:hover{color:var(--accent);}

  .mood-row{display:flex; flex-wrap:wrap; gap:10px;}
  .mood-chip{
    display:flex; align-items:center; gap:9px; padding:9px 16px 9px 13px; border-radius:var(--r-pill);
    border:1px solid transparent; font-size:13px; font-weight:600; color:var(--text-muted);
    transition:transform .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
  }
  .mood-chip .dot{width:9px; height:9px; border-radius:50%; flex:none;}
  .mood-chip:hover{color:var(--text); transform:translateY(-1px); box-shadow:0 10px 20px -14px rgba(0,0,0,.7);}

  .carousel{display:flex; gap:14px; overflow-x:auto; padding:2px 2px 10px;}
  .carousel-card{flex:none; width:148px; cursor:pointer; transition:transform .15s ease;}
  .carousel-card:hover{transform:translateY(-2px);}
  .carousel-cover{width:148px; height:148px; border-radius:14px; background-size:cover; background-position:center; box-shadow:0 18px 34px -20px rgba(0,0,0,.7);}
  .carousel-card .track-title{margin-top:10px; font-size:13.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .carousel-card .track-artist{font-size:12px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

  .track-list{display:flex; flex-direction:column; gap:2px;}
  .track-row{display:flex; align-items:center; gap:14px; padding:9px 10px; border-radius:var(--r-md); cursor:pointer;}
  .track-row:hover{background:var(--surface);}
  .track-row.playing{background:var(--surface-2);}
  .track-cover{width:46px; height:46px; border-radius:8px; flex:none; background-size:cover; background-position:center; position:relative;}
  .row-eq{position:absolute; inset:0; background:rgba(10,14,13,.5); border-radius:8px; display:none; align-items:flex-end; justify-content:center; gap:3px; padding:10px 0;}
  .track-row.playing .row-eq{display:flex;}
  .row-eq span{width:3px; background:var(--accent); border-radius:2px; height:4px; animation:eqbar 1s ease-in-out infinite;}
  .row-eq span:nth-child(1){animation-delay:-.6s;}
  .row-eq span:nth-child(2){animation-delay:-.2s;}
  .row-eq span:nth-child(3){animation-delay:-.9s;}
  @keyframes eqbar{0%,100%{height:4px;}50%{height:16px;}}

  .track-meta{flex:1; min-width:0;}
  .track-title{font-size:14.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .track-artist{font-size:12.5px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .track-dur{font-size:12px; color:var(--text-faint); flex:none; width:38px; text-align:right;}
  .like-btn,.dl-btn,.dis-btn,.pl-btn{color:var(--text-faint); flex:none; padding:4px; border-radius:8px;}
  .dis-btn:hover{color:var(--offline);}
  .dis-btn.on{color:var(--offline); background:rgba(255,107,107,.12);}
  .dis-btn.on .icon{fill:currentColor;}
  .np-controls .tbtn.np-dislike.on{color:var(--offline);}
  .np-controls .tbtn.np-dislike.on .icon{fill:currentColor;}
  .like-btn:hover{color:var(--mood-romantic);}
  .like-btn.liked{color:var(--mood-romantic);}
  .like-btn.liked .icon{fill:currentColor;}
  .dl-btn:hover{color:var(--accent);}
  .dl-btn.on{color:var(--accent); background:rgba(94,234,212,.12);}
  .empty-state{color:var(--text-faint); font-size:14px; padding:var(--sp-6) 0; text-align:center;}

  .toast{
    position:fixed; left:50%; bottom:100px; z-index:60; max-width:min(420px, 86vw);
    background:var(--surface-2); border:1px solid var(--border-soft); color:var(--text);
    padding:12px 20px; border-radius:12px; font-size:13.5px; text-align:center;
    box-shadow:0 20px 40px -20px rgba(0,0,0,.7);
    opacity:0; pointer-events:none; transform:translate(-50%, 12px);
    transition:opacity .22s ease, transform .22s ease;
  }
  .toast.show{opacity:1; transform:translate(-50%, 0);}

  
  .wave-layout{flex:1; min-height:0; display:grid; grid-template-columns:290px 1fr; gap:20px;}
  .station-list{display:flex; flex-direction:column; gap:6px; padding-right:4px;}
  .station-tile{display:flex; align-items:center; gap:12px; padding:9px; border-radius:14px; cursor:pointer; border:1px solid transparent; text-align:left;}
  .station-tile:hover{background:var(--surface);}
  .station-tile.active{background:var(--surface-2); border-color:var(--border);}
  .station-art{width:42px; height:42px; border-radius:10px; flex:none; display:flex; align-items:center; justify-content:center;}
  .st-label{font-size:13px; font-weight:600; color:var(--text); line-height:1.3;}
  .st-sub{font-size:11px; color:var(--text-faint); margin-top:1px;}

  .wave-hero-panel{position:relative; border-radius:var(--r-lg); overflow:hidden; border:1px solid var(--border-soft); background:var(--surface); display:flex; align-items:center; justify-content:center; min-height:0;}
  .wh-bg{position:absolute; inset:-15%; background-size:cover; background-position:center; filter:blur(64px) saturate(1.4) brightness(.5); transform:scale(1.15);}
  .wh-scrim{position:absolute; inset:0; background:linear-gradient(180deg, rgba(10,14,13,.2), var(--surface) 92%);}
  .wh-empty{position:relative; z-index:2; display:flex; flex-direction:column; align-items:center; gap:12px; color:var(--text-faint); text-align:center; max-width:280px; font-size:13.5px;}
  .wh-content{position:relative; z-index:2; width:min(90%,420px); text-align:center;}
  .wh-eyebrow{font-size:11.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--text-faint); display:flex; align-items:center; justify-content:center; gap:8px; margin-bottom:16px;}
  .wh-eyebrow .dot{width:7px; height:7px; border-radius:50%;}
  .wh-cover{width:150px; height:150px; border-radius:18px; background-size:cover; background-position:center; box-shadow:0 30px 60px -24px rgba(0,0,0,.8); cursor:pointer; margin:0 auto; position:relative; z-index:1;}
  .wh-art-wrap{position:relative; width:150px; height:150px; margin:0 auto; display:flex; align-items:center; justify-content:center;}
  #whEqCanvas{position:absolute; inset:-45%; width:190%; height:190%; z-index:0; pointer-events:none;}
  .wh-title{font-size:22px; margin-top:16px;}
  .wh-artist{color:var(--text-muted); font-size:14px; margin-top:4px;}
  .wh-expand{position:absolute; top:16px; right:16px; z-index:3;}
  .wh-controls{display:flex; align-items:center; justify-content:center; gap:var(--sp-4); margin-top:16px;}
  .wh-next-hint{justify-content:center; margin-top:14px;}

  
  .coll-tabs{display:flex; gap:8px; margin-bottom:18px; flex:none;}
  .coll-tabs-row{display:flex; align-items:center; justify-content:space-between; gap:12px;}
  .coll-tabs-row .coll-tabs{margin-bottom:18px;}
  #downloadAllBtn{display:inline-flex; align-items:center; gap:8px; margin-bottom:18px;}
  .hint{color:var(--text-muted); font-size:13px; margin:-8px 0 14px;}
  .coll-tab{padding:9px 18px; border-radius:999px; background:var(--surface-2); color:var(--text-muted); font-size:13.5px; font-weight:600; border:1px solid var(--border-soft);}
  .coll-tab.active{background:var(--surface-3); color:var(--text); border-color:var(--accent);}

  
  .admin-stats{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-bottom:26px; flex:none;}
  .stat-card{background:var(--surface); border:1px solid var(--border-soft); border-radius:14px; padding:16px 18px; display:flex; flex-direction:column; gap:6px;}
  .stat-num{font-family:var(--font-display); font-size:25px; font-weight:800;}
  .stat-label{font-size:11.5px; color:var(--text-faint);}
  .admin-users-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; flex:none;}
  .btn-add-user{display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:700; color:var(--accent); background:rgba(94,234,212,.1); padding:8px 14px; border-radius:999px;}
  .btn-add-user:hover{background:rgba(94,234,212,.18);}
  .add-user-form{display:grid; grid-template-columns:1fr 1fr 1fr 110px auto; gap:10px; margin-bottom:18px; flex:none; align-items:center;}
  .add-user-form .field-input{padding:10px 12px; font-size:13px;}
  .add-user-form select.field-input{appearance:none; -webkit-appearance:none;}
  .au-submit{padding:10px 18px; white-space:nowrap;}
  .au-error{color:var(--offline); font-size:12px; margin:-8px 0 12px;}
  .users-table{flex:1; min-height:0; border:1px solid var(--border-soft); border-radius:14px;}
  /* Админка целиком скроллится одной колонкой - иначе список топ-треков и
     список пользователей делят высоту (оба flex:1) и налезают друг на друга. */
  #view-admin{display:block; overflow-y:auto; padding-right:4px;}
  #view-admin .users-table{flex:none;}
  #view-admin #topTracks{margin-bottom:24px;}
  #view-admin #adminHealth{flex:none;}
  .user-row{display:flex; align-items:center; gap:14px; padding:12px 16px; border-bottom:1px solid var(--border-soft); font-size:13.5px;}
  .user-row:last-child{border-bottom:none;}
  .u-login{font-weight:700; flex:1; min-width:0;}
  .u-name{color:var(--text-muted); flex:1; min-width:0;}
  .role-badge{font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; padding:3px 9px; border-radius:999px; background:var(--surface-3); color:var(--text-muted); flex:none;}
  .role-badge.admin{background:rgba(94,234,212,.15); color:var(--accent);}

  
  #playerbar{
    flex:none; height:84px; border-top:1px solid var(--border-soft); background:var(--bg-2);
    display:grid; grid-template-columns:1fr minmax(0,640px) 1fr; align-items:center; padding:0 var(--sp-5); gap:var(--sp-4);
  }
  .pb-track{display:flex; align-items:center; gap:12px; min-width:0;}
  .pb-cover{width:52px; height:52px; border-radius:8px; background-size:cover; background-position:center; flex:none; cursor:pointer;}
  .pb-meta{min-width:0;}
  .pb-title{font-size:13.5px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .pb-artist{font-size:12px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .pb-like{color:var(--text-faint); flex:none;}
  .pb-like:hover{color:var(--mood-romantic);}
  .pb-like.liked, .np-controls .tbtn.np-like.liked{color:var(--mood-romantic);}
  .pb-like.liked .icon, .np-controls .tbtn.np-like.liked .icon{fill:currentColor;}

  .pb-center{display:flex; flex-direction:column; align-items:center; gap:6px; min-width:0;}
  .pb-controls{display:flex; align-items:center; gap:var(--sp-4);}
  .tbtn{color:var(--text-muted); display:flex; padding:4px;}
  .tbtn:hover{color:var(--text);}
  .tbtn.play{width:34px; height:34px; border-radius:50%; background:var(--accent); color:#04231d; display:flex; align-items:center; justify-content:center;}
  .tbtn.play:hover{transform:scale(1.05); background:var(--accent-deep);}
  .tbtn.play .icon{width:15px; height:15px;}
  .pb-seek-row{display:flex; align-items:center; gap:10px; width:100%;}
  .time{font-size:11px; color:var(--text-faint); width:36px; flex:none;}
  .time.right{text-align:right;}
  .seek{flex:1; height:14px; display:flex; align-items:center; cursor:pointer; position:relative;}
  .seek-track{width:100%; height:3px; border-radius:2px; background:var(--surface-3); position:relative; overflow:hidden;}
  .seek-fill{position:absolute; inset:0 auto 0 0; width:0%; background:var(--accent); border-radius:2px;}
  .seek-thumb{position:absolute; top:50%; width:11px; height:11px; border-radius:50%; background:#fff; left:0%; transform:translate(-50%,-50%); opacity:0; transition:opacity .12s ease; box-shadow:0 2px 8px rgba(0,0,0,.5);}
  .seek:hover .seek-thumb, .seek.dragging .seek-thumb{opacity:1;}

  .pb-right{display:flex; align-items:center; justify-content:flex-end; gap:var(--sp-4);}
  .vol-wrap{display:flex; align-items:center; gap:8px; width:96px;}
  .vol-wrap .seek-track{height:3px;}
  .vol-wrap .seek{width:100%;}
  .expand-btn{color:var(--text-faint);}
  .expand-btn:hover{color:var(--text);}

  
  #nowplaying{
    position:fixed; inset:0; z-index:40; background:var(--bg); display:flex; flex-direction:column;
    transform:translateY(100%); transition:transform .38s cubic-bezier(.2,.8,.2,1);
  }
  #nowplaying.open{transform:translateY(0);}
  .np-bg{position:absolute; inset:0; z-index:0; overflow:hidden;}
  .np-bg-inner{position:absolute; inset:-10%; background-size:cover; background-position:center; filter:blur(70px) saturate(1.5) brightness(.5); transform:scale(1.15);}
  .np-bg::after{content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(10,14,13,.4), var(--bg) 88%);}

  .np-top{position:relative; z-index:2; display:flex; align-items:center; justify-content:space-between; padding:var(--sp-5) var(--sp-6); flex:none;}
  .np-close{display:flex; align-items:center; gap:8px; color:var(--text-muted); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.08em;}
  .np-close:hover{color:var(--text);}
  .np-source{color:var(--text-faint); font-size:12px;}

  .np-body{position:relative; z-index:2; flex:1; min-height:0; display:flex; align-items:center; justify-content:center; gap:var(--sp-8); padding:0 var(--sp-8);}
  .np-art-wrap{position:relative; width:min(38vw, 380px); flex:none; display:flex; align-items:center; justify-content:center;}
  #eqCanvas{position:absolute; inset:-22%; width:144%; height:144%; z-index:0; pointer-events:none;}
  .np-cover{width:100%; aspect-ratio:1; border-radius:var(--r-lg); background-size:cover; background-position:center; position:relative; z-index:1; box-shadow:0 40px 80px -30px rgba(0,0,0,.8);}

  .np-info{width:460px; max-width:460px; min-width:0; text-align:center;}
  .np-eyebrow{font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--text-faint); margin-bottom:var(--sp-3); display:flex; align-items:center; justify-content:center; gap:8px;}
  .np-eyebrow .dot{width:7px; height:7px; border-radius:50%;}
  .np-title{font-size:clamp(28px, 4vw, 46px); line-height:1.08; margin-bottom:var(--sp-2);}
  .np-artist{font-size:18px; color:var(--text-muted); margin-bottom:var(--sp-6);}

  .np-seek{margin-bottom:var(--sp-5);}
  .np-seek .seek-track{height:5px;}
  .np-seek .seek-thumb{width:13px; height:13px; opacity:1;}
  .np-times{display:flex; justify-content:space-between; margin-top:8px;}
  .np-times .time{font-size:12.5px;}

  .np-controls{display:flex; align-items:center; justify-content:center; gap:var(--sp-5); margin-bottom:var(--sp-5);}
  .np-vol-row{display:flex; align-items:center; gap:12px; max-width:260px; margin:0 auto;}
  .np-vol-row .seek{flex:1;}

  .np-queue{
    position:fixed; top:0; right:0; height:100%; width:min(360px, 88vw); z-index:45;
    background:var(--surface); border-left:1px solid var(--border-soft);
    display:flex; flex-direction:column; padding:var(--sp-5);
    transform:translateX(100%); transition:transform .28s cubic-bezier(.2,.8,.2,1);
    box-shadow:-30px 0 60px -30px rgba(0,0,0,.6);
  }
  .np-queue.open{transform:translateX(0);}
  .np-queue-head{display:flex; align-items:center; justify-content:space-between; font-weight:700; margin-bottom:var(--sp-4); flex:none;}
  .np-queue-list{flex:1; min-height:0; display:flex; flex-direction:column; gap:2px;}
  .np-queue-item{display:flex; align-items:center; gap:12px; padding:8px; border-radius:var(--r-md); cursor:pointer;}
  .np-queue-item:hover{background:var(--surface-2);}
  .np-queue-item.playing{background:var(--surface-2);}
  .np-queue-item.playing .np-queue-title{color:var(--accent);}
  .np-queue-cover{width:40px; height:40px; border-radius:8px; flex:none; background-size:cover; background-position:center;}
  .np-queue-meta{min-width:0;}
  .np-queue-title{font-size:13.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .np-queue-artist{font-size:12px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  @media (max-width:720px){ .np-queue{width:100vw;} }
  .np-controls .tbtn{color:var(--text-muted);}
  .np-controls .tbtn.play{width:56px; height:56px;}
  .np-controls .tbtn.play .icon{width:22px; height:22px;}
  .np-controls .tbtn:not(.play):not(.liked):hover{color:var(--text);}
  .np-controls .tbtn.liked:hover{color:var(--mood-romantic);}
  .np-controls .tbtn.dl-btn.on{color:var(--accent); background:none;}
  .np-controls .icon{width:19px; height:19px;}

  .np-next-hint{display:flex; align-items:center; justify-content:center; gap:10px; color:var(--text-faint); font-size:12.5px;}
  .np-next-hint b{color:var(--text-muted); font-weight:700;}

  @media (max-width: 900px){
    .rail{width:64px;}
    .rail-logo{display:none;}
    .np-body{flex-direction:column; gap:var(--sp-5); padding:0 var(--sp-5); justify-content:flex-start; padding-top:var(--sp-4);}
    .np-art-wrap{width:min(64vw, 280px);}
    .np-info{width:100%; max-width:100%;}
    #playerbar{grid-template-columns:auto 1fr auto; padding:0 var(--sp-3);}
    .pb-seek-row{display:none;}
    .vol-wrap{display:none;}
    .wave-layout{grid-template-columns:1fr; grid-template-rows:auto 1fr;}
    .station-list{flex-direction:row; overflow-x:auto; max-height:96px;}
    .station-tile{flex-direction:column; width:88px; text-align:center;}
    .add-user-form{grid-template-columns:1fr; }
  }
  
  .track-row{padding:10px 12px; gap:16px;}
  .track-row .track-cover{width:52px; height:52px; border-radius:10px; box-shadow:0 8px 18px -10px rgba(0,0,0,.6);}
  .track-row:hover{background:var(--surface-2); transform:translateX(2px);}
  .track-row{transition:background .14s ease, transform .14s ease;}
  .track-row .track-title{font-size:14.5px;}
  .track-row .track-artist{font-size:12.5px;}
  .track-row .like-btn.liked, .track-row .dl-btn.on{color:var(--accent);}

  .artist-link{cursor:pointer;}
  .artist-link:hover{color:var(--accent); text-decoration:underline;}
  .artist-sep{color:var(--text-muted);}

  .back-btn{display:inline-flex; align-items:center; gap:6px; background:none; border:none; color:var(--text-muted); font-size:13.5px; cursor:pointer; padding:var(--sp-2) 0; margin-bottom:var(--sp-3);}
  .back-btn:hover{color:var(--text);}
  .songs-head{display:flex; align-items:center; justify-content:space-between; gap:var(--sp-3);}
  .all-songs-btn{background:none; border:1px solid var(--border); color:var(--text-muted); font-size:12.5px; cursor:pointer; padding:5px 12px; border-radius:999px; white-space:nowrap;}
  .all-songs-btn:hover{color:var(--text); border-color:var(--text-muted);}
  .all-songs-btn:disabled{opacity:.5; cursor:default;}

  .artist-header{display:flex; align-items:center; gap:var(--sp-4); margin-bottom:var(--sp-4);}
  .artist-header .artist-cover{width:96px; height:96px; border-radius:50%; background-size:cover; background-position:center; background-color:var(--surface-2); flex:none;}
  .artist-header h2{margin:0 0 4px; font-size:22px;}
  .artist-header h3{margin:0 0 4px; font-size:18px;}

  .album-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:var(--sp-4); margin-bottom:var(--sp-5);}
  .album-card{cursor:pointer; transition:transform .15s ease;}
  .album-card:hover{transform:translateY(-2px);}
  .album-card .album-cover{width:100%; aspect-ratio:1; border-radius:var(--r-md); background-size:cover; background-position:center; background-color:var(--surface-2); box-shadow:0 8px 18px -10px rgba(0,0,0,.6);}
  .album-card .album-title{margin:10px 0 2px; font-size:13.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .album-card .album-year{margin:0; font-size:12px; color:var(--text-muted);}

  
  .import-card{
    background:var(--surface); border:1px solid var(--border-soft); border-radius:var(--r-lg);
    padding:28px; max-width:640px;
  }
  .import-card h3{font-size:17px; margin-bottom:8px;}
  .import-card p.hint{color:var(--text-muted); font-size:13.5px; margin-bottom:18px; line-height:1.55;}
  .import-row{display:flex; gap:10px;}
  .import-row .field-input{flex:1;}
  .btn-secondary{
    border-radius:12px; padding:12px 22px; background:var(--surface-3); color:var(--text);
    font-weight:700; font-size:13.5px; white-space:nowrap; transition:background .15s ease;
  }
  .btn-secondary:hover{background:var(--surface-2);}
  .btn-secondary:disabled{opacity:.5; cursor:default;}
  .import-result{margin-top:20px; font-size:13.5px; color:var(--text-muted);}
  .import-result b{color:var(--text);}
  .import-not-matched{margin-top:10px; font-size:12.5px; color:var(--text-faint); max-height:160px; overflow-y:auto;}

  
  .admin-stats{display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:14px; margin-bottom:32px;}
  .stat-card{background:var(--surface); border:1px solid var(--border-soft); border-radius:16px; padding:20px;}
  .stat-num{display:block; font-family:var(--font-display); font-size:28px; font-weight:800; color:var(--accent);}
  .stat-label{font-size:12px; color:var(--text-muted); margin-top:4px; display:block;}
  .admin-users-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:14px;}
  .btn-add-user{display:flex; align-items:center; gap:8px; background:var(--surface-3); padding:9px 16px; border-radius:12px; font-weight:700; font-size:13px;}
  .btn-add-user:hover{background:var(--surface-2);}
  .add-user-form{display:grid; grid-template-columns:1fr 1fr 1fr auto auto; gap:10px; margin-bottom:14px; align-items:center;}
  .add-user-form .field-input{padding:10px 12px; font-size:13.5px;}
  .au-submit{padding:10px 18px; font-size:13px;}
  .au-error{color:var(--offline); font-size:12.5px; margin-bottom:14px;}
  .users-table{display:flex; flex-direction:column; gap:2px;}
  .user-row{display:grid; grid-template-columns:1fr 1fr auto auto; gap:12px; padding:12px 14px; border-radius:10px; align-items:center; font-size:13.5px;}
  .user-row:nth-child(odd){background:var(--surface);}
  .user-row.blocked{opacity:.55;}
  .u-login{font-weight:700;}
  .u-name{color:var(--text-muted);}
  .u-badges{display:flex; gap:6px; justify-self:start;}
  .role-badge{font-size:10.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; padding:3px 9px; border-radius:999px; background:var(--surface-3); color:var(--text-muted);}
  .role-badge.admin{background:rgba(94,234,212,.16); color:var(--accent);}
  .role-badge.blocked{background:rgba(255,107,107,.16); color:#ff6b6b;}
  .u-actions{display:flex; gap:4px; justify-self:end;}
  .u-actions .tbtn{padding:6px; color:var(--text-muted);}
  .u-actions .tbtn:hover{color:var(--text);}
  .u-actions .tbtn.danger:hover{color:#ff6b6b;}

/* ---------- Аудиокниги ---------- */
.wave-src{margin:0 0 10px; color:var(--text-muted); font-size:13px;}
.wave-src select{background:var(--surface-2); color:var(--text); border:1px solid var(--border); border-radius:8px; padding:4px 8px;}
.bk-search{display:flex; gap:8px; margin-bottom:14px;}
.bk-search input{flex:1; background:var(--surface-2); color:var(--text); border:1px solid var(--border); border-radius:10px; padding:10px 12px; font-size:14px;}
.bk-h{font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted); margin:18px 0 6px;}
.bk-row{display:flex; gap:14px; align-items:center; padding:9px 10px; border-radius:var(--r-md); cursor:pointer;}
.bk-row:hover{background:var(--surface-2);}
.bk-cover{width:64px; height:64px; border-radius:10px; background:var(--surface-2) center/cover; flex:none;}
.bk-meta{flex:1; min-width:0;}
.bk-title{font-size:14.5px; color:var(--text); overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;}
.bk-sub{font-size:12.5px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.bk-bar{height:3px; background:var(--surface-3); border-radius:2px; margin-top:6px;}
.bk-bar i{display:block; height:100%; background:var(--accent); border-radius:2px;}
.bk-detail{display:flex; gap:24px; flex-wrap:wrap; margin:6px 0 16px;}
.bk-big{width:200px; height:200px; border-radius:14px; background:var(--surface-2) center/cover; flex:none;}
.bk-detail h3{margin:0 0 6px; font-size:22px;}
.bk-actions{display:flex; gap:8px; flex-wrap:wrap; margin-top:12px;}
.bk-part{display:flex; gap:12px; padding:9px 10px; border-radius:var(--r-md); cursor:pointer; align-items:center;}
.bk-part:hover{background:var(--surface-2);}
.bk-part.cur{color:var(--accent);}
.bk-part .n{width:26px; color:var(--text-faint);}
.bk-player{position:sticky; bottom:0; background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:12px 14px; margin-top:16px;}
.bk-player .ttl{font-size:14px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.bk-player .chp{font-size:12.5px; color:var(--text-muted); margin-bottom:8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.bk-player input[type=range]{width:100%; accent-color:var(--accent);}
.bk-times{display:flex; justify-content:space-between; font-size:12px; color:var(--text-muted);}
.bk-ctl{display:flex; gap:8px; align-items:center; justify-content:center; flex-wrap:wrap; margin-top:6px;}
.bk-ctl button, .bk-ctl select{background:var(--surface-2); color:var(--text); border:1px solid var(--border); border-radius:10px; padding:8px 12px; font-size:13.5px; cursor:pointer;}
.bk-ctl .play{background:var(--accent); color:#04231d; font-weight:700; min-width:64px;}
.bk-note{color:var(--text-faint); font-size:12.5px; margin-top:8px;}

/* прокрутка длинных страниц: исполнитель / альбом / книги */
#artistMain, #albumMain, #booksRoot{flex:1; min-height:0; overflow-y:auto; scrollbar-width:thin; scrollbar-color:var(--surface-3) transparent;}
#view-books{min-height:0;}
.songs-actions{display:flex; gap:8px; align-items:center;}
.bk-search select{background:var(--surface-2); color:var(--text); border:1px solid var(--border); border-radius:10px; padding:0 10px; font-size:13.5px;}
.bk-search select.hidden{display:none;}
