:root{--bg:#f6f5f2;--surface:#fff;--surface-2:#efeee9;--hover:#faf9f6;--border:#e4e2db;--border-strong:#cfccc3;--ink:#1d1c1a;--ink-2:#5c5a54;--ink-3:#86837b;--primary:#1f6f5c;--on-primary:#fff;--focus:#4b5d8a;--scrim:#1d1c1a52;--shadow:0 1px 2px #1d1c1a0d;--sheet-shadow:0 -8px 32px #1d1c1a24;--toast-bg:#1d1c1a;--toast-ink:#f6f5f2;--toast-action:#8fd6bf;--dose:#1f6f5c;--dose-tint:#e2eee9;--dose-line:#9cc7b9;--caffeine:#8a5a1f;--caffeine-tint:#f3eadc;--alcohol:#7a3b6b;--alcohol-tint:#f1e4ee;--bp:#b3412e;--bp-tint:#f6e3df;--other:#4b5d8a;--other-tint:#e5e8f1;--other-line:#b3bdd8;--chart-daily:#2a78d6;--chart-avg:#1baf7a;--chart-compare:#eb6834;--heat:#d03b3b;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root{--bg:#151514;--surface:#1f1f1d;--surface-2:#292926;--hover:#252523;--border:#2f2e2b;--border-strong:#45433f;--ink:#edebe6;--ink-2:#aaa79f;--ink-3:#817e77;--primary:#5fbfa2;--on-primary:#0e201a;--focus:#93a6d9;--scrim:#0000008f;--shadow:none;--sheet-shadow:0 -8px 32px #00000080;--toast-bg:#edebe6;--toast-ink:#151514;--toast-action:#1f6f5c;--dose:#5fbfa2;--dose-tint:#1a2f28;--dose-line:#2f6b59;--caffeine:#d9a35b;--caffeine-tint:#30261a;--alcohol:#d18bc0;--alcohol-tint:#31212d;--bp:#e0715d;--bp-tint:#37211c;--other:#93a6d9;--other-tint:#222838;--other-line:#3d4968;--chart-daily:#3987e5;--chart-avg:#199e70;--chart-compare:#d95926;--heat:#e5534b;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}.t-dose{--k:var(--dose);--k-tint:var(--dose-tint);--k-line:var(--dose-line)}.t-caffeine{--k:var(--caffeine);--k-tint:var(--caffeine-tint)}.t-alcohol{--k:var(--alcohol);--k-tint:var(--alcohol-tint)}.t-bp{--k:var(--bp);--k-tint:var(--bp-tint)}.t-other{--k:var(--other);--k-tint:var(--other-tint);--k-line:var(--other-line)}*{box-sizing:border-box}body{background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;margin:0;font:16px/1.4 -apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif}button{font:inherit;color:inherit;cursor:pointer}:focus-visible{outline:2px solid var(--focus);outline-offset:2px}h1{letter-spacing:-.01em;margin:0;font-size:24px;font-weight:700}h2{text-transform:uppercase;letter-spacing:.06em;color:var(--ink-2);align-items:center;gap:8px;margin:0 0 10px;padding:0 2px;font-size:13px;font-weight:700;display:flex}h2:before,.dot{content:"";background:var(--k,var(--ink-3));border-radius:50%;flex:none;width:8px;height:8px}.app{flex-direction:column;min-height:100dvh;display:flex}.rail{display:contents}.summary{order:0}.log{flex-direction:column;order:1;gap:28px;padding:20px 16px 28px;display:flex}.today{padding:0 16px calc(env(safe-area-inset-bottom) + 96px);scroll-margin-top:calc(env(safe-area-inset-top) + 96px);order:2}.title{flex-wrap:wrap;align-items:center;gap:4px 12px;display:flex}.title h1{align-items:center;gap:10px;display:flex}.day-nav{color:var(--ink-2);align-items:center;gap:2px;font-size:15px;display:flex}.day-nav span{font-variant-numeric:tabular-nums}.day-nav button{min-width:44px;height:44px;color:var(--ink-2);background:0 0;border:0;border-radius:22px;justify-content:center;align-items:center;display:flex}.day-nav button:disabled{opacity:.3;cursor:default}.day-nav .prev .chevron{transform:rotate(90deg)}.day-nav .next .chevron{transform:rotate(-90deg)}.day-nav .back-to-today{color:var(--primary);padding:0 12px;font-weight:600}@media (hover:hover){.day-nav button:not(:disabled):hover{background:var(--surface-2)}}@media (width>=1024px){.app{grid-template-columns:minmax(0,1fr) 440px;align-items:start;display:grid}.rail{border-left:1px solid var(--border);flex-direction:column;order:2;height:100dvh;display:flex;position:sticky;top:0;overflow-y:auto}.rail>.summary{border-bottom:0;padding:28px 28px 20px;position:static}.log{padding:28px 40px 64px}.today{padding:0 28px 28px}.stat{cursor:default}}.summary{z-index:1;padding:calc(env(safe-area-inset-top) + 8px) 16px 10px;background:var(--bg);border-bottom:1px solid var(--border);grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;display:grid;position:sticky;top:0}.stat{text-align:left;background:var(--surface);border:1px solid var(--border);min-width:0;min-height:44px;box-shadow:var(--shadow);border-radius:12px;flex-direction:column;align-items:flex-start;gap:2px;padding:10px 12px;display:flex}.stat small{max-width:100%;color:var(--ink-3);font-variant-numeric:tabular-nums;white-space:nowrap;text-overflow:ellipsis;font-size:12px;overflow:hidden}.stat .stat-label{color:var(--ink-2);align-items:center;gap:6px;font-weight:600;display:flex}.stat .stat-label:before{content:"";background:var(--k);border-radius:50%;width:6px;height:6px}.stat strong{letter-spacing:-.01em;font-variant-numeric:tabular-nums;white-space:nowrap;font-size:20px;font-weight:700;line-height:1.2}.wearable{order:2;padding:0 16px 28px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.metrics.small{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:8px}.metrics.small strong{font-size:17px}.google-score input{border:0;border-bottom:1px dashed var(--border-strong);background:0 0;border-radius:0;height:24px;min-height:0;padding:0;font-size:17px;font-weight:700}.google-score input:focus{border-bottom:1px solid var(--focus);outline:none}.sync{height:32px;color:var(--primary);background:0 0;border:0;padding:0 4px;font-size:13px;font-weight:600}.sync:disabled{color:var(--ink-3);cursor:default}.sleep-line,.empty-card{color:var(--ink-3);font-variant-numeric:tabular-nums;margin:8px 2px 0;font-size:13px}@media (width>=1024px){.wearable{padding:0 28px 24px}}.grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;display:grid}@media (width>=1024px){.grid{grid-template-columns:repeat(auto-fill,minmax(176px,1fr))}}.subhead{color:var(--ink-3);grid-column:1/-1;margin:10px 2px 0;font-size:13px;font-weight:600}.subhead:first-child{margin-top:0}.tile{text-align:left;background:var(--surface);border:1px solid var(--border);min-width:0;min-height:60px;box-shadow:var(--shadow);border-radius:12px;flex-direction:column;justify-content:center;gap:2px;padding:10px 12px;transition:background-color .15s,border-color .15s,transform 90ms;display:flex;position:relative}.tile:active{transform:scale(.98)}.tile .label{align-items:center;gap:6px;font-size:15px;font-weight:600;line-height:1.25;display:flex}.tile small{color:var(--ink-3);font-variant-numeric:tabular-nums;white-space:nowrap;text-overflow:ellipsis;font-size:13px;line-height:1.3;overflow:hidden}.tile.done{background:var(--k-tint);border-color:var(--k-line,var(--k))}.tile.done small{color:var(--k)}.check,.chevron,.close svg,.toast svg{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;flex:none}.check{stroke:var(--k);stroke-width:2.2px}.count{background:var(--k-tint);min-width:22px;height:22px;color:var(--k);font-variant-numeric:tabular-nums;border-radius:11px;justify-content:center;align-items:center;padding:0 7px;font-size:12px;font-weight:700;display:inline-flex}.tile .count{position:absolute;top:8px;right:8px}.tile:has(.count) .label{padding-right:30px}@media (hover:hover){.tile:hover{border-color:var(--border-strong)}.tile.done:hover{border-color:var(--k)}.entry:hover{background:var(--hover)}}.today-head{justify-content:space-between;align-items:baseline;gap:12px;display:flex}.today-head span{color:var(--ink-3);font-variant-numeric:tabular-nums;font-size:13px}.timeline{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:12px;overflow:hidden}.timeline>:not(:first-child){border-top:1px solid var(--border)}.empty{color:var(--ink-3);margin:0;padding:20px 16px}.entry{text-align:left;background:0 0;border:0;grid-template-columns:82px 10px minmax(0,1fr) auto;align-items:center;column-gap:10px;width:100%;min-height:52px;padding:8px 14px;display:grid}.entry time{color:var(--ink-2);font-variant-numeric:tabular-nums;white-space:nowrap;font-size:14px}.entry .what{flex-direction:column;gap:1px;min-width:0;display:flex}.entry .label{overflow-wrap:anywhere;align-items:center;gap:6px;font-size:15px;font-weight:500;display:flex}.entry small{color:var(--ink-3);white-space:nowrap;text-overflow:ellipsis;font-size:13px;overflow:hidden}.entry .amount{color:var(--ink-2);font-variant-numeric:tabular-nums;white-space:nowrap;align-items:center;font-size:14px;display:flex}.entry .count{min-width:20px;height:20px;padding:0 6px}.chevron{color:var(--ink-3);transition:transform .2s}[aria-expanded=true] .chevron{transform:rotate(180deg)}.entry.child{min-height:44px;padding-block:4px}.entry.child .label{color:var(--ink-2);font-size:14px;font-weight:400}.entry.child .dot{border:1.5px solid var(--k);background:0 0;justify-self:center;width:6px;height:6px}.group>.entry.child:last-child{margin-bottom:6px}.toast{z-index:2;top:calc(env(safe-area-inset-top) + 8px);background:var(--toast-bg);min-height:52px;color:var(--toast-ink);border-radius:14px;align-items:center;gap:2px;padding:4px 4px 4px 16px;animation:.22s ease-out toast-in;display:flex;position:fixed;left:12px;right:12px;box-shadow:0 8px 24px #0003}.toast span{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:15px;font-weight:500;overflow:hidden}.toast button{min-width:44px;height:44px;color:var(--toast-ink);background:0 0;border:0;border-radius:10px;justify-content:center;align-items:center;padding:0 14px;display:flex}.toast .undo{color:var(--toast-action);font-weight:700}@media (width>=1024px){.toast{width:420px;top:20px;left:auto;right:468px}}.error{background:var(--bp);color:var(--bg);overflow-wrap:anywhere;border-radius:12px;margin:0;padding:10px 12px}.backdrop{z-index:3;background:var(--scrim);justify-content:center;align-items:flex-end;animation:.2s ease-out fade;display:flex;position:fixed;inset:0}.sheet{width:100%;max-height:90%;padding:8px 16px calc(env(safe-area-inset-bottom) + 16px);background:var(--surface);box-shadow:var(--sheet-shadow);border-radius:20px 20px 0 0;flex-direction:column;gap:16px;animation:.32s cubic-bezier(.2,.8,.2,1) sheet-up;display:flex;overflow-y:auto}.grabber{background:var(--border-strong);border-radius:3px;align-self:center;width:36px;height:5px}.sheet-head{align-items:center;gap:10px;min-height:44px;display:flex}.sheet-head .dot{width:10px;height:10px}.sheet-head h2{text-transform:none;letter-spacing:0;color:var(--ink);flex:1;margin:0;padding:0;font-size:17px}.sheet-head h2:before{content:none}.close{width:44px;height:44px;color:var(--ink-2);background:0 0;border:0;border-radius:22px;justify-content:center;align-items:center;margin-right:-10px;display:flex}@media (width>=1024px){.backdrop{align-items:center}.sheet{border-radius:16px;width:460px;padding-bottom:20px;animation:.2s ease-out dialog-in}.grabber{display:none}}label{min-width:0;color:var(--ink-2);flex-direction:column;gap:6px;font-size:13px;font-weight:600;display:flex}input,textarea{width:100%;min-height:48px;font:inherit;color:var(--ink);background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:10px 12px;font-size:17px;font-weight:400}textarea{resize:vertical;line-height:1.4}.fields{gap:12px;display:flex}.fields label{flex:1}.fields label:has([type=datetime-local]){flex:2}.fields.bp input{text-align:center;font-variant-numeric:tabular-nums;height:56px;font-size:22px;font-weight:600}.actions{gap:8px;display:flex}.primary,.danger{border-radius:12px;height:50px;padding:0 20px;font-size:16px;font-weight:600}.actions .primary{flex:1}.primary{background:var(--primary);color:var(--on-primary);border:0}.danger{color:var(--bp);border:1px solid var(--border-strong);background:0 0}.gate{min-height:100dvh;padding:calc(env(safe-area-inset-top) + 24px) 24px calc(env(safe-area-inset-bottom) + 24px);justify-content:center;align-items:center;display:flex}.gate form{flex-direction:column;gap:20px;width:100%;max-width:400px;display:flex}.gate h1{font-size:28px}.gate p{color:var(--ink-2);margin:6px 0 0;font-size:15px;line-height:1.45}.gate input{background:var(--surface);border-color:var(--border-strong);border-radius:12px;height:52px;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:16px}@keyframes sheet-up{0%{transform:translateY(100%)}}@keyframes dialog-in{0%{opacity:0;transform:translateY(8px)scale(.98)}}@keyframes fade{0%{opacity:0}}@keyframes toast-in{0%{opacity:0;transform:translateY(-12px)}}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}.views,.ranges{background:var(--surface-2);border-radius:10px;gap:2px;padding:3px;display:inline-flex}.views button,.ranges button{min-height:36px;color:var(--ink-2);background:0 0;border:0;border-radius:8px;padding:0 14px;font-size:14px;font-weight:600}.views button[aria-pressed=true],.ranges button[aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}@media (width>=1024px){.app.trends-view{grid-template-columns:minmax(0,1fr)}}.trends{flex-direction:column;align-items:flex-start;gap:16px;display:flex}.chart-groups{flex-direction:column;align-self:stretch;gap:24px;transition:opacity .15s;display:flex}.chart-groups.loading{opacity:.5}.charts{grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px;display:grid}.chart-card{background:var(--surface);border:1px solid var(--border);min-width:0;box-shadow:var(--shadow);border-radius:12px;flex-direction:column;padding:14px 14px 8px;display:flex}.chart-head{justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:8px;display:flex}.chart-head>div:first-child{flex-direction:column;gap:2px;display:flex}.chart-head h3{color:var(--ink-2);margin:0;font-size:13px;font-weight:600}.chart-head strong{letter-spacing:-.01em;font-size:22px;font-weight:700}.chart-head small,.legend{color:var(--ink-3);font-size:12px}.legend{white-space:nowrap;flex-wrap:wrap;justify-content:flex-end;gap:4px 12px;display:flex}.legend>span{align-items:center;gap:6px;display:flex}.key-line{background:var(--chart-daily);border-radius:1px;flex:none;width:14px;height:2px;display:inline-block}.key-line.avg{background:var(--chart-avg)}.key-line.compare{background:var(--chart-compare)}.trend-filters{flex-wrap:wrap;align-items:center;gap:12px 20px;display:flex}.avg-toggle{color:var(--ink-2);cursor:pointer;flex-direction:row;align-items:center;gap:8px;font-size:14px}.avg-toggle input{width:18px;height:18px;min-height:0;accent-color:var(--chart-avg);margin:0;padding:0}.plot{margin-top:auto;position:relative}.plot svg{display:block;overflow:visible}.plot svg:focus-visible{outline-offset:4px}.plot .grid{stroke:var(--border);stroke-width:1px}.plot .tick{fill:var(--ink-3);font-variant-numeric:tabular-nums;font-size:11px}.plot .crosshair{stroke:var(--border-strong);stroke-width:1px}.plot .line{fill:none;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round}.plot .line.daily{stroke:var(--chart-daily)}.plot .line.avg{stroke:var(--chart-avg)}.plot .line.compare{stroke:var(--chart-compare)}.plot circle{stroke:var(--surface);stroke-width:2px}.plot circle.daily{fill:var(--chart-daily)}.plot circle.avg{fill:var(--chart-avg)}.plot circle.compare{fill:var(--chart-compare)}.tooltip{background:var(--surface);border:1px solid var(--border);color:var(--ink-2);white-space:nowrap;pointer-events:none;border-radius:8px;flex-direction:column;gap:2px;padding:6px 10px;font-size:12px;display:flex;position:absolute;top:0;transform:translate(-50%);box-shadow:0 4px 16px #0000001f}.tooltip>span{align-items:center;gap:6px;display:flex}.tooltip strong{color:var(--ink);font-size:13px}.tip-date{color:var(--ink-3)}.trend-table{align-self:stretch;font-size:13px}.trend-table summary{cursor:pointer;color:var(--ink-2);font-weight:600}.table-scroll{background:var(--surface);border:1px solid var(--border);border-radius:12px;margin-top:8px;overflow-x:auto}.trend-table table{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%}.trend-table th,.trend-table td{text-align:right;white-space:nowrap;border-top:1px solid var(--border);padding:6px 12px}.trend-table th{color:var(--ink-3);border-top:0;font-weight:600}.trend-table th:first-child,.trend-table td:first-child{text-align:left}.comparisons{align-self:stretch}.comparisons-note{max-width:70ch;color:var(--ink-3);margin:-2px 2px 12px;font-size:13px}.comparison-cards{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:12px;display:grid}.comparison{background:var(--surface);border:1px solid var(--border);min-width:0;box-shadow:var(--shadow);border-radius:12px;padding:14px}.comparison-head{justify-content:space-between;align-items:center;gap:8px;display:flex}.comparison h3{margin:0;font-size:15px}.comparison p{color:var(--ink-3);margin:4px 0 10px;font-size:12px}.comparison .badge{background:var(--surface-2);color:var(--ink-2);white-space:nowrap;border-radius:10px;padding:2px 8px;font-size:12px;font-weight:600}.comparison .table-scroll{border:0;border-radius:0;margin:0}.comparison table{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%;font-size:13px}.comparison th,.comparison td{text-align:right;white-space:nowrap;border-top:1px solid var(--border);padding:5px 8px}.comparison thead th{color:var(--ink-3);border-top:0;font-weight:600}.comparison tbody th{text-align:left;font-weight:600}.comparison.too-few td{color:var(--ink-3)}
