/* ============================================================
   活动频道 · 热门排行页（/activity/hot）
   作用域：.ach（只在本页生效，不影响首页 / 分类页 / 城市页）
   结构：工具条（复用 .aev-console）→ .ach-hero 榜单头 → .ach-boards 两列榜单 → .ach-rules 口径
   配色沿用全站品牌青，金色不参与排名（避免与「置顶 / 会员」的价值色混淆）
   注意：`.ch-page a:not(.ch-btn)`(0,2,1) 权重高于组件自身 (0,1,0)，
        凡是 <a> 的颜色一律写成 `.ach a.xxx`，别降级成 `.ach .xxx`。
   ============================================================ */

.ach {
  --ach-brand: #087e78;
  --ach-brand-2: #0a8f88;
  --ach-deep: #066a65;
  --ach-tint: #e9f7f5;
  --ach-tint-2: #f2fbf9;
  --ach-ink: #0b1f1e;
  --ach-text: #1d2939;
  --ach-sub: #475467;
  --ach-mute: #667085;
  --ach-line: #e9eef3;
  --ach-line-2: #dce4ea;
  --ach-soft: #eef2f5;
  --ach-r: 14px;
  --ach-sh: 0 2px 8px rgba(16, 24, 40, .04);
  --ach-sh-md: 0 12px 28px rgba(16, 24, 40, .08);
  --ach-ease: cubic-bezier(.22, .61, .36, 1);

  padding-bottom: 56px;
}

.ach *,
.ach *::before,
.ach *::after { box-sizing: border-box; }

/* ---------------- ① 榜单头部 ---------------- */
.ach-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 32px;
  padding: 22px 26px;
  border: 1px solid var(--ach-line);
  border-radius: var(--ach-r);
  background:
    radial-gradient(120% 180% at 102% -40%, rgba(8, 126, 120, .09) 0%, rgba(8, 126, 120, 0) 58%),
    linear-gradient(96deg, #f2fbf9 0%, #ffffff 52%);
  box-shadow: var(--ach-sh);
}

.ach .ach-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #cfe9e5;
  color: var(--ach-deep);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .3px;
}
.ach .ach-eyebrow i { font-size: 10px; color: var(--ach-brand); }

.ach .ach-hero-title {
  margin: 10px 0 0;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ach-ink);
  letter-spacing: -.2px;
}

.ach .ach-hero-desc {
  margin: 7px 0 0;
  max-width: 660px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ach-sub);
}

.ach-hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  max-width: 460px;
}

.ach .ach-hstat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 20px;
  border-left: 1px solid var(--ach-line-2);
}
.ach .ach-hstat:first-child { border-left: 0; padding-left: 0; }
.ach .ach-hstat b {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ach-deep);
  font-variant-numeric: tabular-nums;
}
.ach .ach-hstat em {
  margin-top: 2px;
  font-size: 11.5px;
  font-style: normal;
  color: var(--ach-mute);
  white-space: nowrap;
}

.ach .ach-hstat-up {
  flex-basis: 100%;
  margin-top: 10px;
  text-align: right;
  font-size: 11.5px;
  color: var(--ach-mute);
  font-variant-numeric: tabular-nums;
}
.ach .ach-hstat-up i { margin-right: 4px; font-size: 10px; }

/* ---------------- ② 两列榜单 ---------------- */
.ach-boards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.ach-board {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ach-line);
  border-radius: var(--ach-r);
  background: #fff;
  box-shadow: var(--ach-sh);
}

/* ---------- 列头 ---------- */
.ach-board-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--ach-line);
  background: linear-gradient(180deg, #fbfefd 0%, #ffffff 100%);
}

.ach .ach-board-ic {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ach-tint);
  color: var(--ach-deep);
  font-size: 13px;
}
.ach .ach-board-ic.is-online { background: #eaf1fb; color: #2b5f9e; }

.ach .ach-board-tt { display: flex; flex-direction: column; min-width: 0; }
.ach .ach-board-tt h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ach-ink);
  line-height: 1.35;
}
.ach .ach-board-tt em {
  margin-top: 1px;
  font-size: 11.5px;
  font-style: normal;
  color: var(--ach-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ach .ach-board-count {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0 9px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-radius: 999px;
  background: var(--ach-soft);
  font-size: 11px;
  color: var(--ach-sub);
  white-space: nowrap;
}
.ach .ach-board-count b { color: var(--ach-text); font-weight: 700; font-variant-numeric: tabular-nums; }

.ach a.ach-board-more {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--ach-brand);
  white-space: nowrap;
}
.ach a.ach-board-more:hover { color: var(--ach-deep); text-decoration: underline; text-underline-offset: 3px; }
.ach a.ach-board-more i { font-size: 9px; }

/* ---------- 排名行 ---------- */
.ach-list { margin: 0; padding: 0; list-style: none; }
.ach-list > li + li { border-top: 1px solid var(--ach-soft); }

.ach a.ach-row {
  display: grid;
  grid-template-columns: 38px 104px minmax(0, 1fr) 96px;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  color: var(--ach-text);
  transition: background-color .16s var(--ach-ease);
}
.ach a.ach-row:hover { background: #f7fbfa; color: var(--ach-text); }
.ach a.ach-row:focus-visible {
  outline: 2px solid var(--ach-brand);
  outline-offset: -2px;
  background: #f7fbfa;
}

/* 名次：前三名品牌青实心 / 浅底，其余中性 */
.ach .ach-rank {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border-radius: 8px;
  background: var(--ach-soft);
  color: var(--ach-sub);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .3px;
}
/* 第 1 名：渐变取深一档，保证白字在渐变最亮处仍 ≥ 4.9:1（AA） */
.ach .ach-rank.is-r1 {
  background: linear-gradient(135deg, #087e78 0%, #05524e 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(6, 106, 101, .22);
}
.ach .ach-rank.is-r2,
.ach .ach-rank.is-r3 {
  background: var(--ach-tint);
  border: 1px solid #cfe9e5;
  color: var(--ach-deep);
}

/* 封面缩略图：有图铺图，无图走深底日期海报 */
.ach .ach-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--pa) 0%, var(--pb) 100%);
}
.ach .ach-thumb.has-img { background: var(--ach-soft); }
.ach .ach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s var(--ach-ease);
}
.ach a.ach-row:hover .ach-thumb img { transform: scale(1.05); }

/* 缺图海报四档（沿用首页色板，全部深底白字，对比度 ≥ 4.5:1） */
.ach .is-p0 { --pa: #0d7f78; --pb: #04514d; }
.ach .is-p1 { --pa: #1b6d7a; --pb: #0a3d48; }
.ach .is-p2 { --pa: #2c6b53; --pb: #123b2c; }
.ach .is-p3 { --pa: #48637a; --pb: #21323f; }

.ach .ach-thumb-ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: #fff;
  text-align: center;
  line-height: 1.1;
}
.ach .ach-thumb-ph b { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ach .ach-thumb-ph em { margin-top: 2px; font-size: 10px; font-style: normal; letter-spacing: .5px; opacity: .92; }

/* 中间正文 */
.ach .ach-main { display: flex; flex-direction: column; min-width: 0; gap: 6px; }

.ach .ach-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ach-text);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color .16s var(--ach-ease);
}
.ach a.ach-row:hover .ach-title { color: var(--ach-deep); }

.ach .ach-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
  color: var(--ach-mute);
  font-size: 12px;
  line-height: 1.5;
}
.ach .ach-meta > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; }
.ach .ach-meta i { font-size: 10.5px; color: var(--ach-mute); flex: 0 0 auto; }
.ach .ach-meta > span:not(.ach-chip) {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ach .ach-chip {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--ach-tint-2);
  border: 1px solid #dcefea;
  color: var(--ach-deep);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* 热度条：宽度 = 该场报名数 / 全榜第一名 */
.ach .ach-bar {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--ach-soft);
  overflow: hidden;
}
.ach .ach-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #34b3a6 0%, var(--ach-brand) 100%);
  transition: background .16s var(--ach-ease);
}
.ach a.ach-row:hover .ach-bar i { background: linear-gradient(90deg, var(--ach-brand) 0%, var(--ach-deep) 100%); }

/* 右侧数据 */
.ach .ach-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
  white-space: nowrap;
}
.ach .ach-num { display: inline-flex; align-items: baseline; gap: 2px; }
.ach .ach-num b {
  color: var(--ach-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.ach .ach-num em { color: var(--ach-mute); font-size: 11px; font-style: normal; }
.ach .ach-view { color: var(--ach-mute); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.ach .ach-view i { margin-right: 3px; font-size: 10px; }

.ach .ach-state {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--ach-soft);
  color: var(--ach-sub);
  font-size: 10.5px;
  font-weight: 600;
}
.ach .ach-state.is-ing { background: var(--ach-tint); color: var(--ach-deep); }
.ach .ach-state.is-closing,
.ach .ach-state.is-tight { background: #fdf7ea; color: #8a641f; }

/* 已结束：整行降权，但仍可点击看回顾 */
.ach a.ach-row.is-ended { background: #fcfdfe; }
.ach a.ach-row.is-ended .ach-thumb img { filter: grayscale(.6); opacity: .9; }
.ach a.ach-row.is-ended .ach-thumb-ph { filter: grayscale(.6); opacity: .9; }
.ach a.ach-row.is-ended .ach-title { color: var(--ach-sub); }
.ach a.ach-row.is-ended .ach-num b { color: var(--ach-sub); }
.ach a.ach-row.is-ended .ach-bar i { background: #c9d3db; }

/* 列尾「还有 N 场」 */
.ach a.ach-board-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 16px;
  border-top: 1px solid var(--ach-line);
  background: #fbfdfd;
  color: var(--ach-brand);
  font-size: 12.5px;
}
.ach a.ach-board-foot:hover { background: var(--ach-tint-2); color: var(--ach-deep); }
.ach a.ach-board-foot i { font-size: 9px; }

/* 空榜 */
.ach-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 42px 20px 46px;
  text-align: center;
}
.ach-empty > i { font-size: 22px; color: #b6c2cd; }
.ach-empty b { font-size: 14px; color: var(--ach-text); }
.ach-empty span { font-size: 12.5px; color: var(--ach-mute); }
.ach-empty .ch-btn { margin-top: 8px; }

/* ---------------- ③ 榜单口径 ---------------- */
.ach-rules {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--ach-line);
  border-radius: var(--ach-r);
  background: #fff;
  box-shadow: var(--ach-sh);
}
.ach-rules-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ach-soft);
}
.ach-rules-head > b {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ach-ink);
  font-size: 13.5px;
  font-weight: 700;
}
.ach-rules-head > b i { color: var(--ach-brand); font-size: 12px; }
.ach-rules-head .ch-btn { margin-left: auto; }

.ach-rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 22px;
  padding-top: 14px;
}
.ach-rule {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: start;
}
.ach-rule > i {
  grid-row: 1 / 3;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--ach-tint);
  color: var(--ach-deep);
  font-size: 11px;
}
.ach-rule > b { font-size: 13px; font-weight: 700; color: var(--ach-text); line-height: 1.4; }
.ach-rule > span { font-size: 12px; line-height: 1.7; color: var(--ach-mute); }

/* ---------------- 响应式 ---------------- */
/* 1320 以下：两列还在，但行内左右两翼收紧，给标题区留足宽度 */
@media (max-width: 1320px) {
  .ach a.ach-row { grid-template-columns: 34px 96px minmax(0, 1fr) 88px; gap: 11px; padding: 12px 14px; }
  .ach .ach-title { font-size: 14px; }
  .ach-hero-stats .ach-hstat { padding: 0 15px; }
}

/* 1180 以下：两列会挤成「标题两行 + 信息两行」，直接转单列（榜单上下排），
   单列下行宽会超过 700，热度条封顶 420 免得像进度条 */
@media (max-width: 1180px) {
  .ach .ach-bar { max-width: 420px; }
  .ach-boards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ach-rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ach-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ach-hero-stats { justify-content: flex-start; }
  .ach-hero-stats .ach-hstat:first-child { padding-left: 0; }
  .ach .ach-hstat-up { text-align: left; }
  .ach .ach-board-tt em { display: none; }
}

@media (max-width: 720px) {
  .ach .ach-hero { padding: 18px; }
  .ach .ach-hero-title { font-size: 18px; }
  .ach .ach-hero-stats { width: 100%; }
  .ach .ach-hstat { padding: 0 12px; }
  .ach .ach-hstat b { font-size: 17px; }
  .ach a.ach-row { grid-template-columns: 30px 78px minmax(0, 1fr); row-gap: 7px; padding: 12px 13px; }
  .ach .ach-rank { grid-area: 1 / 1 / 2 / 2; width: 28px; height: 26px; font-size: 12px; }
  .ach .ach-thumb { grid-area: 1 / 2 / 3 / 3; }
  .ach .ach-main { grid-area: 1 / 3 / 2 / 4; }
  .ach .ach-side {
    grid-area: 2 / 3 / 3 / 4;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }
  .ach .ach-num b { font-size: 15px; }
  .ach .ach-title { font-size: 13.5px; -webkit-line-clamp: 2; }
  .ach .ach-bar { max-width: 100%; }
  .ach .ach-board-head { padding: 13px; }
  .ach-rules { padding: 14px; }
  .ach-rules-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ach-rules-head .ch-btn { height: 30px; padding: 0 11px; font-size: 12px; }
}

@media (max-width: 460px) {
  .ach .ach-thumb-ph b { font-size: 19px; }
  .ach .ach-board-count { display: none; }
  .ach .ach-meta > span:not(.ach-chip):nth-child(2) { display: none; }
}
