:root {
  color-scheme: dark;
  --bg: #111314;
  --panel: #191c1f;
  --panel-2: #21252a;
  --line: #333941;
  --text: #f0f2f4;
  --muted: #a6afb8;
  --accent: #17b26a;
  --accent-2: #4f8cff;
  --gold: #f4c542;
  --danger: #e05858;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  display: grid;
  grid-template-columns: 320px 1fr;
}

body.home-open {
  grid-template-columns: 1fr;
  background:
    radial-gradient(circle at 18% 12%, rgba(23, 178, 106, 0.22), transparent 30%),
    radial-gradient(circle at 80% 16%, rgba(79, 140, 255, 0.2), transparent 34%),
    linear-gradient(135deg, #071016 0%, #111314 48%, #08130f 100%);
}

body.android-shell.home-open,
body.projector-shell.home-open,
body.tv-shell.home-open {
  background: #0b1112;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
}

button:focus-visible,
button:focus,
input:focus-visible,
input:focus,
select:focus-visible,
select:focus,
.item:focus-visible,
.item:focus {
  outline: 3px solid rgba(79, 140, 255, 0.95);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.sidebar {
  height: 100vh;
  min-height: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: #151719;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

body.home-open .sidebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
  overflow: visible;
  pointer-events: none;
}

body.home-open .brand {
  display: none;
}

body.home-open .settings-panel {
  position: fixed;
  right: 18px;
  bottom: 78px;
  z-index: 40;
  width: min(340px, calc(100vw - 40px));
  pointer-events: auto;
}

body:not(.home-open) .brand {
  display: none;
}

.profile-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 9, 10, 0.94);
}

.profile-card {
  width: min(520px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171b1f;
}

.profile-card p,
#profileMessage {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-card h2 {
  margin: 2px 0 0;
  font-size: 26px;
}

.profile-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.profile-list button {
  min-height: 54px;
  font-weight: 700;
}

.profile-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.profile-form {
  display: grid;
  gap: 12px;
}

.profile-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.profile-form .remember-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
}

.profile-form .remember-profile input {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--accent);
}

.profile-form input {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f1113;
  color: var(--text);
  padding: 0 12px;
}

.profile-form button {
  min-height: 44px;
}

.brand {
  display: flex;
  gap: 8px;
  align-items: center;
}

.brand > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 16px;
}

.settings-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101214;
}

.settings-panel[hidden] {
  display: none;
}

.settings-actions {
  display: flex;
}

.settings-actions button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.access-panel {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.access-panel[hidden] {
  display: none;
}

.access-panel strong {
  display: block;
  font-size: 14px;
}

.access-panel span {
  color: var(--muted);
  font-size: 12px;
}

.access-category-list {
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.access-kind {
  display: grid;
  gap: 6px;
}

.access-all,
.access-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--text);
  font-size: 12px;
}

.access-row {
  padding-left: 8px;
}

.access-row span,
.access-all span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-row input,
.access-all input {
  width: 16px;
  height: 16px;
}

.top-profile,
.logout {
  min-height: 30px;
  max-width: 82px;
  padding: 0 8px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.top-profile {
  border-color: rgba(23, 178, 106, 0.65);
  background: rgba(23, 178, 106, 0.18);
  color: #c5f6d9;
}

.logout {
  border: 1px solid rgba(224, 88, 88, 0.72);
  background: rgba(224, 88, 88, 0.18);
  color: #ffd1d1;
  text-decoration: none;
}

.logout:hover {
  color: #fff;
  background: rgba(224, 88, 88, 0.35);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #0d1114;
  border: 1px solid rgba(23, 178, 106, 0.45);
}

.brand-mark img {
  width: 31px;
  height: 31px;
}

h1,
h2,
p {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand span,
.field span,
.category-head,
.section-title p,
#itemCount,
#nowType {
  color: var(--muted);
  font-size: 13px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tab {
  height: 42px;
  font-size: 15px;
  font-weight: 700;
}

.main-tabs {
  display: none;
}

.tab.active {
  border-color: var(--accent);
  background: rgba(47, 179, 109, 0.15);
  color: #bdf3d4;
}

.field {
  display: grid;
  gap: 8px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: end;
}

.search-field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.field input,
.field select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f1113;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.filter-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(42px, 1fr));
  gap: 8px;
}

.content-quick-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(44px, 56px));
  gap: 8px;
  margin: 0;
}

#multiModeButton,
#addMultiButton,
#multiPanel,
.multi-add {
  display: none !important;
}

.view-filter,
.icon-filter {
  min-height: 34px;
  font-size: 13px;
}

.icon-filter {
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
}

.view-filter.active,
.icon-filter.active {
  border-color: var(--accent);
  background: rgba(23, 178, 106, 0.16);
  color: #c5f6d9;
}

.compact-all {
  min-height: 34px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}

.browse-card {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101214;
  overflow: hidden;
}

.wide-action {
  min-height: 38px;
  width: 100%;
  font-size: 13px;
}

.wide-action.active {
  border-color: var(--accent);
  background: rgba(23, 178, 106, 0.16);
  color: #c5f6d9;
}

.compact-field {
  gap: 7px;
}

.days-control {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: center;
}

.days-control input {
  text-align: center;
}

.days-control span,
.cache-info {
  color: var(--muted);
  font-size: 12px;
}

.cache-info {
  line-height: 1.35;
}

.field input:focus {
  border-color: var(--accent-2);
}

.category-head {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 7px;
  padding-top: 2px;
}

.categories {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  align-content: start;
  gap: 6px;
  padding-right: 4px;
}

.category {
  min-height: 30px;
  padding: 6px 8px;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.category.active {
  border-color: var(--accent-2);
  background: rgba(74, 144, 226, 0.14);
}

.category-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.category-count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.main {
  min-width: 0;
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

body.home-open .main {
  height: 100vh;
  height: 100dvh;
  grid-template-rows: minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
}

.home-screen {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(16px, 3vw, 32px);
  padding: clamp(20px, 4vw, 48px) clamp(20px, 5vw, 64px);
  overflow: auto;
  overscroll-behavior: contain;
}

.home-top {
  width: min(980px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.home-top h2 {
  margin-top: 4px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
}

.home-settings {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 18px;
}

.home-grid {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  grid-auto-rows: minmax(180px, 26vh);
  gap: clamp(18px, 3vw, 30px);
  align-content: start;
}

.home-tile {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  min-height: 190px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.28);
}

.home-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.16), transparent 46%);
  pointer-events: none;
}

.home-live {
  background: linear-gradient(155deg, #11d28b 0%, #2376e5 55%, #5422e8 100%);
}

.home-vod {
  background: linear-gradient(145deg, #df1c68 0%, #ff8b2a 100%);
}

.home-series {
  background: linear-gradient(145deg, #9637cf 0%, #47a7f2 100%);
}

.home-icon {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  font-size: 28px;
  font-weight: 800;
}

.home-tile strong,
.home-tile small {
  position: relative;
  z-index: 1;
}

.home-tile strong {
  font-size: clamp(25px, 3.2vw, 38px);
  line-height: 1;
  text-transform: uppercase;
}

.home-tile small {
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 700;
}

.home-footer {
  width: min(980px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
}

.home-footer-brand {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
}

.home-clock {
  color: #eef5ff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(16, 18, 20, 0.62);
}

.brand-mark.mini {
  width: 36px;
  height: 36px;
}

.brand-mark.mini img {
  width: 28px;
  height: 28px;
}

@media (max-width: 860px) {
  body.home-open .sidebar {
    padding: 0;
  }

  body.home-open .main {
    padding: 0;
  }

  .home-screen {
    padding: 18px 14px;
    gap: 22px;
    justify-content: flex-start;
    overflow: auto;
  }

  .home-top {
    align-items: flex-start;
  }

  .home-top h2 {
    font-size: 22px;
  }

  .home-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 18px;
  }

  .home-tile {
    min-height: 112px;
    grid-template-columns: 56px minmax(0, 1fr);
    align-content: center;
    justify-items: start;
    text-align: left;
    padding: 16px;
  }

  .home-icon {
    grid-row: 1 / span 2;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 22px;
  }

  .home-tile strong {
    font-size: 24px;
  }

  .home-tile small {
    grid-column: 2;
    font-size: 13px;
  }

  .home-footer {
    position: sticky;
    bottom: 0;
    margin-top: 12px;
    padding: 12px 0 0;
    gap: 7px;
  }

  .home-footer-brand strong {
    font-size: 15px;
  }

  .home-clock {
    font-size: 12px;
    padding: 6px 8px;
  }

  .home-footer .top-profile,
  .home-footer .logout,
  .home-footer .icon-button {
    min-height: 30px;
  }
}

@media (min-width: 861px) and (max-width: 1180px) {
  .home-grid {
    width: min(860px, 100%);
    gap: 12px;
    grid-auto-rows: minmax(136px, 22vh);
  }

  .home-tile {
    min-height: 136px;
    padding: 18px;
  }
}

body.tv-shell.home-open .home-grid {
  width: min(1180px, calc(100vw - 72px));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(190px, min(34vh, 280px));
}

body.tv-shell.home-open .home-tile {
  min-height: 190px;
}

body.tv-shell.home-open .home-screen {
  justify-content: center;
  gap: 28px;
  padding: 28px 36px;
}

body.tv-shell.home-open .home-top,
body.tv-shell.home-open .home-footer {
  width: min(1180px, calc(100vw - 72px));
}

@media (max-width: 720px) {
  .home-screen {
    justify-content: flex-start;
    padding: 14px;
    gap: 20px;
  }

  .home-top {
    gap: 10px;
  }

  .home-top h2 {
    font-size: 20px;
  }

  .home-grid,
  body.tv-shell.home-open .home-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 16px;
  }

  .home-tile,
  body.tv-shell.home-open .home-tile {
    min-height: 88px;
    grid-template-columns: 46px minmax(0, 1fr);
    align-content: center;
    justify-items: start;
    gap: 8px 12px;
    padding: 12px 14px;
    text-align: left;
  }

  .home-icon {
    grid-row: 1 / span 2;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 20px;
  }

  .home-tile strong {
    font-size: 22px;
  }

  .home-tile small {
    grid-column: 2;
    font-size: 12px;
  }
}

@media (orientation: landscape) and (max-height: 560px) and (min-width: 721px) {
  .home-screen {
    justify-content: center;
    gap: 18px;
    padding: 16px 28px;
  }

  .home-top h2 {
    font-size: 22px;
  }

  .home-grid,
  body.tv-shell.home-open .home-grid {
    width: min(1160px, calc(100vw - 56px));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(150px, 32vh);
    gap: 18px;
  }

  .home-tile,
  body.tv-shell.home-open .home-tile {
    min-height: 150px;
    padding: 18px;
  }

  .home-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 21px;
  }

  .home-tile strong {
    font-size: 24px;
  }

  .home-tile small {
    font-size: 12px;
  }

  .home-footer {
    width: min(1160px, calc(100vw - 56px));
    margin-top: 4px;
    padding-top: 8px;
  }
}

/* Home compatível com WebView antigo: evita sobreposição no Android 8.1. */
body.home-open .main {
  height: 100vh;
  display: block;
  overflow: hidden;
}

body.home-open .home-screen {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  padding: 36px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 34px;
  overflow: auto;
}

body.home-open .home-top,
body.home-open .home-grid,
body.home-open .home-footer {
  width: 100%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

body.home-open .home-top {
  flex: 0 0 auto;
}

body.home-open .home-grid {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  gap: 38px;
  align-items: stretch;
  justify-content: center;
}

body.home-open .home-tile {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
}

body.home-open .home-icon {
  flex: 0 0 auto;
}

body.home-open .home-tile strong {
  font-size: 34px;
}

body.home-open .home-footer {
  flex: 0 0 auto;
  margin-top: 12px;
  padding-top: 0;
}

body.projector-shell.home-open .home-screen,
body.tv-shell.home-open .home-screen {
  padding: 40px 70px;
  gap: 38px;
}

body.projector-shell.home-open .home-grid,
body.tv-shell.home-open .home-grid {
  max-width: 1260px;
  gap: 50px;
}

body.projector-shell.home-open .home-tile,
body.tv-shell.home-open .home-tile {
  height: 250px;
}

body.projector-shell.home-open .home-top,
body.projector-shell.home-open .home-footer,
body.tv-shell.home-open .home-top,
body.tv-shell.home-open .home-footer {
  max-width: 1260px;
}

body.projector-shell.home-open .home-screen {
  padding: 36px 5vw;
}

body.projector-shell.home-open .home-top,
body.projector-shell.home-open .home-footer {
  width: 90vw;
  max-width: none;
}

body.projector-shell.home-open .home-grid {
  width: 90vw;
  max-width: none;
  display: flex;
  flex-direction: row;
  gap: 0;
  justify-content: space-between;
}

body.projector-shell.home-open .home-tile {
  width: 29%;
  flex: 0 0 29%;
  height: 230px;
  margin: 0;
}

body.projector-shell.home-open .home-tile + .home-tile {
  margin-left: 3.5%;
}

@media (orientation: landscape) and (max-height: 620px) and (min-width: 861px) {
  body.home-open .home-screen {
    padding: 22px 64px;
    gap: 26px;
  }

  body.home-open .home-grid,
  body.projector-shell.home-open .home-grid,
  body.tv-shell.home-open .home-grid {
    gap: 42px;
  }

  body.home-open .home-tile,
  body.projector-shell.home-open .home-tile,
  body.tv-shell.home-open .home-tile {
    height: 185px;
    padding: 20px;
  }

  body.home-open .home-icon {
    width: 54px;
    height: 54px;
    font-size: 24px;
  }

  body.home-open .home-tile strong {
    font-size: 30px;
  }

  body.home-open .home-footer {
    margin-top: 8px;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  body.projector-shell.home-open .home-screen {
    padding: 22px 5vw;
    gap: 24px;
  }

  body.projector-shell.home-open .home-grid {
    width: 90vw;
    gap: 0;
  }

  body.projector-shell.home-open .home-tile {
    width: 29%;
    flex-basis: 29%;
    height: 178px;
    padding: 18px;
  }

  body.projector-shell.home-open .home-tile + .home-tile {
    margin-left: 3.5%;
  }
}

@media (max-width: 860px) {
  body.home-open .home-screen {
    min-height: 100vh;
    padding: 24px;
    justify-content: flex-start;
    gap: 30px;
  }

  body.home-open .home-grid {
    flex-direction: column;
    gap: 24px;
  }

  body.home-open .home-tile {
    width: 100%;
    height: 138px;
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    gap: 22px;
    padding: 22px 24px;
  }

  body.home-open .home-icon {
    width: 64px;
    height: 64px;
    border-radius: 15px;
    font-size: 28px;
  }

  body.home-open .home-tile strong {
    font-size: 34px;
  }

  body.home-open .home-tile small {
    font-size: 18px;
  }

  body.home-open .home-footer {
    margin-top: 28px;
    gap: 14px;
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  body.home-open .home-screen {
    padding: 18px 16px;
    gap: 24px;
  }

  body.home-open .home-top h2 {
    font-size: 26px;
  }

  body.home-open .home-grid {
    gap: 18px;
  }

  body.home-open .home-tile {
    height: 124px;
    gap: 18px;
    padding: 18px;
  }

  body.home-open .home-icon {
    width: 54px;
    height: 54px;
    font-size: 24px;
  }

  body.home-open .home-tile strong {
    font-size: 28px;
  }

  body.home-open .home-tile small {
    font-size: 15px;
  }
}

/* Projetores Android cortam a largura da home; use coluna estável só na tela inicial. */
body.projector-shell.home-open .home-screen {
  width: 100%;
  height: 100vh;
  padding: 26px 48px;
  justify-content: flex-start;
  gap: 24px;
  overflow: auto;
}

body.projector-shell.home-open .home-top,
body.projector-shell.home-open .home-grid,
body.projector-shell.home-open .home-footer {
  width: 100%;
  max-width: 760px;
  margin-left: 0;
  margin-right: auto;
}

body.projector-shell.home-open .home-top h2 {
  font-size: 30px;
  line-height: 1.12;
}

body.projector-shell.home-open .home-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.projector-shell.home-open .home-tile {
  width: 100%;
  height: 118px;
  flex: 0 0 auto;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  gap: 22px;
  padding: 18px 24px;
  margin: 0;
  box-shadow: none;
}

body.projector-shell.home-open .home-tile + .home-tile {
  margin-left: 0;
  margin-top: 26px;
}

body.projector-shell.home-open .home-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  font-size: 26px;
}

body.projector-shell.home-open .home-tile strong {
  font-size: 34px;
}

body.projector-shell.home-open .home-tile small {
  font-size: 16px;
}

body.projector-shell.home-open .home-footer {
  margin-top: 26px;
  padding-top: 0;
  gap: 16px;
}

@media (orientation: landscape) and (max-height: 520px) {
  body.projector-shell.home-open .home-screen {
    padding: 18px 42px;
    gap: 18px;
  }

  body.projector-shell.home-open .home-top h2 {
    font-size: 24px;
  }

  body.projector-shell.home-open .home-tile {
    height: 92px;
    padding: 14px 20px;
  }

  body.projector-shell.home-open .home-tile + .home-tile {
    margin-top: 18px;
  }

  body.projector-shell.home-open .home-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  body.projector-shell.home-open .home-tile strong {
    font-size: 28px;
  }

  body.projector-shell.home-open .home-tile small {
    font-size: 14px;
  }

  body.projector-shell.home-open .home-footer {
    margin-top: 18px;
  }
}

body.multi-open .main {
  grid-template-rows: minmax(250px, 42vh) minmax(0, 1fr);
}

body.multi-open.player-open .main {
  grid-template-columns: minmax(430px, 1fr) minmax(300px, 38vw);
  grid-template-rows: auto minmax(0, 1fr);
}

.player {
  display: none;
  min-height: 0;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: #101214;
  overflow: hidden;
}

body.player-open .player {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

body.web-external-open .player {
  grid-template-columns: 1fr;
  padding-bottom: 12px;
}

body.web-external-open .video-wrap,
body.web-external-open .epg-panel {
  display: none;
}

body.web-external-open .player-info {
  max-width: 980px;
  grid-template-columns: 84px minmax(0, 1fr);
  padding: 0;
}

body.web-external-open #poster {
  width: 84px;
  height: 112px;
}

.player-topbar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.player-topbar button {
  min-height: 38px;
  padding: 0 14px;
}

.video-wrap {
  position: relative;
  width: 100%;
  height: min(36vh, 360px);
  min-height: 220px;
  background: #050607;
  border-radius: 8px;
  overflow: hidden;
}

video {
  width: 100%;
  height: 100%;
  display: block;
  background: #050607;
}

.video-title {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 2;
  max-width: min(720px, calc(100% - 20px));
  padding: 9px 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(5, 6, 7, 0.86), rgba(5, 6, 7, 0.48), transparent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.video-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  border-radius: 0;
}

.video-wrap:fullscreen .video-title,
.video-wrap:fullscreen .video-title[hidden] {
  display: block;
  top: 18px;
  left: 18px;
  right: 18px;
  max-width: min(980px, calc(100% - 36px));
  font-size: 18px;
}

.multi-panel {
  min-height: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #101214;
  overflow: hidden;
}

body.multi-open.player-open .multi-panel {
  grid-column: 2;
  grid-row: 1;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

body.multi-open.player-open .player {
  grid-column: 1;
  grid-row: 1;
}

body.multi-open.player-open .content {
  grid-column: 1 / -1;
  grid-row: 2;
}

.multi-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 12px;
}

body.multi-open.player-open .multi-head {
  align-items: center;
  margin-bottom: 8px;
}

.multi-head p {
  color: var(--muted);
  font-size: 12px;
}

.multi-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.1;
}

body.multi-open.player-open .multi-head p {
  display: none;
}

body.multi-open.player-open .multi-head h2 {
  font-size: 16px;
}

.multi-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.multi-head button,
.multi-head-actions button {
  min-height: 34px;
  padding: 0 12px;
}

.multi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  height: calc(100% - 56px);
  min-height: 0;
}

body.multi-open.player-open .multi-panel:not(:fullscreen) .multi-grid {
  height: calc(100% - 46px);
}

body.multi-open.player-open .multi-panel:not(:fullscreen)[data-count="1"] .multi-grid,
body.multi-open.player-open .multi-panel:not(:fullscreen)[data-count="2"] .multi-grid,
body.multi-open.player-open .multi-panel:not(:fullscreen)[data-selecting="1"] .multi-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.multi-open.player-open .multi-panel:not(:fullscreen)[data-count="3"] .multi-grid,
body.multi-open.player-open .multi-panel:not(:fullscreen)[data-count="4"] .multi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

body.multi-open.player-open .multi-panel:not(:fullscreen)[data-count="3"] .multi-card:first-child {
  grid-row: auto;
}

.multi-panel[data-count="1"] .multi-grid {
  grid-template-columns: minmax(0, 1fr);
}

.multi-panel[data-selecting="1"]:not(:fullscreen) .multi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.multi-panel[data-count="2"] .multi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.multi-panel[data-count="3"] .multi-grid {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.multi-panel[data-count="3"] .multi-card:first-child {
  grid-row: 1 / 3;
}

.multi-panel[data-count="4"] .multi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.multi-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #15191c;
}

.multi-video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050607;
}

.multi-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.multi-title {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 42px;
  z-index: 2;
  padding: 7px 9px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(5, 6, 7, 0.86), rgba(5, 6, 7, 0.42), transparent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.multi-close-x {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(224, 88, 88, 0.92);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.multi-close-x:focus,
.multi-close-x:hover {
  border-color: var(--danger);
  background: rgba(224, 88, 88, 0.9);
}

.multi-controls {
  display: grid;
  grid-template-columns: minmax(54px, 1fr) 28px 28px 28px;
  gap: 6px;
  align-items: center;
  padding: 5px 6px;
}

.multi-controls span {
  color: var(--muted);
  font-size: 12px;
}

.multi-controls input {
  width: 100%;
  height: 24px;
}

.multi-controls button {
  min-height: 28px;
  padding: 0;
  font-size: 14px;
}

.multi-icon-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.multi-icon-button.danger:hover,
.multi-icon-button.danger:focus {
  border-color: var(--danger);
  background: rgba(224, 88, 88, 0.82);
}

.multi-panel:fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 10px;
  border: 0;
  border-radius: 0;
  background: #050607;
}

.multi-panel:fullscreen .multi-head {
  height: 44px;
  margin-bottom: 8px;
}

.multi-panel:fullscreen .multi-head p {
  display: none;
}

.multi-panel:fullscreen .multi-head h2 {
  font-size: 18px;
}

.multi-panel:fullscreen .multi-grid {
  height: calc(100vh - 62px);
  gap: 8px;
}

.multi-panel:fullscreen .multi-empty {
  display: none;
}

.multi-panel:fullscreen .multi-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.multi-panel:fullscreen .multi-video-wrap {
  aspect-ratio: auto;
  min-height: 0;
}

.multi-panel:fullscreen .multi-controls {
  grid-template-columns: minmax(70px, 1fr) 30px 30px 30px;
  background: #0d1012;
}

.multi-empty {
  min-height: 0;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 12px;
}

.empty-player {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.empty-player strong {
  color: var(--text);
  font-size: 20px;
}

.player-info {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding-top: 0;
}

#poster {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel-2);
}

#poster[src=""] {
  visibility: hidden;
}

#nowType {
  display: none;
}

#nowTitle {
  font-size: 17px;
  line-height: 1.2;
  margin: 2px 0 0;
  min-width: 140px;
  max-width: min(36vw, 520px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-info > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.player-details {
  display: none;
  margin-top: 8px;
  gap: 8px;
  color: #c7d6e5;
  font-size: 12px;
  line-height: 1.35;
}

.detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-list span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #171b1f;
  color: #d7e2ec;
}

.detail-list b {
  color: var(--muted);
  font-weight: 600;
}

.player-details p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
}

.external-hint {
  color: #d7e7ff !important;
}

.now-epg {
  margin-top: 8px;
  color: #c7d6e5;
  font-size: 13px;
  line-height: 1.35;
}

.epg-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14181b;
}

.epg-panel[hidden] {
  display: none;
}

.epg-panel p {
  color: var(--muted);
  font-size: 12px;
}

.epg-panel h3 {
  margin: 2px 0 0;
  font-size: 15px;
  line-height: 1.2;
}

.epg-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.epg-item {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #0f1214;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.epg-item strong,
.epg-item span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.epg-item strong {
  font-size: 13px;
}

.epg-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.actions {
  display: flex;
  gap: 7px;
  margin-top: 0;
  flex-wrap: wrap;
  align-items: center;
}

.actions button {
  min-height: 34px;
  padding: 0 12px;
}

.player-icon-action {
  width: 38px;
  min-width: 38px;
  padding: 0 !important;
  display: inline-grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
}

.player-icon-action.active {
  border-color: var(--gold);
  background: rgba(244, 197, 66, 0.16);
  color: var(--gold);
}

.actions select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 10px;
}

.content {
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
}

.content-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 280px);
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid rgba(79, 140, 255, 0.28);
  border-radius: 8px;
  background: rgba(14, 19, 25, 0.86);
}

.content-tools[hidden] {
  display: none !important;
}

.content-sort {
  width: min(280px, 100%);
  margin-bottom: 12px;
}

.content-tools .content-sort {
  width: 100%;
  margin-bottom: 0;
}

.content-sort select {
  height: 38px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.section-actions button {
  min-height: 34px;
  padding: 0 12px;
}

#contentToolsButton.active,
#contentSortButton.active {
  border-color: var(--accent);
  background: rgba(23, 178, 106, 0.16);
  color: #c5f6d9;
}

#clearRecentButton {
  border-color: rgba(255, 89, 105, 0.65);
  color: #ffd6db;
}

.section-title h2 {
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.suggestions-title {
  grid-column: 1 / -1;
  color: #f4f7fb;
  font-size: 18px;
  font-weight: 800;
  margin: 2px 0 4px;
}

.item {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  min-height: 292px;
  padding: 12px;
  text-align: left;
  display: grid;
  grid-template-rows: 186px auto;
  gap: 12px;
}

.channel-item {
  min-height: 74px;
  grid-template-rows: 1fr;
  align-items: center;
  padding: 10px 40px 10px 12px;
}

.channel-item .meta strong {
  -webkit-line-clamp: 3;
}

.channel-item .card-tools {
  top: 8px;
  right: 8px;
}

body.live-grid .grid {
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 6px;
}

body.live-grid .channel-item {
  min-height: 52px;
  padding: 7px 26px 7px 8px;
  border-radius: 6px;
}

body.live-grid .channel-item .meta strong {
  font-size: 12px;
  line-height: 1.12;
  -webkit-line-clamp: 3;
}

body.live-grid .channel-item .card-tools {
  top: 5px;
  right: 5px;
  gap: 3px;
}

body.live-grid .channel-item .favorite-toggle,
body.live-grid .channel-item .multi-add {
  min-width: 20px;
  width: 20px;
  height: 20px;
  font-size: 12px;
}

body.remote-nav .item:focus,
body.remote-nav .category:focus,
body.remote-nav .tab:focus,
body.remote-nav .view-filter:focus {
  border-color: #8fc2ff;
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.35), 0 0 22px rgba(79, 140, 255, 0.28);
}

body.remote-nav .item:focus {
  background: #222830;
  transform: translateY(-2px);
}

.item.favorite {
  border-color: rgba(244, 197, 66, 0.7);
}

.series-counts {
  display: block;
  margin-top: 4px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f7fb;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.card-info-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
  color: #dce5ed;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.card-info-line .card-release,
.card-info-line .card-rating {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
  font-size: 11px;
  font-weight: 900;
}

.card-info-line .card-rating {
  border-radius: 5px;
  padding: 1px 6px;
  color: #101315;
}

.card-info-line .rating-low {
  background: #ef4444;
  color: #fff;
}

.card-info-line .rating-mid {
  background: #facc15;
}

.card-info-line .rating-high {
  background: #22c55e;
}

.card-tools {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 6px;
  z-index: 1;
}

.favorite-toggle,
.multi-add,
.resume-badge,
.details-toggle,
.rating-badge {
  min-width: 26px;
  height: 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(5, 6, 7, 0.72);
  color: var(--text);
  font-size: 13px;
}

.favorite-toggle.active {
  color: #111314;
  background: var(--gold);
  border-color: var(--gold);
}

.multi-add {
  color: #111314;
  background: var(--accent);
  border-color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.resume-badge {
  padding: 0 8px;
  font-size: 12px;
  color: #d6e9ff;
}

.details-toggle {
  color: #d6e9ff;
  font-weight: 800;
  font-style: italic;
}

.rating-badge {
  padding: 0 7px;
  color: #111314;
  background: var(--gold);
  border-color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.progress-bar {
  width: 100%;
  height: 4px;
  margin-top: 8px;
  border-radius: 99px;
  background: #30363d;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.watch-progress-label {
  color: #b9d8ec !important;
  font-size: 11px !important;
  font-weight: 700;
  margin-top: 5px !important;
}

.season-divider {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(79, 140, 255, 0.32);
  border-radius: 6px;
  background: rgba(79, 140, 255, 0.1);
  color: #d6e9ff;
  font-size: 13px;
  font-weight: 800;
}

.thumb {
  border-radius: 6px;
  background:
    radial-gradient(circle at 30% 22%, rgba(23, 178, 106, 0.22), transparent 34%),
    linear-gradient(135deg, #101820, #1b242b 52%, #10261f);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #b9d8ec;
  font-weight: 700;
  text-align: center;
  padding: 8px;
}

.fallback-thumb {
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.fallback-thumb span {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.15;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meta {
  min-width: 0;
}

.meta strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.22;
  font-size: 16px;
}

.meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.notice {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
}

.details-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 7, 9, 0.76);
}

.details-card {
  width: min(760px, calc(100vw - 32px));
  max-height: min(82vh, 680px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171b1f;
  padding: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.details-close {
  float: right;
  min-height: 34px;
  padding: 0 12px;
}

.details-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  clear: both;
}

#detailsPoster {
  width: 150px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: var(--panel-2);
}

#detailsType {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

#detailsTitle {
  font-size: 24px;
  line-height: 1.12;
  margin-bottom: 10px;
}

#detailsDescription {
  margin-top: 12px;
  color: #dce5ed;
  line-height: 1.45;
}

.details-modal.details-expanded #detailsRows,
.details-modal.details-expanded #detailsDescription {
  display: none;
}

.details-more-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(4, 6, 9, 0.72);
}

.details-more-panel[hidden] {
  display: none !important;
}

.details-more-meta,
.details-more-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.details-more-meta span,
.details-more-extra span {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #eef4fa;
  font-weight: 800;
  font-size: 13px;
}

.details-more-extra span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #dce5ed;
}

.details-more-extra b {
  color: var(--muted);
}

.details-more-loading {
  color: var(--muted);
  font-weight: 800;
}

.details-more-panel section {
  display: grid;
  gap: 5px;
}

.details-more-panel section strong {
  color: #9aa5b1;
  font-size: 12px;
  letter-spacing: 0;
}

.details-more-panel section p {
  color: #f4f7fb;
  line-height: 1.45;
}

.details-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.series-progress-summary {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(79, 140, 255, 0.28);
  border-radius: 8px;
  background: rgba(13, 18, 24, 0.84);
}

.series-progress-summary[hidden] {
  display: none !important;
}

.series-progress-head,
.series-progress-meta,
.series-season-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.series-progress-head strong {
  color: #f4f7fb;
}

.series-progress-head span,
.series-progress-meta span,
.series-progress-loading {
  color: var(--muted);
  font-size: 12px;
}

.series-progress-bar {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #30363d;
}

.series-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.series-season-list span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #dce5ed;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

.series-season-list b {
  color: #8fc2ff;
}

.details-actions button {
  min-height: 42px;
  padding: 0 16px;
  font-weight: 800;
}

#detailsPlayButton {
  border-color: var(--accent);
  background: rgba(23, 178, 106, 0.2);
  color: #d9ffe8;
}

body.remote-nav #contentToolsButton:focus,
body.remote-nav #contentSortButton:focus,
body.remote-nav #clearRecentButton:focus,
body.remote-nav #detailsPlayButton:focus,
body.remote-nav #detailsMoreButton:focus,
body.remote-nav #detailsBackButton:focus,
body.remote-nav #detailsCloseButton:focus {
  border-color: #8fc2ff;
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.35), 0 0 22px rgba(79, 140, 255, 0.28);
}

body.android-shell .content-tools,
body.tv-shell .content-tools {
  grid-template-columns: 1fr;
}

body.android-shell .section-title,
body.tv-shell .section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

body.android-shell .section-actions,
body.tv-shell .section-actions {
  justify-content: flex-start;
}

body.home-open .home-screen {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: clamp(28px, 5vh, 58px);
  min-height: 100vh;
  padding: clamp(24px, 5vh, 56px) clamp(32px, 7vw, 120px);
}

body.home-open .home-actions-top,
body.projector-shell.home-open .home-actions-top,
body.tv-shell.home-open .home-actions-top {
  order: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
}

body.home-open .home-actions-top .home-footer-brand {
  margin-right: auto;
}

body.home-open .home-actions-top .top-profile,
body.home-open .home-actions-top .logout,
body.home-open .home-actions-top .icon-button {
  min-height: 42px;
}

body.home-open .home-top {
  order: 1;
  width: min(1180px, 100%);
  margin: clamp(18px, 5vh, 60px) auto 0;
}

body.home-open .home-grid {
  order: 2;
  width: min(1180px, 100%);
  margin: 0 auto;
  gap: clamp(28px, 4vw, 54px);
}

body.projector-shell.home-open .home-screen,
body.tv-shell.home-open .home-screen {
  width: 100vw;
  min-width: 100vw;
  padding: clamp(28px, 5vh, 52px) clamp(54px, 7vw, 120px);
  gap: clamp(24px, 5vh, 50px);
}

body.projector-shell.home-open .home-top,
body.tv-shell.home-open .home-top,
body.projector-shell.home-open .home-grid,
body.tv-shell.home-open .home-grid {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

body.projector-shell.home-open .home-grid,
body.tv-shell.home-open .home-grid {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: clamp(34px, 5vw, 72px);
}

@media (orientation: landscape) and (max-height: 560px) {
  body.home-open .home-screen,
  body.projector-shell.home-open .home-screen,
  body.tv-shell.home-open .home-screen {
    padding: 24px 54px;
    gap: 22px;
  }

  body.home-open .home-top {
    margin-top: 20px;
  }

  body.home-open .home-grid,
  body.projector-shell.home-open .home-grid,
  body.tv-shell.home-open .home-grid {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    gap: 32px;
  }
}

@media (max-width: 860px) {
  body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sidebar {
    height: auto;
    max-height: 44vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main {
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .main-tabs {
    padding: 10px 12px 8px;
    grid-template-columns: repeat(3, 1fr);
  }

  .browse-card {
    min-height: 190px;
  }

  .categories {
    max-height: 180px;
  }

  .video-wrap {
    min-height: 180px;
  }

  body.player-open .player {
    grid-template-columns: 1fr;
  }

  body.multi-open .main,
  body.multi-open.player-open .main {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .multi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
  }

  .multi-controls {
    grid-template-columns: minmax(54px, 1fr) 28px 28px 28px;
  }

  .multi-controls input {
    grid-column: auto;
  }

  .epg-panel {
    grid-template-columns: 1fr;
  }

  .player-info {
    grid-template-columns: 54px 1fr;
  }

  #poster {
    width: 54px;
    height: 72px;
  }
}

body.android-shell {
  font-size: 14px;
}

body.android-shell:not(.tv-shell) {
  overflow: auto;
  height: auto;
  min-height: 100vh;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
}

body.android-shell:not(.tv-shell) .sidebar {
  height: auto;
  max-height: none;
  padding: 12px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  overflow-y: visible;
}

body.android-shell:not(.tv-shell) .main {
  height: auto;
  min-height: 0;
  display: block;
  overflow: visible;
}

body.android-shell:not(.tv-shell).player-open .main {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

body.android-shell:not(.tv-shell) .categories {
  max-height: 170px;
}

body.android-shell:not(.tv-shell) .content {
  overflow: visible;
  padding: 12px;
}

body.android-shell:not(.tv-shell).player-open .player {
  display: grid;
  grid-template-columns: 1fr;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  max-height: 58vh;
  overflow: auto;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

body.android-shell:not(.tv-shell) .video-wrap {
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
}

body.android-shell .player-info {
  grid-template-columns: 1fr;
  gap: 8px;
}

body.android-shell #poster,
body.android-shell .player-details,
body.android-shell #copyButton,
body.android-shell #openButton,
body.android-shell #formatSelect {
  display: none !important;
}

body.android-shell #nowTitle {
  font-size: 17px;
  line-height: 1.15;
}

body.android-shell .actions {
  gap: 6px;
}

body.android-shell .actions button,
body.android-shell .actions select {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
}

body.android-shell .grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}

body.android-shell .item {
  min-height: 142px;
  grid-template-rows: 82px auto;
  padding: 7px;
  gap: 7px;
}

body.android-shell .channel-item {
  min-height: 58px;
  grid-template-rows: 1fr;
  padding: 7px 34px 7px 9px;
}

body.android-shell.live-grid .grid,
body.tv-shell.live-grid .grid {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 5px;
}

body.android-shell.live-grid .channel-item,
body.tv-shell.live-grid .channel-item {
  min-height: 42px;
  padding: 5px 23px 5px 7px;
}

body.android-shell.live-grid .channel-item .meta strong,
body.tv-shell.live-grid .channel-item .meta strong {
  font-size: 10px;
  line-height: 1.1;
  -webkit-line-clamp: 2;
}

body.tv-shell .tabs,
body.tv-shell .filter-tabs,
body.tv-shell .search-row {
  gap: 5px;
}

body.tv-shell .tab {
  min-width: 0;
  padding: 0 8px;
}

body.tv-shell .view-filter,
body.tv-shell .icon-filter {
  min-height: 38px;
}

body.tv-shell .category {
  min-height: 34px;
  font-size: 13px;
}

body.android-shell .thumb {
  padding: 8px;
}

body.android-shell .fallback-thumb span {
  font-size: 11px;
  line-height: 1.1;
}

body.android-shell .meta strong {
  font-size: 13px;
  line-height: 1.15;
  -webkit-line-clamp: 2;
}

body.android-shell .meta > span:not(.progress-bar):not(.watch-progress-label):not(.card-info-line) {
  display: none;
}

body.android-shell .favorite-toggle,
body.android-shell .multi-add,
body.android-shell .details-toggle,
body.android-shell .rating-badge {
  min-width: 23px;
  width: 23px;
  height: 23px;
  font-size: 13px;
}

body.android-shell .rating-badge {
  width: auto;
  padding: 0 5px;
  font-size: 11px;
}

body.android-shell .details-modal {
  padding: 10px;
}

body.android-shell .details-card {
  width: calc(100vw - 20px);
  max-height: calc(100vh - 20px);
}

body.android-shell .details-body {
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
}

body.android-shell #detailsPoster {
  width: 86px;
}

body.android-shell #detailsTitle {
  font-size: 18px;
}

body.tv-shell {
  grid-template-columns: clamp(230px, 24vw, 290px) minmax(0, 1fr);
  font-size: 14px;
}

body.tv-shell .sidebar {
  padding: 12px;
  gap: 10px;
  overflow: hidden;
  overflow-x: hidden;
}

body.tv-shell .main-tabs {
  padding: 10px 14px 8px;
  grid-template-columns: repeat(3, minmax(92px, 150px));
  gap: 8px;
}

body.tv-shell .brand-mark {
  width: 38px;
  height: 38px;
}

body.tv-shell .brand h1 {
  font-size: 18px;
}

body.tv-shell .tab,
body.tv-shell .field input,
body.tv-shell .field select {
  height: 38px;
}

body.tv-shell .view-filter,
body.tv-shell .icon-filter,
body.tv-shell .wide-action {
  min-height: 34px;
}

body.tv-shell .category {
  min-height: 30px;
  padding: 6px 8px;
}

body.tv-shell .categories {
  flex: 1;
  max-height: none;
  gap: 5px;
  padding-right: 6px;
}

body.tv-shell .browse-card {
  padding: 8px;
  gap: 7px;
}

body.tv-shell.player-open .player {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 20;
}

body.tv-shell .player-topbar button,
body.tv-shell .actions button,
body.tv-shell .actions select {
  min-height: 32px;
  padding: 0 10px;
}

body.tv-shell .player-icon-action {
  width: 38px;
  min-width: 38px;
  padding: 0 !important;
}

body.tv-shell .video-wrap {
  height: min(33vh, 300px);
  min-height: 170px;
}

body.tv-shell #nowTitle {
  font-size: 18px;
}

body.tv-shell .player-details {
  font-size: 11px;
  gap: 6px;
}

body.tv-shell .detail-list span {
  min-height: 22px;
  padding: 2px 6px;
}

body.tv-shell .player-details p {
  max-height: 48px;
  overflow: hidden;
}

body.tv-shell .epg-panel {
  grid-template-columns: 120px minmax(0, 1fr);
  padding: 8px 10px;
}

body.tv-shell .content {
  padding: 12px 14px;
}

body.tv-shell .section-title {
  margin-bottom: 10px;
}

body.tv-shell .section-title h2 {
  font-size: 21px;
}

body.tv-shell .grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}

body.tv-shell .item {
  min-height: 142px;
  grid-template-rows: 82px auto;
  padding: 7px;
}

body.tv-shell .meta strong {
  font-size: 13px;
}

body.tv-shell .meta > span:not(.progress-bar):not(.watch-progress-label) {
  display: none;
}

body.tv-shell .progress-bar {
  font-size: 11px;
}

body.tv-shell .details-body {
  grid-template-columns: 120px minmax(0, 1fr);
}

body.tv-shell #detailsPoster {
  width: 120px;
}

body.tv-shell .multi-panel {
  padding: 10px 14px;
}

body.tv-shell .multi-grid {
  gap: 8px;
}

body.tv-shell .multi-controls {
  grid-template-columns: minmax(54px, 1fr) 28px 28px 28px;
}

body.tv-shell .multi-controls input {
  grid-column: auto;
}

body.android-shell .multi-close-x,
body.tv-shell .multi-close-x {
  width: 40px;
  height: 40px;
  min-height: 40px;
  font-size: 26px;
}

@media (max-height: 740px) and (min-width: 861px) {
  body:not(.android-shell) {
    grid-template-columns: 300px 1fr;
  }

  .sidebar {
    padding: 12px 14px;
    gap: 10px;
  }

  body.player-open .player {
    padding: 10px 14px;
  }

  .video-wrap {
    height: min(32vh, 270px);
    min-height: 170px;
  }

  .content {
    padding: 14px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
  }

  .item {
    min-height: 250px;
    grid-template-rows: 154px auto;
  }
}

@media (max-width: 560px) {
  .profile-gate {
    padding: 12px;
  }

  .profile-card {
    padding: 16px;
  }

  .brand {
    gap: 10px;
  }

  .tabs,
  .filter-tabs {
    gap: 6px;
  }

  .player-info {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  #poster {
    width: 48px;
    height: 64px;
  }

  #nowTitle {
    font-size: 17px;
  }

  .actions {
    gap: 6px;
  }

  .actions button,
  .actions select {
    min-height: 32px;
    padding: 0 9px;
    font-size: 13px;
  }

  .section-title {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  body.android-shell:not(.tv-shell) .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  body.android-shell:not(.tv-shell) .item {
    min-height: 214px;
    grid-template-rows: 128px auto;
  }
}

/* Camada final de encaixe para celular, tablet e mini projetor Android. */
body.android-shell.home-open {
  min-height: 100vh;
  overflow: hidden;
}

body.android-shell.home-open .home-screen {
  min-height: 100vh;
  width: 100%;
  padding: 18px;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 22px;
}

body.android-shell.home-open .home-actions-top {
  width: 100%;
  max-width: 1180px;
  min-width: 0;
  gap: 10px;
}

body.android-shell.home-open .home-clock {
  white-space: nowrap;
}

body.android-shell.home-open .home-grid {
  width: 100%;
  max-width: 1180px;
  align-self: center;
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  gap: clamp(18px, 4vw, 46px);
}

body.android-shell.home-open .home-tile {
  width: 100%;
  min-width: 0;
  height: 190px;
  height: clamp(150px, 28vh, 230px);
  padding: 22px;
  padding: clamp(16px, 3vh, 28px);
}

body.android-shell.home-open .home-icon {
  width: 62px;
  height: 62px;
  width: clamp(50px, 8vh, 72px);
  height: clamp(50px, 8vh, 72px);
}

body.android-shell.home-open .home-tile strong {
  font-size: 34px;
  font-size: clamp(28px, 5vh, 40px);
}

body.android-shell.home-open .home-tile small {
  font-size: 14px;
  font-size: clamp(13px, 2.4vh, 16px);
}

body.android-shell.projector-shell:not(.home-open),
body.android-shell.tv-shell:not(.home-open) {
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-columns: clamp(260px, 24vw, 330px) minmax(0, 1fr);
  grid-template-rows: 1fr;
}

body.android-shell.projector-shell:not(.home-open) .sidebar,
body.android-shell.tv-shell:not(.home-open) .sidebar {
  height: 100vh;
  max-height: none;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 0;
  overflow: hidden;
}

body.android-shell.projector-shell:not(.home-open) .categories,
body.android-shell.tv-shell:not(.home-open) .categories {
  max-height: none;
  min-height: 0;
  overflow-y: auto;
}

body.android-shell.projector-shell:not(.home-open) .main,
body.android-shell.tv-shell:not(.home-open) .main {
  height: 100vh;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

body.android-shell.projector-shell:not(.home-open) .content,
body.android-shell.tv-shell:not(.home-open) .content {
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  padding: clamp(12px, 2vw, 20px);
}

body.android-shell.projector-shell:not(.home-open) .section-title,
body.android-shell.tv-shell:not(.home-open) .section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

body.android-shell.projector-shell:not(.home-open) .section-actions,
body.android-shell.tv-shell:not(.home-open) .section-actions {
  justify-content: flex-end;
}

body.android-shell.projector-shell:not(.home-open) .grid,
body.android-shell.tv-shell:not(.home-open) .grid {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

body.android-shell.projector-shell:not(.home-open) .item,
body.android-shell.tv-shell:not(.home-open) .item {
  min-height: 166px;
  grid-template-rows: 94px auto;
  padding: 8px;
}

body.android-shell.projector-shell:not(.home-open).live-grid .grid,
body.android-shell.tv-shell:not(.home-open).live-grid .grid {
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 8px;
}

body.android-shell.projector-shell:not(.home-open).live-grid .channel-item,
body.android-shell.tv-shell:not(.home-open).live-grid .channel-item {
  min-height: 56px;
  padding: 8px 30px 8px 9px;
}

body.android-shell.projector-shell:not(.home-open).player-open .player,
body.android-shell.tv-shell:not(.home-open).player-open .player {
  position: static;
  max-height: none;
  box-shadow: none;
}

@media (orientation: portrait) and (max-width: 900px) {
  body.android-shell.home-open {
    overflow: auto;
  }

  body.android-shell.home-open .home-screen {
    min-height: 100svh;
    overflow: visible;
    grid-template-rows: auto auto;
    align-content: start;
    gap: 22px;
  }

  body.android-shell.home-open .home-actions-top {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  body.android-shell.home-open .home-footer-brand {
    flex: 1 1 100%;
  }

  body.android-shell.home-open .home-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    align-self: start;
  }

  body.android-shell.home-open .home-tile {
    height: clamp(124px, 18vh, 168px);
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 18px;
  }

  body.android-shell:not(.home-open) {
    height: auto;
    min-height: 100vh;
    overflow: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  body.android-shell:not(.home-open) .sidebar {
    height: auto;
    max-height: 42vh;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  body.android-shell:not(.home-open) .categories {
    max-height: 30vh;
  }

  body.android-shell:not(.home-open) .main {
    height: auto;
    display: block;
    overflow: visible;
  }

  body.android-shell:not(.home-open) .content {
    overflow: visible;
    padding: 12px;
  }

  body.android-shell:not(.home-open) .section-title {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.android-shell:not(.home-open) .section-actions {
    justify-content: flex-start;
    gap: 8px;
  }

  body.android-shell:not(.home-open) .grid {
    grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
    gap: 9px;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  body.android-shell.home-open .home-screen {
    padding: 16px 42px;
    padding: 16px 42px;
    gap: 14px;
  }

  body.android-shell.home-open .home-grid {
    gap: 28px;
  }

  body.android-shell.home-open .home-tile {
    height: 136px;
    height: clamp(112px, 34vh, 150px);
    padding: 14px;
  }

  body.android-shell.home-open .home-icon {
    width: 48px;
    height: 48px;
  }

  body.android-shell.home-open .home-tile strong {
    font-size: 28px;
  }
}

@media (min-width: 901px) and (max-width: 1180px) and (orientation: portrait) {
  body.android-shell.home-open .home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.android-shell.home-open .home-tile {
    height: 190px;
    height: clamp(170px, 22vh, 220px);
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

/* Cards maiores para Android: menos itens por tela e capas legiveis em tablet/projetor. */
body.android-shell:not(.home-open):not(.live-grid) .grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

body.android-shell:not(.home-open):not(.live-grid) .item {
  min-height: 286px;
  grid-template-rows: 178px auto;
  padding: 12px;
  gap: 11px;
}

body.android-shell:not(.home-open):not(.live-grid) .thumb {
  padding: 7px;
}

body.android-shell:not(.home-open):not(.live-grid) .meta strong {
  font-size: 14px;
  line-height: 1.16;
  -webkit-line-clamp: 3;
}

body.android-shell:not(.home-open):not(.live-grid) .meta > span:not(.progress-bar):not(.watch-progress-label) {
  display: block;
  font-size: 11px;
  line-height: 1.2;
}

body.android-shell.projector-shell:not(.home-open):not(.live-grid) .grid,
body.android-shell.tv-shell:not(.home-open):not(.live-grid) .grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

body.android-shell.projector-shell:not(.home-open):not(.live-grid) .item,
body.android-shell.tv-shell:not(.home-open):not(.live-grid) .item {
  min-height: 340px;
  grid-template-rows: 222px auto;
  padding: 14px;
  gap: 12px;
}

body.android-shell.projector-shell:not(.home-open):not(.live-grid) .thumb,
body.android-shell.tv-shell:not(.home-open):not(.live-grid) .thumb {
  padding: 8px;
}

body.android-shell.projector-shell:not(.home-open):not(.live-grid) .meta strong,
body.android-shell.tv-shell:not(.home-open):not(.live-grid) .meta strong {
  font-size: 16px;
  line-height: 1.17;
}

@media (orientation: portrait) and (max-width: 900px) {
  body.android-shell:not(.home-open):not(.live-grid) .grid {
    grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
    gap: 12px;
  }

  body.android-shell:not(.home-open):not(.live-grid) .item {
    min-height: 244px;
    grid-template-rows: 150px auto;
    padding: 10px;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  body.android-shell.projector-shell:not(.home-open):not(.live-grid) .grid,
  body.android-shell.tv-shell:not(.home-open):not(.live-grid) .grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
  }

  body.android-shell.projector-shell:not(.home-open):not(.live-grid) .item,
  body.android-shell.tv-shell:not(.home-open):not(.live-grid) .item {
    min-height: 286px;
    grid-template-rows: 178px auto;
    padding: 12px;
  }
}
