/* CineMood · Modo tele (js/modo-tele.js): el aspecto de la app de Android TV en la web.
   Todo va en «em» sobre un tamaño de letra que sale de la pantalla, así se ve igual de proporcionado
   en un móvil en horizontal que en una tele de 55". */
html.mt-on, html.mt-on body{overflow:hidden !important}
.mt{
  --mt-bg:#121413; --mt-sup:#1d201f; --mt-sup2:#2a2e2c; --mt-txt:#f2f0eb; --mt-suave:#a9aca6;
  --mt-rojo:#b8302d; --mt-foco:#ea766c; --mt-verde:#7fcf9a;
  position:fixed; inset:0; z-index:1900; background:var(--mt-bg); color:var(--mt-txt);
  font-family:'Satoshi',-apple-system,BlinkMacSystemFont,sans-serif;
  font-size:clamp(11px, min(1.2vw, 2.3vh), 24px);
  overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; -webkit-overflow-scrolling:touch;
  -webkit-tap-highlight-color:transparent; -webkit-user-select:none; user-select:none;
  padding-left:env(safe-area-inset-left); padding-right:env(safe-area-inset-right);
}
.mt[hidden]{display:none}
.mt button{font:inherit; color:inherit; cursor:pointer}
.mt :focus{outline:none}
.mt img{display:block}

/* Barra de arriba */
.mt-barra{position:sticky; top:0; z-index:20; display:flex; align-items:center; gap:1.6em;
  padding:max(.9em, env(safe-area-inset-top)) 2.6em .9em; background:linear-gradient(var(--mt-bg) 55%, rgba(18,20,19,0))}
.mt-logo{display:flex; align-items:center; gap:.45em; font-family:'Cabinet Grotesk','Satoshi',sans-serif; font-weight:800; font-size:1.45em; letter-spacing:-.02em; white-space:nowrap}
.mt-logo b{color:var(--mt-foco); font-weight:inherit}
.mt-logo-ic{display:grid; place-items:center; width:1.55em; height:1.55em; border-radius:.35em; background:var(--mt-rojo); font-size:.85em}
.mt-nav{flex:1; display:flex; justify-content:center; gap:.3em; min-width:0}
.mt-nav-b{background:none; border:0; border-radius:2em; padding:.45em 1.05em; font-size:1.05em; font-weight:500; color:var(--mt-suave); white-space:nowrap; transition:background .15s, color .15s}
.mt-nav-b.on{background:var(--mt-sup2); color:var(--mt-txt)}
.mt-nav-b:focus-visible{background:var(--mt-txt); color:#111}
.mt-salir{background:var(--mt-sup); border:1px solid #3a3e3c; border-radius:2em; padding:.45em 1em; font-size:.92em; font-weight:600; white-space:nowrap}
.mt-salir:focus-visible{background:var(--mt-txt); color:#111}

.mt-vista{padding:0 2.6em 3em}

/* Botones y chips */
.mt-btn{display:inline-flex; align-items:center; gap:.35em; background:var(--mt-sup2); border:0; border-radius:.45em; padding:.62em 1.2em; font-size:1em; font-weight:600; white-space:nowrap; transition:transform .12s, background .15s, color .15s}
.mt-btn:focus-visible{background:var(--mt-txt); color:#111; transform:scale(1.04)}
.mt-btn:active{transform:scale(.97)}
.mt-btn.on{background:#24493a; color:#bfeccd}
.mt-btn-prim{background:var(--mt-rojo); color:#fff}
.mt-btn-prim:focus-visible{background:var(--mt-foco); color:#fff; box-shadow:0 0 0 .14em #fff}
.mt-btn[disabled]{opacity:.5}
.mt-chips{display:flex; gap:.55em; overflow-x:auto; scrollbar-width:none; padding:.3em .2em .5em; margin:0 -.2em}
.mt-chips::-webkit-scrollbar{display:none}
.mt-chip{flex:none; background:var(--mt-sup2); border:0; border-radius:2em; padding:.55em 1.15em; font-size:1em; font-weight:600; color:var(--mt-txt); white-space:nowrap; transition:background .15s, color .15s, transform .12s}
.mt-chip.on{background:var(--mt-rojo); color:#fff}
.mt-chip-prim{background:#3a1d1b}
.mt-chip:focus-visible{background:var(--mt-txt); color:#111}


/* Portada grande */
.mt-hero-hueco{height:min(56vh, 30em); border-radius:1em; background:var(--mt-sup); margin-top:.2em; animation:mtLatido 1.4s ease-in-out infinite}
.mt-hero{position:relative; height:min(56vh, 30em); border-radius:1em; overflow:hidden; background:#0b0c0c; margin-top:.2em; cursor:pointer; isolation:isolate;
  box-shadow:0 0 0 .14em transparent; transition:box-shadow .2s}
.mt-hero:focus-visible{box-shadow:0 0 0 .18em #fff}
.mt-hero-fondo, .mt-hero-video{position:absolute; inset:0}
.mt-hero-img{width:100%; height:100%; object-fit:cover; object-position:center 25%; opacity:0; transition:opacity .6s}
.mt-hero-img.on{opacity:1}
.mt-hero-video{opacity:0; transition:opacity 1s; pointer-events:none; overflow:hidden}
.mt-hero-video.on{opacity:1}
/* el vídeo se agranda un poco para que no se vean los letreros de YouTube */
.mt-hero-video iframe{position:absolute; top:50%; left:50%; width:100%; height:100%; border:0; transform:translate(-50%,-50%) scale(1.32); aspect-ratio:16/9}
@media (min-aspect-ratio:16/9){ .mt-hero-video iframe{height:auto; width:100%} }
.mt-hero-velo{position:absolute; inset:0; background:linear-gradient(90deg, rgba(10,11,11,.92) 0%, rgba(10,11,11,.55) 38%, rgba(10,11,11,0) 68%), linear-gradient(0deg, rgba(10,11,11,.7), rgba(10,11,11,0) 45%)}
.mt-hero-info{position:absolute; left:2.4em; bottom:2em; width:min(46%, 34em); display:flex; flex-direction:column; align-items:flex-start; gap:.55em; z-index:2}
.mt-hero-titulo{margin:0; font-family:'Cabinet Grotesk','Satoshi',sans-serif; font-weight:800; font-size:2.5em; line-height:1.02; letter-spacing:-.02em; text-shadow:0 2px 14px rgba(0,0,0,.5)}
.mt-logo-img{max-width:min(100%, 15em); max-height:5.2em; object-fit:contain; object-position:left bottom; filter:drop-shadow(0 2px 10px rgba(0,0,0,.55))}
.mt-tag{background:rgba(255,255,255,.14); border-radius:.3em; padding:.22em .6em; font-size:.85em; font-weight:700}
.mt-tag-rojo{background:var(--mt-rojo)}
.mt-meta{font-size:1em; font-weight:700; white-space:pre}
.mt-pct{color:#e8c25a}
.mt-pct.alta{color:var(--mt-verde)}
.mt-hero-resumen{margin:0; color:#d6d4cf; font-size:.95em; line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.mt-hero-acc{display:flex; gap:.6em; margin-top:.3em}
.mt-hero-puntos{position:absolute; right:1.6em; bottom:1.3em; display:flex; gap:.35em; z-index:2}
.mt-punto{width:.45em; height:.45em; border-radius:1em; background:rgba(255,255,255,.4); transition:width .3s, background .3s}
.mt-punto.on{width:1.5em; background:#fff}
.mt-hero-flecha{position:absolute; top:50%; transform:translateY(-50%); z-index:3; width:2.2em; height:2.2em; border-radius:50%; border:0; background:rgba(0,0,0,.45); font-size:1.4em; line-height:1; opacity:0; transition:opacity .2s}
.mt-hero-flecha.izq{left:.6em} .mt-hero-flecha.der{right:.6em}

@media (pointer:coarse){ .mt-hero-flecha{display:none} }

/* Filas */
.mt-fila{margin-top:1.7em}
.mt-fila[hidden]{display:none}
.mt-fila-tit{margin:0 0 .55em; font-family:'Cabinet Grotesk','Satoshi',sans-serif; font-weight:800; font-size:1.4em; letter-spacing:-.01em}
.mt-cab-vista{margin-top:.6em}
.mt-sub{color:var(--mt-suave); margin:.3em 0 0; font-size:.95em}
.mt-scroll-caja{position:relative}
.mt-scroller{display:flex; gap:1em; overflow-x:auto; scroll-snap-type:x proximity; scrollbar-width:none; padding:.5em .4em 1em; margin:-.5em -.4em -.6em; scroll-padding-left:.4em}
.mt-scroller::-webkit-scrollbar{display:none}
.mt-sflecha{position:absolute; top:0; bottom:1em; width:2.6em; border:0; z-index:4; font-size:2em; background:linear-gradient(90deg, rgba(18,20,19,.95), rgba(18,20,19,0)); opacity:0; transition:opacity .2s}
.mt-sflecha.izq{left:-2.6em} .mt-sflecha.der{right:-2.6em; background:linear-gradient(270deg, rgba(18,20,19,.95), rgba(18,20,19,0))}


/* Carteles */
.mt-tarjeta{flex:none; width:9.5em; scroll-snap-align:start; background:none; border:0; padding:0; text-align:left; display:flex; flex-direction:column; gap:.25em; position:relative}
.mt-poster{position:relative; aspect-ratio:2/3; border-radius:.55em; overflow:hidden; background:var(--mt-sup); box-shadow:0 0 0 .14em transparent; transition:transform .18s, box-shadow .18s}
.mt-poster img{width:100%; height:100%; object-fit:cover}
.mt-tarjeta:focus-visible .mt-poster{transform:scale(1.06); box-shadow:0 0 0 .16em #fff, 0 .8em 2em rgba(0,0,0,.5)}
.mt-tarjeta:active .mt-poster{transform:scale(.97)}
.mt-cinta{position:absolute; top:.5em; left:.5em; background:var(--mt-rojo); color:#fff; font-size:.68em; font-weight:800; letter-spacing:.06em; padding:.2em .5em; border-radius:.25em}
.mt-badge{position:absolute; top:.5em; left:.5em; background:rgba(15,16,16,.82); backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px); color:#f2f0eb; font-size:.72em; font-weight:700; padding:.25em .5em; border-radius:.3em}
.mt-cinta + .mt-badge{top:2.2em}
.mt-badge.alta{color:#c9f2d5}
.mt-badge-nota{left:auto; right:.5em; color:#ffd776}
.mt-t-tit{font-weight:700; font-size:.95em; line-height:1.2; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-top:.2em}
.mt-t-sub{color:var(--mt-suave); font-size:.8em}
.mt-esqueleto .mt-poster, .mt-esqueleto .mt-ancha-img{animation:mtLatido 1.4s ease-in-out infinite}
@keyframes mtLatido{50%{opacity:.5}}

/* Top 10: número grande detrás del cartel */
.mt-top .mt-tarjeta{width:auto; flex-direction:row; align-items:flex-end}
.mt-num{flex:none; width:.72em; margin-right:-.16em; font-family:'Cabinet Grotesk','Satoshi',sans-serif; font-weight:800; font-size:5.4em; line-height:.8; color:var(--mt-bg); -webkit-text-stroke:.03em #8c908a; text-align:right; z-index:0; letter-spacing:-.06em}
.mt-top .mt-poster{flex:none; width:9em; z-index:1}

/* Tarjetas anchas (Seguir viendo, capítulos) */
.mt-ancha{flex:none; width:16em; scroll-snap-align:start; background:none; border:0; padding:0; text-align:left; display:flex; flex-direction:column; gap:.25em}
.mt-ancha-img{position:relative; aspect-ratio:16/9; border-radius:.55em; overflow:hidden; background:var(--mt-sup); transition:transform .18s, box-shadow .18s}
.mt-ancha-img img{width:100%; height:100%; object-fit:cover}
.mt-ancha:focus-visible .mt-ancha-img{transform:scale(1.04); box-shadow:0 0 0 .16em #fff}
.mt-ancha.actual .mt-ancha-img{box-shadow:0 0 0 .16em var(--mt-foco)}
.mt-ancha[disabled]{opacity:.5; cursor:default}
.mt-ep-play{position:absolute; inset:0; display:grid; place-items:center; font-size:2em; color:#fff; background:rgba(0,0,0,.25); opacity:0; transition:opacity .2s}
.mt-ancha:focus-visible .mt-ep-play{opacity:1}
.mt-barra-prog{position:absolute; left:0; right:0; bottom:0; height:.28em; background:rgba(255,255,255,.25)}
.mt-barra-prog i{display:block; height:100%; background:var(--mt-rojo)}

/* Rejilla (Mi lista, Buscar) */
.mt-rejilla{display:grid; grid-template-columns:repeat(auto-fill, minmax(8.6em, 1fr)); gap:1.3em 1em; margin-top:1em}
.mt-rejilla .mt-tarjeta{width:auto}
.mt-lista-cab{display:flex; align-items:center; gap:1.2em; flex-wrap:wrap}
.mt-h1{margin:0; font-family:'Cabinet Grotesk','Satoshi',sans-serif; font-weight:800; font-size:2em}
.mt-buscar{display:flex; align-items:center; gap:.6em; background:var(--mt-sup); border-radius:.6em; padding:.2em 1em; max-width:34em; margin-bottom:1em}
.mt-buscar-in{flex:1; min-width:0; background:none; border:0; color:var(--mt-txt); font:inherit; font-size:1.15em; padding:.6em 0; outline:none; -webkit-user-select:text; user-select:text}
.mt-buscar-in::placeholder{color:#7b7f79}

/* Reparto */
.mt-reparto{gap:1.3em}
.mt-persona{flex:none; width:7em; display:flex; flex-direction:column; align-items:center; text-align:center; gap:.15em}
.mt-persona img{width:5.6em; height:5.6em; border-radius:50%; object-fit:cover; background:var(--mt-sup); margin-bottom:.3em}

/* Ficha */
.mt-ficha{position:fixed; inset:0; z-index:30; background:var(--mt-bg); overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch;
  padding-left:env(safe-area-inset-left); padding-right:env(safe-area-inset-right); animation:mtEntra .22s ease}
.mt-ficha[hidden]{display:none}
@keyframes mtEntra{from{opacity:0; transform:scale(1.02)}}
.mt-f-fondo{position:absolute; top:0; right:0; width:72%; height:100vh; height:100dvh}
.mt-f-fondo img{width:100%; height:100%; object-fit:cover; object-position:center 20%}
.mt-f-velo{position:absolute; top:0; left:0; right:0; height:100vh; height:100dvh; background:linear-gradient(90deg, var(--mt-bg) 28%, rgba(18,20,19,.75) 48%, rgba(18,20,19,.1) 75%), linear-gradient(0deg, var(--mt-bg) 0%, rgba(18,20,19,0) 35%)}
.mt-f-cerrar{position:fixed; top:max(.8em, env(safe-area-inset-top)); left:max(.8em, env(safe-area-inset-left)); z-index:5; width:2.3em; height:2.3em; border-radius:50%; border:0; background:rgba(0,0,0,.5); font-size:1.4em; line-height:1}
.mt-f-cerrar:focus-visible{background:var(--mt-txt); color:#111}
.mt-f-cuerpo{position:relative; z-index:2; min-height:100vh; min-height:100dvh; box-sizing:border-box; width:min(58%, 46em); padding:3.2em 2.6em 2em 3.6em; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; gap:.6em}
.mt-f-titulo{margin:0; font-family:'Cabinet Grotesk','Satoshi',sans-serif; font-weight:800; font-size:2.8em; line-height:1; letter-spacing:-.02em}
.mt-f-titulo .mt-logo-img{max-width:min(100%, 19em); max-height:6em}
.mt-f-meta{display:flex; align-items:center; flex-wrap:wrap; gap:.9em; font-size:1.1em; font-weight:500}
.mt-f-estrella{color:#f0c14b; font-weight:700}
.mt-f-edad{border:1.5px solid #cfcdc8; border-radius:.3em; padding:.05em .45em; font-size:.85em; font-weight:700}
.mt-f-estado{background:rgba(255,255,255,.12); border-radius:.3em; padding:.1em .5em; font-size:.8em; font-weight:700; color:#d9d7d2}
.mt-f-generos{color:var(--mt-suave); font-size:1em; white-space:pre}
.mt-f-notas:empty{display:none}
.mt-f-minota, .mt-f-prevista{display:inline-block; border:1.5px solid var(--mt-foco); color:var(--mt-foco); border-radius:.4em; padding:.15em .6em; font-weight:700}
.mt-f-prevista{border-color:#5c9c74; color:#a5e3bb}
.mt-f-frase{margin:.1em 0 0; color:var(--mt-foco); font-weight:600}
.mt-f-resumen{margin:0; color:#dedcd7; line-height:1.5; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden}
.mt-f-botones{display:flex; flex-wrap:wrap; gap:.6em; margin-top:.7em}
.mt-f-prog{display:flex; align-items:center; gap:.9em; color:var(--mt-suave); font-size:.92em; width:100%}
.mt-f-prog[hidden]{display:none}
.mt-f-prog .mt-barra-prog{position:relative; flex:0 0 12em; height:.3em; border-radius:1em; overflow:hidden}
.mt-f-quien{margin:.3em 0 0; color:var(--mt-suave); font-size:.9em}
.mt-f-cargando{padding:1em 0}
.mt-f-mas{position:relative; z-index:2; padding:0 2.6em 3em 3.6em}
.mt-f-mas .mt-fila:first-child{margin-top:0}

/* Buscando fuente */
.mt-cargando{position:fixed; inset:0; z-index:40; display:grid; place-items:center; background:rgba(8,9,9,.78); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px)}
.mt-cargando[hidden]{display:none}
.mt-cargando-caja{display:flex; flex-direction:column; align-items:center; gap:.8em; text-align:center; padding:2em; max-width:30em}
.mt-cargando-tit{font-family:'Cabinet Grotesk','Satoshi',sans-serif; font-weight:800; font-size:1.5em}
.mt-cargando-txt{color:var(--mt-suave)}
.mt-spin{width:2.4em; height:2.4em; border-radius:50%; border:.22em solid rgba(255,255,255,.18); border-top-color:var(--mt-foco); animation:mtGira .8s linear infinite; display:inline-block}
@keyframes mtGira{to{transform:rotate(360deg)}}

/* Gira el móvil */
.mt-girar{display:none; position:fixed; inset:0; z-index:60; background:var(--mt-bg); flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:24px; gap:6px; font-size:16px}
.mt-girar-ic{font-size:54px; animation:mtGirarIc 2.2s ease-in-out infinite}
@keyframes mtGirarIc{0%,30%{transform:rotate(0)} 55%,100%{transform:rotate(-90deg)}}
.mt-girar-t{margin:8px 0 0; font-family:'Cabinet Grotesk','Satoshi',sans-serif; font-weight:800; font-size:24px}
.mt-girar-s{margin:0 0 14px; color:var(--mt-suave); max-width:300px; line-height:1.4}
.mt-girar-acc{display:flex; flex-direction:column; gap:10px; width:min(280px, 100%)}
.mt-girar-acc .mt-btn{justify-content:center; font-size:15px}
@media (orientation:portrait) and (max-width:820px){
  html.mt-on:not(.mt-vertical) .mt-girar{display:flex}
  /* si decides seguir en vertical, se apaña: letra según el ancho y ficha a una columna */
  .mt{font-size:clamp(11px, 3vw, 16px)}
  .mt-barra{flex-wrap:wrap; gap:.6em; padding-left:1.2em; padding-right:1.2em}
  .mt-nav{order:3; flex-basis:100%; justify-content:flex-start; overflow-x:auto; scrollbar-width:none}
  .mt-logo{flex:1}
  .mt-vista{padding:0 1.2em 3em}
  .mt-hero-info{width:auto; right:1.4em; left:1.4em}
  .mt-f-fondo{width:100%; height:50vh}
  .mt-f-velo{height:50vh; background:linear-gradient(0deg, var(--mt-bg) 0%, rgba(18,20,19,.3) 60%, rgba(18,20,19,0))}
  .mt-f-cuerpo{width:auto; min-height:0; padding:38vh 1.4em 1em}
  .mt-f-mas{padding:0 1.4em 3em}
}

/* Móvil en horizontal: poca altura, se aprovecha mejor */
@media (orientation:landscape) and (max-height:500px){
  .mt-barra{padding-top:max(.5em, env(safe-area-inset-top)); padding-bottom:.5em}
  .mt-salir-t{display:none}
  .mt-hero, .mt-hero-hueco{height:68vh}
  .mt-hero-titulo{font-size:2.1em}
  .mt-logo-img{max-height:4.2em}
  .mt-f-cuerpo{padding-top:2.4em; padding-bottom:1.2em; gap:.45em}
  .mt-f-titulo .mt-logo-img{max-height:4.6em}
  .mt-f-resumen{-webkit-line-clamp:3}
  .mt-btn-ico-t{display:none}
}
@media (max-width:700px) and (orientation:landscape){
  .mt-nav-b{padding:.45em .7em}
  .mt-logo span:last-child{display:none}
}

/* Botón 📺 para entrar (cabecera del móvil y barra del ordenador) */
.btn-modo-tele{font-size:17px}

/* Lo de «pasar el ratón» solo con ratón: en el móvil, al tocar, no se queda marcado */
@media (hover:hover){
  .mt-nav-b:hover{background:var(--mt-txt); color:#111}
  .mt-salir:hover{background:var(--mt-txt); color:#111}
  .mt-btn:hover{background:var(--mt-txt); color:#111; transform:scale(1.04)}
  .mt-btn-prim:hover{background:var(--mt-foco); color:#fff; box-shadow:0 0 0 .14em #fff}
  .mt-chip:hover{background:var(--mt-txt); color:#111}
  .mt-chip.on:hover{background:var(--mt-foco); color:#fff}
  .mt-hero:hover .mt-hero-flecha{opacity:1}
  .mt-scroll-caja:hover .mt-sflecha{opacity:1}
  .mt-tarjeta:hover .mt-poster{transform:scale(1.06); box-shadow:0 0 0 .16em #fff, 0 .8em 2em rgba(0,0,0,.5)}
  .mt-ancha:hover .mt-ancha-img{transform:scale(1.04); box-shadow:0 0 0 .16em #fff}
  .mt-ancha:hover .mt-ep-play{opacity:1}
  .mt-f-cerrar:hover{background:var(--mt-txt); color:#111}
}
