:root{--bg:#0c0f14;--surface:#151a23;--surface-2:#1c2330;--border:#28303f;--text:#e8ecf3;--text-muted:#98a2b3;--text-faint:#667085;--accent:#4f8cff;--accent-strong:#2f6fee;--accent-soft:#4f8cff24;--success:#34d399;--success-soft:#34d39924;--warning:#fbbf24;--danger:#f87171;--danger-soft:#f871711f;--chart-1:#4f8cff;--chart-2:#34d399;--chart-3:#fbbf24;--chart-4:#f472b6;--radius:12px;--radius-lg:16px;--nav-height:64px;--touch:48px;--shell-max:520px;--safe-bottom:env(safe-area-inset-bottom,0px);--safe-top:env(safe-area-inset-top,0px);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;overscroll-behavior-y:none;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:16px;line-height:1.45}h1,h2,h3,h4{margin:0;font-weight:700;line-height:1.2}h1{font-size:1.4rem}h2{font-size:1.15rem}h3{font-size:1rem}p{margin:0}a{color:var(--accent);text-decoration:none}.app-shell{max-width:var(--shell-max);flex-direction:column;min-height:100dvh;margin:0 auto;display:flex}.page{padding:calc(12px + var(--safe-top)) 16px calc(var(--nav-height) + var(--safe-bottom) + 24px);flex-direction:column;flex:1;gap:16px;display:flex}.page--no-nav{padding-bottom:24px}.page-header{justify-content:space-between;align-items:center;gap:12px;min-height:40px;display:flex}.page-header .sub{color:var(--text-muted);margin-top:2px;font-size:.85rem}.bottom-nav{width:100%;max-width:var(--shell-max);height:calc(var(--nav-height) + var(--safe-bottom));padding-bottom:var(--safe-bottom);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-top:1px solid var(--border);z-index:50;background:#11151df5;grid-auto-columns:1fr;grid-auto-flow:column;display:grid;position:fixed;bottom:0;left:50%;transform:translate(-50%)}.bottom-nav a{color:var(--text-faint);letter-spacing:.02em;-webkit-tap-highlight-color:transparent;flex-direction:column;justify-content:center;align-items:center;gap:2px;font-size:.66rem;font-weight:600;display:flex}.bottom-nav a.active{color:var(--accent)}.bottom-nav svg{width:24px;height:24px}.btn{min-height:var(--touch);border-radius:var(--radius);cursor:pointer;background:var(--surface-2);color:var(--text);-webkit-tap-highlight-color:transparent;border:1px solid #0000;justify-content:center;align-items:center;gap:8px;padding:0 18px;font-family:inherit;font-size:1rem;font-weight:600;text-decoration:none;transition:filter .12s,opacity .12s;display:inline-flex}.btn:active{filter:brightness(1.2)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn--primary{background:var(--accent-strong);color:#fff}.btn--success{background:var(--success);color:#06281c}.btn--danger{background:var(--danger-soft);color:var(--danger)}.btn--ghost{border-color:var(--border);background:0 0}.btn--quiet{color:var(--text-muted);background:0 0;min-height:40px;padding:0 10px}.btn--sm{border-radius:10px;min-height:38px;padding:0 12px;font-size:.875rem}.btn--block{width:100%}.btn--icon{min-width:var(--touch);padding:0}.field{flex-direction:column;gap:6px;display:flex}.field>label{color:var(--text-muted);font-size:.8rem;font-weight:600}.input,.select,.textarea{width:100%;min-height:var(--touch);border-radius:var(--radius);border:1px solid var(--border);background:var(--surface);color:var(--text);padding:10px 14px;font-family:inherit;font-size:1rem}.textarea{resize:vertical;min-height:80px}.input:focus-visible,.select:focus-visible,.textarea:focus-visible,.btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.input--error,.select--error,.textarea--error{border-color:var(--danger)}.field-error{color:var(--danger);font-size:.78rem}.field-hint{color:var(--text-faint);font-size:.78rem}.form-grid{grid-template-columns:1fr 1fr;gap:12px;display:grid}.form-grid .span-2{grid-column:span 2}.checkbox-row{min-height:var(--touch);align-items:center;gap:10px;font-size:.95rem;display:flex}.checkbox-row input[type=checkbox]{width:22px;height:22px;accent-color:var(--accent)}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);flex-direction:column;gap:12px;padding:16px;display:flex}.card--tappable{cursor:pointer}.card--tappable:active{background:var(--surface-2)}.card-title-row{justify-content:space-between;align-items:center;gap:8px;display:flex}.list{flex-direction:column;gap:10px;display:flex}.row{justify-content:space-between;align-items:center;gap:12px;display:flex}.stack{flex-direction:column;gap:12px;display:flex}.cluster{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.badge{letter-spacing:.03em;text-transform:uppercase;background:var(--surface-2);color:var(--text-muted);border-radius:999px;align-items:center;padding:3px 10px;font-size:.72rem;font-weight:700;display:inline-flex}.badge--accent{background:var(--accent-soft);color:var(--accent)}.badge--success{background:var(--success-soft);color:var(--success)}.badge--danger{background:var(--danger-soft);color:var(--danger)}.badge--warning{color:var(--warning);background:#fbbf2424}.muted{color:var(--text-muted)}.faint{color:var(--text-faint)}.small{font-size:.85rem}.tiny{font-size:.75rem}.strong{font-weight:700}.center{text-align:center}.divider{border:none;border-top:1px solid var(--border);margin:4px 0}.stat-grid{grid-template-columns:repeat(2,1fr);gap:10px;display:grid}.stat-grid--3{grid-template-columns:repeat(3,1fr)}.stat-grid--4{grid-template-columns:repeat(4,1fr)}.stat{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);flex-direction:column;gap:2px;padding:12px;display:flex}.stat .stat-value{font-size:1.15rem;font-weight:700}.stat .stat-label{color:var(--text-faint);text-transform:uppercase;letter-spacing:.04em;font-size:.7rem;font-weight:600}.progress-track{background:var(--surface-2);border-radius:999px;height:8px;overflow:hidden}.progress-fill{background:var(--accent);border-radius:999px;height:100%;transition:width .2s}.progress-fill--over{background:var(--warning)}.seg{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);grid-auto-columns:1fr;grid-auto-flow:column;gap:4px;padding:4px;display:grid}.seg button{min-height:40px;color:var(--text-muted);cursor:pointer;-webkit-tap-highlight-color:transparent;background:0 0;border:none;border-radius:9px;font-family:inherit;font-size:.85rem;font-weight:600}.seg button.active{background:var(--accent-soft);color:var(--accent)}.chip-row{scrollbar-width:none;gap:8px;padding-bottom:4px;display:flex;overflow-x:auto}.chip-row::-webkit-scrollbar{display:none}.chip{border:1px solid var(--border);background:var(--surface);min-height:38px;color:var(--text-muted);cursor:pointer;-webkit-tap-highlight-color:transparent;border-radius:999px;flex-shrink:0;padding:0 14px;font-family:inherit;font-size:.85rem;font-weight:600}.chip.active{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}.sheet-backdrop{z-index:90;background:#0009;animation:.15s fade-in;position:fixed;inset:0}.sheet{width:100%;max-width:var(--shell-max);background:var(--surface);border:1px solid var(--border);z-index:100;border-bottom:none;border-radius:20px 20px 0 0;flex-direction:column;max-height:88dvh;animation:.2s slide-up;display:flex;position:fixed;bottom:0;left:50%;transform:translate(-50%)}.sheet-handle{background:var(--border);border-radius:999px;flex-shrink:0;width:40px;height:4px;margin:10px auto 0}.sheet-header{flex-shrink:0;justify-content:space-between;align-items:center;padding:10px 16px 4px;display:flex}.sheet-body{padding:12px 16px calc(20px + var(--safe-bottom));flex-direction:column;gap:14px;display:flex;overflow-y:auto}@keyframes slide-up{0%{opacity:.6;transform:translate(-50%,24px)}to{opacity:1;transform:translate(-50%)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion:reduce){.sheet,.sheet-backdrop{animation:none}*{transition:none!important}}.sticky-bar{bottom:calc(var(--nav-height) + var(--safe-bottom));width:100%;max-width:var(--shell-max);background:linear-gradient(to top, var(--bg) 70%, transparent);z-index:40;gap:10px;padding:10px 16px;display:flex;position:fixed;left:50%;transform:translate(-50%)}.sticky-bar .btn{flex:1}.sticky-bar-spacer{height:72px}.spinner{border:3px solid var(--surface-2);border-top-color:var(--accent);border-radius:50%;width:28px;height:28px;margin:32px auto;animation:.7s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.empty-state{text-align:center;color:var(--text-muted);flex-direction:column;align-items:center;gap:10px;padding:40px 20px;display:flex}.error-banner{background:var(--danger-soft);color:var(--danger);border-radius:var(--radius);border:1px solid #f871714d;padding:12px 14px;font-size:.9rem}.offline-banner{top:calc(8px + var(--safe-top));z-index:200;background:var(--warning);color:#271c02;border-radius:999px;padding:6px 14px;font-size:.8rem;font-weight:700;position:fixed;left:50%;transform:translate(-50%);box-shadow:0 4px 16px #0006}.photo-grid{grid-template-columns:repeat(3,1fr);gap:8px;display:grid}.photo-grid img,.photo-thumb{aspect-ratio:3/4;object-fit:cover;border:1px solid var(--border);background:var(--surface-2);border-radius:10px;width:100%}.set-row{grid-template-columns:32px 1fr 1fr 1fr 44px;align-items:center;gap:8px;display:grid}.set-row--swim{grid-template-columns:32px 1.2fr 1fr 1fr 44px}.set-row .input{text-align:center;font-variant-numeric:tabular-nums;padding:10px 6px}.set-row .set-num{color:var(--text-faint);text-align:center;font-size:.85rem;font-weight:700}.set-grid-header{color:var(--text-faint);text-transform:uppercase;letter-spacing:.04em;text-align:center;grid-template-columns:32px 1fr 1fr 1fr 44px;gap:8px;font-size:.7rem;font-weight:700;display:grid}.set-grid-header--swim{grid-template-columns:32px 1.2fr 1fr 1fr 44px}.login-page{flex-direction:column;justify-content:center;gap:24px;max-width:420px;min-height:100dvh;margin:0 auto;padding:24px;display:flex}.brand{letter-spacing:-.02em;text-align:center;font-size:2rem;font-weight:800}.brand span{color:var(--accent)}.chart-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:16px 8px 8px 0}.chart-card .chart-title{padding:0 16px 8px;font-size:.95rem;font-weight:700}
