:root{--bg: #ffffff;--fg: #1c1c1e;--muted: #6b6b70;--accent: #2f6f5e;--bar: #f4f4f6;--border: #d8d8dc;--tabbar-h: 56px}@media (prefers-color-scheme: dark){:root{--bg: #000000;--fg: #f2f2f7;--muted: #9a9aa0;--accent: #6fcfb4;--bar: #1c1c1e;--border: #38383a}}*{box-sizing:border-box}html,body,#root{margin:0;min-height:100%}body{background:var(--bg);color:var(--fg);font:16px/1.4 -apple-system,BlinkMacSystemFont,Helvetica Neue,Arial,sans-serif;overflow-x:hidden}.content{padding:16px;padding-top:calc(16px + env(safe-area-inset-top));padding-bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px)}h1{margin:0 0 12px;font-size:1.5rem}.tabbar{position:fixed;left:0;right:0;bottom:0;display:flex;background:var(--bar);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom)}.tabbar button{flex:1;min-height:44px;height:var(--tabbar-h);min-width:0;padding:0 2px;border:0;background:none;color:var(--muted);font:inherit;font-size:.75rem;cursor:pointer}.tabbar button[aria-current=page]{color:var(--accent);font-weight:600}.settings-form{display:flex;flex-direction:column;gap:12px}.settings-form label{display:flex;flex-direction:column;gap:4px;font-size:.9rem;color:var(--muted)}.settings-form input{min-height:44px;padding:0 10px;font:inherit;font-size:16px;color:var(--fg);background:var(--bg);border:1px solid var(--border);border-radius:8px}.settings-form button{min-height:44px;border:0;border-radius:8px;background:var(--accent);color:var(--bg);font:inherit;font-weight:600;cursor:pointer}.settings-form button:disabled{opacity:.6}.form-error{color:#c0392b;margin:0}details summary{min-height:44px;display:flex;align-items:center;cursor:pointer}.profile{display:flex;flex-direction:column;gap:12px}.profile a{min-height:44px;display:flex;align-items:center;color:var(--accent)}.profile-field{display:flex;flex-direction:column;gap:4px;font-size:.9rem;color:var(--muted);border:0;padding:0;margin:0}.profile-field input:not([type=checkbox]):not([type=radio]),.profile-field select{min-height:44px;padding:0 10px;font:inherit;font-size:16px;color:var(--fg);background:var(--bg);border:1px solid var(--border);border-radius:8px}.profile-check{display:flex;align-items:center;gap:8px;min-height:44px;color:var(--fg)}.profile-check input{width:22px;height:22px}.swatch{display:inline-block;width:28px;height:28px;border:1px solid var(--border);border-radius:4px}.profile button,.settings-form~button,.reminders-settings>button{min-height:44px;padding:0 16px;border:0;border-radius:8px;background:var(--accent);color:var(--bg);font:inherit;font-weight:600;cursor:pointer}.profile button:disabled,.reminders-settings button:disabled{opacity:.6}.checkin{display:flex;flex-direction:column;gap:12px}.checkin button,.primary{min-height:44px;min-width:44px;padding:0 12px;font:inherit;color:var(--fg);background:var(--bar);border:1px solid var(--border);border-radius:8px;cursor:pointer}.checkin button:disabled{opacity:.5}.checkin button[aria-pressed=true]{background:var(--accent);color:var(--bg);border-color:var(--accent)}button.primary{background:var(--accent);color:var(--bg);border:0;font-weight:600}.checkin .primary:disabled{opacity:.5}.card{border:1px solid var(--border);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:8px}.card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.card-head h2{margin:0;font-size:1.1rem}.chip{font-size:.8rem;color:var(--muted);border:1px solid var(--border);border-radius:999px;padding:2px 10px}.card-summary,.card-note{margin:0;color:var(--muted);font-size:.9rem}.card-actions{display:flex;flex-wrap:wrap;gap:8px}.card-actions button{flex:1;min-width:0;font-size:.85rem}.still{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.level-row{display:flex;gap:8px}.level-row button{flex:1;font-size:1.4rem}.stepper{display:flex;align-items:center;gap:12px}.stepper output{min-width:4ch;text-align:center;font-weight:600}.big-toggle{min-height:64px!important;font-size:1.1rem}.tag-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.chip-list{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.editor{display:flex;flex-direction:column;gap:8px}.field{display:flex;flex-direction:column;gap:4px;font-size:.9rem;color:var(--muted)}.field input,.field select{min-height:44px;padding:0 10px;font:inherit;font-size:16px;color:var(--fg);background:var(--bg);border:1px solid var(--border);border-radius:8px}.test-build-banner{margin:0;padding:8px 16px;background:#b00020;color:#fff;font-weight:700;text-align:center}.facemap-frame{position:relative;width:100%;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.facemap-zoom{position:relative;width:100%;transform-origin:0 0}:root{--viz-surface: #fcfcfb;--viz-1: #2a78d6;--viz-2: #eb6834;--viz-grid: #e4e3e0;--viz-pick: rgba(42, 120, 214, .12)}@media (prefers-color-scheme: dark){:root{--viz-surface: #1a1a19;--viz-1: #3987e5;--viz-2: #d95926;--viz-grid: #353533;--viz-pick: rgba(57, 135, 229, .18)}}.insights{display:flex;flex-direction:column;gap:16px}.insights p{margin:0}.insights-block{display:flex;flex-direction:column;gap:8px}.insights-block h2{margin:0;font-size:1.1rem}.insights-label{font-weight:600}.insights button.primary{width:100%}.meter{height:12px;border-radius:6px;background:var(--border);overflow:hidden}.meter-fill{height:100%;background:var(--accent);border-radius:6px}.seg{display:flex;border:1px solid var(--border);border-radius:8px;overflow:hidden}.seg button{min-height:44px;min-width:44px;padding:0 12px;border:0;background:var(--bar);color:var(--fg);font:inherit;font-size:.85rem;cursor:pointer}.seg button[aria-pressed=true]{background:var(--accent);color:var(--bg);font-weight:600}.plain-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.trigger{display:flex;flex-direction:column;gap:2px;padding:8px 0;border-top:1px solid var(--border)}.trigger .card-head{justify-content:flex-start;flex-wrap:wrap}.viz-card{background:var(--viz-surface);border:1px solid var(--border);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:8px}.viz-svg{width:100%;height:auto;display:block;touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.viz-grid{stroke:var(--viz-grid);stroke-width:1}.viz-axis{fill:var(--muted)}.viz-pick{fill:var(--viz-pick)}.viz-bar{fill:var(--viz-2)}.viz-line{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.viz-line-1{stroke:var(--viz-1)}.viz-dot{stroke:var(--viz-surface);stroke-width:2}.viz-dot.viz-line-1,.viz-dot-new{fill:var(--viz-1);stroke:var(--viz-surface)}.viz-legend{display:flex;flex-wrap:wrap;gap:4px 16px;font-size:.85rem;color:var(--muted)}.viz-legend span{display:inline-flex;align-items:center;gap:6px}.viz-key{display:inline-block}.viz-key-bar{width:10px;height:10px;border-radius:2px 2px 0 0;background:var(--viz-2)}.viz-key-dot{width:10px;height:10px;border-radius:50%;background:var(--viz-1)}.viz-readout{min-height:1.4em;font-size:.9rem;color:var(--muted)}.viz-table summary{font-size:.85rem;color:var(--muted)}.viz-table-scroll{max-height:240px;overflow:auto}.viz-table table{width:100%;border-collapse:collapse;font-size:.85rem;font-variant-numeric:tabular-nums}.viz-table th,.viz-table td{text-align:left;padding:4px 8px 4px 0;font-weight:400}.viz-table thead th{color:var(--muted)}#root:has(.timeline){display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}#root:has(.timeline)>.app{flex:1;display:flex;flex-direction:column}#root:has(.timeline)>.app>.content{flex:1;display:flex;flex-direction:column}#root:has(.timeline)>.app>.content>h1{flex:none}.timeline{display:flex;flex-direction:column;gap:6px;flex:1}.timeline p{margin:0}.timeline-controls{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;flex:none}.timeline-panes{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:1fr;gap:8px;flex:1}.timeline-panes.compare{grid-template-columns:repeat(2,minmax(0,1fr))}.photo-pane{display:flex;flex-direction:column;gap:4px;min-width:0}.photo-date{font-weight:600;line-height:1.2;flex:none}.photo-pane>.card-note,.photo-steps{flex:none}.photo-area{flex:1;min-height:200px;display:flex;align-items:center;justify-content:center;container-type:size;border-radius:8px;overflow:hidden;background:var(--bar);touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.photo-frame{position:relative;height:100%;max-width:100%;aspect-ratio:3 / 4;overflow:hidden}@supports (width: 1cqw){.photo-frame{height:auto;width:min(100cqw,75cqh)}}.photo-layer{position:absolute;top:0;right:0;bottom:0;left:0}.photo-layer.aligned{inset:auto;left:0;top:0;transform-origin:0 0}.photo-img{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:100%;height:100%;object-fit:contain}.photo-layer.aligned .photo-img{object-fit:fill}.photo-markers{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none}.marker-dot{fill:none;stroke:#ffd60a}.marker-area{fill:#ffd60a1f;stroke:#ffd60a;stroke-dasharray:6 4}.marker-count{fill:#fff;stroke:#000;paint-order:stroke;font-weight:700}.photo-note{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px;text-align:center;color:var(--muted)}.photo-note button,.photo-steps button{min-height:44px;min-width:44px;padding:0 10px;border:1px solid var(--border);border-radius:8px;background:var(--bar);color:var(--fg);font:inherit;font-size:.9rem;cursor:pointer}.photo-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.photo-steps button:disabled{opacity:.4;cursor:default}.breakout{display:flex;flex-direction:column;gap:12px}.breakout h2{margin:0;font-size:1.1rem}.breakout button,.breakout .primary{min-height:44px;min-width:44px;padding:0 12px;font:inherit;color:var(--fg);background:var(--bar);border:1px solid var(--border);border-radius:8px;cursor:pointer}.breakout button.primary{background:var(--accent);color:var(--bg);border:0;font-weight:600}.breakout button:disabled{opacity:.5}.breakout button[aria-pressed=true]{background:var(--accent);color:var(--bg);border-color:var(--accent)}.breakout .chip-note{display:block;font-size:.75rem;opacity:.8}.flash-ok{min-height:44px;min-width:44px;padding:0 12px;font:inherit;color:var(--fg);background:var(--bar);border:1px solid var(--border);border-radius:8px;cursor:pointer}.chip-picker{border:0;padding:0;margin:0;min-width:0;display:flex;flex-direction:column;gap:8px}.chip-picker legend{padding:0;font-weight:600;margin-bottom:4px}.chip-picker .card-note{margin-bottom:4px}.chip-grid{display:flex;flex-wrap:wrap;gap:8px}.lookback{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.lookback-day{display:flex;flex-direction:column;gap:2px;border:1px solid var(--border);border-radius:8px;padding:8px 12px;font-size:.9rem;overflow-wrap:anywhere}.action-list{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:4px;overflow-wrap:anywhere}.shelf{display:flex;flex-direction:column;gap:12px}.shelf button,.shelf .primary{min-height:44px;min-width:44px;padding:0 12px;font:inherit;color:var(--fg);background:var(--bar);border:1px solid var(--border);border-radius:8px;cursor:pointer}.shelf button.primary{background:var(--accent);color:var(--bg);border:0;font-weight:600}.shelf button:disabled{opacity:.5}.shelf-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.shelf-grid>li{display:flex;min-width:0}.shelf .shelf-tile{width:100%;min-height:96px;padding:10px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px;text-align:left;overflow-wrap:anywhere}.shelf-name{font-size:1rem}.shelf-line{font-size:.85rem;color:var(--muted)}.shelf-notices{display:flex;flex-direction:column;gap:8px}.shelf-notices p,.product-page p{margin:0;overflow-wrap:anywhere}.product-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.product-title h2{margin:0;font-size:1.2rem;overflow-wrap:anywhere}.product-ingredients{color:var(--muted);font-size:.9rem}.shelf textarea{min-height:120px;padding:10px;font:inherit;font-size:16px;color:var(--fg);background:var(--bg);border:1px solid var(--border);border-radius:8px;resize:vertical}.shelf .field input{min-height:44px;padding:0 10px;font:inherit;font-size:16px;color:var(--fg);background:var(--bg);border:1px solid var(--border);border-radius:8px}.scanner{display:flex;flex-direction:column;gap:12px}.scanner-video{width:100%;aspect-ratio:4 / 3;object-fit:cover;background:#222;border-radius:8px}.label-photo{display:block;width:100%;height:auto;border:1px solid var(--border);border-radius:8px}.label-photo-part{display:flex;flex-direction:column;gap:8px}.file-button{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:44px;min-width:44px;padding:0 12px;font:inherit;color:var(--fg);background:var(--bar);border:0;box-shadow:inset 0 0 0 1px var(--border);border-radius:8px;cursor:pointer;text-align:center}.file-button:focus-within{outline:2px solid var(--accent);outline-offset:2px}.file-button.disabled{opacity:.5;cursor:default}.file-button input{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;font-size:16px}.product-check,.product-check-card{display:flex;flex-direction:column;gap:6px}.product-check h3,.product-check-card h3{margin:0;font-size:1rem;overflow-wrap:anywhere}.product-check-card p,.product-check-card li,.product-check-card a{margin:0;overflow-wrap:anywhere}.product-check-card .plain-list{gap:4px}.supp-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.supp-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.checkin .link-button{background:none;border:0;color:var(--accent);text-decoration:underline;align-self:flex-start;min-height:44px}.ai-group,.ai-actions,.cost-confirm{display:flex;flex-direction:column;gap:8px}.ai-group h3,.ai-group h4,.insight-card h4{margin:0;font-size:1rem}.ai-cards,.ai-questions,.ai-question,.ai-preference{display:flex;flex-direction:column;gap:8px}.ai-question-text{margin:0}.ai-answer-row{display:flex;gap:8px}.ai-answer-row input{flex:1;min-width:0;min-height:44px;padding:0 10px;font:inherit;font-size:16px;color:var(--fg);background:var(--bg);border:1px solid var(--border);border-radius:8px}.insight-card{border:1px solid var(--border);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:6px}.insight-card p{margin:0}.cost-confirm{border:1px solid var(--border);border-radius:12px;padding:12px}.cost-confirm p{margin:0}.ai-insights button,.cost-confirm button,.ai-settings>button{min-height:44px;min-width:44px;padding:0 12px;font:inherit;color:var(--fg);background:var(--bar);border:1px solid var(--border);border-radius:8px;cursor:pointer}.ai-insights button.primary,.cost-confirm button.primary{background:var(--accent);color:var(--bg);border:0;font-weight:600}.ai-insights button:disabled,.cost-confirm button:disabled{opacity:.5;cursor:default}.ai-insights button[aria-pressed=true]{background:var(--accent);color:var(--bg);border-color:var(--accent)}.choice-row{display:flex;align-items:center;gap:8px;min-height:44px}.choice-row input{width:22px;height:22px;flex:none;margin:0}
