.tv-screen {
  --g-bg: #0a0f5c;
  --g-cell: #1b2a9e;
  --g-hi: #ffe94a;
  --g-time: #ffe94a;
  --g-chan: #ffe94a;
  --g-prog: #ffffff;
  --g-info: #3448d1;
  --top-space: calc(clamp(4px, 1vw, 10px) + min(35vw, 240px) * 0.31 + 2px);
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: #000;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
.tv-screen.is-guide { background: var(--g-bg); }
.tv-screen.is-guide::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: max(var(--top-space), env(safe-area-inset-top, 0px));
  background: #050834;
  pointer-events: none;
}
@media (orientation: landscape) and (max-height: 860px) and (hover: none) and (pointer: coarse) {
  .tv-screen { --top-space: 0px; }
}

.tv-safe {
  position: absolute;
  left: env(safe-area-inset-left, 0px);
  right: env(safe-area-inset-right, 0px);
  top: max(var(--top-space), env(safe-area-inset-top, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  container-type: size;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 700;
  color: var(--g-prog);
}
.tv-screen.is-watch .tv-safe {
  top: env(safe-area-inset-top, 0px);
  bottom: env(safe-area-inset-bottom, 0px);
}
.tv-screen.is-watch .tv-picture { inset: calc(-1 * env(safe-area-inset-top, 0px)) 0 calc(-1 * env(safe-area-inset-bottom, 0px)); }

.tv-shadow { text-shadow: 0.1em 0.1em 0 #000; }

.tv-picture {
  position: absolute;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}
.tv-screen.is-guide .tv-picture {
  left: 1.2cqw;
  top: 2cqh;
  width: 56cqw;
  height: 50cqh;
  box-shadow: 0 0 0 0.35cqh #5d6fe6;
}
.tv-picture video,
.tv-picture .tv-yt,
.tv-picture .tv-yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000;
}
.tv-picture .tv-yt { pointer-events: none; }
.tv-picture [hidden] { display: none !important; }
.tv-channel-watermark {
  position: absolute;
  z-index: 5;
  right: auto;
  bottom: 3%;
  display: block;
  width: clamp(21px, 8.25%, 82.5px);
  aspect-ratio: 1;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.tv-channel-watermark.is-visible { opacity: 0.5; }
@media (prefers-reduced-motion: reduce) {
  .tv-channel-watermark { transition: none; }
}
.tv-shield {
  position: absolute;
  inset: 0;
  z-index: 3;
}
.tv-picture .tv-burst,
.tv-burst {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.tv-picture .tv-power-on {
  position: absolute;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.28s ease;
}
.tv-picture .tv-power-on.is-fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .tv-picture .tv-power-on { transition: none; }
}

.tv-card {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  padding: 6%;
  text-align: center;
  background: var(--g-info);
  color: #fff;
  font-size: max(9px, 5cqh);
  line-height: 1.1;
}
.tv-screen.is-guide .tv-card { font-size: max(8px, 3.6cqh); }
.tv-card .tc-big { font-size: 2.1em; color: var(--g-time); }
.tv-card .tc-small { font-size: 0.8em; opacity: 0.9; }
.tv-card.is-bars {
  background: linear-gradient(90deg, #c0c0c0 0 14.28%, #c0c000 0 28.57%, #00c0c0 0 42.85%, #00c000 0 57.14%, #c000c0 0 71.42%, #c00000 0 85.71%, #0000c0 0);
}
.tv-card.is-bars .tc-label {
  padding: 0.3em 0.8em;
  background: #000;
}

.tv-info {
  position: absolute;
  left: 58.6cqw;
  top: 2cqh;
  right: 1.2cqw;
  height: 50cqh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8cqh;
  box-sizing: border-box;
  padding: 1.5cqh 2cqw;
  overflow: hidden;
  background: var(--g-info);
  box-shadow: 0 0 0 0.35cqh #5d6fe6;
  font-size: max(9px, min(3.1cqh, 2.5cqw));
  line-height: 1.12;
  text-align: center;
}
.tv-info .ti-ch { display: flex; align-items: center; justify-content: center; gap: 0.42em; color: var(--g-chan); font-size: 1.15em; }
.tv-info .ti-ch span { display: block; }
.tv-info .ti-ch .ti-channel-logo { display: block; flex: 0 0 auto; width: clamp(40px, 8cqh, 88px); height: clamp(40px, 8cqh, 88px); box-sizing: border-box; margin: 0; padding-left: 0.3em; border-left: 1px solid rgba(220, 222, 232, 0.58); object-fit: contain; }
@media (min-aspect-ratio: 1 / 1) {
  .tv-info .ti-ch { font-size: 2.3em; }
  .tv-info .ti-ch .ti-channel-logo {
    width: clamp(80px, 16cqh, 176px);
    height: clamp(80px, 16cqh, 176px);
  }
}
.tv-info .ti-title {
  font-size: 1.45em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  min-height: 0;
  flex: 0 1 auto;
}
.tv-info .ti-time { opacity: 0.92; }
.tv-info .ti-tag { color: var(--g-time); font-size: 0.8em; letter-spacing: 0.06em; }
.tv-info .ti-bar {
  display: none;
  height: 1.3cqh;
  min-height: 3px;
  margin: 0 8%;
  background: rgba(0, 0, 0, 0.45);
}
.tv-info .ti-bar i { display: block; height: 100%; background: var(--g-time); }
.tv-info .ti-next {
  font-size: 0.82em;
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.tv-btn {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 0.25em 0.7em;
  border: 0.18em solid #000;
  background: var(--g-hi);
  color: #000;
  font: inherit;
  font-size: 1em;
  line-height: 1.1;
  cursor: pointer;
  touch-action: manipulation;
}
.tv-btn:active { transform: translateY(1px); }
.tv-info .tv-btn { align-self: center; }
.tv-info .ti-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-self: center;
  gap: 0.5em;
}
.tv-btn.tv-btn-od { background: #000; color: #fff; }
.tv-info .ti-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.tv-info .ti-btns .tv-btn,
.tv-screen.is-guide .tv-info .ti-btns .tv-btn { grid-area: auto; align-self: stretch; justify-self: stretch; white-space: nowrap; text-align: center; }

.tv-grid {
  position: absolute;
  left: 1.2cqw;
  right: 1.2cqw;
  top: 54.5cqh;
  bottom: 1.6cqh;
  display: flex;
  flex-direction: column;
  font-size: max(8px, min(4.3cqh, 2.9cqw));
  line-height: 1.08;
}
.tv-grid-head,
.tv-row {
  position: relative;
  display: flex;
  flex: none;
}
.tv-grid-head { height: 8.5cqh; }
.tv-grid-rows {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
}
.tv-grid-rows::-webkit-scrollbar { display: none; }
.tv-row {
  height: calc((100cqh - 54.5cqh - 1.6cqh - 8.5cqh) / 3);
  scroll-snap-align: start;
  cursor: pointer;
}
.tv-cell {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 0.35em;
  border: 0.32cqh solid;
  border-color: #6b7cf0 #0a1150 #0a1150 #6b7cf0;
  background: var(--g-cell);
}
.tv-grid-head .tv-cell {
  justify-content: center;
  color: var(--g-time);
  white-space: nowrap;
}
.tv-head-clock { color: #cfd6ff !important; }
.tv-col-chan { flex: 0 0 19%; }
.tv-col-time { flex: 1 1 0; }
.tv-row .tv-col-chan {
  flex-direction: row;
  justify-content: center;
  gap: 0.25em;
  color: var(--g-chan);
  text-align: center;
  line-height: 1.05;
}
.tv-col-chan > span:first-child { flex: 0 0 auto; }
.tv-col-chan .tc-short {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tv-col-chan .tc-short[data-logo] {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: clamp(12px, 3.5cqh, 26px);
  height: clamp(12px, 3.5cqh, 26px);
  box-sizing: border-box;
  margin: 0;
}
.tv-col-chan .tc-short[data-logo]::before {
  content: "";
  position: absolute;
  left: 0.12em;
  top: -50%;
  bottom: -50%;
  width: 2px;
  background: rgba(220, 222, 232, 0.58);
}
.tv-col-chan .tc-logo { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (min-aspect-ratio: 1 / 1) {
  .tv-col-chan { flex-basis: 14%; }
  .tv-col-chan .tc-short[data-logo] {
    width: clamp(24px, 4cqh, 36px);
    height: clamp(24px, 4cqh, 36px);
  }
}
.tv-track {
  position: relative;
  flex: 1 1 auto;
}
.tv-prog {
  position: absolute;
  top: 0;
  bottom: 0;
  align-items: flex-start;
  padding-top: 0.15em;
  color: var(--g-prog);
}
.tv-prog span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.tv-prog.is-now { background: color-mix(in srgb, var(--g-cell) 75%, #fff 25%); }
.tv-page-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 6%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--g-time);
  font: inherit;
  cursor: pointer;
  text-shadow: 0.1em 0.1em 0 #000;
}
.tv-page-btn[disabled] { opacity: 0.25; cursor: default; }
.tv-page-prev { left: 19%; }
.tv-page-next { right: 0; }
.tv-empty-row {
  padding: 1em;
  color: var(--g-prog);
  text-align: center;
}

.tv-banner {
  flex-wrap: nowrap;
  row-gap: 0;
  position: absolute;
  z-index: 6;
  left: 2.5cqw;
  right: 2.5cqw;
  bottom: 3cqh;
  display: flex;
  align-items: center;
  gap: 1.2cqw;
  padding: 1.4cqh 2cqw;
  border-radius: 1cqh;
  background: rgba(14, 15, 20, 0.9);
  box-shadow: 0 0.6cqh 2.4cqh rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: "Gratis Neue", "Helvetica Neue", Arial, sans-serif;
  font-stretch: normal;
  font-weight: 400;
  font-size: max(9px, min(2.5cqh, 1.5cqw));
  line-height: 1.2;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.tv-screen.is-watch .tv-banner.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.tv-screen.is-guide .tv-banner { display: none; }
.tb-ch {
  flex: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  min-width: 5.5em;
  gap: 0.25em;
  padding-right: 0.05em;
  border-right: 0;
}
.tb-num { font-size: 2.7em; font-weight: 700; line-height: 1; }
.tb-short {
  position: relative;
  display: block;
  width: 3.4em;
  height: 4.1em;
  margin: 0;
  box-sizing: border-box;
  color: #b9bcc8;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: translateY(0.12em);
}
.tb-short[data-logo]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11%;
  bottom: 11%;
  width: 1px;
  background: rgba(220, 222, 232, 0.58);
}
.tv-channel-logo { display: block; width: 100%; height: 100%; object-fit: contain; }
.tb-short .tv-channel-logo { object-fit: cover; object-position: center; }
.tb-short:not([data-logo]) { width: auto; height: auto; }
.tb-main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4em;
}
.tb-title,
.tb-next {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-titlerow {
  /* Use spare space before the top button row without widening the metadata column. */
  width: calc(100% + var(--tb-title-extra, 0px));
  display: flex;
  align-items: center;
  gap: 0.6em;
  min-width: 0;
}
.tb-title { flex: 0 1 auto; min-width: 0; font-size: 1.5em; font-weight: 700; }
.tb-meta {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  gap: 0.8em;
  color: #c9ccd6;
  font-size: 0.9em;
  white-space: nowrap;
}
.tb-tag {
  flex: none;
  white-space: nowrap;
  padding: 0.1em 0.5em;
  border-radius: 0.3em;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.85em;
}
.tb-tag[hidden] { display: none; }
.tb-live { flex: none; display: inline-flex; align-items: center; gap: 0.35em; padding: 0.1em 0.5em; border-radius: 0.3em; background: rgba(255, 30, 50, 0.18); color: #ff4d5e; font-size: 0.85em; font-weight: 800; letter-spacing: 0.06em; white-space: nowrap; }
.tb-live i { width: 0.6em; height: 0.6em; border-radius: 50%; background: #ff2a3c; box-shadow: 0 0 0.5em #ff2a3c; animation: tb-live-pulse 1.4s ease-in-out infinite; }
.tb-live[hidden] { display: none; }
.tb-viewers { display: inline-flex; align-items: center; gap: 0.3em; flex: none; color: #c9ccd6; font-size: 0.85em; white-space: nowrap; }
.tb-viewers::before { content: ""; flex: none; width: 1em; height: 1em; background: #ff2a3c; -webkit-mask: url("/assets/live/viewers-person.webp?v=1") center / contain no-repeat; mask: url("/assets/live/viewers-person.webp?v=1") center / contain no-repeat; image-rendering: pixelated; }
.tb-viewers[hidden] { display: none; }
.tb-viewers-dock { display: none; }
@media (min-aspect-ratio: 1001 / 1000) {
  @container (min-width: 561px) {
    .tb-viewers-inline { display: none; }
    .tb-viewers-dock:not([hidden]) {
      display: inline-flex;
      grid-area: 1 / 8 / 2 / 9;
      align-self: center;
      justify-self: center;
      min-width: 0;
      gap: 0.2em;
    }
    .tb-btns:has(> .q-wrap[hidden]) .tb-viewers-dock { grid-area: 1 / 7 / 2 / 8; }
    .tb-btns:has(> .q-wrap[hidden]) .tb-row2 { grid-column-end: 7; }
  }
}
@keyframes tb-live-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .tb-live i { animation: none; } }
.tb-next { color: #9ea2b0; font-size: 0.85em; }
.tb-next b { color: #d7d9e0; font-weight: 600; }
.tb-side {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.35em;
}
.tb-clock { display: none; font-size: 1.1em; font-variant-numeric: tabular-nums; }
.tb-btns {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.4em 0.5em;
  width: 100%;
}
.tb-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5em;
  grid-area: 1 / 2 / 2 / 8;
}
.tb-btn {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 0.45em 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.4em;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 0.95em;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}
.tb-btn:hover { background: rgba(255, 255, 255, 0.22); }
.tb-btn:disabled, .tb-btn:disabled:hover { opacity: 0.35; background: rgba(255, 255, 255, 0.1); cursor: default; }
.tb-btn[data-act="sound"] { min-width: 5.5em; text-align: center; }
@media (min-width: 900px) {
  .tv-banner {
    left: 15cqw;
    right: 15cqw;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .tv-banner {
    left: max(15cqw, env(safe-area-inset-left, 0px));
    right: max(15cqw, env(safe-area-inset-right, 0px));
    font-size: max(12px, min(3.2cqh, 1.95cqw));
  }
}
@container (max-width: 560px) {
  .tv-banner {
    flex-wrap: wrap;
    row-gap: 0.7em;
    font-size: max(10px, 3.3cqw);
  }
  .tb-main { flex: 1 1 0; }
  .tb-side {
    flex: 1 1 100%;
    flex-direction: row;
    justify-content: center;
  }
  .tb-btns {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    width: auto;
  }
  .tb-row2 {
    display: contents;
    grid-area: auto;
  }
  .tb-btn { flex: 1 1 28%; padding: 0.7em 0; font-size: 1.15em; }
  .tb-clock, .tb-next { display: none; }
}


.tv-hint {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0.35em 0.8em;
  border: 0.15em solid #fff;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: max(10px, 5.5cqh);
  white-space: nowrap;
  pointer-events: none;
}
.tv-screen.is-guide .tv-hint {
  left: 29.2cqw;
  top: 27cqh;
  font-size: max(9px, 3.6cqh);
}
.tv-hint[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .tv-banner { transition: none; }
}

.tv-screen.is-watch .tv-info,
.tv-screen.is-watch .tv-grid { display: none; }

@media (max-aspect-ratio: 1 / 1) {
  .tv-screen.is-guide .tv-safe {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 0 2px;
  }
  .tv-screen.is-guide .tv-picture {
    position: relative;
    inset: auto;
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    box-shadow: none;
  }
  .tv-screen.is-guide .tv-info {
    position: relative;
    inset: auto;
    flex: none;
    height: auto;
    margin: 0 8px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "ch title btn" "ch time btn";
    align-items: center;
    gap: 2px 10px;
    padding: 8px 10px;
    text-align: left;
  }
  .tv-screen.is-guide .tv-info .ti-ch {
    grid-area: ch;
    text-align: center;
    line-height: 1.05;
  }
  .tv-screen.is-guide .tv-info .ti-ch span { display: block; }
  .tv-screen.is-guide .tv-info .ti-title {
    grid-area: title;
    align-self: end;
    font-size: 1.15em;
    line-height: 1.1;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .tv-screen.is-guide .tv-info .ti-time { align-self: start; }
  .tv-screen.is-guide .tv-info .ti-time { grid-area: time; font-size: 0.85em; }
  .tv-screen.is-guide .tv-info .ti-bar { display: none; }
  .tv-screen.is-guide .tv-info .ti-next,
  .tv-screen.is-guide .tv-info .ti-tag { display: none; }
  .tv-screen.is-guide .tv-info .tv-btn { grid-area: btn; font-size: 0.9em; }
  .tv-screen.is-guide .tv-info .ti-btns {
    grid-area: btn;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }
  .tv-screen.is-guide .tv-info .ti-btns { grid-template-columns: 1fr; }
  .tv-screen.is-guide .tv-info .ti-btns .tv-btn { padding-top: 0.75em; padding-bottom: 0.75em; }
  .tv-screen.is-guide .tv-grid {
    position: relative;
    inset: auto;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 8px;
  }
  .tv-screen.is-guide .tv-grid-rows {
    display: flex;
    flex-direction: column;
  }
  .tv-screen.is-guide .tv-row {
    flex: 1 0 auto;
    min-height: max(52px, 15cqw);
    height: auto;
  }
}
@container (max-aspect-ratio: 1 / 1) {
  .tv-info { font-size: max(12px, min(4cqw, 3cqh)); }
  .tv-grid { font-size: max(11px, 3.6cqw); }
  .tv-grid-head { height: max(30px, 9cqw); }
  .tv-row { height: max(52px, 15cqw); }
  .tv-screen.is-guide .tv-hint {
    left: 50cqw;
    top: 28cqw;
    font-size: max(10px, 4cqw);
  }
  .tv-card { font-size: max(10px, 4.4cqw); }
  .tv-screen.is-guide .tv-card { font-size: max(9px, 3.6cqw); }
}
@container (max-aspect-ratio: 1 / 1) {
  .tv-hint { font-size: max(10px, 4.6cqw); }
}
.tv-screen.is-watch .tv-hint { top: 22cqh; }
.tv-screen.is-watch .tv-shield { touch-action: none; }
.tv-grid-rows.is-crawling { scroll-snap-type: none; }
@media (min-aspect-ratio: 1 / 1) {
  .tv-screen { --top-space: calc(clamp(4px, 1vw, 10px) + min(35vw, 240px) * 0.31 + 12px); }
  .tv-screen.is-guide .tv-picture,
  .tv-screen.is-guide .tv-info { top: 0.6cqh; }
}
@media (orientation: landscape) and (max-height: 860px) and (hover: none) and (pointer: coarse) {
  .tv-screen { --top-space: 0px; }
}
.tv-grid-rows {
  overflow-x: hidden;
  touch-action: pan-y;
}
.tv-track { overflow: hidden; }
.tv-grid { overflow: hidden; }
.tv-screen.is-guide .tv-picture { cursor: default; }
.tv-picture.is-tuning #tvVideo,
.tv-picture.is-tuning .tv-yt { opacity: 0; }

.tv-btn:active { background: #fff; color: #000; }
.tv-page-btn:not([disabled]):active { color: var(--g-hi); }
@media (hover: hover) and (pointer: fine) {
  .tv-btn:hover { background: #fff; color: #000; }
  .tv-page-btn:not([disabled]):hover { color: var(--g-hi); }
}

.q-wrap { position: relative; display: flex; }
.q-wrap[hidden] { display: none; }
.q-btn { min-width: 4.4em; }
.q-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 6em;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.4em;
  background: #0e0f14;
  box-shadow: 0 0.4em 1.2em rgba(0, 0, 0, 0.5);
  transform: translateZ(0);
}
.tv-banner:has(.q-menu:not([hidden])) { z-index: 8; }
.q-menu[hidden] { display: none; }
.q-menu button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 0.5em 0.9em;
  border: 0;
  border-radius: 0.3em;
  background: none;
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.q-menu button.is-active { background: #fff; color: #000; }
@media (hover: hover) and (pointer: fine) {
  .q-menu button:hover { background: #fff; color: #000; }
}
@container (max-width: 560px) {
  .tb-btns { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.4em 0.5em; }
  .tb-btns .tb-btn { min-width: 0; }
  .tb-btns > .q-wrap > .tb-btn { width: 100%; min-width: 0; }
  .tb-btns > .tb-btn[data-act="up"] { grid-area: 1 / 1 / 2 / 3; }
  .tb-btns > .tb-btn[data-act="down"] { grid-area: 1 / 3 / 2 / 5; }
  .tb-btns > .q-wrap { grid-area: 1 / 5 / 2 / 9; }
  .tb-btns > .tb-btn[data-act="sound"] { grid-area: 1 / 9 / 2 / 13; }
  .tb-btns .tb-btn[data-act="guide"] { grid-area: 2 / 1 / 3 / 6; }
  .tb-btns .tb-btn[data-act="ondemand-here"] { grid-area: 2 / 6 / 3 / 11; }
  .tb-btns .tb-full { grid-area: 2 / 11 / 3 / 13; }
  .tb-btns:has(> .q-wrap[hidden]) > .tb-btn[data-act="sound"] { grid-area: 1 / 5 / 2 / 13; }
  .tb-btns:has(.tb-full[hidden]) .tb-btn[data-act="ondemand-here"] { grid-area: 2 / 6 / 3 / 13; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .tv-banner { row-gap: 0.4em; padding-top: 1.2cqh; padding-bottom: 1.2cqh; }
  .tb-btn { padding-top: 0.4em; padding-bottom: 0.4em; }
}
.tv-btn {
  border-width: 2px;
  border-style: solid;
  border-radius: 0;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.25), inset -2px -2px 0 rgba(0, 0, 0, 0.24), 3px 3px 0 rgba(0, 0, 0, 0.58);
}
.tv-btn { border-color: #000; }
.tv-btn:focus-visible { outline: none; background: #fff; color: #000; }
.tv-btn:active {
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.24), inset -2px -2px 0 rgba(255, 255, 255, 0.25);
  transform: translate(2px, 2px);
}
.tb-btn[hidden] { display: none; }
html:not(.tv-watching):not(.tv-ondemand):not(.tv-embed) body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 42%, rgba(0, 0, 0, 0.65) 75%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, #000 42%, rgba(0, 0, 0, 0.65) 75%, transparent 100%);
}
@container (min-width: 561px) {
  .tb-btns {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.4em 0.5em;
  }
  .tb-btns > .tb-btn[data-act="up"] { grid-area: 2 / 1 / 3 / 3; }
  .tb-btns > .tb-btn[data-act="down"] { grid-area: 2 / 3 / 3 / 5; }
  .tb-btns > .q-wrap { grid-area: 2 / 5 / 3 / 7; }
  .tb-btns > .tb-btn[data-act="sound"] { grid-area: 2 / 7 / 3 / 9; }
  .tb-btns .tb-btn { min-width: 0; line-height: 1.2; padding-left: 0.45em; padding-right: 0.45em; }
  .tb-btns > .tb-btn[data-act="up"],
  .tb-btns > .tb-btn[data-act="down"] { padding-left: 0; padding-right: 0; }
  .tb-row2 { grid-template-columns: 1fr 1fr auto; gap: 0.5em; }
  .tb-row2 > .tb-full { width: calc(1.84em + 2px); padding: 0; }
  .tb-btns > .q-wrap > .tb-btn { width: 100%; min-width: 0; }
  .tb-btns:has(> .q-wrap[hidden]) { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .tb-btns:has(> .q-wrap[hidden]) > .tb-btn[data-act="sound"] { grid-area: 2 / 5 / 3 / 7; }
}
@font-face {
  font-family: "Gratis Neue";
  src: url("/Gratis%20Neue.otf") format("opentype");
  font-display: swap;
}
.tv-credit {
  position: absolute;
  z-index: 4;
  left: 4.5%;
  bottom: 9%;
  max-width: 60%;
  color: #fff;
  font-family: "Gratis Neue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(16px, 3.2vw, 40px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-align: left;
  -webkit-text-stroke: 0.07em #000;
  paint-order: stroke fill;
  text-shadow: 0.06em 0.08em 0 rgba(0, 0, 0, 0.85), 0 0 0.45em rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.tv-credit.is-on { opacity: 1; }
.tv-credit .cr-released { font-size: 0.75em; }
html.kb-nav, html.kb-nav * { cursor: none !important; }
html.kb-nav body * { pointer-events: none !important; }
.crt-power-on { position: absolute; inset: 0; z-index: 9; overflow: hidden; pointer-events: none; }
.crt-power-on > i { position: absolute; display: block; background: #000; will-change: transform, opacity; }
.crt-power-on > .crt-flash { inset: 0; background: #fff; animation: crtFlash 0.35s linear forwards; }
.crt-power-on > .crt-t { left: 0; right: 0; top: 0; height: 50.5%; transform-origin: 50% 0; animation: crtV 0.35s cubic-bezier(.2,.7,.3,1) forwards; }
.crt-power-on > .crt-b { left: 0; right: 0; bottom: 0; height: 50.5%; transform-origin: 50% 100%; animation: crtV 0.35s cubic-bezier(.2,.7,.3,1) forwards; }
.crt-power-on > .crt-l { top: 0; bottom: 0; left: 0; width: 50.5%; transform-origin: 0 50%; animation: crtH 0.35s cubic-bezier(.2,.7,.3,1) forwards; }
.crt-power-on > .crt-r { top: 0; bottom: 0; right: 0; width: 50.5%; transform-origin: 100% 50%; animation: crtH 0.35s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes crtV { 0% { transform: scaleY(0.99); } 30% { transform: scaleY(0.984); } 65%, 100% { transform: scaleY(0); } }
@keyframes crtH { 0% { transform: scaleX(0.96); } 30%, 100% { transform: scaleX(0); } }
@keyframes crtFlash { 0%, 30% { opacity: 1; } 65% { opacity: 0.35; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .crt-power-on { display: none; } }
.tb-ch-menu {
  position: absolute;
  z-index: 8;
  left: 2cqw;
  bottom: calc(100% + 0.8em);
  display: flex;
  flex-direction: column;
  border-radius: 1vh;
  background: rgba(14, 15, 20, 0.9);
  box-shadow: 0 0.4em 1.4em rgba(0, 0, 0, 0.55);
  clip-path: inset(100% 0 0 0 round 1vh);
  transition: clip-path 0.26s cubic-bezier(.2,.8,.2,1);
}
.tb-ch-menu::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.36) 0, rgba(0, 0, 0, 0.36) 0.5px, transparent 0.5px, transparent 1.5px);
}
.tb-ch-list {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  max-height: min(60vh, 34em);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.7em 0.5em;
  scrollbar-width: none;
}
.tb-ch-list::-webkit-scrollbar { display: none; }
.tb-ch-menu.is-open { clip-path: inset(0 0 0 0 round 1vh); }
.tb-ch-menu[hidden] { display: none; }
.tb-ch-opt {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25em;
  min-width: 5.5em;
  margin: 0;
  padding: 0.3em 0.5em;
  border: 0;
  border-radius: 0.6em;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tb-ch-opt .tb-num { min-width: 1.1em; text-align: center; }
.tb-ch-opt.is-current { background: rgba(255, 255, 255, 0.16); }
.tb-ch-opt:focus-visible { background: #fff; color: #000; }
.tb-ch-opt:active { background: rgba(255, 255, 255, 0.24); }
@media (hover: hover) and (pointer: fine) { .tb-ch-opt:hover { background: rgba(255, 255, 255, 0.22); } }
@media (prefers-reduced-motion: reduce) { .tb-ch-menu { transition: none; } }
.tv-picture .tv-burst, .tv-burst { opacity: 0; }
.tv-picture .tv-static { z-index: 4; transition: none; }
.tv-picture .tv-static[hidden] { display: none; }
html.tv-embed .tv-screen.is-guide .tv-picture,
html.tv-embed .tv-screen.is-guide .tv-info { display: none !important; }
html.tv-embed .tv-screen.is-guide .tv-grid { top: 2cqh; }
html:not(.tv-embed) .tv-screen.is-guide .tv-picture { position: absolute !important; visibility: hidden !important; pointer-events: none; }
html:not(.tv-embed) .tv-screen.is-guide .tv-info { display: none !important; }
html:not(.tv-embed) .tv-screen.is-guide .tv-grid { top: 2cqh; }
.crt-power-on.is-waiting > i { animation-play-state: paused; }
.crt-power-on.is-waiting > .crt-flash { opacity: 0; }
.tv-swipe-osd {
  position: absolute;
  z-index: 7;
  inset: 0 auto 0 max(2.5vw, env(safe-area-inset-left, 0px));
  width: max-content;
  height: max-content;
  margin: auto 0;
  padding: 0.5em 1.1em;
  border-radius: 1vh;
  background: rgba(14, 15, 20, 0.9);
  box-shadow: 0 0.4em 1.4em rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: "Gratis Neue", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: max(12px, min(3cqh, 3.4cqw));
  pointer-events: none;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(.2,.8,.2,1);
}
.tv-swipe-osd.is-on { opacity: 1; transform: scale(1); }
.tv-swipe-osd.is-leaving { opacity: 0; transform: scale(0.92); transition: opacity 0.22s ease, transform 0.25s ease-in; }
.tv-swipe-osd::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.36) 0, rgba(0, 0, 0, 0.36) 0.5px, transparent 0.5px, transparent 1.5px);
}
.tv-swipe-osd .tso-window {
  display: grid;
  grid-template-rows: 100%;
  position: relative;
  height: 10.8em;
  overflow: hidden;
  transition: height 0.26s cubic-bezier(.2,.8,.2,1);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), #000 14%, #000 86%, rgba(0, 0, 0, 0.45));
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), #000 14%, #000 86%, rgba(0, 0, 0, 0.45));
}
.tv-swipe-osd .tso-strip {
  display: flex;
  flex-direction: column;
  /* Layout centers the strip; transforms only move it between channels. */
  align-self: center;
  transform: translateY(0);
  will-change: transform;
  transition: transform 0.32s cubic-bezier(.2,.8,.2,1);
}
.tv-swipe-osd .tso-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  height: 3.6em;
  flex: none;
  position: relative;
  opacity: 0.72;
  transform: scale(0.72);
  transition: transform 0.32s cubic-bezier(.2,.8,.2,1), opacity 0.32s ease;
}
.tv-swipe-osd .tso-row.is-center { opacity: 1; transform: scale(1.3); }
.tv-swipe-osd::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - 2.1em);
  height: 4.2em;
  background: rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}
.tv-swipe-osd .tb-num { font-size: 2.2em; line-height: 1; }
.tv-swipe-osd .tv-channel-logo { filter: drop-shadow(-0.07em 0 0 rgba(255, 40, 90, 0.65)) drop-shadow(0.07em 0 0 rgba(40, 220, 255, 0.65)); }
.tv-screen.is-guide .tv-swipe-osd { display: none; }
@media (prefers-reduced-motion: reduce) { .tv-swipe-osd, .tv-swipe-osd.is-on, .tv-swipe-osd .tso-strip, .tv-swipe-osd .tso-row { transition: none; } }
.tv-swipe-osd .tso-strip.is-dialing, .tv-swipe-osd .tso-strip.is-dialing .tso-row { transition: none; }
.tv-swipe-osd.is-dial .tso-window { height: 25.2em; }
.tv-swipe-osd.is-dial { padding-inline: 1.4em; }
.tv-swipe-osd .tso-strip { padding-inline: 0.7em; }

@media (min-width: 900px) and (hover: hover) and (pointer: fine), (orientation: landscape) and (max-height: 520px) {
  .tv-swipe-osd { left: max(14px, env(safe-area-inset-left, 0px)); }
}

/* Keep the channel dial sized and positioned relative to the action dock. */
:is(.tv-screen, .od-player).has-channel-dock .tv-swipe-osd {
  top: var(--channel-dock-top);
  bottom: auto;
  left: max(var(--channel-dock-left), env(safe-area-inset-left, 0px));
  width: var(--channel-dock-width);
  height: var(--channel-dock-height);
  box-sizing: border-box;
  margin: 0;
  padding: 0.5em 0;
  font-size: var(--channel-dock-font);
  transform: none;
  transition: opacity 0.18s ease;
}
:is(.tv-screen, .od-player).has-channel-dock .tv-swipe-osd.is-leaving { transition: opacity 0.22s ease; }
:is(.tv-screen, .od-player).has-channel-dock .tv-swipe-osd .tso-window {
  height: 100%;
  transition: none;
}
:is(.tv-screen, .od-player).has-channel-dock .tv-swipe-osd .tso-strip { padding-inline: 0; }
/* Reveal outward from the selected channel without changing the dock's layout. */
.tv-swipe-osd.is-unrolling {
  animation: channel-dial-unroll 0.18s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes channel-dial-unroll {
  from { clip-path: inset(calc(50% - 2.1em) 0 round 1vh); }
  to { clip-path: inset(0 0 round 1vh); }
}
@media (prefers-reduced-motion: reduce) {
  .tv-swipe-osd.is-unrolling { animation: none; }
}
.tv-screen.is-guide .tv-channel-logo, .tv-screen .tv-banner .tv-channel-logo, .tv-screen .tc-logo, .tv-screen .ti-channel-logo { filter: drop-shadow(-0.06em 0 0 rgba(255, 40, 90, 0.62)) drop-shadow(0.06em 0 0 rgba(40, 220, 255, 0.62)) drop-shadow(0 0 0.32em rgba(255, 255, 255, 0.5)); }
@media (min-aspect-ratio: 1 / 1) and (hover: hover) {
  html:not(.tv-embed) .tv-screen.is-guide {
    --top-space: 0px;
    --guide-band: calc(clamp(4px, 1vw, 10px) + min(35vw, 240px) * 0.31 + 12px);
  }
  html:not(.tv-embed) .tv-screen.is-guide .tv-grid-head { height: var(--guide-band); }
  html:not(.tv-embed) .tv-screen.is-guide .tv-head-clock {
    align-items: flex-end;
    padding-bottom: 0.3em;
    font-size: 0.72em;
  }
}
.tv-picture .tv-guide-channel { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; pointer-events: none; background: #000; }
:is(.tv-screen, .od-player).has-channel-dock .tv-swipe-osd:not(.od-episode-selector) { transition: opacity 0.18s ease, top 0.42s cubic-bezier(.25,.8,.25,1), height 0.42s cubic-bezier(.25,.8,.25,1); }
:is(.tv-screen, .od-player).has-channel-dock .tv-swipe-osd.is-expanded:not(.od-episode-selector) {
  --dial-grow: min(3.6em, max(0px, var(--channel-dock-top)));
  top: calc(var(--channel-dock-top) - var(--dial-grow));
  height: calc(var(--channel-dock-height) + 2 * var(--dial-grow));
}
.tv-swipe-osd.is-unrolling, .od-episode-selector.is-unrolling { animation: channel-dial-fade-in 0.2s ease both; }
@keyframes channel-dial-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tv-swipe-osd.is-unrolling, .od-episode-selector.is-unrolling { animation: none; } }
