:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #17202a;
  --muted: #6b7785;
  --line: #e4e8ed;
  --accent: #0f766e;
  --accent-soft: #e6f4f1;
  --danger: #b45309;
  --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

/* 顶部 */
.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand .sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0;
}
.tabs {
  display: flex;
  gap: 4px;
  background: #e9edf1;
  padding: 4px;
  border-radius: 12px;
}
.tabs a {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.tabs a.on {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* 提示条 */
.banner {
  background: #fff8e6;
  border: 1px solid #f2dfae;
  color: #7a5a11;
  font-size: 12px;
  line-height: 1.5;
  padding: 9px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
}

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(18, 32, 46, 0.04), 0 8px 24px rgba(18, 32, 46, 0.04);
}
.card h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}

/* 今日任务 */
.task-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.task-big {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.task-unit { font-size: 13px; color: var(--muted); }
.task-focus {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--muted);
}
.task-focus b { color: var(--ink); font-weight: 600; }

/* 表单 */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  display: block;
}
.label .hint { font-weight: 400; color: var(--muted); font-size: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: all 0.12s ease;
}
.chip.on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.nums { display: flex; gap: 10px; }
.num {
  flex: 1;
  background: #f7f9fa;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.num label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.num input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  outline: none;
  padding: 0;
}
.num input::placeholder { color: #c3cbd3; font-weight: 500; }

textarea.note {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  resize: none;
  outline: none;
  background: #f7f9fa;
}
textarea.note:focus { border-color: var(--accent); }

.btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
}
.btn:active { transform: scale(0.995); }
.btn[disabled] { opacity: 0.55; }
.btn.ghost {
  background: #eef2f4;
  color: var(--ink);
  font-weight: 600;
}

/* 完成态 */
.done-hero { text-align: center; padding: 8px 0 4px; }
.done-mark {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin: 0 auto 12px;
  font-size: 26px; font-weight: 700;
}
.done-title { font-size: 18px; font-weight: 700; }
.done-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* 看板 */
.stats { display: flex; gap: 8px; margin-bottom: 12px; }
.stat {
  flex: 1;
  background: var(--card);
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(18, 32, 46, 0.04);
}
.stat .v {
  font-size: 26px; font-weight: 700; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat .k { font-size: 11px; color: var(--muted); margin-top: 2px; }
.stat.warn .v { color: var(--danger); }

.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cell {
  aspect-ratio: 1;
  border-radius: 7px;
  background: #eef1f4;
  position: relative;
}
.cell.on { background: var(--accent); }
.cell.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.grid-legend {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--muted); margin-top: 8px;
}

.row { display: flex; justify-content: space-between; font-size: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .k { color: var(--muted); }
.row .v { font-weight: 600; font-variant-numeric: tabular-nums; }

.empty { color: var(--muted); font-size: 13px; text-align: center; padding: 8px 0; }

.foot {
  text-align: center;
  font-size: 11px;
  color: #9aa5b1;
  margin-top: 20px;
}

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px);
  background: #17202a; color: #fff; font-size: 13px; padding: 10px 16px;
  border-radius: 999px; opacity: 0; pointer-events: none; transition: all 0.2s ease;
  z-index: 50; max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
