:root {
  color-scheme: light;
  --bg: #edf2ef;
  --panel: #ffffff;
  --ink: #18211f;
  --muted: #65736d;
  --line: #d6dfda;
  --green: #27584d;
  --green-2: #dfeae5;
  --red: #c45643;
  --gold: #b88b32;
  --shadow: 0 18px 42px rgba(27, 54, 47, .10);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(39,88,77,.10), transparent 32%),
    linear-gradient(90deg, rgba(24,33,31,.035) 1px, transparent 1px),
    linear-gradient(rgba(24,33,31,.03) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 30px 30px, 30px 30px;
  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-head,
main,
.footer {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  background: rgba(237,242,239,.92);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--green);
  font-size: 25px;
  font-weight: 900;
}

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

.nav a,
.head-link,
.dash-actions a,
.tabs button,
.index-band a {
  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,.78);
  font-weight: 800;
  white-space: nowrap;
}

.nav a.active,
.nav a:hover,
.head-link,
.dash-actions a:first-child,
.tabs button.active {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px 310px;
  gap: 16px;
  padding-top: 20px;
}

.dash-title,
.dash-stats,
.dash-rank,
.showcase,
.channel-board article,
.index-band,
.catalog-top,
.filter-line,
.catalog-item,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
}

.dash-title {
  display: grid;
  align-content: center;
  min-height: 330px;
  padding: clamp(26px, 5vw, 56px);
}

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

.dash-title h1 {
  max-width: 12ch;
  margin-bottom: 14px;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.02;
}

.dash-title p,
.catalog-top p,
.detail-panel p,
.footer p {
  color: var(--muted);
  line-height: 1.75;
}

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

.dash-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px;
}

.dash-stats div {
  display: grid;
  align-content: center;
  min-height: 120px;
  padding: 14px;
  border-radius: 6px;
  background: var(--green-2);
}

.dash-stats b {
  color: var(--green);
  font-size: 38px;
}

.dash-stats span {
  color: var(--muted);
  font-size: 13px;
}

.dash-rank,
.showcase,
.channel-board article {
  padding: 16px;
}

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

.block-head h2 {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.1;
}

.block-head a {
  color: var(--green);
  font-weight: 900;
}

.rank-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

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

.rank-item b,
.tile b,
.catalog-item b,
.poster-card b {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item small,
.tile small,
.tile em,
.catalog-item small,
.catalog-item p,
.poster-card small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.showcase,
.channel-board,
.index-band,
.catalog-top,
.filter-line,
.catalog-grid,
.detail-panel {
  margin-top: 20px;
}

.scroll-posters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 10px;
}

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

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

.poster-card b {
  min-height: 36px;
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.35;
}

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

.tile-list {
  display: grid;
  gap: 9px;
}

.tile {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 84px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.tile img {
  width: 56px;
  height: 74px;
  object-fit: cover;
  border-radius: 4px;
}

.tile span,
.catalog-item span {
  min-width: 0;
}

.tile b {
  margin: 3px 0;
}

.index-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 12px;
}

.index-band a {
  min-height: 54px;
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.catalog-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px;
}

.catalog-top h1,
.detail-panel h1 {
  margin-bottom: 8px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
}

.catalog-top strong {
  color: var(--red);
  font-size: 36px;
}

.filter-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: rgba(255,255,255,.88);
}

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

.filter-line label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

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

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

.catalog-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
  min-height: 94px;
  padding: 8px;
}

.catalog-item img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 4px;
}

.catalog-item em {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--red);
  font-style: normal;
  font-weight: 900;
}

.detail-panel {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 24px;
  align-items: center;
  padding: 20px;
}

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

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

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

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

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

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

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

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

@media (max-width: 1180px) {
  .dashboard,
  .channel-board,
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-title { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .site-head,
  .dashboard,
  .channel-board,
  .index-band,
  .catalog-top,
  .filter-line,
  .catalog-grid,
  .detail-panel,
  .footer {
    grid-template-columns: 1fr;
  }
  .nav {
    justify-content: flex-start;
    grid-column: 1 / -1;
  }
  .head-link { display: none; }
  .detail-panel > img { width: min(230px, 100%); }
}

@media (max-width: 520px) {
  .site-head,
  main,
  .footer {
    width: calc(100% - 22px);
  }
  .dash-title,
  .dash-rank,
  .showcase,
  .channel-board article,
  .catalog-top,
  .filter-line,
  .detail-panel {
    padding: 14px;
  }
}
