:root {
  --bg: #f3f1eb;
  --surface: #faf8f2;
  --surface-strong: #ffffff;
  --ink: #1e2026;
  --muted: #6d6f79;
  --line: #d6d2c9;
  --deep: #222631;
  --wine: #7f2331;
  --slate: #314659;
  --olive: #5a6643;
  --gold: #b78d45;
  --shadow: 0 18px 40px rgba(30, 32, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(49, 70, 89, 0.06), rgba(49, 70, 89, 0) 180px),
    var(--bg);
  color: var(--ink);
  font: 16px/1.6 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 248, 242, 0.95);
  border-bottom: 1px solid rgba(34, 38, 49, 0.1);
  backdrop-filter: blur(14px);
}

.topbar-inner,
.shell,
.footer {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  display: grid;
  grid-template-columns: auto 1fr minmax(220px, 320px);
  align-items: center;
  gap: 24px;
  min-height: 82px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--wine), var(--slate));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1.1rem;
}

.brand-copy small,
.nav a,
.search input::placeholder,
.section-head span,
.hero-side-head span,
.catalog-sub,
.footer p,
.footer a,
.detail-original,
.detail-copy p,
.guide-panel p,
.support-band p {
  color: var(--muted);
}

.nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
}

.nav a {
  position: relative;
  padding: 6px 0;
  font-weight: 600;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--wine), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.search input {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(34, 38, 49, 0.12);
  border-radius: 999px;
  background: var(--surface-strong);
  padding: 0 18px;
  color: var(--ink);
}

.shell {
  padding: 28px 0 56px;
}

.hero-board,
.section-band,
.filter-panel,
.library-hero,
.detail-stage,
.detail-panels,
.support-band {
  margin-bottom: 24px;
}

.hero-board {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
  gap: 20px;
}

.hero-main,
.hero-side,
.section-band,
.ledger-panel,
.filter-panel,
.guide-panel,
.library-hero,
.catalog-row,
.detail-stage,
.panel,
.support-band article {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(34, 38, 49, 0.08);
  box-shadow: var(--shadow);
}

.hero-main {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 0;
  overflow: hidden;
  border-radius: 28px;
}

.hero-poster {
  min-height: 100%;
  background: #d9d7d0;
}

.hero-poster img {
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 34px;
  background:
    linear-gradient(180deg, rgba(127, 35, 49, 0.06), rgba(127, 35, 49, 0)),
    var(--surface);
}

.hero-copy span,
.section-head span,
.hero-side-head span,
.library-hero span {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-copy h1,
.section-head h1,
.section-head h2,
.library-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.15;
}

.hero-copy h1 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.hero-copy p,
.section-head p,
.library-hero p,
.catalog-desc,
.detail-desc {
  margin: 0;
  color: #3e4350;
}

.hero-meta,
.catalog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta b,
.catalog-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(49, 70, 89, 0.08);
  color: var(--deep);
  font-size: 0.95rem;
}

.hero-copy a,
.view-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--wine), #962c3d);
  color: #fff;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-copy a:hover,
.view-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(127, 35, 49, 0.2);
}

.hero-side {
  border-radius: 24px;
  padding: 20px;
}

.hero-side-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.side-entry,
.ledger-row {
  display: grid;
  grid-template-columns: 34px 62px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(34, 38, 49, 0.08);
  transition: transform 180ms ease, color 180ms ease;
}

.side-entry:last-child,
.ledger-row:last-child {
  border-bottom: 0;
}

.side-entry:hover,
.ledger-row:hover {
  transform: translateX(4px);
  color: var(--wine);
}

.side-entry b,
.ledger-row b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(127, 35, 49, 0.1);
  font-size: 0.9rem;
}

.side-entry img,
.ledger-row img {
  width: 62px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.side-entry span,
.ledger-row span {
  display: grid;
}

.ticker-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.ticker-bar a {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 0 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(49, 70, 89, 0.95), rgba(90, 102, 67, 0.95));
  color: #fff;
  font-weight: 700;
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.ticker-bar a:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(49, 70, 89, 0.18);
}

.section-band {
  border-radius: 28px;
  padding: 26px;
}

.section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.section-head.compact {
  margin-bottom: 16px;
}

.poster-strip,
.editor-grid,
.related-grid {
  display: grid;
  gap: 16px;
}

.poster-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.editor-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.related-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.poster-card {
  display: grid;
  gap: 10px;
}

.poster-link {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #d8d6d0;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(34, 38, 49, 0.08);
}

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.poster-card:hover img {
  transform: scale(1.04);
}

.kind-tag,
.score-tag {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 30px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  z-index: 1;
}

.kind-tag {
  left: 12px;
  padding: 0 12px;
  background: rgba(34, 38, 49, 0.75);
}

.score-tag {
  right: 12px;
  padding: 0 10px;
  background: rgba(183, 141, 69, 0.9);
}

.poster-hover,
.catalog-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 4px;
  padding: 18px 16px 14px;
  color: #fff;
  background: linear-gradient(180deg, rgba(30, 32, 38, 0), rgba(30, 32, 38, 0.86));
  transform: translateY(100%);
  transition: transform 220ms ease;
}

.poster-card:hover .poster-hover,
.catalog-cover:hover .catalog-overlay {
  transform: translateY(0);
}

.poster-copy {
  display: grid;
  gap: 2px;
}

.poster-copy a {
  font-weight: 700;
}

.three-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.ledger-panel {
  border-radius: 24px;
  padding: 24px;
}

.ledger-list {
  display: grid;
}

.ledger-row {
  grid-template-columns: 34px 62px minmax(0, 1fr) 44px;
}

.ledger-row em {
  justify-self: end;
  font-style: normal;
  font-weight: 700;
  color: var(--wine);
}

.support-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.support-band article {
  border-radius: 24px;
  padding: 24px;
}

.library-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  border-radius: 28px;
  padding: 28px;
}

.hero-stats {
  display: grid;
  gap: 8px;
  min-width: 220px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(127, 35, 49, 0.08), rgba(49, 70, 89, 0.08));
}

.hero-stats strong {
  font-size: 1.4rem;
}

.filter-panel {
  display: grid;
  gap: 16px;
  border-radius: 24px;
  padding: 20px;
}

.filter-row,
.select-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(34, 38, 49, 0.12);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.filter:hover,
.filter.active {
  transform: translateY(-1px);
  border-color: rgba(127, 35, 49, 0.35);
  background: rgba(127, 35, 49, 0.08);
}

.select-row label {
  display: grid;
  gap: 6px;
}

.select-row span {
  font-size: 0.9rem;
  color: var(--muted);
}

.select-row select {
  min-width: 150px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(34, 38, 49, 0.12);
  border-radius: 16px;
  background: var(--surface-strong);
}

.library-layout {
  display: grid;
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
  gap: 20px;
}

.guide-panel {
  position: sticky;
  top: 102px;
  align-self: start;
  display: grid;
  gap: 10px;
  border-radius: 24px;
  padding: 22px;
}

.guide-panel a {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(49, 70, 89, 0.06);
  font-weight: 600;
}

.catalog-list {
  display: grid;
  gap: 16px;
}

.catalog-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  border-radius: 24px;
  padding: 16px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.catalog-row:hover {
  transform: translateY(-2px);
  border-color: rgba(127, 35, 49, 0.22);
  box-shadow: 0 18px 36px rgba(30, 32, 38, 0.11);
}

.catalog-cover {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #d8d6d0;
}

.catalog-cover img {
  height: 100%;
  object-fit: cover;
}

.catalog-overlay {
  place-items: center;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 32, 38, 0.06), rgba(30, 32, 38, 0.78));
}

.catalog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.catalog-title {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.catalog-score {
  display: grid;
  justify-items: center;
  align-content: center;
  width: 88px;
  min-width: 88px;
  aspect-ratio: 1;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(127, 35, 49, 0.1), rgba(183, 141, 69, 0.14));
}

.catalog-score strong {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--wine);
}

.catalog-main {
  display: grid;
  gap: 12px;
}

.catalog-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-row a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(49, 70, 89, 0.08);
  color: var(--slate);
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease;
}

.tag-row a:hover {
  background: rgba(127, 35, 49, 0.1);
  color: var(--wine);
}

.detail-stage {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 24px;
  border-radius: 28px;
  padding: 24px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #d8d6d0;
}

.detail-poster img {
  height: 100%;
  object-fit: cover;
}

.detail-info {
  display: grid;
  align-content: start;
  gap: 16px;
}

.detail-info > span {
  color: var(--wine);
  font-weight: 700;
}

.detail-original {
  margin: -8px 0 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.detail-grid div {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(49, 70, 89, 0.06);
}

.detail-grid dt {
  margin-bottom: 6px;
  color: var(--muted);
}

.detail-grid dd {
  margin: 0;
  font-weight: 700;
}

.detail-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  border-radius: 24px;
  padding: 24px;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.episode-grid button {
  min-height: 46px;
  border: 1px solid rgba(34, 38, 49, 0.12);
  border-radius: 16px;
  background: var(--surface-strong);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.episode-grid button:hover {
  transform: translateY(-1px);
  border-color: rgba(127, 35, 49, 0.32);
  color: var(--wine);
}

.detail-copy {
  display: grid;
  gap: 12px;
}

.footer {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 20px;
  padding: 0 0 42px;
}

.footer > div {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(34, 38, 49, 0.08);
}

.copy {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
}

@media (max-width: 1100px) {
  .topbar-inner,
  .hero-board,
  .library-layout,
  .detail-stage,
  .detail-panels,
  .footer {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    padding: 14px 0;
  }

  .nav {
    justify-content: flex-start;
  }

  .guide-panel {
    position: static;
  }

  .poster-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .editor-grid,
  .related-grid,
  .support-band,
  .three-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .topbar-inner,
  .hero-main,
  .support-band,
  .three-columns,
  .editor-grid,
  .related-grid,
  .detail-grid,
  .detail-panels {
    grid-template-columns: 1fr;
  }

  .ticker-bar,
  .poster-strip,
  .episode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-hero,
  .catalog-row,
  .catalog-head,
  .catalog-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: start;
  }

  .catalog-row {
    padding: 14px;
  }

  .catalog-cover {
    width: min(180px, 100%);
  }

  .section-band,
  .panel,
  .ledger-panel,
  .hero-copy,
  .library-hero,
  .guide-panel,
  .detail-stage {
    padding: 20px;
  }

  .shell,
  .topbar-inner,
  .footer {
    width: min(100% - 20px, 1280px);
  }
}


/* stable responsive guards */
html, body { max-width: 100%; overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }
img, video, canvas, svg { max-width: 100%; }
h1, h2, h3, h4, p, a, span, strong, small, b, em, li { min-width: 0; overflow-wrap: anywhere; }
main, header, footer, section, article, aside, nav, div { min-width: 0; }
.poster-grid, .feature-grid, .movie-grid, .library-grid, .library-list, .related-grid, .content-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
