:root {
  --bg: #0b0b0e;
  --surface: #16161b;
  --surface-2: #202027;
  --line: #2a2a33;
  --text: #f3f3f6;
  --muted: #9a9aa6;
  --accent: #ff4d4f;
  --accent-soft: rgba(255, 77, 79, .14);
  --radius: 8px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
main.wrap { min-height: 70vh; padding-bottom: 48px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11, 11, 14, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 28px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.logo b, .foot-brand b { color: var(--accent); }
.logo-mark { width: 24px; height: 24px; flex: none; }
.nav { display: flex; gap: 22px; color: var(--muted); font-weight: 600; }
.nav a:hover, .nav a.on { color: var(--text); }
.nav a.on { box-shadow: inset 0 -2px 0 var(--accent); padding-bottom: 2px; }
.search { position: relative; margin-left: auto; width: min(320px, 40vw); }
.search input { width: 100%; height: 38px; padding: 0 14px 0 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; outline: none; -webkit-appearance: none; }
.search input:focus { border-color: var(--accent); }
.search-icon { position: absolute; left: 13px; top: 10px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.suggest { position: absolute; top: 42px; right: 0; left: 0; min-width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 40px rgba(0, 0, 0, .6); }
.suggest a { display: flex; gap: 10px; align-items: center; padding: 8px 12px; font-size: 14px; }
.suggest a:hover { background: var(--surface-2); }
.suggest img { width: 36px; height: 48px; object-fit: cover; border-radius: 4px; }
.suggest em { display: block; font-style: normal; color: var(--muted); font-size: 12px; }
.suggest .all { color: var(--accent); border-top: 1px solid var(--line); }

/* hero */
.hero { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 14px) / 6); gap: 14px; margin-top: 24px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.hero::-webkit-scrollbar { display: none; }
.hero-item { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--surface); scroll-snap-align: start; }
.hero-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.hero-item:hover img { transform: scale(1.04); }
.hero-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 12px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .9)); display: grid; gap: 4px; }
.hero-text b { font-size: 16px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 14px; }
.card a { display: block; }
.poster { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card a:hover .poster img { transform: scale(1.04); }
.poster.bad img { visibility: hidden; }
.rank { position: absolute; left: 0; top: 0; min-width: 26px; height: 26px; padding: 0 6px; display: grid; place-items: center; border-bottom-right-radius: 8px; background: #3a3a44; font-size: 13px; font-weight: 800; }
.rank.r1 { background: #ff4d4f; } .rank.r2 { background: #ff7a45; } .rank.r3 { background: #ffa940; }
.card-title { margin: 8px 0 0; font-size: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-eps { margin: 3px 0 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* rails */
.rail { margin-top: 36px; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.rail-head h2, .block h2 { font-size: 20px; }
.rail-more { color: var(--muted); font-size: 14px; font-weight: 600; }
.rail-more:hover { color: var(--accent); }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track .card { scroll-snap-align: start; }

/* continue watching */
.cw { margin-top: 32px; }
.cw-track { display: grid; grid-auto-flow: column; grid-auto-columns: 320px; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.cw-track::-webkit-scrollbar { display: none; }
.cw-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 14px 11px 8px; border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cw-item:hover { background: var(--surface-2); }
.cw-item img { width: 54px; height: 72px; object-fit: cover; border-radius: 6px; flex: none; background: var(--surface-2); }
.cw-text { flex: 1; min-width: 0; display: grid; gap: 4px; }
.cw-text b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-text em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--accent); }
.cw-text small { color: var(--muted); font-weight: 500; }
.cw-play { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); font-size: 12px; padding-left: 2px; }
.cw-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 13px; }
.chip:hover { background: var(--accent-soft); color: var(--accent); }
.block { margin-top: 36px; }
.block h2 { margin-bottom: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: 700 15px var(--sans); cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.kicker { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.kicker a { color: var(--accent); }

/* drama page */
.crumbs { margin: 18px 0 16px; font-size: 13px; color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.watch { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 36px; align-items: start; }
.watch > * { min-width: 0; }
.stage { position: sticky; top: 76px; }
.player { position: relative; width: 100%; aspect-ratio: 9 / 16; max-height: calc(100vh - 100px); margin: 0 auto; background: #000; border-radius: 12px; overflow: hidden; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.play-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border: 0; cursor: pointer; color: var(--text); background: #000; font: 700 15px var(--sans); overflow: hidden; }
.play-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .6)); }
.play-cover span, .play-cover em { position: relative; z-index: 1; }
.play-cover span { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 28px; padding-left: 5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.play-cover em { font-style: normal; padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .6); }
.play-cover[hidden] { display: none; }
.player.pre video { object-fit: cover; }
.spin { display: none; position: absolute; left: 50%; top: 50%; z-index: 1; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 4px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; pointer-events: none; }
.player.wait .spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
/* 静音期间整块画面都是开声热区，只让出底部原生控制条 */
.unmute { position: absolute; inset: 0 0 56px 0; z-index: 2; padding: 0; border: 0; background: transparent; color: #fff; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.unmute[hidden] { display: none; }
.unmute-chip { position: absolute; top: 12px; right: 12px; display: none; align-items: center; gap: 6px; padding: 7px 12px 7px 10px; border-radius: 999px; background: rgba(0, 0, 0, .62); font-size: 13px; font-weight: 700; white-space: nowrap; transition: top .35s, right .35s, transform .35s, padding .35s, font-size .35s; }
.unmute.show .unmute-chip { display: flex; }
.unmute-chip svg { width: 18px; height: 18px; transition: width .35s, height .35s; }
.unmute.big .unmute-chip { top: 50%; right: 50%; transform: translate(50%, -50%); flex-direction: column; gap: 10px; padding: 20px 26px; font-size: 16px; background: rgba(0, 0, 0, .72); box-shadow: 0 8px 28px rgba(0, 0, 0, .5); }
.unmute.big .unmute-chip svg { width: 44px; height: 44px; }
.player-msg { z-index: 3; position: absolute; left: 12px; right: 12px; bottom: 64px; padding: 16px; border-radius: var(--radius); background: rgba(16, 16, 20, .95); border: 1px solid var(--line); text-align: center; }
.player-msg p { margin: 0 0 10px; }
.player-msg a { color: var(--accent); font-weight: 700; }
.finish { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: 16px; background: rgba(8, 8, 10, .98); text-align: center; overflow-y: auto; }
.finish-hd { margin: 0; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.finish-card { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; max-width: 300px; }
.finish-card img { height: min(30vh, 220px); width: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; outline: 2px solid var(--accent); background: var(--line); margin-bottom: 4px; }
.finish-card b { font-size: 17px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.finish-eps { font-size: 12px; color: var(--muted); }
.finish-play { width: 100%; max-width: 300px; justify-content: center; }
.finish-foot { display: flex; gap: 18px; align-items: center; }
.finish-more { color: var(--accent); font-size: 14px; font-weight: 600; }
.finish-x { padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.info h1 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.01em; }
.meta { margin: 8px 0 14px; color: var(--muted); font-size: 14px; }
.cast { margin: -6px 0 12px; color: var(--muted); font-size: 14px; }
.cast a { color: var(--text); }
.cast a:hover { color: var(--accent); }
.hook { margin: 18px 0 0; font-size: 17px; line-height: 1.5; color: var(--text); max-width: 70ch; }
.why { margin: 0; padding-left: 20px; color: #d4d4dc; max-width: 70ch; }
.why li { margin-bottom: 6px; }
.story { margin-top: 18px; }
.story p { margin: 0 0 12px; color: #d4d4dc; max-width: 70ch; }
.ep-head { margin-top: 12px; }
.ep-now { color: var(--muted); font-size: 14px; }
.ep-now b { color: var(--text); }
.ep-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.ep-strip { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 0; }
.ep-strip::-webkit-scrollbar { display: none; }
.ep-strip .ep { flex: none; min-width: 44px; padding: 0 6px; scroll-snap-align: center; }
.ep-step { flex: none; width: 40px; height: 40px; border-radius: 8px; border: 0; background: var(--surface-2); color: var(--text); font-size: 22px; cursor: pointer; }
.ep-step:hover { background: #2c2c35; }
.ep { height: 40px; border-radius: 6px; border: 0; background: var(--surface-2); color: var(--text); font: 600 14px var(--sans); cursor: pointer; }
.ep:hover { background: #2c2c35; }
.ep.on { background: var(--accent); color: #fff; }
.faq { margin: 0; max-width: 70ch; }
.faq dt { font-weight: 600; margin-top: 14px; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 4px 0 0; color: #c8c8d0; }

/* lists */
.page-head { margin: 28px 0 22px; }
.page-head h1 { font-size: clamp(26px, 3.6vw, 36px); letter-spacing: -.01em; }
.page-head p { color: var(--muted); margin: 6px 0 0; }
.tag-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tag-list a { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-radius: var(--radius); background: var(--surface); font-weight: 600; }
.tag-list a:hover { background: var(--surface-2); color: var(--accent); }
.tag-list em { font-style: normal; color: var(--muted); font-size: 13px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 36px; justify-content: center; }
.pager a, .pager .cur, .pager .gap { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: var(--surface); }
.pager .gap { background: none; color: var(--muted); }
.pager a:hover { background: var(--surface-2); }
.pager .cur { background: var(--accent); font-weight: 700; }
.empty { color: var(--muted); margin-bottom: 24px; }
.prose { max-width: 68ch; margin-top: 32px; }
.prose h1 { margin-bottom: 16px; }
.prose h2 { font-size: 18px; margin: 24px 0 8px; }
.prose a { color: var(--accent); }

.foot { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 14px; }
.foot-brand { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.foot-brand .logo-mark { width: 18px; height: 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-links a:hover { color: var(--text); }

@media (max-width: 1000px) {
  .hero { grid-auto-columns: calc((100% - 3 * 14px) / 4); }
}
@media (max-width: 820px) {
  .top { position: static; }
  .top-row { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px 16px; }
  .nav { margin-left: auto; gap: 16px; }
  .search { order: 3; width: 100%; flex: none; }
  .suggest { min-width: 0; }
  .hero { grid-auto-columns: 42%; margin-top: 16px; gap: 10px; }
  .watch { grid-template-columns: 1fr; gap: 20px; }
  .stage { position: static; }
  .player { max-height: 78vh; width: auto; border-radius: 10px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 18px 10px; }
  .rail-track { grid-auto-columns: 30%; gap: 10px; }
  .cw-track { grid-auto-columns: minmax(82%, 1fr); }
  .page-head { margin: 16px 0; }
}
@media (max-width: 480px) {
  .nav { gap: 14px; font-size: 14px; }
  .nav a:first-child { display: none; }
  .logo { font-size: 18px; }
  .rail { margin-top: 28px; }
  .rail-head h2, .block h2 { font-size: 18px; }
  .crumbs { margin: 12px 0; }
  .card-title { font-size: 13px; }
}
.foot-note { font-size: 12px; opacity: .75; margin-top: 6px; }
