/* TV 模式：只在 html.tv 下生效，普通网页不受影响。基准 1920×1080，四周留 overscan。 */

html.tv {
  scrollbar-width: none;
  background: var(--bg);
}

html.tv::-webkit-scrollbar,
html.tv body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html.tv .wrap {
  width: min(1720px, calc(100% - 128px));
}

html.tv .page-glow {
  opacity: 0.55;
}

/* ---------- 顶栏 ---------- */

html.tv .header-inner {
  height: 96px;
  gap: 36px;
}

html.tv .brand-mark {
  width: 46px;
  height: 46px;
}

html.tv .brand-text strong {
  font-size: 26px;
}

html.tv .brand-text small {
  font-size: 12px;
  letter-spacing: 0.2em;
}

html.tv .nav a {
  padding: 10px 20px;
  font-size: 18px;
}

html.tv .header-search-form {
  max-width: 460px;
  height: 52px;
}

html.tv .header-search-form input {
  font-size: 16px;
}

html.tv .header-search-form button {
  font-size: 15px;
}

html.tv .avatar-btn {
  width: 46px;
  height: 46px;
}

html.tv .avatar-btn svg {
  width: 26px;
  height: 26px;
}

/* ---------- 标题与文本 ---------- */

html.tv .kicker {
  font-size: 13px;
}

html.tv .section-head h2 {
  font-size: 32px;
}

html.tv .section-note,
html.tv .shelf-more {
  font-size: 15px;
}

html.tv .search-head h1 {
  font-size: 52px;
}

html.tv .search-status,
html.tv .search-meta {
  font-size: 15px;
}

html.tv .detail-title h1 {
  font-size: 40px;
}

html.tv .detail-meta,
html.tv .detail-remarks {
  font-size: 16px;
}

/* ---------- 首页片单 ---------- */

html.tv .shelf-track {
  grid-auto-columns: 210px;
  gap: 20px;
  padding-bottom: 14px;
}

html.tv .shelf-name {
  font-size: 17px;
}

html.tv .shelf-meta {
  font-size: 14px;
}

html.tv .shelf-more-poster b {
  font-size: 16px;
}

html.tv .home-resume-track {
  grid-auto-columns: 210px;
  gap: 20px;
}

html.tv .resume-title {
  font-size: 17px;
}

html.tv .resume-meta {
  font-size: 14px;
}

/* ---------- 搜索与榜单 ---------- */

html.tv .poster-grid,
html.tv .board-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 30px 24px;
}

html.tv .poster-title {
  font-size: 18px;
}

html.tv .poster-sub,
html.tv .poster-remarks {
  font-size: 14px;
}

html.tv .filter-chip {
  padding: 8px 16px;
  font-size: 15px;
}

/* 遥控器操作不了原生 select，TV 端先固定按相关度排序 */
html.tv .sort-wrap {
  display: none;
}

html.tv .source-dots .dot {
  width: 9px;
  height: 9px;
}

/* ---------- 详情与播放 ---------- */

html.tv .watch-layout {
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
}

html.tv .source-panel {
  top: 116px;
  max-height: calc(100vh - 136px);
}

html.tv .ep-grid {
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  max-height: 360px;
}

html.tv .ep-btn {
  padding: 12px 8px;
  font-size: 15px;
}

html.tv .sp-row {
  font-size: 15px;
}

html.tv .player-actions .btn {
  padding: 10px 18px;
  font-size: 15px;
}

/* ---------- 焦点态：遥控器没有 hover，必须靠焦点给反馈 ---------- */

html.tv a:focus,
html.tv button:focus,
html.tv input:focus,
html.tv select:focus,
html.tv [tabindex]:focus {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

html.tv .shelf-card:focus,
html.tv .poster-card:focus,
html.tv .resume-card:focus,
html.tv .shelf-more-card:focus {
  outline: none;
}

html.tv .shelf-card:focus .shelf-poster,
html.tv .poster-card:focus .poster-frame,
html.tv .resume-card:focus .resume-poster {
  border-color: var(--accent);
  transform: scale(1.045);
  box-shadow: 0 0 0 4px rgba(244, 193, 93, 0.42), 0 18px 48px rgba(0, 0, 0, 0.6);
}

html.tv .poster-card:focus .play-hint {
  opacity: 1;
  transform: translate(-50%, -50%);
}

html.tv .player-overlay:focus {
  outline: 3px solid var(--accent);
  outline-offset: -6px;
}

html.tv .player-overlay:focus .play-big {
  transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(244, 193, 93, 0.45);
}

html.tv .player-overlay.is-hidden {
  visibility: hidden;
}

html.tv .ep-btn:focus,
html.tv .filter-chip:focus,
html.tv .sp-row:focus,
html.tv .btn:focus,
html.tv .source-row:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  color: var(--accent);
}

html.tv .ep-btn:focus,
html.tv .filter-chip:focus {
  background: rgba(244, 193, 93, 0.16);
  border-color: var(--accent);
}

/* ---------- 大屏上可以省掉的东西 ---------- */

html.tv .tabbar,
html.tv .site-footer,
html.tv .how-grid {
  display: none;
}
