:root {
  --ink: #171817;
  --paper: #f3f1ec;
  --white: #fff;
  --red: #d33a31;
  --red-dark: #a8241e;
  --teal: #176b6c;
  --gold: #f1b84b;
  --line: #d2cfc7;
  --muted: #686a66;
  --shell: 1480px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.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; }

.site-header { min-height: 72px; background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 10; }
.header-inner { width: min(var(--shell), calc(100% - 48px)); min-height: 72px; margin: 0 auto; display: flex; align-items: center; gap: 42px; }
.brand { flex: 0 0 auto; font-family: Georgia, serif; font-size: 30px; font-weight: 700; }
.brand span { color: var(--red); }
.site-header nav { display: flex; gap: 28px; font-size: 15px; font-weight: 650; }
.site-header nav a:hover { color: var(--red); }
.search { margin-left: auto; display: flex; width: min(430px, 36vw); height: 42px; }
.search input { min-width: 0; flex: 1; border: 1px solid #bbb8b0; border-right: 0; background: var(--white); padding: 0 15px; font: inherit; font-size: 14px; border-radius: 4px 0 0 4px; outline: none; }
.search input:focus { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.search button { border: 0; background: var(--ink); color: var(--white); padding: 0 22px; font-weight: 700; border-radius: 0 4px 4px 0; cursor: pointer; }
.search button:hover { background: var(--teal); }
.channel-bar { height: 46px; background: var(--white); border-bottom: 1px solid var(--line); }
.channel-inner { width: min(var(--shell), calc(100% - 48px)); height: 100%; margin: auto; display: flex; align-items: center; gap: 30px; overflow-x: auto; scrollbar-width: none; }
.channel-inner::-webkit-scrollbar { display: none; }
.channel-inner a { flex: 0 0 auto; height: 100%; display: flex; align-items: center; border-bottom: 2px solid transparent; font-size: 14px; font-weight: 650; color: #555853; }
.channel-inner a:hover, .channel-inner a.active { color: var(--red); border-bottom-color: var(--red); }

.home-stage { background: #101110; padding: 18px 0; }
.stage-inner { width: min(var(--shell), calc(100% - 48px)); margin: auto; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; }
.hero { height: 420px; min-width: 0; background-size: cover; background-position: center 58%; position: relative; display: flex; align-items: center; color: var(--white); overflow: hidden; border-radius: 5px; }
.hero-empty { height: 420px; }
.hero-shade { position: absolute; inset: 0; background: rgba(0,0,0,.52); }
.hero-content { position: relative; width: 100%; padding: 42px 54px; }
.hero-content > * { max-width: 650px; }
.eyebrow { color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; margin: 0 0 12px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(52px, 6vw, 82px); line-height: 1.03; margin: 0 0 18px; letter-spacing: 0; }
.hero-content > p:not(.eyebrow):not(.hero-meta) { font-size: 17px; line-height: 1.7; color: #f0eee8; margin: 0 0 25px; }
.hero .hero-meta { margin: -4px 0 12px; color: var(--gold); font-size: 14px; font-weight: 700; }
.hero-actions { display: flex; align-items: center; gap: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; background: var(--red); color: var(--white); font-weight: 750; border-radius: 4px; transition: background .2s ease, transform .2s ease; }
.button:hover { background: #ed463c; transform: translateY(-1px); }
.text-link { color: var(--white); font-size: 14px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.65); padding-bottom: 4px; }
.hero-rail { height: 420px; padding: 16px; background: #1d1f1e; color: var(--white); border-radius: 5px; overflow: hidden; }
.rail-head { height: 34px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid #393b39; }
.rail-head strong { font-size: 16px; }
.rail-head a { color: #aeb1ad; font-size: 12px; }
.rail-item { height: 84px; display: grid; grid-template-columns: 102px minmax(0,1fr); gap: 11px; align-items: center; border-bottom: 1px solid #303230; position: relative; }
.rail-item:hover b { color: var(--gold); }
.rail-item img { width: 102px; height: 62px; object-fit: cover; border-radius: 3px; }
.rail-item > span:last-child { min-width: 0; }
.rail-item b, .rail-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-item b { font-size: 14px; margin-bottom: 7px; }
.rail-item small { color: #aeb1ad; font-size: 11px; }
.rail-item:has(.rail-number) { grid-template-columns: 20px 78px minmax(0,1fr); }
.rail-item:has(.rail-number) img { width: 78px; height: 52px; }
.rail-number { color: var(--gold); font-family: Georgia, serif; font-size: 18px; font-weight: 700; }

.section, .catalog, .channel-section { width: min(var(--shell), calc(100% - 48px)); margin: 0 auto; padding: 54px 0 66px; }
.content-section { width: min(1160px, calc(100% - 48px)); margin: auto; padding: 54px 0; border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; }
.section-head h2, .content-section h2 { font-family: Georgia, "Noto Serif SC", serif; font-size: 34px; margin: 0; }
.section-head > a { font-size: 14px; font-weight: 750; border-bottom: 2px solid var(--red); padding-bottom: 4px; }
.section-head.compact { margin-bottom: 22px; }
.channel-section { padding-bottom: 28px; }
.channel-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.channel-card { height: 148px; position: relative; overflow: hidden; color: var(--white); border-radius: 5px; background: #252725; }
.channel-card:after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.48); }
.channel-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.channel-card:hover img { transform: scale(1.03); }
.channel-card > span { position: absolute; z-index: 1; inset: 0; padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; }
.channel-card b { font-size: 24px; margin-bottom: 4px; }
.channel-card small { color: #e6e4df; font-size: 12px; }
.channel-card em { position: absolute; top: 12px; right: 12px; padding: 5px 7px; border-radius: 3px; background: rgba(19,20,19,.78); color: #e6e4df; font-size: 10px; font-style: normal; }
.content-floor { border-top: 1px solid var(--line); }
.floor-empty { min-height: 116px; border: 1px solid var(--line); background: var(--white); padding: 26px 28px; display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; border-radius: 5px; }
.floor-empty strong { font-size: 16px; }
.floor-empty p { margin: 0; color: var(--muted); font-size: 13px; }
.floor-empty a { color: var(--red); font-size: 13px; font-weight: 750; }
.poster-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 28px 18px; }
.poster-card { min-width: 0; }
.poster-card a { display: block; }
.poster { aspect-ratio: 2/3; background: #dedbd4; overflow: hidden; position: relative; border-radius: 4px; }
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.poster-card:hover img { transform: scale(1.025); }
.poster span { position: absolute; right: 7px; bottom: 7px; background: rgba(21,21,21,.86); color: var(--white); padding: 4px 7px; border-radius: 3px; font-size: 11px; max-width: 85%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster .score { position: absolute; top: 8px; left: 8px; background: var(--gold); color: #201b12; padding: 5px 7px; border-radius: 3px; font-size: 12px; }
.poster-card h3 { font-size: 15px; margin: 11px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster-card p { font-size: 12px; color: var(--muted); margin: 0; }

.preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.preview-card { min-width: 0; }
.preview-image { aspect-ratio: 4/5; position: relative; overflow: hidden; background: #d8d5ce; border-radius: 4px; }
.preview-image:after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.18); }
.preview-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75); }
.preview-image span { position: absolute; z-index: 1; top: 10px; left: 10px; background: rgba(23,24,23,.88); color: #fff; padding: 6px 9px; border-radius: 3px; font-size: 11px; font-weight: 700; }
.preview-card h3 { margin: 12px 0 4px; font-size: 17px; }
.preview-card p { margin: 0; color: var(--muted); font-size: 13px; }
.library-status { display: flex; gap: 22px; align-items: baseline; border-top: 1px solid var(--line); margin-top: 34px; padding-top: 22px; }
.library-status strong { font-size: 14px; }
.library-status p { margin: 0; color: var(--muted); font-size: 13px; }

.empty-inline { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 42px 0; }
.empty-inline h2, .empty-inline h3 { font-family: Georgia, "Noto Serif SC", serif; font-size: 28px; margin: 0 0 10px; }
.empty-inline p { color: var(--muted); margin: 0; line-height: 1.7; }
.catalog { min-height: 70vh; }
.catalog > h1 { font-family: Georgia, "Noto Serif SC", serif; font-size: 52px; margin: 0 0 28px; }
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 38px; }
.filters a { border: 1px solid var(--line); background: var(--white); padding: 9px 16px; border-radius: 4px; font-size: 14px; }
.filters a.active { background: var(--teal); border-color: var(--teal); color: var(--white); }
.pagination { display: flex; justify-content: center; gap: 7px; margin-top: 45px; }
.pagination a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--white); border-radius: 4px; }
.pagination a.active { background: var(--red); border-color: var(--red); color: var(--white); }

.detail { display: grid; grid-template-columns: minmax(240px,360px) minmax(0,780px); gap: clamp(40px,7vw,100px); padding: 70px max(24px, calc((100% - var(--shell))/2)); background: var(--ink); color: var(--white); }
.detail-poster { aspect-ratio: 2/3; background: #2b2b2b; }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-copy { align-self: center; }
.detail-copy h1 { font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(44px,6vw,82px); line-height: 1.03; margin: 0 0 13px; }
.detail-copy .sub { color: #bbb7af; font-size: 18px; }
.detail-copy dl { margin: 36px 0 0; border-top: 1px solid #414141; }
.detail-copy dl div { display: grid; grid-template-columns: 72px 1fr; padding: 13px 0; border-bottom: 1px solid #414141; }
.detail-copy dt { color: #aaa; font-size: 13px; }
.detail-copy dd { margin: 0; line-height: 1.55; }
.prose { font-family: Georgia, "Noto Serif SC", serif; font-size: 18px; line-height: 1.9; max-width: 850px; }
.episodes { display: flex; flex-wrap: wrap; gap: 8px; }
.episodes span { background: var(--white); border: 1px solid var(--line); padding: 10px 14px; border-radius: 4px; font-size: 14px; }
.legal-note { font-size: 13px; color: var(--muted); margin-top: 18px; }
.empty { min-height: 70vh; width: min(var(--shell), calc(100% - 48px)); margin: auto; padding: 100px 0; }
.empty h1 { font-family: Georgia, "Noto Serif SC", serif; font-size: 56px; margin: 0 0 14px; }
.empty > p:not(.eyebrow) { color: var(--muted); margin-bottom: 27px; }

footer { background: #e3dfd7; border-top: 1px solid var(--line); }
.footer-inner { width: min(var(--shell), calc(100% - 48px)); margin: auto; padding: 44px 0; display: flex; justify-content: space-between; gap: 40px; }
footer strong { font-family: Georgia, serif; font-size: 24px; }
footer p { font-size: 13px; color: #5f5b54; max-width: 550px; line-height: 1.65; }

@media (max-width: 1050px) {
  .stage-inner { grid-template-columns: minmax(0,1fr) 300px; }
  .hero-rail { padding: 14px; }
  .rail-item { grid-template-columns: 84px minmax(0,1fr); }
  .rail-item img { width: 84px; }
  .poster-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .site-header nav { display: none; }
  .channel-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .preview-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 26px 14px; }
}
@media (max-width: 700px) {
  .site-header { padding: 0; }
  .header-inner { width: calc(100% - 32px); min-height: 64px; padding: 11px 0; gap: 12px; flex-wrap: wrap; }
  .brand { font-size: 26px; }
  .search { order: 2; width: 100%; margin: 0; height: 42px; }
  .channel-inner { width: calc(100% - 32px); gap: 23px; }
  .home-stage { padding: 0; }
  .stage-inner { width: 100%; display: block; }
  .hero, .hero-empty { height: 390px; border-radius: 0; background-position: center; }
  .hero-content { width: 100%; padding: 30px 18px; }
  .hero h1 { font-size: 46px; }
  .hero-rail { height: auto; border-radius: 0; padding: 16px 18px; }
  .rail-item { height: 74px; grid-template-columns: 92px minmax(0,1fr); }
  .rail-item img { width: 92px; height: 54px; }
  .rail-item:has(.rail-number) { grid-template-columns: 18px 70px minmax(0,1fr); }
  .rail-item:has(.rail-number) img { width: 70px; height: 48px; }
  .section, .catalog, .content-section, .channel-section { width: calc(100% - 36px); padding-top: 44px; padding-bottom: 48px; }
  .channel-section { padding-bottom: 12px; }
  .channel-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .channel-card { height: 124px; }
  .channel-card > span { padding: 14px; }
  .channel-card b { font-size: 19px; }
  .channel-card small { display: none; }
  .channel-card em { top: 8px; right: 8px; }
  .floor-empty { min-height: 0; display: block; padding: 22px; }
  .floor-empty p { margin: 8px 0 16px; }
  .poster-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 25px 12px; }
  .preview-grid { gap: 22px 10px; }
  .preview-card h3 { font-size: 15px; }
  .catalog > h1 { font-size: 39px; }
  .detail { grid-template-columns: 1fr; padding: 35px 18px 50px; gap: 32px; }
  .detail-poster { width: min(70vw,320px); }
  .detail-copy h1 { font-size: 44px; }
  .section-head h2, .content-section h2 { font-size: 29px; }
  .library-status { display: block; }
  .library-status p { margin-top: 6px; line-height: 1.6; }
  .footer-inner { width: calc(100% - 36px); flex-direction: column; padding: 38px 0; }
  .empty { width: calc(100% - 36px); }
  .empty h1 { font-size: 43px; }
}
