:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --paper: #f4efe4;
  --paper-2: #fffaf0;
  --ink: #17231f;
  --muted: #66716a;
  --line: #d8cdb7;
  --teal: #006d77;
  --green: #2a9d8f;
  --red: #d1495b;
  --yellow: #f2c14e;
  --blue: #277da1;
  --shadow: 0 20px 60px rgba(28, 39, 35, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0,109,119,.08) 1px, transparent 1px 32px),
    linear-gradient(0deg, rgba(0,109,119,.06) 1px, transparent 1px 32px),
    radial-gradient(circle at 18% 10%, rgba(242,193,78,.26), transparent 28%),
    radial-gradient(circle at 85% 0%, rgba(42,157,143,.2), transparent 24%),
    var(--paper);
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
h1, h2, h3, p, figure { margin-top: 0; }
button, select { font: inherit; }

.site-shell {
  width: min(1620px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 2vw, 34px) 0;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(16px, 2vw, 32px);
}

.side-nav {
  position: sticky;
  top: 18px;
  align-self: start;
  min-height: calc(100vh - 36px);
  padding: 16px 12px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--teal);
}
.brand {
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
  display: grid;
  gap: 6px;
}
.brand strong {
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: 0;
}
.brand span {
  color: var(--teal);
  font-size: .74rem;
  font-weight: 950;
  text-transform: uppercase;
}
.side-nav nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-nav nav a {
  min-height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #fffdf5;
  color: var(--ink);
  font-weight: 900;
}
.side-nav nav a.active,
.side-nav nav a:hover {
  color: white;
  background: var(--teal);
  border-color: var(--teal);
}
.side-nav p,
.cover-head p,
.page-stack p,
.poster-card p,
.strip-card p,
.footer p,
.detail-copy p,
.ledger-row small {
  color: var(--muted);
  line-height: 1.72;
}

.page-stack {
  min-width: 0;
  display: grid;
  gap: clamp(18px, 2vw, 34px);
}

.cover-stage {
  display: grid;
  gap: 14px;
}
.cover-head {
  min-height: 320px;
  padding: clamp(24px, 5vw, 74px);
  display: grid;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(255,250,240,.95), rgba(244,239,228,.84)),
    repeating-linear-gradient(90deg, rgba(0,109,119,.08) 0 2px, transparent 2px 18px);
  border: 2px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.cover-head::after {
  content: "日本电影";
  position: absolute;
  right: clamp(18px, 5vw, 74px);
  bottom: -10px;
  color: rgba(209,73,91,.12);
  font-size: clamp(3.8rem, 14vw, 11rem);
  line-height: .8;
  font-weight: 950;
}
.eyebrow {
  margin-bottom: 8px;
  color: var(--red);
  font-size: .76rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0;
}
h1 {
  max-width: 960px;
  margin-bottom: 12px;
  font-size: clamp(2.5rem, 7.5vw, 7.3rem);
  line-height: .92;
  letter-spacing: 0;
}
h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2vw, 2.15rem);
  line-height: 1.08;
  letter-spacing: 0;
}
h3 { line-height: 1.18; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.action,
.ghost {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 2px solid var(--ink);
  font-weight: 950;
  box-shadow: 4px 4px 0 var(--ink);
}
.action { color: white; background: var(--red); }
.ghost { color: var(--ink); background: var(--yellow); }

.hero-band {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(300px, 1fr) minmax(230px, .78fr);
  gap: 14px;
}
.band-left,
.band-mid,
.band-right,
.wide-band,
.feed-panel,
.rank-panel,
.archive-head,
.archive-rail .rail-card,
.detail-stage,
.related-stage {
  background: var(--paper-2);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}
.band-left { padding: 10px; }
.band-left a {
  position: relative;
  display: block;
  min-height: 560px;
  height: 100%;
  overflow: hidden;
}
.band-left img {
  height: 100%;
  object-fit: cover;
}
.band-left span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 9px 12px;
  color: white;
  background: var(--teal);
  font-weight: 950;
}
.band-mid,
.band-right {
  padding: 18px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.band-copy {
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}
.ticker-list,
.rank-panel > div:last-child {
  display: grid;
}
.ledger-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 46px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.ledger-row b {
  color: var(--red);
  font-size: .86rem;
  font-weight: 950;
}
.ledger-row span {
  min-width: 0;
  display: grid;
  gap: 2px;
  font-weight: 950;
}
.ledger-row small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ledger-row i {
  justify-self: end;
  color: var(--teal);
  font-style: normal;
  font-weight: 950;
}
.channel-grid {
  display: grid;
  gap: 10px;
}
.channel-grid a {
  min-height: 86px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 10px;
  align-items: center;
  background: #fffdf6;
  border: 1px solid var(--line);
}
.channel-grid strong { font-size: 1.05rem; }
.channel-grid span { color: var(--muted); font-size: .86rem; }
.channel-grid img {
  width: 54px;
  height: 68px;
  object-fit: cover;
  border: 1px solid var(--ink);
}

.section {
  padding: clamp(16px, 2vw, 24px);
}
.section-head {
  margin-bottom: 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
}
.section-head a {
  color: var(--teal);
  font-weight: 950;
}
.slim { align-items: start; }
.vault-grid {
  display: grid;
  gap: 14px;
}
.showcase-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.poster-card,
.strip-card {
  background: #fffdf6;
  border: 1px solid var(--line);
  transition: transform .18s ease, box-shadow .18s ease;
}
.poster-card:hover,
.strip-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0,109,119,.28);
}
.poster-card a {
  display: grid;
}
.poster-card figure,
.strip-card figure {
  position: relative;
  margin: 0;
  background: #e9dfcd;
}
.poster-card img {
  aspect-ratio: 3 / 4.3;
  object-fit: cover;
}
.poster-card figcaption,
.strip-card figcaption {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 7px;
  color: white;
  background: var(--red);
  font-size: .82rem;
  font-weight: 950;
}
.poster-card div {
  min-height: 128px;
  padding: 10px;
}
.poster-card span,
.strip-card span {
  color: var(--teal);
  font-size: .78rem;
  font-weight: 950;
}
.poster-card h3,
.strip-card h3 {
  margin: 5px 0;
  font-size: 1rem;
}
.poster-card p,
.strip-card p {
  margin-bottom: 6px;
  font-size: .82rem;
}
.poster-card em,
.strip-card em {
  color: var(--red);
  font-size: .8rem;
  font-style: normal;
  font-weight: 950;
}

.split-band {
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
}
.feed-panel,
.rank-panel {
  padding: clamp(16px, 2vw, 22px);
}
.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.strip-card a {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  min-height: 132px;
}
.strip-card img {
  height: 132px;
  object-fit: cover;
}
.strip-card div { padding: 10px; }

.archive-head {
  padding: clamp(22px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, .7fr);
  gap: 28px;
  align-items: end;
}
.archive-head h1 {
  font-size: clamp(2.1rem, 5vw, 5rem);
}
.archive-tools,
.filter-rail {
  display: grid;
  gap: 10px;
}
.filter-rail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.filter-rail button,
.toolbox select {
  min-height: 38px;
  border: 2px solid var(--ink);
  background: #fffdf6;
  color: var(--ink);
  font-weight: 900;
}
.filter-rail button.active {
  color: white;
  background: var(--teal);
}
.toolbox {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-weight: 900;
}
.toolbox span { color: var(--red); }
.archive-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
}
.archive-rail {
  display: grid;
  align-content: start;
  gap: 14px;
}
.rail-card {
  padding: 16px;
}
.library-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.detail-stage {
  min-height: 620px;
  padding: clamp(16px, 2vw, 26px);
  display: grid;
  grid-template-columns: minmax(280px, .68fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 48px);
  align-items: stretch;
}
.detail-poster {
  margin: 0;
  border: 2px solid var(--ink);
  background: #e9dfcd;
}
.detail-poster img {
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}
.detail-copy {
  padding: clamp(18px, 4vw, 54px);
  display: grid;
  align-content: center;
}
.detail-copy h1 {
  font-size: clamp(2.1rem, 5vw, 5.8rem);
}
.sub {
  color: var(--teal) !important;
  font-size: 1.12rem;
  font-weight: 900;
}
.facts {
  margin: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.facts span {
  padding: 8px 10px;
  color: white;
  background: var(--teal);
  font-weight: 950;
}
.related-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.footer {
  width: min(1620px, 100%);
  margin: 34px auto 0;
  padding: 22px clamp(14px, 2vw, 34px) 34px;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 18px;
  border-top: 2px solid var(--ink);
}
.footer strong {
  font-size: 1.4rem;
}
.footer h3 {
  margin-bottom: 8px;
  color: var(--teal);
}
.footer a {
  display: block;
  margin: 5px 0;
  color: var(--muted);
  font-weight: 900;
}

@media (max-width: 1180px) {
  .site-shell { grid-template-columns: 1fr; }
  .side-nav {
    position: static;
    min-height: auto;
    grid-template-rows: none;
  }
  .side-nav nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hero-band,
  .archive-head,
  .detail-stage,
  .archive-layout,
  .split-band {
    grid-template-columns: 1fr;
  }
  .showcase-grid,
  .library-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-shell { padding-inline: 10px; }
  .side-nav nav,
  .filter-rail,
  .compact-grid,
  .showcase-grid,
  .library-grid,
  .related-grid,
  .footer {
    grid-template-columns: 1fr 1fr;
  }
  .cover-head { min-height: 260px; }
  .band-left a { min-height: 430px; }
  .toolbox { grid-template-columns: 1fr; }
  .detail-stage { padding: 10px; }
  .detail-poster img { min-height: 420px; }
  .footer { padding-inline: 12px; }
}

@media (max-width: 520px) {
  .side-nav nav,
  .showcase-grid,
  .library-grid,
  .related-grid,
  .footer {
    grid-template-columns: 1fr;
  }
  h1 { font-size: 2.65rem; }
  .cover-head { padding: 22px; }
  .strip-card a { grid-template-columns: 82px minmax(0, 1fr); }
  .strip-card img { height: 126px; }
}
