:root{--tg-theme-bg-color:#fff;--tg-theme-text-color:#1a1a1a;--tg-theme-hint-color:#8b8b8b;--tg-theme-link-color:#2a6ee0;--tg-theme-button-color:#2a6ee0;--tg-theme-button-text-color:#fff;--tg-theme-secondary-bg-color:#f2f2f4;--tg-theme-section-bg-color:#fff;--tg-theme-destructive-text-color:#d43f3f}*{box-sizing:border-box}body{background:var(--tg-theme-bg-color);color:var(--tg-theme-text-color);margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}#root{flex-direction:column;max-width:480px;min-height:100vh;margin:0 auto;padding-bottom:4.5rem;display:flex}.screen{flex:1;padding:1rem}h1,h2,h3{margin:0 0 .5rem}.muted{color:var(--tg-theme-hint-color);font-size:.85rem}.card{background:var(--tg-theme-section-bg-color);border:1px solid var(--tg-theme-secondary-bg-color);border-radius:10px;margin-bottom:.75rem;padding:1rem}label{margin:.75rem 0 .25rem;font-size:.85rem;font-weight:600;display:block}input[type=text],input[type=time],select,textarea{border:1px solid var(--tg-theme-secondary-bg-color);background:var(--tg-theme-bg-color);width:100%;color:var(--tg-theme-text-color);border-radius:8px;padding:.55rem .6rem;font-size:1rem}button,.btn{background:var(--tg-theme-button-color);color:var(--tg-theme-button-text-color);cursor:pointer;text-align:center;border:none;border-radius:8px;padding:.6rem 1rem;font-size:.95rem;text-decoration:none;display:inline-block}button.secondary,.btn.secondary{background:var(--tg-theme-secondary-bg-color);color:var(--tg-theme-text-color)}button.destructive{background:var(--tg-theme-destructive-text-color)}button:disabled{opacity:.5;cursor:default}.weekday-picker{gap:.35rem;margin-top:.35rem;display:flex}.weekday-picker button{background:var(--tg-theme-secondary-bg-color);color:var(--tg-theme-text-color);flex:1;padding:.4rem 0;font-size:.75rem}.weekday-picker button.selected{background:var(--tg-theme-button-color);color:var(--tg-theme-button-text-color)}.habit-row{justify-content:space-between;align-items:center;display:flex}.habit-row .actions{gap:.5rem;display:flex}.habit-row .actions button{padding:.3rem .6rem;font-size:.8rem}.stat-grid{grid-template-columns:repeat(2,1fr);gap:.75rem;display:grid}.stat-grid .card{text-align:center;margin-bottom:0}.stat-grid .value{font-size:1.6rem;font-weight:700}.nav-bar{background:var(--tg-theme-section-bg-color);border-top:1px solid var(--tg-theme-secondary-bg-color);width:100%;max-width:480px;display:flex;position:fixed;bottom:0;left:50%;transform:translate(-50%)}.nav-bar a{text-align:center;color:var(--tg-theme-hint-color);flex:1;padding:.75rem 0;font-size:.8rem;text-decoration:none}.nav-bar a.active{color:var(--tg-theme-link-color);font-weight:600}.error-banner{color:#8a1c1c;background:#fbe4e4;border-radius:8px;margin-bottom:.75rem;padding:.6rem .8rem;font-size:.85rem}.day-grid{gap:3px;margin-top:.4rem;padding-bottom:2px;display:flex;overflow-x:auto}.day-grid .cell{background:var(--tg-theme-secondary-bg-color);border-radius:3px;flex:0 0 14px;height:14px}.day-grid .cell.done{background:#3fbf60}.day-grid .cell.failed{background:#e05a5a}.day-grid .cell.skipped{background:#d8b34a}.habit-grid-row{margin-bottom:.75rem}.habit-grid-row .label{font-size:.8rem;font-weight:600}
