/* 宝宝成长计划 · 暖色移动优先样式 */
:root {
  --bg: #fdf6f0;
  --card: #ffffff;
  --ink: #4a3a33;
  --ink2: #8b7a72;
  --line: #f2e3d8;
  --brand: #e0785c;
  --brand-soft: #fdece5;
  --rose: #d9737f;
  --rose-soft: #fdeef0;
  --green: #7ba36a;
  --green-soft: #eef5e9;
  --amber: #d99a35;
  --amber-soft: #fdf3e0;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(160, 110, 85, 0.10);
  --shadow-sm: 0 2px 8px rgba(160, 110, 85, 0.08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
.hidden { display: none !important; }
.muted { color: var(--ink2); }

/* ---------------- 登录 ---------------- */
.auth { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; overflow: auto;
  background: linear-gradient(170deg, #ffeadf 0%, #fdf6f0 45%, #f7f1ff 100%); }
.auth-glow { position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,120,92,.28), rgba(224,120,92,0) 70%);
  top: -80px; right: -60px; filter: blur(6px); }
.auth-card { position: relative; width: 100%; max-width: 400px; background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px); border-radius: 26px; padding: 26px 22px 22px; box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.8); }
.auth-heart { font-size: 40px; text-align: center; line-height: 1; }
.auth-card h1 { font-size: 21px; margin: 10px 0 4px; text-align: center; letter-spacing: .5px; }
.auth-card > p { text-align: center; margin: 0 0 18px; font-size: 13.5px; }
.fld { display: block; margin-bottom: 12px; }
.fld span { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 6px; }
.fld input { width: 100%; padding: 14px 14px; font-size: 16px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 14px; background: #fffdfb; outline: none; }
.fld input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.btn { width: 100%; padding: 15px 16px; font-size: 16.5px; font-weight: 600; font-family: inherit;
  border: none; border-radius: 15px; cursor: pointer; margin-top: 6px; transition: transform .12s ease; }
.btn:active { transform: scale(.985); }
.btn.primary { background: linear-gradient(135deg, #e8865f, #d9737f); color: #fff; box-shadow: 0 6px 16px rgba(217,115,127,.28); }
.btn.ghost { background: var(--brand-soft); color: var(--brand); }
.btn.soft { background: #f6f1ec; color: var(--ink); }
.btn.danger { background: #fdeeee; color: #c25b5b; }
.msg { font-size: 13.5px; min-height: 20px; text-align: center; margin: 10px 0 0; color: var(--rose); }
.tip { font-size: 13.5px; color: var(--ink2); background: var(--amber-soft); border-radius: 12px;
  padding: 10px 12px; margin: 0 0 14px; }

/* ---------------- 头部 ---------------- */
.hero { padding: calc(16px + env(safe-area-inset-top)) 16px 14px;
  background: linear-gradient(170deg, #ffeadf, #fdf6f0); border-radius: 0 0 26px 26px; }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; }
.hero-k { margin: 0 0 2px; font-size: 12.5px; color: var(--ink2); }
.hero-ga { margin: 0; font-size: 34px; line-height: 1.15; letter-spacing: .5px; }
.hero-ga small { font-size: 14px; font-weight: 500; color: var(--ink2); margin-left: 1px; }
.icon-btn { width: 40px; height: 40px; border-radius: 13px; border: 1px solid var(--line);
  background: #fff; color: var(--brand); font-size: 18px; cursor: pointer; }
.hero-bars { margin-top: 14px; display: grid; gap: 10px; }
.bar-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink2); margin-bottom: 5px; }
.track { height: 9px; border-radius: 99px; background: #f2e6dd; overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f0a077, #e0785c); transition: width .5s ease; }
.track.warm i { background: linear-gradient(90deg, #e7a3ad, #d9737f); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: rgba(255,255,255,.85); border: 1px solid #f7ebe2; border-radius: 14px; padding: 9px 10px; }
.stat-k { display: block; font-size: 11.5px; color: var(--ink2); margin-bottom: 2px; }
.stat b { font-size: 17px; }

/* ---------------- 标签导航 ---------------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 4px; position: sticky; top: 0;
  background: var(--bg); z-index: 5; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; padding: 9px 15px; border-radius: 99px; border: 1px solid var(--line);
  background: #fff; color: var(--ink2); font-size: 14.5px; font-weight: 500; font-family: inherit; cursor: pointer; white-space: nowrap; }
.tab.on { background: linear-gradient(135deg, #e8865f, #d9737f); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(217,115,127,.25); }

/* ---------------- 内容 ---------------- */
.main { padding: 10px 16px 40px; max-width: 780px; margin: 0 auto; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
  border: 1px solid #f8efe8; margin-bottom: 14px; }
.card h2 { font-size: 18px; margin: 0 0 10px; }
.card h3 { font-size: 16px; margin: 16px 0 8px; }
.card p { margin: 8px 0; }
.card ul, .card ol { padding-left: 20px; margin: 8px 0; }
.card li { margin: 5px 0; }
.card a { color: var(--brand); }
.main > .md h1 { font-size: 20px; margin: 4px 0 12px; }
.main > .md h2 { font-size: 17.5px; margin: 20px 0 8px; padding-left: 10px; border-left: 4px solid var(--brand); }
.main > .md h3 { font-size: 16px; margin: 16px 0 6px; }
.main > .md p, .main > .md li { font-size: 15.5px; }
.main > .md code { background: #f7f1ec; padding: 1px 6px; border-radius: 6px; font-size: 14px; }
.main > .md blockquote { margin: 10px 0; padding: 10px 12px; background: var(--amber-soft);
  border-radius: 12px; border-left: 4px solid var(--amber); font-size: 14.5px; }
.main > .md blockquote p { margin: 0; }
.table-wrap { overflow-x: auto; margin: 10px -16px 14px; padding: 0 16px; }
table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 14px; background: #fff;
  border-radius: 12px; overflow: hidden; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
th { background: var(--brand-soft); color: #a5563c; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
tr:last-child td { border-bottom: none; }

/* ---------------- 交互组件 ---------------- */
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
input, select, textarea { font-family: inherit; font-size: 16px; }
.inp { flex: 1 1 auto; min-width: 0; padding: 12px 12px; border: 1.5px solid var(--line);
  border-radius: 13px; background: #fffdfb; color: var(--ink); outline: none; }
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.btn.sm { width: auto; padding: 12px 18px; font-size: 15px; margin: 0; border-radius: 13px; }
.chk { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: 14px;
  background: #fffdfa; border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; }
.chk input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--brand); flex: 0 0 auto; }
.chk .t { flex: 1 1 auto; font-size: 15px; }
.chk .t small { display: block; color: var(--ink2); font-size: 12.5px; margin-top: 2px; }
.chk.done { background: var(--green-soft); border-color: #dbe9d2; }
.chk.done .t { text-decoration: line-through; color: var(--ink2); }
.chip { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.chip.ok { background: var(--green-soft); color: #557a45; }
.chip.warn { background: var(--amber-soft); color: #9c6a17; }
.chip.bad { background: var(--rose-soft); color: #b4515e; }
.chip.info { background: #eef2fb; color: #4f6291; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14.5px; }
.dl dt { color: var(--ink2); }
.dl dd { margin: 0; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }
.mutelist { font-size: 13.5px; color: var(--ink2); }
.big { font-size: 24px; font-weight: 700; }
.center { text-align: center; }
.foot { padding: 8px 16px 26px; text-align: center; font-size: 12px; color: var(--ink2);
  display: flex; flex-direction: column; gap: 4px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px); opacity: 0;
  background: rgba(74,58,51,.94); color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 14.5px;
  pointer-events: none; transition: all .25s ease; max-width: 86vw; text-align: center; z-index: 50; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 760px) {
  .hero { border-radius: 0 0 32px 32px; padding: 22px 26px 18px; }
  .main { padding: 14px 26px 60px; }
  .hero-stats { max-width: 520px; }
}
