/* 功能更新（app/changelog.py）。颜色只用 tokens.css 变量（UI 门禁）；组的颜色同侧栏 styles.css 的 data-hue。 */
[hidden] { display: none !important; }
body { background: var(--canvas); color: var(--text-primary); overflow-x: hidden; }
.cl-app { margin: 0 auto; padding: 20px 16px 64px; max-width: 1180px; display: flex; flex-direction: column; gap: 14px; }
.cl-head h1 { margin: 0 0 6px; font-size: 22px; }
.cl-head p { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.6; }
.cl-links { margin: -6px 0 0; display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; }
.cl-links a { color: var(--accent); text-decoration: none; }
.cl-links a:hover { text-decoration: underline; }

/* 组的颜色（同侧栏 data-hue）、类型的颜色、格子深浅都由 changelog.js 写进 style（UI 门禁不许自定义变量） */

.cl-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-btn { border: 1px solid var(--border-control); background: var(--surface); color: var(--text-primary); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.cl-btn:hover { border-color: var(--accent); }
.cl-btn.on, .cl-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
.cl-legend { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); }
.cl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* 日期条：一格一天，柱子按类型叠，最新在最左 */
.cl-strip-wrap { overflow-x: auto; padding-bottom: 4px; }
.cl-strip { display: flex; gap: 4px; align-items: flex-end; min-height: 96px; }
.cl-day { flex: 0 0 auto; width: 38px; border: 1px solid transparent; background: none; border-radius: 8px; padding: 4px 2px 3px; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cl-day:hover { border-color: var(--border-strong); background: var(--surface); }
.cl-day.in { background: var(--surface); border-color: var(--border); }
.cl-day.on { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 2px var(--focus-ring); }
.cl-day .n { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-primary); min-height: 16px; }
.cl-day .n.zero { color: var(--text-disabled); font-weight: 400; }
.cl-day .bar { width: 18px; height: 56px; display: flex; flex-direction: column-reverse; border-radius: 3px; overflow: hidden; background: var(--surface-sunken); }
.cl-day .bar i { display: block; width: 100%; }
.cl-day .d { font-size: 11px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.cl-day .w { font-size: 10px; color: var(--text-muted); }
.cl-day.we .w { color: var(--danger-fg); }
.cl-day.mon { margin-left: 8px; }
.cl-day .mo { font-size: 10px; color: var(--accent); font-weight: 600; }

.cl-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; min-width: 0; }
.cl-card h2 { margin: 0 0 10px; font-size: 16px; }
.cl-card h2 small { font-weight: 400; color: var(--text-muted); font-size: 12px; margin-left: 6px; }
.cl-h2b { margin-top: 18px !important; }

/* 重点：一句话 + 三件 + 数 */
.cl-sum { border-top: 3px solid var(--r-600); }
.cl-sum .date { font-size: 13px; color: var(--text-muted); }
.cl-sum .date b { color: var(--text-primary); font-size: 15px; margin-right: 6px; }
.cl-sum .head { margin: 6px 0 8px; font-size: 18px; font-weight: 700; line-height: 1.5; }
.cl-sum .head.wait { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.cl-sum ol { margin: 0 0 12px; padding-left: 1.4em; font-size: 14px; line-height: 1.75; }
.cl-nums { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.cl-num { border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; min-width: 76px; background: var(--surface-raised); }
.cl-num b { display: block; font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.cl-num span { font-size: 12px; color: var(--text-muted); }
.cl-num.big b { color: var(--text-primary); }
.cl-who { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; max-width: 520px; }
.cl-who .row { display: grid; grid-template-columns: 112px 1fr 34px; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); }
.cl-who .track { height: 10px; background: var(--surface-sunken); border-radius: 5px; overflow: hidden; }
.cl-who .track i { display: block; height: 100%; background: var(--a-600); border-radius: 5px; }
.cl-who .row b { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.cl-note { margin-top: 10px; font-size: 12px; color: var(--text-muted); }

/* 框架图：每组一块，组里每个小标题一格 */
.cl-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; }
.cl-hub { border: 1px solid var(--border); border-top: 4px solid var(--border-strong); border-radius: 10px; padding: 8px 10px 10px; background: var(--surface); }
.cl-hub.zero { opacity: .62; }
.cl-hub h3 { margin: 0 0 8px; font-size: 14px; display: flex; justify-content: space-between; align-items: baseline; }
.cl-hub h3 small { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.cl-hub h3 small b { font-size: 15px; }
.cl-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.cl-col { position: relative; border: 1px solid var(--border-subtle); border-radius: 8px; padding: 7px 8px; min-height: 48px; text-align: left; font: inherit; font-size: 12px; line-height: 1.35; cursor: pointer;
  color: var(--text-primary); background: var(--surface); }
.cl-col.hot { color: var(--text-on-accent); }
.cl-col.empty { color: var(--text-disabled); cursor: default; background: var(--surface-sunken); }
.cl-col:not(.empty):hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.cl-col.on { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.cl-col b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.cl-col.empty b { font-size: 14px; font-weight: 400; }

/* 走势：热力格 + 每天一句 */
.cl-heat-wrap { overflow-x: auto; }
.cl-heat { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.cl-heat th { font-weight: 400; color: var(--text-muted); text-align: center; padding: 0 1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cl-heat th.lab, .cl-heat td.lab { text-align: left; white-space: nowrap; padding-right: 8px; color: var(--text-primary); }
.cl-heat td.lab i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.cl-heat td.lab small { color: var(--text-muted); margin-left: 4px; }
.cl-heat td.c { width: 22px; height: 22px; border-radius: 4px; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; cursor: pointer;
  background: var(--surface-sunken); color: var(--text-primary); }
.cl-heat td.c.hot { color: var(--text-on-accent); }
.cl-heat td.c.z { cursor: default; color: transparent; }
.cl-timeline { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.cl-timeline li { display: grid; grid-template-columns: 136px 120px 1fr; gap: 10px; align-items: center; font-size: 13px; line-height: 1.5; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.cl-timeline li:hover { background: var(--surface-hover); }
.cl-timeline .dd { color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cl-timeline .tb { height: 10px; background: var(--surface-sunken); border-radius: 5px; overflow: hidden; display: flex; }
.cl-timeline .tb i { display: block; height: 100%; }
.cl-timeline .tx { color: var(--text-primary); }
.cl-timeline .tx.wait { color: var(--text-muted); }

/* 改了什么：按块分段，一条一行 */
.cl-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; align-items: center; }
.cl-chip { border: 1px solid var(--border-control); background: var(--surface); color: var(--text-secondary); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.cl-chip:hover { border-color: var(--accent); }
.cl-chip.on { background: var(--accent-soft-bg); border-color: var(--accent); color: var(--accent-soft-fg); font-weight: 600; }
.cl-chip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.cl-chip.col { color: var(--text-primary); }
.cl-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.cl-grp { margin-top: 14px; }
.cl-grp:first-child { margin-top: 0; }
.cl-grp h3 { margin: 0 0 6px; font-size: 14px; padding-left: 8px; border-left: 4px solid var(--border-strong); display: flex; gap: 8px; align-items: baseline; }
.cl-grp h3 small { font-weight: 400; color: var(--text-muted); font-size: 12px; }
.cl-it { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border-subtle); }
.cl-grp .cl-it:first-of-type { border-top: 0; }
.cl-k { align-self: start; text-align: center; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 0; color: var(--text-on-accent); border: 1px solid transparent; }
.cl-k.guess { background: var(--surface) !important; border-style: dashed; }
.cl-it .t { font-size: 14px; font-weight: 600; line-height: 1.5; }
.cl-it .wt { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin-top: 1px; }
.cl-it .m { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12px; color: var(--text-muted); }
.cl-pg { display: inline-flex; align-items: center; gap: 4px; color: var(--text-primary); text-decoration: none; border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px 1px 2px; background: var(--surface-raised); }
.cl-pg:hover { border-color: var(--accent); }
.cl-pg span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; font-size: 11px; color: var(--text-on-accent); }
.cl-who-tag { font-weight: 600; color: var(--text-secondary); }
.cl-it details { margin-top: 4px; font-size: 12px; }
.cl-it summary { cursor: pointer; color: var(--accent); display: inline; }
.cl-it details p { margin: 4px 0 0; color: var(--text-secondary); line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.cl-empty { color: var(--text-muted); font-size: 13px; padding: 10px 0; }
.cl-day-tag { font-variant-numeric: tabular-nums; }

.cl-rules dl { margin: 0; font-size: 13px; line-height: 1.7; }
.cl-rules dt { font-weight: 600; margin-top: 6px; }
.cl-rules dd { margin: 0 0 0 1em; color: var(--text-secondary); }
.cl-msg { border: 1px solid var(--danger-border); background: var(--danger-bg); color: var(--danger-fg); border-radius: 8px; padding: 10px 12px; font-size: 13px; }

@media (max-width: 640px) {
  .cl-legend { margin-left: 0; width: 100%; }
  .cl-cols { grid-template-columns: 1fr 1fr; }
  .cl-timeline li { grid-template-columns: 1fr; gap: 2px; }
  .cl-timeline .tb { display: none; }
  .cl-it { grid-template-columns: 44px 1fr; }
  .cl-who .row { grid-template-columns: 92px 1fr 30px; }
}
