:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#14161c;--surface:#1e2129;--surface-2:#2a2e38;--border:#343947;--text:#f1eee8;--muted:#a3a6b1;--accent:#f2b33d;--accent-text:#1b1607;--link:#f2b33d;--ok:#4fbf8b;--due:#f2b33d;--late:#ef6b5b;--feed:#3c6fd8;--nappy:#2c9a8f;--activity:#8a5cd1;--danger:#ef6b5b;--viz-1:#3987e5;--viz-2:#d95926;--viz-grid:#2c2f38;--viz-night:#ffffff0a;--radius:18px;--tabbar-h:64px;-webkit-tap-highlight-color:transparent;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:16px;line-height:1.4}@media (prefers-color-scheme:light){:root:not([data-theme=dark]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#f6f3ee;--surface:#fff;--surface-2:#efebe4;--border:#ddd7cc;--text:#1d1f24;--muted:#5f636d;--accent:#e0a22e;--accent-text:#1b1607;--link:#8a5a00;--ok:#237a55;--due:#b07400;--late:#c33c2c;--danger:#c33c2c;--viz-1:#2a78d6;--viz-2:#eb6834;--viz-grid:#ebe7df;--viz-night:#1d1f240b}}:root[data-theme=light]{--viz-1:#2a78d6;--viz-2:#eb6834;--viz-grid:#ebe7df;--viz-night:#1d1f240b;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#f6f3ee;--surface:#fff;--surface-2:#efebe4;--border:#ddd7cc;--text:#1d1f24;--muted:#5f636d;--accent:#e0a22e;--accent-text:#1b1607;--link:#8a5a00;--ok:#237a55;--due:#b07400;--late:#c33c2c;--danger:#c33c2c}*{box-sizing:border-box}body{background:var(--bg);color:var(--text);min-height:100dvh;margin:0}body.sheet-open{overflow:hidden}h1,h2,p{margin:0}h1{font-size:1.6rem}h2{font-size:1rem;font-weight:600}a{color:var(--link)}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;border:1px solid var(--border);background:var(--surface-2);border-radius:12px;min-height:44px;padding:0 16px}button:disabled{opacity:.55;cursor:default}button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text);font-weight:600}button.danger{color:var(--danger);border-color:var(--danger);background:0 0}button.small{min-height:36px;padding:0 14px}:focus-visible{outline:3px solid var(--accent);outline-offset:2px}input,select,textarea{border:1px solid var(--border);background:var(--bg);border-radius:12px;width:100%;min-height:44px;padding:10px 12px}.visually-hidden{clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}.subtle,.hint,.optional{color:var(--muted)}.hint{font-size:.85rem}.error{color:var(--danger)}.screen{max-width:560px;padding:calc(env(safe-area-inset-top) + 20px) 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);flex-direction:column;gap:14px;margin:0 auto;display:flex}.screen-header{justify-content:space-between;align-items:baseline;gap:12px;padding:0 4px;display:flex}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px}.card>h2{margin-bottom:10px}.section-title{justify-content:space-between;align-items:baseline;margin-bottom:6px;display:flex}.splash{min-height:100dvh}.splash-error{text-align:center;padding:40px 16px}.since{text-align:center;border-width:2px;padding:22px 16px}.since-loading{min-height:150px}.since-label{color:var(--muted);font-size:.95rem}.since-value{font-variant-numeric:tabular-nums;margin:4px 0;font-size:clamp(3rem,16vw,4.5rem);font-weight:700;line-height:1.1}.since-detail{color:var(--muted)}.since-ok{border-color:var(--ok)}.since-ok .since-value{color:var(--ok)}.since-due{border-color:var(--due)}.since-due .since-value{color:var(--due)}.since-late{border-color:var(--late)}.since-late .since-value{color:var(--late)}.actions{grid-template-columns:repeat(3,1fr);gap:10px;display:grid}.action{border-radius:var(--radius);color:#fff;border:none;flex-direction:column;justify-content:center;align-items:center;gap:6px;min-height:96px;font-size:1.05rem;font-weight:600;display:flex}.action span{font-size:1.8rem}.action-feed{background:var(--feed)}.action-nappy{background:var(--nappy)}.action-activity{background:var(--activity)}.ongoing ul{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.ongoing li{align-items:center;gap:10px;display:flex}.ongoing-name{flex:1;font-weight:600}.ongoing-time{font-variant-numeric:tabular-nums;color:var(--muted)}.stats{text-align:center;grid-template-columns:repeat(4,1fr);gap:8px;margin:0;display:grid}.stats dt{color:var(--muted);font-size:.8rem}.stats dd{white-space:nowrap;font-variant-numeric:tabular-nums;margin:2px 0 0;font-size:1.5rem;font-weight:700}.stats small{color:var(--muted);font-size:.8rem;font-weight:400}.event-list{margin:0;padding:0;list-style:none}.event-list li+li{border-top:1px solid var(--border)}.event-row{text-align:left;background:0 0;border:none;border-radius:0;align-items:center;gap:12px;width:100%;min-height:56px;padding:10px 2px;display:flex}.event-row time{font-variant-numeric:tabular-nums;color:var(--muted);flex-shrink:0;width:3.2em}.event-icon{font-size:1.3rem}.event-text{flex-direction:column;flex:1;min-width:0;display:flex}.event-title{font-weight:600}.event-detail{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:.9rem;overflow:hidden}.badge{color:var(--muted);border:1px solid var(--border);border-radius:999px;padding:2px 8px;font-size:.75rem}.day-header{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 12px;margin-bottom:4px;display:flex}.day-totals{color:var(--muted);font-variant-numeric:tabular-nums;gap:12px;font-size:.9rem;display:flex}.load-more{align-self:center}.tabbar{background:var(--surface);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom);z-index:10;justify-content:space-around;display:flex;position:fixed;inset:auto 0 0}.tabbar a{height:var(--tabbar-h);color:var(--muted);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:2px;font-size:.8rem;text-decoration:none;display:flex}.tabbar a span{font-size:1.3rem}.tabbar a[aria-current=page]{color:var(--text);font-weight:600}.sheet-backdrop{z-index:20;background:#0000008c;justify-content:center;align-items:flex-end;animation:.12s ease-out fade;display:flex;position:fixed;inset:0}.sheet{background:var(--surface);width:100%;max-width:560px;max-height:90dvh;padding:16px 16px calc(20px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;flex-direction:column;gap:16px;animation:.16s ease-out rise;display:flex;overflow-y:auto}.sheet:focus{outline:none}@media (width>=640px){.sheet-backdrop{align-items:center}.sheet{border-radius:24px}}@keyframes fade{0%{opacity:0}}@keyframes rise{0%{transform:translateY(24px)}}@media (prefers-reduced-motion:reduce){.sheet,.sheet-backdrop{animation:none}}.sheet-header{justify-content:space-between;align-items:center;display:flex}.sheet-header h2{font-size:1.2rem}.icon-button{background:0 0;border:none;border-radius:50%;width:44px;padding:0;font-size:1.1rem}.chips{flex-wrap:wrap;gap:8px;display:flex}.chip{border-radius:999px;min-height:38px;padding:0 14px}.chip[aria-pressed=true]{background:var(--text);color:var(--bg);border-color:var(--text)}.preset-grid{grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:10px;display:grid}.preset{border-radius:var(--radius);font-variant-numeric:tabular-nums;background:var(--feed);color:#fff;border:none;min-height:80px;font-size:1.7rem;font-weight:700}.preset small{margin-left:2px;font-size:.9rem;font-weight:400}.preset[data-last]{outline:3px solid var(--accent);outline-offset:2px}.stepper{grid-template-columns:52px 1fr 52px;grid-template-areas:"minus value plus""log log log";align-items:center;gap:10px;display:grid}.stepper>:first-child{grid-area:minus;font-size:1.5rem}.stepper output{text-align:center;font-variant-numeric:tabular-nums;grid-area:value;font-size:1.3rem;font-weight:600}.stepper>:nth-child(3){grid-area:plus;font-size:1.5rem}.stepper>:nth-child(4){grid-area:log;min-height:52px}.option-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;display:grid}.option{border-radius:var(--radius);flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:84px;font-size:1.05rem;font-weight:600;display:flex}.option-icon{font-size:1.8rem}.form{flex-direction:column;gap:14px;display:flex}.form label{flex-direction:column;gap:6px;font-weight:500;display:flex}.form-actions{justify-content:space-between;gap:10px;display:flex}.form-actions .primary{flex:1}.toggle-row{border:none;gap:10px;margin:0;padding:0;display:flex}.toggle-row legend{margin-bottom:6px;padding:0;font-weight:500}.form .toggle{border:1px solid var(--border);border-radius:12px;flex-direction:row;flex:1;align-items:center;min-height:48px;padding:0 14px}.toggle input{width:22px;min-height:22px;margin:0}.login{max-width:380px;padding:calc(env(safe-area-inset-top) + 15vh) 16px 40px;flex-direction:column;align-items:center;gap:16px;margin:0 auto;display:flex}.login img{border-radius:18px}.login .form{width:100%}.toast-region{inset:auto 0 calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px) 0;pointer-events:none;z-index:30;justify-content:center;padding:0 16px;display:flex;position:fixed}.toast{pointer-events:auto;background:var(--text);width:100%;max-width:520px;color:var(--bg);border-radius:14px;align-items:center;gap:14px;padding:8px 8px 8px 16px;display:flex;box-shadow:0 8px 24px #0000004d}.toast span{flex:1}.toast button{color:var(--accent);background:0 0;border:none;font-weight:700}.toast-error{background:var(--danger);color:#fff}.toast-error button{color:#fff}.card>p+button{margin-top:12px}.live-badge{vertical-align:middle;color:var(--due);align-items:center;gap:6px;font-size:.8rem;font-weight:500;display:inline-flex}.live-dot{background:var(--due);border-radius:50%;width:9px;height:9px}.live-live .live-dot{background:var(--ok)}.device-list{margin:0 0 12px;padding:0;list-style:none}.device-list li{align-items:center;gap:12px;padding:10px 0;display:flex}.device-list li+li{border-top:1px solid var(--border)}.device-list li[data-revoked]{opacity:.6}.device-text{flex-direction:column;flex:1;display:flex}.device-name{font-weight:600}.device-seen{color:var(--muted);font-size:.9rem}.add-device{gap:10px;display:flex}.token-panel{border:1px solid var(--accent);border-radius:12px;flex-direction:column;gap:10px;padding:14px;display:flex}.token{word-break:break-all;-webkit-user-select:all;user-select:all;background:var(--bg);border-radius:8px;padding:10px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.85rem}.title-row{align-items:center;gap:10px;display:flex}.when-grid{grid-template-columns:repeat(3,1fr);gap:10px;display:grid}.when{border-radius:var(--radius);flex-direction:column;justify-content:center;align-items:center;gap:2px;min-height:72px;padding:0 6px;font-size:1rem;font-weight:600;display:flex}.when small{color:var(--muted);font-variant-numeric:tabular-nums;font-size:.85rem;font-weight:400}.when-now{background:var(--feed);border-color:var(--feed);color:#fff;grid-column:1/-1;min-height:84px;font-size:1.4rem}.when-now small{color:#fffc}.when-custom{flex-direction:column;gap:10px;display:flex}.when-custom label{flex-direction:column;gap:6px;font-weight:500;display:flex}.when-custom .primary{min-height:52px}.back{color:var(--muted);background:0 0;border:none;align-self:flex-start;padding:0 4px}input[type=datetime-local],input[type=date],input[type=time]{appearance:none;min-width:0;max-width:100%;display:block}input[type=datetime-local]::-webkit-date-and-time-value{text-align:left}.form label,.when-custom label,.when-custom{min-width:0}@media (width<=360px){.when:not(.when-now){white-space:nowrap;padding:0 4px;font-size:.9rem}}.range-toggle{background:var(--surface);border:1px solid var(--border);border-radius:14px;align-self:flex-start;gap:4px;padding:4px;display:inline-flex}.range-toggle button{min-height:36px;color:var(--muted);background:0 0;border:none;border-radius:10px;padding:0 14px}.range-toggle button[aria-pressed=true]{background:var(--surface-2);color:var(--text);font-weight:600}.stats-body{flex-direction:column;gap:14px;transition:opacity .15s;display:flex}.stats-body[data-refreshing]{opacity:.6}.stat-grid{grid-template-columns:1fr 1fr;gap:10px;display:grid}.stat-tile{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);flex-direction:column;gap:2px;min-width:0;padding:12px 14px;display:flex}.stat-label{color:var(--muted);font-size:.85rem}.stat-value{font-size:1.6rem;font-weight:600;line-height:1.2}.stat-sub,.stat-delta{color:var(--muted);font-size:.8rem}.viz-card h2{margin-bottom:2px}.viz-card .hint{margin-bottom:8px}.viz-legend{color:var(--muted);gap:14px;margin:0 0 6px;padding:0;font-size:.85rem;list-style:none;display:flex}.viz-legend li{align-items:center;gap:6px;display:inline-flex}.viz-swatch-rect{border-radius:3px;width:10px;height:10px}.viz-swatch-line{border-radius:1px;width:14px;height:2px}.viz-plot{touch-action:pan-y;width:100%;position:relative}.viz-plot svg{display:block;overflow:visible}.viz-grid{stroke:var(--viz-grid);stroke-width:1px}.viz-axis{stroke:var(--border);stroke-width:1px}.viz-tick{fill:var(--muted);font-variant-numeric:tabular-nums;font-size:11px}.viz-end-label{fill:var(--muted);font-size:11px}.viz-line{fill:none;stroke-width:2px;stroke-linejoin:round;stroke-linecap:round}.viz-dot{stroke:var(--surface);stroke-width:2px}.viz-crosshair{stroke:var(--muted);stroke-width:1px}.viz-night{fill:var(--viz-night)}.viz-col{outline:none}.viz-col[data-active] path,.viz-col:focus-visible path,.viz-col:hover circle.viz-dot,.viz-col:focus-visible circle.viz-dot{filter:brightness(1.18)}.viz-col:focus-visible rect{stroke:var(--accent);stroke-width:2px}.viz-tooltip{pointer-events:none;background:var(--surface-2);border:1px solid var(--border);z-index:2;border-radius:10px;min-width:140px;max-width:180px;padding:8px 10px;font-size:.8rem;position:absolute;transform:translateY(-100%);box-shadow:0 6px 18px #00000040}.viz-tooltip-below{transform:none}.viz-tooltip-title{color:var(--muted);margin-bottom:4px}.viz-tooltip-row{align-items:center;gap:6px;display:flex}.viz-tooltip-row strong{font-size:.95rem}.viz-tooltip-row span:last-child{color:var(--muted)}.viz-key{border-radius:1px;flex-shrink:0;width:12px;height:2px}.viz-table{margin-top:8px;font-size:.85rem}.viz-table summary{color:var(--muted);cursor:pointer;padding:4px 0}.viz-table table{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%;margin-top:6px}.viz-table th,.viz-table td{text-align:left;border-bottom:1px solid var(--border);padding:4px 6px;font-weight:400}.viz-table thead th{color:var(--muted)}.night-row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.night-label{width:100%;font-weight:500}.night-row label{flex:1}.tabbar a{min-width:0}
