/* ============================================================
   情侣点菜 · 网页版样式 v2
   移动端优先（375px 设计稿），桌面端居中手机壳展示
   注意：全部使用 px（浏览器不支持小程序 rpx 单位！）
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --primary: #FF7A59;        /* 暖橘 */
  --primary-deep: #FF5F3E;
  --pink: #FF6B9D;           /* 蜜桃粉 */
  --pink-light: #FFD9E4;
  --purple: #A78BFA;
  --mint: #34D399;
  --bg: #FFF6F1;             /* 奶油底 */
  --bg-2: #FFF0F5;
  --card: #FFFFFF;
  --text: #40281F;           /* 主文字 暖深棕 */
  --text-2: #7A5C50;         /* 次级 */
  --text-3: #B9A094;         /* 弱化 */
  --line: #F7E3DA;
  --love: #FF4D6D;
  --shadow-sm: 0 2px 10px rgba(255, 130, 100, .08);
  --shadow-md: 0 8px 24px rgba(255, 120, 90, .14);
  --shadow-lg: 0 16px 40px rgba(255, 100, 80, .18);
  --radius: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* ---------- 小程序标签兜底（修复浏览器堆叠错乱的根因） ----------
   <view> 默认 block（类似 div），<text> 默认 inline（类似 span）。
   子元素依然可用 display: flex/grid/inline-block 等覆盖。 */
view, wx-view { display: block; }
text, wx-text { display: inline; }

html, body {
  height: 100%;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior-y: none;
}

/* emoji 字体回退链：避免主流系统之外的字体缺失导致豆腐 (□) */
[class*="-emoji"], .emoji, .food-emoji, .shelf-emoji, .snack-emoji, .consume-emoji,
.menu-item-emoji, .vote-option-emoji, .empty-emoji, .record-emoji, .entry-emoji,
.vote-banner-emoji, .vote-setup-tip-emoji, .vote-result-emoji, .vote-list-emojis {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
               "Twemoji Mozilla", "EmojiOne Color", "Android Emoji",
               "Symbola", "DejaVu Sans", sans-serif;
  font-emoji: emoji;
}

/* ---------- 背景装饰（漂浮 emoji） ---------- */
.bg-deco {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, #FFF8F3 0%, #FFEFE6 35%, #FFE9F1 70%, #FFF0F5 100%);
}
.deco {
  position: absolute; opacity: .16; font-size: 34px;
  animation: floaty 9s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(255,120,90,.15));
}
.deco-1  { top: 6%;   left: 6%;   animation-delay: 0s; }
.deco-2  { top: 14%;  right: 8%;  font-size: 26px; animation-delay: 1.2s; }
.deco-3  { top: 32%;  left: 3%;   font-size: 28px; animation-delay: 2.1s; }
.deco-4  { top: 44%;  right: 4%;  animation-delay: .6s; }
.deco-5  { top: 58%;  left: 6%;   font-size: 26px; animation-delay: 3s; }
.deco-6  { top: 72%;  right: 7%;  animation-delay: 1.8s; }
.deco-7  { top: 82%;  left: 8%;   font-size: 26px; animation-delay: 2.6s; }
.deco-8  { top: 90%;  right: 10%; animation-delay: .9s; }
.deco-9  { top: 24%;  left: 44%;  font-size: 22px; animation-delay: 3.6s; }
.deco-10 { top: 64%;  left: 40%;  font-size: 22px; animation-delay: 4.2s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-18px) rotate(8deg); }
}

/* ---------- 应用容器 ---------- */
#app {
  position: relative; z-index: 1;
  max-width: 480px; margin: 0 auto;
  /* 固定为视口高度：让首页可以在单屏内完整展示，不出现上下滚动 */
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
}
@media (min-width: 520px) {
  body { padding: 24px 0; }
  #app {
    background: linear-gradient(180deg, #FFF9F5, #FFF0F5);
    border-radius: 32px;
    box-shadow: 0 30px 80px rgba(255, 100, 80, .18), 0 0 0 1px rgba(255,200,180,.4);
    height: calc(100dvh - 48px);
    overflow: hidden;
  }
}

/* ---------- 顶部 Header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 22px 16px;
  background: linear-gradient(135deg, #FF9A62 0%, #FF7A59 45%, #FF6B8A 100%);
  border-radius: 0 0 26px 26px;
  box-shadow: 0 10px 28px rgba(255, 100, 80, .30);
}
.header-inner { display: flex; align-items: baseline; gap: 10px; }
.header-back {
  position: absolute; left: 14px; top: calc(18px + env(safe-area-inset-top, 0px));
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff; cursor: pointer;
  background: rgba(255,255,255,.22); backdrop-filter: blur(6px);
  transition: transform .15s ease; z-index: 3;
}
.header-back:active { transform: scale(.85); }
.header-title {
  font-size: 21px; font-weight: 800; color: #fff;
  letter-spacing: 1px; text-shadow: 0 2px 8px rgba(180, 40, 0, .25);
}
.header-sub {
  font-size: 12px; color: rgba(255,255,255,.85);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
/* 首页等不需头部时整体隐藏 */
.app-header.is-empty { display: none; }

/* ---------- 页面主体 ---------- */
.page-body {
  flex: 1; padding: 18px 16px calc(96px + var(--safe-b));
  overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.page-body::-webkit-scrollbar { display: none; }
.page { animation: pageIn .28s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 加载 ---------- */
.loading-box { padding: 80px 0; text-align: center; }
.loading-spin { display: inline-block; font-size: 40px; animation: spin 1.6s ease-in-out infinite; }
@keyframes spin { 0%,100% { transform: rotate(0) scale(1); } 50% { transform: rotate(-14deg) scale(1.12); } }
.loading-text { display: block; margin-top: 12px; color: var(--text-3); font-size: 13px; }

/* ---------- 底部导航 ---------- */
.tab-bar {
  position: fixed; z-index: 30;
  left: 50%; transform: translateX(-50%);
  bottom: calc(14px + var(--safe-b));
  width: calc(100% - 28px); max-width: 452px;
  display: flex;
  padding: 7px;
  border-radius: 26px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(255, 110, 80, .22), 0 0 0 1px rgba(255,220,205,.6);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0 5px; cursor: pointer; user-select: none;
  border-radius: 18px; transition: all .2s ease;
}
.tab-icon {
  width: 38px; height: 38px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; transition: all .25s ease;
}
.tab-label { font-size: 10px; color: var(--text-3); font-weight: 600; transition: color .2s; }
.tab-item:active .tab-icon { transform: scale(.88); }
.tab-item.active .tab-icon {
  background: linear-gradient(135deg, #FF9A62, #FF6B8A);
  box-shadow: 0 6px 16px rgba(255, 107, 138, .4);
  animation: tabPop .3s ease;
}
.tab-item.active .tab-label { color: var(--primary-deep); font-weight: 800; }
@keyframes tabPop { 0% { transform: scale(.6); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* ---------- 通用区块 ---------- */
.section { margin-bottom: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-title {
  font-size: 16px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.section-title::before { content: ''; width: 4px; height: 16px; border-radius: 3px; background: linear-gradient(180deg, #FF9A62, #FF6B8A); }
.section-more { font-size: 12px; color: var(--text-3); cursor: pointer; }

.card {
  background: var(--card); border-radius: var(--radius);
  padding: 16px;
  border: 1px solid rgba(255, 232, 220, .8);
  box-shadow: var(--shadow-sm);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border: none; cursor: pointer; user-select: none;
  font-size: 14px; font-weight: 700;
  padding: 10px 22px; border-radius: 999px;
  transition: all .18s ease;
  font-family: inherit;
}
.btn:active { transform: scale(.94); }
.btn-primary {
  background: linear-gradient(135deg, #FF8A5C, #FF6B8A);
  color: #fff; box-shadow: 0 6px 16px rgba(255, 107, 120, .35);
}
.btn-plain { background: #FFF0EA; color: var(--primary-deep); }
.btn-danger { background: #FFE9EC; color: #E5495F; }
.btn-ghost { background: transparent; color: var(--text-3); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 999px; }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }

/* ---------- 空状态 ---------- */
.empty-box { text-align: center; padding: 34px 0 26px; }
.empty-emoji { font-size: 46px; display: block; animation: floaty 3s ease-in-out infinite; }
.empty-text { margin-top: 8px; font-size: 13px; color: var(--text-3); }
/* 空状态在 grid 容器（零食柜/菜品/冰箱）里要跨整行居中，否则会被网格约束到半宽而视觉靠左 */
.cabinet-grid > .empty-box,
.foods-grid > .empty-box,
.fridge-list > .empty-box { grid-column: 1 / -1; padding: 40px 0 30px; }
.cabinet-grid > .empty-box .empty-emoji,
.foods-grid > .empty-box .empty-emoji,
.fridge-list > .empty-box .empty-emoji { display: block; margin: 0 auto; }

/* ============ 首页 ============ */
/* --- 首页自适应：内容自然流式排列，超出一屏可上下滚动，适配任意尺寸手机 --- */
#pageBody.home-body {
  padding-top: 12px; padding-bottom: calc(90px + var(--safe-b));
}
.page-home {
  display: flex; flex-direction: column; gap: 12px; flex-shrink: 0;
}
.page-home .section { margin-bottom: 0; }
.page-home .section-head { margin-bottom: 6px; }
/* 超窄屏（≤ 360px）进一步收紧边距，避免内容贴边 */
@media (max-width: 360px) {
  #pageBody.home-body { padding-left: 12px; padding-right: 12px; }
  .page-home { gap: 10px; }
}
/* 首页紧凑化（压缩各模块高度，保证小屏也能一屏放下） */
.page-home .welcome-banner { padding: 13px 16px 11px; }
.page-home .welcome-banner::after { font-size: 30px; top: 10px; right: 12px; }
.page-home .welcome-title { font-size: 19px; margin: 3px 0 5px; }
.page-home .welcome-sub { font-size: 11.5px; line-height: 1.5; }
.page-home .stat-row { margin-bottom: 0; }
.page-home .stat-card { padding: 9px 8px 8px; border-radius: 15px; }
.page-home .stat-num { font-size: 20px; }
.page-home .stat-label { font-size: 10px; }
.page-home .vote-banner { padding: 10px 14px; }
.page-home .vote-banner-emoji { font-size: 28px; }
.page-home .vote-banner-title { font-size: 14px; }
.page-home .vote-banner-sub { font-size: 11px; }
.page-home .entry-card { padding: 9px 4px 8px; border-radius: 15px; }
.page-home .entry-emoji { width: 38px; height: 38px; font-size: 19px; border-radius: 13px; margin-bottom: 4px; }
.page-home .entry-name { font-size: 11px; }
.page-home .card { padding: 8px 12px; }
.page-home .record-item { padding: 7px 2px; gap: 10px; }
.page-home .record-emoji { width: 36px; height: 36px; font-size: 18px; border-radius: 12px; }
.page-home .record-name { font-size: 13px; }
.page-home .empty-box { padding: 16px 0 10px; }
.page-home .empty-emoji { font-size: 30px; }
.page-home .empty-text { font-size: 12px; }

.welcome-banner {
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  color: #fff;
  background:
    radial-gradient(120px 90px at 88% 18%, rgba(255,255,255,.28), transparent 60%),
    radial-gradient(150px 110px at 8% 90%, rgba(255,255,255,.16), transparent 60%),
    linear-gradient(135deg, #FF9A62 0%, #FF7A59 50%, #FF6B8A 100%);
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.welcome-banner::after {
  content: '🍳'; position: absolute; right: 14px; top: 14px; font-size: 42px;
  animation: floaty 4s ease-in-out infinite; opacity: .9;
}
.welcome-date { font-size: 12px; color: rgba(255,255,255,.85); font-weight: 600; }
.welcome-title { font-size: 22px; font-weight: 800; margin: 4px 0 8px; letter-spacing: 1px; }
.welcome-sub { font-size: 12.5px; color: rgba(255,255,255,.92); line-height: 1.6; }

.stat-row { display: flex; gap: 10px; margin-bottom: 18px; }
.stat-card {
  flex: 1; border-radius: 18px; padding: 14px 10px 12px;
  color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.stat-card:nth-child(1) { background: linear-gradient(135deg, #FFA06B, #FF7A59); }
.stat-card:nth-child(2) { background: linear-gradient(135deg, #FF8FB2, #FF6B9D); }
.stat-card:nth-child(3) { background: linear-gradient(135deg, #B79CFF, #8B6DF0); }
.stat-card::after {
  content: '✦'; position: absolute; right: -6px; bottom: -14px; font-size: 40px; opacity: .18;
}
.stat-num { font-size: 24px; font-weight: 800; line-height: 1.2; }
.stat-label { font-size: 11px; opacity: .9; margin-top: 2px; font-weight: 600; }

.entry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.entry-card {
  background: var(--card); border-radius: 18px; padding: 14px 6px 12px;
  text-align: center; cursor: pointer; border: 1px solid rgba(255,232,220,.8);
  box-shadow: var(--shadow-sm); transition: all .2s ease;
}
.entry-card:active { transform: scale(.94); }
.entry-emoji {
  width: 44px; height: 44px; margin: 0 auto 6px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(135deg, #FFF1E8, #FFE4EC);
}
.entry-card:nth-child(2) .entry-emoji { background: linear-gradient(135deg, #E9F6FF, #E4F0FF); }
.entry-card:nth-child(3) .entry-emoji { background: linear-gradient(135deg, #FFF4E0, #FFEAD4); }
.entry-name { font-size: 12px; font-weight: 700; color: var(--text-2); }

.vote-banner {
  display: flex; align-items: center; gap: 14px;
  border-radius: var(--radius); padding: 16px;
  color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #FF8FB2, #FF6B9D 55%, #C084FC);
  box-shadow: var(--shadow-md);
  transition: transform .2s ease;
}
.vote-banner:active { transform: scale(.97); }
.vote-banner-emoji { font-size: 36px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.15)); }
.vote-banner-title { font-size: 15px; font-weight: 800; }
.vote-banner-sub { font-size: 12px; opacity: .9; margin-top: 2px; }
.vote-banner-arrow { margin-left: auto; font-size: 18px; opacity: .8; }

/* 投票选菜子页面顶条：与首页的 vote-banner 区分类同，不点可关 */
.vote-setup-tip {
  display: flex; align-items: center; gap: 12px;
  margin: 12px 14px 4px; padding: 12px 14px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #E0F2FE, #FCE7F3);
  box-shadow: var(--shadow);
}
.vote-setup-tip-emoji { font-size: 26px; }
.vote-setup-tip-title { font-size: 14px; font-weight: 800; color: var(--text); }
.vote-setup-tip-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; line-height: 1.5; }

.record-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--line);
}
.record-item:last-child { border-bottom: none; }
.record-emoji {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(135deg, #FFF1E8, #FFE9F1);
}
.record-info { flex: 1; min-width: 0; }
.record-name { font-size: 14px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.record-detail { font-size: 12px; color: var(--text-3); margin-top: 1px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.record-time { font-size: 11px; color: var(--text-3); flex-shrink: 0; }

/* ============ 菜品库 ============ */
.type-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.type-tabs::-webkit-scrollbar { display: none; }
.type-tab {
  flex-shrink: 0; padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  background: #FFF; border: 1px solid var(--line); cursor: pointer;
  transition: all .2s ease; white-space: nowrap;
}
.type-tab:active { transform: scale(.94); }
.type-tab.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #FF8A5C, #FF6B8A);
  box-shadow: 0 5px 14px rgba(255, 107, 120, .35);
}

.food-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.food-card {
  background: var(--card); border-radius: 20px; padding: 0;
  border: 2px solid transparent; cursor: pointer; position: relative;
  box-shadow: var(--shadow-sm); transition: all .18s ease;
  overflow: hidden;
}
.food-card:active { transform: scale(.97); }
.food-card.selected {
  border-color: var(--pink);
  box-shadow: 0 8px 22px rgba(255, 107, 140, .25);
}
.food-emoji {
  width: 100%; aspect-ratio: 4/3;
  margin: 0; border-radius: 0;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
  background: linear-gradient(135deg, #FFF3EC, #FFE9F1);
  box-shadow: inset 0 0 0 1px rgba(255,220,205,.6);
  overflow: hidden;
  position: relative;
}
/* 菜品封面照片 */
.food-img, .thumb-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.food-emoji .thumb-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #FFB26B, #FF8FA3);
  text-shadow: 0 2px 8px rgba(190,80,60,.25);
}
/* 带照片的缩略图容器需要裁剪圆角 */
.record-emoji, .menu-thumb, .menu-item-emoji, .vote-option-emoji { overflow: hidden; }
.food-card.selected .food-emoji::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,138,92,.22), rgba(255,107,138,.22));
  pointer-events: none;
}
.food-check {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #FF8A5C, #FF6B8A);
  color: #fff; font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.5); transition: all .2s ease;
  box-shadow: 0 4px 10px rgba(255,90,100,.45); z-index: 2;
}
.food-card.selected .food-check { opacity: 1; transform: scale(1); }
.food-edit-fab {
  position: absolute; top: 8px; left: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.95); color: #FF5F3E;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
  opacity: 1; transition: all .2s ease; z-index: 2;
  cursor: pointer;
}
.food-card:active .food-edit-fab { transform: scale(.9); }
.food-body { padding: 8px 10px 10px; }
.food-name {
  font-size: 14px; font-weight: 800; text-align: center;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
}
.food-tags { display: flex; justify-content: center; gap: 4px; margin-top: 5px; flex-wrap: wrap; min-height: 16px; }
.tag-chip {
  font-size: 10px; color: var(--primary-deep); background: #FFF0E8;
  padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
.food-score {
  display: flex; justify-content: center; align-items: center; gap: 2px;
  margin-top: 5px; font-size: 11px; min-height: 16px;
}
.food-score .star { color: #FFD06B; font-size: 12px; }
.food-score .text-sub { color: #A6938A; margin-left: 3px; font-weight: 600; }
.food-action {
  display: grid; grid-template-columns: 1fr 40px 1fr; gap: 6px;
  margin-top: 8px;
}
.food-action .btn { margin: 0; }
.food-edit-btn { border-radius: 12px !important; padding: 6px 4px !important; font-size: 12px; font-weight: 700; }
.food-fav-btn { border-radius: 12px !important; padding: 6px 0 !important; font-size: 16px; min-width: 0; }
.food-pick-btn { border-radius: 12px !important; padding: 6px 8px !important; font-size: 13px; font-weight: 800; }

/* ============ 冰箱 ============ */
.fridge-wrap { padding: 6px 0 4px; }
.fridge-body {
  position: relative; border-radius: 26px; padding: 16px 14px 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.25)),
    linear-gradient(135deg, #DFF1FF, #BFE3FF 55%, #A8D8FF);
  border: 3px solid #fff;
  box-shadow: 0 14px 34px rgba(120, 170, 220, .35), inset 0 0 0 2px #D8ECFF;
}
.fridge-top { display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.fridge-temp { font-size: 12px; font-weight: 800; color: #2E6DA8; background: rgba(255,255,255,.75); padding: 4px 12px; border-radius: 999px; letter-spacing: .5px; }
.fridge-title { font-size: 13px; font-weight: 800; color: #3A76B0; letter-spacing: 1px; }
.fridge-magnets { display: flex; gap: 4px; }
.fridge-magnet {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.fridge-handle-l, .fridge-handle-r {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 8px; height: 56px; border-radius: 999px;
  background: linear-gradient(90deg, #FFD2A8, #FFA46B);
  box-shadow: 0 4px 10px rgba(200, 100, 40, .35);
}
.fridge-handle-l { left: -6px; }
.fridge-handle-r { right: -6px; }
.fridge-shelf {
  background: rgba(255,255,255,.8);
  border-radius: 14px; padding: 8px; margin-bottom: 8px;
  box-shadow: inset 0 2px 8px rgba(140,180,220,.18);
}
.shelf-label {
  font-size: 11px; font-weight: 800; color: #4E86BC; padding: 2px 8px;
  display: flex; align-items: center; gap: 4px;
}
.shelf-items { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 2px 2px; }
.shelf-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: #fff; border-radius: 12px; padding: 8px 10px 6px;
  cursor: pointer; border: 1px solid #EAF4FF;
  box-shadow: 0 2px 8px rgba(120,170,220,.14);
  transition: all .18s ease; min-width: 68px;
}
.shelf-item:active { transform: scale(.92); }
.shelf-emoji { font-size: 24px; }
.shelf-name { font-size: 11px; font-weight: 700; color: var(--text); max-width: 70px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shelf-count { font-size: 10px; color: var(--text-3); font-weight: 600; }
.fridge-drawer {
  margin-top: 4px; border-radius: 16px; padding: 10px;
  background: linear-gradient(180deg, #C8E4FF, #AED6FF);
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: inset 0 2px 6px rgba(90,140,190,.25);
}
.drawer-label { font-size: 12px; font-weight: 800; color: #2E6DA8; }
.drawer-btn { font-size: 11px; font-weight: 700; color: #2E6DA8; background: #fff; padding: 4px 12px; border-radius: 999px; cursor: pointer; }
.fridge-add {
  margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px; border-radius: 14px; cursor: pointer;
  font-size: 14px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #FF9A62, #FF6B8A);
  box-shadow: 0 6px 16px rgba(255, 107, 120, .35);
  transition: transform .18s ease;
}
.fridge-add:active { transform: scale(.96); }

/* ============ 零食柜（可爱格子柜） ============ */
.snack-cabinet {
  position: relative; border-radius: 22px; padding: 36px 12px 14px;
  background:
    radial-gradient(60px 40px at 90% 6%, rgba(255,255,255,.5), transparent 60%),
    linear-gradient(180deg, #FFE3EC 0%, #FFD3E2 100%);
  border: 5px solid #F3A2BA;
  box-shadow: 0 14px 34px rgba(240, 130, 165, .28), inset 0 0 0 3px #FFEFF4;
  margin-top: 20px;
}
.cabinet-sign {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  background: #fff; border: 3px solid #F3A2BA; border-radius: 999px;
  padding: 4px 18px; font-size: 14px; font-weight: 800; color: #E45A83;
  white-space: nowrap; box-shadow: 0 6px 16px rgba(240,130,165,.25);
  z-index: 5; overflow: visible;
}
.snack-cabinet, .fridge-list, .foods-grid { overflow: visible; }
.cabinet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.snack-cell {
  position: relative; background: #fff; border-radius: 15px;
  padding: 12px 10px 10px; cursor: pointer;
  border: 2px solid #FCE3EC;
  box-shadow: 0 3px 10px rgba(240,140,170,.16);
  transition: all .18s ease;
  display: flex; align-items: center; gap: 9px;
}
.snack-cell:active { transform: scale(.95); }
.snack-cell::after {  /* 小抽屉把手 - 已让步给加减按钮 */
  display: none;
  content: ''; position: absolute; top: 5px; right: 7px;
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, #FFC7D8, #FF9EBC);
  box-shadow: 0 2px 5px rgba(240,120,155,.4);
}
.snack-emoji {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(135deg, #FFF0F5, #FFE3EC);
}
.snack-info { flex: 1; min-width: 0; }
.snack-name { font-size: 13px; font-weight: 800; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.snack-detail { font-size: 10.5px; color: var(--text-3); margin-top: 1px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.snack-price { font-size: 12px; font-weight: 800; color: #E45A83; flex-shrink: 0; }
.snack-actions {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  position: relative; z-index: 1;
}
.snack-stepper {
  display: flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #FFF5F8, #FFE6EF);
  border-radius: 10px; padding: 2px 4px;
}
.snack-stepper .chip-btn {
  width: 26px; height: 26px; line-height: 26px; font-size: 14px;
  border-radius: 8px; padding: 0;
}
.snack-stepper-count {
  min-width: 22px; text-align: center;
  font-size: 13px; font-weight: 800; color: #C13E6F;
}
.snack-del {
  width: 30px; height: 22px; border-radius: 8px;
  background: #FFF1EE; color: #E55C3E;
  border: none; font-size: 12px; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.snack-del:active { transform: scale(.85); background: #FFE2DA; }
.shelf-actions .chip-btn.trash {
  background: #FFF1EE; color: #E55C3E;
  width: 28px; height: 28px; line-height: 28px;
  border-radius: 8px; padding: 0;
}
.shelf-actions .chip-btn.trash:active { transform: scale(.85); }
.cabinet-add {
  margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 11px; border-radius: 14px; cursor: pointer;
  font-size: 14px; font-weight: 800; color: #E45A83;
  background: rgba(255,255,255,.85); border: 2px dashed #F3A2BA;
  transition: all .18s ease;
}
.cabinet-add:active { transform: scale(.97); background: #fff; }

/* ============ 每日总结（日/周/月） ============ */
.summary-tabs {
  display: flex; gap: 6px; background: #FFF; border-radius: 999px;
  padding: 5px; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  margin-bottom: 14px;
}
.summary-tab {
  flex: 1; padding: 8px 0; border: none; cursor: pointer;
  border-radius: 999px; font-size: 14px; font-weight: 700;
  color: var(--text-2); background: transparent; transition: all .2s ease;
  font-family: inherit;
}
.summary-tab.active {
  color: #fff; background: linear-gradient(135deg, #FF8A5C, #FF6B8A);
  box-shadow: 0 5px 14px rgba(255,107,120,.35);
}
.summary-nav { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.nav-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 16px; color: var(--text-2); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  transition: all .18s ease; font-family: inherit;
}
.nav-btn:active { transform: scale(.9); background: #FFF0E8; }
.nav-btn:disabled { opacity: .35; pointer-events: none; }
.summary-range { font-size: 14px; font-weight: 800; color: var(--text); }
.summary-total {
  border-radius: var(--radius); padding: 18px 20px 16px; color: #fff;
  text-align: center; margin-bottom: 14px;
  background:
    radial-gradient(100px 70px at 85% 20%, rgba(255,255,255,.25), transparent 60%),
    linear-gradient(135deg, #FF9A62, #FF6B8A 70%, #C084FC);
  box-shadow: var(--shadow-md);
}
.summary-hero {
  border-radius: var(--radius); padding: 22px 20px 20px; color: #fff;
  text-align: center; margin-bottom: 16px; position: relative; overflow: hidden;
  background:
    radial-gradient(140px 90px at 90% 18%, rgba(255,255,255,.30), transparent 60%),
    linear-gradient(135deg, #FF9A62 0%, #FF6B8A 65%, #C084FC 100%);
  box-shadow: 0 10px 26px rgba(255,107,138,.30);
}
.summary-hero::before {
  content: ''; position: absolute; bottom: -40%; left: -10%; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-label { font-size: 13px; opacity: .92; font-weight: 600; }
.hero-num { font-size: 38px; font-weight: 900; margin-top: 4px; letter-spacing: 1px; }
.hero-tip { font-size: 11px; opacity: .88; margin-top: 2px; margin-bottom: 12px; }
.hero-add {
  background: rgba(255,255,255,.95); color: #C0476E; font-weight: 700;
  font-size: 13px; padding: 8px 22px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,.10); border: none;
}
.hero-add:active { transform: scale(.97); }
.section-tag {
  font-size: 11px; color: #B66680; background: #FFF0E8;
  padding: 2px 8px; border-radius: 999px; font-weight: 700;
}
.total-label { font-size: 12px; opacity: .92; font-weight: 600; }
.total-num { font-size: 34px; font-weight: 800; margin-top: 2px; letter-spacing: 1px; }
.total-tip { font-size: 11px; opacity: .85; margin-top: 2px; }

.chart-card { padding: 14px 12px 10px; }
.chart {
  display: flex; align-items: flex-end; gap: 5px;
  height: 108px; padding-top: 8px;
}
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.chart-bar {
  width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #FF9A62, #FF6B8A);
  min-height: 3px; transition: height .4s ease;
  box-shadow: 0 3px 8px rgba(255,120,120,.25);
}
.chart-bar.zero { background: #F3E6E0; box-shadow: none; }
.chart-bar.today { box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(255,120,120,.4); }
.chart-label { font-size: 9.5px; color: var(--text-3); white-space: nowrap; transform: scale(.92); }
.chart-label.today { color: var(--primary-deep); font-weight: 800; }

.day-group { margin-bottom: 12px; }
.day-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 800; color: var(--text-2);
  padding: 4px 2px 6px;
}
.day-head-cost { color: var(--primary-deep); font-size: 12px; }

.consume-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px; border-bottom: 1px solid var(--line);
  background: #fff;
}
.consume-item:last-child { border-bottom: none; }
.consume-emoji {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
  background: linear-gradient(135deg, #FFF1E8, #FFE9F1);
}
.consume-info { flex: 1; min-width: 0; }
.consume-name { font-size: 14px; font-weight: 700; }
.consume-detail { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.consume-cost { font-size: 14px; font-weight: 800; color: var(--primary-deep); flex-shrink: 0; }
.consume-del {
  flex-shrink: 0; width: 26px; height: 26px; border: none; border-radius: 8px;
  background: transparent; color: #ccc; font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.consume-del:active { background: #FFF0E8; color: var(--primary); }
.sum-add-btn {
  margin-top: 10px; background: rgba(255,255,255,.22); color: #fff;
  border: 1px solid rgba(255,255,255,.55); border-radius: 999px;
  font-size: 12px; padding: 6px 16px;
}
.sum-add-btn:active { background: rgba(255,255,255,.35); }
.stat-card[data-act] { cursor: pointer; }

/* ============ 我的 ============ */
.mine-header {
  border-radius: var(--radius); padding: 18px 16px;
  display: flex; align-items: center; gap: 14px; color: #fff;
  background:
    radial-gradient(90px 70px at 90% 10%, rgba(255,255,255,.22), transparent 60%),
    linear-gradient(135deg, #FF9A62, #FF6B8A 70%, #C084FC);
  box-shadow: var(--shadow-md);
}
.mine-avatar {
  width: 58px; height: 58px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.92); font-size: 30px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.mine-name { font-size: 17px; font-weight: 800; }
.mine-bio { font-size: 12px; opacity: .9; margin-top: 2px; }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.profile-item {
  background: #fff; border-radius: 16px; padding: 14px 6px;
  text-align: center; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.profile-num { font-size: 20px; font-weight: 800; color: var(--primary-deep); }
.profile-label { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.menu-item-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; background: #fff; border-radius: 16px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  margin-bottom: 10px; cursor: pointer; transition: transform .18s ease;
}
.menu-item-card:active { transform: scale(.97); }
.menu-thumb {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #FFF1E8, #FFE9F1);
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 19px;
}
.menu-thumb-sub {
  font-size: 9px; margin-top: -2px; position: relative; z-index: 1;
  background: rgba(255,255,255,.75); border-radius: 6px; padding: 0 3px;
}
.mine-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 4px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.mine-list-item:last-child { border-bottom: none; }
.mine-list-item:active { opacity: .7; }
.mine-list-icon { font-size: 20px; width: 28px; text-align: center; }
.mine-list-text { flex: 1; font-size: 14px; font-weight: 600; }
.mine-list-arrow { color: var(--text-3); font-size: 14px; }

/* ============ 菜单编辑 ============ */
.menu-steps {
  display: flex; gap: 6px; margin-bottom: 14px;
}
.menu-step {
  flex: 1; text-align: center; font-size: 11px; color: var(--text-3);
  padding: 8px 4px; border-radius: 12px; background: #fff;
  border: 1px solid var(--line); position: relative;
}
.menu-step.active { color: #fff; background: linear-gradient(135deg, #FF8A5C, #FF6B8A); border-color: transparent; font-weight: 800; }
.menu-step::after {
  content: '→'; position: absolute; right: -9px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); z-index: 2; font-size: 12px;
}
.menu-step:last-child::after { display: none; }
.menu-item-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 16px; padding: 12px 14px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}
.menu-item-emoji {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(135deg, #FFF1E8, #FFE9F1);
}
.menu-item-name { font-size: 14px; font-weight: 800; }
.menu-item-count { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.menu-item-price { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--primary-deep); }
.menu-actions { display: flex; gap: 8px; margin-top: 14px; }
.add-food-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px; background: #FFF7F3; border: 2px dashed #FFC9B8;
  border-radius: 14px; cursor: pointer; color: var(--primary-deep);
  font-size: 13px; font-weight: 700; justify-content: center;
}

/* ============ 投票 ============ */
.vote-card {
  background: #fff; border-radius: var(--radius); padding: 18px 16px;
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  margin-bottom: 14px;
}
.vote-title { font-size: 16px; font-weight: 800; text-align: center; }
.vote-sub { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 4px; }
.vote-role-tag {
  display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 700;
  color: #C0476E; background: #FFF0F4; border-radius: 999px; padding: 3px 10px;
}
.share-url {
  margin-top: 8px; padding: 12px; border-radius: 12px; background: #F6F0F2;
  font-size: 12px; color: var(--text-2); word-break: break-all; line-height: 1.5;
}
.vote-option {
  display: flex; align-items: center; gap: 12px;
  border-radius: 16px; padding: 12px; margin-top: 10px;
  background: #FFF8F4; border: 2px solid var(--line);
  transition: all .18s ease; cursor: pointer;
}
.vote-option.selected { border-color: var(--pink); background: #FFF0F5; box-shadow: 0 4px 14px rgba(255,107,140,.2); }
.vote-option.rejected { opacity: .45; }
.vote-option-emoji { font-size: 26px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.vote-option-name { flex: 1; font-size: 14px; font-weight: 700; }
.vote-mark { font-size: 20px; }
.vote-tags { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.vote-tag { font-size: 12px; padding: 5px 14px; border-radius: 999px; font-weight: 700; cursor: pointer; border: none; font-family: inherit; transition: all .18s ease; }
.vote-tag.yes { background: #E7F9EF; color: #159A5C; }
.vote-tag.no { background: #FFECEF; color: #E5495F; }
.vote-tag:active { transform: scale(.92); }
.vote-result {
  border-radius: 14px; padding: 10px; margin-top: 12px; font-size: 13px; font-weight: 700;
  text-align: center; background: #FFF6E8; color: #C77E1B;
}
.vote-result.good { background: #E7F9EF; color: #159A5C; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(60, 30, 20, .45);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 480px;
  background: #FFFDFB; border-radius: 26px 26px 0 0;
  padding: 20px 18px calc(20px + var(--safe-b));
  max-height: 86vh; overflow-y: auto;
  animation: slideUp .28s ease;
  box-shadow: 0 -12px 40px rgba(0,0,0,.14);
}
@media (min-width: 520px) {
  .modal { border-radius: 26px; margin-bottom: 24px; }
}
@keyframes slideUp { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-title { font-size: 17px; font-weight: 800; text-align: center; margin-bottom: 16px; }
.form-row { margin-bottom: 13px; }
.form-label { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; display: block; }
.form-input {
  width: 100%; padding: 12px 14px; border-radius: 14px;
  border: 2px solid var(--line); background: #fff; font-size: 15px;
  font-family: inherit; color: var(--text); outline: none;
  transition: border-color .2s ease;
}
.form-input:focus { border-color: var(--pink); }
.form-hint { font-size: 11.5px; color: var(--text-3); line-height: 1.7; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }
.form-actions .btn { flex: 1; }
/* 菜品照片上传 */
.upload-box {
  border: 2px dashed #FFB9C9; border-radius: 14px; min-height: 150px;
  display: flex; align-items: center; justify-content: center;
  background: #FFF8F5; cursor: pointer; overflow: hidden;
  transition: all .15s ease;
}
.upload-box:active { border-color: var(--pink); background: #FFF1F3; }
.upload-preview { width: 100%; max-height: 210px; object-fit: cover; display: block; }
.upload-empty { text-align: center; color: #B98B98; font-size: 13px; padding: 26px 0; }
.upload-camera { display: block; font-size: 34px; margin-bottom: 6px; }
.upload-tips { font-size: 11px; color: #B98B98; margin-top: 6px; }
.modal-title-img {
  width: 26px; height: 26px; border-radius: 8px;
  object-fit: cover; vertical-align: -6px; margin-right: 2px;
}
.emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.emoji-option {
  aspect-ratio: 1; border-radius: 12px; cursor: pointer; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  background: #FFF4EE; border: 2px solid transparent; transition: all .15s ease;
}
.emoji-option:active { transform: scale(.9); }
.emoji-option.selected { border-color: var(--pink); background: #FFE9F1; box-shadow: 0 3px 10px rgba(255,107,140,.25); }
/* 消费分类选择 chips */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  border: 2px solid var(--line); background: #fff; color: var(--text-2);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: all .15s ease;
}
.cat-chip:active { transform: scale(.95); }
.cat-chip.selected { border-color: var(--pink); background: #FFE9F1; color: #C0476E; box-shadow: 0 3px 10px rgba(255,107,140,.18); }
.form-hint { font-size: 11px; color: var(--text-3, #B8A8AC); margin-top: 6px; }
/* 花销分类总览卡片 */
.cat-summary { padding: 14px 16px; }
.cat-title { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.cat-sub { font-size: 11px; color: var(--text-3, #B8A8AC); font-weight: 600; }
.cat-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.cat-dot {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 17px; color: #fff;
}
.cat-info { flex: 1; min-width: 0; }
.cat-name { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 4px; }
.cat-bar-wrap { height: 6px; border-radius: 999px; background: #F5EEF0; overflow: hidden; }
.cat-bar { height: 100%; border-radius: 999px; transition: width .4s ease; }
.cat-cost { font-size: 13px; font-weight: 800; color: var(--text); white-space: nowrap; }
.cat-pct { font-style: normal; font-size: 11px; color: var(--text-3, #B8A8AC); font-weight: 600; }
/* 记录内的分类小标签 */
.consume-cat {
  display: inline-block; font-size: 10px; font-weight: 700; vertical-align: 2px;
  border: 1px solid; border-radius: 999px; padding: 1px 6px; margin-left: 4px;
}
.consume-item { cursor: pointer; }
.consume-item:active { background: #FFF7F4; }
.stars { display: flex; justify-content: center; gap: 8px; padding: 6px 0; }
.star-btn { font-size: 30px; cursor: pointer; transition: all .15s ease; filter: grayscale(1); opacity: .4; }
.star-btn.on { filter: none; opacity: 1; transform: scale(1.1); }
.star-btn:active { transform: scale(.85); }

/* 本餐批量打分 */
.batch-review-list {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 52vh; overflow-y: auto; scrollbar-width: none;
}
.batch-review-list::-webkit-scrollbar { display: none; }
.review-food-item {
  display: flex; align-items: center; gap: 10px;
  background: #FFF8F5; border-radius: 12px; padding: 8px 10px;
}
.review-food-name { flex: 1; font-size: 14px; font-weight: 700; color: #4A3B3F; }
.review-food-item .stars { padding: 0; gap: 4px; }
.review-food-item .star-btn { font-size: 17px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(110px + var(--safe-b));
  transform: translateX(-50%);
  background: rgba(48, 28, 20, .9); color: #fff;
  padding: 11px 22px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; z-index: 999;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  animation: toastIn .25s ease;
  max-width: 86vw; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 通用工具 ---------- */
.flex { display: flex; align-items: center; }
.flex-1 { flex: 1; min-width: 0; }
.text-sub { color: var(--text-3); font-size: 12px; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* ---------- 补充：表单控件 ---------- */
.form-select {
  width: 100%; padding: 12px 14px; border-radius: 14px;
  border: 2px solid var(--line); background: #fff; font-size: 15px;
  font-family: inherit; color: var(--text); outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23B9A094' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.form-select:focus { border-color: var(--pink); }
.form-calc {
  margin-top: 8px; padding: 8px 12px; border-radius: 10px;
  background: #FFF3EC; color: var(--primary-deep); font-size: 12.5px;
  font-weight: 700;
}
.form-textarea {
  width: 100%; padding: 12px 14px; border-radius: 14px;
  border: 2px solid var(--line); background: #fff; font-size: 15px;
  font-family: inherit; color: var(--text); outline: none; resize: none;
  transition: border-color .2s ease;
}
.form-textarea:focus { border-color: var(--pink); }

/* ---------- 补充：冰箱食材卡片按钮 ---------- */
.shelf-empty {
  width: 100%; text-align: center; padding: 14px 0;
  font-size: 12px; color: #8FB6DC; font-weight: 600;
}
.shelf-actions { display: flex; gap: 4px; margin-top: 2px; }
.chip-btn {
  width: 24px; height: 24px; border-radius: 8px; border: none;
  cursor: pointer; font-size: 15px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
.chip-btn:active { transform: scale(.85); }
.chip-btn.minus { background: #FFE9EC; color: #E5495F; }
.chip-btn.plus { background: #E7F9EF; color: #159A5C; }

/* ---------- 补充：总结页图例 ---------- */
.chart-legend { text-align: center; font-size: 11px; color: var(--text-3); padding: 6px 0 2px; }

/* ---------- 补充：投票按钮选中态 ---------- */
.vote-tag.sel { box-shadow: 0 0 0 2px #fff, 0 4px 12px rgba(0,0,0,.15); transform: scale(1.04); }

/* ---------- 补充：底部候选栏（菜品库） ---------- */
.bottom-bar {
  position: fixed; z-index: 25;
  left: 50%; transform: translateX(-50%);
  bottom: calc(88px + var(--safe-b));
  width: calc(100% - 28px); max-width: 452px;
}
.bottom-bar-inner {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 20px; padding: 10px 14px;
  box-shadow: 0 12px 34px rgba(255, 110, 80, .25), 0 0 0 1px rgba(255,220,205,.6);
}
.bottom-bar-count { flex: 1; font-size: 13px; font-weight: 800; color: var(--text); }

/* ---------- 补充：home 菜单预览卡片标题 ---------- */
.menu-title-text { font-size: 14px; font-weight: 700; }

/* ---------- 投票列表（voteList 子页面） ---------- */
.vote-list-card {
  background: #fff; border: 2px solid var(--line); border-radius: 16px;
  padding: 14px 14px 12px; margin-bottom: 10px; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  position: relative;
}
.vote-list-card:active {
  transform: scale(.98);
  border-color: var(--pink);
  box-shadow: 0 6px 20px rgba(255,110,80,.18);
}
.vote-list-card-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.vote-list-emojis {
  font-size: 22px; letter-spacing: 1px; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vote-list-tag {
  flex-shrink: 0; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .3px;
}
.vote-list-tag.todo     { background: #FFF3EC; color: #C12C3E; }
.vote-list-tag.waiting  { background: #E5F0FF; color: #2D6CD3; }
.vote-list-tag.done     { background: #E7F9EF; color: #159A5C; }
.vote-list-tag.expired  { background: #EFEFEF; color: #8A8A8A; }
.vote-list-names {
  margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vote-list-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px; font-size: 11.5px; color: var(--text-3); font-weight: 600;
}
.vote-list-role {
  background: #FCEDFB; color: #B0559F; padding: 2px 8px;
  border-radius: 999px; font-weight: 800;
}
.vote-list-sub { flex: 1; min-width: 0; }
.vote-list-meta-time {
  margin-top: 4px; font-size: 11px; color: var(--text-3); font-weight: 500;
}
.vote-list-footer {
  display: flex; gap: 8px; margin-top: 12px;
  border-top: 1px dashed var(--line); padding-top: 10px;
}
.vote-list-footer .btn { flex: 1; }
.vote-list-card .vote-list-card-row,
.vote-list-card .vote-list-names,
.vote-list-card .vote-list-meta { cursor: pointer; }

/* ---------- 投票详情：进度 + 结果面板 ---------- */
.vote-progress {
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.vote-progress-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-3); font-weight: 700;
  white-space: nowrap;
}
.vote-progress-item .vote-progress-label {
  background: #F6EFF1; color: #8A6572; border-radius: 999px; padding: 2px 8px; font-size: 11px;
}

/* ============================================================
   投票增强：投票名+留言 顶部卡 / 列表留言
   ============================================================ */
.vote-head-card {
  background: linear-gradient(135deg, #FFE9D6 0%, #FFD2C2 100%);
  border-radius: 18px; padding: 16px 16px 14px; margin: 0 0 12px;
  box-shadow: 0 6px 18px rgba(255, 122, 89, 0.12);
}
.vote-head-title {
  font-size: 18px; font-weight: 800; color: #8A4A2A; line-height: 1.3;
}
.vote-head-msg {
  margin-top: 10px; padding: 10px 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  font-size: 14px; line-height: 1.6; color: #6A4A3A; white-space: pre-wrap; word-break: break-word;
  border-left: 3px solid #FF7A59;
}
.vote-head-meta {
  margin-top: 8px; font-size: 12px; color: #A87560; opacity: 0.85;
}
.vote-list-msg {
  margin-top: 6px; font-size: 13px; color: #8A5A4A; line-height: 1.5;
  background: #FFF3EC; border-radius: 8px; padding: 6px 10px; display: inline-block; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vote-list-meta-sub {
  font-size: 12px; color: var(--text-3); margin-top: 2px;
}

/* ============================================================
   健康模块：提醒/概览/档案/曲线图/历史
   ============================================================ */
.page-health { padding: 0 14px 30px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.health-remind {
  background: linear-gradient(135deg, #FFF5E8 0%, #FFE3D2 100%);
  border-radius: 18px; padding: 14px 16px; margin: 12px 0 14px;
}
.health-remind-title { font-size: 15px; font-weight: 800; color: #8A4A2A; }
.health-remind-sub { font-size: 12px; color: #A87560; margin-top: 4px; line-height: 1.5; }
/* 开关 */
.switch {
  width: 50px; height: 28px; border-radius: 999px; background: #E5C8B8; position: relative;
  transition: background 0.2s; cursor: pointer; flex-shrink: 0;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  background: #fff; border-radius: 50%; transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch.on { background: var(--love); }
.switch.on::after { left: 25px; }
/* 两人概览 */
.health-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.health-overview-card {
  border-radius: 16px; padding: 12px 14px;
  background: #FFF; box-shadow: 0 4px 14px rgba(192, 71, 110, 0.08);
}
.health-overview-card.mine { background: linear-gradient(135deg, #FFE7E0 0%, #FFD2C2 100%); }
.health-overview-card.partner { background: linear-gradient(135deg, #E0F0FF 0%, #C2DDFF 100%); }
.health-overview-name { font-size: 13px; font-weight: 700; color: #8A4A2A; }
.health-overview-card.partner .health-overview-name { color: #2A5A8A; }
.health-overview-h { font-size: 18px; font-weight: 800; color: var(--text-1); margin-top: 6px; }
.health-overview-w { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.health-overview-bmi { font-size: 12px; font-weight: 700; margin-top: 6px; }
/* 人物切换 tab */
.health-person-tabs { display: flex; gap: 6px; }
.health-person-tab {
  font-size: 13px; padding: 5px 12px; border-radius: 999px;
  background: #F6EFF1; color: var(--text-3); font-weight: 700; cursor: pointer;
}
.health-person-tab.on { background: var(--love); color: #fff; }
/* 档案 4 宫格 */
.health-archive-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px;
}
.health-archive-cell {
  background: #F6EFF1; border-radius: 12px; padding: 10px 12px;
}
.health-archive-num { font-size: 18px; font-weight: 800; color: var(--text-1); }
.health-archive-lbl { font-size: 11px; color: var(--text-3); margin-top: 2px; }
/* 曲线图 */
.health-chart { width: 100%; height: auto; display: block; margin: 6px 0 4px; }
.health-stat-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 8px; }
.health-stat { background: #F6EFF1; border-radius: 10px; padding: 8px; text-align: center; }
.health-stat-num { font-size: 16px; font-weight: 800; color: var(--text-1); }
.health-stat-lbl { font-size: 11px; color: var(--text-3); margin-top: 2px; }
/* 历史列表 */
.health-log-list { display: flex; flex-direction: column; gap: 6px; }
.health-log-row {
  display: grid; grid-template-columns: 100px 1fr auto 28px; align-items: center; gap: 8px;
  padding: 8px 10px; background: #F6EFF1; border-radius: 10px; font-size: 13px;
}
.health-log-date { color: var(--text-3); font-weight: 600; }
.health-log-weight { font-weight: 800; color: var(--text-1); }
.health-log-bmi { font-size: 12px; }
.health-log-del {
  text-align: center; cursor: pointer; color: var(--text-3); font-size: 18px; font-weight: 700;
  width: 28px; height: 28px; line-height: 26px; border-radius: 50%;
}
.health-log-del:hover { background: #FFD2C2; color: var(--love); }
.vote-progress-item b { font-size: 13px; color: var(--text); min-width: 38px; text-align: center; }
.vote-progress-item b.ok { color: var(--pink); }
.vote-progress-track {
  flex: 1; height: 8px; background: #F3EAEC; border-radius: 999px; overflow: hidden; min-width: 60px;
}
.vote-progress-bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #FFB3A0, var(--pink));
  transition: width .5s ease;
}
.vote-hint {
  margin-top: 10px; font-size: 12px; color: var(--pink); font-weight: 700;
}
.vote-done-card { border-color: var(--pink); background: linear-gradient(180deg, #FFF7F4, #FFF); }
.vote-card-agreed {
  border-color: var(--pink) !important;
  background: linear-gradient(180deg, #FFF7F4, #FFF) !important;
}
.vote-card-veto { opacity: .62; }
.vote-result {
  background: linear-gradient(135deg, #FFF0EC, #FDEFF7);
  border: 2px solid var(--pink); border-radius: 18px;
  padding: 16px 14px; margin-bottom: 12px;
}
.vote-result-title {
  font-size: 17px; font-weight: 900; color: #B43A50; text-align: center;
}
.vote-result-foods {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 12px;
}
.vote-result-food {
  background: #fff; border-radius: 14px; padding: 8px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 2px 8px rgba(255,110,80,.15); min-width: 74px;
}
.vote-result-emoji { font-size: 26px; }
.vote-result-name { font-size: 12px; font-weight: 800; color: var(--text); max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-result-heart { color: var(--pink); font-size: 12px; }
.vote-result-tip {
  text-align: center; font-size: 12px; color: #A56B77; font-weight: 600;
  margin: 12px 0 4px;
}
.vote-result .btn { margin-top: 4px; }

/* ============================================================
   体重模块：双人卡片/对比曲线/历史/目标/弹窗/详情
   ============================================================ */
/* 双人信息卡 */
.weight-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 14px; }
.weight-card {
  border-radius: 18px; padding: 14px 14px 12px; cursor: pointer; position: relative;
  box-shadow: 0 6px 18px rgba(255, 122, 69, 0.16);
}
.weight-card.mine { background: linear-gradient(135deg, #FFE7D6 0%, #FFCDB8 100%); }
.weight-card.partner { background: linear-gradient(135deg, #F2DFFF 0%, #FFD6EC 100%); }
.weight-card-top { display: flex; align-items: center; gap: 8px; }
.weight-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08); flex-shrink: 0;
}
.weight-card-name { font-size: 14px; font-weight: 800; color: #8A4A2A; flex: 1; }
.weight-card.partner .weight-card-name { color: #7A3B6E; }
.weight-quick {
  font-size: 11px; font-weight: 800; color: #fff; background: rgba(255,122,69,0.85);
  padding: 4px 9px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(255,122,69,0.35);
}
.weight-card.partner .weight-quick { background: rgba(255,102,153,0.85); box-shadow: 0 2px 6px rgba(255,102,153,0.35); }
.weight-card-w { font-size: 26px; font-weight: 900; color: #8A4A2A; margin-top: 8px; }
.weight-card.partner .weight-card-w { color: #7A3B6E; }
.weight-card-unit { font-size: 13px; font-weight: 700; color: inherit; opacity: 0.7; }
.weight-card-date { font-size: 11px; color: #A87560; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weight-card.partner .weight-card-date { color: #A56B8A; }
.weight-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.weight-card-trend { font-size: 12px; font-weight: 800; color: #8A4A2A; }
.weight-card.partner .weight-card-trend { color: #7A3B6E; }
.weight-card-tag {
  font-size: 10px; font-weight: 700; color: #fff; background: rgba(255,122,69,0.7);
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.weight-card.partner .weight-card-tag { background: rgba(255,102,153,0.7); }

/* 周期切换 */
.weight-range-tabs { display: flex; gap: 4px; background: #F6EFF1; border-radius: 999px; padding: 3px; }
.weight-range-tabs span {
  font-size: 12px; font-weight: 700; color: var(--text-3); padding: 4px 10px;
  border-radius: 999px; cursor: pointer; transition: all .2s;
}
.weight-range-tabs span.on { background: #fff; color: #FF7A45; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
/* 图例 */
.weight-legend { display: flex; align-items: center; gap: 12px; margin: 2px 0 6px; font-size: 11px; color: var(--text-3); }
.weight-legend .lg { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.lg-a { color: #FF7A45; }
.lg-b { color: #FF6699; }

/* 历史分页 */
.weight-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; }
.weight-pager-info { font-size: 12px; color: var(--text-3); font-weight: 700; }

/* ============================================================
   v23 UI 优化（不影响既有样式，仅追加）
   ============================================================ */

/* 1. stat-card 宽度统一（避免文字长短不一撑爆） */
.stat-row { gap: 8px; }
.stat-card { min-width: 0; }
.stat-num { font-size: 22px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.stat-label {
  font-size: 11px; opacity: .9; margin-top: 4px; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; word-break: keep-all;
}

/* 2. stat-card 右上角悬浮编辑提示（点击可改今日花费） */
.stat-card-cta {
  position: absolute; top: 6px; right: 6px;
  font-size: 11px; opacity: .9;
  background: rgba(255,255,255,.22); padding: 3px 7px; border-radius: 8px;
  cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  min-width: 24px; min-height: 24px;
  color: #fff;
}
.stat-card-cta:active { transform: scale(.9); }

/* 3. 冰箱右上角装饰小表情（用户要求删除） */
.fridge-magnets { display: none !important; }

/* 4. 菜品编辑 FAB：从左上挪到右上，默认隐藏（hover / 选中时显示），避免遮挡图片 */
.food-edit-fab {
  top: 8px; right: 8px; left: auto;
  opacity: 0; transform: scale(.7);
  background: rgba(255,255,255,.92); color: #FF5F3E;
}
.food-card:hover .food-edit-fab,
.food-card:active .food-edit-fab,
.food-card:focus-within .food-edit-fab,
.food-card.selected .food-edit-fab { opacity: 1; transform: scale(1); }

/* 5. 上传菜品按钮：提升对比度，半实色按钮 */
.section-more.food-upload-btn {
  background: linear-gradient(135deg, #FF8A5C, #FF6B8A);
  color: #fff !important;
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(255,107,120,.35);
  letter-spacing: .5px;
}
.section-more.food-upload-btn:active { transform: scale(.94); }

/* 6. 冰箱空分区显眼 CTA 按钮 */
.shelf-empty.cta {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 8px;
  background: rgba(255, 240, 232, .4);
  border-radius: 12px; border: 1px dashed rgba(255, 138, 92, .35);
}
.shelf-empty-cta-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #FF8A5C, #FF6B8A);
  color: #fff !important; font-weight: 800; font-size: 12px;
  padding: 8px 16px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(255,107,120,.35);
  cursor: pointer; min-height: 36px;
  letter-spacing: .5px;
}
.shelf-empty-cta-btn:active { transform: scale(.95); }

/* 7. 图片占位 fallback */
.food-img, .thumb-img {
  background: linear-gradient(135deg, #FFF3EC, #FFE9F1);
}
.food-card .food-emoji::before {
  /* 当图片加载失败时，给一个柔和底色 */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, #FFF3EC, #FFE9F1);
  z-index: 0;
}
.food-card .food-emoji > * { position: relative; z-index: 1; }
.food-img-broken { display: flex !important; align-items: center; justify-content: center; font-size: 36px; opacity: .55; }

/* 8. 取消收藏按钮带图标文字 */
.btn-text-with-heart { display: inline-flex; align-items: center; gap: 3px; }
.fav-action-cell { display: flex; align-items: center; gap: 6px; }
.fav-action-cell .btn { white-space: nowrap; }

/* 9. 云同步折叠 */
.supa-toggle {
  margin-left: auto; font-size: 12px;
  color: var(--text-3); transition: transform .2s ease;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
}
.supa-toggle.open { transform: rotate(180deg); }
.supa-detail { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(244, 201, 191, .8); }
.supa-detail.open { display: block; }
.supa-detail .btn-row { display: flex; gap: 8px; margin-top: 8px; }

/* 10. 冰箱副标题弱化 */
.fridge-title {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  opacity: .55; color: #6B8FC5; text-transform: uppercase;
}

/* 11. 触控热区统一（基础 44px 设计） */
.cabinet-add, .shelf-label > span { min-width: 32px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; }
.chip-btn { width: 32px; height: 32px; font-size: 14px; }

/* 12. 数值输入校验样式 */
.form-input.invalid { border-color: #FF6B6B; background: #FFF5F5; }

/* 13. 食材过期 / 快过期提示 */
.shelf-item { position: relative; }
.shelf-item.expiring-soon { border-left: 3px solid #FFB26B; padding-left: 6px; }
.shelf-item.expired { opacity: .55; filter: grayscale(.4); }
.shelf-tag {
  position: absolute; top: 2px; right: 2px;
  font-size: 9px; padding: 1px 6px; border-radius: 999px;
  background: #FFE5C8; color: #B45A14; font-weight: 700;
  z-index: 1;
}
.shelf-tag.expired { background: #E5E5E5; color: #888; }

/* 14. 列表菜品名称过长截断 + tooltip */
.record-name, .menu-list-name {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
}

/* 15. 全局浅色文字对比度加深 */
:root {
  --text-3: #6B5A66;
  --text-2: #4A3744;
}

/* 16. 历史就餐打分按钮弱化 */
.btn.btn-sm[data-act="dining-score"][data-old="1"] { background: #F4ECEC; color: #A8929A; }

/* 17. 首页投票 banner 整行可点（已经在 vote-banner 加 cursor:pointer，但加强热区） */
.vote-banner { min-height: 64px; }

/* 18. 食材添加按钮颜色统一 */
.cabinet-add { font-size: 16px; }

/* 19. food-body 内容对齐 */
.food-body { padding: 8px 10px 10px; }

/* 20. 数值 overflow 安全 */
.consume-num { font-weight: 800; font-size: 14px; color: var(--primary-deep); }

/* 21. 避免 min-width 撑爆 stat-card 的备用 rule（高优先级） */
.stat-row > .stat-card { flex-basis: 0; flex-grow: 1; }

/* 22. 情侣昵称 / 头像 */
.weight-settings-row {
  display: flex; align-items: center; gap: 8px;
  margin: 8px 18px 16px; padding: 12px 16px;
  background: linear-gradient(135deg, #FFF7F2, #FFF0F5);
  border-radius: 16px;
  font-size: 13px; color: var(--text-2); font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 138, 92, .15);
}
.weight-settings-row:active { transform: scale(.98); }
.weight-settings-row .ico { font-size: 16px; }
.weight-settings-row .t  { flex: 1; }
.weight-settings-row .arr { font-size: 18px; color: var(--text-3); }

/* 头像 img 通用：圆形裁剪 */
.weight-avatar, .name-avatar-box { display: flex; align-items: center; justify-content: center; }
.avatar-img { border-radius: 999px; object-fit: cover; display: block; }
.weight-avatar .avatar-img { width: 100%; height: 100%; border-radius: 999px; object-fit: cover; }
.weight-avatar > .avatar-img { width: 36px; height: 36px; }

/* 设置昵称弹窗 */
.name-cards { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.name-card {
  background: linear-gradient(135deg, #FFF8F3, #FFF2F7);
  border-radius: 16px; padding: 12px 14px;
  border: 1px solid rgba(255, 138, 92, .12);
}
.name-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.name-avatar-box {
  width: 56px; height: 56px; border-radius: 999px;
  background: #fff; overflow: hidden;
  box-shadow: 0 2px 8px rgba(255,107,120,.18);
  flex-shrink: 0;
}
.name-avatar-box .avatar-img { width: 100%; height: 100%; }
.name-info { flex: 1; }
.name-person { font-size: 13px; font-weight: 700; color: var(--text-2); }

.name-avatar-row { display: flex; gap: 8px; flex-wrap: wrap; }
.name-avatar-row .btn { padding: 6px 12px; font-size: 12px; }

/* 我 / 伴侣的 weight-card 默认 emoji 也支持头像覆盖 */
.weight-avatar {
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(255,255,255,.6);
  font-size: 22px; overflow: hidden;
}

/* 空状态的体重卡：紧凑、友好，不再出现长破折号 */
.weight-card-empty-state { padding: 14px 14px 10px; }
.weight-card-empty {
  font-size: 13px; font-weight: 800;
  color: rgba(138,74,42,0.55); padding: 4px 0; letter-spacing: .5px;
}
.weight-card.partner .weight-card-empty { color: rgba(122,59,110,0.55); }
.weight-card-foot-empty { margin-top: 6px; min-height: 4px; }
.weight-card-trend-dot { color: transparent; font-size: 10px; user-select: none; }

/* 记录弹窗 */
.weight-rtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.weight-rtab {
  font-size: 13px; font-weight: 700; color: var(--text-3); background: #F6EFF1;
  padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: all .2s;
}
.weight-rtab.on { background: var(--love); color: #fff; box-shadow: 0 2px 8px rgba(255,102,153,0.3); }

/* 详情页头部 */
.weight-detail-head {
  display: flex; align-items: center; gap: 10px; margin: 12px 0 14px;
  background: linear-gradient(135deg, #FFE7D6, #FFD6EC); border-radius: 18px; padding: 14px;
}
.weight-detail-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08); flex-shrink: 0;
}
.weight-detail-name { flex: 1; font-size: 16px; font-weight: 900; color: #8A4A2A; }

/* ============ 首页 v34 新布局 ============ */
.hero-card {
  background: linear-gradient(135deg, #FF9A62 0%, #FF6B8A 100%);
  border-radius: 22px;
  padding: 22px 18px 18px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 107, 138, .35);
  position: relative;
  overflow: hidden;
}
.hero-deco {
  position: absolute; top: 10px; right: 14px;
  font-size: 22px; letter-spacing: 4px; opacity: .55;
}
.hero-date { font-size: 12px; opacity: .9; }
.hero-title { font-size: 21px; font-weight: 900; margin-top: 8px; letter-spacing: .5px; }
.hero-sub { font-size: 13px; opacity: .95; margin-top: 6px; }
.hero-stats { display: flex; gap: 10px; margin-top: 16px; }
.hero-stat {
  flex: 1; background: rgba(255,255,255,.18);
  border-radius: 14px; padding: 9px 4px;
  text-align: center; font-size: 12px; line-height: 1.4;
}
.hero-stat b { display: block; font-size: 19px; font-weight: 900; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-item {
  background: #fff;
  border-radius: 18px;
  padding: 15px 6px 13px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  box-shadow: 0 3px 10px rgba(90, 64, 71, .06);
  cursor: pointer;
  transition: transform .15s ease;
}
.quick-item:active { transform: scale(.95); }
.quick-emoji { font-size: 28px; }
.quick-name { font-size: 12.5px; font-weight: 700; color: #5A4047; }

.fridge-mini-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px dashed #F5E6E0;
}
.fridge-mini-item:last-child { border-bottom: none; }
.fridge-mini-emoji { font-size: 20px; width: 28px; text-align: center; }
.fridge-mini-name { flex: 1; font-size: 14px; font-weight: 700; color: #5A4047; }
.fridge-mini-count { font-size: 12px; color: #A6938A; font-weight: 600; }
.fridge-mini-more { padding: 10px 4px 2px; font-size: 12px; color: #C0846F; text-align: center; }
/* ============ 首页 v37 改版（小程序风格：2x2 高频入口 + 更多收纳 + 冰箱横滑） ============ */
.app-header { position: relative; }
.header-right {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 11.5px; color: #C0846F; font-weight: 700;
  background: rgba(255,122,89,.10); border-radius: 999px; padding: 4px 10px;
  white-space: nowrap;
}
.quick-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-card {
  background: #fff; border-radius: 18px; padding: 18px 12px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: 0 3px 12px rgba(90, 64, 71, .07);
  cursor: pointer;
  transition: transform .15s ease;
}
.quick-card:active { transform: scale(.96); }
.qc-emoji { font-size: 30px; line-height: 1; }
.qc-name { font-size: 13px; font-weight: 800; color: #5A4047; }
.home-more {
  margin: 12px 0 0 auto; width: fit-content;
  font-size: 12px; font-weight: 700; color: #C0846F;
  background: #FFF1EA; border-radius: 999px; padding: 6px 16px;
  cursor: pointer; text-align: center;
}
.home-more:active { opacity: .7; }

/* 冰箱速览：横向滚动 */
.fridge-scroll {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 4px 2px 10px; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fridge-scroll::-webkit-scrollbar { display: none; }
.fridge-scroll-item {
  flex: 0 0 auto; min-width: 74px;
  background: #fff; border-radius: 16px;
  padding: 12px 8px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  box-shadow: 0 2px 8px rgba(90, 64, 71, .06);
  cursor: pointer;
}
.fridge-scroll-item:active { transform: scale(.95); }
.fs-emoji { font-size: 26px; line-height: 1; }
.fs-name {
  font-size: 12px; font-weight: 700; color: #5A4047;
  max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fs-count { font-size: 11px; color: #C0846F; font-weight: 600; }

/* 更多弹窗 */
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 6px 0 14px; }
.more-item {
  background: #FFF7F3; border: 1px solid #FFE3D6; border-radius: 16px;
  padding: 20px 10px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer;
}
.more-item:active { background: #FFEFE6; }

/* 每日总结页：累计统计 */
.summary-stats {
  display: flex; gap: 10px; margin: 12px 0 2px;
}
.summary-stat {
  flex: 1; background: #fff; border-radius: 14px;
  padding: 12px 8px; text-align: center;
  box-shadow: 0 2px 8px rgba(90, 64, 71, .05);
}
.summary-stat b { display: block; font-size: 22px; font-weight: 900; color: #FF7A59; line-height: 1.2; }
.summary-stat span { font-size: 12px; color: #A6938A; font-weight: 600; }
/* ============ 首页 v40 就餐仪表盘 ============ */
/* 顶部栏：柔和低饱和粉橘渐变，浅底深字（覆盖原来的高饱和橙） */
.app-header {
  background: linear-gradient(135deg, #FFF4EE 0%, #FFECE6 50%, #FFE7EC 100%);
  box-shadow: 0 6px 18px rgba(255, 160, 140, .18);
}
.app-header .header-title { color: #6B4A42; text-shadow: none; }
.app-header .header-sub { color: #A98F86; }
.app-header .header-back { color: #B0806F; background: rgba(255,255,255,.75); }
.header-right { color: #C07A5F; background: rgba(255,122,89,.10); }

/* 统计行（浅灰次要文字） */
.dash-stats {
  text-align: center; font-size: 12px; color: #B9A49B;
  margin: 8px 0 28px;
}

/* 投票状态主卡片：米白底 + 柔和阴影 + 充足内边距 */
.vote-main-card {
  background: #FFFDFB;
  border-radius: 26px;
  padding: 30px 26px 26px;
  box-shadow: 0 14px 34px rgba(255, 140, 120, .14);
  text-align: center;
}
.vote-main-title {
  font-size: 16px; font-weight: 700; color: #6B4A42;
  margin-bottom: 24px;
}
.vote-main-empty {
  font-size: 14px; color: #A98F86;
  padding: 6px 0 24px;
}
.vote-main-status { padding: 0 0 24px; }
.vote-main-line {
  font-size: 14px; color: #8A6A60; font-weight: 600;
  margin: 7px 0;
}
.vote-main-name {
  font-size: 12.5px; color: #B9A49B; margin-top: 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-block { width: 100%; display: block; }
.btn-secondary {
  background: #FFF1EA; color: #C07A5F;
  border: 1px solid #FFDCCB;
}

/* 今日摘要小卡片：更小尺寸、低对比度 */
.summary-mini-card {
  background: #FFFDFB;
  border-radius: 18px;
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 6px 16px rgba(255, 140, 120, .08);
  margin-top: 20px;
}
.summary-mini-label { font-size: 12px; color: #B9A49B; }
.summary-mini-value { font-size: 17px; font-weight: 800; color: #8A6A60; margin-top: 2px; }
.summary-mini-link { font-size: 12.5px; color: #C07A5F; font-weight: 600; cursor: pointer; }

/* 首页留白：模块间距拉大，底部留空 */
.page-home .section { margin-bottom: 24px; }
.page-home { padding-bottom: 48px; }
/* ============ 首页 v41 层级优化 ============ */
/* 顶部两行式排版：标题一行 + slogan 一行（不再挤同一行） */
.header-inner {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.app-header .header-title { font-size: 22px; font-weight: 800; letter-spacing: 1px; color: #6B4A42; }
.app-header .header-sub { font-size: 12px; color: #A98F86; margin-top: 1px; }

/* 统计行：第三行，浅灰弱化，与投票卡片拉开距离 */
.dash-stats { margin: 20px 0 32px; font-size: 12px; color: #999; }

/* 投票主卡片：主角，加大内边距、阴影略明显 */
.vote-main-card {
  padding: 36px 30px 34px;
  border-radius: 28px;
  box-shadow: 0 16px 40px rgba(255, 140, 120, .16);
}
.vote-main-title { font-size: 19px; font-weight: 800; color: #6B4A42; margin-bottom: 28px; }
.vote-main-empty { font-size: 13px; color: #999; padding: 8px 0 28px; }
.vote-main-status { padding: 0 0 26px; }
.vote-main-line { font-size: 15px; font-weight: 700; color: #6B4A42; }
.vote-main-sub { font-size: 13px; color: #999; margin-top: 9px; }
.vote-main-name { font-size: 12px; color: #B9A49B; margin-top: 11px; }

/* 新建按钮：低饱和粉橘单色（无渐变），max-width 80% 居中，大圆角 */
.btn-create {
  display: block; width: 80%; max-width: 300px; margin: 0 auto;
  background: #F6A184; color: #fff;
  border: none; border-radius: 999px;
  padding: 13px 0; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background .2s ease;
}
.btn-create:active { background: #EF9270; }

/* 查看详情：次要文字按钮 */
.btn-view {
  background: none; border: none;
  color: #C07A5F; font-size: 14px; font-weight: 600;
  padding: 10px 16px; cursor: pointer; border-radius: 999px;
  transition: background .2s ease;
}
.btn-view:active { background: #FFF1EA; }

/* 今日花费：次级小卡片，缩小、减淡、透明感 */
.summary-mini-card {
  background: rgba(255, 253, 251, .65);
  border-radius: 16px;
  padding: 13px 18px;
  box-shadow: 0 4px 12px rgba(255, 140, 120, .06);
  margin-top: 36px;
}
.summary-mini-label { font-size: 11.5px; color: #B9A49B; }
.summary-mini-value { font-size: 15px; font-weight: 800; color: #8A6A60; margin-top: 1px; }
.summary-mini-link { font-size: 12px; color: #C07A5F; font-weight: 600; cursor: pointer; }
/* ============ 首页 v42：近期动态摘要 + 间距收拢 ============ */
/* 近期动态摘要：只读状态卡，视觉弱于投票主卡 */
.recent-card {
  background: rgba(255, 253, 251, .7);
  border-radius: 18px;
  padding: 18px 20px 14px;
  box-shadow: 0 5px 14px rgba(255, 140, 120, .07);
}
.recent-title { font-size: 13px; font-weight: 700; color: #8A6A60; margin-bottom: 10px; }
.recent-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed #F6E8E2;
}
.recent-row:last-of-type { border-bottom: none; }
.recent-dot { color: #E8A08A; font-size: 12px; flex: none; }
.recent-label { font-size: 12.5px; color: #B9A49B; flex: none; }
.recent-value {
  flex: 1; font-size: 13px; color: #7A5C52; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right;
}
.recent-link {
  text-align: center; font-size: 12.5px; color: #C07A5F; font-weight: 600;
  padding: 11px 0 2px; cursor: pointer;
}
.recent-link:active { opacity: .7; }

/* 间距收拢：消除巨量空白，但保留呼吸感 */
.page-home .section { margin-bottom: 18px; }
.page-home { padding-bottom: 26px; }
.dash-stats { margin: 16px 0 24px; }
/* ============ 首页 v45：生活小面板（多业务轻触达，纯文字链接） ============ */
.life-panel {
  background: rgba(255, 253, 251, .72);
  border-radius: 20px;
  padding: 8px 18px;
  box-shadow: 0 5px 14px rgba(255, 140, 120, .07);
}
.life-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0;
  border-bottom: 1px dashed #F6E8E2;
  cursor: pointer;
}
.life-row:last-child { border-bottom: none; }
.life-row:active { opacity: .65; }
.life-emoji { font-size: 20px; flex: none; width: 30px; text-align: center; }
.life-info { flex: 1; min-width: 0; }
.life-title { font-size: 14px; font-weight: 700; color: #6B4A42; }
.life-sub { font-size: 12px; color: #B9A49B; margin-top: 2px; }
.life-link { font-size: 12.5px; color: #C07A5F; font-weight: 600; flex: none; }
/* ============ 首页 v46：本周小快照（只读聚合，无跳转） ============ */
.week-card {
  background: rgba(255, 253, 251, .72);
  border-radius: 20px;
  padding: 18px 20px 14px;
  box-shadow: 0 5px 14px rgba(255, 140, 120, .07);
}
.week-title { font-size: 13px; font-weight: 700; color: #8A6A60; margin-bottom: 12px; }
.week-item {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed #F6E8E2;
}
.week-item:last-child { border-bottom: none; }
.week-label { font-size: 13px; color: #8A6A60; font-weight: 600; }
.week-value { font-size: 14px; color: #6B4A42; font-weight: 800; }
/* ============ 首页 v47：顶部花费 + 冰箱预警 + 调料台 ============ */
/* 顶部信息区：今日花费大号 */
.top-info {
  text-align: center;
  padding: 22px 0 26px;
}
.ti-label { font-size: 12.5px; color: #B9A49B; font-weight: 600; }
.ti-num {
  font-size: 34px; font-weight: 900; color: #6B4A42;
  margin-top: 6px; letter-spacing: .5px;
}

/* 预警/调料通用卡片（弱于投票主卡） */
.warn-card {
  background: rgba(255, 253, 251, .75);
  border-radius: 20px;
  padding: 16px 18px 12px;
  box-shadow: 0 6px 16px rgba(255, 140, 120, .08);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.card-title { font-size: 14px; font-weight: 800; color: #6B4A42; }
.card-more { font-size: 12.5px; color: #C07A5F; font-weight: 600; cursor: pointer; }
.warn-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px dashed #F6E8E2;
}
.warn-row:last-of-type { border-bottom: none; }
.warn-emoji { font-size: 18px; flex: none; width: 26px; text-align: center; }
.warn-name { font-size: 13.5px; font-weight: 700; color: #6B4A42; flex: none; width: 62px; }
.warn-val { flex: 1; font-size: 12.5px; color: #A98F86; text-align: right; }
.warn-status { font-size: 12px; font-weight: 700; flex: none; }
.warn-status.ok { color: #6FAE6E; }
.warn-status.warn { color: #E8805C; }
.warn-tip { font-size: 11px; color: #C8B2A6; text-align: center; padding: 8px 0 2px; }
.warn-empty { text-align: center; font-size: 13px; color: #B9A49B; padding: 18px 6px; }

/* 调料台管理页 */
.page-spices .spice-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px dashed #F5E6E0;
}
.page-spices .spice-item:last-child { border-bottom: none; }
.spice-emoji { font-size: 22px; flex: none; }
.spice-name { font-size: 14.5px; font-weight: 800; color: #5A4047; }
.spice-detail { font-size: 12px; color: #A6938A; margin-top: 3px; }
.preset-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 4px 2px;
}
.preset-chip {
  background: #FFF1EA; border: 1px solid #FFE0D0; border-radius: 999px;
  padding: 9px 16px; font-size: 13.5px; font-weight: 700; color: #B0715A;
  cursor: pointer;
}
.preset-chip:active { background: #FFE4D4; }

/* 冰箱页：预警设置入口 */
.fridge-warn-entry {
  text-align: center; font-size: 12.5px; color: #C07A5F; font-weight: 600;
  padding: 16px 0 4px; cursor: pointer;
}
/* ============ 首页 v48：快过期预警 + 保质期三选一 ============ */
/* 过期标记：🟡 黄 / 🔴 红 */
.warn-status.exp { color: #D9A441; }
.warn-status.warn { color: #E8805C; }
.exp-source { font-size: 10.5px; color: #C8B2A6; flex: none; }
.exp-expand {
  text-align: center; font-size: 12.5px; color: #C07A5F; font-weight: 700;
  padding: 10px 0 4px; cursor: pointer;
}
.warn-info {
  font-size: 11.5px; color: #A98F86; line-height: 1.5;
  padding: 2px 2px 8px 38px;
}

/* 保质期三选一表单 */
.shelf-radio {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: #6B4A42; margin-right: 14px; cursor: pointer;
}
.shelf-radio input { accent-color: #FF7A59; }
.shelf-tip { color: #C0846F; background: #FFF6F0; border-radius: 10px; padding: 8px 10px; line-height: 1.55; }
/* ============ v54：体重页对齐优化 + 冰箱自定义图标 ============ */
/* 头像：34px 圆形容器内图片应为 30px，避免溢出错位 */
.weight-avatar > .avatar-img { width: 30px !important; height: 30px !important; }
/* 体重数字与日期居中对齐，双人卡片视觉一致 */
.weight-card-w { text-align: center; }
.weight-card-date { text-align: center; }
/* 底部趋势行：与居中数字呼应，左右两端对齐 */
.weight-card-foot { align-items: center; }

/* 冰箱/零食弹窗：自定义图标输入框 */
#it-emoji-input { font-size: 16px; text-align: center; letter-spacing: 2px; }
/* ============ v55：菜品库批量上传/批量删除 ============ */
.food-head-actions { display: flex; align-items: center; gap: 10px; }
.batch-hint {
  text-align: center; font-size: 12px; color: #C07A5F; font-weight: 600;
  background: #FFF1EA; border-radius: 999px; padding: 6px 10px; margin: 0 2px 10px;
}
.food-card.batch-card { position: relative; cursor: pointer; }
.batch-check {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #FFB8A0; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: #fff;
}
.food-card.batch-card.selected .batch-check { background: #FF7A59; border-color: #FF7A59; }
/* ============ v56：体重详情页头像 + 修复 ============ */
.weight-detail-avatar .avatar-img {
  width: 38px !important; height: 38px !important;
  border-radius: 50%; object-fit: cover;
}
/* v59：今日花费可点击进每日总结 */
.ti-link { font-size: 11.5px; color: #C07A5F; font-weight: 600; margin-top: 5px; }
/* ============ v61：零食柜新排版（卡片列表 + 保质期状态） ============ */
.snack-stats { display: flex; gap: 10px; margin-bottom: 12px; }
.snack-stat {
  flex: 1; background: #fff; border-radius: 14px;
  padding: 12px 8px; text-align: center;
  box-shadow: 0 2px 8px rgba(90, 64, 71, .05);
}
.snack-stat b { display: block; font-size: 20px; font-weight: 900; color: #FF7A59; line-height: 1.2; }
.snack-stat span { font-size: 11.5px; color: #A6938A; font-weight: 600; }

.snack-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px dashed #F5E6E0;
}
.snack-card:last-child { border-bottom: none; }
.snack-card-emoji { font-size: 28px; flex: none; width: 36px; text-align: center; }
.snack-card-info { flex: 1; min-width: 0; }
.snack-card-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.snack-card-name { font-size: 14.5px; font-weight: 800; color: #5A4047; }
.snack-card-exp { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.snack-card-exp.warn { color: #E8805C; background: #FFF0EA; }
.snack-card-exp.exp { color: #D9A441; background: #FFF7E6; }
.snack-card-exp.info { color: #A98F86; background: #F6F1EF; }
.snack-card-detail { font-size: 12px; color: #A6938A; margin-top: 3px; }
.snack-card-tip { font-size: 11px; color: #C8B2A6; margin-top: 4px; line-height: 1.45; }
.snack-card-stepper { display: flex; align-items: center; gap: 6px; flex: none; }
.snack-del { flex: none; background: none; border: none; font-size: 16px; cursor: pointer; opacity: .7; padding: 4px; }
.snack-del:active { opacity: 1; }
/* ============ v64：我的页新设计（Hero 卡 + 分段 tab） ============ */
.mine-hero {
  background: linear-gradient(135deg, #FFF0EA 0%, #FFE3EC 100%);
  border-radius: 24px; padding: 20px 18px 16px;
  margin: 12px 0 16px;
  box-shadow: 0 8px 20px rgba(255, 140, 120, .12);
}
.mine-hero-top { display: flex; align-items: center; gap: 12px; }
.mine-hero-avatars { display: flex; flex: none; }
.mine-hero-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.08); overflow: hidden;
}
.mine-hero-avatar.b { margin-left: -10px; }
.mine-hero-avatar .avatar-img {
  width: 36px !important; height: 36px !important;
  border-radius: 50%; object-fit: cover;
}
.mine-hero-name { font-size: 18px; font-weight: 900; color: #6B4A42; }
.mine-hero-bio { font-size: 12px; color: #A98F86; margin-top: 3px; }
.mine-hero-stats { display: flex; gap: 8px; margin-top: 14px; }
.mhs-item {
  flex: 1; background: rgba(255,255,255,.75); border-radius: 12px;
  padding: 8px 4px; text-align: center;
}
.mhs-item b { display: block; font-size: 18px; font-weight: 900; color: #FF7A59; line-height: 1.2; }
.mhs-item span { font-size: 11px; color: #A98F86; font-weight: 600; }

/* 分段式 tab */
.mine-tabs { display: flex; background: #F6F0ED; border-radius: 999px; padding: 4px; }
.mine-tab {
  flex: 1; text-align: center; font-size: 13px; font-weight: 700;
  color: #A98F86; padding: 9px 0; border-radius: 999px; cursor: pointer;
  transition: all .2s;
}
.mine-tab.active { background: #fff; color: #FF7A59; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
/* ============ v64：我的页新设计（Hero 卡 + 分段 tab） ============ */
.mine-hero {
  background: linear-gradient(135deg, #FFF0EA 0%, #FFE3EC 100%);
  border-radius: 24px; padding: 20px 18px 16px;
  margin: 12px 0 16px;
  box-shadow: 0 8px 20px rgba(255, 140, 120, .12);
}
.mine-hero-top { display: flex; align-items: center; gap: 12px; }
.mine-hero-avatars { display: flex; flex: none; }
.mine-hero-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.08); overflow: hidden;
}
.mine-hero-avatar.b { margin-left: -10px; }
.mine-hero-avatar .avatar-img {
  width: 36px !important; height: 36px !important;
  border-radius: 50%; object-fit: cover;
}
.mine-hero-name { font-size: 18px; font-weight: 900; color: #6B4A42; }
.mine-hero-bio { font-size: 12px; color: #A98F86; margin-top: 3px; }
.mine-hero-stats { display: flex; gap: 8px; margin-top: 14px; }
.mhs-item {
  flex: 1; background: rgba(255,255,255,.75); border-radius: 12px;
  padding: 8px 4px; text-align: center;
}
.mhs-item b { display: block; font-size: 18px; font-weight: 900; color: #FF7A59; line-height: 1.2; }
.mhs-item span { font-size: 11px; color: #A98F86; font-weight: 600; }

/* 分段式 tab */
.mine-tabs { display: flex; background: #F6F0ED; border-radius: 999px; padding: 4px; }
.mine-tab {
  flex: 1; text-align: center; font-size: 13px; font-weight: 700;
  color: #A98F86; padding: 9px 0; border-radius: 999px; cursor: pointer;
  transition: all .2s;
}
.mine-tab.active { background: #fff; color: #FF7A59; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
/* ============ v65：体重页响应式 + 投票卡双按钮 + 弹窗取消 ============ */
/* 投票主卡：活跃态双按钮（查看详情 + 新建投票） */
.vote-main-actions { display: flex; justify-content: center; gap: 6px; }

/* 体重页：窄屏自适应（不同手机不再乱版） */
.weight-pair { min-width: 0; }
.weight-card { min-width: 0; }
.weight-card-top { flex-wrap: nowrap; min-width: 0; }
.weight-card-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weight-card-foot { flex-wrap: wrap; }
.weight-detail-head { flex-wrap: wrap; }
.weight-detail-head .btn { margin-left: auto; }
.health-log-row {
  grid-template-columns: auto minmax(0, 1fr) auto 28px;
  min-width: 0;
}
.health-log-date { white-space: nowrap; }
.health-log-weight { white-space: nowrap; }
.health-log-bmi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

@media (max-width: 380px) {
  .weight-pair { grid-template-columns: 1fr; }
  .weight-card-w { font-size: 24px; }
}
/* ============ v66：食材预警自定义类别 ============ */
.warn-set-list { max-height: 46vh; overflow-y: auto; }
.warn-set-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px dashed #F5E6E0; }
.warn-set-row:last-child { border-bottom: none; }
.warn-set-emoji { font-size: 24px; flex: none; width: 32px; text-align: center; }
.warn-set-name { font-size: 14px; font-weight: 800; color: #5A4047; display: flex; align-items: center; gap: 8px; }
.warn-set-tag {
  font-size: 10.5px; color: #C07A5F; background: #FFF1EA;
  border-radius: 999px; padding: 2px 8px; font-weight: 600;
}
.warn-set-controls { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.warn-set-thr { width: 72px !important; text-align: center; }
.warn-set-unit { font-size: 12.5px; color: #A6938A; font-weight: 600; }
/* ============ v67：调料余量预警可视化 ============ */
.spice-status {
  flex: none; font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 4px 10px;
}
.spice-status.warn { color: #E8805C; background: #FFF0EA; }
.spice-status.ok { color: #6FAE6E; background: #F0FAF0; }
/* v69：投票删除入口 */
.vote-main-del {
  text-align: center; font-size: 12px; color: #C07A5F; font-weight: 600;
  margin-top: 10px; cursor: pointer; opacity: .8;
}
.vote-main-del:active { opacity: 1; }