:root {
  --bg: #141311;
  --panel: #1d1b17;
  --panel-soft: #24211c;
  --panel-alt: #efe4cf;
  --text: #f5eee2;
  --muted: #b4ab9a;
  --ink: #221d16;
  --bronze: #b98944;
  --bronze-strong: #d2a05a;
  --line: rgba(217, 184, 130, 0.18);
  --accent: #7c5530;
  --shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(185, 137, 68, 0.12), transparent 32%),
    linear-gradient(180deg, #141311 0%, #181612 100%);
  color: var(--text);
  font: 16px/1.6 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(20, 19, 17, 0.92);
  border-bottom: 1px solid rgba(217, 184, 130, 0.12);
  backdrop-filter: blur(12px);
}

.topbar-inner,
.shell,
.footer {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  display: grid;
  grid-template-columns: auto 1fr minmax(230px, 320px);
  align-items: center;
  gap: 24px;
  min-height: 84px;
}

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

.brand-badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(185, 137, 68, 0.22), rgba(124, 85, 48, 0.5));
  border: 1px solid rgba(217, 184, 130, 0.18);
  color: var(--bronze-strong);
  font-weight: 800;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 1.1rem;
}

.brand-text small,
.nav a,
.search input::placeholder,
.section-head span,
.library-banner span,
.spotlight-head span,
.program-sub,
.footer p,
.footer a,
.guide-grid p,
.detail-copy p,
.detail-sub,
.side-guide p {
  color: var(--muted);
}

.nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
}

.nav a {
  position: relative;
  padding: 6px 0;
  font-weight: 600;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bronze), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.search input {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(217, 184, 130, 0.14);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.05);
  padding: 0 18px;
  color: var(--text);
}

.shell {
  padding: 28px 0 56px;
}

.marquee-layout,
.quick-board,
.section-box,
.schedule-layout,
.guide-grid,
.library-banner,
.filter-box,
.library-shell,
.detail-hero,
.detail-columns {
  margin-bottom: 24px;
}

.marquee-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.9fr);
  gap: 20px;
}

.marquee-card,
.spotlight-board,
.section-box,
.side-guide,
.program-row,
.library-banner,
.filter-box,
.detail-hero,
.footer > div,
.guide-grid article {
  background: linear-gradient(180deg, rgba(255, 247, 233, 0.04), rgba(255, 247, 233, 0.02));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.marquee-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 0;
  overflow: hidden;
  border-radius: 28px;
}

.marquee-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 34px;
}

.marquee-copy span,
.section-head span,
.library-banner span,
.spotlight-head span,
.detail-state {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.marquee-copy h1,
.section-head h1,
.section-head h2,
.library-banner h1,
.detail-main h1 {
  margin: 0;
  line-height: 1.14;
}

.marquee-copy h1 {
  font-size: clamp(2.1rem, 3.1vw, 3.2rem);
}

.marquee-copy p,
.section-head p,
.library-banner p,
.program-desc,
.detail-desc {
  margin: 0;
  color: #d4c8b3;
}

.marquee-poster {
  min-height: 100%;
  background: #2d251b;
}

.marquee-poster img,
.detail-poster img {
  height: 100%;
  object-fit: cover;
}

.meta-line,
.program-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-line b,
.program-meta span,
.schedule-row .time {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(185, 137, 68, 0.14);
  color: #f1dfbf;
  font-size: 0.94rem;
}

.marquee-copy a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--bronze), var(--accent));
  color: #180f07;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.marquee-copy a:hover,
.program-row:hover .program-title {
  transform: translateY(-2px);
}

.spotlight-board {
  border-radius: 24px;
  padding: 20px;
}

.spotlight-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.spotlight-item,
.schedule-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(217, 184, 130, 0.12);
  transition: transform 180ms ease, color 180ms ease;
}

.spotlight-item {
  grid-template-columns: 36px 64px minmax(0, 1fr);
}

.spotlight-item:last-child,
.schedule-row:last-child {
  border-bottom: 0;
}

.spotlight-item:hover,
.schedule-row:hover {
  transform: translateX(4px);
  color: var(--bronze-strong);
}

.spotlight-item b,
.schedule-row b,
.program-order {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(185, 137, 68, 0.14);
  color: var(--bronze-strong);
  font-size: 0.92rem;
  font-weight: 700;
}

.spotlight-item img {
  width: 64px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.spotlight-item span {
  display: grid;
}

.quick-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.quick-board a {
  display: grid;
  place-items: center;
  min-height: 56px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid rgba(217, 184, 130, 0.16);
  background: linear-gradient(135deg, rgba(185, 137, 68, 0.16), rgba(124, 85, 48, 0.18));
  color: #f7ebd4;
  font-weight: 700;
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.quick-board a:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 184, 130, 0.34);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.25);
}

.section-box {
  border-radius: 28px;
  padding: 26px;
}

.section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.section-head.compact {
  margin-bottom: 16px;
}

.poster-wall,
.late-grid,
.related-wall {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.poster-card {
  display: grid;
  gap: 10px;
}

.poster-cover {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 2 / 3;
  background: #2d251b;
  border: 1px solid rgba(217, 184, 130, 0.12);
}

.poster-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.poster-card:hover img {
  transform: scale(1.05);
}

.poster-kind,
.poster-score {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 30px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  z-index: 1;
}

.poster-kind {
  left: 12px;
  padding: 0 12px;
  background: rgba(20, 19, 17, 0.72);
  color: #fff2da;
}

.poster-score {
  right: 12px;
  padding: 0 10px;
  background: rgba(185, 137, 68, 0.92);
  color: #160e06;
}

.poster-hover,
.program-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 4px;
  padding: 18px 16px 14px;
  color: #fff1d2;
  background: linear-gradient(180deg, rgba(20, 19, 17, 0), rgba(20, 19, 17, 0.92));
  transform: translateY(100%);
  transition: transform 220ms ease;
}

.poster-card:hover .poster-hover,
.program-cover:hover .program-overlay {
  transform: translateY(0);
}

.poster-info {
  display: grid;
  gap: 2px;
}

.poster-info a {
  font-weight: 700;
}

.schedule-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.schedule-list {
  display: grid;
}

.schedule-row {
  grid-template-columns: 36px 72px minmax(0, 1fr) auto auto;
}

.schedule-row strong {
  font-size: 1rem;
}

.schedule-row em,
.schedule-row small {
  font-style: normal;
  color: var(--muted);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.guide-grid article {
  border-radius: 22px;
  padding: 22px;
}

.library-banner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  border-radius: 28px;
  padding: 28px;
}

.result-panel {
  display: grid;
  gap: 8px;
  min-width: 220px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(185, 137, 68, 0.08);
}

.result-panel strong {
  font-size: 1.4rem;
}

.filter-box {
  display: grid;
  gap: 16px;
  border-radius: 24px;
  padding: 20px;
}

.filter-row,
.select-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(217, 184, 130, 0.16);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.filter:hover,
.filter.active {
  transform: translateY(-1px);
  background: rgba(185, 137, 68, 0.14);
  border-color: rgba(217, 184, 130, 0.34);
}

.select-row label {
  display: grid;
  gap: 6px;
}

.select-row span {
  font-size: 0.9rem;
  color: var(--muted);
}

.select-row select {
  min-width: 150px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(217, 184, 130, 0.16);
  border-radius: 16px;
  background: rgba(255, 248, 236, 0.04);
  color: var(--text);
}

.library-shell {
  display: grid;
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
  gap: 20px;
}

.side-guide {
  position: sticky;
  top: 102px;
  align-self: start;
  display: grid;
  gap: 10px;
  border-radius: 24px;
  padding: 22px;
}

.side-guide a {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(185, 137, 68, 0.08);
  font-weight: 600;
}

.program-list {
  display: grid;
  gap: 16px;
}

.program-row {
  display: grid;
  grid-template-columns: 54px 132px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  border-radius: 24px;
  padding: 16px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.program-row:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 184, 130, 0.34);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
}

.program-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  background: #2d251b;
}

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

.program-overlay {
  inset: 0;
  place-items: center;
  background: linear-gradient(180deg, rgba(20, 19, 17, 0.08), rgba(20, 19, 17, 0.82));
}

.program-main {
  display: grid;
  gap: 12px;
}

.program-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.program-title {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 1.35rem;
  font-weight: 800;
  transition: color 180ms ease, transform 180ms ease;
}

.program-title:hover {
  color: var(--bronze-strong);
}

.program-rating {
  display: grid;
  justify-items: center;
  align-content: center;
  width: 90px;
  min-width: 90px;
  aspect-ratio: 1;
  border-radius: 22px;
  background: rgba(185, 137, 68, 0.12);
}

.program-rating strong {
  font-size: 1.54rem;
  line-height: 1;
  color: var(--bronze-strong);
}

.program-bottom {
  display: grid;
  gap: 10px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-row a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(185, 137, 68, 0.12);
  color: #f2dfbc;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease;
}

.chip-row a:hover {
  background: rgba(185, 137, 68, 0.22);
  color: #fff2d5;
}

.program-credits {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 24px;
  border-radius: 28px;
  padding: 24px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #2d251b;
}

.detail-main {
  display: grid;
  align-content: start;
  gap: 16px;
}

.detail-state {
  color: var(--bronze-strong);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.detail-grid div {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(185, 137, 68, 0.08);
}

.detail-grid dt {
  margin-bottom: 6px;
  color: var(--muted);
}

.detail-grid dd {
  margin: 0;
  font-weight: 700;
}

.detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.episode-grid button {
  min-height: 46px;
  border: 1px solid rgba(217, 184, 130, 0.16);
  border-radius: 16px;
  background: rgba(255, 248, 236, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.episode-grid button:hover {
  transform: translateY(-1px);
  border-color: rgba(217, 184, 130, 0.36);
  color: var(--bronze-strong);
}

.detail-copy {
  display: grid;
  gap: 12px;
}

.footer {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 20px;
  padding: 0 0 42px;
}

.footer > div {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: 24px;
}

.copy {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1160px) {
  .topbar-inner,
  .marquee-layout,
  .schedule-layout,
  .library-shell,
  .detail-hero,
  .detail-columns,
  .footer {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    padding: 14px 0;
  }

  .nav {
    justify-content: flex-start;
  }

  .side-guide {
    position: static;
  }

  .poster-wall,
  .late-grid,
  .related-wall {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 780px) {
  .topbar-inner,
  .marquee-card,
  .guide-grid,
  .detail-columns,
  .detail-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .quick-board,
  .poster-wall,
  .late-grid,
  .related-wall,
  .episode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .program-row,
  .program-head,
  .library-banner,
  .schedule-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: start;
  }

  .program-cover {
    width: min(180px, 100%);
  }

  .section-box,
  .marquee-copy,
  .spotlight-board,
  .library-banner,
  .side-guide,
  .detail-hero {
    padding: 20px;
  }

  .shell,
  .topbar-inner,
  .footer {
    width: min(100% - 20px, 1320px);
  }
}


/* stable responsive guards */
html, body { max-width: 100%; overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }
img, video, canvas, svg { max-width: 100%; }
h1, h2, h3, h4, p, a, span, strong, small, b, em, li { min-width: 0; overflow-wrap: anywhere; }
main, header, footer, section, article, aside, nav, div { min-width: 0; }
.poster-grid, .feature-grid, .movie-grid, .library-grid, .library-list, .related-grid, .content-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
