:root {
  --ink: #20252a;
  --muted: #70777d;
  --paper: #ffffff;
  --canvas: #f2f3f1;
  --soft: #e8ebea;
  --line: #d7dcda;
  --accent: #477c73;
  --accent-strong: #315e57;
  --moon: #a78555;
  --alert: #a95e5e;
  --max-width: 1260px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf0f2;
  --muted: #9ca5ad;
  --paper: #111720;
  --canvas: #090d16;
  --soft: #19212b;
  --line: #29333e;
  --accent: #87b8ad;
  --accent-strong: #b2d8d0;
  --moon: #d6bd8b;
  --alert: #d18484;
}

body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; line-height: 1.6; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.content-shell { width: min(var(--max-width), calc(100% - 52px)); margin: 0 auto; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px); }
[data-theme="dark"] .site-header { background: rgba(9, 13, 22, .96); }
.header-primary { min-height: 68px; display: grid; grid-template-columns: minmax(190px, auto) minmax(260px, 520px) 38px; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo { width: 150px; height: 44px; object-fit: contain; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; color: var(--moon); background: var(--soft); font-size: 15px; font-weight: 900; }
.brand-name { overflow: hidden; font-size: 18px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.header-search { height: 38px; display: grid; grid-template-columns: minmax(0, 1fr) auto; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.header-search:focus-within { border-color: var(--accent); }
.header-search input { min-width: 0; padding: 0 12px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.header-search button { min-width: 62px; padding: 0 13px; border: 0; color: var(--paper); background: var(--ink); font-size: 11px; font-weight: 800; cursor: pointer; }
[data-theme="dark"] .header-search button { color: #09100d; background: var(--accent); }
.theme-toggle, .nav-toggle { width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--paper); cursor: pointer; }
.theme-toggle { display: grid; place-items: center; font-size: 10px; font-weight: 900; }
.theme-toggle:hover, .theme-toggle:focus-visible { color: var(--accent); border-color: var(--accent); outline: 0; }
.theme-icon--dark, [data-theme="dark"] .theme-icon--light { display: none; }
[data-theme="dark"] .theme-icon--dark { display: inline; }
.nav-toggle { display: none; }
.nav-toggle span { width: 17px; height: 1px; display: block; margin: 4px auto; background: currentColor; }
.nav-row { border-top: 1px solid var(--line); }
.site-nav { min-height: 42px; display: flex; align-items: center; gap: 24px; }
.site-nav a { position: relative; color: var(--muted); font-size: 12px; font-weight: 700; }
.site-nav a::after { position: absolute; right: 0; bottom: -11px; left: 0; height: 2px; background: var(--accent); content: ""; opacity: 0; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); outline: 0; }
.site-nav a:hover::after, .site-nav a:focus-visible::after { opacity: 1; }

.site-main { min-height: calc(100vh - 230px); }
.page-band { width: 100%; padding: 34px 0; }
.page-band + .page-band { padding-top: 18px; }
.home-opening { border-bottom: 1px solid var(--line); background: var(--paper); }
.opening-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end; margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.opening-copy h1 { margin: 3px 0 4px; font-size: 34px; line-height: 1.2; }
.opening-copy > p:last-of-type { max-width: 660px; margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow, .section-heading p { margin: 0; color: var(--accent); font-size: 10px; font-weight: 900; }
.quick-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; }
.quick-links a { color: var(--muted); font-size: 12px; font-weight: 700; }
.quick-links a:hover { color: var(--accent); }
.section-heading { min-height: 43px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-heading h2 { margin: 2px 0 0; font-size: 20px; line-height: 1.3; }
.section-heading > a { color: var(--muted); font-size: 11px; font-weight: 700; }
.section-heading > a:hover { color: var(--accent); }
.opening-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 12px; }
.latest-band { background: var(--canvas); }
.category-band:nth-of-type(even) { background: var(--paper); }

.video-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 25px 13px; }
.video-card { min-width: 0; }
.video-card__poster { position: relative; display: block; overflow: hidden; aspect-ratio: 2 / 3; border: 1px solid var(--line); border-radius: 4px; background: var(--soft); }
.video-card__poster img { width: 100%; height: 100%; object-fit: cover; transition: filter .2s ease, transform .2s ease; }
.video-card:hover .video-card__poster img { filter: brightness(.82) contrast(1.04); transform: scale(1.02); }
.video-card__poster:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.video-card__remark { position: absolute; right: 5px; bottom: 5px; max-width: calc(100% - 10px); padding: 2px 6px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .22); border-radius: 3px; color: #fff; background: rgba(16, 21, 28, .86); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.video-card__body h3 { margin: 8px 0 2px; overflow: hidden; font-size: 13px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.video-card__body h3 a:hover { color: var(--accent); }
.video-card__body p { margin: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 11px; }
.breadcrumbs a:hover { color: var(--accent); }
.page-title { margin-bottom: 21px; }
.page-title h1 { margin: 2px 0 4px; font-size: 29px; line-height: 1.25; }
.page-title > p:last-child { max-width: 740px; margin: 0; color: var(--muted); font-size: 13px; }
.filter-form { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)) auto; gap: 9px; margin-bottom: 28px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filter-form label { min-width: 0; }
.filter-form label span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 800; }
.filter-form select, .search-page-form input { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; outline: 0; color: var(--ink); background: var(--paper); }
.filter-form select:focus, .search-page-form input:focus { border-color: var(--accent); }
.filter-form button, .search-page-form button { align-self: end; min-height: 38px; padding: 7px 17px; border: 1px solid var(--accent); border-radius: 3px; color: var(--paper); background: var(--accent); font-weight: 800; cursor: pointer; }
[data-theme="dark"] .filter-form button, [data-theme="dark"] .search-page-form button { color: #0b1210; }
.filter-form button:hover, .search-page-form button:hover { border-color: var(--accent-strong); background: var(--accent-strong); }
.filter-timeline { display: grid; gap: 0; margin: 24px 0 30px; border-top: 1px solid var(--line); }
.filter-line { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 16px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.filter-line > span { padding-top: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.filter-line > div { display: flex; flex-wrap: wrap; gap: 7px 9px; }
.filter-line a { display: inline-flex; min-height: 30px; align-items: center; padding: 4px 9px; border: 1px solid transparent; border-radius: 3px; color: var(--muted); font-size: 12px; }
.filter-line a:hover, .filter-line a:focus-visible { border-color: var(--line); color: var(--ink); background: var(--paper); outline: 0; }
.filter-line a.is-current { border-color: var(--accent); color: var(--paper); background: var(--accent); font-weight: 800; }
.empty-state { padding: 56px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.empty-state h2 { margin: 0 0 5px; font-size: 18px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 34px; }
.pagination a, .pagination span { min-width: 37px; height: 37px; display: grid; place-items: center; padding: 0 9px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); font-size: 11px; }
.pagination a:hover { color: var(--accent); border-color: var(--accent); }
.pagination span { color: var(--paper); border-color: var(--accent); background: var(--accent); }

.search-page-form { max-width: 720px; margin: 0 0 26px; }
.search-page-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.result-summary { margin: 0 0 20px; color: var(--muted); font-size: 12px; }

.video-shell { max-width: 1100px; }
.player-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #05070b; }
.player-heading { min-height: 43px; display: flex; align-items: center; gap: 8px; padding: 7px 14px; color: #98a1a9; font-size: 11px; }
.player-heading strong { min-width: 0; overflow: hidden; color: #eef1f3; text-overflow: ellipsis; white-space: nowrap; }
.moon-dot { width: 7px; height: 7px; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(135, 184, 173, .12); }
[data-media-player], [data-player-frame] { width: 100%; min-height: 0; aspect-ratio: 16 / 9; }
.video-details { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 24px; margin-top: 26px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.video-details > img { width: 145px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.video-details h1 { margin: 3px 0 4px; font-size: 28px; line-height: 1.25; overflow-wrap: anywhere; }
.subtitle { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.info-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.info-tags span, .info-tags a { padding: 3px 8px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: var(--paper); font-size: 10px; }
.info-tags a:hover { color: var(--accent); border-color: var(--accent); }
.video-blurb { max-width: 760px; margin: 0 0 15px; color: var(--muted); font-size: 12px; }
.video-facts { display: grid; gap: 5px; margin: 0; }
.video-facts div { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; font-size: 11px; }
.video-facts dt { color: var(--muted); }
.video-facts dd { margin: 0; overflow-wrap: anywhere; }
.content-block { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.episode-source + .episode-source { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.episode-source h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12px; }
.episode-source h3 small { color: var(--muted); font-size: 9px; font-weight: 500; }
.episode-list { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; }
.episode-list a { min-width: 0; min-height: 35px; display: grid; place-items: center; padding: 6px 7px; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.episode-list a:hover, .episode-list a:focus-visible { color: var(--paper); border-color: var(--accent); background: var(--accent); outline: 0; }
.prose { max-width: 900px; color: var(--muted); font-size: 13px; }
.prose p { margin: 0 0 1em; }
.prose > :last-child { margin-bottom: 0; }

.site-announcement { width: min(440px, calc(100% - 30px)); max-height: calc(100vh - 30px); margin: auto; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 70px rgba(4, 7, 12, .38); }
.site-announcement::backdrop { background: rgba(4, 7, 12, .7); }
.site-announcement__header { min-height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 8px 13px 7px 20px; border-bottom: 1px solid var(--line); }
.site-announcement__header p { margin: 0; color: var(--accent); font-size: 10px; font-weight: 900; }
.site-announcement__header button { width: 32px; height: 32px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 23px; cursor: pointer; }
.site-announcement__body { padding: 20px 22px 8px; }
.site-announcement__body h2 { margin: 0 0 11px; font-size: 19px; }
.site-announcement__content { color: var(--muted); font-size: 12px; }
.site-announcement__content img { width: auto; max-height: 320px; margin: 14px auto; border-radius: 4px; }
.site-announcement__content a { color: var(--accent); text-decoration: underline; }
.site-announcement__actions { padding: 16px 22px 22px; }
.site-announcement__actions button { min-width: 88px; min-height: 37px; border: 1px solid var(--accent); border-radius: 3px; color: var(--paper); background: var(--accent); cursor: pointer; }

.error-page { width: min(580px, calc(100% - 32px)); margin: 0 auto; padding: 110px 0; text-align: center; }
.error-code { margin: 0; color: var(--moon); font-size: 42px; font-weight: 900; line-height: 1; }
.error-page h1 { margin: 12px 0 5px; font-size: 25px; }
.error-page > p:not(.error-code) { margin: 0; color: var(--muted); }
.error-page a { min-height: 39px; display: inline-flex; align-items: center; margin-top: 22px; padding: 7px 16px; border: 1px solid var(--accent); border-radius: 3px; color: var(--accent); font-weight: 800; }

.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.footer-inner { min-height: 170px; display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-content: center; gap: 18px 36px; padding: 28px 0; }
.footer-brand strong { font-size: 16px; }
.footer-brand p { max-width: 660px; margin: 5px 0 0; color: var(--muted); font-size: 10px; white-space: pre-line; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; color: var(--muted); font-size: 10px; }
.footer-nav a:hover { color: var(--accent); }
.footer-legal { grid-column: 1 / -1; margin: 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.footer-friend-links { grid-column: 1 / -1; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.footer-friend-links h2 { margin: 0 0 8px; font-size: 12px; }
.footer-friend-links > div { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 10px; }

@media (max-width: 1040px) {
  .opening-grid, .video-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .episode-list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .content-shell { width: min(var(--max-width), calc(100% - 30px)); }
  .header-primary { position: relative; min-height: 62px; grid-template-columns: auto minmax(120px, 1fr) 36px 36px; gap: 9px; }
  .brand-name { max-width: 125px; font-size: 15px; }
  .brand-mark { width: 31px; height: 31px; font-size: 13px; }
  .header-search { height: 36px; }
  .header-search button { min-width: 48px; padding-inline: 9px; }
  .theme-toggle, .nav-toggle { width: 36px; height: 36px; }
  .nav-toggle { display: block; }
  .nav-row { position: relative; border-top: 0; }
  .site-nav { position: absolute; top: 0; right: 15px; z-index: 3; width: min(300px, calc(100vw - 30px)); min-height: 0; display: none; padding: 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 4px 4px; background: var(--paper); box-shadow: 0 18px 40px rgba(4, 7, 12, .25); }
  .site-nav.is-open { display: grid; }
  .site-nav a { min-height: 38px; display: flex; align-items: center; padding: 6px 9px; }
  .site-nav a::after { display: none; }
  .opening-copy { grid-template-columns: 1fr; gap: 17px; align-items: start; }
  .quick-links { justify-content: flex-start; }
  .opening-grid, .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
  .filter-form button { grid-row: span 2; height: auto; }
  .episode-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .content-shell { width: min(100% - 22px, var(--max-width)); }
  .header-primary { grid-template-columns: auto minmax(0, 1fr) 34px 34px; gap: 7px; }
  .brand-name { display: none; }
  .brand-logo { width: 104px; height: 38px; }
  .header-search button { min-width: 42px; font-size: 9px; }
  .theme-toggle, .nav-toggle { width: 34px; height: 34px; }
  .page-band { padding: 24px 0; }
  .opening-copy { margin-bottom: 22px; padding-bottom: 18px; }
  .opening-copy h1 { font-size: 27px; }
  .opening-grid, .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 9px; }
  .video-card__body h3 { margin-top: 6px; font-size: 11px; }
  .video-card__body p { font-size: 9px; }
  .video-card__remark { right: 4px; bottom: 4px; max-width: calc(100% - 8px); padding: 2px 5px; font-size: 8px; }
  .page-title h1 { font-size: 24px; }
  .filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-form button { grid-column: 1 / -1; grid-row: auto; height: 37px; }
  .filter-line { grid-template-columns: 1fr; gap: 7px; }
  .filter-line > span { padding-top: 0; }
  .video-details { grid-template-columns: 100px minmax(0, 1fr); gap: 14px; padding: 18px 0; }
  .video-details > img { width: 100px; }
  .video-details h1 { font-size: 21px; }
  .video-blurb { display: none; }
  .video-facts div { grid-template-columns: 36px minmax(0, 1fr); font-size: 9px; }
  .episode-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr; gap: 15px; }
  .footer-nav { justify-content: flex-start; }
  .footer-legal { grid-column: auto; }
}

@media (max-width: 370px) {
  .header-search input { width: 100%; padding-inline: 8px; }
  .opening-grid, .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-details { grid-template-columns: 84px minmax(0, 1fr); }
  .video-details > img { width: 84px; }
  .info-tags span:nth-child(n + 3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
