/* ============ 轻舟 · 全局样式 ============ */
:root {
  --mint: #7FCBA4;
  --mint-dark: #4f9d78;
  --mint-bg: #e8f5ee;
  --coral: #FF8A65;
  --coral-dark: #e0704a;
  --cream: #FFF8F0;
  --ink: #2d3b34;
  --ink2: #7a8a80;
  --card: #ffffff;
  --shadow: 0 2px 6px rgba(45, 90, 69, .05), 0 12px 28px rgba(45, 90, 69, .08);
  --shadow-sm: 0 2px 10px rgba(45, 90, 69, .07);
  --hairline: 1px solid rgba(127, 203, 164, .14);
  --radius: 20px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; background: var(--cream); }
body {
  font-family: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--cream); color: var(--ink);
  max-width: 520px; margin: 0 auto; min-height: 100vh;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 248, 240, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: calc(14px + env(safe-area-inset-top)) 18px 10px; display: flex; align-items: center; gap: 10px;
  border-bottom: var(--hairline);
}
.topbar .logo { width: 38px; height: 38px; border-radius: 12px; box-shadow: 0 2px 8px rgba(127, 203, 164, .35); }
.topbar .tt { font-size: 19px; font-weight: 800; letter-spacing: .5px; color: var(--mint-dark); flex: 1; }
.topbar .date { font-size: 12px; color: var(--mint-dark); background: var(--mint-bg); padding: 4px 10px; border-radius: 999px; font-weight: 600; }

/* ---------- 通用卡片/按钮 ---------- */
.view { padding: 16px 16px 24px; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: var(--hairline);
  padding: 20px; margin-bottom: 16px;
}
.btn {
  display: inline-block; border: none; border-radius: 14px;
  padding: 12px 20px; font-size: 15px; font-weight: 600;
  background: var(--mint); color: #fff; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 4px 12px rgba(127, 203, 164, .28);
  transition: transform .1s, opacity .2s;
}
.btn:active { transform: scale(.97); opacity: .9; }
.btn-coral { background: var(--coral); }
.btn-ghost { background: var(--mint-bg); color: var(--mint-dark); }
.btn-line { background: #fff; color: var(--ink2); border: 1.5px solid #e2ece6; }
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 15px 20px; font-size: 17px; border-radius: 14px; }
.btn:disabled { opacity: .5; }
.chip {
  display: inline-block; padding: 8px 14px; margin: 0 8px 8px 0;
  background: var(--mint-bg); color: var(--mint-dark);
  border-radius: 999px; font-size: 13px; border: none;
}
.muted { color: var(--ink2); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb8 { margin-bottom: 8px; }

/* ---------- 组件：标签/徽标/峰值卡 ---------- */
.sec-label { font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--ink2); margin: 6px 2px 10px; }
.ai-badge { width: 20px; height: 20px; border-radius: 6px; vertical-align: -4px; margin-right: 4px; box-shadow: 0 1px 4px rgba(79, 157, 120, .35); }
.ai-badge.lg { width: 34px; height: 34px; border-radius: 10px; vertical-align: middle; margin-right: 0; }
.card-ai-pending {
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--coral), #ffc1ad) border-box;
  box-shadow: 0 6px 20px rgba(255, 138, 101, .18);
}
.card-ai-pending .grow { font-size: 15px; font-weight: 600; }
.hero-card {
  background: linear-gradient(135deg, #7FCBA4, #4f9d78);
  border: none; color: #fff;
  box-shadow: 0 8px 24px rgba(79, 157, 120, .35);
}
.hero-card .dayline { color: rgba(255, 255, 255, .88); font-size: 13px; }
.hero-card .dayline b { color: #fff; font-size: 15px; }
.hero-num { font-size: 40px; font-weight: 800; letter-spacing: -1px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.hero-unit { font-size: 13px; font-weight: 600; opacity: .85; margin-left: 8px; letter-spacing: 1px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; color: var(--ink2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 2px solid #e8f0ea;
  border-radius: 12px; font-size: 16px; outline: none; background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--mint); }
.field textarea { min-height: 80px; resize: vertical; }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; padding: 10px; border-radius: 10px; border: 2px solid #e8f0ea;
  background: #fff; font-size: 15px; color: var(--ink2);
}
.seg button.on { border-color: var(--mint); background: var(--mint-bg); color: var(--mint-dark); font-weight: 600; }

/* ---------- 今日页 ---------- */
.dayline { font-size: 14px; color: var(--ink2); }
.dayline b { color: var(--coral-dark); }
.weight-card { display: flex; align-items: center; gap: 14px; }
.weight-card .num { font-size: 40px; font-weight: 800; letter-spacing: -1px; color: var(--mint-dark); font-variant-numeric: tabular-nums; }
.weight-card .unit { font-size: 14px; color: var(--ink2); }
.weight-input { display: flex; gap: 8px; margin-top: 10px; }
.weight-input input {
  flex: 1; padding: 10px 14px; border: 2px solid #e8f0ea; border-radius: 12px; font-size: 16px;
}
.weight-input .btn { padding: 10px 18px; white-space: nowrap; }

.task-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 14px;
}
.task-card .ico { font-size: 26px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--mint-bg); border-radius: 14px; }
.task-walk .ico { background: var(--mint-bg); }
.task-meal .ico { background: #fff3e6; }
.task-water .ico { background: #e9f4fb; }
.task-custom .ico { background: #f4effa; }
.task-card.done .ico { background: #d9f0e3; }
.task-card .info { flex: 1; }
.task-card .info .t1 { font-size: 16px; font-weight: 600; }
.task-card .info .t2 { font-size: 13px; color: var(--ink2); margin-top: 2px; }
.task-card.done { opacity: .72; }
.task-card.done .t1 { text-decoration: line-through; color: var(--ink2); }
.task-card .act .btn { padding: 9px 16px; font-size: 14px; }

.hungry-btn {
  display: block; width: 100%; padding: 16px; border: none; border-radius: 16px;
  background: linear-gradient(135deg, #FF8A65, #ff7043); color: #fff;
  font-size: 18px; font-weight: 700; box-shadow: 0 6px 18px rgba(255, 138, 101, .35);
}
.hungry-btn:active { transform: scale(.98); }

.banner-img { width: 100%; border-radius: 14px; display: block; }

/* ---------- AI 页 ---------- */
.chat-list { padding-bottom: 8px; }
.bubble-row { display: flex; margin-bottom: 12px; gap: 8px; }
.bubble-row.user { justify-content: flex-end; }
.bubble-row .avatar { width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); flex-shrink: 0; }
.bubble {
  max-width: 82%; padding: 12px 14px; border-radius: 16px;
  font-size: 15px; line-height: 1.65; white-space: pre-wrap; word-break: break-word;
}
.bubble.ai { background: #fff; border: var(--hairline); border-top-left-radius: 4px; box-shadow: var(--shadow-sm); }
.bubble.user { background: linear-gradient(135deg, #8fd4b0, #6db992); color: #fff; border-top-right-radius: 4px; }
.bubble .cursor { display: inline-block; width: 8px; height: 15px; background: var(--mint); animation: blink 1s infinite; vertical-align: -2px; }
@keyframes blink { 50% { opacity: 0; } }

.chat-input {
  position: fixed; left: 0; right: 0; z-index: 30;
  bottom: calc(48px + env(safe-area-inset-bottom));   /* JS 会按导航实测高度+播放条叠加覆写 */
  max-width: 520px; margin: 0 auto;
  display: flex; gap: 8px; padding: 10px 12px;
  background: rgba(255, 248, 240, .95); backdrop-filter: blur(8px);
  border-top: 1px solid rgba(127, 203, 164, .2);
}
.chat-input input {
  flex: 1; padding: 12px 14px; border: 2px solid #e8f0ea; border-radius: 999px; font-size: 15px; outline: none;
}
.chat-input input:focus { border-color: var(--mint); }
.chat-input .btn { border-radius: 999px; padding: 12px 18px; }

.eval-card { border: 2px solid var(--mint); }
.eval-card .stars { color: #f5a623; font-size: 18px; letter-spacing: 2px; }
.eval-card h4 { margin: 10px 0 6px; font-size: 14px; color: var(--mint-dark); }
.eval-card ul { padding-left: 20px; font-size: 14px; line-height: 1.7; }
.eval-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.eval-actions .btn { flex: 1; min-width: 110px; font-size: 14px; padding: 10px 8px; }
.src-list { font-size: 12px; color: var(--ink2); margin-top: 10px; border-top: 1px dashed #e2ece6; padding-top: 8px; }

/* ---------- 数据页 ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.stat-cell { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; text-align: center; }
.stat-cell .v { font-size: 26px; font-weight: 800; color: var(--mint-dark); }
.stat-cell .k { font-size: 13px; color: var(--ink2); margin-top: 4px; }
.chart-wrap { overflow-x: auto; }
.chart-wrap svg { display: block; }

/* ---------- 底部导航 ---------- */
#nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  max-width: 520px; margin: 0 auto;
  display: flex; background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: var(--hairline);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -6px 24px rgba(45, 90, 69, .08);
}
.nav-item {
  flex: 1; text-align: center; padding: 8px 0 6px;
  color: var(--ink2); font-size: 11px; text-decoration: none;
}
.nav-item .i { font-size: 21px; display: block; margin-bottom: 2px; }
.nav-item.on { color: var(--mint-dark); font-weight: 700; background: linear-gradient(180deg, rgba(127, 203, 164, .16), rgba(127, 203, 164, 0)); }
.nav-item.nav-ai .i {
  width: 46px; height: 46px; margin: -18px auto 2px;
  background: linear-gradient(135deg, var(--mint), var(--mint-dark));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 2.5px solid #fff;
  box-shadow: 0 6px 16px rgba(79, 157, 120, .45);
}
.nav-item.nav-ai .i img { width: 30px; height: 30px; border-radius: 50%; }

/* ---------- 播放器条 ---------- */
#player-bar {
  position: fixed; left: 0; right: 0; z-index: 35;
  bottom: calc(48px + env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto;
  display: none; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 8px 14px;
  border-top: var(--hairline); border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 18px rgba(45, 90, 69, .1);
}
#player-bar.show { display: flex; }
#player-bar img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--mint-bg); }
#player-bar .meta { flex: 1; min-width: 0; }
#player-bar .meta .t { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#player-bar .meta .a { font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#player-bar .ctl { background: none; border: none; font-size: 22px; padding: 4px 8px; color: var(--mint-dark); }

/* ---------- 音乐页 ---------- */
.song-row { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid #f2f6f3; }
.song-row .meta { flex: 1; min-width: 0; }
.song-row .t { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-row .a { font-size: 12px; color: var(--ink2); }
.song-row .op { border: none; background: var(--mint-bg); color: var(--mint-dark); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.song-row .op.playing { background: var(--coral); color: #fff; }
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 4px; }
.cat-tabs .chip { flex-shrink: 0; margin: 0; }
.cat-tabs .chip.on { background: var(--mint); color: #fff; }
.song-row { min-height: 52px; }
.song-row .op { min-width: 40px; min-height: 36px; border-radius: 10px; }
.rec-head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 10px; }
.rec-head b { font-size: 15px; color: var(--mint-dark); }
.rec-head .op { background: var(--mint-bg); color: var(--mint-dark); border: none; border-radius: 10px; padding: 8px 14px; font-size: 13px; min-height: 36px; }
.rec-reason { display: inline-block; color: var(--mint-dark); background: var(--mint-bg); border-radius: 6px; padding: 1px 7px; font-size: 11px; margin-left: 6px; }
.op-dis { background: #fdeee7; color: var(--coral-dark); min-width: 34px; min-height: 32px; font-size: 12px; }

/* ---------- Lucide 内联图标尺寸 ---------- */
.ic { width: 1em; height: 1em; vertical-align: -0.12em; }
.task-card .ico .ic { width: 26px; height: 26px; color: var(--mint-dark); }
.chip .ic { color: var(--mint-dark); }
.btn .ic { width: 17px; height: 17px; vertical-align: -3px; margin-right: 3px; }
.stat-cell .k .ic { width: 14px; height: 14px; vertical-align: -2px; color: var(--coral-dark); }

/* ---------- 推荐卡片（缩小版海报卡 + 均衡器动画） ---------- */
.rec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rec-card {
  background: #fff; border: var(--hairline); border-radius: 14px;
  padding: 8px; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .12s, box-shadow .2s;
}
.rec-card:active { transform: scale(.97); }
.rec-card.playing { border-color: var(--mint); box-shadow: 0 4px 14px rgba(127, 203, 164, .35); }
.rec-card .cv { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--mint-bg), #cfe9dc); }
.rec-card .cv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rec-card .cv.no-cov::after {
  content: '♪'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--mint-dark); opacity: .45;
}
.rec-card .cv.no-cov img { display: none; }
.rec-card .t { font-size: 12.5px; font-weight: 600; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-card .a { font-size: 11px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-card .rec-reason { margin: 4px 0 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-add, .cv-dis {
  position: absolute; bottom: 5px; width: 24px; height: 24px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .92); color: var(--mint-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .14);
}
.cv-add { right: 5px; }
.cv-dis { right: 33px; color: var(--coral-dark); }
.cv-add .ic, .cv-dis .ic { width: 13px; height: 13px; }
.cv-eq[hidden] { display: none; }
.cv-eq {
  position: absolute; left: 6px; bottom: 6px;
  display: flex; align-items: flex-end; gap: 2px; height: 20px;
  padding: 3px 5px; background: rgba(45, 59, 52, .55);
  border-radius: 6px; backdrop-filter: blur(4px);
}
.cv-eq i { width: 3px; height: 14px; background: #fff; border-radius: 2px; transform-origin: bottom; animation: eqb .9s ease-in-out infinite; }
.cv-eq i:nth-child(2) { animation-delay: .25s; }
.cv-eq i:nth-child(3) { animation-delay: .5s; }
@keyframes eqb { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }

/* ---------- 饿了页 ---------- */
.hungry-hero { width: 62%; margin: 8px auto 12px; display: block; }
.timer-big { font-size: 44px; font-weight: 800; color: var(--coral-dark); text-align: center; font-variant-numeric: tabular-nums; }
.food-list { font-size: 14px; line-height: 2; }
.food-list .ok::before { content: '✅ '; }
.food-list .no::before { content: '🚫 '; }

/* ---------- 走路页 ---------- */
.walk-screen { text-align: center; padding-top: 10px; }
.walk-timer { font-size: 56px; font-weight: 800; color: var(--mint-dark); font-variant-numeric: tabular-nums; }
.walk-enc { min-height: 44px; font-size: 15px; color: var(--ink2); margin: 12px 0; line-height: 1.6; }
.walk-song { background: var(--mint-bg); border-radius: 14px; padding: 12px; margin: 14px 0; }

/* ---------- 空状态 ---------- */
.empty-box { text-align: center; padding: 24px 10px; }
.empty-box img { width: 60%; max-width: 260px; }
.empty-box .txt { color: var(--ink2); font-size: 14px; margin-top: 10px; }

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(45, 59, 52, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: #fff; width: 100%; max-width: 520px;
  border-radius: 20px 20px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
  animation: up .25s ease;
}
@keyframes up { from { transform: translateY(40px); opacity: .5; } }
.modal h3 { margin-bottom: 14px; font-size: 17px; }
.modal .btn-row { display: flex; gap: 10px; margin-top: 16px; }
.modal .btn-row .btn { flex: 1; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(120px + env(safe-area-inset-bottom)); z-index: 200;
  background: rgba(45, 59, 52, .92); color: #fff;
  padding: 10px 20px; border-radius: 999px; font-size: 14px;
  opacity: 0; transition: opacity .25s; pointer-events: none; max-width: 84%;
}
#toast.show { opacity: 1; }

/* ---------- 里程碑 ---------- */
.ms-line { display: flex; align-items: center; overflow-x: auto; padding: 6px 0 2px; }
.ms-node { flex-shrink: 0; text-align: center; font-size: 12px; color: var(--ink2); width: 64px; position: relative; }
.ms-node .dot { width: 14px; height: 14px; border-radius: 50%; background: #dbe7df; margin: 0 auto 4px; border: 3px solid #fff; box-shadow: 0 0 0 1.5px #dbe7df; }
.ms-node.hit .dot { background: var(--mint); box-shadow: 0 0 0 1.5px var(--mint); }
.ms-node.hit { color: var(--mint-dark); font-weight: 700; }
.ms-link { flex-shrink: 0; height: 2px; width: 18px; background: #dbe7df; margin-bottom: 18px; }
.ms-link.hit { background: var(--mint); }

.hist-row { padding: 10px 4px; border-bottom: 1px solid #f2f6f3; font-size: 13px; }
.hist-row .d { color: var(--ink2); }

/* ---------- 图标尺寸补全（Lucide 全站统一） ---------- */
.nav-item .i .ic { width: 22px; height: 22px; }
.nav-item.on .i .ic { stroke-width: 2.4; }
#player-bar .ctl .ic { width: 20px; height: 20px; }
.hungry-btn .ic { width: 20px; height: 20px; vertical-align: -4px; margin-right: 6px; }
.walk-song .ic { width: 16px; height: 16px; vertical-align: -3px; color: var(--mint-dark); }
.modal h3 .ic { width: 19px; height: 19px; vertical-align: -3px; color: var(--mint-dark); margin-right: 4px; }
.chip .ic { width: 15px; height: 15px; vertical-align: -2.5px; margin-right: 2px; }
.stat-cell .k .ic { color: var(--mint-dark); }
.eval-card h4 .ic { width: 15px; height: 15px; vertical-align: -2px; margin-right: 3px; }
.eval-card h4.h-warn { color: var(--coral-dark); }
.eval-card h4.h-warn .ic { color: var(--coral-dark); }
.eval-card h4.h-good { color: var(--mint-dark); }
.eval-card h4.h-good .ic { color: var(--mint-dark); }
.src-list .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }

/* ---------- AI 页快捷入口：双列图标 chip ---------- */
#ai-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#ai-chips .chip {
  margin: 0; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 13px 10px; font-size: 13.5px; font-weight: 600;
  background: #fff; border: var(--hairline); box-shadow: var(--shadow-sm);
}

/* ---------- 计划页 hero ---------- */
.plan-hero { background: linear-gradient(160deg, #ffffff 30%, var(--mint-bg)); }
.plan-title { font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.plan-range { font-size: 12.5px; color: var(--ink2); margin-top: 3px; }
.plan-progress {
  height: 10px; border-radius: 999px; background: #e6efe9;
  margin: 16px 0 8px; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(45, 90, 69, .12);
}
.plan-progress .bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--mint-dark));
  box-shadow: 0 0 8px rgba(127, 203, 164, .6);
  transition: width .6s ease;
}
.plan-kg { display: flex; align-items: baseline; font-size: 13px; color: var(--ink2); }
.plan-kg b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.plan-kg .pct { margin-left: auto; font-size: 15px; font-weight: 800; color: var(--mint-dark); }
.plan-actions { display: flex; gap: 10px; }

/* 调整历史：时间线 */
.hist-row {
  position: relative; padding: 4px 4px 14px 20px; border-bottom: none; font-size: 13.5px;
}
.hist-row::before {
  content: ''; position: absolute; left: 4px; top: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 0 3px var(--mint-bg);
}
.hist-row::after {
  content: ''; position: absolute; left: 8px; top: 20px; bottom: -2px;
  width: 2px; background: var(--mint-bg);
}
.hist-row:last-child::after { display: none; }
.hist-row .d { display: block; margin-top: 2px; }

/* ---------- 我的页 ---------- */
.me-hero {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #ffffff 20%, var(--mint-bg));
}
.me-avatar {
  width: 56px; height: 56px; border-radius: 18px; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(127, 203, 164, .4), 0 0 0 3px #fff;
}
.me-name { font-size: 19px; font-weight: 800; letter-spacing: .3px; }
.me-bmi { text-align: center; flex-shrink: 0; }
.me-bmi b { font-size: 24px; font-weight: 800; color: var(--mint-dark); font-variant-numeric: tabular-nums; }
.me-bmi span { display: block; font-size: 11px; color: var(--ink2); margin-top: 2px; }
.me-list { padding: 6px 20px; }
.me-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 15px 0; background: none; border: none;
  border-bottom: 1px solid #f2f6f3;
  font-size: 15px; font-weight: 600; color: var(--ink); text-align: left;
}
.me-row:last-child { border-bottom: none; }
.me-row > .ic { width: 20px; height: 20px; color: var(--mint-dark); flex-shrink: 0; }
.me-row .chev { margin-left: auto; color: #c6d4cb; display: flex; }
.me-row .chev .ic { width: 18px; height: 18px; }
.me-row:active { opacity: .7; }

/* ---------- 生成插画接入 ---------- */
.plan-banner { width: 100%; display: block; border-radius: 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.ai-hero { text-align: center; padding: 6px 0 16px; }
.ai-hero img { width: 82%; max-width: 360px; border-radius: 20px; }
#player-bar .pb-close { color: var(--ink2); padding: 4px 6px; }
#player-bar .pb-close .ic { width: 16px; height: 16px; }
#player-bar .pb-close:active { color: var(--coral-dark); }

/* ---------- 任务管理/计划建议/命令回执 ---------- */
.sec-hint { font-size: 11px; font-weight: 400; letter-spacing: 0; color: #a8b8ae; margin-left: 6px; }
.chip-btn { cursor: pointer; }
.walk-live { color: var(--mint-dark); font-weight: 700; }
.walk-live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-right: 5px; animation: blink 1.2s infinite; }
.cmd-done { margin-top: 10px; padding: 8px 12px; background: var(--mint-bg); border-radius: 10px; font-size: 13px; color: var(--mint-dark); line-height: 1.7; }
.ai-sug { padding: 14px; margin-bottom: 10px; }
.task-card { user-select: none; -webkit-user-select: none; touch-action: manipulation; }

/* ---------- 骨架屏（切页秒开观感） ---------- */
.skel-wrap, .skel-grid { display: grid; gap: 14px; }
.skel-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.skel {
  border-radius: 14px;
  background: linear-gradient(90deg, #eef3ee 25%, #f7faf7 50%, #eef3ee 75%);
  background-size: 200% 100%;
  animation: sk 1.1s infinite linear;
}
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- 计划编辑器 ---------- */
.seg-sm button { padding: 6px 8px; font-size: 13px; border-radius: 8px; }
.pn-row { display: flex; gap: 10px; padding: 12px; border: var(--hairline); border-radius: 14px; margin-bottom: 10px; background: #fff; }
.pn-ico { width: 38px; height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--mint-bg); border-radius: 10px; color: var(--mint-dark); }
.pn-ico .ic { width: 20px; height: 20px; }
.pn-num { width: 64px; padding: 8px 6px; border: 2px solid #e8f0ea; border-radius: 10px; font-size: 14px; text-align: center; }
.pn-txt { padding: 8px 10px; border: 2px solid #e8f0ea; border-radius: 10px; font-size: 14px; min-width: 0; }
.pn-every { padding: 8px 4px; border: 2px solid #e8f0ea; border-radius: 10px; font-size: 13px; background: #fff; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink); margin: 12px 0; }
.chk input { width: 18px; height: 18px; accent-color: var(--mint-dark); }
.freq-chip { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: #fff3e6; color: var(--coral-dark); font-size: 11px; font-weight: 600; vertical-align: 2px; }

/* ---------- 滚动歌词 ---------- */
#pb-cover { cursor: pointer; }
#lrc-panel {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column;
  max-width: 520px; margin: 0 auto;
}
#lrc-panel .lrc-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: blur(28px) brightness(.55) saturate(1.1); transform: scale(1.2);
}
#lrc-panel .lrc-head {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: calc(16px + env(safe-area-inset-top)) 16px 10px; color: #fff;
}
#lrc-panel .lrc-head img { width: 44px; height: 44px; border-radius: 10px; }
#lrc-panel .lrc-head .t { font-size: 15px; font-weight: 700; }
#lrc-panel .lrc-head .a { font-size: 12px; opacity: .8; }
#lrc-panel .lrc-x { margin-left: auto; background: rgba(255,255,255,.18); border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
#lrc-panel .lrc-x .ic { width: 16px; height: 16px; }
#lrc-panel .lrc-list {
  position: relative; flex: 1; overflow-y: auto; padding: 30vh 24px 40vh;
  text-align: center; color: rgba(255,255,255,.62);
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}
.lrc-line { font-size: 15px; line-height: 2.4; transition: all .25s; }
.lrc-line.on { color: #fff; font-size: 19px; font-weight: 800; text-shadow: 0 2px 12px rgba(0,0,0,.4); }

/* ---------- 语音按钮 / 聊天歌单 / 交互卡 / 计划记录 ---------- */
.voice-btn {
  width: 44px; height: 44px; flex-shrink: 0; border: none; border-radius: 50%;
  background: var(--mint-bg); color: var(--mint-dark);
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s, background .2s;
}
.voice-btn .ic { width: 20px; height: 20px; }
.voice-btn.rec { background: var(--coral); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.chat-songs { margin-top: 10px; border-top: 1px dashed #e2ece6; padding-top: 8px; }
.chat-song { padding: 8px 10px; border-radius: 10px; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.chat-song:active { background: var(--mint-bg); }
.chat-song .ic { width: 15px; height: 15px; color: var(--mint-dark); flex-shrink: 0; }
.ui-card { margin-top: 12px; padding: 14px; border: 2px solid var(--mint); border-radius: 14px; background: #fff; }
.ui-title { font-size: 14px; font-weight: 700; color: var(--mint-dark); margin-bottom: 8px; }
.ui-card .field { margin-bottom: 10px; }
.ui-card .field label { font-size: 12.5px; }
.ui-card .field input { padding: 9px 12px; font-size: 15px; }
.plan-rec { padding: 12px 0; border-bottom: 1px dashed #e2ece6; }
.plan-rec:last-child { border-bottom: none; }
.epitaph { margin-top: 8px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.7; }
.epitaph.praise { background: var(--mint-bg); color: var(--mint-dark); }
.epitaph.roast { background: #fff3e6; color: var(--coral-dark); }
.pn-row .row { flex-wrap: wrap; }
.pn-row [data-del] { flex-shrink: 0; margin-left: auto; }

/* ---------- 编辑器删除按钮美化 / 起始体重展示 / 日期选择 ---------- */
.pn-del {
  background: none; border: none; color: #b9c8bf;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.pn-del:active { background: #fdeee7; color: var(--coral-dark); }
.pn-del .ic { width: 17px; height: 17px; }
.pn-startkg {
  padding: 11px 14px; background: var(--mint-bg); border-radius: 12px;
  font-size: 14px; color: var(--mint-dark); margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px;
}
.pn-startkg b { font-size: 17px; }
.pn-startkg .ic { width: 16px; height: 16px; }
#pn-date {
  width: 100%; padding: 12px 14px; border: 2px solid #e8f0ea;
  border-radius: 12px; font-size: 16px; background: #fff; color: var(--ink);
  font-family: inherit;
}

/* ---------- 播放条可拖拽 ---------- */
#player-bar { touch-action: none; }
#player-bar::before {
  content: ''; position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 4px; border-radius: 2px; background: rgba(45, 90, 69, .16);
}
#player-bar .meta { cursor: grab; }
#player-bar .meta:active { cursor: grabbing; }

/* ---------- 饿了全局倒计时条 ---------- */
#hunger-bar {
  position: fixed; left: 0; right: 0; z-index: 45;
  max-width: 520px; margin: 0 auto;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  display: none; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  background: rgba(255, 138, 101, .96); color: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 18px rgba(255, 138, 101, .35);
  backdrop-filter: blur(10px);
}
#hunger-bar.show { display: flex; }
#hunger-bar .hb-t { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
#hunger-bar .hb-tip { flex: 1; min-width: 0; font-size: 12.5px; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hunger-bar .hb-act { font-size: 12px; background: rgba(255, 255, 255, .22); padding: 3px 10px; border-radius: 999px; flex-shrink: 0; }
.hg-tip {
  margin: 10px auto 0; max-width: 340px; text-align: left;
  font-size: 15px; line-height: 1.7; color: var(--ink);
  background: var(--mint-bg); padding: 12px 14px; border-radius: 14px;
}
.hg-tip .ic { color: var(--coral-dark); vertical-align: -3px; margin-right: 4px; }
.timer-unit { font-size: 16px; font-weight: 600; color: var(--ink2); margin-left: 4px; }

/* ---------- 聊天附件 ---------- */
.att-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 12px 0; max-width: 520px; margin: 0 auto; }
.att-chip { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-chip b { margin-left: 6px; cursor: pointer; color: var(--coral-dark); font-weight: 400; }
.att-chip .ic { width: 12px; height: 12px; vertical-align: -1px; }

/* ---------- 思考深度下拉 ---------- */
.think-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 2px 10px; font-size: 13px; color: var(--ink2);
}
.think-row > .ic { width: 15px; height: 15px; color: var(--mint-dark); }
.think-row select {
  padding: 7px 10px; border: 2px solid #e8f0ea; border-radius: 10px;
  background: #fff; font-size: 13px; color: var(--ink); font-family: inherit;
}
.think-row .muted { font-size: 11.5px; }

/* ---------- 思考深度胶囊 + 浮层 ---------- */
.think-wrap {
  display: flex; justify-content: flex-end;
  padding: 0 14px; margin-bottom: 84px;
  position: relative; z-index: 46;
}
.think-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 999px; border: var(--hairline);
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  color: var(--ink2); font-size: 12px; font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.think-pill .ic { width: 13px; height: 13px; color: var(--mint-dark); }
.think-pill b { color: var(--mint-dark); font-weight: 700; }
.think-pop {
  position: absolute; right: 0; bottom: calc(100% + 8px);
  background: #fff; border: var(--hairline); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(45, 90, 69, .16);
  padding: 10px; width: 232px;
}
.think-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.think-opt {
  padding: 6px 12px; border-radius: 999px; border: 1.5px solid #e2ece6;
  background: #fff; color: var(--ink2); font-size: 12.5px; font-weight: 600;
}
.think-opt.on { background: var(--mint); border-color: var(--mint); color: #fff; }
.think-pop .muted { margin-top: 8px; font-size: 11px; line-height: 1.5; }

/* ---------- 输入栏重排 ---------- */
.chat-input { gap: 8px; padding: 8px 10px; }
.chat-input #ai-input {
  flex: 1; min-width: 0; border: 1.5px solid #e2ece6; border-radius: 999px;
  padding: 11px 16px; font-size: 15px; background: #fff; outline: none;
}
.chat-input #ai-input:focus { border-color: var(--mint); }
.btn-send {
  width: 44px; height: 44px; flex-shrink: 0; border: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--mint-dark));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 12px rgba(127, 203, 164, .4);
}
.btn-send .ic { width: 18px; height: 18px; margin-left: 2px; }
.btn-send:active { transform: scale(.95); }
