/*!
 * Sticky Player — estilos. Personalizable mediante las variables --sp-*.
 * Skins: atributo data-sp-skin en .sp-root (ver «Skins» al final del bloque de variables y el README).
 */

/* ------------------------------------------------------------------ variables (skin «dark-pink», el original) */

.sp-root,
.sp-dock {
  --sp-accent: #ff1f4b;
  --sp-accent-soft: #ff7d97;
  --sp-accent-glow: rgba(255, 31, 75, .55);   /* anillo de foco */
  --sp-accent-faint: rgba(255, 31, 75, .25);  /* pista del indicador de carga */
  --sp-on-accent: #fff;                        /* texto sobre el acento */
  --sp-bg: #222224;                            /* barra y cabeceras */
  --sp-bg-2: #1a1a1b;                          /* cajón de pistas/listas */
  --sp-bg-3: #2a2a2c;                          /* hover de filas, fondo del scroll */
  --sp-ink: #0b0b0c;                           /* título, menús, buscador, pista activa */
  --sp-line: #343437;                          /* bordes */
  --sp-text: #d6d6d9;
  --sp-muted: #9b9ba1;
  --sp-strong: #fff;                           /* títulos e iconos en hover */
  --sp-focus: #fff;                            /* contorno de foco */
  --sp-thumb: #fff;                            /* tirador de progreso y volumen */
  --sp-surface: #262628;                       /* opciones de menú y separadores de filas */
  --sp-button: #2c2c2e;                        /* botones secundarios */
  --sp-field: #18181a;                         /* campo del enlace para compartir */
  --sp-row-alt: rgba(255, 255, 255, .018);     /* filas alternas */
  --sp-mark: #6f6f75;
  --sp-faint: #7b7b82;
  --sp-tag-line: #45454b;
  --sp-tag-text: #a6a6ae;
  --sp-placeholder: #8a8a90;
  --sp-card-hover: #555;
  --sp-card-info: rgba(8, 8, 9, .86);
  --sp-card-strong: #fff;
  --sp-strike: rgba(255, 125, 151, .6);
  --sp-cover-bg: linear-gradient(135deg, #3a0d1c, #1b1b1d);
  --sp-shadow: 0 -6px 24px rgba(0, 0, 0, .35);
  --sp-pop-shadow: 0 10px 28px rgba(0, 0, 0, .6);
  --sp-float-shadow: 0 18px 50px rgba(0, 0, 0, .6);
  --sp-bar-h: 92px;
  --sp-drawer-h: min(460px, 58vh);
}

/* ------------------------------------------------------------------ skins
 * Cada skin solo redefine variables. Para añadir uno: copia un bloque, cambia el nombre en
 * data-sp-skin y regístralo en JavaScript con StickyPlayer.registerSkin({ id, label, swatch }).
 */

:is(.sp-root, .sp-dock)[data-sp-skin="dark-blue"] {
  --sp-accent: #4c9aff;
  --sp-accent-soft: #93c0ff;
  --sp-accent-glow: rgba(76, 154, 255, .55);
  --sp-accent-faint: rgba(76, 154, 255, .25);
  --sp-on-accent: #06101f;
  --sp-bg: #1f2228;
  --sp-bg-2: #181a1f;
  --sp-bg-3: #282c34;
  --sp-ink: #0a0c10;
  --sp-line: #323844;
  --sp-text: #d5dae2;
  --sp-muted: #98a2b1;
  --sp-surface: #232731;
  --sp-button: #2a2f3a;
  --sp-field: #14171c;
  --sp-mark: #6b7482;
  --sp-faint: #7a8494;
  --sp-tag-line: #414958;
  --sp-tag-text: #a5aebc;
  --sp-placeholder: #8790a0;
  --sp-card-hover: #4f5a6c;
  --sp-card-info: rgba(7, 9, 13, .86);
  --sp-strike: rgba(147, 192, 255, .6);
  --sp-cover-bg: linear-gradient(135deg, #0d2442, #1a1d23);
}

:is(.sp-root, .sp-dock)[data-sp-skin="light"] {
  --sp-accent: #d0104a;
  --sp-accent-soft: #b4003c;
  --sp-accent-glow: rgba(208, 16, 74, .35);
  --sp-accent-faint: rgba(208, 16, 74, .2);
  --sp-on-accent: #fff;
  --sp-bg: #f6f7f9;
  --sp-bg-2: #ffffff;
  --sp-bg-3: #eceff3;
  --sp-ink: #e6e9ee;
  --sp-line: #d3d8df;
  --sp-text: #262a31;
  --sp-muted: #59606b;
  --sp-strong: #0f1115;
  --sp-focus: #0f1115;
  --sp-thumb: #0f1115;
  --sp-surface: #f8f9fb;
  --sp-button: #e0e4ea;
  --sp-field: #ffffff;
  --sp-row-alt: rgba(15, 20, 30, .03);
  --sp-mark: #8b929d;
  --sp-faint: #69707c;
  --sp-tag-line: #c3c9d1;
  --sp-tag-text: #4a515c;
  --sp-placeholder: #6b727e;
  --sp-card-hover: #9aa2ad;
  --sp-card-info: rgba(255, 255, 255, .92);
  --sp-card-strong: #0f1115;
  --sp-strike: rgba(208, 16, 74, .55);
  --sp-cover-bg: linear-gradient(135deg, #ffd3de, #eef0f3);
  --sp-shadow: 0 -6px 24px rgba(15, 20, 30, .12);
  --sp-pop-shadow: 0 10px 28px rgba(15, 20, 30, .18);
  --sp-float-shadow: 0 18px 50px rgba(15, 20, 30, .25);
}

:is(.sp-root, .sp-dock)[data-sp-skin="graphite-emerald"] {
  --sp-accent: #10b981;
  --sp-accent-soft: #6ee7b7;
  --sp-accent-glow: rgba(16, 185, 129, .55);
  --sp-accent-faint: rgba(16, 185, 129, .25);
  --sp-on-accent: #03140d;
  --sp-bg: #2b2e31;
  --sp-bg-2: #232528;
  --sp-bg-3: #35393d;
  --sp-ink: #17191b;
  --sp-line: #3e4246;
  --sp-text: #dfe3e6;
  --sp-muted: #a3a9ae;
  --sp-surface: #2f3236;
  --sp-button: #393d42;
  --sp-field: #1d1f22;
  --sp-mark: #777d83;
  --sp-faint: #858b91;
  --sp-tag-line: #4e5359;
  --sp-tag-text: #aeb4b9;
  --sp-placeholder: #90969c;
  --sp-card-hover: #5d646b;
  --sp-card-info: rgba(16, 17, 19, .86);
  --sp-strike: rgba(110, 231, 183, .6);
  --sp-cover-bg: linear-gradient(135deg, #0b3a2c, #232528);
}

:is(.sp-root, .sp-dock)[data-sp-skin="dark-amber"] {
  --sp-accent: #f5a524;
  --sp-accent-soft: #fcd38a;
  --sp-accent-glow: rgba(245, 165, 36, .55);
  --sp-accent-faint: rgba(245, 165, 36, .25);
  --sp-on-accent: #1a1204;
  --sp-bg: #23211e;
  --sp-bg-2: #1b1917;
  --sp-bg-3: #2d2a26;
  --sp-ink: #0d0c0b;
  --sp-line: #3a3631;
  --sp-text: #ddd8d0;
  --sp-muted: #a49e94;
  --sp-surface: #292622;
  --sp-button: #312d29;
  --sp-field: #181614;
  --sp-mark: #79736a;
  --sp-faint: #877f75;
  --sp-tag-line: #4d4740;
  --sp-tag-text: #b0a99e;
  --sp-placeholder: #918a80;
  --sp-card-hover: #645c52;
  --sp-card-info: rgba(10, 9, 8, .86);
  --sp-strike: rgba(252, 211, 138, .6);
  --sp-cover-bg: linear-gradient(135deg, #43290a, #1d1b18);
}

/* ------------------------------------------------------------------ base */

.sp-root {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  font: 14px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--sp-text);
  pointer-events: none;
}
.sp-root > * { pointer-events: auto; }
.sp-root [hidden], .sp-dock[hidden], .sp-dock [hidden] { display: none !important; }
.sp-root *, .sp-root *::before, .sp-root *::after,
.sp-dock, .sp-dock * { box-sizing: border-box; }
.sp-root button, .sp-dock button { font-family: inherit; line-height: inherit; color: inherit; }

body.sp-reserve-space { padding-bottom: var(--sp-height, 92px); }

.sp-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sp-icon { width: 1em; height: 1em; display: block; flex: none; }

/* ------------------------------------------------------------------ botones */

.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  transition: color .15s, background-color .15s, transform .1s;
}
.sp-btn:disabled { opacity: .3; cursor: default; }
.sp-btn:not(:disabled):active { transform: scale(.94); }

.sp-root :focus-visible,
.sp-dock :focus-visible {
  outline: 2px solid var(--sp-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--sp-accent-glow);
}
.sp-root :focus:not(:focus-visible) { outline: none; }

/* ------------------------------------------------------------------ video */

.sp-video {
  position: relative;
  align-self: flex-end;
  width: min(480px, calc(100vw - 32px), calc(34vh * 16 / 9));
  aspect-ratio: 16 / 9;
  margin: 0 16px 54px;
  background: #000;
  border: 1px solid var(--sp-line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
}
.sp-media { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; cursor: pointer; }
.sp-yt, .sp-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Franja superior con «Reducir el video a la miniatura» (fuera del área del video) y caja del video. */
.sp-root .sp-video { display: flex; flex-direction: column; aspect-ratio: auto; }
.sp-video-head { display: flex; justify-content: flex-end; flex: none; height: 30px; background: var(--sp-ink); border-bottom: 1px solid var(--sp-line); }
.sp-video-box { position: relative; flex: none; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.sp-hide-video { width: 30px; height: 29px; font-size: 18px; border-radius: 0; color: var(--sp-strong); }
.sp-hide-video:hover { background: var(--sp-accent); color: var(--sp-on-accent); }
.sp-actions .sp-show-video { color: var(--sp-accent); }

/* ------------------------------------------------------------------ barra */

.sp-shell {
  position: relative;
  background: var(--sp-bg);
  border-top: 1px solid var(--sp-line);
  box-shadow: var(--sp-shadow);
}

.sp-collapse {
  position: absolute;
  right: 0;
  top: -30px;
  width: 30px;
  height: 30px;
  font-size: 16px;
  border-radius: 3px 0 0 0;
  background: var(--sp-ink);
  color: var(--sp-accent);
}
.sp-collapse:hover { color: var(--sp-on-accent); background: var(--sp-accent); }

.sp-bar {
  display: grid;
  grid-template-columns: var(--sp-bar-h) auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--sp-bar-h);
}

.sp-cover {
  position: relative;
  width: var(--sp-bar-h);
  height: var(--sp-bar-h);
  overflow: hidden;
  background: var(--sp-cover-bg);
}
.sp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-cover:not(.has-img) img { display: none; }
.sp-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: var(--sp-accent);
}
.sp-cover.has-img .sp-cover-fallback { display: none; }

.sp-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 14px;
}
.sp-controls .sp-btn { color: var(--sp-accent); }
.sp-controls .sp-btn:not(:disabled):hover { color: var(--sp-strong); }
.sp-prev, .sp-next { font-size: 24px; }
.sp-play { position: relative; width: 50px; height: 50px; font-size: 36px; }

.sp-spinner {
  position: absolute;
  inset: 8px;
  border: 3px solid var(--sp-accent-faint);
  border-top-color: var(--sp-accent);
  border-radius: 50%;
  animation: sp-spin .8s linear infinite;
  display: none;
}
.sp-root.is-loading .sp-play .sp-spinner { display: block; }
.sp-root.is-loading .sp-play .sp-icon { transform: scale(.45); }
@keyframes sp-spin { to { transform: rotate(360deg); } }

.sp-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 8px 16px;
  border-left: 1px solid var(--sp-line);
  align-self: stretch;
}

.sp-title { min-width: 0; }
.sp-title-text {
  display: block;
  padding: 5px 10px;
  background: var(--sp-ink);
  color: var(--sp-strong);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-status {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--sp-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-root.is-error .sp-status { color: var(--sp-accent-soft); }

.sp-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sp-time {
  flex: none;
  min-width: 38px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--sp-muted);
}
.sp-time-duration { text-align: right; }

/* Rangos (progreso y volumen) */
.sp-range {
  --sp-fill: 0%;
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.sp-range:disabled { cursor: default; opacity: .5; }
.sp-range::-webkit-slider-runnable-track {
  height: 8px;
  background: linear-gradient(to right, var(--sp-accent) var(--sp-fill), var(--sp-ink) var(--sp-fill));
}
.sp-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 4px;
  height: 14px;
  margin-top: -3px;
  border: 0;
  border-radius: 1px;
  background: var(--sp-thumb);
}
.sp-range::-moz-range-track { height: 8px; background: var(--sp-ink); border: 0; }
.sp-range::-moz-range-progress { height: 8px; background: var(--sp-accent); }
.sp-range::-moz-range-thumb { width: 4px; height: 14px; border: 0; border-radius: 1px; background: var(--sp-thumb); }
.sp-range:focus-visible { box-shadow: none; outline-offset: 0; }

.sp-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-left: 1px solid var(--sp-line);
  align-self: stretch;
}
.sp-actions, .sp-actions-main, .sp-actions-extra, .sp-actions-float { display: flex; gap: 4px; }
.sp-actions .sp-btn, .sp-mute, .sp-mute-alt { color: var(--sp-muted); }
.sp-actions .sp-btn:not(:disabled):hover, .sp-mute:hover, .sp-mute-alt:hover { color: var(--sp-strong); }
.sp-actions .sp-btn.is-on, .sp-actions .sp-btn.is-open { color: var(--sp-accent); }
.sp-timer { position: relative; }
.sp-badge {
  position: absolute;
  top: -1px;
  right: -5px;
  min-width: 18px;
  height: 15px;
  padding: 0 3px;
  border-radius: 8px;
  background: var(--sp-accent);
  color: var(--sp-on-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  pointer-events: none;
}
.sp-volume { position: relative; display: flex; align-items: center; gap: 6px; }
.sp-vol-pop { display: flex; align-items: center; gap: 6px; }
.sp-mute, .sp-mute-alt { width: 30px; height: 30px; font-size: 20px; }
.sp-mute-alt { display: none; }
.sp-vol { width: 200px; flex: none; }

/* ------------------------------------------------------------------ visualizador */

.sp-viz {
  position: absolute;
  left: 0;
  bottom: 100%;
  width: 100%;
  height: 46px;
  pointer-events: none;
}

/* ------------------------------------------------------------------ menús emergentes */

.sp-pop {
  position: absolute;
  right: 40px;
  bottom: calc(100% + 8px);
  z-index: 2;
  width: 300px;
  max-width: calc(100vw - 16px);
  padding: 12px;
  background: var(--sp-ink);
  border: 1px solid var(--sp-line);
  box-shadow: var(--sp-pop-shadow);
  font-size: 13px;
}
.sp-pop.sp-pop-below { bottom: auto; }
.sp-pop-title { margin: 0 0 10px; color: var(--sp-strong); font-weight: 700; }
.sp-pop-note { margin: 8px 0 0; color: var(--sp-muted); font-size: 12px; }
.sp-pop-note:empty { display: none; }
.sp-pop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sp-pop-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 3px;
  background: var(--sp-surface);
  color: var(--sp-text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.sp-pop-item .sp-icon { font-size: 15px; }
.sp-pop-item:hover { background: var(--sp-accent); color: var(--sp-on-accent); }
.sp-pop-wide { width: 100%; margin-top: 6px; }
.sp-pop-cancel { background: transparent; border: 1px solid var(--sp-accent); color: var(--sp-accent-soft); }
.sp-share-url {
  width: 100%;
  height: 32px;
  margin-bottom: 8px;
  padding: 0 8px;
  border: 1px solid var(--sp-line);
  border-radius: 2px;
  background: var(--sp-field);
  color: var(--sp-strong);
  font: inherit;
  font-size: 12px;
}
.sp-share-at { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--sp-text); cursor: pointer; }
.sp-share-at input { accent-color: var(--sp-accent); }

/* Selector de skin */
.sp-skin-list { display: grid; gap: 6px; }
.sp-skin-item { width: 100%; }
.sp-skin-item[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--sp-accent); }
.sp-skin-item[aria-pressed="true"]:hover { box-shadow: none; }
.sp-swatch {
  display: inline-flex;
  flex: none;
  width: 30px;
  height: 18px;
  overflow: hidden;
  border: 1px solid var(--sp-line);
  border-radius: 3px;
}
.sp-swatch i { flex: 1; }
.sp-skin-check { margin-left: auto; font-size: 13px; }
.sp-skin-item:not([aria-pressed="true"]) .sp-skin-check { visibility: hidden; }

/* ------------------------------------------------------------------ cajón (pistas / listas) */

.sp-drawer {
  background: var(--sp-bg-2);
  border-top: 1px solid var(--sp-line);
}
.sp-view { display: flex; flex-direction: column; max-height: var(--sp-drawer-h); }
.sp-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--sp-line);
  background: var(--sp-bg);
}
.sp-view-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--sp-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-close-view { color: var(--sp-accent); font-size: 22px; }
.sp-close-view:hover { color: var(--sp-strong); }
.sp-view-msg { margin: 0; padding: 18px 16px; color: var(--sp-muted); list-style: none; }

.sp-tracklist,
.sp-cards {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--sp-accent) var(--sp-bg-3);
}
.sp-tracklist::-webkit-scrollbar, .sp-cards::-webkit-scrollbar { width: 8px; }
.sp-tracklist::-webkit-scrollbar-track, .sp-cards::-webkit-scrollbar-track { background: var(--sp-bg-3); }
.sp-tracklist::-webkit-scrollbar-thumb, .sp-cards::-webkit-scrollbar-thumb { background: var(--sp-accent); }

.sp-track {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 16px 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--sp-surface);
  background: transparent;
  text-align: left;
  color: var(--sp-muted);
  cursor: pointer;
}
.sp-tracklist li:nth-child(even) .sp-track { background: var(--sp-row-alt); }
.sp-track:hover { background: var(--sp-bg-3) !important; color: var(--sp-text); }
.sp-track strong { color: var(--sp-text); font-weight: 700; }
.sp-track-mark { font-size: 14px; color: var(--sp-mark); }
.sp-track-num { flex: none; font-variant-numeric: tabular-nums; }
.sp-track-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-track-badge, .sp-track-err { font-size: 15px; color: var(--sp-faint); }
.sp-track-err { color: var(--sp-accent-soft); }
.sp-track-tag {
  flex: none;
  padding: 1px 5px;
  border: 1px solid var(--sp-tag-line);
  border-radius: 2px;
  color: var(--sp-tag-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.sp-view-msg.is-error { color: var(--sp-accent-soft); }
.sp-retry {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 4px 10px;
  border: 0;
  border-radius: 3px;
  background: var(--sp-button);
  color: var(--sp-strong);
  font: inherit;
  cursor: pointer;
}
.sp-retry:hover { background: var(--sp-accent); color: var(--sp-on-accent); }

.sp-addbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 22px 0; }
.sp-addform { display: flex; flex: 1 1 420px; gap: 6px; min-width: 0; }
.sp-add-url, .sp-add-type {
  height: 34px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--sp-line);
  border-radius: 2px;
  background: var(--sp-ink);
  color: var(--sp-strong);
  font: inherit;
}
.sp-add-url { flex: 1 1 200px; }
.sp-add-type { flex: 0 1 190px; }
.sp-addbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 2px;
  background: var(--sp-button);
  color: var(--sp-strong);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.sp-addbtn:hover { background: var(--sp-accent); color: var(--sp-on-accent); }
.sp-addbtn .sp-icon { font-size: 16px; }
.sp-add-msg { flex-basis: 100%; min-height: 1.2em; margin: 0; font-size: 12px; color: var(--sp-muted); }
.sp-view-playlists.is-drop { outline: 2px dashed var(--sp-accent); outline-offset: -6px; }
.sp-track-dur { flex: none; min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.sp-track.is-active { background: var(--sp-ink) !important; color: var(--sp-strong); }
.sp-track.is-active strong { color: var(--sp-strong); }
.sp-track.is-active .sp-track-mark { color: var(--sp-accent); }
.sp-track.is-error .sp-track-name { text-decoration: line-through; text-decoration-color: var(--sp-strike); }

.sp-view-foot {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid var(--sp-line);
  background: var(--sp-bg);
}
.sp-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(350px, 100%);
}
.sp-search input {
  width: 100%;
  height: 32px;
  padding: 0 34px 0 10px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: var(--sp-ink);
  color: var(--sp-strong);
  font: inherit;
}
.sp-search input::placeholder { color: var(--sp-placeholder); }
.sp-search input:focus-visible { box-shadow: none; outline: 2px solid var(--sp-accent); outline-offset: 0; }
.sp-search .sp-icon { position: absolute; right: 10px; font-size: 16px; color: var(--sp-placeholder); pointer-events: none; }

.sp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
  padding: 22px;
  align-content: start;
}
.sp-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 2px solid transparent;
  background: var(--sp-ink);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.sp-card:hover { border-color: var(--sp-card-hover); transform: translateY(-2px); }
.sp-card.is-active { border-color: var(--sp-accent); }
.sp-card-media { position: relative; display: block; aspect-ratio: 5 / 3; background: var(--sp-bg-3); }
.sp-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-card-ph { display: flex; height: 100%; align-items: center; justify-content: center; font-size: 40px; color: var(--sp-accent); }
.sp-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--sp-accent);
  color: var(--sp-on-accent);
  font-size: 12px;
  font-weight: 700;
}
.sp-card-info {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  margin-top: -34px;
  padding: 10px 12px 12px;
  background: var(--sp-card-info);
  color: var(--sp-muted);
  font-size: 13px;
}
.sp-card-info b { color: var(--sp-card-strong); font-weight: 600; }
.sp-card-title { color: var(--sp-card-strong); font-weight: 700; }

/* ------------------------------------------------------------------ contraído */

.sp-mini {
  position: fixed;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 2px;
}
.sp-mini .sp-btn {
  width: 34px;
  height: 34px;
  font-size: 18px;
  border-radius: 0;
  background: var(--sp-ink);
  color: var(--sp-accent);
}
.sp-mini .sp-btn:hover { background: var(--sp-accent); color: var(--sp-on-accent); }
.sp-root.sp-collapsed .sp-video { display: none; }

/* ------------------------------------------------------------------ diseño compacto
 * Se aplica con la clase .sp-compact, que el script pone en pantallas de 760 px o menos
 * (antes era un @media) y siempre en los modos flotantes.
 */

.sp-root.sp-compact { --sp-bar-h: 64px; --sp-drawer-h: 56vh; }
.sp-compact .sp-bar {
  grid-template-columns: var(--sp-bar-h) auto minmax(0, 1fr) auto auto;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "cover title title main float"
    "cover progress progress progress progress"
    "controls controls extra volume volume";
}
.sp-compact .sp-cover { grid-area: cover; align-self: start; }
.sp-compact .sp-main, .sp-compact .sp-side { display: contents; }
.sp-compact .sp-title { grid-area: title; padding: 6px 0 0 10px; }
.sp-compact .sp-progress { grid-area: progress; padding: 2px 12px 4px 10px; }
.sp-compact .sp-actions { display: contents; }
.sp-compact .sp-actions-main { grid-area: main; padding: 4px 0 0 4px; gap: 2px; }
.sp-compact .sp-actions-float { grid-area: float; padding: 4px 6px 0 0; }
.sp-compact .sp-actions-extra { grid-area: extra; justify-content: center; align-items: center; gap: 0; border-top: 1px solid var(--sp-line); align-self: stretch; }
.sp-compact .sp-actions-extra .sp-btn { width: 32px; }
/* Muy estrecho (ventana flotante reducida, móviles pequeños): las herramientas pasan a su propia fila. */
.sp-compact .sp-shell { container-type: inline-size; }
@container (max-width: 339px) {
  .sp-compact .sp-bar {
    grid-template-areas:
      "cover title title main float"
      "cover progress progress progress progress"
      "controls controls controls volume volume"
      "extra extra extra extra extra";
  }
  .sp-compact .sp-volume { border-top: 1px solid var(--sp-line); }
}
.sp-compact .sp-controls { grid-area: controls; padding: 4px 6px; border-top: 1px solid var(--sp-line); }
.sp-compact .sp-volume { grid-area: volume; justify-content: flex-end; padding: 4px 10px 4px 0; border-top: 1px solid var(--sp-line); align-self: stretch; }
.sp-compact .sp-vol-pop {
  display: none;
  position: absolute;
  right: 4px;
  bottom: calc(100% + 8px);
  z-index: 2;
  width: min(240px, calc(100vw - 16px));
  padding: 10px;
  background: var(--sp-ink);
  border: 1px solid var(--sp-line);
  box-shadow: var(--sp-pop-shadow);
}
.sp-compact .sp-volume.is-open .sp-vol-pop { display: flex; }
.sp-compact .sp-mute-alt { display: inline-flex; }
.sp-compact .sp-vol { width: auto; flex: 1; }
.sp-compact .sp-pop { left: 8px; right: 8px; width: auto; }
.sp-compact .sp-addbar { padding: 12px 12px 0; }
.sp-compact .sp-addform { flex-wrap: wrap; }
.sp-compact .sp-add-type { flex: 1 1 140px; }
.sp-compact .sp-title-text { padding: 3px 8px; font-size: 13px; }
.sp-compact .sp-time { font-size: 12px; min-width: 34px; }
.sp-compact .sp-progress { gap: 6px; }
.sp-compact .sp-play { width: 46px; height: 46px; font-size: 32px; }
.sp-compact .sp-video { width: min(calc(100vw - 16px), calc(30vh * 16 / 9)); margin: 0 8px 38px; }
.sp-compact .sp-cards { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; padding: 12px; }
.sp-compact .sp-track { padding-left: 6px; padding-right: 10px; font-size: 13px; gap: 6px; }
.sp-compact .sp-track-mark { display: none; }

/* ------------------------------------------------------------------ diseño integrado en la página (layout: 'inline') */

.sp-root.sp-layout-inline {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 1;
  padding-top: 46px;   /* espacio del visualizador y de la pestaña de contraer */
  pointer-events: auto;
}
.sp-root.sp-layout-inline.sp-collapsed { padding-top: 0; }
.sp-layout-inline .sp-mini { position: static; justify-content: flex-end; }
.sp-layout-inline .sp-video { margin-bottom: 8px; }

/* ------------------------------------------------------------------ reproductor flotante */

.sp-float-head { display: none; }
.sp-root.sp-floating .sp-float-head,
.sp-root.sp-in-window .sp-float-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  order: -1;
  min-height: 36px;
  padding: 0 4px 0 6px;
  background: var(--sp-ink);
  border-bottom: 1px solid var(--sp-line);
  color: var(--sp-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  user-select: none;
  -webkit-user-select: none;
}
.sp-float-drag {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  align-self: stretch;
  touch-action: none;
  cursor: grab;
}
.sp-root.is-dragging .sp-float-drag { cursor: grabbing; }
.sp-float-label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sp-float-note { flex: none; color: var(--sp-accent-soft); font-weight: 600; text-transform: none; letter-spacing: 0; }
.sp-float-grip { width: 26px; height: 28px; font-size: 18px; color: var(--sp-muted); cursor: grab; }
.sp-float-grip:hover { color: var(--sp-strong); }
.sp-in-window .sp-float-grip { display: none; }
.sp-dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 3px;
  background: var(--sp-button);
  color: var(--sp-strong);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}
.sp-dock-btn .sp-icon { font-size: 15px; color: var(--sp-accent); }
.sp-dock-btn:hover { background: var(--sp-accent); color: var(--sp-on-accent); }
.sp-dock-btn:hover .sp-icon { color: inherit; }

/* Panel flotante dentro de la página */
.sp-root.sp-floating {
  position: fixed;
  top: var(--sp-float-y, auto);
  left: var(--sp-float-x, auto);
  right: auto;
  bottom: auto;
  z-index: 9995;
  width: min(440px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  padding-top: 0;
  background: var(--sp-bg-2);
  border: 1px solid var(--sp-line);
  border-radius: 6px;
  box-shadow: var(--sp-float-shadow);
  pointer-events: auto;
}
.sp-root.sp-floating > .sp-shell { border-radius: 0 0 6px 6px; }
.sp-root.sp-floating > .sp-float-head { border-radius: 6px 6px 0 0; }
/* El contenido se encoge para caber; la lista se desplaza dentro del panel. */
.sp-root.sp-floating .sp-shell,
.sp-root.sp-in-window .sp-shell { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; box-shadow: none; }
.sp-root.sp-floating .sp-bar,
.sp-root.sp-in-window .sp-bar { flex: none; }
.sp-root.sp-floating .sp-drawer,
.sp-root.sp-in-window .sp-drawer { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.sp-root.sp-floating .sp-view,
.sp-root.sp-in-window .sp-view { flex: 1 1 auto; min-height: 0; }
.sp-root.sp-floating { --sp-drawer-h: min(360px, 48vh); }
.sp-root.sp-floating .sp-collapse,
.sp-root.sp-in-window .sp-collapse { display: none; }
.sp-root.sp-floating .sp-viz,
.sp-root.sp-in-window .sp-viz { height: 36px; opacity: .45; }
.sp-root.sp-floating .sp-video {
  flex: none;
  align-self: stretch;
  width: auto;
  max-height: 34vh;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--sp-line);
  box-shadow: none;
}
.sp-root.sp-floating .sp-mini { display: none; }

/* Ventana independiente (Document Picture-in-Picture): el reproductor ocupa toda la ventana. */
html.sp-pip-doc, html.sp-pip-doc body { height: 100%; margin: 0; padding: 0; overflow: hidden; }
.sp-root.sp-in-window {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  height: 100%;
  background: var(--sp-bg-2);
  pointer-events: auto;
}
.sp-root.sp-in-window { --sp-drawer-h: 100%; overflow-y: auto; }
.sp-root.sp-in-window .sp-shell { flex: 1 1 auto; }
/* Si la ventana es baja, la lista conserva una altura útil y la ventana se desplaza. */
.sp-root.sp-in-window .sp-drawer { min-height: 180px; }

/* En la página, mientras el reproductor está en la ventana independiente. */
.sp-root.sp-windowed { pointer-events: none; }
.sp-root.sp-windowed.sp-layout-inline { padding-top: 0; }
.sp-dock {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 8px 8px 14px;
  background: var(--sp-bg);
  border: 1px solid var(--sp-line);
  color: var(--sp-text);
  font: 13px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  pointer-events: auto;
}
.sp-dock-text { flex: 1 1 160px; min-width: 0; color: var(--sp-muted); }
.sp-root:not(.sp-layout-inline) > .sp-dock {
  align-self: flex-end;
  max-width: calc(100vw - 16px);
  margin: 0 8px 8px;
  border-radius: 4px;
  box-shadow: var(--sp-pop-shadow);
}
/* Hueco que conserva el sitio del reproductor integrado mientras flota como panel. */
.sp-dock.sp-dock-placeholder { min-height: 60px; }

/* ------------------------------------------------------------------ movimiento reducido */

/* ------------------------------------------------------------------ selector de listas: capa de pantalla completa */

/* Como en la referencia (MP3 Sticky Player): ocupa toda la ventana y baja desde arriba. Mientras está abierta,
   el reproductor sube por encima del resto de la página (por debajo de la barra de administración de WordPress). */
.sp-root.sp-playlists-open { z-index: 9998; }
.sp-root .sp-view-playlists.sp-pl-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  max-height: none;
  background: var(--sp-bg-2);
  overflow: hidden;
  pointer-events: auto;
  animation: sp-pl-drop .35s ease-out;
}
@keyframes sp-pl-drop { from { transform: translateY(-100%); } to { transform: none; } }
.sp-pl-top { flex: none; display: flex; align-items: flex-start; justify-content: flex-end; gap: 16px; padding: 16px 16px 0; }
.sp-pl-top .sp-addbar { flex: 1 1 auto; max-width: 960px; margin: 0 auto; padding: 4px 0 0; }
.sp-root .sp-close-overlay { flex: none; width: 42px; height: 42px; border-radius: 0; background: var(--sp-ink); font-size: 20px; color: var(--sp-strong); }
.sp-root .sp-close-overlay:hover { background: var(--sp-accent); color: var(--sp-on-accent); }
.sp-pl-pages { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.sp-root .sp-pl-nav { flex: none; width: 44px; height: 34px; border-radius: 0; background: var(--sp-ink); font-size: 18px; color: var(--sp-strong); }
.sp-root .sp-pl-nav:hover:not(:disabled) { background: var(--sp-accent); color: var(--sp-on-accent); }
.sp-root .sp-pl-nav:disabled { opacity: .3; cursor: default; }
.sp-pl-overlay:not(.sp-pl-paged) .sp-pl-nav { visibility: hidden; }
.sp-pl-overlay .sp-cards {
  flex: 1 1 auto;
  align-self: stretch;
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 40px;
  align-content: center;
}
.sp-pl-overlay .sp-cards > li.sp-off-page { display: none; }
.sp-pl-overlay .sp-card-media { aspect-ratio: 16 / 9; }
.sp-pl-overlay .sp-card-info { font-size: 14px; }
.sp-pl-overlay .sp-card-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sp-pl-overlay .sp-cards-msg { flex: none; text-align: center; }
.sp-pl-foot { flex: none; display: flex; justify-content: flex-end; padding: 0 16px 16px; }
.sp-pl-foot .sp-pl-search { flex: 0 1 240px; }
@media (max-width: 1000px) {
  .sp-pl-overlay .sp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (max-width: 640px) {
  .sp-pl-top { padding: 10px 10px 0; gap: 10px; }
  .sp-pl-pages { gap: 8px; padding: 10px; }
  .sp-root .sp-pl-nav { width: 30px; }
  .sp-pl-overlay .sp-cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sp-pl-foot { padding: 0 10px 10px; }
  .sp-pl-foot .sp-pl-search { flex: 1 1 auto; }
}

/* ------------------------------------------------------------------ video reducido a la miniatura */

/* El mismo panel, recolocado con position: fixed sobre la portada de la barra: sigue visible y sonando. */
.sp-root .sp-video.is-mini {
  position: fixed;
  z-index: 3;
  max-height: none;
  margin: 0;
  border: 0;
  box-shadow: none;
  cursor: pointer;
}
.sp-video.is-mini .sp-video-head { display: none; }
.sp-video.is-mini .sp-video-box { width: 100%; height: 100%; aspect-ratio: auto; }
.sp-video.is-mini .sp-media { object-fit: cover; }
/* En miniatura el clic amplía el video: el iframe de YouTube no lo recibe (no se superpone nada sobre él). */
.sp-video.is-mini .sp-yt iframe { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .sp-spinner { animation-duration: 2.4s; }
  .sp-btn, .sp-card { transition: none; }
  .sp-card:hover { transform: none; }
  .sp-root .sp-view-playlists.sp-pl-overlay { animation: none; }
}
