/* UP PLAY WEB 2.0 — TELA INICIAL (base de referência: 1536 × 691).
   Ajuste visual isolado: tela de login, API, listas, player e navegação mantidos.
   A marca, o fundo e --primary/--secondary continuam recebendo dados do painel.
   Coordenadas proporcionais evitam deslocamento entre TV, desktop e PWA. */
body:has(.screen.home) {
  /* Na captura de referência, o background 1536×864 ocupa 1536×691. */
  background-size: 100% 100%;
  background-position:center center;
}
.screen.home {
  --u: min(calc(100vw / 1536), calc(100dvh / 691));
  position:absolute;
  width:calc(1536 * var(--u));
  height:calc(691 * var(--u));
  left:50%; top:50%;
  transform:translate(-50%,-50%);
  overflow:visible;
  font-family: Arial, Roboto, Helvetica, sans-serif;
  font-size:calc(24 * var(--u));
  color:#fff;
}
.screen.home .header-logo {
  position:absolute;
  left:calc(39 * var(--u)); top:calc(40 * var(--u));
  width:calc(110 * var(--u)); height:calc(89 * var(--u));
  object-fit:contain;object-position:center;
}
.screen.home .home-clock {
  position:absolute;
  top:calc(48 * var(--u));left:calc(609 * var(--u));
  width:calc(318 * var(--u));height:calc(91 * var(--u));
  text-align:center;
}
.screen.home .home-clock strong {
  display:block;
  font-family:Arial,Roboto,Helvetica,sans-serif;
  font-size:calc(58 * var(--u));font-weight:400;
  letter-spacing:calc(.1 * var(--u));line-height:1.03;
}
.screen.home .home-clock p {
  margin:calc(8 * var(--u)) 0 0;
  font-size:calc(19 * var(--u));line-height:1.3;white-space:nowrap;
}
/* Os dois grupos de botões pequenos têm a moldura vermelha/cinza da referência. */
.screen.home .home-tools.panel,
.screen.home .home-system.panel {
  position:absolute;
  background:linear-gradient(120deg,rgba(11,11,16,.87),rgba(12,16,24,.89)) padding-box,
    linear-gradient(105deg,color-mix(in srgb,var(--primary) 73%,#25141b),#727781 90%,#8b8c92) border-box;
  border:calc(1.3 * var(--u)) solid transparent;
  border-radius:calc(35 * var(--u));
  box-shadow:none;
  display:flex;flex-direction:row;align-items:center;justify-content:space-evenly;
  backdrop-filter:blur(3px);
}
.screen.home .home-tools.panel {
  left:calc(1203 * var(--u));right:auto;top:calc(64 * var(--u));
  width:calc(292 * var(--u));height:calc(60 * var(--u));
  padding:calc(3 * var(--u)) calc(6 * var(--u));gap:calc(4 * var(--u));
}
.screen.home .home-tools .icon-button.neon,
.screen.home .home-system .icon-button.neon {
  display:flex;align-items:center;justify-content:center;
  min-width:0;
  background:linear-gradient(135deg,rgba(8,9,14,.8),rgba(21,24,31,.75)) padding-box,
    linear-gradient(115deg,color-mix(in srgb,var(--primary) 54%,#28212c),#6c7480) border-box;
  border:calc(1.1 * var(--u)) solid transparent;
  border-radius:calc(12 * var(--u));
  box-shadow:none;
  flex-shrink:0;
  padding:calc(3 * var(--u));
}
.screen.home .home-tools .icon-button.neon {width:calc(53 * var(--u));height:calc(53 * var(--u));}
.screen.home .home-tools .icon-button img {width:calc(43 * var(--u));height:calc(43 * var(--u));max-width:100%;max-height:100%;object-fit:contain;}
.screen.home .home-grid {
  position:absolute;
  left:calc(310 * var(--u));top:calc(169 * var(--u));
  width:calc(916 * var(--u));height:calc(399 * var(--u));
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-rows:calc(228 * var(--u)) calc(72 * var(--u)) calc(66 * var(--u));
  column-gap:calc(16 * var(--u));row-gap:calc(16 * var(--u));
}
.screen.home .home-grid .neon {
  display:flex;
  border:calc(1.3 * var(--u)) solid transparent !important;
  border-radius:calc(12 * var(--u));
  padding:calc(8 * var(--u)) calc(12 * var(--u));
  background:linear-gradient(120deg,rgba(28,16,23,.84),rgba(4,7,13,.94) 46%,rgba(33,39,49,.88)) padding-box,
    linear-gradient(110deg,color-mix(in srgb,var(--primary) 72%,#261f27),#747984 100%) border-box !important;
  box-shadow:none !important;
  color:#fff;
  font-family:Arial,Roboto,Helvetica,sans-serif;
  font-weight:400;
  text-align:center;
  min-height:0;
  transition:filter .16s ease;
}
.screen.home .home-grid .neon.active,
.screen.home .home-grid .neon:focus,
.screen.home .home-grid .neon.active:focus {box-shadow:none !important;border-color:transparent !important;}
.screen.home .home-grid .neon:hover {filter:brightness(1.12);}
.screen.home button:focus-visible {
  outline:calc(2.5 * var(--u)) solid #f3f3f5;
  outline-offset:calc(2 * var(--u));
}
.screen.home .home-grid .tile {
  flex-direction:column;align-items:center;justify-content:center;
  gap:calc(14 * var(--u));font-size:calc(26 * var(--u));line-height:1.25;
}
.screen.home .home-grid .tile img {
  width:calc(100 * var(--u));height:calc(100 * var(--u));
  max-width:none;max-height:none;filter:none;object-fit:contain;
}
.screen.home .home-tv {grid-column:1;grid-row:1;}
.screen.home .home-movie {grid-column:2;grid-row:1 / 3;}
.screen.home .home-series {grid-column:3;grid-row:1 / 3;}
.screen.home .home-agenda {grid-column:1;grid-row:2;}
.screen.home .home-agenda,
.screen.home .home-bottom .neon {
  flex-direction:row;align-items:center;justify-content:center;
  gap:calc(17 * var(--u));font-size:calc(25 * var(--u));line-height:1;
}
.screen.home .home-agenda img,
.screen.home .home-bottom .neon img {width:calc(39 * var(--u));height:calc(39 * var(--u));object-fit:contain;}
.screen.home .home-bottom {
  grid-column:1 / 4;grid-row:3;
  display:grid;grid-template-columns:1fr 1fr;gap:calc(16 * var(--u));min-width:0;
}
.screen.home .home-bottom .neon {width:100%;height:100%;}
.screen.home .home-account {
  position:absolute;left:calc(93 * var(--u));bottom:calc(45 * var(--u));
  max-width:calc(800 * var(--u));
  color:#f5f5f7;font-size:calc(18 * var(--u));font-weight:400;line-height:1.45;
}
.screen.home .home-account p {margin:0!important;}
.screen.home .home-account b {font-weight:600;}
.screen.home .home-system.panel {
  right:calc(99 * var(--u));bottom:calc(38 * var(--u));
  width:calc(142 * var(--u));height:calc(62 * var(--u));
  padding:calc(4 * var(--u)) calc(8 * var(--u));gap:calc(7 * var(--u));
}
/* O histórico continua acessível nas configurações, não ocupa lugar no rodapé. */
.screen.home .home-system #home-recent {display:none!important;}
.screen.home .home-system .icon-button.neon {width:calc(55 * var(--u));height:calc(55 * var(--u));}
.screen.home .home-system .icon-button img {width:calc(47 * var(--u));height:calc(47 * var(--u));object-fit:contain;}
.screen.home .version {
  position:absolute;right:calc(26 * var(--u));bottom:calc(16 * var(--u));
  color:#e0e1e5;font-size:calc(14 * var(--u));font-weight:400;
}
body:has(.screen.home)>#gtr-fullscreen {display:none!important;}
@media(prefers-reduced-motion:reduce){.screen.home .home-grid .neon{transition:none;}}
/* Sem borda extra criada pelas regras gerais do catálogo: apenas o filete fino da referência. */
.screen.home .home-grid .neon::before,
.screen.home .home-tools.panel::before,
.screen.home .home-tools .icon-button::before,
.screen.home .home-system.panel::before,
.screen.home .home-system .icon-button::before {content:none!important;display:none!important;}
/* Mantém o seletor do controle/teclado acessível sem acender a placa como outro tema. */
.screen.home .home-grid .neon.active {outline:0;}

/* 2.0.2 — imagem de referência: ícones reproduzidos diretamente dos pixels fornecidos.
   A home ocupa sempre a mesma proporção da referência; nunca ampliar os cards
   independentemente dos outros controles nem recortar logo/rodapé. */
.screen.home { z-index:1; overflow:visible; }
.screen.home .home-tools .icon-button img,
.screen.home .home-system .icon-button img,
.screen.home .home-grid button img {filter:none!important;object-fit:contain;flex-shrink:0;}
.screen.home .home-grid .tile img { width:calc(100 * var(--u));height:calc(100 * var(--u)); }
.screen.home .home-grid .tile {gap:calc(10 * var(--u));} 
.screen.home .home-tv.tile {gap:calc(5 * var(--u));}
.screen.home .home-tv.tile img {width:calc(100 * var(--u));height:calc(100 * var(--u));}
.screen.home .home-grid .home-agenda img {width:calc(39 * var(--u));height:calc(39 * var(--u));}
.screen.home .home-bottom .neon img {width:calc(40 * var(--u));height:calc(40 * var(--u));}
.screen.home .home-tools .icon-button img {width:calc(46 * var(--u));height:calc(46 * var(--u));}
.screen.home .home-system .icon-button img {width:calc(49 * var(--u));height:calc(49 * var(--u));}
.screen.home .home-tools .icon-button.neon {background:linear-gradient(125deg,rgba(5,7,11,.75),rgba(15,16,22,.78)) padding-box,linear-gradient(105deg,color-mix(in srgb,var(--primary) 62%,#282a32),#81878d) border-box;}
.screen.home .home-system .icon-button.neon {background:linear-gradient(125deg,rgba(5,7,11,.75),rgba(15,16,22,.78)) padding-box,linear-gradient(105deg,color-mix(in srgb,var(--primary) 62%,#282a32),#81878d) border-box;}
.screen.home .home-grid .neon {background:linear-gradient(116deg,rgba(24,12,18,.89),rgba(3,4,8,.94) 49%,rgba(28,33,43,.93)) padding-box,linear-gradient(112deg,color-mix(in srgb,var(--primary) 75%,#2a2228),#737987 100%) border-box!important;}
.screen.home .home-clock {z-index:1;}
.screen.home .header-logo {z-index:2;display:block;}
.screen.home .version {white-space:nowrap;}
/* Alinhamento final por coordenadas da referência fornecida. */
.screen.home .home-tools.panel {justify-content:space-between;padding-left:calc(10 * var(--u));padding-right:calc(10 * var(--u));}
.screen.home .home-system.panel {width:calc(151 * var(--u));right:calc(98 * var(--u));justify-content:flex-end;gap:calc(19 * var(--u));padding-right:calc(8 * var(--u));}
.screen.home .home-system .icon-button.neon {width:calc(49 * var(--u));height:calc(52 * var(--u));}
.screen.home .home-system .icon-button img {width:calc(47 * var(--u));height:calc(47 * var(--u));}
.screen.home .home-tv.tile img {transform:translateY(calc(-7 * var(--u)));}
.screen.home .home-movie.tile,.screen.home .home-series.tile {padding-bottom:calc(19 * var(--u));}
