:root {
  /* Oscuro por defecto: la musica se escucha mucho de noche */
  --brand: #4da3ff;
  --brand-contrast: #ffffff;
  --text: #f1f1f4;
  --muted: #9a9aa6;
  --bg: #0c0c0f;
  --header-bg: rgba(18, 18, 22, .92);
  --card: #17171c;
  --card-2: #222229;
  --input-bg: #222229;
  --border: #2c2c35;
  --mini-bg: #26262e;
  --ok: #2ecc82;
  --ok-bg: #163828;
  --warn: #e0a832;
  --warn-bg: #3a2f14;
  --danger: #f0564a;
  --danger-bg: #3a1f1c;
  --shadow: 0 8px 24px rgba(0, 0, 0, .45);
  --tabbar-h: 58px;
  --mini-h: 60px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --brand: #0a6fdc;
  --text: #17171c;
  --muted: #6b6b78;
  --bg: #f5f5f7;
  --header-bg: rgba(255, 255, 255, .92);
  --card: #ffffff;
  --card-2: #ececf0;
  --input-bg: #ffffff;
  --border: #e1e1e8;
  --mini-bg: #ffffff;
  --ok: #138a52;
  --ok-bg: #e3f6ec;
  --warn: #a86b00;
  --warn-bg: #fdf1dc;
  --danger: #c0392b;
  --danger-bg: #fbe9e7;
  --shadow: 0 8px 24px rgba(15, 23, 42, .14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
body.sheet-open { overflow: hidden; }
h1, h2, h3 { margin: 0; }
h2 { font-size: 16px; }
a { color: var(--brand); }
img { -webkit-user-drag: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small-text { font-size: 12px; }
.tnum { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }

/* ---------- Estructura ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 6px;
  min-height: 54px;
  padding: calc(var(--safe-top) + 8px) 12px 8px 16px;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.app-header h1 { flex: 1; font-size: 22px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-header .header-title { font-size: 17px; font-weight: 700; }
.home-brand {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  max-width: 100%; min-height: 0; padding: 0;
  background: none; color: var(--text); border-radius: 0;
  font: inherit; font-weight: inherit; text-align: left;
}
.home-brand img { flex: none; width: 32px; height: 32px; border-radius: 8px; }
.brand-text { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.brand-name { flex: none; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.brand-greeting {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; font-weight: 500; color: var(--muted);
}
.app-header .icon-btn:first-child { margin-left: -8px; }

.view {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 28px);
}
body.has-mini .view { padding-bottom: calc(var(--tabbar-h) + var(--mini-h) + var(--safe-bottom) + 34px); }
.view.flush-top { padding-top: 0; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
}
.tabbar a {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: var(--tabbar-h);
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
}
.tabbar a span { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar a.active { color: var(--text); font-weight: 700; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar a { position: relative; }
.tab-badge {
  position: absolute; top: 5px; left: calc(50% + 5px);
  min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 10px; font-style: normal; font-weight: 800; line-height: 17px; text-align: center;
}
@media (max-width: 400px) { .tabbar a { font-size: 10px; } }

.offline-bar {
  position: sticky; top: calc(var(--safe-top) + 54px); z-index: 19;
  padding: 7px 16px;
  background: var(--warn-bg); color: var(--warn);
  font-size: 13px; font-weight: 600; text-align: center;
}
.offline-bar a { color: inherit; }
.offline-empty > svg { width: 44px; height: 44px; opacity: .6; }
.offline-empty .btn, .offline-empty button { margin: 6px 4px 0; }

.boot { display: flex; align-items: center; justify-content: center; min-height: 60vh; color: var(--muted); }

/* ---------- Componentes base ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: var(--brand-contrast);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
}
button svg, .btn svg { width: 18px; height: 18px; flex: none; }
button.secondary, .btn.secondary { background: var(--card-2); color: var(--text); border: 1px solid var(--border); }
button.secondary.active { color: var(--brand); border-color: var(--brand); }
button.danger { background: var(--danger); color: #fff; }
button.ghost { background: none; color: var(--brand); padding: 8px 10px; }
button.small, .btn.small { min-height: 34px; padding: 6px 12px; font-size: 13px; }
button.block { width: 100%; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.danger-text { color: var(--danger); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; min-height: 42px; padding: 8px;
  background: none; border: none; border-radius: 50%;
  color: var(--text); font-size: 20px; font-weight: 400;
}
.icon-btn:active { background: var(--card-2); }
.icon-btn svg { width: 22px; height: 22px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px evita el zoom automatico de iOS al enfocar */
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.error-text { color: var(--danger); font-size: 13px; margin-top: 10px; }
.info-text { color: var(--ok); font-size: 13px; margin-top: 10px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; overflow-wrap: anywhere; }
.segmented { display: flex; gap: 3px; padding: 3px; background: var(--card-2); border-radius: 11px; }
.segmented button {
  flex: 1; min-height: 36px; padding: 6px 8px;
  background: transparent; color: var(--muted);
  border-radius: 8px; font-size: 14px;
}
.segmented button.active { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.neutral { background: var(--card-2); color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 28px 8px; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.kv:last-child { border-bottom: 0; }
.kv .v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
.list-item .sub { font-size: 12px; color: var(--muted); }
.section-title { margin: 22px 4px 8px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92em; overflow-wrap: anywhere; }

/* Interruptor (checkbox con aspecto de switch) */
.switch-row { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--text); font-size: 15px; cursor: pointer; }
.switch-row > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.switch-row small { color: var(--muted); font-size: 12px; }
.switch-row input {
  -webkit-appearance: none; appearance: none;
  position: relative; flex: none;
  width: 46px; height: 28px; min-height: 0; padding: 0;
  border: 0; border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: background .2s;
}
.switch-row input::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.switch-row input:checked { background: var(--brand); }
.switch-row input:checked::after { transform: translateX(18px); }
.switch-row input:focus { outline: none; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 4px -16px 6px; padding: 2px 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--card-2); color: var(--text);
  font-size: 14px; font-weight: 600;
}
.chip.selected { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Cargando */
@keyframes pulse { 50% { opacity: .45; } }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton .sk-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; animation: pulse 1.4s ease-in-out infinite; }
.sk-row i { flex: none; width: 48px; height: 48px; border-radius: 6px; background: var(--card-2); }
.sk-row span { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sk-row b { display: block; width: 70%; height: 12px; border-radius: 6px; background: var(--card-2); }
.sk-row b + b { width: 42%; }
.spinner {
  display: inline-block; width: 26px; height: 26px;
  border: 3px solid var(--card-2); border-top-color: var(--brand); border-radius: 50%;
  animation: spin .8s linear infinite;
}
.load-more { display: flex; justify-content: center; padding: 18px 0; }

/* ---------- Canciones y elementos ---------- */
.rows { display: flex; flex-direction: column; }
.track-row, .item-row {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 6px 0;
  color: var(--text); text-decoration: none;
  cursor: pointer;
  border-radius: 8px;
}
.track-row:active, .item-row:active { background: var(--card-2); }
.tr-art {
  flex: none; width: 48px; height: 48px;
  border-radius: 6px; object-fit: cover;
  background: var(--card-2);
}
.tr-art.round { border-radius: 50%; }
.tr-num { flex: none; width: 30px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.tr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tr-title, .tr-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-title { font-size: 15px; font-weight: 600; }
.tr-sub { font-size: 13px; color: var(--muted); }
.track-row.is-current .tr-title { color: var(--brand); }
.track-row.is-current .tr-num { color: var(--brand); font-weight: 800; }
.explicit {
  display: inline-block; margin-right: 5px; padding: 0 3px;
  border-radius: 2px; background: var(--muted); color: var(--bg);
  font-size: 9px; font-style: normal; font-weight: 800; line-height: 13px; vertical-align: 1px;
}
.tr-like { flex: none; display: inline-flex; color: var(--brand); }
.tr-dl { flex: none; display: inline-flex; color: var(--ok); }
.tr-dl svg { width: 15px; height: 15px; }
.tr-like svg { width: 16px; height: 16px; }
.tr-more { flex: none; color: var(--muted); margin-right: -8px; }

/* Portadas especiales y mosaicos */
.mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; overflow: hidden; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mosaic.empty { display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--card-2); }
.mosaic.empty svg { width: 40%; height: 40%; }
.tr-art.special, .coll-special { display: flex; align-items: center; justify-content: center; color: #fff; }
.tr-art.special svg { width: 22px; height: 22px; }
.liked { background: linear-gradient(135deg, #4da3ff, #3b3fd8); }
.history { background: linear-gradient(135deg, #0f766e, #2563eb); }
.downloads { background: linear-gradient(135deg, #15803d, #0e7490); }

/* Estanterias */
.shelf { margin: 22px 0 6px; }
.shelf > h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.shelf-head { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 10px; }
.shelf-head h2 { font-size: 20px; font-weight: 800; line-height: 1.2; }
.strapline { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.more-link {
  flex: none;
  padding: 5px 12px;
  border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none;
}
.carousel, .quick-grid {
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px 4px;
  scroll-padding: 0 16px;
}
.carousel::-webkit-scrollbar, .quick-grid::-webkit-scrollbar { display: none; }
.carousel { display: flex; gap: 14px; scroll-snap-type: x proximity; }
.quick-grid {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(4, auto);
  grid-auto-columns: min(86%, 380px); column-gap: 16px;
  scroll-snap-type: x mandatory;
}
.quick-grid > * { scroll-snap-align: start; }
.quick-empty { margin: 0; }
.tile {
  flex: none;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px;
  width: 148px; min-height: 0; margin: 0; padding: 0;
  background: none; border: 0; border-radius: 0;
  color: var(--text); font-weight: 400; text-align: left; text-decoration: none;
  scroll-snap-align: start;
  cursor: pointer;
}
.tile-art { width: 148px; height: 148px; border-radius: 10px; object-fit: cover; background: var(--card-2); }
.tile-art.round { border-radius: 50%; }
.tile.round { align-items: center; text-align: center; }
.tile-title, .tile-sub {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}
.tile-title { font-size: 14px; font-weight: 600; line-height: 1.25; margin-top: 4px; }
.tile-sub { font-size: 12px; color: var(--muted); }
/* Episodio a medias: barra de lo escuchado sobre el borde de abajo de la portada. */
.tile-progress { display: block; position: relative; height: 4px; margin: -12px 8px 8px; border-radius: 2px; background: rgba(255, 255, 255, 0.45); overflow: hidden; }
.tile-progress > span { display: block; height: 100%; background: var(--brand); }
@media (min-width: 700px) {
  .tile { width: 172px; }
  .tile-art { width: 172px; height: 172px; }
}

/* ---------- Buscar ---------- */
.search-bar {
  flex: 1;
  display: flex; align-items: center; gap: 6px;
  padding: 0 2px 0 12px;
  border-radius: 12px;
  background: var(--card-2);
}
.search-bar > svg { flex: none; width: 20px; height: 20px; color: var(--muted); }
.search-bar input {
  flex: 1; min-width: 0; min-height: 44px;
  padding: 8px 0;
  border: 0; background: none;
}
.search-bar input:focus { outline: none; }
.search-bar input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.search-bar .icon-btn { min-width: 38px; min-height: 38px; }
.search-bar .icon-btn svg { width: 18px; height: 18px; }
.suggest-list { display: flex; flex-direction: column; margin-bottom: 8px; }
.suggest-row { display: flex; align-items: center; }
.suggest-main {
  flex: 1; min-width: 0;
  justify-content: flex-start; gap: 14px;
  padding: 10px 0; min-height: 48px;
  background: none; color: var(--text); font-weight: 500; border-radius: 0;
}
.suggest-main svg { width: 20px; height: 20px; color: var(--muted); }
.suggest-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hint { padding-top: 60px; }
.search-hint > svg { width: 48px; height: 48px; opacity: .5; }
.top-result {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--card);
  color: var(--text); text-decoration: none;
  cursor: pointer;
}
.top-result img { flex: none; width: 84px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--card-2); }
.top-result img.round { border-radius: 50%; }
.top-result .tr-title { font-size: 18px; font-weight: 800; white-space: normal; }
.play-fab {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--brand); color: #fff;
}
.play-fab svg { width: 20px; height: 20px; }

/* ---------- ¿Qué suena? (reconocer canciones) ---------- */
.sid-card {
  width: 100%;
  display: flex; align-items: center; justify-content: flex-start; gap: 14px;
  margin: 2px 0 20px; padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2f7fe0, #6d4bd8); color: #fff;
  text-align: left;
}
.sid-card b { display: block; font-size: 16px; }
.sid-card small { display: block; font-size: 13px; font-weight: 500; opacity: .85; }
.sid-card-icon {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .18);
}
.sid-card-icon svg { width: 24px; height: 24px; }
.sid-history { margin-bottom: 18px; }
.search-bar .sid-bar-btn { color: var(--brand); }
.sid-meta { display: flex; align-items: flex-start; gap: 8px; margin: 12px 4px; color: var(--muted); font-size: 13px; }
.sid-meta svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.sid-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.sid-buttons button { gap: 6px; max-width: 100%; }
.sid-buttons button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sid-buttons svg { flex: none; width: 16px; height: 16px; }

/* Pantalla "Escuchando…" */
.sid-backdrop { align-items: stretch !important; background: #000 !important; }
.sheet.sid {
  width: 100%; max-width: none;
  height: 100vh; height: 100dvh; max-height: none;
  padding: 0; overflow: hidden;
  border-radius: 0;
  background: radial-gradient(circle at 50% 38%, #1c4a86 0%, #0c1830 55%, #07080c 100%); color: #fff;
  animation: np-up .25s ease-out;
}
.sid .sheet-body { height: 100%; }
.sid-inner {
  display: flex; flex-direction: column;
  height: 100%;
  padding: calc(var(--safe-top) + 6px) 22px calc(var(--safe-bottom) + 24px);
}
.sid .icon-btn { color: #fff; }
.sid .icon-btn:active { background: rgba(255, 255, 255, .12); }
.sid-close { align-self: flex-start; }
.sid-close svg { width: 26px; height: 26px; }
.sid-stage {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  width: 100%; max-width: 420px; margin: 0 auto;
  text-align: center;
}
.sid-orb {
  --level: 0;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 150px; height: 150px; margin-bottom: 30px;
}
.sid-core {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  width: 124px; height: 124px; border-radius: 50%;
  background: #2f7fe0; color: #fff;
  box-shadow: 0 0 44px rgba(77, 163, 255, .5);
  transform: scale(calc(1 + var(--level) * .2));
  transition: transform .08s linear, background .2s;
}
.sid-core svg { width: 56px; height: 56px; }
.sid-ring { position: absolute; inset: 13px; border-radius: 50%; border: 2px solid rgba(110, 180, 255, .6); opacity: 0; }
.sid[data-state="listen"] .sid-ring { animation: sid-ring 2.4s ease-out infinite; }
.sid[data-state="listen"] .sid-ring:nth-child(2) { animation-delay: .8s; }
.sid[data-state="listen"] .sid-ring:nth-child(3) { animation-delay: 1.6s; }
@keyframes sid-ring { from { transform: scale(.85); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }
.sid[data-state="start"] .sid-core { animation: pulse 1.2s ease-in-out infinite; }
.sid[data-state="fail"] .sid-core { background: rgba(255, 255, 255, .14); box-shadow: none; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .sid-ring { animation: none !important; }
}
.sid-title { margin: 0; font-size: 24px; font-weight: 800; }
.sid-text { margin: 0; min-height: 2.8em; color: rgba(255, 255, 255, .78); }
.sid-progress { width: 180px; height: 4px; margin-top: 6px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, .18); }
.sid-progress i { display: block; width: 0; height: 100%; background: #fff; transition: width .2s linear; }
.sid-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 18px; }
.sid-actions button.secondary { border-color: transparent; background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- MusISE Premium ---------- */
/* Distintivo: dorado con Premium (cabecera de Inicio, perfil de Ajustes). */
.brand-premium {
  flex: none; align-self: center;
  padding: 3px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #f7c948, #f08a24); color: #241500;
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.premium-cta {
  flex: none;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(240, 160, 50, .55);
  color: #e9a23b; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.premium-cta:active { background: rgba(240, 160, 50, .12); }
.premium-chip, .free-chip {
  display: inline-block; margin: 4px 0 4px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; text-decoration: none;
}
.premium-chip { background: linear-gradient(135deg, #f7c948, #f08a24); color: #241500; }
.free-chip { background: var(--card-2); color: var(--muted); }
.profile-avatar.is-premium .avatar, .profile-avatar.is-premium .avatar-img {
  box-shadow: 0 0 0 3px var(--card), 0 0 0 6px #f0ae3c;
}
.pm-status { display: flex; align-items: center; gap: 14px; padding: 4px 0 12px; }
.pm-status .pm-star {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--card-2); font-size: 24px; filter: grayscale(1);
}
.pm-status.on .pm-star { background: linear-gradient(135deg, #f7c948, #f08a24); filter: none; }
.pm-status b { display: block; font-size: 17px; }
.pm-status span:not(.pm-star) { display: block; color: var(--muted); font-size: 13px; }
.pm-benefits { margin: 4px 0 0; padding: 0 0 0 4px; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.pm-benefits li { position: relative; padding-left: 26px; font-size: 14px; }
.pm-benefits li::before { content: '✔'; position: absolute; left: 0; top: 0; color: var(--brand); font-weight: 800; }
.pm-price { margin: 4px 0 2px; font-size: 28px; font-weight: 800; }
.pm-price span { font-size: 15px; font-weight: 600; color: var(--muted); }
.pm-method { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.pm-method h3 { margin: 0 0 2px; font-size: 15px; }
.pm-method .kv .v { display: inline-flex; align-items: center; gap: 4px; }
.pm-paypal { background: #ffc439; color: #111; }
.pm-notice { margin: 4px 0; padding: 10px 12px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-size: 14px; }
.pm-notice.warn { background: var(--warn-bg); color: var(--warn); }
.pm-welcome { margin: 4px 0 12px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, #2f7fe0, #6d4bd8); color: #fff; font-size: 15px; }
.pm-start { margin: 0 0 16px; }
.pm-upsell .pm-reason { margin: 0 0 14px; font-size: 15px; }
.pm-upsell .pm-price { margin-top: 16px; font-size: 22px; }
.pm-locked { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.pm-locked a { font-weight: 700; }
.ad-sub { margin: 18px 0 6px; font-size: 14px; }
.pm-trial { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--card-2); }
.pm-trial label { display: block; margin: 0 0 6px; font-weight: 700; }
.pm-trial-row { display: flex; align-items: center; gap: 8px; }
.pm-trial-row input { width: 90px; flex: none; }
.pm-trial .hint { margin: 8px 0 0; }
.inv-premium select { margin-top: 10px; }
.pm-ref-lead { margin: 0 0 12px; }
.pm-ref-link { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.pm-ref-link input { flex: 1; min-width: 0; font-size: 14px; }
.pm-ref-progress { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.pm-ref-bar { flex: 1; height: 8px; border-radius: 4px; overflow: hidden; background: var(--card-2); }
.pm-ref-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #f7c948, #f08a24); }
.pm-ref-progress span { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.pm-ref-sub { margin: 16px 0 2px; font-size: 14px; }
.ok-text { color: var(--ok); }
.pm-ref-rule { margin: 10px 0; line-height: 2.4; }
.pm-ref-rule input { width: 64px; display: inline-block; padding: 4px 8px; min-height: 34px; text-align: center; }
.inv-premium { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--card-2); }
.inv-premium .switch-row { margin: 0; }
.invite-box { margin: -4px 0 12px; font-size: 14px; }
.invite-box p { margin: 0 0 6px; }
.invite-gift { padding: 10px 12px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); }
.pay-result { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0 6px; text-align: center; }
.pay-result h2 { font-size: 22px; }
.pay-result p { margin: 0; }
.pay-result .btn, .pay-result button { margin-top: 6px; }
.pay-icon { font-size: 44px; line-height: 1; }

/* ---------- Colecciones (album, listas) ---------- */
.coll-hero { display: flex; align-items: flex-end; gap: 18px; padding-top: 10px; }
.coll-art { flex: none; width: 160px; height: 160px; }
.coll-art > img, .coll-art > .coll-mosaic, .coll-art > .coll-special {
  width: 100%; height: 100%;
  border-radius: 12px; object-fit: cover;
  box-shadow: var(--shadow);
}
.coll-special svg { width: 40%; height: 40%; }
.coll-meta { min-width: 0; }
.coll-meta h1 { font-size: 24px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.coll-sub { margin: 6px 0 2px; color: var(--text); font-weight: 500; }
.coll-sub a { color: inherit; text-decoration: none; font-weight: 700; }

/* Listas colaborativas */
.collab-box { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.collab-box p { margin: 0; flex: 1; font-size: 14px; color: var(--muted); }
.collab-box button { flex-shrink: 0; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.collab-people { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; padding: 4px 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.collab-avatars { display: inline-flex; }
.collab-avatars > * { margin-right: -8px; border: 2px solid var(--bg); border-radius: 50%; }
.collab-avatars > *:last-child { margin-right: 0; }
.collab-hint { margin: 2px 0 10px; }
.collab-member { display: flex; align-items: center; cursor: default; }
.collab-member .avatar, .collab-member .avatar-img { flex: none; }
.collab-member .collab-name { flex: 1; text-align: left; }
.collab-member button { margin-left: auto; flex-shrink: 0; }
.coll-meta .muted { margin: 0; }
@media (max-width: 560px) {
  .coll-hero { flex-direction: column; align-items: center; text-align: center; }
  .coll-art { width: min(62vw, 240px); height: min(62vw, 240px); }
}
.hero-actions { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.hero-actions > button:not(.icon-btn), .hero-actions > span > button:not(.icon-btn) { border-radius: 999px; }
.hero-icon svg { width: 24px; height: 24px; }
.hero-icon.active { color: var(--brand); }
#clDownload .hero-icon.active { color: var(--ok); }
.dl-ring { position: relative; color: var(--ok); }
.dl-ring::before {
  content: ''; position: absolute; inset: 4px; border-radius: 50%;
  background: conic-gradient(var(--ok) var(--p, 0%), var(--border) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
}
.dl-ring svg { width: 16px; height: 16px; animation: pulse 1.2s ease-in-out infinite; }
/* Album o lista con guardar + descargar: en el movil "Aleatorio" se queda en icono para que quepa todo. */
@media (max-width: 440px) {
  .hero-actions:has(#clSave button):has(#clDownload button) { gap: 6px; }
  .hero-actions:has(#clSave button):has(#clDownload button) .hero-shuffle { min-width: 42px; padding: 8px; gap: 0; }
  .hero-actions:has(#clSave button):has(#clDownload button) .hero-shuffle .lbl { display: none; }
}
.description { margin: 4px 0 10px; color: var(--muted); font-size: 14px; white-space: pre-line; cursor: pointer; }
.description.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }

/* ---------- Artista ---------- */
.artist-hero {
  position: relative;
  display: flex; align-items: flex-end;
  height: min(56vw, 380px); min-height: 180px;
  margin: 0 -16px;
  overflow: hidden;
  background: var(--card-2);
}
.artist-banner { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.artist-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 35%, var(--bg)); }
.artist-hero-text { position: relative; z-index: 1; padding: 0 16px 4px; }
.artist-hero-text h1 { font-size: 34px; font-weight: 900; line-height: 1.1; }
.artist-hero-text p { margin: 4px 0 0; }

/* ---------- Mini reproductor ---------- */
.mini-player {
  position: fixed; z-index: 29;
  left: 8px; right: 8px;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 6px);
  display: flex; align-items: center; gap: 2px;
  max-width: 720px; height: var(--mini-h);
  margin: 0 auto; padding-right: 4px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--mini-bg);
  box-shadow: var(--shadow);
}
.mini-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(127, 127, 127, .25); }
.mini-progress i { display: block; width: 0; height: 100%; background: var(--brand); }
.mini-main {
  flex: 1; min-width: 0; height: 100%;
  justify-content: flex-start; gap: 10px;
  padding: 0 0 0 8px;
  background: none; color: var(--text); font-weight: 400; border-radius: 0;
}
.mini-main img { flex: none; width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: var(--card-2); }
.mini-text { min-width: 0; display: flex; flex-direction: column; text-align: left; }
.mini-title, .mini-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-title { font-size: 14px; font-weight: 600; }
.mini-sub { font-size: 12px; color: var(--muted); }
.mini-player .icon-btn svg { width: 24px; height: 24px; }
.mini-player.buffering #miniPlay { animation: pulse 1s ease-in-out infinite; }
/* Volumen de la app: en el mini reproductor solo en pantallas anchas (PC) */
.mini-volume { display: none; align-items: center; gap: 2px; margin-right: 8px; }
.mini-volume .icon-btn { min-width: 38px; }
.mini-volume .icon-btn svg { width: 22px; height: 22px; }
@media (min-width: 700px) {
  .mini-volume:not(.hidden) { display: flex; }
  .mini-player { max-width: 960px; }
}
#miniVol, #npVol {
  -webkit-appearance: none; appearance: none;
  width: 120px; height: 24px; min-height: 0; margin: 0; padding: 0;
  border: 0; background: transparent; cursor: pointer;
}
#miniVol:focus, #npVol:focus { outline: none; }
#miniVol::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--brand) var(--p, 100%), rgba(127, 127, 127, .35) var(--p, 100%)); }
#miniVol::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4.5px; border-radius: 50%; background: var(--text); }
#miniVol::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(127, 127, 127, .35); }
#miniVol::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--brand); }
#miniVol::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--text); }
.np-volume { display: flex; align-items: center; gap: 6px; margin: 2px 0 6px; }
.np-volume .icon-btn { color: rgba(255, 255, 255, .8); }
.np-volume .icon-btn svg { width: 22px; height: 22px; }
#npVol { flex: 1; width: auto; }
#npVol::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, rgba(255, 255, 255, .85) var(--p, 100%), rgba(255, 255, 255, .25) var(--p, 100%)); }
#npVol::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; }
#npVol::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); }
#npVol::-moz-range-progress { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .85); }
#npVol::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }

/* ---------- Reproductor a pantalla completa ---------- */
.np-backdrop { align-items: stretch !important; background: #000 !important; animation: none !important; }
.sheet.np {
  position: relative;
  width: 100%; max-width: none;
  height: 100vh; height: 100dvh; max-height: none;
  padding: 0; overflow: hidden;
  border-radius: 0;
  background: #121216; color: #fff;
  animation: np-up .25s ease-out;
  transition: transform .2s ease-out;
}
@keyframes np-up { from { transform: translateY(30%); opacity: .4; } }
.np .sheet-body { height: 100%; }
.np-bg { position: absolute; inset: 0; overflow: hidden; }
.np-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.4); filter: blur(48px) saturate(1.5) brightness(.42); }
.np-inner {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%; max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 6px) 22px calc(var(--safe-bottom) + 12px);
}
.np .icon-btn { color: #fff; }
.np .icon-btn:active { background: rgba(255, 255, 255, .12); }
.np-top { display: flex; align-items: center; gap: 6px; }
.np-top .icon-btn svg { width: 26px; height: 26px; }
.np-context {
  flex: 1; min-width: 0; min-height: 0;
  flex-direction: column; gap: 0;
  padding: 4px;
  background: none; color: #fff;
}
.np-context small { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.np-context span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.np-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px 0; }
.np-art-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; container-type: size; }
.np-art-wrap img {
  width: min(100cqw, 100cqh); height: min(100cqw, 100cqh);
  border-radius: 12px; object-fit: cover;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  background: rgba(255, 255, 255, .06);
}
.np-lyrics {
  width: 100%; height: 100%;
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
  mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
}
.np-lyrics::-webkit-scrollbar { display: none; }
.np-lyrics-lines { padding: 30% 0 45%; }
.np-lyrics-lines p { margin: 0 0 14px; font-size: 19px; font-weight: 600; line-height: 1.35; color: rgba(255, 255, 255, .9); }
.np-lyrics-lines.synced p { font-size: 23px; font-weight: 800; color: rgba(255, 255, 255, .32); cursor: pointer; transition: color .25s; }
.np-lyrics-lines.synced p.active { color: #fff; }
.np-lyrics-msg { margin-top: 40%; text-align: center; color: rgba(255, 255, 255, .7); }
.np-lyrics-source { margin: 0 0 30px; font-size: 12px; color: rgba(255, 255, 255, .5); }
.np-info { display: flex; align-items: center; gap: 10px; }
.np-titles { flex: 1; min-width: 0; }
.np-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 22px; font-weight: 800; }
.np-artist {
  display: block; max-width: 100%; min-height: 0;
  padding: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: none; color: rgba(255, 255, 255, .72);
  font-size: 16px; font-weight: 500; text-align: left;
}
.np-like svg { width: 28px; height: 28px; }
.np-like.active { color: var(--brand) !important; }
.np-seek { margin-top: 10px; }
.np-seek input[type="range"] {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: 28px; min-height: 0;
  margin: 0; padding: 0;
  border: 0; background: transparent;
  cursor: pointer;
}
.np-seek input[type="range"]:focus { outline: none; }
.np-seek input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, #fff var(--p, 0%), rgba(255, 255, 255, .25) var(--p, 0%));
}
.np-seek input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; margin-top: -5px;
  border-radius: 50%; background: #fff;
}
.np-seek input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); }
.np-seek input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: #fff; }
.np-seek input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.np-times { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.np-controls { display: flex; align-items: center; justify-content: space-between; margin: 8px -6px 14px; }
.np-skip svg { width: 36px; height: 36px; }
.np-mode { color: rgba(255, 255, 255, .55) !important; }
.np-mode.active { color: var(--brand) !important; }
.np-mode svg { width: 24px; height: 24px; }
.np-play {
  width: 74px; height: 74px; min-height: 0; padding: 0;
  border-radius: 50%;
  background: #fff; color: #121216;
}
.np-play svg { width: 34px; height: 34px; }
.np-play.buffering { animation: pulse 1s ease-in-out infinite; }
.np-bottom { display: flex; justify-content: space-around; }
.np-tab {
  flex-direction: column; gap: 3px;
  min-height: 0; padding: 6px 12px;
  background: none; color: rgba(255, 255, 255, .75);
  font-size: 11px; font-weight: 600;
}
.np-tab svg { width: 22px; height: 22px; }
.np-tab.active { color: var(--brand); }
@media (max-height: 640px) {
  .np-title { font-size: 19px; }
  .np-play { width: 62px; height: 62px; }
  .np-controls { margin-bottom: 6px; }
}

/* ---------- Hojas inferiores (modales) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, .55);
  animation: fade-in .15s ease-out;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 16px calc(18px + var(--safe-bottom));
  background: var(--card);
  border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow);
  animation: slide-up .2s ease-out;
}
.sheet-handle { width: 40px; height: 4px; margin: 6px auto 10px; border-radius: 2px; background: var(--border); }
.sheet-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sheet-header h2 { flex: 1; min-width: 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions > * { flex: 1; }
@media (min-width: 700px) {
  .sheet-backdrop:not(.np-backdrop) { align-items: center; }
  .sheet:not(.np) { border-radius: 18px; }
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-up { from { transform: translateY(40px); opacity: .5; } }

.menu-head { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.menu-list { display: flex; flex-direction: column; gap: 2px; }
.menu-list > .block { margin-top: 6px; }
.menu-item {
  justify-content: flex-start; gap: 16px;
  width: 100%; min-height: 50px; padding: 10px 6px;
  background: none; color: var(--text); font-weight: 500;
}
.menu-item:active { background: var(--card-2); }
.menu-item svg { width: 22px; height: 22px; color: var(--muted); }
.menu-item span { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-sheet .tr-art { width: 44px; height: 44px; }
.queue-row.played { opacity: .5; }
.queue-row .icon-btn { color: var(--muted); }
.queue-tools { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.queue-tools .switch-row { width: 100%; }
.queue-tools .ghost { padding-left: 0; }

/* ---------- Avisos ---------- */
.toast-wrap {
  position: fixed; left: 0; right: 0; z-index: 60;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0 16px;
  pointer-events: none;
}
body.has-mini .toast-wrap { bottom: calc(var(--tabbar-h) + var(--mini-h) + var(--safe-bottom) + 18px); }
body.sheet-open .toast-wrap { bottom: calc(var(--safe-bottom) + 24px); }
.toast {
  display: flex; align-items: center; gap: 12px;
  width: 100%; max-width: 480px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #2f2f38; color: #fff;
  box-shadow: var(--shadow);
  font-size: 14px;
  pointer-events: auto;
  animation: slide-up .2s ease-out;
}
.toast .msg { flex: 1; }
.toast.error { background: #b3261e; }
.toast button { min-height: 32px; padding: 4px 8px; background: none; color: #8cc4ff; }

/* ---------- Ajustes ---------- */
.sc-lead { margin-top: 0; font-size: 14px; }
.sc-notice { padding: 10px 12px; border-radius: 10px; background: var(--card-2); font-size: 14px; }
.steps { margin: 0; padding-left: 20px; font-size: 14px; }
.steps li { margin: 8px 0; }
textarea { min-height: 80px; resize: vertical; }
textarea.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.imp-options { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 4px; }
.imp-progress { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.imp-progress .tr-title { white-space: normal; }
.guide-section { border-bottom: 1px solid var(--border); }
.guide-section:last-child { border-bottom: 0; }
.guide-section summary { padding: 12px 0; font-weight: 600; cursor: pointer; list-style-position: inside; }
.guide-section .guide-body { padding: 0 0 12px; font-size: 14px; }
.guide-section .guide-body p { margin: 6px 0; }
.about { margin: 24px 4px; text-align: center; }
.player-log {
  margin: 0; max-height: 280px; overflow: auto; padding: 10px;
  border-radius: 10px; background: var(--card-2);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11px; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.about a { color: inherit; }

/* Admin -> Registro de sus dispositivos */
.diag-device + .diag-device { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.diag-device h3 { font-size: 15px; }
.diag-device .hint { margin: 2px 0 8px; }
.diag-device .player-log { max-height: 360px; }
.diag-problem { color: var(--warn); }

/* ---------- Login ---------- */
.login-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100dvh;
  padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 16px);
}
.login-card { width: 100%; max-width: 360px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-brand img { width: 48px; height: 48px; border-radius: 12px; }
.login-brand h1 { font-size: 22px; }
.auth-title { font-size: 18px; margin-bottom: 6px; }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 12px; }
.auth-links .ghost { font-weight: 500; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.code-input { font-size: 26px; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.login-card .card, .login-wrap .card { margin-bottom: 0; }

/* Portada (antes de entrar): para que sirve la app y donde funciona.
   En el movil va debajo del acceso; en pantallas anchas, a su izquierda. */
.login-wrap.with-landing { flex-direction: column; align-items: center; justify-content: flex-start; gap: 36px; }
.landing { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 560px; min-width: 0; }
.landing > header { display: flex; flex-direction: column; gap: 6px; }
.landing h2 { font-size: 24px; line-height: 1.2; text-wrap: balance; }
.landing > header p { color: var(--muted); }
.landing-stage { display: flex; flex-direction: column; gap: 12px; }
.landing .section-title { margin: 0; }
.landing-features { list-style: none; margin: 0 0 0 18px; padding: 0 0 0 26px; display: flex; flex-direction: column; gap: 16px; border-left: 2px solid var(--border); }
.landing-features li { position: relative; }
.landing-features strong { display: block; font-size: 15px; line-height: 1.3; }
.landing-features p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.landing-icon {
  position: absolute; left: -45px; top: -4px;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border); color: var(--brand);
}
.landing-icon svg { width: 18px; height: 18px; }
.landing-yes .landing-icon { color: var(--ok); border-color: var(--ok); background: var(--ok-bg); }
.landing-no .landing-icon { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }
.landing-footer { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 2px dashed var(--border); color: var(--muted); font-size: 14px; }
.landing-footer button { margin-top: 6px; }

@media (min-width: 900px) {
  .login-wrap.with-landing {
    display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; column-gap: 64px;
    max-width: 1040px; margin: 0 auto; padding: calc(var(--safe-top) + 48px) 32px 48px;
  }
  .with-landing .login-card { grid-column: 2; grid-row: 1; position: sticky; top: 32px; }
  .with-landing .landing { grid-column: 1; grid-row: 1; max-width: none; }
  .landing h2 { font-size: 30px; }
  .landing-footer button { align-self: flex-start; width: auto; }
}

/* ---------- Avatares y perfil ---------- */
.avatar-img { flex: none; display: block; border-radius: 50%; object-fit: cover; background: var(--card-2); }
.avatar-wrap { position: relative; flex: none; display: inline-flex; }
.profile-row { display: flex; align-items: center; gap: 16px; }
.profile-avatar {
  position: relative; flex: none;
  min-height: 0; padding: 0;
  border-radius: 50%; background: none;
}
.profile-avatar-edit {
  position: absolute; right: -2px; bottom: -2px;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff;
  box-shadow: 0 0 0 3px var(--card);
}
.profile-avatar-edit svg { width: 15px; height: 15px; }
.profile-name { font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.listen-stats { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.listen-stats.loading { display: flex; justify-content: center; min-height: 92px; align-items: center; }
.lt-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lt-title svg { width: 16px; height: 16px; }
.lt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.lt-cell { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 12px; background: var(--card-2); min-width: 0; }
.lt-label { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-value { font-size: 17px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.lt-v { white-space: nowrap; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------- Social ---------- */
.friend-row { min-height: 64px; }
.social-empty > svg { width: 48px; height: 48px; opacity: .5; }
.social-empty button { margin-top: 6px; }
.search-results { min-height: 60px; margin: 8px 0 14px; }
.invite-box { margin: 0; }
.friend-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0 4px; text-align: center; }
.friend-hero h1 { margin-top: 8px; font-size: 26px; font-weight: 800; overflow-wrap: anywhere; }
.friend-hero p { margin: 0; }
.friend-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.friend-stats strong { color: var(--text); }
.hero-actions.centered { justify-content: center; }
.menu-item.danger-text, .menu-item.danger-text svg { color: var(--danger); }

/* ---------- Wrapped ---------- */
.wrapped-banner {
  display: flex; align-items: center; justify-content: flex-start; gap: 14px;
  width: 100%; margin: 6px 0 4px; padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(120deg, #1d4ed8, #7c3aed 60%, #db2777);
  color: #fff; text-align: left; font-weight: 400;
  box-shadow: var(--shadow);
}
.wrapped-banner strong { display: block; font-size: 16px; }
.wrapped-banner small { display: block; opacity: .85; }
.wrapped-banner > svg { width: 22px; height: 22px; flex: none; }
.wb-gift { flex: none; font-size: 30px; line-height: 1; }
.rows .wrapped-banner { margin-bottom: 8px; }
.tr-art.wrapped-art { display: flex; align-items: center; justify-content: center; font-size: 24px; background: linear-gradient(135deg, #1d4ed8, #db2777); }

.wrapped-backdrop { align-items: stretch !important; background: #000 !important; animation: none !important; }
.sheet.wrapped {
  position: relative;
  width: 100%; max-width: none;
  height: 100vh; height: 100dvh; max-height: none;
  padding: 0; overflow: hidden;
  border-radius: 0; background: #000; color: #fff;
  animation: fade-in .3s ease-out;
}
.wrapped .sheet-body { height: 100%; }
.w-story {
  position: relative; height: 100%; max-width: 520px; margin: 0 auto;
  overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.w-bars {
  position: absolute; z-index: 3; left: 0; right: 0; top: 0;
  display: flex; gap: 4px;
  padding: calc(var(--safe-top) + 10px) 12px 0;
}
.w-bars i { flex: 1; height: 3px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .3); }
.w-bars b { display: block; width: 0; height: 100%; background: #fff; }
.w-close { position: absolute; z-index: 3; right: 6px; top: calc(var(--safe-top) + 20px); color: #fff; }
.w-brand {
  position: absolute; z-index: 3; left: 16px; top: calc(var(--safe-top) + 28px);
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800; letter-spacing: .01em; pointer-events: none;
}
.w-brand img { width: 26px; height: 26px; border-radius: 7px; }
.w-kicker.keep-case { text-transform: none; letter-spacing: .01em; font-size: 20px; }
.w-logo { display: block; width: 84px; height: 84px; margin-bottom: 18px; border-radius: 20px; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.w-sum-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.w-sum-brand img { width: 44px; height: 44px; border-radius: 11px; }
.w-sum-brand b { display: block; font-size: 22px; font-weight: 900; line-height: 1.1; }
.w-sum-brand small { display: block; font-size: 13px; opacity: .8; text-transform: uppercase; letter-spacing: .08em; }
.w-close:active { background: rgba(255, 255, 255, .15); }
.w-slides { position: relative; height: 100%; }
.w-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: calc(var(--safe-top) + 64px) 28px calc(var(--safe-bottom) + 40px);
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility .35s;
  background-size: 200% 200%;
  animation: w-bg 14s ease-in-out infinite alternate;
}
.w-slide.active { opacity: 1; visibility: visible; }
@keyframes w-bg { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.w-t1 { background-image: radial-gradient(circle at 15% 20%, #4da3ff 0, transparent 45%), radial-gradient(circle at 85% 75%, #8b5cf6 0, transparent 50%), linear-gradient(160deg, #0b1030, #1e1b4b); }
.w-t2 { background-image: radial-gradient(circle at 80% 15%, #f472b6 0, transparent 45%), radial-gradient(circle at 10% 90%, #f59e0b 0, transparent 50%), linear-gradient(160deg, #3b0764, #831843); }
.w-t3 { background-image: radial-gradient(circle at 20% 80%, #22d3ee 0, transparent 45%), radial-gradient(circle at 90% 20%, #34d399 0, transparent 45%), linear-gradient(160deg, #042f2e, #0c4a6e); }
.w-t4 { background-image: radial-gradient(circle at 75% 80%, #fb7185 0, transparent 45%), radial-gradient(circle at 20% 20%, #fde047 0, transparent 40%), linear-gradient(160deg, #7c2d12, #4c0519); }
.w-t5 { background-image: radial-gradient(circle at 25% 30%, #a3e635 0, transparent 40%), radial-gradient(circle at 80% 85%, #06b6d4 0, transparent 50%), linear-gradient(160deg, #1a2e05, #082f49); }
.w-t6 { background-image: radial-gradient(circle at 80% 30%, #c084fc 0, transparent 45%), radial-gradient(circle at 15% 85%, #60a5fa 0, transparent 50%), linear-gradient(160deg, #1e1b4b, #0f172a); }
.w-content { width: 100%; text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.w-anim { opacity: 0; }
.w-slide.active .w-anim { animation: w-in .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0ms); }
@keyframes w-in { from { opacity: 0; transform: translateY(26px) scale(.98); } to { opacity: 1; transform: none; } }
.w-kicker { margin: 0 0 10px; font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.w-huge { font-size: clamp(64px, 22vw, 120px); font-weight: 900; line-height: .95; letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.w-huge.w-month { font-size: clamp(54px, 17vw, 96px); text-transform: capitalize; }
.w-big { margin: 12px 0 0; font-size: 26px; font-weight: 800; line-height: 1.15; }
.w-title { margin: 18px 0 4px; font-size: 32px; font-weight: 900; line-height: 1.1; overflow-wrap: anywhere; }
.w-lead { margin: 10px 0 0; font-size: 17px; line-height: 1.4; opacity: .92; }
.w-note { display: inline-block; margin: 14px 0 0; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: 13px; font-weight: 700; }
.w-hint { margin-top: 48px; font-size: 14px; opacity: .7; }
.w-cover { display: block; width: min(64vw, 280px); height: min(64vw, 280px); margin-top: 8px; border-radius: 14px; object-fit: cover; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.w-cover.round { border-radius: 50%; }
.w-list { margin: 8px 0 0; padding: 0; list-style: none; }
.w-list li { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.w-list .w-n { width: 24px; flex: none; font-size: 22px; font-weight: 900; opacity: .9; }
.w-list .w-cover { width: 54px; height: 54px; margin: 0; border-radius: 8px; flex: none; box-shadow: none; }
.w-list .w-cover.round { border-radius: 50%; }
.w-li-text { min-width: 0; display: flex; flex-direction: column; }
.w-li-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.w-li-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
.w-chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin-top: 26px; }
.w-chart span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.w-chart i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: rgba(255, 255, 255, .35); }
.w-chart .top i { background: #fff; }
.w-chart small { font-size: 11px; font-weight: 700; opacity: .8; }
.w-mosaic { display: grid; grid-template-columns: 1fr 1fr; width: min(60vw, 260px); height: min(60vw, 260px); overflow: hidden; border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.w-mosaic img { width: 100%; height: 100%; object-fit: cover; }
.w-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.w-btn { width: 100%; min-height: 50px; border-radius: 999px; background: #fff; color: #111; font-size: 16px; font-weight: 800; }
.w-btn.ghost { background: rgba(255, 255, 255, .16); color: #fff; }
.w-summary { padding: 22px; border-radius: 22px; background: rgba(0, 0, 0, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.w-sum-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.w-sum-cols > div { min-width: 0; }
.w-sum-cols h3 { margin: 0 0 6px; font-size: 14px; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.w-sum-cols ol { margin: 0; padding: 0; list-style: none; counter-reset: pos; font-size: 15px; font-weight: 700; }
.w-sum-cols li { margin: 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; counter-increment: pos; }
.w-sum-cols li::before { content: counter(pos) ". "; opacity: .7; }
.w-sum-stats { display: flex; gap: 24px; margin-top: 18px; }
.w-sum-stats small { display: block; opacity: .8; font-size: 13px; }
.w-sum-stats b { font-size: 26px; font-weight: 900; text-transform: capitalize; }

/* ---------- Administracion ---------- */
.big-number { font-size: 28px; font-weight: 800; }
.avatar {
  position: relative; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: #fff; font-weight: 800; font-size: 16px;
}
.online-dot {
  position: absolute; right: -1px; bottom: -1px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 2px var(--card);
}
.user-row .title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; overflow-wrap: anywhere; }
.user-row .sub { overflow-wrap: anywhere; }
.app-header .secondary.small { flex: none; }

/* Escritorio: algo mas de aire */
@media (min-width: 900px) {
  .view { padding-left: 28px; padding-right: 28px; }
  .carousel, .quick-grid, .chips.scroll { margin-left: -28px; margin-right: -28px; padding-left: 28px; padding-right: 28px; }
  .carousel, .quick-grid { scroll-padding: 0 28px; }
  .artist-hero { margin: 0 -28px; }
}

/* Como instalar la app en el movil (pantalla de acceso) */
.install-link {
  display: block; width: 100%; margin-top: 16px; padding: 12px;
  border: 1px dashed var(--border); border-radius: 12px;
  background: none; color: var(--text); font-weight: 600;
}
.install-link + .tv-install-link { margin-top: 8px; }
.install-os { margin: 10px 0; padding: 0 12px; border-radius: 12px; background: var(--card-2); }
.install-os summary { padding: 12px 0; font-weight: 700; cursor: pointer; }
.install-steps { margin: 0 0 8px; padding-left: 22px; font-size: 14px; }
.install-steps li { margin: 0 0 10px; }
.install-os .hint { margin: 0 0 12px; }
#installNow { margin: 12px 0 4px; }

/* Instalar de un toque (Chrome, Edge, Samsung Internet, Opera, Brave...) */
.install-link.is-ready { border: 1px solid var(--brand); color: var(--brand); }
.install-here { margin: 12px 0; padding: 12px; border: 1px solid var(--brand); border-radius: 12px; font-size: 14px; }
.ios-share { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; }

/* Aviso para instalar donde no hay boton de un toque (iPhone, Firefox...) */
.install-hint {
  position: fixed; z-index: 35;
  left: 12px; right: 12px;
  bottom: calc(var(--safe-bottom) + 14px);
  display: flex; align-items: flex-start; gap: 12px;
  max-width: 480px; margin: 0 auto; padding: 12px 6px 12px 12px;
  border-radius: 14px;
  background: var(--mini-bg);
  box-shadow: var(--shadow);
  font-size: 14px; line-height: 1.4;
  animation: install-hint-in .3s ease-out;
}
.install-hint > img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.install-hint-text { flex: 1; min-width: 0; }
.install-hint-text > strong { display: block; margin-bottom: 2px; }
.install-hint a { color: var(--brand); }
.install-hint-close {
  flex: none; width: 34px; min-height: 34px; height: 34px; padding: 0; margin: -6px 0 0;
  border-radius: 50%; background: none; color: var(--muted); font-size: 15px;
}
/* Flecha hacia el boton del navegador (Compartir o «···» en Safari) */
.install-hint[data-arrow]::after {
  content: ''; position: absolute;
  border: 11px solid transparent;
}
.install-hint[data-arrow="bottom-center"]::after { top: 100%; left: calc(50% - 11px); border-top-color: var(--mini-bg); }
.install-hint[data-arrow="bottom-right"]::after { top: 100%; right: 18px; border-top-color: var(--mini-bg); }
.install-hint[data-arrow="top-right"] { top: calc(var(--safe-top) + 14px); bottom: auto; left: auto; width: min(420px, calc(100% - 24px)); }
.install-hint[data-arrow="top-right"]::after { bottom: 100%; right: 26px; border-bottom-color: var(--mini-bg); }
/* Solo se mueve la flecha: el aviso queda quieto para poder cerrarlo bien */
.install-hint[data-arrow]::after { animation: install-hint-bob 1.4s ease-in-out infinite; }
.install-hint[data-arrow="top-right"]::after { animation-name: install-hint-bob-up; }
@keyframes install-hint-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes install-hint-bob { 50% { transform: translateY(5px); } }
@keyframes install-hint-bob-up { 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .install-hint, .install-hint[data-arrow]::after { animation: none; } }
/* En horizontal Safari pone sus botones arriba: sin flecha */
@media (orientation: landscape) and (max-height: 500px) { .install-hint[data-arrow]::after { display: none; } }
body.has-install-hint .login-wrap { padding-bottom: calc(var(--safe-bottom) + 150px); }
/* Dentro de la app: encima de la barra de abajo y del mini reproductor */
.install-hint.with-tabbar { bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px); }
body.has-mini .install-hint.with-tabbar { bottom: calc(var(--tabbar-h) + var(--mini-h) + var(--safe-bottom) + 18px); }

/* App de Android (APK) en las instrucciones */
.apk-box { margin: 0 0 12px; }
.apk-box > p:first-child { margin-top: 0; font-size: 14px; }
.apk-box a.btn { margin: 10px 0 12px; text-decoration: none; }

/* Admin: la tarjeta "Cuentas" se pliega (con muchas cuentas, para llegar antes a lo de abajo) */
button.card-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; min-height: 0; padding: 0; border-radius: 0;
  background: none; color: inherit; font-weight: inherit; text-align: left;
}
.card-toggle-end { display: inline-flex; align-items: center; gap: 6px; }
.card-toggle-end .muted { font-weight: 400; }
button.card-toggle svg { width: 20px; height: 20px; color: var(--muted); transition: transform .15s ease-out; }
.ad-accounts.is-closed button.card-toggle svg { transform: rotate(-90deg); }
.ad-accounts.is-closed .card-head { margin-bottom: 0; }
.ad-accounts.is-closed #adAccountsBody { display: none; }

/* Importar: los dos metodos y lo importado de cada enlace */
.imp-title { margin: 18px 0 8px; font-size: 16px; }
.imp-title .small-text { font-weight: 400; }
.imp-results { margin-top: 12px; padding: 4px 14px; }
.imp-result { padding: 10px 0; border-bottom: 1px solid var(--border); }
.imp-result:last-child { border-bottom: 0; }
.imp-result .tr-title, .imp-result .tr-sub { white-space: normal; }
.imp-result.is-error .tr-title { color: var(--danger); }
.imp-result .hint { margin: 6px 0 0; }
.imp-missing summary { margin-top: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }

/* ---------- Dispositivos (uno solo suena por cuenta, ver js/devices.js) ---------- */
.np-tab span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-self { display: flex; align-items: center; gap: 12px; padding: 4px 0 10px; }
.device-self b, .device-self small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-self small { color: var(--muted); font-size: 12px; }
.device-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--card-2); color: var(--brand); }
.device-icon svg { width: 22px; height: 22px; }
.device-card { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.device-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.device-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-live { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: 11px; font-weight: 700; }
.device-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.device-now img { flex: none; width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--card-2); }
.device-now .grow { min-width: 0; }
.device-now b, .device-now small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-now small { color: var(--muted); font-size: 12px; }
.device-progress { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.device-bar { flex: 1; height: 3px; overflow: hidden; border-radius: 2px; background: var(--card-2); }
.device-bar i { display: block; height: 100%; background: var(--brand); }
.device-progress span { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.device-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 8px 0 4px; }
.device-controls .device-main { width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: #fff; }
.device-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.device-card.remote { border-color: var(--brand); }

/* ---------- Mando ---------- */
.tab-dot { position: absolute; top: 7px; left: calc(50% + 7px); width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.md-hero { border: 1px solid var(--brand); }
.md-hero-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.md-hero-head .grow { display: flex; flex-direction: column; min-width: 0; }
.md-hero-head b { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: var(--card-2); color: var(--brand); }
.md-icon svg { width: 26px; height: 26px; }
.md-icon.small { width: 38px; height: 38px; border-radius: 10px; }
.md-icon.small svg { width: 20px; height: 20px; }
.md-on { color: var(--ok); }
.md-off { color: var(--danger); }
.md-idle { margin: 6px 0 4px; }
.md-track { display: flex; align-items: center; gap: 12px; }
.md-track img { flex: none; width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--card-2); }
.md-track .grow { display: flex; flex-direction: column; min-width: 0; }
.md-track b, .md-track small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-track small { color: var(--muted); }
.md-controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 12px 0 4px; }
.md-controls .icon-btn svg { width: 28px; height: 28px; }
.md-controls .md-main { width: 60px; height: 60px; border-radius: 50%; background: var(--brand); color: var(--brand-contrast); }
.md-volume { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.md-volume input { flex: 1; min-width: 0; -webkit-appearance: none; appearance: none; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
.md-volume input:focus { outline: none; }
.md-volume input::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; background: linear-gradient(to right, var(--brand) var(--p, 100%), rgba(127, 127, 127, .35) var(--p, 100%)); }
.md-volume input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6.5px; border-radius: 50%; background: var(--text); }
.md-volume input::-moz-range-track { height: 5px; border-radius: 3px; background: rgba(127, 127, 127, .35); }
.md-volume input::-moz-range-progress { height: 5px; border-radius: 3px; background: var(--brand); }
.md-volume input::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--text); }
.md-vol-pct { flex: none; width: 40px; text-align: right; font-size: 12px; color: var(--muted); }
.md-go { margin-top: 12px; }
.md-go .btn { flex: 1; justify-content: center; }
.md-sub { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.md-code-form { display: flex; gap: 8px; }
.md-code-form input { flex: 1; min-width: 0; font-size: 22px; letter-spacing: 4px; text-align: center; }
.md-code { margin: 10px 0 2px; text-align: center; font-size: 44px; font-weight: 800; letter-spacing: 6px; font-variant-numeric: tabular-nums; color: var(--brand); }
.md-center { text-align: center; }
.mini-player.remote { box-shadow: 0 0 0 2px var(--brand), var(--shadow); }
.mini-player.remote .mini-sub { color: var(--brand); }
.device-actions button { flex: 1; }
.empty > svg { width: 44px; height: 44px; margin-bottom: 6px; opacity: .6; }
