:root{--bg:#f5f7f4;--card:#fff;--border:#e3e8e0;--text:#1f2a20;--muted:#6b7668;--accent:#3f9e5d;--accent-soft:#e2f2e6;--danger:#d9534f;--radius:14px;--shadow:0 1px 3px #1f2a2012}*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg);color:var(--text);padding:24px 16px 64px;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;line-height:1.5}h1,h2,h3{margin:0;font-weight:650}h1{font-size:1.35rem}h2{font-size:1.1rem}h3{margin-bottom:10px;font-size:.95rem}.subtitle{color:var(--muted);margin:2px 0 0;font-size:.9rem}.app-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;max-width:980px;margin:0 auto 20px;display:flex}.header-actions{gap:8px;display:flex}.app-grid{grid-template-columns:1fr 1fr;align-items:start;gap:20px;max-width:980px;margin:0 auto;display:grid}.app-grid.is-loading{opacity:.6}.streaks-col{flex-direction:column;gap:20px;display:flex}.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px}.panel-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.date-input{font:inherit;border:1px solid var(--border);background:var(--bg);color:var(--text);border-radius:8px;padding:5px 8px}.progress-bar{background:#eceeeb;border-radius:999px;height:8px;margin-top:16px;overflow:hidden}.progress-fill{background:var(--accent);border-radius:999px;height:100%;transition:width .25s}.progress-label{color:var(--muted);margin:6px 0 0;font-size:.85rem}.habit-list{flex-direction:column;gap:2px;margin:14px 0 0;padding:0;list-style:none;display:flex}.habit-row{border-radius:10px;justify-content:space-between;align-items:center;gap:8px;padding:8px 6px;display:flex}.habit-row:hover{background:var(--bg)}.habit-check{cursor:pointer;flex:1;align-items:center;gap:10px;min-width:0;display:flex}.habit-check input[type=checkbox]{width:18px;height:18px;accent-color:var(--accent);cursor:pointer;flex-shrink:0}.habit-check input:checked+.habit-name{color:var(--muted)}.habit-emoji{flex-shrink:0}.habit-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.icon-btn{color:var(--muted);cursor:pointer;opacity:0;background:0 0;border:none;border-radius:8px;padding:4px 8px;font-size:.9rem;transition:opacity .15s}.habit-row:hover .icon-btn,.workout-row:hover .icon-btn{opacity:1}.icon-btn.danger:hover{color:var(--danger);background:#fdeeee}.inline-form{flex-wrap:wrap;gap:8px;margin-top:16px;display:flex}.inline-form input,.inline-form select{font:inherit;border:1px solid var(--border);background:var(--bg);color:var(--text);border-radius:8px;min-width:0;padding:8px 10px}.inline-form input:first-of-type,.inline-form input.emoji-input{width:56px}.inline-form input:last-of-type{flex:1}.inline-form input.small-input{flex:none;width:70px}.inline-form button{font:inherit;background:var(--accent);color:#fff;cursor:pointer;border:none;border-radius:8px;padding:8px 14px;font-weight:600}.inline-form button:disabled{opacity:.5;cursor:default}.error-text{color:var(--danger);width:100%;margin:6px 0 0;font-size:.85rem}.empty{color:var(--muted);margin:8px 0;font-size:.9rem}.workout-section{border-top:1px solid var(--border);margin-top:24px;padding-top:18px}.workout-list{flex-direction:column;gap:2px;margin:0 0 4px;padding:0;list-style:none;display:flex}.workout-row{border-radius:10px;justify-content:space-between;align-items:center;gap:8px;padding:8px 6px;display:flex}.workout-row:hover{background:var(--bg)}.workout-info{flex-direction:column;min-width:0;display:flex}.workout-name{font-weight:600}.workout-meta{color:var(--muted);font-size:.85rem}.workout-notes{color:var(--muted);font-size:.8rem;font-style:italic}.streak-list{flex-direction:column;gap:14px;margin-top:16px;display:flex}.streak-card{border:1px solid var(--border);border-radius:12px;padding:12px}.streak-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px;display:flex}.streak-name{align-items:center;gap:6px;font-weight:600;display:flex}.streak-stats{color:var(--muted);gap:10px;font-size:.8rem;display:flex}.stat{white-space:nowrap}.highlight-strip{background:var(--accent-soft);border-radius:10px;margin-top:14px;padding:10px 12px;font-size:.95rem}.highlight-strip .flame{margin-right:2px}.heatmap{gap:6px;display:flex}.heatmap-days{color:var(--muted);flex-direction:column;gap:2px;width:8px;font-size:.65rem;line-height:1;display:flex}.heatmap-day-label{align-items:center;height:10px;display:flex}.heatmap-grid{gap:2px;padding-bottom:2px;display:flex;overflow-x:auto}.heatmap-column{flex-direction:column;gap:2px;display:flex}.cell{border-radius:2px;flex-shrink:0;width:10px;height:10px}.cell.done{background:var(--accent)}.cell.miss{background:#e8ebe6}.cell.future{background:#f3f5f1}.legend{color:var(--muted);align-items:center;gap:6px;margin-top:14px;font-size:.8rem;display:flex}.legend .cell{display:inline-block}.notice{max-width:980px;color:var(--danger);background:#fdeeee;border:1px solid #f3c6c4;border-radius:10px;margin:0 auto 16px;padding:10px 14px;font-size:.9rem}.fatal{text-align:center;max-width:560px;margin:40px auto}.fatal p{color:var(--muted);margin:10px 0 18px}.primary-btn,.ghost-btn{font:inherit;cursor:pointer;border-radius:8px;padding:8px 14px;font-weight:600}.primary-btn{background:var(--accent);color:#fff;border:none}.ghost-btn{color:var(--muted);border:1px solid var(--border);background:0 0}.ghost-btn:hover{background:var(--bg)}.auth-gate{justify-content:center;align-items:center;min-height:70vh;display:flex}.auth-card{text-align:center;width:100%;max-width:400px;padding:32px 28px}.auth-mark{margin-bottom:8px;font-size:2.4rem}.auth-card p{color:var(--muted);margin:12px 0 20px;font-size:.95rem}.auth-card code{background:var(--bg);border-radius:4px;padding:1px 5px;font-size:.85em}.auth-card form{flex-direction:column;gap:10px;display:flex}.auth-card input{font:inherit;border:1px solid var(--border);background:var(--bg);border-radius:8px;padding:10px 12px}.auth-card button{font:inherit;background:var(--accent);color:#fff;cursor:pointer;border:none;border-radius:8px;padding:10px 14px;font-weight:600}.auth-card button:disabled{opacity:.5;cursor:default}@media (width<=720px){.app-grid{grid-template-columns:1fr}}
