/* Tokens iguais aos do app (ui/Components.kt -> Pal) + Grid Matemático 1280x720 (54px / 4 Colunas) */
:root {
  --bg: #0A0A0C;
  --surface: #1C1C21;
  --surface2: #2C2C33;
  --text: #F5F5F7;
  --dim: #9A9AA3;
  --red: #FF453A;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --pad: 54px;      /* Margem lateral unificada: 1280 - 2*54 = 1172px (4x268 + 3x22) */
  --top: calc(88px + var(--safe-top)); /* TopPad abaixo da barra de 20px */
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; user-select: none; -webkit-user-select: none; }
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Roboto, "Segoe UI", system-ui, sans-serif; color: var(--text); -webkit-font-smoothing: antialiased; }

/* Modo padrão: tela cheia responsiva (PC e iPhone PWA) */
#stage { position: fixed; inset: 0; }
#tv {
  position: absolute; inset: 0; width: 100%; height: 100%; background: var(--bg);
  overflow: hidden;
}
#screen { position: absolute; inset: 0; overflow: hidden; }
#hint { display: none; position: fixed; bottom: 6px; width: 100%; text-align: center; color: #666; font-size: 12px; pointer-events: none; }

/* Modo simulador da TV (1280x720 fixo com escala, igual ao projetor) */
body.tv-mode {
  --safe-top: 0px;
  --safe-bottom: 0px;
  --pad: 54px;
  --top: 88px;
}
body.tv-mode #stage { inset: 0 0 28px 0; }
body.tv-mode #tv {
  inset: auto; left: 50%; top: 50%; width: 1280px; height: 720px;
  transform-origin: center; border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.1);
}
body.tv-mode #hint { display: block; }

/* Réguas de alinhamento matemático (Atalho F8 ou Ajustes) */
#guides-overlay {
  position: absolute; inset: 0; z-index: 90; pointer-events: none; display: none;
}
body.show-guides #guides-overlay { display: block; }
.guide-v-left { position: absolute; top: 0; bottom: 0; left: var(--pad); width: 1px; background: rgba(56, 189, 248, 0.78); }
.guide-v-right { position: absolute; top: 0; bottom: 0; right: var(--pad); width: 1px; background: rgba(56, 189, 248, 0.78); }
.guide-h-top { position: absolute; left: 0; right: 0; top: calc(20px + var(--safe-top)); height: 1px; background: rgba(244, 63, 94, 0.65); }
.guide-h-dock { position: absolute; left: 0; right: 0; bottom: calc(36px + var(--safe-bottom)); height: 1px; background: rgba(244, 63, 94, 0.65); }
.guide-cols {
  position: absolute; top: 0; bottom: 0; left: var(--pad); right: var(--pad);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.guide-col {
  border-left: 1px dashed rgba(56, 189, 248, 0.22);
  border-right: 1px dashed rgba(56, 189, 248, 0.22);
  background: rgba(56, 189, 248, 0.025);
}

/* ── Abas, ícones Phosphor e botão Voltar ─────────────────────────────── */
.ic { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -0.18em; }

#tabs-shade {
  position: absolute; inset: 0 0 auto 0; height: calc(108px + var(--safe-top)); pointer-events: none;
  background: linear-gradient(rgba(0,0,0,.82), transparent); z-index: 15;
}
#tabs {
  position: absolute; top: calc(20px + var(--safe-top)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(20,20,24,.94); border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 28px rgba(0,0,0,.55);
  z-index: 20; max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none;
}
#tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 20px; border-radius: 999px; font-size: 15px; font-weight: 600;
  color: rgba(245,245,247,.58); transition: transform .14s ease, background .14s ease, color .14s ease; white-space: nowrap;
}
.tab.hub-btn {
  padding: 8px 16px; color: var(--text); background: rgba(255,255,255,.08); margin-right: 4px;
}
.tab.hub-btn .ic { width: 18px; height: 18px; }
.tab.selected { background: rgba(255,255,255,.16); color: var(--text); }
.tab.focus { background: #fff; color: #000; transform: scale(1.04); }

/* ── Launcher (Hub inicial estilo Apple TV / tvOS Top Shelf) ─────────── */
.launcher {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(28px + var(--safe-top)) 0 calc(36px + var(--safe-bottom));
  scrollbar-width: none;
}
.launcher::-webkit-scrollbar { display: none; }
.launcher .hero-bg { height: 72%; }
.launcher .hero-bg[data-app="iptv"] {
  background:
    radial-gradient(circle at 78% 28%, rgba(37, 99, 235, 0.38) 0%, rgba(29, 78, 216, 0.14) 38%, transparent 70%),
    radial-gradient(circle at 62% 55%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
    linear-gradient(135deg, #0a0a0c 0%, #111827 55%, #0a0a0c 100%);
}
.launcher .hero-bg[data-app="txn"] {
  background:
    radial-gradient(circle at 76% 28%, rgba(220, 38, 38, 0.42) 0%, rgba(153, 27, 27, 0.16) 40%, transparent 70%),
    radial-gradient(circle at 60% 50%, rgba(255, 255, 255, 0.07) 0%, transparent 50%),
    linear-gradient(135deg, #0a0a0c 0%, #1f1215 55%, #0a0a0c 100%);
}
.launcher .hero-bg[data-app="cb"] {
  background:
    radial-gradient(circle at 76% 28%, rgba(244, 98, 0, 0.42) 0%, rgba(200, 70, 0, 0.16) 40%, transparent 70%),
    radial-gradient(circle at 62% 52%, rgba(255, 138, 43, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, #0a0a0c 0%, #1f1610 55%, #0a0a0c 100%);
}
.launcher .hero-bg[data-app="settings"] {
  background:
    radial-gradient(circle at 76% 28%, rgba(255, 255, 255, 0.14) 0%, rgba(142, 142, 147, 0.06) 40%, transparent 70%),
    linear-gradient(135deg, #0a0a0c 0%, #18181d 55%, #0a0a0c 100%);
}
.launcher-top {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 18px; min-height: 290px;
}
.launcher-hero {
  position: relative; z-index: 2;
  padding: 0 var(--pad); max-width: 820px;
}
.launcher-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  color: rgba(245,245,247,.62); font-size: 12px; font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase; margin-bottom: 6px;
}
.launcher-kicker .ic { width: 16px; height: 16px; color: var(--text); }
.launcher-title {
  font-size: 38px; font-weight: 800; line-height: 42px; letter-spacing: -.5px;
  color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.85);
}
.launcher-sub {
  margin-top: 6px; color: rgba(245,245,247,.72); font-size: 15px; line-height: 21px;
  max-width: 680px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.launcher-preview {
  position: relative; z-index: 2; margin-top: 16px;
}
.launcher-preview .shelf { margin-bottom: 4px; }
.launcher-preview .shelf-title { font-size: 16px; font-weight: 700; color: rgba(245,245,247,.88); }
.launcher-preview .row-inner { padding: 10px var(--pad) 12px; gap: 22px; }
.launcher-preview .card.wide, .launcher-preview .card.tv.wide { width: 268px; }
.launcher-preview .card.wide .art, .launcher-preview .card.tv.wide .art { aspect-ratio: auto; height: 132px; }
.launcher-preview .card.poster, .launcher-preview .card.tv.poster { width: 148px; }

.launcher-dock {
  position: relative; z-index: 3; padding: 8px var(--pad) 0;
}
.launcher-dock-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px;
}
.launcher-dock-left {
  display: flex; align-items: baseline; gap: 12px;
}
.launcher-brand {
  color: #fff; font-size: 15px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase;
}
.launcher-hint {
  color: rgba(245,245,247,.55); font-size: 13px; font-weight: 500;
}
.app-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.app-tile {
  position: relative; height: 152px; border-radius: 20px;
  background: linear-gradient(145deg, #3a3a44 0%, #24242b 52%, #151519 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 12px 30px rgba(0,0,0,.55); overflow: hidden;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease, border-color .18s ease, filter .18s ease;
}
.app-tile[data-app="iptv"] {
  background: linear-gradient(145deg, #2563eb 0%, #1d4ed8 52%, #1e3a8a 100%);
  border-color: rgba(255,255,255,.18);
}
.app-tile[data-app="txn"] {
  background: linear-gradient(145deg, #dc2626 0%, #b91c1c 52%, #7f1d1d 100%);
  border-color: rgba(255,255,255,.18);
}
.app-tile[data-app="cb"] {
  background: linear-gradient(145deg, #ff8a2b 0%, #f46200 52%, #c84600 100%);
  border-color: rgba(255,255,255,.18);
}
.app-tile[data-app="settings"] {
  background: linear-gradient(145deg, #3a3a44 0%, #24242b 52%, #151519 100%);
  border-color: rgba(255,255,255,.14);
}
.app-tile-center-logo {
  width: 72%; max-width: 190px; height: auto; max-height: 54px;
  object-fit: contain; object-position: center;
  pointer-events: none; user-select: none;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,.18));
  transition: transform .2s cubic-bezier(.2,.8,.2,1);
}
.app-tile[data-app="txn"] .app-tile-center-logo {
  width: 62%; max-width: 155px; max-height: 48px;
}
.app-tile-center-mark {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 30px; font-weight: 900; letter-spacing: 2px; color: #fff;
  pointer-events: none; user-select: none;
  transition: transform .2s cubic-bezier(.2,.8,.2,1);
}
.app-tile-center-mark .ic {
  width: 42px; height: 42px; color: #fff;
}
.app-tile[data-app="settings"] .app-tile-center-mark .ic {
  width: 50px; height: 50px;
}
.app-tile.focus, .app-tile:hover {
  transform: translateY(-6px) scale(1.045);
  border-color: #fff;
  box-shadow: 0 0 0 3px #fff, 0 22px 48px rgba(0,0,0,.85);
  filter: brightness(1.07);
}
.app-tile.focus .app-tile-center-logo, .app-tile:hover .app-tile-center-logo,
.app-tile.focus .app-tile-center-mark, .app-tile:hover .app-tile-center-mark {
  transform: scale(1.05);
}

/* ── Selos dos cards de Cams (Chaturbate) e Ao Vivo ───────────────────── */
.badge-left {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(10,10,12,.86); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.badge-left .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.badge-left.rec { background: #FF453A; color: #fff; }
.badge-left.rec .dot { background: #fff; }
.badge-left.priv { background: rgba(28,28,33,.92); color: var(--dim); }
.badge-viewers {
  position: absolute; bottom: 10px; right: 10px; z-index: 3;
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(10,10,12,.84); color: var(--text);
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 3px 8px; border-radius: 6px;
}
.badge-viewers .ic { width: 13px; height: 13px; }
.ch-num-badge {
  position: absolute; top: 10px; left: 12px; z-index: 2;
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,.55);
}

.back-btn {
  position: absolute; top: calc(20px + var(--safe-top)); left: var(--pad); z-index: 30;
  display: none; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  font: inherit; font-size: 15px; font-weight: 600; color: var(--text);
  background: rgba(28,28,33,.95);
  box-shadow: 0 6px 20px rgba(0,0,0,.5); transition: opacity .3s, transform .14s, background .14s, color .14s;
}
.back-btn .ic { width: 17px; height: 17px; }
.back-btn.focus { background: #fff; color: #000; transform: scale(1.05); }
.back-btn.osd-hidden { opacity: 0; pointer-events: none; }

/* ── Foco e ponteiro (mouse) ──────────────────────────────────────────── */
.f { outline: none; transition: transform .14s ease-out, box-shadow .14s, background .14s, color .14s, border-color .14s; }
@media (hover: hover) and (pointer: fine) {
  .f { cursor: pointer; }
  .card:hover:not(.focus) .art { transform: scale(1.03); }
  .pill:hover:not(.focus), .chip:hover:not(.focus), .tab:hover:not(.focus),
  .cat:hover:not(.focus), .setting:hover:not(.focus), .back-btn:hover:not(.focus),
  .season:hover:not(.focus), .p-back:hover:not(.focus), .p-btn-icon:hover:not(.focus),
  .p-ctrl-btn:hover:not(.focus), .p-btn-retry:hover:not(.focus), .p-drawer-item:hover:not(.focus) { background: rgba(255,255,255,.24); color: var(--text); }
}

/* ── Telas roláveis (roda do mouse, toque e D-pad) ────────────────────── */
.scroll {
  position: absolute; inset: var(--top) 0 0 0;
  overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; overscroll-behavior-y: contain;
}
.scroll::-webkit-scrollbar { display: none; }
.scroll-inner { padding-bottom: calc(48px + var(--safe-bottom)); }
.home .scroll { top: var(--top); }

/* ── Destaque (Início) ────────────────────────────────────────────────── */
.hero-bg { position: absolute; inset: 0 0 auto 0; height: 450px; transition: opacity .2s; pointer-events: none; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-bg::before, .hero-bg::after { content: ""; position: absolute; inset: 0; }
.hero-bg::before { background: linear-gradient(90deg, #0A0A0C 0%, rgba(10,10,12,.92) 36%, rgba(10,10,12,.35) 68%, rgba(10,10,12,.12) 100%); }
.hero-bg::after { background: linear-gradient(180deg, rgba(10,10,12,.22) 0%, rgba(10,10,12,.6) 62%, var(--bg) 100%); }
.hero-bg.dim { opacity: .26; }
/* Destaque rotativo: o fundo novo entra por cima do antigo, só com opacidade (sem blur) */
.hero-bg.rotating { z-index: 0; }
.hero-bg.rotating::before, .hero-bg.rotating::after { z-index: 1; }
.hero-bg.rotating img { position: absolute; inset: 0; animation: hero-fade .6s ease both; }
.hero-text { animation: hero-fade .35s ease both; }
@keyframes hero-fade { from { opacity: 0; } }
.hero-trailer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.hero-trailer.on { opacity: 1; }
.hero-dots { display: flex; align-items: center; }
.hero-dot { width: 22px; height: 40px; display: grid; place-items: center; }
.hero-dot::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.34); transition: width .2s ease, background .2s ease, box-shadow .14s ease; }
.hero-dot.selected::before { width: 16px; background: #fff; }
.hero-dot.focus::before { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.4); }
.hero-info { height: 320px; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 0 26px var(--pad); width: 680px; max-width: 100%; }
.brand { color: rgba(245,245,247,.72); font-size: 13px; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase; margin-bottom: 4px; }
.hero-title { font-size: 38px; font-weight: 800; line-height: 42px; letter-spacing: -.4px; margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { color: rgba(245,245,247,.7); font-size: 14px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-star { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 600; }
.meta-star .ic { width: 14px; height: 14px; vertical-align: -2px; }
.plot { color: rgba(245,245,247,.8); font-size: 15px; line-height: 21px; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 24px; border-radius: 999px; font-size: 15px; font-weight: 700;
  background: rgba(255,255,255,.16); color: #fff; white-space: nowrap; border: 0; font-family: inherit;
}
.pill .ic { width: 18px; height: 18px; }
.pill.focus { background: #fff; color: #000; transform: scale(1.05); }

/* ── Fileiras (Alinhadas exatamente ao Grid de 4 Colunas x 268px / 6 Pôsteres) ── */
.shelf { margin-bottom: 22px; position: relative; }
.shelf-title {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 18px; font-weight: 700; padding: 0 var(--pad) 2px;
  white-space: nowrap;
}
.shelf-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.shelf-all { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 600; color: var(--dim); }
.shelf-all .ic { width: 14px; height: 14px; }
.shelf-all.focus, .shelf-all:hover { color: #fff; }
/* Na TV o "Ver tudo" é o último card da fileira; fora dela, o link do título */
body.tv-mode .shelf-all { display: none; }
body:not(.tv-mode) .all-tile { display: none; }
.all-tile .art { place-content: center; gap: 8px; background: var(--surface); }
.all-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); }
.all-mark .ic { width: 20px; height: 20px; }
.all-label { font-size: 14px; font-weight: 700; }
.page-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 12px var(--pad) 6px;
}
.page-head-title { font-size: 22px; font-weight: 800; color: #fff; }
.page-head-sub { font-size: 13px; font-weight: 500; color: rgba(245,245,247,.52); }

.row {
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.row::-webkit-scrollbar { display: none; }
.row-inner { display: flex; gap: 22px; padding: 12px var(--pad); width: max-content; }
.row-nav {
  display: none; position: absolute; top: 50%; transform: translateY(-20%); z-index: 10;
  width: 38px; height: 68px; border-radius: 10px; border: 0;
  background: rgba(16,16,20,.88); color: var(--text);
  align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.5); transition: opacity .15s, background .15s, color .15s;
}
.row-nav .ic { width: 22px; height: 22px; }
.row-nav.prev { left: 10px; }
.row-nav.next { right: 10px; }
.row-nav:hover { background: #fff; color: #000; }
@media (hover: hover) and (pointer: fine) {
  body:not(.tv-mode) .shelf:hover .row-nav { display: flex; }
}

.card { flex: none; }
.card.poster { width: 174px; }
.card.wide { width: 268px; }
.art {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(145deg, #1f1f26, #141418);
  border: 1px solid rgba(255,255,255,.08);
  display: grid; place-items: center; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.poster .art { aspect-ratio: 2 / 3; }
.wide .art { aspect-ratio: 16 / 9; }
.art .ini { color: var(--dim); font-size: 26px; font-weight: 800; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.art.contain img { object-fit: contain; padding: 16px; }
.card .name { margin-top: 8px; padding-left: 2px; font-size: 13px; font-weight: 500; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.focus .art { transform: scale(1.045); border-color: #fff; box-shadow: 0 0 0 2.5px #fff, 0 16px 36px rgba(0,0,0,.75); z-index: 5; }
.card.focus .name { color: var(--text); font-weight: 700; }
.badge { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(0,0,0,.8); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; }

.placeholder { background: var(--surface); border-radius: var(--radius); }
/* Carregando: bloco no lugar da imagem. No modo TV fica parado (o projetor evita animação contínua) */
.art.loading, .art.placeholder, .hero-skeleton i { animation: skeleton 1.4s ease-in-out infinite; }
body.tv-mode .art.loading, body.tv-mode .art.placeholder, body.tv-mode .hero-skeleton i { animation: none; }
.art.loading .ini, .art.loaded .ini { visibility: hidden; }
.crest:has(img) span { visibility: hidden; }
@keyframes skeleton { 50% { opacity: .55; } }
.hero-skeleton { display: grid; gap: 12px; justify-items: start; }
.hero-skeleton i { display: block; width: 70%; height: 38px; border-radius: 8px; background: rgba(255,255,255,.12); }
.hero-skeleton i:nth-child(2) { width: 90%; height: 44px; }
.hero-skeleton i:nth-child(3) { width: 162px; height: 48px; border-radius: 999px; margin-top: 8px; }

/* Fileiras estilo Apple TV (Início): cards alinhados a 268px (4 cols) ou 174px (6 cols) */
.card.tv.wide { width: 268px; }
.card.tv.poster { width: 174px; }
.card.tv .art { border-radius: 14px; }
.card.tv.focus .art { transform: scale(1.045); }
.ov { position: absolute; inset: auto 0 0 0; padding: 38px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.92)); text-align: left; }
.ov-title { font-size: 14px; font-weight: 700; line-height: 18px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov.center { padding: 70px 10px 12px; text-align: center; }
.ov-mark { font-size: 15px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art img.ov-logo { position: static; display: block; margin: 0 auto; width: auto; height: 24px; max-width: 80%; object-fit: contain; }
.ov-scene { font-size: 12px; line-height: 15px; color: rgba(255,255,255,.85); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ov-sub { font-size: 12px; line-height: 15px; color: rgba(255,255,255,.68); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art img.corner-logo { inset: 10px auto auto 12px; width: auto; height: 16px; max-width: 96px; object-fit: contain; z-index: 2; }
.corner-name { position: absolute; top: 10px; left: 12px; z-index: 2; font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(255,255,255,.88); }
.rank { position: absolute; top: 6px; left: 12px; z-index: 2; font-size: 40px; font-weight: 900; line-height: 44px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.75); }
.card.tv .badge { top: 10px; right: 10px; bottom: auto; }

/* ── Grade Unificada de 4 Colunas (TXN / Chaturbate / Busca) e 6 Colunas (Modelos) ── */
.grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px; padding: 12px var(--pad) calc(48px + var(--safe-bottom));
}
.grid.people-grid, .grid.poster-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px 22px;
}
.grid .card, .grid .card.tv.poster, .grid .card.tv.wide { width: auto; min-width: 0; } /* na grade, a coluna manda */

/* ── IPTV e TXN: proporções medidas no Prime Video (destaque grande, grade fechada nas margens) ── */
body[data-prime] { --radius: 10px; --hero-h: 76vh; }
body[data-prime].tv-mode { --hero-h: 548px; }
body[data-prime] .shelf-title { font-size: 20px; }
body[data-prime] .card.tv .art { border-radius: var(--radius); }
body[data-prime] .grid { gap: 24px; }
body[data-prime] .grid .card.tv.wide { width: auto; }
body[data-prime] .home .hero-bg { height: calc(var(--hero-h) + 32px); }
body[data-prime] .home .hero-bg img, body[data-prime] .home .hero-trailer { object-position: center 25%; }
body[data-prime] .home .hero-bg::before { background: linear-gradient(90deg, rgba(10,10,12,.94) 0%, rgba(10,10,12,.72) 30%, rgba(10,10,12,.08) 62%, transparent 100%); }
body[data-prime] .home .hero-info { height: calc(var(--hero-h) - var(--top)); width: 640px; }
body[data-prime] .buttons { align-items: center; }
body[data-prime] .pill.primary { height: 52px; padding: 0 38px; font-size: 17px; background: #fff; color: #000; }
body[data-prime] .pill.primary .ic { width: 20px; height: 20px; }
/* O botão principal já é branco: na TV o foco é o anel em volta dele */
body[data-prime] .pill.primary.focus { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px #fff; }
body[data-prime] .pill.primary:hover:not(.focus) { background: #e4e4e8; color: #000; }
/* No toque não existe foco de controle remoto: sem anel no botão que a tela escolheu sozinha */
@media (pointer: coarse) { body[data-prime]:not(.tv-mode) .pill.primary.focus { box-shadow: none; transform: none; } }
body[data-prime] .pill.round { width: 52px; height: 52px; padding: 0; }
body[data-prime] .pill.round span { display: none; }
body[data-prime] .pill.round .ic { width: 24px; height: 24px; }
/* Sem faixa no topo: o conteúdo rola até a borda da tela, por baixo do menu */
body[data-prime] #tabs-shade { display: none; }
body[data-prime] .scroll, body[data-prime] .home .scroll, body[data-prime] .scroll.list-screen { top: 0; scroll-padding-top: var(--top); }
body[data-prime] .scroll-inner { padding-top: var(--top); }
/* Modelos em cards quadrados, com a mesma largura dos pôsteres */
body[data-prime] .card.person { width: 174px; }
body[data-prime] .grid .card.person { width: auto; }
body[data-prime] .card.person .art { width: 100%; height: auto; aspect-ratio: 1; border-width: 1px; }
body[data-prime] .person .art, body[data-prime] .list-face .art { border-radius: var(--radius); }
/* As fotos do catálogo são em pé (2:3): corte pelo topo, como no catálogo, para manter o rosto */
body[data-prime] .card.person .art img, body[data-prime] .person .art img, body[data-prime] .list-face .art img { object-position: center top; }

/* ── Aba TXN & Chaturbate: busca, tags, modelos e estúdios ────────────── */
.chips-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--pad) 10px;
}
.chips-bar .chips { padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px var(--pad) 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--surface); color: var(--text);
  border: 1px solid rgba(255,255,255,.07); white-space: nowrap;
}
.chip.selected { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.35); }
.chip .ic { width: 16px; height: 16px; }
.chip.focus { background: #fff; color: #000; border-color: #fff; transform: scale(1.05); }

.card.person { width: 120px; text-align: center; }
.card.person .art {
  width: 120px; height: 120px; margin: 0 auto; border-radius: 50%;
  background: linear-gradient(145deg, rgba(220,38,38,.3), var(--surface) 55%, var(--bg));
  border: 2px solid rgba(255,255,255,.12);
}
.card.person .art img { object-position: center 20%; }
.card.person .pname { color: #fff; font-size: 14px; font-weight: 700; line-height: 17px; margin-top: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.person .psub { color: rgba(245,245,247,.5); font-size: 12px; margin-top: 2px; }
.card.person.focus .art { transform: scale(1.06); border-color: #fff; box-shadow: 0 0 0 2px #fff, 0 12px 28px rgba(0,0,0,.65); }

.card.studio { width: 268px; }
.studio-art {
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, #1f1f26, #121216);
  border: 1px solid rgba(255,255,255,.08);
}
.studio-art img { inset: 22px 28px; width: calc(100% - 56px); height: calc(100% - 44px); object-fit: contain; }
.studio-txt { color: #fff; font-size: 18px; font-weight: 900; letter-spacing: 2.2px; text-transform: uppercase; text-align: center; padding: 0 14px; }
.card.studio.focus .art { transform: scale(1.045); border-color: #fff; box-shadow: 0 0 0 2.5px #fff, 0 16px 36px rgba(0,0,0,.75); }

.list-screen { top: calc(68px + var(--safe-top)); }
body.tv-mode .list-screen { top: 44px; }
.list-head { display: flex; align-items: center; gap: 18px; padding: 10px var(--pad) 18px; }
.list-face .art { width: 84px; height: 84px; border-radius: 50%; }
.list-face .art img { object-position: center 20%; }
.list-title { font-size: 34px; font-weight: 800; }
.list-logo { height: 46px; max-width: 320px; object-fit: contain; }
.list-head .list-count { margin-top: 0; }
.search-bar { display: flex; align-items: center; gap: 18px; padding: 10px var(--pad) 18px; }
.search-input {
  width: 640px; max-width: 100%; padding: 14px 22px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); outline: none;
  font: inherit; font-size: 17px; background: var(--surface); color: var(--text);
  user-select: text; -webkit-user-select: text;
}
.search-input.focus, .search-input:focus { background: #fff; color: #000; border-color: #fff; }

/* ── Ao vivo Split-View (Coluna Esquerda 268px + Grade Direita 3 Colunas) ── */
.live { position: absolute; inset: var(--top) var(--pad) 0 var(--pad); display: flex; gap: 22px; }
.live .cats { width: 268px; flex: none; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.live .cats::-webkit-scrollbar, .live .channels::-webkit-scrollbar { display: none; }
.live .cats-inner, .live .ch-inner { padding: 6px 0 calc(40px + var(--safe-bottom)); }
.cats-label {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(245,245,247,.45); padding: 0 12px 8px;
}
.cat {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 16px; border-radius: 12px; font-size: 15px; font-weight: 600;
  color: rgba(245,245,247,.65); margin-bottom: 4px;
}
.cat-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-count { font-size: 12px; font-weight: 600; color: rgba(245,245,247,.4); flex: none; }
.cat.selected { background: rgba(255,255,255,.14); color: var(--text); font-weight: 700; }
.cat.selected .cat-count { color: rgba(245,245,247,.75); }
.cat.focus { background: #fff; color: #000; transform: scale(1.02); box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.cat.focus .cat-count { color: rgba(0,0,0,.65); }
.live .ch-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-head { flex: none; display: flex; align-items: center; gap: 14px; padding: 6px 8px 10px 0; }
.ch-title { min-width: 0; font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-count { flex: none; font-size: 13px; color: rgba(245,245,247,.55); }
.cat-chips { padding: 8px var(--pad) 10px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips .chip { flex: none; }
.live-chips { flex: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 8px 12px 0; }
.live-chips::-webkit-scrollbar { display: none; }
.live-chips .chip { flex: none; }
.search-input.ch-search { margin-left: auto; width: 260px; flex: none; padding: 9px 18px; font-size: 15px; }
/* Programa atual (EPG): quanto já passou, em vermelho de "ao vivo" */
.epg-bar { display: none; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3; background: rgba(255,255,255,.18); }
.card.has-epg .epg-bar { display: block; }
.epg-bar i { display: block; height: 100%; background: var(--red); }
/* Card de canal: logo padronizado no meio, nome pequeno em cima e programa embaixo do card */
.live-tile { background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.04) 55%, rgba(255,255,255,.07)), #121216; }
.art.contain.live-tile img.live-logo { padding: 11% 20%; z-index: 1; }
.live-tile img.live-glow { object-fit: cover; padding: 0; transform: scale(1.3); filter: blur(28px) saturate(1.6); opacity: .5; }
body.tv-mode .live-tile img.live-glow { display: none; }
.live-name {
  position: absolute; top: 9px; left: 11px; right: 64px; z-index: 2;
  font-size: 11px; font-weight: 600; color: rgba(255,255,255,.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.live-tag {
  position: absolute; top: 9px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 800; letter-spacing: .6px; color: rgba(255,255,255,.85);
}
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.live-now { margin-top: 9px; padding-left: 2px; font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-until { padding-left: 2px; margin-top: 1px; font-size: 12px; color: var(--dim); }
/* Jogo: horário e confronto no lugar do logo */
.game-tile .game { position: relative; z-index: 1; padding: 26px 16px 12px; text-align: center; }
.game-time { font-size: 13px; font-weight: 800; letter-spacing: 1px; color: var(--red); }
.game-teams { margin-top: 4px; font-size: 19px; font-weight: 800; line-height: 23px; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body:not(.tv-mode) .game-teams { font-size: 15px; line-height: 19px; }
/* Confronto: escudo | horário | escudo */
.game.duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; width: 100%; padding: 22px 12px 10px; }
.duel .side { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.crest { position: relative; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); }
.crest span { font-size: 15px; font-weight: 800; color: rgba(255,255,255,.75); }
/* Com escudo, o círculo some e fica só o escudo */
.crest img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.crest:has(img) { background: none; }
.side-name { max-width: 100%; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duel .game-time { font-size: 15px; }
body:not(.tv-mode) .crest { width: 40px; height: 40px; }
body:not(.tv-mode) .side-name { font-size: 12px; }
.live-shelf .live-card { width: 268px; }
body[data-prime] .live-shelf .live-card { width: 275px; }
/* Na TV, rótulos com pelo menos 13 px (lidos de longe) */
body.tv-mode .live-name, body.tv-mode .live-tag { font-size: 13px; }
body.tv-mode .live-until { font-size: 13px; }
.live .channels { min-height: 0; flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.live .grid {
  padding: 6px 0 calc(40px + var(--safe-bottom));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* ── Detalhes (Alinhado em 54px, com Elenco Circular ou Episódios 4 Colunas) ── */
.detail { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.detail::-webkit-scrollbar { display: none; }
.detail > img { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.detail .shade1 { position: fixed; inset: 0; background: linear-gradient(90deg, #0A0A0C 0%, rgba(10,10,12,.92) 38%, rgba(10,10,12,.35) 70%, rgba(10,10,12,.14) 100%); pointer-events: none; }
.detail .shade2 { position: fixed; inset: 0; background: linear-gradient(180deg, rgba(10,10,12,.25) 0%, rgba(10,10,12,.65) 60%, var(--bg) 100%); pointer-events: none; }
.detail .body { position: relative; padding: calc(88px + var(--safe-top)) 0 calc(40px + var(--safe-bottom)); }
body.tv-mode .detail .body { min-height: 100%; padding: 88px 0 36px; display: flex; flex-direction: column; justify-content: space-between; }
.detail .info { padding: 0 var(--pad); width: 760px; max-width: 100%; }
.detail .title { font-size: 40px; font-weight: 800; line-height: 44px; letter-spacing: -.4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.detail .plot { font-size: 15px; line-height: 22px; margin-top: 12px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; color: rgba(245,245,247,.82); }
.detail .cast { color: var(--dim); font-size: 14px; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-logo { display: block; height: 32px; max-width: 220px; object-fit: contain; object-position: left center; }
.detail .people-sec { padding: 26px var(--pad) 0; }
.detail .people-title { font-size: 16px; font-weight: 700; color: rgba(245,245,247,.85); margin-bottom: 12px; }
.detail .people { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.detail .people::-webkit-scrollbar { display: none; }
.person { width: 104px; flex: none; text-align: center; }
.person .art { width: 104px; height: 104px; aspect-ratio: auto; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); }
.person .art img { object-position: center 20%; }
.person .pname { color: #fff; font-size: 14px; font-weight: 600; line-height: 17px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person.focus .art { transform: scale(1.06); border-color: #fff; box-shadow: 0 0 0 2px #fff; }
.detail .shelf { margin: 22px 0 0; }
.detail .shelf-title { font-size: 16px; }
.detail .card.tv.poster { width: 148px; }
/* Séries: texto à esquerda e episódios em painel nas 2 colunas da direita (fundo sólido, sem blur) */
body .detail.has-eps .body { display: flex; flex-direction: row; justify-content: flex-start; gap: 22px; height: 100%; padding-right: var(--pad); }
.detail.has-eps .info { flex: 1; width: auto; min-width: 0; padding-right: 0; }
.detail.has-eps .plot { -webkit-line-clamp: 8; }
.ep-panel {
  flex: 0 0 min(575px, 46%); min-height: 0; display: flex; flex-direction: column;
  background: rgba(10,10,12,.82); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); overflow: hidden;
}
.ep-count { flex: none; padding: 16px 18px 0; font-size: 15px; font-weight: 700; }
.ep-panel .seasons { flex: none; padding: 12px 18px 0; }
.ep-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: 10px; }
.ep-list::-webkit-scrollbar { display: none; }
.ep-item { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 12px; }
.ep-item .art { flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 8px; }
.ep-item .art .ini { font-size: 15px; }
.ep-fallback img { filter: brightness(.45) saturate(.6); }
.ep-item .art .ep-n { position: absolute; left: 8px; bottom: 4px; z-index: 2; font-size: 22px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.ep-item .art:not(.ep-fallback) .ep-n { display: none; }
.ep-text { min-width: 0; }
.ep-name { font-size: 15px; font-weight: 600; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-dur { margin-top: 2px; font-size: 13px; color: var(--dim); }
.ep-item.focus { background: #fff; color: #000; }
.ep-item.focus .ep-dur { color: rgba(0,0,0,.65); }
.seasons { display: flex; gap: 10px; padding: 22px var(--pad) 0; overflow-x: auto; scrollbar-width: none; }
.seasons::-webkit-scrollbar { display: none; }
.season { flex: none; padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--surface); border: 1px solid rgba(255,255,255,.07); color: var(--text); white-space: nowrap; }
.season.selected { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.35); }
.season.focus { background: #fff; color: #000; border-color: #fff; }

/* ── Mensagens / Ajustes / Login ──────────────────────────────────────── */
.center { position: absolute; inset: 80px 20px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
.center h2 { margin: 0; font-size: 24px; font-weight: 700; }
.center p { margin: 0; color: var(--dim); font-size: 15px; max-width: 560px; }
.center .pill { margin-top: 18px; }
.auth-form { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 16px; width: 100%; max-width: 380px; }
.auth-input {
  width: 100%; padding: 14px 20px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16);
  outline: none; font: inherit; font-size: 16px; background: var(--surface); color: var(--text);
  text-align: center; user-select: text; -webkit-user-select: text;
}
.auth-input:focus { border-color: #fff; background: var(--surface2); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.85); border-right-color: transparent; animation: spin .9s linear infinite; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

.settings { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px var(--pad) calc(40px + var(--safe-bottom)); }
.section { width: 100%; max-width: 680px; padding: 12px 0 2px 2px; color: rgba(245,245,247,.5); font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.setting { width: 100%; max-width: 680px; height: 54px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 20px; border-radius: 12px; background: var(--surface); font-size: 15px; font-weight: 600; }
.setting span:last-child { font-size: 14px; font-weight: 500; color: rgba(245,245,247,.58); max-width: 400px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setting.focus { background: #fff; color: #000; font-weight: 700; transform: scale(1.02); box-shadow: 0 10px 28px rgba(0,0,0,.55); }
.setting.focus span:last-child { color: rgba(0,0,0,.72); }

/* Logo do título (TMDB) no lugar do texto: alinhado à esquerda, na altura de duas linhas */
.title-logo { display: block; max-width: min(460px, 100%); max-height: 110px; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 2px 12px rgba(0,0,0,.6)); }
.has-logo { display: block !important; -webkit-line-clamp: unset !important; margin: 6px 0 4px; }
.detail .title-logo { max-height: 130px; }
.trailer-root { position: absolute; inset: 0; background: #000; }
.trailer-root iframe { width: 100%; height: 100%; border: 0; }

/* ── TV ao vivo (prévia): vídeo em tela cheia, barra de informações e guia ── */
.tv-open { flex: none; padding: 8px 18px; font-size: 14px; }
.tv-open .ic { width: 16px; height: 16px; }
.tv-veil { position: absolute; inset: 0; z-index: 5; }
.tv-root [hidden] { display: none !important; }
.tv-root .p-viewport video { object-fit: contain; }
.tv-back, .tv-clock, .tv-banner { transition: opacity .25s ease, transform .25s ease; }
.tv-root:not(.ui-on) .tv-back, .tv-root:not(.ui-on) .tv-clock { opacity: 0; pointer-events: none; }
.tv-root:not(.ui-on) .tv-banner { opacity: 0; transform: translateY(16px); pointer-events: none; }
.tv-root.guide-on .tv-banner, .tv-root.guide-on .tv-back { opacity: 0; pointer-events: none; }
/* Faixa escura em cima para o Voltar e o relógio lerem sobre qualquer imagem */
.tv-root::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; z-index: 6; pointer-events: none;
  background: linear-gradient(rgba(0,0,0,.7), transparent); opacity: 0; transition: opacity .25s ease;
}
.tv-root.ui-on::before { opacity: 1; }
.tv-back {
  position: absolute; top: calc(22px + var(--safe-top)); left: var(--pad); z-index: 20;
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 18px; border: 0; border-radius: 999px;
  background: rgba(28,28,33,.92); color: var(--text); font: inherit; font-size: 15px; font-weight: 600;
}
.tv-back .ic { width: 17px; height: 17px; }
.tv-back.focus { background: #fff; color: #000; }
.tv-clock { position: absolute; top: calc(28px + var(--safe-top)); right: var(--pad); z-index: 45; font-size: 22px; font-weight: 700; line-height: 28px; font-variant-numeric: tabular-nums; color: #fff; }
.tv-root.guide-on .tv-clock { opacity: 1; }
.tv-typed {
  position: absolute; top: calc(76px + var(--safe-top)); right: var(--pad); z-index: 50;
  min-width: 128px; padding: 8px 22px; border-radius: 14px; background: rgba(10,10,12,.95); border: 1px solid rgba(255,255,255,.16);
  font-size: 48px; font-weight: 800; letter-spacing: 4px; text-align: center; font-variant-numeric: tabular-nums;
}
.tv-status { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 25; max-width: 80%; padding: 14px 22px; border-radius: 14px; background: rgba(10,10,12,.94); font-size: 16px; text-align: center; }
.tv-sound { position: absolute; top: calc(22px + var(--safe-top)); left: 50%; transform: translateX(-50%); z-index: 30; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: #fff; color: #000; font: inherit; font-size: 14px; font-weight: 700; }
.tv-sound .ic { width: 16px; height: 16px; }

/* Logo solto, sem caixa: só a marca, do tamanho do espaço */
.tv-logo-art { aspect-ratio: 16 / 9; background: none; border: 0; border-radius: 0; }
.art.contain.tv-logo-art img { padding: 0; filter: drop-shadow(0 2px 8px rgba(0,0,0,.45)); }
.tv-logo-art .ini { font-size: 20px; color: rgba(255,255,255,.75); }

/* Barra de informações: base quase opaca (sem desfoque) para ler sobre qualquer cena */
.tv-banner {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 32px;
  padding: 110px var(--pad) calc(36px + var(--safe-bottom));
  background: linear-gradient(rgba(6,6,8,0) 0, rgba(6,6,8,.9) 34%, rgba(6,6,8,.97) 52%);
}
.tvb-id { display: flex; align-items: center; gap: 22px; }
.tvb-num { min-width: 92px; font-size: 64px; font-weight: 300; line-height: 1; letter-spacing: -1px; text-align: right; font-variant-numeric: tabular-nums; color: #fff; }
.tvb-logo { width: 132px; padding-left: 22px; border-left: 1px solid rgba(255,255,255,.22); }
.tvb-info { min-width: 0; }
.tvb-name { font-size: 13px; letter-spacing: .4px; color: rgba(255,255,255,.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvb-name b { color: #fff; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.tvb-q { margin-left: 10px; padding: 1px 6px; border-radius: 4px; border: 1px solid rgba(255,255,255,.4); font-size: 11px; font-weight: 800; letter-spacing: .6px; color: #fff; }
.tvb-title { margin-top: 6px; font-size: 32px; font-weight: 800; line-height: 38px; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvb-title.muted, .tvg-now.muted { color: rgba(255,255,255,.45); font-weight: 600; }
.tvb-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.tvb-time { flex: none; min-width: 108px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.tvb-bar, .tvg-bar { flex: 1; max-width: 420px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
.tvb-bar i, .tvg-bar i { display: block; width: 0; height: 100%; background: var(--red); }
.tvb-next { margin-top: 10px; font-size: 14px; color: rgba(255,255,255,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvb-next span { color: rgba(255,255,255,.5); margin-right: 8px; font-variant-numeric: tabular-nums; }
.tvb-next b { font-weight: 600; color: rgba(255,255,255,.85); }
.tvb-side { display: flex; align-items: center; gap: 10px; }
.tvb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border: 0; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font: inherit; font-size: 15px; font-weight: 700; }
.tvb-btn .ic { width: 18px; height: 18px; }
.tvb-zap { width: 46px; padding: 0; }
.tvb-btn.focus, .tvb-btn:hover { background: #fff; color: #000; }
/* Na TV as setas do controle trocam de canal: os botões de seta só servem para mouse e toque */
body.tv-mode .tvb-zap { display: none; }

/* Guia: painel sólido à esquerda com colunas fixas; o vídeo continua à direita */
.tv-guide {
  position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column;
  padding: calc(22px + var(--safe-top)) 0 0 var(--pad);
  background: linear-gradient(90deg, rgba(6,6,8,.98) 0%, rgba(6,6,8,.97) 64%, rgba(6,6,8,.6) 82%, rgba(6,6,8,.2) 100%);
}
.tvg-head { flex: none; display: flex; align-items: center; gap: 16px; width: 900px; max-width: calc(100% - var(--pad)); height: 46px; margin-bottom: 18px; }
.tvg-title { font-size: 28px; font-weight: 800; letter-spacing: -.3px; }
.tvg-close { margin-left: auto; height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 14px; font-weight: 600; }
.tvg-close.focus, .tvg-close:hover { background: #fff; color: #000; }
.tvg-body { flex: 1; min-height: 0; display: flex; gap: 22px; width: 900px; max-width: calc(100% - var(--pad)); }
.tvg-groups { flex: none; width: 176px; overflow-y: auto; scrollbar-width: none; padding: 43px 0 30px; } /* 1º grupo na altura da 1ª linha */
.tvg-groups::-webkit-scrollbar, .tvg-rows::-webkit-scrollbar { display: none; }
.tvg-group { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 42px; padding: 0 14px; border-radius: 10px; margin-bottom: 2px; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.58); }
.tvg-group small { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.35); font-variant-numeric: tabular-nums; }
.tvg-group.selected { background: rgba(255,255,255,.12); color: #fff; }
.tvg-group.selected small { color: rgba(255,255,255,.6); }
.tvg-list { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* As mesmas colunas no cabeçalho e nas linhas: número | logo | agora | a seguir */
.tvg-cols, .tvg-row { display: grid; grid-template-columns: 56px 96px minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; column-gap: 18px; }
.tvg-cols { flex: none; height: 30px; padding: 0 16px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,.4); }
.tvg-cols span:first-child { text-align: right; }
.tvg-rows { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: 0 2px 30px 0; }
.tvg-row { height: 68px; padding: 0 16px 0 10px; border-radius: 12px; margin-bottom: 4px; box-shadow: inset 0 0 0 2px transparent; }
.tvg-num { font-size: 22px; font-weight: 300; text-align: right; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.tvg-row .tv-logo-art { width: 96px; height: 34px; aspect-ratio: auto; }
.tvg-ch { min-width: 0; }
.tvg-name { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: rgba(255,255,255,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvg-now { margin-top: 3px; font-size: 16px; font-weight: 700; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvg-bar { margin-top: 7px; max-width: none; height: 3px; }
.tvg-next { min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.tvg-next span { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.45); font-variant-numeric: tabular-nums; }
.tvg-next b { font-weight: 600; color: rgba(255,255,255,.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvg-row.playing .tvg-num { color: var(--red); font-weight: 700; }
.tvg-row.sel { background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 2px #fff; }
@media (hover: hover) and (pointer: fine) { .tvg-row:hover:not(.sel), .tvg-group:hover:not(.selected) { background: rgba(255,255,255,.06); } }

/* ── Player (visual ptkhub Apple TV monocromático + motor HLS/VOD + Gaveta) ── */
.player-root {
  position: absolute; inset: 0; background: #000; overflow: hidden;
  display: flex; flex-direction: column; user-select: none;
}
.player-root.hide-cursor, .player-root.hide-cursor * { cursor: none !important; }
.p-viewport {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #000; z-index: 1;
}
.p-viewport video { width: 100%; height: 100%; object-fit: contain; background: #000; outline: none; }

.p-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(20px + var(--safe-top)) var(--pad) 32px;
  background: linear-gradient(180deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.45) 55%, rgba(0,0,0,0) 100%);
  transition: opacity .3s ease, transform .3s ease;
}
.p-header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.p-back {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 18px;
  border-radius: 999px; border: 0;
  background: rgba(28,28,33,.95);
  color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; flex: none;
  transition: background .15s, transform .12s, color .12s;
}
.p-back .ic { width: 17px; height: 17px; }
.p-back.focus { background: #fff; color: #000; transform: scale(1.05); }

.p-badge-live {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--text); background: rgba(28,28,33,.95); padding: 6px 12px;
  border-radius: 999px;
}
.p-badge-dot {
  width: 8px; height: 8px; background: var(--red); border-radius: 50%;
  animation: p-pulse 1.5s infinite;
}
@keyframes p-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: .55; }
}

.p-title {
  font-size: 17px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.p-badge-quality {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  font-size: 12px; font-weight: 800; letter-spacing: .6px; padding: 3px 9px;
  border-radius: 5px; background: rgba(255,255,255,.16); color: var(--text);
  text-transform: uppercase;
}

.p-header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.p-btn-icon {
  background: rgba(28,28,33,.95); border: 0; color: var(--text);
  width: 40px; height: 40px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s, transform .12s, color .12s;
}
.p-btn-icon:active { transform: scale(.94); }
.p-btn-icon.focus { background: #fff; color: #000; transform: scale(1.08); }
.p-btn-icon .ic { width: 19px; height: 19px; }

.p-controls-bar {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 20;
  padding: 36px var(--pad) calc(32px + var(--safe-bottom));
  background: linear-gradient(0deg, rgba(0,0,0,.95) 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,0) 100%);
  display: flex; flex-direction: column; gap: 12px;
  transition: opacity .3s ease, transform .3s ease;
}
.p-scrub-row { display: flex; align-items: center; gap: 12px; width: 100%; }
.p-scrub {
  position: relative; flex: 1; height: 24px; cursor: pointer;
  touch-action: none; user-select: none; display: flex; align-items: center;
}
.p-scrub-rail, .p-scrub-buf, .p-scrub-done {
  position: absolute; left: 0; height: 5px; border-radius: 999px; transition: height .12s;
}
.p-scrub:hover .p-scrub-rail, .p-scrub:hover .p-scrub-buf, .p-scrub:hover .p-scrub-done { height: 7px; }
.p-scrub-rail { right: 0; background: rgba(255,255,255,.22); }
.p-scrub-buf { width: 0%; background: rgba(255,255,255,.38); }
.p-scrub-done { width: 0%; background: #fff; }
.p-scrub-knob {
  position: absolute; left: 0%; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; transform: translateX(-7px) scale(0); transition: transform .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.6); pointer-events: none;
}
.p-scrub:hover .p-scrub-knob, .p-scrub.dragging .p-scrub-knob { transform: translateX(-7px) scale(1); }
.p-scrub-tip {
  position: absolute; bottom: 26px; transform: translateX(-50%);
  padding: 4px 9px; border-radius: 6px; background: var(--surface);
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--text); white-space: nowrap; pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.5);
}

.p-controls-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.p-controls-left, .p-controls-right { display: flex; align-items: center; gap: 10px; }
.p-ctrl-btn {
  background: rgba(28,28,33,.95); border: 0; color: var(--text);
  height: 44px; padding: 0 16px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .15s, transform .12s, color .12s;
}
.p-ctrl-btn:active { transform: scale(.94); }
.p-ctrl-btn.focus { background: #fff; color: #000; transform: scale(1.06); }
.p-ctrl-btn .ic { width: 20px; height: 20px; }
.p-ctrl-btn.round { width: 44px; padding: 0; border-radius: 50%; }

.p-vol-wrap {
  display: flex; align-items: center; gap: 8px;
  background: rgba(28,28,33,.95); border-radius: 999px; padding-right: 14px;
}
.p-vol-wrap .p-ctrl-btn { background: transparent; }
.p-vol-slider {
  width: 76px; accent-color: #fff; cursor: pointer; height: 4px;
}
.p-time {
  font-size: 13px; font-weight: 600; color: var(--text);
  font-variant-numeric: tabular-nums; margin-left: 6px; white-space: nowrap;
}
.p-time span { color: var(--dim); }

/* Gaveta Lateral de Troca Rápida (Canais Ao Vivo / Salas Chaturbate / Episódios) */
.p-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: 340px; z-index: 30;
  background: #141418; border-left: 1px solid rgba(255,255,255,.1);
  box-shadow: -16px 0 48px rgba(0,0,0,.85);
  display: none; flex-direction: column;
}
.p-drawer.open { display: flex; }
.p-drawer-head {
  padding: calc(20px + var(--safe-top)) 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: space-between;
}
.p-drawer-title { font-size: 15px; font-weight: 800; letter-spacing: .5px; color: #fff; }
.p-drawer-list {
  flex: 1; overflow-y: auto; padding: 10px 12px calc(24px + var(--safe-bottom));
  scrollbar-width: none;
}
.p-drawer-list::-webkit-scrollbar { display: none; }
.p-drawer-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-radius: 10px; margin-bottom: 4px;
  font-size: 14px; font-weight: 600; color: rgba(245,245,247,.72);
  cursor: pointer;
}
.p-drawer-item.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 700; }
.p-drawer-item.focus { background: #fff; color: #000; }
.p-drawer-item-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.p-ui-hidden { opacity: 0 !important; pointer-events: none !important; }
.p-header.p-ui-hidden { transform: translateY(-10px); }
.p-controls-bar.p-ui-hidden { transform: translateY(10px); }

.p-status-overlay {
  position: absolute; inset: 0; background: rgba(10,10,12,.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; z-index: 25; padding: 24px; text-align: center;
}
.p-spinner {
  width: 38px; height: 38px; border: 3px solid rgba(255,255,255,.85);
  border-right-color: transparent; border-radius: 50%; animation: spin .9s linear infinite;
  margin-bottom: 6px;
}
.p-status-title { font-size: 20px; font-weight: 600; color: var(--text); }
.p-status-desc { font-size: 15px; color: var(--dim); max-width: 380px; line-height: 1.4; }
.p-btn-retry {
  background: rgba(255,255,255,.18); border: 0; color: #fff; padding: 12px 28px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; margin-top: 10px;
  display: inline-flex; align-items: center; gap: 9px;
  transition: background .15s, transform .12s, color .12s;
}
.p-btn-retry.focus { background: #fff; color: #000; transform: scale(1.06); }
.p-btn-retry .ic { width: 19px; height: 19px; }

.p-toast {
  position: absolute; top: calc(74px + var(--safe-top)); left: 50%;
  transform: translateX(-50%); background: var(--surface2);
  color: var(--text); padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  z-index: 40; opacity: 0; pointer-events: none;
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
  transition: opacity .25s ease, transform .25s ease; white-space: nowrap;
}
.p-toast.show { opacity: 1; transform: translateX(-50%) translateY(4px); }

/* ── Responsivo: Tablets / Janelas menores (fora do tv-mode) ──────────── */
@media (max-width: 1024px) {
  body:not(.tv-mode) { --pad: 28px; }
  body:not(.tv-mode) .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
  body:not(.tv-mode) .grid.people-grid, body:not(.tv-mode) .grid.poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body:not(.tv-mode) .grid .card.tv.poster { width: auto; }
  body:not(.tv-mode) .live { inset: var(--top) 20px 0 20px; gap: 18px; }
  body:not(.tv-mode) .live .cats { width: 220px; }
  body:not(.tv-mode) .live .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body:not(.tv-mode) .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

/* ── Responsivo: iPhone / Celular (fora do tv-mode) ───────────────────── */
@media (max-width: 768px) {
  body:not(.tv-mode) {
    --pad: 16px;
    --top: calc(68px + var(--safe-top));
  }
  body:not(.tv-mode) .launcher { justify-content: flex-start; padding-top: calc(20px + var(--safe-top)); }
  body:not(.tv-mode) .launcher-top { flex: none; min-height: 220px; padding-bottom: 10px; }
  body:not(.tv-mode) .launcher-title { font-size: 26px; line-height: 30px; }
  body:not(.tv-mode) .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body:not(.tv-mode) .app-tile { height: 124px; padding: 14px; border-radius: 15px; }
  body:not(.tv-mode) #tabs {
    top: calc(10px + var(--safe-top));
    padding: 4px;
    max-width: calc(100vw - 20px);
  }
  body:not(.tv-mode) .tab { padding: 7px 14px; font-size: 14px; }
  body:not(.tv-mode) .back-btn { top: calc(12px + var(--safe-top)); padding: 8px 14px; font-size: 14px; }

  body:not(.tv-mode) .hero-bg { height: 350px; }
  body:not(.tv-mode) .hero-bg::before { background: linear-gradient(180deg, rgba(10,10,12,.35) 0%, rgba(10,10,12,.88) 100%); }
  body:not(.tv-mode) .hero-info { height: auto; min-height: 240px; width: 100%; padding: 48px var(--pad) 20px; }
  body:not(.tv-mode) .hero-title { font-size: 26px; line-height: 30px; }
  body[data-prime]:not(.tv-mode) { --hero-h: 64vh; }
  body[data-prime]:not(.tv-mode) .card.person { width: 124px; }
  body[data-prime]:not(.tv-mode) .grid .card.person { width: auto; }
  body[data-prime]:not(.tv-mode) .card.person .art { width: 100%; height: auto; }
  body[data-prime]:not(.tv-mode) .home .hero-info { height: calc(var(--hero-h) - var(--top)); min-height: 0; width: 100%; padding: 0 var(--pad) 20px; }
  body[data-prime]:not(.tv-mode) .home .hero-bg::before { background: linear-gradient(180deg, rgba(10,10,12,.2) 0%, rgba(10,10,12,.88) 100%); }
  body:not(.tv-mode) .plot { font-size: 14px; line-height: 19px; -webkit-line-clamp: 2; }
  body:not(.tv-mode) .pill { padding: 10px 20px; font-size: 15px; }

  body:not(.tv-mode) .shelf { margin-bottom: 18px; }
  body:not(.tv-mode) .shelf-title { font-size: 17px; }
  body:not(.tv-mode) .row-inner { gap: 14px; padding: 10px var(--pad); }
  body:not(.tv-mode) .card.poster { width: 124px; }
  body:not(.tv-mode) .card.tv.poster { width: 138px; }
  body:not(.tv-mode) .card.wide { width: 205px; }
  body:not(.tv-mode) .card.tv.wide { width: 220px; }
  body:not(.tv-mode) .grid .card.tv.wide { width: auto; }
  body:not(.tv-mode) .rank { font-size: 36px; line-height: 42px; }

  body:not(.tv-mode) .grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 14px;
    padding: 8px var(--pad) calc(40px + var(--safe-bottom));
  }
  body:not(.tv-mode) .grid.people-grid, body:not(.tv-mode) .grid.poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 12px;
  }
  body:not(.tv-mode) .card.person .art { width: 92px; height: 92px; }

  body:not(.tv-mode) .chips-bar { flex-direction: column; align-items: stretch; gap: 6px; padding: 6px var(--pad) 10px; }
  body:not(.tv-mode) .chips { padding: 6px var(--pad) 12px; gap: 8px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  body:not(.tv-mode) .chips::-webkit-scrollbar { display: none; }
  body:not(.tv-mode) .chip { flex: none; padding: 8px 14px; font-size: 14px; }

  /* Ao Vivo no celular: categorias viram barra horizontal no topo */
  body:not(.tv-mode) .live { inset: var(--top) 0 0 0; flex-direction: column; gap: 6px; }
  body:not(.tv-mode) .live .cats { width: 100%; overflow-x: auto; overflow-y: hidden; }
  body:not(.tv-mode) .live .cats-inner { display: flex; gap: 8px; padding: 4px var(--pad) 8px; width: max-content; }
  body:not(.tv-mode) .cats-label { display: none; }
  body:not(.tv-mode) .cat { flex: none; margin-bottom: 0; padding: 8px 14px; font-size: 14px; border-radius: 999px; background: rgba(255,255,255,.08); }
  body:not(.tv-mode) .cat.selected { background: rgba(255,255,255,.22); }
  body:not(.tv-mode) .ch-head { flex-wrap: wrap; gap: 6px 12px; padding: 2px var(--pad) 8px; }
  body:not(.tv-mode) .search-input.ch-search { width: 100%; margin-left: 0; }
  body:not(.tv-mode) .live-chips { padding: 0 var(--pad) 8px; }
  body:not(.tv-mode) .tv-open { order: 3; }
  /* TV ao vivo no celular deitado: barra compacta */
  body:not(.tv-mode) .tv-banner { grid-template-columns: auto minmax(0, 1fr); row-gap: 14px; column-gap: 16px; padding: 80px var(--pad) calc(20px + var(--safe-bottom)); }
  body:not(.tv-mode) .tvb-num { min-width: 0; font-size: 40px; }
  body:not(.tv-mode) .tvb-logo { width: 84px; padding-left: 14px; }
  body:not(.tv-mode) .tvb-id { gap: 14px; }
  body:not(.tv-mode) .tvb-title { font-size: 20px; line-height: 25px; }
  body:not(.tv-mode) .tvb-side { grid-column: 1 / -1; justify-content: flex-end; }
  body:not(.tv-mode) .tvb-btn { height: 40px; }
  body:not(.tv-mode) .tvb-zap { width: 40px; }
  body:not(.tv-mode) .tv-guide { padding-left: 0; background: rgba(6,6,8,.98); }
  body:not(.tv-mode) .tvg-head, body:not(.tv-mode) .tvg-body { width: 100%; max-width: none; padding-left: var(--pad); padding-right: var(--pad); }
  body:not(.tv-mode) .tvg-body { flex-direction: column; gap: 10px; }
  body:not(.tv-mode) .tvg-groups { width: 100%; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 0 0 4px; }
  body:not(.tv-mode) .tvg-group { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.08); }
  body:not(.tv-mode) .tvg-group small { display: none; }
  body:not(.tv-mode) .tvg-cols { display: none; }
  body:not(.tv-mode) .tvg-cols, body:not(.tv-mode) .tvg-row { grid-template-columns: 34px 64px minmax(0, 1fr); column-gap: 12px; }
  body:not(.tv-mode) .tvg-row { height: 60px; padding: 0 8px 0 4px; }
  body:not(.tv-mode) .tvg-row .tv-logo-art { width: 64px; height: 34px; }
  body:not(.tv-mode) .tvg-next { display: none; }
  body:not(.tv-mode) .tvg-num { font-size: 17px; }
  /* Celular em pé: vídeo 16:9 no topo, o que está passando logo abaixo e a lista de canais embaixo */
  .tv-root.phone { --tv-top: calc(60px + var(--safe-top)); --tv-video: 56.25vw; --tv-info: 116px; }
  .tv-root.phone::before { opacity: 0; }
  .tv-root.phone .p-viewport, .tv-root.phone .tv-veil { inset: var(--tv-top) 0 auto 0; height: var(--tv-video); }
  .tv-root.phone .tv-back { top: calc(10px + var(--safe-top)); opacity: 1; pointer-events: auto; }
  .tv-root.phone .tv-clock { top: calc(16px + var(--safe-top)); font-size: 18px; }
  .tv-root.phone .tv-banner {
    top: calc(var(--tv-top) + var(--tv-video)); bottom: auto; height: var(--tv-info); opacity: 1; transform: none; pointer-events: auto;
    grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 14px; padding: 14px var(--pad) 0; background: var(--bg);
  }
  .tv-root.phone .tvb-id { flex-direction: column; align-items: center; gap: 6px; }
  .tv-root.phone .tvb-num { font-size: 26px; text-align: center; }
  .tv-root.phone .tvb-logo { width: 60px; padding-left: 0; border-left: 0; }
  .tv-root.phone .tvb-title { font-size: 18px; line-height: 23px; margin-top: 3px; }
  .tv-root.phone .tvb-row { margin-top: 8px; }
  .tv-root.phone .tvb-time { min-width: 0; font-size: 13px; }
  .tv-root.phone .tvb-next { margin-top: 6px; font-size: 13px; }
  .tv-root.phone .tvb-side { display: none; }
  .tv-root.phone .tv-guide { inset: calc(var(--tv-top) + var(--tv-video) + var(--tv-info)) 0 0 0; padding: 0; background: var(--bg); border-top: 1px solid rgba(255,255,255,.08); }
  .tv-root.phone .tvg-head { display: none; }
  .tv-root.phone .tvg-body { padding-top: 12px; }
  .tv-root.phone .tvg-row.sel { box-shadow: none; }
  .tv-root.phone .tvg-row.playing { background: rgba(255,255,255,.1); }
  body:not(.tv-mode) .art.contain.live-tile img.live-logo { padding: 18% 24% 9%; } /* card pequeno: logo abaixo do nome */
  body:not(.tv-mode) .live .grid { padding: 6px var(--pad) calc(40px + var(--safe-bottom)); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

  /* Detalhes no celular */
  body:not(.tv-mode) .detail .shade1 { background: linear-gradient(180deg, rgba(10,10,12,.55) 0%, rgba(10,10,12,.95) 65%, var(--bg) 100%); }
  body:not(.tv-mode) .detail .body { padding-top: calc(64px + var(--safe-top)); }
  body:not(.tv-mode) .detail .title { font-size: 26px; line-height: 30px; }
  body:not(.tv-mode) .detail .plot { font-size: 14px; line-height: 20px; -webkit-line-clamp: 4; }
  body:not(.tv-mode) .detail.has-eps .body { display: block; height: auto; padding-right: 0; }
  body:not(.tv-mode) .detail.has-eps .info { padding-right: var(--pad); }
  body:not(.tv-mode) .ep-panel { margin: 22px var(--pad) 0; }
  body:not(.tv-mode) .ep-list { overflow: visible; }

  /* Busca e listas filtradas no celular */
  body:not(.tv-mode) .list-screen { top: calc(58px + var(--safe-top)); }
  body:not(.tv-mode) .list-head { padding: 6px var(--pad) 12px; gap: 12px; flex-wrap: wrap; }
  body:not(.tv-mode) .list-face .art { width: 64px; height: 64px; }
  body:not(.tv-mode) .list-title { font-size: 24px; }
  body:not(.tv-mode) .list-logo { height: 34px; max-width: 220px; }
  body:not(.tv-mode) .search-bar { padding: 6px var(--pad) 12px; flex-direction: column; align-items: stretch; gap: 8px; }
  body:not(.tv-mode) .search-input { width: 100%; font-size: 16px; padding: 12px 18px; }

  /* Ajustes e Player no celular */
  body:not(.tv-mode) .setting { padding: 0 16px; font-size: 14px; }
  body:not(.tv-mode) .setting span:last-child { font-size: 13px; max-width: 55%; }
  body:not(.tv-mode) .p-header { padding: calc(14px + var(--safe-top)) var(--pad) 16px; }
  body:not(.tv-mode) .p-title { font-size: 14px; }
  body:not(.tv-mode) .p-controls-bar { padding: 14px var(--pad) calc(16px + var(--safe-bottom)); }
  body:not(.tv-mode) .p-vol-slider { display: none; }
  body:not(.tv-mode) .p-vol-wrap { padding-right: 0; }
  body:not(.tv-mode) .p-ctrl-btn.round { width: 40px; height: 40px; }
  body:not(.tv-mode) .p-ctrl-btn { height: 40px; padding: 0 12px; font-size: 12px; }
  body:not(.tv-mode) .p-drawer { width: 280px; }
}

/* ── Logos com o mesmo peso visual (medidas de design-lab/medir-logos.js) ──
   Cada logo ganha a mesma área: altura = k / √proporção, limitada pela caixa (mh, mw). */
.art.fitted { container-type: size; --k: .44; --mh: .5; --mw: .62; }
.lgo {
  position: absolute; left: 50%; top: var(--lgo-y, 50%); z-index: 1; transform: translate(-50%, -50%);
  aspect-ratio: var(--ar);
  height: min(calc(var(--mh) * 100cqh), calc(var(--k) * var(--kp, 1) * var(--isq) * 100cqh), calc(var(--mw) * 100cqw / var(--ar)));
}
.art.fitted .lgo > img { position: absolute; inset: auto; max-width: none; object-fit: fill; filter: none; }
/* Fundo próprio (quadro branco, preto ou colorido): cantos e uma borda fina, um pouco menor */
.lgo.plate { --kp: 1; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
/* Desenho escuro: base clara em volta para não sumir no fundo escuro */
.lgo.ink { --kp: .8; border-radius: 3px; background: #ececf0; box-shadow: 0 0 0 7cqh #ececf0; }
.tv-logo-art.fitted { --k: .78; --mh: .92; --mw: .96; }
.tvb-logo .tv-logo-art.fitted { --k: .62; --mh: .8; --mw: .95; }
.tv-logo-art .lgo.ink { box-shadow: 0 0 0 4px #ececf0; }

/* ── Canais 24 horas: pôster da série no lugar do logo ── */
.h24-art img { object-fit: cover; }
.h24-tag {
  position: absolute; top: 8px; right: 8px; z-index: 2; padding: 2px 7px; border-radius: 5px;
  background: rgba(8,8,10,.86); font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #fff;
}
.h24-name {
  margin-top: 9px; padding-left: 2px; font-size: 14px; font-weight: 600; line-height: 18px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.h24-card .live-until { margin-top: 2px; }
.live .grid.h24-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 18px; }
.grid-label { padding: 18px 2px 4px; font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dim); }
body.tv-mode .h24-tag, body.tv-mode .h24-card .live-until { font-size: 13px; }
body.tv-mode .h24-name { font-size: 15px; line-height: 19px; }
/* Na TV (guia e barra), pôster pequeno em pé no lugar do logo */
.tv-poster-art { aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; }
.tv-poster-art img { object-fit: cover; filter: none !important; }
.tvg-row .tv-poster-art { width: 38px; height: 57px; margin: 0 auto; }
.tvb-logo .tv-poster-art { width: 64px; height: 96px; margin: 0 auto; }
@media (max-width: 1024px) {
  body:not(.tv-mode) .live .grid.h24-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  body:not(.tv-mode) .live .grid.h24-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
  body:not(.tv-mode) .live-tile.fitted { --lgo-y: 56%; --mh: .44; }
  body:not(.tv-mode) .tvg-row .tv-poster-art { width: 32px; height: 48px; }
  .tv-root.phone .tvb-logo .tv-poster-art { width: 44px; height: 66px; }
}

/* ── Guia: prévia do canal escolhido (logo grande, agora, descrição e a seguir) ── */
.tvg-head { margin-bottom: 10px; }
.tvg-preview {
  flex: none; display: grid; grid-template-columns: 176px minmax(0, 1fr); align-items: center; column-gap: 26px;
  width: 900px; max-width: calc(100% - var(--pad)); height: 140px; margin-bottom: 14px; padding: 0 22px 0 14px;
  border-radius: 14px; background: rgba(255,255,255,.06);
}
.tvp-logo { display: grid; place-items: center; height: 108px; border-right: 1px solid rgba(255,255,255,.12); padding-right: 26px; box-sizing: content-box; width: 150px; }
.tvp-logo .tv-logo-art { width: 150px; }
.tvp-logo .tv-logo-art.fitted { --k: .6; --mh: .82; --mw: .96; }
.tvp-logo .tv-poster-art { width: 70px; height: 105px; }
.tvp-info { min-width: 0; }
.tvp-name { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.6); white-space: nowrap; overflow: hidden; }
.tvp-name b { font-size: 15px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.tvp-name span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.tvp-name .tvb-q { margin-left: 0; flex: none; }
.tvp-on { flex: none; color: var(--red); }
.tvp-title { margin-top: 5px; font-size: 24px; font-weight: 800; line-height: 29px; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvp-title.muted { color: rgba(255,255,255,.45); font-weight: 600; }
.tvp-row { display: flex; align-items: center; gap: 14px; margin-top: 7px; }
.tvp-time { flex: none; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.tvp-row .tvb-bar { max-width: 300px; }
.tvp-desc { margin-top: 7px; font-size: 14px; line-height: 19px; color: rgba(255,255,255,.62); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tvp-desc:empty { display: none; }
.tvp-next { margin-top: 6px; font-size: 14px; color: rgba(255,255,255,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvp-next span { margin-right: 8px; font-variant-numeric: tabular-nums; }
.tvp-next b { font-weight: 600; color: rgba(255,255,255,.8); }
.tvp-next:empty { display: none; }
@media (max-width: 768px) {
  body:not(.tv-mode) .tvg-preview { width: auto; max-width: none; margin: 0 var(--pad) 10px; grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; height: 108px; padding: 0 14px 0 8px; }
  body:not(.tv-mode) .tvp-logo { width: 80px; height: 80px; padding-right: 14px; }
  body:not(.tv-mode) .tvp-logo .tv-logo-art { width: 80px; }
  body:not(.tv-mode) .tvp-title { font-size: 18px; line-height: 23px; }
  body:not(.tv-mode) .tvp-desc, body:not(.tv-mode) .tvp-row .tvb-bar { display: none; }
  .tv-root.phone .tvg-preview { display: none; }
}
