/* ===================== BASE ===================== */
:root{
  --bg:#000;
  --glass:rgba(255,255,255,.045);
  --glass-2:rgba(255,255,255,.075);
  --border:rgba(255,255,255,.09);
  --border-2:rgba(255,255,255,.16);
  --text:#f3f3f6;
  --muted:#8b8b96;
  --accent:#8b5cff;
  --accent2:#00d4ff;
  --danger:#ff5b5b;
  --radius:22px;
  --player-h:96px;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
html{background:#000;}
body{
  background-color:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:15px;line-height:1.6;min-height:100vh;
  padding-bottom:calc(var(--player-h) + 40px);
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:none;cursor:pointer}
img{max-width:100%;display:block}
::selection{background:rgba(139,92,255,.35)}

::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:#000}
::-webkit-scrollbar-thumb{background:rgba(255,255,255,.08);border-radius:10px;border:2px solid #000}
::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.16)}

/* ===================== BG ===================== */
.bg-glow{
  position:fixed;inset:0;pointer-events:none;z-index:0;
  background:
    radial-gradient(700px 460px at 12% -8%, rgba(139,92,255,.20), transparent 62%),
    radial-gradient(560px 420px at 92% 6%, rgba(0,212,255,.13), transparent 62%),
    radial-gradient(820px 560px at 50% 112%, rgba(139,92,255,.12), transparent 62%);
  filter:blur(24px);opacity:.9;
}

.container{max-width:1120px;margin:0 auto;padding:0 20px;position:relative;z-index:1}
#app{display:flex;flex-direction:column;gap:20px;padding-top:20px}

.glass{
  background:var(--glass);
  border:1px solid var(--border);
  border-radius:var(--radius);
  backdrop-filter:blur(24px) saturate(160%);
  -webkit-backdrop-filter:blur(24px) saturate(160%);
  box-shadow:0 10px 40px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
}

/* ===================== TOPBAR ===================== */
.topbar-wrap{
  position:sticky;top:0;z-index:60;
  padding:14px 0 6px;
  background:linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,0));
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.topbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:16px;padding:10px 14px;border-radius:18px;
}
.brand{display:flex;align-items:center;gap:10px;padding:4px 8px;border-radius:12px;transition:.25s}
.brand:hover{background:rgba(255,255,255,.04)}
.brand-dot{ display: none; }

@keyframes pulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.25);opacity:.75}}
.brand-name{
  font-weight:600;letter-spacing:.3px;font-size:14.5px;
  background:linear-gradient(135deg,#fff,#b9b9c9);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.nav{display:flex;gap:4px}
.nav-btn{
  padding:8px 14px;border-radius:12px;font-size:13.5px;
  color:var(--muted);transition:.22s;border:1px solid transparent;
}
.nav-btn:hover{color:var(--text);background:rgba(255,255,255,.045)}
.nav-btn.active{
  color:#fff;
  background:linear-gradient(135deg, rgba(139,92,255,.28), rgba(0,212,255,.16));
  border-color:rgba(139,92,255,.4);
  box-shadow:0 0 18px rgba(139,92,255,.28);
}

/* ===================== PANELS ===================== */
.panel{padding:22px}
.panel-head{
  display:flex;align-items:center;justify-content:space-between;
  gap:14px;margin-bottom:18px;flex-wrap:wrap;
}
.panel-head h2{
  font-size:16px;font-weight:600;letter-spacing:.2px;
  display:flex;align-items:center;gap:10px;
}
.panel-head h2::before{
  content:"";width:3px;height:16px;border-radius:3px;
  background:linear-gradient(180deg,var(--accent),var(--accent2));
  box-shadow:0 0 10px rgba(139,92,255,.8);
}
.hint{font-size:12.5px;color:var(--muted)}
.ghost-btn{
  font-size:13px;color:var(--muted);padding:7px 13px;border-radius:11px;
  border:1px solid var(--border);transition:.22s;
}
.ghost-btn:hover{color:#fff;border-color:var(--border-2);background:rgba(255,255,255,.05)}

/* ===================== HERO ===================== */
.hero{
  display:flex;align-items:center;gap:20px;padding:26px;
  position:relative;overflow:hidden;
  background: rgba(255,255,255, var(--hero-alpha, .045));
}

/* когда у hero свой фон — сама плашка прозрачная, цвет/картинка внутри .hero-bg */
.hero.hero-has-bg{
  background: transparent;
}

.hero-bg{
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
}
.hero-bg:not(video){
  background-size: cover;
  background-position: center;
}
video.hero-bg{
  width:100%;
  height:100%;
  object-fit:cover;
}

.hero-overlay{
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  /* чёрный оверлей поверх картинки/видео; чем больше hero_alpha — тем темнее */
  background: rgba(0,0,0,var(--hero-alpha,.045));
}

/* контент всегда поверх слоёв фона */
.hero > .hero-avatar,
.hero > .hero-text{
  position:relative;
  z-index:2;
}
.hero::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(400px 200px at 0% 50%, rgba(139,92,255,.14), transparent 70%);
}
.hero-avatar{
  width:64px;height:64px;flex:0 0 64px;border-radius:20px;
  display:grid;place-items:center;font-size:26px;overflow:hidden;
  background:linear-gradient(135deg, rgba(139,92,255,.35), rgba(0,212,255,.22));
  border:1px solid rgba(139,92,255,.35);
  box-shadow:0 0 30px rgba(139,92,255,.35), inset 0 1px 0 rgba(255,255,255,.14);
}
.hero-avatar img{width:100%;height:100%;object-fit:cover}
.hero-text h1{
  font-size:22px;font-weight:650;letter-spacing:.2px;
  color:var(--profile-title-color,#ffffff);
  -webkit-text-fill-color:currentColor;
}
.hero-text p{color:var(--muted);font-size:13.5px;margin-top:3px}

/* ===================== BLOG GRID ===================== */
.blog-grid{
  display:grid;gap:16px;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
}
.blog-card{
  display:flex;flex-direction:column;
  border-radius:18px;overflow:hidden;
  background:rgba(255,255,255,.028);
  border:1px solid var(--border);
  transition:.28s cubic-bezier(.2,.7,.3,1);
}
.blog-card:hover{
  transform:translateY(-3px);
  border-color:var(--border-2);
  background:rgba(255,255,255,.05);
  box-shadow:0 16px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(139,92,255,.14);
}
.blog-cover{
  height:150px;display:grid;place-items:center;
  background:linear-gradient(135deg, rgba(139,92,255,.28), rgba(0,212,255,.14));
  border-bottom:1px solid var(--border);
  position:relative;overflow:hidden;
}
.blog-cover img{width:100%;height:100%;object-fit:cover}
.blog-cover span{
  font-size:38px;font-weight:700;color:rgba(255,255,255,.9);
  text-shadow:0 4px 30px rgba(139,92,255,.7);
}
.blog-info{padding:14px 16px 16px;display:flex;flex-direction:column;gap:6px;flex:1}
.blog-info h3{font-size:15px;font-weight:600;color:#fff}
.blog-date{font-size:12px;color:var(--muted)}
.blog-stats{display:flex;gap:14px;margin-top:auto;padding-top:6px}
.blog-stats .stat{
  display:inline-flex;align-items:center;gap:5px;
  font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;
}
.blog-stats .stat.liked{color:#b39dff}
.blog-stats .stat svg{opacity:.8}
.blog-more{font-size:12.5px;color:#b39dff;margin-top:4px}

/* ===================== ARTICLE ===================== */
.article{padding:26px 28px}
.article-cover{
  border-radius:18px;overflow:hidden;margin:6px 0 22px;
  border:1px solid var(--border);
  max-height:420px;
}
.article-cover img{width:100%;max-height:420px;object-fit:cover}
.article-title{
  font-size:26px;font-weight:700;letter-spacing:.2px;margin:8px 0 14px;
  background:linear-gradient(135deg,#fff 30%, #a8a8c0);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.article-stats{display:flex;gap:16px;align-items:center;margin-bottom:22px;padding-bottom:16px;border-bottom:1px solid var(--border)}
.article-stats .stat{
  display:inline-flex;align-items:center;gap:6px;
  font-size:13px;color:var(--muted);
}
.like-btn{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 12px;border-radius:12px;
  color:var(--muted);font-size:13px;
  border:1px solid var(--border);transition:.2s;
}
.like-btn:hover{color:#fff;border-color:var(--border-2);background:rgba(255,255,255,.05)}
.like-btn.liked{
  color:#fff;
  background:linear-gradient(135deg, rgba(139,92,255,.28), rgba(0,212,255,.16));
  border-color:rgba(139,92,255,.4);
  box-shadow:0 0 18px rgba(139,92,255,.28);
}
.like-btn.liked svg{color:#ff5b9f}

.article-body{font-size:15px;color:#d2d2de;line-height:1.75}
.article-body h1,.article-body h2,.article-body h3{
  color:#fff;font-weight:650;margin:22px 0 10px;line-height:1.3;
}
.article-body h1{font-size:23px}
.article-body h2{font-size:19px}
.article-body h3{font-size:16.5px}
.article-body p{margin-bottom:12px}
.article-body a{color:#b39dff;border-bottom:1px solid rgba(179,157,255,.3);transition:.2s}
.article-body a:hover{color:#fff;border-color:#fff}
.article-body img{border-radius:14px;margin:14px 0}
.article-body ul,.article-body ol{padding-left:22px;margin-bottom:12px}
.article-body li{margin-bottom:5px}
.article-body code{
  background:rgba(255,255,255,.07);padding:2px 6px;border-radius:6px;
  font-family:ui-monospace,Menlo,Consolas,monospace;font-size:13px;color:#e0d9ff;
}
.article-body pre{
  background:rgba(0,0,0,.5);border:1px solid var(--border);
  padding:14px;border-radius:14px;overflow:auto;margin:14px 0;
}
.article-body pre code{background:none;padding:0}
.article-body blockquote{
  border-left:3px solid var(--accent);
  padding:8px 0 8px 16px;color:var(--muted);margin:14px 0;
  background:rgba(139,92,255,.05);border-radius:0 10px 10px 0;
}
.article-body hr{border:none;border-top:1px solid var(--border);margin:20px 0}
.article-body .center{text-align:center}

/* ===================== GALLERY / ALBUMS ===================== */
.album-grid{
  display:grid;gap:16px;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
}
.album-card{
  display:flex;flex-direction:column;border-radius:18px;overflow:hidden;
  background:rgba(255,255,255,.028);
  border:1px solid var(--border);
  transition:.28s cubic-bezier(.2,.7,.3,1);
}
.album-card:hover{
  transform:translateY(-3px);
  border-color:var(--border-2);
  background:rgba(255,255,255,.05);
  box-shadow:0 16px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(139,92,255,.14);
}
.album-cover{
  aspect-ratio:4/3;position:relative;overflow:hidden;
  background:linear-gradient(135deg, rgba(139,92,255,.28), rgba(0,212,255,.14));
  display:grid;place-items:center;
  border-bottom:1px solid var(--border);
}
.album-cover img{width:100%;height:100%;object-fit:cover;transition:.5s}
.album-card:hover .album-cover img{transform:scale(1.04)}
.album-cover > span:not(.album-count){font-size:38px;color:rgba(255,255,255,.7)}
.album-count{
  position:absolute;bottom:8px;right:8px;
  padding:2px 8px;border-radius:99px;
  font-size:11px;font-weight:500;
  letter-spacing:.2px;
  color:#fff;
  background:rgba(0,0,0,.6);
  backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.14);
  line-height:1.4;
}
.album-info{padding:12px 16px 16px}
.album-info h3{font-size:15px;font-weight:600;color:#fff;margin-bottom:4px}

.gallery{column-count:4;column-gap:14px}
@media (max-width:1000px){.gallery{column-count:3}}
@media (max-width:680px){.gallery{column-count:2;column-gap:10px}}

.gallery-item{
  break-inside:avoid;margin-bottom:14px;
  border-radius:16px;overflow:hidden;cursor:zoom-in;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  transition:.3s cubic-bezier(.2,.7,.3,1);
}
.gallery-item:hover{
  transform:translateY(-3px);
  border-color:var(--border-2);
  box-shadow:0 18px 44px rgba(0,0,0,.65), 0 0 0 1px rgba(139,92,255,.2);
}
.gallery-item img{width:100%;display:block;transition:.5s}
.gallery-item:hover img{transform:scale(1.03)}

/* ===================== LIGHTBOX ===================== */
.lightbox{
  position:fixed;inset:0;z-index:200;
  background:rgba(0,0,0,.92);
  backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);
  display:grid;place-items:center;padding:40px 24px;
  opacity:0;pointer-events:none;transition:.3s;cursor:zoom-out;
}
.lightbox.open{opacity:1;pointer-events:auto}
.lightbox img{
  max-width:min(1100px,92vw);max-height:88vh;
  border-radius:18px;border:1px solid var(--border-2);
  box-shadow:0 30px 100px rgba(0,0,0,.9), 0 0 80px rgba(139,92,255,.2);
  transform:scale(.96);transition:.35s cubic-bezier(.2,.7,.3,1);
}
.lightbox.open img{transform:scale(1)}

/* ===================== PLAYER ===================== */
.player-wrap{
  position:fixed;left:0;right:0;bottom:0;z-index:80;
  padding:0 0 14px;pointer-events:none;
}
.player-wrap .container{pointer-events:auto}
.player{
  position:relative;padding:12px 16px;border-radius:22px;
  background:rgba(12,12,14,.72);
  backdrop-filter:blur(30px) saturate(180%);
  -webkit-backdrop-filter:blur(30px) saturate(180%);
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 -4px 40px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.03) inset;
}
.player-main{
  display:grid;
  grid-template-columns:auto minmax(120px,1fr) auto minmax(180px,1.3fr) auto auto;
  align-items:center;gap:14px;
}
.cover{ display: none; }
.cover span{position:relative;z-index:1;text-shadow:0 1px 8px rgba(0,0,0,.5)}
.cover.playing span{animation:spin 6s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.meta{min-width:0}
.t-title{font-size:14px;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t-sub{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.controls{display:flex;align-items:center;gap:6px}
.ctrl{
  width:36px;height:36px;border-radius:12px;
  display:grid;place-items:center;color:#c9c9d6;
  transition:.22s;border:1px solid transparent;
}
.ctrl:hover{color:#fff;background:rgba(255,255,255,.06);border-color:var(--border)}
.ctrl:active{transform:scale(.94)}
.ctrl.small{width:32px;height:32px;border-radius:10px}
.ctrl.play{
  width:42px;height:42px;border-radius:14px;color:#fff;
  background:linear-gradient(135deg, rgba(139,92,255,.55), rgba(0,212,255,.35));
  border:1px solid rgba(139,92,255,.5);
  box-shadow:0 0 22px rgba(139,92,255,.4), inset 0 1px 0 rgba(255,255,255,.18);
}
.ctrl.play:hover{box-shadow:0 0 30px rgba(139,92,255,.7);transform:translateY(-1px)}
.progress,.volume{display:flex;align-items:center;gap:10px}
.time{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums;min-width:32px;text-align:center}
.volume{min-width:110px}
.volume .bar{width:70px}
.bar{
  position:relative;flex:1;height:5px;border-radius:99px;
  background:rgba(255,255,255,.08);cursor:pointer;user-select:none;
  transition:height .18s;
}
.bar .fill{
  position:absolute;left:0;top:0;bottom:0;width:0%;
  border-radius:99px;
  background:linear-gradient(90deg,var(--accent),var(--accent2));
  box-shadow:0 0 12px rgba(139,92,255,.6);
  transition:width .08s linear;
}
.bar .knob{
  position:absolute;top:50%;left:0%;
  width:12px;height:12px;border-radius:50%;background:#fff;
  transform:translate(-50%,-50%) scale(0);
  box-shadow:0 0 0 3px rgba(139,92,255,.35), 0 2px 8px rgba(0,0,0,.6);
  transition:transform .2s, left .08s linear;pointer-events:none;
}
.bar:hover .knob,.bar:active .knob{transform:translate(-50%,-50%) scale(1)}
.bar:hover{height:7px;margin-top:-1px;margin-bottom:-1px}
.playlist{
  position:absolute;left:0;right:0;bottom:calc(100% + 10px);
  max-height:260px;overflow-y:auto;padding:8px;border-radius:18px;
  background:rgba(10,10,12,.85);
  backdrop-filter:blur(28px) saturate(180%);
  -webkit-backdrop-filter:blur(28px) saturate(180%);
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 -10px 50px rgba(0,0,0,.8);
  opacity:0;pointer-events:none;transform:translateY(8px);
  transition:.25s cubic-bezier(.2,.7,.3,1);
}
.playlist.open{opacity:1;pointer-events:auto;transform:translateY(0)}
.pl-item{
  width:100%;display:flex;align-items:center;gap:12px;
  padding:9px 12px;border-radius:12px;text-align:left;
  color:#c9c9d6;font-size:13px;transition:.18s;
}
.pl-item:hover{background:rgba(255,255,255,.06);color:#fff}
.pl-item.active{
  background:linear-gradient(135deg, rgba(139,92,255,.22), rgba(0,212,255,.1));
  color:#fff;box-shadow:inset 0 0 0 1px rgba(139,92,255,.35);
}
.pl-num{width:22px;font-size:11px;color:var(--muted);text-align:center;flex:0 0 22px}
.pl-item.active .pl-num{color:#b39dff}
.pl-name{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pl-empty{padding:16px;text-align:center;color:var(--muted);font-size:13px}

/* ===================== EMPTY ===================== */
.empty{
  padding:44px 20px;text-align:center;
  border:1px dashed var(--border);border-radius:18px;
  background:rgba(255,255,255,.015);
}
.empty-icon{font-size:26px;color:var(--muted);opacity:.5;margin-bottom:8px}
.empty h3{font-size:15px;font-weight:600;margin-bottom:4px}
.empty p{font-size:13px;color:var(--muted);max-width:420px;margin:0 auto}
.empty a{color:#b39dff;border-bottom:1px solid rgba(179,157,255,.3)}

/* ===================== ADMIN LOGIN ===================== */
.login-wrap{
  min-height:100vh;display:grid;place-items:center;padding:24px;
  position:relative;z-index:1;
}
.login-card{
  width:min(420px,100%);padding:32px 28px;
  display:flex;flex-direction:column;gap:16px;
}
.login-brand{
  display:flex;align-items:center;gap:10px;
  font-weight:600;font-size:14px;letter-spacing:.3px;
  background:linear-gradient(135deg,#fff,#b9b9c9);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.login-hint{font-size:13px;color:var(--muted)}
.login-error{
  font-size:13px;color:#ff8e8e;
  padding:9px 12px;border-radius:10px;
  background:rgba(255,91,91,.08);
  border:1px solid rgba(255,91,91,.22);
}
.login-back{font-size:12.5px;color:var(--muted);text-align:center;transition:.2s}
.login-back:hover{color:#fff}

/* ===================== INPUTS / BUTTONS ===================== */
.input,.textarea{
  width:100%;padding:12px 14px;
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:14px;
  color:#fff;font:inherit;font-size:14px;
  outline:none;transition:.2s;
}
.input:focus,.textarea:focus{
  border-color:rgba(139,92,255,.5);
  background:rgba(255,255,255,.06);
  box-shadow:0 0 0 3px rgba(139,92,255,.15);
}
.textarea{
  min-height:340px;resize:vertical;
  font-family:ui-monospace,Menlo,Consolas,monospace;font-size:13px;line-height:1.6;
}
.btn-primary{
  padding:10px 18px;border-radius:12px;
  font-size:13.5px;font-weight:600;color:#fff;
  background:linear-gradient(135deg, rgba(139,92,255,.85), rgba(0,212,255,.55));
  border:1px solid rgba(139,92,255,.5);
  box-shadow:0 0 20px rgba(139,92,255,.35), inset 0 1px 0 rgba(255,255,255,.14);
  transition:.22s;
}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 0 28px rgba(139,92,255,.6)}
.btn-primary:active{transform:translateY(0)}
.btn-primary:disabled{opacity:.5;pointer-events:none}
.btn-ghost{
  padding:10px 16px;border-radius:12px;
  font-size:13.5px;color:var(--muted);
  border:1px solid var(--border);transition:.22s;
}
.btn-ghost:hover{color:#fff;border-color:var(--border-2);background:rgba(255,255,255,.05)}
.btn-danger{
  padding:10px 16px;border-radius:12px;
  font-size:13px;color:#ff8e8e;
  border:1px solid rgba(255,91,91,.25);
  background:rgba(255,91,91,.05);
  transition:.22s;
}
.btn-danger:hover{color:#fff;background:rgba(255,91,91,.15);border-color:rgba(255,91,91,.5)}

/* ===================== ADMIN LAYOUT ===================== */
.admin-main{padding-top:20px;display:flex;flex-direction:column;gap:20px}
.admin-tabs{
  display:flex;gap:4px;padding:6px;
  border-radius:16px;
  overflow-x:auto;
}
.tab{
  padding:9px 16px;border-radius:12px;
  font-size:13.5px;color:var(--muted);transition:.22s;
  border:1px solid transparent;white-space:nowrap;
}
.tab:hover{color:var(--text);background:rgba(255,255,255,.045)}
.tab.active{
  color:#fff;
  background:linear-gradient(135deg, rgba(139,92,255,.28), rgba(0,212,255,.16));
  border-color:rgba(139,92,255,.4);
  box-shadow:0 0 18px rgba(139,92,255,.28);
}
.admin-panel{display:flex;flex-direction:column;gap:20px}
.hidden{display:none !important}

.avatar-row{display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.avatar-preview{
  width:96px;height:96px;border-radius:24px;
  display:grid;place-items:center;font-size:32px;overflow:hidden;
  background:linear-gradient(135deg, rgba(139,92,255,.35), rgba(0,212,255,.22));
  border:1px solid rgba(139,92,255,.35);
  box-shadow:0 0 30px rgba(139,92,255,.35), inset 0 1px 0 rgba(255,255,255,.14);
}
.avatar-preview img{width:100%;height:100%;object-fit:cover}
.avatar-actions{display:flex;gap:10px;flex-wrap:wrap}
.form-row{display:flex;gap:10px;flex-wrap:wrap}
.form-row .input{flex:1;min-width:200px}

.admin-list{display:flex;flex-direction:column;gap:10px}
.admin-item{
  display:flex;align-items:center;gap:14px;
  padding:12px 14px;border-radius:14px;
  background:rgba(255,255,255,.028);
  border:1px solid var(--border);
  transition:.22s;
}
.admin-item:hover{border-color:var(--border-2);background:rgba(255,255,255,.05)}
.admin-thumb{
  width:56px;height:56px;flex:0 0 56px;border-radius:12px;overflow:hidden;
  background:linear-gradient(135deg, rgba(139,92,255,.28), rgba(0,212,255,.14));
  display:grid;place-items:center;
  border:1px solid var(--border);
  font-weight:700;color:rgba(255,255,255,.85);
}
.admin-thumb img{width:100%;height:100%;object-fit:cover}
.admin-item-body{flex:1;min-width:0}
.admin-item-body b{
  display:block;font-size:14px;font-weight:600;color:#fff;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.admin-item-body span{font-size:12px;color:var(--muted)}
.admin-item-actions{display:flex;gap:6px;flex-wrap:wrap}
.icon-btn{
  width:34px;height:34px;border-radius:10px;
  display:grid;place-items:center;color:var(--muted);
  border:1px solid var(--border);transition:.2s;
}
.icon-btn:hover{color:#fff;border-color:var(--border-2);background:rgba(255,255,255,.06)}
.icon-btn.danger:hover{color:#fff;border-color:rgba(255,91,91,.5);background:rgba(255,91,91,.15)}

/* ===================== ALBUM DETAIL ===================== */
.album-photos-grid{
  display:grid;gap:12px;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
}
.album-photo{
  position:relative;border-radius:14px;overflow:hidden;
  aspect-ratio:1;border:1px solid var(--border);
  background:rgba(255,255,255,.03);
}
.album-photo img{width:100%;height:100%;object-fit:cover}
.album-photo-actions{
  position:absolute;top:6px;right:6px;display:flex;gap:4px;
  opacity:0;transition:.22s;
}
.album-photo:hover .album-photo-actions{opacity:1}
.album-photo-actions button{
  width:28px;height:28px;border-radius:9px;
  display:grid;place-items:center;
  background:rgba(0,0,0,.7);backdrop-filter:blur(10px);
  color:#fff;font-size:14px;
  border:1px solid rgba(255,255,255,.14);
}
.album-photo-actions button:hover{background:rgba(0,0,0,.9)}
.album-photo.is-cover::after{
  content:"обложка";
  position:absolute;bottom:6px;left:6px;
  padding:2px 8px;border-radius:99px;
  font-size:10.5px;color:#fff;
  background:linear-gradient(135deg, rgba(139,92,255,.9), rgba(0,212,255,.7));
  box-shadow:0 0 16px rgba(139,92,255,.5);
}

/* ===================== MODAL ===================== */
.modal{
  position:fixed;inset:0;z-index:9999;
  background:rgba(0,0,0,.75);
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  display:none;
  place-items:center;padding:24px;
  opacity:0;transition:opacity .25s;
}
.modal.open{
  display:grid;
  opacity:1;
}
.modal-card{
  width:min(880px,100%);max-height:92vh;
  display:flex;flex-direction:column;
  transform:scale(.96);transition:.3s cubic-bezier(.2,.7,.3,1);
}
.modal.open .modal-card{transform:scale(1)}
.modal-card.small{width:min(460px,100%)}
.modal-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 22px;border-bottom:1px solid var(--border);
}
.modal-head h3{font-size:15px;font-weight:600}
.modal-close{
  width:32px;height:32px;border-radius:10px;
  display:grid;place-items:center;font-size:20px;line-height:1;color:var(--muted);
  transition:.2s;
}
.modal-close:hover{color:#fff;background:rgba(255,255,255,.06)}
.modal-body{
  padding:18px 22px;overflow-y:auto;flex:1;
  display:flex;flex-direction:column;gap:14px;
}
.modal-foot{
  display:flex;justify-content:flex-end;gap:10px;
  padding:16px 22px;border-top:1px solid var(--border);
}
.field-label{font-size:12px;color:var(--muted);letter-spacing:.3px;text-transform:uppercase;font-weight:600;margin-top:4px}
.cover-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.cover-preview{
  width:120px;height:80px;flex:0 0 120px;border-radius:12px;overflow:hidden;
  display:grid;place-items:center;
  background:linear-gradient(135deg, rgba(139,92,255,.28), rgba(0,212,255,.14));
  border:1px solid var(--border);
  font-size:11.5px;color:var(--muted);
}
.cover-preview img{width:100%;height:100%;object-fit:cover}

/* BB toolbar */
.bb-toolbar{
  display:flex;flex-wrap:wrap;gap:4px;
  padding:6px;border-radius:12px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--border);
}
.bb-toolbar button{
  min-width:34px;height:34px;padding:0 10px;border-radius:9px;
  display:grid;place-items:center;
  color:#c9c9d6;font-size:13px;transition:.18s;
}
.bb-toolbar button:hover{color:#fff;background:rgba(255,255,255,.07)}

.bb-preview{
  min-height:120px;padding:14px 16px;
  border-radius:14px;
  background:rgba(0,0,0,.35);
  border:1px dashed var(--border);
  font-size:14px;color:#d2d2de;
  line-height:1.7;
}
.bb-preview h1,.bb-preview h2,.bb-preview h3{color:#fff;margin:12px 0 8px;font-weight:650}
.bb-preview h2{font-size:17px}
.bb-preview h3{font-size:15px}
.bb-preview p{margin:8px 0}
.bb-preview a{color:#b39dff}
.bb-preview img{border-radius:12px;margin:10px 0;max-width:100%}
.bb-preview blockquote{
  border-left:3px solid var(--accent);padding:6px 0 6px 14px;
  color:var(--muted);margin:10px 0;
  background:rgba(139,92,255,.05);border-radius:0 10px 10px 0;
}
.bb-preview pre{
  background:rgba(0,0,0,.5);border:1px solid var(--border);
  padding:12px;border-radius:12px;overflow:auto;margin:10px 0;
  font-size:12.5px;
}
.bb-preview code{background:rgba(255,255,255,.07);padding:1px 5px;border-radius:5px;font-size:12.5px}
.bb-preview hr{border:none;border-top:1px solid var(--border);margin:14px 0}
.bb-preview .center{text-align:center}
.bb-preview strong{color:#fff}

/* Toast */
.toast{
  position:fixed;bottom:calc(var(--player-h) + 30px);left:50%;transform:translateX(-50%) translateY(20px);
  padding:12px 20px;border-radius:14px;
  background:rgba(20,20,24,.92);
  backdrop-filter:blur(20px);
  border:1px solid var(--border-2);
  color:#fff;font-size:13.5px;
  box-shadow:0 20px 50px rgba(0,0,0,.7);
  z-index:300;opacity:0;pointer-events:none;transition:.3s;
  max-width:90vw;
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.toast.error{border-color:rgba(255,91,91,.5);color:#ffb3b3}

/* ===================== RESPONSIVE ===================== */
@media (max-width:900px){
  .player-main{
    grid-template-columns:auto 1fr auto auto;
    grid-template-areas:
      "cover meta controls list"
      "prog  prog prog     prog";
    row-gap:10px;
  }
  .cover{grid-area:cover}
  .meta{grid-area:meta}
  .controls{grid-area:controls}
  #btnList{grid-area:list}
  .progress{grid-area:prog}
  .volume{display:none}
  :root{--player-h:130px}
}
@media (max-width:560px){
  .container{padding:0 14px}
  .panel{padding:16px}
  .hero{padding:20px;gap:14px}
  .hero-avatar{width:52px;height:52px;flex-basis:52px;font-size:22px;border-radius:16px}
  .hero-text h1{font-size:18px}
  .topbar{padding:8px 10px}
  .nav-btn{padding:7px 10px;font-size:12.5px}
  .brand-name{font-size:13px}
  .article{padding:20px}
  .article-title{font-size:21px}
  .t-sub{display:none}
  .admin-tabs{padding:4px}
  .tab{padding:7px 12px;font-size:12.5px}
}

/* ===================== BACKGROUND CUSTOM ===================== */
.bg-video{
  position:fixed;inset:0;
  width:100vw;height:100vh;
  object-fit:cover;
  z-index:0;
  pointer-events:none;
}
body.has-bg .bg-glow{display:none;}

/* ===================== BB BUTTON ===================== */
.bb-btn{
  display:inline-flex;align-items:center;gap:6px;
  padding:9px 18px;border-radius:12px;
  font-size:13.5px;font-weight:600;color:#fff;
  background:linear-gradient(135deg, rgba(139,92,255,.85), rgba(0,212,255,.55));
  border:1px solid rgba(139,92,255,.5);
  box-shadow:0 0 20px rgba(139,92,255,.35), inset 0 1px 0 rgba(255,255,255,.14);
  transition:.22s;
  margin:6px 4px 6px 0;
  text-decoration:none;
}
.bb-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 0 28px rgba(139,92,255,.6);
  border-bottom-color:rgba(139,92,255,.5);
}

/* ===================== BACKGROUND PICKER (admin) ===================== */
.bg-types{
  display:flex;gap:6px;flex-wrap:wrap;
  margin-bottom:10px;
}
.bg-type{
  padding:8px 14px;border-radius:11px;
  font-size:13px;color:var(--muted);
  border:1px solid var(--border);
  transition:.2s;
}
.bg-type:hover{color:#fff;border-color:var(--border-2);background:rgba(255,255,255,.05)}
.bg-type.active{
  color:#fff;
  background:linear-gradient(135deg, rgba(139,92,255,.28), rgba(0,212,255,.16));
  border-color:rgba(139,92,255,.4);
  box-shadow:0 0 18px rgba(139,92,255,.28);
}
.bg-presets{
  display:flex;gap:6px;flex-wrap:wrap;
  margin-top:10px;align-items:center;
}
.preset{
  padding:6px 12px;border-radius:10px;
  font-size:12px;color:var(--muted);
  border:1px solid var(--border);
  transition:.2s;
}
.preset:hover{color:#fff;border-color:var(--border-2);background:rgba(255,255,255,.05)}
.bg-presets .hint{margin-right:4px}

/* input disabled */
.input:disabled{
  opacity:.4;
  cursor:not-allowed;
}
/* ===================== BLOCK WITH BG ===================== */
.block-panel{
  position:relative;
  overflow:hidden;
  isolation:isolate;
}
.block-bg{
  position:absolute;inset:0;
  z-index:-2;
  pointer-events:none;
}
video.block-bg-video{
  width:100%;height:100%;
  object-fit:cover;
}
.block-overlay{
  position:absolute;inset:0;
  z-index:-1;
  pointer-events:none;
  background:linear-gradient(
    to bottom,
    rgba(0,0,0,.35) 0%,
    rgba(0,0,0,.55) 100%
  );
}
.block-content{
  position:relative;
  z-index:1;
}
/* ID блога в админке */
.blog-id{
  display:inline-block;
  padding:1px 7px;
  border-radius:6px;
  font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:11.5px;
  color:#b39dff;
  background:rgba(139,92,255,.12);
  border:1px solid rgba(139,92,255,.25);
  cursor:pointer;
  transition:.15s;
  user-select:none;
}
.blog-id:hover{
  color:#fff;
  background:rgba(139,92,255,.25);
  border-color:rgba(139,92,255,.55);
}
/* ===================== GRAPH ===================== */
.graph-panel{
  overflow:hidden;
  padding:16px 18px 18px;
  display:flex;
  flex-direction:column;
  min-height:0;
}
.graph-controls{display:flex;align-items:center;gap:10px}

.graph-wrap{
  position:relative;
  width:100%;
  flex:1;
  min-height:420px;
  height:calc(100vh - 280px);
  max-height:calc(100vh - 280px);
  border-radius:18px;
  overflow:hidden;
  background:
    radial-gradient(700px 500px at 50% 50%, rgba(139,92,255,.08), transparent 70%),
    radial-gradient(500px 400px at 15% 85%, rgba(0,212,255,.05), transparent 70%),
    #050507;
  border:1px solid var(--border);
  margin-top:8px;
}
#graphCanvas{
  display:block;
  width:100%;
  height:100%;
  touch-action:none;
  cursor:grab;
}
#graphCanvas:active{cursor:grabbing}

.graph-help-overlay{
  position:absolute;
  left:14px;bottom:12px;
  font-size:11.5px;
  color:rgba(180,180,200,.55);
  pointer-events:none;
  user-select:none;
  letter-spacing:.2px;
}
/* ===================== SHORTCUT PILLS ===================== */
.shortcuts-row{
  display:flex;flex-wrap:wrap;gap:10px;
}

.shortcut-pill{
  --pill-color:#8b5cff;
  display:inline-flex;align-items:center;gap:10px;
  padding:7px 16px 7px 8px;
  border-radius:999px;
  border:1px solid var(--pill-color);
  background:rgba(255,255,255,.03);
  position:relative;
  overflow:hidden;
  transition:transform .22s cubic-bezier(.2,.7,.3,1),
             box-shadow .22s,
             border-color .22s;
  text-decoration:none;
}
.shortcut-pill::before{
  content:"";
  position:absolute;inset:0;
  background:var(--pill-color);
  opacity:.10;
  transition:opacity .22s;
  pointer-events:none;
}
.shortcut-pill:hover{
  transform:translateY(-2px);
  box-shadow:
    0 0 22px -8px var(--pill-color),
    0 0 0 1px var(--pill-color),
    0 12px 30px -10px rgba(0,0,0,.6);
  border-color:var(--pill-color);
}
.shortcut-pill:hover::before{opacity:.22}
.shortcut-pill:active{transform:translateY(0);}

.shortcut-icon{
  width:28px;height:28px;flex:0 0 28px;
  border-radius:50%;
  display:grid;place-items:center;
  font-size:13px;font-weight:600;line-height:1;
  color:#fff;
  background:var(--pill-color);
  box-shadow:0 0 14px -4px var(--pill-color);
  position:relative;z-index:1;
  letter-spacing:-.3px;
}
.shortcut-title{
  color:#fff;
  font-size:13.5px;
  font-weight:500;
  letter-spacing:.1px;
  position:relative;z-index:1;
  white-space:nowrap;
}

/* ===================== ADMIN: COLOR PICKER ===================== */
.color-row{
  display:flex;align-items:center;gap:10px;
  flex-wrap:wrap;
}
.color-picker{
  width:44px;height:40px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  cursor:pointer;
  padding:3px;
}
.color-picker::-webkit-color-swatch-wrapper{padding:0}
.color-picker::-webkit-color-swatch{border:none;border-radius:8px}
.color-picker::-moz-color-swatch{border:none;border-radius:8px}

.color-presets{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  margin-top:10px;
}
.color-dot{
  width:24px;height:24px;border-radius:50%;
  background:var(--c);
  border:2px solid rgba(255,255,255,.14);
  box-shadow:0 0 12px -4px var(--c);
  transition:.2s;
  cursor:pointer;
  padding:0;
}
.color-dot:hover{transform:scale(1.15);border-color:#fff;}

/* ===================== NOW PLAYING ===================== */
.now-playing-panel{
  padding: 10px 14px;          /* достаточно места по краям */
  border-radius: 16px;
  overflow: visible;            /* ничего не обрезаем */
}
}
.now-playing-pill{
  display:flex;align-items:center;gap:14px;
  padding:10px 16px;
  border-radius:16px;                    /* было 999px */
  background:rgba(255,255,255,.03);
  border:1px solid rgba(139,92,255,.28);
  transition:transform .22s, box-shadow .22s, border-color .22s;
  position:relative;
  overflow:hidden;
}

.now-playing-pill:hover{
  transform:translateY(-1px);
  border-color:rgba(139,92,255,.5);
  box-shadow:0 0 24px -8px rgba(139,92,255,.6);
}
.np-cover{
  width:52px;height:52px;flex:0 0 52px;
  border-radius:12px;
  background:#141418 center/cover no-repeat;
  border:1px solid var(--border);
  display:grid;place-items:center;
  font-size:20px;color:#666;
  box-shadow:0 4px 16px rgba(0,0,0,.5);
}
.np-info{flex:1;min-width:0}
.np-label{
  display:inline-flex;align-items:center;gap:6px;
  font-size:10.5px;text-transform:uppercase;
  letter-spacing:.6px;font-weight:600;
  color:#b39dff;margin-bottom:2px;
}
.np-dot{
  width:6px;height:6px;border-radius:50%;
  background:#00e676;
  box-shadow:0 0 10px #00e676;
  animation:npPulse 1.6s ease-in-out infinite;
}
@keyframes npPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.8)}}
.np-title{
  font-size:14px;font-weight:600;color:#fff;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.np-artist{
  font-size:12px;color:var(--muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.np-bars{
  display:flex;align-items:flex-end;gap:3px;
  height:22px;flex:0 0 auto;
  padding:0 4px;
}
.np-bars span{
  width:3px;background:linear-gradient(180deg,#8b5cff,#00d4ff);
  border-radius:2px;
  animation:npBars 1.1s ease-in-out infinite;
}
.np-bars span:nth-child(1){animation-delay:0s}
.np-bars span:nth-child(2){animation-delay:.15s}
.np-bars span:nth-child(3){animation-delay:.3s}
.np-bars span:nth-child(4){animation-delay:.45s}
@keyframes npBars{
  0%,100%{height:6px}
  50%    {height:22px}
}

@media (max-width:560px){
  .np-bars{display:none}
  .np-cover{width:44px;height:44px;flex-basis:44px}
}

/* компактный stats.fm */
#statsfmToggle .bg-type{padding:6px 12px;font-size:12.5px}
.panel .form-row .input{flex:1;min-width:180px}

/* ===================== МОБИЛЬНАЯ ШАПКА ===================== */
@media (max-width: 560px) {
  .topbar{
    padding:8px 10px;
    gap:8px;
    flex-wrap:nowrap;              /* всегда одна строка */
    align-items:center;
  }
  .brand{
    flex:0 0 auto;
    min-width:0;
  }
  .brand-name{
    font-size:13px;
    max-width:96px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .nav{
    flex:1 1 auto;
    min-width:0;
    gap:2px;
    justify-content:flex-end;      /* прижаты вправо */
    overflow-x:auto;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .nav::-webkit-scrollbar{display:none}
  .nav-btn{
    padding:6px 10px;
    font-size:12px;
    white-space:nowrap;
    flex:0 0 auto;
  }
}

@media (max-width: 380px) {
  .brand-name{max-width:70px}
  .nav-btn{padding:5px 8px;font-size:11.5px}
}

/* ===================== NOW PLAYING (компактный) ===================== */

/* убираем двойную обёртку: внешний .panel больше не panel */
.now-playing-panel{
  padding:8px 12px;
  border-radius:16px;
}

.now-playing-pill{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  background:none;           /* если раньше был свой фон/рамка у pill — убираем */
  border:none;
  padding:0;
}

/* обложка — маленький квадрат */
.np-cover{
  width:36px;
  height:36px;
  flex:0 0 36px;
  border-radius:10px;
  background-size:cover;
  background-position:center;
  background-color:rgba(255,255,255,.06);
  display:grid;
  place-items:center;
  font-size:14px;
  color:#8b8b96;
  border:1px solid var(--border);
}

/* текстовая часть — в одну строку */
.np-info{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex:1;
}

/* «сейчас слушаю» — уводим влево, компактно, без второй строки */
.np-label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.4px;
  white-space:nowrap;
  flex:0 0 auto;
  margin:0;
}

.np-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  box-shadow:0 0 10px rgba(139,92,255,.9);
  animation:pulse 2s ease-in-out infinite;
}

.np-title{
  font-size:13.5px;
  font-weight:600;
  color:#fff;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
  flex:0 1 auto;
}

.np-artist{
  font-size:12.5px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
  flex:0 1 auto;
}

/* разделитель между title и artist через "·" без лишних строк */
.np-info .np-title + .np-artist::before{
  content:"·";
  margin-right:6px;
  color:var(--muted);
}

/* эквалайзер */
.np-bars{
  display:flex;
  align-items:flex-end;
  gap:2px;
  height:14px;
  flex:0 0 auto;
}
.np-bars span{
  width:2px;
  background:linear-gradient(180deg,var(--accent2),var(--accent));
  border-radius:2px;
  animation:npbar 1s ease-in-out infinite;
}
.np-bars span:nth-child(1){animation-delay:-.9s;height:60%}
.np-bars span:nth-child(2){animation-delay:-.6s;height:100%}
.np-bars span:nth-child(3){animation-delay:-.3s;height:70%}
.np-bars span:nth-child(4){animation-delay:0s;height:90%}

@keyframes npbar{
  0%,100%{transform:scaleY(.4)}
  50%{transform:scaleY(1)}
}

/* на мобилке — ещё компактнее */
@media (max-width:560px){
  .now-playing-panel{padding:6px 10px;border-radius:14px}
  .np-cover{width:32px;height:32px;flex-basis:32px;border-radius:8px}
  .np-title{font-size:12.5px}
  .np-artist{font-size:11.5px}
  .np-label span:last-child{display:none}     /* оставляем только точку-индикатор */
  .np-bars{height:12px}
}

/* ===================== GRAPH — МОБИЛЬНЫЙ ФИКС ===================== */

/* 1) контейнер графа не вылезает за экран и не залезает под плеер */
.graph-wrap,
.graph-container,
#graph,
#graphWrap{
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* 2) на мобилке граф ниже, чтобы влезал вместе с плеером */
@media (max-width: 900px){
  .graph-wrap,
  .graph-container,
  #graph,
  #graphWrap{
    height: calc(100vh - 220px) !important;
    min-height: 380px;
  }
  body{ padding-bottom: calc(var(--player-h, 96px) + 40px); }
}

@media (max-width: 560px){
  .graph-wrap,
  .graph-container,
  #graph,
  #graphWrap{
    height: calc(100vh - 250px) !important;
    min-height: 340px;
    border-radius: 16px;
    overflow: hidden;
  }
  /* если граф внутри .panel — убираем лишние паддинги */
  .panel.graph-wrap,
  .panel:has(#graph){ padding: 0; }

  /* самое главное: сам svg/canvas внутри на всю ширину */
  .graph-wrap svg,
  .graph-container svg,
  #graph svg,
  #graphWrap svg,
  .graph-wrap canvas,
  .graph-container canvas,
  #graph canvas,
  #graphWrap canvas{
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    display: block;
  }
}

/* 3) если подписи/ноды слишком крупные — уменьшаем шрифт в svg-text */
@media (max-width: 560px){
  .graph-wrap text,
  .graph-container text,
  #graph text,
  #graphWrap text{
    font-size: 10px !important;
  }
}

/* 4) прячем горизонтальный скролл, если граф случайно шире */
html, body{ overflow-x: hidden; }

/* ===================== NOW PLAYING — строка текста песни ===================== */
.np-lyrics{
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 10px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .2px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow:
    0 0 4px  rgba(255,255,255,.95),
    0 0 9px  rgba(255,255,255,.75),
    0 0 18px rgba(139,92,255,.85),
    0 0 32px rgba(139,92,255,.55);
  animation: npLyricsGlow 2.4s ease-in-out infinite alternate;
  transition: opacity .25s ease;
}
.np-lyrics:empty{ display:none; }

@keyframes npLyricsGlow{
  from{
    text-shadow:
      0 0 4px  rgba(255,255,255,.85),
      0 0 9px  rgba(255,255,255,.65),
      0 0 16px rgba(139,92,255,.65),
      0 0 28px rgba(139,92,255,.4);
  }
  to{
    text-shadow:
      0 0 6px  rgba(255,255,255,1),
      0 0 14px rgba(255,255,255,.85),
      0 0 24px rgba(139,92,255,.95),
      0 0 44px rgba(139,92,255,.65);
  }
}

/* на мобилке — меньше и без обрезки лишнего */
@media (max-width: 560px){
  .np-lyrics{
    font-size: 12px;
    padding: 0 6px;
    text-shadow:
      0 0 3px rgba(255,255,255,.9),
      0 0 8px rgba(139,92,255,.7);
  }
}
/* ===================== VISITS CONSOLE ===================== */
.console-panel{ margin-top: 6px; }

.console-actions{
  display:flex; gap:8px; flex-wrap:wrap; align-items:center;
}
.console-actions .btn-ghost,
.console-actions .btn-danger{
  padding:6px 12px; font-size:12.5px;
}

.console{
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  background: rgba(0,0,0,.55);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  max-height: 340px;
  overflow-y: auto;
  color: #c9c9d6;
}
.console-empty{ color: var(--muted); font-style: italic; }

.console-row{
  display: grid;
  grid-template-columns: 130px 130px 60px 1fr 1fr 1fr;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255,255,255,.05);
  white-space: nowrap;
}
.console-row:last-child{ border-bottom:none; }
.console-row > *{
  overflow: hidden;
  text-overflow: ellipsis;
}
.console-row .c-time{ color:#8b8b96 }
.console-row .c-ip  { color:#b39dff; font-weight:600 }
.console-row .c-method{ color:#00d4ff }
.console-row .c-path{ color:#fff }
.console-row .c-ua  { color:#a6a6b3 }
.console-row .c-ref { color:#6b6b78 }

.console-row.bot .c-ip{ color:#ff8e8e }
.console-row.mobile .c-method{ color:#ff5b9f }

/* мобильный вид — разворачиваем в карточки */
@media (max-width: 720px){
  .console-row{
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 8px 0;
    white-space: normal;
  }
  .console-row .c-ua,
  .console-row .c-ref{
    font-size: 11.5px;
    opacity: .8;
  }
}
/* ===================== CHAT ===================== */
.chat-shell{
  min-height: 70vh;
  height: calc(100vh - var(--player-h, 96px) - 150px);
  display:flex; overflow:hidden;
  padding:0; border-radius: 22px; position:relative;
}
.chat-auth{
  position:absolute; inset:0; z-index:5;
  display:flex; align-items:center; justify-content:center;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.chat-auth-card{
  width:min(420px,90%);
  padding: 26px 22px; border-radius: 20px;
  background: rgba(20,20,24,.9);
  border:1px solid var(--border-2);
  display:flex; flex-direction:column; gap:12px;
}
.chat-auth-card h2{ font-size:18px; font-weight:650 }
.chat-auth-tabs{ display:flex; gap:4px; padding:4px; background:rgba(255,255,255,.03); border-radius:12px }
.chat-auth-tabs button{
  flex:1; padding:8px; border-radius:10px; color:var(--muted); font-size:13px; transition:.2s;
}
.chat-auth-tabs button.active{
  color:#fff;
  background: linear-gradient(135deg, rgba(139,92,255,.35), rgba(0,212,255,.2));
}
.chat-auth-err{ color:#ff8e8e; font-size:12.5px; min-height:16px }

.chat-main{ display:flex; width:100%; height:100%; }

.chat-side{
  width: 280px; flex:0 0 280px;
  display:flex; flex-direction:column;
  border-right: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.chat-side-head{
  padding: 12px; border-bottom: 1px solid var(--border);
  display:flex; flex-direction:column; gap:8px;
}
.chat-me{ display:flex; align-items:center; justify-content:space-between }
.chat-me-name{ font-weight:600; color:#fff; font-size:14px }
.chat-logout{
  width:30px; height:30px; border-radius:10px; color:var(--muted);
  border:1px solid var(--border); transition:.2s;
}
.chat-logout:hover{ color:#fff; background:rgba(255,255,255,.06) }
.chat-contacts{ flex:1; overflow-y:auto; padding:6px }
.chat-contacts-empty{ padding:20px; text-align:center; color:var(--muted); font-size:13px }
.chat-contact{
  width:100%; display:flex; align-items:center; gap:10px;
  padding:9px 10px; border-radius:12px; text-align:left;
  color:#c9c9d6; font-size:13.5px; transition:.18s;
}
.chat-contact:hover{ background:rgba(255,255,255,.05); color:#fff }
.chat-contact.active{
  background: linear-gradient(135deg, rgba(139,92,255,.2), rgba(0,212,255,.1));
  color:#fff; box-shadow: inset 0 0 0 1px rgba(139,92,255,.35);
}
.chat-avatar{
  width:34px; height:34px; flex:0 0 34px; border-radius:10px;
  display:grid; place-items:center; font-weight:600; color:#fff;
  background: linear-gradient(135deg, rgba(139,92,255,.45), rgba(0,212,255,.25));
  border:1px solid rgba(139,92,255,.4); font-size:14px;
}
.chat-contact-name{
  display:flex; flex-direction:column; min-width:0; flex:1; font-weight:500;
}
.chat-contact-meta{ font-size:11.5px; color:var(--muted); font-weight:400 }
.root-tag{
  font-size:10.5px; padding:1px 6px; border-radius:6px; margin-left:6px;
  background: linear-gradient(135deg, rgba(139,92,255,.35), rgba(0,212,255,.2));
  color:#fff;
}

.chat-dialog{ flex:1; display:flex; flex-direction:column; min-width:0 }
.chat-empty{
  flex:1; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:8px; color:var(--muted);
}
.chat-empty-icon{ font-size:44px; opacity:.35 }
.chat-conv{ flex:1; display:flex; flex-direction:column; min-height:0 }
.chat-conv-head{
  padding: 12px 16px; border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
}
.chat-conv-name{ font-weight:600; color:#fff }
.chat-msgs{
  flex:1; overflow-y:auto; padding: 14px 16px;
  display:flex; flex-direction:column; gap:8px;
}
.chat-msg{
  max-width: 72%; padding: 8px 12px;
  border-radius: 14px; font-size: 13.5px;
  word-wrap: break-word;
}
.chat-msg.own{
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(139,92,255,.5), rgba(0,212,255,.3));
  color:#fff; border-bottom-right-radius: 4px;
}
.chat-msg.their{
  align-self: flex-start; background: rgba(255,255,255,.06);
  color:#e6e6f0; border-bottom-left-radius: 4px;
}
.chat-msg-img {
  display: block;
  line-height: 0;
  max-width: 100%;
}
.chat-msg-img img{
  max-width: 260px;
  max-height: 260px;
  width: auto;
  height: auto;
  border-radius: 12px;
  display: block;
  margin-bottom: 6px;
  object-fit: cover;
  background: rgba(0,0,0,.3);
}
}
.chat-msg-time{
  font-size: 10.5px; color: rgba(255,255,255,.5);
  text-align: right; margin-top: 3px;
}
.chat-msg.their .chat-msg-time{ color: var(--muted) }

.chat-form{
  padding: 10px 12px; border-top: 1px solid var(--border);
  display:flex; gap:8px; align-items:center;
}
.chat-form .input{ flex:1 }
.chat-attach{
  width:40px; height:40px; border-radius:12px; display:grid; place-items:center;
  color:var(--muted); font-size:18px; border:1px solid var(--border); transition:.2s;
}
.chat-attach:hover{ color:#fff; background:rgba(255,255,255,.06) }
.chat-img-preview{ padding: 0 16px }
.chat-img-preview img{ max-height: 80px; border-radius: 8px; margin-bottom:6px }

.chat-admin{
  display:flex; height: 560px;
  border-radius: 16px; overflow:hidden;
  border:1px solid var(--border);
}
.chat-admin-users{
  width: 260px; flex:0 0 260px;
  border-right:1px solid var(--border);
  overflow-y:auto; padding:6px;
  background:rgba(255,255,255,.02);
}
.chat-admin-conv{ flex:1; display:flex; flex-direction:column; min-width:0 }
.chat-admin-impersonate{
  display:flex; align-items:center; gap:8px;
  font-size:12.5px; color:var(--muted);
}
.chat-admin-impersonate .input{
  padding: 6px 10px; font-size: 12.5px; width: auto;
}

@media (max-width: 720px){
  .chat-shell{ height: calc(100vh - var(--player-h, 96px) - 130px) }
  .chat-side{ width: 100%; flex-basis: 100% }
  .chat-dialog{ display:none }
  .chat-shell.mobile-open .chat-side{ display:none }
  .chat-shell.mobile-open .chat-dialog{ display:flex }
  .chat-admin{ flex-direction:column; height:auto }
  .chat-admin-users{ width:100%; flex-basis:auto; max-height:220px; border-right:none; border-bottom:1px solid var(--border) }
  .chat-admin-conv{ height: 420px }
}

/* ===================== CHAT profile ===================== */
.chat-avatar-sm{
  width:32px; height:32px; flex:0 0 32px;
  border-radius:9px; display:grid; place-items:center;
  font-weight:600; font-size:13px; color:#fff; overflow:hidden;
  background: linear-gradient(135deg, rgba(139,92,255,.45), rgba(0,212,255,.25));
  border:1px solid rgba(139,92,255,.4);
}
.chat-avatar-sm img{ width:100%; height:100%; object-fit:cover; display:block }
.chat-avatar img{ width:100%; height:100%; object-fit:cover; display:block; border-radius:inherit }
.chat-me-name{ flex:1; margin-left:8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }

.profile-avatar-row{ display:flex; align-items:center; gap:16px; margin-bottom:16px; }
.profile-avatar{
  width:80px; height:80px; flex:0 0 80px; border-radius:20px;
  display:grid; place-items:center; font-size:28px; font-weight:700; color:#fff;
  background: linear-gradient(135deg, rgba(139,92,255,.45), rgba(0,212,255,.25));
  border:1px solid rgba(139,92,255,.4); overflow:hidden;
}
.profile-avatar img{ width:100%; height:100%; object-fit:cover }
.profile-avatar-actions{ display:flex; flex-direction:column; gap:8px }
#profileModal .modal-body{ gap:10px }
#profileModal hr{ border:none; border-top:1px solid var(--border); margin:6px 0 }

/* ===================== БЛОГИ — сетка на мобильных ===================== */
@media (max-width: 640px) {
  .blog-grid{
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  .blog-cover{ height: 90px; }
  .blog-cover span{ font-size: 26px; }
  .blog-info{ padding: 10px 10px 12px; gap: 4px; }
  .blog-info h3{ font-size: 13px; }
  .blog-stats{ gap: 10px; }
  .blog-stats .stat{ font-size: 11px; }
}

@media (max-width: 380px) {
  .blog-grid{ gap: 8px; }
  .blog-cover{ height: 76px; }
  .blog-info{ padding: 8px 8px 10px; }
  .blog-info h3{ font-size: 12px; }
}

/* ===================== CHAT — мобильный режим ===================== */
.chat-back{
  display: none;
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 10px;
  align-items: center; justify-content: center;
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 16px;
  transition: .2s;
  margin-right: 8px;
  cursor: pointer;
}
.chat-back:hover{ color: #fff; background: rgba(255,255,255,.06) }

@media (max-width: 720px){
  .chat-back{ display: inline-flex }
  .chat-shell{ height: calc(100vh - var(--player-h, 96px) - 130px) }
  .chat-side{ width: 100%; flex-basis: 100%; display:flex }
  .chat-dialog{ display:none }
  .chat-shell.mobile-open .chat-side{ display:none }
  .chat-shell.mobile-open .chat-dialog{ display:flex }
}

/* ===================== ПЛЕЕР — СВЁРНУТЫЙ РЕЖИМ ===================== */
.player{ position: relative; }

.player-collapse-btn{
  position: absolute;
  top: -10px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(20,20,24,.95);
  border: 1px solid var(--border-2);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 11px;
  z-index: 5;
  transition: .2s;
  padding: 0;
  line-height: 1;
}
.player-collapse-btn:hover{
  background: rgba(40,40,48,.95);
  transform: scale(1.1);
}
.player-collapse-btn::before{ content: '▾'; }

/* Свёрнутое состояние */
.player-wrap.collapsed .player{
  transform: translateY(calc(100% + 20px));
  opacity: 0;
  pointer-events: none;
  transition: transform .3s ease, opacity .3s ease;
}

.player-wrap.collapsed .player-collapse-btn{
  display: none;
}

/* Пилюля в углу */
.player-mini{
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 99px;
  background: rgba(20,20,24,.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-2);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  z-index: 90;
  box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 20px rgba(139,92,255,.2);
  max-width: calc(100vw - 32px);
  transition: transform .2s;
  user-select: none;
}
.player-mini:hover{ transform: translateY(-2px); }

.player-wrap.collapsed .player-mini{ display: flex; }

.player-mini .mini-cover{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #8b5cff, #00d4ff, #8b5cff);
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(139,92,255,.5);
}
.player-wrap.collapsed .player-mini .mini-cover{
  animation: spin 6s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg) } }

.player-mini .mini-title{
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.player-mini .mini-play{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(139,92,255,.6), rgba(0,212,255,.4));
  border: 1px solid rgba(139,92,255,.5);
  font-size: 13px;
  flex-shrink: 0;
}
.player-mini .mini-play:hover{
  box-shadow: 0 0 14px rgba(139,92,255,.7);
}

@media (max-width: 560px){
  .player-mini{
    bottom: 12px;
    right: 10px;
    padding: 6px 12px 6px 6px;
    gap: 8px;
  }
  .player-mini .mini-title{ max-width: 130px; font-size: 12px; }
  .player-mini .mini-cover{ width: 22px; height: 22px; }
  .player-mini .mini-play{ width: 22px; height: 22px; font-size: 12px; }
}

/* ===================== ЧАТ РАСТЯГИВАЕТСЯ ПРИ СВЁРНУТОМ ПЛЕЕРЕ ===================== */

/* 1) Когда плеер свёрнут — chat-shell выше */
body.player-collapsed .chat-shell{
  height: calc(100vh - 150px) !important;
}

@media (max-width: 720px){
  body.player-collapsed .chat-shell{
    height: calc(100vh - 130px) !important;
  }
}

/* 2) Основной контент тоже не оставляет пустоты снизу */
body.player-collapsed #app{
  padding-bottom: 0;
}

body.player-collapsed{
  padding-bottom: 20px;
}

/* 3) Админский чат-контейнер тоже растёт */
body.player-collapsed .chat-admin{
  height: calc(100vh - 220px);
  max-height: 780px;
}
/* ===================== ГРАФ — fullscreen на мобиле ===================== */
.graph-close-btn{ display: none; font-size: 16px; padding: 6px 12px; }

@media (max-width: 720px) {
  /* прячем топбар и плеер, пока граф открыт на весь экран */
  html.graph-fs-pre .topbar-wrap,
  html.graph-fs-pre .player-wrap,
  html.graph-fs-pre .player-mini,
  body.graph-fs-pre .topbar-wrap,
  body.graph-fs-pre .player-wrap,
  body.graph-fs-pre .player-mini{
    display: none !important;
  }
  html.graph-fs-pre,
  body.graph-fs-pre{
    overflow: hidden;
    background: #000;
  }

  /* панель графа растягивается на весь экран */
  html.graph-fs-pre .graph-panel,
  body.graph-fs-pre .graph-panel{
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: #000;
  }

  html.graph-fs-pre .graph-panel .panel-head,
  body.graph-fs-pre .graph-panel .panel-head{
    padding: 10px 14px;
    margin: 0;
    border-bottom: 1px solid var(--border);
    flex: 0 0 auto;
  }

  html.graph-fs-pre .graph-close-btn,
  body.graph-fs-pre .graph-close-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
  }

  html.graph-fs-pre .graph-wrap,
  body.graph-fs-pre .graph-wrap{
    flex: 1 1 auto;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
  }

  html.graph-fs-pre #graphCanvas,
  body.graph-fs-pre #graphCanvas{
    width: 100% !important;
    height: 100% !important;
    display: block;
  }

  html.graph-fs-pre .graph-help-overlay,
  body.graph-fs-pre .graph-help-overlay{
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    padding: 6px 12px;
    opacity: .85;
    max-width: 90%;
    text-align: center;
  }
}
/* ===================== WEATHER CANVAS ===================== */
#weatherCanvas{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;                /* над фоном и .bg-glow, но под контентом */
}
/* .bg-glow имеет z-index: 0, .container/main — 1+. 
   Если контент вдруг под снегом — подними ему z-index. */
/* ===================== AMAZING BALANCE ===================== */
.amazing-panel{ padding: 8px 12px; border-radius: 16px; }
.amazing-pill{ display: flex; align-items: center; gap: 12px; min-height: 44px; }
.amazing-icon{
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 10px; display: grid; place-items: center;
  font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, rgba(255,62,20,.85), rgba(253,133,46,.55));
  border: 1px solid rgba(255,62,20,.5);
  box-shadow: 0 0 20px rgba(253,133,46,.35), inset 0 1px 0 rgba(255,255,255,.15);
}
.amazing-info{ flex: 1; min-width: 0 }
.amazing-label{
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.amazing-value{
  font-size: 16px; font-weight: 700; color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(253,133,46,.35);
}
.amazing-time{
  font-size: 11px; color: var(--muted);
  text-align: right; line-height: 1.2; white-space: nowrap;
}

@media (max-width: 560px){
  .amazing-panel{ padding: 6px 10px }
  .amazing-icon{ width: 32px; height: 32px; flex-basis: 32px; border-radius: 9px; font-size: 14px }
  .amazing-value{ font-size: 14.5px }
  .amazing-time{ font-size: 10px }
}

.chat-profile-mobile{
  display: none;
  margin-left: auto;
  margin-right: 0;
}
@media (max-width: 720px){
  .chat-profile-mobile{ display: inline-flex }
  .chat-back + .chat-conv-name{
    flex: 1;
    text-align: left;
    margin-left: 8px;
  }
}
/* ===================== МОБИЛЬНАЯ ШАПКА ===================== */
@media (max-width: 720px) {
  .topbar{
    padding: 8px 10px;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
  }

  .brand{
    flex: 0 0 auto;
    min-width: 0;
  }
  .brand-name{
    font-size: 13px;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand-dot{ display: none; }   /* шарик убран, если хотел оставить — убери эту строку */

  /* nav: одна строка, скролл по горизонтали, если не влезает */
  .nav{
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    scrollbar-width: none;               /* Firefox */
    -webkit-overflow-scrolling: touch;   /* iOS — плавный скролл */
    padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar{ display: none; }  /* Chrome/Safari */

  .nav-btn{
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
    flex: 0 0 auto;
  }
}

/* совсем узкие экраны (iPhone SE и подобные) */
@media (max-width: 400px) {
  .brand-name{ max-width: 60px; font-size: 12px; }
  .nav-btn{ padding: 5px 8px; font-size: 11.5px; }
  .nav{ gap: 3px; }
}
/* ===================== NOW PLAYING — мобильный ===================== */
@media (max-width: 640px) {

  .now-playing-pill{
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "cover  info   bars"
      "lyrics lyrics lyrics";
    column-gap: 10px;
    row-gap: 6px;
    align-items: center;
  }

  .np-cover{ grid-area: cover }
  .np-info { grid-area: info; min-width: 0 }
  .np-bars { grid-area: bars }

  /* Название трека — на всю ширину строки */
  .np-title{
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .np-artist{
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Строка песни — отдельная, под названием */
  .np-lyrics{
    grid-area: lyrics;
    width: 100%;
    min-width: 0;
    padding: 6px 0 0;
    margin: 0;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
  }

  /* «сейчас слушаю» — компактнее, чтобы не отбирало место у title */
  .np-label{
    font-size: 10px;
    letter-spacing: .3px;
  }
}
/* ===================== NOW PLAYING — мобильный ===================== */
@media (max-width: 640px){
  .now-playing-pill{
    flex-wrap: wrap;
    row-gap: 8px;
    align-items: center;
    padding: 10px 12px;
  }

  /* обложка + инфо — в первой строке, бары справа */
  .np-cover{
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
  }

  .np-info{
    flex: 1 1 auto;
    min-width: 0;
  }

  .np-title{
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .np-artist{
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* текст песни — во всю ширину, во второй строке */
  .np-lyrics{
    flex: 1 1 100%;
    order: 10;                        /* последним в потоке = снизу */
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 8px 2px 0;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
  }

  /* эквалайзер — оставляем справа сверху */
  .np-bars{
    flex: 0 0 auto;
  }

  /* "сейчас слушаю" — помельче */
  .np-label{
    font-size: 10px;
    letter-spacing: .3px;
  }
  .np-label span:last-child{
    display: none;         /* оставить только пульсирующую точку */
  }
}