/* 膳知网页版样式 · 简洁风格的交互与动效：玻璃标签栏、提示、弹窗、切页、加载、启动画面（css/ 下的文件按 index.html 里的顺序叠加，后面的覆盖前面的） */
/* ======================================================================
 * 交互与动效（第 9 轮）：液态玻璃标签栏、顶部小胶囊提示、更跟手的底部弹窗、数字和圆环的进场动画
 * 参考 iOS 底部弹窗的曲线（.32, .72, 0, 1）和主流 App 的做法：提示不挡操作，删除用「撤销」代替确认框。
 * ====================================================================== */
/* 液态玻璃标签栏：半透明 + 背景模糊提亮 + 顶部一道高光。选中的那一格有一块「镜片」：
   静止时位置完全交给 CSS（--tab-i × 100%，不用量宽度）；按住可以左右拖，拖动时由脚本每帧直接写 transform，松手后弹回最近的标签。
   镜片本身不叠第二层 backdrop-filter（iPhone 上两层毛玻璃叠在一起拖动时会明显掉帧），用渐变 + 内阴影模拟水滴的折射和高光。 */
.phone.ui-clean .tabbar {
  background: linear-gradient(180deg, rgba(var(--paper-rgb), .66), rgba(var(--paper-rgb), .5));
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -1px 0 rgba(0, 0, 0, .03), 0 12px 32px -12px rgba(0, 0, 0, .22), 0 2px 8px -4px rgba(0, 0, 0, .08);
  isolation: isolate; overflow: visible;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.phone.ui-clean .tabbar::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(120% 60% at 50% -10%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%); }
:root.ui-clean:not([data-theme="light"]) .phone.ui-clean .tabbar {
  background: linear-gradient(180deg, rgba(44, 44, 42, .62), rgba(26, 26, 25, .55)); border-color: rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 12px 32px -12px rgba(0, 0, 0, .6); }
:root.ui-clean:not([data-theme="light"]) .phone.ui-clean .tabbar::before { background: radial-gradient(120% 60% at 50% -10%, rgba(255, 255, 255, .1), rgba(255, 255, 255, 0) 60%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .phone.ui-clean .tabbar { background: var(--card); } }
.phone.ui-clean .tabbar a { position: relative; z-index: 1; -webkit-user-drag: none; }
.phone.ui-clean .tabbar a.on { background: transparent; }
.phone.ui-clean .tabbar a .ico { transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); will-change: transform; }
.phone.ui-clean .tabbar.is-drag a .ico { transition: none; }

.tab-lens { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 4); border-radius: 26px; z-index: 0;
  background: rgba(var(--ink-rgb), .07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(var(--ink-rgb), .04);
  transform: translate3d(calc(var(--tab-i, 0) * 100%), 0, 0) scale(1); transform-origin: 50% 50%; will-change: transform; backface-visibility: hidden; }
:root.ui-clean:not([data-theme="light"]) .tab-lens { background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
/* 按住：镜片轻轻鼓起来；按住 / 拖动时变成一滴更通透的「水」——更亮的边、两侧一点蓝 / 橙色的折射边、下面的投影 */
.tab-lens.press { transform: translate3d(calc(var(--tab-i, 0) * 100%), 0, 0) scale(1.06); }
.tab-lens.press, .tab-lens.drag {
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .75), rgba(255, 255, 255, .35) 55%, rgba(255, 255, 255, .22));
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .95), inset 0 -2px 4px rgba(0, 0, 0, .06), inset 0 0 0 1px rgba(255, 255, 255, .6),
    inset 3px 0 5px -3px rgba(120, 170, 255, .4), inset -3px 0 5px -3px rgba(255, 170, 120, .4), 0 8px 20px -8px rgba(0, 0, 0, .25); }
:root.ui-clean:not([data-theme="light"]) .tab-lens.press, :root.ui-clean:not([data-theme="light"]) .tab-lens.drag {
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .26), rgba(255, 255, 255, .1) 60%, rgba(255, 255, 255, .06));
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .18),
    inset 3px 0 6px -3px rgba(120, 170, 255, .3), inset -3px 0 6px -3px rgba(255, 170, 120, .3), 0 10px 24px -8px rgba(0, 0, 0, .6); }
@media (prefers-reduced-motion: reduce) { .tab-lens, .phone.ui-clean .tabbar a .ico { transition: none !important; } }

.fab { view-transition-name: fab; transition: transform .16s ease, box-shadow .2s ease; box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .18); }
.fab:active { transform: scale(.92); }

/* 问膳知：输入框浮在玻璃标签栏上面，不再被盖住 */
.phone.ui-clean .composer { left: 16px; right: 16px; width: auto; transform: none; max-width: none; border: 1px solid rgba(255, 255, 255, .6); border-radius: 28px;
  bottom: calc(94px + env(safe-area-inset-bottom)); padding: 6px; align-items: center;
  background: linear-gradient(180deg, rgba(var(--paper-rgb), .72), rgba(var(--paper-rgb), .58));
  backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 10px 28px -14px rgba(0, 0, 0, .25); }
:root.ui-clean:not([data-theme="light"]) .phone.ui-clean .composer { background: rgba(38, 38, 36, .66); border-color: rgba(255, 255, 255, .09); box-shadow: 0 10px 28px -14px rgba(0, 0, 0, .6); }
.phone.ui-clean .composer .input { background: transparent; border: none; padding: 10px 8px; }
.phone.ui-clean .composer .btn, .phone.ui-clean .composer .label-btn { border-radius: 999px; }
.phone.ui-clean.is-chat { padding-bottom: 170px; }
@media (min-width: 431px) and (max-width: 1023px) { .phone.ui-clean .composer { left: calc(50% - 215px + 16px); right: calc(50% - 215px + 16px); } }
@media (min-width: 1024px) { .phone.ui-clean .composer { left: var(--side); right: 88px; bottom: 28px; width: min(784px, calc(100vw - var(--side) - 184px)); margin: 0 auto; } }

/* 顶部小胶囊提示：不挡输入框、不挡按钮，点不到它下面的东西也不受影响 */
.toast { position: fixed; top: calc(10px + env(safe-area-inset-top)); bottom: auto; left: 50%; transform: translateX(-50%); z-index: 90;
  display: flex; align-items: center; gap: 8px; max-width: min(88vw, 420px); width: max-content; padding: 10px 16px; border-radius: 999px;
  font-size: 13.5px; line-height: 1.45; text-align: left; pointer-events: none; animation: none;
  background: rgba(24, 24, 23, .86); color: #f4f3ef; backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .1); }
.toast .ico { flex: none; }
.toast.t-ok .ico { color: #7fd38a; }
.toast.t-err .ico { color: #ff9a8a; }
.toast .t-act { pointer-events: auto; margin: -4px -8px -4px 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600; font-size: 13px; }
.tst-enter-active { transition: transform .42s cubic-bezier(.32, .72, 0, 1), opacity .25s ease; }
.tst-leave-active { transition: transform .22s cubic-bezier(.4, 0, 1, 1), opacity .18s ease; }
.tst-enter-from { opacity: 0; transform: translate(-50%, -14px) scale(.94); }
.tst-leave-to { opacity: 0; transform: translate(-50%, -8px) scale(.97); }
@media (min-width: 1024px) { .toast { left: calc(var(--side) + (100vw - var(--side)) / 2); top: 22px; bottom: auto; } }

/* 底部弹窗：iOS 那条「先快后稳」的曲线；手机上去掉整屏模糊（低端手机上是卡顿的主要来源） */
@media (max-width: 1023px) {
  .mask { backdrop-filter: none; -webkit-backdrop-filter: none; animation: fade .25s ease; }
  .sheet { animation: sheet-in .46s cubic-bezier(.32, .72, 0, 1); will-change: transform; }
  @keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes sheet-out { to { transform: translateY(100%); } }
  .mask.leaving .sheet { animation: sheet-out .28s cubic-bezier(.4, 0, 1, 1) forwards; }
}

/* 输入不对：不弹提示，输入框抖一下 + 下面一行小字 */
.input.is-err { border-color: var(--st-crit, #d03b3b) !important; animation: shake .36s cubic-bezier(.36, .07, .19, .97); }
.field-err { font-size: 12.5px; color: var(--st-crit, #d03b3b); margin: 6px 4px 0; animation: fade .2s ease; }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-5px); } 40%, 60% { transform: translateX(5px); } }

/* 圆环第一次出现从 0 画到当前值；卡片、日期按下去轻轻一缩 */
.cl-arc { transition: stroke-dashoffset .9s cubic-bezier(.2, .8, .2, 1), stroke .3s ease; }
.cl-mini, .cl-hero, .cl-day, .cl-meal, .cl-ins, .cg-cell, .cl-cup, .cl-quick .btn { transition: transform .16s ease, border-color .2s ease, background-color .2s ease; }
.cl-mini:active, .cl-hero:active, .cl-ins:active, .cl-meal:active { transform: scale(.98); }
.cl-day:active, .cg-cell:active, .cl-cup:active { transform: scale(.93); }
.cl-meals > .cl-meal { animation: vt-rise-in .32s cubic-bezier(.2, .8, .2, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .tab-lens, .cl-arc, .sheet, .toast, .cl-meals > .cl-meal { transition: none !important; animation: none !important; }
  .input.is-err { animation: none; }
}

/* 主色：墨色（参考 MacroFactor：界面只用黑白灰，颜色全部留给数据）。浅色是黑底白字，深色是白底黑字 */
:root.ui-clean[data-theme="light"] { --accent: #111111; --accent-hover: #2c2c2c; --on-accent: #ffffff; }
:root.ui-clean:not([data-theme="light"]) { --accent: #f2f2f0; --accent-hover: #ffffff; --on-accent: #111111; }
:root.ui-clean { --cream: var(--accent); --on-cream: var(--on-accent); --primary-hover: var(--accent-hover); }
:root.ui-clean .btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
:root.ui-clean .fab { background: var(--brand-orange); color: #111111; box-shadow: 0 12px 26px -12px rgba(255, 159, 28, .75), inset 0 1px 0 rgba(255, 255, 255, .35); }   /* 「＋」用 logo 碗的橘黄（#ff9f1c），配黑色加号（白色加号在橘黄上对比度不够 3:1） */
:root.ui-clean { --brand-orange: #ff9f1c; }
:root.ui-clean .fab:hover { background: #ffab38; }
:root.ui-clean .opt.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
:root.ui-clean .msg.me, :root.ui-clean .chat-log .msg.me { background: var(--accent); color: var(--on-accent); }
:root.ui-clean .cl-quick .btn.primary { box-shadow: none; }
:root.ui-clean[data-theme="light"], :root.ui-clean:not([data-theme="light"]) { --cream: var(--accent); --on-cream: var(--on-accent); --primary-hover: var(--accent-hover); }

/* 小膳新头像：圆形人像 + 角上一个「AI」小标（始终说明是 AI，不冒充真人营养师） */
.ai-avatar { border-radius: 50%; }
.aa-wrap { position: relative; display: inline-block; flex: none; }
.aa-ai { position: absolute; right: -4px; bottom: -2px; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .04em; line-height: 1;
  padding: 3px 5px; border-radius: 999px; background: var(--card); color: var(--ink-2); border: 1px solid var(--rule-2); }
:root.ui-clean .aa-ai { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.ai-entry .ai-avatar { box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }


/* ======================================================================
 * 第 10 轮动效：切页面分层浮入、加载骨架的流光、启动画面、对话「正在想」
 * ====================================================================== */
/* 手机子页面的轻量动画：标签切换不做分块浮入，固定输入框不参与，避免离开聊天后按钮仍在移动。 */
@media (prefers-reduced-motion: no-preference) {
.no-vt .view[data-nav="push"] > * > :not(.composer):not(.mask):not(.fab):not(.toast) {
  animation: pg-push .42s cubic-bezier(.22, 1, .36, 1) backwards; }
.no-vt .view[data-nav="pop"] > * > :not(.composer):not(.mask):not(.fab):not(.toast) {
  animation: pg-pop .38s cubic-bezier(.22, 1, .36, 1) backwards; }
}
@keyframes pg-push { from { opacity: 0; transform: translate3d(32px, 0, 0); } }
@keyframes pg-pop { from { opacity: 0; transform: translate3d(-24px, 0, 0); } }

/* 加载骨架：先停 0.12 秒再出现（数据很快就回来时不闪），底色上有一道光扫过去 */
.skel { animation: skel-in .3s ease .12s backwards; }
@keyframes skel-in { from { opacity: 0; } }
.skel i { position: relative; overflow: hidden; background: rgba(var(--ink-rgb), .065); animation: none; }
.skel i::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .6) 50%, transparent 80%); animation: skel-sheen 1.3s cubic-bezier(.4, 0, .2, 1) infinite; }
:root:not([data-theme="light"]) .skel i::after { background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .07) 50%, transparent 80%); }
.skel i:nth-child(2)::after { animation-delay: .08s; } .skel i:nth-child(3)::after { animation-delay: .16s; } .skel i:nth-child(4)::after { animation-delay: .24s; }
@keyframes skel-sheen { to { transform: translateX(100%); } }

/* 启动画面：Logo 轻弹出现；Z 上有一道光从下往上升，像原来碗上的热气，升到碗边时碗轻轻一抬（1.6 秒一轮）；
   下面一条细进度光；数据回来后整体淡出放大 */
.boot { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--paper); color: var(--ink); transition: opacity .4s ease, transform .4s cubic-bezier(.22, 1, .36, 1); }
.boot.gone { opacity: 0; transform: scale(1.04); pointer-events: none; }
.boot-mark { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: #ffffff; color: #000000;
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .35); animation: boot-pop .6s cubic-bezier(.3, 1.4, .5, 1) both; }
.boot-mark svg { display: block; width: 100%; height: 100%; border-radius: inherit; }
.boot-mark .zbase { opacity: .6; }
.boot-mark .zbase, .boot-mark .zlit { animation: z-bob 1.6s ease-in-out .5s infinite; }
.boot-mark .zband { animation: z-rise 1.6s cubic-bezier(.45, 0, .55, 1) .5s infinite; }
.boot-mark .bowl > * { animation: bowl-lift 1.6s ease-in-out .5s infinite; }
@keyframes z-rise { from { transform: translateY(0); } to { transform: translateY(-330px); } }
@keyframes z-bob { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-8px); } }
@keyframes bowl-lift { 0%, 55%, 100% { transform: translateY(0); } 75% { transform: translateY(-9px); } }
@keyframes boot-pop { from { opacity: 0; transform: scale(.7); } }
.boot-name { font-size: 20px; font-weight: 600; letter-spacing: .3em; padding-left: .3em; animation: boot-fade .5s ease .15s both; }
.boot-bar { width: 96px; height: 3px; border-radius: 3px; overflow: hidden; background: rgba(var(--ink-rgb), .08); animation: boot-fade .5s ease .3s both; }
.boot-bar i { display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--red); animation: boot-run 1.1s cubic-bezier(.45, 0, .55, 1) infinite; }
:root.ui-clean .boot-bar i { background: var(--accent); }
@keyframes boot-run { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
@keyframes boot-fade { from { opacity: 0; transform: translateY(6px); } }

/* 问膳知「正在想」：三个跳动的小点 + 文字上一道流光 */
.thinking { gap: 10px; }
.dots3 { display: inline-flex; gap: 4px; }
.dots3 i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: dot-hop 1.1s ease-in-out infinite; }
.dots3 i:nth-child(2) { animation-delay: .15s; } .dots3 i:nth-child(3) { animation-delay: .3s; }
@keyframes dot-hop { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-5px); opacity: 1; } }
.th-txt { background: linear-gradient(90deg, currentColor 0%, currentColor 40%, rgba(255, 255, 255, .9) 50%, currentColor 60%, currentColor 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: th-shine 2s linear infinite; }
@supports not ((-webkit-background-clip: text) or (background-clip: text)) { .th-txt { -webkit-text-fill-color: currentColor; } }
@keyframes th-shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
:root.ui-clean .thinking { color: var(--ink-2); background: rgba(var(--ink-rgb), .05); border-radius: 999px; }

@media (prefers-reduced-motion: reduce) {
  .no-vt .view[data-nav] > * > *, .skel, .skel i::after, .boot-mark, .boot-mark .zband, .boot-mark .zbase, .boot-mark .zlit, .boot-mark .bowl > *, .boot-bar i, .dots3 i, .th-txt { animation: none !important; }
  .boot-mark .zbase { opacity: 1; }
}

/* 记一顿：常吃的右上角 × （不再显示这一组）；AI 认出的用料 */
.freq-wrap { position: relative; flex: none; }
.freq-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--rule-2); color: var(--ink-3); padding: 0; }
.freq-x .ico { width: 11px; height: 11px; }
.freq-list { padding-top: 10px; }
.ml-item .ml-detail { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-3); margin: -4px 0 4px; }

/* ======================================================================
 * 第 11 轮：做减法（参考 iOS 健康 App：第一眼只看数字和几个入口，说明文字点开才看）
 * ====================================================================== */
/* 今天：超标的那句提示下面一条红色波浪线 */
.cl-warn-line { -webkit-text-decoration: underline wavy #d6453d; text-decoration: underline wavy #d6453d;
  text-decoration-thickness: 1.5px; text-underline-offset: 5px; text-decoration-skip-ink: none; }

/* 通用：可展开的一行 / 「详情」小按钮 */
.fold-link { display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; background: none; border: 0; color: var(--ink-3); font-size: 13px; }
.fold-link .ico, .fold-row .ico, .rv-row .ico, .fold-card .chev { transition: transform .25s cubic-bezier(.32, .72, 0, 1); }
.ico.up, .fold-card.open .chev { transform: rotate(180deg); }
.fold-row { display: flex; align-items: center; gap: 8px; width: 100%; margin: 14px 0 8px; padding: 14px 16px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--rule); color: var(--ink); font-size: 15px; font-weight: 600; text-align: left; }
.fold-row .muted { font-weight: 400; font-size: 13px; }
.fold-card { display: block; width: 100%; text-align: left; color: inherit; }
.fold-card .lr-head { margin: 0; }
.fold-card.open .lr-head { margin-bottom: 8px; }

/* 计划页：标题旁边的回顾小圆球 */
.plan-intro .pi-row { display: flex; align-items: center; gap: 12px; }
.plan-intro .display { margin: 0; }
.flag-ball { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 0;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .45);
  animation: ball-in .5s cubic-bezier(.3, 1.5, .5, 1) both; transition: transform .2s ease; }
.flag-ball:active { transform: scale(.92); }
.flag-ball i { position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; border: 2px solid var(--paper); }
.flag-ball.on i { display: none; }
@keyframes ball-in { from { transform: scale(.4); opacity: 0; } }
.flag-pop { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; padding: 12px 14px; border-radius: 16px; background: var(--card);
  border: 1px solid var(--rule); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .25); }
.pop-enter-active { transition: opacity .2s ease, transform .3s cubic-bezier(.32, .72, 0, 1); }
.pop-leave-active { transition: opacity .15s ease, transform .15s ease; }
.pop-enter-from, .pop-leave-to { opacity: 0; transform: translateY(-6px) scale(.97); }

/* 每周回顾：每一项收起只显示当前选择 */
.rv-acc { border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; margin: 12px 0 4px; }
.rv-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 15px 16px; background: transparent; border: 0; color: var(--ink); font-size: 15px; text-align: left; }
.rv-row + .rv-row, .rv-body + .rv-row { border-top: 1px solid var(--rule); }
.rv-row .muted { font-size: 13.5px; }
.rv-body { padding: 0 16px 14px; }

/* 我的：彩色小圆圈图标（像系统设置），右边不再放摘要文字 */
.me-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.me-ic .ico { width: 16px; height: 16px; }
.me-row .t { flex: 1; }
.ic-red { background: rgba(229, 72, 77, .14); color: #e5484d; }
.ic-blue { background: rgba(42, 120, 214, .14); color: #2a78d6; }
.ic-orange { background: rgba(242, 155, 82, .2); color: #d9772a; }
.ic-coral { background: rgba(235, 104, 52, .15); color: #eb6834; }
.ic-green { background: rgba(27, 175, 122, .15); color: #14936a; }
.ic-purple { background: rgba(137, 87, 229, .15); color: #8957e5; }
.ic-pink { background: rgba(232, 123, 164, .18); color: #d6578a; }
.ic-teal { background: rgba(20, 160, 170, .15); color: #128a93; }
.ic-indigo { background: rgba(88, 101, 242, .15); color: #5865f2; }
.ic-yellow { background: rgba(237, 161, 0, .18); color: #c98a00; }
.ic-gray { background: rgba(var(--ink-rgb), .08); color: var(--ink-2); }
.me-settings { padding-top: 8px; }
@media (prefers-reduced-motion: reduce) { .flag-ball { animation: none; } }
/* 设置 › 外观：三行「名字 + 分段按钮」排成两列 */
.me-settings .theme-row { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; padding-right: 12px; }
.me-settings .theme-row .me-row.static .t { white-space: nowrap; }
.me-settings .theme-row { row-gap: 2px; padding-bottom: 6px; }
.me-settings .theme-seg { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; width: 168px; box-sizing: border-box; }
.me-settings .me-group + .me-group { margin-top: 14px; }

/* ---- iOS 健康式卡片：一块一张卡，标题带颜色和图标，下面是一句大字的现状 ---- */
.hcard { display: block; width: 100%; margin: 0 0 12px; padding: 14px 16px 16px; border-radius: 20px; border: 0; text-align: left;
  background: var(--card); color: var(--ink); text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px -14px rgba(0, 0, 0, .18);
  transition: transform .16s ease; }
a.hcard:active, button.hcard:active { transform: scale(.985); }
:root:not([data-theme="light"]) .hcard { box-shadow: none; border: 1px solid rgba(255, 255, 255, .06); }
.hc-head { display: flex; align-items: center; gap: 6px; width: 100%; padding: 0; background: none; border: 0; color: var(--c, var(--ink)); text-align: left; }
.hc-head .ico:first-child { width: 18px; height: 18px; }
.hc-head .chev { margin-left: auto; color: var(--ink-3); transition: transform .25s cubic-bezier(.32, .72, 0, 1); }
.hc-head .chev.up { transform: rotate(180deg); }
.hc-title { margin-top: 12px; line-height: 1.35; cursor: pointer; }
.hc-val { margin-top: 12px; font-size: 32px; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.hc-val .u, .hc-title .hc-sub { font-size: 14px; font-weight: 500; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.hc-sub { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.hc-text { margin-top: 10px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.hc-text.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hc-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hc-bars { display: flex; align-items: flex-end; gap: 5px; height: 52px; flex: none; }
.hc-bars i { display: block; width: 9px; border-radius: 3px; background: rgba(var(--ink-rgb), .16); }
.hc-bars i.now { background: var(--c); }
.hc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.hc-grid .hcard { margin: 0; }
.hc-grid .hcard.wide { grid-column: 1 / -1; }
.hc-slim { padding-bottom: 14px; }
.hcard-save { margin: -4px 0 12px; border-radius: 16px; background: var(--card); }
.hc-red { --c: #e5484d; } .hc-blue { --c: #2a78d6; } .hc-orange { --c: #d9772a; } .hc-coral { --c: #eb6834; } .hc-green { --c: #14936a; }
.hc-purple { --c: #8957e5; } .hc-teal { --c: #128a93; } .hc-gray { --c: var(--ink-2); }
:root:not([data-theme="light"]) .hc-blue { --c: #5aa0f0; } :root:not([data-theme="light"]) .hc-purple { --c: #a98bf0; }
:root:not([data-theme="light"]) .hc-green { --c: #3cc995; } :root:not([data-theme="light"]) .hc-teal { --c: #3dbcc4; }
.diet .hcard { margin-top: 12px; }

/* ---- 进子页面 / 返回：iOS 导航栈式的推入、推出（只在手机、没有 View Transitions 时；电脑上照旧用 View Transitions） ---- */
.no-vt .view { position: relative; overflow-x: clip; }
.no-vt .view[data-nav="push"] > * > *, .no-vt .view[data-nav="pop"] > * > * { animation: none !important; }
/* 只动 transform（合成层，不触发排版）；底下那页变暗用一层伪元素做透明度，阴影是静态的不参与动画 */
.nav-push-enter-active, .nav-push-leave-active, .nav-pop-enter-active, .nav-pop-leave-active {
  transition: transform .4s cubic-bezier(.32, .72, 0, 1); background: var(--paper); will-change: transform; min-height: 100vh;
  backface-visibility: hidden; }
.nav-push-enter-active, .nav-pop-enter-active { position: relative; }
.nav-push-leave-active, .nav-pop-leave-active { position: absolute; left: 0; right: 0; pointer-events: none; }
.nav-push-enter-active, .nav-pop-leave-active { z-index: 2; box-shadow: -10px 0 24px -14px rgba(0, 0, 0, .28); }
.nav-push-leave-active, .nav-pop-enter-active { z-index: 1; }
.nav-push-enter-from, .nav-pop-leave-to { transform: translate3d(100%, 0, 0); }
.nav-push-leave-to, .nav-pop-enter-from { transform: translate3d(-25%, 0, 0); }
.nav-push-leave-active::after, .nav-pop-enter-active::after { content: ""; position: absolute; inset: 0; background: #000; pointer-events: none;
  transition: opacity .4s cubic-bezier(.32, .72, 0, 1); opacity: 0; }
.nav-push-leave-to::after, .nav-pop-enter-from::after { opacity: .12; }
/* 展开 / 收起统一交给 <Expand> 做高度动画：去掉旧的一次性进场动画，面板上方的间距改成内边距（外边距在高度动画里会跳） */
.me-panel { animation: none; }
.hc-panel { margin-top: 0; border-top: 0; padding-top: 27px;
  background: linear-gradient(var(--rule), var(--rule)) 0 13px / 100% 1px no-repeat; }
.diet .diet-stats { margin-top: 0; }

/* ======================================================================
 * 第 12 轮：更顺滑（动画期间暂停背景模糊、切标签只让前几块浮入）、字重层次、「我的」统一成橘色系
 * ====================================================================== */
.phone.ui-clean .tabbar { backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
.no-vt .view[data-nav="tab"] > * > :nth-child(n+6) { animation: none !important; }
.no-vt .view[data-nav] > * > :not(.composer):not(.mask):not(.fab):not(.toast) { animation-duration: .38s; }

/* 字体：标题和关键数字用粗体，说明文字常规，层次更清楚（中文走苹方 / 系统黑体） */
:root.ui-clean body {
  font-feature-settings: "tnum" 1; }
:root.ui-clean .display em { font-style: normal; }
:root.ui-clean .kicker { letter-spacing: .04em; }
:root.ui-clean .meal-head b { font-size: 17px; }
.hc-val { font-weight: 800; }
:root.ui-clean .opt { font-weight: 500; }

/* 「我的」和设置页：颜色统一成和主色杏橘搭配的暖色系（橘、琥珀、陶土、肉桂），不再红绿蓝紫 */
.page.me .hc-red { --c: #e0702f; }      /* 健康档案：焦橘 */
.page.me .hc-blue { --c: #d18a1f; }     /* 身高体重：琥珀 */
.page.me .hc-orange { --c: #c4623a; }   /* 过敏忌口：陶土 */
.page.me .hc-coral { --c: #ef8a48; }    /* 口味：杏橘 */
.page.me .hc-green { --c: #b8862f; }    /* 厨房：蜂蜜 */
.page.me .hc-purple { --c: #a2643f; }   /* 记得的你：肉桂 */
.page.me .hc-gray { --c: #8c7a6b; }     /* 设置：暖灰 */
:root:not([data-theme="light"]) .page.me .hc-red { --c: #f39256; } :root:not([data-theme="light"]) .page.me .hc-blue { --c: #f0b04a; }
:root:not([data-theme="light"]) .page.me .hc-orange { --c: #e88a62; } :root:not([data-theme="light"]) .page.me .hc-coral { --c: #f7a56d; }
:root:not([data-theme="light"]) .page.me .hc-green { --c: #dcb062; } :root:not([data-theme="light"]) .page.me .hc-purple { --c: #cf9470; }
:root:not([data-theme="light"]) .page.me .hc-gray { --c: #b6a596; }
.page.me .me-ic.ic-blue { background: rgba(209, 138, 31, .15); color: #c07a12; }
.page.me .me-ic.ic-pink, .page.me .me-ic.ic-red { background: rgba(224, 112, 47, .15); color: #d9652a; }
.page.me .me-ic.ic-teal { background: rgba(196, 98, 58, .14); color: #b8573a; }
.page.me .me-ic.ic-indigo, .page.me .me-ic.ic-purple { background: rgba(162, 100, 63, .14); color: #9a5d3a; }
.page.me .me-ic.ic-yellow { background: rgba(240, 176, 74, .2); color: #c38412; }
.page.me .me-ic.ic-gray { background: rgba(140, 122, 107, .14); color: #7d6c5e; }
.page.me .me-progress .mp-tabs span { border-color: var(--rule-2); }

/* ======================================================================
 * 第 13 轮：手机上去掉所有毛玻璃（标签栏 / 顶栏 / 输入框每滚一帧都要重新模糊下面的内容，是滚动和切页卡顿的大头），
 * 苹果式字体（大标题、分组标题、圆体数字），「我的」卡片标题不再用彩色、左侧图标统一成肉色小圆
 * ====================================================================== */
.no-vt .phone.ui-clean .tabbar, .no-vt .phone.ui-clean .composer, .no-vt .topbar {
  backdrop-filter: none; -webkit-backdrop-filter: none; }
.no-vt .phone.ui-clean .tabbar { background: rgba(var(--paper-rgb), .97); }
.no-vt .phone.ui-clean .composer { background: rgba(var(--paper-rgb), .97); }
.no-vt .topbar { background: var(--paper); }
:root.ui-clean.no-vt:not([data-theme="light"]) .phone.ui-clean .tabbar,
:root.ui-clean.no-vt:not([data-theme="light"]) .phone.ui-clean .composer { background: rgba(32, 32, 31, .97); }
.no-vt .view[data-nav="none"] > * > * { animation: none !important; }
/* 镜片弹过去更利落一点（原来 .55s 带回弹，连点时显得拖） */
.tab-lens { transition: transform .42s cubic-bezier(.3, 1.25, .45, 1), background-color .2s ease, box-shadow .2s ease; }
.tab-lens.drag { transition: background-color .2s ease, box-shadow .2s ease; }

/* 字体统一用 base.css 的 --sans（DM Sans + 思源黑体），大字号收紧字距 */
:root.ui-clean body { font-family: var(--sans); letter-spacing: 0; text-rendering: optimizeLegibility; }
/* 大标题：像「健康」的「摘要」——34 号粗体、左对齐，滚上去后顶栏中间出现一个小标题 */
:root.ui-clean .lt { color: var(--ink);
  margin: 2px 0 14px; padding-bottom: 0; }
:root.ui-clean .page.me > .lt { margin-top: 0; }
.topbar .lt-mini { position: absolute; left: 50%; transform: translate(-50%, 4px); font-size: 17px; font-weight: 700; letter-spacing: -.01em;
  opacity: 0; transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
.topbar .lt-mini.on { opacity: 1; transform: translate(-50%, 0); }
/* 分组标题（「这一周」「试试这样问」「外观」）：22 号粗体，像「置顶」 */
:root.ui-clean .h-sec h3, :root.ui-clean .cl-sec h3, :root.ui-clean .me-group-t { line-height: 1.2; }
:root.ui-clean .topbar .title { font-size: 17px; }
/* 数字读数用圆体 */
:root.ui-clean .num, :root.ui-clean .hc-val, :root.ui-clean .me-progress .mp-kcal b, :root.ui-clean .diet-stats b, :root.ui-clean .cl-big {
  font-family: var(--rounded); letter-spacing: -.01em; }
/* 卡片：标题一行 15 号半粗，主值 20 号粗体，说明 13 号灰色——和「健康」卡片的三级层次一致 */
.hc-head { font-size: 15px; font-weight: 650; letter-spacing: -.005em; }
.hc-title { font-size: 20px; font-weight: 800; letter-spacing: -.015em; }

/* 「我的」：卡片标题文字不用彩色（统一墨色），左侧图标圈进一个肉色小圆，所有卡片同一个颜色 */
.page.me { --peach-bg: rgba(var(--ink-rgb), .06); --peach: var(--ink); }
.page.me .hcard { --c: var(--peach); }
.page.me .hc-head { color: var(--ink); gap: 10px; }
.page.me .hc-head > .ico:first-child { box-sizing: border-box; border-radius: 50%; flex: none;
  background: var(--peach-bg); color: var(--peach); }
.page.me .hc-title { margin-top: 10px; }
.page.me .me-ic, .page.me .me-ic[class*="ic-"] { background: var(--peach-bg); color: var(--peach); }
.page.me .me-row .t { color: var(--ink); }
.topbar.lt-bar { height: calc(44px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); padding-bottom: 0; }
.page.me .hc-grid .hc-head { gap: 8px; }
.page.me .hc-grid .hc-head > .ico:first-child { width: 28px; height: 28px; padding: 6px; }
.page.me .hc-head > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (min-width: 1024px) { :root.ui-clean .lt.page { display: none; } }   /* 电脑上左侧导航已经写着「计划」 */

/* ======================================================================
 * 第 14 轮：菜名旁边的小圆画成线描小画（按菜名认类别，每类一个颜色），外圈一道弧 = 占这一顿热量多少；
 * 计划页多几张小图表：三餐热量怎么分（分段条）、这周要买分几类（小柱子）、薄荷食谱 / 最佳方案配一幅小画
 * ====================================================================== */
.mono.art { --a: #8c7a6b; --ab: #f1ebe5; background: var(--ab); color: var(--a); box-shadow: none; font-size: 0; position: relative; }
.mono.art::after { display: none; }
.mono.art .mono-art { width: 62%; height: 62%; }
.mono.art.lg .mono-art { stroke-width: 1.4; }
.mono.art.ring .mono-art { width: 54%; height: 54%; }
.mono-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.mono-ring circle { fill: none; stroke-width: 2.4; }
.mono-ring .tr { stroke: rgba(var(--ink-rgb), .07); }
.mono-ring .fg { stroke: var(--a); stroke-linecap: round; }
.mono.a-soup { --a: #c7742a; --ab: #fbead8; }   .mono.a-grain { --a: #b8862f; --ab: #f8eed9; }
.mono.a-sea { --a: #2f7fb0; --ab: #e1eef7; }    .mono.a-meat { --a: #a85636; --ab: #f6e4da; }
.mono.a-egg { --a: #c4920e; --ab: #fbf0cf; }    .mono.a-red { --a: #d24a38; --ab: #fbe3de; }
.mono.a-veg { --a: #3d8f55; --ab: #e2f2e5; }    .mono.a-fungi { --a: #866650; --ab: #efe6de; }
.mono.a-orange { --a: #dd7424; --ab: #fde7d3; } .mono.a-cup { --a: #5f72b0; --ab: #e6e9f6; }
.mono.a-fruit { --a: #cf4560; --ab: #fbe1e6; }  .mono.a-dish { --a: #8c7a6b; --ab: #f1ebe5; }
:root:not([data-theme="light"]) .mono.art { --ab: color-mix(in srgb, var(--a) 20%, #1d1d1c); }
:root:not([data-theme="light"]) .mono.a-soup { --a: #ee9d55; } :root:not([data-theme="light"]) .mono.a-grain { --a: #dcb062; }
:root:not([data-theme="light"]) .mono.a-sea { --a: #6fb2e0; }  :root:not([data-theme="light"]) .mono.a-meat { --a: #d98a68; }
:root:not([data-theme="light"]) .mono.a-egg { --a: #e8c04a; }  :root:not([data-theme="light"]) .mono.a-red { --a: #f07d6b; }
:root:not([data-theme="light"]) .mono.a-veg { --a: #6cc488; }  :root:not([data-theme="light"]) .mono.a-fungi { --a: #c4a58e; }
:root:not([data-theme="light"]) .mono.a-orange { --a: #f4a15e; } :root:not([data-theme="light"]) .mono.a-cup { --a: #9aa9e0; }
:root:not([data-theme="light"]) .mono.a-fruit { --a: #f07f95; } :root:not([data-theme="light"]) .mono.a-dish { --a: #bfae9f; }
:root:not([data-theme="light"]) .mono-ring .tr { stroke: rgba(255, 255, 255, .08); }
.meal-item .mono.sm.art { width: 40px; height: 40px; }
/* 三餐分段条：同一个暖色由浅到深，段与段之间 2px 空隙，比例写在段里 */
.split-bar { display: flex; gap: 2px; height: 18px; margin-top: 10px; border-radius: 6px; overflow: hidden; }
.split-bar i { display: flex; align-items: center; justify-content: center; min-width: 0; font-style: normal; }
.split-bar span { font-size: 10.5px; font-weight: 700; color: #fff; letter-spacing: 0; font-family: var(--rounded, inherit); }
/* 这周要买：四类小柱子（带字），柱子是卡片自己的颜色 */
.hc-cats { display: flex; align-items: flex-end; gap: 7px; height: 64px; flex: none; }
.hc-cats > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; width: 14px; gap: 4px; }
.hc-cats i { display: block; width: 10px; border-radius: 4px 4px 2px 2px; background: var(--c); opacity: .85; flex: none; max-height: calc(100% - 18px); }
.hc-cats span { font-size: 10.5px; line-height: 1; color: var(--ink-3); }
/* 卡片右边的一幅小画 */
.hc-art { width: 54px; height: 54px; flex: none; color: var(--c); }
.hcard .hc-body .hc-text { margin-top: 10px; }

/* ======================================================================
 * 第 15 轮：自定义头像、「计划」「我的」顶部做成卡片、苹果式细分隔线、字重整体轻一档（只有标题和大数字保持粗体）
 * ====================================================================== */
/* ---- 头像 ---- */
.avatar.photo { padding: 0; overflow: hidden; border-color: transparent; background: var(--paper-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar.lg { width: 64px; height: 64px; font-size: 26px; }
.avatar.xl { width: 112px; height: 112px; font-size: 44px; }
.avatar.row { width: 30px; height: 30px; font-size: 13px; flex: none; }
.av-btn { position: relative; flex: none; padding: 0; border: 0; background: none; border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.av-btn:active .avatar { transform: scale(.96); }
.av-btn .avatar { transition: transform .15s ease; }
.av-cam { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); border: 2px solid var(--card); }
.av-cam .ico { width: 13px; height: 13px; }
.avatar-sheet .av-now { display: flex; justify-content: center; margin: 14px 0 12px; }
.avatar-sheet .center { text-align: center; }
.av-crop { position: relative; margin: 16px auto 8px; border-radius: 50%; overflow: hidden; touch-action: none; cursor: grab; background: #000;
  box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--rule-2), 0 12px 30px -12px rgba(0, 0, 0, .4); user-select: none; -webkit-user-select: none; }
.av-crop:active { cursor: grabbing; }
.av-crop img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; will-change: transform; }
.av-zoom { display: block; width: min(260px, 100%); margin: 14px auto 0; accent-color: var(--accent); }
.acct-head { display: flex; align-items: center; gap: 12px; }
.acct-head h3 { margin: 0; }

/* ---- 「我的」顶部：资料卡片（像系统设置最上面那张 Apple ID 卡） ---- */
:root.ui-clean .page.me .profile { background: var(--card); border: 1px solid var(--rule); border-radius: 22px; padding: 16px;
  box-shadow: var(--cl-shadow); margin-bottom: 12px; gap: 14px; }
:root.ui-clean .page.me .profile .nm { font-size: 21px; font-weight: 700; letter-spacing: -.015em; }
:root.ui-clean .page.me .profile .muted { font-size: 12.5px; line-height: 1.45; margin-top: 2px; }
:root.ui-clean .page.me .me-progress { margin-top: 0; }

/* ---- 「计划」顶部：分段选择器 + 目标卡片 ---- */
@media (max-width: 1023px) {
  :root.ui-clean .hub-tabs.page { margin: 0 20px; padding: 3px; gap: 0; border-radius: 11px; background: rgba(var(--ink-rgb), .07); }
  :root.ui-clean .hub-tabs.page a { flex: 1; text-align: center; padding: 7px 0; border-radius: 9px; border: 0; font-size: 13.5px; color: var(--ink-2);
    letter-spacing: 0; transition: background-color .2s ease, box-shadow .2s ease; }
  :root.ui-clean .hub-tabs.page a.on { background: var(--card); color: var(--ink); font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 0 0 .5px rgba(0, 0, 0, .04); }
  :root.ui-clean:not([data-theme="light"]) .hub-tabs.page a.on { background: rgba(255, 255, 255, .14); }
  :root.ui-clean .hub-tabs.page a.on::after { display: none; }
  :root.ui-clean .hub-tabs.page .badge { margin-left: 4px; }
  :root.ui-clean .hub-tabs.page.scroll { margin: 0 20px; }
}
:root.ui-clean .plan-intro { margin: 12px 0 12px; padding: 18px 18px 8px; border-radius: 22px; border: 1px solid var(--rule); box-shadow: var(--cl-shadow); }
:root.ui-clean .plan-intro .display { line-height: 1.2; }
:root.ui-clean .plan-intro .display em { font-family: var(--rounded); margin: 0 3px; letter-spacing: -.02em; }
.pi-sub { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.pi-ring { position: relative; flex: none; width: 64px; height: 64px; }
.pi-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pi-ring circle { fill: none; stroke-width: 5; }
.pi-ring .tr { stroke: rgba(var(--ink-rgb), .08); }
.pi-ring .fg { stroke-linecap: round; transition: stroke-dasharray .6s cubic-bezier(.32, .72, 0, 1); }
.pi-ring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.pi-ring b { font-family: var(--rounded); font-size: 18px; font-weight: 700; }
.pi-ring span { font-size: 9.5px; color: var(--ink-3); margin-top: 3px; }
:root.ui-clean .plan-intro .fold-link { margin-top: 4px; }
:root.ui-clean .plan-intro .lead { font-size: 14px; }

/* ---- 苹果式细分隔线：同一张卡片里行与行之间一条 0.5 像素的细线，从文字左边开始；卡片标题下面也有一条 ---- */
:root.ui-clean { --hair: rgba(var(--ink-rgb), .13); }
:root.ui-clean:not([data-theme="light"]) { --hair: rgba(255, 255, 255, .12); }
.hcard .hc-head:not(:last-child) { padding-bottom: 11px; border-bottom: .5px solid var(--hair); }
.hcard .hc-head + .hc-title { margin-top: 11px; }
.hcard .hc-head + .hc-body .hc-val { margin-top: 12px; }
.hcard .hc-head + .hc-text, .hcard .hc-head + .hc-body > .hc-text { margin-top: 11px; }
:root.ui-clean .me-progress .mp-row { padding-bottom: 11px; border-bottom: .5px solid var(--hair); }
:root.ui-clean .me-progress .mp-row + .small { margin-top: 10px; }
:root.ui-clean .meal-head { padding-bottom: 8px; margin-bottom: 2px; border-bottom: .5px solid var(--hair); }
:root.ui-clean .meal-item { border-top: 0; position: relative; padding: 9px 0; }
:root.ui-clean .meal-item + .meal-item::before { content: ""; position: absolute; top: 0; left: 50px; right: 0; border-top: .5px solid var(--hair); }
:root.ui-clean .meal-head + .meal-item::before { display: none; }
:root.ui-clean .li { border-top: 0; position: relative; }
:root.ui-clean .li + .li::before, :root.ui-clean .li + .more-li::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--hair); }
:root.ui-clean .me-group > .me-row + .me-row, :root.ui-clean .me-sec + .me-sec, :root.ui-clean .me-sec + .me-row, :root.ui-clean .me-row + .me-sec { border-top: 0; position: relative; }
:root.ui-clean .me-group > .me-row + .me-row::before, :root.ui-clean .me-sec + .me-sec::before, :root.ui-clean .me-sec + .me-row::before, :root.ui-clean .me-row + .me-sec::before {
  content: ""; position: absolute; top: 0; left: 58px; right: 0; border-top: .5px solid var(--hair); }
:root.ui-clean .me-row, :root.ui-clean .me-sec { position: relative; }
:root.ui-clean .field, :root.ui-clean .plan-actions, :root.ui-clean .sub-row, :root.ui-clean .fridge-pick, :root.ui-clean .plan-day, :root.ui-clean .cite,
:root.ui-clean .ml-item { border-style: solid; border-width: 0; }
:root.ui-clean .field, :root.ui-clean .plan-actions, :root.ui-clean .sub-row, :root.ui-clean .fridge-pick, :root.ui-clean .plan-day, :root.ui-clean .cite { border-top: .5px solid var(--hair); }
:root.ui-clean .ml-item { border-bottom: .5px solid var(--hair); }

/* ---- 字重：只有页面大标题、分组标题和大数字保持粗体，其余轻一档（像 iOS：正文 Regular、行标题 Medium / Semibold） ---- */
:root.ui-clean .hc-head { font-weight: 600; }
:root.ui-clean .hc-title { font-weight: 700; }
:root.ui-clean .btn { font-weight: 500; }
:root.ui-clean .btn.primary { font-weight: 600; }
:root.ui-clean .opt.on { font-weight: 600; }
:root.ui-clean .meal-item .nm { font-weight: 500; }
:root.ui-clean .nutri b, :root.ui-clean .meal-split b, :root.ui-clean .day-sum b { font-weight: 700; }
:root.ui-clean .me-progress .mp-kcal b { font-weight: 700; }
:root.ui-clean .kicker { font-weight: 500; }
:root.ui-clean .tabbar a.on { font-weight: 600; }
:root.ui-clean .week-strip b { font-weight: 600; }
:root.ui-clean .starter b, :root.ui-clean .label-hero b { font-weight: 600; }
:root.ui-clean .lt, :root.ui-clean .display, :root.ui-clean .hc-val { font-weight: 800; }

/* ======================================================================
 * 第 16 轮：爱吃的食材、标题宋体、「我的」标题比内容大、切标签更快
 * ====================================================================== */
.tag.orange { color: #c9621f; border-color: rgba(224, 119, 47, .45); background: rgba(242, 155, 82, .1); }
:root:not([data-theme="light"]) .tag.orange { color: #f4a15e; }
.like-pick .lp-group + .lp-group { margin-top: 10px; }
.like-pick .lp-cat { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.like-pick .opts { gap: 6px; }
.lp-opt { padding: 6px 12px; font-size: 13.5px; }
.lp-opt.off { opacity: .42; text-decoration: line-through; text-decoration-color: rgba(var(--ink-rgb), .35); }
.field.col { grid-template-columns: 1fr; }
/* ---- 标题宋体（思源宋体 600），正文和数字保持系统黑体 / 圆体：像杂志的排法，不再是一片粗黑体 ---- */
:root.ui-clean .display em, :root.ui-clean .num, :root.ui-clean .hc-val { font-family: var(--rounded); }
:root.ui-clean .hc-head > span { font-size: 15.5px; }
:root.ui-clean .me-row .t { font-size: 15.5px; }

/* ---- 「我的」：卡片标题比里面的内容大（标题 17 号宋体，内容 15 号常规黑体），不再「内容压过标题」 ---- */
.page.me .hc-head > span { font-size: 17px; color: var(--ink); }
.page.me .hcard .hc-title { font-size: 15px; font-weight: 400; color: var(--ink-2); line-height: 1.5; letter-spacing: 0; }
.page.me .hcard .hc-title .hc-sub { font-size: 13px; }
.page.me .hcard .hc-val { font-size: 15px; font-weight: 500; color: var(--ink-2); font-family: var(--sans); letter-spacing: 0; }
.page.me .hcard .hc-val .u { font-size: 13px; }
.page.me .me-progress .mp-t { font-size: 17px; }
.page.me .me-progress .mp-kcal b { font-size: 17px; font-weight: 600; }
.page.me .me-progress .kicker { font-size: 12px; }
.page.me .hc-head > .ico:first-child { width: 32px; height: 32px; padding: 7px; }

/* ---- 切标签：像 iOS 一样直接换，不做逐块浮入（省掉切页时的大量重绘，标签栏点了马上有反应） ---- */
.no-vt .view[data-nav="tab"] > * > * { animation: none !important; }
/* 食材选项：每一类一行，左右滑着看，不把页面拉得很长 */
.like-pick .opts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.like-pick .opts::-webkit-scrollbar { display: none; }
.like-pick .lp-opt { flex: none; }
.field.col > *, .like-pick, .like-pick .lp-group { min-width: 0; }
.like-pick { width: 100%; overflow: hidden; }

/* ======================================================================
 * 第 17 轮：字体和官网首页一致（英文数字 Cormorant Garamond + 中文思源宋体细体、字距放宽），计划顶部的分段选择器改成和标签栏一样的玻璃卡片
 * ====================================================================== */
:root.ui-clean { --title: var(--sans); }
/* 大标题、分组标题：细体（300）+ 宽字距，像首页的「每一口，都有依据。」 */
:root.ui-clean .lt, :root.ui-clean .display, :root.ui-clean .ob-q .display, :root.ui-clean .h-sec h3, :root.ui-clean .cl-sec h3,
:root.ui-clean .me-group-t, :root.ui-clean .d-head h2 {
  font-family: var(--title); font-weight: 800; letter-spacing: -.01em; }
:root.ui-clean .lt { font-size: 34px; letter-spacing: -.02em; line-height: 1.15; }
:root.ui-clean .h-sec h3, :root.ui-clean .cl-sec h3, :root.ui-clean .me-group-t { font-size: 21px; letter-spacing: -.01em; }
/* 小标题（卡片标题、名字、每顿饭、设置行）：500，字距略宽 */
:root.ui-clean .hc-head > span, :root.ui-clean .profile .nm, :root.ui-clean .meal-head b, :root.ui-clean .topbar .title,
:root.ui-clean .me-progress .mp-t, :root.ui-clean .sheet h3, :root.ui-clean .brand, :root.ui-clean .rv-t, :root.ui-clean .me-row .t {
  font-family: var(--title); font-weight: 700; letter-spacing: -.005em; }
:root.ui-clean .profile .nm { font-size: 22px; letter-spacing: -.01em; }
/* 标题里的大数字（每天 1660 千卡）用 Cormorant，和首页的英文大字一样 */
:root.ui-clean .display em { font-weight: 800; font-size: 1.5em; letter-spacing: -.02em;
  font-variant-numeric: lining-nums; }
:root.ui-clean .plan-intro .display { font-size: 24px; }
:root.ui-clean .plan-intro .display em { font-size: 44px; }

/* ---- 计划顶部「本周三餐 / 找菜 / 购物清单 / 冰箱」：和底部标签栏一样的玻璃卡片 + 会滑动的镜片 ---- */
@media (max-width: 1023px) {
  :root.ui-clean .hub-tabs.page.glass { margin: 2px 16px 0; padding: 5px; gap: 0; border-radius: 26px; isolation: isolate;
    background: linear-gradient(180deg, rgba(var(--paper-rgb), .92), rgba(var(--paper-rgb), .86));
    border: 1px solid rgba(255, 255, 255, .6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -1px 0 rgba(0, 0, 0, .03), 0 12px 32px -14px rgba(0, 0, 0, .22), 0 2px 8px -4px rgba(0, 0, 0, .08); }
  :root.ui-clean .hub-tabs.page.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
    background: radial-gradient(120% 60% at 50% -10%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%); }
  :root.ui-clean .hub-tabs.page.glass a { position: relative; z-index: 1; flex: 1; text-align: center; padding: 9px 0; border-radius: 21px; font-size: 14px;
    color: var(--ink-3); background: transparent; box-shadow: none; letter-spacing: .04em; transition: color .25s ease; }
  :root.ui-clean .hub-tabs.page.glass a.on { color: var(--ink); font-weight: 600; background: transparent; box-shadow: none; }
  :root.ui-clean .hub-tabs.page.glass .hub-lens { position: absolute; top: 5px; bottom: 5px; left: 5px; border-radius: 21px; z-index: 0;
    background: rgba(var(--ink-rgb), .07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(var(--ink-rgb), .04);
    transform: translate3d(calc(var(--hi, 0) * 100%), 0, 0); transition: transform .42s cubic-bezier(.3, 1.25, .45, 1); will-change: transform; }
  :root.ui-clean:not([data-theme="light"]) .hub-tabs.page.glass {
    background: linear-gradient(180deg, rgba(44, 44, 42, .92), rgba(30, 30, 29, .9)); border-color: rgba(255, 255, 255, .09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 12px 32px -12px rgba(0, 0, 0, .6); }
  :root.ui-clean:not([data-theme="light"]) .hub-tabs.page.glass::before { background: radial-gradient(120% 60% at 50% -10%, rgba(255, 255, 255, .1), rgba(255, 255, 255, 0) 60%); }
  :root.ui-clean:not([data-theme="light"]) .hub-tabs.page.glass .hub-lens { background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
}
@media (min-width: 1024px) { .hub-lens { display: none; } }
@media (prefers-reduced-motion: reduce) { .hub-lens { transition: none !important; } }
:root.ui-clean .display em { font-family: var(--title); }
:root.ui-clean .lt, :root.ui-clean .display, :root.ui-clean .h-sec h3, :root.ui-clean .cl-sec h3, :root.ui-clean .me-group-t, :root.ui-clean .hc-head > span,
:root.ui-clean .profile .nm, :root.ui-clean .meal-head b, :root.ui-clean .me-progress .mp-t, :root.ui-clean .me-row .t { font-variant-numeric: lining-nums; }

/* ======================================================================
 * 第 18 轮：计划顶部分段选择器往下滑时吸在顶部；「换一换」一餐多种吃法 + 让 AI 再想几道
 * ====================================================================== */
@media (max-width: 1023px) {
  :root.ui-clean .hub-tabs.page.glass { position: sticky; top: calc(48px + env(safe-area-inset-top)); z-index: 19; }
}
.opt-sheet { max-height: 88vh; }
.opt-sheet .ai-box { margin: 12px 0 4px; }
.opt-sheet .ai-btn { border-style: dashed; border-color: rgba(var(--ink-rgb), .25); background: rgba(var(--ink-rgb), .03); color: var(--ink); }
.opt-sheet .ai-btn .ico { color: var(--ink); }
.opt-sheet .ai-run { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(var(--ink-rgb), .05); color: var(--ink-2); }
.opt-sheet .ai-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.opt-sheet .tag.ghost { opacity: .6; }
.opt-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.opt-card { display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--rule); background: var(--card);
  color: var(--ink); box-shadow: var(--cl-shadow); transition: transform .15s ease; }
.opt-card:active { transform: scale(.985); }
.opt-card.ai { border-color: var(--ink); }
.oc-d { display: flex; align-items: center; gap: 10px; }
.oc-d + .oc-d { margin-top: 8px; }
.oc-d b { font-weight: 500; margin-right: 4px; }
.oc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 10px; padding-top: 9px; border-top: .5px solid var(--hair, var(--rule));
  font-size: 12.5px; color: var(--ink-3); }
.oc-meta b { color: var(--ink); font-weight: 600; }

/* ======================================================================
 * 第 19 轮：「我的进展」顶部也用玻璃卡片 + 镜片（5 栏）；「我的进展」卡片加 7 天热量小柱子和体重小折线
 * ====================================================================== */
@media (max-width: 1023px) {
  :root.ui-clean .hub-tabs.page.glass .hub-lens { width: calc((100% - 10px) / var(--n, 4)); }
  :root.ui-clean .hub-tabs.page.glass.under-back { top: calc(63px + env(safe-area-inset-top)); margin-top: 4px; }
  :root.ui-clean .hub-tabs.page.glass.under-back a { font-size: 13px; letter-spacing: 0; padding: 9px 0; white-space: nowrap; }
}
.mp-viz { display: flex; gap: 14px; align-items: stretch; margin-top: 12px; }
.mp-bars { flex: 1.35; min-width: 0; }
.mp-bars .bars { position: relative; display: flex; align-items: flex-end; gap: 5px; height: 56px; }
.mp-bars .bars i { flex: 1; display: block; border-radius: 4px 4px 2px 2px; background: var(--ink); min-height: 3px; }
.mp-bars .bars i.under { background: rgba(var(--ink-rgb), .35); }
.mp-bars .bars i.over { background: var(--st-crit); }
.mp-bars .bars i.none { background: rgba(var(--ink-rgb), .08); height: 6px !important; }
.mp-bars .bars .goal { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(var(--ink-rgb), .3); pointer-events: none; }
.mp-bars .mp-wd { display: flex; gap: 5px; margin-top: 4px; }
.mp-bars .mp-wd span { flex: 1; text-align: center; font-size: 10.5px; color: var(--ink-3); }
.mp-w { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding-left: 14px; border-left: .5px solid var(--hair, var(--rule)); }
.mp-w svg { width: 100%; height: 40px; overflow: visible; }
.mp-w .ln { fill: none; stroke: var(--c-weight); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mp-w .ar { fill: var(--c-weight); opacity: .12; stroke: none; }
.mp-w .dot { fill: var(--c-weight); stroke: var(--card); stroke-width: 2; }
.mp-w .wv { font-size: 12px; color: var(--ink-3); line-height: 1.3; }
.mp-w .wv b { font-family: var(--rounded); font-size: 15px; color: var(--ink); font-weight: 600; }
.mp-viz-k { font-size: 11px; color: var(--ink-3); margin-bottom: 6px; }

/* ======================================================================
 * 第 20 轮：「今天」切回来时圆环重新画一遍；计划目标卡片去掉渐变、数字换成墨绿；三餐分段条三种颜色
 * ====================================================================== */
.cl-arc.no-tr { transition: none !important; }
:root.ui-clean .plan-intro { background: var(--card); }
:root.ui-clean .plan-intro .display em { color: var(--ink); }
:root.ui-clean .pi-ring .fg { stroke: var(--ink); }
/* 早 / 午 / 晚 三种不同的颜色（琥珀、青绿、靛蓝），比例写在段里 */
.split-bar .sb-b { background: #ff9f1c; } .split-bar .sb-b span { color: #111111; }
.split-bar .sb-l { background: #0ca30c; } .split-bar .sb-l span { color: #fff; }
.split-bar .sb-d { background: #7c63f0; } .split-bar .sb-d span { color: #fff; }
:root:not([data-theme="light"]) .split-bar .sb-b { background: #ff9f1c; } :root:not([data-theme="light"]) .split-bar .sb-b span { color: #111111; }
:root:not([data-theme="light"]) .split-bar .sb-l { background: #0ca30c; }
:root:not([data-theme="light"]) .split-bar .sb-d { background: #7c63f0; }
.meal-split .lg { display: none; }
:root.ui-clean .meal-split .lg { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.meal-split .lg.sb-b { background: #ff9f1c; } .meal-split .lg.sb-l { background: #0ca30c; } .meal-split .lg.sb-d { background: #7c63f0; }

/* ======================================================================
 * 第 21 轮：记一顿弹窗（参考 MacroFactor）：顶部胶囊 / 方式标签 / 「+」放进这一顿 / 底部常驻「记下」
 * ====================================================================== */
.meal-sheet.ms { display: flex; flex-direction: column; max-height: 90vh; padding-top: 12px; overflow: hidden; }
.ms-top { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.ms-cap { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 14px; border-radius: 999px; border: 0;
  background: rgba(var(--ink-rgb), .07); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; }
.ms-cap.ic { width: 38px; padding: 0; justify-content: center; }
.ms-cap .ico.xs { width: 12px; height: 12px; opacity: .6; }
.ms-cap.ring { margin-left: auto; background: transparent; box-shadow: inset 0 0 0 2px rgba(var(--ink-rgb), .85); font-weight: 600; }
.ms-cap.ring b { font-weight: 650; font-size: 14px; }
.ms-tabs { display: flex; gap: 2px; margin: 0 -20px; padding: 0 14px; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; flex: none; }
.ms-tabs::-webkit-scrollbar { display: none; }
.ms-tabs button { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 11px 10px 10px; border: 0; background: none; font: inherit;
  font-size: 14px; color: var(--ink-3); border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.ms-tabs button.on { color: var(--ink); font-weight: 650; border-bottom-color: var(--ink); }
.ms-tabs .ico.xs { width: 14px; height: 14px; }
.ms-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 0 12px; -webkit-overflow-scrolling: touch; }
.ms-h { font-size: 15px; font-weight: 700; margin: 14px 0 8px; color: var(--ink); }
.ms-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 2px; scrollbar-width: none; }
.ms-chips::-webkit-scrollbar { display: none; }
.ms-combo { flex: none; max-width: 220px; text-align: left; padding: 10px 14px; border: 0; border-radius: 16px; background: rgba(var(--ink-rgb), .05); color: var(--ink); font: inherit; }
.ms-combo b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-combo span { font-size: 12px; color: var(--ink-3); }
.ms-list { display: flex; flex-direction: column; }
.ms-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: .5px solid var(--rule); }
.ms-row:last-child { border-bottom: 0; }
.ms-row b { display: block; font-size: 15px; font-weight: 550; }
.ms-row small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 1px; font-variant-numeric: tabular-nums; }
.ms-add { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(var(--ink-rgb), .08); color: var(--ink);
  transition: background-color .15s ease, transform .15s ease; }
.ms-add:active { transform: scale(.9); }
.ms-add.on { background: var(--accent, var(--ink)); color: var(--on-accent, var(--paper)); }
.ms-empty { padding: 18px 2px; font-size: 14px; color: var(--ink-3); line-height: 1.7; }
.ms-empty .link { font-size: inherit; }
.ms-say { width: 100%; resize: none; font-size: 16px; line-height: 1.5; }
.btn.block { display: flex; width: 100%; justify-content: center; }
.ms-snap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ms-snap .sk, .ms-scan .sk { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 18px; background: rgba(var(--ink-rgb), .05); cursor: pointer; }
.ms-snap .sk.big, .ms-scan .sk.big { grid-column: 1 / -1; background: var(--accent, var(--ink)); color: var(--on-accent, var(--paper)); }
.ms-snap .sk.big span, .ms-scan .sk.big span { color: inherit; opacity: .75; }
.ms-snap .sk.busy, .ms-scan .sk.busy { opacity: .6; }
.ms-snap .sk b, .ms-scan .sk b { font-size: 15px; } .ms-snap .sk span, .ms-scan .sk span { font-size: 12px; color: var(--ink-3); }
.ms-search { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 0 14px; border-radius: 999px; background: rgba(var(--ink-rgb), .06); }
.ms-search .input { border: 0; background: transparent; padding-left: 0; box-shadow: none; }
.ms-search .ico { color: var(--ink-3); flex: none; }
.sure { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; }
.sure-hi { color: #19734a; background: rgba(25, 150, 90, .1); }
.sure-mid { color: #8a5a00; background: rgba(220, 150, 0, .12); }
.sure-lo { color: #b03a2e; background: rgba(210, 60, 50, .1); }
:root:not([data-theme="light"]) .sure-hi { color: #63d39a; } :root:not([data-theme="light"]) .sure-mid { color: #f2c055; } :root:not([data-theme="light"]) .sure-lo { color: #f08a7e; }
span.sure-hi, span.sure-mid, span.sure-lo { background: none; padding: 0; font-weight: 500; }
.ms-it .ml-est { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ms-flag { margin-left: auto; }
.ms-flagbox { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; }
.ms-flagbox .input { flex: 1; min-width: 0; font-size: 14px; }
.ms-foot { flex: none; display: flex; gap: 10px; align-items: center; padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--card); }
.ms-sum { flex: 1; min-width: 0; text-align: left; border: 0; background: rgba(var(--ink-rgb), .06); border-radius: 999px; padding: 8px 16px; font: inherit; color: var(--ink); }
.ms-sum b { display: block; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-sum small { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.neg { color: var(--st-crit, #d03b3b) !important; }
.ms-go { flex: none; height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 650; }
.ms-done { text-align: center; padding: 18px 4px 6px; }
.ms-ok { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--accent, var(--ink)); color: var(--on-accent, var(--paper)); }
.ms-ok .ico { width: 28px; height: 28px; stroke-width: 2.4; }
.ms-done h3 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.ms-left { display: flex; justify-content: center; gap: 10px; margin: 16px 0 6px; }
.ms-left > div { flex: 1; max-width: 120px; padding: 10px 6px; border-radius: 16px; background: rgba(var(--ink-rgb), .05); display: flex; flex-direction: column; align-items: center; }
.ms-left small { font-size: 11.5px; color: var(--ink-3); }
.ms-left b { font-size: 24px; font-weight: 750; line-height: 1.2; font-family: var(--rounded, inherit); }
.ms-tip { display: flex; gap: 10px; text-align: left; margin-top: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--rule); font-size: 14px; line-height: 1.55; }
.ms-tip small { font-size: 12px; color: var(--ink-3); }
.ms-tip > .ico { flex: none; margin-top: 2px; }

/* 计划：整天重排 / 锁定 / 只换主菜或配菜 / 不想吃这道 */
.day-tools { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; }
.day-tools .small .ico.xs { width: 12px; height: 12px; vertical-align: -1px; }
.chip-btn { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 14px; border-radius: 999px; border: 0;
  background: rgba(var(--ink-rgb), .07); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.chip-btn:disabled { opacity: .5; }
.chip-btn .ico.xs { width: 14px; height: 14px; }
.part-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 12px 0 2px; }
.part-row::-webkit-scrollbar { display: none; }
.meal-head .icon-btn.on { color: var(--ink); background: rgba(var(--ink-rgb), .1); }
.col-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

/* 下周方案更新（参考 MacroFactor 的 Program Update） */
.upd-sheet { max-height: 92vh; }
.upd-t { font-size: 24px; font-weight: 800; letter-spacing: -.01em; margin: 6px 0 14px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.upd-bars { display: flex; gap: 6px; align-items: flex-end; height: 220px; }
.ub { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.ub-k { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 999px; background: #c9dbff; color: #17305f; }
:root:not([data-theme="light"]) .ub-k { background: #2b3f6b; color: #d8e4ff; }
.ub-col { width: 100%; display: flex; flex-direction: column; gap: 2px; min-height: 40px; }
.ub-col i { display: flex; align-items: center; justify-content: center; border-radius: 6px; min-height: 18px; font-style: normal; }
.ub-col i span { font-size: 10px; font-weight: 600; }
.ub small { font-size: 12px; color: var(--ink-3); }
.ub-col .sb-b { background: #ff9f1c; color: #111111; } .ub-col .sb-l { background: #0ca30c; color: #fff; } .ub-col .sb-d { background: #7c63f0; color: #fff; }
.ub-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.ub-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.ub-legend .sb-b { background: #ff9f1c; } .ub-legend .sb-l { background: #0ca30c; } .ub-legend .sb-d { background: #7c63f0; }
.upd-lines { display: flex; flex-direction: column; gap: 12px; }
.ul { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.ul-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--ink-rgb), .07); }
.upd-why { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: rgba(var(--ink-rgb), .04); color: var(--ink-2); }

/* 体重趋势（参考 MacroFactor）：淡色每天称重 + 紫色趋势线 + 时间范围胶囊 + 3 / 7 / 14 天变化 */
.wt { --wt: var(--c-weight, #7c63f0); }
.wt-head { display: flex; gap: 22px; align-items: flex-start; }
.wt-head > div small { display: block; font-size: 12px; color: var(--ink-3); }
.wt-head > div b { font-size: 30px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.wt-head > div > span { font-size: 13px; color: var(--ink-3); margin-left: 3px; }
.wt-i { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(var(--ink-rgb), .07); color: var(--ink); display: grid; place-items: center; }
.wt-note { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(var(--ink-rgb), .05); color: var(--ink-2); }
.wt-chart svg { width: 100%; height: auto; display: block; margin-top: 10px; overflow: visible; }
.wt-grid line { stroke: rgba(var(--ink-rgb), .12); stroke-dasharray: 2 4; }
.wt-grid text, .wt-x { font-size: 10px; fill: var(--ink-3); }
.wt-scale { fill: none; stroke: var(--wt); stroke-opacity: .35; stroke-width: 1.4; stroke-linejoin: round; }
.wt-trend { fill: none; stroke: var(--wt); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.wt-dot { fill: var(--card); stroke: var(--wt); stroke-width: 1.6; }
.wt-dot.on { fill: var(--wt); r: 5; }
.wt-hit { fill: transparent; }
.wt-read { font-size: 12.5px; color: var(--ink-3); text-align: center; margin-top: 2px; }
.wt-read b { color: var(--ink); font-weight: 650; }
.wt-empty { padding: 16px 0; }
.wt-range { display: flex; gap: 4px; margin-top: 12px; padding: 4px; border-radius: 999px; background: rgba(var(--ink-rgb), .06); }
.wt-range button { flex: 1; height: 32px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 13px; color: var(--ink-2); }
.wt-range button.on { background: var(--accent, var(--ink)); color: var(--on-accent, var(--paper)); font-weight: 650; }
.wt-legend { display: flex; justify-content: center; gap: 18px; margin-top: 12px; padding: 8px; border-radius: 12px; background: rgba(var(--ink-rgb), .04); font-size: 12px; color: var(--ink-2); }
.wt-legend i { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--wt); vertical-align: middle; margin-right: 6px; }
.wt-legend .lg-scale { opacity: .4; border-top-width: 1.5px; }
.wt-sub { font-size: 15px; font-weight: 700; margin: 16px 0 6px; }
.wt-changes { display: flex; flex-direction: column; }
.wc { display: grid; grid-template-columns: 52px 48px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: .5px solid var(--rule); font-size: 14px; }
.wc:last-child { border-bottom: 0; }
.wc-k { color: var(--ink-3); font-size: 13px; }
.wc-spark { width: 44px; height: 18px; } .wc-spark path { fill: none; stroke: var(--wt); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wc b { font-weight: 650; }
.wc-dir { font-size: 12.5px; color: var(--ink-2); }

/* 食品标签：按今天剩下的 + 换成这种更好 */
.fit-card { margin-top: 12px; }
.fit-main { font-size: 18px; font-weight: 700; margin: 4px 0 2px; letter-spacing: -.01em; }
.finding.alt .f-row { align-items: flex-start; gap: 10px; }
.finding.alt .f-row .ico { flex: none; margin-top: 2px; }
.alt-hint { padding-left: 28px; margin-top: 2px; }
.alt-src { display: block; padding: 10px 16px 14px; }

/* 体检报告：四色分级 + 行动清单 + 指标和饮食 */
.grade-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.gs { border-radius: 16px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; background: rgba(var(--ink-rgb), .04); }
.gs b { font-size: 24px; font-weight: 750; line-height: 1.15; }
.gs small { font-size: 12px; color: var(--ink-2); }
.gs-red { --g: #d03b3b; } .gs-orange { --g: #e8742a; } .gs-yellow { --g: #d9a300; } .gs-green { --g: #1e9e5a; } .gs-blue { --g: #3b7be0; }
.gs b { color: var(--g); }
.gdot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--g); margin-right: 2px; }
.act-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--g); }
.finding.act .f-row { align-items: flex-start; gap: 10px; }
.trend-card { margin-bottom: 10px; }
.trend-card .f-row { gap: 8px; align-items: baseline; }
.tr-rows { margin-top: 8px; }
.tr-row { display: grid; grid-template-columns: 70px 56px 1fr; gap: 8px; align-items: baseline; padding: 6px 0; border-top: .5px solid var(--rule); font-size: 13.5px; }
.tr-row b.num { font-size: 16px; font-weight: 700; }
.tr-diet { color: var(--ink-2); font-size: 12.5px; }
.tr-diet b { font-size: 13.5px; color: var(--ink); }

/* ---- 第 22 轮：回顾页「盐主要来自」用盐的数据色（颜色只给数据） ---- */
:root.ui-clean .st-bar i { background: var(--c-salt); }
:root.ui-clean .st-n { font-weight: 700; color: var(--ink-3); }
:root.ui-clean .hc-tags .tag.ochre { color: var(--ink); background: rgba(var(--ink-rgb), .06); border-color: transparent; font-weight: 600; }
:root.ui-clean .display em { display: block; white-space: nowrap; }      /* 大标题后半句「拍一下」「吃有依据」整句换到第二行 */

/* ---- 手机适配：装到桌面后状态栏是透明的，「今天」页自己的标题栏要让开刘海 / 灵动岛 ---- */
@media (max-width: 1023px) { .phone.own-head .cl-head { padding-top: calc(10px + env(safe-area-inset-top)); } }
.phone.own-head::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: var(--paper); z-index: 45; pointer-events: none; }
.phone.own-head .offline-bar, .phone.own-head .install-hint { margin-top: env(safe-area-inset-top); }
/* 手机上的小卡片（盐、蛋白质、糖、嘌呤、喝水）：两列，数字在左、圆环在右；单数时最后一张占满一行，不留空格 */
@media (max-width: 1023px) {
  .cl-minis:not(.wide) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-minis:not(.wide) > .cl-mini:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .cl-minis:not(.wide) .cl-mini { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 8px;
    align-content: center; align-items: start; padding: 12px 12px 12px 16px; }
  .cl-minis:not(.wide) .cl-mini .cm-v { grid-column: 1; grid-row: 1; }
  .cl-minis:not(.wide) .cl-mini .cm-l { grid-column: 1; grid-row: 2; margin: 2px 0 0; }
  .cl-minis:not(.wide) .cl-mini .cl-ring { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .cl-minis:not(.wide) .cl-mini .cl-cup { grid-column: 1 / -1; grid-row: 3; justify-self: start; margin-top: 8px; }
}
@media (max-width: 400px) {    /* 窄屏：圆环缩小一点，给「蛋白质」这类字留位置 */
  .cl-minis:not(.wide) .cl-mini .cl-ring { width: 54px !important; height: 54px !important; }
  .cl-minis:not(.wide) .cl-mini .cl-ring-svg { width: 100%; height: 100%; }
  .cl-minis:not(.wide) .cl-mini { padding-left: 14px; padding-right: 10px; }
}

/* ICP 备案号 */
.me-icp { margin: 22px 0 8px; text-align: center; font-size: 12px; color: var(--muted, #8a8a8a); }
.me-icp a { color: inherit; text-decoration: none; }
.me-icp a:hover { text-decoration: underline; }

/* ---- 动效第三版（2026-10-31）：快捷方式面板、面板之间接力、主视图跟手的标签、日期切换 ----
 * 曲线统一用两条：进场 cubic-bezier(.22, 1, .36, 1)（快出、长尾、不回弹），按钮松手 cubic-bezier(.34, 1.56, .64, 1)（轻微回弹）。
 * 只动 transform / opacity，不动布局属性；系统开了「减少动态效果」全部关掉。 */
.qk-sheet h3 { margin-bottom: 2px; }
.qk-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px -4px 10px; }
.qk-b { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 4px; font-size: 13px; color: var(--ink); border-radius: 16px; -webkit-tap-highlight-color: transparent; }
.qk-ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--rule);
  transition: transform .32s cubic-bezier(.34, 1.56, .64, 1), background-color .2s ease; }
.qk-ic .ico { width: 24px; height: 24px; }
.qk-b:active .qk-ic { transform: scale(.9); transition-duration: .1s; transition-timing-function: ease-out; }
@media (hover: hover) { .qk-b:hover .qk-ic { background: var(--paper-2); } }
.qk-list { border-top: 1px solid var(--rule); margin: 0 -4px; }
.qk-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; text-align: left; color: var(--ink); border-bottom: 1px solid var(--rule);
  transition: background-color .2s ease; -webkit-tap-highlight-color: transparent; }
button.qk-row:active { background: var(--paper); }
.qk-row:last-child { border-bottom: 0; }
.qk-row .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qk-row b { font-size: 15.5px; font-weight: 600; } .qk-row small { font-size: 12.5px; color: var(--ink-3); }
.qk-ri { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); flex: none; }
.qk-go { color: var(--ink-3); }
.qk-water .qk-ri { color: var(--c-water); }
.qk-wbar { display: block; height: 4px; border-radius: 2px; background: var(--ring-track); margin-top: 6px; overflow: hidden; max-width: 180px; }
.qk-wbar i { display: block; height: 100%; border-radius: 2px; background: var(--c-water); transition: width .55s cubic-bezier(.22, 1, .36, 1); }
.qk-cup { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--c-water); color: var(--ink); font-size: 13.5px; flex: none;
  animation: qk-pop .42s cubic-bezier(.34, 1.56, .64, 1); transition: transform .1s ease-out; }
.qk-cup .ico { color: var(--c-water); }
.qk-cup:active { transform: scale(.92); }
.qk-cup.busy { opacity: .7; }
@keyframes qk-pop { from { transform: scale(.86); } }
@keyframes qk-in { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.96); } }
.qk-b, .qk-row { animation: qk-in .5s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(80ms + var(--i, 0) * 26ms); }
.qk-water .qk-cup { animation-delay: 0s; }

/* 面板接力：新遮罩不再淡入（旧的颜色直接接上），旧面板沉到下面、就地缩小淡出，新面板照常从底下滑上来 */
:root.sheet-handoff .mask:not(.leaving) { animation: none; }
.mask.leaving.handoff { z-index: 39; background: transparent; animation: none; }
.mask.leaving.handoff .sheet { transform-origin: 50% 100%; animation: sheet-recede .32s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes sheet-recede { to { opacity: 0; transform: translate3d(0, 12px, 0) scale(.94); } }

/* 「＋」：面板打开时转成 45°，收起时转回来 */
.fab .ico { transition: transform .42s cubic-bezier(.34, 1.56, .64, 1); }
.fab.open .ico { transform: rotate(45deg); }

/* 主视图：标签下面的小胶囊跟着手指走；两页滑动时离开的那页略缩小变淡 */
.pg-nav { position: relative; display: grid; grid-template-columns: repeat(2, 84px); gap: 6px; justify-content: center; }
.pg-pill { position: absolute; top: 0; bottom: 0; left: calc(50% - 87px); width: 84px; border-radius: 999px; background: var(--card); box-shadow: var(--cl-shadow);
  transform: translate3d(calc(var(--pgx, 0) * 90px), 0, 0); will-change: transform; pointer-events: none; }
.pg-tab { position: relative; justify-content: center; transition: color .25s ease; }
.pg-tab.on { background: none; box-shadow: none; }
.pg-tab i { transition: background-color .25s ease, border-color .25s ease; }
.pg-page > .card { transform-origin: 50% 40%; will-change: transform, opacity; }

/* 本周柱子：换一天、切「已吃 / 还剩」时柱子平滑长高变矮 */
.cg-track i { transition: height .55s cubic-bezier(.22, 1, .36, 1), background-color .3s ease; }
.cg-cell { transition: transform .16s ease, border-color .25s ease; }

/* 「‹ 今天 ›」换日期：文字顺着方向滑一点再淡入 */
.dsw-enter-active { transition: opacity .22s ease, transform .3s cubic-bezier(.22, 1, .36, 1); }
.dsw-leave-active { transition: opacity .12s ease, transform .12s ease-in; }
.dsw-enter-from { opacity: 0; transform: translate3d(calc(var(--dir, 1) * 10px), 0, 0); }
.dsw-leave-to { opacity: 0; transform: translate3d(calc(var(--dir, 1) * -6px), 0, 0); }
.cl-daynav .cl-date { display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  .qk-b, .qk-row, .qk-cup, .mask.leaving.handoff .sheet { animation: none !important; }
  .qk-ic, .qk-wbar i, .fab .ico, .cg-track i, .dsw-enter-active, .dsw-leave-active, .pg-page > .card { transition: none !important; }
  .pg-page > .card { transform: none !important; opacity: 1 !important; }
}

/* 遮罩只淡入「暗色背景」，面板本身从第一帧就是实心的（以前整个遮罩连同面板一起淡入，滑上来时能透出底下的字） */
.mask { animation: scrim-in .3s ease; }
@keyframes scrim-in { from { background-color: transparent; } }
.mask.leaving { animation: scrim-out .28s ease forwards; }
@keyframes scrim-out { to { background-color: transparent; } }
@media (max-width: 1023px) { .mask { animation: scrim-in .3s ease; } }
@media (prefers-reduced-motion: reduce) { .mask, .mask.leaving { animation: none !important; } }

/* ======================================================================
 * 字体与卡片（照 MacroFactor 实机界面整理，2026-10-31；见项目文档《膳知-MacroFactor界面实机学习》）
 * - 拉丁字母和数字统一用 DM Sans（「Shanzhi UI Latin」，入口页已经在用，自托管，OFL）；中文接系统字体。
 * - 页面大标题用最粗一档（Noto Sans CJK SC Black 的子集，字集外退回系统粗体），像 MacroFactor 的「DASHBOARD」。
 * - 分区标题 20 号粗体；卡片标题 16 号半粗、时间段 13 号灰；读数大数字 + 小一号灰色单位。
 * - 浅色模式卡片不描边、不加阴影：浅灰底上直接放白卡片，圆角 16。
 * - 「看全部」用带下划线的墨色字，像「See All」。
 * ====================================================================== */
:root.ui-clean {
  --rounded: var(--sans);
}
:root.ui-clean[data-theme="light"] { --cl-shadow: none; }
:root.ui-clean[data-theme="light"] .card { border-color: transparent; }
:root.ui-clean .card { border-radius: 16px; }
:root.ui-clean .num { font-feature-settings: "tnum" 1; letter-spacing: -.01em; }

/* 页面大标题 */
:root.ui-clean .lt, .cl-brand b { font-family: var(--title); font-weight: 900; letter-spacing: .01em; }
:root.ui-clean .lt { font-size: 30px; line-height: 1.2; }
.cl-brand b { font-size: 27px; }
.cl-head { padding: 12px 0 10px; }

/* 分区标题和「看全部」 */
:root.ui-clean .cl-sec { margin: 26px 2px 12px; }
:root.ui-clean .cl-sec h3, :root.ui-clean .h-sec h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
:root.ui-clean .cl-sec .link, :root.ui-clean .cl-sec a.link { color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
:root.ui-clean .cl-sec > .muted { font-size: 12.5px; }

/* 卡片层次：标题 → 时间段 → 图 → 分隔线 → 读数 */
.cl-ins { padding: 16px 16px 12px; }
.cl-ins > b { font-size: 16px; font-weight: 600; letter-spacing: -.005em; }
.cl-ins > small { font-size: 13px; margin-top: 1px; }
.cl-foot { margin-top: 12px; padding-top: 12px; }
.cl-foot b { font-size: 20px; font-weight: 600; }
.cl-foot small { font-size: 13px; margin-left: 2px; }
.cl-today { padding: 22px 20px 14px; }
.cl-big b { font-weight: 600; letter-spacing: -.03em; }
.cl-lab { font-size: 14px; }
.lm-l { font-size: 15px; color: var(--ink); }
.lm-v b { font-size: 17px; font-weight: 600; }
.cg-r b { font-weight: 600; }
.cl-grid .cg-h b { font-size: 16px; font-weight: 600; }
.cmeal-h b { font-size: 16px; }
.cmeal-k b { font-weight: 600; }
.cl-next .cn-h > span:first-child { font-size: 13.5px; }
.cl-daynav .cl-date { font-size: 16px; font-weight: 600; }
.cl-mode .seg.mini { width: 140px; background: var(--paper-2); border-color: transparent; }
.cl-mode .seg.mini button { font-size: 13px; font-weight: 600; }

/* 「‹ ›」：灰底圆钮（像 MacroFactor 右上角的设置钮），按下轻轻一缩 */
.cl-daynav .icon-btn { background: var(--card); border: 0; border-radius: 50%; transition: transform .14s ease-out, opacity .2s ease, background-color .2s ease; }
:root.ui-clean[data-theme="light"] .cl-daynav .icon-btn { background: #e9e9e9; }
.cl-daynav .icon-btn:active:not(:disabled) { transform: scale(.88); }

/* 换日期：「吃了」那一块顺着方向滑过去（往前一天从左边来，往后一天从右边来） */
.dayx-enter-active { transition: opacity .26s ease, transform .36s cubic-bezier(.22, 1, .36, 1); }
.dayx-leave-active { transition: opacity .13s ease, transform .13s cubic-bezier(.4, 0, 1, 1); }
.dayx-enter-from { opacity: 0; transform: translate3d(calc(var(--dir, 1) * 28px), 0, 0); }
.dayx-leave-to { opacity: 0; transform: translate3d(calc(var(--dir, 1) * -14px), 0, 0); }
.cl-dayx .cl-meals > .cl-meal { animation: none; }
@media (prefers-reduced-motion: reduce) { .dayx-enter-active, .dayx-leave-active, .cl-daynav .icon-btn { transition: none !important; } }

/* 底部导航：2026-11 用户要求换回 sz80 的悬浮玻璃标签栏 +「＋」（通栏标签栏和常驻搜索行已去掉） */

/* ======================================================================
 * 今天 · 顶部白色通栏（照 MacroFactor 手机版看板，2026-11-01）
 * 白色通栏从标题一直到「已吃 / 还剩」，下面灰色区域放页码和分区；主视图第 1 页是开口朝下的弧形表 + 三四列营养素，第 2 页是本周格子。
 * ====================================================================== */
.clean .cl-head { align-items: center; }
.cl-round { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--paper-2);
  transition: transform .14s ease-out, background-color .2s ease; -webkit-tap-highlight-color: transparent; }
:root.ui-clean[data-theme="light"] .cl-round { background: #e9e9e9; }
.cl-round:active { transform: scale(.88); }
.cl-round .ico { width: 22px; height: 22px; }
@media (max-width: 1023px) {
  .page.clean { padding-top: 0; }
  .clean .cl-head { background: var(--card); margin: 0 -20px; padding: calc(env(safe-area-inset-top) + 14px) 20px 6px; }
  .cl-band { background: var(--card); margin: 0 -20px; padding: 2px 20px 18px; }
}
.cl-band.wide { background: var(--card); border-radius: 16px; padding: 18px 22px 20px; margin-bottom: 4px; }
.cl-band .cl-pager { margin: 0; }
.pg-body { flex: 1; min-width: 0; transform-origin: 50% 40%; will-change: transform, opacity; }
.cl-pager.wide .pg-page + .pg-page { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); }
.pg-h { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 6px; }
.pg-h h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.pg-h .cl-daynav { margin-left: -10px; }
.pg-h .cl-daynav .cl-date { font-size: 22px; font-weight: 700; letter-spacing: -.01em; min-width: 0; padding: 0 2px; margin: 0; }

/* 弧形表：左「还剩 / 已吃」、中间大数字、右「目标」 */
.dg { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dg-side { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 6px; }
.dg-side b { font-size: 22px; font-weight: 600; } .dg-side small { font-size: 13.5px; color: var(--ink-3); }
.dg-c { position: relative; display: grid; place-items: center; }
.dg-v { position: absolute; inset: 0 0 8% 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.dg-v b { font-size: 42px; font-weight: 600; line-height: 1; letter-spacing: -.03em; }
.dg-v small { font-size: 13.5px; color: var(--ink-3); }
.arc-g { display: block; overflow: visible; }
.arc-track { stroke: var(--ring-track); }
.arc-val { transition: stroke-dashoffset .9s cubic-bezier(.2, .8, .2, 1), stroke .3s ease, opacity .2s ease; }
.dg-note { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: -4px; }
.dg-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.dg-cols.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dg-cols.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dg-col { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 6px 0; border-radius: 12px; cursor: pointer; text-align: center; min-width: 0;
  transition: background-color .2s ease; -webkit-tap-highlight-color: transparent; }
.dg-col.is-on, .dg-water.is-on { background: var(--paper); }
.dc-l { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dc-bar, .dw-bar { display: block; width: 100%; height: 5px; border-radius: 3px; background: var(--ring-track); overflow: hidden; }
.dc-bar i, .dw-bar i { display: block; height: 100%; border-radius: 3px; transition: width .6s cubic-bezier(.22, 1, .36, 1), background-color .3s ease; }
.l-salt .dc-bar i { background: var(--c-salt); } .l-protein .dc-bar i { background: var(--c-protein); } .l-purine .dc-bar i { background: var(--c-purine); }
.l-sugar .dc-bar i { background: var(--c-sugar); } .dw-bar i { background: var(--c-water); }
.dg-col.over .dc-bar i { background: var(--st-crit); }
.dc-v { white-space: nowrap; } .dc-v b { font-size: 16px; font-weight: 600; } .dc-v small { font-size: 12px; color: var(--ink-3); margin-left: 1px; }
.dg-water { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 2px 0; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); border-radius: 0; }
.dg-water .grow { cursor: pointer; white-space: nowrap; } .dg-water b { color: var(--ink); font-size: 16px; font-weight: 600; margin-left: 4px; } .dg-water small { color: var(--ink-3); font-size: 12px; margin-left: 1px; }
.dg-water .lm-ic { color: var(--c-water); }
.dg-water .dw-bar { width: 64px; flex: none; }

/* 本周格子：每天一列，选中的那天用一个圆角黑框框住整列（换一天时黑框滑过去） */
.wg { display: flex; gap: 12px; align-items: stretch; }
.wg-days { position: relative; flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wg-sel { position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% / 7); border: 2px solid var(--ink); border-radius: 12px; pointer-events: none; z-index: 2;
  transform: translate3d(calc(var(--sel, 0) * 100%), 0, 0); transition: transform .42s cubic-bezier(.22, 1, .36, 1); }
.wg-col { position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 0 6px; min-width: 0; -webkit-tap-highlight-color: transparent; }
.wg-col:disabled { cursor: default; }
.wg-cell { position: relative; display: flex; align-items: flex-end; justify-content: center; width: min(26px, 78%); height: 44px; margin: 6px 0; padding: 9px 0 4px; box-sizing: border-box;
  border-radius: 5px; background: var(--paper); }
:root.ui-clean[data-theme="light"] .wg-cell { background: #f1f1f1; }
.wg-cell::before { content: ""; position: absolute; top: 5px; left: 50%; width: 10px; height: 2.5px; margin-left: -5px; border-radius: 2px; background: var(--ink-3); opacity: .7; }
.wg-col.fut .wg-cell::before { opacity: .3; }
.wg-cell i { display: block; width: 7px; border-radius: 3px; background: #a6a6a5; transition: height .55s cubic-bezier(.22, 1, .36, 1), background-color .3s ease; }
.wg-col + .wg-col .wg-cell::after { content: ""; }
.wg-days::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: calc(var(--rows, 4) * 56px - 4px); pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 55px, var(--rule) 55px 56px); }
.wg-wd { font-size: 14px; color: var(--ink-3); margin-top: 4px; line-height: 1.4; }
.wg-col.today .wg-wd { color: var(--ink); font-weight: 700; }
.wg-vals { flex: none; width: 82px; padding-top: 6px; }
.wg-v { height: 56px; display: flex; flex-direction: column; justify-content: center; line-height: 1.25; white-space: nowrap; }
.wg-v b { font-size: 19px; font-weight: 600; } .wg-v span small { font-size: 12px; color: var(--ink-3); margin-left: 2px; }
.wg-v > small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }

/* 大号「已吃 / 还剩」：黑色小胶囊滑过去 */
.cl-band .cl-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 232px; margin: 16px auto 0; padding: 4px; border-radius: 999px; border: 0; background: var(--paper-2); }
:root.ui-clean[data-theme="light"] .cl-band .cl-seg { background: #efefef; }
.cl-band .cl-seg::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--accent);
  transition: transform .36s cubic-bezier(.22, 1, .36, 1); }
.cl-band .cl-seg.second::before { transform: translate3d(100%, 0, 0); }
.cl-band .cl-seg button { position: relative; z-index: 1; height: 42px; border-radius: 999px; font-size: 16px; font-weight: 600; color: var(--ink); background: transparent !important; box-shadow: none !important; transition: color .25s ease; }
.cl-band .cl-seg button.on { color: var(--on-accent); }
@media (max-width: 1023px) { .pg-nav { margin: 14px 0 2px; } }

/* 开关（iOS 式）和「自定义首页」面板 */
.sw { position: relative; flex: none; width: 48px; height: 29px; border-radius: 999px; background: var(--rule-2); transition: background-color .25s ease; }
.sw i { position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .32s cubic-bezier(.34, 1.56, .64, 1); }
.sw.on { background: var(--ink); } .sw.on i { transform: translate3d(19px, 0, 0); background: var(--card); }
.cust-gt { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 18px 2px 8px; }
.cust-views { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cv { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--rule-2); background: var(--card); text-align: left; color: var(--ink);
  transition: border-color .25s ease, transform .14s ease-out; -webkit-tap-highlight-color: transparent; }
.cv.on { border-color: var(--ink); } button.cv:active { transform: scale(.97); }
.cv.locked .sw { opacity: .45; }
.cv-h { display: flex; align-items: center; justify-content: space-between; } .cv-h b { font-size: 15px; }
.cv small { font-size: 12px; color: var(--ink-3); }
.cv-prev { position: relative; height: 56px; border-radius: 9px; background: var(--paper); display: flex; align-items: flex-end; justify-content: center; gap: 5px; padding: 8px; overflow: hidden; }
.cv-prev.week i { width: 7px; height: calc(8px + var(--n) * 4px); border-radius: 2px; background: var(--c-protein); opacity: .85; transition: opacity .25s ease; }
.cv:not(.on) .cv-prev.week i { background: var(--ink-3); opacity: .35; }
.cv-prev.today { align-items: center; gap: 4px; }
.cv-prev.today .a { width: 30px; height: 30px; border-radius: 50%; border: 4px solid var(--ink); border-bottom-color: transparent; transform: rotate(0deg); margin-right: 6px; }
.cv-prev.today .c1, .cv-prev.today .c2, .cv-prev.today .c3 { width: 14px; height: 4px; border-radius: 2px; align-self: flex-end; margin-bottom: 4px; }
.cv-prev.today .c1 { background: var(--c-salt); } .cv-prev.today .c2 { background: var(--c-protein); } .cv-prev.today .c3 { background: var(--c-purine); }
.cust-list { border-top: 1px solid var(--rule); }
.cust-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 2px; border-bottom: 1px solid var(--rule); text-align: left; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.cust-row .grow { display: flex; flex-direction: column; gap: 2px; } .cust-row b { font-size: 15.5px; font-weight: 600; } .cust-row small { font-size: 12.5px; color: var(--ink-3); }
.cust-row:active { background: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  .wg-sel, .wg-cell i, .arc-val, .dc-bar i, .dw-bar i, .cl-band .cl-seg::before, .sw, .sw i, .pg-body { transition: none !important; }
  .pg-body { transform: none !important; opacity: 1 !important; }
}

/* 计划 · 「本周回顾」大圆钮（照 MacroFactor 策略页的 CHECK IN）：黑色实心圆 + 两圈细细的外环；该看了的时候外环慢慢呼吸，按下去轻轻一缩 */
@media (max-width: 1023px) { .st-band { background: var(--card); margin: 0 -20px 16px; padding: 10px 20px 30px; } }
.st-band { display: grid; place-items: center; }
.checkin { position: relative; width: 236px; height: 236px; display: grid; place-items: center; border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.ci-core { position: relative; z-index: 1; width: 172px; height: 172px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; transition: transform .16s ease-out; box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--rule-2); }
.ci-core b { font-family: var(--title); font-weight: 900; font-size: 27px; letter-spacing: .02em; line-height: 1; }
.ci-core small { font-size: 14px; opacity: .62; }
.checkin:active .ci-core { transform: scale(.95); }
.ci-halo { position: absolute; border-radius: 50%; border: 1px solid var(--rule-2); pointer-events: none; }
.ci-halo.h1 { inset: 20px; } .ci-halo.h2 { inset: 0; }
.checkin.due .ci-halo { animation: ci-breathe 2.8s ease-in-out infinite; }
.checkin.due .ci-halo.h2 { animation-delay: .35s; }
.checkin.due .ci-core small { opacity: .9; color: var(--brand-orange); }
@keyframes ci-breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.035); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .checkin.due .ci-halo { animation: none; } .ci-core { transition: none; } }

/* 记一顿面板的标签：一条黑线滑到选中的标签下面（照 MacroFactor），线下面是一整条浅灰底线 */
.ms-tabs { position: relative; }
.ms-tabs.ul button.on { border-bottom-color: transparent; }
.ms-tabs.ul::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 3px; width: var(--uw, 0); border-radius: 2px 2px 0 0; background: var(--ink);
  transform: translate3d(var(--ux, 0), 0, 0); transition: transform .34s cubic-bezier(.22, 1, .36, 1), width .34s cubic-bezier(.22, 1, .36, 1); }
.ms-tabs button { transition: color .2s ease; }
@media (prefers-reduced-motion: reduce) { .ms-tabs.ul::after { transition: none; } }
.st-band > .lt { justify-self: stretch; margin: 0 0 6px; }
@media (max-width: 1023px) {
  .st-band { padding-top: calc(env(safe-area-inset-top) + 8px); margin-top: -8px; }
  /* 我的：标题和头像那一块也放在白色通栏上（照 MacroFactor「More」） */
  :root.ui-clean .page.me:not(.me-settings) { padding-top: 0; }
  :root.ui-clean .page.me > .lt { background: var(--card); margin: 0 -20px; padding: calc(env(safe-area-inset-top) + 16px) 20px 4px; }
  :root.ui-clean .page.me > .profile { background: var(--card); margin: 0 -20px 16px; padding: 10px 20px 22px; border: 0; border-radius: 0; box-shadow: none; }
}
@media (max-width: 1023px) { .phone.ui-clean .topbar.lt-bar { background: var(--card); border-bottom-color: transparent; } .phone.ui-clean .topbar.lt-bar.scrolled { border-bottom-color: var(--rule); } }

/* ======================================================================
 * 趋势详情页（体重 / 盐，照 MacroFactor 的 Weight Trend、Expenditure）2026-11
 * 上半截白底：平均 / 变化 + 图 + 时间段胶囊；下半截浅灰底放卡片（图例、说明卡、洞察与数据、当前估计、数据来源、按月记录）。
 * ====================================================================== */
.trend { padding: 0 0 32px; }
.tr-head { position: relative; display: grid; grid-template-columns: 1fr 1fr auto auto; align-items: start; gap: 4px 10px; padding: 6px 18px 0; background: var(--card); }
.tr-head small { display: block; font-size: 12.5px; color: var(--ink-3); }
.tr-head p { margin: 2px 0 0; display: flex; align-items: baseline; gap: 4px; }
.tr-head p b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.tr-head p span { font-size: 13px; color: var(--ink-2); }
.tr-range { grid-column: 1 / -1; font-size: 12.5px; margin-top: 2px; }
.tr-zero, .tr-cap { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink);
  transition: transform .14s ease, background-color .2s ease, color .2s ease; }
.tr-cap { background: transparent; }
.tr-zero.on { background: var(--ink); color: var(--card); }
.tr-zero:active, .tr-cap:active { transform: scale(.88); }
.tr-chart { background: var(--card); padding: 8px 8px 0 14px; position: relative; }
.tr-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.tr-grid line { stroke: var(--rule); stroke-dasharray: 3 4; stroke-width: 1; }
.tr-grid text, .tr-x text { font-size: 10.5px; fill: var(--ink-3); font-family: var(--sans); font-variant-numeric: tabular-nums; }
.tr-line { fill: none; stroke: var(--tr); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; animation: tr-draw .7s cubic-bezier(.22, 1, .36, 1) both; stroke-dasharray: 2000; }
@keyframes tr-draw { from { stroke-dashoffset: 2000; } to { stroke-dashoffset: 0; } }
.tr-scale { fill: color-mix(in srgb, var(--tr) 32%, transparent); }
.tr-dot { fill: var(--card); stroke: var(--tr); stroke-width: 1.8; transition: r .2s ease; }
.tr-dot.on { fill: var(--tr); }
.tr-bar { fill: color-mix(in srgb, var(--tr) 45%, transparent); transition: fill .2s ease; transform-box: fill-box; transform-origin: bottom; animation: tr-grow .55s cubic-bezier(.22, 1, .36, 1) both; }
.tr-bar.over { fill: color-mix(in srgb, var(--st-crit, #d03b3b) 70%, transparent); }
.tr-bar.on { fill: var(--tr); }
@keyframes tr-grow { from { transform: scaleY(0); } }
.tr-capline { stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 5 4; }
.tr-hit { fill: transparent; cursor: pointer; }
.tr-read { padding: 2px 0 6px; color: var(--ink-2); }
.tr-empty { position: absolute; inset: 40% 0 auto; text-align: center; }
.tr-ranges { display: flex; gap: 2px; margin: 0; padding: 10px 16px 16px; background: var(--card); }
.tr-ranges button { flex: 1; height: 36px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--paper-2);
  transition: background-color .22s ease, color .22s ease, transform .12s ease; }
.tr-ranges button:first-child { border-radius: 999px 4px 4px 999px; } .tr-ranges button:last-child { border-radius: 4px 999px 999px 4px; }
.tr-ranges button:not(:first-child):not(:last-child) { border-radius: 4px; }
.tr-ranges button.on { background: var(--ink); color: var(--card); border-radius: 999px; }
.tr-ranges button:active { transform: scale(.94); }
.tr-body { padding: 14px 16px 0; display: grid; gap: 12px; }
.tr-legend { display: flex; justify-content: center; gap: 20px; padding: 12px; font-size: 13px; }
.tr-legend span { display: inline-flex; align-items: center; gap: 7px; }
.tr-legend i { display: inline-block; }
.lg-dot { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--tr) 40%, transparent); }
.lg-line { width: 18px; height: 3px; border-radius: 2px; background: var(--tr); }
.lg-bar { width: 8px; height: 12px; border-radius: 2px; background: color-mix(in srgb, var(--tr) 45%, transparent); }
.lg-cap { width: 18px; border-top: 2px dashed var(--ink-2); }
.tr-tip { border-radius: 16px; padding: 14px 14px 10px; background: color-mix(in srgb, var(--tr) 16%, var(--card)); }
.tt-h { display: flex; align-items: center; gap: 8px; } .tt-h b { font-size: 15.5px; }
.tr-tip p { margin: 6px 0 10px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.tt-f { display: flex; align-items: center; gap: 10px; }
.tt-f .link { font-size: 13px; color: var(--ink); text-decoration: none; font-weight: 600; }
.tt-next { height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background: color-mix(in srgb, var(--tr) 30%, var(--card)); color: var(--ink); }
.tip-enter-active, .tip-leave-active { transition: opacity .28s ease, transform .32s cubic-bezier(.22, 1, .36, 1); }
.tip-enter-from, .tip-leave-to { opacity: 0; transform: translateY(-6px) scale(.98); }
.tr-sec { font-size: 20px; font-weight: 700; margin: 12px 0 0; }
.tr-changes { padding: 14px 14px 6px; }
.tc-t { display: block; font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.tc-row { display: grid; grid-template-columns: 56px 1fr 92px 82px; align-items: center; gap: 8px; min-height: 38px; font-size: 13.5px; }
.tc-k { color: var(--ink-2); }
.tc-spark { width: 64px; height: 18px; } .tc-spark path { fill: none; stroke: var(--tr); stroke-width: 1.8; }
.tc-row b { font-size: 14px; font-weight: 600; } .tc-row b small { font-weight: 400; color: var(--ink-3); }
.tc-dir { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 12.5px; }
.tc-dir .ico { color: var(--tr); } .tc-dir.wait .ico { color: var(--ink-3); }
.tr-facts { padding: 6px; display: grid; gap: 6px; }
.tf { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: stretch; }
.tf-v { background: var(--paper-2); border-radius: 10px; display: grid; place-content: center; text-align: center; padding: 14px 4px; }
.tf-v b { font-size: 21px; font-weight: 700; } .tf-v small { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.tf-t { padding: 8px 6px 8px 0; } .tf-t b { font-size: 15px; } .tf-t p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
.tr-note { margin: 0; padding: 0 2px; }
.tr-src { display: flex; align-items: center; gap: 12px; padding: 14px; color: var(--ink); text-decoration: none; }
.tr-src b { display: block; font-size: 14.5px; } .tr-src small { display: block; font-size: 12px; color: var(--ink-3); }
.tr-log { padding: 0 14px; }
.tl-row { display: flex; align-items: center; gap: 10px; min-height: 58px; border-bottom: 1px solid var(--rule); }
.tl-row:last-child { border-bottom: 0; }
.tl-row b { display: block; font-size: 15px; font-weight: 600; } .tl-row small { display: block; font-size: 12px; color: var(--ink-3); }
.tl-d { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.tl-d .ico { color: var(--tr); } .tl-d.over { color: var(--st-crit, #d03b3b); font-weight: 600; }
:root.ui-clean[data-theme="light"] .trend .tr-body { background: transparent; }
@media (min-width: 1024px) { .trend { max-width: 760px; margin: 0 auto; } .tr-chart svg { max-width: 600px; margin: 0 auto; } }
@media (prefers-reduced-motion: reduce) { .tr-line, .tr-bar { animation: none !important; } }

/* 首页「身体数据」「营养」分区（照 MacroFactor 的 Body Metrics / Nutrition 小卡）2026-11 */
.cb-dots { display: block; width: 100%; height: 40px; margin: 10px 0 6px; overflow: visible; }
.cb-dots circle { fill: var(--card); stroke: var(--c-weight); stroke-width: 1.6; }
.cb-dots circle:last-child { fill: var(--c-weight); }
.cb-band { position: relative; display: block; height: 8px; margin: 26px 0 22px; border-radius: 999px; background: var(--paper-2); }
.cb-band .ok { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--st-good, #0ca30c); }
.cb-band .me { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.cb-blank { display: block; height: 56px; }
.cl-body.b-bp b.num, .cl-body.b-bp .cl-foot b { letter-spacing: -.01em; }
.cn-bar { position: relative; display: block; height: 7px; margin: 24px 0 22px; border-radius: 999px; background: var(--paper-2); overflow: visible; }
.cn-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--ink-3); transition: width .6s cubic-bezier(.22, 1, .36, 1); }
.cn-bar em { position: absolute; top: -3px; width: 2px; height: 13px; margin-left: -1px; border-radius: 1px; background: var(--ink-2); }
.n-kcal .cn-bar i { background: var(--c-kcal, #3987e5); } .n-salt .cn-bar i { background: var(--c-salt); } .n-protein .cn-bar i { background: var(--c-protein); }
.n-sugar .cn-bar i { background: var(--c-sugar); } .n-purine .cn-bar i { background: var(--c-purine); } .n-water .cn-bar i { background: var(--c-water); }
.cl-nut.over .cl-foot b { color: var(--st-crit, #d03b3b); }
/* 自定义首页：顶部「关闭 · 标题 · 保存」，分区可上下移动 */
.cust-top { display: flex; align-items: center; gap: 8px; }
.cust-top h3 { flex: 1; text-align: center; margin: 0; }
.cust-sheet .cust-top .sheet-x { position: static; }
.cust-save { height: 36px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: var(--card); font-size: 14px; font-weight: 600; transition: transform .12s ease; }
.cust-save:active { transform: scale(.94); }
.cust-sec { cursor: default; }
.cust-sec.off .grow { opacity: .45; }
.cust-mv-b { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--paper-2); transition: transform .12s ease, opacity .2s; }
.cust-mv-b:disabled { opacity: .3; }
.cust-mv-b:not(:disabled):active { transform: scale(.86); }
.cust-sw { flex: none; padding: 4px 0 4px 4px; }
.cust-mv-move { transition: transform .32s cubic-bezier(.22, 1, .36, 1); }
.cust-reset { display: block; width: 100%; margin: 18px 0 4px; height: 44px; border-radius: 12px; color: var(--st-crit, #d03b3b); background: var(--paper); font-size: 14.5px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .cust-mv-move, .cn-bar i { transition: none !important; } }

/* 「我」分组列表（照 MacroFactor 的 More）2026-11：右边灰色当前值，组标题粗体 */
.me-row .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-row .v { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--ink-3); margin-left: 8px; }
.page.me .me-list + .me-group-t, .page.me .me-save + .me-group-t { margin-top: 22px; }
.page.me > .me-group-t:first-of-type { margin-top: 18px; }
.page.me .me-list .me-panel { padding: 4px 14px 14px 56px; }
@media (max-width: 420px) { .page.me .me-list .me-panel { padding-left: 14px; } }
.page.me .me-list .chev.up { transform: rotate(180deg); }
.page.me .me-list .chev { transition: transform .25s ease; }

/* ======================================================================
 * 扫码 / 拍营养标签（照 MacroFactor 的扫码页）2026-11
 * 全屏黑底取景；条码是横框、营养标签是竖框，框外压暗；四角白色描边，条码模式一条橘黄光线上下扫；
 * 识别到条码时框变绿、轻轻一缩；结果从底下滑上来。
 * ====================================================================== */
.ms-scan { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; } .ms-scan .sk, .ms-snap button.sk { text-align: left; width: 100%; } .ms-scan .sk { grid-column: 1 / -1; }
.ms-scan .sk.big { grid-column: 1 / -1; }
.scan { position: fixed; inset: 0; z-index: 90; background: #000; color: #fff; overflow: hidden; display: flex; flex-direction: column;
  --fw: min(78vw, 340px); --fh: 150px; font-family: var(--sans); }
.scan.m-label { --fw: min(74vw, 320px); --fh: min(62vh, 440px); }
.scan-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-nocam { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 40px; text-align: center; color: #d6d6d6; }
.scan-nocam .ico { width: 34px; height: 34px; opacity: .7; } .scan-nocam b { font-size: 17px; color: #fff; } .scan-nocam span { font-size: 13.5px; line-height: 1.6; }
.scan-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; }
.scan-top b { font-size: 16px; font-weight: 600; }
.scan-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform .14s ease, background-color .2s ease; }
.scan-ic.on { background: #fff; color: #000; } .scan-ic.ghost { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.scan-ic:active { transform: scale(.88); }
.scan-frame { position: absolute; left: 50%; top: 44%; width: var(--fw); height: var(--fh); transform: translate(-50%, -50%); border-radius: 18px;
  box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .52); transition: width .42s cubic-bezier(.22, 1, .36, 1), height .42s cubic-bezier(.22, 1, .36, 1), transform .25s ease; pointer-events: none; z-index: 1; }
.scan-frame i { position: absolute; width: 30px; height: 30px; border: 3.5px solid #fff; transition: border-color .25s ease; }
.scan-frame .c1 { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 18px; }
.scan-frame .c2 { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 18px; }
.scan-frame .c3 { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 18px; }
.scan-frame .c4 { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 18px; }
.scan-frame em { position: absolute; left: 14px; right: 14px; height: 2px; top: 10%; border-radius: 2px; background: var(--brand-orange, #ff9f1c);
  box-shadow: 0 0 14px 2px rgba(255, 159, 28, .7); animation: scan-line 1.9s ease-in-out infinite alternate; }
@keyframes scan-line { from { top: 12%; } to { top: 86%; } }
.scan.hit .scan-frame { transform: translate(-50%, -50%) scale(.97); } .scan.hit .scan-frame i { border-color: #36d27a; }
.scan.has-res .scan-frame { opacity: .35; }
.scan-hint { position: absolute; left: 24px; right: 24px; top: calc(44% + var(--fh) / 2 + 18px); z-index: 2; text-align: center; font-size: 14px; color: #e9e9e9; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); transition: top .42s cubic-bezier(.22, 1, .36, 1); }
.scan-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 18px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.scan-type { display: flex; gap: 8px; } .scan-type .input { flex: 1; background: rgba(255, 255, 255, .94); color: #000; border: 0; }
.scan-ctrl { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.scan-pill { justify-self: start; height: 38px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); cursor: pointer; }
.scan-pill.ghost { visibility: hidden; }
.scan-nocam .scan-pill { justify-self: center; margin-top: 6px; }
.scan-shutter { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; background: transparent; transition: transform .14s ease, opacity .2s; }
.scan-shutter i { width: 58px; height: 58px; border-radius: 50%; background: #fff; transition: transform .14s ease; }
.scan-shutter:active i { transform: scale(.86); } .scan-shutter:disabled { opacity: .45; }
.scan-shutter.ghost { visibility: hidden; }
.scan-seg { position: relative; justify-self: center; display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 300px); height: 44px; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.scan-seg button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 600; color: #fff; transition: color .25s ease; }
.scan-seg button.on { color: #000; }
.ss-lens { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: #fff;
  transform: translateX(calc(var(--i) * 100%)); transition: transform .38s cubic-bezier(.3, 1.25, .45, 1); }
.scan-res { position: absolute; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 3; border-radius: 22px; padding: 16px 16px 12px;
  background: var(--card); color: var(--ink); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.sr-h { display: flex; align-items: center; gap: 10px; } .sr-h b { font-size: 16px; }
.scan-res > p { margin: 8px 0 4px; color: var(--ink-2); }
.sr-pts { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.sr-pts li { display: flex; gap: 8px; align-items: flex-start; } .sr-pts .lv { flex: none; margin-top: 6px; }
.sr-act { display: flex; gap: 8px; }
.scan-res-enter-active { transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .3s ease; }
.scan-res-leave-active { transition: transform .25s ease, opacity .2s ease; }
.scan-res-enter-from, .scan-res-leave-to { transform: translateY(110%); opacity: 0; }
.scan-in-enter-active { transition: opacity .28s ease, transform .4s cubic-bezier(.22, 1, .36, 1); }
.scan-in-leave-active { transition: opacity .22s ease, transform .25s ease; }
.scan-in-enter-from, .scan-in-leave-to { opacity: 0; transform: scale(1.04); }
@media (min-width: 1024px) { .scan { --fw: 380px; } .scan.m-label { --fw: 340px; } }
@media (prefers-reduced-motion: reduce) { .scan-frame em { animation: none; top: 50%; } .scan-frame, .ss-lens, .scan-hint { transition: none !important; } }

/* ======================================================================
 * 「我的」照 MacroFactor 的 More 再收一遍（2026-11）——为什么它看起来「高级」：
 * 1) 克制：页面只有黑、白、浅灰三种颜色，彩色只留给数据（主题卡上的四个营养素圆点）；图标不套彩色圆底。
 * 2) 一致：图标同一尺寸、同一粗细、在同一列对齐；分隔线从文字开始，不切过图标。
 * 3) 留白：行高 56、左右 16 的统一节奏；一行只有一个名称，不塞灰色说明和数值。
 * 4) 层级只有三级：粗黑大标题 → 20 号粗体分组名 → 16 号中粗行名；次要信息只出现一次（加入日期）。
 * 5) 平：白卡片直接放在浅灰底上，不描边、不加阴影，圆角统一 16。
 * ====================================================================== */
:root.ui-clean .page.me:not(.me-settings) { padding-top: 0; }
:root.ui-clean .page.me .me-hero { background: var(--card); margin: 0 -20px 8px; padding: calc(env(safe-area-inset-top) + 18px) 20px 22px; }
:root.ui-clean .page.me .me-hero .lt { margin: 0 0 14px; padding: 0; background: none; font-size: 34px; letter-spacing: .02em; }
:root.ui-clean .page.me .me-hero .profile { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; gap: 16px; }
:root.ui-clean .page.me .me-hero .avatar.lg { width: 68px; height: 68px; border: 0; background: var(--ink); color: var(--card);
  font-family: var(--title); font-weight: 900; font-size: 26px; letter-spacing: .02em; }
:root.ui-clean .page.me .me-hero .avatar.lg.photo { background: var(--paper-2); }
:root.ui-clean .page.me .me-hero .nm { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
:root.ui-clean .page.me .me-hero .muted { font-size: 14px; color: var(--ink-2); margin-top: 3px; }
:root.ui-clean .page.me .me-hero .btn.primary { background: var(--ink); color: var(--card); border-color: var(--ink); height: 36px; padding: 0 18px; border-radius: 999px; }
:root.ui-clean .page.me .me-gt { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 26px 2px 12px; color: var(--ink); }
:root.ui-clean .page.me .me-list { background: var(--card); border: 0; border-radius: 16px; box-shadow: none; overflow: hidden; padding: 0; }
:root.ui-clean .page.me .me-list .me-row { display: flex; align-items: center; gap: 0; min-height: 56px; padding: 0 16px; width: 100%; color: var(--ink); text-decoration: none;
  background: none; border: 0; text-align: left; -webkit-tap-highlight-color: transparent; transition: background-color .15s ease; }
:root.ui-clean .page.me .me-list .me-row:active { background: var(--paper); }
:root.ui-clean .page.me .me-list .mi { flex: none; width: 22px; height: 22px; stroke-width: 2.15; color: var(--ink); margin-right: 18px; }
:root.ui-clean .page.me .me-list .me-row .t { flex: 1; font-size: 16px; font-weight: 500; letter-spacing: -.005em; color: var(--ink); }
:root.ui-clean .page.me .me-list .chev { flex: none; width: 15px; height: 15px; color: var(--ink-3); stroke-width: 2.2; }
:root.ui-clean .page.me .me-list .chev.ext { width: 16px; height: 16px; }
/* 分隔线：从文字开始（16 + 22 + 18 = 56），图标那一列不切 */
:root.ui-clean .page.me .me-list > .me-row + .me-row, :root.ui-clean .page.me .me-list > .me-sec + .me-row,
:root.ui-clean .page.me .me-list > .me-row + .me-sec, :root.ui-clean .page.me .me-list > .me-sec + .me-sec { border-top: 0; position: relative; }
:root.ui-clean .page.me .me-list > .me-row + .me-row::before, :root.ui-clean .page.me .me-list > .me-sec + .me-row::before,
:root.ui-clean .page.me .me-list > .me-row + .me-sec::before, :root.ui-clean .page.me .me-list > .me-sec + .me-sec::before {
  content: ""; position: absolute; left: 56px; right: 0; top: 0; height: 1px; background: var(--rule); transform: scaleY(.6); transform-origin: top; }
:root.ui-clean .page.me .me-list .me-sec { position: relative; }
:root.ui-clean .page.me .me-list .me-panel { padding: 2px 16px 16px 56px; }
@media (max-width: 420px) { :root.ui-clean .page.me .me-list .me-panel { padding-left: 16px; } }
/* 主题：三张小预览 */
.me-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.th-card { display: flex; flex-direction: column; gap: 8px; align-items: stretch; background: none; border: 0; padding: 0; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.th-prev { position: relative; display: block; height: 92px; border-radius: 14px; overflow: hidden; border: 2px solid transparent; outline: 1px solid var(--rule);
  transition: border-color .2s ease, transform .15s ease; }
.th-card:active .th-prev { transform: scale(.96); }
.th-card.on .th-prev { border-color: var(--ink); outline-color: transparent; }
.th-half { position: absolute; left: 0; width: 46%; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 9px; }
.th-half b { font-family: var(--sans); font-size: 15px; font-weight: 700; line-height: 1; }
.th-half.l { top: 0; height: 100%; }
.th-system .th-half.l { height: 50%; justify-content: flex-end; padding-bottom: 6px; }
.th-half.d { top: 50%; height: 50%; justify-content: flex-start; padding-top: 6px; background: #1c1c1c; color: #fff; }
.th-dots { display: flex; gap: 3px; } .th-dots i { width: 6px; height: 6px; border-radius: 50%; }
.th-dots i:nth-child(1) { background: #eb6834; } .th-dots i:nth-child(2) { background: #eda100; } .th-dots i:nth-child(3) { background: #1baf7a; } .th-dots i:nth-child(4) { background: #7c63f0; }
.th-grid { position: absolute; right: 6px; top: 6px; bottom: 6px; width: 48%; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; }
.th-grid i { border-radius: 4px; }
.th-light .th-prev, .th-system .th-prev { background: #ffffff; color: #0b0b0b; }
.th-light .th-grid i, .th-system .th-grid i { background: #efefef; }
.th-dark .th-prev { background: #1c1c1c; color: #fff; }
.th-dark .th-grid i { background: #2c2c2b; }
.th-system .th-prev::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 50%; background: #1c1c1c; z-index: 0; }
.th-system .th-half, .th-system .th-grid { z-index: 1; }
.th-system .th-grid i:nth-child(n+3) { background: #2c2c2b; }
.th-name { font-size: 13.5px; font-weight: 600; text-align: center; color: var(--ink-2); }
.th-card.on .th-name { color: var(--ink); }
.page.me .me-icp { margin-top: 26px; }
@media (min-width: 1024px) { :root.ui-clean .page.me .me-hero { margin: 0 0 8px; border-radius: 16px; padding: 22px; } }

/* ======================================================================
 * 全站统一：照 MacroFactor 的设计语言收一遍（2026-11）
 * 原则：只用黑 / 白 / 浅灰，彩色只给数据；控件都是「灰底填充、选中黑底」，不描边；
 * 子页面顶栏是「‹ 返回 + 居中标题」；页面里不放口号式大标题，打开就是内容；
 * 节奏统一：左右 16 / 20，卡片圆角 16，行高 52–56，分组标题 20 号粗体。
 * ====================================================================== */
/* ---- 顶栏：子页面居中标题，去掉右边的昵称 ---- */
:root.ui-clean .topbar .who { display: none; }
@media (max-width: 1023px) {
  :root.ui-clean .topbar.back { position: sticky; justify-content: flex-start; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color .2s ease, background-color .2s ease; }
  :root.ui-clean .topbar.back.scrolled { border-bottom-color: var(--rule); }
  :root.ui-clean .topbar.back .title { position: absolute; left: 64px; right: 64px; text-align: center; font-size: 17px; font-weight: 600; letter-spacing: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
  :root.ui-clean .topbar.back .back { width: 40px; height: 40px; margin-left: -8px; border-radius: 50%; }
  :root.ui-clean .topbar.back .back:active { background: var(--paper-2); }
  :root.ui-clean .topbar.back .back .ico { width: 22px; height: 22px; stroke-width: 2.2; }
}
/* ---- 页面开头：不要口号，标题小一号、只占一行；说明文字收成灰色小字 ---- */
:root.ui-clean .intro { padding: 10px 0 14px; }
:root.ui-clean .intro .kicker { display: none; }
:root.ui-clean .intro .display.slogan { display: none; }
:root.ui-clean .intro .display { font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -.015em; margin: 0 0 6px; }
:root.ui-clean .intro .display em { display: inline; font-style: normal; font-size: inherit; margin: 0 2px; }
:root.ui-clean .intro .display br { display: none; }
:root.ui-clean .intro .lead { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 0; max-width: 40em; }
/* ---- 分段选择器（计划、我的进展的子栏目）：灰色轨道 + 黑色胶囊，像 MacroFactor 的 Consumed / Remaining ---- */
@media (max-width: 1023px) {
  :root.ui-clean .hub-tabs.page.glass { background: var(--paper-2); border: 0; box-shadow: none; border-radius: 999px; padding: 4px; }
  :root.ui-clean .hub-tabs.page.glass::before { display: none; }
  :root.ui-clean .hub-tabs.page.glass a { color: var(--ink); font-weight: 600; letter-spacing: 0; font-size: 14px; border-radius: 999px; padding: 9px 0; }
  :root.ui-clean .hub-tabs.page.glass a.on { color: var(--card); }
  :root.ui-clean .hub-tabs.page.glass .hub-lens { top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n, 4)); border-radius: 999px;
    background: var(--ink); box-shadow: none; transition: transform .38s cubic-bezier(.3, 1.2, .45, 1); }
  :root.ui-clean:not([data-theme="light"]) .hub-tabs.page.glass { background: var(--paper-2); border: 0; box-shadow: none; }
  :root.ui-clean:not([data-theme="light"]) .hub-tabs.page.glass .hub-lens { background: var(--ink); box-shadow: none; }
  :root.ui-clean .hub-tabs.page.glass a .badge { background: var(--brand-orange, #ff9f1c); color: #111; }
}
:root.ui-clean .seg, :root.ui-clean .tabs { background: var(--paper-2); border: 0; border-radius: 999px; padding: 4px; }
:root.ui-clean .seg button, :root.ui-clean .tabs button { border: 0; border-radius: 999px; color: var(--ink); font-weight: 600; background: transparent; transition: background-color .22s ease, color .22s ease; }
:root.ui-clean .seg button.on, :root.ui-clean .tabs button.on { background: var(--ink); color: var(--card); box-shadow: none; }
/* ---- 按钮：主按钮黑色胶囊；普通按钮灰色填充、不描边；文字按钮不变 ---- */
:root.ui-clean .btn:not(.primary):not(.text):not(.c-red) { background: var(--paper-2); border-color: transparent; color: var(--ink); }
:root.ui-clean .btn:not(.primary):not(.text):not(.c-red):active { background: var(--rule-2); }
:root.ui-clean .btn.primary { background: var(--ink); border-color: var(--ink); color: var(--card); }
:root.ui-clean .btn.primary:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--card); opacity: .9; }
:root.ui-clean .btn.c-red { background: color-mix(in srgb, var(--st-crit, #d03b3b) 10%, var(--card)); border-color: transparent; color: var(--st-crit, #d03b3b); }
:root.ui-clean .btn { transition: transform .12s ease, background-color .2s ease, opacity .2s ease; }
:root.ui-clean .btn:active:not(:disabled) { transform: scale(.97); }
/* ---- 选项小胶囊：灰底不描边，选中黑底白字 ---- */
:root.ui-clean .opt { background: var(--paper-2); border-color: transparent; color: var(--ink); transition: background-color .18s ease, color .18s ease, transform .12s ease; }
:root.ui-clean .opt:active { transform: scale(.95); }
:root.ui-clean .opt.on, :root.ui-clean .opt.ghost-on.on { background: var(--ink); border-color: var(--ink); color: var(--card); }
:root.ui-clean .opt .opt-sub { color: inherit; opacity: .6; }
/* ---- 输入框：灰底圆角，不描边；聚焦时黑色细边 ---- */
:root.ui-clean .input { background: var(--paper-2); border-color: transparent; border-radius: 12px; }
:root.ui-clean .input:focus { border-color: var(--ink); background: var(--card); }
:root.ui-clean[data-theme="light"] .card .input { background: #f2f2f2; }
/* ---- 卡片与分组标题 ---- */
:root.ui-clean .h-sec h3, :root.ui-clean .cl-sec h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
:root.ui-clean .h-sec .aside, :root.ui-clean .h-sec .link { font-size: 13px; }
:root.ui-clean .h-sec a.aside.link, :root.ui-clean .cl-sec a.link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
:root.ui-clean .card { border-radius: 16px; }
:root.ui-clean .notice { border-radius: 14px; border: 0; }
/* ---- 列表行（.li / .me-row 以外的通用行）---- */
:root.ui-clean .li { min-height: 52px; }
/* ---- 小标签：去掉描边 ---- */
:root.ui-clean .tag { border-color: transparent; }
/* ---- 开关：iOS 式，开是黑色 ---- */
:root.ui-clean .sw.on { background: var(--ink); }
:root.ui-clean .sw.on i { background: var(--card); }
/* ---- 记一顿面板标签：黑色下划线 ---- */
:root.ui-clean .ms-tabs button.on { color: var(--ink); font-weight: 600; }
/* ---- 弹出层：标题 20 号粗体；关闭钮灰色圆形 ---- */
:root.ui-clean .sheet > h3, :root.ui-clean .sheet .qk-top h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
:root.ui-clean .sheet-x { width: 34px; height: 34px; border-radius: 50%; background: var(--paper-2); color: var(--ink); display: grid; place-items: center; }
/* ---- 电脑上的切页：和手机一样「新页面从右边推进来、旧页面往左让一点并变暗」，只是幅度小一点 ---- */
html[data-nav="push"]::view-transition-old(root) { animation: vt2-out-left .42s cubic-bezier(.32, .72, 0, 1) both; }
html[data-nav="push"]::view-transition-new(root) { animation: vt2-in-right .42s cubic-bezier(.32, .72, 0, 1) both; }
html[data-nav="pop"]::view-transition-old(root) { animation: vt2-out-right .38s cubic-bezier(.32, .72, 0, 1) both; }
html[data-nav="pop"]::view-transition-new(root) { animation: vt2-in-left .38s cubic-bezier(.32, .72, 0, 1) both; }
@keyframes vt2-out-left { to { transform: translateX(-6%); opacity: .55; } }
@keyframes vt2-in-right { from { transform: translateX(18%); opacity: 0; } }
@keyframes vt2-out-right { to { transform: translateX(18%); opacity: 0; } }
@keyframes vt2-in-left { from { transform: translateX(-6%); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { html[data-nav]::view-transition-old(root), html[data-nav]::view-transition-new(root) { animation: none !important; } }
/* 设置页也用同一套分组列表：图标黑色、不套彩色圆底 */
:root.ui-clean .page.me .me-list .me-ic, :root.ui-clean .page.me .me-list .me-ic[class*="ic-"] { flex: none; width: 22px; height: 22px; border-radius: 0; background: none; color: var(--ink); margin-right: 18px; }
:root.ui-clean .page.me .me-list .me-ic .ico { width: 22px; height: 22px; stroke-width: 2.15; }
:root.ui-clean .page.me .me-list .avatar.row { margin-right: 14px; }
:root.ui-clean .page.me.me-settings .me-group + .me-group, :root.ui-clean .page.me.me-settings .me-group-t + .me-group { margin-top: 12px; }
:root.ui-clean .page.me.me-settings .me-group-t { font-size: 20px; font-weight: 700; margin: 26px 2px 0; }
:root.ui-clean .page.me .me-list .theme-row .me-row.static { min-height: 52px; }
:root.ui-clean .page.me .me-list .theme-seg { margin: 0 16px 12px 56px; }
/* 提示框：灰底，图标墨色（不再用淡蓝、淡黄底） */
:root.ui-clean .notice.info { background: var(--paper-2); color: var(--ink-2); }
:root.ui-clean .notice.info .ico { color: var(--ink); }
:root.ui-clean[data-theme="light"] .page .card .notice.info { background: #f2f2f2; }
/* 问膳知：拍标签入口改成普通白卡片 */
:root.ui-clean .label-hero { background: var(--card); border: 0; box-shadow: none; color: var(--ink); }
:root.ui-clean .label-hero .lh-ico { background: var(--ink); color: var(--card); }
:root.ui-clean .label-hero span span, :root.ui-clean .label-hero .grow > span { color: var(--ink-2); }
/* 今天吃了：照 MacroFactor 的 Food Log —— 一张白卡片，按餐分组，右边对齐热量，组与组之间细线 */
.cl-log { padding: 4px 16px; }
.lg-grp { padding: 12px 0 10px; animation: lg-in .38s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
.lg-grp + .lg-grp { border-top: 1px solid var(--rule); }
@keyframes lg-in { from { opacity: 0; transform: translate3d(0, 8px, 0); } }
.lg-h { display: flex; align-items: center; gap: 6px; min-height: 30px; }
.lg-h > b:first-child { font-size: 16px; font-weight: 700; }
.lg-h small { font-size: 12.5px; color: var(--ink-3); }
.lg-h b.num { font-size: 16px; font-weight: 700; }
.lg-tag { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.lg-tag.warn { background: color-mix(in srgb, var(--c-sugar) 18%, var(--card)); color: var(--ink); }
.lg-del { width: 30px; height: 30px; margin-right: -6px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); }
.lg-del:active { background: var(--paper-2); }
.lg-it { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; font-size: 14.5px; color: var(--ink); }
.lg-it small { color: var(--ink-3); font-size: 12.5px; }
.lg-it .num { color: var(--ink-2); font-size: 14px; }
.lg-m { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.lg-m span { display: inline-flex; align-items: center; gap: 5px; } .lg-m i { width: 6px; height: 6px; border-radius: 50%; }
@media (prefers-reduced-motion: reduce) { .lg-grp { animation: none; } }
:root.ui-clean .page.me .me-list .theme-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
:root.ui-clean .page.me .me-list .theme-row .me-row.static { min-width: 0; }
:root.ui-clean .page.me .me-list .theme-seg { margin: 0 12px 0 0; display: flex; }
:root.ui-clean .page.me .me-list .theme-seg button { padding: 6px 12px; font-size: 13px; white-space: nowrap; }
:root.ui-clean .page.me .me-list .theme-row .me-row.static { width: auto; padding-right: 8px; }
:root.ui-clean .page.me .me-list .theme-row .theme-seg { width: auto; }

/* ======================================================================
 * sz86 · 照 MacroFactor 的流程页、操作面板、选项卡片
 * ====================================================================== */
/* 全屏流程（本周回顾）：不显示顶栏、底部标签栏和「＋」 */
.phone.is-flow { padding-bottom: 0; }
.phone.is-flow .topbar, .phone.is-flow .tabbar, .phone.is-flow .fab, .phone.is-flow .install-hint { display: none !important; }
.ck { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--card); }
.ck > section { flex: 1; display: flex; flex-direction: column; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.ck-hero { position: relative; height: 236px; overflow: hidden; flex: none; }
.ck-art { display: block; width: 100%; height: 100%; }
.ck-steam path { animation: ck-steam 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.ck-steam path:nth-child(2) { animation-delay: .5s; } .ck-steam path:nth-child(3) { animation-delay: 1s; }
@keyframes ck-steam { 0%, 100% { opacity: .35; transform: translateY(2px) scaleY(.92); } 50% { opacity: 1; transform: translateY(-3px); } }
.ck-sun.up { animation: ck-rise .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes ck-rise { from { transform: translateY(40px); } }
.ck-x { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #111; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); transition: transform .14s ease; }
.ck-x:active { transform: scale(.9); }
.ck-hero { padding-top: env(safe-area-inset-top); background: #13261e; box-sizing: content-box; }
.ck-body { padding: 22px 20px 0; }
.ck-t { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; color: var(--ink); }
.ck-sub { margin: 6px 0 0; color: var(--ink-3); font-size: 14px; }
.ck-need { margin-top: 18px; } .ck-need b { font-size: 17px; }
/* 竖排步骤：左边一列圆点 + 连线，当前那步展开说明 */
.ck-steps { list-style: none; margin: 22px 0 0; padding: 0; }
.ck-steps li { position: relative; display: flex; gap: 14px; padding-bottom: 22px; }
.ck-steps li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; border-radius: 1px; background: var(--rule-2); }
.ck-steps li.done:not(:last-child)::before { background: var(--ink); }
.ck-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-3); font-size: 13px;
  transition: background-color .3s ease, color .3s ease, transform .3s cubic-bezier(.2, .9, .3, 1.4); }
.ck-dot b { font-weight: 700; }
.ck-steps li.cur .ck-dot, .ck-steps li.done .ck-dot { background: var(--ink); color: var(--card); }
.ck-steps li.done .ck-dot { animation: ck-tick .42s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes ck-tick { from { transform: scale(.5); } }
.ck-dot .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.ck-st { min-width: 0; padding-top: 3px; }
.ck-st b { font-size: 16px; font-weight: 700; color: var(--ink); }
.ck-steps li.todo .ck-st b { color: var(--ink-3); font-weight: 600; }
.ck-st p { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.ck-st small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12px; }
.ck-chip { margin-top: 10px; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--paper-2); color: var(--ink); font-size: 13px; font-weight: 600; }
.ck-chip:active { transform: scale(.96); }
/* 底部固定的黑色主按钮（流程里每一页都在同一个位置） */
.ck-foot { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 430px; z-index: 25; padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--card) 70%, rgba(var(--paper-rgb), 0)); }
:root[data-theme="light"] .ck-foot { background: linear-gradient(to top, var(--card) 70%, rgba(255, 255, 255, 0)); }
.ck-foot .btn { height: 54px; border-radius: 14px; font-size: 16px; font-weight: 700; }
.ck-foot .btn:disabled { background: var(--paper-2); border-color: var(--paper-2); color: var(--ink-3); opacity: 1; }
@media (min-width: 1024px) { .ck-foot { left: calc(50% + var(--side) / 2); max-width: 560px; } .ck { max-width: 560px; margin: 0 auto; } .ck-hero { border-radius: 0 0 24px 24px; } }
/* 每一步：左上返回、标题居中 */
.ck-page { padding: 0 20px; }
.ck-bar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 52px; margin: 0 -20px 6px; padding: env(safe-area-inset-top) 8px 0;
  box-sizing: content-box; background: var(--card); }
.ck-bar b { text-align: center; font-size: 16px; font-weight: 700; }
.ck-back { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); border-radius: 50%; }
.ck-back:active { background: rgba(var(--ink-rgb), .06); }
.ck-q { margin: 14px 0 0; font-size: 22px; font-weight: 800; line-height: 1.35; letter-spacing: -.005em; color: var(--ink); }
.ck-q.mt { margin-top: 30px; }
.ck-note { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.ck-sec { margin: 26px 0 10px; font-size: 18px; font-weight: 700; }
/* 选项卡片：整行可点，右边一个圆圈；选中时描黑边、圆圈填黑 */
.ck-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.ck-opts.mt { margin-top: 22px; }
.qopt { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 16px; border-radius: 14px; text-align: left; font-size: 16px; font-weight: 600; color: var(--ink);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--rule-2); transition: box-shadow .18s ease, transform .14s ease, background-color .18s ease; }
.qopt:active { transform: scale(.985); }
.qopt.on { box-shadow: inset 0 0 0 2px var(--ink); }
.qopt small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--ink-3); }
.qopt > .ico { width: 22px; height: 22px; }
.qopt .qn { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--paper-2); font-size: 14px; }
.qr { flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--rule-2); position: relative; transition: box-shadow .18s ease; }
.qopt.on .qr { box-shadow: inset 0 0 0 7px var(--ink); }
/* 体重：− 数字 ＋ */
.ck-kg { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 26px; }
.ck-step { width: 52px; height: 52px; border-radius: 50%; background: var(--paper-2); color: var(--ink); font-size: 24px; font-weight: 500; }
.ck-step:active { transform: scale(.92); }
.ck-kgv { display: flex; align-items: baseline; gap: 6px; }
.ck-kgv input { width: 128px; border: 0; background: transparent; text-align: center; font: 800 44px/1 var(--title); color: var(--ink); font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.ck-kgv input::-webkit-outer-spin-button, .ck-kgv input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ck-kgv input:focus { outline: none; }
.ck-kgv span { color: var(--ink-3); font-size: 15px; }
/* 这一周 */
.ck-week { margin: 10px 0 18px; }
.ck-wk-h { display: flex; align-items: baseline; gap: 10px; }
.ck-big { font: 800 56px/1 var(--title); letter-spacing: -.02em; }
.ck-wk-h > span:last-child { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.ck-wk-h small { display: block; font-size: 13px; font-weight: 400; color: var(--ink-3); margin-top: 2px; }
.ck-wk-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; }
.ck-wk-dots i { height: 8px; border-radius: 4px; background: var(--paper-2); }
.ck-wk-dots i.on { background: var(--ink); animation: ck-fill .5s cubic-bezier(.2, .8, .2, 1) both; }
.ck-wk-dots i:nth-child(2) { animation-delay: .04s; } .ck-wk-dots i:nth-child(3) { animation-delay: .08s; } .ck-wk-dots i:nth-child(4) { animation-delay: .12s; }
.ck-wk-dots i:nth-child(5) { animation-delay: .16s; } .ck-wk-dots i:nth-child(6) { animation-delay: .2s; } .ck-wk-dots i:nth-child(7) { animation-delay: .24s; }
@keyframes ck-fill { from { transform: scaleX(0); transform-origin: left; } }
.ck-pts { background: var(--paper-2); box-shadow: none; border: 0; }
.ck-goal { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--paper-2); }
.ck-goal small { color: var(--ink-3); } .ck-goal p { margin: 4px 0 0; font-weight: 600; line-height: 1.55; }
.ck-bars { height: 200px; margin-top: 18px; }
.ck-bars .ub-col { animation: tr-grow .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 35ms); transform-origin: bottom; }
.ck-chg { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ck-chg li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.ck-chg .ico { margin-top: 3px; }
/* 步骤之间：往前推进是从右边推进来，返回是从左边退回 */
.ck-fwd-enter-active, .ck-back-enter-active { transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .24s ease; }
.ck-fwd-leave-active, .ck-back-leave-active { transition: transform .16s cubic-bezier(.4, 0, 1, 1), opacity .16s ease; }
.ck-fwd-enter-from { transform: translate3d(40px, 0, 0); opacity: 0; }
.ck-fwd-leave-to { transform: translate3d(-20px, 0, 0); opacity: 0; }
.ck-back-enter-from { transform: translate3d(-30px, 0, 0); opacity: 0; }
.ck-back-leave-to { transform: translate3d(30px, 0, 0); opacity: 0; }
.ck-pop-enter-active { transition: opacity .24s ease, transform .3s cubic-bezier(.2, .9, .3, 1.2); }
.ck-pop-enter-from { opacity: 0; transform: translateY(-8px) scale(.96); }
@media (prefers-reduced-motion: reduce) {
  .ck-steam path, .ck-sun.up, .ck-dot, .ck-wk-dots i.on, .ck-bars .ub-col { animation: none !important; }
  .ck-fwd-enter-active, .ck-back-enter-active, .ck-fwd-leave-active, .ck-back-leave-active, .ck-pop-enter-active { transition: none; }
}

/* 操作面板（右上角「⋯」） */
.sheet.act-sheet { padding: 6px 0 calc(12px + env(safe-area-inset-bottom)); }
.as-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 4px 8px 6px; }
.as-top h3 { margin: 0; text-align: center; font-size: 16px; font-weight: 700; }
.sheet .as-top .sheet-x.as-x { position: static; float: none; margin: 0; width: 36px; height: 36px; background: transparent; justify-self: start; }
.as-list { display: flex; flex-direction: column; }
.as-row { display: flex; align-items: center; gap: 16px; min-height: 54px; padding: 0 20px; text-align: left; font-size: 16px; color: var(--ink); position: relative; }
.as-row:not(:last-child)::after { content: ""; position: absolute; left: 58px; right: 0; bottom: 0; height: 1px; background: var(--rule); }
.as-row:active { background: rgba(var(--ink-rgb), .05); }
.as-row small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.as-row .as-chev { color: var(--ink-3); }
.as-row.danger { color: var(--red); }

/* 今天页顶部（照 MacroFactor 食物日志）：大标题 + 右边两个圆钮；下面一排本周日期圆圈 */
.cl-ttl { min-width: 0; overflow: hidden; }
.cl-day { margin: 0; font-family: var(--title); font-size: 30px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; color: var(--ink); white-space: nowrap; }
.clean .cl-head { gap: 8px; }
.wk-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 4px 0 12px; }
@media (max-width: 1023px) { .wk-strip { background: var(--card); margin: 0 -20px; padding: 4px 14px 14px; } }
.wk-d { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px 0; color: var(--ink-3); -webkit-tap-highlight-color: transparent; }
.wk-d small { font-size: 11px; font-weight: 600; }
.wk-n { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 600; color: var(--ink);
  background: var(--paper-2); transition: background-color .22s ease, color .22s ease, transform .14s ease, box-shadow .22s ease; }
:root.ui-clean[data-theme="light"] .wk-n { background: #f1f1f1; }
.wk-strip .wk-d.today .wk-n { box-shadow: inset 0 0 0 2px var(--ink); background: transparent; }
.wk-strip .wk-d.on .wk-n { background: var(--ink); color: var(--card); box-shadow: none; }
:root.ui-clean[data-theme="light"] .wk-strip .wk-d.on .wk-n { background: #111; color: #fff; }
:root.ui-clean[data-theme="light"] .wk-strip .wk-d.today:not(.on) .wk-n { background: transparent; }
.wk-d.on small { color: var(--ink); }
.wk-d:active:not(:disabled) .wk-n { transform: scale(.9); }
.wk-strip .wk-d.fut { opacity: .35; }
.wk-dot { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.wk-d.logged .wk-dot { background: var(--ink-3); }
.wk-d.on.logged .wk-dot { background: var(--ink); }
/* 摄入卡标题右边一对小箭头（键盘 ← → 也能换天） */
.pg-h .pg-nav-mini { display: flex; gap: 6px; }
.pg-h .pg-nav-mini .icon-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--paper-2); border: 0; }
:root.ui-clean[data-theme="light"] .pg-h .pg-nav-mini .icon-btn { background: #efefef; }
.pg-h .pg-nav-mini .icon-btn:disabled { opacity: .3; }
.pg-h .pg-nav-mini .icon-btn:active:not(:disabled) { transform: scale(.88); }
.pg-h h3 { font-size: 20px; }
.cl-ttl .dsw-enter-active { transition: opacity .2s ease, transform .26s cubic-bezier(.2, .8, .2, 1); }
.cl-ttl .dsw-leave-active { transition: opacity .1s ease, transform .1s ease; }
.cl-ttl .dsw-enter-from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 14px)); }
.cl-ttl .dsw-leave-to { opacity: 0; transform: translateX(calc(var(--dir, 1) * -10px)); }

/* 「搜索食物」条：和问膳知的输入框同一个位置、同一种玻璃 */
.dock-find { position: fixed; z-index: 29; left: 16px; right: 16px; bottom: calc(94px + env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: center; }
@media (min-width: 431px) and (max-width: 1023px) { .dock-find { left: calc(50% - 215px + 16px); right: calc(50% - 215px + 16px); } }
.df-pill, .df-ai { height: 48px; color: var(--ink); border: 1px solid rgba(255, 255, 255, .6);
  background: linear-gradient(180deg, rgba(var(--paper-rgb), .8), rgba(var(--paper-rgb), .66));
  backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 10px 28px -14px rgba(0, 0, 0, .28); }
:root:not([data-theme="light"]) .df-pill, :root:not([data-theme="light"]) .df-ai { background: rgba(38, 38, 36, .72); border-color: rgba(255, 255, 255, .09); box-shadow: 0 10px 28px -14px rgba(0, 0, 0, .6); }
.df-pill { flex: 1; min-width: 0; display: flex; align-items: center; border-radius: 24px; overflow: hidden; }
.df-bar { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 10px; padding: 0 6px 0 16px; font-size: 15px; color: var(--ink-3); text-align: left; }
.df-bar .ico { color: var(--ink); }
.df-scan { width: 48px; height: 100%; display: grid; place-items: center; color: var(--ink); position: relative; }
.df-scan::before { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 1px; background: rgba(var(--ink-rgb), .14); }
.df-ai { width: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; transition: transform .14s ease; }
.df-ai:active, .df-pill:active { transform: scale(.97); }
.df-pill { transition: transform .14s ease; }
.df-bar:active, .df-scan:active { background: rgba(var(--ink-rgb), .05); }
@media (max-width: 1023px) { .phone.ui-clean.own-head { padding-bottom: 168px; } }
@media (min-width: 1024px) { .dock-find { display: none; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .df-pill, .df-ai { background: var(--card); } }
/* 计划页标题行：大标题 + 右边「⋯」 */
.lt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
:root.ui-clean .lt-row .lt, .lt-row .lt { margin: 0; }
.st-band > .lt-row { justify-self: stretch; margin: 0 0 6px; }
.lt-row.page { padding-top: 4px; padding-bottom: 0; }
@media (min-width: 1024px) { .lt-row .lt { display: none; } .lt-row { justify-content: flex-end; } .lt-row.page { padding-top: 24px; } }
/* 本周回顾大圆钮：按下去像 MacroFactor 那样整体缩一下、外圈亮一圈 */
.checkin .ci-core { transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s ease; }
.checkin:active .ci-core { transform: scale(.94); box-shadow: 0 0 0 10px rgba(var(--ink-rgb), .08); }
@media (max-width: 1023px) { .st-band > .lt-row { padding: 4px 20px 0; } }
.wg.flat .wg-cell i { transition: none !important; }
@media (min-width: 1024px) { .wk-strip { max-width: 640px; } }

/* BMI 刻度条（点进「体重与方案」看到的）：和「今天 › 身体数据」的 BMI 卡一样——灰色底、「正常」那段是绿色、黑色竖线标位置 */
:root.ui-clean .bb-track i, :root.ui-clean .bb-track i.on { background: var(--rule-2); }
:root.ui-clean .bb-track i.正常, :root.ui-clean .bb-track i.正常.on { background: var(--st-good, #0ca30c); }
:root.ui-clean .bb-labels span.on { font-weight: 600; }

/* 计划页彩色标题卡（本周数据 / 这周要买 / 薄荷食谱参考 / 我的最佳方案）：标题文字统一黑色，左边小图标和右边插图保持原来的颜色 */
.hcard .hc-head > span { color: var(--ink); }
/* 本周数据右边的柱子：每天一根，按三餐分段（早餐橘黄、午餐绿、晚餐紫，和目标卡的三餐条一样），今天那根不透明、其他稍淡 */
.hc-bars i { display: flex; flex-direction: column-reverse; gap: 1.5px; overflow: hidden; background: none; }
.hc-bars i.now { background: none; }
.hc-bars i b { display: block; width: 100%; min-height: 2px; }
.hc-bars i b.sb-b { background: #ff9f1c; } .hc-bars i b.sb-l { background: #0ca30c; } .hc-bars i b.sb-d { background: #7c63f0; } .hc-bars i b.sb-s { background: rgba(var(--ink-rgb), .3); }
.hc-bars i:not(.now) { opacity: .62; }

/* ============ 计划页 · 照 MacroFactor 策略页（sz93）：进行中的「饮食方案」+ 目标卡 + 目标历史 ============ */
.mf-card { padding: 16px 16px 0; overflow: hidden; }
.mf-h b { display: block; font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: -.005em; }
.mf-h span { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.mf-acts { display: flex; align-items: center; gap: 8px; margin: 14px -16px 0; padding: 12px 16px; border-top: 1px solid var(--rule); }
.mf-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--paper-2); color: var(--ink);
  font-size: 14px; font-weight: 600; text-decoration: none; transition: transform .14s ease, background-color .18s ease; }
.mf-pill:active { transform: scale(.96); }
.mf-pill .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.mf-more { padding-bottom: 6px; }

/* 每天一根分段柱：蓝色胶囊（热量目标）+ 早 / 午 / 晚三块（淡色底 + 深色字），整根高低按这一天的目标 */
.pb-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.pb-col { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 0; background: none; border: 0; color: inherit; font: inherit; }
button.pb-col { cursor: pointer; }
.pb-pill { align-self: stretch; height: 22px; border-radius: 999px; display: grid; place-items: center; font-size: 11.5px; font-weight: 600;
  background: #b9cdf7; color: #14213d; transition: background-color .2s ease, color .2s ease; }
.pb-stack { height: 168px; margin-top: 5px; display: flex; align-items: flex-end; }
.pb-fill { width: 100%; display: flex; flex-direction: column; gap: 3px; transition: height .55s cubic-bezier(.2, .8, .2, 1);
  transform-origin: 50% 100%; animation: pb-grow .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes pb-grow { from { transform: scaleY(0); opacity: 0; } 40% { opacity: 1; } }
.pb-fill i { flex-basis: 0; min-height: 26px; border-radius: 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  font-style: normal; color: #2a2118; overflow: hidden; }
.pb-fill i em { font-style: normal; font-size: 11.5px; font-weight: 600; line-height: 1.15; }
.pb-fill i small { font-size: 10px; opacity: .7; line-height: 1.1; }
.pb-b { background: #ffd8a8; } .pb-l { background: #bfe6bf; } .pb-d { background: #d9d1fb; } .pb-s { background: rgba(var(--ink-rgb), .12); }
.pb-wd { margin-top: 8px; text-align: center; font-size: 13px; color: var(--ink-3); }
.pb-col.today .pb-wd { color: var(--ink); font-weight: 700; }
.pb-col.on .pb-pill { background: var(--ink); color: var(--card); }
.pb-col:active .pb-fill { transform: scale(.97); }
:root:not([data-theme="light"]) .pb-pill { background: #2e4c86; color: #e6eeff; }
:root:not([data-theme="light"]) .pb-b { background: #6b4a1f; } :root:not([data-theme="light"]) .pb-l { background: #285a2a; }
:root:not([data-theme="light"]) .pb-d { background: #463b7d; }
:root:not([data-theme="light"]) .pb-fill i { color: #f4ede2; }
:root:not([data-theme="light"]) .pb-col.on .pb-pill { background: var(--ink); color: var(--card); }
@media (max-width: 360px) { .pb-fill i small { display: none; } .pb-pill { font-size: 10.5px; } }

/* 目标卡：目标体重 / 每周 公斤 / 每周 %，左中右对齐 */
.gc-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-top: 14px; }
.gc-stats > div { display: flex; flex-direction: column; }
.gc-stats > div:nth-child(2) { align-items: center; } .gc-stats > div:nth-child(3) { align-items: flex-end; }
.gc-stats b { font: 600 28px/1.1 var(--title); letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.gc-stats b small { margin-left: 3px; font-family: var(--sans, inherit); font-size: 14px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.gc-stats span { margin-top: 2px; font-size: 13px; color: var(--ink-3); }

/* 目标历史 */
.gh-card { padding: 4px 16px; }
.gh-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.gh-row + .gh-row { border-top: 1px solid var(--rule); }
.gh-row small { display: block; font-size: 13px; color: var(--ink-3); }
.gh-row b { display: block; margin-top: 2px; font-size: 17px; font-weight: 600; }
.gh-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.gh-tag .ico { color: var(--ink); }

/* 怎么算出来的：竖排编号 + 一条竖线串起来，数字用各自的颜色 */
.dz-list { list-style: none; margin: 14px 0 0; padding: 0; }
.dz-list li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; animation: dz-in .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 60ms); }
.dz-list li:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--rule-2); }
@keyframes dz-in { from { opacity: 0; transform: translateY(8px); } }
.dz-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--card); font-size: 12px; font-weight: 700; }
.dz-list b { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.dz-v { display: block; margin-top: 1px; font-size: 14px; font-weight: 600; }
.dz-list p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.dz-tdee .dz-v { color: #3987e5; } .dz-target .dz-v { color: #0ca30c; } .dz-shift .dz-v { color: #7c63f0; }
.dz-meals .dz-v { color: #e08600; } .dz-protein .dz-v { color: #e0573f; } .dz-salt .dz-v { color: var(--ink-2); }

/* 改方案：顶上进度条、星期多选、加载轨道 */
.pg-hero { background: #bcdde6; }
.pg-sun { animation: pg-sun 6s ease-in-out infinite; }
@keyframes pg-sun { 50% { transform: translateY(-5px); } }
.pg-bowl { animation: pg-bob 3.2s ease-in-out infinite; }
@keyframes pg-bob { 50% { transform: translateY(-3px); } }
.pg-prog { height: 3px; margin: 0 -20px; background: var(--rule); overflow: hidden; }
.pg-prog i { display: block; height: 100%; background: var(--ink); transform-origin: left; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.pg-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); }
.pg-days { margin-top: 18px; border-top: 1px solid var(--rule); }
.pg-day { display: flex; align-items: center; width: 100%; min-height: 52px; padding: 0 4px; border-bottom: 1px solid var(--rule); background: none; color: var(--ink);
  font-size: 16px; text-align: left; transition: background-color .15s ease; }
.pg-day:active { background: rgba(var(--ink-rgb), .04); }
.pg-box { flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--rule-2); color: var(--card);
  transition: background-color .15s ease, box-shadow .15s ease; }
.pg-day.on .pg-box { background: var(--ink); box-shadow: none; }
.pg-box .ico { width: 14px; height: 14px; stroke-width: 3; animation: ck-tick .3s cubic-bezier(.2, .9, .3, 1.4); }
.pg-bars { margin-top: 6px; }
.pg-loading { display: flex; flex-direction: column; }
.orb { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; }
.orb svg { width: 220px; height: 220px; overflow: visible; }
.orb-r { fill: none; stroke-width: 1.5; }
.orb-r.r1 { stroke: #e0573f; opacity: .55; } .orb-r.r2 { stroke: #3987e5; opacity: .45; } .orb-r.r3 { stroke: #ffb020; opacity: .5; }
.orb-p { transform-origin: 100px 100px; animation: orb-spin linear infinite; }
.orb-p.p1 { fill: #e0573f; animation-duration: 1.7s; } .orb-p.p2 { fill: #3987e5; animation-duration: 2.6s; animation-direction: reverse; }
.orb-p.p3 { fill: #ffb020; animation-duration: 3.6s; }
.orb-dot { fill: #fff; opacity: .9; }
@keyframes orb-spin { to { transform: rotate(360deg); } }
.orb svg { animation: orb-in .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes orb-in { from { transform: scale(.85); opacity: 0; } }
.orb p { margin: 26px 0 0; font-size: 15px; color: var(--ink-2); animation: orb-txt 1.6s ease-in-out infinite; }
@keyframes orb-txt { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) {
  .pb-fill, .dz-list li, .orb svg, .orb p, .pg-sun, .pg-bowl { animation: none !important; }
  .orb-p { animation: none !important; }
  .pb-fill, .pg-prog i { transition: none !important; }
}

/* BMI 状态字：和刻度条同一套颜色——「正常」用刻度条的绿色，其余用刻度标记的黑色（不再用和刻度条无关的赭黄） */
.bmi-st { font-size: 14px; font-weight: 700; color: var(--ink); }
.bmi-st.ok { color: var(--st-good, #0ca30c); }
.mf-pill.dark { background: var(--ink); color: var(--card); }
.goal-card .goal-bar { margin-bottom: 6px; }
/* 指标判读：右边的分级字和左边圆点同一个颜色 */
.tag.st-tag { color: var(--g, var(--ink)); border-color: color-mix(in srgb, var(--g, var(--ink)) 40%, transparent); background: color-mix(in srgb, var(--g, var(--ink)) 10%, transparent); font-weight: 600; }
/* 调料的勺数（菜谱用料） */
.ing .q .spoon { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; text-align: right; }
.easy-chip { margin-bottom: 4px; } .easy-chip.on { background: var(--ink); color: var(--card); } .easy-chip.on .muted { color: inherit; opacity: .7; }

/* 计划、我的：顶栏（lt-bar）已经让出了刘海 / 状态栏的高度，页面里的白色通栏不再重复加 safe-area，免得 iPhone 上顶部空一大块（sz97） */
@media (max-width: 1023px) {
  .phone .topbar.lt-bar ~ .view .st-band { padding-top: 8px; }
  :root.ui-clean .phone .topbar.lt-bar ~ .view .page.me > .lt { padding-top: 16px; }
  :root.ui-clean .phone .topbar.lt-bar ~ .view .page.me .me-hero { padding-top: 14px; }
}

/* ===== 文字贴边（sz97）：有底色 / 描边的按钮、胶囊，左右至少留出一个字的四分之一宽 ===== */
:root.ui-clean .btn.text.c-red { padding: 8px 14px; border-radius: 999px; }
/* 每天一根分段柱：四位数热量在窄屏上也不顶到胶囊两边（数字字号跟着列宽缩，字距收一点） */
.pb-pill { font-size: clamp(9.5px, 2.85vw, 11.5px); letter-spacing: -.02em; padding: 0 3px; overflow: hidden; }
.pb-fill i em { font-size: clamp(9.5px, 2.85vw, 11.5px); letter-spacing: -.02em; }
.pb-fill i { padding: 0 2px; }
.mf-pill { line-height: 1.2; padding: 0 16px; white-space: nowrap; }
/* 计划、我的：顶栏没滚动时是透明的，大标题直接往上收到状态栏下面，和「今天」页的标题一样高；滚动后顶栏变白、显示小标题 */
@media (max-width: 1023px) {
  .phone.ui-clean .topbar.lt-bar:not(.scrolled) { background: transparent; border-bottom-color: transparent; pointer-events: none; }
  .phone.ui-clean .topbar.lt-bar ~ .view .st-band { margin-top: -50px; }
  :root.ui-clean .phone .topbar.lt-bar ~ .view .page.me .me-hero, :root.ui-clean .phone .topbar.lt-bar ~ .view .page.me > .lt { margin-top: -48px; }
}
@media (max-width: 1023px) {   /* 白色通栏往上铺满状态栏那一截，顶部不露出灰底 */
  .phone.ui-clean .topbar.lt-bar ~ .view .st-band, :root.ui-clean .phone .topbar.lt-bar ~ .view .page.me .me-hero { box-shadow: 0 -90px 0 var(--card); }
}
@media (max-width: 1023px) {
  .phone.ui-clean .topbar.lt-bar ~ .view .lt-row.page { margin-top: -44px; }      /* 计划的找菜 / 购物清单 / 冰箱 */
  .phone.ui-clean.own-head::before { background: var(--card); }                    /* 今天：状态栏那一截和白色顶栏同色 */
}
