:root {
  /* Oscuro por defecto: los videos se ven mejor */
  --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: 10.5px; } .tabbar a.active { font-weight: 600; } }
/* Administradores: 6 pestanas, el texto un poco mas pequeno para que quepa "Suscripciones" */
@media (max-width: 440px) { .tabbar.six a { font-size: 10px; } .tabbar.six a.active { font-weight: 600; } }
@media (max-width: 380px) { .tabbar.six a { font-size: 9.5px; } .tabbar.six a span { padding: 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; }

/* ---------- Filas de biblioteca ---------- */
.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); }

/* 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; }

/* ---------- 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; }

/* ---------- 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; }
.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); }
.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; }

/* ---------- 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; }

/* ---------- 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; }

/* ---------- 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; }

/* ---------- 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; }
.hero-actions.centered { justify-content: center; }
.menu-item.danger-text, .menu-item.danger-text svg { color: var(--danger); }

/* ---------- 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; }


/* ---------- Videos: miniaturas, tarjetas y filas ---------- */
.vthumb {
  position: relative; display: block;
  aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 12px; background: var(--card-2);
}
.vthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vthumb.small { flex: none; width: 168px; border-radius: 10px; }
.vbadge {
  position: absolute; right: 6px; bottom: 6px;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 5px; border-radius: 5px;
  background: rgba(0, 0, 0, .82); color: #fff;
  font-size: 12px; font-style: normal; font-weight: 700; line-height: 18px;
  font-variant-numeric: tabular-nums;
}
.vbadge svg { width: 13px; height: 13px; }
.vbadge.live { background: #cc0000; }
.vbadge.inline { position: static; font-size: 10px; line-height: 16px; vertical-align: 1px; }
.vprogress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .35); }
.vprogress i { display: block; height: 100%; background: #ff2d2d; }
.vtitle {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere;
  color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.3;
}
.vmeta {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; margin-top: 2px;
  color: var(--muted); font-size: 12.5px; line-height: 1.35;
}
.is-current .vtitle { color: var(--brand); }
.vmore { flex: none; min-width: 36px; min-height: 36px; margin: -6px -10px 0 0; padding: 6px; color: var(--muted); }
.vmore svg { width: 20px; height: 20px; }

.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 20px 16px; }
.vcard { min-width: 0; cursor: pointer; }
.vcard-info { display: flex; align-items: flex-start; gap: 10px; padding-top: 10px; }
.vcard-avatar { flex: none; }
.vcard-avatar img { display: block; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--card-2); }
.vcard-text { flex: 1; min-width: 0; }
/* En el movil la miniatura va de borde a borde, como en YouTube */
@media (max-width: 559px) {
  .vgrid .vcard .vthumb, .vlist .vcard .vthumb { margin: 0 -16px; border-radius: 0; }
}
.vlist { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 700px) {
  .vlist .vcard { display: flex; gap: 16px; }
  .vlist .vcard .vthumb { flex: none; width: 360px; }
  .vlist .vcard-info { flex: 1; min-width: 0; padding-top: 0; }
}

.vtile { flex: none; display: flex; flex-direction: column; gap: 6px; width: 240px; cursor: pointer; scroll-snap-align: start; }
.vtile .vtitle { font-size: 14px; }
@media (min-width: 700px) { .vtile { width: 280px; } }

.vrow {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 6px 0; border-radius: 10px;
  color: var(--text); text-decoration: none; cursor: pointer;
}
.vrow:active { background: var(--card-2); }
.vrow-text { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-top: 2px; }
.vrow .vtitle { font-size: 14px; }
.vrow-num { flex: none; align-self: center; width: 22px; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-width: 400px) { .vthumb.small { width: 140px; } }

/* Canales */
.crow { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--text); text-decoration: none; }
.crow-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cavatar { flex: none; display: block; border-radius: 50%; object-fit: cover; background: var(--card-2); }
.cavatar.empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.cavatar.empty svg { width: 50%; height: 50%; }
.sub-btn {
  flex: none; min-height: 36px; padding: 6px 16px;
  border-radius: 999px; background: var(--text); color: var(--bg);
  font-size: 14px;
}
.sub-btn.subscribed { background: var(--card-2); color: var(--text); border: 1px solid var(--border); }
.sub-btn.small { min-height: 32px; padding: 4px 12px; font-size: 13px; }

.ch-banner { margin: -8px -16px 0; aspect-ratio: 6.2 / 1; overflow: hidden; background: var(--card-2); }
.ch-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ch-head { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.ch-head h1 { font-size: 22px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.ch-head p { margin: 4px 0 0; font-size: 13px; }
.ch-actions { margin: 14px 0 6px; }
.ch-actions .sub-btn { min-width: 150px; }
.ch-tabs { margin: 14px 0 16px; }
@media (min-width: 900px) { .ch-banner { margin: -8px -28px 0; } }

/* Suscripciones */
.sub-strip { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 16px; padding: 4px 16px 8px; }
.sub-strip::-webkit-scrollbar { display: none; }
.sub-chan { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; color: var(--text); text-decoration: none; }
.sub-chan span { width: 100%; overflow: hidden; font-size: 11px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.welcome { display: flex; align-items: flex-start; gap: 14px; margin-top: 16px; }
.welcome > svg { flex: none; width: 36px; height: 36px; color: var(--brand); }
.welcome p { margin: 4px 0 10px; font-size: 14px; }
.welcome-empty > svg { width: 48px; height: 48px; opacity: .5; }
.welcome-empty button { margin-top: 6px; }

/* Biblioteca */
.lib-art {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; overflow: hidden;
  border-radius: 10px; background: var(--card-2);
}
.lib-art img { width: 100%; height: 100%; object-fit: cover; }
.lib-art.mosaic { display: grid; grid-template-columns: 1fr 1fr; }
.lib-art.mosaic.empty { display: flex; color: var(--muted); }
.lib-art.mosaic.empty svg { width: 24px; height: 24px; }
.lib-art.special { color: #fff; }
.lib-art.special svg { width: 26px; height: 26px; }
.lib-rows .item-row { min-height: 66px; }
.lib-head { margin-top: 24px; }
.lib-art.liked, .coll-special.liked { background: linear-gradient(135deg, #4da3ff, #3b3fd8); }
.lib-art.history, .coll-special.history { background: linear-gradient(135deg, #0f766e, #2563eb); }
.lib-art.later, .coll-special.later { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.lib-art.subs { background: linear-gradient(135deg, #ef4444, #9f1239); }
.coll-hero.wide .coll-art { width: 260px; height: auto; aspect-ratio: 16 / 9; }
@media (max-width: 560px) { .coll-hero.wide .coll-art { width: min(86vw, 340px); height: auto; } }

/* Cargando */
.sk-vcard, .sk-vrow { animation: pulse 1.4s ease-in-out infinite; }
.sk-vcard i { display: block; aspect-ratio: 16 / 9; border-radius: 12px; background: var(--card-2); }
.sk-vcard span { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; }
.sk-vcard b, .sk-vrow b { display: block; width: 80%; height: 12px; border-radius: 6px; background: var(--card-2); }
.sk-vcard b + b, .sk-vrow b + b { width: 50%; }
.sk-vrow { display: flex; gap: 12px; padding: 6px 0; }
.sk-vrow i { flex: none; width: 168px; aspect-ratio: 16 / 9; border-radius: 10px; background: var(--card-2); }
.sk-vrow span { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }

/* ---------- Reproductor ---------- */
:root {
  --watch-bar: 48px;
  --dock-w: min(100vw, 960px);
  --dock-h: min(calc(var(--dock-w) * .5625), 62vh);
}
.player-dock { position: fixed; z-index: 45; overflow: hidden; background: #000; }
.player-dock video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
body.watch-open .player-dock {
  top: calc(var(--safe-top) + var(--watch-bar)); left: 50%;
  width: var(--dock-w); height: var(--dock-h);
  transform: translateX(-50%);
}
@media (min-width: 960px) { body.watch-open .player-dock { border-radius: 12px; } }
body.has-mini .player-dock {
  left: max(14px, calc(50% - 474px));
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 11px);
  width: 89px; height: 50px;
  border-radius: 6px; cursor: pointer;
}
.dock-cover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; }
.dock-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.dock-cover-badge {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .65); color: #fff; font-size: 13px; font-weight: 700;
}
.dock-cover-badge svg { width: 16px; height: 16px; }
.dock-cover.loading .dock-cover-badge { display: none; }
.dock-cover:not(.loading) .dock-spinner { display: none; }
.dock-spinner { position: relative; }
.dock-msg, .dock-upnext {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; background: rgba(0, 0, 0, .82); color: #fff; text-align: center;
}
.dock-msg p { margin: 0; max-width: 420px; }
.dock-msg div, .upnext-card div { display: flex; gap: 8px; justify-content: center; }
.upnext-card { display: flex; flex-direction: column; gap: 6px; max-width: 380px; }
.upnext-card small { opacity: .8; }
.upnext-card b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 16px; }
body.has-mini .dock-msg, body.has-mini .dock-upnext, body.has-mini .dock-cover-badge { display: none; }

.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: 960px; height: var(--mini-h);
  margin: 0 auto; padding: 0 4px 0 104px;
  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: #ff2d2d; }
.mini-main {
  flex: 1; min-width: 0; height: 100%;
  justify-content: flex-start;
  padding: 0 6px;
  background: none; color: var(--text); font-weight: 400; border-radius: 0;
}
.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; }

/* Pantalla del video (hoja a pantalla completa; el video va encima, en el dock) */
.watch-backdrop { z-index: 40 !important; align-items: stretch !important; background: var(--bg) !important; animation: none !important; }
.sheet.watch {
  width: 100%; max-width: none !important;
  height: 100vh; height: 100dvh; max-height: none !important;
  padding: 0 !important; border-radius: 0 !important;
  background: var(--bg);
  overflow-y: auto; overscroll-behavior: contain;
  animation: fade-in .18s ease-out;
}
.watch-top {
  position: fixed; z-index: 46; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 4px;
  height: calc(var(--safe-top) + var(--watch-bar));
  padding: var(--safe-top) 8px 0;
  background: var(--bg);
}
.watch-top .icon-btn svg { width: 26px; height: 26px; }
.watch-top-label { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); font-size: 13px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.watch-spacer { height: calc(var(--safe-top) + var(--watch-bar) + var(--dock-h)); }
.watch-content { max-width: 960px; margin: 0 auto; padding: 12px 16px calc(var(--safe-bottom) + 40px); }
.wtitle { font-size: 18px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.wmeta { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.wchannel { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.wchannel-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.wchannel-link b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wchannel-link small { display: block; color: var(--muted); font-size: 12px; }
.wactions { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.wactions::-webkit-scrollbar { display: none; }
.wchip {
  flex: none; min-height: 36px; padding: 6px 14px; gap: 6px;
  border-radius: 999px; background: var(--card-2); color: var(--text);
  font-size: 13px; font-weight: 600;
}
.wchip svg { width: 18px; height: 18px; }
.wchip.active { color: var(--brand); }
.wdesc { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--card-2); font-size: 14px; cursor: pointer; }
.wdesc-meta { margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.wdesc-text {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; overflow-wrap: anywhere; white-space: pre-line;
}
.wdesc.open .wdesc-text { display: block; }
.wdesc-more { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 700; }
.ts { display: inline; min-height: 0; padding: 0; background: none; color: var(--brand); font-size: inherit; font-weight: 600; }
.wcomments {
  width: 100%; justify-content: flex-start; gap: 10px;
  margin-top: 12px; padding: 12px;
  border-radius: 12px; background: var(--card-2); color: var(--text);
}
.wcomments span { flex: 1; text-align: left; }
.wqueue { margin-top: 14px; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; }
.wqueue-head {
  width: 100%; justify-content: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 0;
  background: var(--card); color: var(--text); font-weight: 400; text-align: left;
}
.wqueue-head b, .wqueue-head small { display: block; }
.wqueue-head small { color: var(--muted); font-size: 12px; }
.wqueue-rows { max-height: 360px; overflow-y: auto; padding: 4px 10px; }
.wnext-head { display: flex; align-items: center; gap: 10px; margin: 22px 0 8px; }
.wnext-head h2 { flex: 1; font-size: 17px; }
.wautoplay { flex: none; width: auto; gap: 8px; font-size: 13px; color: var(--muted); }
.wautoplay > span { flex: none; }

.comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.comment-head { font-size: 13px; }
.comment-head small { color: var(--muted); }
.comment-text { margin-top: 2px; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.comment-foot { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.comment-foot svg { width: 14px; height: 14px; }
.comments-sheet { max-width: 640px; }
.menu-sheet .menu-head .vthumb.small { width: 120px; }
.mi-pad { flex: none; display: inline-block; width: 22px; }
.setting-block { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.setting-block small { font-size: 12px; }
.skip-row { padding: 6px 0; font-size: 14px; }
.admin-link { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.admin-link > svg { flex: none; width: 24px; height: 24px; color: var(--brand); }
.admin-link > svg:last-child { width: 18px; height: 18px; color: var(--muted); transform: rotate(180deg); }
.admin-link b, .admin-link small { display: block; }
.admin-link small { color: var(--muted); font-size: 12px; }

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

/* ---------- Modo TV (mando a distancia, ver js/tvnav.js) ---------- */
html.tv body { font-size: 16px; }
html.tv .vmore { display: none; }
html.tv :focus { outline: none; }
html.tv a:focus, html.tv button:focus, html.tv input:focus, html.tv select:focus, html.tv textarea:focus, html.tv [tabindex]:focus {
  outline: 3px solid var(--brand); outline-offset: 3px;
}
html.tv .vcard:focus, html.tv .vtile:focus, html.tv .vrow:focus { outline: none; }
html.tv .vthumb { transition: transform .12s ease-out; }
html.tv .vcard:focus .vthumb, html.tv .vtile:focus .vthumb, html.tv .vrow:focus .vthumb {
  outline: 4px solid #fff; outline-offset: 2px; transform: scale(1.04);
}
html.tv .vcard:focus .vtitle, html.tv .vtile:focus .vtitle, html.tv .vrow:focus .vtitle { color: var(--brand); }
html.tv .tabbar a:focus { outline-offset: -5px; background: var(--card-2); }
html.tv a, html.tv button, html.tv input, html.tv [tabindex] { scroll-margin: 96px 32px 110px; }
html.tv .mini-player, html.tv body.has-mini .player-dock { display: none !important; }
html.tv body.has-mini .view { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 28px); }

/* Video a pantalla completa con sus controles (tvOsd) */
html.tv body.watch-open .player-dock {
  top: 0; left: 0; width: 100vw; height: 100vh;
  transform: none; border-radius: 0; z-index: 47;
}
html.tv .watch-top, html.tv .watch-spacer, html.tv .watch-content { display: none; }
html.tv .sheet.watch { background: #000; }
html.tv .dock-cover-badge { left: 40px; bottom: 32px; font-size: 16px; }
html.tv .dock-msg, html.tv .dock-upnext { font-size: 18px; }
.tv-osd { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: space-between; color: #fff; }
.tv-osd-top { padding: 24px 40px 50px; background: linear-gradient(rgba(0, 0, 0, .78), transparent); }
.tv-osd-top h2 {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; font-size: 24px; line-height: 1.25;
}
.tv-osd-top p { margin: 6px 0 0; font-size: 15px; opacity: .8; }
.tv-osd-bottom { padding: 40px 40px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .88) 30%); }
.tv-seek { display: flex; align-items: center; gap: 14px; padding: 6px 4px; border-radius: 8px; }
.tv-seek-bar { flex: 1; height: 6px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .3); }
.tv-seek-bar i { display: block; height: 100%; background: #ff2d2d; }
.tv-seek:focus .tv-seek-bar { height: 10px; }
.tv-seek span { min-width: 130px; font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }
.tv-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tv-btn { min-height: 38px; padding: 6px 14px; gap: 7px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 14px; }
.tv-btn svg { width: 18px; height: 18px; }
.tv-btn.active { color: var(--brand); }
html.tv .tv-btn:focus { outline: none; background: #fff; color: #111; }
.tv-related-head { margin: 12px 0 4px; font-size: 15px; font-weight: 700; }
.tv-related { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; padding: 8px 6px 10px; }
.tv-related::-webkit-scrollbar { display: none; }
.tv-related .vtile { width: 170px; gap: 4px; }
.tv-related .vtile .vtitle { -webkit-line-clamp: 1; font-size: 13px; }
.tv-related .vtile .vmeta { display: none; }
.tv-related .vtile .vtitle { color: #fff; }

/* Pantalla de acceso en la tele: codigo y QR */
.tv-only { display: none !important; }
html.tv .tv-only { display: inline-flex !important; }
html.tv .login-card { max-width: 760px; }
.tv-pair { display: flex; align-items: center; gap: 24px; }
.tv-pair-text { flex: 1; min-width: 0; }
.tv-pair-text p { margin: 6px 0; }
.tv-code { margin: 14px 0 8px; font-size: 54px; font-weight: 900; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.tv-qr { flex: none; width: 200px; height: 200px; padding: 10px; border-radius: 14px; background: #fff; }
.tv-qr svg { display: block; width: 100%; height: 100%; }
.tv-qr:empty { display: none; }
@media (max-width: 600px) { .tv-pair { flex-direction: column; } }

/* Vincular una tele (desde el movil) */
.link-card { max-width: 520px; margin: 12px auto; text-align: center; }
.link-card .code-input { text-transform: uppercase; }
.link-icon svg { width: 44px; height: 44px; color: var(--brand); }
