:root {
  --bg: #f3f4f5;
  --bg-soft: #e9ebee;
  --panel: #ffffff;
  --line: #dddfe3;
  --line-strong: #aeb2b9;
  --ink: #111214;
  --ink-dim: #555960;
  --ink-faint: #838890;
  --accent: #8c1834;
  --accent-dark: #641024;
  --gold: #936d18;
  --gold-soft: #d7bd70;
  --radius: 7px;
  --shell: 1720px;
}

* { box-sizing: border-box; letter-spacing: 0; }

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--panel);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #eadcab; color: var(--ink); }
h1, h2 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-weight: 700;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  min-height: 68px;
  padding: 10px max(22px, calc((100vw - var(--shell)) / 2));
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: center; gap: 11px; min-width: max-content; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; }
.brand strong { display: block; font-size: 15px; line-height: 1.25; }
.brand small { display: block; color: var(--ink-faint); font-size: 10px; }

.topbar nav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a {
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  color: var(--ink-dim);
  font-size: 13px;
  white-space: nowrap;
}
.topbar nav a:hover { color: var(--accent); border-color: var(--accent); }

.search, .search-page { display: flex; gap: 0; }
.search { margin-left: auto; }
.search input, .search-page input {
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background: #fff;
  color: var(--ink);
}
.search input { width: 210px; font-size: 12px; }
.search input:focus, .search-page input:focus { outline: 2px solid rgba(177, 38, 50, 0.18); outline-offset: -1px; border-color: var(--accent); }
.search button, .search-page button {
  border: 1px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.search button { padding: 8px 14px; font-size: 12px; }
.search button:hover, .search-page button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.search button:active, .search-page button:active { transform: translateY(1px); }

/* Layout */
main { max-width: var(--shell); margin: 0 auto; padding: 0 22px 88px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 72px;
  align-items: center;
  min-height: 520px;
  padding: 54px 0 48px;
  border-bottom: 1px solid var(--ink);
}
.hero-copy { min-width: 0; }
.hero-emblem {
  display: grid;
  place-items: center;
  justify-self: end;
  width: min(100%, 470px);
}
.hero-emblem img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 32px rgba(64, 43, 5, 0.13));
}
.hero-kicker, .kicker, .board-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.hero h1 {
  margin: 9px 0 0;
  font-size: 82px;
  line-height: 1.02;
}
.hero-sub { margin: 15px 0 0; color: var(--gold); font-size: 15px; font-weight: 700; }
.hero-text { max-width: 650px; margin: 14px 0 0; color: var(--ink-dim); font-size: 14px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 38px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.hero-stats span {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 14px;
  color: var(--ink-faint);
  font-size: 11px;
}
.hero-stats span + span { border-left: 1px solid var(--line); }
.hero-stats b { display: block; color: var(--ink); font-size: 34px; line-height: 1.05; }

/* Sections */
.block { padding: 62px 0; border-bottom: 1px solid var(--line); }
.block-head, .featured-head {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 40px;
  align-items: end;
}
.block-head h2, .featured-head h2 { margin: 6px 0 0; font-size: 32px; line-height: 1.15; }
.block-intro, .featured-head p { margin: 0; color: var(--ink-dim); font-size: 14px; }

.featured { padding-top: 48px; background: var(--panel); }
.featured-head { grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr) auto; }
.featured-head > a {
  align-self: center;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  font-size: 13px;
}

.home-board {
  padding: 54px 0 60px;
  border-bottom: 1px solid var(--line);
}
.home-board:first-of-type { padding-top: 46px; }
.home-board-head {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(320px, 1fr) auto;
  gap: 40px;
  align-items: end;
}
.home-board-head h2 { margin: 5px 0 0; font-size: 34px; line-height: 1.15; }
.home-board-head p { margin: 0; color: var(--ink-dim); font-size: 14px; }
.home-board-head > a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  font-size: 13px;
  white-space: nowrap;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 30px;
  border-top: 1px solid var(--ink);
}
.directory-grid a {
  position: relative;
  min-height: 148px;
  padding: 18px 42px 18px 0;
  border-bottom: 1px solid var(--line);
}
.directory-grid a:not(:nth-child(4n + 1)) { padding-left: 18px; border-left: 1px solid var(--line); }
.directory-grid span { color: var(--accent); font-size: 11px; font-weight: 800; }
.directory-grid strong { display: block; margin-top: 17px; font-size: 18px; }
.directory-grid small { display: block; margin-top: 7px; color: var(--ink-faint); font-size: 12px; line-height: 1.6; }
.directory-grid b { position: absolute; top: 17px; right: 17px; color: var(--ink-faint); font-size: 18px; font-weight: 400; transition: transform 160ms ease, color 160ms ease; }
.directory-grid a:hover strong, .directory-grid a:hover b { color: var(--accent); }
.directory-grid a:hover b { transform: translateX(3px); }

.board { padding-top: 38px; }
.board-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}
.board-head h3 { display: flex; align-items: center; gap: 10px; margin: 3px 0 0; font-size: 20px; }
.board-head h3 em { color: var(--gold); font-size: 11px; font-style: normal; }
.board-desc { margin: 0; color: var(--ink-faint); font-size: 13px; }
.board-more { display: inline-block; margin-top: 20px; padding-bottom: 1px; border-bottom: 1px solid var(--accent); color: var(--accent); font-size: 13px; }

/* People */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 28px 20px;
  margin-top: 26px;
}
.featured-grid { grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); }
.card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(22, 23, 26, 0.055);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-soft);
  box-shadow: 0 18px 40px rgba(34, 29, 20, 0.1);
}
.card-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--bg-soft);
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 220ms ease;
}
.card:hover .card-photo img { transform: scale(1.018); }
.card-photo-empty { display: grid; place-items: center; height: 100%; color: var(--ink-faint); font-size: 12px; }
.card-badge, .card-rank {
  position: absolute;
  padding: 3px 7px;
  border-radius: 3px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.card-badge { left: 8px; top: 8px; background: var(--accent); }
.card-rank { right: 8px; bottom: 8px; background: rgba(23, 23, 22, 0.78); }
.card-body { padding: 14px 14px 16px; }
.card-body h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.card-alias { margin: 2px 0 0; color: var(--ink-faint); font-size: 11px; }
.card-meta { margin: 7px 0 0; color: var(--ink-dim); font-size: 12px; }
.card-keys { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 10px 0 0; }
.card-keys span { color: var(--accent); font-size: 11px; }

.empty {
  margin: 20px 0 0;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-faint);
  font-size: 13px;
  text-align: center;
}

/* Inner pages */
.page, .profile { padding-top: 38px; }
.crumbs { margin-bottom: 24px; color: var(--ink-faint); font-size: 12px; }
.crumbs a:hover { color: var(--accent); }
.page h1, .profile h1 { margin: 0; font-size: 42px; line-height: 1.15; }
.page-intro, .profile-summary { max-width: 720px; margin: 12px 0 0; color: var(--ink-dim); font-size: 14px; }

.profile-top {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  padding: 22px 0 42px;
  border-bottom: 1px solid var(--ink);
}
.profile-photo { overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); }
.profile-photo img { width: 100%; height: auto; }
.profile-alias { margin: 5px 0 0; color: var(--gold); font-size: 13px; font-weight: 700; }
.profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}
.profile-facts div { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
.profile-facts dt { color: var(--ink-faint); font-size: 10px; }
.profile-facts dd { margin: 3px 0 0; font-size: 14px; }
.profile-accounts { margin-top: 22px; }
.profile-accounts h2 { margin: 0 0 10px; font-size: 16px; }
.profile-accounts a { display: inline-block; margin: 0 8px 8px 0; padding-bottom: 2px; border-bottom: 1px solid var(--accent); color: var(--accent); font-size: 13px; }
.profile-keys { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 20px 0 0; }
.profile-keys a { color: var(--accent); font-size: 12px; }
.profile-block { padding: 38px 0; border-bottom: 1px solid var(--line); }
.profile-block h2 { margin: 0; font-size: 22px; }

.category-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 48px;
  align-items: end;
  padding: 10px 0 34px;
  border-bottom: 1px solid var(--ink);
}
.category-hero p:last-child { max-width: 760px; margin: 0; color: var(--ink-dim); font-size: 14px; }
.category-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.category-tabs a { padding: 18px 18px 18px 0; border-bottom: 1px solid var(--line); }
.category-tabs a + a { padding-left: 18px; border-left: 1px solid var(--line); }
.category-tabs strong { display: block; font-size: 15px; }
.category-tabs span { display: block; margin-top: 5px; color: var(--ink-faint); font-size: 11px; }
.category-tabs a:hover strong { color: var(--accent); }

.works { margin: 18px 0 0; padding: 0; list-style: none; }
.works li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.works li span { color: var(--gold); font-size: 12px; }
.works li small { color: var(--ink-faint); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 18px; }
.gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.gallery img { width: 100%; height: auto; }
.gallery figcaption { padding: 8px 10px; color: var(--ink-faint); font-size: 11px; }

/* Search, 404, footer */
.search-page { max-width: 760px; margin-top: 22px; }
.search-page input { flex: 1; font-size: 14px; }
.search-page button { padding: 10px 22px; }
.search-count { margin: 18px 0 0; color: var(--ink-faint); font-size: 13px; }
.not-found { min-height: calc(100dvh - 150px); padding-top: 110px; }
.not-found h1 { max-width: 720px; margin: 0; font-size: 62px; line-height: 1.08; }
.not-found p:not(.hero-kicker) { margin: 18px 0 28px; color: var(--ink-dim); }
.not-found a { display: inline-block; padding-bottom: 2px; border-bottom: 1px solid var(--accent); color: var(--accent); }
.site-foot {
  padding: 36px 20px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-faint);
  font-size: 12px;
  text-align: center;
}
.foot-logo { width: 72px; height: 72px; margin: 0 auto 14px; object-fit: contain; }
.disclaimer { max-width: 680px; margin: 8px auto 0; }

@media (max-width: 1060px) {
  .topbar { grid-template-columns: auto minmax(0, 1fr); }
  .search { grid-column: 1 / -1; width: 100%; }
  .search input { flex: 1; width: auto; }
  .grid, .featured-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .directory-grid a:not(:nth-child(4n + 1)) { padding-left: 0; border-left: 0; }
  .directory-grid a:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .grid, .featured-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-board-head { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .home-board-head > a { justify-self: start; }
  .category-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-tabs a:nth-child(odd) { padding-left: 0; border-left: 0; }
}

@media (max-width: 780px) {
  .topbar { gap: 12px 20px; padding-inline: 16px; }
  .topbar nav { order: 3; grid-column: 1 / -1; width: 100%; }
  main { padding-inline: 16px; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 34px 0 28px;
  }
  .hero h1 { font-size: 42px; }
  .hero-text, .hero-stats, .hero-emblem { display: none; }
  .home-board { padding: 36px 0 42px; }
  .home-board-head h2 { font-size: 30px; }
  .block { padding: 42px 0; }
  .block-head, .featured-head, .board-head, .profile-top, .category-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .featured-head > a { justify-self: start; }
  .grid, .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .profile-photo { max-width: 520px; }
  .profile-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .works li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (max-width: 520px) {
  .brand small { display: none; }
  .topbar nav { gap: 18px; }
  .hero h1 { font-size: 42px; }
  .hero-stats b { font-size: 28px; }
  .directory-grid { grid-template-columns: minmax(0, 1fr); }
  .directory-grid a,
  .directory-grid a:nth-child(even),
  .directory-grid a:not(:nth-child(4n + 1)) { min-height: 0; padding: 17px 36px 17px 0; border-left: 0; }
  .directory-grid strong { margin-top: 8px; }
  .card-body h3 { font-size: 15px; }
  .card-meta { min-height: 38px; }
  .card-keys { display: none; }
  .page h1, .profile h1 { font-size: 34px; }
  .profile-facts { grid-template-columns: minmax(0, 1fr); }
}

.profile-intro-text {
  margin: 18px 0 4px;
  color: var(--ink-soft, #3a3630);
  font-size: 15px;
  line-height: 1.9;
  text-align: justify;
  border-top: 1px solid rgba(0, 0, 0, .08);
  padding-top: 18px;
}

/* 榜单筛选条 */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: flex-end;
  margin: 20px 0 6px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters label { display: grid; gap: 6px; font-size: 12px; color: var(--ink-faint); }
.filters select {
  min-width: 130px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.ghost-btn {
  padding: 9px 20px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }
.pager { display: flex; justify-content: center; margin: 28px 0 8px; }
.pager .ghost-btn { padding: 12px 34px; }

/* 竖版图集：统一 3:4 比例裁切排列 */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.gallery .shot { margin: 0; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); }
.shot-btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: transform .4s ease; }
.shot-btn:hover img { transform: scale(1.03); }

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 32px 20px 20px;
  background: rgba(10, 10, 12, .93);
}
.lightbox[hidden] { display: none; }
body.lb-open { overflow: hidden; }
.lightbox img { grid-column: 2; max-width: 100%; max-height: 100%; object-fit: contain; justify-self: center; }
.lb-cap { grid-column: 2; margin: 0; color: #d7d7da; font-size: 13px; text-align: center; }
.lb-close, .lb-nav {
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.lb-close { position: absolute; top: 14px; right: 18px; width: 42px; height: 42px; font-size: 24px; line-height: 1; }
.lb-nav { width: 52px; height: 52px; font-size: 30px; line-height: 1; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .22); }
