/* Layout values are sampled from this site's reference at desktop and phone sizes. */
:root {
  --bg: #fffdf8; --ink: #272117; --accent: #ffcd24; --surface: #fff9e9; --muted: #635e56;
  --line: #d5d3cd; --paper: #fffdf8; --text: #272117; --card: #fff9e9;
  --hero-bg: #121317; --hero-ink: #fff8df; --bar-bg: #131417; --bar-ink: #fff8df;
  --button-ink: #13151a; --hero-button: #ffcd24; --hero-button-ink: #13151a;
  --limit: 1240px; --heading: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; --corners: 14px;
  --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(624px,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,7.36vw,92px)/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(160px,.48fr) minmax(0,1fr);padding:clamp(12px,3vw,38px);gap:clamp(16px,3vw,45px);border:1px solid var(--line);border-radius:var(--corners);background:var(--surface)}.details{align-self:center}
.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,13.2vw,53px); 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:grid;place-items:center;min-height:clamp(300px,33vw,470px)}
.home-hero .hero-art{width:min(68%,300px);aspect-ratio:9/15.8;transform:rotate(-6deg);border:7px solid #25252a;border-radius:26px;box-shadow:0 22px 33px #0006}
.hero-stage::before{content:"";width:74%;height:64%;position:absolute;inset:19% 8% auto auto;background:radial-gradient(ellipse,color-mix(in srgb,var(--accent) 20%,transparent),transparent 72%);z-index:-1}
.hero-picks{display:none}
@media(max-width:700px){.home-hero .hero-stage{min-height:230px}.home-hero .hero-art{width:min(50%,164px);border-width:5px}}
.home-hero{background:radial-gradient(at 96% 6%,#41331a,transparent 33%),#121317}.home-hero .hero-art{transform:rotate(-8deg)}.hero-cta{border-radius:100px}
@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{transform:translateY(-2px)}.drama-card:hover .poster img,.hero-stage a:hover img{transform:scale(1.04) rotate(.4deg)}
.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;}
}
