/**
 * [INPUT]: 依赖 CSS 变量多主题设计系统 (Bento Grid / Fresh Market / Neo-Brutalist) 与移动端响应式布局规范
 * [OUTPUT]: 对外提供三套视觉主题令牌、主题切换器、分段器主控、智能摘要胶囊、平滑内联抽屉、健康画像卡片与微动效类
 * [POS]: 前端视效层，服务于 what_to_eat_app.html
 * [PROTOCOL]: 变更时更新此头部，然后检查 CLAUDE.md
 */
:root, [data-theme="bento"] {
  --bg-page: #ECECF0;
  --bg-viewport: #FAFAFB;
  --bg-cream: var(--bg-viewport);
  --card-white: #FFFFFF;
  --border-color: #E2E2E8;
  --border-width: 1px;
  --text-main: #18181B;
  --text-muted: #71717A;
  --gray-light: #F1F1F4;
  --gray-crossed: #E4E4E8;
  --coral-orange: #F97316;
  --coral-light: #FFF1E7;
  --coral-hover: #EA580C;
  --sage-green: #0D9488;
  --sage-light: #E6FFFA;
  --sage-hover: #0F766E;
  --shadow-sm: 0 1px 3px rgba(24, 24, 27, 0.05);
  --shadow-md: 0 4px 12px rgba(24, 24, 27, 0.06);
  --shadow-lg: 0 8px 24px rgba(24, 24, 27, 0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;
}

[data-theme="fresh"] {
  --bg-page: #EFE9DF;
  --bg-viewport: #FFFBF5;
  --bg-cream: var(--bg-viewport);
  --card-white: #FFFFFF;
  --border-color: #EFE8DE;
  --border-width: 1px;
  --text-main: #2B2523;
  --text-muted: #7D7571;
  --gray-light: #F6F2EC;
  --gray-crossed: #EAE3DA;
  --coral-orange: #E85D3F;
  --coral-light: #FDEEEB;
  --coral-hover: #D54F32;
  --sage-green: #2E7D5B;
  --sage-light: #EAF4EF;
  --sage-hover: #26684C;
  --shadow-sm: 0 2px 8px rgba(43, 37, 35, 0.05);
  --shadow-md: 0 6px 20px rgba(43, 37, 35, 0.08);
  --shadow-lg: 0 12px 32px rgba(232, 93, 63, 0.15);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
}

[data-theme="brutalist"] {
  --bg-page: #FEF08A;
  --bg-viewport: #FFFDF8;
  --bg-cream: var(--bg-viewport);
  --card-white: #FFFFFF;
  --border-color: #18181B;
  --border-width: 2px;
  --text-main: #18181B;
  --text-muted: #4B5563;
  --gray-light: #F3F4F6;
  --gray-crossed: #E5E7EB;
  --coral-orange: #FF4400;
  --coral-light: #FFE8E0;
  --coral-hover: #E03C00;
  --sage-green: #059669;
  --sage-light: #D1FAE5;
  --sage-hover: #047857;
  --shadow-sm: 2px 2px 0 #18181B;
  --shadow-md: 3.5px 3.5px 0 #18181B;
  --shadow-lg: 5px 5px 0 #18181B;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-pill: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
body { background-color: var(--bg-page); color: var(--text-main); display: flex; justify-content: center; min-height: 100vh; font-size: 15px; line-height: 1.5; transition: background-color 0.25s ease; }
.app-viewport { width: 100%; max-width: 480px; background-color: var(--bg-viewport); min-height: 100vh; display: flex; flex-direction: column; position: relative; box-shadow: 0 0 40px rgba(0,0,0,0.08); overflow-x: hidden; padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transition: background-color 0.25s ease; }
.app-header { padding: 14px 16px 10px; display: flex; align-items: center; justify-content: space-between; background-color: var(--bg-viewport); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border-color); gap: 8px; }
.app-brand { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.app-icon { display: inline-block; vertical-align: -0.15em; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; flex-shrink: 0; }
.brand-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--coral-orange); }
.app-title { font-size: 17px; font-weight: 800; color: var(--text-main); letter-spacing: -0.3px; }

/* 顶部风格切换器 */
.theme-switcher { display: inline-flex; background-color: var(--gray-light); border: var(--border-width) solid var(--border-color); border-radius: var(--radius-pill); padding: 2px; gap: 2px; box-shadow: var(--shadow-sm); flex-shrink: 0; }
.theme-pill { height: 26px; padding: 0 7px; border: none; background: transparent; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.18s ease; white-space: nowrap; }
.theme-pill.active { background-color: var(--card-white); color: var(--coral-orange); box-shadow: var(--shadow-sm); }
[data-theme="brutalist"] .theme-pill.active { background-color: #18181B; color: #FFFFFF; box-shadow: none; }
[data-theme="brutalist"] .category-card,
[data-theme="brutalist"] .context-bar,
[data-theme="brutalist"] .result-card,
[data-theme="brutalist"] .main-btn,
[data-theme="brutalist"] .tab-section,
[data-theme="brutalist"] .health-preset-card { border-width: 2px; }
[data-theme="brutalist"] .main-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #18181B; }
.app-slogan { font-size: 11px; color: var(--coral-orange); font-weight: 600; background-color: var(--coral-light); padding: 2px 8px; border-radius: var(--radius-pill); }
.tab-content { display: none; padding: 10px 16px 24px; flex: 1; }
.tab-content.active { display: block; animation: fadeIn 0.25s ease-out; }
@keyframes fadeIn { from; }
to { opacity: 1; transform: translateY(0); }


.context-bar { background-color: var(--card-white); border-radius: var(--radius-md); padding: 10px 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); margin-bottom: 14px; transition: all 0.25s ease; }
.context-top-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.slot-segmented { flex: 1; display: flex; background-color: var(--gray-light); padding: 3px; border-radius: var(--radius-pill); border: 1px solid var(--border-color); gap: 2px; }
.slot-pill { flex: 1; height: 28px; border: none; background: transparent; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1); }
.slot-pill.active { background-color: var(--card-white); color: var(--coral-orange); font-weight: 700; box-shadow: 0 1px 4px rgba(43, 37, 35, 0.12); }
.context-summary-capsule { height: 32px; padding: 0 10px; border-radius: var(--radius-pill); border: 1px solid var(--border-color); background-color: var(--gray-light); color: var(--text-main); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; transition: all 0.2s ease; flex-shrink: 0; }
.context-summary-capsule:active { transform: scale(0.97); }
.context-summary-capsule.active-guard { background-color: #EAF5EE; border-color: #A3D4B8; color: #1E6346; }
.context-summary-capsule .chevron-icon { transition: transform 0.25s ease; color: var(--text-muted); }
.context-summary-capsule.open .chevron-icon { transform: rotate(180deg); }
.scene-row { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
.scene-row::-webkit-scrollbar { display: none; }
.scene-chip { white-space: nowrap; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 11.5px; background-color: var(--bg-cream); border: 1px solid var(--border-color); color: var(--text-muted); cursor: pointer; transition: all 0.15s; }
.scene-chip.active { background-color: var(--sage-light); color: var(--sage-green); border-color: var(--sage-green); font-weight: 700; }
.context-drawer { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.2s ease; opacity: 1; overflow: hidden; border-top: 1px dashed var(--border-color); margin-top: 8px; padding-top: 8px; }
.context-drawer.collapsed { grid-template-rows: 0fr; opacity: 0; margin-top: 0; padding-top: 0; border-top: none; pointer-events: none; }
.drawer-content { min-height: 0; display: flex; flex-direction: column; gap: 7px; }
.drawer-group { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.drawer-group::-webkit-scrollbar { display: none; }
.drawer-group-title { font-size: 11px; font-weight: 700; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.drawer-chips-wrap { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.season-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.season-row::-webkit-scrollbar { display: none; }
.season-row-title { font-size: 11px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.season-chip { white-space: nowrap; padding: 4px 9px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 600; background-color: var(--bg-cream); border: 1px solid var(--border-color); color: var(--text-muted); cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; gap: 4px; }
.season-chip.active { font-weight: 700; }
.season-chip[data-season="winter"].active { background-color: #FDEEEB; color: #E85D3F; border-color: #E85D3F; box-shadow: 0 1px 4px rgba(232, 93, 63, 0.2); }
.season-chip[data-season="summer"].active { background-color: #E3F2FD; color: #1976D2; border-color: #1976D2; box-shadow: 0 1px 4px rgba(25, 118, 210, 0.2); }
.season-chip[data-season="all"].active { background-color: #EAF4EF; color: #2E7D5B; border-color: #2E7D5B; box-shadow: 0 1px 4px rgba(46, 125, 91, 0.2); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin: 14px 2px 8px; }
.section-title { font-size: 14px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 6px; }
.restore-btn { font-size: 12px; color: var(--coral-orange); background: none; border: none; cursor: pointer; font-weight: 600; padding: 4px 6px; }
.categories-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.category-card { background-color: var(--card-white); border-radius: var(--radius-md); padding: 12px; border: 1.5px solid var(--border-color); box-shadow: var(--shadow-sm); position: relative; cursor: pointer; overflow: hidden; transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1); display: flex; flex-direction: column; justify-content: space-between; min-height: 86px; }
.category-card:active {  }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--coral-orange); }
.category-card.crossed .card-icon { color: var(--text-muted); }
.card-count-badge { font-size: 11px; font-weight: 700; color: var(--coral-orange); background-color: var(--coral-light); padding: 2px 7px; border-radius: var(--radius-pill); }
.card-name { font-size: 15px; font-weight: 700; margin: 4px 0 2px; }
.card-hint { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-card.crossed { background-color: var(--gray-crossed); border-color: #DDD4C7; opacity: 0.6; }
.category-card.crossed .card-name { text-decoration: line-through; color: var(--text-muted); }
.category-card.crossed .card-count-badge { background-color: #D3CBC0; color: #6E6763; }
.crossed-stamp { display: none; position: absolute; top: 14px; right: -18px; background-color: #BA3D24; color: #fff; font-size: 10px; font-weight: 800; padding: 2px 24px; transform: rotate(30deg); box-shadow: 0 1px 4px rgba(0,0,0,0.2); letter-spacing: 1px; }
.category-card.crossed .crossed-stamp {  }
.decision-action-box { margin: 16px 0; text-align: center; }
.main-btn { width: 100%; height: 52px; background: linear-gradient(135deg, #EE6948 0%, #D84F31 100%); color: #ffffff; border: none; border-radius: var(--radius-pill); font-size: 17px; font-weight: 800; letter-spacing: 0.5px; cursor: pointer; box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; }
.main-btn:active { transform: scale(0.98); filter: brightness(0.95); }
.main-btn:disabled { background: #C7BFB5; cursor: not-allowed; box-shadow: none; transform: none; }
.roast-banner { background-color: var(--card-white); border-radius: var(--radius-md); padding: 10px 14px; margin-bottom: 16px; border: 1px dashed #E2D7C8; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.roast-hearts { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.roast-heart-icon { color: var(--coral-orange); transition: all 0.2s ease; }
.roast-heart-icon.empty { color: #DDD5CA; }
.roast-text { color: var(--coral-orange); font-weight: 600; flex: 1; line-height: 1.4; text-align: left; }
.result-card-container { display: none; margin-top: 10px; }
.result-card-container.visible { display: block; animation: popIn 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28); }
@keyframes popIn { 0%; }
100% { opacity: 1; transform: scale(1); }


.result-card { background-color: var(--card-white); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-md); border: 2px solid var(--coral-light); position: relative; }
.result-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.dish-title-wrap {  }
.dish-badges { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: 3px; }
.badge-category { background-color: var(--coral-light); color: var(--coral-orange); }
.badge-status { background-color: #FFF3D6; color: #B26A00; }
.dish-name { font-size: 22px; font-weight: 800; color: var(--text-main); line-height: 1.3; }
.dish-ops { display: flex; gap: 6px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-color); background-color: var(--gray-light); display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; transition: all 0.15s; }
.icon-btn.active { background-color: #FFF2D1; border-color: #F4C430; color: #C68A00; }
.dim-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; }
.dim-tag { font-size: 12px; color: var(--text-muted); background-color: var(--bg-cream); padding: 4px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); display: flex; align-items: center; gap: 4px; }
.diagnosis-quote { background-color: #FAF6EF; border-left: 3px solid var(--coral-orange); padding: 10px 14px; border-radius: 4px var(--radius-sm) var(--radius-sm) 4px; margin: 12px 0 16px; font-size: 13.5px; color: #5D524C; font-style: italic; line-height: 1.5; }
.choice-actions { display: flex; gap: 10px; margin-top: 14px; }
.reroll-btn { flex: 1; height: 46px; background-color: var(--gray-light); color: var(--text-main); border: 1px solid var(--border-color); border-radius: var(--radius-pill); font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.2s; }
.reroll-btn:disabled { background-color: #ECE7DF; color: #A8A19B; cursor: not-allowed; }
.accept-btn { flex: 1.4; height: 46px; background: linear-gradient(135deg, #378E68 0%, #266B4E 100%); color: #fff; border: none; border-radius: var(--radius-pill); font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 14px rgba(46, 125, 91, 0.3); display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.2s; }
.accept-btn:active {  }
.last-mile-bar { margin-top: 18px; padding-top: 16px; padding-bottom: 6px; border-top: 1px solid var(--border-color); display: flex; gap: 8px; }
.mile-btn { flex: 1; height: 42px; border-radius: var(--radius-md); border: 1px solid var(--border-color); background-color: var(--bg-cream); font-size: 12.5px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; text-decoration: none; transition: all 0.15s; }
.mile-btn:active {  }
.tab-section { background-color: var(--card-white); border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.taboo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.taboo-chip { height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background-color: var(--gray-light); display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; color: var(--text-main); cursor: pointer; transition: all 0.15s; text-align: center; padding: 0 4px; }
.taboo-chip.active { background-color: #FDE8E4; border-color: #E85D3F; color: #C03719; font-weight: 700; }
.form-group { position: relative; margin-bottom: 10px; }
.form-label { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; display: block; }
.form-input { width: 100%; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); padding: 0 12px; font-size: 14px; background-color: var(--bg-cream); color: var(--text-main); outline: none; transition: border-color 0.2s, background-color 0.2s; box-sizing: border-box; }
.form-input:focus { border-color: var(--coral-orange); background-color: #fff; box-shadow: 0 0 0 3px rgba(232, 93, 63, 0.12); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.form-row-2:nth-of-type(1) { position: relative; z-index: 25; }
.form-row-2:nth-of-type(2) { position: relative; z-index: 15; }

/* ==========================================================================
   自定义下拉选择器视效系统 (食欲暖调 + 灵动微动效)
   ========================================================================== */
.custom-select-wrap { position: relative; width: 100%; }
.custom-select-wrap.is-open { z-index: 50; }
.custom-select-native { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; }
.custom-select-trigger { width: 100%; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); padding: 0 10px 0 12px; background-color: var(--bg-cream); color: var(--text-main); display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1); outline: none; box-sizing: border-box; font-family: inherit; }
.custom-select-trigger:hover { background-color: #fff; border-color: #ded6cc; }
.custom-select-trigger:focus-visible, .custom-select-wrap.is-open .custom-select-trigger { border-color: var(--coral-orange); background-color: #fff; box-shadow: 0 0 0 3px rgba(232, 93, 63, 0.12); }
.trigger-content { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-opt-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--coral-orange); flex-shrink: 0; }
.select-chevron { display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.3, 1), color 0.2s; flex-shrink: 0; }
.custom-select-wrap.is-open .select-chevron { transform: rotate(180deg); color: var(--coral-orange); }
.custom-select-menu { position: absolute; top: calc(100% + 5px); left: 0; right: 0; min-width: 100%; background-color: var(--card-white); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: 0 12px 30px rgba(43, 37, 35, 0.12), 0 3px 8px rgba(43, 37, 35, 0.05); padding: 4px; z-index: 100; max-height: 220px; overflow-y: auto; opacity: 0; transform: translateY(-6px) scale(0.97); pointer-events: none; transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); scrollbar-width: thin; }
.custom-select-wrap.is-open .custom-select-menu { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.custom-select-option { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 10px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; color: var(--text-main); cursor: pointer; transition: background-color 0.15s, color 0.15s, transform 0.1s; white-space: nowrap; user-select: none; }
.custom-select-option:hover { background-color: var(--gray-light); color: var(--coral-orange); }
.custom-select-option:active { transform: scale(0.98); }
.custom-select-option.selected { background-color: var(--coral-light); color: var(--coral-orange); font-weight: 700; }
.opt-left { display: flex; align-items: center; gap: 7px; }
.opt-check { display: inline-flex; align-items: center; justify-content: center; color: var(--coral-orange); margin-left: auto; }

/* 现代 CSS base-select 渐进增强 (支持 Chromium 135+ / Safari 27 顶级层与可定制下拉规范) */
@supports (appearance: base-select) {
  .form-select, .form-select::picker(select) { appearance: base-select; }
  .form-select { background-color: var(--bg-cream); color: var(--text-main); border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-weight: 600; font-size: 13.5px; }
  .form-select::picker(select) { background-color: var(--card-white); border-radius: var(--radius-md); box-shadow: 0 12px 30px rgba(43, 37, 35, 0.12); border: 1px solid var(--border-color); padding: 4px; opacity: 0; transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), display 0.2s; transition-behavior: allow-discrete; }
  .form-select:open::picker(select) { opacity: 1; }
  @starting-style { .form-select:open::picker(select) { opacity: 0; } }
}

@media (prefers-reduced-motion: reduce) {
  .custom-select-menu, .select-chevron { transition: none !important; }
}
.submit-btn { width: 100%; height: 44px; background-color: var(--sage-green); color: #fff; border: none; border-radius: var(--radius-pill); font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 6px; }
.search-box { display: flex; gap: 8px; margin-bottom: 12px; }
.dish-list { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; padding-right: 4px; }
.dish-row-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background-color: var(--bg-cream); border-radius: var(--radius-sm); border: 1px solid var(--border-color); }
.item-left { display: flex; align-items: center; gap: 8px; }
.item-name { font-size: 14px; font-weight: 700; }
.item-cat { font-size: 11px; color: var(--text-muted); background-color: var(--gray-light); padding: 2px 6px; border-radius: 4px; }
.item-right { display: flex; align-items: center; gap: 6px; }
.slider-box {  }
.slider-header { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.cd-slider { width: 100%; accent-color: var(--coral-orange); height: 6px; cursor: pointer; }
.slider-desc { font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.4; }
.history-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-height: 480px; overflow-y: auto; }
.history-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background-color: var(--bg-cream); border-radius: var(--radius-sm); border: 1px solid var(--border-color); }
.history-info { display: flex; flex-direction: column; gap: 2px; }
.history-dish { font-size: 14px; font-weight: 700; }
.history-time { font-size: 11px; color: var(--text-muted); }
.history-badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-pill); }
.badge-cd-cooling { background-color: #FCE8E6; color: #C5221F; }
.badge-cd-recovering { background-color: #FEF7E0; color: #B06000; }
.badge-cd-full { background-color: #E6F4EA; color: #137333; }
.tab-bar { position: fixed; bottom: 0; width: 100%; max-width: 480px; height: calc(64px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-around; z-index: 100; }
.tab-btn { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 11px; font-weight: 600; transition: all 0.15s; }
.tab-btn .tab-icon { display: inline-flex; align-items: center; justify-content: center; }
.tab-btn.active { color: var(--coral-orange); font-weight: 700; }
.toast-container { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); background-color: rgba(43, 37, 35, 0.92); color: #fff; padding: 10px 18px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; z-index: 999; pointer-events: none; opacity: 0; transition: all 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28); max-width: 90%; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
.toast-container.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }
.confetti-box { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 998; overflow: hidden; }
.confetti-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; animation: fall 1.2s ease-out forwards; }
@keyframes fall { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(80vh) scale(0.3) rotate(360deg); opacity: 0; } }

/* ==========================================================================
   健康画像与生化营养指示视效系统
   ========================================================================== */
.health-quick-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.health-quick-row::-webkit-scrollbar { display: none; }
.health-row-title { font-size: 11px; font-weight: 700; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.health-pill { height: 26px; padding: 0 9px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; border: 1px solid var(--border-color); background-color: var(--bg-cream); color: var(--text-main); cursor: pointer; white-space: nowrap; transition: all 0.15s; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.health-pill.active { background-color: #E6F4EA; border-color: #2E7D5B; color: #1E6346; font-weight: 700; box-shadow: 0 1px 4px rgba(46, 125, 91, 0.2); }
.health-pill.pill-iodine.active { background-color: #FDE8E4; border-color: #E85D3F; color: #C03719; box-shadow: 0 1px 4px rgba(232, 93, 63, 0.2); }

.badge-health-warn { background-color: #FEF3D6 !important; color: #9A5B00 !important; }
.badge-health-bonus { background-color: #E6F4EA !important; color: #1E6346 !important; }
.badge-health-block { background-color: #FCE8E6 !important; color: #C5221F !important; }

.dim-tag.dim-nutrient { background-color: #F3EFE6; border-color: #E4DCCF; font-weight: 600; color: #5D524C; }
.dim-tag.tag-iodine-high { background-color: #FDE8E4; border-color: #F8B4A6; color: #C03719; font-weight: 700; }
.dim-tag.tag-purine-high { background-color: #FFF0D4; border-color: #F6D69D; color: #B06000; font-weight: 700; }
.dim-tag.dim-thermal-hot { background-color: #FDEEEB; color: #C03719; border-color: #F8C6BC; font-weight: 700; }
.dim-tag.dim-thermal-cold { background-color: #E3F2FD; color: #0D47A1; border-color: #BBDEFB; font-weight: 700; }
.dim-tag.dim-thermal-warm { background-color: #FFF8E1; color: #B26A00; border-color: #FFE082; font-weight: 600; }

.health-advice-box { background-color: #F4F9F6; border-left: 3px solid #2E7D5B; border-radius: 4px var(--radius-sm) var(--radius-sm) 4px; padding: 10px 14px; margin: 10px 0 14px; text-align: left; }
.advice-title { font-size: 12px; font-weight: 800; color: #2E7D5B; margin-bottom: 2px; }
.advice-content { font-size: 12.5px; color: #375245; line-height: 1.45; }

.health-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
.health-presets-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.health-preset-card { border: 1.5px solid var(--border-color); border-radius: var(--radius-md); padding: 10px 12px; background-color: var(--bg-cream); cursor: pointer; transition: all 0.2s; }
.health-preset-card.active { background-color: #F2F8F4; border-color: #2E7D5B; box-shadow: 0 2px 6px rgba(46, 125, 91, 0.12); }
.preset-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.preset-name { font-size: 13.5px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 6px; }
.preset-status { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-pill); background-color: #E2DAD0; color: #6E6763; transition: all 0.2s; }
.health-preset-card.active .preset-status { background-color: #2E7D5B; color: #fff; }
.preset-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }

.quick-toggle-wrap { margin-top: 8px; }
.quick-iodine-btn { width: 100%; padding: 10px 12px; border-radius: var(--radius-md); border: 1.5px dashed #E2D7C8; background-color: var(--card-white); display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--text-main); cursor: pointer; text-align: left; transition: all 0.2s; }
.quick-iodine-btn.active { background-color: #FDE8E4; border-color: #E85D3F; color: #C03719; border-style: solid; box-shadow: 0 2px 8px rgba(232, 93, 63, 0.15); }
.switch-status { font-size: 11px; padding: 2px 8px; border-radius: var(--radius-pill); background-color: #EAE3DA; color: #6E6763; transition: all 0.2s; }
.quick-iodine-btn.active .switch-status { background-color: #E85D3F; color: #fff; }

.lib-quick-filters { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; scrollbar-width: none; }
.lib-quick-filters::-webkit-scrollbar { display: none; }
.filter-chip { white-space: nowrap; padding: 5px 11px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 600; border: 1px solid var(--border-color); background-color: var(--bg-cream); color: var(--text-muted); cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; gap: 4px; }
.filter-chip.active { background-color: var(--coral-orange); color: #fff; border-color: var(--coral-orange); }
.filter-chip.chip-warn.active { background-color: #D94828; color: #fff; border-color: #D94828; }
.filter-chip.chip-good.active { background-color: #2E7D5B; color: #fff; border-color: #2E7D5B; }

.nutrient-mini-tag { font-size: 10px; padding: 1px 5px; border-radius: 4px; font-weight: 700; }
.tag-iodine-high { background-color: #FDE8E4; color: #C03719; }
.tag-purine-high { background-color: #FFF0D4; color: #B06000; }
.tag-crystal-good { background-color: #E6F4EA; color: #1E6346; }
.tag-fatloss-good { background-color: #E0F2F1; color: #00695C; }

/* 减脂卡路里与宏量指纹视效 */
.dim-tag.tag-calorie-low { background-color: #E8F5E9; border-color: #C8E6C9; color: #2E7D32; font-weight: 700; }
.dim-tag.tag-calorie-mid { background-color: #FFF3E0; border-color: #FFE0B2; color: #E65100; font-weight: 600; }
.dim-tag.tag-calorie-high { background-color: #FFEBEE; border-color: #FFCDD2; color: #C62828; font-weight: 700; }
.dim-tag.tag-protein-high { background-color: #E3F2FD; border-color: #BBDEFB; color: #1565C0; font-weight: 700; }

.health-pill[data-health="fat_loss"].active { background-color: #E0F2F1; border-color: #00897B; color: #00695C; box-shadow: 0 1px 4px rgba(0, 137, 123, 0.25); }
.filter-chip.chip-fatloss.active { background-color: #00897B; color: #fff; border-color: #00897B; }

.fat-loss-tip-box { background-color: #FFF9E6; border-left: 3px solid #E69500; border-radius: 4px var(--radius-sm) var(--radius-sm) 4px; padding: 9px 12px; margin: 8px 0 10px; text-align: left; font-size: 12px; color: #6D4C41; line-height: 1.45; }
.fat-loss-tip-title { font-weight: 800; color: #C67600; display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }




