:root {
  --bg: #f3f1f2;
  --paper: #fffafa;
  --panel: #ffffff;
  --ink: #282226;
  --muted: #766b72;
  --line: #ded5da;
  --rose: #9b334c;
  --rose-soft: #c96f82;
  --charcoal: #2f2b30;
  --blue: #51677b;
  --gold: #bd955d;
  --shadow: 0 18px 42px rgba(40, 34, 38, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, rgba(155, 51, 76, 0.08), rgba(155, 51, 76, 0) 230px), 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(255, 250, 250, 0.95);
  border-bottom: 1px solid rgba(40, 34, 38, 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(--charcoal), var(--rose));
  color: #ffe7ed;
  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, .poster-copy small, .catalog-sub, .footer p, .footer a, .guide-grid p, .detail-sub, .detail-copy p, .side-panel p, .count-card p, .catalog-bottom 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(--rose), 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(40, 34, 38, 0.12);
  border-radius: 999px;
  background: var(--panel);
  padding: 0 18px;
  color: var(--ink);
}
.shell { padding: 28px 0 56px; }

.cover-layout, .quick-rail, .panel, .feature-layout, .special-grid, .guide-grid, .library-head, .filter-panel, .catalog-layout, .detail-hero, .detail-layout { margin-bottom: 24px; }
.cover-layout, .feature-layout, .catalog-layout, .detail-layout { display: grid; gap: 20px; }
.cover-layout { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.9fr); }
.cover-story, .cover-side, .panel, .library-head, .filter-panel, .side-panel, .catalog-row, .detail-hero, .footer > div, .guide-grid article {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(40, 34, 38, 0.08);
  box-shadow: var(--shadow);
}
.cover-story {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  overflow: hidden;
  border-radius: 28px;
}
.cover-copy { display: grid; align-content: center; gap: 18px; padding: 36px; }
.cover-copy span, .section-head span, .library-head span, .detail-state {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}
.cover-copy h1, .section-head h1, .section-head h2, .section-head h3, .library-head h1, .detail-main h1 {
  margin: 0;
  line-height: 1.14;
}
.cover-copy h1 { font-size: clamp(2rem, 3vw, 3rem); }
.cover-copy p, .section-head p, .library-head p, .catalog-desc, .detail-desc { margin: 0; color: #51484e; }
.cover-poster, .detail-poster { background: #ded5da; }
.cover-poster img, .detail-poster img { height: 100%; object-fit: cover; }
.meta-line, .catalog-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.meta-line b, .catalog-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(155, 51, 76, 0.09);
  color: var(--rose);
  font-size: 0.94rem;
}
.cover-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(--rose), var(--charcoal));
  color: #fff;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.cover-copy a:hover { transform: translateY(-2px); box-shadow: 0 14px 26px rgba(155, 51, 76, 0.18); }
.cover-side, .panel { border-radius: 24px; padding: 24px; }
.section-head { display: grid; gap: 8px; margin-bottom: 18px; }
.section-head.compact { margin-bottom: 16px; }

.quick-rail { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.quick-rail a {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 0 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(155, 51, 76, 0.95), rgba(81, 103, 123, 0.95));
  color: #fff;
  font-weight: 800;
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.quick-rail a:hover { transform: translateY(-2px); box-shadow: 0 14px 24px rgba(155, 51, 76, 0.18); }

.poster-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: #ded5da;
  border: 1px solid rgba(40, 34, 38, 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: 800;
  color: #fff;
  z-index: 1;
}
.kind-tag { left: 12px; padding: 0 12px; background: rgba(40, 34, 38, 0.72); }
.score-tag { right: 12px; padding: 0 10px; background: rgba(189, 149, 93, 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(40, 34, 38, 0), rgba(40, 34, 38, 0.88));
  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: 800; }

.feature-layout, .detail-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.issue-list, .mini-list, .catalog-list { display: grid; }
.issue-row {
  display: grid;
  grid-template-columns: 34px 62px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(40, 34, 38, 0.08);
  transition: transform 180ms ease, color 180ms ease;
}
.issue-row:last-child { border-bottom: 0; }
.issue-row:hover { transform: translateX(4px); color: var(--rose); }
.issue-row b, .catalog-no {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(155, 51, 76, 0.09);
  font-size: 0.9rem;
}
.issue-row img { width: 62px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; }
.issue-row span { display: grid; }
.issue-row em { justify-self: end; font-style: normal; font-weight: 800; color: var(--rose); }
.special-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.special-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(155, 51, 76, 0.05);
  border: 1px solid rgba(40, 34, 38, 0.08);
}
.mini-list a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(40, 34, 38, 0.08);
}
.mini-list a:last-child { border-bottom: 0; }
.mini-list b { color: var(--rose); }
.mini-list em { justify-self: end; color: var(--muted); font-style: normal; }

.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-card {
  display: grid;
  gap: 8px;
  min-width: 220px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(155, 51, 76, 0.07);
}
.count-card 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(40, 34, 38, 0.12);
  border-radius: 999px;
  background: var(--panel);
  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(155, 51, 76, 0.28); background: rgba(155, 51, 76, 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(40, 34, 38, 0.12);
  border-radius: 16px;
  background: var(--panel);
  color: var(--ink);
}
.catalog-layout { display: grid; grid-template-columns: minmax(230px, 270px) minmax(0, 1fr); gap: 20px; }
.side-panel {
  position: sticky;
  top: 102px;
  align-self: start;
  display: grid;
  gap: 10px;
  border-radius: 24px;
  padding: 22px;
}
.side-panel a { padding: 10px 14px; border-radius: 14px; background: rgba(155, 51, 76, 0.07); font-weight: 700; }
.catalog-list { 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(155, 51, 76, 0.22); box-shadow: 0 18px 36px rgba(40, 34, 38, 0.12); }
.catalog-cover { position: relative; overflow: hidden; border-radius: 18px; aspect-ratio: 2 / 3; background: #ded5da; }
.catalog-cover img { height: 100%; object-fit: cover; }
.catalog-hover { inset: 0; place-items: center; background: linear-gradient(180deg, rgba(40, 34, 38, 0.08), rgba(40, 34, 38, 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; }
.rating {
  display: grid;
  justify-items: center;
  align-content: center;
  width: 88px;
  min-width: 88px;
  aspect-ratio: 1;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(155, 51, 76, 0.08), rgba(189, 149, 93, 0.12));
}
.rating strong { font-size: 1.5rem; line-height: 1; color: var(--rose); }
.catalog-bottom { display: grid; gap: 10px; }
.catalog-bottom p { margin: 0; }
.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(155, 51, 76, 0.08);
  color: var(--rose);
  font-size: 0.92rem;
  font-weight: 700;
}
.tag-row a:hover { background: rgba(155, 51, 76, 0.13); }
.detail-hero {
  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; }
.detail-main { display: grid; align-content: start; gap: 16px; }
.detail-state { color: var(--rose); }
.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(155, 51, 76, 0.07); }
.detail-grid dt { margin-bottom: 6px; color: var(--muted); }
.detail-grid dd { margin: 0; font-weight: 800; }
.episode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.episode-grid button {
  min-height: 46px;
  border: 1px solid rgba(40, 34, 38, 0.12);
  border-radius: 16px;
  background: var(--panel);
  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(155, 51, 76, 0.3); color: var(--rose); }
.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; }
.copy { grid-column: 1 / -1; margin: 0; text-align: center; }

@media (max-width: 1100px) {
  .topbar-inner, .cover-layout, .feature-layout, .catalog-layout, .detail-hero, .detail-layout, .footer { grid-template-columns: 1fr; }
  .topbar-inner { padding: 14px 0; }
  .nav { justify-content: flex-start; }
  .side-panel { position: static; }
  .poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .special-grid, .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .topbar-inner, .cover-story, .special-grid, .guide-grid, .detail-grid, .footer { grid-template-columns: 1fr; }
  .quick-rail, .poster-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%); }
  .panel, .cover-copy, .cover-side, .library-head, .side-panel, .detail-hero { 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)); }
