:root{--bg:#f8f7f3;--ink:#173f36;--green:#285342;--sage:#e7ece3;--muted:#707973;--line:#e4e7df;--orange:#cf8250;--white:#fff;--radius:20px;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;-webkit-font-smoothing:antialiased}button,input,textarea,select{font:inherit}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}a{color:inherit;text-decoration:none}button:disabled{cursor:wait;opacity:.55}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--orange);outline-offset:3px}button{border:0}button svg{flex-shrink:0}svg{width:24px;height:24px;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}p{line-height:1.7}h1,h2,h3,p{margin-top:0}[hidden]{display:none!important}.app-shell{max-width:520px;margin:auto;padding:28px 18px calc(108px + env(safe-area-inset-bottom))}.app-header{display:flex;align-items:center;justify-content:space-between;margin:0 3px 25px}.brand{display:flex;align-items:center;gap:10px;font-size:26px;font-weight:650;letter-spacing:2px}.brand svg{width:28px;height:28px}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;color:var(--ink);background:#eef0e9}.icon-button.small{width:40px;height:40px}.page-heading{margin:0 2px 20px}.page-heading h1{font-size:28px;font-weight:650;letter-spacing:-.8px;line-height:1.4;margin:0 0 6px}.page-heading p{color:var(--muted);font-size:15px;margin:0}.summary-card{background:white;border-radius:var(--radius);padding:18px 16px 20px;margin-bottom:14px}.summary-card h2{font-size:15px;font-weight:550;color:#4a5d54;margin-bottom:18px}.summary-stats{display:grid;grid-template-columns:repeat(3,1fr);text-align:center}.summary-stat{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px}.summary-stat+.summary-stat:before{content:"";position:absolute;left:0;top:6px;bottom:4px;width:1px;background:var(--line)}.summary-stat svg{width:25px;height:25px;color:#596c62}.summary-stat strong{font-size:28px;font-weight:620;line-height:1.2}.summary-stat small{font-size:14px;color:var(--muted)}button.summary-stat{padding:0;background:transparent;color:inherit}.action-tile{display:flex;align-items:center;gap:17px;width:100%;padding:23px 20px;border-radius:var(--radius);text-align:left;margin:10px 0;background:var(--green);color:white}.action-tile>.tile-icon svg{width:36px;height:36px;stroke-width:1.55}.action-tile strong{display:block;font-size:21px;font-weight:600;letter-spacing:.4px;margin-bottom:5px}.action-tile small{font-size:13px;opacity:.78}.action-tile .plus{display:flex;align-items:center;justify-content:center;margin-left:auto;width:37px;height:37px;background:#ffffff22;border-radius:50%;flex-shrink:0}.action-tile.secondary{background:var(--sage);color:var(--ink)}.action-tile.secondary .plus{background:#cfd9ce}.section-heading{display:flex;align-items:center;justify-content:space-between;margin:26px 2px 12px}.section-heading h2{font-size:19px;letter-spacing:.2px;margin:0}.text-button{background:transparent;color:var(--muted);font-size:14px;padding:12px 2px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:4px}.text-button svg{width:16px;height:16px}.empty-state{text-align:center;padding:12px 0 17px}.empty-art{width:134px;height:110px;margin:5px auto 13px}.empty-art svg{height:100%;width:100%;stroke-width:1.7}.empty-state h3{font-size:16px;font-weight:600;margin:0 0 6px}.empty-state p{font-size:13px;color:var(--muted);margin:0}.review-link{display:flex;align-items:center;gap:15px;text-align:left;background:#eaf0e5;border-radius:16px;padding:18px;margin-top:13px;width:100%;color:var(--ink)}.review-link>svg{width:26px;height:26px}.review-link strong{display:block;font-size:16px;margin-bottom:4px}.review-link small{color:var(--muted);font-size:13px}.review-link>.arrow{margin-left:auto;width:18px}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);display:grid;grid-template-columns:repeat(3,1fr);width:min(100%,520px);padding:10px 12px calc(9px + env(safe-area-inset-bottom));background:rgba(255,255,255,.97);border-top:1px solid #eceee8;z-index:5}.bottom-nav a{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;min-height:48px;font-size:12px;color:#778079}.bottom-nav a svg{width:23px;height:23px}.bottom-nav a.active{color:var(--green);font-weight:600}.bottom-nav a.active svg{stroke-width:2.3}.entry-row{display:flex;align-items:center;gap:12px;width:100%;padding:13px;background:white;text-align:left;color:var(--ink);border-radius:16px;margin:8px 0;min-height:80px}.entry-thumb{display:flex;align-items:center;justify-content:center;width:54px;height:54px;flex-shrink:0;background:#eef1e8;border-radius:12px;object-fit:cover}.entry-body{flex:1;min-width:0}.entry-title{font-size:15px;font-weight:600;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entry-meta{font-size:12px;color:var(--muted);margin-top:5px;line-height:1.6}.entry-row>.chevron{width:17px;color:#8b948d;flex-shrink:0}.pending{font-size:10px;border-radius:5px;color:#9b672f;background:#fbf0dc;padding:2px 5px;margin-left:6px;white-space:nowrap}.initial-loading{text-align:center;padding:90px 10px;color:var(--muted);font-size:14px}.notice{background:#eef2e8;color:#445746;font-size:13px;line-height:1.7;padding:13px 15px;border-radius:12px;margin:12px 0;white-space:pre-wrap;overflow-wrap:anywhere}.notice.error{background:#fff0e9;color:#994524}.micro{font-size:11px;color:var(--muted);line-height:1.7;margin:8px 2px 16px}.history-toolbar{display:flex;gap:10px;align-items:center;margin:12px 0}.history-toolbar input{flex:1;min-width:0}.filter-tabs{display:flex;gap:7px;overflow-x:auto;padding:6px 0 12px;scrollbar-width:none}.filter-tabs button,.exercise-presets button{border-radius:22px;padding:10px 17px;min-height:42px;background:#eeefe8;color:var(--muted);white-space:nowrap;font-size:13px}.filter-tabs button.active{background:var(--green);color:white}.history-day{font-size:14px;margin:20px 3px 10px;color:#4e6659}.quick-add{display:flex;gap:8px;margin:16px 0}.quick-add button{flex:1;padding:13px 5px;border-radius:12px;background:var(--sage);color:var(--ink);font-size:13px;min-height:46px}.quick-add svg{width:16px;height:16px;margin-right:4px}.outline-button,.primary-button{display:flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:13px 16px;border-radius:13px;font-size:15px;font-weight:550}.outline-button{border:1px solid #d5ded2;background:transparent;color:var(--green)}.primary-button{background:var(--green);color:white}.full{width:100%}dialog{position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,520px);max-width:100%;max-height:94dvh;max-height:94vh;max-height:94dvh;padding:0;border:0;border-radius:25px 25px 0 0;color:var(--ink);background:var(--bg);overscroll-behavior:contain;box-shadow:0 -10px 60px #143e3222}dialog::backdrop{background:rgba(16,36,28,.3);backdrop-filter:blur(2px)}.sheet-header{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 18px;position:sticky;top:0;background:var(--bg);z-index:2;border-bottom:1px solid var(--line)}.sheet-header h2{font-size:17px;margin:0;font-weight:600}.sheet-content{padding:20px 20px calc(26px + env(safe-area-inset-bottom))}label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:550;margin-bottom:17px;color:#3b5849}input:not([type=checkbox]),textarea{width:100%;min-width:0;border:1px solid #dfe4da;background:#fff;border-radius:11px;min-height:47px;padding:12px;color:var(--ink);font-size:16px;outline:none;appearance:none}input:focus,textarea:focus{border-color:var(--green);box-shadow:0 0 0 2px #28534215}input::placeholder,textarea::placeholder{color:#9aa299}input[type=date],input[type=time]{min-height:48px}textarea{resize:vertical;line-height:1.6}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.segments{display:grid;grid-template-columns:repeat(4,1fr);background:#e9ece4;padding:4px;gap:4px;border-radius:12px;margin:2px 0 16px}.segments button{border-radius:9px;padding:10px 0;background:transparent;color:var(--muted);font-size:14px;min-height:42px}.segments button.active{background:white;color:var(--green);box-shadow:0 1px 4px #1835280b}.photo-container{position:relative;background:#e9ede4;border:1px dashed #cbd6c7;border-radius:17px;min-height:169px;display:flex;align-items:center;justify-content:center;overflow:hidden}.photo-container img{width:100%;height:205px;object-fit:cover}.photo-container #photo-empty{text-align:center;padding:22px}.photo-container #photo-empty svg{width:34px;height:34px;color:#6b8170}.photo-container p{font-size:15px;margin:8px 0 3px}.photo-container small{font-size:12px;color:var(--muted)}.photo-remove{position:absolute;right:10px;bottom:10px;background:#fffef5e8;color:var(--ink);font-size:12px;border-radius:9px;min-height:36px;padding:9px 12px}.photo-actions{margin:10px 0 19px}.photo-actions button{font-size:13px}.photo-actions svg{width:18px;height:18px}details{margin:16px 0;border:1px solid var(--line);border-radius:12px;padding:0 14px}summary{font-size:13px;cursor:pointer;min-height:48px;padding:15px 0;font-weight:550}summary span{color:var(--muted);font-size:11px;font-weight:400;margin-left:5px}details .field-grid{padding-top:4px}.checkbox-row{flex-direction:row;gap:10px;align-items:flex-start;font-size:12px;line-height:1.7;margin:18px 0}.checkbox-row input{width:19px;height:19px;flex-shrink:0;accent-color:var(--green);margin:2px 0 0}.checkbox-row small{display:block;color:var(--muted);font-size:11px;font-weight:400}.form-actions{margin-top:20px}.form-actions #edit-actions{display:flex;justify-content:space-between;margin-top:8px}.danger{color:#a04d3e}.exercise-presets{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:18px}.exercise-presets button{padding:9px 13px;font-size:12px}.exercise-presets button.active{background:var(--green);color:white}.setting-intro{text-align:center;padding:15px 0 18px}.setting-intro svg{width:38px;height:38px;margin-bottom:17px}.setting-intro h3{font-size:19px;margin-bottom:8px}.setting-intro p{font-size:13px;color:var(--muted)}.setting-section{padding:15px 0;border-top:1px solid var(--line)}.setting-section h3{font-size:15px;margin:0 0 8px}.setting-section p{font-size:13px;color:var(--muted);margin:5px 0 10px}.toast{position:fixed;left:50%;bottom:calc(93px + env(safe-area-inset-bottom));transform:translateX(-50%);padding:13px 22px;background:#193f35ed;color:white;border-radius:14px;z-index:30;font-size:13px;box-shadow:0 4px 20px #173f3622;max-width:90%;text-align:center}.analysis-card{background:white;border-radius:20px;padding:21px;margin:15px 0}.analysis-card h2{font-size:18px;margin-bottom:9px}.analysis-card>p{font-size:13px;color:var(--muted)}.mini-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:16px 0;text-align:center}.mini-stats strong{display:block;font-size:23px;margin-bottom:5px;font-weight:600}.mini-stats small{font-size:11px;color:var(--muted)}.week-bars{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;margin:16px 0 2px;align-items:end}.week-day{text-align:center;color:var(--muted);font-size:11px}.bar-space{height:65px;display:flex;align-items:flex-end;justify-content:center;margin-bottom:8px}.activity-bar{width:15px;background:#83a38b;border-radius:5px 5px 3px 3px;min-height:3px}.activity-bar.empty{background:#e7ece3}.week-note{font-size:11px;color:var(--muted);margin:9px 0 0}.analysis-output{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.9;color:#2e4e3f;background:#edf2e8;border-radius:14px;padding:17px;margin-top:17px}.analysis-output h3{font-size:13px;color:#70816b}.question-label{font-size:14px}.suggested-questions{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:15px}.suggested-questions button{padding:10px 12px;min-height:42px;background:var(--sage);color:var(--ink);font-size:12px;border-radius:10px}.revision-item{background:white;padding:16px;border-radius:13px;margin-bottom:12px}.revision-item h3{font-size:14px;margin-bottom:8px}.revision-item p{font-size:12px;margin-bottom:5px;color:var(--muted);white-space:pre-wrap}.revision-item time{font-size:11px;color:var(--muted)}.nutrition-summary{padding:13px 15px;background:#f1eee5;border-radius:12px;color:#77654b;font-size:12px;margin:12px 0;line-height:1.7}.weight-line{color:var(--muted);font-size:12px;margin:10px 0 0}.reload-button{background:none;text-decoration:underline;color:inherit;padding:4px}.offline-banner{text-align:center}.loaded{animation:appear .18s ease-out}@keyframes appear{from{opacity:.6;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}@media(min-width:700px){body{padding-top:20px}.app-shell{padding-top:28px}.bottom-nav{border-radius:20px 20px 0 0}dialog{inset:7vh 0 auto;max-height:86vh;border-radius:24px}.app-header{margin-bottom:26px}}@media(max-width:360px){.app-shell{padding-left:13px;padding-right:13px}.page-heading h1{font-size:25px}.action-tile{padding:20px 16px;gap:13px}.action-tile strong{font-size:19px}.action-tile small{font-size:12px}.sheet-content{padding-left:15px;padding-right:15px}}@media(prefers-reduced-motion:reduce){.loaded{animation:none}}
.summary-card{padding:14px 16px 16px}.summary-card h2{margin-bottom:10px}.summary-stat{gap:4px}.summary-stat svg{width:22px;height:22px}.summary-stat strong{font-size:26px}.summary-stat small{font-size:13px}.action-tile{padding:19px 18px}.action-tile strong{font-size:20px;margin-bottom:4px}.action-tile small{font-size:12px}.section-heading{margin-top:22px}.empty-state{padding:6px 0 12px}.empty-art{height:90px;margin:4px auto 10px}.empty-state h3{font-size:15px}.empty-state p{font-size:12px}.review-link{padding:15px}.review-link strong{font-size:15px}.review-link small{font-size:12px}
.notice.processing{margin:12px 20px 0}
.login-page{min-height:100dvh;display:grid;place-items:center;padding:24px 22px}.login-panel{width:100%;max-width:365px;padding:28px 0}.login-panel .brand{justify-content:center;font-size:25px;gap:12px}.login-panel .brand img{border-radius:11px}.login-heading{text-align:center;margin:42px 0 30px}.login-heading h1{font-size:27px;letter-spacing:-.8px;margin:0 0 12px}.login-heading p{font-size:14px;color:var(--muted);line-height:1.8}.login-panel label{font-size:14px}.login-panel input[type=password]{min-height:52px;background:white}.login-panel .checkbox-row{font-size:13px;margin:22px 0}.login-panel .primary-button{min-height:52px}.login-footer{text-align:center;color:var(--muted);font-size:12px;margin:42px 0 0}.relogin{display:block;text-align:center;text-decoration:underline}.logout-button{margin-top:22px}
.pairing-code{text-align:center;font-size:34px;letter-spacing:8px;font-weight:650;font-variant-numeric:tabular-nums;color:var(--green);margin:20px 0}.device-card{padding:20px;background:white;border-radius:18px;margin:12px 0}.device-card h3{font-size:16px;margin:0 0 8px;overflow-wrap:anywhere}.device-time{font-size:12px;color:var(--muted);margin:0}.device-card .field-grid{gap:10px}.device-card button{font-size:13px}.approval-link{margin:14px 0}.security-page{padding-bottom:40px}

#meal-questions{white-space:pre-line;line-height:1.7}#meal-clarification{white-space:normal}#meal-clarification label{margin-top:12px}
