/* ==========================================================================
   TVChannels Web 演示 — 16:9 电视大屏视觉系统
   深色广播风格 / 白色焦点描边 / 1080p 优先并兼顾 1366x768
   ========================================================================== */

:root {
  --bg: #05070b;
  --bg-soft: #0a0f17;
  --panel: rgba(20, 28, 40, 0.72);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.20);
  --text: #f2f5fa;
  --text-dim: #9aa7b8;
  --text-faint: #647184;
  --accent: #4f8cff;
  --accent-2: #00d1c1;
  --live: #ff3b30;
  --ok: #36d66b;
  --warn: #ffb02e;
  --unknown: #8b98ab;
  --radius: 18px;
  --epg-ch-w: 230px;
  --epg-hour: clamp(190px, 15.5vw, 310px);
  --epg-row-h: 86px;
}

* { box-sizing: border-box; }

html { font-size: 16px; }
@media (min-width: 1600px) { html { font-size: 18px; } }
@media (min-width: 2300px) { html { font-size: 20px; } }
@media (max-width: 1280px) { html { font-size: 15px; } }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(79, 140, 255, 0.16), transparent 60%),
    radial-gradient(900px 600px at 8% 110%, rgba(0, 209, 193, 0.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; }
kbd { font-family: inherit; }

button.focusable { -webkit-tap-highlight-color: transparent; }

/* --------------------------------------------------------------- 焦点态 */
.focusable { outline: none; }
.focusable:focus {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}
.focusable:focus-visible { outline: 3px solid #ffffff; }

/* --------------------------------------------------------------- 顶部栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(5, 7, 11, 0.97) 40%, rgba(5, 7, 11, 0.86));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar-hidden { display: none; }
.topbar-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.6rem clamp(1rem, 2.4vw, 2.8rem) 0.55rem;
}
.topbar-main {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  min-width: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  flex: 0 0 auto;
}
.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.62rem;
  background: linear-gradient(135deg, #4f8cff, #8b5cf6);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(79, 140, 255, 0.42);
}
.brand-mark i {
  width: 0;
  height: 0;
  border-left: 0.56rem solid #fff;
  border-top: 0.34rem solid transparent;
  border-bottom: 0.34rem solid transparent;
  margin-left: 0.16rem;
}
.brand-accent {
  background: linear-gradient(90deg, #7fb2ff, #b58cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-tag {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-weight: 500;
}
.main-nav {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  flex: 0 0 auto;
}
.nav-btn {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  padding: 0.42rem 1.05rem;
  border-radius: 999px;
  font-size: 0.94rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.nav-btn.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 600;
}
.nav-btn:focus { outline-offset: 1px; }
.search-field {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 1 22rem;
  min-width: 13rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.search-field:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.09);
}
.search-glyph {
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid var(--text-dim);
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}
.search-glyph::after {
  content: "";
  position: absolute;
  width: 0.42rem;
  height: 2px;
  background: var(--text-dim);
  transform: rotate(45deg);
  right: -0.28rem;
  bottom: -0.12rem;
  border-radius: 2px;
}
.search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.15rem 0;
}
.search-input::placeholder { color: var(--text-faint); }
.search-kbd {
  font-size: 0.6rem;
  color: var(--text-faint);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  padding: 0.08rem 0.3rem;
  flex: 0 0 auto;
}
.topbar-side { display: flex; align-items: center; flex: 0 0 auto; }
.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.26rem 0.65rem;
  white-space: nowrap;
}
.mode-pill .dot {
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 50%;
  background: #6b7788;
}
.mode-pill.is-online .dot { background: var(--ok); box-shadow: 0 0 8px rgba(54, 214, 107, 0.8); }
.mode-pill.is-online { color: #a9e9bf; border-color: rgba(54, 214, 107, 0.3); }
.mode-pill.is-mock .dot { background: var(--warn); box-shadow: 0 0 8px rgba(255, 176, 46, 0.8); }
.mode-pill.is-mock {
  color: #ffd58a;
  border-color: rgba(255, 176, 46, 0.35);
  background: rgba(255, 176, 46, 0.08);
}
.region-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}
.region-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  flex: 0 0 auto;
}
.region-bar {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.1rem 0.1rem 0.25rem;
  scrollbar-width: none;
}
.region-bar::-webkit-scrollbar { display: none; }
.region-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 0.32rem 0.95rem;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s;
}
.region-chip:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.region-chip.is-active {
  color: #06111f;
  background: linear-gradient(135deg, #eef4ff, #b9d1ff);
  border-color: transparent;
  font-weight: 700;
}
.region-chip:focus { outline-offset: 2px; }

/* --------------------------------------------------------------- 页面容器 */
.view {
  padding: clamp(1rem, 2.2vw, 2.2rem) clamp(1rem, 2.6vw, 3rem) 3rem;
  min-height: calc(100vh - 8rem);
  outline: none;
}

/* --------------------------------------------------------------- Hero */
.hero {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 2rem;
  border-radius: 26px;
  overflow: hidden;
  padding: clamp(1.4rem, 2.8vw, 2.6rem);
  min-height: clamp(190px, 23vh, 260px);
  background: linear-gradient(115deg, rgba(16, 23, 35, 0.96), rgba(11, 16, 25, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.hero-bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(closest-side at 82% 20%, var(--g1), transparent 70%),
    radial-gradient(closest-side at 58% 110%, var(--g2), transparent 70%);
  opacity: 0.5;
  filter: blur(18px);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 7, 11, 0.55) 0%, rgba(5, 7, 11, 0.1) 60%);
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 64%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #cfe0ff;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.hero-health { color: rgba(255, 255, 255, 0.6); font-size: 0.8rem; }
.live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--live);
  animation: livePulse 2s infinite;
  flex: 0 0 auto;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}
.hero-title {
  margin: 0.15rem 0 0;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.hero-program {
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  color: #e8eefc;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-meta {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
.hero-progress {
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  max-width: 34rem;
  width: 100%;
  margin: 0.55rem 0 0.1rem;
}
.hero-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}
.hero-tags { color: var(--text-faint); font-size: 0.84rem; }
.hero-art {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 12rem;
}
.hero-empty { min-height: 160px; }
.hero-empty .hero-copy { max-width: 100%; }

/* --------------------------------------------------------------- 按钮 */
.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #f6f9ff, #bcd2ff);
  color: #071120;
  box-shadow: 0 10px 30px rgba(150, 190, 255, 0.25);
}
.btn-primary:hover { box-shadow: 0 14px 36px rgba(150, 190, 255, 0.4); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.btn:disabled { opacity: 0.35; cursor: default; }
.btn:focus { outline: 3px solid #fff; outline-offset: 3px; }
.link-btn {
  border: 0;
  background: transparent;
  color: #9fc2ff;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0.45rem 0.2rem;
  white-space: nowrap;
}
.link-btn:hover { text-decoration: underline; }
.link-btn:focus { outline: 3px solid #fff; outline-offset: 3px; border-radius: 0.4rem; }

/* --------------------------------------------------------------- Logo */
.logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--g1), var(--g2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  overflow: hidden;
  flex: 0 0 auto;
}
.logo-fallback {
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.logo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(10, 14, 20, 0.9);
  padding: 0.18rem;
}
.logo-sm { width: 2.5rem; height: 2.5rem; border-radius: 9px; }
.logo-sm .logo-fallback { font-size: 1rem; }
.logo-md { width: 3.6rem; height: 3.6rem; }
.logo-hero {
  width: clamp(120px, 14vw, 200px);
  height: clamp(120px, 14vw, 200px);
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.logo-hero .logo-fallback {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
}
.logo-hero .logo-img { padding: 0.4rem; }

/* --------------------------------------------------------------- 分区 */
.section { margin-top: clamp(1.6rem, 3vh, 2.6rem); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.section-title-wrap { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.section-title {
  margin: 0;
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.section-sub { color: var(--text-dim); font-size: 0.84rem; }
.row-scroller {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.55rem 0.25rem 1rem;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.row-scroller::-webkit-scrollbar { display: none; }

/* --------------------------------------------------------------- 频道卡片 */
.channel-card {
  position: relative;
  flex: 0 0 clamp(250px, 21vw, 330px);
  min-height: 168px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(29, 39, 56, 0.92), rgba(13, 19, 29, 0.94));
  padding: 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  scroll-snap-align: start;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.channel-card:hover { border-color: rgba(255, 255, 255, 0.2); }
.channel-card:focus {
  outline: none;
  border-color: transparent;
  transform: scale(1.045);
  box-shadow: 0 0 0 3px #fff, 0 20px 46px rgba(0, 0, 0, 0.6);
  z-index: 4;
}
.channel-card.is-virtual {
  background: linear-gradient(160deg, rgba(45, 33, 68, 0.92), rgba(17, 14, 30, 0.95));
  border-color: rgba(150, 120, 255, 0.24);
}
.channel-card-top {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}
.channel-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.channel-name {
  font-size: 1.07rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.channel-meta {
  font-size: 0.76rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.channel-card-now { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.now-title {
  font-size: 0.9rem;
  color: #dbe6f8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.now-time {
  font-size: 0.71rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.mini-progress {
  display: block;
  width: 100%;
  height: 0.32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  overflow: hidden;
}
.mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.mini-progress-empty i { width: 0; }

/* --------------------------------------------------------------- 状态点 / 徽标 */
.health {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--unknown);
  box-shadow: 0 0 0 3px rgba(139, 152, 171, 0.16);
}
.health-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(54, 214, 107, 0.16); }
.health-degraded { background: var(--warn); box-shadow: 0 0 0 3px rgba(255, 176, 46, 0.16); }
.health-down { background: var(--live); box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.16); }
.health-unknown { background: var(--unknown); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.badge-virtual {
  background: rgba(150, 120, 255, 0.18);
  color: #cdbaff;
  border: 1px solid rgba(150, 120, 255, 0.42);
}
.badge-virtual.badge-tiny {
  font-size: 0.56rem;
  padding: 0.02rem 0.32rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.badge-live {
  background: var(--live);
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 59, 48, 0.55);
}
.badge-mock {
  background: rgba(255, 176, 46, 0.14);
  color: #ffd58a;
  border: 1px solid rgba(255, 176, 46, 0.35);
}
.badge-warn {
  background: rgba(255, 176, 46, 0.14);
  color: #ffd58a;
  border: 1px solid rgba(255, 176, 46, 0.35);
}
.badge-license {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
}

/* --------------------------------------------------------------- 海报墙 */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.1rem 1rem;
  padding: 0.3rem 0.1rem 0.4rem;
}
.poster-card {
  border: 0;
  background: transparent;
  padding: 0.35rem;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.poster-card:focus {
  outline: none;
  transform: scale(1.05);
  box-shadow: 0 0 0 3px #fff, 0 20px 44px rgba(0, 0, 0, 0.6);
}
.poster-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--g1), var(--g2));
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 12px 26px rgba(0, 0, 0, 0.35);
}
.poster-initial {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.poster-type {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  background: rgba(0, 0, 0, 0.58);
  color: #dfe8f7;
  padding: 0.16rem 0.42rem;
  border-radius: 0.35rem;
}
.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 42%);
  pointer-events: none;
}
.poster-title {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poster-sub {
  font-size: 0.74rem;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------- 搜索 */
.search-head { margin-bottom: 1.2rem; }
.page-title {
  margin: 0 0 0.2rem;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.page-sub { margin: 0; color: var(--text-dim); font-size: 0.9rem; }
.search-summary { color: var(--text-dim); font-size: 0.84rem; margin: 0.3rem 0 0.2rem; }
.search-suggest {
  margin-top: 1rem;
  padding: 1.3rem;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}
.search-suggest-title {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.6rem; }
.chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  color: var(--text);
  cursor: pointer;
  font-size: 0.92rem;
}
.chip:focus { outline: 3px solid #fff; outline-offset: 2px; }
.search-hint { color: var(--text-faint); font-size: 0.8rem; margin: 0.95rem 0 0; }
.search-loading {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-dim);
  padding: 2rem 0;
}
.search-empty { margin-top: 1rem; }
.empty-icon {
  font-size: 2.2rem;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
}
.empty-hint { color: var(--text-faint); font-size: 0.82rem; }
.result-list { display: flex; flex-direction: column; gap: 0.6rem; }
.result-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.result-row:hover { background: rgba(255, 255, 255, 0.07); }
.result-row:focus {
  outline: none;
  box-shadow: 0 0 0 3px #fff;
  background: rgba(255, 255, 255, 0.09);
}
.result-id {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 10rem;
  max-width: 22rem;
}
.result-name { font-size: 1rem; font-weight: 700; }
.result-sub { font-size: 0.77rem; color: var(--text-dim); }
.result-now {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: right;
  max-width: 32rem;
  min-width: 0;
}
.result-now-title {
  font-size: 0.88rem;
  color: #dbe6f8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-now-time {
  font-size: 0.72rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- 空态 / 加载 / 错误 */
.empty-block {
  padding: 2rem 1.4rem;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  color: var(--text-dim);
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.92rem;
}
.state-screen {
  min-height: 46vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  padding: 3rem 1rem;
}
.state-title { margin: 0.2rem 0 0; font-size: 1.5rem; }
.state-desc {
  margin: 0;
  color: var(--text-dim);
  max-width: 44rem;
  line-height: 1.65;
}
.state-hint {
  margin: 0.2rem 0 0;
  color: var(--text-faint);
  font-size: 0.8rem;
  max-width: 46rem;
  line-height: 1.7;
}
.state-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}
.state-icon {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 59, 48, 0.14);
  color: #ff8a84;
  font-weight: 800;
  font-size: 1.6rem;
  border: 1px solid rgba(255, 59, 48, 0.3);
}
code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.32rem;
  padding: 0.1rem 0.34rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
}
.spinner {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  flex: 0 0 auto;
}
.spinner.large { width: 3rem; height: 3rem; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------- 页脚 */
.page-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.74rem;
}
.foot-legend { display: flex; align-items: center; gap: 0.4rem; }
.foot-legend .health { margin-left: 0.7rem; }
.foot-legend .health:first-child { margin-left: 0; }
.foot-meta { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.foot-source.is-mock { color: #ffd58a; }
.foot-sep { opacity: 0.4; }

/* ==========================================================================
   EPG 网格
   ========================================================================== */
.epg-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 11rem);
  min-height: 380px;
}
.epg-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.epg-date {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.epg-range {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}
.epg-tz {
  font-size: 0.68rem;
  color: var(--text-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.04rem 0.4rem;
  margin-left: 0.4rem;
}
.epg-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.epg-actions .btn { padding: 0.5rem 1.05rem; font-size: 0.88rem; }
.epg-legend {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-faint);
  font-size: 0.74rem;
}
.epg-legend-now {
  width: 0.75rem;
  height: 2px;
  background: var(--live);
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.8);
}
.epg-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(8, 12, 18, 0.74);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}
.epg-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.epg-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}
.epg-scroll::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.04); }
.epg-ruler-row {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 15, 22, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.epg-ruler-corner {
  position: sticky;
  left: 0;
  z-index: 45;
  flex: 0 0 var(--epg-ch-w);
  width: var(--epg-ch-w);
  height: 2.6rem;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  background: rgba(10, 15, 22, 0.99);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.epg-ruler {
  position: relative;
  flex: 1 0 auto;
  min-width: calc(var(--epg-hour) * 4);
  height: 2.6rem;
}
.ruler-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}
.ruler-tick.is-major { background: rgba(255, 255, 255, 0.18); }
.ruler-label {
  position: absolute;
  top: 0.6rem;
  transform: translateX(-50%);
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  background: rgba(10, 15, 22, 0.92);
  padding: 0 0.3rem;
  font-variant-numeric: tabular-nums;
}
.ruler-tick.is-major .ruler-label { color: #dbe6f8; font-weight: 600; }
.ruler-tick.is-first .ruler-label { transform: translateX(0); }
.ruler-tick.is-last .ruler-label { transform: translateX(-100%); }
.epg-body { display: flex; align-items: flex-start; }
.epg-channels {
  position: sticky;
  left: 0;
  z-index: 30;
  flex: 0 0 var(--epg-ch-w);
  width: var(--epg-ch-w);
  background: rgba(9, 13, 20, 0.99);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.epg-ch-cell {
  height: var(--epg-row-h);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.3rem;
}
.epg-ch {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
}
.epg-ch:hover { background: rgba(255, 255, 255, 0.05); }
.epg-ch:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 2px #fff;
}
.epg-ch-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.epg-ch-name {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.epg-ch-now {
  font-size: 0.67rem;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.epg-tracks {
  position: relative;
  flex: 1 0 auto;
  min-width: calc(var(--epg-hour) * 4);
}
.epg-track {
  position: relative;
  height: var(--epg-row-h);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.epg-track:nth-child(odd) { background: rgba(255, 255, 255, 0.012); }
.prog {
  position: absolute;
  top: 0.3rem;
  bottom: 0.3rem;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(48, 62, 84, 0.66), rgba(22, 30, 43, 0.82));
  color: var(--text);
  text-align: left;
  padding: 0.35rem 0.55rem 0.3rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.12s ease, background 0.12s ease, transform 0.12s ease;
}
.prog::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cat, var(--accent));
  opacity: 0.95;
}
.prog-now {
  background: linear-gradient(160deg, rgba(58, 80, 116, 0.75), rgba(26, 39, 60, 0.88));
  border-color: rgba(120, 170, 255, 0.35);
}
.prog-title {
  font-size: 0.81rem;
  font-weight: 600;
  color: #e9f0fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 0.2rem;
}
.prog-time {
  font-size: 0.67rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  padding-left: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prog:focus {
  outline: none;
  box-shadow: 0 0 0 3px #fff, 0 14px 30px rgba(0, 0, 0, 0.55);
  transform: translateY(-1px);
  z-index: 5;
}
.prog-compact .prog-title { font-size: 0.73rem; }
.epg-empty {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.74rem;
  color: var(--text-faint);
  white-space: nowrap;
}
.epg-nowline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--live), rgba(255, 59, 48, 0.35));
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.55);
  z-index: 6;
  pointer-events: none;
}
.epg-nowdot {
  position: absolute;
  top: -0.28rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 10px rgba(255, 59, 48, 0.9);
}
.epg-nowlabel {
  position: absolute;
  top: 0.32rem;
  left: 0.4rem;
  font-size: 0.58rem;
  color: #ffd7d4;
  background: rgba(255, 59, 48, 0.2);
  border: 1px solid rgba(255, 59, 48, 0.5);
  border-radius: 999px;
  padding: 0 0.3rem;
  white-space: nowrap;
}
.epg-empty-page { margin-top: 1rem; }
.page-hint {
  margin: 0.8rem 0 0;
  color: var(--text-faint);
  font-size: 0.76rem;
  text-align: center;
}

/* ==========================================================================
   播放器
   ========================================================================== */
.player-root { position: fixed; inset: 0; z-index: 200; background: #000; }
.player-root.hidden { display: none; }
.player {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden;
  outline: none;
}
.player-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.player-scrim {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.35s ease;
}
.player-scrim-top {
  top: 0;
  height: 36%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent);
}
.player-scrim-bottom {
  bottom: 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), transparent);
}
.player-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 2.4vw, 2rem) clamp(1rem, 3vw, 2.8rem);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.player-id { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.player-id-text { display: flex; flex-direction: column; gap: 0.18rem; min-width: 0; }
.player-name {
  font-size: clamp(1.3rem, 2.3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}
.player-sub { color: rgba(255, 255, 255, 0.66); font-size: 0.84rem; }
.player-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.player-badges .badge { padding: 0.3rem 0.72rem; font-size: 0.74rem; }
.player-now {
  position: absolute;
  z-index: 5;
  left: clamp(1rem, 3vw, 2.8rem);
  top: clamp(5.4rem, 12vh, 8.2rem);
  max-width: min(62%, 54rem);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.player-now-title {
  font-size: clamp(1.05rem, 1.8vw, 1.5rem);
  font-weight: 600;
  color: #f2f6ff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}
.player-now-time {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}
.player-now-desc {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.84rem;
  margin-top: 0.42rem;
  max-width: 44rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.player-center {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.player-center:empty { display: none; }
.player-center.active {
  pointer-events: auto;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.66));
}
.player-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: #dfe8f7;
}
.player-loading-text { margin: 0; font-size: 0.98rem; color: rgba(255, 255, 255, 0.82); }
.player-tap { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.tap-play {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.tap-play:focus {
  outline: 3px solid #fff;
  outline-offset: 5px;
  box-shadow: 0 0 44px rgba(255, 255, 255, 0.35);
}
.player-tap-hint { margin: 0; color: rgba(255, 255, 255, 0.65); font-size: 0.9rem; }
.player-error,
.player-ended {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  padding: 2rem;
  max-width: 42rem;
}
.player-error-title { margin: 0.2rem 0; font-size: 1.6rem; }
.player-error-desc { margin: 0; color: rgba(255, 255, 255, 0.75); line-height: 1.6; }
.player-error-hint {
  margin: 0.2rem 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  line-height: 1.6;
}
.player-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0 clamp(1rem, 3vw, 2.8rem) clamp(1rem, 2.4vh, 2rem);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.player-progress { display: flex; flex-direction: column; gap: 0.32rem; }
.p-bar {
  position: relative;
  height: 1.4rem;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.p-bar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}
.p-fill {
  position: absolute;
  left: 0;
  height: 0.35rem;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f8cff, #00d1c1);
}
.p-thumb {
  position: absolute;
  left: 0;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, 0);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.65);
}
.p-times {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.player-controls { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.p-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.p-btn:hover { background: rgba(255, 255, 255, 0.18); }
.p-btn:focus { outline: 3px solid #fff; outline-offset: 2px; }
.player-controls-spacer { flex: 1; }
.player-keyhint { color: rgba(255, 255, 255, 0.45); font-size: 0.74rem; }
.player.is-live .player-progress,
.player.is-live [data-player-seek] { display: none; }
.player.idle .player-top,
.player.idle .player-now,
.player.idle .player-bottom {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}
.player.idle { cursor: none; }
.player.idle .player-scrim { opacity: 0; }

/* --------------------------------------------------------------- Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2.2rem;
  transform: translate(-50%, 1rem);
  background: rgba(14, 20, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-warn { border-color: rgba(255, 176, 46, 0.45); color: #ffd58a; }

/* --------------------------------------------------------------- 响应式 */
@media (max-width: 1100px) {
  .topbar-main { flex-wrap: wrap; }
  .search-field { order: 6; flex: 1 1 100%; max-width: none; margin-left: 0; }
  .hero { flex-direction: column; min-height: 0; }
  .hero-copy { max-width: 100%; }
  .hero-art {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
  }
  :root { --epg-ch-w: 200px; }
}

@media (max-width: 820px) {
  .main-nav { display: none; }
  .brand-tag { display: none; }
  .region-row { align-items: flex-start; }
  .epg-toolbar { gap: 0.6rem; }
  .epg-date { font-size: 1.2rem; }
  .epg-actions { margin-left: 0; width: 100%; }
  .epg-actions .btn { flex: 1; }
  .result-now { display: none; }
  :root { --epg-ch-w: 170px; }
  .epg-page { height: calc(100vh - 13rem); }
}

@media (max-height: 780px) {
  :root { --epg-row-h: 72px; }
  .hero { min-height: 170px; }
  .hero-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
  .hero-program { font-size: 1.02rem; }
  .hero-actions { margin-top: 0.6rem; }
  .player-now { top: 5rem; }
  .epg-page { height: calc(100vh - 10rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   Web Client 升级：导航 / 状态栏 / 离线横幅 / 浏览页 / EPG v2 / 弹层 / Lite
   ========================================================================== */

.hidden { display: none !important; }

/* 顶部导航：5 个 tab + 设置按钮 */
.topbar-icon-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 0.3rem 0.72rem;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}
.topbar-icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); }
.topbar-icon-btn:focus { outline: 2px solid #fff; outline-offset: 2px; }
.topbar-side { gap: 0.5rem; }
.main-nav { gap: 0.15rem; }
.nav-btn { padding: 0.42rem 0.82rem; font-size: 0.9rem; }
.search-field { flex: 0 1 19rem; min-width: 11rem; }

/* 离线横幅 */
.net-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem clamp(1rem, 2.6vw, 3rem);
  background: linear-gradient(90deg, rgba(255, 176, 46, 0.16), rgba(255, 176, 46, 0.05));
  border-bottom: 1px solid rgba(255, 176, 46, 0.25);
  color: #ffd58a;
  font-size: 0.8rem;
  position: relative;
  z-index: 55;
}
.net-banner-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 10px rgba(255, 176, 46, 0.8);
  flex: 0 0 auto;
}
.net-banner-text { flex: 1; min-width: 0; }
.net-banner-btn {
  border: 1px solid rgba(255, 176, 46, 0.45);
  background: rgba(255, 176, 46, 0.1);
  color: #ffd58a;
  border-radius: 999px;
  padding: 0.24rem 0.7rem;
  font-size: 0.72rem;
  cursor: pointer;
  flex: 0 0 auto;
}
.net-banner-btn:focus { outline: 2px solid #fff; outline-offset: 2px; }

/* 底部 API 状态栏 */
.client-statusbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  height: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1rem;
  background: rgba(8, 12, 18, 0.97);
  border-top: 1px solid var(--line);
  font-size: 0.7rem;
  color: var(--text-dim);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.client-status-dot { width: 0.44rem; height: 0.44rem; border-radius: 50%; background: #6b7788; flex: 0 0 auto; }
.client-status-dot.is-ok { background: var(--ok); box-shadow: 0 0 8px rgba(54, 214, 107, 0.7); }
.client-status-dot.is-warn { background: var(--warn); box-shadow: 0 0 8px rgba(255, 176, 46, 0.7); }
.client-status-dot.is-bad { background: var(--live); box-shadow: 0 0 8px rgba(255, 59, 48, 0.7); }
.client-status-text { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-status-meta { color: var(--text-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.client-status-spacer { flex: 1; }
.client-status-base { color: var(--text-faint); white-space: nowrap; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; }
.client-status-env { color: #ffd58a; border: 1px solid rgba(255, 176, 46, 0.35); border-radius: 999px; padding: 0 0.4rem; font-size: 0.6rem; }
body.player-open .client-statusbar,
body.player-open .net-banner { display: none; }
.view { padding-bottom: 3.6rem; }

/* 页头 / 过滤条 / 分页 */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.page-head-text { min-width: 0; }
.page-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.page-sub { margin: 0.25rem 0 0; color: var(--text-dim); font-size: 0.84rem; line-height: 1.55; }
.page-sub strong { color: var(--text); }
.page-head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.6rem 0 1rem;
}
.filter-search { display: flex; gap: 0.5rem; max-width: 32rem; }
.search-input-inline {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  padding: 0.42rem 0.85rem;
  outline: none;
}
.search-input-inline:focus { border-color: rgba(120, 170, 255, 0.6); background: rgba(255, 255, 255, 0.08); }
.filter-chips { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.filter-chips-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.2rem; scrollbar-width: none; }
.filter-chips-scroll::-webkit-scrollbar { display: none; }
.filter-sep { width: 1px; height: 1.2rem; background: var(--line); align-self: center; }
.chip.is-active {
  background: linear-gradient(135deg, #eef4ff, #b9d1ff);
  color: #071120;
  border-color: transparent;
  font-weight: 700;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.4rem 0 0.4rem;
}
.pager-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 0.38rem 0.9rem;
  font-size: 0.78rem;
  cursor: pointer;
}
.pager-btn:hover { background: rgba(255, 255, 255, 0.1); }
.pager-btn:disabled { opacity: 0.35; cursor: default; }
.pager-btn:focus { outline: 2px solid #fff; outline-offset: 2px; }
.pager-info { color: var(--text-dim); font-size: 0.78rem; }
.pager-info strong { color: var(--text); }

/* 直播频道网格 */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}
.channel-grid .channel-card { flex: none; min-height: 158px; }
.channel-grid .channel-card:focus { transform: scale(1.035); }

/* 首页海报行 / 继续观看 / 促销卡 */
.row-scroller.poster-row .poster-card { flex: 0 0 clamp(140px, 11vw, 170px); }
.row-scroller .poster-card { text-align: left; }
.continue-card {
  flex: 0 0 clamp(220px, 17vw, 280px);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
  background: linear-gradient(160deg, rgba(30, 40, 58, 0.9), rgba(12, 18, 28, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 0.6rem;
  cursor: pointer;
  color: var(--text);
}
.continue-card:focus { outline: none; box-shadow: 0 0 0 3px #fff, 0 16px 36px rgba(0, 0, 0, 0.5); transform: scale(1.035); }
.continue-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--g1), var(--g2));
  overflow: hidden;
}
.continue-art .poster-initial { font-size: 2rem; font-weight: 800; color: #fff; }
.continue-type {
  position: absolute;
  left: 0.45rem;
  top: 0.45rem;
  font-size: 0.58rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 999px;
  padding: 0.08rem 0.42rem;
  color: #dbe6f8;
}
.continue-title { font-size: 0.88rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.continue-sub { font-size: 0.7rem; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.continue-progress { display: block; height: 0.28rem; border-radius: 999px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.continue-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.promo-card {
  flex: 0 0 clamp(230px, 18vw, 300px);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0.3rem;
  color: var(--text);
}
.promo-card:focus { outline: none; box-shadow: 0 0 0 3px #fff; border-radius: 14px; }
.promo-card-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(140deg, var(--g1), var(--g2));
  font-size: 2rem;
  font-weight: 800;
}
.promo-card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo-card-title { font-size: 0.86rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-progress {
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  bottom: 0.4rem;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.card-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.home-hero { min-height: clamp(220px, 28vh, 320px); }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.home-hero .hero-copy { max-width: 68%; }
.home-hero .hero-title { text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5); }

/* 骨架屏 */
@keyframes tvShimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton-page { padding-top: 0.5rem; }
.skeleton-hero,
.skeleton-card,
.skeleton-poster {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045));
  background-size: 800px 100%;
  animation: tvShimmer 1.4s infinite linear;
  border-radius: 18px;
}
.skeleton-hero { height: clamp(200px, 26vh, 300px); margin-bottom: 1.6rem; }
.skeleton-row { display: flex; gap: 1rem; margin-bottom: 1.6rem; overflow: hidden; }
.skeleton-row .skeleton-card { flex: 0 0 clamp(240px, 20vw, 320px); height: 168px; }
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  padding: 0.5rem 0;
}
.skeleton-grid .skeleton-poster { aspect-ratio: 2 / 3; }
.skeleton-grid .skeleton-poster:nth-child(n) { border-radius: 14px; }

/* EPG v2 工具栏 / 真实 vs 示例 */
.epg-toolbar-v2 { align-items: center; gap: 0.7rem; margin-bottom: 0.65rem; }
.epg-day-tabs,
.epg-window-tabs {
  display: flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.seg-btn {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
  font-size: 0.76rem;
  cursor: pointer;
  white-space: nowrap;
}
.seg-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.seg-btn.is-active { color: #06111f; background: linear-gradient(135deg, #eef4ff, #b9d1ff); font-weight: 700; }
.seg-btn:focus { outline: 2px solid #fff; outline-offset: 2px; }
.epg-legend { display: flex; align-items: center; gap: 0.4rem; color: var(--text-faint); font-size: 0.7rem; flex-wrap: wrap; }
.epg-legend-real,
.epg-legend-syn {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  display: inline-block;
  margin-left: 0.4rem;
}
.epg-legend-real { background: var(--ok); }
.epg-legend-syn { background: var(--warn); }
.epg-legend-now {
  width: 0.7rem;
  height: 2px;
  background: var(--live);
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.8);
  display: inline-block;
}
.epg-toolbar-v2 .epg-actions { margin-left: auto; }
.epg-toolbar-v2 .epg-actions .btn { padding: 0.4rem 0.75rem; font-size: 0.74rem; }
.prog-syn {
  display: inline-block;
  margin-left: 0.3rem;
  font-size: 0.56rem;
  font-weight: 600;
  color: #ffd58a;
  background: rgba(255, 176, 46, 0.14);
  border: 1px solid rgba(255, 176, 46, 0.32);
  border-radius: 999px;
  padding: 0 0.28rem;
  vertical-align: middle;
}
.prog-title { display: flex; align-items: center; min-width: 0; }
.prog-title-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog.is-synthetic { border-style: dashed; }
.prog.is-synthetic::before { opacity: 0.6; }
.epg-channel-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.epg-toolbar-v2 .epg-date { font-size: clamp(1.05rem, 1.6vw, 1.35rem); }
.epg-toolbar-v2 .epg-range { font-size: 0.8rem; }
.epg-page { height: calc(100vh - 15.2rem); }
@media (max-height: 820px) { .epg-page { height: calc(100vh - 14rem); } }

/* 通用弹层 */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 1.4rem;
  background: rgba(2, 4, 8, 0.74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.modal-card {
  width: min(52rem, 94vw);
  max-height: min(86vh, 52rem);
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(160deg, #17212f, #0c131d);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.65);
  scrollbar-width: thin;
}
.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 0.8rem;
  background: linear-gradient(180deg, rgba(23, 33, 47, 0.98), rgba(23, 33, 47, 0.92));
  border-bottom: 1px solid var(--line);
}
.modal-title { margin: 0; font-size: 1.15rem; }
.modal-close {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
}
.modal-close:focus { outline: 2px solid #fff; outline-offset: 2px; }
.modal-body { padding: 1.1rem 1.25rem 1.3rem; }
.modal-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.loading-inline { display: flex; align-items: center; gap: 0.6rem; color: var(--text-dim); font-size: 0.85rem; padding: 1.2rem 0; }

/* VOD 详情 */
.vod-detail-card { width: min(48rem, 94vw); }
.vod-detail { display: flex; gap: 1.2rem; align-items: flex-start; }
.vod-detail-poster {
  width: 13rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  flex: 0 0 auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.vod-detail-poster.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, var(--g1), var(--g2));
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
}
.vod-detail-info { flex: 1; min-width: 0; }
.vod-detail-title { margin: 0 0 0.2rem; font-size: 1.35rem; }
.vod-detail-original { margin: 0; color: var(--text-dim); font-size: 0.82rem; }
.vod-detail-meta { margin: 0.35rem 0; color: var(--text-dim); font-size: 0.8rem; }
.vod-detail-desc { color: var(--text-dim); font-size: 0.82rem; line-height: 1.7; margin: 0.5rem 0; max-height: 12rem; overflow: auto; }
.vod-detail-license { color: var(--text-faint); font-size: 0.72rem; margin-top: 0.3rem; }
.vod-detail-progress { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; color: var(--text-faint); font-size: 0.72rem; }
.vod-detail-progress .mini-progress { flex: 1; max-width: 16rem; }

/* 节目详情 */
.program-detail-card { width: min(42rem, 94vw); }
.program-detail-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.8rem; }
.program-detail-channel { font-weight: 700; font-size: 0.95rem; }
.program-detail-time { color: var(--text-dim); font-size: 0.78rem; margin-top: 0.1rem; }
.program-detail-title { margin: 0.3rem 0; font-size: 1.3rem; }
.program-detail-badges { display: flex; gap: 0.5rem; margin: 0.4rem 0; }
.program-detail-desc { color: var(--text-dim); font-size: 0.84rem; line-height: 1.7; margin: 0.5rem 0; }
.badge-synthetic { background: rgba(255, 176, 46, 0.14); color: #ffd58a; border: 1px solid rgba(255, 176, 46, 0.35); }
.badge-real { background: rgba(54, 214, 107, 0.12); color: #7ee2a0; border: 1px solid rgba(54, 214, 107, 0.32); }
.badge-info { background: rgba(79, 140, 255, 0.14); color: #9fc2ff; border: 1px solid rgba(79, 140, 255, 0.32); }
.badge-quality { background: rgba(255, 255, 255, 0.1); color: #dbe6f8; border: 1px solid rgba(255, 255, 255, 0.16); }
.badge-mode { background: rgba(0, 209, 193, 0.12); color: #7fe8df; border: 1px solid rgba(0, 209, 193, 0.3); }

/* 设置弹层 */
.settings-mask { z-index: 450; }
.settings-card { width: min(46rem, 94vw); }
.settings-body { padding: 1.1rem 1.3rem 1.35rem; display: flex; flex-direction: column; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.form-label { font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.05em; }
.form-input,
.form-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  padding: 0.5rem 0.65rem;
  outline: none;
}
.form-input:focus,
.form-select:focus { border-color: rgba(120, 170, 255, 0.6); background: rgba(255, 255, 255, 0.08); }
.form-select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.form-select option { background: #101722; color: var(--text); }
.form-hint { font-size: 0.7rem; color: var(--text-faint); line-height: 1.55; }
.settings-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0.9rem; }
.form-inline { display: flex; gap: 0.5rem; }
.form-inline .form-input { flex: 1; }
.form-switch-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  position: relative;
}
.form-switch-row strong { display: block; font-size: 0.88rem; }
.form-switch-row small { display: block; color: var(--text-faint); font-size: 0.7rem; margin-top: 0.2rem; line-height: 1.5; }
.form-switch-row > span:first-child { flex: 1; }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  width: 2.6rem;
  height: 1.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  position: relative;
  flex: 0 0 auto;
  transition: background 0.16s ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 0.16rem;
  left: 0.18rem;
  width: 0.92rem;
  height: 0.92rem;
  border-radius: 50%;
  background: #d8e2f0;
  transition: transform 0.16s ease;
}
.switch-input:checked + .switch-track { background: rgba(54, 214, 107, 0.3); border-color: rgba(54, 214, 107, 0.5); }
.switch-input:checked + .switch-track::after { transform: translateX(1.18rem); background: #b6ffcf; }
.switch-input:focus + .switch-track { outline: 2px solid #fff; outline-offset: 2px; }
.settings-actions { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.settings-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.6rem;
}
.settings-stat {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0.6rem 0.7rem;
  background: rgba(255, 255, 255, 0.03);
}
.settings-stat span { display: block; font-size: 0.68rem; color: var(--text-faint); }
.settings-stat strong { display: block; font-size: 1rem; margin: 0.15rem 0; }
.settings-stat small { color: var(--text-faint); font-size: 0.66rem; word-break: break-all; }
.settings-test-result { padding: 0.6rem 0.8rem; border-radius: 10px; font-size: 0.8rem; line-height: 1.6; }
.settings-test-result.is-ok { border: 1px solid rgba(54, 214, 107, 0.3); background: rgba(54, 214, 107, 0.07); color: #9fe9b7; }
.settings-test-result.is-bad { border: 1px solid rgba(255, 59, 48, 0.3); background: rgba(255, 59, 48, 0.07); color: #ffb3ae; }
.settings-note { margin: 0; color: var(--text-faint); font-size: 0.7rem; line-height: 1.6; }

/* 播放器新增：LIVE 徽标 / 菜单 / 提示 */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--live);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 0.24rem 0.7rem;
  box-shadow: 0 0 18px rgba(255, 59, 48, 0.5);
  animation: livePulse 2s infinite;
}
.player-loading-sub { margin: 0.2rem 0 0.6rem; color: rgba(255, 255, 255, 0.55); font-size: 0.8rem; }
.player-menu {
  position: absolute;
  right: clamp(1rem, 3vw, 2.8rem);
  bottom: 6.2rem;
  z-index: 30;
  min-width: 11rem;
  max-height: 20rem;
  overflow: auto;
  padding: 0.45rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 18, 28, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.player-menu-title { font-size: 0.68rem; letter-spacing: 0.1em; color: var(--text-faint); padding: 0.2rem 0.45rem 0.4rem; }
.player-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
  cursor: pointer;
}
.player-menu-item:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.player-menu-item.is-active { color: #071120; background: linear-gradient(135deg, #eef4ff, #b9d1ff); font-weight: 700; }
.player-menu-item:focus { outline: 2px solid #fff; outline-offset: -2px; }
.player-controls { gap: 0.45rem; }
.p-btn { padding: 0.5rem 0.85rem; font-size: 0.82rem; }
.player-keyhint { font-size: 0.7rem; }

/* Lite 模式：关动画/阴影/大图，降低内存 */
html[data-lite="1"] *,
html[data-lite="1"] *::before,
html[data-lite="1"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  box-shadow: none !important;
  text-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html[data-lite="1"] .hero { min-height: 180px; }
html[data-lite="1"] .hero-media,
html[data-lite="1"] .skeleton-row .skeleton-card { display: none; }
html[data-lite="1"] .home-hero .hero-copy { max-width: 100%; }
html[data-lite="1"] .poster-art { box-shadow: none; }
html[data-lite="1"] .poster-img { display: none; }
html[data-lite="1"] .skeleton-hero,
html[data-lite="1"] .skeleton-card,
html[data-lite="1"] .skeleton-poster { background: rgba(255, 255, 255, 0.05); }
html[data-lite="1"] .player-video { image-rendering: auto; }
html[data-lite="1"] .player-top,
html[data-lite="1"] .player-now { transition: none; }

/* 响应式补充 */
@media (max-width: 1500px) {
  .brand-tag { display: none; }
  .nav-btn { padding: 0.42rem 0.7rem; }
  .search-field { flex-basis: 15rem; }
}
@media (max-width: 1180px) {
  .topbar-icon-btn { padding: 0.3rem 0.55rem; }
  .search-kbd { display: none; }
  .client-status-base { max-width: 20vw; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .topbar-side .mode-pill { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .vod-detail { flex-direction: column; }
  .vod-detail-poster { width: 9rem; }
  .epg-toolbar-v2 { gap: 0.45rem; }
  .epg-toolbar-v2 .epg-actions { margin-left: 0; }
  .epg-day-tabs, .epg-window-tabs { max-width: 100%; overflow-x: auto; }
  .client-status-hint { display: none; }
  .client-statusbase { display: none; }
}

/* ==========================================================================
   PWA / i18n / pack / 系列下一集 / 跨域 等 r2 增强
   ========================================================================== */
.client-status-base.is-cross {
  color: #ffd58a;
  border: 1px solid rgba(255, 176, 46, 0.35);
  border-radius: 999px;
  padding: 0 0.4rem;
}

/* Service Worker 新版本提示 */
.sw-update-bar {
  position: fixed;
  left: 50%;
  bottom: 3.2rem;
  transform: translateX(-50%);
  z-index: 210;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(79, 140, 255, 0.45);
  background: rgba(15, 22, 33, 0.98);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  color: var(--text);
  font-size: 0.82rem;
  max-width: 92vw;
}
.sw-update-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(79, 140, 255, 0.8);
}
.sw-update-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
  font-size: 0.76rem;
  cursor: pointer;
}
.sw-update-btn:focus { outline: 2px solid #fff; outline-offset: 2px; }
body.player-open .sw-update-bar { display: none; }

/* 点播详情：系列/季/集 + 相关 */
.vod-detail-series,
.vod-detail-season { color: #cdbaff; font-size: 0.8rem; margin-top: 0.2rem; }
.vod-related {
  margin-top: 1.1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}
.vod-related-title { margin: 0 0 0.55rem; font-size: 0.92rem; }
.vod-related-list { display: flex; gap: 0.65rem; overflow-x: auto; padding-bottom: 0.3rem; }
.vod-related-item {
  flex: 0 0 8.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  cursor: pointer;
  color: var(--text);
  text-align: left;
}
.vod-related-item:focus { outline: 2px solid #fff; outline-offset: 2px; }
.vod-related-art {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--g1), var(--g2));
  font-weight: 800;
  font-size: 1.4rem;
}
.vod-related-art img { width: 100%; height: 100%; object-fit: cover; }
.vod-related-name {
  font-size: 0.7rem;
  color: var(--text-dim);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 播放器：下一集倒计时 */
.player-next-center { background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.72)); }
.player-next {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
  padding: 1.6rem 2rem;
  max-width: 36rem;
}
.player-next-kicker { color: #9fc2ff; font-size: 0.82rem; letter-spacing: 0.08em; }
.player-next-title { margin: 0; font-size: 1.45rem; }
.player-next-countdown { margin: 0.2rem 0 0.6rem; color: var(--text-dim); font-size: 0.85rem; }

/* Lite：进一步压缩节点与装饰 */
html[data-lite="1"] .hero-bg { display: none; }
html[data-lite="1"] .card-progress,
html[data-lite="1"] .continue-progress { display: none; }
html[data-lite="1"] .channel-card,
html[data-lite="1"] .poster-card { border-radius: 12px; }
html[data-lite="1"] .live-grid .channel-card {
  min-height: 132px;
  padding: 0.7rem 0.8rem;
}
html[data-lite="1"] .live-grid .channel-card .logo { width: 2.6rem; height: 2.6rem; }
html[data-lite="1"] .epg-scroll { border-radius: 12px; }

#langBtn { letter-spacing: 0.02em; }

/* ==========================================================================
   首页 r3：多 banner 轮播 / 推荐频道 / 分类行
   ========================================================================== */
.hero-carousel {
  position: relative;
  height: clamp(360px, 38vw, 520px);
  margin: 0 0 1.35rem;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
  background: linear-gradient(115deg, rgba(16, 23, 35, 0.98), rgba(11, 16, 25, 0.78));
  contain: layout paint;
}
.hero-carousel:focus-within {
  border-color: rgba(79, 140, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.28), 0 30px 80px rgba(0, 0, 0, 0.48);
}
.hero-carousel .hero-stage {
  position: absolute;
  inset: 0;
}
.hero-carousel .hero-slide {
  position: absolute;
  inset: 0;
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateZ(0);
  transition: opacity 0.4s ease;
  z-index: 1;
}
.hero-carousel .hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}
.hero-carousel .hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-carousel .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transform: scale(1.02);
}
.hero-carousel .hero-slide::after {
  background: linear-gradient(90deg, rgba(5, 7, 11, 0.82) 0%, rgba(5, 7, 11, 0.35) 52%, rgba(5, 7, 11, 0.12) 100%),
    linear-gradient(0deg, rgba(5, 7, 11, 0.55), transparent 42%);
}
.hero-carousel .hero-copy {
  max-width: 62%;
  z-index: 3;
}
.hero-carousel .hero-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 48rem;
}
.hero-carousel .hero-program {
  max-width: 46rem;
}
.hero-carousel .hero-actions {
  margin-top: 1.1rem;
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(8, 12, 20, 0.62);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.hero-arrow:hover { background: rgba(79, 140, 255, 0.5); border-color: rgba(255, 255, 255, 0.5); }
.hero-arrow:focus { outline: 2px solid #fff; outline-offset: 3px; }
.hero-arrow-prev { left: 1rem; }
.hero-arrow-next { right: 1rem; }
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(5, 7, 11, 0.45);
  backdrop-filter: blur(8px);
}
.hero-dot {
  width: 0.52rem;
  height: 0.52rem;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}
.hero-dot.is-active { width: 1.35rem; background: #fff; }
.hero-dot:focus { outline: 2px solid #fff; outline-offset: 3px; }
.hero-count {
  position: absolute;
  right: 1.2rem;
  bottom: 1.05rem;
  z-index: 6;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  background: rgba(5, 7, 11, 0.4);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}
.hero-carousel-empty {
  display: flex;
  align-items: center;
  height: clamp(180px, 22vw, 260px);
}

/* 推荐频道与分类行 */
[data-shelf="recommended"] .section-title::after,
[data-shelf="category"] .section-title::after {
  content: "";
  display: inline-block;
  width: 0.36rem;
  height: 0.36rem;
  margin-left: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.15em;
  opacity: 0.8;
}
[data-shelf="category"] .section-sub,
[data-shelf="recommended"] .section-sub {
  color: var(--text-faint);
}
[data-category] .channel-card,
[data-category] .poster-card {
  border-color: rgba(255, 255, 255, 0.055);
}
[data-recommend-id] .channel-card {
  border-color: rgba(79, 140, 255, 0.16);
}

/* Lite：hero 单张、分类行 4 类（JS 控制数量），再压低高度和装饰 */
html[data-lite="1"] .hero-carousel {
  height: clamp(240px, 34vw, 340px);
  border-radius: 18px;
  box-shadow: none;
}
html[data-lite="1"] .hero-carousel .hero-copy { max-width: 100%; }
html[data-lite="1"] .hero-arrow,
html[data-lite="1"] .hero-dots,
html[data-lite="1"] .hero-count { display: none; }
html[data-lite="1"] .hero-carousel .hero-media,
html[data-lite="1"] .hero-carousel .hero-bg { display: none; }

@media (max-width: 900px) {
  .hero-carousel { height: clamp(300px, 54vw, 430px); }
  .hero-carousel .hero-copy { max-width: 100%; }
  .hero-arrow { width: 2.5rem; height: 2.5rem; }
}


/* 首页 hero 细节：为左右箭头留出安全区，标题字号略收敛 */
.hero-carousel .hero-slide {
  padding-left: clamp(4.2rem, 5vw, 5.6rem);
  padding-right: clamp(3rem, 4vw, 4.4rem);
}
.hero-carousel .hero-title {
  font-size: clamp(1.8rem, 3.3vw, 3.05rem);
  line-height: 1.08;
}
.hero-carousel .hero-program { font-size: clamp(0.98rem, 1.35vw, 1.22rem); }
.hero-carousel .hero-kicker { font-size: 0.82rem; }
.hero-carousel .hero-actions .btn { padding: 0.72rem 1.35rem; }
@media (max-width: 900px) {
  .hero-carousel .hero-slide { padding-left: 3.3rem; padding-right: 3.3rem; }
}

/* 分类行：频道卡与 VOD 卡混排时把海报卡压成横向缩略图尺寸，避免行高被 2:3 海报拉爆 */
[data-shelf="category"] .poster-row,
[data-shelf="category"] .row-scroller {
  align-items: flex-start;
}
[data-shelf="category"] .poster-card {
  width: 15.2rem;
  min-width: 15.2rem;
}
[data-shelf="category"] .poster-card .poster-art {
  aspect-ratio: 16 / 10;
}
[data-shelf="category"] .poster-card .poster-title {
  font-size: 0.78rem;
  -webkit-line-clamp: 1;
}
[data-shelf="category"] .poster-card .poster-sub {
  font-size: 0.68rem;
}
[data-shelf="category"] .poster-card .poster-type {
  font-size: 0.58rem;
  padding: 0.1rem 0.28rem;
}
@media (max-width: 900px) {
  [data-shelf="category"] .poster-card { width: 12.6rem; min-width: 12.6rem; }
}

/* ==========================================================================
   UI v4：统一频道卡 16:9 / 点播卡 2:3 / 首页精选点播 rail / 点播 tabs
   ========================================================================== */
.home-v4 .section { margin-top: 1.45rem; }
.home-v4 .section-head { margin-bottom: 0.15rem; }

/* ---------- 统一频道卡：固定 16:9，全部频道行共用 ---------- */
.channel-card,
.channel-grid .channel-card {
  flex: 0 0 20rem;
  width: 20rem;
  min-width: 20rem;
  aspect-ratio: 16 / 9;
  min-height: 0;
  height: auto;
  padding: 0.82rem 0.9rem;
  gap: 0.45rem;
  overflow: hidden;
  border-radius: 16px;
}
.channel-grid .channel-card { width: 100%; min-width: 0; }
.channel-card-top { gap: 0.7rem; min-height: 0; }
.channel-card .logo,
.channel-card .logo-sm,
.channel-card .logo-md,
html[data-lite="1"] .channel-card .logo {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 12px;
}
.channel-card .logo-img {
  object-fit: contain;
  padding: 0.22rem;
}
.channel-card-text { gap: 0.12rem; min-width: 0; }
.channel-name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.channel-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  font-size: 0.98rem;
  line-height: 1.18;
  font-weight: 750;
  flex: 0 1 auto;
  min-width: 0;
}
.channel-meta {
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge-global {
  background: rgba(79, 140, 255, 0.16);
  color: #a9c7ff;
  border: 1px solid rgba(79, 140, 255, 0.36);
  font-size: 0.58rem;
  padding: 0.05rem 0.3rem;
  flex: 0 0 auto;
}
.channel-card-now {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
  min-width: 0;
}
.now-title {
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.now-time { font-size: 0.66rem; line-height: 1.15; }
.mini-progress { height: 0.26rem; }
.channel-card .health { width: 0.52rem; height: 0.52rem; }
.channel-card .badge-virtual { font-size: 0.58rem; padding: 0.08rem 0.32rem; }
.channel-card:focus-visible,
.channel-card:focus {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(79, 140, 255, 0.55), 0 18px 40px rgba(0, 0, 0, 0.55);
  transform: translateY(-2px);
}
.channel-grid { grid-template-columns: repeat(auto-fill, 20rem); gap: 1rem; }
@media (max-width: 900px) {
  .channel-card, .channel-grid .channel-card { width: 17rem; min-width: 17rem; flex-basis: 17rem; }
  .channel-grid { grid-template-columns: repeat(auto-fill, 17rem); }
}

/* ---------- 统一点播卡：2:3，5 列 ---------- */
.poster-grid.vod-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.15rem 1rem;
  padding: 0.35rem 0.1rem 0.6rem;
}
.poster-card {
  width: 100%;
  padding: 0.28rem;
  gap: 0.35rem;
}
.poster-card .poster-art {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
}
.poster-card .poster-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.18;
}
.poster-card .poster-sub {
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poster-card:focus-visible,
.poster-card:focus {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(79, 140, 255, 0.55), 0 18px 40px rgba(0, 0, 0, 0.55);
  transform: translateY(-2px);
}
@media (max-width: 1300px) {
  .poster-grid.vod-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.9rem; }
}
@media (max-width: 900px) {
  .poster-grid.vod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 首页精选点播 rail：5 列可视，横向滚动，与点播页同一组件 */
.row-scroller.vod-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 4rem) / 5);
  gap: 1rem;
  overflow-x: auto;
  padding: 0.35rem 0.1rem 0.8rem;
  scroll-snap-type: x proximity;
}
.row-scroller.vod-rail .poster-card {
  width: 100%;
  scroll-snap-align: start;
}
@media (max-width: 1100px) {
  .row-scroller.vod-rail { grid-auto-columns: calc((100% - 2rem) / 3); }
}

/* ---------- Hero v4：频道 logo 保留在右侧品牌位，VOD 用全幅图 ---------- */
.hero-carousel-v4 .hero-slide { padding-left: clamp(4.2rem, 5vw, 5.6rem); padding-right: clamp(8.5rem, 16vw, 15rem); }
.hero-brand {
  position: absolute;
  right: clamp(2rem, 5vw, 5rem);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(7rem, 12vw, 12rem);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 24px;
  background: rgba(8, 12, 20, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  z-index: 3;
  backdrop-filter: blur(10px);
}
.hero-brand img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0a101a;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.hero-category {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.7rem;
}
.hero-carousel-v4 .hero-title { font-size: clamp(1.9rem, 3.5vw, 3.2rem); }
.hero-carousel-v4 .hero-meta {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  margin-top: 0.25rem;
}
.hero-carousel-v4 .hero-program { font-size: clamp(1rem, 1.45vw, 1.28rem); }
.hero-carousel-v4 .hero-slide .hero-copy { max-width: min(58rem, 66%); }
@media (max-width: 900px) {
  .hero-carousel-v4 .hero-slide { padding-right: 1.5rem; }
  .hero-brand { display: none; }
}

/* ---------- 点播页 tabs / 筛选 ---------- */
.vod-tabs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.7rem 0 0.9rem;
  padding: 0.25rem;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}
.vod-tab {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  border-radius: 10px;
  padding: 0.42rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.vod-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.vod-tab.is-active { color: #fff; background: rgba(79, 140, 255, 0.92); }
.vod-tab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vod-page .filter-bar { margin-top: 0.2rem; }
.vod-page .section-head { margin-bottom: 0.7rem; }

/* Lite：hero1/分类4/每行6（JS 控制），统一卡片尺寸不变 */
html[data-lite="1"] .channel-card { width: 18rem; min-width: 18rem; flex-basis: 18rem; }
html[data-lite="1"] .poster-grid.vod-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
html[data-lite="1"] .row-scroller.vod-rail { grid-auto-columns: calc((100% - 4rem) / 5); }

/* 频道卡 meta 行：全球角标与文字同排，避免挤压名称 */
.channel-meta-row {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
}
.channel-meta-row .channel-meta { flex: 0 1 auto; min-width: 0; }
.channel-meta-row .badge-global { flex: 0 0 auto; }

/* Hero v4 额外 scope 角标 */
.hero-scope {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.44rem;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.16);
  border: 1px solid rgba(79, 140, 255, 0.38);
  color: #bcd4ff;
  font-size: 0.66rem;
}

/* ==========================================================================
   UI v6：10-foot 字号 / 频道卡图片区+信息区 / banner 视觉 / 布局节奏
   ========================================================================== */
:root {
  --fs-hero: 64px;
  --fs-hero-sub: 30px;
  --fs-hero-meta: 18px;
  --fs-section: 34px;
  --fs-section-sub: 17px;
  --fs-card-title: 22px;
  --fs-card-now: 19px;
  --fs-card-meta: 15.5px;
  --fs-badge: 14px;
  --fs-cta: 22px;
}

/* 页面留白 64px（1920）/ 货架间距 40px / 卡片间距 20px */
.view {
  padding: 2rem clamp(24px, 3.33vw, 64px) 64px;
}
.home-v4 .section,
.home-page .section { margin-top: clamp(28px, 2.05vw, 40px); }
.home-v4 .section-head { margin-bottom: 14px; }
.section-head {
  align-items: center;
  margin-bottom: 14px;
}
.section-title-wrap { gap: 10px; }
.section-title {
  font-size: var(--fs-section);
  line-height: 1.2;
  font-weight: 700;
}
.section-sub {
  font-size: var(--fs-section-sub);
  line-height: 1.4;
  color: var(--text-dim);
}
.section-head .link-btn {
  font-size: 16px;
  color: #9fc2ff;
}
.row-scroller {
  gap: 20px;
  padding-top: 4px;
  padding-bottom: 16px;
}

/* ---------- 频道卡：16:9 图片区 + 信息区（宽 390，信息区 64） ---------- */
.channel-card,
.channel-grid .channel-card {
  flex: 0 0 390px;
  width: 390px;
  min-width: 390px;
  aspect-ratio: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  gap: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: #111a27;
  transform: none;
}
.channel-card-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 16px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 92% 8%, var(--g1, rgba(79, 140, 255, .55)), transparent 58%),
    radial-gradient(110% 100% at 0% 110%, var(--g2, rgba(0, 209, 193, .38)), transparent 62%),
    linear-gradient(135deg, #172335, #0d1520);
}
.channel-card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 7, 11, 0.02) 20%, rgba(5, 7, 11, 0.78) 100%);
  pointer-events: none;
}
.channel-card-top,
.channel-card-now { position: relative; z-index: 1; }
.channel-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.channel-card .logo,
.channel-card .logo-sm,
.channel-card .logo-md {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 14px;
  background: rgba(8, 12, 20, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 8px 20px rgba(0, 0, 0, 0.35);
}
.channel-card .logo-img {
  object-fit: contain;
  padding: 6px;
  background: rgba(8, 12, 20, 0.86);
}
.channel-card-text { gap: 4px; min-width: 0; flex: 1; }
.channel-name-row { min-width: 0; }
.channel-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  font-size: var(--fs-card-title);
  line-height: 1.25;
  font-weight: 700;
  color: #f2f5fa;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.channel-meta-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.channel-meta {
  font-size: var(--fs-card-meta);
  line-height: 1.35;
  color: #b7c4d4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge-global {
  font-size: var(--fs-badge);
  padding: 1px 7px;
  background: rgba(155, 140, 255, 0.22);
  color: #c8bcff;
  border: 1px solid rgba(155, 140, 255, 0.5);
}
.channel-card .health { width: 10px; height: 10px; margin-top: 6px; }
.channel-card .badge-virtual {
  font-size: 12px;
  padding: 2px 7px;
}
.channel-card-now {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
}
.now-title {
  font-size: var(--fs-card-now);
  line-height: 1.35;
  font-weight: 500;
  color: #eef4ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.now-time {
  font-size: var(--fs-card-meta);
  line-height: 1.35;
  color: #b7c4d4;
  font-variant-numeric: tabular-nums;
}
.mini-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
}
.channel-card-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: #111a27;
  min-width: 0;
}
.channel-info-label {
  flex: 0 0 auto;
  font-size: var(--fs-card-meta);
  color: #8fa1b5;
}
.channel-info-title {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-card-meta);
  color: #e5edf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.channel-info-time {
  flex: 0 0 auto;
  font-size: var(--fs-card-meta);
  color: #8fa1b5;
  font-variant-numeric: tabular-nums;
}
.channel-card-info-empty .channel-info-title { color: #aab8c8; }
.channel-card:hover { border-color: rgba(255, 255, 255, 0.18); }
.channel-card:focus,
.channel-card:focus-visible {
  outline: 3px solid #7aa7ff;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(79, 140, 255, 0.25);
  transform: none;
}
.channel-grid { grid-template-columns: repeat(auto-fill, 390px); gap: 20px; }

/* ---------- 点播卡：2:3 + 大字号，无 MP4/HLS 技术角标 ---------- */
.poster-grid.vod-grid { gap: 20px; }
.poster-card {
  width: 100%;
  padding: 0;
  gap: 10px;
  border-radius: 16px;
}
.poster-card .poster-art { border-radius: 16px; }
.poster-card .poster-title {
  font-size: var(--fs-card-title);
  line-height: 1.25;
  font-weight: 700;
  -webkit-line-clamp: 2;
}
.poster-card .poster-sub {
  font-size: var(--fs-card-meta);
  line-height: 1.35;
  color: #aab8c8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(5, 7, 11, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #dfe9ff;
  font-weight: 600;
}
.poster-card:focus,
.poster-card:focus-visible {
  outline: 3px solid #7aa7ff;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(79, 140, 255, 0.25);
  transform: none;
}
/* 兼容旧的选择器：技术角标已不再渲染 */
.poster-type { display: none; }
.row-scroller.vod-rail { gap: 20px; grid-auto-columns: calc((100% - 4rem) / 5); }

/* ---------- Banner：TV 大字号 / 540 高 / 右侧玻璃 logo ---------- */
.hero-carousel.hero-carousel-v4 { height: 540px; border-radius: 22px; }
.hero-carousel-v4 .hero-slide {
  padding: 64px 240px 64px 96px;
}
.hero-carousel-v4 .hero-copy {
  max-width: min(1120px, 62%);
  gap: 12px;
}
.hero-carousel-v4 .hero-kicker { font-size: 14px; gap: 10px; }
.hero-badge,
.hero-category,
.hero-scope {
  font-size: 14px;
  padding: 3px 10px;
}
.hero-carousel-v4 .hero-title {
  font-size: var(--fs-hero);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-carousel-v4 .hero-program {
  font-size: var(--fs-hero-sub);
  line-height: 1.25;
  font-weight: 600;
  color: #e7eefb;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-carousel-v4 .hero-meta {
  font-size: var(--fs-hero-meta);
  line-height: 1.4;
  color: #b7c4d4;
  margin-top: 2px;
}
.hero-carousel-v4 .hero-progress {
  height: 6px;
  max-width: 440px;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.22);
}
.hero-carousel-v4 .hero-actions { margin-top: 20px; gap: 14px; }
.hero-carousel-v4 .hero-actions .btn {
  font-size: var(--fs-cta);
  font-weight: 700;
  padding: 12px 26px;
  min-height: 52px;
}
.hero-carousel-v4 .hero-brand {
  width: 160px;
  height: 160px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(10, 15, 24, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  right: 72px;
}
.hero-carousel-v4 .hero-brand img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hero-carousel-v4 .hero-arrow { width: 54px; height: 54px; font-size: 32px; }
.hero-carousel-v4 .hero-arrow-prev { left: 20px; }
.hero-carousel-v4 .hero-arrow-next { right: 20px; }
.hero-carousel-v4 .hero-dots { bottom: 18px; }
.hero-carousel-v4 .hero-dot { width: 10px; height: 10px; }
.hero-carousel-v4 .hero-dot.is-active { width: 26px; }
.hero-carousel-v4 .hero-count { font-size: 14px; right: 24px; bottom: 18px; }

/* ---------- 导航/页头/底栏 TV 可读性 ---------- */
.page-title { font-size: 38px; }
.page-sub { font-size: 17px; }
.topbar .nav-btn { font-size: 19px; }
.region-chip { font-size: 16px; }
.search-input { font-size: 18px; }

/* 开发状态栏：12px 低对比 */
.client-statusbar {
  height: 28px;
  font-size: 12px;
  color: rgba(159, 176, 196, 0.55);
  background: rgba(8, 12, 18, 0.92);
}
.client-status-dot { opacity: 0.6; }
.client-status-text { color: rgba(159, 176, 196, 0.55); }
.client-status-meta,
.client-status-base { color: rgba(159, 176, 196, 0.38); }
.client-status-env { font-size: 10px; opacity: 0.7; }
.view { padding-bottom: 46px; }

/* Lite：尺寸可略收紧，但字号最低 15px */
html[data-lite="1"] .channel-card,
html[data-lite="1"] .channel-grid .channel-card {
  width: 360px;
  min-width: 360px;
  flex-basis: 360px;
}
html[data-lite="1"] .channel-name,
html[data-lite="1"] .poster-card .poster-title { font-size: 22px; }
html[data-lite="1"] .now-title { font-size: 19px; }
html[data-lite="1"] .channel-meta,
html[data-lite="1"] .now-time,
html[data-lite="1"] .channel-info-label,
html[data-lite="1"] .channel-info-title,
html[data-lite="1"] .channel-info-time,
html[data-lite="1"] .poster-card .poster-sub { font-size: 15.5px; }
html[data-lite="1"] .hero-carousel.hero-carousel-v4 { height: 440px; }
html[data-lite="1"] .hero-carousel-v4 .hero-slide { padding: 40px 180px 40px 40px; }
html[data-lite="1"] .hero-carousel-v4 .hero-title { font-size: 52px; }
html[data-lite="1"] .hero-carousel-v4 .hero-program { font-size: 26px; }
html[data-lite="1"] .hero-carousel-v4 .hero-meta { font-size: 16px; }
html[data-lite="1"] .hero-carousel-v4 .hero-brand { width: 130px; height: 130px; right: 40px; }

@media (max-width: 1200px) {
  .hero-carousel.hero-carousel-v4 { height: 440px; }
  .hero-carousel-v4 .hero-slide { padding: 40px 170px 40px 80px; }
  .hero-carousel-v4 .hero-title { font-size: 52px; }
  .hero-carousel-v4 .hero-program { font-size: 26px; }
  .hero-carousel-v4 .hero-meta { font-size: 16px; }
  .hero-carousel-v4 .hero-brand { width: 130px; height: 130px; right: 40px; }
  .channel-card, .channel-grid .channel-card { width: 350px; min-width: 350px; flex-basis: 350px; }
}

.channel-card-art .channel-card-watermark {
  position: absolute;
  right: 18px;
  top: 54%;
  transform: translateY(-50%);
  width: 128px;
  height: 128px;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}
.channel-card-art .channel-card-watermark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(0.7);
}

/* ==========================================================================
   合成示例节目「示例」徽标（v7）
   ========================================================================== */
.badge-sample {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  color: #ffd58a;
  background: rgba(255, 176, 46, 0.18);
  border: 1px solid rgba(255, 176, 46, 0.55);
  border-radius: 999px;
  padding: 1px 8px;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.hero-sample {
  font-size: 14px;
  padding: 3px 10px;
  color: #ffe2a8;
  background: rgba(255, 176, 46, 0.20);
}
.channel-now-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.channel-now-line .now-title { flex: 1; min-width: 0; }
.channel-card-info .badge-sample { font-size: 14px; padding: 0 8px; }
/* EPG 网格里的示例徽标：10-foot 可读，不挤压长节目名 */
.prog-syn {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  padding: 1px 7px;
  margin-left: 6px;
}
.prog-title-text { flex: 1 1 auto; }
.prog-compact .prog-syn { display: none; }
