@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../fonts/PlusJakartaSans-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #05070d;
  --bg-2: #080d17;
  --surface: #0d1524;
  --surface-2: #121d31;
  --line: rgba(148, 163, 184, .16);
  --line-strong: rgba(148, 163, 184, .3);
  --text: #f5f8ff;
  --muted: #93a4bd;
  --muted-2: #6d7f99;
  --accent: #38bdf8;
  --accent-2: #6c63ff;
  --danger: #fb7185;
  --ok: #34d399;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .55);
  --rail-w: 232px;
  --topbar-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

/* El atributo hidden debe ganar a cualquier display de autor. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(108, 99, 255, .1), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(56, 189, 248, .07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-playing { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.02em; }

::selection { background: rgba(56, 189, 248, .3); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Foco visible a distancia para mando y teclado de TV. */
.navlink:focus-visible,
.tabbar .navlink:focus-visible,
.card:focus-visible,
.row__arrow:focus-visible,
.chip:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(56, 189, 248, .16), 0 10px 28px rgba(0, 0, 0, .35);
}

/* ------------------------------------------------------------------------- */
/* Arranque y avisos                                                         */
/* ------------------------------------------------------------------------- */
.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 22px;
  text-align: center;
}

.boot__mark,
.brand,
.auth__brand,
.topbar__brand {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.boot__mark span,
.brand span,
.auth__brand span,
.topbar__brand span {
  background: linear-gradient(110deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.boot__mark small,
.brand small,
.auth__brand small {
  margin-left: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--muted-2);
  vertical-align: super;
  text-transform: uppercase;
}

.boot__bar {
  width: 180px;
  height: 3px;
  margin: 0 auto;
  border-radius: 99px;
  background: rgba(148, 163, 184, .14);
  overflow: hidden;
}

.boot__bar i {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: bootbar 1.2s var(--ease) infinite;
}

@keyframes bootbar {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(360%); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 9500;
  transform: translate(-50%, 20px);
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(13, 21, 36, .94);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .24s var(--ease);
  backdrop-filter: blur(18px);
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind="error"] { border-color: rgba(251, 113, 133, .45); }
.toast[data-kind="success"] { border-color: rgba(52, 211, 153, .35); }

/* ------------------------------------------------------------------------- */
/* Controles básicos                                                         */
/* ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s var(--ease), background .18s ease, border-color .18s ease, opacity .18s ease;
}

.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }

.btn--primary {
  background: linear-gradient(110deg, #f5f8ff, #dbeafe);
  color: #081020;
  box-shadow: 0 10px 30px rgba(56, 189, 248, .16);
}

.btn--primary:hover { background: #fff; }

.btn--glass {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, .07);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.btn--glass:hover { background: rgba(255, 255, 255, .12); }
.btn--glass.is-on { border-color: rgba(56, 189, 248, .55); color: var(--accent); }
.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, .05); }
.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 13px; }

.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.iconbtn svg { width: 20px; height: 20px; }
.iconbtn:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.iconbtn.is-active { color: var(--accent); }
.iconbtn--round { border-radius: 999px; }
.iconbtn--glass { border-color: var(--line-strong); background: rgba(5, 7, 13, .45); color: var(--text); backdrop-filter: blur(14px); }
.iconbtn--glass span { font-size: 13px; font-weight: 600; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.is-active { border-color: rgba(56, 189, 248, .55); background: rgba(56, 189, 248, .12); color: #dff4ff; }
.chip--demo { height: 26px; padding: 0 10px; border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .1); color: var(--ok); font-size: 10px; letter-spacing: .14em; }
.chip--skeleton { width: 86px; height: 36px; border: 0; background: rgba(148, 163, 184, .09); }
.chip--skeleton.skeleton { animation: shimmer 1.4s linear infinite; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(56, 189, 248, .25), rgba(108, 99, 255, .35));
  border: 1px solid rgba(148, 163, 184, .22);
  font-size: 14px;
  font-weight: 800;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(148, 163, 184, .1);
  border-radius: 8px;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent);
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer { to { transform: translateX(100%); } }

.skeleton--line { display: block; height: 11px; margin-top: 9px; border-radius: 6px; }
.skeleton--short { width: 62%; }
.skeleton--tiny { width: 38%; }
.skeleton--title { display: block; height: 42px; margin-top: 16px; border-radius: 10px; }
.skeleton--btn { display: inline-block; width: 138px; height: 44px; border-radius: 12px; }

/* ------------------------------------------------------------------------- */
/* Estructura: riel, barra superior y pestañas                               */
/* ------------------------------------------------------------------------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 28px 18px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 13, 23, .96), rgba(5, 7, 13, .96));
  backdrop-filter: blur(20px);
}

.brand { padding: 0 10px; font-size: 25px; }
.brand small { font-size: 8px; }

.rail__nav { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; scrollbar-width: none; }
.rail__nav::-webkit-scrollbar { display: none; }

.navlink {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  height: 46px;
  padding: 0 13px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: background .16s ease, color .16s ease;
}

.navlink svg { width: 21px; height: 21px; flex: none; }
.navlink:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.navlink.is-active { background: rgba(56, 189, 248, .1); color: #e8f8ff; }
.navlink.is-active svg { color: var(--accent); }
.navlink.is-active::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 13px;
  bottom: 13px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.rail__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 4px 0;
  border-top: 1px solid var(--line);
}

.rail__user { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.rail__userbody { display: flex; flex-direction: column; min-width: 0; }
.rail__userbody strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail__userbody small { color: var(--muted-2); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { min-height: 100vh; margin-left: var(--rail-w); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(18px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 13, .78);
  backdrop-filter: blur(22px) saturate(1.2);
}

.topbar__brand { display: none; font-size: 22px; }

.topbar__search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(520px, 100%);
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted-2);
  transition: border-color .16s ease, background .16s ease;
}

.topbar__search:focus-within { border-color: rgba(56, 189, 248, .45); background: rgba(56, 189, 248, .05); color: var(--accent); }
.topbar__search svg { width: 19px; height: 19px; flex: none; }

.topbar__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.topbar__search input::placeholder { color: var(--muted-2); }
.topbar__search input::-webkit-search-cancel-button { filter: invert(1); opacity: .4; }

.topbar__search kbd {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted-2);
  font-family: inherit;
  font-size: 11px;
}

.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar__user { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; font-weight: 600; }

.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 70;
  display: none;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 13, .92);
  backdrop-filter: blur(22px);
}

.tabbar .navlink {
  height: 52px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0;
  font-size: 10px;
  letter-spacing: .02em;
}

.tabbar .navlink svg { width: 22px; height: 22px; }
.tabbar .navlink.is-active::before { display: none; }

.view { padding: clamp(18px, 3vw, 36px) clamp(16px, 3.4vw, 46px) 80px; max-width: 1680px; margin: 0 auto; min-width: 0; overflow-x: clip; }
.view:focus { outline: none; }
.view:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ------------------------------------------------------------------------- */
/* Acceso                                                                    */
/* ------------------------------------------------------------------------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr);
  background: var(--bg);
}

.auth__art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 5vw, 64px);
  overflow: hidden;
  background:
    radial-gradient(700px 500px at 20% 110%, rgba(108, 99, 255, .35), transparent 60%),
    radial-gradient(600px 400px at 90% 0%, rgba(56, 189, 248, .22), transparent 60%),
    linear-gradient(150deg, #071022, #05070d 70%);
}

.auth__art::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(600px 500px at 30% 40%, #000, transparent 75%);
}

.auth__brand { position: relative; font-size: 28px; z-index: 1; }

.auth__pitch { position: relative; z-index: 1; max-width: 580px; }
.auth__pitch h1 { margin: 18px 0 20px; font-size: clamp(38px, 5vw, 68px); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; }
.auth__pitch h1 em { font-style: normal; background: linear-gradient(100deg, var(--accent), #a5b4fc 60%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth__pitch > p { max-width: 480px; color: var(--muted); font-size: clamp(15px, 1.3vw, 17px); line-height: 1.6; }

.auth__features { display: grid; gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; }
.auth__features li { display: flex; align-items: center; gap: 12px; color: #c8d5e8; font-size: 14px; font-weight: 600; }
.auth__features span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(56, 189, 248, .22); background: rgba(56, 189, 248, .08); color: var(--accent); }
.auth__features svg { width: 18px; height: 18px; }

.auth__glow {
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, .2), transparent 62%);
  filter: blur(20px);
}

.auth__panel { display: grid; place-items: center; padding: clamp(22px, 4vw, 56px); background: linear-gradient(180deg, rgba(13, 21, 36, .55), rgba(5, 7, 13, .9)); border-left: 1px solid var(--line); }
.auth__card { width: min(420px, 100%); display: grid; gap: 16px; }
.auth__card header { margin-bottom: 6px; }
.auth__card h2 { font-size: 28px; letter-spacing: -.03em; }
.auth__card header p { margin-top: 6px; color: var(--muted); font-size: 14px; }

.field { display: grid; gap: 7px; }
.field > span:first-child { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.field input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

/* El selector de tipo compartía la forma del campo pero no sus estilos y
   terminaba mostrando el control claro del sistema. */
.field select {
  width: 100%;
  height: 48px;
  padding: 0 40px 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, .035);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393a4bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.field select::-ms-expand { display: none; }
.field select option { background: var(--surface); color: var(--text); }

.field input:focus { border-color: rgba(56, 189, 248, .6); background: rgba(56, 189, 248, .04); box-shadow: 0 0 0 4px rgba(56, 189, 248, .1); }
.field select:focus { border-color: rgba(56, 189, 248, .6); background-color: rgba(56, 189, 248, .04); box-shadow: 0 0 0 4px rgba(56, 189, 248, .1); }
.field__wrap { position: relative; display: block; }
.field__wrap input { padding-right: 72px; }
.field__eye { position: absolute; right: 8px; top: 8px; height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .06); color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.auth__error { margin: 0; padding: 12px 14px; border: 1px solid rgba(251, 113, 133, .35); border-radius: 10px; background: rgba(251, 113, 133, .08); color: #ffc2cc; font-size: 13px; }
.auth__foot a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.auth__foot { margin-top: 2px; color: var(--muted-2); font-size: 11.5px; line-height: 1.5; }
.btn.is-busy { opacity: .7; cursor: progress; }

/* ------------------------------------------------------------------------- */
/* Inicio: hero y filas                                                      */
/* ------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: clamp(430px, 60vh, 660px);
  margin: calc(clamp(18px, 3vw, 36px) * -1) calc(clamp(16px, 3.4vw, 46px) * -1) 34px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero--skeleton { background: rgba(148, 163, 184, .05); }
.hero__skeleton { position: absolute; inset: 0; border-radius: 0; }

.hero__media { position: absolute; inset: 0; z-index: -3; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transform: scale(1.02); }
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 7, 13, .96) 0%, rgba(5, 7, 13, .72) 38%, rgba(5, 7, 13, .08) 72%, rgba(5, 7, 13, .35) 100%),
    linear-gradient(0deg, var(--bg) 2%, rgba(5, 7, 13, .55) 26%, transparent 62%);
}

.hero__content { width: min(720px, 100%); padding: 0 clamp(22px, 4vw, 62px) clamp(38px, 6vw, 74px); }
.hero__content h1 { margin: 12px 0 12px; font-size: clamp(36px, 5.4vw, 76px); line-height: .98; letter-spacing: -.05em; text-wrap: balance; }
.hero__meta { color: #cdd9ec; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; }
.hero__desc { max-width: 560px; margin-top: 14px; color: #aebdd2; font-size: 14.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero__actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.hero__dots { display: flex; gap: 7px; margin-top: 30px; }
.hero__dot { width: 26px; height: 3px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .22); cursor: pointer; transition: background .2s ease, width .2s ease; }
.hero__dot.is-active { width: 44px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Hero de recomendados: póster grande + ficha descriptiva */
.hero--poster { min-height: clamp(470px, 64vh, 700px); }
.hero--poster .hero__media img {
  filter: blur(28px) saturate(1.12);
  opacity: .5;
  transform: scale(1.14);
}
.hero--poster .hero__shade {
  background:
    linear-gradient(90deg, rgba(5, 7, 13, .97) 0%, rgba(5, 7, 13, .82) 42%, rgba(5, 7, 13, .3) 100%),
    linear-gradient(0deg, var(--bg) 1%, rgba(5, 7, 13, .45) 30%, transparent 66%);
}
.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 5vw, 76px);
  width: 100%;
  padding: 0 clamp(22px, 4vw, 62px) clamp(38px, 6vw, 74px);
}
/* Hero deportivo: más alto, fondo a pantalla completa y marcador. */
.hero--event {
  --hero-accent: var(--accent);
  /* El marcador debe dominar el primer pantallazo sin empujar todo el
     contenido hacia el borde inferior. */
  min-height: clamp(500px, 70vh, 720px);
  background:
    radial-gradient(circle at 78% 18%, rgba(56, 189, 248, .16), transparent 38%),
    linear-gradient(135deg, #0d1524, #05070d 70%);
}

.hero--event::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 78% 18%, var(--hero-accent), transparent 44%);
  opacity: .12;
}

.hero--event .hero__score {
  color: var(--hero-accent);
}

.hero--event .hero__media img {
  filter: saturate(.82) contrast(.92);
  opacity: .42;
  transform: scale(1.01);
}

.hero--event .hero__shade {
  background:
    linear-gradient(90deg, rgba(5, 7, 13, .97) 0%, rgba(5, 7, 13, .78) 42%, rgba(5, 7, 13, .12) 78%, rgba(5, 7, 13, .32) 100%),
    linear-gradient(0deg, var(--bg) 2%, rgba(5, 7, 13, .5) 30%, transparent 68%);
}

.hero--event .hero__inner {
  align-items: center;
  padding-top: clamp(34px, 5vw, 64px);
  padding-bottom: clamp(34px, 5vw, 58px);
}

.hero--event .hero__content {
  width: min(980px, 100%);
  max-width: 980px;
  flex: 1;
  min-width: 0;
  padding-bottom: 0;
}

.hero--event .hero__content h1 {
  font-size: clamp(40px, 5.2vw, 82px);
}

/* En un partido con equipos, el marcador manda: el título queda como
   contexto y no compite con los nombres ni con el resultado. */
.hero--event .hero__content h1.hero__title--match {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 24px);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.25;
}

.hero--event .hero__poster {
  display: none !important;
}

.hero--event .hero__arrow {
  display: none;
}

/* Agenda lateral del hero: llena el espacio libre con los próximos eventos
   en lugar de dejar un póster gigante o un hueco negro. */
.hero__agenda {
  flex: none;
  width: min(350px, 26vw);
  align-self: center;
  display: grid;
  gap: 0;
  padding: 18px 20px;
  border: 1px solid rgba(56, 189, 248, .2);
  border-radius: 18px;
  background: rgba(8, 13, 23, .58);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
  backdrop-filter: blur(18px);
  z-index: 3;
}

.hero__agendaTitle {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}

.hero__agendaItem {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(148, 163, 184, .12);
}

.hero__agendaTime {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hero__agendaBody {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hero__agendaBody strong,
.hero__agendaBody small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero__agendaBody strong {
  font-size: 13px;
  font-weight: 700;
}

.hero__agendaBody small {
  color: var(--muted-2);
  font-size: 10.5px;
}

.hero__agendaLive {
  color: var(--ok);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .08em;
  white-space: nowrap;
}

/* Ticker de marcadores en vivo, justo debajo del hero. */
.sports-ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 clamp(16px, 3.4vw, 46px) 22px;
  padding: 9px 12px;
  border: 1px solid rgba(52, 211, 153, .2);
  border-radius: 14px;
  background: rgba(8, 13, 23, .62);
  overflow: hidden;
}

.sports-ticker__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  color: var(--ok);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}

.sports-ticker__label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px rgba(52, 211, 153, .9);
}

.sports-ticker__rail {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.sports-ticker__rail::-webkit-scrollbar { display: none; }

.sports-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 999px;
  background: rgba(13, 21, 36, .82);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.sports-ticker__item:hover { border-color: rgba(56, 189, 248, .4); }

.sports-ticker__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(52, 211, 153, .9);
}

.sports-ticker__meta {
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 600;
}

/* El navegador puede saltarse el layout de filas y rejillas lejos del
   viewport; al acercarse, se pinta y el observer de bindRows recalcula. */
.row,
.grid {
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
}

@media (max-width: 1180px) {
  .hero__agenda { display: none; }
}

.hero--event .eyebrow { color: var(--ok); }
.hero--event .eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 14px rgba(52, 211, 153, .85);
}

.hero__scoreboard {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 28px);
  flex-wrap: wrap;
  margin: 14px 0 8px;
}

.hero__team {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 14px);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(20px, 3vw, 40px);
  font-weight: 850;
  line-height: 1.04;
  color: var(--text);
  text-shadow: 0 4px 28px rgba(0, 0, 0, .55);
}

.hero__crest {
  flex: none;
  width: clamp(34px, 4.4vw, 64px);
  height: clamp(34px, 4.4vw, 64px);
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .5));
}

.hero__crest--monogram {
  display: grid;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, .32);
  border-radius: 50%;
  background: rgba(56, 189, 248, .1);
  color: var(--accent);
  font-size: clamp(11px, 1.4vw, 17px);
  font-weight: 900;
  letter-spacing: .02em;
}

.hero__score {
  font-size: clamp(38px, 6vw, 86px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.04em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 6px 30px rgba(56, 189, 248, .25);
}

.hero__live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid rgba(52, 211, 153, .38);
  border-radius: 999px;
  background: rgba(52, 211, 153, .1);
  color: var(--ok);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.hero__live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 12px rgba(52, 211, 153, .9);
}

.hero__live--next {
  border-color: rgba(56, 189, 248, .38);
  background: rgba(56, 189, 248, .1);
  color: var(--accent);
}

.hero__live--next i {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, .9);
}

.hero--poster .hero__content { width: auto; max-width: 640px; padding: 0; flex: 1; }
.hero--poster .hero__content h1 { font-size: clamp(34px, 4.8vw, 68px); }
.hero__poster { width: clamp(220px, 23vw, 338px); flex: none; }
.hero__posterFrame {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .2);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .72), 0 0 70px rgba(56, 189, 248, .1);
  transform: rotate(1.1deg);
  background: var(--surface);
}
.hero__posterImg { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero__posterFrame .card__fallback { font-size: 62px; }
.hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: rgba(5, 7, 13, .5);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
  transition: background .16s ease, border-color .16s ease;
}
.hero__arrow:hover { border-color: var(--accent); background: rgba(56, 189, 248, .16); }
.hero__arrow svg { width: 20px; height: 20px; }
.hero__arrow--prev { left: 18px; }
.hero__arrow--next { right: 18px; }
.hero__arrow--next svg { transform: rotate(180deg); }

.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; min-width: 0; }

.row { min-width: 0; }
.row__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 13px; min-width: 0; flex-wrap: wrap; }
.row__head h2 { font-size: clamp(17px, 1.5vw, 21px); font-weight: 750; letter-spacing: -.025em; }
.row__count { color: var(--muted-2); font-size: 12px; font-weight: 600; }
.row__tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.row__more { border: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.row__more:hover { color: var(--accent); }
.row__nav { display: flex; gap: 4px; }
.row__arrow { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .025); color: var(--muted); cursor: pointer; transition: color .16s ease, border-color .16s ease, background .16s ease; }
.row__arrow:hover { border-color: rgba(56, 189, 248, .45); background: rgba(56, 189, 248, .08); color: var(--accent); }
.row__arrow svg { width: 15px; height: 15px; }
.row__arrow:last-child svg { transform: rotate(180deg); }

.row__scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(148px, 12vw, 214px);
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 4px 2px 14px;
  scrollbar-width: none;
}

.row__scroller::-webkit-scrollbar { display: none; }
.row__scroller > * { scroll-snap-align: start; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.card__frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(145deg, #101b2d, #0a1120);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), outline-color .2s ease;
  outline: 1px solid rgba(148, 163, 184, .09);
  outline-offset: 0;
}

.card:hover .card__frame,
.card:focus-visible .card__frame {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .5), 0 0 0 1px rgba(56, 189, 248, .3);
}

.card:focus-visible { outline: none; }
.card:focus-visible .card__frame { outline: 2px solid var(--accent); outline-offset: 2px; }

.card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__fallback { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(150deg, #142238, #0a1220); color: rgba(148, 163, 184, .55); font-size: 30px; font-weight: 800; }

.card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 7, 13, .72));
  opacity: 0;
  transition: opacity .22s ease;
  pointer-events: none;
}

.card:hover .card__shine { opacity: 1; }

.card__badge,
.card__channel {
  position: absolute;
  top: 9px;
  left: 9px;
  max-width: calc(100% - 18px);
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(5, 7, 13, .72);
  color: #e8f4ff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.card__channel { left: auto; right: 9px; background: rgba(56, 189, 248, .18); color: #d8f4ff; }

.card__flags {
  position: absolute;
  top: 9px;
  right: 9px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  pointer-events: none;
}

.card__lang,
.card__cc {
  padding: 3px 7px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: rgba(5, 7, 13, .78);
  color: #e8f4ff;
  backdrop-filter: blur(4px);
}

.card__lang--latino { background: rgba(34, 197, 94, .88); color: #04130a; }
.card__lang--english { background: rgba(59, 130, 246, .88); color: #f3f8ff; }
.card__lang--spanish { background: rgba(245, 158, 11, .9); color: #1b1103; }
.card__cc { background: rgba(15, 23, 42, .8); color: #c7d6ea; letter-spacing: .02em; }

.card__source {
  position: absolute;
  left: 9px;
  bottom: 17px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, .82);
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, .25);
  backdrop-filter: blur(4px);
}

.card__source--jellyfin { color: #bbf7d0; border-color: rgba(34, 197, 94, .35); }
.card__source--provider { color: #fde68a; border-color: rgba(245, 158, 11, .35); }

.card__progress { position: absolute; left: 9px; right: 9px; bottom: 9px; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .24); overflow: hidden; }
.card__progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #a5b4fc); }

.card__name { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.card__meta { color: var(--muted-2); font-size: 12px; }
.card--skeleton .card__poster { aspect-ratio: 2 / 3; border-radius: 13px; }
.card--skeleton .skeleton--line { width: 86%; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}

.shelf { display: grid; gap: 14px; }

.pagehead { display: flex; align-items: flex-end; gap: 18px; }
.pagehead h1 { font-size: clamp(28px, 3vw, 42px); letter-spacing: -.04em; }
.pagehead p { margin-top: 5px; color: var(--muted); font-size: 13.5px; }
.pagehead__actions { margin-left: auto; display: flex; gap: 8px; }

.chips { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips--seasons { margin-top: 4px; }
.loadmore { display: flex; justify-content: center; padding: 8px 0 24px; }

/* ------------------------------------------------------------------------- */
/* Estados vacíos                                                            */
/* ------------------------------------------------------------------------- */
.empty { display: grid; justify-items: center; gap: 8px; padding: clamp(44px, 8vw, 96px) 20px; text-align: center; }
.empty__icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 6px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--muted); font-size: 24px; }
.empty h2 { font-size: 20px; }
.empty p { max-width: 420px; color: var(--muted); font-size: 13.5px; }
.empty--error .empty__icon { border-color: rgba(251, 113, 133, .35); color: var(--danger); }
.empty .btn { margin-top: 12px; }

/* ------------------------------------------------------------------------- */
/* TV en vivo                                                                */
/* ------------------------------------------------------------------------- */
.live-rows { display: grid; gap: 24px; }
.live-scroller { grid-auto-columns: clamp(170px, 17vw, 230px); }
.live-tile { display: flex; flex-direction: column; gap: 7px; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.live-tile__art { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; border-radius: 11px; overflow: hidden; background: linear-gradient(145deg, #123a8f, #081326); border: 1px solid rgba(148, 163, 184, .12); }
.live-tile__art img { width: 100%; height: 100%; object-fit: cover; padding: 0; }
.live-tile__art > span:not(.live-tile__live) { color: #fff; font-size: 24px; font-weight: 800; }
.live-tile:hover .live-tile__art { border-color: rgba(56, 189, 248, .45); }
.live-tile__live { position: absolute; top: 7px; left: 7px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border: 1px solid rgba(52, 211, 153, .35); border-radius: 5px; background: rgba(5, 7, 13, .72); color: var(--ok); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.live-tile__live i { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px rgba(52, 211, 153, .9); }
.live-tile__live--next { color: var(--accent); border-color: rgba(56, 189, 248, .35); }
.live-tile__live--next i { background: var(--accent); box-shadow: 0 0 8px rgba(56, 189, 248, .9); }
.live-tile__progress { display: block; width: 100%; height: 3px; margin-top: -3px; border-radius: 99px; overflow: hidden; background: rgba(148, 163, 184, .2); }
.live-tile__progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #a5b4fc); transition: width .4s linear; }
.live-tile__title { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; font-weight: 700; }
.live-tile__sub { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted-2); font-size: 11.5px; }

.channels { display: grid; gap: 10px; }

.channel {
  display: grid;
  grid-template-columns: 132px 1fr 46px;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(255, 255, 255, .028), rgba(255, 255, 255, .012));
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s var(--ease);
}

.channel:hover { border-color: rgba(56, 189, 248, .3); background: rgba(56, 189, 248, .045); transform: translateY(-1px); }
.channel__logo { display: grid; place-items: center; width: 132px; height: 74px; border-radius: 11px; background: #fff; overflow: hidden; }
.channel__logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.channel__initials { color: #0b1220; font-size: 22px; font-weight: 800; }
.channel__body { display: grid; gap: 5px; min-width: 0; }
.channel__top { display: flex; align-items: baseline; gap: 10px; }
.channel__top strong { font-size: 15px; }
.channel__meta { color: var(--muted-2); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel__now { color: #cdd9ec; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel__bar { display: block; height: 3px; border-radius: 99px; background: rgba(148, 163, 184, .16); overflow: hidden; }
.channel__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.channel__foot { display: flex; gap: 12px; color: var(--muted-2); font-size: 11px; }
.channel__next { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel__play { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--muted); }
.channel:hover .channel__play { border-color: rgba(56, 189, 248, .5); background: rgba(56, 189, 248, .12); color: var(--accent); }
.channel__play svg { width: 18px; height: 18px; }
.channel--skeleton { pointer-events: none; }

/* ------------------------------------------------------------------------- */
/* Apps nativas                                                              */
/* ------------------------------------------------------------------------- */
.apps { display: grid; gap: 14px; max-width: 900px; }
.appcard { display: flex; align-items: center; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(110deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)); }
.appcard__icon { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 14px; border: 1px solid rgba(56, 189, 248, .22); background: rgba(56, 189, 248, .08); color: var(--accent); }
.appcard__icon svg { width: 26px; height: 26px; }
.appcard__body { display: grid; gap: 4px; flex: 1; min-width: 0; }
.appcard__body h2 { font-size: 17px; }
.appcard__body p { color: var(--muted); font-size: 13px; }
.appcard__body small { color: var(--muted-2); font-size: 11.5px; }
.apps__note { max-width: 720px; color: var(--muted-2); font-size: 12.5px; }

@media (max-width: 620px) {
  .appcard { flex-wrap: wrap; }
  .appcard .btn { width: 100%; }
}

/* ------------------------------------------------------------------------- */
/* Ficha de contenido                                                        */
/* ------------------------------------------------------------------------- */
.detail { position: relative; isolation: isolate; margin: calc(clamp(18px, 3vw, 36px) * -1) calc(clamp(16px, 3.4vw, 46px) * 0) 0; padding-bottom: 20px; }
.detail__backdrop { position: absolute; inset: 0 0 auto; height: 74vh; min-height: 480px; z-index: -2; overflow: hidden; }
.detail__backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; opacity: .5; filter: saturate(1.05); }
.detail__shade { position: absolute; inset: 0 0 auto; height: 74vh; min-height: 480px; z-index: -1; background: linear-gradient(0deg, var(--bg) 3%, rgba(5, 7, 13, .86) 22%, rgba(5, 7, 13, .45) 58%, rgba(5, 7, 13, .3)), linear-gradient(90deg, rgba(5, 7, 13, .85), transparent 70%); }

.detail__bar { display: flex; justify-content: space-between; padding: 4px 0 26px; }
.detail__bar .iconbtn--glass { width: auto; padding: 0 14px; }
.detail__bar .iconbtn--glass span { font-size: 12.5px; }

.detail__hero { display: grid; grid-template-columns: clamp(170px, 19vw, 260px) minmax(0, 760px); gap: clamp(22px, 3.4vw, 44px); align-items: end; padding-bottom: 34px; }
.detail__poster { aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); outline: 1px solid rgba(148, 163, 184, .14); }
.detail__poster img { width: 100%; height: 100%; object-fit: cover; }
.detail__poster .card__fallback { font-size: 44px; }
.detail__info h1 { margin: 12px 0 10px; font-size: clamp(34px, 4.6vw, 64px); line-height: 1; letter-spacing: -.05em; text-wrap: balance; }
.detail__tagline { color: #c8d5e8; font-size: 15px; font-weight: 600; }
.detail__meta { color: var(--muted); font-size: 13px; margin-top: 6px; }
.detail__genres { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.detail__genres span + span::before { content: '·'; margin-right: 10px; color: var(--muted-2); }
.detail__desc { max-width: 720px; margin-top: 16px; color: #b9c6d9; font-size: 14.5px; line-height: 1.65; }
.detail__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.detail__related { margin-top: 26px; }
.detail--skeleton .detail__hero { align-items: start; padding-top: 40px; }
.detail--skeleton .detail__info { display: grid; gap: 4px; }

.seasons { margin-top: 24px; display: grid; gap: 14px; padding-top: 26px; border-top: 1px solid var(--line); }
.episodes { display: grid; gap: 8px; }

.episode {
  display: grid;
  grid-template-columns: 148px 1fr 42px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .022);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.episode:hover { border-color: rgba(56, 189, 248, .32); background: rgba(56, 189, 248, .05); }
.episode__thumb { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: var(--surface); }
.episode__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.episode__thumb .card__fallback { font-size: 26px; }
.episode__label { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.episode__body { display: grid; gap: 4px; min-width: 0; }
.episode__body strong { font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.episode__body small { color: var(--muted-2); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.episode__bar { height: 2px; margin-top: 5px; border-radius: 99px; background: rgba(148, 163, 184, .18); overflow: hidden; }
.episode__bar i { display: block; height: 100%; background: var(--accent); }
.episode__play { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); }
.episode:hover .episode__play { border-color: var(--accent); color: var(--accent); }
.episode__play svg { width: 15px; height: 15px; }

/* ------------------------------------------------------------------------- */
/* Reproductor                                                               */
/* ------------------------------------------------------------------------- */
.player {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

.player.is-idle { cursor: none; }
.player__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player__video--cover { object-fit: cover; }
.player__video--zoom { object-fit: cover; transform: scale(1.06); }
.player[data-subs="s"] video::cue { font-size: 80%; }
.player[data-subs="m"] video::cue { font-size: 100%; }
.player[data-subs="l"] video::cue { font-size: 125%; }
.player__poster { position: absolute; inset: -30px; z-index: -1; background-size: cover; background-position: center; filter: blur(38px) brightness(.34); transform: scale(1.15); }
.player__shade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 80% at 50% 50%, transparent 45%, rgba(0, 0, 0, .35)); }

.player__spinner { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; z-index: 6; pointer-events: none; transition: opacity .25s ease; }
.player__spinner.is-hidden { opacity: 0; }
.player__spinner span { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .18); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.player__spinner em { color: rgba(255, 255, 255, .7); font-size: 12px; font-style: normal; letter-spacing: .1em; text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }

.player__top,
.player__bottom,
.player__center {
  position: absolute;
  z-index: 5;
  transition: opacity .24s ease, transform .24s var(--ease);
}

.player.is-idle .player__top,
.player.is-idle .player__bottom,
.player.is-idle .player__center { opacity: 0; pointer-events: none; }
.player.is-idle .player__top { transform: translateY(-8px); }
.player.is-idle .player__bottom { transform: translateY(8px); }

.player__top {
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) clamp(16px, 3vw, 34px) 46px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .78), transparent);
}

.player__heading { display: grid; min-width: 0; }
.player__heading strong { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__heading span { color: rgba(255, 255, 255, .6); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.player__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.player__icon:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.player__icon svg { width: 21px; height: 21px; }
.player__tools .player__more { display: grid; }

.player__pill { height: 32px; padding: 0 13px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(0, 0, 0, .3); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; backdrop-filter: blur(8px); }
.player__pill:hover { border-color: rgba(56, 189, 248, .7); color: var(--accent); }

.player__center { inset: 0; display: flex; align-items: center; justify-content: center; gap: clamp(18px, 6vw, 74px); pointer-events: none; }
.player__center > * { pointer-events: auto; }

.player__toggle {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  background: rgba(5, 7, 13, .48);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform .16s var(--ease), background .16s ease;
}
.player__toggle:hover { transform: scale(1.05); background: rgba(5, 7, 13, .7); }
.player__toggle svg { width: 34px; height: 34px; }

.player__jump {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .78);
  cursor: pointer;
}
.player__jump svg { width: 34px; height: 34px; }
.player__jump em { position: absolute; font-size: 9px; font-style: normal; font-weight: 800; transform: translateY(1px); }
.player__jump:hover { color: #fff; }

.player__bottom {
  inset: auto 0 0;
  padding: 56px clamp(16px, 3vw, 34px) max(18px, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0, 0, 0, .84), transparent);
}

.player__timeline { position: relative; height: 24px; display: flex; align-items: center; cursor: pointer; }
.player__track { position: relative; width: 100%; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.player__buffer { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255, 255, 255, .28); }
.player__played { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--accent), #a5b4fc); }
.player__range { position: absolute; inset: -8px 0; width: 100%; margin: 0; opacity: 0; cursor: pointer; }

.player__controls { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.player__volume { width: 86px; accent-color: var(--accent); }
.player__time { color: rgba(255, 255, 255, .78); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.player__slash { margin: 0 5px; color: rgba(255, 255, 255, .3); }
.player__live { display: inline-flex; align-items: center; gap: 6px; color: #ffb4c0; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; }
.player__live i { width: 7px; height: 7px; border-radius: 50%; background: #fb7185; box-shadow: 0 0 0 0 rgba(251, 113, 133, .5); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(251, 113, 133, 0); } 100% { box-shadow: 0 0 0 0 rgba(251, 113, 133, 0); } }
.player__spacer { flex: 1; }

.player__textbtn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 9px; background: rgba(255, 255, 255, .06); color: #fff; font-size: 12px; font-weight: 650; cursor: pointer; backdrop-filter: blur(8px); }
.player__textbtn:hover { border-color: rgba(56, 189, 248, .6); color: var(--accent); }
.player__textbtn svg { width: 16px; height: 16px; }

.player__menu {
  position: absolute;
  right: clamp(16px, 3vw, 34px);
  bottom: 106px;
  z-index: 8;
  width: min(330px, calc(100vw - 32px));
  max-height: 54vh;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 16px;
  background: rgba(10, 16, 28, .94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.player__menu header { display: flex; align-items: baseline; justify-content: space-between; padding: 9px 11px 12px; }
.player__menu header strong { font-size: 14px; }
.player__menu header span { color: rgba(255, 255, 255, .45); font-size: 11px; }
.player__option { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 44px; padding: 11px; border: 0; border-radius: 9px; background: none; color: rgba(255, 255, 255, .82); text-align: left; font-size: 13px; cursor: pointer; }
.player__option:hover { background: rgba(255, 255, 255, .07); }
.player__option.is-active { background: rgba(56, 189, 248, .12); color: #e2f8ff; }
.player__option em { color: rgba(255, 255, 255, .42); font-size: 11px; font-style: normal; white-space: nowrap; }
.player__option.is-active em { color: var(--accent); }
.player__next-actions { display: flex; gap: 8px; padding: 10px; }

.player__stats {
  position: absolute;
  top: 76px;
  right: clamp(16px, 3vw, 34px);
  z-index: 8;
  width: min(310px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 14px;
  background: rgba(10, 16, 28, .93);
  box-shadow: var(--shadow);
  font-size: 12px;
  backdrop-filter: blur(20px);
}

.player__stats header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.player__stats header .player__icon { width: 30px; height: 30px; }
.player__stats header .player__icon svg { width: 16px; height: 16px; }
.player__stats dl { display: grid; gap: 7px; margin: 0; }
.player__stats dl div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid rgba(148, 163, 184, .1); }
.player__stats dt { color: rgba(255, 255, 255, .48); }
.player__stats dd { margin: 0; color: #dce8f8; font-variant-numeric: tabular-nums; }

.player__error { position: absolute; inset: 0; z-index: 10; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; background: rgba(0, 0, 0, .72); text-align: center; }
.player__error strong { font-size: 22px; }
.player__error p { max-width: 420px; color: rgba(255, 255, 255, .6); font-size: 13.5px; }
.player__error-actions { display: flex; gap: 10px; margin-top: 12px; }

.player.is-fullscreen { background: #000; }

/* Panel lateral de episodios y canales */
.player__panel {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 9;
  width: min(440px, 94vw);
  display: flex;
  flex-direction: column;
  background: rgba(7, 11, 19, .97);
  border-left: 1px solid rgba(148, 163, 184, .2);
  box-shadow: -30px 0 80px rgba(0, 0, 0, .55);
  backdrop-filter: blur(26px) saturate(1.1);
}
.player__panelHead { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 18px 14px; border-bottom: 1px solid var(--line); }
.player__panelHead strong { display: block; font-size: 16px; }
.player__panelHead span { color: var(--muted-2); font-size: 11px; }
.player__panelTools { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.player__panelTools select { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: 13px; outline: none; }
.player__panelBody { display: grid; align-content: start; gap: 8px; overflow-y: auto; padding: 12px; scrollbar-width: thin; }

.ep-card { display: grid; grid-template-columns: 128px 1fr; gap: 12px; width: 100%; padding: 8px; border: 1px solid transparent; border-radius: 12px; background: rgba(255, 255, 255, .025); text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.ep-card:hover { border-color: rgba(148, 163, 184, .3); background: rgba(255, 255, 255, .055); }
.ep-card.is-active { border-color: rgba(56, 189, 248, .7); background: rgba(56, 189, 248, .1); box-shadow: 0 0 0 1px rgba(56, 189, 248, .2); }
.ep-card__thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface); color: rgba(255, 255, 255, .4); font-weight: 800; }
.ep-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-card__body { display: grid; align-content: center; gap: 4px; min-width: 0; }
.ep-card__label { color: var(--accent); font-size: 9.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.ep-card__body strong { font-size: 13px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-card__body small { color: var(--muted-2); font-size: 10.5px; }
.ep-card.is-active .ep-card__label { color: #bfefff; }

.ch-card { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px; border: 1px solid transparent; border-radius: 11px; background: rgba(255, 255, 255, .025); color: var(--text); text-align: left; cursor: pointer; }
.ch-card:hover { border-color: rgba(148, 163, 184, .3); background: rgba(255, 255, 255, .055); }
.ch-card.is-active { border-color: rgba(56, 189, 248, .65); background: rgba(56, 189, 248, .1); }
.ch-card__logo { display: grid; place-items: center; width: 54px; height: 34px; flex: none; border-radius: 6px; overflow: hidden; background: #fff; color: #0b1220; font-size: 14px; font-weight: 800; }
.ch-card__logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.ch-card__body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ch-card__body strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-card__body small { color: var(--muted-2); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-card__progress { display: block; height: 2px; margin-top: 3px; border-radius: 99px; overflow: hidden; background: rgba(148, 163, 184, .18); }
.ch-card__progress i { display: block; height: 100%; background: var(--accent); }
.ch-card__play { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); }
.ch-card__play svg { width: 12px; height: 12px; }
.ch-card.is-active .ch-card__play { border-color: var(--accent); color: var(--accent); }

@media (max-width: 620px) {
  .player__panel { width: 100%; }
  .ep-card { grid-template-columns: 104px 1fr; }
}

/* ------------------------------------------------------------------------- */
/* Sincronización y ajustes                                                  */
/* ------------------------------------------------------------------------- */
.sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color .16s ease, color .16s ease;
}
.sync-chip:hover { border-color: var(--line-strong); color: var(--text); }
.sync-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.sync-chip[data-state="synchronized"] i { background: var(--ok); }
.sync-chip[data-state="error"] i { background: var(--danger); }
.sync-chip[data-state="pending"] i,
.sync-chip[data-state="syncing"] i { background: #fbbf24; }
.sync-chip__count { display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: rgba(56, 189, 248, .18); color: #bfefff; font-size: 9px; }

.update-banner {
  position: sticky;
  top: var(--topbar-h);
  z-index: 48;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(56, 189, 248, .28);
  background: rgba(9, 22, 40, .96);
  color: #dff4ff;
  font-size: 13px;
  backdrop-filter: blur(18px);
}
.update-banner .iconbtn { width: 30px; height: 30px; color: var(--muted); }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-card { display: grid; align-content: start; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(150deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)); }
.settings-card--wide { grid-column: 1 / -1; }
.settings-card__head { display: flex; align-items: center; gap: 12px; }
.settings-card__head h2 { font-size: 17px; }
.settings-card__head p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.settings-card__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 11px; border: 1px solid rgba(56, 189, 248, .2); background: rgba(56, 189, 248, .08); color: var(--accent); }
.settings-card__icon svg { width: 20px; height: 20px; }

.kv { display: grid; gap: 8px; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 7px; border-bottom: 1px solid rgba(148, 163, 184, .1); }
.kv dt { color: var(--muted-2); font-size: 12px; }
.kv dd { margin: 0; font-size: 12.5px; text-align: right; overflow: hidden; text-overflow: ellipsis; }

.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.settings-note { color: var(--muted-2); font-size: 11.5px; line-height: 1.5; }
.settings-note--error { color: #ffc2cc; }
.settings-note--warn { color: #fde68a; }

.profile-list { display: grid; gap: 8px; }
.profile-row { display: flex; align-items: center; gap: 11px; padding: 9px; border: 1px solid transparent; border-radius: 12px; }
.profile-row.is-active { border-color: rgba(56, 189, 248, .22); background: rgba(56, 189, 248, .05); }
.profile-row .avatar { width: 36px; height: 36px; }
.profile-row__body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.profile-row__body strong { font-size: 13px; }
.profile-row__body small { color: var(--muted-2); font-size: 11px; }
.profile-row__actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.profile-row__actions .iconbtn { width: 32px; height: 32px; }
.profile-row__actions .iconbtn svg { width: 16px; height: 16px; }

.inline-form { display: flex; gap: 8px; }
.inline-form input { min-width: 0; flex: 1; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .035); color: var(--text); font: inherit; font-size: 13px; outline: none; }
.inline-form input:focus { border-color: rgba(56, 189, 248, .55); }

.pref-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(148, 163, 184, .1); }
.switch-row span { display: grid; gap: 2px; }
.switch-row strong { font-size: 13px; font-weight: 600; }
.switch-row small { color: var(--muted-2); font-size: 11px; }
.switch-row input { width: 38px; height: 22px; accent-color: var(--accent); cursor: pointer; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(148, 163, 184, .1); color: var(--muted); font-size: 12.5px; }
.field-row select,
.field-row input { width: 130px; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; font-size: 12.5px; outline: none; }
.field-row select:focus,
.field-row input:focus { border-color: rgba(56, 189, 248, .55); }

.shortcut-list { display: grid; gap: 2px; }
.shortcut-list a { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 9px; color: var(--muted); font-size: 13px; }
.shortcut-list a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.shortcut-list svg { width: 18px; height: 18px; color: var(--accent); }
.badge { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 99px; background: rgba(148, 163, 184, .12); color: var(--muted); font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.badge--ok { background: rgba(52, 211, 153, .12); color: var(--ok); }
.badge--warn { background: rgba(251, 191, 36, .12); color: #fbbf24; }

.sync-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .03); font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; }
.status-dot.is-ok { background: var(--ok); }
.status-dot.is-error { background: var(--danger); }
.sync-summary__detail { color: var(--muted-2); font-size: 11.5px; }

.pending-list { display: grid; gap: 6px; }
.pending-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.pending-row__op { min-width: 58px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.pending-row__body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.pending-row__body strong { font-size: 12px; }
.pending-row__body small { color: var(--muted-2); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; }
.pending-row__attempts { color: var(--muted-2); font-size: 10px; }

.device-list { display: grid; gap: 8px; }
.device-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .02); }
.device-row.is-current { border-color: rgba(52, 211, 153, .25); background: rgba(52, 211, 153, .04); }
.device-row__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: rgba(56, 189, 248, .08); color: var(--accent); }
.device-row__icon svg { width: 20px; height: 20px; }
.device-row__body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.device-row__body strong { font-size: 13px; }
.device-row__body small { color: var(--muted-2); font-size: 11px; }

/* Actividad y recordatorios */
.activity-actions { display: flex; align-items: center; gap: 12px; }
.activity-actions .btn { margin-left: auto; }
.activity-list { display: grid; gap: 8px; }
.activity-row { display: flex; align-items: center; gap: 8px; }
.activity-row__main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .022); text-align: left; cursor: pointer; }
.activity-row__main:hover { border-color: rgba(56, 189, 248, .3); background: rgba(56, 189, 248, .04); }
.activity-row__poster { display: block; width: 44px; aspect-ratio: 2 / 3; flex: none; border-radius: 7px; overflow: hidden; background: var(--surface); }
.activity-row__poster img { width: 100%; height: 100%; object-fit: cover; }
.activity-row__body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.activity-row__body strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-row__body small { color: var(--muted-2); font-size: 10.5px; }
.activity-row__bar { display: block; height: 2px; margin-top: 4px; border-radius: 99px; background: rgba(148, 163, 184, .16); overflow: hidden; }
.activity-row__bar i { display: block; height: 100%; background: var(--accent); }
.activity-row__resume { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); }
.activity-row__resume svg { width: 14px; height: 14px; }
.activity-row > .iconbtn { width: 36px; height: 36px; }
.activity-row > .iconbtn svg { width: 16px; height: 16px; }

.reminder-list { display: grid; gap: 8px; }
.reminder-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .022); }
.reminder-row__icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 10px; background: rgba(56, 189, 248, .08); color: var(--accent); }
.reminder-row__icon svg { width: 19px; height: 19px; }
.reminder-row__body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.reminder-row__body strong { font-size: 13px; }
.reminder-row__body small { color: var(--muted-2); font-size: 11px; }

/* Filtros de búsqueda */
.search-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.search-filters .chips { flex: 1; }
.filter-field { display: flex; align-items: center; gap: 7px; color: var(--muted-2); font-size: 11.5px; white-space: nowrap; }
.filter-field input,
.filter-field select { height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; font-size: 12.5px; outline: none; }
.filter-field input { width: 84px; }
.filter-field input:focus,
.filter-field select:focus { border-color: rgba(56, 189, 248, .55); }

/* Actualizaciones */
.update-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.update-card { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(130deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)); }
.update-card__icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 14px; border: 1px solid rgba(56, 189, 248, .2); background: rgba(56, 189, 248, .08); color: var(--accent); }
.update-card__icon svg { width: 25px; height: 25px; }
.update-card__body { display: grid; gap: 3px; flex: 1; min-width: 0; }
.update-card__body h2 { font-size: 17px; }
.update-card__body p { color: var(--muted); font-size: 12.5px; }
.update-card__body small { color: var(--muted-2); font-size: 11px; }
.section-title { font-size: 17px; margin-top: 6px; }

/* Canal + campana de recordatorio */
.channel-wrap { position: relative; }
.channel__bell { position: absolute; top: 10px; right: 62px; z-index: 2; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; background: rgba(5, 7, 13, .62); color: var(--muted); cursor: pointer; backdrop-filter: blur(8px); }
.channel__bell:hover { border-color: rgba(56, 189, 248, .5); color: var(--accent); }
.channel__bell.is-active { border-color: rgba(56, 189, 248, .6); background: rgba(56, 189, 248, .16); color: var(--accent); }
.channel__bell svg { width: 15px; height: 15px; }

/* Tráiler */
body.trailer-open { overflow: hidden; }
.trailer { position: fixed; inset: 0; z-index: 350; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .82); backdrop-filter: blur(12px); }
.trailer__frame { position: relative; width: min(1100px, 94vw); aspect-ratio: 16 / 9; max-height: 84vh; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 30px 100px rgba(0, 0, 0, .7); }
.trailer__frame iframe,
.trailer__frame video { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; background: #000; }
.trailer__close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; }
.trailer__close svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------------- */
/* Responsive                                                                */
/* ------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  :root { --rail-w: 84px; }
  .rail { padding: 24px 12px 18px; align-items: center; }
  .brand { font-size: 0; padding: 0; }
  .brand::before { content: 'J'; font-size: 26px; background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .brand small { display: none; }
  .rail__nav { width: 100%; }
  .navlink { justify-content: center; padding: 0; }
  .navlink span { display: none; }
  .navlink.is-active::before { left: -12px; }
  .rail__userbody { display: none; }
  .rail__foot { flex-direction: column; }
  .rail__user { flex: none; }
}

@media (max-width: 900px) {
  :root { --topbar-h: 60px; }
  .rail { display: none; }
  .main { margin-left: 0; }
  .tabbar { display: grid; }
  .topbar__brand { display: inline-flex; }
  .topbar__user { display: none; }
  .view { padding: 16px 16px calc(112px + env(safe-area-inset-bottom)); }
  .hero { margin: -16px -16px 24px; min-height: min(66vh, 560px); }
  .hero__content { padding: 0 20px 36px; }
  .hero__desc { font-size: 13.5px; -webkit-line-clamp: 2; }
  .hero--poster { min-height: 520px; }
  .hero--event { min-height: min(68vh, 580px); }
  .hero--event .hero__inner { align-items: flex-end; padding-top: 24px; padding-bottom: 34px; }
  .hero--poster .hero__inner { padding: 0 20px 36px; align-items: flex-end; gap: 16px; }
  .hero--poster .hero__content { padding: 0; }
  .hero__poster { width: 32vw; max-width: 158px; }
  .hero--poster .hero__content h1 { font-size: clamp(28px, 7vw, 42px); }
  .hero__actions .btn { min-height: 42px; padding: 0 16px; }
  .detail { margin-top: -16px; }
  .detail__hero { grid-template-columns: 128px minmax(0, 1fr); gap: 18px; align-items: start; }
  .detail__poster { margin-top: 8px; }
  .detail__info h1 { font-size: clamp(28px, 7vw, 42px); }
  .detail__desc { font-size: 13.5px; }
  .detail__backdrop, .detail__shade { height: 60vh; }
  .detail__bar { padding-bottom: 14px; }
  .channel { grid-template-columns: 92px 1fr 38px; gap: 12px; }
  .channel__logo { width: 92px; height: 56px; }
  .channel__play { width: 36px; height: 36px; }
  .player__top { padding-bottom: 34px; }
  .player__heading strong { font-size: 14px; }
  .player__heading span { display: none; }
  .player__jump { display: none; }
  .player__toggle { width: 68px; height: 68px; }
  .player__volume { display: none; }
  .player__tools .player__icon[data-p="audio"],
  .player__tools .player__icon[data-p="subtitles"] { display: none; }
  .player__bottom { padding-top: 40px; }
  .player__textbtn { padding: 0 10px; height: 32px; font-size: 11px; }
  .auth { grid-template-columns: 1fr; }
  .auth__art { display: none; }
  .auth__panel { min-height: 100vh; border-left: 0; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-card--wide { grid-column: auto; }
  .pref-grid { grid-template-columns: 1fr; }
  .update-grid { grid-template-columns: 1fr; }
  .topbar__right > .iconbtn[href="#/activity"] { display: none; }
  .sync-chip { padding: 0 8px; }
  .row__nav { display: none; }
}

@media (max-width: 620px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .topbar__brand { display: none; }
  .topbar__search { width: auto; flex: 1 1 auto; min-width: 0; }
  .topbar__right { gap: 4px; }
  .topbar__right > [data-action="switch-profile"],
  .topbar__right > [data-action="logout"] { display: none; }
  .topbar__right > a.iconbtn[href="#/activity"] { display: inline-flex; }
  .sync-chip__label { display: none; }
  .topbar__search kbd { display: none; }
  .hero__content h1 { font-size: clamp(32px, 9vw, 44px); }
  .hero--poster .hero__content h1 { font-size: clamp(26px, 7.2vw, 38px); }
  .hero__poster { width: 27vw; max-width: 118px; }
  .hero__actions .iconbtn { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 12px; }
  .row__scroller { grid-auto-columns: 124px; gap: 12px; }
  .pagehead h1 { font-size: 27px; }
  .detail__hero { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
  .detail__genres { font-size: 11.5px; }
  .episode { grid-template-columns: 96px 1fr 32px; gap: 10px; padding: 9px; }
  .player__center { gap: 18px; }
  .player__toggle { width: 60px; height: 60px; }
  .player__toggle svg { width: 26px; height: 26px; }
  .player__tools .player__pill { display: none; }
  .player__time { font-size: 11px; }
  .player__menu { bottom: 96px; right: 12px; left: 12px; width: auto; }
  .sync-chip__label { display: none; }
  .sync-chip { gap: 4px; padding: 0 7px; }
  .settings-card { padding: 16px; }
  .update-banner { flex-wrap: wrap; text-align: center; }
  .update-card { flex-wrap: wrap; }
  .update-card .btn { width: 100%; }
  .channel__bell { top: 8px; right: 50px; width: 30px; height: 30px; }
  .search-filters { align-items: flex-start; }
  .filter-field input { width: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Selector de perfil y PIN */
body.profile-gate-open { overflow: hidden; }

.profile-gate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: auto;
  background:
    radial-gradient(900px 600px at 15% 0%, rgba(56, 189, 248, .16), transparent 60%),
    radial-gradient(800px 600px at 85% 100%, rgba(108, 99, 255, .2), transparent 60%),
    #05070d;
}

.profile-gate__glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(90px);
  background: rgba(108, 99, 255, .18);
  pointer-events: none;
}

.profile-gate__panel {
  position: relative;
  width: min(980px, 100%);
  padding: 42px clamp(20px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(13, 21, 36, .96), rgba(6, 11, 21, .98));
  box-shadow: var(--shadow);
}

.profile-gate__head { text-align: center; margin-bottom: 28px; }
.profile-gate__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--text);
}
.profile-gate__brand span { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.profile-gate__head h1 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.04em; }
.profile-gate__head p { margin: 0 auto; max-width: 560px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.profile-gate__head small { display: block; margin-top: 10px; color: var(--muted-2); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

.profile-gate__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.profile-gate__card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .025);
  color: var(--text);
  cursor: pointer;
  transition: transform .18s var(--ease), border-color .18s, background .18s;
}
.profile-gate__card:hover,
.profile-gate__card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, .5);
  background: rgba(56, 189, 248, .06);
  outline: none;
}
.profile-gate__card.is-active { border-color: rgba(108, 99, 255, .55); background: rgba(108, 99, 255, .08); }
.profile-gate__card.is-in-use {
  border-style: dashed;
  border-color: rgba(251, 191, 36, .45);
  background: rgba(251, 191, 36, .06);
}
.profile-gate__card.is-in-use small { color: var(--warn); }
.profile-gate__avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--profile-accent, #6c63ff), rgba(15, 23, 42, .9));
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
}
.profile-gate__card strong { font-size: 14px; text-align: center; }
.profile-gate__card small { color: var(--muted-2); font-size: 10.5px; }
.profile-gate__card.is-busy { opacity: .6; pointer-events: none; }
.profile-gate__card.is-busy .profile-gate__avatar { animation: profile-wait 1s ease-in-out infinite alternate; }
@keyframes profile-wait { from { transform: scale(.96); } to { transform: scale(1.03); } }
.profile-gate__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 18px auto 0;
  max-width: 660px;
  padding: 12px 15px;
  border: 1px solid rgba(251, 113, 133, .45);
  border-radius: 13px;
  background: rgba(251, 113, 133, .09);
  color: #fecdd3;
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.55;
  text-align: center;
}
.profile-gate__error[hidden] { display: none; }
.profile-gate__error .btn { min-height: 38px; }
.profile-gate__lock {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: rgba(5, 7, 13, .75);
  color: var(--accent);
}
.profile-gate__lock svg { width: 14px; height: 14px; }
.profile-gate__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 22px auto 0;
  max-width: 660px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.55;
  text-align: center;
}
.profile-gate__note svg { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 2px; color: var(--accent); }
.profile-gate__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.pin-dialog {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 18, .74);
  backdrop-filter: blur(10px);
}
.pin-dialog__card {
  width: min(420px, 100%);
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: linear-gradient(160deg, var(--surface), #070c15);
  box-shadow: var(--shadow);
}
.pin-dialog__card h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.03em; }
.pin-dialog__card > p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.pin-dialog__fields { display: grid; gap: 12px; margin-top: 18px; }
.pin-dialog__field { display: grid; gap: 6px; }
.pin-dialog__field span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.pin-dialog__field input {
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .2em;
  outline: none;
}
.pin-dialog__field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, .14); }
.pin-dialog__error { margin: 12px 0 0; color: #fecdd3; font-size: 12px; }
.pin-dialog__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.pin-dialog__danger { margin-right: auto; color: #fca5a5; }

@media (max-width: 640px) {
  .profile-gate { padding: 14px; }
  .profile-gate__panel {
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px 18px;
    border-radius: 22px;
  }
  .profile-gate__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .profile-gate__card { padding: 18px 10px 14px; border-radius: 16px; }
  .profile-gate__avatar { width: 60px; height: 60px; border-radius: 19px; font-size: 24px; }
  .pin-dialog__actions .btn { flex: 1 1 auto; }
  .pin-dialog__danger { flex-basis: 100%; margin-right: 0; }
}

/* ------------------------------------------------------------------------- */
/* Ajustes táctiles y móviles                                                */
/* ------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .main,
  .auth { min-height: 100dvh; }

  /* Los controles del sistema (iOS) no deben ampliar la página al enfocar. */
  input,
  select,
  textarea,
  .topbar__search input,
  .field input,
  .field select,
  .inline-form input,
  .field-row input,
  .player__panelTools select { font-size: 16px; }

  .topbar__search { height: 44px; }
  .topbar__right { gap: 6px; }
  .topbar__right > [data-action="logout"] { display: none; }

  /* Continuar viendo también en la barra inferior del móvil. */
  .tabbar { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tabbar .navlink { gap: 3px; font-size: 9px; }
  .tabbar .navlink svg { width: 20px; height: 20px; }
  /* La etiqueta no debe desaparecer en móvil: es la única pista textual. */
  .tabbar .navlink span { display: block; }

  /* El toast debe quedar por encima de la barra de pestañas. */
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.is-playing .toast { bottom: calc(98px + env(safe-area-inset-bottom)); }

  .row__tools { gap: 10px; }

  /* El botón de opciones reúne lo que antes se ocultaba en el móvil. */
  .player__tools .player__more { display: grid; }
  .player__tools .player__icon[data-p="stats"],
  .player__tools .player__icon[data-p="share"],
  .player__tools .player__icon[data-p="pip"] { display: none; }
  .player__top { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .player__icon { width: 44px; height: 44px; }
  .player__jump { display: grid; width: 46px; height: 46px; }
  .player__jump svg { width: 28px; height: 28px; }
  .player__jump em { font-size: 8px; }
  .player__center { gap: 10px; }
}

@media (max-width: 620px) {
  .hero { min-height: min(58vh, 440px); }
  .hero--poster { min-height: 440px; }
  .hero--event { min-height: min(70vh, 560px); }
  .hero--event .hero__arrow { display: none; }
  .hero--event .hero__content { padding-bottom: 34px; }
  .hero__scoreboard { gap: 10px; }
  .hero__team { font-size: clamp(18px, 6vw, 26px); }
  .hero__score { font-size: clamp(34px, 12vw, 54px); }
  .hero__actions { gap: 8px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
  .row__scroller { grid-auto-columns: min(38vw, 124px); gap: 10px; }
  .row__head { gap: 8px; }
  .row__tools { gap: 8px; }

  .pagehead { flex-wrap: wrap; align-items: flex-start; }
  .pagehead__actions { width: 100%; margin-left: 0; }
  .pagehead__actions .btn { flex: 1 1 auto; }

  .detail__actions .btn { flex: 1 1 auto; }
  .detail__actions .iconbtn { flex: 0 0 auto; }

  .player__center { gap: 8px; }
  .player__jump { width: 42px; height: 42px; }
  .player__jump svg { width: 25px; height: 25px; }
  .player__toggle { width: 62px; height: 62px; }
  .player__toggle svg { width: 27px; height: 27px; }
  .player__controls { gap: 6px; }
  .player__menu {
    bottom: calc(92px + env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 60vh;
  }
  .player__bottom { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}

@media (max-width: 520px) {
  /* En pantallas estrechas la ficha manda: el póster se omite para que el
     título, la sinopsis y los botones respiren. */
  .hero__poster { display: none; }
  .hero--poster { min-height: 420px; }
  /* El hero deportivo se mantiene grande también en pantallas estrechas. */
  .hero--event { min-height: min(64vh, 500px); }
  .hero--poster .hero__inner { padding-bottom: 28px; }
  .hero--poster .hero__content h1 { font-size: clamp(28px, 9vw, 38px); }
  .hero__dots { margin-top: 22px; }
}

/* Barra de búsqueda y filtros del VOD: un solo bloque con el tema oscuro. */
.vod-toolbar {
  display: grid;
  gap: 14px;
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(13, 21, 36, .94), rgba(8, 13, 23, .88));
}

.vod-toolbar .vod-filters { margin: 0; }

.jellyfin-search {
  display: flex;
  align-items: center;
  width: min(100%, 620px);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.jellyfin-search:focus-within {
  border-color: rgba(56, 189, 248, .55);
  background: rgba(56, 189, 248, .05);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .1);
}

.jellyfin-search input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 15px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.jellyfin-search input::placeholder { color: var(--muted-2); }

.jellyfin-search .btn {
  flex: none;
  height: 46px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: #081020;
}

.jellyfin-search .btn:hover { background: #7dd3fc; }

/* ---------------------------------------------------------------------------
   VOD (Jellyfin)
   --------------------------------------------------------------------------- */
.vod {
  margin: 10px 0 28px;
  min-width: 0;
}

.vod__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.vod__title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.vod__title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -.02em;
}

.vod__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
}

.vod__nav {
  display: flex;
  gap: 6px;
}

.vod__navNext svg {
  transform: rotate(180deg);
}

.vod__chips {
  padding-bottom: 14px;
  margin-bottom: 4px;
}

.vod__chips--page {
  margin: 14px 0 16px;
}

.vod-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin: 0 0 18px;
}

.vod-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.vod-filter select {
  height: 44px;
  min-width: 150px;
  padding: 0 38px 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, .045);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393a4bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 16px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.vod-filter select:focus {
  border-color: rgba(56, 189, 248, .55);
  background-color: rgba(56, 189, 248, .05);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .1);
}

.vod-filter select option { background: var(--surface); color: var(--text); }

@media (max-width: 720px) {
  .vod-toolbar { padding: 12px; border-radius: 16px; }
  .vod-filter { flex: 1 1 calc(50% - 5px); }
  .vod-filter select { width: 100%; min-width: 0; }
  .vod-filters .btn { flex: 1 1 auto; }
  .jellyfin-search { width: 100%; }
}

.vod-filter--check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, .06);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.vod-filter--check input {
  accent-color: var(--accent);
}

.vod-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.vod-chip__logo {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: contain;
  background: #fff;
  padding: 1px;
}

.platform-tiles {
  display: flex;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scrollbar-width: none;
}

.platform-tiles::-webkit-scrollbar {
  display: none;
}

.platform-tiles--page {
  margin: 0 0 16px;
}

.platform-tile {
  position: relative;
  flex: 0 0 176px;
  height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(13, 21, 36, .98), rgba(13, 21, 36, .72));
  color: var(--text);
  text-align: left;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.platform-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tile-color) 55%, transparent);
}

.platform-tile.is-active {
  border-color: var(--tile-color);
  box-shadow: 0 0 0 1px var(--tile-color), 0 18px 40px -20px var(--tile-color);
  background: linear-gradient(
    140deg,
    color-mix(in srgb, var(--tile-color) 22%, #0d1524),
    rgba(13, 21, 36, .92));
}

.platform-tile__glow {
  position: absolute;
  z-index: -1;
  top: -55px;
  right: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--tile-color) 0%, transparent 68%);
  opacity: .4;
}

.platform-tile.is-active .platform-tile__glow {
  opacity: .68;
}

.platform-tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.platform-tile__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 34px;
  padding: 5px 6px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .7);
  overflow: hidden;
}

.platform-tile__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.platform-tile__logo--all {
  background: color-mix(in srgb, var(--tile-color) 18%, #0d1524);
  color: var(--accent);
}

.platform-tile__logo--all svg {
  width: 22px;
  height: 22px;
}

.platform-tile__initial {
  color: #0b1220;
  font-size: 15px;
  font-weight: 800;
}

.platform-tile__check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tile-color);
  color: #fff;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}

.platform-tile__check svg {
  width: 12px;
  height: 12px;
}

.platform-tile.is-active .platform-tile__check {
  opacity: 1;
  transform: scale(1);
}

.platform-tile__name {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-tile__count {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.vod__banners {
  display: flex;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 2px 2px 14px;
}

.vod__banners::-webkit-scrollbar {
  display: none;
}

.vod-banner {
  position: relative;
  flex: 0 0 min(82vw, 580px);
  aspect-ratio: 16 / 7;
  min-height: 230px;
  border-radius: var(--radius);
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.vod-banner__media,
.vod-banner__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vod-banner__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 7, 13, .96) 0%, rgba(5, 7, 13, .72) 52%, rgba(5, 7, 13, .12) 100%);
}

.vod-banner__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  max-width: 72%;
  padding: 24px;
}

.vod-banner__body h3 {
  margin: 6px 0 4px;
  font-size: clamp(20px, 2.5vw, 30px);
  line-height: 1.12;
}

.vod-banner__meta {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.vod-banner__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .vod__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .vod__tools {
    width: 100%;
    justify-content: flex-start;
  }

  .vod-banner {
    flex-basis: 88vw;
    min-height: 210px;
  }

  .platform-tile {
    flex-basis: 154px;
    height: 100px;
  }

  .vod-banner__body {
    max-width: 100%;
    padding: 18px;
    background: linear-gradient(0deg, rgba(5, 7, 13, .92), rgba(5, 7, 13, .15));
  }
}

@media (pointer: coarse) {
  .btn,
  .iconbtn,
  .navlink,
  .chip,
  .card,
  .row__more,
  .player__option { touch-action: manipulation; }
  .row__arrow,
  .iconbtn { min-width: 42px; min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------------- */
/* PWA: instalación, sin conexión y ajustes finos para móvil                 */
/* ------------------------------------------------------------------------- */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  scroll-padding-top: calc(var(--topbar-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-x: clip;
}

img { -webkit-user-drag: none; }
input, select, textarea { -webkit-user-select: text; user-select: text; }

a, button, .card, .chip, .navlink, .row__arrow {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 900px) {
  :root { --topbar-h: calc(60px + var(--safe-top)); }

  /* La barra superior respeta el notch y la Dynamic Island. */
  .topbar { padding-top: var(--safe-top); }

  .view { padding-bottom: calc(104px + var(--safe-bottom)); }

  .auth,
  .auth__panel { min-height: 100dvh; }

  .auth__panel {
    padding-top: max(clamp(22px, 4vw, 56px), var(--safe-top));
    padding-bottom: max(clamp(22px, 4vw, 56px), var(--safe-bottom));
  }

  .profile-gate { padding-top: max(32px, var(--safe-top)); padding-bottom: max(32px, var(--safe-bottom)); }
  .pin-dialog { padding-top: max(20px, var(--safe-top)); padding-bottom: max(20px, var(--safe-bottom)); }

  .row__scroller,
  .chips { -webkit-overflow-scrolling: touch; }

  /* El desenfoque es caro en móviles modestos: se reduce sin perder el efecto. */
  .topbar,
  .tabbar { backdrop-filter: blur(14px); }

  .btn,
  .iconbtn,
  .navlink,
  .chip,
  .card,
  .row__arrow { touch-action: manipulation; }
}

@media (display-mode: standalone) {
  body { overscroll-behavior-y: none; }
  .pwa-install { display: none !important; }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {
  :root { --topbar-h: calc(54px + var(--safe-top)); }
  .tabbar { padding-top: 4px; }
  .tabbar .navlink { height: 44px; }
  .pwa-ui { bottom: calc(68px + var(--safe-bottom)); }
}

/* Aviso de instalación y de falta de conexión */
.pwa-ui {
  position: fixed;
  left: 50%;
  bottom: calc(76px + var(--safe-bottom));
  z-index: 80;
  width: min(430px, calc(100vw - 24px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

@media (min-width: 901px) {
  .pwa-ui { bottom: calc(20px + var(--safe-bottom)); }
}

.pwa-ui > * { pointer-events: auto; }
body.is-playing .pwa-ui,
body.profile-gate-open .pwa-ui,
body.pwa-sheet-open .pwa-ui { display: none; }

.pwa-offline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(251, 113, 133, .35);
  border-radius: 12px;
  background: rgba(251, 113, 133, .12);
  color: #ffd7de;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  backdrop-filter: blur(14px);
}

.pwa-offline::before {
  content: '';
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--danger);
}

.pwa-install {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(13, 21, 36, .96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.pwa-install__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.pwa-install__text strong { font-size: 13px; }
.pwa-install__text small { color: var(--muted-2); font-size: 11px; line-height: 1.35; }
.pwa-install .btn { flex: none; }

.pwa-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pwa-close:hover { background: rgba(255, 255, 255, .1); color: var(--text); }

/* Hoja de instrucciones de iOS */
body.pwa-sheet-open { overflow: hidden; }

.pwa-sheet {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: end center;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(8px);
}

.pwa-sheet__card {
  width: min(440px, 100%);
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: linear-gradient(160deg, var(--surface), #070c15);
  box-shadow: var(--shadow);
  animation: pwa-up .22s var(--ease);
}

.pwa-sheet__head { display: flex; align-items: center; gap: 10px; }

.pwa-sheet__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: rgba(56, 189, 248, .12);
  color: var(--accent);
}

.pwa-sheet__icon svg { width: 20px; height: 20px; }
.pwa-sheet__head strong { font-size: 16px; letter-spacing: -.02em; }
.pwa-sheet__card > p { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.pwa-sheet__card ol {
  margin: 14px 0 18px;
  padding-left: 20px;
  color: #c7d3e4;
  font-size: 13px;
  line-height: 1.75;
}

.pwa-sheet__ok { width: 100%; }

@keyframes pwa-up {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ------------------------------------------------------------------------- */
/* VOD: pestañas de tipo (Películas / Series)                                */
/* ------------------------------------------------------------------------- */
.vod-kind {
  display: inline-flex;
  gap: 4px;
  margin: 4px 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(13, 21, 36, .98), rgba(9, 14, 24, .88));
}

.vod-kind__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 190px;
  min-height: 46px;
  padding: 8px 22px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .9rem;
  font-weight: 750;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.vod-kind__tab svg { width: 18px; height: 18px; flex: none; }
.vod-kind__tab:hover { background: rgba(255, 255, 255, .06); color: var(--text); transform: translateY(-1px); }
.vod-kind__tab.is-active { background: var(--accent); color: #081020; }

@media (max-width: 560px) {
  .vod-kind { display: flex; }
  .vod-kind__tab { flex: 1; min-width: 0; padding: 8px 12px; }
}

/* ------------------------------------------------------------------------- */
/* Reproductor en móviles estrechos (iPhone 15 = 393 px)                     */
/* ------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .player__top { padding-left: 10px; padding-right: 10px; }
  .player__heading { flex: 1 1 auto; }
  .player__tools { flex: none; }

  /* La fila de controles pasa a dos líneas en vez de desbordar a la derecha. */
  .player__controls { flex-wrap: wrap; row-gap: 6px; }
  .player__bottom { padding-left: 10px; padding-right: 10px; }

  .player__menu { left: 10px; right: 10px; width: auto; }
  .player__stats { top: calc(60px + env(safe-area-inset-top)); right: 10px; width: calc(100vw - 20px); }
  .player__error { padding: 18px; }
  .player__error strong { font-size: 19px; }
  .player__error-actions { flex-wrap: wrap; justify-content: center; }
}

/* Móvil en horizontal (altura muy corta): controles algo más compactos. */
@media (max-height: 520px) and (pointer: coarse) {
  .player__top { padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: 22px; }
  .player__bottom { padding-top: 26px; }
  .player__toggle { width: 54px; height: 54px; }
  .player__toggle svg { width: 22px; height: 22px; }
  .player__jump { width: 40px; height: 40px; }
  .player__jump svg { width: 24px; height: 24px; }
  .player__menu { bottom: 80px; max-height: 66vh; }
}

/* Mini-reproductor persistente: conserva el <video> y sigue sonando mientras
   se navega. Se elimina al expandir, cerrar o abrir otro título. */
.mini-player {
  position: fixed;
  right: clamp(12px, 3vw, 28px);
  bottom: clamp(12px, 3vw, 28px);
  z-index: 280;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(380px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid rgba(56, 189, 248, .3);
  border-radius: 16px;
  background: rgba(8, 13, 23, .94);
  box-shadow: 0 20px 54px rgba(0, 0, 0, .55);
  backdrop-filter: blur(18px);
  animation: mini-in .22s ease both;
}

.mini-player__art {
  width: 128px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  cursor: pointer;
}

.mini-player__video {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-player__body { min-width: 0; cursor: pointer; }
.mini-player__body strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-player__body span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-player__actions { display: flex; align-items: center; gap: 2px; }
.mini-player__btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.mini-player__btn:hover { background: rgba(148, 163, 184, .14); color: var(--text); }
.mini-player__btn svg { width: 17px; height: 17px; }

@keyframes mini-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .mini-player { grid-template-columns: 96px minmax(0, 1fr) auto; }
  .mini-player__art { width: 96px; }
}

/* Selector de ámbito para las funciones experimentales. */
.segmented {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 999px;
  background: rgba(13, 21, 36, .62);
}
.segmented button {
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}
.segmented button.is-active {
  background: var(--accent);
  color: #06101f;
}

/* Accesibilidad: movimiento reducido y foco visible consistente. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Aviso de proveedor degradado. Se muestra cuando SyncApi informa que el
   circuit breaker está abierto y la app está sirviendo caché. */
.provider-banner {
  position: fixed;
  left: clamp(12px, 3vw, 28px);
  bottom: clamp(12px, 3vw, 28px);
  z-index: 270;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(440px, calc(100vw - 24px));
  padding: 10px 14px;
  border: 1px solid rgba(251, 191, 36, .28);
  border-radius: 12px;
  background: rgba(20, 16, 8, .94);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .45);
  color: #fde68a;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  backdrop-filter: blur(14px);
}

.provider-banner__dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, .8);
}

body.has-mini .provider-banner { bottom: 116px; }

/* Chips de equipos favoritos. */
.favorite-teams { margin-bottom: 12px; }
.chip--removable {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.chip--removable span {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(148, 163, 184, .18);
  font-size: 11px;
  line-height: 1;
}

/* ------------------------------------------------------------------------- */
/* Deportes: cabecera con emblema, escudos y marcador sobre la portada       */
/* ------------------------------------------------------------------------- */
.pagehead--sports { align-items: flex-start; }

.sports-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sports-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  border: 1px solid rgba(56, 189, 248, .28);
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(56, 189, 248, .24), transparent 62%),
    linear-gradient(150deg, rgba(18, 29, 49, .94), rgba(5, 7, 13, .94));
  color: #8fe8ff;
  box-shadow: 0 10px 26px rgba(5, 7, 13, .45);
}

.sports-mark svg { width: 30px; height: 30px; }

.sports-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.sports-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 999px;
  background: rgba(13, 21, 36, .7);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

.sports-stat--live { border-color: rgba(52, 211, 153, .3); color: var(--ok); }

.sports-stat--live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(52, 211, 153, .9);
}

.live-tile__art {
  background-image: var(--sports-art, linear-gradient(145deg, #123a8f, #081326));
  background-size: cover;
  background-position: center;
}

.live-tile__crests {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.live-tile__crest {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(5, 7, 13, .68);
  backdrop-filter: blur(6px);
}

.live-tile__crest img {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: contain;
  padding: 0;
}

.live-tile__crest-mono {
  color: #eaf4ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}

.live-tile__score {
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(5, 7, 13, .74);
  color: #f7fbff;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.sports-ticker__crest {
  display: grid;
  place-items: center;
  flex: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #dff4ff;
  font-size: 7.5px;
  font-weight: 800;
  overflow: hidden;
}

.sports-ticker__crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1px;
}

@media (max-width: 640px) {
  .sports-head { gap: 11px; }
  .sports-mark { width: 46px; height: 46px; border-radius: 14px; }
  .sports-mark svg { width: 26px; height: 26px; }
}

/* Filtros por deporte y estados del hub. */
.sport-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }

.sport-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  background: rgba(13, 21, 36, .7);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.sport-chip svg { width: 14px; height: 14px; }
.sport-chip:hover { border-color: rgba(56, 189, 248, .4); color: var(--text); }
.sport-chip.is-active { border-color: rgba(56, 189, 248, .5); background: rgba(56, 189, 248, .14); color: var(--text); }
.sport-chip__count { padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--muted); font-size: 9px; font-weight: 800; }
.sport-chip.is-active .sport-chip__count { color: var(--text); }

.sports-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(56, 189, 248, .05);
}

.sports-hint__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: rgba(56, 189, 248, .12);
  color: var(--accent);
}

.sports-hint__icon svg { width: 20px; height: 20px; }
.sports-hint div { flex: 1; min-width: 180px; }
.sports-hint strong { display: block; font-size: 13px; }
.sports-hint p { color: var(--muted); font-size: 11.5px; }

/* Esqueletos con forma de cartel deportivo 16:9. */
.sports-skeleton { display: grid; gap: 20px; }

.sports-skeleton__head { display: flex; align-items: center; gap: 14px; }
.sports-skeleton__head .sports-mark { border: 0; }
.sports-skeleton__copy { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sports-skeleton__eyebrow { width: 110px; height: 9px; }
.sports-skeleton__title { width: 220px; height: 26px; }
.sports-skeleton__short { width: 170px; height: 11px; }
.sports-skeleton__row { display: grid; gap: 10px; }
.sports-skeleton__heading { width: 180px; height: 14px; }
.sports-skeleton__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.sports-skeleton__tile { aspect-ratio: 16 / 9; border-radius: 12px; }

/* Icono SVG dentro de los estados vacios. */
.empty__icon svg { width: 26px; height: 26px; }

/* Solicitudes de contenido */
.request-search { margin-bottom: 18px; }
.request-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px auto;
  gap: 12px;
  align-items: end;
}
.request-form .field { margin: 0; }
.request-form .btn { min-height: 44px; }
.request-results { margin-top: 18px; }
.request-list { display: grid; gap: 10px; }
.request-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}
.request-card__poster {
  display: grid;
  place-items: center;
  flex: none;
  width: 58px;
  height: 82px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
}
.request-card__poster img { width: 100%; height: 100%; object-fit: cover; }
.request-card__body { display: grid; gap: 3px; flex: 1; min-width: 0; }
.request-card__body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.request-card__body small { color: var(--muted); font-size: 11.5px; }
.request-status {
  flex: none;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .12);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.request-status--approved { background: rgba(56, 189, 248, .12); color: var(--accent); }
.request-status--available,
.request-status--completed { background: rgba(52, 211, 153, .12); color: var(--ok); }
.request-status--rejected { background: rgba(251, 113, 133, .12); color: var(--danger); }
.request-empty { display: grid; justify-items: start; gap: 10px; padding: 4px 0; color: var(--muted); }

@media (max-width: 720px) {
  .request-form { grid-template-columns: 1fr; }
  .request-form .btn { width: 100%; }
  .request-card { align-items: flex-start; }
  .request-status { margin-left: auto; }
}
