/* Layout values are sampled from this site's reference at desktop and phone sizes. */
:root {
  --bg: #0a0a1a; --ink: #f1f5f9; --accent: #a78bfa; --surface: #151626; --muted: #b0b3ba;
  --line: #353644; --paper: #0a0a1a; --text: #f1f5f9; --card: #151626;
  --hero-bg: #151329; --hero-ink: #f6f4ff; --bar-bg: #0d0d1b; --bar-ink: #f6f4ff;
  --button-ink: #ffffff; --hero-button: #a78bfa; --hero-button-ink: #ffffff;
  --limit: 1232px; --heading: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; --corners: 8px;
  --space: clamp(18px, 3vw, 46px); --poster-shape: .73; --columns: 5;
}
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
.container, .header-inner { width: min(var(--limit), calc(100% - clamp(32px, 8vw, 128px))); margin-inline: auto; min-width: 0; }
.site-header { position: relative; z-index: 8; color: var(--bar-ink); background: var(--bar-bg); border-block-end: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: clamp(8px,1.3vw,22px); min-height: 69px; }
.header-inner > * { min-width: 0; }
.wordmark { flex-shrink: 0; font-weight: 850; line-height: 1.22; letter-spacing: -.046em; color: inherit; }
.main-nav { display: flex; align-items: center; gap: clamp(8px,1.5vw,24px); }
.main-nav a { color: inherit; white-space: nowrap; }
.main-nav a[aria-current], .main-nav a:hover { color: var(--accent); }
.search-form input, .language select { max-width: 100%; }
.home-hero {
  isolation: isolate; position: relative; min-width: 0; overflow: clip; display: grid;
  grid-template-columns: minmax(0,.98fr) minmax(0,1.02fr); align-items: center;
  gap: var(--space); min-height: min(590px,72vw); margin: 0 auto var(--space);
  padding: clamp(24px,4.5vw,72px) clamp(20px,3.2vw,60px);
  background: var(--hero-bg); color: var(--hero-ink); border-radius: var(--corners);
}
.home-hero :is(.hero-copy,.hero-stage,.hero-picks,.hero-art) { min-width: 0; }
.hero-copy { z-index: 2; position: relative; }
.hero-copy h1 { margin: 0; max-width: 16em; color: var(--hero-ink); font: 820 clamp(33px,4.08vw,51px)/1.09 var(--heading); letter-spacing: -.045em; overflow-wrap: anywhere; text-wrap: balance; }
.hero-copy p { color: inherit; opacity: .83; max-width: 43em; font-size: clamp(14px,1.12vw,17px); line-height: 1.8; overflow-wrap: anywhere; }
.hero-cta { display: inline-flex; align-items: center; justify-content: center; gap: .35em; min-height: 42px; padding: 8px 20px; background: var(--hero-button); border-radius: var(--corners); color: var(--hero-button-ink); font-weight: 700; text-decoration: none; }
.hero-cta:hover { filter: brightness(1.06); }
.hero-stage { display: grid; align-items: center; position: relative; min-height: 0; width: 100%; }
.hero-stage a, .hero-picks > a { position: relative; display: block; min-width: 0; overflow: hidden; color: #fff; background: var(--surface); border-radius: var(--corners); }
.hero-stage img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 32%; }
.hero-picks { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(5px,1vw,16px); }
.hero-picks > a { aspect-ratio: 2/3; }
.hero-picks span { position: absolute; inset-inline: 0; bottom: 0; padding: 1.5em .5em .45em; background: linear-gradient(transparent,rgba(0,0,0,.78)); color: #fff; font-size: clamp(10px,1vw,15px); line-height: 1.25; word-break: break-word; }
.hero-art { aspect-ratio: 3/4; }
.catalog-section { margin-block: clamp(26px,4.4vw,70px); min-width: 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-block-end: clamp(12px,2vw,28px); }
.section-head h2 { margin: 0; color: var(--ink); font-family: var(--heading); font-size: clamp(22px,2.5vw,38px); letter-spacing: -.04em; line-height: 1.18; }
.section-head a { color: var(--accent); }
.card-grid { display: grid; grid-template-columns: repeat(var(--columns),minmax(0,1fr)); gap: clamp(10px,1.55vw,24px); align-items: start; }
.drama-card { min-width: 0; color: var(--ink); }
.drama-card a { color: inherit; }
.poster { display: block; overflow: hidden; border-radius: var(--corners); aspect-ratio: var(--poster-shape); background: var(--surface); }
.poster img { display: block; height: 100%; width: 100%; object-fit: cover; object-position: center 30%; }
.card-body { padding-block: 9px 5px; min-width: 0; }
.card-body h3 { margin: 0 0 .3em; line-height: 1.35; font-size: clamp(14px,1.25vw,19px); overflow-wrap: anywhere; }
.card-body > span { color: var(--muted); }
.detail-layout { min-width: 0; color: var(--ink); margin-block: clamp(20px,3.6vw,54px); }
.detail-layout .details { min-width: 0; }
.detail-layout h1, .details h1 { font-family: var(--heading); line-height: 1.13; overflow-wrap: anywhere; }
.detail-cover { display: block; max-width: 100%; color: var(--ink); }
.detail-cover img, img.detail-cover { object-fit: cover; width: 100%; border-radius: var(--corners); }
.details p { line-height: 1.75; }
.player { background: #08090b; border-radius: var(--corners); overflow: hidden; }
.episodes { display: flex; flex-wrap: wrap; gap: .45em; }
.episodes a[aria-current], .episodes a.active { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-footer { padding-block: clamp(22px,4vw,60px); border-block-start: 1px solid var(--line); background: var(--bar-bg); color: var(--bar-ink); }
.site-footer a { color: inherit; }
:where(a, input, button, select, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1000px) {
  .container,.header-inner { width: min(var(--limit), calc(100% - 36px)); }
  .card-grid { grid-template-columns: repeat(min(var(--columns),4),minmax(0,1fr)); }
  .header-inner { flex-wrap: wrap; padding-block: 9px; }
  .main-nav { min-width: 0; overflow-x: auto; scrollbar-width: thin; }
}

.site-header .main-nav{margin-inline-start:auto}.main-nav a{font-size:clamp(13px,1vw,16px)}
.detail-layout{display:grid;grid-template-columns:minmax(170px,.52fr) minmax(0,1fr);align-items:end;gap:clamp(15px,3.5vw,54px);padding:clamp(15px,3.5vw,55px);background:var(--hero-bg);color:var(--hero-ink);border-radius:var(--corners)}.detail-layout .details{color:inherit}.detail-layout h1{color:inherit;font-size:clamp(30px,4.5vw,66px)}.detail-cover{overflow:hidden}
.card-grid{--columns:4}.poster{aspect-ratio:16/10}.card-body h3{font-size:clamp(14px,1.35vw,21px)}
@media (max-width: 700px) {
  .container,.header-inner { width: calc(100% - 28px); }
  .site-header .header-inner { min-height: 48px; gap: 9px; align-items: center; }
  .site-header .wordmark { max-width: 74vw; overflow-wrap: anywhere; }
  .site-header .main-nav { max-width: 100%; flex: 1 1 100%; width: 100%; gap: 16px; padding-block: 5px; }
  .main-nav::-webkit-scrollbar { height: 3px; }
  .header-inner .search-form { flex: 1 1 100px; width: auto; }
  .home-hero { grid-template-columns: minmax(0,1fr); min-height: 0; padding: clamp(16px,5vw,30px); gap: 18px; margin-block-end: 25px; }
  .hero-copy h1 { max-width: 100%; font-size: clamp(29px,7.2vw,29px); line-height: 1.14; letter-spacing: -.035em; }
  .hero-copy p { font-size: 14px; line-height: 1.65; }
  .hero-stage { max-width: 100%; margin-inline: auto; }
  .home-hero .hero-cta { min-height: 40px; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 9px; }
  .catalog-section { margin-block: 28px; }
  .section-head { align-items: center; margin-block-end: 13px; }
  .section-head h2 { font-size: 23px; }
  .card-body { padding-top: 7px; }
  .card-body h3 { font-size: 14px; }
  .detail-layout { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .details { min-width: 0; }
  .detail-cover, img.detail-cover { max-width: min(66vw,265px); margin-inline: auto; }
}
@media (max-width: 370px) {
  .container,.header-inner { width: calc(100% - 20px); }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


.hero-stage{display:block;aspect-ratio:1.25;perspective:700px;isolation:isolate}
.home-hero .hero-art,.hero-picks>a{width:45%;height:80%;position:absolute;left:27%;top:10%;z-index:3;box-shadow:0 14px 28px #0006;aspect-ratio:auto}
.hero-picks{display:contents}.hero-picks>a{width:37%;height:65%;left:4%;top:19%;transform:rotate(-8deg);z-index:2}.hero-picks>a:nth-child(2){left:auto;right:4%;transform:rotate(8deg)}
.hero-picks>a:nth-child(n+3){display:none}.hero-picks span{display:none}
@media(max-width:700px){.home-hero .hero-stage{width:min(90%,365px);aspect-ratio:1.5}}
.home-hero{background:linear-gradient(125deg,#0e1020,#24213d)}.hero-stage .hero-art{top:5%;height:88%}.hero-picks>a:first-child,.hero-picks>a:nth-child(2){height:72%;transform:none}.hero-copy h1{line-height:1.17}.hero-cta{background:linear-gradient(100deg,#a593ef,#60c7cf);color:#151328}
@media (hover:hover) and (prefers-reduced-motion:no-preference){
.drama-card, .hero-cta, .main-nav a{transition:transform .19s ease,box-shadow .2s ease,color .16s ease}
.poster img,.hero-stage a img{transition:transform .29s ease,filter .22s ease,object-position .3s ease}
.drama-card:hover{box-shadow:0 10px 26px #0002}.drama-card:hover .poster img,.hero-stage a:hover img{transform:scale(1.05)}
.hero-cta:hover{transform:translateY(-2px)}.main-nav a:hover{text-underline-offset:.3em;text-decoration:underline}
}
@media (max-width:700px){
  .home-hero {grid-template-columns:minmax(0,1fr);}
  .detail-layout {grid-template-columns:minmax(0,1fr);}
  .header-inner {flex-wrap:wrap;row-gap:8px;}
  .hero-copy,.hero-stage,.details,.card-body,.drama-card {max-width:100%;}
  .search-form input,.language select {min-width:0;}
}
