* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(120% 120% at 10% -10%, #1a2340 0%, #07080c 42%, #060606 100%);
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

:root {
  --sr-green-1: #89f145;
  --sr-green-2: #73df0c;
  --sr-green-3: #4ca31c;
  --sr-green-4: #a8e667;
  --sr-sidebar-width: 240px;
  --sr-content-max: 1280px;
}

.app {
  max-width: 100%;
  margin: 0 auto;
  position: relative;
}

.auth-float {
  position: fixed;
  z-index: 55;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  max-width: min(calc(100vw - 24px), 320px);
}

.auth-float[hidden] {
  display: none !important;
}

.auth-open-btn {
  border: 1px solid rgba(139, 92, 246, 0.55);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: #8b5cf6;
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.auth-open-btn:hover {
  filter: brightness(1.06);
}

.auth-open-btn[hidden] {
  display: none !important;
}

.auth-logged-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(12, 12, 14, 0.94);
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.auth-logged-bar[hidden] {
  display: none !important;
}

.auth-logged-bar__status {
  font-size: 13px;
  font-weight: 700;
  color: #e8e0ff;
}

.auth-logout-inline {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

.auth-logout-inline:hover {
  border-color: rgba(139, 92, 246, 0.65);
  color: #ddd6ff;
}

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(0, 0, 0, 0.72);
  display: grid;
  place-items: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top, 0px));
}

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

body.auth-locked .spotify-app > *:not(#auth-modal-overlay):not(#offline-banner) {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

body.auth-locked #auth-float {
  display: none !important;
}

body.auth-locked .auth-modal-overlay {
  display: grid !important;
}

.auth-modal-panel {
  width: min(100%, 360px);
  border-radius: 18px;
  background: rgba(12, 12, 14, 0.98);
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.auth-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
}

.auth-form__title--modal {
  margin: 0;
  flex: 1;
}

.auth-modal-close {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  flex-shrink: 0;
}

.auth-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.auth-form {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(12, 12, 14, 0.96);
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.auth-form--modal {
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 12px 16px 18px;
  background: transparent;
}

.auth-form__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.auth-form__label {
  font-size: 11px;
  font-weight: 600;
  color: #a8a8b8;
}

.auth-form__input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 14px;
  background: #0a0a0c;
  color: #fff;
}

.auth-form__error {
  margin: 0;
  font-size: 12px;
  color: #f87171;
}

.auth-form__submit {
  margin-top: 4px;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: #8b5cf6;
  color: #fff;
}

.auth-form__link {
  margin: 0;
  padding: 4px 0 0;
  border: none;
  background: none;
  font-size: 12px;
  color: #c4b5fd;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
}

.offline-banner {
  position: sticky;
  top: 0;
  z-index: 300;
  margin: 0;
  padding: 8px 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #fef3c7;
  background: rgba(146, 64, 14, 0.95);
  border-bottom: 1px solid rgba(251, 191, 36, 0.35);
}

/* ——— Spotify layout ——— */
.spotify-app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.main-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  /* Запас снизу под fixed now-playing + нижнюю навигацию, чтобы ничего не перекрывалось. */
  padding: 0 0 calc(150px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}

.spotify-home {
  padding-top: 8px;
}

.home-layout {
  display: block;
}

.home-layout__main {
  min-width: 0;
}

/* Правая колонка «сейчас играет» (десктоп), стиль как в референсе-плеере */
.now-playing-rail[hidden] {
  display: none !important;
}

.now-playing-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0 0;
}

.now-playing-rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.now-playing-rail__kicker {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
}

.now-playing-rail__expand {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.now-playing-rail__expand:hover {
  border-color: #8b5cf6;
  color: #8b5cf6;
}

body.now-playing-expanded-open {
  overflow: hidden;
}

.now-playing-expanded {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #030303;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: max(6px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}

.now-playing-expanded[hidden] {
  display: none !important;
}

.now-playing-expanded__top-actions {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  z-index: 302;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

.now-playing-expanded__top-btn {
  width: auto;
  height: auto;
  min-width: 36px;
  min-height: 36px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #a1a1a1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-shadow: none;
}

.now-playing-expanded__top-btn:hover {
  color: #d0d0d0;
  background: transparent;
  border: none;
}

.now-playing-expanded__close-icon,
.now-playing-expanded__native-fs-icon {
  display: block;
  flex-shrink: 0;
}

.now-playing-expanded__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* safe-area уже на .now-playing-expanded — не дублируем большой отступ */
  padding: 0 0 clamp(12px, 2.5vh, 22px);
  gap: clamp(10px, 2vh, 18px);
}

.now-playing-expanded__art {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  transition: opacity 0.32s ease;
}

.now-playing-expanded__cover {
  max-width: 100%;
  max-height: min(48vh, 520px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75);
}

.now-playing-expanded__cover--ph {
  width: min(85vw, 520px);
  aspect-ratio: 1;
  max-height: min(48vh, 520px);
  border-radius: 16px;
  background: linear-gradient(145deg, #2f2f35, #141418);
}

.now-playing-expanded__yt-clip-row {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0;
}

.now-playing-expanded--track-switch .now-playing-expanded__art,
.now-playing-expanded--track-switch .now-playing-expanded__footer,
.now-playing-expanded--track-switch .now-playing-expanded__yt-clip-row {
  opacity: 0.2;
  pointer-events: none;
}

#now-playing-expanded .now-playing-expanded__transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 8vw, 36px);
  flex: 0 0 auto;
  flex-shrink: 0;
  padding: 4px 16px clamp(12px, 2.5vh, 20px);
  margin-top: auto;
  position: relative;
  z-index: 3;
  transition: opacity 0.32s ease;
}

.now-playing-expanded--track-switch .now-playing-expanded__transport {
  opacity: 0.35;
}

#now-playing-expanded .now-playing-expanded__transport-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(12, 12, 14, 0.85) !important;
  color: #ffffff !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  box-shadow: none;
}

#now-playing-expanded .now-playing-expanded__transport-btn:hover:not(:disabled) {
  border-color: #8b5cf6;
  color: #e9d5ff !important;
}

#now-playing-expanded .now-playing-expanded__transport-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

#now-playing-expanded .now-playing-expanded__transport-btn--main {
  position: relative;
  width: 64px;
  height: 64px;
  border: none !important;
  background: #8b5cf6 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 26px rgba(139, 92, 246, 0.42);
}

#now-playing-expanded .now-playing-expanded__transport-btn--main:hover:not(:disabled) {
  filter: brightness(1.08);
}

#now-playing-expanded .now-playing-expanded__transport-btn--main .now-playing-expanded__icon-play,
#now-playing-expanded .now-playing-expanded__transport-btn--main .now-playing-expanded__icon-pause {
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
}

#now-playing-expanded .now-playing-expanded__transport-btn--main.is-paused .now-playing-expanded__icon-pause {
  display: none !important;
}

#now-playing-expanded .now-playing-expanded__transport-btn--main:not(.is-paused) .now-playing-expanded__icon-play {
  display: none !important;
}

#now-playing-expanded .now-playing-expanded__transport-btn--main.is-paused .now-playing-expanded__icon-play {
  transform: translateX(2px);
}

.now-playing-expanded__canvas {
  width: 100%;
  height: 140px;
  flex-shrink: 0;
  display: block;
  margin: clamp(4px, 1vh, 10px) auto 0;
  pointer-events: none;
  position: relative;
  z-index: 1;
  flex-grow: 0;
}

.now-playing-expanded__footer {
  text-align: center;
  padding: 2px 20px 0;
  flex: 0 0 auto;
  flex-shrink: 0;
  max-width: min(640px, 100%);
  margin: 0 auto;
  width: 100%;
  transition: opacity 0.32s ease;
  position: relative;
  z-index: 2;
}

.now-playing-expanded__title {
  margin: 0;
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.now-playing-expanded__artist {
  margin: 8px 0 0;
  font-size: 14px;
  color: #a7a7a7;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#now-playing-expanded .now-playing-expanded__yt-clip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #a1a1a1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
}

#now-playing-expanded .now-playing-expanded__yt-clip-btn:hover {
  border-color: #8b5cf6;
  color: #e9d5ff;
}

#now-playing-expanded .now-playing-expanded__yt-clip-icon {
  flex-shrink: 0;
  display: block;
}

.now-playing-yt-clip-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
}

.now-playing-yt-clip-overlay[hidden] {
  display: none !important;
}

.now-playing-yt-clip-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  cursor: pointer;
}

.now-playing-yt-clip-overlay__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: min(960px, calc(100% - 24px));
  max-height: min(88vh, 920px);
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
}

.now-playing-yt-clip-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.now-playing-yt-clip-overlay__head-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.now-playing-yt-clip-overlay__fs {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #ccc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.now-playing-yt-clip-overlay__fs:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.now-playing-yt-clip-overlay:fullscreen {
  padding: 0;
  background: #000;
}

.now-playing-yt-clip-overlay:fullscreen .now-playing-yt-clip-overlay__backdrop {
  display: none;
}

.now-playing-yt-clip-overlay:fullscreen .now-playing-yt-clip-overlay__panel {
  left: 0;
  top: 0;
  transform: none;
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.now-playing-yt-clip-overlay:fullscreen .now-playing-yt-clip-overlay__frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

.now-playing-yt-clip-overlay:fullscreen .now-playing-yt-clip-overlay__iframe {
  height: 100%;
  min-height: 200px;
  aspect-ratio: unset;
}

.now-playing-yt-clip-overlay:-webkit-full-screen {
  padding: 0;
  background: #000;
}

.now-playing-yt-clip-overlay:-webkit-full-screen .now-playing-yt-clip-overlay__backdrop {
  display: none;
}

.now-playing-yt-clip-overlay:-webkit-full-screen .now-playing-yt-clip-overlay__panel {
  left: 0;
  top: 0;
  transform: none;
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.now-playing-yt-clip-overlay:-webkit-full-screen .now-playing-yt-clip-overlay__frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

.now-playing-yt-clip-overlay:-webkit-full-screen .now-playing-yt-clip-overlay__iframe {
  height: 100%;
  min-height: 200px;
  aspect-ratio: unset;
}

.now-playing-yt-clip-overlay__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-yt-clip-overlay__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #ccc;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.now-playing-yt-clip-overlay__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.now-playing-yt-clip-overlay__status {
  margin: 0;
  padding: 16px;
  font-size: 14px;
  color: #b0b0b0;
  text-align: center;
}

.now-playing-yt-clip-overlay__status[hidden] {
  display: none !important;
}

.now-playing-yt-clip-overlay__fallback {
  padding: 0 16px 12px;
  text-align: center;
}

.now-playing-yt-clip-overlay__fallback[hidden] {
  display: none !important;
}

.now-playing-yt-clip-overlay__search-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #e9d5ff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.now-playing-yt-clip-overlay__search-link:hover {
  border-color: #8b5cf6;
  color: #fff;
}

.now-playing-yt-clip-overlay__frame-wrap {
  position: relative;
  width: 100%;
  background: #000;
}

.now-playing-yt-clip-overlay__iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.now-playing-rail__cover-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #121212;
}

.now-playing-rail__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.now-playing-rail__cover--ph {
  min-height: 0;
  background: linear-gradient(145deg, #2f2f35, #141418);
}

.now-playing-rail__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.now-playing-rail__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.now-playing-rail__title {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing-rail__artist {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a7a7a7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing-rail__add {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

@media (max-width: 1023px) {
  .now-playing-rail {
    display: none !important;
  }
}

.sr-hero {
  position: relative;
  margin: 4px 16px 14px;
  border-radius: 20px;
  overflow: hidden;
  min-height: 240px;
  background: #090909;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.sr-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 55% at 38% 68%, rgba(242, 28, 134, 0.75), transparent 60%),
    radial-gradient(55% 48% at 70% 35%, rgba(16, 194, 79, 0.65), transparent 60%),
    radial-gradient(40% 35% at 22% 42%, rgba(80, 56, 255, 0.55), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.75));
  filter: saturate(1.15) blur(8px);
  transform: scale(1.08);
}

.sr-hero-content {
  position: relative;
  z-index: 1;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 240px;
}

.sr-hero-kicker {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.82);
}

.sr-hero-title {
  margin: 0;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1;
  font-weight: 800;
}

.sr-hero-subtitle {
  margin: 0;
  color: #d6d6d6;
  font-size: 14px;
}

.sr-hero-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.spotify-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 12px;
  padding-top: max(8px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(9, 11, 20, 0.95), rgba(9, 11, 20, 0.35) 78%, transparent);
  backdrop-filter: blur(14px);
}

.spotify-profile {
  flex-shrink: 0;
}

.spotify-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.spotify-avatar--placeholder {
  background: linear-gradient(135deg, #333 0%, #121212 100%);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.filter-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  color: #d8e2ff;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.12);
}

.filter-chip.active {
  background: linear-gradient(120deg, var(--sr-green-1), var(--sr-green-2));
  border-color: rgba(141, 232, 95, 0.7);
  color: #fff;
  box-shadow: 0 4px 16px rgba(102, 214, 35, 0.35);
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 4px 16px 20px;
}

.quick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 4px 10px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
}

.quick-card:hover,
.quick-card:focus-visible {
  background: linear-gradient(135deg, rgba(129, 150, 255, 0.25), rgba(105, 70, 231, 0.2));
  border-color: rgba(149, 171, 255, 0.55);
  outline: none;
}

.quick-card:active {
  transform: scale(0.985);
}

.quick-card--liked .quick-card-cover {
  background: linear-gradient(135deg, var(--sr-green-1), var(--sr-green-3));
}

.quick-card-cover {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #121212;
}

.quick-card-liked {
  font-size: 22px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

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

.quick-cover-ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2a2a2a, #121212);
}

.quick-card-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-card-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quick-card-sub {
  font-size: 11px;
  color: #b3b3b3;
}

.spotify-section {
  margin-bottom: 24px;
  padding: 0 16px;
}

.today-pick-card {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: linear-gradient(115deg, rgba(117, 210, 28, 0.16), rgba(84, 143, 32, 0.22));
  border: 1px solid rgba(155, 231, 84, 0.24);
}

.today-pick-cover {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  background: linear-gradient(135deg, #303030, #1a1a1a);
  overflow: hidden;
}

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

.today-pick-info {
  min-width: 0;
}

.today-pick-badge {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sr-green-4);
  margin-bottom: 4px;
}

.today-pick-info strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.today-pick-info small {
  color: #bcbcbc;
  font-size: 13px;
}

.today-pick-play {
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sr-green-1), var(--sr-green-2));
  color: #111215;
  font-size: 22px;
  cursor: pointer;
}

.spotify-section-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c9d3f7;
}

.h-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.h-scroll::-webkit-scrollbar {
  height: 0;
}

.h-card {
  flex: 0 0 140px;
  width: 140px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 10px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  color: #fff;
  cursor: pointer;
  text-align: left;
  scroll-snap-align: start;
}

.h-card img,
.h-card .h-card-ph {
  width: 120px;
  height: 120px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  margin-bottom: 10px;
}

.h-card-ph {
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
}

.h-card-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.h-card-meta {
  font-size: 12px;
  color: #b3b3b3;
}

.podcasts-block {
  padding: 12px 2px 4px;
}

.community-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.community-tab {
  border: 1px solid #2f2f2f;
  border-radius: 999px;
  background: #0d0d0d;
  color: #d6d6d6;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
}

.community-tab.is-active {
  border-color: #8b5cf6;
  background: #8b5cf6;
  color: #fff;
}

.friends-panel {
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  background: #111111;
  padding: 10px;
}

.friends-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.friends-add-row input {
  border: 1px solid #303030;
  border-radius: 10px;
  background: #0b0b0b;
  color: #fff;
  padding: 10px 12px;
}

.friends-add-row button {
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  background: #1db954;
  color: #000;
  font-weight: 700;
  cursor: pointer;
}

.friends-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.friend-item {
  width: 100%;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  background: #121212;
  color: #fff;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
}

.friend-item.is-active {
  border-color: #8b5cf6;
}

.friend-item-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

.friend-item-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-item-id {
  color: #a5a5a5;
}

.leader-rank {
  font-weight: 800;
  color: #c9b4ff;
  font-variant-numeric: tabular-nums;
}

.leader-app-id {
  color: #9ca3af;
  font-weight: 600;
  margin-left: 6px;
}

.leader-stars {
  color: #ffd54a;
}

.friend-profile {
  margin-top: 8px;
  border-top: 1px solid #2b2b2b;
  padding-top: 8px;
}

.friend-profile-extra {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}

.friend-profile-extra p {
  margin: 0;
  display: grid;
  gap: 1px;
}

.friend-profile-extra span {
  font-size: 11px;
  color: #a9a9a9;
}

.friend-profile-extra strong {
  font-size: 13px;
  color: #fff;
  line-height: 1.2;
}

.friend-rating-stars {
  letter-spacing: 0;
  font-size: 12px;
}

.friend-rate-box {
  margin-top: 6px;
  display: grid;
  gap: 4px;
}

.friend-rate-box__label {
  font-size: 12px;
  color: #a9a9a9;
}

.friend-rate-actions {
  display: flex;
  gap: 4px;
}

.friend-rate-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #2f2f2f;
  border-radius: 8px;
  background: #101010;
  color: #6b7280;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.friend-rate-btn.is-on {
  color: #ffd54a;
  border-color: rgba(255, 213, 74, 0.55);
}

.friend-profile-head {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
}

.friend-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

.friend-playlists-title {
  margin: 8px 0 6px;
  font-size: 13px;
}

.friend-playlists-list {
  display: grid;
  gap: 6px;
}

.friend-playlist-item {
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  background: #141414;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px;
}

.friend-playlist-cover {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
}

.friend-playlist-cover--ph {
  background: linear-gradient(135deg, #2a2a2a, #171717);
}

.friend-playlist-body {
  min-width: 0;
}

.friend-playlist-body strong {
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-playlist-body small {
  color: #a8a8a8;
  font-size: 11px;
}

.friend-playlist-item .mini-btn {
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12px;
}

.podcasts-empty p {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.profile-panel {
  width: min(100%, 360px);
  border-radius: 16px;
  background: #171717;
  max-height: min(88vh, 640px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}

#profile-overlay {
  place-items: center;
  padding: 16px;
}

.profile-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
}

.profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(135deg, #2c2c2c, #161616);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-meta strong {
  font-size: 18px;
}

.profile-meta small {
  color: #b8b8b8;
}

.profile-id {
  margin-top: 4px;
  display: inline-block;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 10px;
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  color: #8de8ac;
  letter-spacing: 0.06em;
}

.profile-rating-stars {
  margin-top: 2px;
  display: inline-flex;
  gap: 3px;
  font-size: 17px;
  line-height: 1;
}

.profile-rating-box {
  margin-left: auto;
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.profile-rating-label,
.profile-rating-count {
  color: #a7a7a7;
  font-size: 12px;
}

.profile-star {
  color: #555b66;
}

.profile-star.is-on {
  color: #ffd54a;
  text-shadow: 0 0 6px rgba(255, 213, 74, 0.35);
}

.profile-extra {
  display: grid;
  gap: 6px;
  padding: 0 14px 14px;
}

.profile-view-block {
  display: grid;
  gap: 6px;
}

.profile-view-block p {
  margin: 0;
  display: grid;
  gap: 2px;
}

.profile-view-block span {
  font-size: 12px;
  color: #a7a7a7;
}

.profile-view-block strong {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.profile-avatar-edit-row {
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
}

.profile-avatar-edit-label {
  font-size: 12px;
  color: #c3c3c3;
}

.profile-avatar-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.profile-avatar-reset-btn {
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #c4c4c4;
}

.profile-avatar-reset-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.profile-edit-block {
  display: grid;
  gap: 6px;
}

.profile-edit-block[hidden],
.profile-view-block[hidden] {
  display: none !important;
}

.profile-extra label {
  font-size: 12px;
  color: #c3c3c3;
}

.profile-extra input,
.profile-extra select {
  width: 100%;
  border: 1px solid #303030;
  border-radius: 10px;
  background: #101010;
  color: #fff;
  padding: 9px 11px;
}


.spotify-screen {
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
}

.screen-title {
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.premium-card {
  background: linear-gradient(160deg, #1e3264 0%, #121212 45%);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.premium-icon {
  font-size: 48px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.premium-card .screen-title {
  color: #1db954;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  min-height: 60px;
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 14, 28, 0.86);
  backdrop-filter: blur(16px) saturate(1.1);
  border-top: 1px solid rgba(123, 147, 255, 0.22);
  max-width: 860px;
  margin: 0 auto;
}

.bottom-nav__btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: #b3b3b3;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
  max-width: 88px;
  transition: color 0.15s ease;
}

.bottom-nav__btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bottom-nav__btn:hover,
.bottom-nav__btn:focus-visible {
  color: #fff;
  outline: none;
}

.bottom-nav__btn.active {
  color: #fff;
  background: linear-gradient(120deg, rgba(129, 232, 82, 0.36), rgba(76, 157, 28, 0.28));
  border-radius: 12px;
}

.bottom-nav__icon {
  width: 24px;
  height: 24px;
  opacity: 0.85;
}

.bottom-nav__btn.active .bottom-nav__icon {
  opacity: 1;
}

.search-row--spotify {
  margin-bottom: 8px;
  align-items: center;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-row--spotify .search-input-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(125, 145, 245, 0.25);
}

.search-row--spotify .search-recent-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  margin-left: 0;
}

.search-recent {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 6px;
  align-items: center;
}

.search-recent-item {
  border: 1px solid #2f2f2f;
  border-radius: 999px;
  background: #121212;
  color: #d8d8d8;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
}

.search-recent-item:hover {
  border-color: #666;
  color: #fff;
}

.search-recent-clear {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border: 1px solid #4a4a4a;
  border-radius: 999px;
  background: #121212;
  color: #cfcfcf;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand {
  display: none;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view h2 {
  margin: 0 0 10px;
}

.view p {
  margin: 0 0 12px;
}

.card-list {
  display: grid;
  gap: 10px;
}

.card {
  border: 1px solid #2c2c2c;
  border-radius: 10px;
  padding: 12px;
  background: #181818;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.card p {
  margin: 0;
  color: #bcbcbc;
}

.library-section {
  margin-top: 14px;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  padding: 12px;
  background: #171717;
  position: relative;
}

.library-section--edit-mode {
  border-color: #1db954;
  box-shadow: 0 0 0 1px rgba(29, 185, 84, 0.35);
}

.library-edit-hint {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(29, 185, 84, 0.12);
  border: 1px solid rgba(29, 185, 84, 0.35);
  color: #b8f5c8;
  font-size: 13px;
  text-align: center;
}

.library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.library-head h3 {
  margin: 0;
}

.mini-btn {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: #1db954;
  color: #000;
  font-weight: 700;
  cursor: pointer;
}

.library-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.library-subsection {
  margin-top: 14px;
}

.library-subtitle {
  margin: 0 0 8px;
  font-size: 16px;
}

.library-item {
  border: 1px solid #303030;
  border-radius: 10px;
  background: #121212;
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
  text-align: center;
  position: relative;
}

.library-item-body {
  min-width: 0;
}

.library-item strong {
  display: block;
  margin-bottom: 2px;
  word-break: break-word;
}

.library-item small {
  color: #a7a7a7;
  word-break: break-word;
  display: block;
}

.library-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #353535;
  background: #0f0f0f;
}

.library-cover-placeholder {
  background: linear-gradient(135deg, #1f1f1f, #0f0f0f);
}

.library-item--selectable {
  cursor: pointer;
  outline: 2px solid transparent;
  transition: outline-color 0.15s ease, border-color 0.15s ease;
}

.library-item--selectable:hover,
.library-item--selectable:focus-visible {
  outline-color: #1db954;
  border-color: #1db954;
}

.library-item--empty {
  grid-column: 1 / -1;
}

.library-item--openable {
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.library-item--openable:hover,
.library-item--openable:focus-visible {
  border-color: #4a4a4a;
}

.library-item--openable:active {
  transform: scale(0.98);
}

.library-edit-floating-btn {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(88px, calc(72px + env(safe-area-inset-bottom)));
  width: 48px;
  height: 48px;
  border: 1px solid #2f2f2f;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.92);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.library-edit-floating-btn:hover {
  border-color: #1db954;
  color: #1db954;
}

.library-edit-floating-btn.is-active {
  border-color: #1db954;
  background: rgba(29, 185, 84, 0.22);
  color: #1db954;
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-row input {
  flex: 1;
  border: 1px solid #333;
  border-radius: 10px;
  background: #101010;
  color: #fff;
  padding: 10px 12px;
}

.search-row button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #1db954;
  color: #000;
  font-weight: 700;
  cursor: pointer;
}

.hint {
  color: #9e9e9e;
  min-height: 18px;
}

.hint--success {
  color: #1db954;
  font-weight: 700;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: end center;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

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

.modal-panel {
  width: min(100%, 400px);
  max-height: min(85vh, 520px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 8px;
  border-bottom: 1px solid #2a2a2a;
}

.modal-head h3 {
  margin: 0;
  font-size: 17px;
}

.modal-close {
  border: 0;
  background: transparent;
  color: #9e9e9e;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.modal-close:hover {
  color: #fff;
  background: #2a2a2a;
}

.playlist-picker-track {
  margin: 0;
  padding: 10px 14px;
  font-size: 13px;
  color: #a7a7a7;
  border-bottom: 1px solid #2a2a2a;
  word-break: break-word;
}

.playlist-picker-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 80px;
}

.playlist-picker-empty {
  margin: 8px;
  font-size: 13px;
  color: #888;
  text-align: center;
}

.playlist-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid #333;
  border-radius: 12px;
  background: #121212;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.playlist-picker-item:hover {
  border-color: #1db954;
  background: #181818;
}

.playlist-picker-item-name {
  font-weight: 700;
  word-break: break-word;
}

.playlist-picker-item-meta {
  font-size: 12px;
  color: #888;
  flex-shrink: 0;
}

.playlist-picker-new {
  padding: 12px 14px 16px;
  border-top: 1px solid #2a2a2a;
  background: #141414;
}

.playlist-picker-new-label {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}

.playlist-picker-new-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.playlist-picker-new-row input {
  width: 100%;
  border: 1px solid #333;
  border-radius: 10px;
  background: #101010;
  color: #fff;
  padding: 10px 12px;
}

.playlist-picker-create-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #1db954;
  color: #000;
  font-weight: 700;
  cursor: pointer;
}

.create-menu-overlay {
  place-items: end center;
}

.create-menu-panel {
  width: min(100%, 420px);
  max-height: min(82vh, 560px);
  border-radius: 20px 20px 0 0;
  background: #1d1f25;
  border-color: rgba(255, 255, 255, 0.08);
}

.create-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 14px;
  overflow-y: auto;
}

.create-menu-item {
  width: 100%;
  border: 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px;
  cursor: pointer;
}

.create-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.create-menu-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.create-menu-text {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.create-menu-text strong {
  font-size: 18px;
  line-height: 1.1;
}

.create-menu-text small {
  color: #b7bac5;
  font-size: 14px;
}

@media (min-width: 480px) {
  .modal-overlay {
    place-items: center;
    padding: 24px;
  }

  .modal-panel {
    border-radius: 16px;
    max-height: min(80vh, 480px);
  }

  .playlist-picker-new-row {
    flex-direction: row;
    align-items: center;
  }

  .playlist-picker-new-row input {
    flex: 1;
  }

  .playlist-picker-create-btn {
    flex-shrink: 0;
  }
}

.results {
  display: grid;
  gap: 8px;
}

/* Пустое состояние на всю ширину сетки карточек */
.search-results-stack .results > p.hint {
  grid-column: 1 / -1;
}

.search-results-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.search-results-tabs {
  flex: 0 0 auto;
  width: 100%;
  margin: 0 0 14px;
  min-width: 0;
}

.search-results-tabs[hidden] {
  display: none !important;
}

.search-sections-head {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  background: #121212;
  border: 1px solid #2c2c2c;
  border-radius: 12px;
}

.search-sections-head__item {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #c8c8c8;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 8px 16px;
  cursor: pointer;
  line-height: 1.2;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.search-sections-head__item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.search-sections-head__item.is-active {
  color: #fff;
  background: #2a2a2a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.search-sections-head__item:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}

.result-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 42px;
  grid-template-rows: auto auto auto;
  align-items: start;
  gap: 4px 8px;
  border: 1px solid #303030;
  background: #171717;
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 0;
  box-sizing: border-box;
}

.result-item--album {
  grid-template-columns: 56px minmax(0, 1fr);
}

.result-cover {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 56px;
  height: 56px;
  max-width: 56px;
  max-height: 56px;
  margin: 0;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  align-self: center;
}

.result-item strong {
  grid-column: 2;
  grid-row: 1;
  display: block;
  margin: 0;
  align-self: end;
  overflow-wrap: break-word;
  word-break: normal;
}

.result-item small {
  grid-column: 2;
  grid-row: 2;
  color: #ababab;
  display: block;
  margin: 0;
  align-self: start;
  overflow-wrap: break-word;
  word-break: normal;
}

.result-play-btn {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #3a3c43;
  background: #2a2b30;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.result-play-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.result-play-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.result-play-btn:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}

.result-item a {
  color: #1db954;
  text-decoration: none;
  font-weight: 700;
}

.result-action-btn {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #1db954;
  color: #000;
  font-weight: 700;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
  justify-self: stretch;
}

.result-cover--ph {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 56px;
  height: 56px;
  max-width: 56px;
  max-height: 56px;
  aspect-ratio: auto;
  border-radius: 8px;
  margin: 0;
  background: linear-gradient(145deg, #1f1f1f, #0d0d0d);
  border: 1px solid #2c2c2c;
  align-self: center;
}

.create-form {
  display: grid;
  gap: 8px;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  padding: 12px;
  background: #171717;
}

.create-form label {
  font-weight: 700;
}

.playlist-public-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.playlist-public-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.create-form input[type="text"],
.create-form textarea,
.create-form input[type="file"] {
  width: 100%;
  border: 1px solid #333;
  border-radius: 10px;
  background: #101010;
  color: #fff;
  padding: 10px 12px;
}

.cover-preview-wrap {
  width: 100%;
  min-height: 140px;
  border: 1px dashed #333;
  border-radius: 10px;
  background: #101010;
  display: grid;
  place-items: center;
  padding: 10px;
}

.cover-preview-wrap.has-image {
  border-style: solid;
}

.cover-preview {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #2f2f2f;
}

.cover-preview-wrap small {
  color: #9e9e9e;
}

.create-actions {
  display: flex;
  gap: 8px;
}

.create-actions button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #1db954;
  color: #000;
  font-weight: 700;
  cursor: pointer;
}

.create-actions .secondary-btn {
  background: #2a2a2a;
  color: #fff;
}

.create-actions .danger-btn {
  background: #b3261e;
  color: #fff;
}

/* Плейлист: список треков и плеер */
#playlist-detail-view.view.active {
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

/* Create playlist as popup window */
#create-playlist-view.view.active {
  position: fixed;
  left: 12px;
  right: 12px;
  top: 76px;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  z-index: 210;
  display: block;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #2a2a2a;
  background: #090909;
  overflow: auto;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}

.playlist-detail-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.playlist-detail-hero {
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
  background:
    linear-gradient(180deg, rgba(177, 22, 22, 0.95), rgba(44, 8, 8, 0.9) 58%, rgba(10, 12, 17, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.playlist-hero-main {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 12px;
  align-items: end;
}

.playlist-detail-cover {
  width: 94px;
  height: 94px;
  border-radius: 8px;
  background: linear-gradient(145deg, #302727, #181818);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.playlist-hero-meta {
  min-width: 0;
}

.playlist-hero-type {
  margin: 0 0 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.back-btn {
  border: 1px solid #333;
  border-radius: 10px;
  padding: 8px 14px;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.back-btn:hover {
  border-color: #1db954;
  color: #1db954;
}

.playlist-detail-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
  font-weight: 800;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.playlist-detail-subtitle {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.83);
  font-size: 13px;
}

.playlist-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.playlist-play-all-btn {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  background: #24d564;
  color: #08120c;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0;
}

.playlist-play-all-btn::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid currentColor;
  margin-left: 3px;
}

.playlist-save-album-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(10, 10, 10, 0.45);
  color: #f4f4ff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.playlist-privacy-btn {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(10, 10, 10, 0.5);
  color: #f0f0f8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.playlist-privacy-btn.is-public {
  border-color: rgba(139, 92, 246, 0.8);
}

.playlist-detail-empty {
  margin-bottom: 10px;
}

.playlist-track-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  max-height: min(52vh, 420px);
  padding-bottom: 8px;
}

.playlist-track-row {
  display: grid;
  grid-template-columns: 24px 48px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #303030;
  border-radius: 12px;
  background: #171717;
}

.playlist-track-row--clickable {
  cursor: pointer;
}

.playlist-track-row--clickable:hover {
  border-color: #6b84ff;
}

.playlist-track-row--active {
  border-color: #8d63ff;
  background: rgba(141, 99, 255, 0.17);
}

.playlist-track-row--active .playlist-track-num {
  color: #d9c9ff;
}

.playlist-track-num {
  color: #9ea4b2;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.playlist-track-cover {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #0f0f0f;
}

.playlist-track-cover--ph {
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
}

.playlist-track-info {
  min-width: 0;
}

.playlist-track-info strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
  word-break: break-word;
}

.playlist-track-info small {
  color: #9e9e9e;
  font-size: 12px;
  word-break: break-word;
}

.playlist-track-actions {
  position: relative;
  justify-self: end;
  align-self: start;
}

.playlist-track-menu-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #2e2e2e;
  border-radius: 999px;
  background: #131313;
  color: #d6d6d6;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.playlist-track-menu-btn::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: -6px 0 0 currentColor, 6px 0 0 currentColor;
}

.playlist-track-menu {
  position: absolute;
  right: 0;
  top: 34px;
  z-index: 5;
  background: #101010;
  border: 1px solid #2f2f2f;
  border-radius: 10px;
  min-width: 138px;
  padding: 4px;
}

.playlist-track-menu-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.playlist-track-menu-item.danger {
  color: #ff9fb2;
}

.playlist-track-play {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #3d3d3d;
  background: #121212;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}


.playlist-track-play:hover {
  border-color: #1db954;
  color: #1db954;
}

.playlist-track-play.is-playing {
  border-color: #1db954;
  background: rgba(29, 185, 84, 0.15);
  color: #1db954;
}

.playlist-player-bar {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #2a2a2a;
  flex-shrink: 0;
}

.playlist-now-playing {
  margin: 0 0 6px;
  font-size: 13px;
  color: #b8b8b8;
  word-break: break-word;
}

#playlist-audio {
  display: none;
}

.playlist-player-status {
  margin: 8px 0 0;
  min-height: 18px;
  font-size: 12px;
}

.global-player-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(57, 59, 70, 0.95), rgba(36, 37, 46, 0.92)),
    radial-gradient(90% 130% at 50% 0%, rgba(102, 129, 196, 0.22), transparent 60%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.global-player-bar--switching {
  opacity: 0.78;
  transform: translateY(1px);
}

.global-player-meta {
  flex: 1;
  min-width: 0;
}

.global-player-title {
  display: block;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-player-artist {
  display: block;
  margin-top: 2px;
  color: #d3d6df;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-player-timeline {
  margin-top: 3px;
}

.global-player-time {
  display: block;
  color: #bfc2cc;
  font-size: 10px;
  line-height: 1.1;
}

.global-player-progress {
  width: 100%;
  margin-top: 2px;
  accent-color: #ffffff;
  height: 3px;
  background: transparent;
}

.global-player-toggle {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: #10131a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3);
}

.global-player-toggle::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.global-player-toggle.is-paused::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  margin-left: 1px;
}

.global-player-toggle:not(.is-paused)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 5h4v14H7zM13 5h4v14h-4z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 5h4v14H7zM13 5h4v14h-4z'/%3E%3C/svg%3E");
}

.global-player-action {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #f1f3fb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0;
}

.global-player-action--favorite::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09A6.03 6.03 0 0 1 16.5 3C19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09A6.03 6.03 0 0 1 16.5 3C19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.global-player-action--favorite.is-active {
  color: #ff6d3a;
}

.global-player-volume {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
}

.global-player-action--volume {
  position: relative;
}

.global-player-action--volume .gp-vol-icon {
  display: block;
}

.global-player-action--volume.is-muted .gp-vol-icon--on {
  display: none;
}

.global-player-action--volume.is-muted .gp-vol-icon--mute {
  display: block !important;
}

.global-player-action--volume:not(.is-muted) .gp-vol-icon--mute {
  display: none !important;
}

.global-player-volume-slider {
  width: 56px;
  height: 4px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  accent-color: #ffffff;
  background: transparent;
  flex-shrink: 0;
}

/* Monochrome theme override (black/white). */
:root {
  --sr-green-1: #ffffff;
  --sr-green-2: #ffffff;
  --sr-green-3: #ffffff;
  --sr-green-4: #ffffff;
}

body {
  background: #000000;
  color: #ffffff;
}

.spotify-app,
.modal-panel,
.create-menu-panel,
.playlist-picker-panel,
.screen-panel,
.view,
.spotify-screen {
  background-color: #000000;
}

.sr-hero,
.premium-card,
.quick-card,
.h-card,
.playlist-track-row,
.result-item,
.create-form,
.profile-panel,
.global-player-bar {
  background: #0b0b0b;
  border-color: #2a2a2a;
  box-shadow: none;
}

.bottom-nav {
  background: #000000;
  border-top: 1px solid #2a2a2a;
}

.bottom-nav__btn {
  color: #d0d0d0;
}

.bottom-nav__btn.active {
  color: #000000;
  background: #ffffff;
}

.bottom-nav__btn.active .bottom-nav__icon {
  color: #000000;
}

button,
#search-btn,
#save-playlist-btn,
.playlist-picker-create-btn,
.playlist-play-all-btn,
.hero-open-btn {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.now-playing-rail__add,
.now-playing-rail__expand {
  background: transparent !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

.now-playing-rail__add:hover,
.now-playing-rail__expand:hover {
  border-color: #8b5cf6 !important;
  color: #8b5cf6 !important;
}

.now-playing-expanded__top-btn {
  background: transparent !important;
  color: #a1a1a1 !important;
  border: none !important;
  box-shadow: none !important;
}

.now-playing-expanded__top-btn:hover {
  color: #d0d0d0 !important;
  background: transparent !important;
  border: none !important;
}

.secondary-btn,
.danger-btn,
.global-player-action,
.global-player-toggle {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

input,
textarea,
select {
  background: #050505;
  color: #ffffff;
  border: 1px solid #2a2a2a;
}

.hint,
.playlist-detail-subtitle,
.global-player-artist,
.quick-card-sub,
.h-card-meta {
  color: #bdbdbd;
}

/* Requested fixes: white text and white action buttons. */
.spotify-section-title,
.screen-title,
.library-head h3,
.quick-card-title {
  color: #ffffff !important;
}

.search-row button,
.mini-btn,
.create-menu-item[data-create-kind="playlist"] {
  background: #2a2b30 !important;
  color: #ffffff !important;
  border: 1px solid #3a3c43 !important;
}

.create-menu-item[data-create-kind="playlist"] .create-menu-icon {
  background: #4a4b50 !important;
  color: #c9c9cc !important;
  font-weight: 700;
  width: 48px;
  height: 48px;
  font-size: 24px;
}

.create-menu-item[data-create-kind="playlist"] {
  padding: 10px !important;
  border-radius: 16px !important;
  gap: 8px;
}

.create-menu-item[data-create-kind="playlist"] .create-menu-text strong {
  font-size: 23px;
  font-size: clamp(18px, 3vw, 23px);
  line-height: 1.08;
  color: #ffffff;
}

.create-menu-item[data-create-kind="playlist"] .create-menu-text small {
  max-width: 640px;
  font-size: 13px;
  font-size: clamp(11px, 2vw, 13px);
  line-height: 1.15;
  color: #bfc2cc;
}

/* Contrast fixes from latest UI feedback */
.quick-card-liked {
  color: #000000 !important;
  text-shadow: none !important;
}

.filter-chip.active {
  color: #000000 !important;
}

/* Global purple accent override */
:root {
  --sr-green-1: #b68cff;
  --sr-green-2: #9a6cff;
  --sr-green-3: #7f4dff;
  --sr-green-4: #c8a9ff;
}

.sr-hero-bg {
  background:
    radial-gradient(70% 55% at 38% 68%, rgba(156, 101, 255, 0.66), transparent 60%),
    radial-gradient(55% 48% at 70% 35%, rgba(126, 81, 255, 0.56), transparent 60%),
    radial-gradient(40% 35% at 22% 42%, rgba(184, 122, 255, 0.52), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.78));
}

.playlist-detail-hero {
  background:
    linear-gradient(180deg, rgba(92, 39, 177, 0.96), rgba(40, 20, 78, 0.92) 58%, rgba(9, 10, 14, 0.95)) !important;
  border-color: rgba(187, 146, 255, 0.35) !important;
}

.search-row button,
.result-action-btn,
.result-play-btn,
.playlist-play-all-btn,
.hero-open-btn,
.mini-btn,
.create-actions button,
.playlist-picker-create-btn,
.bottom-nav__btn.active,
.global-player-toggle,
.create-menu-item[data-create-kind="playlist"] {
  background: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
  color: #ffffff !important;
}

/* Явный цвет маски: иначе в части браузеров при паузе (::before + play) иконка визуально пропадает */
.global-player-toggle::before {
  background-color: #ffffff !important;
  background: #ffffff !important;
}

.global-player-action--favorite,
.global-player-action--volume,
.global-player-action--shuffle {
  background: #0b0b0b !important;
  border: 1px solid #2a2a2a !important;
  color: #8f96a3 !important;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.global-player-action--shuffle {
  flex-shrink: 0;
}

.global-player-action--shuffle .gp-shuffle-icon {
  display: block;
  overflow: visible;
}

.global-player-action--favorite.is-active,
.global-player-action--shuffle.is-active {
  background: #0b0b0b !important;
  color: #8b5cf6 !important;
  transform: scale(1.02);
}

.library-section--edit-mode {
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.35) !important;
}

.library-edit-hint {
  background: rgba(139, 92, 246, 0.12) !important;
  border-color: rgba(139, 92, 246, 0.45) !important;
  color: #d9c8ff !important;
}

.search-sections-head__item.is-active,
.filter-chip.active {
  background: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
  color: #ffffff !important;
}

/* ——— Десктоп: боковая навигация, широкий контент, сетки ——— */
@media (min-width: 1024px) {
  .sidebar-brand {
    display: block;
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #fff;
    padding: 4px 10px 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.15;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    right: auto;
    width: var(--sr-sidebar-width);
    max-width: none;
    margin: 0;
    transform: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 6px;
    padding: 20px 12px 28px;
    border-top: none;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .bottom-nav__btn {
    /* Иначе наследуется flex:1 от мобильной нижней панели — в колонке кнопки растягиваются на всю высоту. */
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    max-width: none;
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
  }

  .bottom-nav__btn span {
    text-align: left;
  }

  .bottom-nav__icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .main-scroll {
    margin-left: var(--sr-sidebar-width);
    width: auto;
    max-width: none;
    padding: 28px 40px calc(36px + 100px);
    padding-bottom: calc(36px + 104px);
  }

  .main-scroll > .view {
    max-width: var(--sr-content-max);
    margin-left: auto;
    margin-right: auto;
  }

  .global-player-bar {
    left: calc(var(--sr-sidebar-width) + 28px);
    right: 28px;
    bottom: 28px;
    padding: 12px 18px;
    border-radius: 16px;
    max-width: min(var(--sr-content-max), calc(100vw - var(--sr-sidebar-width) - 56px));
    margin-left: 0;
    margin-right: auto;
  }

  .global-player-title {
    font-size: 15px;
  }

  .global-player-artist,
  .global-player-time {
    font-size: 12px;
  }

  .global-player-toggle {
    width: 46px;
    height: 46px;
  }

  .global-player-volume-slider {
    width: 88px;
  }

  .library-edit-floating-btn {
    right: 36px;
    bottom: 132px;
  }

  .home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  .home-layout.home-layout--with-rail {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  }

  .now-playing-rail {
    position: sticky;
    top: 20px;
    padding-top: 0;
  }

  .now-playing-rail__title {
    font-size: 16px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .spotify-home .spotify-top {
    position: relative;
    top: auto;
    padding: 0 0 16px;
    background: transparent;
    backdrop-filter: none;
  }

  .spotify-screen {
    padding: 8px 0 24px;
    padding-top: 12px;
  }

  .screen-title {
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
    margin-bottom: 20px;
  }

  .sr-hero {
    margin: 0 0 24px;
    min-height: 280px;
    border-radius: 24px;
  }

  .sr-hero-content {
    min-height: 280px;
    padding: 32px 36px;
  }

  .sr-hero-title {
    font-size: clamp(2.25rem, 4vw, 3.25rem);
  }

  .quick-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 0 0 28px;
  }

  .quick-card {
    min-height: 72px;
    border-radius: 16px;
  }

  .spotify-section {
    padding: 0;
    margin-bottom: 32px;
  }

  .spotify-section-title {
    font-size: 0.95rem;
    margin-bottom: 16px;
  }

  .h-scroll {
    margin: 0;
    padding: 0 0 12px;
    gap: 16px;
    scroll-snap-type: none;
  }

  .h-scroll::-webkit-scrollbar {
    height: 10px;
  }

  .h-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
  }

  .h-card {
    flex: 0 0 168px;
    width: 168px;
    border-radius: 20px;
    padding: 12px;
  }

  .h-card img,
  .h-card .h-card-ph {
    width: 144px;
    height: 144px;
    border-radius: 16px;
  }

  .search-row--spotify {
    max-width: 720px;
  }

  .search-row--spotify .search-input-wrap input {
    padding: 14px 44px 14px 20px;
    font-size: 15px;
  }

  .search-row--spotify .search-recent-clear {
    right: 12px;
  }

  .search-row--spotify button {
    padding: 14px 22px;
    font-size: 15px;
  }

  .results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .result-item:not(.result-item--album) {
    grid-template-columns: 72px minmax(0, 1fr) 44px;
    gap: 4px 10px;
    padding: 12px 12px;
    border-radius: 14px;
  }

  .result-item--album {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .result-cover,
  .result-cover--ph {
    width: 72px;
    height: 72px;
    max-width: 72px;
    max-height: 72px;
    border-radius: 8px;
  }

  .result-play-btn {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .result-item strong {
    font-size: 15px;
  }

  .result-action-btn {
    margin-top: 6px;
  }

  #search-view.spotify-screen {
    padding-right: max(8px, 168px);
  }

  .library-list {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }

  .library-section {
    padding: 20px;
    border-radius: 16px;
  }

  .create-form {
    max-width: 560px;
  }

  .create-form label,
  .create-form input,
  .create-form textarea {
    font-size: 15px;
  }

  .playlist-detail-hero {
    padding: 20px 24px;
    border-radius: 20px;
  }

  .playlist-detail-hero .back-btn {
    margin-bottom: 8px;
  }

  .playlist-hero-main {
    grid-template-columns: min(240px, 26vw) 1fr;
    gap: 28px;
    align-items: center;
  }

  .playlist-detail-cover {
    width: 100%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 1;
    border-radius: 12px;
  }

  .playlist-detail-title {
    font-size: clamp(1.75rem, 2.8vw, 2.75rem);
    -webkit-line-clamp: 4;
  }

  .playlist-track-list {
    max-height: min(62vh, 620px);
    gap: 10px;
  }

  .playlist-track-row {
    padding: 12px 16px;
    border-radius: 14px;
  }

  .podcasts-block {
    padding: 8px 0 16px;
  }

  .friends-panel {
    padding: 16px 18px;
    border-radius: 16px;
  }

  .friends-add-row {
    max-width: 560px;
  }

  .friend-profile-extra {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 16px;
  }

  .modal-overlay {
    place-items: center;
    padding: 32px;
  }

  .modal-panel,
  .playlist-picker-panel,
  .create-menu-panel {
    width: min(100%, 520px);
    max-height: min(82vh, 640px);
    border-radius: 20px;
  }

  .profile-panel {
    width: min(100%, 440px);
    max-height: min(86vh, 720px) !important;
  }

  #profile-overlay {
    padding: 24px;
  }
}

@media (min-width: 1024px) and (max-width: 1280px) {
  .results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  :root {
    --sr-content-max: 1360px;
  }

  .main-scroll {
    padding-left: 48px;
    padding-right: 48px;
  }

  .quick-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}
