:root{color-scheme:dark;--bg: #0b0f14;--bg-elev: #141a22;--bg-elev-2: #1b232d;--border: rgba(255, 255, 255, .08);--border-strong: rgba(255, 255, 255, .16);--text: #e6edf3;--text-muted: #8b98a5;--text-faint: #5c6873;--muted-series: #6b7280;--accent: #22d3ee;--danger: #f43f5e;--ok: #34d399;--warn: #fbbf24;--c-steps: #4ade80;--c-distance: #a3e635;--c-floors: #86efac;--c-workout: #2dd4bf;--c-sleep: #818cf8;--c-intake: #fbbf24;--c-burned: #fb923c;--c-heart: #fb7185;--c-weight: #2dd4bf;--c-hrv: #22d3ee;--c-spo2: #60a5fa;--c-protein: #f472b6;--c-carbs: #facc15;--c-fat: #f59e0b;--c-hydration: #38bdf8;--c-body: #5eead4;--radius: 16px;--radius-sm: 10px;--space-1: 4px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 24px;--space-6: 32px;--nav-h: 64px;--header-h: 56px;--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif}*,*:before,*:after{box-sizing:border-box}html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:15px;line-height:1.45;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}body,#root{min-height:100vh;min-height:100dvh}h1,h2,h3,p{margin:0}button,input,select,textarea{font:inherit;color:inherit}button{background:none;border:0;padding:0;cursor:pointer}a{color:var(--accent)}.num{font-variant-numeric:tabular-nums}.app{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}.app-top{position:sticky;top:0;z-index:20;border-bottom:1px solid var(--border)}.app-top:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;background:#0b0f14d9;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}.app-header{display:flex;align-items:center;gap:var(--space-4);height:var(--header-h);padding:0 var(--space-4);padding-top:env(safe-area-inset-top)}.brand{display:flex;align-items:baseline;gap:var(--space-2);min-width:0}.brand-name{font-size:18px;font-weight:700;letter-spacing:-.01em;background:linear-gradient(90deg,#22d3ee,#818cf8);-webkit-background-clip:text;background-clip:text;color:transparent}.brand-date{font-size:13px;color:var(--text-muted);white-space:nowrap}.header-spacer{flex:1}.header-actions{display:flex;align-items:center;gap:var(--space-2)}.backend-status{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--text-muted);padding:4px 8px;border-radius:999px;border:1px solid var(--border)}.backend-status:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--text-faint)}.backend-status[data-state=reachable]:before{background:var(--ok);box-shadow:0 0 8px var(--ok)}.backend-status[data-state=unreachable]:before{background:var(--danger)}.backend-status[data-state=checking]:before{background:var(--warn)}.lang-switch{display:inline-flex;padding:2px;border-radius:999px;border:1px solid var(--border);background:var(--bg-elev)}.lang-option{min-height:24px;padding:0 8px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.04em;color:var(--text-muted);transition:background-color .12s ease,color .12s ease}.lang-option[aria-pressed=true]{background:var(--bg-elev-2);color:var(--text);box-shadow:inset 0 0 0 1px var(--border-strong)}.login-card .lang-switch{align-self:flex-end}.app-main{flex:1;width:100%;max-width:1280px;margin:0 auto;padding:var(--space-4);padding-bottom:calc(var(--nav-h) + var(--space-5) + env(safe-area-inset-bottom))}.app-nav{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;justify-content:space-around;align-items:stretch;height:calc(var(--nav-h) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:#141a22f0;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid var(--border);overflow-x:auto;scrollbar-width:none}.app-nav::-webkit-scrollbar{display:none}.nav-item{flex:1 0 56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:56px;padding:var(--space-2) var(--space-1);color:var(--text-muted);font-size:11px;font-weight:500;border-radius:var(--radius-sm);transition:color .12s ease,background-color .12s ease}.nav-item svg{width:22px;height:22px}.nav-item[aria-pressed=true]{color:var(--text)}.nav-item[aria-pressed=true] svg{color:var(--accent);filter:drop-shadow(0 0 6px rgba(34,211,238,.5))}@media (min-width: 1000px){.app-top{display:flex;align-items:center;gap:var(--space-5);padding:0 var(--space-5)}.app-header{display:contents}.brand{order:1;height:var(--header-h);align-items:center}.app-nav{position:static;height:auto;padding:0;background:transparent;border:0;backdrop-filter:none;-webkit-backdrop-filter:none;justify-content:flex-start;gap:var(--space-1);flex:1;order:2}.header-spacer{display:none}.header-actions{order:3}.nav-item{flex:0 0 auto;flex-direction:row;gap:var(--space-2);font-size:14px;padding:6px 12px}.nav-item svg{width:18px;height:18px}.nav-item:hover{background:var(--bg-elev)}.nav-item[aria-pressed=true]{background:var(--bg-elev-2)}.app-main{padding:var(--space-5);padding-bottom:var(--space-6)}}.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);min-height:40px;padding:0 var(--space-4);border-radius:var(--radius-sm);border:1px solid var(--border-strong);background:var(--bg-elev);color:var(--text);font-weight:600;transition:background-color .12s ease,border-color .12s ease}.btn:hover{background:var(--bg-elev-2)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:var(--accent);border-color:transparent;color:#06202a}.btn-primary:hover{background:#67e8f9}.btn-ghost{border-color:transparent;background:transparent;color:var(--text-muted)}.btn-ghost:hover{color:var(--text);background:var(--bg-elev)}.btn-sm{min-height:32px;padding:0 var(--space-3);font-size:13px}.chips{display:inline-flex;gap:var(--space-1);padding:3px;border-radius:999px;background:var(--bg-elev);border:1px solid var(--border)}.chip{min-height:34px;padding:0 var(--space-4);border-radius:999px;color:var(--text-muted);font-weight:600;font-size:13px;transition:background-color .12s ease,color .12s ease}.chip[aria-pressed=true]{background:var(--bg-elev-2);color:var(--text);box-shadow:inset 0 0 0 1px var(--border-strong)}.grid{display:grid;gap:var(--space-3);grid-template-columns:1fr}@media (min-width: 600px){.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-4)}}@media (min-width: 1000px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1400px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.grid-wide{grid-template-columns:1fr}@media (min-width: 1000px){.grid-wide{grid-template-columns:repeat(2,minmax(0,1fr))}}.card{position:relative;background:var(--bg-elev);border:1px solid var(--border);border-radius:var(--radius);padding:var(--space-4);min-width:0;overflow:hidden}.card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-2);margin-bottom:var(--space-2)}.card-title{font-size:13px;font-weight:600;color:var(--text-muted);letter-spacing:.02em;text-transform:uppercase;display:flex;align-items:center;gap:var(--space-2)}.card-title:before{content:"";width:8px;height:8px;border-radius:50%;background:var(--metric-color, var(--accent));box-shadow:0 0 8px var(--metric-color, var(--accent))}.card-unit{font-size:12px;color:var(--text-faint)}.screen-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--space-3);margin-bottom:var(--space-4)}.screen-title{font-size:22px;font-weight:700;letter-spacing:-.01em}.screen-subtitle{font-size:13px;color:var(--text-muted)}.notice{padding:var(--space-3) var(--space-4);border-radius:var(--radius-sm);background:var(--bg-elev);border:1px solid var(--border);color:var(--text-muted);font-size:14px}.notice-error{border-color:#f43f5e66;color:#fda4af}.metric-card{display:flex;flex-direction:column;gap:var(--space-2);transition:border-color .12s ease,transform .12s ease}.metric-card:hover{border-color:var(--border-strong)}.metric-card:has(.metric-open:active){transform:scale(.99)}.metric-open{position:relative;z-index:1;display:flex;flex-direction:column;gap:var(--space-2);width:100%;text-align:left;color:inherit;border-radius:var(--radius-sm)}.metric-open:focus-visible{outline:2px solid var(--metric-color, var(--accent));outline-offset:4px}.metric-card:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;background:radial-gradient(120% 80% at 100% 0%,color-mix(in srgb,var(--metric-color) 14%,transparent),transparent 60%)}.metric-value-row{display:flex;align-items:baseline;gap:var(--space-2);flex-wrap:wrap}.metric-value{font-size:40px;font-weight:700;line-height:1;letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--text)}.metric-unit{font-size:15px;color:var(--text-muted);font-weight:500}.metric-empty{font-size:15px;color:var(--text-faint);padding:var(--space-2) 0}.metric-today{font-size:12px;color:var(--text-muted);margin-top:-4px;margin-bottom:var(--space-1);font-variant-numeric:tabular-nums}.metric-meta{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap;font-size:12px;color:var(--text-muted);min-height:20px}.badge{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;border:1px solid var(--border-strong);background:#ffffff0a;color:var(--text);font-size:12px;font-weight:600;white-space:nowrap}.badge-source:before{content:"";width:6px;height:6px;border-radius:50%;background:var(--metric-color, var(--accent))}.badge-muted{color:var(--text-muted);border-color:var(--border)}.badge-ok{color:var(--ok);border-color:#34d39966}.badge-warn{color:var(--warn);border-color:#fbbf2466}.badge-danger{color:#fda4af;border-color:#f43f5e66}.delta{font-variant-numeric:tabular-nums;font-weight:600}.delta-up{color:var(--ok)}.delta-down{color:var(--danger)}.delta-flat{color:var(--text-muted)}.sparkline{display:block;width:100%;height:48px;margin-top:var(--space-1)}.metric-footer{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);font-size:12px;color:var(--text-faint)}.why-toggle{color:var(--text-muted);font-size:12px;font-weight:600;padding:4px 8px;border-radius:999px;border:1px solid var(--border)}.why-toggle:hover,.why-toggle[aria-expanded=true]{color:var(--text);border-color:var(--border-strong)}.why-panel{position:relative;z-index:1;margin-top:var(--space-2);padding:var(--space-3);border-radius:var(--radius-sm);background:#00000040;border:1px solid var(--border);font-size:13px;display:flex;flex-direction:column;gap:var(--space-2)}.why-rule{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap}.why-sources{display:flex;flex-direction:column;gap:4px;list-style:none;margin:0;padding:0}.why-sources li{display:flex;justify-content:space-between;gap:var(--space-2);color:var(--text-muted)}.why-sources li.is-winner{color:var(--text);font-weight:600}.chart{position:relative;width:100%;min-width:0;-webkit-user-select:none;user-select:none;touch-action:pan-y}.chart svg{display:block;width:100%;height:auto;overflow:visible}.chart .axis-line{stroke:var(--border-strong);stroke-width:1}.chart .grid-line{stroke:var(--border);stroke-width:1}.chart .axis-label{fill:var(--text-faint);font-size:11px;font-variant-numeric:tabular-nums}.chart .series-line{fill:none;stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round}.chart .series-line.lose{stroke:var(--muted-series);stroke-width:1.5;stroke-dasharray:4 4}.chart .series-point.lose{fill:var(--muted-series)}.chart .series-area{stroke:none}.chart .guide{stroke:var(--text-faint);stroke-width:1;stroke-dasharray:2 3}.chart-tooltip{position:absolute;top:0;z-index:5;pointer-events:none;min-width:140px;padding:var(--space-2) var(--space-3);border-radius:var(--radius-sm);background:#0b0f14f5;border:1px solid var(--border-strong);box-shadow:0 8px 24px #00000080;font-size:12px}.chart-tooltip-date{color:var(--text-muted);margin-bottom:4px;font-weight:600}.chart-tooltip-row{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);font-variant-numeric:tabular-nums}.chart-tooltip-row .swatch{width:8px;height:8px;border-radius:50%;margin-right:6px;flex:none}.chart-legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin-top:var(--space-2);font-size:12px;color:var(--text-muted);list-style:none;padding:0}.chart-legend li{display:inline-flex;align-items:center;gap:6px}.chart-legend .swatch{width:10px;height:3px;border-radius:2px}.chart-legend li.lose .swatch{background:var(--muted-series);opacity:.8}.chart-legend li.lose{color:var(--text-faint)}.chart-empty{display:flex;align-items:center;justify-content:center;height:120px;color:var(--text-faint);font-size:14px;border:1px dashed var(--border);border-radius:var(--radius-sm)}.chart-card .metric-value{font-size:28px}.chart-card-head{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}.field{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--text-muted)}.input,.select{min-height:40px;padding:0 var(--space-3);border-radius:var(--radius-sm);border:1px solid var(--border-strong);background:var(--bg);color:var(--text);outline:none;width:100%}.input:focus,.select:focus{border-color:var(--accent);box-shadow:0 0 0 3px #22d3ee33}.switch{position:relative;display:inline-block;width:42px;height:24px;flex:none}.switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}.switch-track{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:999px;background:var(--bg-elev-2);border:1px solid var(--border-strong);transition:background-color .12s ease}.switch-track:after{content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:var(--text-muted);transition:transform .12s ease,background-color .12s ease}.switch input:checked+.switch-track{background:#34d39940;border-color:var(--ok)}.switch input:checked+.switch-track:after{transform:translate(18px);background:var(--ok)}.switch input:disabled+.switch-track{opacity:.4}.login-wrap{display:flex;align-items:center;justify-content:center;min-height:60vh;padding:var(--space-4)}.login-card{width:100%;max-width:380px;display:flex;flex-direction:column;gap:var(--space-4)}.login-title{font-size:20px;font-weight:700}.login-error{color:#fda4af;font-size:13px}.source-list{display:flex;flex-direction:column;gap:var(--space-3);list-style:none;padding:0;margin:0}.source-row{display:flex;flex-direction:column;gap:var(--space-3)}.source-main{display:flex;align-items:center;gap:var(--space-3)}.source-id{flex:1;min-width:0}.source-name{font-weight:700;font-size:16px}.source-pkg{font-size:12px;color:var(--text-faint);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.source-meta{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap;font-size:12px;color:var(--text-muted)}.trust-list{display:flex;flex-wrap:wrap;gap:var(--space-2);list-style:none;margin:0;padding:0}.trust-form{display:grid;gap:var(--space-2);grid-template-columns:1fr;align-items:end}@media (min-width: 600px){.trust-form{grid-template-columns:2fr 1fr 2fr auto}}.system-summary{display:flex;flex-wrap:wrap;gap:var(--space-2);align-items:center;font-size:13px;color:var(--text-muted)}.chat-form{display:flex;gap:var(--space-2);align-items:flex-end}.chat-form .field{flex:1}.chat-answer{display:flex;flex-direction:column;gap:var(--space-2);margin-top:var(--space-4)}.chat-answer-text{font-size:16px;line-height:1.5}.chat-answer-meta{font-size:12px;color:var(--text-muted)}.stack{display:flex;flex-direction:column;gap:var(--space-3)}.row{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap}.muted{color:var(--text-muted)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*{transition:none!important}}.activity-day-head{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-3);flex-wrap:wrap;margin-bottom:var(--space-3)}.activity-list{display:flex;flex-direction:column;gap:var(--space-3);list-style:none;padding:0;margin:0}.activity-row{display:grid;grid-template-columns:7.5rem 1fr;gap:var(--space-3);align-items:start}.activity-row-dup{opacity:.6}.activity-time{color:var(--text-muted);font-size:14px;padding-top:2px}.activity-main{display:flex;flex-direction:column;gap:4px;min-width:0}.activity-stats{font-size:13px}.activity-source{display:flex;flex-direction:column;gap:var(--space-2)}.activity-source-lines{display:flex;gap:var(--space-4);flex-wrap:wrap;font-size:13px}@media (max-width: 560px){.activity-row{grid-template-columns:1fr;gap:2px}}
