:root {
  --accent: #2f7d6b;
  --accent-soft: #dff0eb;
  /* 出血标记单独用一个颜色，和界面主色分开 */
  --bleed: #bf3f63;
  --bleed-soft: #fbe4ea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #63b5a1;
    --accent-soft: #1f3a33;
    --bleed: #d05a7c;
    --bleed-soft: #45232c;
  }
}

body.sheet-open { overflow: hidden; }

.hero { font-size: 34px; font-weight: 700; line-height: 1.25; }
.hero small { font-size: 16px; font-weight: 400; color: var(--muted); }

/* 首页的分类按钮 */
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; }
.catbtn {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px;
  background: var(--card); border-radius: var(--radius); font-size: 14px; overflow-wrap: anywhere;
}
.catbtn span { font-size: 26px; line-height: 1.2; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tiles .card { margin: 0; padding: 12px; }
.tiles .num { font-size: 24px; font-weight: 700; }
.tiles .num small { font-size: 13px; font-weight: 400; color: var(--muted); }
.month-row { padding: 6px 0; }
.month-row + .month-row { border-top: 1px solid var(--line); }

/* 日历 */
.calhead { margin-bottom: 8px; }
.calhead .title { text-align: center; }
.calhead button { width: 40px; height: 40px; border-radius: 50%; font-size: 22px; color: var(--muted); }
.calhead button.back { width: auto; padding: 0 12px; font-size: 13px; color: var(--accent); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .wd { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.day {
  position: relative; aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.day:disabled { color: var(--muted); cursor: default; }
.day.period { background: var(--bleed); color: #fff; font-weight: 600; }
.day.other { border-color: var(--bleed); color: var(--bleed); font-weight: 600; }
.day.unsure { border-color: var(--bleed); border-style: dashed; color: var(--bleed); font-weight: 600; }
.day.predicted { background: var(--bleed-soft); }
.day.today { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.day.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.day b { position: absolute; bottom: 10%; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.day.period b { background: #fff; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid transparent; }
.legend i.period { background: var(--bleed); }
.legend i.other { border-color: var(--bleed); }
.legend i.unsure { border-color: var(--bleed); border-style: dashed; }
.legend i.predicted { background: var(--bleed-soft); }
.legend i.more { width: 5px; height: 5px; border: 0; background: var(--accent); }

/* 带程度的选项：轻 → 中 → 重，文字上也会写出程度 */
.chip.l1 { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }
.chip.l2 { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* 曲线 */
.chart { display: block; width: 100%; height: auto; margin-top: 12px; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart text.value { fill: var(--text); font-size: 12px; font-weight: 600; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.chart .dot.on { stroke: var(--accent); fill: var(--card); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart-readout { text-align: center; margin-top: 4px; }

.sheet .section-title { margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.field select { background-image: none; }
.wrap-text { white-space: normal; overflow-wrap: anywhere; }
