:root{--ink:#173536;--muted:#5f7270;--teal:#146d67;--teal2:#249589;--mint:#d9efea;--cream:#f8faf8;--line:#dce7e3;--white:#fff;--danger:#ab3333;--warn:#ad6c16;--shadow:0 12px 30px rgba(22,54,47,.06);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink)}*{box-sizing:border-box}body{margin:0;background:var(--cream);font-size:15px;line-height:1.4}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}.hidden{display:none!important}.loading{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--muted);background:#f5fbf8;z-index:20}.loader{width:20px;height:20px;border:3px solid var(--mint);border-top-color:var(--teal);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(28px,4vw,38px);letter-spacing:-1px;margin-bottom:6px}h2{font-size:19px;letter-spacing:-.4px;margin-bottom:14px}h3{font-size:16px;margin-bottom:10px}.muted{color:var(--muted)}.small{font-size:13px}.tiny{font-size:12px}.kicker{font-size:11px;letter-spacing:1.7px;color:var(--teal);font-weight:800}.auth-page{min-height:100dvh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 80% 12%,#cfebe1 0,transparent 45%),#f6faf8}.auth-card{background:white;border:1px solid #e0ede6;padding:clamp(24px,5vw,45px);border-radius:24px;box-shadow:var(--shadow);width:min(460px,100%)}.brand-orb,.logo-mark{background:var(--teal);color:white;display:grid;place-items:center;font-weight:900;border-radius:13px}.brand-orb{width:57px;height:57px;font-size:28px;margin-bottom:20px}.auth-card h1{margin:7px 0}.auth-card h2{margin:25px 0 5px}.site-header{background:#fff;border-bottom:1px solid var(--line)}.header-inner{width:min(1080px,calc(100% - 36px));margin:auto;display:flex;align-items:center;justify-content:space-between;height:70px}.logo{display:flex;align-items:center;gap:10px}.logo-mark{width:42px;height:42px;font-size:22px}.logo strong,.logo small{display:block}.logo strong{letter-spacing:1.2px;font-size:19px;line-height:1.2}.logo small{font-size:10px;letter-spacing:1px;text-transform:uppercase;color:var(--muted)}.phase-pill{color:#135f58;background:#e5f2ef;font-size:12px;border-radius:30px;padding:8px 12px;font-weight:750}.shell{max-width:1080px;margin:auto;padding:20px 18px 112px}.page-top{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:22px}.page-top h1{margin-top:3px}.btn{border:1px solid transparent;border-radius:11px;padding:11px 16px;font-weight:750;text-align:center;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:43px;background:#eaf2ef;color:var(--ink)}.btn.primary{background:var(--teal);color:white}.btn.accent{background:#d2fbdf;color:#16483d}.btn.outline{background:white;border-color:#bad5cc;color:var(--teal)}.btn.light{background:#ecf4f0;color:#42655a}.btn.full{width:100%}.btn.small{min-height:35px;padding:6px 10px;font-size:12px}.text-button{border:0;background:none;color:var(--teal);font-weight:750}label{display:grid;gap:6px;font-size:13px;font-weight:700;margin-bottom:14px}input,select,textarea{width:100%;padding:12px;border:1px solid #cbdad4;border-radius:10px;color:var(--ink);background:white;outline-offset:2px;min-height:45px}input:focus,select:focus,textarea:focus{border-color:#249589;outline:2px solid #d3eee8}textarea{resize:vertical}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.error-text{color:var(--danger)}.notice{padding:13px 15px;border-radius:12px;border:1px solid #afddcd;background:#ebf8f1;color:#155649;margin-bottom:15px;font-size:13px}.notice.error{background:#fff0ed;border-color:#f2c2b5;color:#992e23}.hero{background:linear-gradient(115deg,#0e615c,#267f70);color:#fff;padding:28px;display:flex;justify-content:space-between;align-items:center;gap:12px;border-radius:21px;margin-bottom:16px}.hero-eyebrow{font-size:11px;letter-spacing:1.4px;font-weight:800;opacity:.8;margin:0}.hero-number{font-size:clamp(42px,7vw,65px);letter-spacing:-3px;font-weight:900;line-height:1.25}.hero-number span{font-size:20px;letter-spacing:0;font-weight:400;opacity:.8}.hero-sub{font-size:13px;opacity:.9}.hero-goal{min-width:150px;border-left:1px solid #ffffff42;text-align:center;padding-left:24px;font-size:12px;color:#dff5ee}.hero-goal .big{font-size:38px;color:white;line-height:1.15;font-weight:800}.hero-goal .btn{margin-top:12px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:25px}.stat,.panel{background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow)}.stat{padding:16px}.stat-label{color:var(--muted);font-size:12px;margin-bottom:8px}.stat strong{font-size:27px;letter-spacing:-.6px}.stat span{color:var(--muted);font-size:12px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.section-head h2{margin:0}.allowances{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:22px}.allowance{padding:16px;background:white;border:1px solid var(--line);border-radius:15px}.allowance .topline{display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:750}.allowance .counter{font-size:13px;font-variant-numeric:tabular-nums;color:var(--muted);white-space:nowrap}.bar{height:8px;background:#e6efeb;border-radius:8px;margin:12px 0 7px;overflow:hidden}.bar>div{height:100%;background:#2e9384;border-radius:8px;max-width:100%}.bar.warn>div{background:#d08c4a}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:15px}.panel{padding:22px;margin-bottom:16px}.panel .btn{margin-top:5px}.mini-list,.entries{display:grid;gap:8px}.entry{border-bottom:1px solid #ecf1ed;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0}.entry:last-child{border-bottom:0}.entry strong,.entry small{display:block}.entry small{font-size:12px;color:var(--muted);margin-top:2px}.del{background:#f7eeee;color:#ad3939;border:0;border-radius:8px;padding:8px;font-size:12px;flex-shrink:0}.section-intro{color:var(--muted);margin:-2px 0 15px}.search-wrap{position:relative;margin:0}.search-wrap input{padding-left:39px;font-size:16px}.search-icon{position:absolute;left:13px;top:8px;color:var(--teal);font-size:25px}.food-results{margin-top:9px;max-height:300px;overflow-y:auto}.food-option{background:none;display:flex;align-items:center;justify-content:space-between;text-align:left;width:100%;border:0;border-bottom:1px solid #f0f3f1;padding:12px 4px}.food-option small{display:block;color:var(--muted);margin-top:3px}.food-option:focus{outline:2px solid var(--teal)}.status-pill{display:inline-flex;align-items:center;border-radius:20px;padding:4px 9px;background:#ddf3e6;color:#136c4c;font-size:11px;font-weight:800}.status-pill.warn{background:#fff1d9;color:#955512}.status-pill.danger{background:#ffebeb;color:#a22e2e}.status-pill.neutral{background:#edf2f2;color:#466566}.food-detail{border-top:1px solid var(--line);margin-top:14px;padding-top:15px}.food-detail h3{font-size:23px;margin:8px 0}.food-detail .muted{font-size:13px;line-height:1.55}.food-detail form{margin-top:17px}.goal-snapshot{font-size:14px;line-height:2}.goal-snapshot strong{color:var(--teal)}.chart-box{height:230px;display:grid;place-items:center}.chart-box svg{width:100%;height:100%}.chart-box text{fill:#6c847a;font-size:11px}.weekly-plan{display:grid;grid-template-columns:repeat(7,1fr);gap:9px}.day-card{border-radius:12px;background:#eef6f3;padding:12px 8px;min-height:105px}.day-card strong{display:block;margin-bottom:7px;color:var(--teal);font-size:12px}.day-card span{font-size:12px}.gps-details{border-top:1px solid var(--line);padding-top:13px;margin-top:17px}.gps-details summary{font-weight:750;color:var(--teal);cursor:pointer}.gps-details p{margin:10px 0}.gps-buttons{display:flex;gap:10px;flex-wrap:wrap}.bottom-nav{position:fixed;z-index:9;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:center;gap:4px;background:#fff;border-top:1px solid var(--line);padding:8px max(12px,env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));box-shadow:0 -9px 25px #182e2b0b}.bottom-nav button{display:grid;place-items:center;gap:2px;min-width:73px;max-width:120px;flex:1;padding:7px 2px;border:0;border-radius:13px;background:transparent;color:#667a74}.bottom-nav button.active{background:#e2f2eb;color:var(--teal)}.bottom-nav span{font-size:22px;line-height:1.2}.bottom-nav small{font-size:10px;font-weight:800}.view{min-height:100px}@media(max-width:720px){.stats-grid{grid-template-columns:repeat(2,1fr)}.weekly-plan{grid-template-columns:repeat(2,1fr)}.day-card{min-height:67px}.panel{padding:17px}.hero{padding:21px}.hero-goal{min-width:115px;padding-left:16px}.bottom-nav button{min-width:0}.allowances{gap:9px}.allowance{padding:12px}.allowance .topline{font-size:12px}.allowance .counter{font-size:12px}}@media(max-width:440px){.shell{padding-left:12px;padding-right:12px}.header-inner{width:calc(100% - 24px)}.phase-pill{max-width:154px;text-align:center;line-height:1.15}.form-row{grid-template-columns:1fr;gap:0}.two-col{grid-template-columns:1fr}.hero-number{font-size:39px}.hero-goal .big{font-size:28px}.hero-goal{min-width:93px;padding-left:10px}.hero-sub{max-width:200px}.page-top h1{font-size:29px}.logo small{font-size:9px}.allowances{grid-template-columns:1fr 1fr}}@media(prefers-reduced-motion:reduce){.loader{animation:none}}

/* v0.1.2 hydration */
.home-water{background:linear-gradient(150deg,#f2fbfb,#fff);border-color:#cceae8}
.water-subtitle{margin:1px 0 0}
.water-amount{display:flex;justify-content:space-between;gap:10px;align-items:baseline;flex-wrap:wrap}
.water-amount strong{font-size:clamp(28px,5vw,40px);letter-spacing:-1.5px;color:#116d7a}
.water-bar{height:13px;background:#d6eceb;margin:13px 0 17px}
.water-bar>div{background:linear-gradient(90deg,#148b99,#54b5af)}
.quick-water{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.quick-water .btn{font-weight:800;white-space:nowrap;border-color:#addbdc;color:#116d7a}
.water-week-history{display:grid;gap:13px}
.water-day{display:grid;grid-template-columns:84px minmax(45px,1fr) 64px;align-items:center;gap:10px;font-size:13px}
.water-day small{color:var(--muted)}
.water-day .bar{margin:0}
.water-day strong{text-align:right;font-size:12px;white-space:nowrap}
@media(max-width:440px){.bottom-nav small{font-size:9px}.bottom-nav button{padding:7px 0}.bottom-nav span{font-size:21px}.quick-water{gap:5px}.quick-water .btn{padding:9px 4px;font-size:12px}.water-day{grid-template-columns:76px minmax(40px,1fr) 58px;gap:7px}}

/* v0.1.3: visible, guided food logging UI */
.food-logger .section-head{align-items:center}
.quick-food-form{padding-top:17px;margin-top:18px;border-top:2px solid var(--line)}
.quick-food-form h2{margin-bottom:14px}
#food-search-help{margin:8px 0 12px}
.food-suggestions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.food-suggestions .tiny{width:100%;margin:3px 0 0}
.quick-food-chip{padding:8px 11px;border:1px solid #b5d4cb;border-radius:999px;background:#eff8f5;color:var(--teal);font-size:13px;font-weight:750}
.unknown-choice{padding:12px;background:#f5f9f7;border-radius:12px;margin-top:10px;border:1px dashed #bbd6ca}
.unknown-choice p{margin-bottom:8px}
.unknown-choice button{max-width:100%;white-space:normal;text-align:left}
.food-logger #food-results{max-height:330px;overflow-y:auto}
#food-log-hint{margin-bottom:12px}
.inline-link{background:none;border:0;padding:0;margin-left:4px;color:inherit;text-decoration:underline;font-size:inherit;font-weight:800;cursor:pointer}
#food-selected-name[readonly]{background:#f2f8f5;color:#12594f;font-weight:700}
#food-log .status-pill{font-size:10px;margin-left:6px;vertical-align:middle}

/* v0.1.4: AI-assisted unknown food lookup (never replaces confirmed plan rules) */
.ai-lookup-controls{margin:14px 0 6px;display:flex;gap:9px;flex-wrap:wrap;align-items:center}
.ai-lookup-controls p{margin:0;flex:1;min-width:160px}
.btn.ai-button{background:#e2f0ed;color:#0a625f;border:1px solid #b7d9d1;min-height:45px}
.lookup-result{border:1px solid #c2dbd3;background:#f7fbf9;border-radius:14px;padding:16px;margin:12px 0}
.lookup-result h3{margin:8px 0}.lookup-result p{font-size:13px;margin:8px 0}
.lookup-result .status-pill{font-size:12px}.lookup-result .portion{border-top:1px solid #dce9e4;padding:11px 0}
.lookup-result .portion strong{display:block;font-size:14px}
.lookup-result .portion span{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.lookup-result .lookup-source{font-size:11px;border-top:1px dashed #c6dfd4;padding-top:10px;margin-top:10px}
.lookup-result .lookup-source a{color:#135f58;text-decoration:underline;word-break:break-word}
.lookup-result .lookup-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.lookup-result .lookup-actions .btn{margin-top:0}
@media(max-width:480px){.ai-lookup-controls{display:grid}.ai-lookup-controls p{min-width:0}.lookup-result .lookup-actions .btn{width:100%}}
