:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --bg: #f3efe7;
  --paper: #fffdf8;
  --paper-2: #f7f1e7;
  --ink: #141312;
  --muted: #615c55;
  --line: rgba(20, 19, 18, .12);
  --line-strong: rgba(20, 19, 18, .2);
  --accent: #d11f2d;
  --accent-2: #0e6f9f;
  --accent-3: #2a8b63;
  --shadow: 0 18px 46px rgba(22, 18, 12, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(20, 19, 18, .04) 1px, transparent 1px 62px),
    linear-gradient(0deg, rgba(20, 19, 18, .03) 1px, transparent 1px 62px),
    linear-gradient(180deg, #f9f5ed 0%, #f2ede4 48%, #ece7dc 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .07;
  background-image: repeating-linear-gradient(135deg, transparent 0 11px, rgba(0,0,0,.18) 11px 12px);
}
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(1680px, 100%);
  margin: 0 auto;
  padding: 16px clamp(14px, 2.4vw, 34px) 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(16px, 2.8vw, 28px);
}

.side-nav {
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  min-height: 720px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  padding: 20px;
  color: #f5f1e8;
  background:
    linear-gradient(180deg, rgba(16, 15, 14, .98), rgba(27, 22, 18, .96));
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .12);
}

.brand {
  display: grid;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand strong {
  color: #fff;
  font-size: 1.7rem;
  line-height: 1.05;
  letter-spacing: 0;
}
.brand span {
  color: #ffb5b5;
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.side-nav nav {
  display: grid;
  align-content: start;
  gap: 8px;
}
.side-nav nav a {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: rgba(255,255,255,.7);
  border: 1px solid transparent;
  border-left: 4px solid transparent;
  background: rgba(255,255,255,.02);
  font-weight: 800;
}
.side-nav nav a.active,
.side-nav nav a:hover {
  color: #fff;
  background: rgba(209,31,45,.15);
  border-color: rgba(209,31,45,.3);
  border-left-color: var(--accent);
}

.side-nav p,
.hero-copy p,
.page-title p,
.poster-card p,
.strip-card p,
.footer p,
.detail-copy p,
.ledger-row small {
  color: var(--muted);
  line-height: 1.72;
}

main { min-width: 0; }

.hero {
  padding-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(280px, .66fr) minmax(252px, .46fr);
  gap: 16px;
  align-items: stretch;
}

.hero-copy,
.ticker,
.score-board,
.page-title,
.filters,
.detail-copy {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  min-height: 592px;
  display: grid;
  align-content: center;
  padding: clamp(24px, 4.6vw, 58px);
  position: relative;
  overflow: hidden;
}
.hero-copy::before {
  content: "JAPAN FILM";
  position: absolute;
  right: 18px;
  top: 16px;
  color: rgba(20, 19, 18, .06);
  font-size: clamp(2.6rem, 8vw, 8rem);
  font-weight: 950;
  line-height: .95;
  letter-spacing: 0;
}
.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 14px;
  background: linear-gradient(90deg, var(--accent) 0 28%, var(--accent-2) 28% 57%, var(--accent-3) 57% 78%, #111 78% 100%);
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}
h1 {
  max-width: 900px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(2.2rem, 4.2vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: 0;
}
h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(1.28rem, 1.9vw, 2.05rem);
  line-height: 1.12;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.action,
.ghost {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--ink);
  font-weight: 900;
}
.action { color: #fff; background: var(--ink); }
.ghost { color: var(--ink); background: transparent; }

.feature-poster {
  min-height: 592px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.feature-poster a { position: relative; display: block; height: 100%; }
.feature-poster img {
  height: 100%;
  object-fit: cover;
  background: #fff;
}
.feature-poster span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 10px 12px;
  color: #fff;
  background: rgba(20,19,18,.9);
  font-weight: 900;
  border-left: 4px solid var(--accent);
}

.ticker {
  min-height: 592px;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}
.ledger-row {
  min-height: 50px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.ledger-row b {
  color: var(--accent);
  font-size: .9rem;
}
.ledger-row span {
  min-width: 0;
  display: grid;
  gap: 2px;
  font-weight: 900;
}
.ledger-row small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .76rem;
}
.ledger-row i {
  justify-self: end;
  color: var(--accent-2);
  font-style: normal;
  font-weight: 900;
}

.type-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.type-rail a {
  min-height: 176px;
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: end;
  gap: 5px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.type-rail img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: .92;
  filter: saturate(1.02) contrast(1.02);
}
.type-rail a::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02) 0 42%, rgba(20,19,18,.72) 100%);
}
.type-rail strong,
.type-rail span {
  position: relative;
  z-index: 1;
}
.type-rail strong {
  color: #fff;
  font-size: 1.06rem;
}
.type-rail span {
  color: rgba(255,255,255,.82);
  font-size: .82rem;
}

.section { padding-top: 44px; }
.section.compact { padding-top: 18px; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.section-head a { color: var(--accent); font-weight: 900; }

.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 14px;
}
.library-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

.poster-card,
.strip-card {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.poster-card a { display: grid; height: 100%; }
.poster-card figure,
.strip-card figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #fff;
}
.poster-card figure { aspect-ratio: 2 / 3; }
.poster-card img,
.strip-card img {
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease, filter .28s ease;
}
.poster-card img[src$=".svg"],
.strip-card img[src$=".svg"] {
  object-fit: contain;
  padding: 8px;
  background: #fff;
}
.poster-card:hover img,
.strip-card:hover img { transform: scale(1.04); filter: contrast(1.03) saturate(1.04); }
figcaption {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 5px 8px;
  color: #fff;
  background: rgba(17,17,17,.88);
  font-weight: 900;
}
.poster-card div,
.strip-card div {
  display: grid;
  gap: 6px;
  padding: 12px;
}
.poster-card span,
.strip-card span {
  width: max-content;
  max-width: 100%;
  padding: 3px 7px;
  color: #fff;
  background: var(--accent);
  font-size: .68rem;
  font-weight: 900;
}
.poster-card h3,
.strip-card h3 { margin-bottom: 0; font-size: .98rem; line-height: 1.3; }
.poster-card p,
.strip-card p { margin: 0; font-size: .78rem; }
.poster-card em,
.strip-card em { color: var(--accent-2); font-style: normal; font-size: .78rem; }

.dual-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .42fr);
  gap: 18px;
}
.week-grid { display: grid; gap: 10px; }
.strip-card a {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  min-height: 116px;
}
.strip-card figure { aspect-ratio: auto; height: 100%; }

.score-board {
  align-self: start;
  padding: 18px;
}

.page-title {
  margin-top: 16px;
  padding: clamp(20px, 4vw, 38px);
}
.page-title h1 { margin-bottom: 12px; font-size: clamp(2rem, 3vw, 3.4rem); }

.filters {
  margin-top: 14px;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.filters > div { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button,
.filters select,
.filters span {
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  font-weight: 850;
}
.filters button.active,
.filters button:hover {
  color: #fff;
  background: var(--ink);
}
.filters select { color: var(--ink); }
.filters option { color: #111; }

.detail {
  min-height: 660px;
  display: grid;
  grid-template-columns: minmax(300px, .44fr) minmax(0, 1fr);
  gap: 18px;
  padding-top: 16px;
}
.detail-poster {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.detail-poster img {
  height: 100%;
  object-fit: cover;
}
.detail-copy {
  padding: clamp(22px, 4.6vw, 58px);
  display: grid;
  align-content: center;
}
.detail-copy .sub {
  margin-top: -4px;
  color: var(--accent);
  font-size: 1.05rem;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 12px 0 18px;
}
.facts span {
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(14,111,159,.08);
  border: 1px solid rgba(14,111,159,.22);
  font-weight: 850;
}

.footer {
  width: min(1680px, 100%);
  margin: 52px auto 0;
  padding: 28px clamp(16px, 2.8vw, 34px);
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(150px, .5fr));
  gap: 20px;
  color: #f6f2eb;
  background: #111111;
  border-top: 4px solid var(--accent);
}
.footer strong { color: #fff; font-size: 1.2rem; }
.footer h3 { color: #ffb5b5; margin-bottom: 10px; font-size: .96rem; }
.footer a { display: block; color: rgba(255,255,255,.74); margin: 7px 0; }

@media (max-width: 1180px) {
  .site-shell { grid-template-columns: 1fr; }
  .side-nav {
    position: static;
    height: auto;
    min-height: auto;
    grid-template-columns: 1fr;
  }
  .side-nav nav { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .side-nav nav a { white-space: nowrap; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(280px, .5fr); }
  .ticker { grid-column: 1 / -1; min-height: auto; }
}

@media (max-width: 860px) {
  .site-shell { padding-left: 12px; padding-right: 12px; }
  .hero, .dual-section, .detail { grid-template-columns: 1fr; }
  .hero-copy, .feature-poster { min-height: auto; }
  .feature-poster { height: min(560px, 110vw); }
  .type-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2rem, 11vw, 3.3rem); }
}

@media (max-width: 520px) {
  .type-rail { grid-template-columns: 1fr; }
  .strip-card a { grid-template-columns: 114px minmax(0, 1fr); }
  .vault-grid, .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .poster-card div, .strip-card div { padding: 9px; }
}
