:root {
  --bg: #000;
  --text: #fff;
  --muted: rgba(255,255,255,0.65);
  --muted2: rgba(255,255,255,0.45);
  --panel: rgba(20,20,20,0.56);
  --panel2: rgba(28,28,28,0.62);
  --border: rgba(255,255,255,0.10);
  --border2: rgba(255,255,255,0.16);
  --blur: 16px;
  --radius: 12px;
  --shadow: 0 18px 60px rgba(0,0,0,0.55);
  --accent: rgba(255,255,255,0.92);

  /* updated at runtime (sticky header offset) */
  --header-h: 86px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

html {
  scrollbar-gutter: stable;
}

html.fs-open {
  scrollbar-gutter: auto;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  overflow-y: scroll;
}

body.fs-open,
body.art-open,
body.sheet-open {
  overflow: hidden;
}

/* Global custom scrollbar (Windows/Chrome/Edge/Firefox) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.14) transparent;
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.20);
  background-clip: content-box;
}

#app-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #000;
}

.bg-img-layer {
  position: absolute;
  inset: -50px;
  background: #000;
  background-size: cover;
  background-position: center;
  filter: blur(48px);
  transform: scale(1.10);
  opacity: 0;
  transition: opacity 420ms ease;
  will-change: opacity;
}

.bg-img-layer.is-active {
  opacity: 0.48;
}

.bg-tint {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.62);
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='%23ffffff' fill-opacity='0.25'%3E%3Ccircle cx='8' cy='18' r='1'/%3E%3Ccircle cx='42' cy='8' r='1'/%3E%3Ccircle cx='78' cy='38' r='1'/%3E%3Ccircle cx='112' cy='22' r='1'/%3E%3Ccircle cx='18' cy='74' r='1'/%3E%3Ccircle cx='54' cy='92' r='1'/%3E%3Ccircle cx='102' cy='86' r='1'/%3E%3Ccircle cx='126' cy='120' r='1'/%3E%3Ccircle cx='10' cy='130' r='1'/%3E%3Ccircle cx='88' cy='122' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

.app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 22px 140px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 70;
  width: 100%;
  background: rgba(0,0,0,0.46);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}

.app-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 22px 18px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.search-area {
  position: relative;
}

.brand {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.2px;
  user-select: none;
  cursor: pointer;
}

.brand:hover {
  opacity: 0.90;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  min-width: 320px;
  max-width: 560px;
  cursor: text;
}

.search .icon {
  opacity: 0.85;
}

.search-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 14px;
}

.search-input::placeholder {
  color: var(--muted2);
}

.search-clear {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, background 120ms ease, color 120ms ease;
}

.search.has-value .search-clear {
  opacity: 1;
  pointer-events: auto;
}

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

.search-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(560px, 92vw);
  z-index: 60;
}

.search-results {
  border-radius: 16px;
  padding: 10px;
  background: rgba(15,15,15,0.82);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  box-shadow: var(--shadow);
  max-height: 420px;
  overflow: auto;
}

.search-empty {
  padding: 14px 12px;
  color: var(--muted2);
}

.search-item {
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;

  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 12px;
  align-items: center;
}

.search-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  position: relative;
  flex: 0 0 auto;
}

.search-thumb.is-artist {
  border-radius: 999px;
}

.search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-thumb.is-loaded .cover-img {
  opacity: 1;
}

.search-item-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.search-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
}

.search-item.active {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
}

.search-item-title {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-sub {
  color: var(--muted2);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-results::-webkit-scrollbar { width: 10px; }
.search-results::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
}

.search-results {
  scrollbar-color: rgba(255,255,255,0.12) transparent;
  scrollbar-width: thin;
}

.view-title {
  font-size: 22px;
  font-weight: 700;
  margin: 14px 0 18px;
}

/* Page views (Upload/Settings) should look like standalone screens */
#view-upload > .view-title,
#view-settings > .view-title {
  text-align: center;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.2px;
  margin: 10px 0 18px;
}

@media (max-width: 520px) {
  #view-upload > .view-title,
  #view-settings > .view-title {
    font-size: 28px;
  }
}

.hidden { display: none !important; }

/* Pre-auth boot: avoid flashing Home before Auth on first paint */
html.preauth #view-auth {
  display: block !important;
}

html.preauth #view-artists,
html.preauth #view-artist,
html.preauth #view-release,
html.preauth #view-upload,
html.preauth #view-settings {
  display: none !important;
}

html.preauth .search-area {
  display: none !important;
}

html.preauth .app {
  padding-bottom: 0 !important;
}

html.preauth #btn-profile {
  visibility: hidden;
  pointer-events: none;
}

/* Auth view mode (JS-driven) */
html.auth-view .app {
  padding-bottom: 0 !important;
}

html.auth-view .search-area {
  display: none !important;
}

html.auth-view #btn-profile {
  visibility: hidden;
  pointer-events: none;
}

/* Auth (login/register) */
.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  padding: 24px 0;
}

.auth-card {
  width: min(400px, 94vw);
  border-radius: 24px;
  padding: 36px 28px 28px;
}

#view-auth #auth-title {
  font-size: 26px;
  font-weight: 900;
  text-align: center;
  margin: 0 0 8px;
  letter-spacing: 0.2px;
}

/* Generic page container (e.g. Upload/Settings screens) */
.page-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 0 0;
}

.page-card {
  width: min(720px, 94vw);
  border-radius: 18px;
  padding: 18px;
}

/* Settings page (variant A) */
.settings-stack {
  display: grid;
  gap: 14px;
}

.settings-card {
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;
}

.settings-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.settings-card-title {
  font-weight: 900;
  letter-spacing: 0.2px;
}

.settings-card-meta {
  color: var(--muted2);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  min-width: 0;
}

.settings-card-body {
  display: grid;
}

.settings-card-pad {
  padding: 12px 14px 14px;
}

/* Admin dashboard */
#view-admin .settings-card-body {
  padding: 12px 14px 14px;
}

.admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-actions .btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.admin-kpi-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 10px;
}

.admin-kpi {
  border-radius: 14px;
  padding: 12px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-kpi-title {
  color: var(--muted2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-kpi-value {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.2px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.admin-kpi-value[data-accent="warn"] {
  color: rgba(255, 145, 145, 0.98);
}

.admin-kpi-sub {
  color: var(--muted2);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.admin-bars {
  width: 100%;
  height: 88px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 8px 8px 6px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
}

.admin-bar {
  flex: 1 1 0;
  min-width: 3px;
  border-radius: 8px 8px 4px 4px;
  opacity: 0.92;
  transition: opacity 120ms ease, filter 120ms ease;
}

.admin-bar:hover {
  opacity: 1;
  filter: brightness(1.08);
}

@media (max-width: 520px) {
  .admin-bars {
    height: 78px;
  }

  .admin-kpi-value {
    font-size: 20px;
  }
}

#settings-page .settings-card-pad .settings-input {
  margin-top: 0;
}

/* Make sheetItem rows look like clean list rows inside settings cards */
#settings-page .settings-card .sheet-item {
  margin: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 12px 14px;
}

#settings-page .settings-card .sheet-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: transparent;
}

#settings-page .settings-card .sheet-item + .sheet-item {
  border-top: 1px solid rgba(255,255,255,0.08);
}

#settings-page .settings-card .sheet-item-sub {
  color: var(--muted2);
}

#settings-page .settings-card .sheet-item-right {
  color: rgba(255,255,255,0.65);
}

/* Settings page form layout */
.settings-input {
  margin-top: 10px;
}

.settings-input-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 8px;
}

.settings-input-left {
  min-width: 0;
}

.settings-input-label {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.settings-input-sub {
  margin-top: 4px;
  color: var(--muted2);
  font-size: 12px;
  line-height: 1.4;
}

.settings-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-input-row .sheet-input {
  flex: 1;
}

.settings-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 720px) {
  .settings-two-cols { grid-template-columns: 1fr; }
}

.auth-sub {
  color: var(--muted2);
  margin: 0 0 22px;
  line-height: 1.5;
  text-align: center;
  font-size: 14px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form .sheet-input {
  height: 48px;
  font-size: 15px;
}

.auth-input-row {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-row .sheet-input {
  padding-right: 46px;
}

.auth-pass-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);

  width: 34px;
  height: 34px;
  border-radius: 999px;

  border: 1px solid transparent;
  background: transparent;
  color: var(--muted2);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.auth-pass-toggle .icon {
  width: 18px;
  height: 18px;
}

.auth-pass-toggle:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
}

.auth-pass-toggle:focus-visible {
  outline: none;
  border-color: rgba(255,255,255,0.20);
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-hint {
  color: var(--muted2);
  font-size: 12px;
  line-height: 1.35;
  padding: 0 2px;
}

.auth-field-error {
  color: rgba(255, 170, 170, 0.95);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  padding: 0 2px;
}

#view-auth .sheet-input.is-invalid {
  border-color: rgba(255, 0, 0, 0.26);
  background: rgba(255, 0, 0, 0.06);
}

#view-auth .sheet-input.is-invalid:focus {
  border-color: rgba(255, 0, 0, 0.34);
  background: rgba(255, 0, 0, 0.08);
}

#view-auth .sheet-input.is-readonly {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.88);
}

#view-auth .sheet-input.is-readonly:focus {
  border-color: rgba(255,255,255,0.16);
}

.auth-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

/* Submit: full-width solid white — главный CTA */
#auth-submit {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
  background: rgba(255,255,255,0.90);
  color: rgba(0,0,0,0.88);
  border: none;
  cursor: pointer;
}

#auth-submit:hover {
  background: #fff;
}

/* Switch: субтильная текстовая ссылка вместо кнопки */
#auth-switch {
  background: transparent;
  border: none;
  color: var(--muted2);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 0;
  height: auto;
  cursor: pointer;
}

#auth-switch:hover {
  color: var(--muted);
}

/* Forgot password: same subtle link style */
#auth-forgot {
  background: transparent;
  border: none;
  color: var(--muted2);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 0;
  height: auto;
  cursor: pointer;
}

#auth-forgot:hover {
  color: var(--muted);
}

.auth-error {
  position: relative;
  white-space: pre-wrap;
  color: rgba(255, 215, 215, 0.96);
  background: rgba(255, 0, 0, 0.06);
  border: 1px solid rgba(255, 0, 0, 0.18);
  padding: 10px 12px 10px 42px;
  border-radius: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.auth-error::before {
  content: "!";
  position: absolute;
  left: 12px;
  top: 10px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: rgba(255, 215, 215, 0.96);
  background: rgba(255, 0, 0, 0.10);
  border: 1px solid rgba(255, 0, 0, 0.22);
}

.auth-error.is-ok {
  color: rgba(200, 255, 220, 0.96);
  background: rgba(0, 255, 140, 0.06);
  border: 1px solid rgba(0, 255, 140, 0.18);
}

.auth-error.is-ok::before {
  content: "✓";
  color: rgba(200, 255, 220, 0.96);
  background: rgba(0, 255, 140, 0.10);
  border-color: rgba(0, 255, 140, 0.22);
}

/* Empty state */
.empty-state {
  border-radius: 18px;
  padding: 18px;
  max-width: 760px;
  margin: 12px auto 0;
  text-align: center;
}

/* Inline empty message (e.g. Likes) */
.tracks-empty-inline {
  padding: 16px 6px 6px;
  text-align: center;
}

.tracks-empty-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.tracks-empty-sub {
  margin-top: 8px;
  color: var(--muted2);
  line-height: 1.5;
}

/* Empty state on the artists home grid should span the full row */
.grid-artists > .empty-state {
  grid-column: 1 / -1;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 28px;
}

/* Onboarding card (first run / no artists) */
.grid-artists > .onboard-card {
  grid-column: 1 / -1;
  width: min(860px, 100%);
  justify-self: center;
  border-radius: 20px;
  padding: 18px;

  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  text-align: left;
}

.onboard-cover {
  border-radius: 16px;
}

.onboard-body {
  min-width: 0;
}

.onboard-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.onboard-sub {
  margin-top: 8px;
  color: var(--muted2);
  line-height: 1.5;
}

.onboard-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.onboard-btn {
  height: 40px;
  padding: 0 14px;
}

@media (max-width: 520px) {
  .grid-artists > .onboard-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 18px 16px;
  }

  .grid-artists > .onboard-card .onboard-actions {
    justify-content: center;
  }

  .grid-artists > .onboard-card .onboard-cover {
    width: min(220px, 70vw);
    justify-self: center;
  }
}

.empty-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.2px;
  margin: 2px 0 8px;
}

.empty-sub {
  color: var(--muted2);
  line-height: 1.5;
  margin: 0 0 12px;
  white-space: pre-wrap;
}

.empty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Карточка-плюс для создания плейлиста */
.playlist-add-card {
  border-style: dashed;
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.02);
}

.playlist-add-card:hover {
  border-color: rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

.playlist-add-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;

  /* fallback (if SVG symbol is missing) */
  font-size: 120px;
  font-weight: 200;
  line-height: 1;

  /* solid grey (no translucency) */
  color: #e6e6e6;
  user-select: none;
}

.playlist-add-thumb .icon {
  width: 66%;
  height: 66%;
  max-width: 168px;
  max-height: 168px;
}

.playlist-add-label {
  color: var(--muted2);
}

/* Upload (sheet) */
.upload-hint {
  color: var(--muted2);
  line-height: 1.5;
  margin: 0 0 12px;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.upload-progress {
  margin-top: 12px;
  color: rgba(255,255,255,0.70);
  font-weight: 800;
}

.upload-errors,
.sheet-error {
  margin-top: 10px;
  white-space: pre-wrap;
  color: rgba(255, 145, 145, 0.98);
  background: rgba(255, 0, 0, 0.08);
  border: 1px solid rgba(255, 0, 0, 0.16);
  padding: 10px 12px;
  border-radius: 14px;
}

.upload-done {
  margin-top: 10px;
  white-space: pre-wrap;
  color: rgba(255, 255, 255, 0.90);
  background: rgba(93, 232, 184, 0.10);
  border: 1px solid rgba(93, 232, 184, 0.22);
  padding: 10px 12px;
  border-radius: 14px;
  text-align: center;
}

.upload-done-title {
  font-weight: 900;
}

.upload-done-sub {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.upload-done-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.upload-drop {
  margin: 0 0 12px;
  padding: 14px 12px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.70);
  text-align: center;
  font-weight: 800;
  user-select: none;
}

.upload-drop.dragover {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.90);
}

.upload-drop.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.upload-overall-bar {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.upload-overall-fill {
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.45);
}

.upload-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
}

.upload-item-left {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.upload-item-title {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item-sub {
  font-size: 12px;
  color: var(--muted2);
}

.upload-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.upload-status {
  font-size: 12px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.70);
  width: 78px;
  text-align: right;
}

.upload-status.is-done {
  color: rgba(170, 255, 190, 0.92);
}

.upload-status.is-error {
  color: rgba(255, 145, 145, 0.98);
}

.upload-status.is-skipped {
  color: rgba(255, 255, 255, 0.50);
}

.upload-item-bar {
  width: 110px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.upload-item-fill {
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.45);
}

.upload-pct {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.60);
  width: 36px;
  text-align: right;
}

.upload-remove {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  font-weight: 900;
  cursor: pointer;
}

.upload-remove:hover {
  border-color: rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.08);
}

.upload-remove:disabled {
  opacity: 0.5;
  cursor: default;
}

.icon {
  width: 20px;
  height: 20px;
  display: block;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.glass:hover {
  background: var(--panel2);
  border-color: var(--border2);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));

  /* match sticky offset to avoid overlap with content below */
  margin-top: 14px;

  /* keep it reachable while scrolling */
  position: sticky;
  top: calc(var(--header-h) + 14px);
  z-index: 40;
}

.btn-back:hover {
  border-color: var(--border2);
  background: var(--panel2);
}

.grid-artists {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.artist-card {
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: transform 120ms ease;
}

.artist-card:hover {
  transform: translateY(-2px);
}

/* Artist grid action tile (upload music) */
.artist-add-card {
  border-style: dashed;
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.02);
}

.artist-add-card:hover {
  border-color: rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.05);
}

.artist-avatar {
  width: 160px;
  height: 160px;
  margin: 0 auto 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  position: relative;
}

.artist-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Center icon/text for the upload action tile */
.artist-avatar-add {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.80);
  user-select: none;
}

.artist-avatar-add .icon {
  width: 64px;
  height: 64px;
}

.artist-avatar-add {
  font-size: 72px;
  font-weight: 200;
  line-height: 1;
}

.artist-name {
  text-align: center;
  font-weight: 700;
}

.release-sections {
  display: grid;
  gap: 26px;
}

.section-title {
  color: var(--muted);
  font-weight: 700;
  margin: 16px 0 14px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0 14px;
}

.section-title-row .section-title {
  margin: 0;
}

/* Home (library): clearer separation between blocks */
#view-artists > .view-title {
  margin-bottom: 0;
}

#view-artists .section {
  padding-top: 16px;
}

#view-artists .section-title {
  margin: 0 0 14px;
}

.btn-pill {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  font-weight: 700;
}

/* Header profile button: fixed-size circle (no layout shift) */
#btn-profile {
  width: 54px;
  min-width: 54px;
  height: 54px;
  min-height: 54px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* kept for backwards-compat: JS toggles this class */
.btn-profile-initials {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn-pill:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
}

.grid-releases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.release-card {
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: transform 120ms ease;
}

.release-card:hover {
  transform: translateY(-2px);
}

.release-card.is-placeholder {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.release-card.is-placeholder:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.release-cover-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  position: relative;
}

.release-cover-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-bg {
  position: absolute;
  inset: -18px;
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  transform: scale(1.08);
  opacity: 0.95;
  z-index: 0;
  pointer-events: none;
}

.cover-bg-tint {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1;
  pointer-events: none;
}

@keyframes cover-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.artist-avatar.has-img::before,
.release-cover-thumb.has-img::before,
.track-cover.has-img::before,
.release-cover.has-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      110deg,
      rgba(255,255,255,0.02) 0%,
      rgba(255,255,255,0.10) 45%,
      rgba(255,255,255,0.02) 90%
    );
  transform: translateX(-100%);
  animation: cover-shimmer 1.1s linear infinite;
  pointer-events: none;
  opacity: 0.65;
  z-index: 1;
}

.artist-avatar.is-loaded::before,
.release-cover-thumb.is-loaded::before,
.track-cover.is-loaded::before,
.release-cover.is-loaded::before,
.artist-avatar.is-error::before,
.release-cover-thumb.is-error::before,
.track-cover.is-error::before,
.release-cover.is-error::before {
  animation: none;
  opacity: 0;
}

.cover-img {
  opacity: 0;
  transition: opacity 180ms ease;
  position: relative;
  z-index: 2;

  /* prevent baseline gaps / subtle misalignment for SVG cover icons */
  display: block;
}

.artist-avatar.is-loaded .cover-img,
.release-cover-thumb.is-loaded .cover-img,
.track-cover.is-loaded .cover-img,
.release-cover.is-loaded .cover-img {
  opacity: 1;
}

.badge-censor {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.badge-censor[data-cens="censored"] {
  border-color: rgba(255,116,116,0.55);
  background: rgba(255,116,116,0.14);
  color: rgba(255,233,233,0.96);
}

.badge-censor[data-cens="uncensored"] {
  border-color: rgba(93,232,184,0.50);
  background: rgba(93,232,184,0.14);
  color: rgba(220,255,243,0.96);
}

.release-name {
  margin-top: 12px;
  font-weight: 700;
}

.release-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted2);
}

.release-header {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  margin-bottom: 18px;
}

.release-cover {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  flex: 0 0 auto;
  box-shadow: var(--shadow);
  position: relative;
}

.release-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.release-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.release-title {
  font-size: 24px;
  font-weight: 800;
  min-width: 0;
}

.release-subtitle {
  margin-top: 6px;
  color: var(--muted2);
}

.tracks-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1.6fr) minmax(0, 1fr) 170px;
  gap: 16px;
  padding: 0 18px 10px 14px;
  /* transparent border matches .track-row.glass 1px border — keeps grid columns pixel-aligned */
  border: 1px solid transparent;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: var(--muted2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin: 16px 0 0;
}

.tracks-head-center { text-align: center; }
.tracks-head-right { text-align: right; }
.tracks-head-release { text-align: center; }

.tracks-head-end {
  display: grid;
  grid-template-columns: 47px 52px 36px;
  gap: 12px;
  align-items: center;
  justify-content: end;

  /* slightly tighter so labels fit */
  letter-spacing: 0.08em;
}

.tracks-head-quality {
  text-align: center;
}

.tracks-head-time {
  text-align: center;
}

.tracks-head-menu {
  width: 36px;
}

.tracks-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.track-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1.6fr) minmax(0, 1fr) 170px;
  gap: 16px;
  align-items: center;
  padding: 10px 18px 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  box-shadow: none;  /* override glass default shadow — too heavy on a long list */
}

.track-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.track-cover {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  position: relative;
}

.track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.track-num {
  position: absolute;
  left: 6px;
  bottom: 6px;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: rgba(255,255,255,0.92);
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.track-main {
  overflow: hidden;
  min-width: 0;
}

.track-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  color: var(--muted2);
  font-size: 13px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* is-link теперь на внутреннем <span>, чтобы кликабельная область = ширина текста */
.track-artist .is-link,
.track-release .is-link {
  cursor: pointer;
}

.track-artist .is-link:hover,
.track-release .is-link:hover {
  color: rgba(255,255,255,0.92);
  text-decoration: underline;
}

.track-release {
  color: var(--muted2);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.track-end {
  display: grid;
  grid-template-columns: 47px 52px 36px;
  gap: 12px;
  align-items: center;
  justify-content: end;
}

/* Release view: hide redundant Release column for nicer layout */
#view-release[data-track-layout="release"] .tracks-head {
  grid-template-columns: 56px minmax(0, 1.6fr) 170px;
}

#view-release[data-track-layout="release"] .tracks-head-release {
  display: none;
}

#view-release[data-track-layout="release"] .track-row {
  grid-template-columns: 56px minmax(0, 1.6fr) 170px;
}

#view-release[data-track-layout="release"] .track-release {
  display: none;
}

.track-duration {
  color: var(--muted2);
  text-align: center;
  font-variant-numeric: tabular-nums;
  min-width: 52px;
}

.track-row.playing {
  background: rgba(93,232,184,0.05);
  border-color: rgba(93,232,184,0.18);
}

.track-row.playing .track-title {
  color: rgba(93,232,184,0.90);
}

/* Keep green tint visible when hovering a playing row (glass:hover would otherwise override it) */
.track-row.playing:hover {
  background: rgba(93,232,184,0.09);
  border-color: rgba(93,232,184,0.26);
}

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 14px 16px;
}

.player-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 82px 1fr auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(15,15,15,0.72);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.player-cover {
  width: 82px;
  height: 82px;
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  position: relative;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.player-cover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.28);
  opacity: 0;
  transition: opacity 120ms ease;
}

.player-cover:hover .player-cover-overlay {
  opacity: 1;
}

.player-info {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.player-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}


.player-title-actions,
.fs-mid-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.badge {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  flex: 0 0 auto;
  text-indent: 1px;
}

.badge-sm {
  font-size: 10px;
  padding: 5px 7px;
  letter-spacing: 0.12em;
}

/* Quality badges should match the height of icon buttons (like/menu) */
.badge[data-q] {
  height: 36px;
  width: 47px;
  min-width: 47px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;

  /* tight typography to fit MAX/HIGH/MID/LOW */
  font-size: 10px;
  letter-spacing: 0.08em;
  text-indent: 0;
  white-space: nowrap;
}

.badge[data-q="max"] {
  border-color: rgba(184,109,255,0.55);
  background: rgba(184,109,255,0.16);
  color: rgba(244,233,255,0.96);
}

.badge[data-q="high"] {
  border-color: rgba(93,232,184,0.50);
  background: rgba(93,232,184,0.14);
  color: rgba(220,255,243,0.96);
}

.badge[data-q="mid"] {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.90);
}

.badge[data-q="low"] {
  border-color: rgba(255,116,116,0.55);
  background: rgba(255,116,116,0.14);
  color: rgba(255,233,233,0.96);
}

.player-title {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.player-sub {
  margin-top: 6px;
  color: var(--muted2);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sub-sep {
  color: rgba(255,255,255,0.35);
  flex: 0 0 auto;
}

.sub-link {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-link:hover {
  color: rgba(255,255,255,0.92);
  text-decoration: underline;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  position: relative;
}

.icon-btn-sm {
  width: 36px;
  height: 36px;
}

.icon-btn-sm .icon {
  width: 18px;
  height: 18px;
}

.icon-btn.is-liked {
  background: rgba(255, 90, 90, 0.16);
  border-color: rgba(255, 90, 90, 0.30);
  color: rgba(255, 90, 90, 0.95);
}

.icon-btn.is-liked:hover {
  background: rgba(255, 90, 90, 0.20);
  border-color: rgba(255, 90, 90, 0.40);
}

.icon-btn:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
}

.icon-btn.is-active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.22);
}

.icon-btn.is-one::after {
  content: "1";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: rgba(255,255,255,0.92);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.icon-btn:disabled:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
}

.icon-btn-primary {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.12);
}

.player-progress {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.time {
  font-variant-numeric: tabular-nums;
  color: var(--muted2);
  font-size: 12px;
  text-align: center;
}

.bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  position: relative;
  cursor: pointer;
  touch-action: none;
}

.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
}

.player-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-right: 6px;
}

.player-volume {
  display: grid;
  grid-template-columns: 44px 120px;
  gap: 10px;
  align-items: center;
}

.bar-volume {
  height: 6px;
}

.fs {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: block;
  overflow: hidden;
  background: #000;
  --lyrics-w: min(520px, 34vw);
  --fs-w: min(440px, 70vw);
}

.fs-bg {
  position: absolute;
  inset: -40px;
  background: #000;
  background-size: cover;
  background-position: center;
  filter: blur(52px);
  transform: scale(1.12);
  opacity: 0;
  transition: opacity 420ms ease;
  will-change: opacity;
  pointer-events: none;
}

.fs-bg.is-active {
  opacity: 0.62;
}

.fs-tint {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  pointer-events: none;
}

.fs::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='%23ffffff' fill-opacity='0.25'%3E%3Ccircle cx='8' cy='18' r='1'/%3E%3Ccircle cx='42' cy='8' r='1'/%3E%3Ccircle cx='78' cy='38' r='1'/%3E%3Ccircle cx='112' cy='22' r='1'/%3E%3Ccircle cx='18' cy='74' r='1'/%3E%3Ccircle cx='54' cy='92' r='1'/%3E%3Ccircle cx='102' cy='86' r='1'/%3E%3Ccircle cx='126' cy='120' r='1'/%3E%3Ccircle cx='10' cy='130' r='1'/%3E%3Ccircle cx='88' cy='122' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

.fs-action {
  display: none;
}

.fs-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 5;
  padding: 0;
}

.fs-action:hover,
.fs-close:hover {
  background: rgba(0,0,0,0.45);
}

.fs-action.is-active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.22);
}


.fs-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 78px 28px 28px;
}

.fs-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: transform 220ms ease;
  will-change: transform;
}

.fs.lyrics-open .fs-left,
.fs.queue-open .fs-left {
  transform: translateX(calc(-0.5 * var(--lyrics-w) - 9px));
}

.fs-tabs {
  width: var(--fs-w);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0;
  z-index: 4;
}

.fs-tab {
  flex: 1 1 0;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.fs-tab:hover {
  background: rgba(0,0,0,0.45);
}

.fs-tab.is-active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.22);
}

.fs-cover {
  width: var(--fs-w);
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
}

.fs-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fs-meta {
  width: var(--fs-w);
  text-align: left;
  min-width: 0;
}

.fs-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.fs-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.fs-mid-actions {
  margin-top: 0;
}

.fs-sub {
  margin-top: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.fs-controls {
  width: var(--fs-w);
}

.fs-progress {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.fs-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
}

.fs-btn {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.30);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  padding: 0;
}

.fs-btn:hover {
  background: rgba(0,0,0,0.38);
}

.fs-btn.is-active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.22);
}

.fs-btn.is-one::after {
  content: "1";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: rgba(255,255,255,0.92);
}

.fs-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.fs-btn:disabled:hover {
  background: rgba(0,0,0,0.30);
  border-color: rgba(255,255,255,0.14);
}

.fs-btn-primary {
  width: 68px;
  height: 68px;
  background: rgba(255,255,255,0.14);
}

.fs-volume {
  display: grid;
  grid-template-columns: 44px 220px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
}

.fs-lyrics {
  position: absolute;
  top: 78px;
  right: 28px;
  bottom: 28px;
  width: var(--lyrics-w);
  border-radius: 18px;
  padding: 18px 18px 14px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  transform: translateX(calc(100% + 64px));
  transition: transform 220ms ease;
  will-change: transform;
  pointer-events: none;
  z-index: 3;
}

.fs.lyrics-open #fs-lyrics {
  transform: translateX(0%);
  pointer-events: auto;
}

.fs.queue-open #fs-queue {
  transform: translateX(0%);
  pointer-events: auto;
}

.art {
  position: fixed;
  inset: 0;
  z-index: 120;
  overflow: hidden;
  background: #000;
}

.art-bg {
  position: absolute;
  inset: -40px;
  background: #000;
  background-size: cover;
  background-position: center;
  filter: blur(52px);
  transform: scale(1.12);
  opacity: 0;
  transition: opacity 420ms ease;
  will-change: opacity;
  pointer-events: none;
}

.art-bg.is-active {
  opacity: 0.62;
}

@media (prefers-reduced-motion: reduce) {
  .bg-img-layer,
  .fs-bg,
  .art-bg {
    transition: none;
  }
}

.art-tint {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.62);
  pointer-events: none;
}

.art::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='%23ffffff' fill-opacity='0.25'%3E%3Ccircle cx='8' cy='18' r='1'/%3E%3Ccircle cx='42' cy='8' r='1'/%3E%3Ccircle cx='78' cy='38' r='1'/%3E%3Ccircle cx='112' cy='22' r='1'/%3E%3Ccircle cx='18' cy='74' r='1'/%3E%3Ccircle cx='54' cy='92' r='1'/%3E%3Ccircle cx='102' cy='86' r='1'/%3E%3Ccircle cx='126' cy='120' r='1'/%3E%3Ccircle cx='10' cy='130' r='1'/%3E%3Ccircle cx='88' cy='122' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

.art-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 5;
  padding: 0;
}

.art-close:hover {
  background: rgba(0,0,0,0.45);
}

.art-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 28px 28px;
}

.art-content img {
  max-width: min(92vw, 920px);
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  border-radius: 18px;
  box-shadow: var(--shadow);
  background: rgba(255,255,255,0.04);
}

/* Popover menu (quick actions) */
.pop {
  position: fixed;
  inset: 0;
  z-index: 130;
}

.pop.hidden {
  display: none !important;
}

.pop-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
}

.pop-panel {
  position: absolute;
  width: min(420px, 94vw);
  max-height: min(60vh, 520px);
  overflow: auto;
  border-radius: 18px;
  padding: 10px;
  background: rgba(15,15,15,0.86);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  box-shadow: var(--shadow);
}

.pop-panel:hover {
  background: rgba(15,15,15,0.86);
  border-color: rgba(255,255,255,0.12);
}

.pop-title {
  font-weight: 900;
  letter-spacing: 0.2px;
  padding: 4px 6px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pop-panel .sheet-section-title {
  margin: 8px 0 8px;
}

.pop-panel .sheet-item {
  margin-bottom: 8px;
}

.pop-panel .sheet-item:last-child {
  margin-bottom: 0;
}

.pop-empty {
  padding: 8px 6px 6px;
  color: rgba(255,255,255,0.55);
  font-weight: 800;
}

/* Action sheet */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
}

.sheet.sheet-center {
  align-items: center;
}

.sheet.sheet-center .sheet-panel {
  max-height: min(86vh, 820px);
}

.sheet.hidden {
  display: none !important;
}

.sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.sheet.sheet-center .sheet-overlay {
  background: rgba(0,0,0,0.80);
}

.sheet-panel {
  position: relative;
  width: min(560px, 94vw);
  max-height: min(78vh, 720px);
  border-radius: 18px;
  padding: 0;
  background: rgba(15,15,15,0.86);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.sheet-title {
  font-weight: 900;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.sheet-body {
  padding: 12px 14px 14px;
  overflow: auto;
}

.sheet-section-title {
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 12px 0 10px;
}

.sheet-item {
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sheet-item:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
}

.sheet-item-left {
  min-width: 0;
}

.sheet-item-title {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-item-sub {
  margin-top: 4px;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-item-right {
  color: rgba(255,255,255,0.70);
  font-weight: 900;
  flex: 0 0 auto;
}

.sheet-input {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  padding: 0 12px;
  outline: none;
}

.sheet-input:focus {
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
}

.sheet-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.lyrics-scroll,
.queue-scroll {
  overflow: auto;
  padding-right: 0;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  min-height: 0;
  flex: 1;
}

/* hide scrollbar but keep scrolling */
.lyrics-scroll::-webkit-scrollbar,
.queue-scroll::-webkit-scrollbar { width: 0; height: 0; }
.lyrics-scroll,
.queue-scroll { scrollbar-width: none; }

.lyric-line {
  padding: 10px 12px;
  margin: 6px 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.70);
  line-height: 1.6;
}

.lyric-line[data-time] {
  cursor: pointer;
}

.lyric-line[data-time]:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
}

.lyric-line.active {
  color: rgba(255,255,255,0.98);
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
}

.queue-item {
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.queue-item:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
}

.queue-item.active {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
}

.queue-title {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-sub {
  margin-top: 4px;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 1100px) {
  .player-inner {
    grid-template-columns: 82px 1fr;
    grid-template-rows: auto auto auto;
  }

  .player-controls {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .player-progress { grid-column: 1 / -1; }

  .player-end {
    grid-column: 1 / -1;
    justify-content: center;
    padding-right: 0;
  }
}

@media (max-width: 900px) {
  .fs-action { display: none; }
  .fs-left { transform: none !important; }

  .fs-lyrics {
    display: none !important;
  }

  /* 12px gap × 2 + 47 + 52 + 36 = 159px — нужно мин иметь 165px+ в концевом столбце */
  .tracks-head { grid-template-columns: 56px minmax(0, 1.6fr) 165px; }
  .tracks-head-release { display: none; }

  .track-row { grid-template-columns: 56px minmax(0, 1.6fr) 165px; }
  .track-release { display: none; }
}
