/*
 * Interfaz principal inspirada en el estilo “dashboard” oscuro tipo streaming
 * (referencia visual: barra superior, biblioteca lateral, columna contextual, reproductor inferior).
 */

:root {
  --bg-page: #f5f5f5;
  --bg-sidebar: #ebebeb;
  --bg-sidebar-active: #e0e0e0;
  --text: #121212;
  --text-muted: #5a5a5a;
  --accent: #1db954;
  --accent-ring: #1ed760;
  --pause-purple: #5a5a5a;
  --border-soft: #d4d4d4;
  --player-bg: #efefef;
  --progress-track: #d0d0d0;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Tokens usados por componentes legacy de la SPA */
  --bg: var(--bg-page);
  --bg-elevated: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.06);
  --border: var(--border-soft);
  --text-dim: var(--text-muted);
  --radius: 10px;
  --player-h: 108px;
  --sidebar-w: 276px;
  --sidebar-collapsed-w: 72px;
  /* ≤1100px: UI móvil (no caben sidebar + rail + contenido). Ver mobile.css y app.js */
  --layout-mobile-max: 1100px;
  --top-bar-h: 58px;

  /* Superficies (claro por defecto; oscuro redefine en .theme-dark) */
  --surface: #ffffff;
  --surface-hover: #f9f9f9;
  --search-border: #dedede;
  --placeholder-input: #888888;
  --hover-row: rgba(0, 0, 0, 0.04);
  --hover-control: rgba(0, 0, 0, 0.06);
  --cover-placeholder: #eeeeee;
  --thumb-player: #ffffff;
  --ring-inner: #ffffff;
  --danger: #c42b2b;
  --backdrop-scrim: rgba(0, 0, 0, 0.35);
  --toggle-track-off: #c8c8c8;
  --on-accent: #ffffff;

  /* Glass / frosted UI */
  --glass-saturate: 1.45;
  --glass-blur: 22px;
  --glass-blur-sm: 12px;
  --glass-blur-lg: 34px;
  --glass-surface: rgba(255, 255, 255, 0.4);
  --glass-surface-2: rgba(255, 255, 255, 0.52);
  --glass-surface-3: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-border-soft: rgba(255, 255, 255, 0.38);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  --glass-ambient: #e4e9f2;
  --glass-shadow: 0 8px 32px rgba(25, 40, 80, 0.09);
  --glass-card-shadow: 0 4px 24px rgba(25, 40, 80, 0.07);

  /* Scrollbars (escritorio; móvil sigue ocultándolas abajo) */
  --scrollbar-size: 10px;
  --scrollbar-track: transparent;
  --scrollbar-thumb: color-mix(in srgb, var(--text-muted) 42%, transparent);
  --scrollbar-thumb-hover: color-mix(in srgb, var(--text) 22%, transparent);
  --scrollbar-thumb-active: color-mix(in srgb, var(--accent) 40%, var(--text-muted));
}

html.theme-dark {
  color-scheme: dark;
  --bg-page: #121212;
  --bg-sidebar: #000000;
  --bg-sidebar-active: #282828;
  --text: #ffffff;
  --text-muted: #b3b3b3;
  --accent: #1db954;
  --accent-ring: #1ed760;
  --pause-purple: #b3b3b3;
  --border-soft: #282828;
  --player-bg: #181818;
  --progress-track: #4f4f4f;
  --bg-elevated: #181818;
  --bg-hover: rgba(255, 255, 255, 0.1);
  --border: var(--border-soft);
  --text-dim: var(--text-muted);

  --surface: #181818;
  --surface-hover: #282828;
  --search-border: #333333;
  --placeholder-input: #8f8f8f;
  --hover-row: rgba(255, 255, 255, 0.08);
  --hover-control: rgba(255, 255, 255, 0.12);
  --cover-placeholder: #282828;
  --thumb-player: #ffffff;
  --ring-inner: #1e1e1e;
  --danger: #e91429;
  --backdrop-scrim: rgba(0, 0, 0, 0.62);
  --toggle-track-off: #727272;
  --on-accent: #ffffff;

  /* Menos desenfoque = mejor rendimiento en TV / equipos modestos */
  --glass-blur: 14px;
  --glass-blur-sm: 8px;
  --glass-blur-lg: 20px;

  --glass-saturate: 1.2;
  --glass-surface: rgba(24, 24, 24, 0.92);
  --glass-surface-2: rgba(18, 18, 18, 0.95);
  --glass-surface-3: rgba(40, 40, 40, 0.9);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-soft: rgba(255, 255, 255, 0.06);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --glass-ambient: #121212;
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --glass-card-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: var(--glass-ambient);
}

body {
  height: 100%;
  min-height: 100%;
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;
}

/* Escritorio/TV: una sola superficie de scroll (listas), sin hueco bajo el viewport */
@media (min-width: 1101px) {
  body {
    overflow: hidden;
  }
}

/* Capa ambiental visible a través del vidrio */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--glass-ambient);
  background-image:
    radial-gradient(ellipse 100% 85% at 0% 0%, rgba(255, 122, 0, 0.2), transparent 58%),
    radial-gradient(ellipse 75% 60% at 100% 5%, rgba(123, 97, 255, 0.16), transparent 52%),
    radial-gradient(ellipse 90% 65% at 45% 100%, rgba(70, 150, 190, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 75% 55%, rgba(255, 200, 140, 0.1), transparent 45%);
  pointer-events: none;
}

html.theme-dark body::before {
  background-image:
    radial-gradient(ellipse 90% 70% at 8% 8%, rgba(255, 148, 61, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 55% at 92% 12%, rgba(130, 110, 220, 0.12), transparent 50%),
    radial-gradient(ellipse 100% 55% at 50% 105%, rgba(40, 90, 130, 0.1), transparent 55%),
    radial-gradient(ellipse 45% 35% at 70% 45%, rgba(255, 120, 60, 0.06), transparent 45%);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

/* Barras de desplazamiento finas, redondeadas y alineadas al tema (no aplica en UI móvil). */
@media (min-width: 1101px) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  }

  *::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
  }

  *::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: var(--scrollbar-size);
  }

  *::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
  }

  *::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
  }

  *::-webkit-scrollbar-thumb:active {
    background-color: var(--scrollbar-thumb-active);
  }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nav-item:focus-visible,
.tab-route:focus-visible,
.ctrl-btn:focus-visible,
.ctrl-play:focus-visible,
.btn-library:focus-visible,
.player__art-open:focus-visible,
.player__meta-open:focus-visible,
.player__shuffle-mo:focus-visible,
.player__edit-track:focus-visible,
.field__input:focus-visible,
.queue-list__btn:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.ml-offline-ready-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  color: var(--accent);
  opacity: 0.95;
}

.ml-offline-ready-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.sidebar-pl-main.is-offline-ready .regular-pl-label,
.sidebar-pl-main.is-offline-ready .smart-pl-label {
  flex: 1;
  min-width: 0;
}

.sidebar-pl-offline-label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.sidebar-pl-offline-label__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-pl-offline-btn.sidebar-pl-offline-btn--done {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.sidebar-pl-offline-btn.sidebar-pl-offline-btn--done .ml-offline-dl-icon {
  opacity: 1;
}

.sidebar-pl-offline-btn.sidebar-pl-offline-btn--done:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.card-pl--offline-ready {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border-soft));
}

.card-pl--offline-ready .card-pl__meta h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.card-pl--offline-ready .card-pl__meta h3 .regular-pl-label,
.card-pl--offline-ready .card-pl__meta h3 .smart-pl-label {
  flex: 1;
  min-width: 0;
}

.view__title.is-offline-ready {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ml-offline-dl-icon {
  display: block;
  flex-shrink: 0;
}

.icon--sm {
  width: 16px;
  height: 16px;
}

.icon--pause {
  width: 22px;
  height: 22px;
  color: currentColor;
}

.icon--play {
  width: 22px;
  height: 22px;
  color: currentColor;
  margin-left: 2px;
}

/* ——— Shell ——— */

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: transparent;
}

.app__columns {
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  align-items: stretch;
}

.app__stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

/* ——— Barra superior ——— */

.top-bar {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto minmax(200px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: var(--top-bar-h);
  padding: 11px clamp(12px, 2.4vw, 10px);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-soft);
}

.top-bar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: nowrap;
}

.top-bar__home-btn {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.14s ease, background 0.14s ease;
}

.top-bar__home-btn:hover {
  background: color-mix(in srgb, var(--text) 10%, transparent);
  transform: scale(1.03);
}

.top-bar__home-btn:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 3px;
}

.top-bar__home-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.top-bar__home-logo {
  width: 50px;
  height: 50px;
  border-radius: 0;
  display: block;
  object-fit: contain;
  pointer-events: none;
  background: transparent;
}

.top-bar__search {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  margin-bottom: 0;
  justify-self: center;
  align-self: center;
}

.top-bar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-bar__theme {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.theme-toggle__label--toolbar {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.theme-toggle__switch--toolbar {
  flex-shrink: 0;
}

.btn-library--compact {
  padding: 8px 12px;
}

.btn-library__txt {
  display: inline;
}

@media (max-width: 720px) {
  .btn-library__txt {
    display: none;
  }

  .btn-library--compact {
    padding: 8px 10px;
  }
}

/* ——— Sidebar (mockup + nav SPA) ——— */

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  padding: 12px 10px 12px;
  border-right: 1px solid var(--border-soft);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  /* Evita que una lista larga agrande toda la fila y empuje el reproductor fuera del viewport */
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  align-self: stretch;
}

html.theme-dark .sidebar {
  box-shadow: none;
}

.sidebar__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin: 0 0 16px;
  background: var(--surface);
  border-radius: 999px;
  border: 1px solid var(--search-border);
  color: var(--text-muted);
}

form.sidebar__search {
  width: 100%;
}

.sidebar__search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  min-width: 0;
}

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

.sidebar__search-clear {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sidebar__search-clear[hidden] {
  display: none;
}

.sidebar__search-clear:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

.sidebar__search-clear:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

/* Buscar en barra superior: foco discreto sobre la píldora (sin anillo verde interior) */
.top-bar .sidebar__search {
  margin-bottom: 0;
  min-height: 42px;
  align-items: center;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.top-bar .sidebar__search:focus-within {
  border-color: var(--text-muted);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

html.theme-dark .top-bar .sidebar__search:focus-within {
  border-color: #6a6a6a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

#searchInput:focus,
#searchInput:focus-visible {
  outline: none;
}

#searchInput[readonly] {
  cursor: text;
}

#searchInput:-webkit-autofill,
#searchInput:-webkit-autofill:hover,
#searchInput:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  transition: background-color 99999s ease-out 0s;
  box-shadow: 0 0 0 1000px var(--surface) inset;
}

.sidebar__collapse-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.sidebar__collapse-btn:hover {
  background: var(--hover-row);
  color: var(--text);
}

.sidebar__collapse-btn:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

.sidebar__collapse-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ——— Sidebar colapsado (solo iconos, estilo YouTube Music) ——— */
html.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-w);
  min-width: var(--sidebar-collapsed-w);
  padding-left: 6px;
  padding-right: 6px;
}

html.sidebar-collapsed .sidebar .nav-item,
html.sidebar-collapsed .sidebar__collapse-btn,
html.sidebar-collapsed .sidebar__logout-btn {
  justify-content: center;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
  font-size: 0;
}

html.sidebar-collapsed .sidebar__collapse-text,
html.sidebar-collapsed .sidebar .playlists {
  display: none;
}

html.sidebar-collapsed .sidebar__logout {
  padding-left: 4px;
  padding-right: 4px;
  margin-top: auto;
}

html.sidebar-collapsed .sidebar__collapse-btn {
  color: var(--text);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.nav-item:focus {
  outline: none;
}

.nav-item:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

.nav-item:hover {
  background: var(--hover-row);
}

.nav-item--active {
  background: var(--bg-sidebar-active);
  font-weight: 700;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.nav-item__icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-item__icon svg {
  width: 20px;
  height: 20px;
}

.nav-item > :not(.nav-item__icon) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.nav-item.nav-item--bottom {
  margin-top: auto;
  font-weight: 500;
}

.nav-item.nav-item--bottom:not(:hover):not(.nav-item--active) {
  background: transparent;
}

.nav-item--bottom .btn-text,
.nav-item--bottom.btn-text--subtle {
  color: var(--text);
}

.playlists {
  margin-top: 8px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.playlists__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  color: inherit;
}

.playlists__header:hover {
  background: var(--hover-row);
}

.playlists__chevron {
  transition: transform 0.2s ease;
}

.playlists--collapsed .playlists__chevron {
  transform: rotate(-90deg);
}

.playlists--collapsed .playlists__body {
  display: none;
}

.playlists__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.playlists__list {
  list-style: none;
  margin: 0;
  padding: 4px 0 0;
  overflow-y: auto;
  flex: 0 1 auto;
}

.playlists__list li {
  margin: 2px 0;
}

.sidebar-pl-row {
  display: flex;
  align-items: stretch;
  gap: 2px;
}

.sidebar-pl-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 8px 10px 8px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.sidebar-pl-main--solo {
  width: 100%;
  flex: none;
}

.sidebar-pl-offline-btn {
  flex-shrink: 0;
  width: 38px;
  min-height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.sidebar-pl-offline-btn:hover {
  background: var(--hover-row);
  color: var(--accent);
}

.sidebar-pl-offline-btn:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

.sidebar-pl-offline-btn .ml-offline-dl-icon {
  width: 18px;
  height: 18px;
}

.sidebar-pl-main:hover {
  background: var(--hover-row);
}

.playlists__new {
  margin-top: 4px !important;
  align-self: flex-start;
}

.theme-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px 8px;
  margin-top: 4px;
  border-radius: 6px;
}

.theme-toggle__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 4.25;
}

.theme-toggle__switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  border: 1px solid var(--glass-border-soft);
  border-radius: 999px;
  background: var(--glass-surface-2);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  padding: 0;
  box-shadow: var(--glass-inset);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(10px);
  backdrop-filter: saturate(var(--glass-saturate)) blur(10px);
}

.theme-toggle__switch:hover {
  filter: brightness(1.06);
}

.theme-toggle__switch[aria-checked="true"] {
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.35);
}

.theme-toggle__switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease;
}

.theme-toggle__switch[aria-checked="true"]::after {
  transform: translateX(20px);
}

.theme-toggle__switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.top-bar__session {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  flex: 0 1 auto;
  max-width: min(450px, 56vw);
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--glass-border-soft) 72%, transparent);
  background: color-mix(in srgb, var(--glass-surface-2) 50%, transparent);
  box-shadow: var(--glass-inset);
}

html.theme-dark .top-bar__session {
  background: color-mix(in srgb, var(--glass-surface-2) 38%, transparent);
  border-color: color-mix(in srgb, var(--glass-border-soft) 50%, transparent);
}

.top-bar__session:not(:has(.top-bar__session__linkbtn)) {
  max-width: min(220px, 42vw);
}

.top-bar__session:not(:has(.top-bar__session__linkbtn)) .top-bar__session__name {
  max-width: min(180px, 36vw);
}

.top-bar__session__avatar {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--on-accent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 92%, #fff) 0%,
    var(--accent) 45%,
    color-mix(in srgb, var(--accent) 78%, #000) 100%
  );
  box-shadow:
    0 1px 6px color-mix(in srgb, var(--accent) 32%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

html.theme-dark .top-bar__session__avatar {
  box-shadow:
    0 2px 10px color-mix(in srgb, var(--accent) 26%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.top-bar__session__name {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
  min-width: 0;
  max-width: min(140px, 28vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-bar__session__sep {
  flex-shrink: 0;
  color: color-mix(in srgb, var(--text-muted) 75%, var(--border-soft));
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  user-select: none;
  margin: 0 -2px;
}

.top-bar__session__linkbtn {
  flex-shrink: 0;
  margin: 0;
  padding: 5px 8px;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.top-bar__session__linkbtn:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.top-bar__session__linkbtn:active {
  transform: scale(0.98);
}

.top-bar__session__linkbtn:focus {
  outline: none;
}

.top-bar__session__linkbtn:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

html.theme-dark .top-bar__session__linkbtn:hover {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.sidebar__family-hint {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.user-admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(52vh, 400px);
  overflow-y: auto;
}

.user-admin-empty {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.user-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--text-muted) 22%, transparent);
}

.user-admin-row:last-child {
  border-bottom: none;
}

.user-admin-row__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.user-admin-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.user-admin-openplay-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

html.theme-dark .user-admin-row {
  border-bottom-color: color-mix(in srgb, var(--text-muted) 35%, transparent);
}

.sidebar__logout {
  padding: 6px 12px 12px;
  margin-top: 4px;
}

.sidebar__logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 11px 16px;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--accent-ring) 70%, transparent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition:
    filter 0.16s ease,
    transform 0.16s ease,
    border-color 0.16s ease;
}

.sidebar__logout-btn:hover {
  filter: brightness(1.08);
  border-color: var(--accent-ring);
}

html.theme-dark .sidebar__logout-btn:hover {
  filter: brightness(1.1);
}

.sidebar__logout-btn:active {
  transform: translateY(1px);
  filter: brightness(0.98);
}

.sidebar__logout-btn:focus {
  outline: none;
}

.sidebar__logout-btn:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 3px;
}

.sidebar__logout-btn__icon {
  flex-shrink: 0;
  opacity: 1;
}

html.theme-dark .sidebar__logout-btn {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ——— Columna contextual (cola / ahora mismo) ——— */

.context-rail {
  width: var(--context-rail-resizer-w, min(300px, 26vw));
  min-width: var(--sidebar-w);
  max-width: 460px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 12px 16px;
  background: var(--bg-page);
  border-left: 1px solid var(--border-soft);
  overflow: hidden;
  min-height: 0;
  align-self: stretch;
}

.context-rail__panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.context-rail__np-wrap {
  flex-shrink: 0;
}

.context-rail__heading {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.context-rail__np {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.context-rail__np-art {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  max-height: clamp(140px, 22vh, 250px);
  background: var(--cover-placeholder);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

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

.context-rail__np-title {
  margin: 0;
  font-size: clamp(14px, 1.35vw, 17px);
  font-weight: 800;
  line-height: 1.28;
  color: var(--text);
}

.context-rail__np-artist {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.3;
}

.context-rail__np-album {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

.context-rail--audio-playing .context-rail__np-title {
  color: var(--accent);
}

.context-rail__queue-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.btn-text--rail {
  font-size: 12px;
  font-weight: 700;
}

.context-rail__queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-gutter: stable;
}

.context-rail__q-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease;
}

.context-rail__q-row:hover {
  background: var(--surface-hover);
}

.context-rail__q-row:focus {
  outline: none;
}

.context-rail__q-row:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .context-rail__q-row:focus-visible {
    transform: none;
  }

  .context-rail__q-row {
    transition: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .context-rail__q-row:focus-visible {
    transform: scale(1.02);
  }
}

.context-rail__q-row.is-current {
  box-shadow: inset 0 0 0 1px var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.context-rail__q-cover {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--cover-placeholder);
}

.context-rail__q-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.context-rail__q-title {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-rail__q-row.is-current .context-rail__q-title {
  color: var(--accent);
}

.context-rail__q-artist {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-rail__queue-more {
  margin: 10px 0 0;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Mango entre el contenido y la columna «Estás escuchando» / cola */
.context-rail-resizer {
  flex-shrink: 0;
  width: 6px;
  min-width: 6px;
  align-self: stretch;
  cursor: col-resize;
  touch-action: none;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}

.context-rail-resizer::before {
  content: '';
  position: absolute;
  inset: 0 -5px;
}

.context-rail-resizer:hover,
.context-rail-resizer:focus-visible {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.context-rail-resizer--drag {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
}

.context-rail-resizer:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: -2px;
}

body.context-rail-resize-active {
  cursor: col-resize;
  user-select: none;
}

/* ≤1100px: columna «Estás escuchando» oculta; UI móvil completa vía html.ml-mobile-ui (mobile.css) */
@media (max-width: 1100px) {
  .context-rail,
  .context-rail-resizer {
    display: none !important;
  }
}

.btn-text {
  margin-top: 8px;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-text--subtle {
  color: var(--text-muted);
  font-weight: 500;
}

.btn-text--subtle:hover {
  color: var(--text);
}

/* ——— Columna principal ——— */

.main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Crítico: sin esto el bloque central no puede encogerse y el footer.player queda recortado */
  min-height: 0;
  background: var(--bg-page);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.main-header__spacer {
  justify-self: end;
  width: 100%;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px 28px 0;
}

.main-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}

.main-title {
  margin: 0;
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tabs {
  display: flex;
  gap: 28px;
  justify-content: center;
  padding-top: 8px;
}

.tab {
  position: relative;
  padding: 4px 2px 12px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-muted);
}

.tab__inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tab:hover {
  color: var(--text);
}

.tab--active {
  color: var(--text);
  font-weight: 600;
}

.tab--active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.btn-library {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--glass-border-soft);
  border-radius: 6px;
  background: var(--glass-surface-3);
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: var(--glass-inset);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-sm));
  backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-sm));
}

.btn-library:hover {
  background: var(--glass-surface-3);
  filter: brightness(1.04);
}

.btn-shuffle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 28px rgba(29, 185, 84, 0.35);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

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

html.theme-dark .btn-shuffle {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 8px 32px rgba(29, 185, 84, 0.38);
}

.main-scroll,
.album-grid-scroll {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 16px;
  min-height: 0;
}

.view {
  flex: 1;
  padding: 0 0 24px;
  min-height: 0;
}

.view-loader {
  color: var(--text-muted);
  padding: 24px;
}

/* YouTube: búsqueda + importar lista */
.yt-panel {
  width: 100%;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--glass-surface-2);
  border: 1px solid var(--glass-border-soft);
  overflow: hidden;
}

.yt-block {
  padding: 12px 14px;
}

.yt-block + .yt-block {
  border-top: 1px solid var(--glass-border-soft);
}

.yt-block__title {
  margin: 0 0 4px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.yt-block__note {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.yt-block__row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: stretch;
}

.yt-block__row--end {
  margin-top: 8px;
  justify-content: flex-end;
}

.yt-block__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--search-border);
  background: var(--surface);
  font-size: 14px;
}

.yt-block__input--full {
  flex: 1 1 100%;
  width: 100%;
  margin-bottom: 0;
}

.yt-block__btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.yt-block__feedback,
.yt-panel__alert {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .yt-block__row {
    flex-wrap: wrap;
  }

  .yt-block__btn {
    width: 100%;
  }
}

.yt-panel__alert {
  margin: 0;
  border-top: 1px solid var(--glass-border-soft);
  background: color-mix(in srgb, var(--accent, #6cf) 8%, transparent);
  color: var(--text);
}

.yt-block__feedback {
  padding: 0;
  margin-top: 8px;
}

.grid-youtube {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  align-items: stretch;
}

@media (min-width: 1100px) {
  .grid-youtube {
    gap: 16px;
  }
}

.card-youtube {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--glass-border-soft);
  text-align: left;
  cursor: pointer;
  outline: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    filter 0.2s ease;
}

.card-youtube:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.16),
    0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: color-mix(in srgb, var(--accent-ring) 50%, var(--glass-border-soft));
  filter: brightness(1.02);
}

.card-youtube:active {
  transform: translateY(-2px);
}

.card-youtube:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 3px;
}

.card-youtube__thumb {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  background: var(--cover-placeholder);
  cursor: pointer;
  overflow: hidden;
}

.card-youtube__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.22s ease;
}

.card-youtube:hover .card-youtube__thumb img {
  transform: scale(1.05);
}

.card-youtube__badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
}

.card-youtube__body {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  cursor: pointer;
}

.card-youtube__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
}

.card-youtube__meta {
  margin: 0;
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

.card-youtube__actions {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  align-self: stretch;
  flex: 0 0 auto;
  gap: 0;
  margin-top: auto;
  padding-top: 12px;
  width: 100%;
  cursor: default;
}

.btn-yt {
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, background 0.12s ease;
}

.card-youtube__actions .btn-yt {
  box-sizing: border-box;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-yt:hover {
  filter: brightness(1.04);
}

.btn-yt:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

.btn-yt--primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}

.view__header {
  margin-bottom: 16px;
}

.view__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.view__subtitle {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.view__header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.view__header-text {
  flex: 1;
  min-width: min(100%, 200px);
}

.btn-playlist-offline-all {
  flex-shrink: 0;
  margin-top: 2px;
  white-space: nowrap;
}

.grid-tracks,
.grid-albums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.grid-tracks > .card-track,
.grid-albums > .card-track {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.grid-tracks > .card-track > .card-track__body,
.grid-albums > .card-track > .card-track__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.grid-tracks > .card-track > .card-track__actions {
  margin-top: auto;
  padding: 8px 14px 14px;
}

.card-track {
  background: var(--glass-surface-2);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid var(--glass-border-soft);
  box-shadow: var(--glass-inset), var(--glass-card-shadow);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-sm));
  backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-sm));
}

.card-track:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-inset), var(--glass-shadow);
}

.card-track:focus {
  outline: none;
}

.card-track:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 3px;
  transform: translateY(-2px) scale(1.02);
}

@media (prefers-reduced-motion: reduce) {
  .card-track:hover,
  .card-track:focus-visible {
    transform: none;
  }
}

.card-track__cover {
  aspect-ratio: 1;
  background: var(--cover-placeholder);
  position: relative;
}

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

.card-track__body {
  padding: 12px 14px 14px;
}

.card-track__title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-track__artist {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-track__meta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.browse-filter,
.albums-filter,
.artists-filter {
  display: flex;
  gap: 10px;
  margin: 0 0 20px;
}

.browse-filter__btn,
.albums-filter__btn,
.artists-filter__btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-border-soft);
  background: var(--glass-surface-2);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.browse-filter__btn:hover,
.albums-filter__btn:hover,
.artists-filter__btn:hover {
  color: var(--text);
}

.browse-filter__btn.is-active,
.albums-filter__btn.is-active,
.artists-filter__btn.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--glass-border-soft));
  background: color-mix(in srgb, var(--accent) 14%, var(--glass-surface-2));
}

.grid-albums .card-track__actions--album-grid {
  margin-top: 10px;
}

.row-track {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.row-track--editable {
  grid-template-columns: 24px 48px minmax(0, 1fr) minmax(72px, max-content) auto max-content;
}

.row-track--queue-actions {
  grid-template-columns: 48px minmax(0, 1fr) auto auto max-content;
}

.row-track__drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
  align-self: center;
}

.row-track__drag-handle:active,
.row-track--dragging .row-track__drag-handle {
  cursor: grabbing;
}

.row-track__drag-handle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 1px;
}

.row-track__drag-icon {
  width: 16px;
  height: 16px;
  opacity: 0.75;
}

.row-track--dragging {
  position: relative;
  z-index: 3;
  opacity: 0.92;
  background: var(--glass-surface-2);
  box-shadow: var(--shadow-md, 0 8px 24px rgba(0, 0, 0, 0.18));
}

.row-track--drop-before {
  box-shadow: inset 0 2px 0 var(--accent);
}

body.ml-playlist-dragging {
  user-select: none;
  -webkit-user-select: none;
}

body.ml-playlist-dragging .row-track {
  cursor: grabbing;
}

.row-track__cover {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  align-self: center;
}

.row-track:hover {
  background: var(--glass-surface-2);
  box-shadow: var(--glass-inset);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-sm));
  backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-sm));
}

.row-track__cover img {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}

.track-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row-track__main {
  min-width: 0;
}

.row-track__title {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-track__artist {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  min-width: 0;
}

.row-track__offline-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.row-track__offline-badge[hidden] {
  display: none;
}

.row-track__offline-badge .ml-offline-ready-icon {
  width: 14px;
  height: 14px;
}

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

.row-track__genre {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-track__dur {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.row-track__actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  justify-self: end;
  flex-shrink: 0;
  min-width: max-content;
}

.row-track--editable .row-track__actions {
  grid-column: -1;
}

.row-track__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.row-track__action:hover:not(:disabled),
.row-track__action:focus-visible {
  background: var(--glass-surface-3);
  border-color: var(--glass-border-soft);
  color: var(--text);
}

.row-track__action:disabled {
  cursor: default;
  opacity: 0.32;
}

.row-track__action.is-liked,
.row-track__action[aria-pressed="true"] {
  color: var(--accent);
}

.row-track__action.danger:hover:not(:disabled),
.row-track__action.danger:focus-visible {
  color: var(--danger);
}

.row-track__action svg {
  width: 18px;
  height: 18px;
}

.empty-state {
  color: var(--text-muted);
  padding: 48px 16px;
  text-align: center;
}

/* Scroll infinito en biblioteca — centinela bajo la cuadrícula */
.library-sentinel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 36px;
  min-height: 56px;
}

.library-scroll-sentinel {
  flex-shrink: 0;
  width: 100%;
  height: 1px;
  pointer-events: none;
}

.library-sentinel-loader {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--glass-surface-2);
  border: 1px solid var(--glass-border-soft);
  box-shadow: var(--glass-inset);
}

.library-sentinel-loader[hidden] {
  display: none !important;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 24px 0;
}

.btn-load-more {
  padding: 10px 28px;
  border-radius: 8px;
  border: 1px solid var(--glass-border-soft);
  background: var(--glass-surface-3);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--glass-inset);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-sm));
  backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-sm));
}

.btn-load-more:hover {
  filter: brightness(1.04);
}

.card-pl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  cursor: pointer;
  background: var(--glass-surface-2);
  border-radius: var(--radius);
  margin-bottom: 10px;
  border: 1px solid var(--glass-border-soft);
  box-shadow: var(--glass-inset), var(--glass-card-shadow);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-sm));
  backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-sm));
}

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

.card-pl__meta p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.card-pl__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-btn-sm {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--glass-border-soft);
  background: var(--glass-surface-3);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  box-shadow: var(--glass-inset);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(8px);
  backdrop-filter: saturate(var(--glass-saturate)) blur(8px);
}

.icon-btn-sm:hover {
  filter: brightness(1.05);
}

.icon-btn-sm.danger {
  color: var(--danger);
}

.icon-btn-sm.del-pl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  min-width: 38px;
}

.icon-btn-sm.rename-pl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  min-width: 38px;
}

.icon-btn-sm.del-pl .ml-pl-del-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.icon-btn-sm.rename-pl .ml-pl-rename-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.icon-btn-sm.offline-pl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  color: var(--text-muted);
}

.icon-btn-sm.offline-pl-btn:hover {
  color: var(--accent);
}

.icon-btn-sm.offline-pl-btn .ml-offline-dl-icon {
  width: 17px;
  height: 17px;
}

.icon-btn-sm.offline-pl-btn.offline-pl-btn--done {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.icon-btn-sm.offline-pl-btn.offline-pl-btn--done .ml-offline-dl-icon {
  opacity: 1;
}

.icon-btn-sm.offline-pl-btn.offline-pl-btn--done:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

/* ——— Control remoto (Spotify Connect) ——— */

.remote-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin: 0 clamp(8px, 2vw, 16px) 6px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--glass-border-soft));
  background: color-mix(in srgb, var(--accent) 10%, var(--glass-surface-2));
  box-shadow: var(--glass-inset);
}

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

.remote-bar__info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.remote-bar__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
  animation: remote-bar-pulse 1.8s ease-in-out infinite;
}

@keyframes remote-bar-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.remote-bar__text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-bar__btn {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border-soft);
  background: var(--glass-surface-3);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.remote-bar__btn:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-border-soft));
  background: color-mix(in srgb, var(--accent) 12%, var(--glass-surface-3));
}

.player-host-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.player-host-badge[hidden] {
  display: none !important;
}

.player-host-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
}

html.ml-remote-control .player__extras .vol input[type='range'] {
  cursor: pointer;
}

/* ——— Player (mockup bar) ——— */

.player {
  flex-shrink: 0;
  background: var(--player-bg);
  border-top: 1px solid var(--border-soft);
  padding: 0 clamp(12px, 2vw, 24px) 12px;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html.theme-dark .player {
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
}

.player__progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 10px;
}

.player__time {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
}

.player__time:last-child {
  text-align: right;
}

.player__progress {
  flex: 1;
  position: relative;
  height: 5px;
  min-height: 5px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  cursor: pointer;
  touch-action: none;
  border: 1px solid var(--glass-border-soft);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

html.theme-dark .player__progress {
  background: rgba(255, 255, 255, 0.06);
}

.player__progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.player__thumb {
  position: absolute;
  left: 0%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--thumb-player);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.player__body {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding-top: 4px;
}

.player__transport-bundle {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.player__now {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.player__edit-track {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.player__edit-track:hover:not(:disabled) {
  background: var(--hover-row);
  color: var(--text);
}

.player__edit-track:focus {
  outline: none;
}

.player__edit-track:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.player__edit-track:disabled:hover {
  background: transparent;
}

.player__edit-track__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.player__art-open,
.player__meta-open {
  margin: 0;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.player__art-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}

.player__meta-open {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  padding: 4px 8px 4px 4px;
  text-align: left;
}

.player__art-open:hover,
.player__meta-open:hover {
  background: var(--hover-row);
}

.player__art-open:focus,
.player__meta-open:focus {
  outline: none;
}

.player__art-open:focus-visible,
.player__meta-open:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

.player__art-open:disabled,
.player__meta-open:disabled {
  cursor: default;
  opacity: 0.58;
}

.player__art-open:disabled:hover,
.player__meta-open:disabled:hover {
  background: transparent;
}

.player__lyrics-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.player__lyrics-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text);
}

.player__lyrics-btn:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

.player__lyrics-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.player__lyrics-btn__icon {
  width: 22px;
  height: 22px;
  display: block;
}

/* Aleatorio en la fila de «ahora» solo en móvil; escritorio sigue en controles */
.player__shuffle-mo {
  display: none;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.player__shuffle-mo:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text);
}

.player__shuffle-mo:focus {
  outline: none;
}

.player__shuffle-mo:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

@media (min-width: 769px) {
  .player__shuffle-mo {
    display: none !important;
  }

  #btnPlayerLyrics {
    margin-left: auto;
  }
}


.player__thumb-art-wrap {
  flex-shrink: 0;
}

.player__cover,
.player__thumb-art {
  width: 48px;
  height: 48px;
  border-radius: 2px;
  object-fit: cover;
  display: block;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

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

.player__meta-open .player__meta {
  text-align: left;
}

.player__song,
.player__title {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__artist,
.player__sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__genre {
  display: none;
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.ctrl-btn:hover {
  background: var(--hover-control);
}

#btnContinuousMode[hidden] {
  display: none !important;
}

.ctrl-btn[aria-pressed="true"] {
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

@supports not (color: color-mix(in srgb, red, blue)) {
  .ctrl-btn[aria-pressed="true"] {
    box-shadow: inset 0 0 0 1px var(--accent-ring);
    background: var(--hover-control);
  }
}

/* Repetir: lista (resaltado) vs una canción (resaltado + «1» encima del icono) */
.ctrl-btn--repeat {
  position: relative;
}

#btnRepeat[aria-pressed='true'],
#btnRepeat[data-mode='all'],
#btnRepeat[data-mode='one'] {
  color: var(--accent);
}

.ctrl-repeat {
  position: relative;
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
}

.ctrl-repeat .ctrl-repeat__svg {
  display: block;
}

.ctrl-repeat__one {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: inherit;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 0 2px var(--glass-surface-3), 0 0 1px var(--glass-surface-3);
}

#btnRepeat[data-mode="one"] .ctrl-repeat__one {
  opacity: 1;
}

/* Deja algo de aire para el «1» centrado sobre las flechas */
#btnRepeat[data-mode="one"] .ctrl-repeat__svg {
  opacity: 0.82;
}

.ctrl-btn--like.is-liked,
.ctrl-btn--like[aria-pressed="true"] {
  color: var(--accent);
  box-shadow: none;
  background: transparent;
}

.ctrl-btn--like:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#btnPlayerAddToPlaylist:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ctrl-btn--offline {
  color: var(--text-muted);
}

.ctrl-btn--offline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ctrl-btn--offline.is-offline-cached,
.ctrl-btn--offline[aria-pressed="true"] {
  color: var(--accent);
  box-shadow: none;
  background: transparent;
}

.ctrl-btn--offline.is-offline-cached:hover,
.ctrl-btn--offline[aria-pressed="true"]:hover {
  background: var(--hover-control);
}

.ctrl-btn--offline .ml-offline-dl-icon {
  width: 19px;
  height: 19px;
}

.ctrl-btn--offline.is-offline-cached .ml-offline-dl-icon,
.ctrl-btn--offline[aria-pressed="true"] .ml-offline-dl-icon {
  stroke-width: 2.15;
}

.ctrl-like__icon {
  width: 19px;
  height: 19px;
  fill: transparent;
  stroke: currentColor;
}

.ctrl-btn--like.is-liked .ctrl-like__icon,
.ctrl-btn--like[aria-pressed="true"] .ctrl-like__icon {
  fill: currentColor;
  stroke: currentColor;
}

.player__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ctrl-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0 6px;
  border: none;
  background: none;
  cursor: pointer;
}

.ctrl-play__ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--surface-hover);
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent-ring);
}

.ctrl-play.is-playing .ctrl-play__ring {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 22px rgba(29, 185, 84, 0.45);
}

html.theme-dark .ctrl-play.is-playing .ctrl-play__ring {
  box-shadow: 0 8px 28px rgba(29, 185, 84, 0.5);
}

.ctrl-play__icon {
  display: block;
}

.ctrl-play__icon--pause {
  display: none;
}

.ctrl-play.is-playing .ctrl-play__icon--play {
  display: none;
}

.ctrl-play.is-playing .ctrl-play__icon--pause {
  display: block;
}

.player__extras {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.vol {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 140px;
}

.vol input[type="range"] {
  --vol-fill: 80%;
  --vol-track: color-mix(in srgb, var(--text-muted) 32%, transparent);
  width: 100%;
  height: 8px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.vol input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--vol-fill),
    var(--vol-track) var(--vol-fill),
    var(--vol-track) 100%
  );
}

.vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.vol input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--vol-fill),
    var(--vol-track) var(--vol-fill),
    var(--vol-track) 100%
  );
}

.vol input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.panel-yt-watch {
  position: fixed;
  left: 50%;
  top: 50%;
  translate: -50% -54%;
  width: min(960px, calc(100vw - 48px));
  max-height: min(86vh, calc(100dvh - 140px));
  padding: 0;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  box-shadow: var(--glass-shadow);
  z-index: 74;
  display: flex;
  flex-direction: column;
}

.panel-yt-watch__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.panel-yt-watch__title {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
}

.panel-yt-watch__ratio {
  aspect-ratio: 16 / 9;
  background: var(--surface);
}

.panel-yt-watch #ytWatchFrame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.panel-yt-watch .panel-yt-watch__close {
  flex-shrink: 0;
}

#ytWatchBackdrop {
  z-index: 71;
}

/* Paneles overlays */
#ytWatchBackdrop[hidden],
#ytWatchPanel[hidden],
#queuePanel[hidden],
#queueBackdrop[hidden],
#lyricsPanel[hidden],
#lyricsBackdrop[hidden],
#trackEditorPanel[hidden],
#trackMetaBackdrop[hidden],
#playlistDialog[hidden],
#playlistDialogBackdrop[hidden],
#confirmDialog[hidden],
#confirmDialogBackdrop[hidden],
#playlistMenu[hidden],
#nowPlayingBackdrop[hidden],
#nowPlayingPanel[hidden] {
  display: none !important;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: var(--backdrop-scrim);
  z-index: 60;
}

/* Vista “Now playing”: vinilo giratorio + información */
@keyframes ml-vinyl-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.now-playing-backdrop {
  z-index: 10050;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html:not(.ml-mobile-ui) #nowPlayingBackdrop {
  opacity: 0;
  transition: opacity 0.28s ease;
}

html:not(.ml-mobile-ui) #nowPlayingBackdrop.now-playing--open {
  opacity: 1;
}

html:not(.ml-mobile-ui) #nowPlayingPanel {
  opacity: 0;
  transition: opacity 0.28s ease;
}

html:not(.ml-mobile-ui) #nowPlayingPanel.now-playing--open {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  html:not(.ml-mobile-ui) #nowPlayingBackdrop,
  html:not(.ml-mobile-ui) #nowPlayingPanel {
    transition: none !important;
  }
}

.now-playing {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(16px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
  padding-bottom: calc(28px + var(--player-h) + env(safe-area-inset-bottom));
  pointer-events: none;
  background: var(--bg-page);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.ml-np-chrome-elevated .now-playing {
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.now-playing__close {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: calc(14px + env(safe-area-inset-right));
  z-index: 10065;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border-soft);
  box-shadow: var(--glass-shadow);
  pointer-events: auto;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.now-playing__remote {
  display: none;
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: calc(14px + env(safe-area-inset-right));
  z-index: 10065;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
  pointer-events: auto;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}

.now-playing__top-right {
  display: contents;
}

.now-playing__remote-vol[hidden],
.now-playing__vol-popover[hidden] {
  display: none !important;
}

.now-playing__remote-vol:not([hidden]) {
  display: none;
}

.now-playing__remote-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.now-playing__remote-dot {
  display: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.now-playing__remote-label {
  display: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}

.now-playing__remote.is-waiting {
  color: #7dffb0;
  border-color: rgba(29, 185, 84, 0.65);
  background: rgba(29, 185, 84, 0.18);
}

.now-playing__remote.is-waiting .now-playing__remote-dot {
  display: block;
  background: #1db954;
  box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.28);
  animation: np-remote-pulse 1.4s ease-in-out infinite;
}

.now-playing__remote.is-active {
  color: #04140a !important;
  background: #1db954 !important;
  border-color: #1ed760 !important;
  box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.45), 0 6px 18px rgba(0, 0, 0, 0.35);
}

.now-playing__remote.is-active .now-playing__remote-label {
  display: inline;
}

.now-playing__remote.is-active .now-playing__remote-dot {
  display: none;
}

.now-playing__remote:hover {
  background: rgba(0, 0, 0, 0.48);
}

.now-playing__remote.is-active:hover {
  background: #1ed760 !important;
}

.now-playing__remote:focus-visible {
  outline: 2px solid var(--accent-ring, #1ed760);
  outline-offset: 2px;
}

@keyframes np-remote-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.25);
    opacity: 0.65;
  }
}

.now-playing__close:hover {
  background: var(--surface-hover);
}

.now-playing__close:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

.now-playing__close-icon {
  width: 22px;
  height: 22px;
}

.now-playing__close-icon--down {
  display: none;
}

.now-playing__bg {
  display: none;
}

.now-playing__actions {
  display: none;
}

.now-playing__queue-peek {
  display: none;
}

.now-playing__queue-dock {
  display: none;
}

.now-playing__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: min(520px, 100%);
  margin: 0 auto;
  flex: 0 1 auto;
  max-height: calc(100dvh - 88px);
  min-height: 0;
  pointer-events: auto;
}

.now-playing__disc-wrap {
  perspective: 800px;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
}

.now-playing__disc {
  position: relative;
  width: min(78vw, 340px);
  height: auto;
  aspect-ratio: 1;
  max-height: min(50vh, 400px);
  margin: 0 auto;
  animation: ml-vinyl-spin 18s linear infinite;
  animation-play-state: paused;
  filter: drop-shadow(0 18px 32px color-mix(in srgb, var(--text) 22%, transparent));
}

html.theme-dark .now-playing__disc {
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
}

.now-playing--spinning .now-playing__disc {
  animation-play-state: running;
}

.now-playing__groove-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 30.5%, rgba(8, 8, 8, 0.97) 31%, rgba(12, 12, 12, 0.99) 31.6%),
    repeating-radial-gradient(
      circle at 50% 50%,
      #141414 0,
      #141414 1.5px,
      #1e1e1e 1.5px,
      #1e1e1e 3px
    );
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.05),
    inset 0 0 24px rgba(0, 0, 0, 0.65);
}

.now-playing__label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44%;
  height: 44%;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.88),
    inset 0 0 12px rgba(0, 0, 0, 0.35);
  background: #111;
}

.now-playing__label-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 420ms ease-in-out;
}

.now-playing__label-img.is-cover-loading,
.now-playing__bg-img.is-cover-loading {
  opacity: 0.45;
}

.now-playing__spindle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  z-index: 2;
  background: radial-gradient(circle at 32% 32%, #f2f2f2, #2a2a2a 45%, #0a0a0a);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
}

.now-playing__info {
  text-align: center;
  width: 100%;
  padding: 0 8px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.now-playing__title-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: start;
  gap: 8px;
  width: 100%;
}

html:not([data-can-edit-track-meta="1"]) .now-playing__title-row {
  grid-template-columns: minmax(0, 1fr);
}

html:not([data-can-edit-track-meta="1"]) .now-playing__meta-actions {
  display: none;
}

.now-playing__title-row .now-playing__song {
  grid-column: 2;
  margin: 0;
}

.now-playing__meta-actions {
  grid-column: 3;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.player__edit-track--now-playing {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--glass-border-soft);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--glass-shadow);
}

.player__edit-track--now-playing:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--accent);
}

.player__edit-track--now-playing .player__edit-track__icon {
  width: 22px;
  height: 22px;
}

.now-playing__song {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 4vw, 1.45rem);
  font-weight: 750;
  line-height: 1.25;
  color: var(--text);
  text-shadow: none;
  letter-spacing: -0.02em;
  text-align: center;
}

html.theme-dark .now-playing__song {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.now-playing__artist {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-shadow: none;
}

html.theme-dark .now-playing__artist {
  color: color-mix(in srgb, var(--text) 88%, transparent);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.now-playing__album {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-shadow: none;
  font-weight: 500;
}

.now-playing__meta-line {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-shadow: none;
  opacity: 0.98;
}

.now-playing__transport {
  width: 100%;
  max-width: min(480px, 100vw);
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.125rem;
  padding: 18px 16px 20px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--glass-border-soft);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.now-playing__transport .player__progress-wrap {
  width: 100%;
}

.now-playing__transport .player__transport-bundle {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
}

.now-playing__transport .player__progress-wrap {
  gap: 10px;
}

.now-playing__transport .player__time {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  min-width: 2.75rem;
}

.now-playing__transport .player__progress {
  min-height: 5px;
  border-radius: 999px;
}

.now-playing__transport .player__thumb {
  width: 14px;
  height: 14px;
}

.now-playing__transport .player__controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: 12px 6px;
  width: 100%;
  justify-items: center;
  align-items: center;
}

.now-playing__transport #btnShuffle {
  grid-column: 1;
  grid-row: 1;
}

.now-playing__transport #btnPrev {
  grid-column: 2;
  grid-row: 1;
}

.now-playing__transport #btnPlay {
  grid-column: 3;
  grid-row: 1;
}

.now-playing__transport #btnNext {
  grid-column: 4;
  grid-row: 1;
}

.now-playing__transport #btnRepeat {
  grid-column: 5;
  grid-row: 1;
}

.now-playing__transport #btnPlayerLike {
  grid-column: 2;
  grid-row: 2;
}

.now-playing__transport #btnPlayerAddToPlaylist {
  grid-column: 3;
  grid-row: 2;
}

.now-playing__transport #btnOfflineTrack {
  grid-column: 4;
  grid-row: 2;
}

.now-playing__transport #btnQueue {
  grid-column: 1;
  grid-row: 2;
}

.now-playing__transport #btnContinuousMode {
  grid-column: 5;
  grid-row: 2;
}

.now-playing__transport .player__controls .ctrl-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.now-playing__transport .player__controls .ctrl-btn .icon {
  width: 24px;
  height: 24px;
}

.now-playing__transport .player__controls .ctrl-play {
  margin: 0;
}

.now-playing__transport .player__controls .ctrl-play__ring {
  width: 68px;
  height: 68px;
}

.now-playing__transport .player__controls .ctrl-play__icon {
  width: 28px;
  height: 28px;
}

.now-playing__transport .player__controls .ctrl-repeat {
  width: 24px;
  height: 24px;
}

.now-playing__transport .player__controls .ctrl-like__icon {
  width: 22px;
  height: 22px;
}

.now-playing__transport .player__controls .ml-offline-dl-icon {
  width: 22px;
  height: 22px;
}

.now-playing__transport .player__extras {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  width: 100%;
  gap: 8px;
}

.now-playing__transport .player__controls #btnQueue .icon,
.now-playing__transport .player__controls #btnContinuousMode .icon {
  width: 24px;
  height: 24px;
}

.now-playing__transport .vol {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: none;
  width: 100%;
  margin: 0;
  min-width: 0;
}

.now-playing__transport .vol .icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.now-playing__transport .vol input[type="range"] {
  flex: 1;
  min-width: 0;
  height: 28px;
}

/* Now playing pantalla grande: solo html:not(.ml-mobile-ui) — no modificar mobile.css */
@media (min-width: 769px) {
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: stretch;
    gap: clamp(14px, 1.6vw, 22px);
    padding:
      calc(56px + env(safe-area-inset-top)) clamp(18px, 2vw, 28px)
      calc(18px + env(safe-area-inset-bottom));
    overflow: hidden;
    background:
      radial-gradient(ellipse 65% 50% at 22% -8%, color-mix(in srgb, var(--accent) 10%, transparent), transparent),
      var(--bg-page);
  }

  /* Remoto + cerrar alineados al borde superior de los paneles */
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__close,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__remote {
    top: calc(10px + env(safe-area-inset-top));
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    border: 1px solid var(--glass-border-soft);
    box-shadow: none;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__close {
    right: clamp(18px, 2vw, 28px);
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__close-icon {
    width: 18px;
    height: 18px;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__remote {
    display: inline-flex;
    right: calc(clamp(18px, 2vw, 28px) + 48px);
    left: auto;
    z-index: 10065;
    min-width: 40px;
    padding: 0 10px;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__remote.is-active {
    min-width: auto;
    padding: 0 12px;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__remote-icon {
    width: 18px;
    height: 18px;
  }

  /* Panel izquierdo: vinilo → detalles → controles (columna) */
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(16px, 2vh, 28px);
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: clamp(20px, 2.4vh, 28px) clamp(24px, 3vw, 40px) clamp(18px, 2vh, 28px);
    border-radius: 22px;
    background: var(--surface);
    border: 1px solid var(--glass-border-soft);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__inner > .now-playing__meta-actions {
    display: none;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__disc-wrap {
    grid-area: disc;
    perspective: 800px;
    flex: none;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1;
    justify-self: start;
    margin-top: 2px;
    overflow: hidden;
    contain: layout paint;
    border-radius: 50%;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__disc {
    width: 100%;
    height: 100%;
    max-width: 220px;
    max-height: 220px;
    aspect-ratio: 1;
    margin: 0;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__info {
    grid-area: info;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    max-height: 100%;
    text-align: left;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    gap: 8px;
    overflow: auto;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__title-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px 12px;
    width: 100%;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__title-row .now-playing__song {
    grid-column: unset;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    text-align: left;
    font-size: clamp(1.25rem, 1.7vw, 1.65rem);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__meta-actions {
    grid-column: unset;
    flex: 0 0 auto;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__artist,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__album,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__meta-line {
    margin: 0;
    text-align: left;
    width: 100%;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__artist {
    font-size: 0.98rem;
    line-height: 1.3;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__meta-line {
    font-size: 0.8rem;
    opacity: 0.85;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-top: 10px;
    padding: 14px 16px 16px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg-page) 55%, var(--surface));
    border: 1px solid var(--glass-border-soft);
    box-sizing: border-box;
    overflow: hidden;
    gap: 0.85rem;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__extras,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__transport-bundle {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__transport-bundle {
    gap: 0.75rem;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls {
    gap: 8px 4px;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls .ctrl-btn {
    width: 42px;
    height: 42px;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls .ctrl-play__ring {
    width: 56px;
    height: 56px;
  }

  /* Cola visible a la derecha: ocultar botón cola redundante */
  html:not(.ml-mobile-ui).ml-np-queue-docked body.ml-np-chrome-elevated .now-playing__transport #btnQueue {
    display: none !important;
  }

  /* Repetir siempre visible y verde cuando activo (evita regla de footer estrecho) */
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnRepeat {
    display: inline-flex !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnShuffle[aria-pressed='true'],
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnRepeat[aria-pressed='true'],
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnRepeat[data-mode='all'],
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnRepeat[data-mode='one'] {
    color: var(--accent) !important;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
  }

  /* Cola derecha: misma altura, tipografía al estilo móvil */
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock {
    display: flex;
    flex-direction: column;
    flex: 0 0 clamp(300px, 30vw, 380px);
    width: clamp(300px, 30vw, 380px);
    max-width: 400px;
    min-width: 280px;
    min-height: 0;
    align-self: stretch;
    position: relative;
    z-index: 4;
    margin: 0;
    padding: 0;
    border-radius: 22px;
    background: var(--surface);
    border: 1px solid var(--glass-border-soft);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    pointer-events: auto;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .panel-queue,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .panel-queue--np-docked {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
    padding-top: 0 !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    z-index: auto;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .panel-queue__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    padding: 16px 16px 10px;
    border-bottom: 1px solid var(--glass-border-soft);
    background: transparent;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .panel-queue__title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .panel-queue__subtitle {
    order: -1;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--text-muted);
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .panel-queue__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .panel-queue__close,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .panel-queue__np-actions {
    display: none !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .queue-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 8px 14px;
    -webkit-overflow-scrolling: touch;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .queue-list__actions {
    display: none;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .queue-list__item {
    border-radius: 10px;
  }
}

/* Pantallas amplias: un poco más de aire sin volver al vacío centrado */
@media (min-width: 1200px) {
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing {
    gap: 20px;
    padding-left: clamp(22px, 2.4vw, 36px);
    padding-right: clamp(22px, 2.4vw, 36px);
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__inner {
    grid-template-columns: minmax(188px, 248px) minmax(0, 1fr);
    gap: 20px 28px;
    padding: 26px 28px 28px;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__disc-wrap,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__disc {
    max-width: 248px;
    max-height: 248px;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock {
    flex-basis: clamp(320px, 28vw, 400px);
    width: clamp(320px, 28vw, 400px);
    max-width: 400px;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__title-row .now-playing__song {
    font-size: clamp(1.35rem, 1.8vw, 1.85rem);
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__close {
    right: clamp(22px, 2.4vw, 36px);
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__remote {
    right: calc(clamp(22px, 2.4vw, 36px) + 48px);
  }
}

/* Tablets / ventanas estrechas en PC: cola debajo */
@media (min-width: 769px) and (max-width: 1099px) {
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing {
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__inner {
    flex: 0 0 auto;
    height: auto;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    grid-template-columns: minmax(150px, 200px) minmax(0, 1fr);
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock {
    flex: 1 1 auto;
    width: 100%;
    max-width: 920px;
    min-width: 0;
    min-height: 260px;
    margin: 0 auto;
  }
}

body.ml-np-chrome-elevated {
  --player-h: 72px;
}

@media (max-width: 1100px) {
  body.ml-np-chrome-elevated {
    --player-h: 58px;
  }
}

/* Con “Now playing” abierto, la cola en overlay debe quedar encima (no la pestaña Cola móvil) */
html.ml-queue-open body.ml-np-chrome-elevated #queueBackdrop {
  z-index: 10068;
}

html.ml-queue-open body.ml-np-chrome-elevated .panel-queue {
  z-index: 10070;
}

body.ml-np-chrome-elevated .playlist-menu {
  z-index: 10080;
}

body.ml-np-chrome-elevated #playlistDialogBackdrop,
body.ml-np-chrome-elevated #playlistDialog,
body.ml-np-chrome-elevated #confirmDialogBackdrop,
body.ml-np-chrome-elevated #confirmDialog {
  z-index: 10085;
}

/* Editor de metadatos por encima de Now playing (~10060) */
body.ml-np-chrome-elevated #trackMetaBackdrop,
body.ml-np-chrome-elevated .backdrop--track-editor {
  z-index: 10090;
}

body.ml-np-chrome-elevated #trackEditorPanel,
body.ml-np-chrome-elevated .panel-track-edit {
  z-index: 10092;
}

@media (prefers-reduced-motion: reduce) {
  .now-playing__disc {
    animation: none !important;
  }
}

.panel-queue {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100vw);
  max-width: 100%;
  z-index: 70;
  background: var(--glass-surface-3);
  border-left: 1px solid var(--glass-border-soft);
  border-radius: 18px 0 0 18px;
  display: flex;
  flex-direction: column;
  box-shadow:
    -18px 0 56px rgba(0, 0, 0, 0.14),
    -6px 0 28px rgba(0, 0, 0, 0.06),
    var(--glass-inset);
  min-height: 0;
  padding-top: env(safe-area-inset-top);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-lg));
  backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-lg));
}

.panel-queue__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 16px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  border-bottom: 1px solid var(--glass-border-soft);
  flex-shrink: 0;
  background: color-mix(in srgb, var(--glass-surface-2) 72%, transparent);
}

html.theme-dark .panel-queue__header {
  background: color-mix(in srgb, #000 28%, transparent);
}

.panel-queue__title-wrap {
  min-width: 0;
}

.panel-queue__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.2;
}

.panel-queue__subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

.panel-queue__header .panel-queue__close {
  margin-top: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  flex-shrink: 0;
  align-self: center;
}

.panel-queue__header .panel-queue__close:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

/* Panel derecho: letra */
.panel-lyrics {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  max-width: 100%;
  z-index: 71;
  background: var(--glass-surface-3);
  border-left: 1px solid var(--glass-border-soft);
  border-radius: 18px 0 0 18px;
  display: flex;
  flex-direction: column;
  box-shadow:
    -18px 0 56px rgba(0, 0, 0, 0.14),
    -6px 0 28px rgba(0, 0, 0, 0.06),
    var(--glass-inset);
  min-height: 0;
  padding-top: env(safe-area-inset-top);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-lg));
  backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-lg));
}

.panel-lyrics__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 16px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  border-bottom: 1px solid var(--glass-border-soft);
  flex-shrink: 0;
  background: color-mix(in srgb, var(--glass-surface-2) 72%, transparent);
}

html.theme-dark .panel-lyrics__header {
  background: color-mix(in srgb, #000 28%, transparent);
}

.panel-lyrics__title-wrap {
  min-width: 0;
}

.panel-lyrics__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.2;
}

.panel-lyrics__subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

.panel-lyrics__header .panel-lyrics__close {
  margin-top: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  flex-shrink: 0;
  align-self: center;
}

.panel-lyrics__header .panel-lyrics__close:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.panel-lyrics__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  -webkit-overflow-scrolling: touch;
}

.panel-lyrics__text {
  margin: 0;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.panel-lyrics__text[hidden] {
  display: none !important;
}

.panel-lyrics__empty-msg {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

.panel-lyrics__web-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.panel-lyrics__web-link:hover {
  filter: brightness(1.06);
}

.panel-lyrics__web-link:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Panel derecho: detalles y edición de canción */
.backdrop--track-editor {
  z-index: 74;
}

.panel-track-edit {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  max-width: 100%;
  z-index: 75;
  background: var(--glass-surface-3);
  border-left: 1px solid var(--glass-border-soft);
  border-radius: 18px 0 0 18px;
  display: flex;
  flex-direction: column;
  box-shadow:
    -18px 0 56px rgba(0, 0, 0, 0.14),
    -6px 0 28px rgba(0, 0, 0, 0.06),
    var(--glass-inset);
  min-height: 0;
  padding-top: env(safe-area-inset-top);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-lg));
  backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-lg));
}

.panel-track-edit__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 16px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  border-bottom: 1px solid var(--glass-border-soft);
  flex-shrink: 0;
  background: color-mix(in srgb, var(--glass-surface-2) 72%, transparent);
}

html.theme-dark .panel-track-edit__header {
  background: color-mix(in srgb, #000 28%, transparent);
}

.panel-track-edit__title-wrap {
  min-width: 0;
}

.panel-track-edit__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.2;
}

.panel-track-edit__subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

.panel-track-edit__close {
  margin-top: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  flex-shrink: 0;
  align-self: center;
}

.panel-track-edit__close:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.panel-track-edit__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: 12px;
}

.panel-track-edit__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.panel-track-edit__cover {
  width: min(240px, 72vw);
  height: min(240px, 72vw);
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--glass-border-soft);
  box-shadow: var(--glass-shadow), var(--glass-inset);
  background: var(--glass-surface-2);
}

.panel-track-edit__duration-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.panel-track-edit__duration-label {
  font-weight: 600;
  color: var(--text-muted);
}

.panel-track-edit__duration-value {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.panel-track-edit__fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-track-edit__footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px calc(18px + env(safe-area-inset-bottom));
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: calc(18px + var(--player-h) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--glass-border-soft);
  background: color-mix(in srgb, var(--glass-surface-2) 55%, transparent);
}

.panel-track-edit__lyrics-web-wrap {
  margin: 0 0 8px;
}

.panel-track-edit__lyrics-web-wrap[hidden] {
  display: none !important;
}

.panel-track-edit__lyrics-web-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.panel-track-edit__lyrics-web-link:hover {
  text-decoration: underline;
}

.panel-track-edit__lyrics-web-link:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.panel-track-edit__lyrics {
  resize: vertical;
  min-height: 140px;
  line-height: 1.45;
}

.queue-list {
  margin: 0;
  padding: 14px 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: calc(20px + var(--player-h) + env(safe-area-inset-bottom));
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  list-style: none;
}

.panel-queue .queue-list li.queue-list__item {
  align-items: center;
  overflow: visible;
}

.panel-queue .queue-list__item--panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: 'lead body actions';
  column-gap: 0;
}

.panel-queue .queue-list__item--panel .queue-list__lead {
  grid-area: lead;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 0 0 auto;
  flex-shrink: 0;
  gap: 8px;
  overflow: visible;
}

.panel-queue .queue-list__item--panel-reorder .queue-list__lead {
  min-width: 88px;
}

.panel-queue .queue-list__item--panel .queue-list__main {
  grid-area: body;
  min-width: 0;
}

.panel-queue .queue-list__item--panel .queue-list__actions {
  grid-area: actions;
}

.panel-queue .queue-list__cover {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  margin: 0;
  border-radius: 8px;
  object-fit: cover;
  background: var(--glass-surface-2);
  display: block;
}

.panel-queue .queue-list__drag.queue-list__drag-handle {
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  max-width: 32px;
  height: 48px;
  align-self: center;
  background: transparent;
  border: none;
  border-right: none;
  box-shadow: none;
}

.panel-queue .queue-list__drag .row-track__drag-icon,
.panel-queue .queue-list__drag .queue-list__svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.9;
}

.panel-queue .queue-list__track-dur {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.9;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-list li.queue-list__item {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid var(--glass-border-soft);
  background: color-mix(in srgb, var(--glass-surface-2) 58%, transparent);
  box-shadow: var(--glass-inset);
  cursor: default;
  color: var(--text);
  font-size: 14px;
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.queue-list li.queue-list__item:last-child {
  margin-bottom: 0;
}

.queue-list__drag {
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  border: none;
  border-right: 1px solid color-mix(in srgb, var(--glass-border-soft) 85%, transparent);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  color: var(--text-muted);
  font: inherit;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.queue-list__drag:active {
  cursor: grabbing;
}

.queue-list__drag .queue-list__svg {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

.queue-list__main {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.queue-list__title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.queue-list__title-row .queue-list__track-title {
  flex: 1;
  min-width: 0;
  width: auto;
}

.queue-list__offline-pin {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  opacity: 0.92;
}

.queue-list__offline-pin .ml-offline-dl-icon {
  width: 14px;
  height: 14px;
}

.queue-list__track-title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.queue-list__track-artist {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-list__track-album {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.9;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-list__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 8px 10px 8px 4px;
}

.queue-list__btn {
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--glass-border-soft) 90%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--glass-surface-3) 55%, transparent);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.queue-list__btn .queue-list__svg {
  width: 18px;
  height: 18px;
}

.queue-list__btn:hover {
  background: var(--glass-surface-2);
  color: var(--text);
  border-color: var(--glass-border-soft);
}

.queue-list__btn:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 1px;
}

.queue-list__btn.danger:hover {
  color: #c62828;
  border-color: color-mix(in srgb, #c62828 35%, var(--glass-border-soft));
  background: color-mix(in srgb, #c62828 10%, var(--glass-surface-2));
}

.queue-list__btn.is-liked,
.queue-list__btn[aria-pressed="true"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border-soft));
}

.queue-list__btn-like .card-track__like-icon {
  width: 18px;
  height: 18px;
}

.queue-list__btn.danger svg {
  width: 18px;
  height: 18px;
}

.queue-list li.queue-list__item.is-current {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--glass-border-soft));
  background: color-mix(in srgb, var(--accent) 11%, var(--glass-surface-2));
  box-shadow:
    var(--glass-inset),
    0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
}

.queue-list li.queue-list__item.is-current .queue-list__track-title {
  color: var(--accent);
}

.queue-list li.queue-list__item.is-current .queue-list__track-artist {
  color: color-mix(in srgb, var(--accent) 42%, var(--text-muted));
}

.queue-list li.queue-list__item:hover {
  border-color: color-mix(in srgb, var(--text) 14%, var(--glass-border-soft));
  background: color-mix(in srgb, var(--glass-surface-2) 88%, transparent);
}

.queue-list li.queue-list__item.queue-list__drop-before {
  box-shadow:
    inset 0 3px 0 0 var(--accent),
    var(--glass-inset);
}

body.ml-queue-dragging .panel-queue .queue-list li.queue-list__item {
  transition: none;
}

.queue-list__item--drag-source {
  opacity: 0.22;
  box-shadow: none;
}

.queue-list__drag-ghost {
  position: fixed;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--glass-border-soft));
  background: color-mix(in srgb, var(--glass-surface-2) 94%, transparent);
  opacity: 0.97;
  overflow: hidden;
  box-shadow: var(--shadow-md, 0 10px 28px rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.queue-list__drag-ghost__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 8px 10px;
  box-sizing: border-box;
}

.queue-list__drag-ghost__cover {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: var(--glass-surface-2);
}

.queue-list__drag-ghost__meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.queue-list__drag-ghost__title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-list__drag-ghost__artist {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-list__item--dragging {
  position: relative;
  z-index: 1;
}

body.ml-queue-dragging {
  user-select: none;
  -webkit-user-select: none;
}

body.ml-queue-dragging .queue-list {
  touch-action: none;
  overscroll-behavior: contain;
}

body.ml-queue-dragging .queue-list__item {
  cursor: grabbing;
}

.panel-queue .queue-list__drag.queue-list__drag-handle {
  touch-action: none;
}

.toast {
  position: fixed;
  bottom: calc(var(--player-h) + 24px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 12px 20px;
  background: var(--glass-surface-3);
  border: 1px solid var(--glass-border-soft);
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--glass-shadow), var(--glass-inset);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur));
  backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur));
}

.card-track__actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.card-track__subline {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  margin-top: 2px;
}

.card-track__subline .card-track__artist {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-track__duration {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.card-track__duration::before {
  content: "·";
  margin-right: 8px;
  margin-left: 2px;
  opacity: 0.55;
}

.grid-tracks > .card-track .card-track__duration {
  display: none;
}

.card-track__edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--glass-border-soft);
  border-radius: 999px;
  background: var(--glass-surface-3);
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: var(--glass-inset);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(8px);
  backdrop-filter: saturate(var(--glass-saturate)) blur(8px);
}

.card-track__edit-btn:hover {
  color: var(--text);
}

.card-track__edit-icon {
  width: 15px;
  height: 15px;
}

.card-track__add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--glass-border-soft));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--glass-surface-3));
  color: var(--accent);
  cursor: pointer;
  box-shadow: var(--glass-inset);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(8px);
  backdrop-filter: saturate(var(--glass-saturate)) blur(8px);
}

.card-track__queue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--glass-border-soft);
  border-radius: 999px;
  background: var(--glass-surface-3);
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: var(--glass-inset);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(8px);
  backdrop-filter: saturate(var(--glass-saturate)) blur(8px);
}

.card-track__queue-btn:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border-soft));
  background: color-mix(in srgb, var(--accent) 10%, var(--glass-surface-3));
}

.card-track__add-btn:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border-soft));
  background: color-mix(in srgb, var(--accent) 20%, var(--glass-surface-3));
}

.card-track__add-icon {
  width: 15px;
  height: 15px;
}

.card-track__queue-icon {
  width: 15px;
  height: 15px;
}

.card-track__like-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--glass-border-soft);
  border-radius: 999px;
  background: var(--glass-surface-3);
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: var(--glass-inset);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(8px);
  backdrop-filter: saturate(var(--glass-saturate)) blur(8px);
}

.card-track__like-btn:hover {
  color: var(--text);
}

.card-track__like-btn.is-liked {
  color: #e15469;
  border-color: color-mix(in srgb, #e15469 45%, var(--glass-border-soft));
  background: color-mix(in srgb, #e15469 16%, var(--glass-surface-3));
}

.card-track__like-icon {
  width: 16px;
  height: 16px;
}

.playlist-menu {
  position: fixed;
  z-index: 90;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 20px));
  max-height: min(360px, calc(100vh - 24px));
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
  border-radius: 12px;
  background: var(--glass-surface-3);
  border: 1px solid var(--glass-border-soft);
  box-shadow: var(--glass-shadow), var(--glass-inset);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur));
  backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur));
}

.playlist-menu__title {
  margin: 0 0 6px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.playlist-menu__item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

.playlist-menu__item:hover {
  background: var(--glass-surface-2);
}

.playlist-menu__item--create {
  color: var(--accent);
  font-weight: 600;
}

.panel-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 20px));
  z-index: 91;
  background: var(--glass-surface-3);
  border: 1px solid var(--glass-border-soft);
  border-radius: 14px;
  box-shadow: var(--glass-shadow), var(--glass-inset);
  -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-lg));
  backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur-lg));
  overflow: hidden;
}

/* display:flex en variantes del modal gana sobre [hidden] sin esto */
.panel-dialog[hidden],
.backdrop[hidden] {
  display: none !important;
}

.panel-dialog__header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border-soft);
}

.panel-dialog__header h2 {
  margin: 0;
  font-size: 18px;
}

.panel-dialog__body {
  padding: 14px 16px;
}

.panel-dialog__text {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.panel-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 16px 16px;
}

.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 132px;
  margin-top: 12px;
  padding: 18px 14px;
  border: 1.5px dashed var(--search-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus-within {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  color: var(--text);
}

.upload-dropzone.is-ready {
  border-style: solid;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.upload-dropzone.is-dragover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

.upload-pending {
  margin-top: 12px;
}

.upload-pending[hidden],
.upload-result-title[hidden] {
  display: none;
}

.upload-pending__title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.upload-pending-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.upload-pending-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: 13px;
  line-height: 1.35;
}

.upload-pending-list__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.upload-pending-list__meta {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.upload-result-title {
  margin: 14px 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.upload-dropzone__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.upload-dropzone__hint {
  font-size: 12px;
  line-height: 1.35;
}

.upload-result-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  max-height: 160px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.4;
}

.upload-result-list[hidden] {
  display: none;
}

.upload-result-list__item {
  padding: 6px 0;
  border-top: 1px solid var(--border-soft);
}

.upload-result-list__item:first-child {
  border-top: none;
}

.upload-result-list__item--ok {
  color: var(--text);
}

.upload-result-list__item--err {
  color: #e55353;
}

.field__hint-inline {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  font-size: 13px;
  color: var(--text-muted);
}

.field__input {
  width: 100%;
  border: 1px solid var(--glass-border-soft);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

.field__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 26%, transparent);
}

.smart-pl-btn {
  color: var(--text);
}

.smart-pl-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.smart-pl-label__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  opacity: 0.95;
}

.smart-pl-label__icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.smart-pl-label__text {
  line-height: 1.2;
}

.regular-pl-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.regular-pl-label__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  opacity: 0.95;
}

.regular-pl-label__icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.regular-pl-label__text {
  line-height: 1.2;
}

@media (max-width: 1024px) {
  .main-header {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .tabs {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .btn-library {
    justify-self: start;
  }

  .player__body {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .player__transport-bundle {
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
  }

  .player__now {
    justify-content: center;
    width: 100%;
  }

  .player__extras {
    justify-content: center;
  }

  #btnTrackMetaEdit {
    display: none !important;
  }
}

@media (max-width: 1100px) {
  /*
   * Scrollbar invisible en móvil: cobertura amplia + WebKit sin display:none
   * (Safari/iOS y algunos Chromium ignoran o fallan con display:none en ::-webkit-scrollbar).
   */
  * {
    scrollbar-width: none; /* Firefox, Chrome ≥121 */
    -ms-overflow-style: none; /* Edge legacy / IE */
  }

  *::-webkit-scrollbar {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    background: transparent;
  }

  *::-webkit-scrollbar-button {
    width: 0;
    height: 0;
    -webkit-appearance: none;
    appearance: none;
  }

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

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

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

  html,
  body {
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  html:not(.ml-mobile-ui) {
    --player-h: 104px;
  }

  .app {
    display: block;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .app__columns {
    display: block;
  }

  .app__stage {
    display: block;
  }

  .top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: stretch;
    gap: 10px;
    grid-template-columns: unset;
    min-height: 0;
  }

  .top-bar__search {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .top-bar__left {
    flex: 0 0 auto;
    flex-wrap: wrap;
    row-gap: 6px;
    max-width: 100%;
  }

  .top-bar__session {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    justify-content: flex-start;
  }

  .top-bar__session__name {
    max-width: min(112px, 26vw);
  }

  .top-bar__session__linkbtn {
    font-size: 11px;
    padding: 4px 6px;
  }

  .top-bar__right {
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .context-rail {
    display: none;
  }

  .context-rail-resizer {
    display: none;
  }

  .sidebar {
    display: none;
  }

  .main-wrap {
    min-height: calc(100dvh - var(--player-h));
    border-radius: 0;
    border: none;
    overflow: visible;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .main {
    padding: 10px 10px calc(var(--player-h) + 12px);
    overflow: visible;
  }

  .main-scroll,
  .album-grid-scroll {
    flex: 0 0 auto;
    overflow: visible;
    padding-bottom: 8px;
  }

  .main-header {
    gap: 8px;
  }

  .main-title {
    font-size: 20px;
    line-height: 1.1;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    white-space: nowrap;
  }

  .btn-shuffle {
    width: 100%;
    justify-content: center;
  }

  html:not(.ml-mobile-ui) .grid-tracks {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  html:not(.ml-mobile-ui) .grid-tracks .card-track {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    min-height: 0;
    border-radius: 10px;
  }

  html:not(.ml-mobile-ui) .grid-tracks .card-track::before {
    content: none;
    display: none;
  }

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

  .player {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 4px;
    align-items: center;
    padding-top: 4px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0) + 4px);
    /* Debajo de .backdrop (60), paneles (64–75), menús y diálogos (90+); antes estaba en 9999 y tapaba todo */
    z-index: 50;
  }

  html:not(.ml-mobile-ui) .player__body {
    display: contents;
  }

  .player__progress-wrap {
    grid-column: 2;
    grid-row: 1;
    gap: 6px;
    padding: 0 6px 2px;
    min-width: 0;
  }

  .player__time {
    font-size: 11px;
    min-width: 34px;
  }

  html:not(.ml-mobile-ui) .player__now {
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: stretch;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    width: auto;
    min-width: 0;
    padding-right: 2px;
  }

  #btnPlayerLyrics {
    display: none !important;
  }

  html:not(.ml-mobile-ui) #btnNowPlayingMeta {
    display: none !important;
  }

  #btnShuffle {
    display: inline-flex !important;
    flex-shrink: 0;
  }

  /* Libera espacio en la fila de transporte: el aleatorio no queda recortado */
  #btnOfflineTrack {
    display: none !important;
  }

  body.ml-np-chrome-elevated .now-playing__transport #btnOfflineTrack {
    display: inline-flex !important;
  }

  html:not(.ml-mobile-ui) .player__transport-bundle {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  html:not(.ml-mobile-ui) .player__transport-bundle::-webkit-scrollbar {
    display: none;
  }

  html:not(.ml-mobile-ui) .player__controls,
  html:not(.ml-mobile-ui) .player__extras {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
  }

  html:not(.ml-mobile-ui) footer.player .player__extras .vol {
    display: none;
  }

  html:not(.ml-mobile-ui) .player__art-open {
    align-self: stretch;
    display: flex;
    align-items: center;
    padding: 0;
  }

  html:not(.ml-mobile-ui) .player__thumb-art-wrap {
    width: min(56px, calc(var(--player-h) - 36px));
    height: min(56px, calc(var(--player-h) - 36px));
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .player__cover,
  .player__thumb-art {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: inherit;
  }

  .player__controls {
    gap: 2px;
  }

  .ctrl-btn {
    width: 36px;
    height: 36px;
  }

  .ctrl-play__ring {
    width: 46px;
    height: 46px;
  }

  body.ml-np-chrome-elevated .player {
    display: block;
  }

  body.ml-np-chrome-elevated .player__body {
    display: block;
  }

  .panel-queue {
    width: min(430px, 100vw);
    border-radius: 14px 0 0 14px;
  }

  .panel-lyrics {
    width: min(420px, 100vw);
    border-radius: 14px 0 0 14px;
  }

  .panel-track-edit {
    width: min(430px, 100vw);
    border-radius: 14px 0 0 14px;
  }

  .toast {
    width: calc(100vw - 18px);
    text-align: center;
    bottom: calc(var(--player-h) + 14px);
  }
}

@media (max-width: 560px) {
  html:not(.ml-mobile-ui) {
    --player-h: 108px;
  }

  .grid-albums {
    grid-template-columns: 1fr;
  }

  .row-track {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
  }

  .row-track--editable {
    grid-template-columns: 22px 42px minmax(0, 1fr) max-content;
  }

  .row-track--queue-actions {
    grid-template-columns: 42px minmax(0, 1fr) max-content;
  }

  .row-track__drag-handle {
    width: 22px;
    height: 42px;
  }

  .row-track__cover {
    width: 42px;
    height: 42px;
  }

  .row-track__genre,
  .row-track__dur {
    display: none;
  }

  .row-track__actions {
    gap: 2px;
    min-width: 0;
    justify-self: end;
    white-space: nowrap;
  }

  .row-track__action {
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }

  .row-track__action svg {
    width: 16px;
    height: 16px;
  }

  html:not(.ml-mobile-ui) .player__thumb-art-wrap {
    width: min(58px, calc(var(--player-h) - 36px));
    height: min(58px, calc(var(--player-h) - 36px));
  }

  html:not(.ml-mobile-ui) .ctrl-btn {
    width: 34px;
    height: 34px;
  }

  html:not(.ml-mobile-ui) .ctrl-play__ring {
    width: 42px;
    height: 42px;
  }

  /* Repetir oculto por espacio; aleatorio sigue en #btnShuffle */
  html:not(.ml-mobile-ui) #btnRepeat {
    display: none;
  }

  .panel-dialog {
    width: calc(100vw - 12px);
  }

  .playlist-menu {
    min-width: 0;
    width: calc(100vw - 16px);
  }
}

@media (prefers-reduced-transparency: reduce) {
  body::before {
    opacity: 0.4;
  }

  .sidebar,
  .main-wrap,
  .player,
  .sidebar__search,
  .nav-item--active,
  .btn-library,
  .btn-shuffle,
  .card-track,
  .row-track:hover,
  .btn-load-more,
  .card-pl,
  .icon-btn-sm,
  .player__progress,
  .ctrl-play__ring,
  .panel-queue,
  .panel-lyrics,
  .panel-track-edit,
  .toast,
  .theme-toggle__switch {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .sidebar {
    background: var(--bg-sidebar);
    box-shadow: none;
  }

  .main-wrap {
    background: var(--bg-page);
  }

  .sidebar__search {
    background: var(--surface);
    border-color: var(--search-border);
  }

  .nav-item--active {
    background: var(--bg-sidebar-active);
    box-shadow: none;
  }

  .btn-library {
    background: var(--surface);
    border-color: var(--border-soft);
  }

  .card-track,
  .card-pl {
    background: var(--bg-elevated);
    border-color: var(--border-soft);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }

  .row-track:hover {
    background: var(--hover-row);
    box-shadow: none;
  }

  .btn-load-more,
  .icon-btn-sm {
    background: var(--surface);
    border-color: var(--border-soft);
    box-shadow: none;
  }

  .btn-shuffle {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
  }

  .player {
    background: var(--player-bg);
    box-shadow: none;
  }

  html.theme-dark .player {
    box-shadow: none;
  }

  .player__progress {
    background: var(--progress-track);
    border: none;
    box-shadow: none;
  }

  html.theme-dark .player__progress {
    background: var(--progress-track);
  }

  .ctrl-play__ring {
    background: var(--ring-inner);
    box-shadow: inset 0 0 0 3px var(--accent-ring);
  }

  .panel-queue {
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.12);
  }

  .panel-queue,
  .panel-lyrics,
  .panel-track-edit,
  .toast {
    background: var(--surface);
    border-color: var(--border-soft);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  }

  .theme-toggle__switch {
    background: var(--toggle-track-off);
    border: none;
    box-shadow: none;
  }

  .theme-toggle__switch[aria-checked="true"] {
    border-color: transparent;
  }

  .queue-list li.queue-list__item:hover {
    background: var(--hover-row);
  }

  html.theme-dark .toast,
  html.theme-dark .panel-queue,
  html.theme-dark .panel-lyrics,
  html.theme-dark .panel-track-edit {
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.4);
  }
}

html[data-youtube-nav='0'] [data-route='youtube'] {
  display: none !important;
}

html[data-albums-nav='0'] [data-route='albums'] {
  display: none !important;
}

html[data-artists-nav='0'] [data-route='artists'] {
  display: none !important;
}

html[data-mobile-queue-nav='0'] [data-route='queue'] {
  display: none !important;
}

/* —— Inicio / descubrimiento —— */
.home-view {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 4px;
}

.view:has(.home-view) {
  padding-bottom: 4px;
}

.home-greeting {
  margin-top: 4px;
}

.home-greeting__title {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.home-greeting__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.home-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.home-section__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.home-section__subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.home-section__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.home-section__play-all,
.home-section__more {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.home-carousel {
  display: flex;
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.home-carousel .card-track--home {
  display: flex;
  flex-direction: column;
  flex: 0 0 min(200px, 42vw);
  width: min(200px, 42vw);
  min-height: 0;
  scroll-snap-align: start;
}

.home-carousel .card-track--home .card-track__cover {
  flex-shrink: 0;
}

.home-carousel .card-track--home .card-track__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.home-carousel .card-track--home .card-track__actions {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0 14px 14px;
  flex-wrap: nowrap;
  gap: 6px;
}

.home-carousel .card-track--home .card-track__meta {
  display: none;
}

.home-carousel .card-track--home .card-track__subline .card-track__duration {
  display: inline;
}

.home-carousel__sentinel {
  flex: 0 0 1px;
  width: 1px;
  min-width: 1px;
  height: 1px;
  align-self: stretch;
  pointer-events: none;
  visibility: hidden;
}

@media (min-width: 1101px) {
  .home-carousel .card-track--home {
    flex-basis: 196px;
    width: 196px;
  }
}

/* Mis listas (Inicio): misma tarjeta que canciones, mosaico sin acciones */
.home-section--playlists {
  margin-top: 4px;
  padding-bottom: 0;
}

.home-carousel--playlists {
  padding-bottom: 2px;
}

.home-carousel--playlists .card-track--playlist {
  display: flex;
  flex-direction: column;
  flex: 0 0 min(200px, 42vw);
  width: min(200px, 42vw);
  min-height: 0;
  scroll-snap-align: start;
}

.home-carousel--playlists .card-track--playlist .card-track__cover {
  flex-shrink: 0;
}

.home-carousel--playlists .card-track--playlist .card-track__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  padding-bottom: 14px;
}

.home-pl-mosaic {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
  background: var(--cover-placeholder, #1a1a1a);
}

.home-pl-mosaic--single {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.home-pl-mosaic__cell {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--cover-placeholder, #222) 70%, #111);
}

.home-pl-mosaic__cell--empty {
  background: color-mix(in srgb, var(--cover-placeholder, #1c1c1c) 85%, #000);
}

.home-pl-mosaic__cell img,
.home-pl-mosaic__fallback {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-pl-mosaic--empty .home-pl-mosaic__fallback {
  position: absolute;
  inset: 0;
  opacity: 0.55;
}

@media (min-width: 1101px) {
  .home-carousel--playlists .card-track--playlist {
    flex-basis: 196px;
    width: 196px;
  }
}

/* Now Playing PC: vinilo arriba, detalles, controles sin fondo (aprovecha altura) */
@media (min-width: 769px) {
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
    gap: clamp(14px, 2vh, 24px) !important;
    padding: clamp(22px, 2.6vh, 32px) clamp(28px, 3.5vw, 48px) clamp(20px, 2.2vh, 28px) !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__inner > .now-playing__meta-actions {
    display: none !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__disc-wrap {
    grid-area: unset !important;
    flex: 0 0 auto !important;
    width: min(40vh, 320px) !important;
    max-width: min(70%, 320px) !important;
    margin: 0 auto !important;
    justify-self: center !important;
    align-items: center !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__disc {
    max-width: none !important;
    max-height: none !important;
    width: 100% !important;
    height: 100% !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__info {
    grid-area: unset !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    text-align: center !important;
    gap: 6px !important;
    overflow: visible !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__title-row {
    justify-content: center !important;
    max-width: 640px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__title-row .now-playing__song,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__artist,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__album,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__meta-line {
    text-align: center !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__artist,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__album,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__meta-line {
    max-width: 640px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__title-row .now-playing__song {
    font-size: clamp(1.4rem, 2.1vw, 1.95rem) !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport {
    margin-top: auto !important;
    width: 100% !important;
    max-width: none !important;
    align-self: stretch !important;
    padding: 18px 4px 6px !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    gap: 1.15rem !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__progress-wrap,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__transport-bundle,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__extras,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .vol {
    width: 100% !important;
    max-width: none !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__transport-bundle {
    gap: 1.1rem !important;
  }

  /* Progreso más legible */
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__progress-wrap {
    gap: 14px !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__time {
    font-size: 0.9rem !important;
    min-width: 3rem !important;
    font-weight: 600 !important;
    color: color-mix(in srgb, var(--text) 78%, transparent) !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__progress {
    min-height: 7px !important;
    height: 7px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--text) 16%, transparent) !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__progress-fill {
    border-radius: 999px !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__thumb {
    width: 18px !important;
    height: 18px !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent) !important;
  }

  /* Una sola fila a todo el ancho de la barra de progreso */
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__transport-bundle {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: none !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex: 1 1 auto !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnShuffle,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnPrev,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnPlay,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnNext,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnRepeat,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnPlayerLike,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnPlayerAddToPlaylist,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnOfflineTrack,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnQueue,
  html:not(.ml-mobile-ui).ml-np-queue-docked body.ml-np-chrome-elevated .now-playing__transport #btnPlayerLike,
  html:not(.ml-mobile-ui).ml-np-queue-docked body.ml-np-chrome-elevated .now-playing__transport #btnPlayerAddToPlaylist,
  html:not(.ml-mobile-ui).ml-np-queue-docked body.ml-np-chrome-elevated .now-playing__transport #btnOfflineTrack {
    grid-column: unset !important;
    grid-row: unset !important;
  }

  /* Con cola visible a la derecha: el botón cola no hace falta */
  html:not(.ml-mobile-ui).ml-np-queue-docked body.ml-np-chrome-elevated .now-playing__transport #btnQueue {
    display: none !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__extras {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex: 0 0 clamp(160px, 18vw, 240px) !important;
    width: clamp(160px, 18vw, 240px) !important;
    max-width: 240px !important;
    min-width: 140px !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 2 !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .vol {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .vol .icon {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
    opacity: 0.9 !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .vol input[type='range'] {
    height: 7px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls .ctrl-btn {
    width: 54px !important;
    height: 54px !important;
    flex: 0 0 auto !important;
    border-radius: 14px !important;
    color: color-mix(in srgb, var(--text) 92%, transparent) !important;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls .ctrl-btn:hover {
    background: color-mix(in srgb, var(--text) 10%, transparent) !important;
    color: var(--text) !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls .ctrl-btn .icon {
    width: 26px !important;
    height: 26px !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls .ctrl-repeat {
    width: 26px !important;
    height: 26px !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls .ctrl-like__icon,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls .ml-offline-dl-icon {
    width: 24px !important;
    height: 24px !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls .ctrl-play {
    flex: 0 0 auto !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls .ctrl-play__ring {
    width: 78px !important;
    height: 78px !important;
    box-shadow: 0 8px 28px color-mix(in srgb, var(--accent) 42%, transparent) !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport .player__controls .ctrl-play__icon {
    width: 32px !important;
    height: 32px !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnPrev,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnNext {
    width: 58px !important;
    height: 58px !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnPrev .icon,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnNext .icon {
    width: 28px !important;
    height: 28px !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnShuffle[aria-pressed='true'],
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnRepeat[aria-pressed='true'],
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnRepeat[data-mode='all'],
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__transport #btnRepeat[data-mode='one'] {
    color: var(--accent) !important;
    background: color-mix(in srgb, var(--accent) 16%, transparent) !important;
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 48%, transparent) !important;
  }
}

@media (min-width: 1200px) {
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__inner {
    grid-template-columns: none !important;
    gap: clamp(18px, 2.4vh, 32px) !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__disc-wrap,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__disc {
    max-width: min(42vh, 340px) !important;
    width: min(42vh, 340px) !important;
    max-height: none !important;
  }
}

@media (min-width: 769px) and (max-width: 1099px) {
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__inner {
    grid-template-columns: none !important;
    max-width: 720px !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__disc-wrap {
    width: min(34vh, 240px) !important;
    max-width: min(56%, 240px) !important;
  }
}

/* Ocultar editar metadatos en Now Playing (sigue en la barra inferior) */
body.ml-np-chrome-elevated .now-playing__meta-actions,
body.ml-np-chrome-elevated .player__edit-track--now-playing,
body.ml-np-chrome-elevated #btnTrackMetaEdit {
  display: none !important;
}

/* PC: reproductor y cola con el mismo alto (llenan el viewport) */
@media (min-width: 769px) {
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    height: 100% !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__inner,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock {
    align-self: stretch !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__inner {
    flex: 1 1 auto !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 clamp(300px, 30vw, 400px) !important;
    width: clamp(300px, 30vw, 400px) !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .panel-queue,
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .panel-queue--np-docked {
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock .queue-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
}

@media (min-width: 769px) and (max-width: 1099px) {
  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing {
    flex-direction: column !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__inner {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 920px !important;
    height: auto !important;
  }

  html:not(.ml-mobile-ui) body.ml-np-chrome-elevated .now-playing__queue-dock {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: 920px !important;
    min-height: 280px !important;
  }
}
