:root {
  color-scheme: light;
  --bg: #f6f1f3;
  --panel: #ffffff;
  --ink: #23181e;
  --muted: #756a70;
  --line: #e2d4da;
  --rose: #bd3154;
  --indigo: #403d83;
  --mint: #dcebe3;
  --cream: #fff7e8;
  --shadow: 0 18px 42px rgba(68, 37, 53, .12);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(189,49,84,.06) 1px, transparent 1px),
    linear-gradient(rgba(64,61,131,.045) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
h1, h2, h3, p { margin: 0; }
button, select { font: inherit; }

.site-header,
main,
.footer {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
  background: rgba(246,241,243,.94);
  backdrop-filter: blur(14px);
}

.brand {
  color: #fff;
  background: var(--rose);
  padding: 9px 14px;
  border-radius: var(--radius);
  font-size: 24px;
  font-weight: 900;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav a,
.header-link,
.actions a,
.section-head a,
.topic-menu a,
.tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  font-weight: 800;
  white-space: nowrap;
}

.nav a.active,
.nav a:hover,
.header-link,
.actions a:first-child,
.topic-menu a:hover,
.tabs button.active {
  color: #fff;
  border-color: var(--indigo);
  background: var(--indigo);
}

.top-story {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(520px, 1.3fr);
  gap: 16px;
  padding-top: 18px;
}

.story-copy,
.story-posters,
.number-board div,
.topic-menu,
.focus-area,
.score-panel,
.channel-panels article,
.library-cover,
.filters,
.catalog-card,
.detail {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow);
}

.story-copy {
  display: grid;
  align-content: center;
  min-height: 420px;
  padding: clamp(22px, 5vw, 58px);
  background: var(--cream);
}

.label {
  margin-bottom: 8px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 900;
}

.story-copy h1 {
  max-width: 9ch;
  margin-bottom: 14px;
  font-size: clamp(46px, 6vw, 90px);
  line-height: .98;
}

.story-copy p:not(.label),
.library-cover p,
.detail p,
.footer p {
  color: var(--muted);
  line-height: 1.78;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.story-posters {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
  min-height: 420px;
  padding: 10px;
  background: var(--mint);
}

.story-card {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #000;
}

.story-card.lead {
  grid-row: 1 / 3;
}

.story-card img {
  height: 100%;
  min-height: 190px;
  object-fit: cover;
}

.story-card::after,
.focus-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 42%, rgba(0,0,0,.76));
}

.story-card span,
.focus-card span {
  position: absolute;
  z-index: 2;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: grid;
  gap: 4px;
  color: #fff;
}

.story-card em,
.focus-card em,
.catalog-card em {
  color: #ffdce5;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.number-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.number-board div {
  min-height: 84px;
  padding: 14px;
}

.number-board b {
  display: block;
  color: var(--indigo);
  font-size: 36px;
}

.number-board span {
  color: var(--muted);
  font-weight: 800;
}

.portal-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 320px;
  gap: 14px;
  margin-top: 14px;
}

.topic-menu,
.focus-area,
.score-panel,
.channel-panels article,
.library-cover,
.filters {
  padding: 16px;
}

.topic-menu {
  align-self: start;
  display: grid;
  gap: 9px;
  background: #fff;
}

.topic-menu a {
  justify-content: flex-start;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.section-head.plain {
  display: block;
}

.section-head h2 {
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.04;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  grid-auto-flow: dense;
  gap: 10px;
}

.focus-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 6px;
  background: #000;
}

.focus-card.wide {
  grid-column: span 2;
}

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

.story-card b,
.focus-card b,
.score-row b,
.mini-card b,
.catalog-card b {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.story-card small,
.focus-card small,
.score-row small,
.mini-card small,
.catalog-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.story-card small,
.focus-card small {
  color: rgba(255,255,255,.8);
}

.score-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 42px;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.score-row i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--rose);
  font-style: normal;
  font-weight: 900;
}

.score-row strong {
  color: var(--indigo);
}

.channel-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.mini-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.mini-card img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px;
}

.library-cover {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-top: 18px;
}

.library-cover h1,
.detail h1 {
  margin-bottom: 8px;
  font-size: clamp(38px, 5vw, 70px);
  line-height: 1;
}

.library-cover strong {
  color: var(--rose);
  font-size: 40px;
  white-space: nowrap;
}

.filters {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.filters select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.catalog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.catalog-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  min-height: 106px;
  padding: 8px;
  box-shadow: none;
}

.catalog-card img {
  width: 74px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
}

.catalog-card em {
  color: var(--rose);
}

.catalog-card small {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.catalog-card strong {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--indigo);
}

.detail {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 26px;
  align-items: center;
  margin-top: 18px;
  padding: 20px;
}

.detail > img {
  width: 280px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.detail-meta span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  font-weight: 800;
}

.related-block {
  margin-top: 14px;
}

.footer {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 24px;
  margin-top: 34px;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
}

.footer b {
  color: var(--rose);
  font-size: 24px;
}

.footer h3 {
  margin: 0 0 10px;
  color: var(--rose);
}

.footer a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

.empty {
  padding: 24px;
  color: var(--muted);
}

@media (max-width: 1240px) {
  .top-story,
  .portal-layout,
  .channel-panels,
  .catalog {
    grid-template-columns: 1fr;
  }
  .topic-menu {
    grid-template-columns: repeat(5, 1fr);
  }
  .topic-menu .label {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .site-header,
  .story-posters,
  .number-board,
  .topic-menu,
  .mini-grid,
  .library-cover,
  .filters,
  .detail,
  .footer {
    grid-template-columns: 1fr;
  }
  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .header-link {
    display: none;
  }
  .story-card.lead {
    grid-row: auto;
  }
  .library-cover,
  .filters {
    align-items: stretch;
  }
  .detail > img {
    width: min(280px, 100%);
  }
}

@media (max-width: 560px) {
  .site-header,
  main,
  .footer {
    width: calc(100% - 22px);
  }
  .story-copy,
  .story-posters,
  .topic-menu,
  .focus-area,
  .score-panel,
  .channel-panels article,
  .library-cover,
  .filters,
  .detail {
    padding: 12px;
  }
  .focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .focus-card.wide {
    grid-column: span 2;
  }
  .catalog-card {
    grid-template-columns: 66px minmax(0, 1fr);
  }
  .catalog-card img {
    width: 66px;
    height: 84px;
  }
  .catalog-card strong {
    display: none;
  }
}
