/* A quieter overview, larger controls and room for each result to breathe. */
.habit-card{gap:18px;padding:18px;border-radius:28px;min-height:112px}
.habit-card>.icon-tile{width:70px;height:70px;min-width:70px;border-radius:23px}
.habit-card>.icon-tile svg{width:31px;height:31px}
.habit-card>.habit-body{padding:6px 0;text-align:left}
.habit-card>.habit-body h3{font-size:18px;line-height:1.4;font-weight:700}
.habit-card>.habit-body .habit-progress{margin-top:7px;font-size:13px;color:var(--muted);line-height:1.5}
.habit-card>.habit-action{width:50px;min-width:50px;min-height:50px;border-radius:17px}
.habit-card>.habit-action svg{width:27px;height:27px}
.habits-list{gap:15px}
.task-card{background:color-mix(in srgb,var(--list-color,var(--accent)) 7%,var(--surface));border-color:color-mix(in srgb,var(--list-color,var(--line)) 19%,transparent);border-radius:22px}
.task-card:hover{border-color:color-mix(in srgb,var(--list-color,var(--line)) 38%,transparent)}
.bottom-nav{width:490px;max-width:calc(100% - 28px);height:87px;padding:7px 9px;border-radius:26px}
.bottom-nav .nav-item{min-height:70px;gap:7px;border-radius:20px;font-size:11px}
.bottom-nav .nav-item svg{width:28px;height:28px;stroke-width:1.8}
.fab{bottom:132px;width:60px;height:60px;border-radius:50%}
.toast{bottom:202px}
#app{padding-bottom:165px}

.stats-grid.stats-v2,.sheet .stats-grid.stats-v2{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;margin:22px 0}
.stats-grid.stats-v2>.stat-card,.sheet .stats-grid.stats-v2>.stat-card{grid-column:1;padding:28px;border-radius:27px;min-width:0}
.stats-v2 .section-title,.sheet .stats-grid.stats-v2 .section-title{margin:0;align-items:flex-start;gap:14px}
.stats-v2 .section-title h3,.sheet .stats-grid.stats-v2 .section-title h3,.stats-v2>.stat-summary>h3{font-size:19px;line-height:1.35;font-weight:700;color:var(--text);max-width:none}
.stats-v2 .section-title .icon-btn,.sheet .stats-grid.stats-v2 .section-title .icon-btn{width:48px;height:48px;min-width:48px;margin:-8px -8px 0 0;border-radius:16px;color:var(--muted)}
.stat-caption{font-family:'DM Sans',sans-serif;font-size:12px;font-weight:400;line-height:1.65;color:var(--muted);margin-top:5px}
.stats-v2 .gauge,.sheet .stats-grid.stats-v2 .gauge{width:350px;max-width:100%;min-height:0;height:auto;aspect-ratio:240/146;position:relative;margin:32px auto 14px;display:block}
.stats-v2 .gauge>svg,.sheet .stats-grid.stats-v2 .gauge>svg{display:block;width:100%;height:auto;max-height:none}
.stats-v2 .gauge-value,.sheet .stats-grid.stats-v2 .gauge-value{top:52%;left:0;width:100%;transform:none;font-size:49px;line-height:1.1;letter-spacing:-2px;text-align:center;font-weight:800}
.stats-v2 .gauge-value small,.sheet .stats-grid.stats-v2 .gauge-value small{font-size:13px;font-weight:400;letter-spacing:0;line-height:1.5;max-width:none;margin:10px auto 0;color:var(--muted)}
.stat-footnote{font-size:12px;line-height:1.7;color:var(--muted);margin-top:20px}
.strength-card>.stat-footnote{text-align:center;margin-top:0}
.stats-v2 .success-wrap,.sheet .stats-grid.stats-v2 .success-wrap{display:flex;justify-content:center;align-items:center;margin:30px auto;gap:0;flex-wrap:nowrap}
.stats-v2 .ring,.sheet .stats-grid.stats-v2 .ring{width:247px;height:247px;flex-shrink:0;background:conic-gradient(var(--green) calc(var(--value,0)*1%),var(--surface-3) 0);box-shadow:0 0 0 7px var(--surface)}
.stats-v2 .ring::before,.sheet .stats-grid.stats-v2 .ring::before{inset:15px;background:var(--surface)}
.stats-v2 .ring>span,.sheet .stats-grid.stats-v2 .ring>span{font-size:49px;font-weight:800;line-height:1.1;letter-spacing:-2px}
.stats-v2 .ring>span>small,.sheet .stats-grid.stats-v2 .ring>span>small{font-size:13px;line-height:1.6;max-width:170px;color:var(--muted);letter-spacing:0;margin:10px auto 0;font-weight:400}
.success-statuses{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:24px}
.success-statuses>span{display:flex;align-items:flex-start;gap:8px;font-size:12px;line-height:1.6;color:var(--muted);padding:12px 13px;background:var(--surface-2);border-radius:14px;min-width:0}
.success-statuses .status-dot{width:9px;height:9px;min-width:9px;margin-top:5px}
.stat-explainer{margin-top:22px;border-top:1px solid var(--line);padding-top:10px;color:var(--muted)}
.stat-explainer>summary{position:relative;cursor:pointer;min-height:46px;display:flex;align-items:center;justify-content:space-between;gap:13px;list-style:none;font-size:12px;color:var(--muted);padding:10px 0}
.stat-explainer>summary::-webkit-details-marker{display:none}
.stat-explainer>summary::after{content:'';width:7px;height:7px;border-right:1.5px solid var(--line);border-bottom:1.5px solid var(--line);transform:rotate(45deg);margin-right:5px;transition:transform .15s}
.stat-explainer[open]>summary::after{transform:rotate(225deg)}
.stat-explainer>p,.stat-explainer .period-results p{font-size:12px;line-height:1.85;color:var(--muted);margin:8px 0 12px}
.stat-explainer .period-results{border-top:1px solid var(--line);padding-top:15px;margin-top:17px}
.stat-explainer .period-results h4{font-size:12px;font-weight:600;line-height:1.6;color:var(--text);margin:0 0 12px}
.stat-explainer .period-results p{padding:10px 0;border-bottom:1px solid var(--line)}
.stats-v2 .metrics-grid,.sheet .stats-grid.stats-v2 .metrics-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:26px 20px;margin-top:25px}
.stats-v2 .metric,.sheet .stats-grid.stats-v2 .metric{margin:0}
.stats-v2 .metric>strong,.sheet .stats-grid.stats-v2 .metric>strong{font-size:36px;line-height:1.15;font-weight:800}
.stats-v2 .metric>span,.sheet .stats-grid.stats-v2 .metric>span{font-size:12px;line-height:1.6;color:var(--muted);margin-top:7px}
.stats-v2 .time-totals{font-size:13px;line-height:1.8;padding-top:20px;margin-top:23px}
.stats-overview>.segmented{max-width:440px;margin:0 auto 24px}
.stats-calendar{padding:26px;margin-top:25px;border-radius:26px}
.stats-calendar>.section-title{margin:0 0 20px;align-items:center}
.stats-calendar>.section-title h3{font-size:17px;font-weight:700;line-height:1.4;color:var(--text);text-transform:capitalize}
.stats-calendar>.section-title>.stat-caption{font-size:11px;white-space:nowrap}
.stats-days-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.stats-weekday{text-align:center;font-size:11px;line-height:1.5;color:var(--muted);padding:0 0 8px}
.stats-day{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;min-width:0;min-height:79px;background:var(--surface-2);border:1px solid transparent;border-radius:17px;color:var(--text);transition:background .15s,border-color .15s}
.stats-day:hover{border-color:var(--line)}
.stats-day.selected{border-color:var(--accent-border);box-shadow:inset 0 0 0 1px var(--accent);background:var(--accent-soft)}
.stats-day-number{font:600 15px/1.2 'Manrope',sans-serif}
.stats-day-result{font-size:12px;line-height:1.2;font-weight:600;color:var(--muted)}
.stats-day.completed{background:var(--green-soft)}.stats-day.completed .stats-day-result{color:var(--green)}
.stats-day.partial{background:var(--yellow-soft)}.stats-day.partial .stats-day-result{color:var(--yellow)}
.stats-day.missed .stats-day-result{color:var(--danger)}.stats-day.skipped .stats-day-result{color:var(--faint)}
.stats-day.future{color:var(--muted);background:var(--surface-3)}
.stats-calendar-key{font-size:11px;line-height:1.7;color:var(--faint);margin:16px 0 0}
.stats-selected-day{border-top:1px solid var(--line);margin-top:21px;padding-top:19px}
.stats-selected-day>h4{font-size:13px;font-weight:600;margin:0 0 13px;text-transform:capitalize;color:var(--text)}
.stats-selected-day>p{font-size:12px;line-height:1.8;margin:4px 0}
.stats-entry{display:flex;align-items:center;width:100%;min-height:60px;gap:12px;padding:10px 0;text-align:left;border-top:1px solid var(--line)}
.stats-entry-icon{display:grid;place-items:center;width:39px;height:39px;min-width:39px;border-radius:13px;color:var(--readable-accent,var(--entry-color,var(--accent-ink)));background:color-mix(in srgb,var(--entry-color,var(--accent)) 11%,var(--surface))}
.stats-entry-title{font-size:13px;line-height:1.5;flex:1;min-width:0;color:var(--text);overflow-wrap:anywhere}
.stats-entry-status{font-size:11px;line-height:1.5;max-width:150px;color:var(--muted)}
.stats-entry-status.completed{color:var(--green)}.stats-entry-status.partial{color:var(--yellow)}.stats-entry-status.missed{color:var(--danger)}
.stats-entry>svg{color:var(--muted);flex-shrink:0}
.stats-tasks{margin:21px 0;padding:26px;border-radius:26px}
.stats-tasks>h3{font-size:18px;color:var(--text)}
.stats-tasks>.metric{margin:22px 0 0}
.stats-tasks .metric strong{font-size:37px}.stats-tasks .metric span{font-size:12px}

@media(min-width:900px){.stats-overview{max-width:820px;margin-inline:auto}.stats-grid.stats-v2,.sheet .stats-grid.stats-v2{grid-template-columns:minmax(0,1fr)}.stats-v2 .strength-card .gauge{width:390px}.stats-day{min-height:90px}.stats-v2 .stat-summary .metrics-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.sheet .stats-grid.stats-v2 .metrics-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){#app{padding-bottom:166px}.habit-card{gap:14px;padding:15px 13px;border-radius:27px;min-height:107px}.habit-card>.icon-tile{width:64px;height:68px;min-width:64px;border-radius:22px}.habit-card>.icon-tile svg{width:29px;height:29px}.habit-card>.habit-body h3{font-size:16px;line-height:1.4}.habit-card>.habit-body .habit-progress{font-size:12px;margin-top:6px}.habit-card>.habit-action{width:46px;min-width:46px;min-height:50px}.habits-list{gap:13px}.bottom-nav{width:calc(100% - 24px);max-width:440px;height:84px;bottom:calc(10px + env(safe-area-inset-bottom));padding:6px 7px;border-radius:25px}.bottom-nav .nav-item{min-height:70px;border-radius:19px;font-size:10px;gap:7px}.bottom-nav .nav-item svg{width:26px;height:26px}.fab{bottom:calc(113px + env(safe-area-inset-bottom));right:22px;width:59px;height:59px}.toast{bottom:calc(184px + env(safe-area-inset-bottom))}.stats-grid.stats-v2,.sheet .stats-grid.stats-v2{gap:17px;margin:19px 0;grid-template-columns:minmax(0,1fr)}.stats-grid.stats-v2>.stat-card,.sheet .stats-grid.stats-v2>.stat-card{padding:22px 20px;border-radius:25px}.stats-v2 .section-title h3,.sheet .stats-grid.stats-v2 .section-title h3,.stats-v2>.stat-summary>h3{font-size:17px}.stat-caption{font-size:11px;margin-top:5px}.stats-v2 .gauge,.sheet .stats-grid.stats-v2 .gauge{width:300px;max-width:100%;margin:25px auto 12px;aspect-ratio:240/146;min-height:0}.stats-v2 .gauge-value,.sheet .stats-grid.stats-v2 .gauge-value{font-size:43px;top:52%;line-height:1.1}.stats-v2 .gauge-value small,.sheet .stats-grid.stats-v2 .gauge-value small{font-size:12px;max-width:none;margin-top:9px}.stats-v2 .success-wrap,.sheet .stats-grid.stats-v2 .success-wrap{margin:27px auto}.stats-v2 .ring,.sheet .stats-grid.stats-v2 .ring{width:225px;height:225px;box-shadow:0 0 0 6px var(--surface)}.stats-v2 .ring::before,.sheet .stats-grid.stats-v2 .ring::before{inset:14px}.stats-v2 .ring>span,.sheet .stats-grid.stats-v2 .ring>span{font-size:44px}.stats-v2 .ring>span>small,.sheet .stats-grid.stats-v2 .ring>span>small{font-size:12px;max-width:155px;margin-top:8px}.success-statuses{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:24px}.success-statuses>span{font-size:11px;line-height:1.6;padding:11px 10px;gap:7px;border-radius:12px}.success-statuses .status-dot{width:8px;height:8px;min-width:8px}.stat-footnote{font-size:11px}.stat-explainer>summary{font-size:11px;min-height:46px}.stat-explainer>p,.stat-explainer .period-results p{font-size:11px;line-height:1.85}.stats-v2 .metrics-grid,.sheet .stats-grid.stats-v2 .metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:23px 18px;margin-top:23px}.stats-v2 .metric>strong,.sheet .stats-grid.stats-v2 .metric>strong{font-size:34px}.stats-v2 .metric>span,.sheet .stats-grid.stats-v2 .metric>span{font-size:11px;line-height:1.6}.stats-v2 .time-totals{font-size:12px;line-height:1.7}.stats-overview>.segmented{margin-bottom:20px}.stats-calendar{padding:20px 10px;border-radius:25px;margin-top:19px}.stats-calendar>.section-title{margin:0 9px 18px;gap:8px}.stats-calendar>.section-title h3{font-size:14px}.stats-calendar>.section-title>.stat-caption{font-size:10px}.stats-days-grid{gap:5px 2px}.stats-weekday{font-size:10px;padding-bottom:6px}.stats-day{min-height:62px;border-radius:12px;gap:7px}.stats-day-number{font-size:13px}.stats-day-result{font-size:10px}.stats-calendar-key{font-size:10px;line-height:1.7;margin:14px 9px 0}.stats-selected-day{margin:17px 9px 0;padding-top:16px}.stats-selected-day>h4{font-size:12px;line-height:1.6;margin-bottom:9px}.stats-selected-day>p{font-size:11px}.stats-entry{gap:9px;padding:11px 0;min-height:66px;flex-wrap:wrap;position:relative;padding-right:17px}.stats-entry-icon{width:35px;height:35px;min-width:35px;border-radius:12px}.stats-entry-icon svg{width:18px;height:18px}.stats-entry-title{font-size:12px;flex-basis:calc(100% - 51px)}.stats-entry-status{font-size:10px;margin:-5px 0 0 44px;max-width:none;flex-basis:calc(100% - 44px)}.stats-entry>svg{position:absolute;right:0;top:23px;width:14px;height:14px}.stats-tasks{padding:22px 20px;border-radius:25px}.stats-tasks>h3{font-size:17px}.stats-tasks .metric strong{font-size:34px}.stats-tasks .metric span{font-size:11px}}
@media(max-width:374px){.habit-card{gap:10px;padding:14px 11px}.habit-card>.icon-tile{width:58px;min-width:58px;height:65px;border-radius:20px}.habit-card>.habit-body h3{font-size:15px}.habit-card>.habit-body .habit-progress{font-size:11px}.stats-grid.stats-v2>.stat-card,.sheet .stats-grid.stats-v2>.stat-card{padding:22px 17px}.stats-v2 .gauge-value,.sheet .stats-grid.stats-v2 .gauge-value{font-size:40px}.stats-v2 .gauge-value small,.sheet .stats-grid.stats-v2 .gauge-value small{font-size:11px}.stats-v2 .ring,.sheet .stats-grid.stats-v2 .ring{width:211px;height:211px}.stats-v2 .ring>span,.sheet .stats-grid.stats-v2 .ring>span{font-size:41px}.stats-calendar{padding-inline:5px}.stats-days-grid{gap:5px 1px}.stats-day{min-height:61px}.stats-calendar>.section-title{margin-inline:10px}.stats-calendar>.section-title>.stat-caption{display:none}.success-statuses>span{font-size:10px;padding:10px 8px}.stats-v2 .metric>span,.sheet .stats-grid.stats-v2 .metric>span{font-size:11px}}

/* Month history follows the compact, single-number reference calendar. */
.stats-range-caption{text-align:center;font-size:11px;color:var(--muted);margin:-8px 0 22px;line-height:1.7}
.stat-card.history-calendar,.sheet-content>.stat-card.history-calendar{padding:27px 28px;border-radius:29px}
.history-month-header{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;align-items:center;gap:17px;max-width:520px;margin:0 auto 25px}
.history-month-header>h3{font-family:'Manrope',sans-serif;font-size:25px;line-height:1.2;text-align:center;font-weight:800;color:var(--text);text-transform:capitalize;margin:0}
.history-month-header>h3>small{display:block;font-family:'DM Sans',sans-serif;font-size:11px;font-weight:400;letter-spacing:.2px;line-height:1.5;margin-top:5px;color:var(--muted)}
.history-month-header>.icon-btn{width:48px;min-width:48px;height:48px;border-radius:18px;background:var(--surface);color:var(--text)}
.history-calendar .stats-days-grid,.history-calendar .habit-history-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px 8px;max-width:520px;margin:0 auto;overflow:visible;align-items:center}
.history-calendar .stats-weekday,.history-calendar .weekday-label{font-size:12px;color:var(--muted);text-align:center;padding:0 0 8px;font-weight:400}
.history-calendar .stats-day,.history-calendar .history-day{display:grid;place-items:center;justify-self:center;width:100%;max-width:61px;aspect-ratio:1;min-height:44px;height:auto;min-width:0;padding:0;gap:0;border:2px solid transparent;border-radius:43%;background:var(--surface-2);color:var(--text);box-shadow:none;position:relative;font-family:'DM Sans',sans-serif}
.history-calendar .stats-day-number,.history-calendar .history-day>span{font-family:'DM Sans',sans-serif;font-size:17px;font-weight:500;line-height:1;letter-spacing:0}
.history-calendar .stats-day.completed,.history-calendar .history-day.completed{background:var(--green);border-color:var(--green);color:var(--on-green)}
.history-calendar .stats-day.partial,.history-calendar .history-day.partial{border-color:var(--yellow);background:var(--yellow-soft);color:var(--text)}
.history-calendar .stats-day.missed,.history-calendar .history-day.missed{border-color:var(--danger);background:var(--danger-soft);color:var(--text)}
.history-calendar .stats-day.skipped,.history-calendar .history-day.skipped{border-color:var(--line);background:var(--surface-3);color:var(--text)}
.history-calendar .stats-day.unknown,.history-calendar .history-day.unknown,.history-calendar .stats-day.future,.history-calendar .history-day.future{border-color:transparent;background:var(--surface-3);color:var(--text)}
.history-calendar .stats-day.selected,.history-calendar .history-day.selected{outline:2px solid var(--accent-border);outline-offset:3px;box-shadow:none}
.history-calendar .stats-day:focus-visible,.history-calendar .history-day:focus-visible{outline:2px solid var(--accent-ink);outline-offset:3px}
.history-calendar .stats-day:hover,.history-calendar .history-day:hover{filter:brightness(1.13)}
.history-outside{display:grid;place-items:center;justify-self:center;min-height:44px;width:100%;max-width:61px;aspect-ratio:1;font-size:15px;color:var(--muted);line-height:1}
.history-calendar .history-legend{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px 18px;max-width:540px;margin:25px auto 0;padding:0}
.history-legend>span{display:inline-flex;align-items:center;gap:7px;font-size:11px;color:var(--muted);line-height:1.5}
.history-legend i{display:inline-block;width:13px;height:13px;min-width:13px;border-radius:43%;border:1.5px solid transparent;background:var(--surface-2)}
.history-legend i.completed{background:var(--green);border-color:var(--green)}.history-legend i.partial{border-color:var(--yellow);background:var(--yellow-soft)}.history-legend i.missed{border-color:var(--danger);background:transparent}.history-legend i.skipped{border-color:var(--line);background:transparent}.history-legend i.unknown{background:var(--surface-3);border-color:var(--line)}
.history-calendar .stats-calendar-key{font-size:10px;text-align:center;color:var(--faint);margin:17px auto 0;max-width:480px;line-height:1.8}
.history-calendar .stats-selected-day{max-width:520px;margin:23px auto 0;padding-top:20px}
@media(max-width:560px){.stats-range-caption{font-size:10px;margin:-8px 0 18px}.stat-card.history-calendar{padding:23px 10px;border-radius:27px}.sheet-content>.stat-card.history-calendar{padding:23px 6px;border-radius:25px}.history-month-header{grid-template-columns:44px minmax(0,1fr) 44px;gap:10px;margin:0 8px 22px}.history-month-header>h3{font-size:23px}.history-month-header>h3>small{font-size:10px;margin-top:4px}.history-month-header>.icon-btn{width:44px;min-width:44px;height:44px;border-radius:16px}.history-month-header>.icon-btn svg{width:21px;height:21px}.history-calendar .stats-days-grid,.history-calendar .habit-history-grid{gap:7px 0;max-width:380px;margin:0 auto;grid-template-columns:repeat(7,minmax(0,1fr))}.history-calendar .stats-weekday,.history-calendar .weekday-label{font-size:11px;padding:0 0 8px}.history-calendar .stats-day,.history-calendar .history-day{width:calc(100% - 3px);max-width:48px;min-width:0;min-height:44px;border-width:1.7px;border-radius:43%}.history-calendar .stats-day-number,.history-calendar .history-day>span{font-size:14px}.history-outside{font-size:13px;max-width:48px;width:calc(100% - 3px);min-height:44px}.history-calendar .stats-day.selected,.history-calendar .history-day.selected{outline-width:1.5px;outline-offset:1px}.history-calendar .history-legend{gap:10px 14px;margin:22px 7px 0}.history-legend>span{font-size:10px;gap:6px}.history-legend i{width:12px;height:12px;min-width:12px}.history-calendar .stats-calendar-key{font-size:9px;line-height:1.7;margin:15px 10px 0}.history-calendar .stats-selected-day{margin:20px 10px 0;padding-top:18px}}
@media(max-width:374px){.stat-card.history-calendar{padding-inline:7px}.sheet-content>.stat-card.history-calendar{padding-inline:3px}.history-calendar .stats-day,.history-calendar .history-day,.history-outside{width:44px;min-height:44px}.history-calendar .stats-days-grid,.history-calendar .habit-history-grid{gap:6px 0}.history-month-header{margin-inline:8px}.history-month-header>h3{font-size:22px}.history-calendar .history-legend{gap:9px 12px}.history-legend>span{font-size:9px}.history-calendar .stats-calendar-key{font-size:9px}}

/* A smaller bottom bar leaves more room for the active view. */
.bottom-nav{width:440px;max-width:calc(100% - 36px);height:72px;padding:5px 7px;border-radius:22px}
.bottom-nav .nav-item{min-height:58px;gap:4px;border-radius:16px;font-size:10px}
.bottom-nav .nav-item svg{width:23px;height:23px}
.fab{bottom:108px}
.toast{bottom:174px}
@media(max-width:560px){
 .bottom-nav{width:calc(100% - 34px);max-width:400px;height:68px;padding:4px 6px;border-radius:21px}
 .bottom-nav .nav-item{min-height:55px;gap:4px;border-radius:15px;font-size:9px}
 .bottom-nav .nav-item svg{width:22px;height:22px}
 .fab{bottom:calc(93px + env(safe-area-inset-bottom))}
 .toast{bottom:calc(164px + env(safe-area-inset-bottom))}
}
