/* 《成为更好的你》—— 低饱和薄荷绿 + 纯白，极简治愈 */
:root {
  --mint: #8fcbb3;
  --mint-deep: #5aa98a;
  --mint-light: #e8f5ef;
  --mint-wash: #f4faf7;
  --ink: #33413b;
  --ink-soft: #6b7d75;
  --line: #e0ece6;
  --white: #ffffff;
  --warm: #f2b8a0;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(90, 169, 138, .08);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--mint-wash);
  color: var(--ink);
  line-height: 1.6;
}
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--mint-wash); }
#view { padding: 16px 16px 84px; }
.hidden { display: none !important; }

/* ===== 通用 ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}
.card h3 { font-size: 1rem; color: var(--ink); margin-bottom: 10px; font-weight: 600; }
.muted { color: var(--ink-soft); font-size: .82rem; }
.btn {
  display: inline-block; border: none; cursor: pointer;
  background: var(--mint); color: #fff; font-size: .95rem;
  padding: 10px 20px; border-radius: 999px; font-weight: 600;
  transition: opacity .15s;
}
.btn:active { opacity: .8; }
.btn.ghost { background: var(--mint-light); color: var(--mint-deep); }
.btn.small { padding: 6px 14px; font-size: .82rem; }
.btn.block { display: block; width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
input[type="text"], input[type="password"], input[type="number"], input[type="time"], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: .95rem; background: var(--mint-wash); color: var(--ink); outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--mint); background: #fff; }
textarea { resize: vertical; min-height: 90px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .85rem; color: var(--ink-soft); margin-bottom: 6px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.row > .shrink { flex: 0 0 auto; }

h1.page-title { font-size: 1.25rem; margin: 6px 0 2px; }
.slogan { color: var(--mint-deep); font-size: .85rem; margin-bottom: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: .88rem; z-index: 99; max-width: 80%; text-align: center;
  animation: toast-in .2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ===== 登录页 ===== */
.auth-wrap { padding-top: 10vh; text-align: center; }
.auth-logo { font-size: 3rem; }
.auth-title { font-size: 1.4rem; margin: 10px 0 4px; }
.auth-sub { color: var(--ink-soft); font-size: .88rem; margin-bottom: 28px; }
.auth-card { text-align: left; }
.auth-switch { text-align: center; font-size: .85rem; color: var(--ink-soft); margin-top: 14px; }
.auth-switch a { color: var(--mint-deep); text-decoration: none; font-weight: 600; }
.avatar-preview {
  width: 72px; height: 72px; border-radius: 50%; background: var(--mint-light);
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
  margin: 0 auto 8px; overflow: hidden; cursor: pointer; color: var(--mint-deep);
  border: 2px dashed var(--mint);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ===== 底部导航 ===== */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; display: flex;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  z-index: 50;
}
.tabbar a {
  flex: 1; text-align: center; text-decoration: none; color: var(--ink-soft);
  font-size: .68rem; display: flex; flex-direction: column; gap: 2px;
}
.tabbar a.active { color: var(--mint-deep); font-weight: 600; }
.tab-ico { font-size: 1.25rem; }

/* ===== 首页看板 ===== */
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.score-card { text-align: center; padding: 14px 8px; }
.score-card .score-num { font-size: 1.5rem; font-weight: 700; color: var(--mint-deep); }
.score-card .score-label { font-size: .8rem; color: var(--ink-soft); }
.ring { position: relative; width: 84px; height: 84px; margin: 0 auto 6px; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-txt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--mint-deep); font-size: 1.05rem; }
.weight-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 8px 0 6px; }
.weight-bar span { display: block; }
.weight-legend { display: flex; flex-wrap: wrap; gap: 8px; font-size: .75rem; color: var(--ink-soft); }
.weight-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; }

/* ===== 记录页 ===== */
.tabs { display: flex; gap: 6px; padding-bottom: 4px; margin-bottom: 14px; }
.tabs button {
  flex: 1 1 0; min-width: 0; border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  padding: 7px 2px; border-radius: 999px; font-size: .78rem; cursor: pointer; text-align: center;
}
.tabs button.active { background: var(--mint); color: #fff; border-color: var(--mint); font-weight: 600; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 9px 16px; border-radius: 999px; font-size: .9rem; cursor: pointer;
}
.chip.on { background: var(--mint-light); border-color: var(--mint); color: var(--mint-deep); font-weight: 600; }
.record-done { background: var(--mint-light); border-radius: 10px; padding: 10px 14px; font-size: .88rem; color: var(--mint-deep); margin-bottom: 12px; }
.feedback { background: #fdf6f0; border-radius: 10px; padding: 10px 14px; font-size: .88rem; color: #a06a3f; margin-top: 12px; }

/* ===== 趋势页 ===== */
.chart-box { height: 240px; }

/* ===== 经验社区 ===== */
.topic-banner { background: linear-gradient(135deg, var(--mint) 0%, var(--mint-deep) 100%); color: #fff; }
.topic-banner .muted { color: rgba(255,255,255,.85); }
.post { position: relative; }
.post.read { opacity: .62; }
.post-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.post-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--mint-light); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 1.2rem; flex: 0 0 auto; color: var(--mint-deep); }
.post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-body { font-size: .92rem; white-space: pre-wrap; word-break: break-word; }
.post-actions { display: flex; gap: 14px; margin-top: 10px; align-items: center; }
.post-actions button {
  border: none; background: none; cursor: pointer; font-size: .85rem; color: var(--ink-soft);
  padding: 4px 10px; border-radius: 999px; background: var(--mint-wash);
}
.post-actions button.on-like { background: var(--mint-light); color: var(--mint-deep); font-weight: 600; }
.post-actions button.on-dislike { background: #fbeae4; color: #b0603a; font-weight: 600; }
.section-title { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 18px 0 10px; }
.pending-tag { display: inline-block; font-size: .72rem; background: #fdf3e3; color: #a07b28; padding: 2px 10px; border-radius: 999px; }

/* ===== 科普/周报 ===== */
.article h4 { margin: 14px 0 6px; color: var(--mint-deep); font-size: .95rem; }
.article p, .article li { font-size: .9rem; color: var(--ink); }
.article ul { padding-left: 20px; }
.article .warn { background: #fdf6f0; border-left: 3px solid var(--warm); padding: 10px 12px; border-radius: 0 8px 8px 0; margin: 10px 0; font-size: .88rem; }
.weekly-line { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.weekly-final { text-align: center; color: var(--mint-deep); font-weight: 700; padding: 16px 0 4px; font-size: 1rem; }

/* ===== 我的/审核台 ===== */
.me-head { display: flex; gap: 14px; align-items: center; }
.me-head .avatar-preview { margin: 0; cursor: default; }
.me-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.me-row:last-child { border-bottom: none; }
.admin-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.admin-item .row { margin-top: 10px; }
.tabs button .tp-bar { display: block; height: 3px; border-radius: 2px; background: var(--mint-light); margin-top: 5px; overflow: hidden; }
.tabs button .tp-bar > i { display: block; height: 100%; background: currentColor; opacity: .5; border-radius: 2px; }

/* ===== 首页打卡日历 ===== */
.cal-title { font-size: .85rem; color: var(--ink-soft); margin-top: 4px; }
.cal-title i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--mint); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; }
.cal-head { text-align: center; font-size: .7rem; color: var(--ink-soft); padding: 2px 0; }
.cal-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.cal-day .cd-num { font-size: .78rem; line-height: 1; }
.cal-day .cd-dots { display: flex; gap: 2px; }
.cal-day .cd-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.cal-day .cd-dots i.on { background: var(--mint); }
.cal-day.full { background: var(--mint); border-color: var(--mint); color: #fff; }
.cal-day.full .cd-dots i { background: rgba(255,255,255,.9); }
.cal-day.today { border: 2px solid var(--mint-deep); }
.cal-day.future { color: var(--line); background: transparent; border-color: transparent; }
.cal-day.future .cd-dots { visibility: hidden; }
.cal-day.clickable { cursor: pointer; }

/* ===== 建议回复气泡 ===== */
.reply-bubble { background: var(--mint-light); border-radius: 10px; padding: 8px 12px; font-size: .85rem; color: var(--mint-deep); margin-top: 6px; }
