/* 减肥日记 H5 */
:root {
  --cream-peach: #F2A3B6;
  --mint-green: #97C8B6;
  --bg-cream: #FFFDFB;
  --card-white: #FFFFFF;
  --text-dark: #5C5B5E;
  --text-peach: #E8879A;
  --text-muted: #B5B2B5;
  --radius: 16px;
  --tab-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg-cream);
  color: var(--text-dark);
  font-size: 14px;
  line-height: 1.5;
}

#app { min-height: 100%; padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
#app:has(.page-ai) { padding-bottom: 0; }
.hidden { display: none !important; }

/* Auth */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #FFF5F8 0%, #FFFDFB 50%, #F0F8F4 100%);
}
.auth-logo { font-size: 48px; margin-bottom: 8px; }
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.auth-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }
.auth-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 0 8px 32px rgba(242, 163, 182, 0.15);
  border: 1px solid rgba(242, 163, 182, 0.12);
}
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.auth-tab {
  flex: 1;
  height: 36px;
  border: 1px solid rgba(242, 163, 182, 0.35);
  border-radius: 10px;
  background: #fff;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}
.auth-tab.active {
  background: rgba(242, 163, 182, 0.15);
  color: var(--text-peach);
  border-color: var(--cream-peach);
  font-weight: 600;
}
.auth-subtabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.auth-subtab {
  flex: 1;
  height: 32px;
  border: 1px solid rgba(242, 163, 182, 0.25);
  border-radius: 8px;
  background: #fff;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
}
.auth-subtab.active {
  background: rgba(152, 200, 182, 0.15);
  color: var(--mint-green);
  border-color: var(--mint-green);
  font-weight: 600;
}
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(242, 163, 182, 0.25);
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  background: #FFFBFC;
}
.form-input:focus { border-color: var(--cream-peach); }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary { background: var(--cream-peach); color: #fff; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text-peach); margin-top: 12px; }
.link-text { color: var(--text-peach); cursor: pointer; font-size: 13px; text-align: center; margin-top: 16px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  color: var(--text-muted);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(242, 163, 182, 0.2);
}
.btn-wechat {
  background: #07c160;
  color: #fff;
  margin-top: 0;
}
.auth-tip {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.sms-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.sms-input { flex: 1; min-width: 0; }
.btn-sms {
  flex-shrink: 0;
  width: auto;
  min-width: 100px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(242, 163, 182, 0.35);
  border-radius: 12px;
  background: #fff;
  color: var(--text-peach);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-sms:disabled { opacity: 0.55; cursor: not-allowed; }

/* Layout */
.page-header {
  padding: calc(env(safe-area-inset-top, 12px) + 12px) 16px 8px;
  background: var(--bg-cream);
  position: sticky;
  top: 0;
  z-index: 10;
}
.greeting { font-size: 13px; color: var(--text-muted); }
.greeting-name { font-size: 17px; font-weight: 600; }
.page-title { font-size: 18px; font-weight: 700; margin-top: 4px; }
.page-scroll { padding: 0 16px 16px; }
.home-page .page-scroll,
.profile-page .page-scroll {
  -webkit-overflow-scrolling: touch;
}

.card {
  background: var(--card-white);
  border-radius: var(--radius);
  border: 1px solid rgba(242, 163, 182, 0.08);
  padding: 16px;
  margin-bottom: 12px;
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.card-sub { font-size: 12px; color: var(--text-muted); }

.dual-row { display: flex; gap: 10px; margin-bottom: 12px; }
.dual-panel {
  flex: 1; min-width: 0; padding: 12px 10px; border-radius: 16px;
  background: linear-gradient(160deg, #FFF5F8 0%, #FFE8EF 100%);
  border: 1px solid rgba(242, 163, 182, 0.2);
}
.dual-panel.calorie { background: linear-gradient(160deg, #FFFBFC 0%, #FFF0F3 100%); }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; border-radius: 12px; background: rgba(255,255,255,0.9);
  cursor: pointer; border: none; font-size: 11px;
}
.quick-emoji { font-size: 20px; }

.chart-tabs { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.chart-tab {
  padding: 5px 12px; border-radius: 20px; background: #F5F0F3;
  color: var(--text-muted); font-size: 12px; border: none; cursor: pointer;
}
.chart-tab.active { background: var(--cream-peach); color: #fff; font-weight: 600; }

.remind-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px;
  border-radius: 12px; margin-bottom: 8px; font-size: 13px;
}
.remind-close { margin-left: auto; cursor: pointer; opacity: 0.5; border: none; background: none; font-size: 18px; }

/* Tab bar */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex; background: #fff;
  border-top: 1px solid rgba(242, 163, 182, 0.12);
  z-index: 100;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; cursor: pointer; color: var(--text-muted);
  border: none; background: none; font-size: 11px;
}
.tab-item.active { color: var(--text-peach); font-weight: 600; }
.tab-icon { font-size: 22px; }

/* AI chat */
.page-ai {
  position: fixed;
  inset: 0;
  bottom: calc(var(--tab-h) + var(--safe-b));
  display: flex;
  flex-direction: column;
  background: var(--bg-cream);
  overflow: hidden;
}
.page-ai .page-header { flex-shrink: 0; padding-bottom: 4px; }
.page-ai .page-header .card { margin-bottom: 0; }
.ai-header-card {
  display: flex; align-items: center; gap: 12px;
  border-radius: 20px; padding: 12px 14px !important;
}
.ai-avatar {
  width: 44px; height: 44px; border-radius: 22px; background: #FEF0F3;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 24px; border: 2px solid rgba(242, 163, 182, 0.25);
}
.ai-header-text { flex: 1; min-width: 0; }
.ai-header-title { font-size: 16px; font-weight: 700; }
.ai-header-sub { font-size: 12px; color: var(--text-muted); }
.ai-header-heart { font-size: 20px; flex-shrink: 0; }

.chat-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 0 16px; -webkit-overflow-scrolling: touch;
}
.chat-inner { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 12px; }
.bubble-row { display: flex; width: 100%; }
.bubble-row.user-row { justify-content: flex-end; }
.bubble {
  max-width: 78%; padding: 10px 12px; border-radius: 16px;
  font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}
.user-bubble { background: var(--cream-peach); color: #fff; }
.ai-bubble { background: #fff; border: 1px solid rgba(242,163,182,0.15); align-self: flex-start; }
.chat-welcome { max-width: 100% !important; }
.ai-pending { color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.ai-pending-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cream-peach);
  animation: ai-pulse 1s ease-in-out infinite;
}
@keyframes ai-pulse { 50% { opacity: 0.35; } }

.ai-bottom {
  flex-shrink: 0; padding: 0 16px 8px; background: var(--bg-cream);
  border-top: 1px solid rgba(242,163,182,0.08);
}
.ai-bottom .card { margin-bottom: 6px; }
.quick-section { padding: 6px 8px !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.quick-chips { display: inline-flex; gap: 8px; padding: 2px; white-space: nowrap; }
.quick-chip {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 14px;
  flex-shrink: 0; border: none; cursor: pointer; font-size: 11px; font-weight: 500;
  color: var(--text-dark); background: #f5f5f5;
}
.quick-chip:disabled { opacity: 0.45; cursor: not-allowed; }
.quick-peach { background: var(--cream-peach); color: #fff; }
.quick-mint { background: var(--mint-green); color: #fff; }
.quick-blue { background: #B8D4E8; color: #fff; }
.quick-pink { background: #FDE8EC; color: var(--text-peach); }
.quick-gray { background: #f5f5f5; color: var(--text-muted); }

.input-bar {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px;
  border-radius: 18px; background: #fff; border: 1px solid rgba(242,163,182,0.12);
}
.input-field {
  flex: 1; height: 36px; min-height: 36px; line-height: 36px; padding: 0 10px;
  border: none; border-radius: 14px; background: var(--bg-cream); font-size: 14px; outline: none;
}
.input-field:disabled { opacity: 0.6; }
.send-btn {
  width: 36px; height: 36px; border-radius: 18px; background: var(--cream-peach);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: none; cursor: pointer;
}
.send-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.send-icon { font-size: 14px; color: #fff; }

/* legacy chat styles kept for sub-pages if any */
.chat-list { display: flex; flex-direction: column; gap: 10px; }
.chat-input-bar {
  display: flex; gap: 8px; padding: 10px 16px calc(10px + var(--safe-b));
  background: #fff; border-top: 1px solid rgba(242,163,182,0.1);
  position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b));
}
.chat-input { flex: 1; height: 40px; border-radius: 20px; border: 1px solid #eee; padding: 0 14px; outline: none; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { padding: 6px 12px; border-radius: 16px; background: #FEF0F3; color: var(--text-peach); font-size: 12px; border: none; cursor: pointer; }

/* Profile */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.stat-item { background: #FEFAFB; padding: 10px; border-radius: 12px; text-align: center; }
.stat-val { font-size: 16px; font-weight: 700; color: var(--text-peach); }
.stat-lbl { font-size: 11px; color: var(--text-muted); }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool-card {
  padding: 12px; border-radius: 14px; background: #FEFAFB; cursor: pointer;
  border: 1px solid rgba(242,163,182,0.08);
}
.tool-emoji { font-size: 24px; }
.tool-label { font-size: 13px; font-weight: 600; margin-top: 4px; }
.tool-sub { font-size: 11px; color: var(--text-muted); }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(242,163,182,0.08); }
.unit-picker { display: flex; gap: 8px; }
.unit-opt { padding: 5px 12px; border-radius: 14px; background: #F5F0F3; font-size: 12px; border: none; cursor: pointer; }
.unit-opt.active { background: var(--cream-peach); color: #fff; }

/* Sub page */
.sub-header {
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top, 8px) + 8px) 16px 12px;
  background: var(--bg-cream); position: sticky; top: 0; z-index: 10;
}
.sub-back { color: var(--text-peach); cursor: pointer; font-size: 14px; border: none; background: none; }
.sub-title { font-size: 17px; font-weight: 700; }
.sub-body { padding: 0 16px 24px; }

/* Modal */
.modal-mask {
  position: fixed; inset: 0; background: rgba(92,91,94,0.45);
  display: flex; align-items: flex-end; justify-content: center; z-index: 200;
}
.modal-panel {
  width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto;
  background: #FFFDFB; border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + var(--safe-b));
}
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 16px; display: flex; justify-content: space-between; }
.modal-close { border: none; background: none; font-size: 20px; cursor: pointer; }
.diary-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.diary-tab { flex: 1; padding: 8px; text-align: center; border-radius: 12px; background: #F5F0F3; border: none; cursor: pointer; font-size: 13px; }
.diary-tab.active { background: var(--cream-peach); color: #fff; }

.toast {
  position: fixed; left: 50%; bottom: calc(80px + var(--safe-b)); transform: translateX(-50%);
  background: rgba(92,91,94,0.88); color: #fff; padding: 12px 16px; border-radius: 20px;
  font-size: 13px; line-height: 1.55; z-index: 300;
  max-width: min(calc(100vw - 24px), 420px);
  width: fit-content;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.loading { text-align: center; padding: 40px; color: var(--text-muted); }
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge-item { text-align: center; padding: 12px 6px; border-radius: 14px; background: #FEFAFB; opacity: 0.45; }
.badge-item.unlocked { opacity: 1; border: 1px solid rgba(242,163,182,0.25); }
.food-list .food-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }

@media (min-width: 768px) {
  #app { max-width: 480px; margin: 0 auto; }
  .tab-bar, .chat-input-bar { max-width: 480px; left: 50%; transform: translateX(-50%); }
  .modal-panel { border-radius: 20px; margin-bottom: 24px; }
  .modal-mask { align-items: center; }
}

/* === Enhanced UI (align with mini program) === */
.greeting-row { display: flex; justify-content: space-between; align-items: flex-start; }
.greeting-right { display: flex; align-items: center; gap: 8px; }
.checkin-badge { font-size: 11px; background: #FEF0F3; color: var(--text-peach); padding: 4px 10px; border-radius: 12px; font-weight: 600; }
.greeting-avatar { width: 40px; height: 40px; border-radius: 20px; background: var(--cream-peach); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.page-title-bar { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.page-date { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.card-header-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.card-tap { cursor: pointer; }
.text-btn { border: none; background: none; color: var(--text-peach); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; }
.detail-link { font-size: 12px; color: var(--text-peach); cursor: pointer; }
.muted-text { font-size: 12px; color: var(--text-muted); text-align: center; padding: 8px 0; }

.dual-panel-title, .dual-panel .card-title { font-size: 13px; font-weight: 700; }
.dual-calorie-body { display: flex; flex-direction: column; align-items: center; padding: 4px 0; }
.dual-calorie-ring { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 6px 0; }
.dual-calorie-ring-inner { width: 54px; height: 54px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dual-calorie-num { font-size: 16px; font-weight: 700; color: var(--text-peach); line-height: 1; }
.dual-calorie-unit { font-size: 9px; color: var(--text-muted); }
.dual-calorie-sub { font-size: 11px; color: var(--text-muted); }
.dual-calorie-meta { font-size: 10px; color: var(--text-muted); }
.dual-calorie-empty-icon { font-size: 32px; opacity: 0.4; }
.dual-calorie-empty-text { font-size: 11px; color: var(--text-muted); text-align: center; }
.dual-calorie-empty-link { font-size: 11px; color: var(--text-peach); margin-top: 4px; }
.dual-quick-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.dual-quick-status { font-size: 10px; color: var(--text-muted); }

.chart-area { display: flex; gap: 6px; }
.chart-y-labels { display: flex; flex-direction: column; justify-content: space-between; font-size: 9px; color: var(--text-muted); padding: 14px 0 20px; min-width: 36px; text-align: right; }
.chart-main { flex: 1; min-width: 0; }
.chart-legend { display: flex; gap: 12px; font-size: 10px; margin-bottom: 4px; }
.legend-fat { color: var(--mint-green); }
.chart-x-labels { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-muted); margin-top: 4px; padding: 0 4px; }
.chart-empty { text-align: center; padding: 40px 12px; font-size: 12px; color: var(--text-muted); }
.chart-wrap { min-height: 160px; background: linear-gradient(135deg, #FEFAFB, #FFF0F5); border-radius: 12px; padding: 8px; }
.chart-canvas-wrap { position: relative; cursor: pointer; width: 100%; min-height: 140px; }
.chart-canvas { width: 100%; height: 140px; display: block; }
.chart-touch-tip { font-size: 10px; color: var(--text-muted); text-align: center; margin-top: 4px; }
.remind-tap { cursor: pointer; }
.remind-text { flex: 1; }
.tip-box { margin-top: 8px; font-size: 13px; line-height: 1.6; }
.tip-date { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

.chart-detail-panel { max-width: 320px; margin: auto; border-radius: 16px !important; }
.chart-detail-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.chart-detail-remark { font-size: 12px; color: var(--text-muted); margin: 8px 0; }

.chip-peach { background: #FEF0F3; color: var(--text-peach); }
.chip-mint { background: #F0FAF5; color: #5a9e82; }
.chip-blue { background: #F0F4FA; color: #6b8fbf; }
.chip-pink { background: #FFF0F5; color: #d46a8a; }
.chip-gray { background: #f5f5f5; color: var(--text-muted); }
.chip { white-space: nowrap; }
.quick-chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
.chat-welcome { background: #fff; border: 1px solid rgba(242,163,182,0.15); border-radius: 16px; padding: 14px; font-size: 13px; color: var(--text-muted); }
.btn-send-icon { width: 40px; height: 40px; border-radius: 20px; border: none; background: var(--cream-peach); color: #fff; font-size: 16px; cursor: pointer; flex-shrink: 0; }

.profile-card-top { display: flex; align-items: center; gap: 12px; }
.profile-page .page-scroll { padding-bottom: calc(var(--tab-h) + 12px); }
.profile-hero-card { background: linear-gradient(160deg, #FFF5F8 0%, #FFFFFF 55%); }
.profile-stat-grid { margin: 12px 0 0; }
.profile-page .page-title-bar { align-items: center; }
.profile-page .card-header-row .card-title { margin-bottom: 0; }
.weight-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.text-btn-primary { font-weight: 700; }
.weight-summary-arrow { color: var(--text-muted); }
.detail-btn { border: none; background: none; padding: 0; font: inherit; }
.setting-label { font-size: 14px; }
.settings-card .setting-row:last-child { border-bottom: none; }
.weight-item-right { text-align: right; }
.avatar-circle { width: 56px; height: 56px; border-radius: 28px; background: var(--cream-peach); display: flex; align-items: center; justify-content: center; font-size: 30px; flex-shrink: 0; }
.avatar-info { flex: 1; min-width: 0; }
.user-name { font-size: 17px; font-weight: 700; }
.user-sub, .user-phone { font-size: 12px; color: var(--text-muted); }
.edit-btn { border: none; background: #FEF0F3; color: var(--text-peach); padding: 6px 14px; border-radius: 14px; font-size: 12px; font-weight: 600; cursor: pointer; }
.tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 11px; background: #FEFAFB; padding: 4px 10px; border-radius: 12px; border: 1px solid rgba(242,163,182,0.12); }

.badge-preview-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.badge-chip { text-align: center; padding: 8px 6px; border-radius: 12px; background: #FEFAFB; min-width: 64px; }
.badge-chip.locked { opacity: 0.45; filter: grayscale(0.5); }
.badge-chip-emoji { font-size: 22px; display: block; }
.badge-chip-name { font-size: 10px; font-weight: 600; margin-top: 4px; display: block; }

.weight-tip { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.weight-summary { display: flex; justify-content: space-between; padding: 10px 12px; background: #FEFAFB; border-radius: 12px; font-size: 13px; margin-bottom: 10px; cursor: pointer; }
.weight-list { margin-top: 8px; }
.weight-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f8f8f8; cursor: pointer; }
.weight-item-left { display: flex; align-items: center; gap: 6px; }
.weight-date { font-size: 13px; }
.weight-tag { font-size: 10px; background: #FEF0F3; color: var(--text-peach); padding: 2px 6px; border-radius: 8px; }
.weight-value { font-weight: 700; color: var(--text-peach); }
.weight-fat { font-size: 11px; color: var(--text-muted); display: block; text-align: right; }

.bmi-hero { display: flex; justify-content: space-between; align-items: center; margin: 12px 0; }
.bmi-hero-left { display: flex; align-items: center; gap: 10px; }
.bmi-hero-emoji { font-size: 32px; }
.bmi-hero-value { font-size: 28px; font-weight: 700; display: block; line-height: 1; }
.bmi-hero-label { font-size: 11px; color: var(--text-muted); }
.bmi-status-badge { background: #FEF0F3; color: var(--text-peach); padding: 6px 12px; border-radius: 14px; font-size: 12px; font-weight: 600; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.metric-item { padding: 10px; border-radius: 12px; text-align: center; }
.metric-green { background: #F0FAF5; }
.metric-blue { background: #F0F4FA; }
.metric-peach { background: #FFF5F8; }
.metric-warm { background: #FFF8F0; }
.metric-icon { font-size: 18px; display: block; }
.metric-value { font-size: 18px; font-weight: 700; display: block; }
.metric-value.metric-sm { font-size: 13px; }
.metric-unit { font-size: 10px; color: var(--text-muted); }
.metric-label { font-size: 10px; color: var(--text-muted); display: block; margin-top: 2px; }
.progress-section { margin: 12px 0; }
.progress-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.progress-bar-bg { height: 8px; background: #F5F0F3; border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--cream-peach), var(--mint-green)); border-radius: 4px; transition: width 0.3s; }
.progress-chips { display: flex; gap: 10px; margin-top: 8px; font-size: 12px; }
.chip-lost { color: var(--mint-green); font-weight: 600; }
.chip-remain { color: var(--text-peach); font-weight: 600; }
.progress-sub { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.tip-suggest { background: #F0FAF5; padding: 10px; border-radius: 10px; }
.tip-warn { background: #FFF8F0; padding: 10px; border-radius: 10px; }
.analysis-empty { text-align: center; padding: 20px 0; }
.empty-emoji { font-size: 36px; display: block; margin-bottom: 8px; }
.btn-ghost-full { width: 100%; margin-top: 10px; background: transparent; border: 1px solid rgba(242,163,182,0.3); color: var(--text-peach); height: 40px; border-radius: 12px; cursor: pointer; font-weight: 600; }

.tools-header { margin-bottom: 10px; }
.tools-title { font-size: 15px; font-weight: 700; display: block; }
.tools-sub { font-size: 11px; color: var(--text-muted); }
.tools-list { display: flex; flex-direction: column; gap: 8px; }
.tool-item { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; cursor: pointer; }
.tool-peach { background: linear-gradient(135deg, #FFF5F8, #FFE8EF); }
.tool-mint { background: linear-gradient(135deg, #F0FAF5, #E8F5EF); }
.tool-blue { background: linear-gradient(135deg, #F0F4FA, #E8EEF8); }
.tool-warm { background: linear-gradient(135deg, #FFF8F0, #FFEFE0); }
.tool-icon-wrap { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.tool-info { flex: 1; min-width: 0; }
.tool-name { font-size: 14px; font-weight: 600; display: block; }
.tool-sub { font-size: 11px; color: var(--text-muted); }
.tool-badge { font-size: 10px; background: var(--cream-peach); color: #fff; padding: 2px 8px; border-radius: 10px; }
.tool-arrow { color: var(--text-muted); }

.force-tip { font-size: 13px; color: var(--text-peach); margin-bottom: 12px; line-height: 1.5; }
.avatar-picker, .pace-picker, .gender-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-opt { width: 44px; height: 44px; border-radius: 22px; border: 2px solid transparent; background: #FEFAFB; font-size: 24px; cursor: pointer; }
.avatar-opt.active { border-color: var(--cream-peach); background: #FEF0F3; }

.diary-modal { max-height: 90vh; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-nav-btn { border: none; background: #FEF0F3; color: var(--text-peach); width: 32px; height: 32px; border-radius: 16px; font-size: 18px; cursor: pointer; }
.cal-nav-btn.disabled { opacity: 0.35; cursor: not-allowed; }
.cal-nav-title { font-size: 15px; font-weight: 600; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 12px; }
.cal-cell { border: none; background: #FEFAFB; border-radius: 10px; padding: 6px 2px; min-height: 44px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; }
.cal-cell.cal-selected { background: var(--cream-peach); color: #fff; }
.cal-cell.cal-has-record .cal-day-weight { font-size: 9px; color: var(--text-peach); }
.cal-cell.cal-selected .cal-day-weight { color: #fff; }
.cal-cell.cal-today { border: 1px solid var(--cream-peach); }
.cal-cell.cal-disabled { opacity: 0.35; cursor: not-allowed; }
.cal-cell.cal-empty { background: transparent; cursor: default; }
.diary-form-head { margin: 8px 0; }
.diary-date-label { font-size: 14px; font-weight: 600; }
.diary-remark { height: auto !important; min-height: 80px; padding: 10px !important; resize: vertical; }
.meal-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.meal-label { font-size: 12px; width: 36px; flex-shrink: 0; color: var(--text-muted); }
.meal-food { flex: 1; min-width: 0; height: 36px; border: 1px solid #eee; border-radius: 10px; padding: 0 8px; font-size: 13px; }
.meal-cal { width: 64px; height: 36px; border: 1px solid #eee; border-radius: 10px; padding: 0 8px; font-size: 13px; }
.exercise-cal-row { display: flex; gap: 8px; align-items: center; }
.exercise-cal-row .form-input { flex: 1; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.btn-inline { flex: 1; }
.btn-ghost-inline { flex: 1; background: transparent; border: 1px solid rgba(242,163,182,0.3); color: var(--text-muted); height: 44px; border-radius: 12px; cursor: pointer; }

.badge-summary { text-align: center; font-weight: 600; color: var(--text-peach); }
.badge-list { display: flex; flex-direction: column; gap: 8px; }
.badge-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: #FEFAFB; }
.badge-card.locked { opacity: 0.5; }
.badge-card-emoji { font-size: 28px; }
.badge-card-info { flex: 1; }
.badge-card-name { font-size: 14px; font-weight: 600; display: block; }
.badge-card-desc { font-size: 11px; color: var(--text-muted); }
.badge-card-status { font-size: 11px; color: var(--text-peach); }

.weekly-head { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.weekly-weight { display: flex; justify-content: space-between; margin: 12px 0; font-size: 14px; font-weight: 600; }
.weekly-change { color: var(--mint-green); }
.weekly-summary { font-size: 13px; line-height: 1.6; }

.goal-stats { display: flex; gap: 20px; margin-bottom: 16px; }
.goal-label { font-size: 11px; color: var(--text-muted); display: block; }
.goal-val { font-size: 16px; font-weight: 700; color: var(--text-peach); }

.diary-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.diary-row-left { flex: 1; min-width: 0; }
.diary-date { font-size: 13px; font-weight: 600; display: block; }
.diary-remark { font-size: 11px; color: var(--text-muted); display: block; margin-top: 2px; }
.diary-row-right { text-align: right; font-size: 13px; }
.diary-fat { font-size: 11px; color: var(--text-muted); display: block; }

.food-name { font-weight: 600; display: block; }
.food-cat { font-size: 11px; color: var(--text-muted); }
.exercise-result-card { text-align: center; padding: 16px; background: #F0FAF5; border-radius: 14px; margin-top: 12px; }
.exercise-result-num { font-size: 32px; font-weight: 700; color: var(--mint-green); }
