/* Eryphos Experience 1.1 — uma camada visual única para TV, desktop e mobile. */
:root {
  --cr7-bg: #07080c;
  --cr7-surface: #111319;
  --cr7-surface-2: #181b23;
  --cr7-surface-3: #20242e;
  --cr7-text: #f8f8fb;
  --cr7-muted: #a6a9b2;
  --cr7-soft: #737782;
  --cr7-accent: #f11842;
  --cr7-accent-2: #a9072a;
  --cr7-blue: #68b7ff;
  --cr7-success: #44d899;
  --cr7-line: rgba(255,255,255,.11);
  --cr7-line-strong: rgba(255,255,255,.24);
  --cr7-shadow: 0 22px 58px rgba(0,0,0,.38);
  --cr7-radius-sm: 12px;
  --cr7-radius: 18px;
  --cr7-radius-lg: 26px;
  --cr7-safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

* { -webkit-tap-highlight-color: transparent; }
html { background: var(--cr7-bg); }
body { color: var(--cr7-text); background: var(--cr7-bg); }
button, input { font-family: inherit; }
button { -webkit-user-select: none; user-select: none; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { width: 1.35em; height: 1.35em; flex: 0 0 auto; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ui-icon .fill, .fill { fill: currentColor; stroke: none; }
.button-with-icon { display: inline-flex; align-items: center; justify-content: center; gap: .65em; }

.screen {
  color: var(--cr7-text);
  background:
    radial-gradient(circle at 84% 8%, rgba(241,24,66,.13), transparent 29%),
    radial-gradient(circle at 3% 96%, rgba(33,99,151,.12), transparent 28%),
    linear-gradient(145deg, #08090d 0%, #0d0f15 58%, #08090d 100%);
}
.screen::before {
  opacity: .4;
  background-image:
    linear-gradient(115deg, transparent 42%, rgba(255,255,255,.018) 42.2%, transparent 42.5%),
    radial-gradient(circle at center, rgba(255,255,255,.025) 0 1px, transparent 1.5px);
  background-size: 100% 100%, 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 86%);
}
.brand { letter-spacing: -4px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.28)); }
.brand b { color: var(--cr7-accent); }
.brand small { letter-spacing: 3.5px; }
.eyebrow { color: #ff6580; font-size: clamp(10px,.74vw,13px); letter-spacing: .28em; }

.primary, .secondary, .back-button, .player-button {
  min-height: 50px;
  border: 1px solid var(--cr7-line-strong);
  border-radius: var(--cr7-radius-sm);
  color: #fff;
  background: var(--cr7-surface-2);
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 8px 20px rgba(0,0,0,.18);
}
.primary {
  border-color: rgba(255,255,255,.7);
  background: linear-gradient(105deg, var(--cr7-accent), #c40e39);
}
.secondary { background: rgba(26,29,37,.82); }
.focusable { transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background-color .14s ease; }
.focusable:focus, .focusable.focused {
  z-index: 5;
  border-color: #fff;
  outline: none;
  transform: translateY(-2px) scale(1.015);
  filter: none;
  box-shadow: 0 0 0 3px var(--cr7-accent), 0 16px 35px rgba(0,0,0,.52), 0 0 28px rgba(241,24,66,.28);
}
.focusable:active { transform: scale(.985); }

/* Inicialização e ativação */
.splash { background: radial-gradient(circle at center, #21101a 0, #08090d 48%, #050609 100%); }
.splash .brand { font-size: clamp(64px,8vw,126px); }
.splash .spinner { width: 40px; height: 40px; border-width: 3px; border-top-color: var(--cr7-accent); }
.splash p { color: #d7d8de; font-size: clamp(16px,1.3vw,22px); }

.activation { min-height: 100dvh; padding: clamp(22px,3vw,52px); overflow: auto; }
.activation > .brand { margin-bottom: 2px; }
.activation-panel {
  width: min(1180px, 94vw);
  padding: clamp(26px,3vw,46px);
  border: 1px solid var(--cr7-line);
  border-radius: var(--cr7-radius-lg);
  background: linear-gradient(145deg, rgba(22,24,31,.96), rgba(11,12,17,.96));
  box-shadow: var(--cr7-shadow);
  backdrop-filter: blur(22px);
}
.activation-panel h1 { margin: 0; font-size: clamp(30px,3vw,48px); }
.activation-panel .lead { color: var(--cr7-muted); }
.client-login, .portal-activation {
  border-color: var(--cr7-line);
  background: rgba(255,255,255,.025);
  box-shadow: inset 0 1px rgba(255,255,255,.04);
}
.method-heading > span { background: linear-gradient(145deg, var(--cr7-accent), #800d2d); }
.method-heading small, .login-status { color: var(--cr7-soft); }
.client-login label { color: #c5c7ce; }
.client-login input {
  border-color: var(--cr7-line-strong);
  color: #fff;
  background: #0b0d12;
  caret-color: #fff;
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
}
.client-login input:focus,
.client-login input.focusable:focus { border-color: #fff; transform: none; box-shadow: 0 0 0 3px var(--cr7-accent); }
.activation-divider span { background: #14161d; }
.activation-code {
  border-color: rgba(255,255,255,.68);
  background: linear-gradient(105deg, var(--cr7-accent), #750b2c);
  box-shadow: 0 14px 38px rgba(138,5,39,.32);
}
.installation-identifiers {
  padding: 10px 18px;
  border: 1px solid var(--cr7-line);
  border-radius: 999px;
  color: var(--cr7-muted) !important;
  background: rgba(12,14,19,.72);
}

/* Atualização */
.update-banner {
  top: max(16px, env(safe-area-inset-top, 0px));
  width: min(900px, calc(100vw - 32px));
  border-color: rgba(255,255,255,.28);
  background: linear-gradient(105deg, rgba(178,10,46,.98), rgba(20,21,28,.98));
  box-shadow: 0 24px 60px rgba(0,0,0,.58);
}

/* Início */
.home { height: 100dvh; min-height: 100dvh; overflow-y: auto; scrollbar-color: #5c1729 #0b0c11; }
.home .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 82px;
  padding: 0 clamp(22px,2.4vw,46px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(8,9,13,.9);
  box-shadow: 0 12px 35px rgba(0,0,0,.18);
  backdrop-filter: blur(22px);
}
.home .topbar .brand { font-size: clamp(29px,2.3vw,39px); }
.home .top-actions { gap: 10px; }
.home .icon-button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-color: var(--cr7-line-strong);
  color: #dfe0e5;
  background: rgba(255,255,255,.045);
  font-size: 20px;
  box-shadow: none;
}
.home .device-box {
  min-width: clamp(205px,16vw,270px);
  padding: 9px 14px;
  border-color: var(--cr7-line);
  background: rgba(255,255,255,.035);
  box-shadow: none;
}
.home .device-box strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.device-meta span { color: var(--cr7-success); }

.home-stage { grid-template-columns: 84px minmax(0,1fr); min-height: calc(100dvh - 82px); }
.home-rail {
  top: 82px;
  height: calc(100dvh - 82px);
  gap: 9px;
  padding: 20px 10px 92px;
  border-color: rgba(255,255,255,.08);
  background: rgba(8,9,13,.88);
  backdrop-filter: blur(16px);
}
.rail-button {
  width: 62px;
  min-height: 62px;
  border-radius: 16px;
  color: #8c909a;
  background: transparent;
}
.rail-button .ui-icon { width: 25px; height: 25px; }
.rail-button small { font-size: 9px; letter-spacing: .04em; }
.rail-button:focus, .rail-button.focused {
  color: #fff;
  border-color: rgba(255,255,255,.72);
  background: linear-gradient(145deg, #b20b2f, #560d22);
}

.home .home-content { padding: clamp(18px,2vw,34px) clamp(20px,2.4vw,46px) 104px; }
.home-hero {
  min-height: clamp(245px,28vh,340px);
  padding: clamp(26px,3vw,48px);
  border-color: var(--cr7-line);
  border-radius: var(--cr7-radius-lg);
  background-image:
    radial-gradient(circle at 82% 38%, rgba(245,24,66,.46), transparent 31%),
    linear-gradient(112deg, #171921 0%, #171117 55%, #760c28 100%);
  box-shadow: var(--cr7-shadow);
}
.home-hero::before { background: linear-gradient(90deg, rgba(6,7,10,.98), rgba(8,9,13,.76) 58%, rgba(8,9,13,.05)); }
.hero-badges span {
  border-color: rgba(255,255,255,.18);
  color: #f5d9e0;
  background: rgba(7,8,11,.55);
}
.home-hero h1 { font-size: clamp(38px,4vw,68px); letter-spacing: -.045em; }
.home-hero-copy > p:not(.eyebrow) { color: #c4c6ce; }
.home-hero-brand { right: 6%; opacity: .14; }
.hero-actions .ui-icon { width: 19px; height: 19px; }

.home .home-heading { margin: 25px 0 14px; }
.home .home-heading h2, .shelf-heading h2 { letter-spacing: -.025em; }
.secure-pill { border-color: rgba(68,216,153,.28); color: #73e6b4; background: rgba(26,114,78,.12); }
.home .dashboard { grid-template-columns: repeat(3,minmax(160px,1fr)) minmax(250px,.82fr); min-height: 188px; gap: 14px; }
.home .feature-card {
  min-height: 188px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  background: linear-gradient(145deg, #bb1237, #681027 58%, #351522);
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 16px 36px rgba(0,0,0,.24);
}
.home .feature-card.movies { background: linear-gradient(145deg, #a91339, #59142b 58%, #24202c); }
.home .feature-card.series { background: linear-gradient(145deg, #82143c, #43172e 55%, #212231); }
.home .feature-card::before { border-color: rgba(255,255,255,.1); }
.home .feature-card .feature-icon {
  width: 62px;
  height: 62px;
  border-color: rgba(255,255,255,.18);
  background: rgba(5,6,9,.18);
  font-size: 30px;
}
.feature-icon .ui-icon { width: 34px; height: 34px; }
.home .feature-card strong { letter-spacing: -.025em; }
.home .feature-card small { color: rgba(255,255,255,.72); }
.home .side-panel { gap: 10px; }
.home .side-button {
  min-height: 0;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 42px 12px 16px;
  border: 1px solid var(--cr7-line);
  border-radius: 14px;
  color: #f1f1f4;
  background: linear-gradient(105deg, rgba(34,36,45,.96), rgba(18,20,26,.96));
  font-size: 14px;
}
.side-button .ui-icon { width: 25px; height: 25px; color: #ff6680; }
.side-button > span { display: grid; gap: 3px; }
.side-button small { color: var(--cr7-soft); font-size: 10px; font-weight: 600; }
.side-button::after { color: rgba(255,255,255,.4); }
.home-shelf { margin-top: 26px; }
.shelf-heading > span { color: var(--cr7-soft); }
.home-row { gap: 13px; min-height: 150px; }
.home-item {
  flex-basis: clamp(215px,17vw,300px);
  min-height: 138px;
  border-color: var(--cr7-line);
  background: linear-gradient(145deg,#411020,#111319);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
.home-empty { border-color: var(--cr7-line); background: rgba(255,255,255,.02); }
.home .statusbar {
  left: 118px;
  right: clamp(20px,2.4vw,46px);
  height: 58px;
  border-color: var(--cr7-line);
  background: rgba(13,15,20,.9);
  box-shadow: 0 12px 32px rgba(0,0,0,.26);
  backdrop-filter: blur(16px);
}

/* Catálogo */
.catalog {
  height: 100dvh;
  min-height: 100dvh;
  padding: clamp(20px,2vw,38px) clamp(20px,2.4vw,46px);
  overflow: auto;
  background:
    radial-gradient(circle at 90% 3%, rgba(185,12,48,.14), transparent 27%),
    linear-gradient(145deg,#07080c,#101219 60%,#08090d);
}
.catalog::after { color: rgba(255,255,255,.012); }
.catalog-header {
  grid-template-columns: 142px minmax(390px,1fr) minmax(290px,390px);
  gap: 22px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-color: var(--cr7-line);
}
.catalog-header h1 { margin: 0 20px 0 0; font-size: clamp(34px,3vw,52px); letter-spacing: -.04em; }
.back-button { min-height: 52px; padding: 10px 18px; background: rgba(255,255,255,.045); }
.catalog-tabs button { color: #8f929b; }
.catalog-tabs button.active { color: #fff; border-bottom-color: var(--cr7-accent); }
.catalog-total { color: var(--cr7-muted); }
.search-control {
  height: 52px;
  border-color: var(--cr7-line-strong);
  color: #bbbfc8;
  background: rgba(15,17,23,.92);
  box-shadow: inset 0 1px rgba(255,255,255,.04);
}
.search-control .ui-icon { width: 21px; height: 21px; }
.search-control:focus-within { border-color: #fff; box-shadow: 0 0 0 3px var(--cr7-accent); }
.catalog-layout { grid-template-columns: minmax(220px,17vw) minmax(0,1fr); gap: 18px; }
.category-list { scrollbar-color: #5f1529 transparent; }
.category-list::before { color: #777b85; background: #0c0e13; }
.category-button {
  min-height: 51px;
  border-color: var(--cr7-line);
  color: #d8d9de;
  background: rgba(27,29,37,.92);
  box-shadow: none;
}
.category-button.active { color: #fff; background: linear-gradient(105deg,#b80e34,#610d27); }
.category-button small { color: #c9cbd1; }
.content-grid { grid-template-columns: repeat(5,minmax(140px,1fr)); gap: clamp(12px,1vw,18px); }
.content-card {
  border-color: var(--cr7-line);
  border-radius: 15px;
  background: var(--cr7-surface);
  box-shadow: 0 12px 28px rgba(0,0,0,.24);
}
.content-card:focus, .content-card.focused { box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--cr7-accent), 0 20px 40px rgba(0,0,0,.58); }
.content-copy { border-top-color: rgba(255,255,255,.05); }
.content-copy small { color: #8f939d; }
.content-source { color: #ff7088; }
.live-preview {
  border-color: var(--cr7-line);
  background: rgba(17,19,25,.96);
  box-shadow: var(--cr7-shadow);
}
.live-preview-media { background: radial-gradient(circle,#282c36,#090a0e 72%); }
.live-preview > p:not(.eyebrow) { color: var(--cr7-muted); }
.catalog[data-kind="live"] .catalog-layout { grid-template-columns: minmax(205px,16vw) minmax(300px,27vw) minmax(350px,1fr); }
.catalog[data-kind="live"] .content-card.kind-live { border-color: var(--cr7-line); background: #14161c; }
.catalog[data-kind="live"] .content-card.kind-live:focus,
.catalog[data-kind="live"] .content-card.kind-live.focused { background: linear-gradient(100deg,#98102e,#32111f); }
.catalog-message { border-color: var(--cr7-line); background: linear-gradient(145deg,#171a22,#0e1016); }

/* Player */
.player-overlay { background: #000; }
.player-shade { background: linear-gradient(transparent 45%, rgba(0,0,0,.2) 60%, rgba(0,0,0,.96)); }
.player-info { left: clamp(24px,4vw,72px); bottom: clamp(125px,15vh,170px); max-width: min(720px,65vw); }
.player-info h2 { font-size: clamp(28px,3vw,48px); letter-spacing: -.035em; }
.player-info p:last-child { color: #c4c7d0; }
.player-actions {
  right: clamp(20px,3vw,50px);
  bottom: clamp(24px,4vh,48px);
  gap: 9px;
  padding: 10px;
  border-color: var(--cr7-line-strong);
  border-radius: 17px;
  background: rgba(10,11,15,.78);
  box-shadow: 0 16px 44px rgba(0,0,0,.5);
  backdrop-filter: blur(18px);
}
.player-button { min-width: 105px; min-height: 52px; padding: 10px 17px; background: rgba(31,33,41,.94); }
.player-button .ui-icon { width: 19px; height: 19px; }
.player-button:focus, .player-button.focused { background: linear-gradient(105deg,#c50e38,#7a0c29); }
.favorite-action { color: #ffd7df; background: rgba(93,19,43,.9); }

/* Diálogos, configurações e fontes */
.dialog-backdrop { padding: clamp(18px,4vw,58px); background: rgba(2,3,5,.84); backdrop-filter: blur(14px); }
.dialog-card {
  width: min(900px,92vw);
  max-height: 84dvh;
  padding: clamp(26px,3vw,46px);
  border: 1px solid var(--cr7-line-strong);
  border-radius: var(--cr7-radius-lg);
  background: linear-gradient(145deg,#1a1d25,#0e1015);
  box-shadow: 0 34px 90px rgba(0,0,0,.72);
}
.dialog-card h2 { font-size: clamp(28px,2.5vw,42px); letter-spacing: -.035em; }
.dialog-card p { color: #c3c6ce; }
.dialog-card > .primary { min-width: 190px; }
.dialog-list { display: grid; gap: 10px; margin: 8px 0 22px; }
.dialog-list-item {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 68px;
  padding: 11px 14px;
  border: 1px solid var(--cr7-line);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}
.dialog-list-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: #ff6c85; background: rgba(241,24,66,.12); }
.dialog-list-icon .ui-icon { width: 22px; height: 22px; }
.dialog-list-copy { min-width: 0; display: grid; gap: 3px; }
.dialog-list-copy strong { overflow: hidden; font-size: 16px; white-space: nowrap; text-overflow: ellipsis; }
.dialog-list-copy small { color: var(--cr7-soft); }
.dialog-badge { padding: 5px 9px; border-radius: 999px; color: #78eab7; background: rgba(68,216,153,.1); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.device-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 22px; }
.device-summary-item { min-width: 0; padding: 15px; border: 1px solid var(--cr7-line); border-radius: 14px; background: rgba(255,255,255,.028); }
.device-summary-item.wide { grid-column: 1 / -1; }
.device-summary-item small { display: block; margin-bottom: 6px; color: var(--cr7-soft); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.device-summary-item strong { display: block; overflow: hidden; color: #f1f2f5; font-size: 15px; white-space: nowrap; text-overflow: ellipsis; }
.device-summary-item code { color: #ff869a; font: 600 13px Consolas, monospace; }

/* Tablet e janelas menores */
@media (max-width: 1180px) {
  .home .dashboard { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .home .side-panel { grid-column: 1 / -1; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .home .side-button { min-height: 66px; }
  .content-grid { grid-template-columns: repeat(4,minmax(130px,1fr)); }
  .catalog[data-kind="live"] .catalog-layout { grid-template-columns: 215px minmax(270px,1fr) minmax(310px,1.1fr); }
}

@media (max-width: 900px) {
  .activation-methods { grid-template-columns: 1fr; }
  .activation-divider { height: 34px; }
  .activation-divider::before { top: 50%; right: 0; bottom: auto; left: 0; width: auto; height: 1px; }
  .activation-divider span { padding: 5px 12px; }
  .installation-identifiers { flex-wrap: wrap; gap: 8px 18px; border-radius: 18px; }
  .home .topbar { height: 74px; }
  .home-stage { grid-template-columns: 70px minmax(0,1fr); min-height: calc(100dvh - 74px); }
  .home-rail { top: 74px; height: calc(100dvh - 74px); padding-right: 5px; padding-left: 5px; }
  .rail-button { width: 55px; }
  .home .home-content { padding-right: 18px; padding-left: 18px; }
  .home-hero-copy { width: 83%; }
  .catalog-header { grid-template-columns: 125px minmax(0,1fr); }
  .catalog-tools { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(240px,420px); align-items: center; }
  .catalog-meta { justify-content: flex-start; }
  .catalog-layout, .catalog[data-kind="live"] .catalog-layout { grid-template-columns: 210px minmax(0,1fr); }
  .catalog[data-kind="live"] .live-preview { grid-column: 2; grid-row: 1; position: relative; }
  .catalog[data-kind="live"] .content-grid { grid-column: 2; grid-row: 2; max-height: none; }
  .category-list { grid-row: 1 / span 2; }
  .content-grid { grid-template-columns: repeat(3,minmax(125px,1fr)); }
}

/* Celulares */
@media (max-width: 600px) {
  body { overflow: auto; }
  .update-banner { grid-template-columns: minmax(0,1fr) auto; padding: 13px; }
  .update-banner div { grid-column: 1 / -1; }
  .update-banner button { min-width: 0; }
  .activation { display: block; padding: 24px 14px calc(24px + var(--cr7-safe-bottom)); }
  .activation > .brand { width: max-content; margin: 0 auto 20px; font-size: 38px; }
  .activation-panel { width: 100%; padding: 25px 17px; text-align: left; }
  .activation-panel .lead { margin-right: 0; margin-left: 0; }
  .client-login, .portal-activation { padding: 20px 15px; }
  .activation-code { max-width: 100%; padding: 13px 17px; font-size: 34px; letter-spacing: 8px; }
  .installation-identifiers { margin-top: 15px; font-size: 11px; }

  .home { padding-bottom: calc(75px + var(--cr7-safe-bottom)); }
  .home .topbar {
    position: relative;
    height: auto;
    min-height: 70px;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 12px 15px;
  }
  .home .topbar .brand { font-size: 28px; }
  .home .topbar .brand small { font-size: 9px; }
  .home .top-actions { justify-self: end; }
  .home .icon-button { width: 42px; height: 42px; }
  .home .device-box { grid-column: 1 / -1; width: 100%; min-width: 0; flex-direction: row; align-items: center; justify-content: space-between; }
  .home .device-meta { min-width: 135px; margin: 0 0 0 12px; gap: 12px; }
  .home-stage { display: block; min-height: 0; }
  .home-rail {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: max(8px, var(--cr7-safe-bottom));
    left: 10px;
    z-index: 30;
    width: auto;
    height: 62px;
    flex-direction: row;
    justify-content: space-around;
    gap: 2px;
    padding: 6px;
    border: 1px solid var(--cr7-line-strong);
    border-radius: 20px;
    background: rgba(13,15,20,.94);
    box-shadow: 0 18px 45px rgba(0,0,0,.55);
    backdrop-filter: blur(22px);
  }
  .rail-button { width: 58px; min-width: 0; min-height: 48px; height: 48px; border-radius: 14px; }
  .rail-button .ui-icon { width: 21px; height: 21px; }
  .rail-button small { font-size: 8px; }
  .rail-button:focus, .rail-button.focused { transform: scale(1.02); }
  .home .home-content { padding: 14px 14px 22px; }
  .home-hero { min-height: 390px; align-items: end; padding: 24px 20px; }
  .home-hero::before { background: linear-gradient(0deg,rgba(5,6,9,.99),rgba(8,8,12,.72) 72%,rgba(8,8,12,.2)); }
  .home-hero-copy { width: 100%; }
  .home-hero h1 { font-size: 36px; }
  .home-hero-copy > p:not(.eyebrow) { font-size: 14px; }
  .home-hero-brand { top: 20px; right: 8%; bottom: auto; font-size: 104px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions button { width: 100%; }
  .home .secure-pill { display: none; }
  .home .dashboard { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; overflow: visible; padding: 0; }
  .home .feature-card { min-width: 0; min-height: 162px; padding: 14px 10px; }
  .home .feature-card:first-child { grid-column: 1 / -1; min-height: 185px; }
  .home .feature-card .feature-icon { width: 52px; height: 52px; }
  .home .feature-card strong { font-size: 20px; text-align: center; }
  .home .feature-card small { font-size: 11px; text-align: center; }
  .home .side-panel { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .home .side-button { min-height: 64px; }
  .home-item { flex-basis: 76vw; }
  .home .statusbar { display: none; }

  .catalog { padding: 14px 12px calc(22px + var(--cr7-safe-bottom)); }
  .catalog-header { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 10px; margin-bottom: 14px; padding-bottom: 13px; }
  .back-button { min-height: 46px; padding: 8px 10px; }
  .catalog-heading h1 { display: block; margin: 0; font-size: 28px; }
  .catalog-heading .eyebrow { margin-bottom: 4px; font-size: 8px; }
  .catalog-tabs { display: flex; margin-top: 8px; gap: 2px; }
  .catalog-tabs button { min-height: 36px; padding: 6px 9px; font-size: 12px; }
  .catalog-tools { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .catalog-meta { justify-content: space-between; }
  .catalog-total { font-size: 12px; }
  .search-control { height: 48px; }
  .catalog-layout, .catalog[data-kind="live"] .catalog-layout { display: flex; flex-direction: column; gap: 11px; }
  .category-list {
    position: relative;
    top: auto;
    width: 100%;
    max-height: none;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 9px;
    scroll-snap-type: x proximity;
  }
  .category-list::before { display: none; }
  .category-button { flex: 0 0 auto; min-height: 44px; padding: 8px 12px; scroll-snap-align: start; }
  .category-button small { min-width: 30px; }
  .content-grid { width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 2px 2px 30px; }
  .content-card.kind-movie .content-poster, .content-card.kind-series .content-poster { aspect-ratio: 2/3; height: auto; }
  .content-copy { min-height: 66px; padding: 10px; }
  .content-copy strong { font-size: 13px; }
  .catalog[data-kind="live"] .live-preview { order: 1; width: 100%; position: relative; }
  .catalog[data-kind="live"] .category-list { order: 0; }
  .catalog[data-kind="live"] .content-grid {
    order: 2;
    max-height: min(68dvh, 720px);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #781a31 transparent;
  }
  .catalog[data-kind="live"] .content-card.kind-live { grid-template-columns: 78px minmax(0,1fr); }
  .live-preview-media { max-height: 230px; }
  .catalog-message { width: 100%; margin: 35px auto; padding: 25px 18px; }

  .player-info { right: 20px; bottom: 184px; left: 20px; max-width: none; }
  .player-info h2 { font-size: 30px; }
  .player-actions {
    right: 14px;
    bottom: calc(14px + var(--cr7-safe-bottom));
    left: 14px;
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    max-width: none;
    gap: 7px;
    padding: 8px;
  }
  .player-button { min-width: 0; min-height: 50px; padding: 8px 5px; font-size: 12px; }
  .player-button .ui-icon { width: 17px; height: 17px; }
  .dialog-card { width: 100%; max-height: 88dvh; padding: 24px 18px; }
  .dialog-card > .primary { width: 100%; }
  .device-summary { grid-template-columns: 1fr; }
  .device-summary-item.wide { grid-column: auto; }
  .dialog-list-item { grid-template-columns: 40px minmax(0,1fr); }
  .dialog-badge { grid-column: 2; justify-self: start; }
}

/* Telefones e tablets em paisagem / interfaces de TV compactas */
@media (orientation: landscape) and (max-height: 620px) {
  .home { padding-bottom: 0; }
  .home .topbar { position: sticky; min-height: 58px; height: 58px; grid-template-columns: 1fr auto 1fr; padding: 0 16px; }
  .home .topbar .device-box { grid-column: auto; width: auto; justify-self: end; padding: 6px 10px; }
  .home .topbar .device-meta { min-width: 120px; }
  .home .icon-button { width: 38px; height: 38px; }
  .home-stage { display: grid; grid-template-columns: 60px minmax(0,1fr); }
  .home-rail {
    position: sticky;
    top: 58px;
    right: auto;
    bottom: auto;
    left: auto;
    width: 60px;
    height: calc(100dvh - 58px);
    flex-direction: column;
    justify-content: flex-start;
    border-radius: 0;
    border-width: 0 1px 0 0;
    padding: 6px 5px;
  }
  .rail-button { width: 48px; min-height: 45px; height: 45px; }
  .rail-button small { display: none; }
  .home .home-content { padding: 10px 13px 20px; }
  .home-hero { min-height: 205px; padding: 18px 24px; }
  .home-hero h1 { font-size: 32px; }
  .home-hero-copy > p:not(.eyebrow) { margin: 7px 0 12px; font-size: 12px; }
  .hero-actions { display: flex; }
  .hero-actions button { width: auto; min-height: 40px; padding: 8px 13px; font-size: 12px; }
  .home .dashboard { grid-template-columns: repeat(3,minmax(0,1fr)) minmax(210px,.9fr); }
  .home .feature-card, .home .feature-card:first-child { grid-column: auto; min-height: 140px; }
  .home .side-panel { grid-column: auto; }
  .home .side-button { min-height: 0; padding-top: 8px; padding-bottom: 8px; }
  .home .statusbar { display: none; }
  .player-info { bottom: 96px; }
  .player-actions { right: 18px; bottom: 14px; left: auto; display: flex; flex-wrap: nowrap; max-width: calc(100vw - 36px); }
  .player-button { min-width: 88px; }
  .catalog { padding: 12px 16px; }
  .catalog-header { grid-template-columns: 100px minmax(300px,1fr) minmax(230px,310px); margin-bottom: 10px; padding-bottom: 10px; }
  .catalog-tools { grid-column: auto; display: grid; }
  .catalog-layout, .catalog[data-kind="live"] .catalog-layout { display: grid; grid-template-columns: 190px minmax(250px,1fr) minmax(290px,1fr); }
  .category-list {
    display: grid;
    max-height: calc(100vh - 115px);
    max-height: calc(100dvh - 115px);
    overflow-x: hidden;
    overflow-y: auto;
  }
  .category-list::before { display: block; }
  .catalog[data-kind="live"] .live-preview { order: initial; }
  .catalog[data-kind="live"] .content-grid {
    max-height: calc(100vh - 115px);
    max-height: calc(100dvh - 115px);
    overflow-y: auto;
  }
}

/* Fallback explicito para shells de TV cuja WebView ainda nao reconhece dvh.
   Mantem categorias e conteudos como paineis rolaveis dentro da viewport. */
@media (min-width: 601px) and (max-height: 900px) {
  html.tv-remote-mode .category-list,
  html.tv-remote-mode .content-grid,
  html.native-android-shell .category-list,
  html.native-android-shell .content-grid {
    max-height: calc(100vh - 115px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* TVs compactas e boxes 720p: preserva os cards principais e coloca os
   atalhos em uma segunda faixa legível, sem colunas estreitas ou texto cortado. */
@media (min-width: 601px) and (max-width: 1366px) {
  .home .dashboard { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .home .side-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .home .side-button { min-width: 0; min-height: 62px; }
  .home .side-button > span { min-width: 0; }
}

/* TV 1080p/4K: tamanho confortável visto à distância. */
@media (min-width: 1500px) and (min-height: 800px) {
  .home .topbar { height: 94px; }
  .home-stage { grid-template-columns: 94px minmax(0,1fr); min-height: calc(100dvh - 94px); }
  .home-rail { top: 94px; height: calc(100dvh - 94px); }
  .rail-button { width: 70px; min-height: 70px; }
  .rail-button .ui-icon { width: 29px; height: 29px; }
  .home .dashboard { min-height: 210px; }
  .home .feature-card { min-height: 210px; }
  .home .side-button { font-size: 15px; }
  .home .statusbar { left: 136px; }
  .content-copy strong { font-size: 16px; }
  .category-button { font-size: 15px; }
}

@media (min-width: 2500px) {
  :root { font-size: 1.25rem; }
  .home .topbar { height: 126px; }
  .home-stage { grid-template-columns: 126px minmax(0,1fr); }
  .home-rail { top: 126px; height: calc(100dvh - 126px); }
  .rail-button { width: 90px; min-height: 90px; }
  .home .dashboard { min-height: 300px; }
  .home .feature-card { min-height: 300px; }
  .content-grid { grid-template-columns: repeat(6,minmax(220px,1fr)); }
}

/* Android TV / TV Box 720p
   Mantem o cabecalho visivel e faz categorias e conteudos rolarem em paineis
   independentes. Isso evita que o D-pad empurre a pagina inteira para cima. */
html.tv-remote-mode .catalog {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  contain: layout paint;
}
html.tv-remote-mode .catalog-header { flex: 0 0 auto; }
html.tv-remote-mode .catalog-layout {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}
html.tv-remote-mode .category-list,
html.tv-remote-mode .content-grid {
  position: relative;
  top: auto;
  min-width: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
html.tv-remote-mode .category-list {
  align-content: start;
  grid-auto-rows: max-content;
}
html.tv-remote-mode .catalog[data-kind="live"] .content-grid {
  height: 100%;
  max-height: none;
}

/* O nome pode quebrar em duas linhas, mas o contador sempre permanece inteiro. */
.category-button {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  overflow: hidden;
}
.category-button > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.category-button small {
  flex: 0 0 auto;
  min-width: 54px;
  max-width: 70px;
  margin-left: auto;
  padding: 4px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 601px) and (max-width: 1000px) and (orientation: landscape) {
  html.tv-remote-mode .catalog:not([data-kind="live"]) .catalog-layout {
    grid-template-columns: 240px minmax(0,1fr);
  }
  html.tv-remote-mode .catalog[data-kind="live"] .catalog-layout {
    grid-template-columns: 220px minmax(250px,.9fr) minmax(300px,1.1fr);
  }
}

/* O Android TV 720p costuma expor um viewport logico de 960x540. Mantemos
   leitura a distancia sem ampliar a interface a ponto de cortar a lista. */
@media (orientation: landscape) and (max-height: 620px) {
  html.tv-remote-mode .catalog { padding: 9px 12px; }
  html.tv-remote-mode .catalog-header {
    grid-template-columns: 96px minmax(0,1fr) minmax(215px,250px);
    gap: 10px;
    margin: 0 0 8px;
    padding: 0 0 8px;
  }
  html.tv-remote-mode .catalog-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
  }
  html.tv-remote-mode .catalog-header h1 {
    flex: 0 1 auto;
    margin: 0;
    font-size: 27px;
  }
  html.tv-remote-mode .back-button {
    min-height: 40px;
    padding: 6px 9px;
    border-radius: 10px;
    font-size: 13px;
  }
  html.tv-remote-mode .catalog-tabs { flex: 0 0 auto; gap: 2px; }
  html.tv-remote-mode .catalog-tabs button {
    min-height: 34px;
    padding: 4px 7px;
    font-size: 12px;
  }
  html.tv-remote-mode .catalog-tools { gap: 4px; }
  html.tv-remote-mode .catalog-total { font-size: 11px; }
  html.tv-remote-mode .search-control { height: 39px; border-radius: 10px; }
  html.tv-remote-mode .search-control input { font-size: 13px; }
  html.tv-remote-mode .catalog-layout { gap: 9px; }
  html.tv-remote-mode .category-list {
    gap: 5px;
    padding: 2px 5px 10px 2px;
    scroll-padding-block: 7px;
  }
  html.tv-remote-mode .category-list::before {
    padding: 5px 8px 7px;
    font-size: 9px;
  }
  html.tv-remote-mode .category-button {
    min-height: 42px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 13px;
  }
  html.tv-remote-mode .category-button small {
    min-width: 40px;
    max-width: 58px;
    padding: 3px 5px;
    font-size: 11px;
  }
  html.tv-remote-mode .content-grid { gap: 8px; padding: 2px 5px 12px; }
  html.tv-remote-mode .content-copy { min-height: 54px; padding: 8px 9px; }
  html.tv-remote-mode .content-copy strong { font-size: 12px; }
  html.tv-remote-mode .content-copy small { margin-top: 4px; font-size: 9px; }
}

/* Foco de alto contraste para controle remoto.
   O item ativo permanece vermelho; o item atualmente selecionado pelo D-pad
   recebe moldura branca, halo rosa e marcador lateral sem mudar de tamanho. */
html.tv-remote-mode.remote-input-active [data-focusable]:focus,
html.tv-remote-mode.remote-input-active [data-focusable].focused,
html.native-android-shell [data-focusable]:focus,
html.native-android-shell [data-focusable].focused {
  position: relative;
  z-index: 12 !important;
  outline: 3px solid #fff !important;
  outline-offset: -3px !important;
  transform: none !important;
  border-color: #fff !important;
  filter: brightness(1.12) !important;
  box-shadow:
    inset 0 0 0 3px #fff,
    0 0 0 4px #ff174f,
    0 0 22px rgba(255,23,79,.78) !important;
}
html.tv-remote-mode.remote-input-active .category-button,
html.native-android-shell .category-button {
  position: relative;
}
html.tv-remote-mode.remote-input-active .category-button:focus,
html.tv-remote-mode.remote-input-active .category-button.focused,
html.native-android-shell .category-button:focus,
html.native-android-shell .category-button.focused {
  padding-left: 28px;
  color: #fff !important;
  background: linear-gradient(100deg,#d81242,#6d0c2b) !important;
}
html.tv-remote-mode.remote-input-active .category-button:focus::after,
html.tv-remote-mode.remote-input-active .category-button.focused::after,
html.native-android-shell .category-button:focus::after,
html.native-android-shell .category-button.focused::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 9px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #fff;
  transform: translateY(-50%);
  filter: drop-shadow(0 0 5px #ff174f);
  pointer-events: none;
}
html.tv-remote-mode.remote-input-active .content-card:focus,
html.tv-remote-mode.remote-input-active .content-card.focused,
html.native-android-shell .content-card:focus,
html.native-android-shell .content-card.focused {
  background-color: #27111a !important;
  box-shadow:
    inset 0 0 0 4px #fff,
    inset 0 0 0 8px #ff174f,
    0 0 0 3px #ff174f,
    0 0 24px rgba(255,23,79,.72) !important;
}
html.tv-remote-mode.remote-input-active .catalog-tabs button:focus,
html.tv-remote-mode.remote-input-active .catalog-tabs button.focused,
html.native-android-shell .catalog-tabs button:focus,
html.native-android-shell .catalog-tabs button.focused {
  color: #fff !important;
  background: #a90f31 !important;
  border-radius: 8px;
}

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


/* TV/Android VOD card safeguard — evita colapso de poster em WebViews compactas */
html.tv-remote-mode .content-grid,
html.native-android-shell .content-grid{align-content:start;grid-auto-rows:max-content}
html.tv-remote-mode .content-card.kind-movie,
html.tv-remote-mode .content-card.kind-series,
html.native-android-shell .content-card.kind-movie,
html.native-android-shell .content-card.kind-series{display:flex!important;flex-direction:column!important;height:auto!important;min-height:290px!important;align-self:start!important}
html.tv-remote-mode .content-card.kind-movie .content-poster,
html.tv-remote-mode .content-card.kind-series .content-poster,
html.native-android-shell .content-card.kind-movie .content-poster,
html.native-android-shell .content-card.kind-series .content-poster{display:grid!important;flex:0 0 auto!important;width:100%!important;min-height:180px!important;height:clamp(180px,34vh,250px)!important;aspect-ratio:auto!important}
html.tv-remote-mode .content-card.kind-movie .content-poster img,
html.tv-remote-mode .content-card.kind-series .content-poster img,
html.native-android-shell .content-card.kind-movie .content-poster img,
html.native-android-shell .content-card.kind-series .content-poster img{display:block!important;width:100%!important;height:100%!important;min-height:0!important;object-fit:cover!important}
html.tv-remote-mode .content-card.kind-movie .content-copy,
html.tv-remote-mode .content-card.kind-series .content-copy,
html.native-android-shell .content-card.kind-movie .content-copy,
html.native-android-shell .content-card.kind-series .content-copy{display:block!important;flex:0 0 auto!important;min-height:70px!important;height:auto!important;padding:11px 12px 13px!important}
html.tv-remote-mode .content-card.kind-movie .content-copy strong,
html.tv-remote-mode .content-card.kind-series .content-copy strong,
html.native-android-shell .content-card.kind-movie .content-copy strong,
html.native-android-shell .content-card.kind-series .content-copy strong{display:-webkit-box!important;min-height:34px!important;overflow:hidden!important;white-space:normal!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important}
@media (orientation:landscape) and (max-height:620px){
  html.tv-remote-mode .content-card.kind-movie,
  html.tv-remote-mode .content-card.kind-series,
  html.native-android-shell .content-card.kind-movie,
  html.native-android-shell .content-card.kind-series{min-height:245px!important}
  html.tv-remote-mode .content-card.kind-movie .content-poster,
  html.tv-remote-mode .content-card.kind-series .content-poster,
  html.native-android-shell .content-card.kind-movie .content-poster,
  html.native-android-shell .content-card.kind-series .content-poster{height:clamp(150px,31vh,190px)!important;min-height:150px!important}
}


/* Eryphos UI correction 2026-08 — leitura consistente em TV Box, Android e web.
   Este bloco fica por último para neutralizar regras históricas sobrepostas. */
html.native-android-shell .catalog,
html.tv-remote-mode .catalog {
  scrollbar-gutter: stable;
}
html.native-android-shell .catalog-header,
html.tv-remote-mode .catalog-header {
  min-width: 0;
}
html.native-android-shell .catalog-heading,
html.tv-remote-mode .catalog-heading,
html.native-android-shell .catalog-tools,
html.tv-remote-mode .catalog-tools {
  min-width: 0;
}
html.native-android-shell .catalog-tabs,
html.tv-remote-mode .catalog-tabs {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
html.native-android-shell .catalog-tabs::-webkit-scrollbar,
html.tv-remote-mode .catalog-tabs::-webkit-scrollbar { display: none; }
html.native-android-shell .content-card.kind-movie,
html.native-android-shell .content-card.kind-series,
html.tv-remote-mode .content-card.kind-movie,
html.tv-remote-mode .content-card.kind-series {
  height: auto !important;
  min-height: 0 !important;
  align-self: start;
}
html.native-android-shell .content-card.kind-movie .content-poster,
html.native-android-shell .content-card.kind-series .content-poster,
html.tv-remote-mode .content-card.kind-movie .content-poster,
html.tv-remote-mode .content-card.kind-series .content-poster {
  height: clamp(170px, 31vh, 250px) !important;
  min-height: 170px !important;
  aspect-ratio: 2 / 3;
}
html.native-android-shell .content-card.kind-movie .content-copy,
html.native-android-shell .content-card.kind-series .content-copy,
html.tv-remote-mode .content-card.kind-movie .content-copy,
html.tv-remote-mode .content-card.kind-series .content-copy {
  min-height: 92px !important;
  height: auto !important;
  overflow: visible;
}
html.native-android-shell .content-card.kind-movie .content-copy strong,
html.native-android-shell .content-card.kind-series .content-copy strong,
html.tv-remote-mode .content-card.kind-movie .content-copy strong,
html.tv-remote-mode .content-card.kind-series .content-copy strong {
  min-height: 3.45em !important;
  white-space: normal !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
}
html.native-android-shell .content-card.kind-movie .content-copy small,
html.native-android-shell .content-card.kind-series .content-copy small,
html.tv-remote-mode .content-card.kind-movie .content-copy small,
html.tv-remote-mode .content-card.kind-series .content-copy small {
  min-height: 1.25em;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
html.native-android-shell .content-source,
html.tv-remote-mode .content-source {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.native-android-shell .content-load-more,
html.tv-remote-mode .content-load-more {
  min-height: 58px;
  margin: 4px 0 18px;
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(105deg, #be1238, #5d1230);
  font-size: 14px;
  font-weight: 800;
}
html.native-android-shell .catalog-message.loading,
html.tv-remote-mode .catalog-message.loading {
  pointer-events: none;
}

@media (min-width: 601px) and (max-width: 1366px) and (min-height: 621px) {
  html.native-android-shell .catalog-header,
  html.tv-remote-mode .catalog-header {
    grid-template-columns: 112px minmax(0, 1fr) minmax(250px, 320px);
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
  html.native-android-shell .catalog-header h1,
  html.tv-remote-mode .catalog-header h1 { font-size: clamp(30px, 3vw, 42px); }
  html.native-android-shell .catalog[data-kind="live"] .catalog-layout,
  html.tv-remote-mode .catalog[data-kind="live"] .catalog-layout {
    grid-template-columns: minmax(205px, 19vw) minmax(270px, 31vw) minmax(300px, 1fr);
    gap: 12px;
  }
  html.native-android-shell .category-button,
  html.tv-remote-mode .category-button { min-height: 48px; padding: 8px 11px; }
  html.native-android-shell .content-grid,
  html.tv-remote-mode .content-grid { gap: 10px; padding-left: 3px; padding-right: 3px; }
  html.native-android-shell .content-card.kind-live,
  html.tv-remote-mode .content-card.kind-live { min-height: 72px; }
  html.native-android-shell .content-card.kind-live .content-poster,
  html.tv-remote-mode .content-card.kind-live .content-poster { height: 70px; }
}

@media (max-width: 600px) {
  html.native-android-shell .catalog,
  html.tv-remote-mode .catalog { padding-bottom: calc(28px + var(--cr7-safe-bottom)); }
  html.native-android-shell .catalog-header,
  html.tv-remote-mode .catalog-header { grid-template-columns: 96px minmax(0, 1fr); }
  html.native-android-shell .content-card.kind-movie .content-poster,
  html.native-android-shell .content-card.kind-series .content-poster,
  html.tv-remote-mode .content-card.kind-movie .content-poster,
  html.tv-remote-mode .content-card.kind-series .content-poster {
    height: clamp(180px, 58vw, 270px) !important;
    min-height: 180px !important;
  }
  html.native-android-shell .content-card.kind-movie .content-copy,
  html.native-android-shell .content-card.kind-series .content-copy,
  html.tv-remote-mode .content-card.kind-movie .content-copy,
  html.tv-remote-mode .content-card.kind-series .content-copy { min-height: 100px !important; }
  html.native-android-shell .content-card.kind-movie .content-copy strong,
  html.native-android-shell .content-card.kind-series .content-copy strong,
  html.tv-remote-mode .content-card.kind-movie .content-copy strong,
  html.tv-remote-mode .content-card.kind-series .content-copy strong { font-size: 13px; }
}


/* VOD titles must remain readable: no fixed line clamp or hidden overflow. */
html.native-android-shell .content-card.kind-movie .content-copy strong,
html.native-android-shell .content-card.kind-series .content-copy strong,
html.tv-remote-mode .content-card.kind-movie .content-copy strong,
html.tv-remote-mode .content-card.kind-series .content-copy strong {
  display: block !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  -webkit-line-clamp: unset !important;
}
html.native-android-shell .content-card.kind-movie .content-copy small,
html.native-android-shell .content-card.kind-series .content-copy small,
html.tv-remote-mode .content-card.kind-movie .content-copy small,
html.tv-remote-mode .content-card.kind-series .content-copy small {
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  -webkit-line-clamp: unset !important;
}

/* Progressive boot/category transition — 2026-08-25 */
.splash {
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 42, 87, .16), transparent 30%),
    radial-gradient(circle at 50% 82%, rgba(72, 180, 255, .11), transparent 36%),
    linear-gradient(145deg, #05090f 0%, #0b1724 58%, #111421 100%);
}
.splash small#boot-detail {
  max-width: min(520px, 82vw);
  margin-top: -12px;
  color: #86a8c3;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.splash #boot-retry {
  min-width: 180px;
  margin-top: -4px;
}
.splash.offline .spinner {
  animation: none;
  border-color: rgba(255,255,255,.18);
  border-top-color: #55dda0;
}
.catalog-transition {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 13px;
  padding: 32px;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 34, 83, .16), transparent 32%),
    linear-gradient(145deg, rgba(4, 9, 16, .985), rgba(8, 18, 30, .975) 58%, rgba(16, 13, 25, .985));
  opacity: 1;
  transition: opacity .22s ease, transform .22s ease;
}
.catalog-transition.hidden { display: none !important; }
.transition-brand {
  display: flex;
  align-items: baseline;
  gap: 1px;
  color: #fff;
  font-size: clamp(27px, 4vw, 42px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -3px;
}
.transition-brand b { color: var(--red); }
.transition-brand small {
  margin-left: 7px;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  letter-spacing: 3px;
}
.transition-orbit {
  position: relative;
  width: 54px;
  height: 54px;
  margin: 2px 0 3px;
  border: 2px solid rgba(255,255,255,.16);
  border-top-color: #ff3858;
  border-right-color: #55dda0;
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
.transition-orbit::after,
.transition-orbit i {
  position: absolute;
  display: block;
  content: "";
  border-radius: 50%;
}
.transition-orbit::after {
  inset: 10px;
  border: 1px solid rgba(255,255,255,.14);
}
.transition-orbit i {
  top: 4px;
  right: 5px;
  width: 7px;
  height: 7px;
  background: #fff;
  box-shadow: 0 0 15px rgba(255,255,255,.8);
}
.catalog-transition .eyebrow { margin: 0; font-size: 11px; letter-spacing: 3px; }
.catalog-transition h2 {
  max-width: min(720px, 84vw);
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 3.5vw, 38px);
  text-align: center;
}
.catalog-transition p:not(.eyebrow) {
  max-width: min(660px, 84vw);
  margin: 0;
  color: #a7c4da;
  font-size: clamp(14px, 1.7vw, 18px);
  text-align: center;
}
.transition-progress {
  width: min(410px, 72vw);
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.13);
}
.transition-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff3858, #ff7a63 48%, #55dda0);
  box-shadow: 0 0 18px rgba(255,56,88,.45);
  transition: width .24s ease;
}
.catalog-screen.catalog-loading .catalog-layout,
.catalog-screen.catalog-loading .catalog-header {
  transition: opacity .22s ease, transform .22s ease;
}
.catalog-screen.catalog-loading .catalog-layout { opacity: .18; transform: scale(.992); }
.catalog-screen.catalog-loading .catalog-header { opacity: .48; }
@media (max-width: 700px), (max-height: 620px) {
  .catalog-transition { padding: 20px; gap: 9px; }
  .transition-orbit { width: 44px; height: 44px; }
  .catalog-transition h2 { font-size: 24px; }
  .catalog-transition p:not(.eyebrow) { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .transition-orbit, .spinner { animation: none; }
  .catalog-transition,
  .catalog-screen.catalog-loading .catalog-layout,
  .catalog-screen.catalog-loading .catalog-header,
  .transition-progress i { transition: none; }
}
html.native-android-shell .catalog-transition,
html.tv-remote-mode .catalog-transition {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Dialog viewport guard — keeps settings/account visible in Android WebView */
.dialog-backdrop {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  min-height: 100vh;
  z-index: 200 !important;
}
@supports (height: 100dvh) {
  .dialog-backdrop { min-height: 100dvh; }
}

/* Full-viewport catalog transition — the last loading layer wins over historical pill rules */
.catalog-transition {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh;
  min-height: 100vh;
  box-sizing: border-box;
  z-index: 190 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(22px, 5vw, 64px);
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 37, 86, .13), transparent 34%),
    linear-gradient(145deg, rgba(3, 8, 15, .94), rgba(7, 17, 29, .91) 58%, rgba(19, 12, 27, .93));
  opacity: 1;
  transform: none;
}
@supports (height: 100dvh) {
  .catalog-transition { height: 100dvh; min-height: 100dvh; }
}
.catalog-transition:not(.hidden) ~ .catalog-message { display: none !important; }
.catalog-transition.series-transition {
  display: grid;
  grid-template-columns: minmax(128px, 22vw) minmax(0, 610px);
  grid-template-areas:
    "media brand"
    "media orbit"
    "media eyebrow"
    "media title"
    "media status"
    "media progress";
  align-content: center;
  justify-content: center;
  align-items: center;
  column-gap: clamp(20px, 4vw, 48px);
  row-gap: 10px;
  text-align: left;
  background:
    linear-gradient(90deg, rgba(3, 7, 13, .94), rgba(5, 12, 22, .86) 54%, rgba(13, 10, 22, .72)),
    radial-gradient(circle at 18% 48%, rgba(255, 37, 86, .2), transparent 34%);
}
.transition-series-media {
  grid-area: media;
  position: relative;
  display: grid;
  place-items: center;
  width: min(220px, 24vw);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(26, 43, 63, .98), rgba(46, 19, 45, .98));
  box-shadow: 0 24px 70px rgba(0,0,0,.48), 0 0 0 5px rgba(255,255,255,.05);
}
.transition-series-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.transition-series-media span {
  color: rgba(255,255,255,.84);
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 900;
  letter-spacing: 2px;
}
.series-transition .transition-brand { grid-area: brand; justify-self: start; }
.series-transition .transition-orbit { grid-area: orbit; justify-self: start; width: 34px; height: 34px; margin: 0; }
.series-transition .catalog-transition .eyebrow,
.series-transition .eyebrow { grid-area: eyebrow; justify-self: start; text-align: left; }
.series-transition h2 { grid-area: title; justify-self: start; max-width: min(610px, 60vw); text-align: left; }
.series-transition p:not(.eyebrow) { grid-area: status; justify-self: start; max-width: min(610px, 60vw); text-align: left; }
.series-transition .transition-progress { grid-area: progress; justify-self: stretch; width: min(610px, 60vw); margin-top: 4px; }
.catalog-screen.catalog-series-loading .catalog-layout { opacity: .08; transform: none; }
.catalog-screen.catalog-series-loading .catalog-header { opacity: .25; }
.catalog-screen.catalog-series-loading .catalog-message { display: none !important; }
html.native-android-shell .catalog-transition,
html.tv-remote-mode .catalog-transition { backdrop-filter: none; -webkit-backdrop-filter: none; }
@media (max-width: 700px), (max-height: 620px) {
  .catalog-transition.series-transition {
    grid-template-columns: minmax(92px, 24vw) minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 7px;
    padding: 18px;
  }
  .transition-series-media { width: min(150px, 24vw); border-radius: 14px; }
  .series-transition .transition-brand { font-size: 28px; }
  .series-transition .transition-orbit { width: 28px; height: 28px; }
  .series-transition h2 { max-width: 66vw; font-size: clamp(19px, 4vw, 28px); }
  .series-transition p:not(.eyebrow) { max-width: 66vw; font-size: 13px; line-height: 1.35; }
  .series-transition .transition-progress { width: 66vw; }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-transition { transition: none !important; }
}

/* Series cover sizing guard — explicit height prevents grid collapse in Android WebView */
.catalog-transition.series-transition .transition-series-media {
  width: min(190px, 22vw);
  height: min(270px, 52vh);
  min-height: 160px;
  aspect-ratio: auto;
  align-self: center;
}
.catalog-transition.series-transition .transition-series-media span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 36%, rgba(255,255,255,.14), transparent 27%),
    linear-gradient(145deg, rgba(31,57,82,.98), rgba(71,20,55,.98));
}
.catalog-transition.series-transition .transition-series-media img {
  position: absolute;
  inset: 0;
}
@media (max-width: 700px), (max-height: 620px) {
  .catalog-transition.series-transition .transition-series-media {
    width: min(150px, 24vw);
    height: min(220px, 42vh);
    min-height: 130px;
    aspect-ratio: auto;
  }
}

/* Android TV e televisores com painel 16:9 de baixa altura. */
#tv-keyboard {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: min(430px, 74vh);
  min-height: 330px;
  gap: 10px;
  padding: 0;
  overflow: hidden;
  background: transparent;
}
.activation-panel.tv-keyboard-open > :not(#tv-keyboard) { display: none !important; }
.activation-panel.tv-keyboard-open { text-align: left; }
#tv-keyboard input {
  flex: 0 0 42px;
  width: 100%;
  min-height: 42px;
  padding: 7px 14px;
  border: 1px solid #858b95;
  color: #fff;
  background: #22262c;
  font-size: 19px;
}
.tv-keyboard-keys {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-auto-rows: minmax(38px, 1fr);
  flex: 1;
  gap: 7px;
  min-height: 0;
}
.tv-keyboard-keys button {
  min-width: 0;
  min-height: 38px;
  padding: 3px;
  border: 2px solid #626975;
  border-radius: 6px;
  color: #fff;
  background: #22262c;
  font: 17px Arial, sans-serif;
  cursor: pointer;
}
.tv-keyboard-keys button:focus,
.tv-keyboard-keys button.focused {
  border-color: #fff;
  outline: 2px solid #fff;
  outline-offset: 1px;
  background: #c90d36;
}

@media (orientation: landscape) and (min-width: 720px) and (max-height: 800px) {
  .activation {
    display: grid;
    grid-template-rows: auto auto auto;
    place-content: center;
    justify-items: center;
    gap: 6px;
    width: 100%;
    height: 100vh;
    min-height: 0;
    padding: 10px 3%;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .activation > .brand {
    margin: 0;
    font-size: 29px;
  }
  .activation > .brand small { font-size: 11px; }
  .activation-panel {
    width: min(1160px, 96vw);
    padding: 10px 18px;
    border-radius: 16px;
  }
  .activation-panel .eyebrow {
    margin-bottom: 3px;
    font-size: 10px;
  }
  .activation-panel h1 { font-size: 24px; }
  .activation-panel .lead {
    margin: 5px auto 8px;
    font-size: 13px;
    line-height: 1.25;
  }
  .activation-methods {
    grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
    gap: 8px;
  }
  .client-login,
  .portal-activation {
    padding: 8px 12px;
    border-radius: 12px;
  }
  .method-heading {
    gap: 8px;
    margin-bottom: 6px;
  }
  .method-heading > span {
    flex-basis: 28px;
    height: 28px;
    border-radius: 7px;
    font-size: 13px;
  }
  .method-heading strong { font-size: 15px; }
  .method-heading small {
    margin-top: 1px;
    font-size: 9px;
  }
  .client-login label {
    margin-bottom: 3px;
    font-size: 10px;
  }
  .client-login input {
    height: 32px;
    margin-top: 2px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
  }
  .client-login .primary,
  .portal-activation .secondary {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
  }
  .login-status,
  .portal-activation .status {
    min-height: 13px;
    margin: 3px 0 0;
    font-size: 9px;
    line-height: 1.2;
  }
  .activation-divider { height: auto; }
  .activation-divider::before {
    top: 0;
    right: auto;
    bottom: 0;
    left: 50%;
    width: 1px;
    height: auto;
  }
  .activation-divider span { padding: 5px 0; }
  .activation-code {
    margin: 8px auto 6px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 29px;
    letter-spacing: 6px;
  }
  .installation-identifiers {
    gap: 12px;
    margin: 0;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 9px;
  }
  #tv-keyboard {
    gap: 7px;
    height: min(410px, 76vh);
    min-height: 320px;
    padding: 0;
    overflow: hidden;
  }
  #tv-keyboard input {
    flex-basis: 34px;
    min-height: 34px;
    font-size: 16px;
  }
  .tv-keyboard-keys {
    grid-auto-rows: minmax(32px, 1fr);
    gap: 5px;
  }
  .tv-keyboard-keys button {
    min-height: 32px;
    font-size: 15px;
  }
}
