:root {
  --acc: #e8175d;
  --acc-ink: #fff;
  --acc-2: color-mix(in srgb, var(--acc) 72%, #000);
  --acc-3: color-mix(in srgb, var(--acc) 85%, #fff);
  --navy: #08082a;
  --ink: #fff;
  --ink-2: rgba(255, 255, 255, .78);
  --ink-3: rgba(255, 255, 255, .52);
  --line: rgba(255, 255, 255, .14);
  --row: linear-gradient(90deg, rgba(86, 80, 240, .62), rgba(66, 60, 210, .45));
  --row-hi: linear-gradient(90deg, rgba(126, 116, 255, .9), rgba(92, 82, 240, .7));
  --btn: linear-gradient(180deg, #5d57ff, #4640e0);
  --gold: #ffd84d;
  --danger: #ff4d6a;
  --ok: #3ddc97;
  --font: "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--navy);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button[disabled] { opacity: .45; cursor: default; }
a { color: inherit; }
img { display: block; }
svg { flex: none; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- Fondo ---------- */
#bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(55% 65% at -8% 72%, color-mix(in srgb, var(--acc) 70%, transparent), transparent 70%),
    radial-gradient(70% 80% at 108% 108%, #2a3dff, transparent 70%),
    linear-gradient(168deg, #05051a 0%, #0c0a3e 38%, #171a9e 78%, #1f35d8 100%);
}
#bg svg { position: absolute; left: 0; bottom: -4%; width: 100%; height: 72%; opacity: .45; }

/* ---------- Logo ---------- */
.logo-svg { width: 56px; height: auto; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .45)); }

/* ---------- Inicio ---------- */
.home {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) clamp(16px, 4vw, 64px) max(16px, env(safe-area-inset-bottom));
}
/* Arriba: el usuario a la izquierda, el logo en medio y la versión a la derecha, a la misma altura */
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; margin: clamp(4px, 2vh, 24px) 0 clamp(18px, 5vh, 56px); }
.home-top .brand { margin: 0; }
.home-left { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; justify-self: start; }
.home-right { justify-self: end; text-align: right; }
.home-right .ver { font-weight: 800; font-size: clamp(18px, 2.2vw, 34px); color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); white-space: nowrap; }
@media (max-width: 600px) { .home-right .ver { font-size: 15px; } .user-chip span { max-width: 28vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px; background: rgba(8, 8, 40, .45); font-weight: 600; font-size: clamp(14px, 1.4vw, 20px); }
.user-chip:hover, .user-chip:focus-visible { box-shadow: 0 0 0 3px #fff; outline: none; }

/* ---------- Usuarios ---------- */
.avatar {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 800; font-size: 16px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25);
}
.avatar.big { width: clamp(84px, 9vw, 130px); height: clamp(84px, 9vw, 130px); border-radius: 22%; font-size: clamp(30px, 3vw, 46px); }
.avatar svg { width: 46%; height: 46%; }
/* Con foto: la imagen ocupa el círculo entero */
.avatar-btn { position: relative; flex: none; border-radius: 50%; }
.avatar-btn > i { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--acc); color: #fff; box-shadow: 0 0 0 2px var(--navy); }
.avatar-btn > i svg { width: 12px; height: 12px; }
.avatar-btn:hover .avatar, .avatar-btn:focus-visible .avatar { box-shadow: 0 0 0 3px #fff; }
.avatar-btn:focus-visible { outline: none; }
.photo-preview { display: grid; place-items: center; margin: 4px 0 18px; }
/* «¿Quién está viendo?»: cabecera con flecha y título; cuadrícula de columnas iguales; botones en fila */
.who-page .page-head h1 { flex: 1; text-align: center; padding-right: 52px; margin: 0; font-size: clamp(24px, 2.8vw, 40px); font-weight: 600; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: clamp(14px, 2vw, 28px) clamp(10px, 1.5vw, 20px); max-width: 1180px; margin: 0 auto; }
.who-grid .who { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; padding: 14px 8px 12px; border-radius: 16px; font-size: clamp(15px, 1.4vw, 19px); font-weight: 600; color: var(--ink-2); text-align: center; transition: transform .15s, background .15s; }
.who-av { position: relative; display: block; }
.who-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; overflow-wrap: anywhere; }
.who-grid .who:hover, .who-grid .who:focus-visible { transform: scale(1.04); color: #fff; outline: none; background: rgba(255, 255, 255, .06); }
.who-grid .who:hover .avatar, .who-grid .who:focus-visible .avatar { box-shadow: 0 0 0 4px #fff; }
.who-grid .who.on { color: #fff; background: rgba(255, 255, 255, .08); }
.who-grid .who.on .avatar { box-shadow: 0 0 0 4px var(--gold); }
.who-grid .who.add .avatar { background: rgba(255, 255, 255, .12); }
/* Conectado ahora: punto verde sobre la foto (rojo si está viendo algo) y etiqueta «En línea» / «Viendo: …» */
.online-dot { position: absolute; bottom: -4px; right: -4px; width: 22px; height: 22px; border-radius: 50%; background: #2fd36b; box-shadow: 0 0 0 3px #0b0b2e, 0 0 10px rgba(47, 211, 107, .8); }
.online-dot.live { background: #ff4d6d; box-shadow: 0 0 0 3px #0b0b2e, 0 0 10px rgba(255, 77, 109, .8); animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 3px #0b0b2e, 0 0 18px rgba(255, 77, 109, 1); } }
@media (prefers-reduced-motion: reduce) { .online-dot.live { animation: none; } }
.presence { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 1px 9px; border-radius: 99px; background: rgba(47, 211, 107, .18); color: #7ff0a8; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presence::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2fd36b; }
.presence.live { background: rgba(255, 77, 109, .18); color: #ffb3c0; }
.presence.live::before { background: #ff4d6d; }
.who-me { padding: 1px 10px; border-radius: 99px; background: var(--gold); color: #1b1b2b; font-size: 12px; font-weight: 800; }
.who-lock { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, .7); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.who-lock svg { width: 15px; height: 15px; }
.who-foot { max-width: 640px; margin: clamp(24px, 5vh, 44px) auto 0; }

/* Grupo de botones: en una fila y todos del mismo ancho (en el móvil, dos por fila; si son impares, el último a lo ancho) */
.btn-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.btn-row .btn { width: 100%; }
.who-list { display: grid; gap: 8px; margin-bottom: 16px; }
.who-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, .22); }
.who-row .who-lock { position: static; }
/* Con el botón de acceso caben cuatro botones: más juntos y el nombre se recorta si es largo */
.who-list { grid-template-columns: minmax(0, 1fr); }
.who-row { gap: 6px; }
.who-tags .access-badge { white-space: normal; }
.who-row .avatar { flex: none; }
.who-info { flex: 1; min-width: 0; margin-left: 4px; }
/* El nombre y los apellidos enteros (nunca con «…»): si los botones no caben al lado, pasan a una fila
   debajo, a la derecha */
.who-row { flex-wrap: wrap; }
.who-info { flex: 1 1 180px; }
.who-info b { display: block; white-space: normal; overflow-wrap: break-word; line-height: 1.25; }
.who-btns { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-left: auto; }
.sheet.small.who-sheet { width: min(720px, 96vw); max-width: none; }
.who-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 3px; }
.who-tags:empty { display: none; }
.who-tags .who-lock svg { width: 14px; height: 14px; }
.who-row .icon-btn { width: 34px; height: 34px; }
.who-row .icon-btn svg { width: 19px; height: 19px; }
.who-role { padding: 2px 8px; border-radius: 99px; background: var(--acc); color: var(--acc-ink); font-size: 12px; font-weight: 700; }
.acc-user { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.acc-user .avatar.big { width: 60px; height: 60px; font-size: 24px; }
/* Foto y nombre en la primera línea (el nombre entero, sin que lo tapen los botones); debajo, los dos botones
   en una fila del mismo ancho */
.acc-user div { flex: 1 1 calc(100% - 80px); min-width: 0; }
.acc-user small { display: block; color: var(--ink-3); font-weight: 600; }
.acc-user b { display: block; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.acc-user { flex-wrap: wrap; row-gap: 14px; }
.acc-user .btn { flex: 1 1 0; height: 48px; padding: 0 16px; font-size: 16px; justify-content: center; }
@media (max-width: 600px) { .acc-user .btn { padding: 0 8px; font-size: 15px; white-space: nowrap; gap: 6px; } }
.lock .avatar.big { width: 96px; height: 96px; font-size: 38px; }
.expiry { font-weight: 600; font-size: clamp(14px, 1.7vw, 26px); text-align: right; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.brand { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: clamp(6px, 3vh, 36px) 0 clamp(18px, 5vh, 56px); }
.brand .logo-svg { width: clamp(70px, 9vw, 130px); }
.brand span { font-weight: 800; font-size: clamp(18px, 2vw, 28px); letter-spacing: .03em; }

.dash {
  --gap: clamp(12px, 1.8vw, 30px);
  display: grid;
  grid-template-columns: 1.15fr 1.25fr 1.15fr;
  gap: var(--gap);
  width: 100%; max-width: 1560px;
  margin: 0 auto;
}
/* Arriba Películas, Series y Radio; abajo Favoritos y Cambiar lista (o solo Favoritos, a todo lo ancho) */
.dash-mid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); }
.dash-mid .tile { grid-column: span 2; }
.dash-mid .tile.half { grid-column: span 3; }
.dash-mid .tile.wide { grid-column: 1 / -1; }
.dash-side { display: grid; grid-template-rows: repeat(5, 1fr); gap: var(--gap); }

.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 130px;
  padding: 18px 10px;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--acc-3) 0%, var(--acc) 45%, var(--acc-2) 100%);
  color: var(--acc-ink);
  font-weight: 600;
  font-size: clamp(15px, 1.5vw, 23px);
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .38);
  transition: transform .15s, box-shadow .15s;
}
.tile svg { width: clamp(42px, 5vw, 76px); height: auto; stroke-width: 1.6; }
.tile.big { font-size: clamp(22px, 2.5vw, 38px); }
.tile.big svg { width: clamp(90px, 12vw, 190px); stroke-width: 1.3; }
.tile:hover, .tile:focus-visible { transform: scale(1.03); box-shadow: 0 0 0 4px #fff, 0 16px 44px rgba(0, 0, 0, .5); outline: none; }

.out-btn {
  display: flex; align-items: center; gap: clamp(14px, 1.6vw, 26px);
  min-height: 70px;
  padding: 0 clamp(16px, 2vw, 36px);
  border: 3px solid var(--acc);
  border-radius: 10px;
  background: rgba(8, 8, 40, .38);
  font-weight: 600;
  font-size: clamp(15px, 1.5vw, 23px);
  text-align: left;
  transition: background .15s, box-shadow .15s, transform .15s;
}
.out-btn svg { width: clamp(28px, 2.6vw, 40px); height: auto; }
.out-btn:not([disabled]):hover, .out-btn:focus-visible { background: color-mix(in srgb, var(--acc) 32%, transparent); box-shadow: 0 0 0 3px #fff; transform: scale(1.02); outline: none; }

.home-foot {
  margin-top: auto;
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  color: var(--ink-2);
  font-size: 14px;
}
.home-foot b { color: #fff; }
.home-foot .ver { font-weight: 800; font-size: clamp(18px, 2.2vw, 34px); color: #fff; }

@media (max-width: 899px) {
  .dash { grid-template-columns: 1fr 1fr; }
  .tile.big { grid-column: 1 / -1; min-height: 150px; flex-direction: row; gap: 20px; }
  .tile.big svg { width: 76px; }
  .dash-mid, .dash-side { grid-column: 1 / -1; }
  .dash-side { grid-template-rows: none; }
  .tile { min-height: 116px; }
  .out-btn { min-height: 60px; }
}

/* ---------- Páginas (listas, ajustes) ---------- */
.page {
  --pad: clamp(16px, 4vw, 64px);
  min-height: 100dvh;
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 var(--pad) max(40px, env(safe-area-inset-bottom));
}
/* La cabecera (flecha para volver y título) se queda arriba al desplazarse, en todas las páginas */
.page-head {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px; min-height: 56px;
  margin: 0 calc(var(--pad) * -1) clamp(16px, 3vh, 32px);
  padding: max(12px, env(safe-area-inset-top)) var(--pad) 10px;
  background: linear-gradient(180deg, rgba(8, 8, 42, .94), rgba(8, 8, 42, .82));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.page-head h1 { margin: 0; font-size: clamp(24px, 2.8vw, 40px); font-weight: 600; }
.page-head.center h1 { flex: 1; text-align: center; padding-right: 52px; }
.page-head .sep { width: 3px; height: 42px; border-radius: 2px; background: rgba(255, 255, 255, .85); }
.back { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 12px; color: #a9c4ff; }
.back svg { width: 32px; height: 32px; }
.back:hover, .back:focus-visible { background: rgba(255, 255, 255, .12); outline: none; }

.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(14px, 2vw, 32px); }
.pl-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 170px;
  padding: 20px 22px;
  border-radius: 6px;
  text-align: left;
  background: linear-gradient(150deg, rgba(150, 132, 255, .88), rgba(108, 90, 240, .78));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .32);
  transition: transform .15s, box-shadow .15s;
  min-width: 0;
}
.pl-card b { font-size: 21px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-card small { font-family: var(--mono); font-size: 12px; opacity: .75; word-break: break-all; }
.pl-card .pl-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; }
.pl-card.on { background: linear-gradient(150deg, rgba(214, 206, 255, .96), rgba(160, 146, 255, .9)); color: #17134d; box-shadow: 0 0 0 4px #fff, 0 12px 32px rgba(0, 0, 0, .32); }
.pl-card:hover, .pl-card:focus-visible { transform: scale(1.02); box-shadow: 0 0 0 4px #fff, 0 14px 40px rgba(0, 0, 0, .4); outline: none; }
.pl-card.add { align-items: center; justify-content: center; gap: 12px; font-size: 18px; font-weight: 600; text-align: center; }
.pl-card.add svg { width: 70px; height: 70px; padding: 16px; border-radius: 50%; background: rgba(96, 108, 255, .95); color: #fff; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  max-width: 100%;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .28);
  color: #fff;
  font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pill.ok { background: #1f6bff; }
.pill.err { background: var(--danger); }
/* «Comprobar listas»: funciona (verde) o aviso de la cuenta (ámbar) */
.pill.good { background: #1e8a55; }
.pill.warn { background: #b86e00; }
/* Fechas de la lista: añadida a la app y última recarga */
.pl-card .pl-dates { font-size: 12.5px; opacity: .85; }
.page-head .head-act { margin-left: auto; }
.disclaimer { max-width: 920px; margin: clamp(30px, 7vh, 80px) auto 0; text-align: center; color: var(--ink-2); line-height: 1.5; }
.disclaimer b { color: #fff; font-size: 1.15em; }

.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: clamp(12px, 1.5vw, 22px); }
.set-tile {
  display: flex; align-items: center; gap: 16px;
  min-height: 88px;
  padding: 12px 20px;
  border-radius: 8px;
  background: linear-gradient(160deg, var(--acc-3), var(--acc) 55%, var(--acc-2));
  color: var(--acc-ink);
  font-size: 17px; font-weight: 600;
  line-height: 1.2;
  text-align: left;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .32);
  transition: transform .15s, box-shadow .15s;
}
.set-tile svg { width: 30px; height: 30px; }
.set-tile small { display: block; margin-top: 3px; font-size: 13px; font-weight: 500; opacity: .85; }
.set-tile:hover, .set-tile:focus-visible { transform: scale(1.03); box-shadow: 0 0 0 4px #fff, 0 12px 30px rgba(0, 0, 0, .4); outline: none; }
.set-foot { margin-top: 36px; text-align: center; color: var(--ink-2); font-weight: 600; font-size: 18px; line-height: 1.5; max-width: 760px; margin-inline: auto; }

.setup .brand { margin-top: clamp(10px, 6vh, 60px); }
.setup-box {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(20, 18, 80, .7);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.setup-box h1 { margin: 0 0 8px; font-size: 24px; font-weight: 600; }
.links { display: grid; gap: 8px; margin: 0 0 16px; }
.ios-steps { margin: 0 0 16px; padding-left: 22px; line-height: 1.5; }
/* Prueba de 48 horas y códigos de acceso */
.trial-pill { padding: 4px 12px; border-radius: 999px; background: rgba(255, 216, 77, .16); color: var(--gold); font-size: clamp(13px, 1.3vw, 18px); font-weight: 700; white-space: nowrap; }
.dev-tv .trial-pill { font-size: 2.6vh; }
.req-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(232, 23, 93, .3); color: #fff; }
.req-pill svg { width: 1.1em; height: 1.1em; }
.req-pill:hover, .req-pill:focus-visible { box-shadow: 0 0 0 3px #fff; outline: none; }
.who-pending { padding: 1px 8px; border-radius: 99px; background: rgba(255, 216, 77, .18); color: var(--gold); font-size: 12px; font-weight: 700; }
.icon-btn.ok { color: var(--ok); }
.icon-btn.danger { color: var(--danger); }
.setup-box > .spinner { margin: 0 auto 14px; }
/* Personas que este aparato recuerda: un toque para entrar */
.known { margin-bottom: 6px; }
.known .hint { margin: 0 2px 8px; }
.known-list { display: grid; gap: 8px; }
.known-row { display: flex; align-items: center; gap: 6px; }
.known-user { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 12px; border-radius: 10px; background: var(--btn); color: #fff; font-size: 17px; font-weight: 700; text-align: left; }
.known-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.known-user:hover, .known-user:focus-visible { box-shadow: 0 0 0 3px #fff; outline: none; }
.known-or { margin: 14px 0 8px; color: var(--ink-3); font-size: 13px; text-align: center; }
.check { display: flex; align-items: center; gap: 10px; margin: 2px 2px 14px; color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--acc); }
.dev-tv .known-user { height: 7.5vh; font-size: 2.9vh; }
.dev-tv .check { font-size: 2.5vh; margin-bottom: 1.5vh; }
/* En la tele, las pantallas de entrar/activar caben sin desplazarse: logo pequeño y nombre y apellidos en una fila */
.dev-tv .setup { padding-top: 3vh; padding-bottom: 2vh; }
.dev-tv .setup .brand { margin: 0 0 2vh; }
.dev-tv .setup .brand .logo-svg { width: 8vh; }
.dev-tv .setup .brand span { font-size: 3.2vh; }
.dev-tv .setup-box { padding: 3vh 3vw; }
.dev-tv .setup-box h1 { font-size: 4vh; margin-bottom: 1.5vh; }
.dev-tv .setup-box .field { margin-bottom: 1.5vh; }
.dev-tv .setup-box .input, .dev-tv .setup-box .btn { height: 7.5vh; font-size: 2.9vh; }
.dev-tv .setup-box .btn + .btn { margin-top: 1.2vh; }
.dev-tv .setup-box .dialog-text { font-size: 2.7vh; margin-bottom: 1.5vh; }
.access-badge { padding: 2px 8px; border-radius: 99px; background: rgba(61, 220, 151, .16); color: var(--ok); font-size: 12px; font-weight: 700; white-space: nowrap; }
.access-badge.off { background: rgba(255, 77, 106, .16); color: var(--danger); }
/* Guía de programación: «ahora» a la derecha de cada canal en vivo (en lista) y la guía de un canal */
.ch .name-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch .name-wrap .name { flex: none; }
.ch .epg-now { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.ch .epg-now:empty { display: none; }
.ch:focus-visible .epg-now, .ch.playing .epg-now { color: var(--ink-2); }
#rows.grid .ch .name-wrap { width: 100%; }
#rows.grid .ch .epg-now { display: none; }
.dev-tv .ch .epg-now { font-size: 2.2vh; }
.guide { display: grid; gap: 4px; max-height: 62vh; overflow-y: auto; }
.guide > .spinner { margin: 16px auto 8px; }
.guide-day { margin: 10px 2px 4px; color: var(--gold); font-size: 13px; font-weight: 800; }
.guide-day::first-letter { text-transform: uppercase; }
.guide-row { display: flex; gap: 12px; padding: 8px 10px; border-radius: 6px; background: rgba(0, 0, 0, .2); }
.guide-row.past { opacity: .55; }
.guide-row.on { background: color-mix(in srgb, var(--acc) 30%, rgba(0, 0, 0, .25)); box-shadow: inset 3px 0 0 var(--acc); }
.guide-row.picked { background: rgba(255, 213, 74, .16); box-shadow: inset 3px 0 0 var(--gold); }
/* Canales que no funcionan (han fallado varias veces): apagados y con su aviso */
.ch.dead { opacity: .5; }
.ch.dead:focus-visible { opacity: .85; }
.dead-tag { flex: none; padding: 2px 8px; border-radius: 6px; background: rgba(255, 90, 90, .22); color: #ffb3b3; font-size: 12px; font-weight: 700; white-space: nowrap; }
#rows.grid .dead-tag { display: none; }
/* «NUEVO»: llegó al servidor en los últimos 7 días (en la cuadrícula, sobre el cartel) */
.new-tag { flex: none; padding: 2px 8px; border-radius: 6px; background: #2fa86a; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
#rows.grid .new-tag { position: absolute; top: 8px; left: 8px; z-index: 2; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.dev-tv .new-tag { font-size: 1.9vh; }
/* Carpeta «🇪🇸 España» y «‹ Todos los grupos» en la columna de grupos */
.grp.folder { font-weight: 700; }
.grp.folder small { color: var(--gold); }
.dev-tv .dead-tag { font-size: 2vh; }

/* Programas futuros: la campana del aviso (tenue; dorada si está puesto) */
.guide-row.future { cursor: pointer; align-items: center; }
.guide-row > div { flex: 1; min-width: 0; }
.guide-bell { flex: none; width: 22px; height: 22px; color: var(--ink-3); opacity: .45; }
.guide-bell svg { width: 100%; height: 100%; }
.guide-bell.on, .gs-bell.on { color: var(--gold); opacity: 1; }
.gs-bell { color: var(--ink-3); }
.guide-row:focus-visible { box-shadow: inset 0 0 0 2px #fff; outline: none; }
.guide-time { flex: none; width: 3.2em; color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.guide-row b { display: block; }
.guide-row small { display: block; margin-top: 4px; color: var(--ink-2); line-height: 1.4; }
.epg-result { color: var(--ok); font-weight: 600; }
/* Usuarios conectados */
.act-list { display: grid; gap: 8px; max-height: 64vh; overflow-y: auto; }
.act-list > .spinner { margin: 20px auto; }
.act-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .22); opacity: .75; }
.act-row.online, .act-row.watching { opacity: 1; }
.act-row.watching { background: color-mix(in srgb, var(--acc) 22%, rgba(0, 0, 0, .25)); }
.act-info { flex: 1; min-width: 0; }
.act-info > b { display: block; }
.act-info > small { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; color: var(--ink-3); font-size: 12.5px; }
.act-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.act-dot.on { background: var(--ok); }
.act-dot.live { background: #ff2d55; box-shadow: 0 0 8px #ff2d55; }
.act-what { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px; border-radius: 8px; background: rgba(0, 0, 0, .25); }
.act-what img { width: 52px; height: 36px; flex: none; object-fit: contain; border-radius: 4px; background: rgba(0, 0, 0, .3); }
.act-what b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-what small { display: block; color: var(--ink-3); font-size: 12px; }
.act-what > div { min-width: 0; }

/* ---------- Ficha de una película (en sus opciones): cartel, año · duración · nota · género, sinopsis, reparto ---------- */
.sheet.minfo-sheet { width: min(860px, 96vw); max-width: none; }
.minfo { position: relative; display: flex; gap: 18px; align-items: flex-start; min-height: 60px; margin-bottom: 16px; padding: 14px; border-radius: 12px; background: rgba(0, 0, 0, .25); overflow: hidden; }
.minfo > .spinner { margin: 8px 0; }
.minfo > .hint { align-self: center; }
/* El fondo de la película, oscurecido, detrás del texto */
.minfo.has-bd::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 10, 40, .92) 30%, rgba(10, 10, 40, .7)), var(--bd) center / cover no-repeat; z-index: 0; }
.minfo > * { position: relative; z-index: 1; }
.mi-poster { width: 130px; flex: none; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.mi-text { flex: 1; min-width: 0; }
.mi-orig { display: block; color: var(--ink-3); font-style: italic; }
.mi-meta { margin: 0 0 8px; color: var(--gold); font-weight: 700; }
.mi-plot { margin: 0 0 10px; line-height: 1.5; max-height: 9.5em; overflow-y: auto; }
.mi-dir { margin: 0 0 8px; color: var(--ink-2); }
.mi-cast { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink-2); }
.mi-cast b { margin-right: 4px; }
.mi-cast .chip { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: var(--ink); font-size: 13.5px; font-weight: 600; }
.mi-cast .chip:hover, .mi-cast .chip:focus-visible { background: #fff; color: #10103a; outline: none; }
.chip.trailer { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 14px; border-radius: 999px; background: #ff2d55; color: #fff; font-weight: 700; }
.chip.trailer svg { width: 14px; height: 14px; }
.chip.trailer:hover, .chip.trailer:focus-visible { background: #fff; color: #10103a; outline: none; }
.mi-src { display: block; margin-top: 10px; color: var(--ink-3); font-size: 12px; }
@media (max-width: 599px) {
  .minfo { flex-direction: column; align-items: center; text-align: left; }
  .mi-poster { width: 110px; }
}
.dev-tv .mi-poster { width: 20vh; }
.dev-tv .mi-plot { font-size: 2.6vh; max-height: 26vh; }
.dev-tv .mi-meta, .dev-tv .mi-dir { font-size: 2.5vh; }
.dev-tv .mi-cast .chip { font-size: 2.3vh; }

/* ---------- Portada: «Seguir viendo» (películas a medias y series) ---------- */
.cw { width: 100%; max-width: 1560px; margin: clamp(16px, 3vh, 36px) auto 0; }
.cw h3 { margin: 0 0 10px; font-size: clamp(16px, 1.6vw, 24px); }
/* Desplegable de los deportes de la portada: el título de la fila que se ve */
.sport-pick { display: inline-flex; align-items: center; gap: .4em; max-width: 100%; padding: .15em .6em; margin-left: -.6em; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sport-pick:hover, .sport-pick:focus-visible { outline: none; background: rgba(128, 128, 128, .18); box-shadow: 0 0 0 2px currentColor; }
.sport-caret { font-size: .8em; opacity: .8; }
.cw-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 4px 10px; scrollbar-width: thin; }
.cw-card { flex: none; width: clamp(120px, 11vw, 170px); text-align: left; border-radius: 10px; padding: 0; background: none; color: inherit; }
.cw-img { position: relative; display: grid; place-items: center; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .1); }
.cw-img img { width: 100%; height: 100%; object-fit: cover; }
.cw-img b { font-size: 28px; color: var(--ink-3); }
.cw-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0, 0, 0, .6); }
.cw-bar i { display: block; height: 100%; background: var(--acc); }
.cw-name { display: block; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.cw-card small { display: block; color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-card:hover .cw-img, .cw-card:focus-visible .cw-img { box-shadow: 0 0 0 3px #fff; }
.cw-card:focus-visible { outline: none; }
/* En la tele la portada ocupa la pantalla: con «Seguir viendo», baja por debajo (se llega con ▼) */
/* Con filas debajo (Recomendado, Seguir viendo, Novedades) la portada se alarga y se baja con el mando.
   (Con la clase «has-rows», que pone la app: el navegador del Fire TV no entiende :has) */
.dev-tv .home.has-rows, .dev-tv body.has-radio .home.has-rows { height: auto; min-height: 100vh; overflow: visible; }
.dev-tv .home.has-rows .dash { height: 62vh; flex: none; }
.dev-tv .home .cw { scroll-margin: 6vh 0; }
.dev-tv .cw-card { width: 15vh; }
.dev-tv .cw-name { font-size: 2.4vh; }
.dev-tv .cw-card small { font-size: 2vh; }

/* ---------- Recomendaciones: elegir a quién y la fila de la portada ---------- */
.rec-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.rec-chips:empty { margin: 0 0 12px; }
.rec-chips .chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--acc) 35%, rgba(0, 0, 0, .25)); font-weight: 600; }
.rec-chips .chip button { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .35); color: #fff; }
.rec-chips .chip button svg { width: 13px; height: 13px; }
/* «Mis contactos»: sin marcar, tenues; marcados, con el color de la app */
.rec-chips .chip.pick { background: rgba(255, 255, 255, .12); }
.rec-chips .chip.pick.on { background: color-mix(in srgb, var(--acc) 70%, rgba(0, 0, 0, .2)); }
.rec-chips .chip .chip-main { width: auto; height: auto; padding: 0; border-radius: 0; background: none; font: inherit; color: inherit; }
.rec-chips .chip .chip-main:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.recs h3 { display: flex; align-items: center; gap: 8px; }
.recs h3 svg { width: 22px; height: 22px; color: var(--gold); }
.rec-card { position: relative; flex: none; }
/* «⋮» sobre la esquina de cada portada de la portada (en «Recomendado», debajo de la ✕) */
.cw-wrap { position: relative; flex: none; }
.cw-more { position: absolute; top: 6px; right: 6px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .62); color: #fff; }
.cw-more svg { width: 16px; height: 16px; }
.rec-card .cw-more, .rec-x ~ .cw-more { top: 40px; }
.cw-more:hover, .cw-more:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff; background: rgba(0, 0, 0, .85); }
.dev-tv .cw-more { width: 4.2vh; height: 4.2vh; }
.dev-tv .rec-card .cw-more, .dev-tv .rec-x ~ .cw-more { top: 6vh; }
.rec-new { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 6px; background: var(--gold); color: #10103a; font-size: 12px; font-style: normal; font-weight: 800; }
.rec-msg { font-style: italic; color: var(--ink-2) !important; }
.rec-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; }
.rec-x svg { width: 16px; height: 16px; }
.rec-x:focus-visible, .rec-x:hover { background: #fff; color: #10103a; outline: none; }
.rec-card.new .cw-img { box-shadow: 0 0 0 2px var(--gold); }

/* ---------- Ficha de una serie: botones, temporadas y episodios ---------- */
.ch .eps { margin-top: 2px; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.dev-tv .ch .eps { font-size: 2.2vh; }
.series-btns { margin: 0 0 14px; }
.seasons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ep-list { display: grid; gap: 6px; max-height: 40vh; overflow-y: auto; padding: 2px; }
.ep-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .22); cursor: pointer; }
.ep-row:hover, .ep-row:focus-visible { box-shadow: inset 0 0 0 2px #fff; outline: none; }
.ep-row.next { background: color-mix(in srgb, var(--acc) 26%, rgba(0, 0, 0, .25)); }
.ep-row.seen .ep-name { color: var(--ink-3); }
.ep-num { width: 2.4em; flex: none; color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; }
.ep-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-seen { flex: none; width: 20px; height: 20px; color: var(--ok); }
.ep-seen svg { width: 100%; height: 100%; }
.ep-prog { flex: none; width: 60px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.ep-prog i { display: block; height: 100%; background: var(--acc); }
.dev-tv .ep-row { font-size: 2.6vh; padding: 1.2vh 1vw; }
.dev-tv .ep-list { max-height: 38vh; }

/* ---------- Guía de un grupo: canal · ahora (con barra) · después ---------- */
.pane-head .pill-btn.small { height: 34px; margin-left: 10px; padding: 0 12px; font-size: 14px; gap: 6px; }
.pane-head .pill-btn.small svg { width: 18px; height: 18px; }
.sheet.gguide-sheet { width: min(1100px, 96vw); max-width: none; }
.gguide { display: grid; gap: 6px; max-height: 72vh; overflow-y: auto; padding: 2px; }
.gguide > .spinner { margin: 20px auto; }
.gg-row {
  display: grid; grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1.2fr) auto; align-items: center; gap: 14px;
  padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .22); cursor: pointer;
}
.gg-row .logo { width: 56px; height: 40px; }
.gg-row.sel { background: color-mix(in srgb, var(--acc) 26%, rgba(0, 0, 0, .25)); }
.gg-row:hover, .gg-row:focus-visible { box-shadow: inset 0 0 0 2px #fff; outline: none; }
.gg-ch b, .gg-now b, .gg-next span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gg-now small, .gg-next small { color: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.gg-now .gg-none { font-style: italic; }
.gg-bar { display: block; height: 4px; margin-top: 4px; border-radius: 2px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.gg-bar i { display: block; height: 100%; background: var(--acc); }
.gg-next { color: var(--ink-2); font-size: 14px; }
/* Buscador de programas de la guía y sus resultados (cada programa con sus emisiones: día, hora, canal) */
.sheet .search.gg-search { flex: none; max-width: none; width: 100%; margin: 0 0 12px; }
.gguide.hidden, .gsearch.hidden { display: none; }
.gsearch { display: grid; gap: 6px; max-height: 66vh; overflow-y: auto; padding: 2px; }
.gsearch > .spinner { margin: 20px auto; }
.gs-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 12px 2px 2px; }
.gs-title:first-child { margin-top: 2px; }
.gs-title b { color: var(--gold); font-size: 17px; }
.gs-title small { flex: none; color: var(--ink-3); font-size: 13px; }
.gs-row { display: grid; grid-template-columns: 150px 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 12px; border-radius: 10px; background: rgba(0, 0, 0, .22); cursor: pointer; }
.gs-row .logo { width: 48px; height: 34px; }
.gs-row.on { background: color-mix(in srgb, var(--acc) 26%, rgba(0, 0, 0, .25)); }
.gs-row:hover, .gs-row:focus-visible { box-shadow: inset 0 0 0 2px #fff; outline: none; }
.gs-when b { display: block; text-transform: capitalize; }
.gs-when small { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.gs-ch { min-width: 0; }
.gs-ch b, .gs-ch small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-ch small { color: var(--ink-3); font-size: 12.5px; }
.gs-ch .gs-ep { color: var(--ink-2); }
.dev-tv .gs-ch small { font-size: 2.2vh; }
.gs-live { padding: 3px 8px; border-radius: 6px; background: #ff2d55; color: #fff; font-size: 12px; font-weight: 800; }
@media (max-width: 699px) { .gs-row { grid-template-columns: 96px 40px minmax(0, 1fr) auto; gap: 8px; } .gs-row .logo { width: 40px; height: 28px; } }
.dev-tv .gs-title b { font-size: 3vh; }
.dev-tv .gs-title small, .dev-tv .gs-when small { font-size: 2.3vh; }
.dev-tv .gs-row { grid-template-columns: 22vh 8vh minmax(0, 1fr) auto; padding: 1vh 1vw; }
.dev-tv .gs-when b, .dev-tv .gs-ch { font-size: 2.7vh; }
.dev-tv .gs-row .logo { width: 8vh; height: 5.5vh; }
@media (max-width: 699px) {
  .gg-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .gg-row .logo { width: 44px; height: 32px; }
  .gg-ch { grid-column: 2; }
  .gg-now { grid-column: 2; grid-row: 2; }
  .gg-next { display: none; }
  .gg-more { grid-column: 3; grid-row: 1 / span 2; }
}
.dev-tv .gg-row { gap: 1.2vw; padding: 1vh 1vw; }
.dev-tv .gg-row .logo { width: 8vh; height: 5.5vh; }
.dev-tv .gg-ch b, .dev-tv .gg-now b { font-size: 2.7vh; }
.dev-tv .gg-now small, .dev-tv .gg-next small, .dev-tv .gg-next { font-size: 2.3vh; }
.dev-tv .gg-more { display: none; }
.dev-tv .pane-head .pill-btn.small { display: none; }

/* Barra de la descarga de una actualización */
.update-bar { height: 8px; margin: 4px 0 8px; border-radius: 4px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.update-bar.hidden { display: none; }
.update-bar i { display: block; width: 0; height: 100%; background: var(--acc); transition: width .2s; }

/* ---------- Radio: barra fija abajo ---------- */
body { --radio-h: 0px; }
body.has-radio { --radio-h: 72px; }
body.has-radio .browse { height: calc(100dvh - var(--radio-h)); }
body.has-radio .home { padding-bottom: calc(var(--radio-h) + 12px); }
.radio-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  height: var(--radio-h);
  padding: 0 max(14px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(14px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--acc) 30%, #0b0b2e);
  border-top: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .45);
}
.radio-bar .logo { width: 52px; height: 52px; flex: none; }
.radio-bar .now { flex: 1; min-width: 0; }
.radio-bar .now b, .radio-bar .now small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-bar .now small { color: var(--ink-2); font-size: 13px; }
.radio-bar .now small.status { color: var(--gold); }
.radio-bar .icon-btn.play { width: 48px; height: 48px; background: #fff; color: #10103a; }
.radio-bar .icon-btn.on { color: var(--gold); }
.radio-bar .icon-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 599px) { .radio-bar [data-r="prev"], .radio-bar [data-r="fav"] { display: none; } }
.dev-tv body.has-radio { --radio-h: 11vh; }
.dev-tv .radio-bar .logo { width: 8vh; height: 8vh; }
.dev-tv .radio-bar .now b { font-size: 3vh; }
.dev-tv .radio-bar .now small { font-size: 2.4vh; }
.dev-tv .radio-bar .icon-btn { width: 7vh; height: 7vh; }
.dev-tv .radio-bar .icon-btn.play { width: 8.5vh; height: 8.5vh; }
.dev-tv body.has-radio .home { height: calc(100vh - var(--radio-h)); padding-bottom: 3vh; }

/* Modo noche: un velo oscuro y algo cálido por encima de todo (no se puede pulsar: deja pasar los clics) */
html.night::after { content: ''; position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; background: rgba(10, 4, 0, .42); }

/* Sin conexión con el PC: franja arriba y pantalla de arranque con qué comprobar */
#offline { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 0 0 12px 12px; background: #b3261e; color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
#offline svg { width: 18px; height: 18px; }
/* En la pantalla de «no hay conexión» ya se dice: sin franja */
body:has(.offline-page) #offline { display: none; }
.offline-tips { max-width: 520px; margin: 4px auto 12px; padding-left: 20px; text-align: left; color: var(--ink-2); line-height: 1.6; }
.dev-tv .offline-tips { font-size: 2.6vh; max-width: 60vw; }
.dev-tv #offline { font-size: 2.4vh; }

/* Registro de accesos: intentos fallidos en rojo; lo nuevo desde fuera, resaltado */
.act-row.bad { opacity: 1; background: rgba(255, 60, 60, .14); }
.new-tag { color: var(--gold); }
.warn-pill { background: rgba(255, 213, 74, .18); color: var(--gold); border-color: var(--gold); }

/* ---------- Ancho de banda (administrador) ---------- */
.bw { display: grid; gap: 12px; max-height: 62vh; overflow-y: auto; margin-bottom: 14px; }
.bw > .spinner { margin: 20px auto; }
.bw small { display: block; color: var(--ink-3); font-size: 12.5px; }
.bw-now { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
/* Títulos de las dos partes: el servidor (lo que descarga y envía) y cada aparato (lo que recibe) */
.bw-sec { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-size: 15px; font-weight: 700; }
.bw-sec:first-child { margin-top: 0; }
.bw-sec svg { width: 18px; height: 18px; }
.bw-note { margin: -2px 0 8px; font-size: 12.5px; }
.bw-user .bw-dev { color: var(--ink-2); font-weight: 600; }
.bw-now > div { padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .22); }
.bw-now b { display: block; margin: 2px 0; font-size: 22px; font-variant-numeric: tabular-nums; }
.bw-chart { padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .22); }
.bw-bars { display: block; width: 100%; height: 56px; margin-top: 6px; fill: var(--acc); }
.bw-bars.days { fill: var(--gold); }
.bw-axis { display: flex; justify-content: space-between; margin-top: 2px; color: var(--ink-3); font-size: 11px; }
.bw-limits { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.bw-limits svg { width: 16px; height: 16px; flex: none; }
.bw-limits.on { color: var(--gold); }
.bw-users { display: grid; gap: 6px; }
.bw-user { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .22); opacity: .75; }
.bw-user.on { opacity: 1; background: color-mix(in srgb, var(--acc) 22%, rgba(0, 0, 0, .25)); }
.bw-user > div:not(.bw-sum) { flex: 1; min-width: 0; }
.bw-user small { display: flex; align-items: center; gap: 6px; }
.bw-sum { text-align: right; font-variant-numeric: tabular-nums; }
.bw-sum small { justify-content: flex-end; }
.list-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.list-badge svg { width: 12px; height: 12px; }
.code-input { font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.code-list { display: grid; gap: 8px; margin-top: 14px; max-height: 50vh; overflow-y: auto; }
.code-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, .25); }
.code-row code { color: var(--gold); font-family: var(--mono); font-size: 16px; font-weight: 700; letter-spacing: .05em; }
.code-row small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12.5px; }
.ios-steps li { margin-bottom: 4px; }
.links code { padding: 10px 12px; border-radius: 6px; background: rgba(0, 0, 0, .3); color: var(--gold); font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; user-select: all; }

/* ---------- Explorar ---------- */
.browse {
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(220px, 22%) minmax(280px, 31%) 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0 10px;
  padding: max(8px, env(safe-area-inset-top)) 12px max(8px, env(safe-area-inset-bottom));
}
.tabs { grid-column: 1 / -1; display: flex; align-items: center; padding: 8px 4px 12px; overflow-x: auto; scrollbar-width: none; }
.tab {
  padding: 4px clamp(10px, 1.3vw, 22px);
  border-right: 2px solid rgba(255, 255, 255, .65);
  color: var(--ink-2);
  font-size: clamp(16px, 1.7vw, 26px); font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}
.tab:first-child { padding-left: 6px; }
.tab:nth-child(5) { border-right: 0; }
.tab.on { color: var(--gold); }
.tab:hover, .tab:focus-visible { color: #fff; outline: none; text-decoration: underline; }
.search {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 160px; max-width: 460px;
  height: 46px;
  margin-left: clamp(10px, 2vw, 36px);
  padding: 0 18px;
  border: 2.5px solid rgba(170, 186, 255, .9);
  border-radius: 999px;
  background: rgba(8, 8, 40, .4);
}
.search svg { width: 22px; height: 22px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 17px; }
.search:focus-within { border-color: #fff; }
/* Buscador de grupos: más corto que el de los títulos */
.search-groups { flex: .7; max-width: 340px; }
.search + .search { margin-left: 10px; }
/* Botón del orden (Recomendado / A-Z), junto al buscador */
.sort-toggle { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 46px; margin-left: 10px; padding: 0 16px; border-radius: 999px; background: rgba(8, 8, 40, .4); border: 2.5px solid rgba(170, 186, 255, .55); color: var(--ink-2); font-weight: 700; white-space: nowrap; }
.sort-toggle svg { width: 20px; height: 20px; }
.sort-toggle:hover, .sort-toggle:focus-visible { border-color: #fff; color: #fff; outline: none; }
.dev-tv .sort-toggle { height: 7.5vh; font-size: 2.8vh; }

.pane { min-height: 0; display: flex; flex-direction: column; border-top: 2px solid rgba(170, 186, 255, .55); }
.pane .scroll {
  flex: 1; min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 4px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .3) transparent;
}
.grp {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 52px;
  margin-bottom: 5px;
  padding: 0 16px;
  background: var(--row);
  font-size: 15.5px; font-weight: 600;
  text-align: left; text-transform: uppercase;
}
.grp span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Seleccionado y sin sitio: el texto pasa entero como un rótulo y vuelve a empezar (sin «…») */
.marquee { text-overflow: clip !important; }
.marquee-in { display: inline-flex; animation: marquee var(--marquee-t, 6s) linear .35s infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(var(--marquee-x, 0)); } }
@media (prefers-reduced-motion: reduce) { .marquee-in { animation: none; } .marquee { text-overflow: ellipsis !important; } }
.grp small { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.grp:hover, .grp:focus-visible { background: var(--row-hi); box-shadow: inset 0 0 0 2px #fff; outline: none; }
.grp.on { background: var(--row-hi); color: var(--gold); }

.pane-head { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 4px 6px; }
.pane-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; text-transform: uppercase; }
.pane-head small { color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.spacer { flex: 1; }
.icon-btn { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; color: #fff; transition: background .15s; }
.icon-btn:hover { background: rgba(255, 255, 255, .14); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn.on { color: var(--gold); }

.ch {
  display: flex; align-items: center; gap: 12px;
  min-height: 54px;
  margin-bottom: 5px;
  padding: 4px 10px 4px 14px;
  background: var(--row);
  cursor: pointer;
}
.ch { position: relative; }
.ch .prog { position: absolute; left: 0; bottom: 0; height: 4px; background: #ff2d55; box-shadow: 0 0 6px rgba(255, 45, 85, .6); }
#rows.grid .ch .prog { height: 5px; border-radius: 0 0 0 6px; }
.ch .num { width: 3.4em; flex: none; color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.ch .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ch .fav-mark { color: var(--gold); display: grid; }
.ch .fav-mark svg { width: 17px; height: 17px; }
.ch .icon-btn { width: 36px; height: 36px; }
.ch .icon-btn svg { width: 19px; height: 19px; }
.ch:hover, .ch:focus-visible { background: var(--row-hi); box-shadow: inset 0 0 0 2px #fff; outline: none; }
/* Mantener el dedo abre las opciones: que el iPhone no saque su menú ni seleccione texto */
#rows .ch { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.ch .more-btn { opacity: .75; }
.ch .more-btn:hover, .ch:focus-visible .more-btn { opacity: 1; }
#rows.grid .ch .more-btn { width: 32px; height: 32px; background: rgba(8, 8, 40, .55); border-radius: 0 6px 0 10px; }
#rows.grid .ch .more-btn svg { width: 18px; height: 18px; }
#rows.grid .ch .fav-mark { right: 38px; }
#rows.grid .ch [data-act="remove-channel"] { right: 34px; }
/* En la tele se abre con OK mantenido o ≡ del mando (el botón no se alcanza con las flechas) */
.dev-tv .ch .more-btn { display: none; }
.dev-tv #rows.grid .ch .fav-mark { right: 8px; }
.tv-hint { margin-right: 12px; color: var(--ink-3); font-size: 2.3vh; font-weight: 600; white-space: nowrap; }
.item-url { max-height: 6.5em; overflow: auto; }
.ch.playing { background: var(--row-hi); color: var(--gold); }
.logo {
  width: 46px; height: 34px; flex: none;
  display: grid; place-items: center;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(0, 0, 0, .2);
  color: var(--ink-2);
  font-size: 12px; font-weight: 800;
}
.logo img { width: 100%; height: 100%; object-fit: contain; }

.stage-pane { border-top: 0; padding: 0 4px; }
.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(0, 0, 0, .55);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .55);
}
.stage-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 16px; color: var(--ink-2); text-align: center; }
.stage-empty .logo-svg { width: 96px; opacity: .85; }
.stage.live .stage-empty { display: none; }
.now-title { margin: 16px 4px 2px; font-size: clamp(18px, 1.9vw, 28px); font-weight: 700; text-transform: uppercase; }
.now-sub { display: block; margin: 0 4px; color: var(--ink-3); }
.stage-actions { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; padding: 16px 4px; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 22px;
  border-radius: 4px;
  background: var(--btn);
  font-size: 16px; font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
.pill-btn svg { width: 19px; height: 19px; }
.pill-btn.on svg { color: var(--gold); }
.pill-btn:hover, .pill-btn:focus-visible { box-shadow: 0 0 0 3px #fff; outline: none; }

/* Diseño de cuadrícula */
.browse.layout-grid { grid-template-columns: minmax(200px, 19%) minmax(0, 1fr) minmax(300px, 30%); }
#rows.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
#rows.grid .ch {
  position: relative;
  flex-direction: column; justify-content: flex-start; gap: 8px;
  min-height: 0; margin: 0;
  padding: 26px 10px 12px;
  border-radius: 6px;
  text-align: center;
}
#rows.grid .ch .num { position: absolute; top: 6px; left: 9px; width: auto; font-size: 12px; }
#rows.grid .ch .logo { width: 100%; height: auto; aspect-ratio: 16 / 10; font-size: 26px; background: rgba(0, 0, 0, .25); }
#rows.grid .ch .logo img { padding: 8px; }
#rows.grid .ch .name { width: 100%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; line-height: 1.25; }
#rows.grid .ch .fav-mark { position: absolute; top: 6px; right: 8px; }
#rows.grid .ch .icon-btn { position: absolute; top: 0; right: 0; }
.browse[data-type="movie"] #rows.grid .logo, .browse[data-type="series"] #rows.grid .logo { aspect-ratio: 2 / 3; }
.browse[data-type="movie"] #rows.grid .logo img, .browse[data-type="series"] #rows.grid .logo img { padding: 0; object-fit: cover; }

.only-narrow { display: none !important; }

@media (max-width: 899px) {
  .browse { grid-template-columns: minmax(0, 1fr); gap: 0; padding-left: 8px; padding-right: 8px; }
  .only-wide { display: none !important; }
  .only-narrow { display: grid !important; }
  .browse[data-step="groups"] .chans { display: none; }
  .browse[data-step="channels"] .groups { display: none; }
  .tabs { flex-wrap: wrap; row-gap: 10px; }
  /* En el móvil, los dos buscadores en una fila debajo de las pestañas: grupos a la izquierda, títulos a la derecha */
  .tabs .search { flex: 1 1 calc(50% - 34px); min-width: 0; max-width: none; margin: 0; padding: 0 12px; gap: 6px; }
  .tabs .search + .search { margin-left: 8px; }
  .tabs .search input { font-size: 16px; }
  /* El orden, solo con su icono, al final de esa fila */
  .tabs .sort-toggle { margin-left: 8px; padding: 0 12px; }
  .tabs .sort-toggle span { display: none; }
  .browse.layout-grid { grid-template-columns: minmax(0, 1fr); }
  #rows.grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
}

/* ---------- Estados vacíos ---------- */
.empty { padding: 44px 20px; text-align: center; color: var(--ink-2); }
.empty .art { width: 88px; height: 88px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 26px; background: rgba(255, 255, 255, .1); color: #fff; }
.empty .art svg { width: 42px; height: 42px; }
.empty h2 { margin: 0 0 6px; color: #fff; font-size: 20px; }
.empty p { margin: 0 0 18px; }
.sentinel { height: 44px; display: grid; place-items: center; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px;
  border-radius: 6px;
  background: var(--btn);
  font-weight: 600; font-size: 17px;
}
.btn svg { width: 20px; height: 20px; }
/* Secundario: el mismo en toda la app (fondo suave con borde fino) */
.btn.ghost { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.btn.ghost:hover, .btn.ghost:focus-visible { background: rgba(255, 255, 255, .18); box-shadow: 0 0 0 3px var(--gold); }
.btn.danger { background: linear-gradient(180deg, #ff5a78, #d9264b); }
.btn.block { width: 100%; }
.btn:hover, .btn:focus-visible { box-shadow: 0 0 0 3px var(--gold); outline: none; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- Ventanas ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(4, 4, 28, .55);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  animation: fade .18s ease;
}
.sheet {
  width: 100%; max-width: 580px;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 20px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(44, 38, 150, .96), rgba(18, 16, 78, .97));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  animation: pop .2s ease;
  overscroll-behavior: contain;
}
.sheet.small { max-width: 480px; }
/* En las ventanas, el título y la ✕ de cerrar también se quedan arriba al desplazarse */
.sheet-head {
  position: sticky; top: -20px; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  margin: -20px -24px 14px; padding: 20px 24px 10px;
  background: linear-gradient(180deg, rgba(40, 34, 140, .98), rgba(36, 31, 128, .94));
}
.sheet-head h2 { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 24px; font-weight: 600; }
.close-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.close-btn svg { width: 20px; height: 20px; }
.dialog-title { margin: 4px 0 8px; font-size: 22px; }
.dialog-text { margin: 0 0 20px; color: var(--ink-2); line-height: 1.5; }
.dialog-btns { display: flex; gap: 10px; }

.choices { display: grid; gap: 14px; }
.choice {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  height: 64px;
  border-radius: 4px;
  background: var(--btn);
  font-size: 21px; font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}
.choice svg { width: 24px; height: 24px; }
.choice.danger { background: linear-gradient(180deg, #ff5a78, #d9264b); }
.choice:hover, .choice:focus-visible { box-shadow: 0 0 0 3px var(--gold); outline: none; }

/* Ventana de selección (Cambia el diseño, Reproductor) */
.sheet.pick-sheet { padding: 0; overflow: hidden; border: 3px solid rgba(255, 255, 255, .9); border-radius: 10px; background: linear-gradient(180deg, #4a3fe0, #3a31c8); }
.pick-head { padding: 18px 20px; border-bottom: 3px solid rgba(255, 255, 255, .9); font-size: 22px; font-weight: 600; }
.pick-list { display: grid; gap: 6px; padding: 12px 8px; max-height: 62vh; overflow-y: auto; }
/* Selección de varios (países): el número de canales debajo; España marcada siempre */
.pick small { display: block; margin-top: 2px; font-size: .78em; font-weight: 500; opacity: .75; }
.pick.locked .box { background: var(--acc); border-color: var(--acc); }
.pick {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 58px; padding: 0 22px;
  background: linear-gradient(90deg, rgba(150, 140, 255, .55), rgba(120, 110, 250, .4));
  font-size: 18px; font-weight: 600; text-align: left;
}
.pick .box { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 2.5px solid #fff; border-radius: 3px; }
.pick .box svg { width: 22px; height: 22px; stroke-width: 3; opacity: 0; }
.pick.on .box { background: rgba(255, 255, 255, .25); }
.pick.on .box svg { opacity: 1; }
.pick:hover, .pick:focus-visible { background: linear-gradient(90deg, rgba(180, 170, 255, .75), rgba(140, 130, 255, .6)); outline: none; box-shadow: inset 0 0 0 2px #fff; }
.pick-btns { display: flex; justify-content: flex-end; gap: 14px; padding: 8px 16px 18px; }
.pick-btns .btn { min-width: 130px; background: rgba(170, 170, 255, .55); font-size: 18px; }

/* Telegram en «Añadir lista» */
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row .input { flex: 1; min-width: 0; }
.dice { width: 52px; height: 52px; border-radius: 6px; background: rgba(255, 255, 255, .12); }
.tg-box { margin: 0 0 16px; padding: 14px; border: 1px solid rgba(70, 170, 255, .5); border-radius: 10px; background: rgba(34, 158, 217, .14); }
.tg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 16px; }
.tg-head svg { width: 24px; height: 24px; color: #4fc3ff; }
.tg-box .hint { margin: 0 0 12px; }
.tg-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.tg-btns .btn { flex: 1 1 180px; height: 48px; font-size: 16px; }
.btn.tg { background: linear-gradient(180deg, #37aee2, #1e96c8); }

.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 18px; margin: 0 0 22px; }
.kv dt { color: var(--ink-3); font-weight: 600; }
.kv dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.kv dd.gold { color: var(--gold); }
.kv dd.ok { color: var(--ok); }
.kv dd.bad { color: var(--danger); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin: 0 0 6px 2px; color: var(--ink-2); font-size: 14px; font-weight: 700; }
.input {
  width: 100%; height: 52px;
  padding: 0 14px;
  border: 2px solid rgba(255, 255, 255, .2);
  border-radius: 6px;
  background: rgba(0, 0, 0, .25);
  outline: 0;
}
.input:focus { border-color: var(--gold); }
.input::placeholder { color: var(--ink-3); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 8px; background: rgba(0, 0, 0, .28); }
.seg button { flex: 1; height: 40px; border-radius: 5px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.seg button.on { background: var(--btn); color: #fff; }
.seg button small { opacity: .7; font-weight: 600; }
/* Previsualizar un enlace: cifras arriba y la lista de grupos con su número */
#preview { margin-top: 4px; }
.preview-sort { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.seg.small { padding: 3px; }

/* Historial: pestañas y filas (cartel, título, fechas, de qué lista o a quién) */
.hist-tabs { max-width: 560px; margin-bottom: 18px; }
.hist-tabs a { flex: 1; display: grid; place-items: center; height: 44px; border-radius: 5px; color: var(--ink-2); font-weight: 700; text-decoration: none; }
.hist-tabs a.on { background: var(--btn); color: #fff; }
.hist-tabs a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hist-list { display: flex; flex-direction: column; gap: 10px; max-width: 980px; }
.hist-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--row); }
/* «⋮» sobre la esquina de la portada: ficha (sinopsis, reparto), ponerla, recomendarla */
.hist-more { position: absolute; top: 14px; left: 40px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .62); color: #fff; z-index: 1; }
.hist-more svg { width: 18px; height: 18px; }
.hist-more:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.dev-tv .hist-more { left: calc(10px + 9vh - 36px); }
.hist-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; text-align: left; color: inherit; }
.hist-main:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 6px; }
.hist-img { position: relative; flex: none; display: grid; place-items: center; width: 64px; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .1); font-weight: 700; }
.hist-img img { width: 100%; height: 100%; object-fit: cover; }
.hist-text { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-bottom: 8px; }
.hist-text b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-text small { color: var(--ink-2); font-size: 13.5px; }
.hist-text .hist-warn { color: #ffb3b3; }
.hist-text .cw-bar { border-radius: 3px; height: 4px; }
.hist-to { display: flex; flex-wrap: wrap; gap: 6px; }
.hist-clear { align-self: flex-start; margin-top: 8px; }
/* Fútbol: elegir equipo (escudos por liga), la fila de la portada y el calendario */
.team-league { margin: 14px 0 8px; font-size: 15px; color: var(--ink-2); }
.team-count { margin: 0; font-weight: 700; color: var(--gold); }
/* Buscador al elegir luchadores de UFC (son cientos) */
.team-find { width: 100%; margin: 4px 0 10px; }
/* Patinaje: el icono grande en la tarjeta (con «Ahora» si está en emisión) y el título del programa en la hoja */
.skate-ico { position: relative; font-size: 2.2rem; }
.skate-ico svg { width: 46px; height: 46px; }
.skate-live { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: .7rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: #e0245e; color: #fff; }
.sk-title { font-weight: 600; margin: 4px 0 2px; }
.team-actions { margin-top: 14px; position: sticky; bottom: 0; padding-top: 8px; background: linear-gradient(transparent, rgba(30, 24, 120, .95) 30%); }
.fb-countries { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.fb-countries small { color: var(--ink-2); margin-right: 4px; }
.fb-country { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: inherit; font-weight: 600; font-size: 14px; }
.fb-country.on { background: var(--btn); color: #fff; box-shadow: inset 0 0 0 2px var(--gold); }
.fb-country:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff; }
.fb-team { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; font-size: 17px; }
.fb-team img, .fb-team b { width: 30px; height: 30px; object-fit: contain; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px; margin-bottom: 8px; }
.team-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--row); color: inherit; text-align: left; font-weight: 600; font-size: 14px; min-width: 0; }
.team-opt img, .team-opt b { width: 30px; height: 30px; object-fit: contain; flex: none; }
.team-opt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-opt.on { box-shadow: inset 0 0 0 2px var(--gold); }
.team-opt:focus-visible, .team-opt:hover { outline: none; box-shadow: 0 0 0 3px #fff; }
.match-card { width: clamp(150px, 16vw, 210px); }
.match-teams { display: flex; align-items: center; justify-content: center; gap: 10px; aspect-ratio: 16 / 10; border-radius: 10px; background: rgba(255, 255, 255, .1); }
.match-teams img, .match-teams b { width: 34%; aspect-ratio: 1; object-fit: contain; display: grid; place-items: center; }
.match-teams i { font-style: normal; font-weight: 800; font-size: 1.1em; }
.match-card:hover .match-teams, .match-card:focus-visible .match-teams { box-shadow: 0 0 0 3px #fff; }
.dev-tv .match-card { width: 24vh; }
.fb-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.fb-match { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 10px; background: rgba(0, 0, 0, .22); }
.fb-match.done { opacity: .8; }
.fb-when { display: flex; align-items: baseline; gap: 10px; }
.fb-when small { color: var(--ink-2); }
.fb-vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; font-weight: 700; }
.fb-vs span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fb-vs span:last-child { justify-content: flex-end; text-align: right; }
.fb-vs img, .fb-vs b { width: 28px; height: 28px; object-fit: contain; flex: none; }
.fb-vs i { font-style: normal; font-weight: 800; }
.fb-ch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fb-ch small { color: var(--ink-2); }
.fb-play { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #1e8a55; color: #fff; font-weight: 700; font-size: 13px; }
.fb-play svg { width: 12px; height: 12px; }
/* En los cines de cerca: dónde, los cines (con su distancia) y cada película con sus horas de hoy */
.cine-where { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.cine-place { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; font-size: 17px; }
.cine-place svg, .cine-where .pill-btn svg { width: 18px; height: 18px; }
.cine-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; margin-bottom: 16px; }
.cine-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; border-radius: 10px; background: var(--row); text-align: left; color: inherit; min-width: 0; }
.cine-card b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cine-card small { color: var(--ink-2); font-size: 13px; }
.cine-card .cine-link { color: var(--gold); font-weight: 700; }
.cine-card:hover, .cine-card:focus-visible, .cine-poster:focus-visible, .cine-have:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff; }
.cine-filter { max-width: 420px; margin-bottom: 14px; }
.cine-movies { display: flex; flex-direction: column; gap: 10px; }
.cine-movie { display: flex; gap: 14px; padding: 12px; border-radius: 10px; background: rgba(0, 0, 0, .22); }
.cine-poster { flex: none; display: grid; place-items: center; width: 92px; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, .1); }
.cine-poster img { width: 100%; height: 100%; object-fit: cover; }
.cine-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.cine-title { font-size: 18px; }
.cine-have { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: #1e8a55; color: #fff; font-weight: 700; font-size: 14px; }
.cine-have svg { width: 14px; height: 14px; }
.cine-nohave, .cine-as { font-size: 13px; color: var(--ink-2); }
.cine-as { margin-top: -4px; }
.cine-shows { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.cine-show { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 14px; }
.cine-show-name { font-weight: 700; min-width: 180px; }
.cine-show-name small { color: var(--ink-2); font-weight: 600; }
.cine-ver { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 5px; }
.cine-ver small { color: var(--ink-2); font-size: 12px; }
.cine-ver i { font-style: normal; font-variant-numeric: tabular-nums; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, .12); }
.cine-ver i.past { opacity: .4; text-decoration: line-through; }
.cine-src { margin-top: 16px; }
.cines-row h3 small { color: var(--ink-2); font-weight: 600; font-size: .8em; }
.rec-new.have { background: #1e8a55; color: #fff; }
.dev-tv .cine-title { font-size: 3vh; }
.dev-tv .cine-show, .dev-tv .cine-card b { font-size: 2.4vh; }
.dev-tv .cine-poster { width: 12vh; }
/* «Acerca de»: novedades de cada versión (la instalada, marcada) */
.cl-title { margin: 18px 0 10px; font-size: 18px; }
.changelog { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.cl-ver { padding: 12px 16px; border-radius: 10px; background: rgba(0, 0, 0, .22); }
.cl-ver.on { box-shadow: inset 0 0 0 2px var(--gold); }
.cl-ver:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cl-ver h4 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; font-size: 17px; }
.cl-ver h4 small { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.cl-ver.on h4 small { color: var(--gold); }
.cl-ver ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.cl-ver li { font-size: 14.5px; line-height: 1.45; }
.dev-tv .cl-ver h4 { font-size: 2.8vh; }
.dev-tv .cl-ver li { font-size: 2.4vh; }
/* Recomendación nueva: arriba, encima de todo (también del vídeo a pantalla completa), unos segundos */
.rec-banner { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 18px); left: 50%; transform: translateX(-50%); z-index: 2147483000;
  display: flex; align-items: center; gap: 14px; width: max-content; max-width: min(720px, calc(100vw - 32px)); padding: 12px 18px 12px 12px;
  border-radius: 14px; background: rgba(42, 31, 143, .96); color: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); cursor: pointer;
  animation: rec-in .35s ease-out; }
.rec-banner img { width: 48px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; flex: none; }
.rec-banner .rb-ico svg { width: 34px; height: 34px; }
.rec-banner div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rec-banner b { font-size: 16px; }
.rec-banner small { font-size: 13px; opacity: .85; }
.dev-tv .rec-banner b { font-size: 2.8vh; }
.dev-tv .rec-banner small { font-size: 2.2vh; }
@keyframes rec-in { from { opacity: 0; transform: translate(-50%, -16px); } }
@media (prefers-reduced-motion: reduce) { .rec-banner { animation: none; } }
/* «Usuarios conectados»: sus películas vistas (abre el historial de ese usuario) */
.act-info:has(.act-films) { min-width: 0; }
.act-films { display: block; max-width: 100%; margin-top: 6px; padding: 5px 12px; border-radius: 12px; background: rgba(255, 255, 255, .12); color: var(--ink); font-size: 13px; font-weight: 600; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.act-films:hover, .act-films:focus-visible { background: rgba(255, 255, 255, .22); outline: none; box-shadow: 0 0 0 2px #fff; }
.user-films { max-width: none; }
.dev-tv .hist-text b { font-size: 2.8vh; }
.dev-tv .hist-text small { font-size: 2.2vh; }
.dev-tv .hist-img { width: 9vh; }
.seg.small button { flex: none; height: 32px; padding: 0 14px; font-size: 14px; }
/* «Todos» en las selecciones de varios: separado del resto */
.pick.pick-all { border-bottom: 2px solid rgba(255, 255, 255, .35); margin-bottom: 4px; font-weight: 800; }
.preview-facts { margin: 0 0 14px; color: var(--ink-2); line-height: 1.6; }
.preview-facts b { color: #fff; }
.preview-groups { display: grid; gap: 4px; max-height: 46vh; overflow-y: auto; margin: 12px 0 16px; padding-right: 4px; }
.preview-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 6px; background: var(--row); font-weight: 600; }
.preview-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-row small { font-variant-numeric: tabular-nums; opacity: .85; }
.preview-row:focus-visible { box-shadow: inset 0 0 0 2px #fff; outline: none; }
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 100%;
  padding: 26px 14px;
  border: 2px dashed rgba(255, 255, 255, .4);
  border-radius: 10px;
  background: rgba(0, 0, 0, .2);
  font-weight: 700;
  text-align: center;
}
.drop small { color: var(--ink-2); font-weight: 500; }
.drop svg { width: 30px; height: 30px; }
.hint { margin: -4px 2px 14px; color: var(--ink-3); font-size: 13px; line-height: 1.45; }
.form-error { margin: 0 2px 12px; color: #ff9fb0; font-size: 14px; font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; padding: 6px 0 10px; }
.swatch { position: relative; width: 46px; height: 46px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .3); }
.swatch.on::after { content: ""; position: absolute; inset: -6px; border: 3px solid #fff; border-radius: 50%; }

/* ---------- Reproductor ---------- */
.player {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  background: #000;
  animation: fade .2s ease;
}
.player.embedded { position: absolute; z-index: 1; animation: none; }
.player video { flex: 1; width: 100%; min-height: 0; background: #000; }
.player .bar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px 26px;
  background: linear-gradient(rgba(0, 0, 0, .75), transparent);
  transition: opacity .3s;
}
.player.idle .bar { opacity: 0; pointer-events: none; }
.player .bar .icon-btn { background: rgba(255, 255, 255, .14); }
.player .bar .icon-btn:hover { background: rgba(255, 255, 255, .26); }
.player .seek { display: flex; gap: 4px; }
.player.is-live .seek { display: none; }
.seek-btn {
  min-width: 46px; height: 40px; padding: 0 10px;
  border-radius: 999px; background: rgba(255, 255, 255, .14);
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.seek-btn:hover { background: rgba(255, 255, 255, .26); }
.seek-btn:focus-visible { background: var(--acc); outline: 3px solid #fff; outline-offset: 1px; }
.player.embedded:not(:fullscreen) .seek-btn { min-width: 38px; height: 34px; padding: 0 6px; font-size: 12.5px; }
.player .now { flex: 1; min-width: 0; }
.player .now b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.player .now small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .7; }
.player.embedded:not(:fullscreen) .now { visibility: hidden; }
.player.embedded:not(:fullscreen) .bar { padding: 8px 8px 20px; }
.player.embedded:not(:fullscreen) .bar .icon-btn { width: 36px; height: 36px; }
.player.embedded:not(:fullscreen) .bar .icon-btn svg { width: 19px; height: 19px; }
.player .status { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.player .status .box { max-width: 380px; padding: 20px; pointer-events: auto; }
.player .status h3 { margin: 0; }
.player .status p { margin: 12px 0 16px; opacity: .85; }
.player .status .msg { font-family: var(--mono); font-size: 13px; }
.player .status .btn { height: 44px; margin: 4px; font-size: 15px; }
.player.embedded .status .box { padding: 10px; }
.player.embedded:not(:fullscreen) .status .btn { height: 38px; padding: 0 14px; font-size: 14px; }
.spinner {
  width: 46px; height: 46px; margin: 0 auto;
  border: 4px solid rgba(255, 255, 255, .2);
  border-top-color: var(--acc);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.spinner.small { width: 20px; height: 20px; margin: 0; border-width: 3px; border-top-color: #fff; }

/* ---------- Bloqueo ---------- */
.lock {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 20px;
  background: linear-gradient(168deg, #05051a, #0c0a3e 45%, #171a9e);
}
.lock .logo-svg { width: 80px; }
.lock h2 { margin: 0; font-weight: 600; }
.dots { display: flex; gap: 16px; height: 18px; }
.dots i { width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; }
.dots i.on { background: var(--gold); border-color: var(--gold); }
.dots.shake { animation: shake .35s; }
.pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; }
.pad button { height: 76px; border-radius: 50%; background: var(--row); font-size: 28px; font-weight: 600; }
.pad button:hover, .pad button:focus-visible { background: var(--row-hi); outline: none; box-shadow: 0 0 0 3px #fff; }
.pad button.blank { visibility: hidden; }

#toast {
  position: fixed; left: 50%; bottom: calc(40px + env(safe-area-inset-bottom)); z-index: 200;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 8px;
  background: rgba(10, 10, 40, .92);
  box-shadow: 0 0 0 2px var(--acc), 0 12px 30px rgba(0, 0, 0, .5);
  font-size: 15px; font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* ---------- Tele (APK de TV y navegador de Smart TV): se ve de lejos y se maneja con el mando ---------- */
.dev-tv body { cursor: none; user-select: none; }
/* Muchas teles recortan los bordes de la imagen: el contenido se queda dentro de la zona segura */
.dev-tv .home { padding: max(4vh, 20px) max(5vw, 32px); }
.dev-tv .page { --pad: max(5vw, 32px); padding: 0 var(--pad) max(4vh, 20px); }
.dev-tv .page-head { padding-top: max(3vh, 16px); }
.dev-tv .browse { padding: max(3vh, 16px) max(3vw, 24px); }
/* Lo seleccionado con el mando tiene que verse bien desde el sofá */
.dev-tv :focus-visible { outline: 4px solid #fff; outline-offset: 3px; }
.dev-tv .grp:focus-visible, .dev-tv .ch:focus-visible { box-shadow: inset 0 0 0 3px #fff, 0 0 18px rgba(255, 255, 255, .35); }
/* Explorar en la tele: grupos estrechos y bajos, carteles pequeños (5-6 por fila).
   Con el reproductor nativo se ve a pantalla completa, así que sobra la vista previa de la derecha. */
.dev-tv .browse.no-stage { grid-template-columns: minmax(0, 24%) minmax(0, 1fr); }
.dev-tv .browse.no-stage .stage-pane { display: none; }
/* Radio: sin vista previa (suena en la barra de abajo); los grupos y las emisoras se reparten el ancho */
@media (min-width: 900px) {
  .browse[data-type="radio"] { grid-template-columns: minmax(240px, 30%) minmax(0, 1fr); }
  .browse[data-type="radio"] .stage-pane { display: none; }
}
.dev-tv .tabs { padding: 1vh 4px 1.8vh; }
/* Cinco pestañas, dos buscadores y el orden tienen que caber en una fila */
.dev-tv .tab { font-size: 3.1vh; padding: 4px 1vw; }
.dev-tv .search { height: 7.5vh; min-width: 0; max-width: 28vw; margin-left: 1.2vw; padding: 0 1.2vw; gap: .8vw; }
.dev-tv .search-groups { max-width: 19vw; }
.dev-tv .search svg { width: 3.4vh; height: 3.4vh; flex: none; }
.dev-tv .sort-toggle { margin-left: .8vw; padding: 0 1.2vw; font-size: 2.6vh; }
.dev-tv .search input { font-size: 3vh; }
.dev-tv .grp { min-height: 7vh; margin-bottom: .9vh; padding: 0 1.2vw; font-size: 2.7vh; text-transform: none; }
.dev-tv .grp small { font-size: 2.5vh; }
.dev-tv .pane-head { min-height: 6vh; }
.dev-tv .pane-head b { font-size: 2.8vh; }
.dev-tv .ch { min-height: 8vh; margin-bottom: .9vh; font-size: 2.9vh; }
.dev-tv .ch .num { font-size: 2.5vh; }
.dev-tv #rows.grid { grid-template-columns: repeat(auto-fill, minmax(22vh, 1fr)); gap: 1.8vh; }
.dev-tv #rows.grid .ch { gap: 1vh; padding: 1vh 1vh 1.2vh; }
.dev-tv #rows.grid .ch .num { display: none; }
.dev-tv #rows.grid .ch .name { font-size: 2.4vh; -webkit-line-clamp: 1; }
.dev-tv #rows.grid .ch:focus-visible { transform: scale(1.05); z-index: 1; }
/* Ajustes en la tele: casillas más bajas para que quepan en una pantalla */
.dev-tv .set-grid { gap: 2.4vh 1.8vw; }
.dev-tv .set-tile { min-height: 13vh; padding: 1.5vh 1.6vw; font-size: 3vh; }
.dev-tv .set-tile svg { width: 5vh; height: 5vh; }
.dev-tv .set-tile small { font-size: 2.3vh; }
.dev-tv .page-head { margin-bottom: 3vh; }
.dev-tv .page-head h1 { font-size: clamp(28px, 3vw, 44px); }
/* Inicio en la tele: ocupa justo la pantalla (sin desplazarse) y todo se mide por la altura,
   con el diseño de tres columnas aunque la tele diga que su pantalla es estrecha */
.dev-tv .home { height: 100vh; min-height: 0; overflow: hidden; padding: 4vh 5vw 3vh; }
.dev-tv .home-top { min-height: 0; margin: 0 0 3vh; }
.dev-tv .home-top .brand { margin: 0; }
.dev-tv .home-right .ver { font-size: 3.6vh; }
.dev-tv .user-chip { font-size: 2.8vh; }
.dev-tv .user-chip .avatar { width: 5.5vh; height: 5.5vh; font-size: 2.6vh; }
.dev-tv .expiry { font-size: 3vh; }
.dev-tv .brand { margin: 0 0 3vh; gap: .5vh; }
.dev-tv .brand .logo-svg { width: 11vh; }
.dev-tv .brand span { font-size: 3.6vh; }
.dev-tv .dash {
  --gap: 3vh;
  flex: 1; min-height: 0;
  grid-template-columns: 1.15fr 1.25fr 1.15fr;
  grid-template-rows: minmax(0, 1fr);
}
.dev-tv .dash-mid { grid-column: auto; grid-template-rows: repeat(2, minmax(0, 1fr)); min-height: 0; }
.dev-tv .dash-side { grid-column: auto; grid-template-rows: repeat(5, minmax(0, 1fr)); min-height: 0; }
.dev-tv .tile { min-height: 0; padding: 1.5vh 1vw; gap: 1.4vh; font-size: 3.2vh; }
.dev-tv .tile svg { width: 9vh; }
.dev-tv .tile.big { grid-column: auto; flex-direction: column; min-height: 0; gap: 2.5vh; font-size: 4.6vh; }
.dev-tv .tile.big svg { width: 22vh; }
.dev-tv .tile.big:focus-visible { transform: none; }
.dev-tv .out-btn { min-height: 0; gap: 2vw; padding: 0 2vw; border-width: 2px; font-size: 3.2vh; }
.dev-tv .out-btn svg { width: 5vh; }
.dev-tv .home-foot { padding-top: 2.5vh; font-size: 2.4vh; }
.dev-tv .home-foot .ver { font-size: 3.6vh; }
.dev-tv .sheet { font-size: 18px; }

/* ---------- Móvil: todo más compacto, ordenado y parejo ---------- */
@media (max-width: 600px) {
  /* Portada: botones de igual tamaño; los de Ajustes, Historial, Cuenta… en dos columnas y bajos */
  .home { padding-left: 14px; padding-right: 14px; }
  .home-top { margin: 4px 0 18px; gap: 8px; }
  .home-top .brand .logo-svg { width: 58px; }
  .home-top .brand span { font-size: 17px; }
  .user-chip { font-size: 14px; padding-right: 10px; }
  .user-chip .avatar { width: 34px; height: 34px; }
  .dash { --gap: 10px; gap: 10px; }
  .tile.big { min-height: 104px; gap: 16px; font-size: 22px; }
  .tile.big svg { width: 56px; }
  .tile { min-height: 96px; font-size: 15px; gap: 8px; }
  .tile svg { width: 34px; }
  .dash-side { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-side .out-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .out-btn { min-height: 52px; padding: 0 14px; gap: 10px; font-size: 15px; border-width: 2px; }
  .out-btn svg { width: 22px; }
  .cw { margin-top: 18px; }
  .cw h3 { font-size: 17px; }
  .cw-card { width: 112px; }
  .match-card { width: 168px; }
  .home-foot { padding-top: 18px; font-size: 13px; }

  /* Páginas: cabecera con flecha y título (sin el logo), el botón de acción debajo a lo ancho */
  .page { --pad: 14px; }
  /* (la flecha de volver, un poco por debajo de la barra de la hora: pegada a ella el iPhone apenas la toca) */
  .page-head { flex-wrap: wrap; gap: 10px; min-height: 0; margin-bottom: 16px; padding-top: calc(env(safe-area-inset-top, 0px) + 12px); padding-bottom: 8px; }
  .page-head .logo-svg, .page-head .sep { display: none; }
  .page-head h1 { flex: 1; min-width: 0; font-size: 22px; line-height: 1.2; }
  .page-head .head-act { order: 3; flex: 1 1 100%; margin-left: 0; justify-content: center; }

  /* Ajustes: dos columnas de botones iguales */
  .set-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .set-tile { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; min-height: 96px; padding: 12px; font-size: 14px; line-height: 1.25; }
  .set-tile svg { width: 24px; height: 24px; }
  .set-tile small { font-size: 12px; overflow-wrap: anywhere; }
  .set-foot { font-size: 13px; }

  /* Listas de reproducción */
  .pl-grid { gap: 12px; }
  .pl-card { min-height: 0; padding: 14px 16px; }
  .pl-card b { font-size: 18px; }
  .pl-card small { font-size: 11px; }
  .pl-card .pl-dates { font-size: 12px; }
  .pill { font-size: 12px; padding: 3px 9px; }

  /* Explorar: buscadores más pequeños; en las filas, sin el número (más sitio para el título) */
  .browse .tabs .tab { font-size: 16px; }
  .search { height: 44px; }
  .search input { font-size: 15px; }
  #rows:not(.grid) .ch .num { display: none; }
  .ch { min-height: 58px; gap: 10px; }
  .grp { min-height: 48px; font-size: 15px; }

  /* Historial */
  .hist-tabs a { height: 40px; font-size: 13.5px; padding: 0 6px; text-align: center; line-height: 1.15; }
  .hist-row { padding: 8px; gap: 6px; }
  .hist-main { gap: 10px; }
  .hist-img { width: 54px; }
  .hist-more { left: 32px; top: 10px; width: 30px; height: 30px; }
  .hist-text b { font-size: 15px; }
  .hist-text small { font-size: 12.5px; }

  /* Cines: botones pequeños en una línea; los cines, en una fila que se desliza */
  .cine-where { gap: 8px; }
  .cine-place { flex: 1 1 100%; font-size: 15px; }
  .cine-where .pill-btn { height: 38px; padding: 0 12px; font-size: 13px; }
  .cine-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .cine-card { flex: 0 0 72%; scroll-snap-align: start; }
  .cine-movie { gap: 10px; padding: 10px; }
  .cine-poster { width: 70px; }
  .cine-title { font-size: 16px; }
  .cine-show { font-size: 13px; }
  .cine-show-name { min-width: 0; flex: 1 1 100%; }

  /* Ventanas: casi todo el ancho y menos margen; los títulos largos caben */
  /* Las ventanas empiezan por debajo de la barra de la hora (iPhone con la app en la pantalla de inicio: el
     contenido llega hasta arriba), con un margen para que la ✕ se toque bien */
  .scrim { padding: calc(env(safe-area-inset-top, 0px) + 14px) 8px calc(env(safe-area-inset-bottom, 0px) + 8px); }
  .sheet { padding: 16px 14px 18px; border-radius: 14px; max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 22px); }
  .sheet-head { top: -16px; margin: -16px -14px 12px; padding: 16px 14px 8px; }
  .sheet-head h2 { font-size: 20px; }
  .fb-vs { font-size: 14px; gap: 6px; }
  .fb-vs img, .fb-vs b { width: 22px; height: 22px; }
  .fb-match { padding: 10px; }
  .fb-play { font-size: 12px; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .rec-banner { max-width: calc(100vw - 20px); padding: 10px 12px; }
  /* Grupos de botones: dos por fila (el último a lo ancho si son impares) */
  .btn-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .btn-row > .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .btn-row .btn { height: 48px; padding: 0 10px; font-size: 15px; gap: 6px; }
  .who-grid { grid-template-columns: 1fr 1fr; }
  .rec-banner b { font-size: 14px; }
}

@media (max-width: 480px) {
  .player .bar { gap: 6px; }
  .player .bar .icon-btn { width: 38px; height: 38px; }
  .player .bar [data-p="copy"] { display: none; }
  /* En el móvil solo caben los saltos de 10 s */
  .player .seek-btn[data-s="-30"], .player .seek-btn[data-s="30"] { display: none; }
  .choice { height: 58px; font-size: 19px; }
}

/* ---------- Aspecto 3D: botones con relieve (brillo arriba, sombra abajo) e iconos en relieve ---------- */
/* Relieve común: luz en el borde de arriba, sombra en el de abajo y una sombra que lo levanta del fondo */
.tile, .set-tile, .btn, .choice, .pill-btn, .pl-card, .cine-card, .team-opt, .fb-play, .cine-have, .chip, .fb-country {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .32), inset 0 -4px 10px rgba(0, 0, 0, .28), 0 5px 0 rgba(0, 0, 0, .28), 0 12px 24px rgba(0, 0, 0, .35);
  transition: transform .12s, box-shadow .12s;
}
.choice, .btn:not(.ghost):not(.danger), .pill-btn {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .14)), var(--btn);
}
.tile, .set-tile { background-image: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .16)), linear-gradient(160deg, var(--acc-3), var(--acc) 50%, var(--acc-2)); }
.btn.danger { background-image: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .14)), linear-gradient(180deg, #ff5a78, #d9264b); }
.btn.ghost { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 -3px 8px rgba(0, 0, 0, .25), 0 4px 0 rgba(0, 0, 0, .25), 0 10px 20px rgba(0, 0, 0, .3); }
.out-btn { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), inset 0 -4px 10px rgba(0, 0, 0, .35), 0 5px 0 rgba(0, 0, 0, .3), 0 12px 24px rgba(0, 0, 0, .35); transition: transform .12s, box-shadow .12s; }
.grp, .ch, .hist-row, .who-row, .act-row, .bw-user, .cine-movie, .fb-match { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -2px 6px rgba(0, 0, 0, .22), 0 3px 8px rgba(0, 0, 0, .22); }
.icon-btn, .cw-more, .rec-x, .hist-more, .back { background-image: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 60%); }
.cw-more, .rec-x, .hist-more { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 6px rgba(0, 0, 0, .5); }
.avatar { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -4px 8px rgba(0, 0, 0, .25), 0 6px 14px rgba(0, 0, 0, .4); }
.cw-img, .hist-img, .cine-poster, .match-teams { box-shadow: 0 6px 14px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .15); }

/* Seleccionado (mando o ratón): se levanta más, con el marco blanco; pulsado: se hunde */
.tile:hover, .tile:focus-visible, .set-tile:hover, .set-tile:focus-visible, .choice:hover, .choice:focus-visible,
.pill-btn:hover, .pill-btn:focus-visible, .pl-card:hover, .pl-card:focus-visible, .out-btn:not([disabled]):hover, .out-btn:focus-visible {
  box-shadow: 0 0 0 4px #fff, inset 0 2px 0 rgba(255, 255, 255, .4), inset 0 -4px 10px rgba(0, 0, 0, .25), 0 9px 0 rgba(0, 0, 0, .25), 0 20px 40px rgba(0, 0, 0, .5);
  transform: translateY(-2px) scale(1.03);
}
.btn:hover, .btn:focus-visible, .btn.ghost:hover, .btn.ghost:focus-visible {
  box-shadow: 0 0 0 3px var(--gold), inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -4px 10px rgba(0, 0, 0, .25), 0 7px 0 rgba(0, 0, 0, .25), 0 16px 30px rgba(0, 0, 0, .45);
  transform: translateY(-1px);
}
.choice:focus-visible { box-shadow: 0 0 0 4px var(--gold), inset 0 2px 0 rgba(255, 255, 255, .4), 0 9px 0 rgba(0, 0, 0, .25), 0 20px 40px rgba(0, 0, 0, .5); transform: translateY(-2px); }
.tile:active, .set-tile:active, .btn:active, .choice:active, .pill-btn:active, .out-btn:active, .chip:active, .fb-play:active, .cine-have:active {
  transform: translateY(3px) scale(.99);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 0 rgba(0, 0, 0, .3);
}
.pl-card.on { box-shadow: 0 0 0 4px #fff, inset 0 2px 0 rgba(255, 255, 255, .5), 0 5px 0 rgba(0, 0, 0, .25), 0 12px 32px rgba(0, 0, 0, .32); }

/* Iconos en relieve: sombra debajo y un brillo fino arriba */
.tile svg, .out-btn svg, .set-tile svg, .btn svg, .choice svg, .pill-btn svg, .icon-btn svg, .back svg, .chip svg, .cw-more svg {
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .45)) drop-shadow(0 -1px 0 rgba(255, 255, 255, .28));
}
.logo-svg { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
@media (prefers-reduced-motion: reduce) {
  .tile, .set-tile, .btn, .choice, .pill-btn, .out-btn { transition: none; }
  .tile:hover, .tile:focus-visible, .set-tile:hover, .set-tile:focus-visible, .btn:hover, .btn:focus-visible { transform: none; }
}

/* Buscar en la tele (desde el móvil) */
.tvs-form { display: grid; gap: 14px; margin-top: 10px; }
.tvs-types { justify-content: center; margin: 0; }
.tvs-types .fb-country { padding: 8px 16px; font-size: 15px; }

/* Novedades en Apple TV: ficha de las que no están en las listas */
.atv-info { display: flex; gap: 16px; align-items: flex-start; margin: 6px 0 4px; }
.atv-info img { width: 120px; border-radius: 10px; flex: none; box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.atv-info > div { min-width: 0; }
.atv-info .dialog-text { margin: 6px 0 0; }

/* Filas de plataformas: selector Películas / Series al lado del título */
.st-row h3 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.st-seg { font-size: 14px; }
.st-row .cw-row > .hint { padding: 20px 4px; }

/* TV en vivo: lo encontrado en la guía al buscar (encima de los canales) */
#guideHits:not(:empty) { display: grid; gap: 6px; padding: 4px 4px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.gh-head { margin: 2px 4px 4px; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-2); }
.gh-head svg { width: 18px; height: 18px; }
.gh-row .gs-bell { pointer-events: none; }
/* (en la columna de canales hay poco sitio: la fecha más estrecha y el título en dos líneas) */
.gh-row { grid-template-columns: 104px 40px minmax(0, 1fr) auto; gap: 10px; }
.gh-row .logo { width: 40px; height: 28px; }
.gh-row .gs-ch b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
.dev-tv .gh-row { grid-template-columns: 17vh 6vh minmax(0, 1fr) auto; }
/* Canal que, según la guía, emite ese partido */
.fb-play.by-guide { box-shadow: inset 0 0 0 2px #ffcf6e; }
.gh-row .gs-bell.on { color: #ffcf6e; }

/* ---------- Versión Pro: TV en vivo con la guía en rejilla ---------- */
.pro {
  --rail: 76px; --grp: 300px; --chw: 300px;
  position: fixed; inset: 0; z-index: 5;
  display: grid; grid-template-columns: var(--rail) var(--grp) minmax(0, 1fr); grid-template-rows: 40vh minmax(0, 1fr);
  background: linear-gradient(180deg, #0a0c16 0%, #0d1024 100%); color: #eef0ff;
  transition: grid-template-columns .25s ease;
}
.pro.collapsed { --grp: 0px; }
.pro-rail { grid-row: 1 / 3; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0; background: rgba(255, 255, 255, .03); border-right: 1px solid rgba(255, 255, 255, .06); }
.pro-gap { flex: 1; }
.pro-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: rgba(255, 255, 255, .7); }
.pro-ico svg { width: 26px; height: 26px; }
.pro-ico.on { color: #fff; background: rgba(255, 255, 255, .1); }
.pro-ico:focus-visible, .pro-ico:hover { color: #fff; background: rgba(255, 255, 255, .18); outline: 2px solid #fff; }
.pro-groups { grid-row: 1 / 3; overflow: hidden; display: flex; flex-direction: column; background: rgba(0, 0, 0, .35); border-right: 1px solid rgba(255, 255, 255, .06); }
.pro-q { margin: 14px 12px 4px; }
.pro-glist { overflow-y: auto; padding: 10px 8px 20px; display: grid; gap: 2px; align-content: start; }
.pro-grp { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 10px; text-align: left; font-size: 17px; color: rgba(255, 255, 255, .82); white-space: nowrap; }
.pro-grp span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pro-glist { overflow-x: hidden; }
.pro-grp small { opacity: .55; font-size: 13px; }
.pro-grp.on { color: #fff; background: rgba(255, 255, 255, .12); font-weight: 700; }
.pro-grp:focus-visible, .pro-grp:hover { background: #fff; color: #10142a; outline: none; }
.pro-top { grid-column: 3; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 26px; padding: 22px 26px 12px; min-height: 0; }
.pro-top .stage { height: 100%; aspect-ratio: 16 / 9; width: auto; max-width: 52vw; border-radius: 10px; overflow: hidden; background: #000; position: relative; }
.pro-info { min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.pro-info h2 { margin: 0; font-size: clamp(22px, 2.1vw, 34px); line-height: 1.15; }
.pro-chname { opacity: .7; font-weight: 600; }
.pro-when { margin: 2px 0; display: flex; align-items: center; gap: 12px; font-size: 16px; opacity: .9; }
.pro-bar { width: 110px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.pro-bar i { display: block; height: 100%; background: #fff; }
.pro-desc { margin: 4px 0; line-height: 1.4; opacity: .85; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.pro-guide { grid-column: 3; position: relative; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid rgba(255, 255, 255, .08); }
.pro-head { display: grid; grid-template-columns: var(--chw) minmax(0, 1fr); align-items: center; height: 40px; padding-right: 10px; font-size: 14px; color: rgba(255, 255, 255, .75); }
.pro-day { padding-left: 16px; color: #8fb0ff; }
.pro-times { position: relative; height: 100%; }
.pro-times span { position: absolute; top: 50%; transform: translateY(-50%); padding-left: 6px; border-left: 1px solid rgba(255, 255, 255, .25); }
.pro-rows { flex: 1; overflow-y: auto; padding-right: 10px; scrollbar-width: thin; }
.pro-row { display: grid; grid-template-columns: var(--chw) minmax(0, 1fr); height: 64px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.pro-ch { display: flex; align-items: center; gap: 12px; padding: 0 12px; text-align: left; min-width: 0; color: inherit; }
.pro-ch .logo { width: 48px; height: 34px; flex: none; border-radius: 6px; font-size: 12px; }
.pro-ch .logo img { object-fit: contain; }
.pro-num { width: 34px; flex: none; text-align: right; opacity: .55; font-size: 15px; }
.pro-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 16px; }
.pro-row.playing .pro-name { color: #ffcf6e; }
.pro-ch:focus-visible, .pro-ch:hover { background: rgba(255, 255, 255, .12); outline: 2px solid #fff; outline-offset: -2px; border-radius: 6px; }
.pro-track { position: relative; min-width: 0; }
.pro-cell { position: absolute; top: 4px; bottom: 4px; padding: 0 10px; display: flex; align-items: center; overflow: hidden; text-align: left;
  border-radius: 6px; background: rgba(255, 255, 255, .07); border-right: 3px solid #0b0e1c; color: rgba(255, 255, 255, .88); font-size: 15px; }
.pro-cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-cell svg { width: 15px; height: 15px; vertical-align: -2px; color: #ffcf6e; }
.pro-cell.now { background: rgba(120, 140, 255, .2); color: #fff; }
.pro-cell.past { opacity: .55; }
.pro-cell.empty { background: rgba(255, 255, 255, .03); color: rgba(255, 255, 255, .45); }
.pro-cell:focus-visible, .pro-cell:hover { background: #fff; color: #10142a; outline: none; opacity: 1; z-index: 2; }
.pro-now { position: absolute; top: 40px; bottom: 0; width: 2px; background: #ff4d6d; pointer-events: none; z-index: 3;
  left: calc(var(--chw) + (100% - var(--chw) - 10px) * var(--at, 0) / 100); }
.pro-now[hidden] { display: none; }
.pro-more { padding: 14px; text-align: center; }
.pro-empty { padding: 24px; }

/* Mensajes del administrador */
.msg-text { font-size: 19px; line-height: 1.45; white-space: pre-wrap; margin: 10px 0 18px; }
.msg-form { display: grid; gap: 12px; }
.msg-to { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.msg-to small { opacity: .75; margin-right: 4px; }
.msg-sent { display: grid; gap: 10px; }
.msg-item { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .07); display: grid; gap: 6px; justify-items: start; }
.msg-item p { margin: 0; white-space: pre-wrap; }
.msg-item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; }
.msg-item-head small, .msg-who { opacity: .75; }
.msg-who.wait { color: #ffcf6e; opacity: 1; }

/* Listas que no son suyas (quien no es administrador): solo para consultar */
.pl-section { margin: 18px 0 8px; font-size: 18px; opacity: .85; }
.pl-card.locked { opacity: .78; cursor: default; }
.pl-card.locked b svg { width: 18px; height: 18px; vertical-align: -3px; }

/* Buscar con IA */
.ai-form { display: grid; gap: 12px; margin-top: 8px; }
.ai-q { min-height: 84px; resize: vertical; font: inherit; line-height: 1.4; padding: 12px 14px; }
[data-ai-mic].on { background: #d9264b; color: #fff; }
.ai-results { display: grid; gap: 12px; margin-top: 16px; }
.ai-card { display: flex; gap: 14px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); }
.ai-card.have { box-shadow: inset 3px 0 0 var(--gold); }
.ai-img { flex: none; width: 76px; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, .1); display: grid; place-items: center; font-size: 20px; }
.ai-img img { width: 100%; height: 100%; object-fit: cover; }
.ai-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ai-text b small { font-weight: 500; opacity: .7; }
.ai-meta { opacity: .7; }
.ai-text p { margin: 2px 0 6px; line-height: 1.35; }
.ai-nohave { opacity: .7; font-size: 14px; }

/* ¿Reanudar o desde el principio?: lo que lleva visto */
.resume-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .15); overflow: hidden; margin: 4px 0 14px; }
.resume-bar i { display: block; height: 100%; background: var(--gold); }

/* Motor (F1 y MotoGP): pilotos para elegir, bandera del GP en la portada y horario de sesiones */
.rider-opt { justify-content: flex-start; text-align: left; }
.rider-opt .rider-pos { min-width: 28px; text-align: center; font-size: 18px; opacity: .8; }
.rider-opt span { display: flex; flex-direction: column; min-width: 0; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; }
.rider-opt small { opacity: .75; font-weight: 500; font-size: 13px; }
.motor-flag { font-size: 64px; line-height: 1; justify-content: center; }
.gp-flag { width: 120px; max-width: 70%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.gp-flag.small { width: 30px; vertical-align: -3px; border-radius: 3px; box-shadow: none; }
.fb-team small { font-weight: 500; opacity: .7; font-size: .8em; margin-left: 6px; }
.motor-sessions { display: grid; gap: 4px; }
.motor-session { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 8px; background: rgba(255, 255, 255, .06); }
.motor-session.main { background: rgba(255, 255, 255, .14); box-shadow: inset 3px 0 0 var(--gold); }
.motor-session.past { opacity: .5; }
.motor-session span { text-align: right; min-width: 0; }
.motor-session small { opacity: .7; }
.motor-ch { margin-bottom: 8px; }
