:root {
  --bg: #eef1e6;
  --surface: #f8f9f3;
  --paper: #ffffff;
  --ink: #1f2a22;
  --muted: #687468;
  --line: #d5dccb;
  --green: #254c3f;
  --green-soft: #416858;
  --moss: #6a7f4d;
  --gold: #b69257;
  --shadow: 0 20px 44px rgba(31, 42, 34, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(37, 76, 63, 0.08), rgba(37, 76, 63, 0) 220px),
    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(248, 249, 243, 0.95);
  border-bottom: 1px solid rgba(37, 76, 63, 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: 50px;
  height: 50px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--green), var(--moss));
  color: #fff;
  font-weight: 800;
}

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

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

.brand-copy small,
.nav a,
.search input::placeholder,
.section-head span,
.side-head span,
.catalog-sub,
.footer p,
.footer a,
.guide-grid p,
.detail-sub,
.detail-copy-block p,
.side-column p,
.count-box 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(--green), 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(37, 76, 63, 0.12);
  border-radius: 999px;
  background: var(--paper);
  padding: 0 18px;
  color: var(--ink);
}

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

.hero-layout,
.quick-row,
.section-shell,
.timeline-layout,
.guide-grid,
.library-head,
.filter-shell,
.catalog-layout,
.detail-shell,
.detail-columns {
  margin-bottom: 24px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.9fr);
  gap: 20px;
}

.hero-card,
.hero-side,
.section-shell,
.timeline-panel,
.guide-grid article,
.library-head,
.filter-shell,
.side-column,
.catalog-row,
.detail-shell,
.footer > div {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(37, 76, 63, 0.08);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
  overflow: hidden;
  border-radius: 28px;
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 34px;
}

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

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

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

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

.hero-poster {
  background: #d6ddd0;
}

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

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

.hero-meta b,
.catalog-meta span,
.timeline-row .year {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(37, 76, 63, 0.08);
  color: var(--green);
  font-size: 0.94rem;
}

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

.hero-copy a:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(37, 76, 63, 0.16);
}

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

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

.side-row,
.timeline-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(37, 76, 63, 0.08);
  transition: transform 180ms ease, color 180ms ease;
}

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

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

.side-row:hover,
.timeline-row:hover {
  transform: translateX(4px);
  color: var(--green);
}

.side-row b,
.timeline-row b,
.catalog-order {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(37, 76, 63, 0.08);
  font-size: 0.9rem;
  font-weight: 700;
}

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

.side-row span {
  display: grid;
}

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

.quick-row a {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 0 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37, 76, 63, 0.96), rgba(106, 127, 77, 0.94));
  color: #fff;
  font-weight: 700;
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.quick-row a:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(37, 76, 63, 0.18);
}

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

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

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

.feature-grid,
.shelf-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

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

.poster-cover {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 2 / 3;
  background: #d7ded2;
  border: 1px solid rgba(37, 76, 63, 0.08);
}

.poster-cover 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(31, 42, 34, 0.72);
}

.score-tag {
  right: 12px;
  padding: 0 10px;
  background: rgba(182, 146, 87, 0.92);
}

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

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

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

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

.timeline-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

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

.timeline-list {
  display: grid;
}

.timeline-row {
  grid-template-columns: 34px 72px minmax(0, 1fr) auto;
}

.timeline-row em {
  font-style: normal;
  color: var(--muted);
}

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

.guide-grid article {
  border-radius: 24px;
  padding: 24px;
}

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

.count-box {
  display: grid;
  gap: 8px;
  min-width: 220px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(37, 76, 63, 0.06);
}

.count-box strong {
  font-size: 1.4rem;
}

.filter-shell {
  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(37, 76, 63, 0.12);
  border-radius: 999px;
  background: var(--paper);
  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(37, 76, 63, 0.28);
  background: rgba(37, 76, 63, 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(37, 76, 63, 0.12);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
}

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

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

.side-column a {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(37, 76, 63, 0.06);
  font-weight: 600;
}

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

.catalog-row {
  display: grid;
  grid-template-columns: 54px 132px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  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(37, 76, 63, 0.2);
  box-shadow: 0 18px 36px rgba(31, 42, 34, 0.1);
}

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

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

.catalog-hover {
  inset: 0;
  place-items: center;
  background: linear-gradient(180deg, rgba(31, 42, 34, 0.08), rgba(31, 42, 34, 0.78));
}

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

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

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

.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(37, 76, 63, 0.08), rgba(182, 146, 87, 0.12));
}

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

.catalog-bottom {
  display: grid;
  gap: 10px;
}

.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(37, 76, 63, 0.08);
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease;
}

.tag-row a:hover {
  background: rgba(37, 76, 63, 0.12);
}

.catalog-credits {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.detail-shell {
  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: #d7ded2;
}

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

.detail-state {
  color: var(--green);
}

.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(37, 76, 63, 0.06);
}

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

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

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

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

.episode-grid button {
  min-height: 46px;
  border: 1px solid rgba(37, 76, 63, 0.12);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.episode-grid button:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 76, 63, 0.3);
  color: var(--green);
}

.detail-copy-block {
  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;
}

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

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

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

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

  .side-column {
    position: static;
  }

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

  .timeline-layout,
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .topbar-inner,
  .hero-card,
  .timeline-layout,
  .guide-grid,
  .detail-columns,
  .detail-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .quick-row,
  .feature-grid,
  .shelf-grid,
  .related-grid,
  .episode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .section-shell,
  .timeline-panel,
  .guide-grid article,
  .hero-copy,
  .library-head,
  .side-column,
  .detail-shell {
    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)); }
