/* 每日挑战（需求 52，docs/60）：挑战页（由 js/challenge.js 按需加载）和首页的「每日挑战」卡（index.html 直接引入）。
   颜色走主题变量；手机宽度下排名表横向可滚，不撑破页面。 */
.ch-page .ch-card { margin-bottom: 14px; }
.ch-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ch-head h2 { margin: 0; }
.ch-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0; color: var(--muted, #8590a6); font-size: 14px; }
.ch-facts span { overflow-wrap: anywhere; }
.ch-items { margin: 8px 0; padding-left: 0; list-style: none; }
.ch-items li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 6px 0;
  border-bottom: 1px solid var(--line, #2a3040); }
.ch-items li:last-child { border-bottom: 0; }
.ch-k { font-weight: 600; min-width: 4.5em; }
.ch-st { overflow-wrap: anywhere; }
.ch-todo { color: var(--muted, #8590a6); }
.ch-open { color: var(--warn, #f0b429); }
.ch-total { margin: 8px 0; font-weight: 600; }
.ch-done { color: var(--gain-fg, #7fd6cb); }
.ch-board, .ch-reveal { margin-top: 14px; }
.ch-board h3, .ch-reveal h3 { margin: 0 0 6px; font-size: 15px; }
.ch-compare { margin: 6px 0 0 1.2em; padding: 0; }
.ch-compare li { margin: 3px 0; overflow-wrap: anywhere; }
.ch-scroll { width: 100%; overflow-x: auto; }
.ch-table { width: 100%; table-layout: fixed; }
.ch-table .num { text-align: right; }
.ch-table th:nth-child(1), .ch-table td:nth-child(1) { width: 3.5em; }
.ch-table th:nth-child(3), .ch-table td:nth-child(3) { width: 5em; }
.ch-table th:nth-child(4), .ch-table td:nth-child(4) { width: 6em; }
.ch-table td.ch-nick { overflow: hidden; }
.ch-table td.ch-nick span { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: bottom; }
.ch-table tr.ch-me td { background: var(--sh-tint-accent-soft, rgba(43, 120, 184, 0.12)); font-weight: 600; }
.ch-table tr.ch-gap td { text-align: center; color: var(--muted, #8590a6); }
.ch-reveal ul { margin: 0; padding: 0; list-style: none; }
.ch-reveal-row { padding: 8px 0; border-bottom: 1px solid var(--line, #2a3040); overflow-wrap: anywhere; }
.ch-reveal-row:last-child { border-bottom: 0; }
.ch-reveal-row .muted { font-size: 13px; }

/* 首页的「每日挑战」卡（js/home-challenge.js 异步填上；取不到就一直隐藏） */
.home-daily { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 10px 0 0; padding: 10px 14px;
  border: 1px solid var(--line2, var(--line, #2a3040)); border-radius: 10px; color: inherit; text-decoration: none;
  background: var(--sh-tint-warn-faint, rgba(240, 180, 41, .08)); }
.home-daily:hover { border-color: var(--sh-warn-line, #f0b429); }
.home-daily b { color: var(--sh-warn-fg, #f5c75a); }
.home-daily span:not([aria-hidden]) { font-size: 13px; opacity: .85; overflow-wrap: anywhere; }
.home-daily.hidden { display: none; }

@media (max-width: 480px) {
  .ch-table { font-size: 13px; }
  .ch-table th, .ch-table td { padding-left: 4px; padding-right: 4px; }
  .ch-table th:nth-child(1), .ch-table td:nth-child(1) { width: 2.4em; }
  .ch-table th:nth-child(4), .ch-table td:nth-child(4) { width: 4.5em; }
}
.pg-btns > .ch-done, .pg-btns > .pg-note { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }   /* 按钮区里的说明文字：窄屏折行（QA 53） */
