:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#ecf2f6;background:#101728}*{box-sizing:border-box}body{margin:0;background:linear-gradient(160deg,#202b49,#101728 40%);min-height:100dvh}button,input,select,textarea{font:inherit}button{cursor:pointer}.app{max-width:650px;margin:auto;padding:calc(env(safe-area-inset-top) + 24px) 20px calc(env(safe-area-inset-bottom) + 50px)}header{display:flex;align-items:start;justify-content:space-between}header small,.summary small,.metric small{font-size:11px;letter-spacing:.14em;color:#9aabc2;font-weight:700}h1{font-size:34px;margin:8px 0 3px;letter-spacing:-.04em}header p{margin:0;color:#b6c3d6;text-transform:capitalize}.icon-btn{border:0;background:#2b3650;border-radius:16px;color:#fff;font-size:22px;width:45px;height:45px}.status{margin:22px 0 16px;color:#8ef2c3;font-size:13px}.status.error{color:#ffb8a7}nav{display:flex;background:#253149;border-radius:17px;padding:4px;gap:4px;margin-bottom:22px}nav button{flex:1;border:0;background:transparent;color:#b9c7da;padding:11px;border-radius:13px;font-weight:700}nav button.selected{background:#ebf5ef;color:#18233b}.summary,.metric{background:#26344f;border:1px solid #354763;border-radius:24px;padding:22px;margin-bottom:18px}.summary h2{margin:5px 0 12px;font-size:23px}.summary strong{font-size:28px}.progress-bar{height:9px;border-radius:9px;background:#45536b;overflow:hidden;margin:16px 0}.progress-bar i{display:block;height:100%;background:#8ef2c3;border-radius:9px}.group{margin:26px 0}.group h2,.section-heading h2{font-size:19px;margin-bottom:12px}.habit-row{background:#1e2a42;border:1px solid #34415b;border-radius:18px;padding:14px;display:flex;gap:13px;align-items:center;margin:9px 0;flex-wrap:wrap}.check{width:38px;height:38px;border-radius:12px;border:2px solid #8194ab;background:transparent;color:#102030;font-weight:800;flex:none}.check.done{background:#8ef2c3;border-color:#8ef2c3}.habit-text{flex:1;min-width:150px}.habit-text strong{display:block;font-size:16px}.habit-text small{display:block;color:#9caec4;margin-top:3px}.edit,.order-controls button,.section-heading button{border:0;border-radius:11px;padding:9px 11px;background:#35445f;color:#e8f4f5}.order-controls{width:100%;display:flex;gap:7px;justify-content:flex-end}.archived{opacity:.55}.section-heading{display:flex;align-items:center;justify-content:space-between}.section-heading button,.primary{background:#8ef2c3!important;color:#142439!important;font-weight:700}.metric{display:flex;flex-direction:column;gap:7px}.metric strong{font-size:32px}.metric span{color:#bbc8d6}.streak{padding:13px;border-bottom:1px solid #3a4861}.empty{color:#b7c4d6;line-height:1.6}dialog{border:1px solid #42516c;border-radius:24px;background:#1c2940;color:#fff;width:min(94vw,500px);max-height:90dvh;overflow:auto;padding:23px}dialog::backdrop{background:#000a}dialog form{display:grid;gap:16px}dialog h2{margin:0}dialog p{margin:0;color:#b9c5d4}dialog label{display:grid;gap:6px;font-size:14px;color:#b9c7d8}dialog input,dialog textarea,dialog select{width:100%;background:#2c3a54;border:1px solid #4b5b73;border-radius:10px;color:#fff;padding:11px}dialog .checkbox{display:flex;align-items:center}dialog .checkbox input{width:auto}.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.actions{display:flex;justify-content:flex-end;gap:9px}.actions button,#signOut{border:0;border-radius:11px;background:#35445f;color:white;padding:11px 16px}#settingsError{color:#ffb8a7}
.summary>small{display:block;margin-top:9px}.start-morning{display:block;margin-top:13px;border:1px solid #8ef2c3;color:#8ef2c3;background:transparent;border-radius:10px;padding:9px 13px}
dialog fieldset{border:1px solid #4b5b73;border-radius:12px;padding:12px;display:grid;gap:8px}dialog legend{color:#b9c7d8;font-size:14px;padding:0 5px}

.habit-streak{display:inline-block;margin-top:7px;padding:5px 8px;border-radius:8px;background:#30405a;color:#ffcf7b;font-size:12px;font-weight:700}
.manage-group,.progress-group{margin:20px 0 25px}.manage-group h3,.progress-group h3{margin:0 0 10px;color:#dfeaf6;font-size:17px}
.manage-group .habit-row{align-items:flex-start}.manage-group .habit-text{min-width:130px}.manage-group .edit{margin-left:auto}
.archive-action,.archived-toggle,.archived-item button{border:0;border-radius:11px;padding:9px 12px;background:#35445f;color:#e8f4f5}
.archive-action{margin-left:auto}.archived-toggle{width:100%;margin:10px 0;text-align:center}.archived-list{display:grid;gap:8px}.archived-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;background:#1b263d;border:1px solid #34415b;border-radius:12px;color:#aebbd0}.archived-item span{overflow-wrap:anywhere}
.progress-title{margin:28px 0 18px;font-size:21px}.streak-card{display:grid;gap:12px;margin:10px 0;padding:16px;background:#1e2a42;border:1px solid #34415b;border-radius:18px}.streak-card>strong{font-size:16px}.streak-numbers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.streak-numbers>div{padding:10px 6px;border-radius:11px;background:#2b3953;text-align:center}.streak-numbers b,.streak-numbers small{display:block}.streak-numbers b{font-size:18px}.streak-numbers small{margin-top:4px;color:#aebdd2;font-size:10px}.reward-list{color:#ffd988;font-size:13px;line-height:1.5}.next-reward,.record-range{color:#aebdd2;line-height:1.4}
@media(max-width:390px){.streak-numbers b{font-size:15px}.manage-group .habit-text{min-width:110px}.manage-group .habit-row{gap:9px}}
#progressView{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#progressView[hidden]{display:none}
#progressView .metric{margin:0;padding:16px;min-height:120px}
#progressView .metric strong{font-size:24px;line-height:1.1}
#progressView .metric:nth-child(3){grid-column:1/-1;min-height:95px}
#progressView .progress-title,#progressView .progress-group{grid-column:1/-1}
#progressView .progress-title{margin:18px 0 0}
#progressView .progress-group{margin:5px 0 12px}
[hidden]{display:none!important}
.add-walk{display:block;width:100%;padding:12px 14px;margin:12px 0 18px;border:1px solid #8ef2c3;border-radius:12px;background:#233b49;color:#b9ffe2;font-weight:700}
.walk-actions{display:flex;flex-wrap:wrap;gap:8px;width:100%;padding-left:51px}
.walk-actions button{border:0;border-radius:10px;background:#35445f;color:#e8f4f5;padding:10px 12px;font-size:14px}
.habit-row .check:not(button){display:flex;align-items:center;justify-content:center;font-size:19px}
#walkHelpDialog{line-height:1.5}
#walkHelpDialog p{margin:14px 0}
.manage-help{color:#aebdd2;font-size:13px;line-height:1.45;margin:0 0 18px}
.manage-group .habit-row{display:grid;grid-template-columns:38px minmax(0,1fr) auto auto;align-items:start}
.manage-group .check{grid-column:1;grid-row:1}
.manage-group .habit-text{grid-column:2/-1;grid-row:1;min-width:0}
.manage-group .edit{grid-column:3;grid-row:2}
.manage-group .archive-action{grid-column:4;grid-row:2}
