:root {
  --bg: #f2f2f2;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --ink: #191919;
  --muted: #8a8a8a;
  --muted-2: #b2b2b2;
  --line: #e7e7e7;
  --green: #07c160;
  --green-dark: #059e4e;
  --green-soft: #e8f8ee;
  --blue: #576b95;
  --blue-soft: #eef2fa;
  --red: #fa5151;
  --amber: #fa9d3b;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.045);
  --shadow-hover: 0 8px 26px rgba(0, 0, 0, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

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

section[id] { scroll-margin-top: 72px; }

/* ---------- 顶部导航：微信式白底 + 绿点 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.topbar-inner {
  width: min(1180px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 7px 10px;
  border-radius: 8px;
  color: #666;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}
.nav a:hover,
.nav a.active {
  color: var(--green-dark);
  background: var(--green-soft);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 68vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 50px;
  background:
    radial-gradient(760px 380px at 50% -10%, rgba(7, 193, 96, 0.10), transparent 70%),
    #fff;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  width: min(1000px, 100%);
  text-align: center;
  position: relative;
  z-index: 2;
}
.eyebrow {
  margin: 0;
  color: var(--green-dark);
  font-size: 12px;
  letter-spacing: 0.22em;
  font-weight: 700;
}
h1 {
  margin: 16px 0 10px;
  font-size: clamp(46px, 7.5vw, 92px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 900;
}
h1 span { color: var(--green); }
.subtitle {
  margin: 0 auto;
  width: min(760px, 100%);
  color: #666;
  font-size: clamp(14px, 1.6vw, 18px);
  overflow-wrap: anywhere;
}
.hero-stats {
  width: 100%;
  max-width: 980px;
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stat {
  min-width: 0;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  text-align: left;
}
.stat b {
  display: block;
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.hero-note {
  margin: 18px 0 0;
  color: var(--muted-2);
  font-size: 12px;
}
.hero-bubble {
  position: absolute;
  z-index: 1;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  color: #777;
  background: #f2f2f2;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
}
.hero-bubble::after {
  content: "";
  position: absolute;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: rotate(45deg);
  border-radius: 2px;
}
.bubble-a { left: 4%; top: 24%; }
.bubble-a::after { left: 18px; }
.bubble-b {
  right: 4%;
  top: 24%;
  background: var(--green-soft);
  color: var(--green-dark);
}
.bubble-b::after { right: 18px; }

/* ---------- 通用排版 ---------- */

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 10px 0 70px;
}
.section { padding: 54px 0 6px; }
.section-head { margin-bottom: 20px; }
.kicker {
  margin: 0;
  color: var(--green-dark);
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 800;
}
.section-head h2 {
  margin: 6px 0 4px;
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: -0.04em;
}
.lede {
  margin: 0;
  max-width: 780px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 奖项 ---------- */

.award-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.award {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease;
}
.award::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent, var(--green));
}
.award:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.award-emoji { font-size: 24px; line-height: 1; }
.award-title {
  margin: 10px 0 1px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.award-winner {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.avatar {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 13px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 18px;
  font-weight: 800;
}
.avatar-xs {
  width: 23px;
  height: 23px;
  border-radius: 7px;
  font-size: 11px;
}
.avatar-xxs {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  font-size: 9px;
}
.avatar img,
.avatar-xs img,
.avatar-xxs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.award-metric {
  display: inline-block;
  margin-top: 7px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}
.award-detail {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 口头禅 ---------- */

.catch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.catch {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.catch-top { display: flex; align-items: center; gap: 11px; }
.catch h3 { margin: 0; font-size: 17px; }
.catch-persona { margin: 1px 0 0; color: var(--muted); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip {
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 12px;
}
.chip b { color: var(--green-dark); }
.chip i { color: var(--muted); font-style: normal; }

/* ---------- 群梗 ---------- */

.meme-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.meme {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.meme-term { font-size: 24px; font-weight: 900; letter-spacing: -0.04em; }
.meme-total { margin-top: 2px; color: var(--muted); font-size: 12px; }
.meme-king {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: #555;
}
.meme-king b { color: var(--green-dark); }

/* ---------- 表情包示例 ---------- */

.sticker-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.sticker-card {
  margin: 0;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.sticker-rank {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.sticker-img {
  height: 116px;
  margin: 6px 0 8px;
  display: grid;
  place-items: center;
  background: #f7f7f7;
  border-radius: 10px;
  overflow: hidden;
}
.sticker-img img {
  max-width: 100%;
  max-height: 108px;
  object-fit: contain;
}
.sticker-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.sticker-card figcaption b { color: var(--ink); font-size: 13px; }
.sticker-card figcaption span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- 排行榜 ---------- */

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.panel {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel.wide { margin-top: 10px; }
.panel h3 { margin: 0 0 3px; font-size: 15px; }
.panel-sub { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.pill {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.bars { display: grid; gap: 8px; }
.bar-row {
  display: grid;
  grid-template-columns: 70px 1fr 58px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.bar-row .name {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.bar-name > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-track {
  display: block;
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: #f0f0f0;
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #5cdb95);
}
.bar-row .sub { color: var(--muted); text-align: right; font-size: 11px; }

/* ---------- 时间图 ---------- */

.clock-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.clock-card {
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.clock-card .clock-label { color: var(--muted); font-size: 11px; }
.clock-card .clock-time {
  margin-top: 2px;
  color: var(--green-dark);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.clock-card .clock-meta { margin-top: 3px; color: var(--muted); font-size: 11px; }
.clock-people {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.clock-person {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 11px;
  color: var(--muted);
}
.clock-person:nth-last-child(-n+3) { border-bottom: 0; }
.clock-person b { color: var(--ink); font-weight: 600; }
.clock-person .clock-tag { margin-left: auto; color: var(--green-dark); font-weight: 700; white-space: nowrap; }
.hour-chart {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  height: 170px;
  padding-top: 6px;
  flex: 1;
}
.hour-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.hour-y {
  width: 38px;
  height: 170px;
  padding-top: 6px;
  padding-bottom: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  color: var(--muted-2);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.hour-col {
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  height: 100%;
  gap: 6px;
}
.hour-bar {
  width: 100%;
  min-height: 3px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--green), #a7ebc3);
}
.hour-bar.peak {
  background: linear-gradient(180deg, var(--green-dark), var(--green));
  box-shadow: 0 0 0 2px rgba(7, 193, 96, .12);
}
.hour-label { color: var(--muted-2); font-size: 9px; }

.month-chart {
  display: grid;
  grid-template-columns: repeat(51, minmax(0, 1fr));
  align-items: end;
  gap: 2px;
  height: 145px;
  padding-top: 6px;
}
.month-bar {
  width: 100%;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--green), #b7efd0);
}
.month-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 10px;
}

/* ---------- 群名链 ---------- */

.name-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.chain-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}
.btn-chain {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  background: var(--green);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(7, 193, 96, .24);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.btn-chain:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-chain.ghost {
  background: var(--green-soft);
  color: var(--green-dark);
  box-shadow: none;
}
.chain-hint { color: var(--muted); font-size: 11px; }
.chain-bottom {
  display: flex;
  justify-content: center;
  padding-top: 12px;
}
.name-stat {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.name-stat b {
  display: block;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.name-stat span { color: var(--muted); font-size: 11px; }
.name-stat small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chain-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 22px;
}
.chain { position: relative; padding-left: 18px; }
.chain::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--green), #d7f5e3);
  border-radius: 2px;
}
.chain-year {
  position: sticky;
  top: 56px;
  z-index: 3;
  margin: 16px 0 8px;
  padding: 4px 0;
  background: var(--surface);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.chain-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  margin: 0 0 9px;
  padding-left: 2px;
}
.chain-item::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 15px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--green);
  box-shadow: 0 0 0 3px #fff;
}
.chain-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 10px;
  background: var(--surface-soft);
}
.chain-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}
.chain-index { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.chain-actor {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px 1px 2px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 10px;
}
.chain-src {
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff4e5;
  color: #b87400;
  font-size: 10px;
}
.chain-name {
  margin: 3px 0 1px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.chain-name.empty { color: var(--muted); font-weight: 600; }
.chain-old { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.chain-hours { margin-left: auto; color: var(--muted-2); font-size: 10px; }

/* ---------- 纪录 ---------- */

.record-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.record {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.record .num {
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--green-dark);
}
.record .label { margin-top: 2px; color: var(--ink); font-size: 12px; }
.record .meta { margin-top: 6px; color: var(--muted); font-size: 11px; }

/* ---------- 其他 ---------- */

.extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mini-list { display: grid; gap: 7px; }
.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}
.mini-row:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-row b { color: var(--ink); font-weight: 600; }
.mini-row span { color: var(--muted); }

.keyword-list { display: grid; gap: 8px; }
.keyword {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 9px;
  align-items: center;
}
.keyword .kw { font-size: 12px; font-weight: 700; }
.kw-bars {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 18px;
  overflow: hidden;
}
.kw-bars i {
  flex: 1;
  min-width: 1px;
  border-radius: 2px 2px 0 0;
  background: var(--green);
  opacity: .75;
}
.keyword .num { color: var(--muted); font-size: 11px; }

.footer {
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 30px;
}
.footer p { margin: 3px 0; }
.footer code { color: var(--green-dark); }

@media (max-width: 980px) {
  .hero-stats, .award-grid, .record-grid, .name-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catch-grid, .rank-grid, .extra-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sticker-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-bubble { display: none; }
}

@media (max-width: 640px) {
  .topbar-inner, main, .footer-inner { width: calc(100% - 28px); }
  .hero { min-height: 62vh; padding: 38px 18px 34px; }
  .hero-stats, .award-grid, .catch-grid, .meme-grid, .rank-grid, .record-grid, .extra-grid, .name-stats {
    grid-template-columns: 1fr;
  }
  .clock-cards, .clock-people { grid-template-columns: 1fr; }
  .sticker-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding-top: 38px; }
  .nav a { padding: 6px 7px; font-size: 12px; }
  .bar-row { grid-template-columns: 62px 1fr 54px; }
  .chain-wrap { padding: 14px 14px 16px; }
  .hour-chart { gap: 3px; }
  .month-chart { gap: 1px; }
}
