/* ===== 设计令牌 ===== */
:root {
  --bg: #F7F7F4;
  --ink: #14231D;
  --deep: #12463A;
  --green: #1A6B52;
  --lime: #B8E986;
  --card: #FFFFFF;
  --line: rgba(18, 40, 32, .08);
  --sub: #7A857D;
  --warn: #E8A13C;
  --danger: #C0392B;
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ===== reset ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
button, input, textarea { font-family: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }

/* ===== 手机壳 ===== */
.shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
/* 宽屏(桌面浏览器):仿设计稿手机边框——深色页面底 + 应用列两侧清晰边缘,
   让头部卡片、待办区、底部标签栏统一在同一个「机身」内,不再割裂 */
@media (min-width: 520px) {
  body { background: #10201A; }
  .shell, .auth-page {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 80px rgba(0, 0, 0, .55);
  }
  .tabbar { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
}
.screen { padding: 18px 16px 24px; animation: fadeUp .4s cubic-bezier(.2, .8, .2, 1) both; }
.placeholder {
  padding: 70px 20px;
  text-align: center;
  color: var(--sub);
  font-size: 14px;
  font-weight: 600;
}

/* ===== 卡片 / 按钮 / 标签 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 4px 14px rgba(18, 40, 32, .05);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  font-size: 14.5px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  background: var(--card);
  color: var(--ink);
  transition: transform .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--deep), var(--green));
  color: #fff;
  box-shadow: 0 10px 24px rgba(18, 70, 58, .25);
}
.btn-lime {
  background: linear-gradient(135deg, var(--lime), #7FD16A);
  color: #0E2E22;
  box-shadow: 0 12px 26px rgba(127, 209, 106, .32);
  position: relative;
  overflow: hidden;
}
.btn-block { width: 100%; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(18, 40, 32, .06);
  color: var(--sub);
}

/* ===== 通用表单字段(icon + input) ===== */
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--field-bg, var(--card));
  border: 1px solid var(--field-border, var(--line));
  border-radius: 15px;
  padding: 0 14px;
  height: 50px;
}
.field .field-icon { color: var(--field-icon, var(--sub)); display: inline-flex; flex: none; }
.field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--field-color, var(--ink));
}
.field input::placeholder { color: var(--field-icon, var(--sub)); opacity: .8; }
.field .field-hint {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--field-icon, var(--sub));
  white-space: nowrap;
  cursor: pointer;
}

/* ===== 底部 tabbar(5 项固定) ===== */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 430px;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 8px 4px calc(6px + env(safe-area-inset-bottom));
  z-index: 40;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  color: var(--sub);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.tab-item.active { color: var(--deep); }

/* ===== toast(顶部滑入) ===== */
.toast {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--deep);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  max-width: 86%;
  text-align: center;
  z-index: 80;
  box-shadow: 0 10px 24px rgba(18, 40, 32, .3);
  animation: toastIn .3s cubic-bezier(.34, 1.5, .5, 1);
}

/* ===== sheet(底部弹层 + 遮罩) ===== */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 16, .45);
  z-index: 50;
  animation: fadeIn .25s ease both;
}
.sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 14px 20px calc(22px + env(safe-area-inset-bottom));
  max-height: 82%;
  overflow-y: auto;
  z-index: 51;
  animation: sheetUp .42s cubic-bezier(.32, .85, .25, 1);
}

/* ===== 打卡 sheet 内容 ===== */
.sheet-handle { width: 38px; height: 5px; border-radius: 3px; background: #DDE3DC; margin: 0 auto 16px; }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head-icon {
  width: 44px; height: 44px; border-radius: 15px; flex: none;
  background: #E4F3E9; color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.sheet-head-info { flex: 1; min-width: 0; }
.sheet-head-title { font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.sheet-head-window { font-size: 12px; font-weight: 700; color: var(--sub); margin-top: 2px; }
.sheet-head-close {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: #F3F5F1; color: var(--sub);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.sheet-section-label { margin-top: 16px; font-size: 12.5px; font-weight: 800; color: var(--sub); }
.sheet-items { margin-top: 8px; }
.sheet-item-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #F1F3EF; }
.sheet-item-row:first-child { border-top: none; }
.sheet-item-label { flex: 1; font-size: 14px; font-weight: 700; color: #33443C; }
.sheet-item-input {
  display: flex; align-items: center; gap: 8px;
  background: #F3F5F1; border-radius: 13px; padding: 5px 5px 5px 12px;
  box-shadow: inset 0 2px 4px rgba(18, 40, 32, .06);
}
.sheet-item-input input {
  width: 52px; border: none; background: transparent; outline: none;
  font-size: 16px; font-weight: 800; color: var(--ink); text-align: right;
  font-variant-numeric: tabular-nums;
}
.sheet-item-unit { font-size: 12px; font-weight: 800; color: var(--sub); padding-right: 6px; }
.sheet-supp {
  margin-top: 10px; font-size: 12px; font-weight: 700; color: #9A6A12;
  background: #FFF6E8; border-radius: 12px; padding: 8px 12px;
}
.sheet-photo-actions { display: flex; gap: 10px; margin-top: 16px; }
.sheet-photo-btn {
  flex: 1; aspect-ratio: 1.5; border-radius: 20px;
  background: #F6F8F4; border: 1.5px dashed #CBD5CB;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; font-weight: 800; color: var(--sub); cursor: pointer;
}
.sheet-photo-btn svg { color: var(--green); }
.sheet-photo-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.sheet-photo-thumb {
  position: relative; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: #F3F5F1;
}
.sheet-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sheet-photo-remove {
  position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.sheet-missed-warn {
  margin-top: 14px; display: flex; align-items: center; gap: 9px;
  background: #FFF6E8; border: 1px dashed #E9C98A; border-radius: 15px; padding: 11px 13px;
  font-size: 12px; font-weight: 700; color: #8A6A22;
}
.sheet-cta { margin-top: 16px; height: 56px; border-radius: 19px; font-size: 17px; }
.sheet-cta.disabled { opacity: .45; pointer-events: none; }

/* ===== modal(居中弹窗) ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(6, 26, 20, .5);
  z-index: 55;
  animation: fadeIn .25s ease both;
}
.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 56;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  pointer-events: none;
}
.modal {
  pointer-events: auto;
  width: min(86%, 360px);
  border-radius: 26px;
  background: #fff;
  padding: 24px;
  animation: popIn .42s cubic-bezier(.34, 1.4, .5, 1);
}

/* ===== 激励弹窗 ===== */
.celebrate-modal {
  position: relative;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(18, 70, 58, .97), rgba(8, 26, 21, .98));
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 30px 60px rgba(6, 26, 20, .5);
  color: #fff;
  padding: 30px 24px 24px;
}
.celebrate-badge {
  width: 92px; height: 92px; margin: 0 auto; border-radius: 50%;
  background: linear-gradient(140deg, var(--lime), #59B36F);
  color: #0E2E22;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 34px rgba(89, 179, 111, .5);
}
.celebrate-title { font-size: 23px; font-weight: 800; margin-top: 18px; letter-spacing: -.5px; }
.celebrate-body { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .78); margin-top: 8px; line-height: 1.6; }
.celebrate-stats { display: flex; gap: 9px; margin-top: 20px; }
.celebrate-stat {
  flex: 1; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 16px; padding: 11px 8px;
}
.celebrate-stat-v { font-size: 18px; font-weight: 800; color: var(--lime); font-variant-numeric: tabular-nums; }
.celebrate-stat-t { font-size: 10.5px; font-weight: 700; color: rgba(255, 255, 255, .7); margin-top: 2px; }
.celebrate-cta {
  margin-top: 20px; height: 52px; border-radius: 18px;
  background: #fff; color: var(--deep); font-size: 16px; font-weight: 800;
}

/* ===== 关键帧 ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes popIn { 0% { transform: scale(.5); opacity: 0; } 62% { transform: scale(1.09); } 100% { transform: scale(1); opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes sweep { 0% { transform: translateX(-130%); } 100% { transform: translateX(240%); } }

/* ===== 今日页 ===== */
.today-page { animation: fadeUp .4s cubic-bezier(.2, .8, .2, 1) both; }
.today-hero {
  position: relative;
  padding: 22px 18px 24px;
  color: #fff;
  border-radius: 0 0 32px 32px;
  background: linear-gradient(150deg, #0A2C23, #12463A);
  overflow: hidden;
}

/* ===== 随机头图背景(今日 / 我的 / 登录) ===== */
.hero-bg-img {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}
.hero-bg-shade {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(6, 26, 20, .62) 0%, rgba(6, 26, 20, .30) 38%, rgba(6, 26, 20, .38) 62%, rgba(6, 26, 20, .72) 100%);
}
.today-hero-top, .me-hero-top, .me-stats { position: relative; }
.today-hero-top { display: flex; align-items: flex-start; gap: 12px; }
.today-hero-top > div:first-child { flex: 1; min-width: 0; }
.today-site-name { font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .6); }
.today-day-badge { font-size: 11.5px; font-weight: 800; letter-spacing: 2px; color: var(--lime); margin-top: 4px; }
.today-greeting { font-size: 25px; font-weight: 800; letter-spacing: -.5px; margin-top: 5px; line-height: 1.25; }
.today-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, .14); border: 1.5px solid rgba(255, 255, 255, .26);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800;
}
.today-next-card {
  position: relative; margin-top: 18px; border-radius: 26px; padding: 18px;
  background: rgba(255, 255, 255, .13); backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 18px 40px rgba(6, 26, 20, .32);
}
.today-next-done { text-align: center; padding: 30px 18px; }
.today-next-check {
  width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%;
  background: rgba(184, 233, 134, .22); color: var(--lime);
  display: flex; align-items: center; justify-content: center;
}
.today-next-done-title { font-size: 19px; font-weight: 800; }
.today-next-done-sub { font-size: 12.5px; font-weight: 700; color: rgba(255, 255, 255, .68); margin-top: 6px; }
.today-next-head { display: flex; align-items: center; gap: 12px; }
.today-next-icon {
  width: 46px; height: 46px; border-radius: 16px; flex: none;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22);
  display: flex; align-items: center; justify-content: center; color: var(--lime);
}
.today-next-info { flex: 1; min-width: 0; }
.today-next-label { font-size: 11.5px; font-weight: 800; letter-spacing: 1.2px; color: rgba(255, 255, 255, .62); }
.today-next-sum { font-size: 15px; font-weight: 700; margin-top: 3px; line-height: 1.4; }
.today-next-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 16px; }
.today-next-cd { flex: 1; }
.today-next-cd-label { font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; color: rgba(255, 255, 255, .55); }
.today-next-cd-val { font-size: 34px; font-weight: 800; letter-spacing: -1.4px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.today-ring { position: relative; width: 52px; height: 52px; flex: none; margin-bottom: 2px; }
.today-ring-val {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums;
}
.today-next-cta { height: 56px; margin-top: 16px; border-radius: 20px; font-size: 17px; position: relative; overflow: hidden; }
.cta-sweep {
  position: absolute; top: 0; bottom: 0; width: 70px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: sweep 2.8s ease-in-out infinite;
}
.today-body { padding: 20px 16px 30px; }

.today-done-card { margin-bottom: 14px; padding: 0; overflow: hidden; }
.today-done-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; }
.today-done-badge {
  width: 26px; height: 26px; border-radius: 9px; background: #E4F3E9; color: #2E8B57;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.today-done-title { flex: 1; font-size: 14.5px; font-weight: 800; }
.today-done-caret { display: inline-flex; color: #A6B0A9; transition: transform .25s; }
.today-done-caret.open { transform: rotate(90deg); }
.today-done-list { padding: 0 16px 12px; animation: fadeIn .25s ease; }
.today-done-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #F1F3EF; }
.today-done-icon {
  width: 36px; height: 36px; border-radius: 11px; background: #F3F5F1; color: var(--sub);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.today-done-info { flex: 1; min-width: 0; }
.today-done-name { font-size: 13.5px; font-weight: 800; }
.today-done-time { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--sub); margin-top: 1px; }
.today-done-edit {
  font-size: 12.5px; font-weight: 800; color: var(--green); background: #E8F3EC;
  padding: 6px 11px; border-radius: 10px; cursor: pointer; white-space: nowrap; flex: none;
}

.today-section-head { display: flex; align-items: baseline; gap: 8px; margin: 2px 4px 12px; }
.today-section-head span { font-size: 17px; font-weight: 800; letter-spacing: -.4px; }

.today-pending-card { margin-bottom: 11px; cursor: pointer; }
.today-pending-head { display: flex; align-items: center; gap: 11px; }
.today-pending-icon {
  width: 38px; height: 38px; border-radius: 13px; flex: none; background: #F3F5F1; color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.today-pending-info { flex: 1; min-width: 0; }
.today-pending-name { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.today-pending-window { font-size: 11.5px; font-weight: 700; color: var(--sub); margin-top: 3px; }
.today-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.chip-warn { background: #FFF3DC; color: #9A6A12; }
.today-missed-bar {
  margin-top: 11px; display: flex; align-items: center; gap: 8px;
  background: #FFF6E8; border: 1px dashed #E9C98A; border-radius: 14px; padding: 9px 12px;
  color: #8A6A22; font-size: 12px; font-weight: 700; cursor: pointer;
}
.today-missed-text { flex: 1; }

.today-weight-card {
  margin-top: 4px; border-radius: 22px; padding: 15px 16px; display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, rgba(184, 233, 134, .16), rgba(26, 107, 82, .08));
  border: 1px solid var(--line); cursor: pointer;
}
.today-weight-icon {
  width: 38px; height: 38px; border-radius: 13px; background: #E4F3E9; color: var(--green); flex: none;
  display: flex; align-items: center; justify-content: center;
}
.today-weight-info { flex: 1; }
.today-weight-title { font-size: 15px; font-weight: 800; }
.today-weight-sub { font-size: 12.5px; font-weight: 700; color: var(--sub); margin-top: 2px; }

/* ===== 登录注册屏 ===== */
.auth-page {
  position: relative;
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.auth-hero {
  position: absolute;
  left: 0; right: 0; top: 0;
  background: linear-gradient(150deg, #0A2C23, #12463A);
  overflow: hidden;
}
.auth-overlay { position: absolute; inset: 0; }
.auth-head { position: relative; padding: 70px 26px 0; }
.auth-logo {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--lime);
}
.auth-title { font-size: 26px; font-weight: 800; letter-spacing: -.6px; margin-top: 16px; line-height: 1.3; color: #fff; }
.auth-sub { font-size: 13px; font-weight: 700; margin-top: 8px; }
.auth-style-row { display: flex; gap: 6px; margin-top: 14px; }
.auth-fill { flex: 1; }
.auth-card {
  position: relative;
  padding: 20px;
  backdrop-filter: blur(24px);
}
.auth-tabs { display: flex; border-radius: 14px; padding: 3px; }
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all .22s;
}
.auth-fields { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.auth-invite-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
  font-size: 11.5px;
  font-weight: 700;
}
.auth-cta { margin-top: 16px; height: 54px; width: 100%; border-radius: 18px; font-size: 16.5px; }
.auth-cta .sweep {
  position: absolute; top: 0; bottom: 0; width: 70px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: sweep 2.8s ease-in-out infinite;
}
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.auth-divider .line { flex: 1; height: 1px; }
.auth-divider span { font-size: 11.5px; font-weight: 700; }
.auth-oauth {
  height: 52px;
  border-radius: 17px;
  background: #fff;
  border: 1px solid #E3E6E1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  color: #1F2A26;
  cursor: pointer;
  margin-top: 8px;
}
.auth-foot { text-align: center; margin-top: 14px; font-size: 11.5px; font-weight: 700; line-height: 1.6; }

/* ===== 通用二级屏标题 ===== */
.screen-head { margin: 0 4px 18px; }
.screen-title { font-size: 27px; font-weight: 800; letter-spacing: -.7px; margin: 0 0 4px; }
.screen-sub { font-size: 13px; font-weight: 700; color: var(--sub); }

/* ===== 体重页 ===== */
.weight-page { padding-bottom: 6px; }
.weight-hero { padding: 20px; }
.weight-hero-top { display: flex; align-items: flex-end; gap: 6px; }
.weight-hero-num { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.weight-hero-unit { font-size: 14px; font-weight: 800; color: var(--sub); padding-bottom: 6px; }
.weight-hero-fill { flex: 1; }
.weight-hero-badge {
  background: rgba(184, 233, 134, .32); color: #3E7A2E;
  font-size: 12.5px; font-weight: 800; padding: 6px 11px; border-radius: 10px;
  margin-bottom: 5px; white-space: nowrap;
}
.weight-chart { width: 100%; height: 130px; margin-top: 14px; display: block; }
.weight-chart-empty {
  height: 130px; margin-top: 14px; border-radius: 16px; background: #F6F8F4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--sub); font-size: 12.5px; font-weight: 700;
}

.weight-record-card { margin-top: 14px; }
.weight-record-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13.5px; font-weight: 800; color: #5D6C64; }
.weight-record-head svg { color: var(--green); }
.weight-stepper { display: flex; align-items: center; gap: 14px; }
.weight-step-btn {
  width: 48px; height: 48px; border-radius: 16px; background: #F3F5F1;
  box-shadow: inset 0 2px 5px rgba(18, 40, 32, .07);
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--green);
  transition: transform .15s;
}
.weight-step-btn:active { transform: scale(.92); }
.weight-step-val { flex: 1; text-align: center; font-size: 36px; font-weight: 800; letter-spacing: -1.2px; font-variant-numeric: tabular-nums; }
.weight-save-cta { margin-top: 16px; height: 52px; border-radius: 18px; font-size: 16px; }
.weight-save-cta-off { background: #F3F5F1; color: #9AA79F; box-shadow: none; pointer-events: none; }

.weight-stats { display: flex; gap: 10px; margin-top: 14px; }
.weight-stat-card { flex: 1; padding: 14px; }
.weight-stat-icon { color: var(--sub); display: inline-flex; }
.weight-stat-t { font-size: 11px; font-weight: 800; color: var(--sub); margin-top: 5px; }
.weight-stat-v { font-size: 21px; font-weight: 800; letter-spacing: -.6px; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ===== 记录页(日历/详情/勋章) ===== */
.cal-page { padding-bottom: 6px; }
.cal-streak-card {
  position: relative; overflow: hidden; padding: 18px 20px; color: #fff;
  background: linear-gradient(140deg, #1B2A24, #2C4A3B);
  box-shadow: 0 12px 28px rgba(18, 40, 32, .2);
}
.cal-streak-decor {
  position: absolute; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 164, 60, .35), transparent 70%);
  top: -50px; right: -30px;
}
.cal-streak-row { position: relative; display: flex; align-items: center; gap: 14px; }
.cal-streak-flame { color: #FFA43C; display: inline-flex; flex: none; }
.cal-streak-info { flex: 1; min-width: 0; }
.cal-streak-num { font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.cal-streak-sub { font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .62); margin-top: 3px; }
.cal-streak-bar { position: relative; margin-top: 14px; height: 8px; border-radius: 5px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.cal-streak-bar-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, #FFA43C, #B8E986); }

.cal-stats { display: flex; gap: 9px; margin-top: 12px; }
.cal-stat-card { flex: 1; padding: 13px; }
.cal-stat-icon { display: inline-flex; color: var(--sub); }
.cal-stat-v { font-size: 19px; font-weight: 800; margin-top: 5px; font-variant-numeric: tabular-nums; }
.cal-stat-t { font-size: 10.5px; font-weight: 700; color: var(--sub); margin-top: 1px; }

.cal-month-card { padding: 18px 14px 16px; margin-top: 12px; }
.cal-month-head { display: flex; align-items: center; padding: 0 4px 12px; }
.cal-month-title { flex: 1; font-size: 15px; font-weight: 800; }
.cal-month-nav { display: inline-flex; align-items: center; color: var(--green); padding: 0 8px; cursor: pointer; }
.cal-month-nav-left { transform: rotate(180deg); color: var(--sub); }
.cal-weekday-row {
  display: grid; grid-template-columns: repeat(7, 1fr); text-align: center;
  font-size: 11px; font-weight: 800; color: #A6B0A9; margin-bottom: 8px;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-cell {
  aspect-ratio: 1; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: #F4F6F2; color: #8A968F;
}
.cal-cell-blank { background: transparent; }
.cal-cell-full { background: var(--green); color: #fff; cursor: pointer; }
.cal-cell-partial { background: var(--warn); color: #fff; cursor: pointer; }
.cal-cell-none { background: #F4F6F2; color: #8A968F; cursor: pointer; }
.cal-cell-future { background: #F9FAF8; color: #C3CCC5; border: 1px dashed #E3E8E2; }
.cal-cell-selected { box-shadow: 0 0 0 2px var(--deep) inset; }

.cal-detail-card { margin-top: 20px; }
.cal-detail-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.cal-detail-date { font-size: 16px; font-weight: 800; }
.chip-full { background: #EAF7DC; color: #3E7A2E; }
.cal-detail-fill { flex: 1; }
.cal-amend-btn { font-size: 12px; font-weight: 800; color: var(--sub); cursor: pointer; white-space: nowrap; }

.cal-record-list { margin-top: 12px; }
.cal-record-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #F1F3EF; }
.cal-record-row:first-child { border-top: none; }
.cal-record-icon {
  width: 32px; height: 32px; border-radius: 11px; background: #F3F5F1; color: var(--sub);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.cal-record-info { flex: 1; min-width: 0; }
.cal-record-name { font-size: 13.5px; font-weight: 800; }
.cal-record-time { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--sub); margin-top: 1px; }
.cal-record-empty { font-size: 12.5px; font-weight: 700; color: var(--sub); padding: 12px 0; text-align: center; }

.cal-photo-grid { display: flex; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.cal-photo-thumb { flex: 1; min-width: 60px; aspect-ratio: .85; border-radius: 14px; overflow: hidden; background: #F3F5F1; }
.cal-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cal-weight-row {
  display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid #F1F3EF; font-size: 13px; font-weight: 700; color: var(--sub);
}
.cal-weight-row svg { color: var(--green); }
.cal-weight-val { margin-left: auto; font-weight: 800; color: var(--ink); }

.cal-section-label { margin: 20px 4px 10px; font-size: 13px; font-weight: 800; color: var(--sub); }
.cal-badges { display: flex; gap: 9px; }
.cal-badge {
  flex: 1; aspect-ratio: .95; border-radius: 20px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 8px;
}
.cal-badge-on { background: #FFF6E2; border: 1px solid #F2E0B4; color: #E0A32B; }
.cal-badge-on span { color: #8A6A22; font-size: 10px; font-weight: 800; line-height: 1.3; }
.cal-badge-off { background: #F4F6F2; border: 1px dashed #D6DDD6; color: #B4BEB7; }
.cal-badge-off span { color: #A6B0A9; font-size: 10px; font-weight: 800; line-height: 1.3; }

/* ===== 食谱页 ===== */
.plan-page { padding-bottom: 6px; }
.plan-tabs { display: flex; background: #EDEFEA; border-radius: 15px; padding: 3px; margin-bottom: 16px; }
.plan-tab { flex: 1; text-align: center; padding: 9px 0; border-radius: 12px; font-size: 13.5px; font-weight: 800; cursor: pointer; transition: all .22s; color: var(--sub); }
.plan-tab-active { background: #fff; color: var(--deep); box-shadow: 0 4px 10px rgba(18, 40, 32, .12); }

.plan-rule-card { display: flex; gap: 13px; align-items: flex-start; padding: 15px 16px; margin-bottom: 10px; }
.plan-rule-num {
  width: 28px; height: 28px; border-radius: 10px; background: var(--deep); color: var(--lime);
  font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none;
}
.plan-rule-text { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.6; color: #33443C; }

.plan-water-card {
  position: relative; border-radius: 24px; overflow: hidden; margin-top: 4px; padding: 20px; color: #fff;
  background: linear-gradient(150deg, #0A2C23, #12463A);
}
.plan-water-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; }
.plan-water-title svg { color: var(--lime); }
.plan-water-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.plan-water-chip {
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .22); padding: 9px 15px;
  border-radius: 12px; font-size: 13.5px; font-weight: 700; white-space: nowrap;
}

.plan-calc-card { padding: 18px; }
.plan-calc-title { font-size: 15px; font-weight: 800; }
.plan-calc-input-row {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; background: #F3F5F1; border-radius: 16px;
  padding: 6px 6px 6px 16px; box-shadow: inset 0 2px 5px rgba(18, 40, 32, .06);
}
.plan-calc-input {
  flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  font-size: 26px; font-weight: 800; letter-spacing: -.8px; color: var(--ink); font-variant-numeric: tabular-nums;
}
.plan-calc-unit { font-size: 14px; font-weight: 800; color: var(--sub); }
.plan-calc-chips { display: flex; gap: 5px; }
.plan-calc-chip { padding: 9px 11px; border-radius: 12px; background: #fff; font-size: 12.5px; font-weight: 800; cursor: pointer; white-space: nowrap; color: var(--green); }
.plan-calc-chip-active { background: var(--green); color: #fff; }
.plan-calc-rows { margin-top: 16px; }
.plan-calc-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #F1F3EF; }
.plan-calc-row:first-child { border-top: none; }
.plan-calc-row-icon {
  width: 30px; height: 30px; border-radius: 10px; background: #F3F5F1; display: flex; align-items: center;
  justify-content: center; flex: none; color: #5D6C64;
}
.plan-calc-row-name { flex: 1; font-size: 14px; font-weight: 700; color: #33443C; }
.plan-calc-row-val { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-calc-note { margin-top: 12px; background: #F6F8F4; border-radius: 14px; padding: 11px 13px; font-size: 12px; font-weight: 700; color: #7C8B83; line-height: 1.6; }

.plan-ban-card { padding: 18px; margin-bottom: 12px; }
.plan-ban-head { display: flex; align-items: center; gap: 10px; }
.plan-ban-icon {
  width: 30px; height: 30px; border-radius: 11px; background: #FFECE8; display: flex; align-items: center;
  justify-content: center; color: #E2503A; flex: none;
}
.plan-ban-title { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.plan-ban-items { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.plan-ban-chip { background: #FDF1EE; color: #A8412C; font-size: 12.5px; font-weight: 700; padding: 8px 12px; border-radius: 11px; line-height: 1.35; }
.plan-warn-card { background: var(--deep); border-radius: 22px; padding: 18px; color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.7; margin-top: 2px; }

/* ===== 我的页 ===== */
.me-page { padding-bottom: 6px; }
.me-hero {
  position: relative; padding: 24px 20px 22px; color: #fff; border-radius: 0 0 30px 30px;
  background: linear-gradient(150deg, #0A2C23, #12463A);
  overflow: hidden;
}
.me-hero-top { display: flex; align-items: center; gap: 15px; }
.me-avatar {
  width: 62px; height: 62px; border-radius: 50%; background: rgba(255, 255, 255, .16);
  border: 2px solid rgba(255, 255, 255, .3); display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 800; flex: none;
}
.me-hero-info { flex: 1; min-width: 0; }
.me-name { font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.me-day { font-size: 12.5px; font-weight: 700; color: rgba(255, 255, 255, .68); margin-top: 3px; }
.me-stats { display: flex; gap: 8px; margin-top: 18px; }
.me-stat { flex: 1; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px; padding: 11px 12px; }
.me-stat-v { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.me-stat-t { font-size: 10.5px; font-weight: 700; color: rgba(255, 255, 255, .66); margin-top: 2px; }

.me-body { padding: 18px 16px 0; }
.me-section-label { font-size: 12.5px; font-weight: 800; color: var(--sub); margin: 0 6px 9px; }
.me-card { padding: 4px 16px; margin-bottom: 4px; }
.me-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid #F1F3EF; }
.me-row-first { border-top: none; }
.me-row-icon {
  width: 32px; height: 32px; border-radius: 11px; flex: none; display: flex; align-items: center;
  justify-content: center; background: #E4F3E9; color: var(--green);
}
.me-row-icon-blue { background: #E8EBFB; color: #5B6FD6; }
.me-row-icon-warn { background: #FFF3DC; color: #B8781A; }
.me-row-icon-danger { background: #FBEDEA; color: #B4837A; }
.me-row-info { flex: 1; min-width: 0; }
.me-row-title { font-size: 14.5px; font-weight: 700; }
.me-row-flex { flex: 1; }
.me-row-sub { font-size: 11.5px; font-weight: 600; color: var(--sub); margin-top: 2px; }
.me-row-val { font-size: 12.5px; font-weight: 700; color: var(--sub); white-space: nowrap; margin-right: 2px; }
.me-row-click { cursor: pointer; }
.me-row-logout .me-row-title { color: #B4837A; }

.switch { width: 50px; height: 30px; border-radius: 15px; flex: none; padding: 2.5px; cursor: pointer; transition: background .22s; background: #E2E6E0; }
.switch-on { background: var(--green); }
.switch-busy { opacity: .6; pointer-events: none; }
.switch-knob { width: 25px; height: 25px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .18); transition: transform .24s cubic-bezier(.34, 1.4, .5, 1); }
.switch-on .switch-knob { transform: translateX(20px); }

.me-notify-row .me-row-icon { background: #FFF3DC; color: #B8781A; }
.me-notify-granted { font-size: 12.5px; font-weight: 600; color: var(--sub); }

.me-tz-block { border-top: 1px solid #F1F3EF; padding: 13px 0; }
.me-tz-block .me-row { border-top: none; padding: 0; }
.tz-select {
  width: 100%; height: 46px; border: 1px solid #E6E9E4; background: #F7F8F5; border-radius: 14px;
  padding: 0 14px; font-size: 14px; font-weight: 700; color: var(--ink); font-family: inherit;
  margin-top: 11px; cursor: pointer;
}

.me-amend-caret { display: inline-flex; color: #A6B0A9; transition: transform .25s; }
.me-amend-caret.open { transform: rotate(90deg); }
.me-amend-list { padding: 4px 0 14px; animation: fadeIn .25s ease; }
.me-amend-empty { font-size: 12.5px; font-weight: 700; color: var(--sub); padding: 10px 0; text-align: center; }
.me-amend-item { padding: 10px 0; border-top: 1px solid #F1F3EF; }
.me-amend-item:first-child { border-top: none; }
.me-amend-item-top { display: flex; align-items: center; gap: 8px; }
.me-amend-item-title { flex: 1; font-size: 13px; font-weight: 700; color: #33443C; }
.me-amend-reason { font-size: 11.5px; font-weight: 600; color: var(--sub); margin-top: 4px; }
.me-amend-reject { font-size: 11.5px; font-weight: 700; color: var(--danger); margin-top: 4px; }

.amend-badge { font-size: 10.5px; font-weight: 800; padding: 4px 9px; border-radius: 8px; white-space: nowrap; }
.amend-badge-pending { background: #FFF3DC; color: #9A6A12; }
.amend-badge-approved { background: #EAF7DC; color: #3E7A2E; }
.amend-badge-rejected { background: #FBEAE8; color: #C0392B; }

.goal-modal { text-align: left; }
.goal-field { margin-top: 4px; }
.goal-field input { text-align: right; }

/* ===== 申请修改弹窗 ===== */
.amend-modal { text-align: left; }
.amend-title { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.amend-label { font-size: 12px; font-weight: 800; color: var(--sub); margin: 12px 0 6px; }
.amend-select {
  width: 100%; height: 46px; border-radius: 14px; border: 1px solid var(--line);
  background: #F7F8F5; padding: 0 12px; font-size: 14px; font-weight: 700; color: var(--ink);
  font-family: inherit;
}
.amend-field { margin-top: 8px; }
.amend-textarea {
  width: 100%; min-height: 80px; border-radius: 14px; border: 1px solid var(--line);
  background: #F7F8F5; padding: 10px 12px; font-size: 13.5px; font-weight: 600; color: var(--ink);
  resize: vertical; font-family: inherit; outline: none;
}
.amend-cta { margin-top: 16px; }
.amend-cta.disabled { opacity: .5; pointer-events: none; }

/* ===== 激励弹窗:生成海报按钮 ===== */
.celebrate-poster-cta {
  margin-top: 14px; height: 48px; border-radius: 16px; font-size: 14.5px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); color: #fff;
}

/* ===== 我的页:分享海报入口 ===== */
.me-poster-card { padding-bottom: 14px; }
.poster-pick-row { display: flex; gap: 8px; padding: 2px 0 4px; }
.poster-pick-chip {
  flex: 1; text-align: center; padding: 10px 6px; border-radius: 13px;
  background: #F3F5F1; color: var(--green); font-size: 12.5px; font-weight: 800; cursor: pointer;
  transition: transform .15s;
}
.poster-pick-chip:active { transform: scale(.95); }

/* ===== 海报预览层(全屏,canvas 750x1334 缩放展示) ===== */
.poster-overlay {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(6, 16, 13, .92);
  display: flex; flex-direction: column; align-items: center;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
  animation: fadeIn .25s ease both;
}
.poster-head {
  width: 100%; max-width: 380px; display: flex; align-items: center; margin-bottom: 14px; flex: none;
}
.poster-head-title { flex: 1; color: #fff; font-size: 16px; font-weight: 800; }
.poster-close {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.poster-body {
  flex: 1; min-height: 0; width: 100%; max-width: 380px;
  display: flex; align-items: center; justify-content: center;
}
.poster-canvas {
  width: 100%; max-width: 320px; height: auto; aspect-ratio: 750 / 1334;
  border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  display: block;
}
.poster-loading { color: rgba(255, 255, 255, .7); font-size: 13px; font-weight: 700; }
.poster-actions { width: 100%; max-width: 380px; margin-top: 16px; flex: none; }
.poster-save-cta { height: 54px; border-radius: 18px; font-size: 16px; }
