/* Mobile application presentation; loaded only by the Android client and its preview. */
:root {
  /* One palette for every page, including forms and secondary states. */
  --ink:#202925; --muted:#65746c; --green:#287968; --green-deep:#215f53;
  --cream:#f4f6f5; --card:#fff; --surface:#f3f6f4; --line:#e9eeeb;
  --green-soft:#e8f1ed; --green-hover:#dcebe4; --focus:#77b7a6;
  --orange:#ab6038; --orange-soft:#faf0e8;
  --danger:#a34f49; --danger-soft:#f8ecea; --chevron:#8b9891;
  --shadow:none; background:var(--cream); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Roboto","Noto Sans CJK SC","PingFang SC","Microsoft YaHei",sans-serif;
  -webkit-tap-highlight-color:transparent;
}
body { min-width:0; font-size:15px; line-height:1.5; background:var(--cream); }
button,a,input,select,textarea,summary { touch-action:manipulation; }
button { line-height:1.35; }
button:disabled { opacity:.48; cursor:default; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
button, .text-button, .account-button, .photo-choice, .submit-button { white-space:nowrap; }
.page-shell { width:100%; max-width:760px; padding:22px 20px 102px; }
.site-header,.page-footer,.section-kicker,.hero,.header-note { display:none; }
.module-nav { position:fixed; z-index:50; inset:auto 0 0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; width:100%; margin:0; padding:9px 12px calc(9px + env(safe-area-inset-bottom)); border:0; border-top:1px solid var(--line); border-radius:0; background:color-mix(in srgb,var(--card) 94%,transparent); backdrop-filter:blur(20px); box-shadow:none; }
.module-link { min-width:0; min-height:49px; padding:3px; display:flex; flex-direction:column; justify-content:center; gap:4px; border-radius:0; font-size:11px; font-weight:600; color:var(--muted); line-height:1.25; white-space:nowrap; }
.module-link svg { width:23px; height:23px; }
.module-link[aria-current="page"] { color:var(--green-deep); background:none; box-shadow:none; }
.module-link { position:relative; }
.app-heading,.module-heading { margin:0 0 24px; max-width:none; }
.app-heading h1,.module-heading h1 { margin:0; line-height:1.25; font-family:inherit; font-size:31px; font-weight:750; letter-spacing:-.7px; color:var(--ink); }
.app-date,.module-heading>p:last-child { margin:7px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
.app-topline { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:5px; }
.app-topline .app-date { margin:0; }
.avatar-link { width:52px; height:52px; border-radius:50%; display:grid; place-items:center; flex:none; background:var(--green-soft); color:var(--green); border:3px solid var(--card); }
.avatar-link svg { width:30px; height:30px; }
.app-section-title { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:26px 0 12px; }
.app-section-title h2 { margin:0; font-size:19px; font-weight:700; letter-spacing:-.35px; }
.app-section-title a { font-size:13px; color:var(--muted); text-decoration:none; white-space:nowrap; min-height:40px; display:flex; align-items:center; }
.app-card,.panel,.meal-card { background:var(--card); border:0; box-shadow:none; border-radius:20px; }
.app-card { padding:19px 20px; margin-bottom:12px; min-width:0; }
.metric-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.metric-heading .metric-label { display:flex; align-items:center; gap:8px; font-size:15px; font-weight:650; color:var(--orange); }
.metric-label svg { width:20px; height:20px; flex:none; }
.metric-time { color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.metric-value { display:flex; align-items:baseline; gap:7px; margin:12px 0 3px; min-width:0; }
.metric-value strong { font-size:40px; font-weight:720; line-height:1.15; letter-spacing:-1.3px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.metric-value .metric-unit { color:var(--muted); font-size:14px; white-space:nowrap; }
.metric-caption { margin:8px 0 0; color:var(--muted); font-size:13px; line-height:1.6; overflow-wrap:break-word; }
.step-details { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:17px 0 0; padding-top:14px; border-top:1px solid var(--line); }
.step-details span { display:block; color:var(--muted); font-size:12px; }
.step-details strong { display:block; margin-top:3px; font-size:17px; font-weight:650; white-space:nowrap; }
.step-details small { font-size:12px; color:var(--muted); font-weight:400; }
.icon-button { border:0; width:40px; height:40px; display:grid; place-items:center; border-radius:12px; background:var(--orange-soft); color:var(--orange); padding:9px; flex:none; }
.icon-button svg { width:20px; height:20px; }
.step-heading-right { display:flex; align-items:center; gap:8px; }
.energy-label { color:var(--green) !important; }
.energy-value strong { font-size:31px; letter-spacing:-.8px; }
.summary-progress { height:5px; border-radius:5px; overflow:hidden; background:var(--green-soft); margin:17px 0 12px; }
.summary-progress>span { display:block; height:100%; background:var(--green); border-radius:5px; width:0; }
.summary-goal { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:5px 12px; color:var(--muted); font-size:12px; }
.summary-goal strong { color:var(--muted); font-weight:500; white-space:nowrap; }
.summary-nutrients { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px; }
.summary-nutrients .app-card { margin:0; padding:16px; }
.summary-nutrients .metric-label { font-size:13px; font-weight:600; color:var(--green); }
.summary-nutrients .metric-value { margin-top:8px; }
.summary-nutrients .metric-value strong { font-size:28px; letter-spacing:-.5px; }
.summary-nutrients .metric-unit { font-size:12px; }
.summary-nutrients .metric-caption { font-size:11px; margin-top:3px; }
.record-cta { display:flex; align-items:center; gap:13px; width:100%; border:0; background:var(--green-soft); color:var(--green-deep); border-radius:18px; padding:17px 18px; margin:23px 0; text-align:left; }
.record-cta svg { width:25px; height:25px; flex:none; }
.record-cta strong { font-size:15px; display:block; font-weight:650; }
.record-cta small { display:block; color:var(--muted); font-size:12px; margin-top:2px; white-space:normal; }
.record-cta .cta-chevron { margin-left:auto; width:16px; }
.home-meals { background:var(--card); border-radius:20px; overflow:hidden; }
.home-meal { display:flex; align-items:center; gap:13px; width:100%; border:0; padding:16px; background:var(--card); text-align:left; white-space:normal; }
.home-meal + .home-meal { border-top:1px solid var(--line); }
.meal-type-badge { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; background:var(--surface); color:var(--muted); font-size:17px; flex:none; }
.home-meal-copy { flex:1; min-width:0; }
.home-meal-copy strong { font-size:14px; font-weight:600; display:block; }
.home-meal-copy small { display:block; margin-top:4px; font-size:12px; color:var(--muted); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.home-meal-energy { font-size:13px; color:var(--muted); flex:none; text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.home-meal-energy small { display:block; color:var(--muted); font-size:11px; margin-top:4px; }
.home-empty { padding:23px; color:var(--muted); font-size:14px; text-align:center; }
.home-footnote { color:var(--muted); font-size:11px; line-height:1.6; margin:15px 3px 0; }
.module-view--record .editor { margin:0; position:static; }
.editor-panel { padding:20px; border-radius:20px; }
.panel-heading { display:none; }
.quick-form { gap:22px; }
.field-label,.group-label { font-size:14px; color:var(--ink); font-weight:600; }
.text-control { min-height:48px; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:12px; font-size:15px; }
.text-control:focus { border-color:var(--focus); box-shadow:0 0 0 2px var(--green-soft); background:var(--card); }
textarea.text-control { min-height:86px; }
.photo-choices { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.photo-choice { min-height:98px; flex-direction:column; gap:9px; padding:16px 6px; border:1px solid #cfe0d2; background:var(--card); color:var(--green-deep); font-size:14px; font-weight:600; border-radius:15px; }
.photo-hint { font-size:12px; color:var(--muted); }
.meal-options { gap:7px; }
.meal-option span { height:42px; font-size:13px; border:0; border-radius:10px; font-weight:500; background:var(--surface); }
.meal-option span::before { display:none; }
.meal-option input:checked+span { background:var(--green-soft); color:var(--green); }
.submit-button { min-height:49px; border-radius:13px; box-shadow:none; font-size:15px; }
.submit-button:hover { transform:none; box-shadow:none; }
.form-status:empty { display:none; }
.field-hint { font-size:12px; margin:0; line-height:1.5; }
.daily-panel { padding:20px; margin-bottom:22px; }
.daily-top { display:grid; grid-template-columns:1fr; gap:12px; }
.daily-top h2 { font-size:17px; }
.daily-top p { display:none; }
.daily-date { width:100%; min-height:44px; border:0; background:var(--surface); font-size:14px; }
.daily-main { padding:15px; background:var(--surface); }
.daily-kcal strong { font-size:27px; letter-spacing:-.6px; }
.daily-kcal span { line-height:1.6; }
.daily-status { font-weight:500; font-size:12px; border-radius:8px; line-height:1.5; }
.daily-coverage,.daily-note { font-size:12px; }
.daily-nutrients { gap:9px; }
.nutrient-card { border:0; background:var(--surface); padding:13px; }
.nutrient-card strong { font-size:17px; }
.nutrient-card small { line-height:1.6; font-size:11px; }
.daily-advice { background:var(--surface); font-size:12px; line-height:1.8; }
.history-energy { margin:20px 0 22px; }
.history-energy>span { font-size:12px; color:var(--muted); }
.history-energy .metric-value { margin:7px 0; }
.history-nutrient-head,.history-nutrient { display:grid; grid-template-columns:64px minmax(0,1fr) auto; align-items:center; gap:8px; }
.history-nutrient-head { font-size:11px; color:var(--muted); padding:0 0 10px; }
.history-nutrient-head>span:nth-child(2) { text-align:center; }
.history-nutrient { min-height:46px; border-top:1px solid var(--line); font-size:13px; }
.history-nutrient strong { text-align:center; font-size:15px; font-weight:600; white-space:nowrap; }
.history-nutrient strong small { font-size:11px; margin-left:3px; font-weight:400; color:var(--muted); }
.history-nutrient>small { color:var(--muted); font-size:11px; white-space:nowrap; }
.history-guidance { font-size:12px; color:var(--muted); padding-top:14px; border-top:1px solid var(--line); }
.history-guidance summary { cursor:pointer; }
.profile-result { padding:0; background:none; }
.profile-reference-label { font-size:13px; color:var(--green); }
.profile-key-metrics { display:grid; grid-template-columns:1fr 1fr; border-top:1px solid var(--line); margin:22px 0 18px; padding-top:17px; gap:15px; }
.profile-key-metrics span { color:var(--muted); font-size:12px; }
.profile-key-metrics strong { display:block; margin-top:5px; font-size:23px; font-weight:600; color:var(--ink); }
.profile-key-metrics small { font-size:12px; font-weight:400; color:var(--muted); }
.profile-explanation { font-size:12px; color:var(--muted); }
.profile-explanation summary { min-height:30px; cursor:pointer; }
.profile-explanation p { font-size:13px; line-height:1.8; }
.profile-review { background:var(--orange-soft); padding:12px; border-radius:10px; font-size:13px; line-height:1.8; }
.section-heading h2 { font-size:19px; }
.count-pill { font-size:12px; border:0; background:none; color:var(--muted); padding:0; }
.meal-card { border-radius:18px; }
.meal-card__body { padding:18px; }
.meal-card__type { font-size:17px; }
.meal-dishes { gap:6px; margin-top:12px; }
.meal-dishes li { background:var(--surface); font-size:13px; line-height:1.6; max-width:100%; }
.meal-card__footer { padding:12px 18px; border-top:1px solid var(--line); }
.meal-card__actions { gap:16px; }
.meal-photo { max-height:230px; }
.record-list { gap:14px; }
.history-date { color:var(--muted); font-size:13px; }
.calorie-summary { background:var(--surface); }
.health-panel { padding:20px; }
.health-intro { display:none; }
.profile-result { margin-top:0; background:none; padding:0; font-size:13px; }
.profile-result>div:last-child { margin-top:10px; }
.profile-target b { font-size:25px; }
.goals-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 12px; }
.goal-field { font-size:13px; line-height:1.5; gap:7px; }
.goal-field input,.goal-field select,.goal-field textarea { border:0; border-radius:11px; min-height:46px; background:var(--surface); font-size:15px; }
.goal-field input[aria-invalid="true"],.goal-field select[aria-invalid="true"],.goal-field textarea[aria-invalid="true"] { background:#fdf3ef; box-shadow:inset 0 0 0 1.5px #d99a89; }
.profile-condition { font-size:13px; padding:10px; background:var(--surface); border:0; white-space:nowrap; }
.goals-actions { display:grid; gap:10px; }
.goals-actions button { width:100%; font-size:14px; min-height:47px; border-radius:12px; }
#profileStatus { margin-top:8px; scroll-margin-bottom:92px; }
.profile-source { margin-top:17px; font-size:12px; line-height:1.8; }
.profile-source summary { cursor:pointer; }
.profile-settings summary { font-size:15px; }
.account-layout { gap:20px; }
.account-profile { padding:0; }
.account-profile-edit { display:flex; align-items:center; gap:15px; width:100%; padding:21px; border:0; background:none; border-radius:20px; color:inherit; text-align:left; }
.account-identity { flex:1; min-width:0; }
.account-identity strong { display:block; font-size:19px; font-weight:650; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.account-identity small { display:block; margin-top:4px; color:var(--muted); font-size:13px; }
.account-avatar img,.avatar-link img { display:block; width:100%; height:100%; border-radius:50%; object-fit:cover; }
.identity-avatar-editor { display:flex; flex-direction:column; align-items:center; gap:8px; margin:8px 0 25px; }
.identity-avatar-picker { position:relative; width:86px; height:86px; border:0; padding:0; background:none; border-radius:50%; }
#avatarPreview { display:grid; place-items:center; width:86px; height:86px; border-radius:50%; background:var(--green-soft); color:var(--green); overflow:hidden; }
#avatarPreview>svg { width:45px; height:45px; }
#avatarPreview img { width:100%; height:100%; object-fit:cover; }
.avatar-camera-badge { position:absolute; right:-2px; bottom:0; display:grid; place-items:center; width:28px; height:28px; border:3px solid var(--card); background:var(--green); color:white; border-radius:50%; }
.avatar-camera-badge svg { width:14px; height:14px; }
.identity-name-label { display:block; font-size:14px; color:var(--ink); font-weight:550; }
.identity-status { margin:0 0 14px; font-size:13px; color:var(--danger); min-height:0; }
.identity-status:empty { display:none; }
.avatar-remove { color:var(--danger); font-weight:400; }
.account-avatar { width:54px; height:54px; border-radius:50%; flex:none; background:var(--green-soft); color:var(--green); display:grid; place-items:center; }
.account-avatar svg { width:30px; height:30px; }
.account-profile h2 { margin:0; font-size:19px; }
.account-profile p { margin:4px 0 0; font-size:13px; color:var(--muted); }
.settings-group { background:var(--card); border-radius:18px; overflow:hidden; }
.settings-label { margin:0 2px 9px; color:var(--muted); font-size:12px; }
.setting-row { display:flex; align-items:center; gap:12px; text-align:left; width:100%; border:0; border-radius:0; padding:15px 16px; min-height:56px; background:var(--card); color:var(--ink); text-decoration:none; white-space:normal; font-size:14px; line-height:1.5; }
.setting-row+.setting-row { border-top:1px solid var(--line); }
.setting-icon { display:grid; place-items:center; width:30px; height:30px; flex:none; border-radius:9px; background:var(--green-soft); color:var(--green); }
.setting-icon svg { width:18px; height:18px; }
.setting-row .row-title { flex:1; min-width:0; }
.setting-row .row-value { color:var(--muted); font-size:12px; white-space:nowrap; flex:none; max-width:105px; overflow:hidden; text-overflow:ellipsis; }
.chevron { width:14px; height:14px; color:var(--chevron); flex:none; }
.account-panel { padding:20px; }
.account-panel h2 { font-size:18px; }
.account-panel p { font-size:13px; }
.account-button { min-height:45px; font-size:14px; border-radius:11px; padding:10px 16px; font-weight:600; }
.account-detail { margin:0; padding:0; border-radius:18px; background:var(--card); }
.account-detail>summary { list-style:none; padding:18px; font-size:14px; display:flex; justify-content:space-between; align-items:center; cursor:pointer; min-height:55px; }
.account-detail>summary::-webkit-details-marker { display:none; }
.account-detail>summary::after { content:"＋"; color:var(--chevron); font-size:19px; }
.account-detail[open]>summary::after { content:"−"; }
.account-detail>div { padding:0 18px 18px; }
.account-detail form { display:grid; gap:14px; font-size:13px; }
.account-detail .text-control { margin-top:7px; }
#logoutButton { color:var(--danger); background:var(--card); width:100%; min-height:51px; font-weight:500; }
.app-version { text-align:center; font-size:12px; color:var(--muted); margin:0; }
.subpage-back { border:0; background:none; color:var(--green); padding:4px 0; min-height:40px; margin:-7px 0 14px; font-size:14px; display:flex; align-items:center; gap:3px; }
.subpage-back svg { width:18px; height:18px; transform:rotate(180deg); }
.app-sheet-overlay { position:fixed; inset:0; z-index:200; background:#20292560; display:flex; align-items:flex-end; justify-content:center; }
.app-sheet { border-radius:26px 26px 0 0; width:min(100%,600px); max-height:85dvh; padding:10px 24px calc(28px + env(safe-area-inset-bottom)); background:var(--card); overflow-y:auto; box-shadow:0 -12px 50px #20292520; }
.sheet-handle { width:34px; height:4px; background:var(--line); border-radius:4px; margin:0 auto 18px; }
.sheet-header { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-bottom:14px; }
.sheet-header h2 { font-size:21px; margin:0; }
.sheet-close { border:0; background:var(--surface); border-radius:50%; width:32px; height:32px; color:var(--muted); font-size:23px; padding:0; }
.sheet-content { font-size:14px; line-height:1.85; color:var(--muted); }
.sheet-content p { margin:8px 0 16px; }
.sheet-content strong { color:var(--ink); }
.sheet-content .setting-row { padding:13px 0; }
.sheet-content .text-control { margin:12px 0 18px; }
.sheet-content .account-button { width:100%; }
.app-toast { position:fixed; z-index:300; bottom:95px; left:50%; transform:translateX(-50%); width:max-content; max-width:calc(100% - 40px); border-radius:12px; background:#202925ed; color:white; padding:12px 18px; font-size:13px; text-align:center; }
.auth-card { background:var(--card); border:0; box-shadow:none; border-radius:24px; padding:28px; }
.auth-card h1 { font-family:inherit; font-size:27px; font-weight:700; }
.auth-card .brand-mark { transform:none; box-shadow:none; }
.auth-form label { font-size:14px; }
.empty-state { border:0; background:var(--card); padding:21px; border-radius:18px; }
.empty-state p { font-size:13px; }
@media(min-width:700px) { .page-shell { padding-top:32px; } .module-nav { max-width:760px; left:50%; right:auto; transform:translateX(-50%); } }
@media(max-width:360px) { .page-shell { padding:18px 16px 96px; } .app-card { padding:18px; } .metric-value strong { font-size:36px; } .energy-value strong { font-size:27px; } .summary-nutrients .metric-value strong { font-size:26px; } .photo-choice { min-height:90px; } }

/* Bring inherited web components into the same application palette. */
.text-control::placeholder { color:var(--muted); opacity:1; }
.optional,.field-hint,.ai-disclosure,.ai-assumptions,.portion-row small,
.portion-row label,.calorie-inputs span,.daily-kcal span,.daily-coverage,
.daily-note,.nutrient-card small,.nutrient-card__name,.daily-advice,
.profile-condition,.profile-result,.profile-target span,.profile-target small,
.profile-source,.goal-field,.ingredients,.meal-notes,
.calorie-summary small,.calorie-edit,.meal-card__footer small,.empty-state p,
.preview-bar,.ai-items li { color:var(--muted); }
.submit-button:hover,.auth-form button:hover,.account-button:hover,
.goals-actions button:hover { background:var(--green-deep); }
.photo-choice:hover { background:var(--green-hover); }
.meal-option span { color:var(--muted); }
.meal-dishes li { color:var(--ink); }
.preview-wrap,.ai-result,.portion-row input,.calorie-inputs input { border-color:var(--line); }
.preview-wrap,.ai-result,.profile-target,.meal-photo { background:var(--surface); }
.recognition-list li,.portion-row { background:var(--card); }
.ai-trigger,.portion-apply { border-color:transparent; background:var(--green-soft); color:var(--green-deep); }
.ai-trigger:hover,.portion-apply:hover { background:var(--green-hover); }
.nutrient-chips span { background:var(--green-soft); color:var(--green-deep); }
.daily-status,.status,.invite-output { background:var(--green-soft); color:var(--green-deep); }
.daily-status--neutral { background:var(--surface); color:var(--muted); }
.daily-status--warn { background:var(--danger-soft); color:var(--danger); }
.status--planned,.profile-review { background:var(--orange-soft); color:var(--orange); }
.meal-notes { border-color:var(--line); }
.meal-name::before { background:var(--green); }
.history-date::after { background:var(--line); }
.empty-icon { background:var(--green-soft); color:var(--green); }
.form-status { color:var(--green); }
.form-status[data-state="error"],.ai-error,.auth-status { color:var(--danger) !important; }
.text-control:focus,.goal-field input:focus,.goal-field select:focus,
.goal-field textarea:focus,.portion-row input:focus,.calorie-inputs input:focus,
.daily-date:focus-visible { outline:2px solid var(--focus); outline-offset:1px; }
.meal-option input:focus-visible+span,.file-input:focus-visible+.photo-choice,
.submit-button:focus-visible,.text-button:focus-visible,.photo-action:focus-visible,
.module-link:focus-visible { outline-color:var(--focus); }

.profile-result .metric-value strong { color:var(--ink); }

/* Energy summary: restrained cards, familiar filled icons and clear numbers. */
.step-sync { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:10px; margin-top:12px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.step-sync button { min-height:36px; }
.balance-view .app-heading .app-date { margin:0 0 8px; }
.plain-icon-button { width:40px; height:40px; border:0; padding:9px; color:var(--muted); background:transparent; display:grid; place-items:center; }
.plain-icon-button svg { width:22px; height:22px; }
.balance-card { padding:19px 22px 23px; }
.balance-state { margin:20px 0 7px; font-size:14px; color:var(--muted); }
.balance-value { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px; }
.balance-value strong { font-size:clamp(30px,8vw,42px); line-height:1.2; font-weight:730; letter-spacing:-1px; font-variant-numeric:tabular-nums; }
.balance-value>span { font-size:13px; color:var(--muted); }
.balance-meter { height:6px; border-radius:8px; background:var(--green-soft); overflow:hidden; margin:24px 0 19px; }
.balance-meter>span { display:block; height:100%; border-radius:inherit; background:var(--green); }
.balance-meter.is-over>span { background:var(--orange); }
.balance-totals { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:22px; }
.balance-totals>div+div { border-left:1px solid var(--line); padding-left:20px; }
.balance-totals span { display:block; font-size:12px; color:var(--muted); margin-bottom:6px; }
.balance-totals strong { display:block; font-size:19px; font-weight:650; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.balance-totals small { color:var(--muted); font-size:11px; }
.balance-activity { display:flex; align-items:center; gap:13px; padding:17px 20px; }
.balance-activity-icon { color:var(--orange); background:var(--orange-soft); width:42px; height:42px; flex:none; border-radius:13px; display:grid; place-items:center; }
.balance-activity-icon svg { width:25px; height:25px; }
.balance-activity>div { flex:1; min-width:0; }
.balance-activity>div strong { font-size:14px; font-weight:600; }
.balance-activity small { display:block; color:var(--muted); font-weight:400; font-size:11px; margin-top:3px; }
.balance-activity>strong { text-align:right; font-size:20px; font-weight:650; font-variant-numeric:tabular-nums; }
.exercise-options { background:var(--card); border-radius:20px; overflow:hidden; }
.exercise-option { display:flex; align-items:center; gap:14px; padding:20px; }
.exercise-option+.exercise-option { border-top:1px solid var(--line); }
.exercise-symbol { width:46px; height:46px; flex:none; border-radius:14px; background:var(--green-soft); color:var(--green); display:grid; place-items:center; }
.exercise-symbol.bike { background:#eaf0f9; color:#4b6f9b; }
.exercise-symbol svg { width:29px; height:29px; }
.exercise-copy { flex:1; min-width:0; }
.exercise-copy h3 { margin:0 0 4px; font-size:15px; font-weight:650; }
.exercise-copy p { margin:0; font-size:12px; color:var(--muted); }
.exercise-duration { text-align:right; white-space:nowrap; }
.exercise-duration strong { font-size:27px; font-weight:650; font-variant-numeric:tabular-nums; }
.exercise-duration span { display:block; font-size:11px; color:var(--muted); }
.exercise-note { margin:12px 3px 22px; color:var(--muted); font-size:12px; }
.exercise-empty { margin:0; }
.exercise-empty p { color:var(--muted); font-size:14px; margin:0 0 12px; }
.exercise-empty a { display:flex; align-items:center; color:var(--green); font-size:13px; text-decoration:none; }
.exercise-empty a svg { width:18px; height:18px; }
.balance-explanation { color:var(--muted); font-size:12px; line-height:1.7; margin:22px 3px 0; }
.balance-explanation a { color:var(--green); }
.balance-explanation summary { cursor:pointer; }

/* Proposed design only: approved 1.0.2 source and online service are unchanged. */
.module-nav { grid-template-columns:repeat(3,minmax(0,1fr)); }
.home-heading { display:grid; grid-template-columns:minmax(0,1fr) 120px; align-items:center; gap:20px; min-height:120px; }
.home-title-block .app-date { margin:0 0 12px; font-size:13px; white-space:nowrap; }
.home-title-block h1 { font-size:36px; }
.avatar-link { width:120px; height:120px; border:5px solid white; background:#e4efeb; box-shadow:0 4px 18px #284d3810; }
.avatar-link svg { width:68px; height:68px; }
[data-module="history"] .module-heading { margin-bottom:18px; }
.history-tools { position:sticky; top:0; z-index:55; display:flex; align-items:center; gap:10px; background:var(--cream); padding:10px 0 16px; margin:0 0 5px; }
.history-tools>span { flex:1; font-size:13px; color:var(--muted); white-space:nowrap; }
.history-tools .daily-date { width:142px; min-height:40px; padding:9px 10px; border:0; background:white; border-radius:11px; font-size:13px; }
.history-today { border:0; color:var(--green); background:var(--green-soft); border-radius:10px; min-height:40px; padding:8px 12px; font-size:13px; }
.history-day { scroll-margin-top:76px; margin-bottom:24px; }
[data-module="history"] #today.record-list { display:block; }
.history-day-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:6px 2px 11px; }
.history-day-heading>div { display:flex; align-items:baseline; gap:8px; }
.history-day-heading h2 { margin:0; font-size:18px; font-weight:700; color:var(--ink); }
.history-day-heading span { color:var(--muted); font-size:11px; white-space:nowrap; }
.history-day.is-selected .history-day-heading h2 { color:var(--green); }
.history-day-meals { background:white; border-radius:18px; overflow:hidden; }
.history-meal { width:100%; border:0; background:white; padding:17px 15px; display:flex; align-items:center; gap:11px; text-align:left; white-space:normal; color:var(--ink); }
.history-meal+.history-meal { border-top:1px solid var(--line); }
.history-meal .meal-type-badge { width:38px; height:38px; border-radius:12px; color:var(--green); background:var(--green-soft); font-size:15px; }
.history-meal-copy { flex:1; min-width:0; }
.history-meal-copy strong { display:block; font-size:14px; font-weight:600; }
.history-meal-copy small { display:block; font-size:11px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:4px; }
.history-meal-kcal { flex:none; color:var(--ink); font-size:12px; text-align:right; font-variant-numeric:tabular-nums; }
.history-meal-kcal small { display:block; color:var(--muted); font-size:10px; margin-top:4px; }
.history-meal .chevron { width:12px; }
.history-end { text-align:center; color:var(--muted); font-size:12px; margin:24px 0 0; }
.crop-sheet { min-height:100dvh; max-height:100dvh; border-radius:0; padding:24px 24px 28px; }
.crop-sheet .sheet-handle { display:none; }
.crop-sheet .sheet-header { margin-bottom:24px; }
.crop-sheet .sheet-header h2 { font-size:24px; }
.crop-stage { width:100%; aspect-ratio:1; overflow:hidden; border-radius:20px; position:relative; touch-action:none; cursor:grab; background:#dbe6e0; }
.crop-stage:active { cursor:grabbing; }
.crop-stage>img { position:absolute; left:50%; top:50%; max-width:none; max-height:none; user-select:none; pointer-events:none; object-fit:fill; }
.crop-circle { position:absolute; inset:0; border:2px solid white; border-radius:50%; pointer-events:none; box-shadow:0 0 0 200px #10241a75; }
.crop-hint { text-align:center; font-size:13px; color:var(--muted); margin:16px 0 !important; }
.crop-zoom { display:flex; gap:15px; align-items:center; margin:22px 0; font-size:13px; }
.crop-zoom input { flex:1; min-width:0; accent-color:var(--green); }
.crop-zoom button { font-size:13px; }
.crop-result { display:flex; align-items:center; justify-content:center; gap:16px; margin:23px 0 29px; }
.crop-result canvas { width:80px; height:80px; border-radius:50%; background:var(--surface); border:3px solid var(--surface); }
.crop-result span { font-size:13px; color:var(--muted); }
.crop-sheet .account-button { width:100%; }
.updates-view .app-heading { margin-bottom:20px; }
.update-app { text-align:center; padding:24px 20px; }
.update-app-icon { display:grid; place-items:center; width:64px; height:64px; background:var(--green-soft); color:var(--green); border-radius:19px; margin:0 auto 14px; }
.update-app-icon svg { width:35px; height:35px; }
.update-app h2 { margin:0; font-size:18px; font-weight:650; }
.update-app p { margin:6px 0 0; color:var(--muted); font-size:12px; }
.update-release { padding:22px; }
.update-release-top { display:flex; justify-content:space-between; align-items:center; gap:15px; }
.update-release-top h2 { margin:0; font-size:18px; font-weight:650; }
.update-version { background:var(--green-soft); color:var(--green); padding:4px 10px; border-radius:7px; font-size:12px; font-weight:600; }
.update-release-subtitle { margin:9px 0 18px; color:var(--muted); font-size:13px; }
.update-release ul { padding-left:18px; margin:0 0 25px; color:var(--muted); font-size:13px; line-height:2.2; }
.update-primary { width:100%; }
.update-install-note { text-align:center; font-size:11px; color:var(--muted); margin:12px 0 0; }
.update-recheck { display:block; margin:20px auto; border:0; background:transparent; color:var(--muted); font-size:13px; min-height:40px; }
.update-download { padding:6px 0 18px; }
.update-download>div { display:flex; justify-content:space-between; font-size:12px; color:var(--muted); margin-bottom:8px; }
.update-download progress { display:block; width:100%; height:6px; border:0; border-radius:6px; overflow:hidden; accent-color:var(--green); }
.recognition-controls { display:grid; gap:8px; margin-top:10px; padding:0; border:0; border-radius:0; text-align:left; }
.recognition-controls .task-resume { width:100%; }
.manual-food-panel { display:grid; gap:12px; margin-top:16px; padding:16px; border:1px solid var(--line,#deded5); border-radius:16px; text-align:left; }
.manual-food-panel[hidden] { display:none; }
.recognition-controls label,.manual-food-panel label { display:grid; gap:8px; min-width:0; }
.recognition-controls input,.manual-food-panel input,.manual-food-panel select { width:100%; min-width:0; max-width:100%; box-sizing:border-box; }
.recognition-controls ul,.manual-food-panel ul,.nutrition-source ul { padding-left:20px; line-height:1.8; overflow-wrap:anywhere; }
.recognition-controls p,.manual-food-panel p { margin:0; overflow-wrap:anywhere; }
.recognition-controls button,.manual-food-panel button { white-space:normal; }
.nutrition-source { margin:14px 0; font-size:13px; line-height:1.7; }
.nutrition-source summary { cursor:pointer; }
.recognition-dialog { width:min(520px,calc(100vw - 32px)); max-height:85dvh; padding:20px; box-sizing:border-box; border:1px solid #deded5; border-radius:20px; color:var(--ink,#262a21); background:var(--card,#fffefa); overflow:auto; }
.recognition-dialog::backdrop { background:#16231880; }
@media(max-width:360px) { .home-heading { grid-template-columns:minmax(0,1fr) 104px; gap:12px; min-height:104px; }.avatar-link { width:104px;height:104px; }.avatar-link svg { width:58px;height:58px; }.history-tools {gap:7px;}.history-tools .daily-date {width:132px;font-size:12px;}.history-tools>span {font-size:12px;}.history-today {padding:8px 10px;}.history-day-heading h2 {font-size:16px;}.history-meal {gap:9px;padding:15px 12px;}.history-meal-kcal {font-size:11px;}.crop-sheet {padding:20px;}.crop-result {margin:15px 0 20px;} }

/* 修正识别结果：自由文本，复用 task_uuid，只改受影响项。 */
.ai-fix { display:grid;gap:10px;margin:14px 0 0;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--surface); }
.ai-fix label { display:grid;gap:7px;font-size:13px;font-weight:600;color:var(--muted); }
.ai-fix-actions { display:flex;align-items:center;gap:12px;flex-wrap:wrap; }
.ai-fix-status { font-size:12px;color:var(--muted);margin:0; }
