/* Quiet, readable mobile surfaces based on the supplied habit reference. */
body{background:var(--bg)}
.topbar .icon-btn{background:transparent;border:0;box-shadow:none}
.topbar-title{font-weight:650;letter-spacing:-.5px}
.btn.primary,.fab{background:var(--accent);box-shadow:none;border:0}
.btn.primary:hover,.fab:hover{background:var(--accent-deep)}
.nav-indicator{background:var(--accent-soft);box-shadow:none}
.bottom-nav .nav-item.active svg{filter:none}
.progress-fill{background:var(--accent-ink);box-shadow:none}
.habits-v2 .habits-list{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.habits-v2 .habit-card{display:grid;grid-template-columns:44px minmax(0,1fr) 48px;gap:0 14px;align-items:center;padding:22px 20px 17px;min-height:148px;background:var(--surface);border-radius:28px;border:1px solid transparent;box-shadow:none}
.habits-v2 .habit-card:hover{border-color:var(--line)}
.habits-v2 .habit-card.is-complete{background:var(--surface)}
.habits-v2 .habit-card>.icon-tile{width:44px;height:44px;min-width:44px;border-radius:50%;background:color-mix(in srgb,var(--habit-color) 36%,var(--surface));color:var(--text);border:1px solid color-mix(in srgb,var(--habit-color) 20%,transparent);box-shadow:none}
.habits-v2 .habit-body{width:100%;text-align:left;display:block}
.habits-v2 .habit-body h3{font-size:17px;line-height:1.35;font-weight:650;letter-spacing:-.25px;color:var(--text)}
.habits-v2 .habit-body .habit-progress{height:auto;overflow:visible;background:none;max-width:none;font-size:15px;line-height:1.45;font-weight:500;margin:6px 0 0;color:var(--muted);font-variant-numeric:tabular-nums}
.habits-v2 .habit-copy .small{display:block;font-size:12px;margin-top:4px}
.habit-streak-chip{display:flex;justify-content:flex-start;align-items:center;gap:5px;min-height:30px;max-width:none;padding:4px 0 0;color:var(--muted);font-size:10px;line-height:1.3;background:none;border:0}
.habit-streak-chip span{font-size:10px;line-height:1.4}
.habit-streak-chip .streak-flame{width:13px;height:15px;color:var(--muted)}
.habits-v2 .habit-card>.habit-action{position:relative;width:48px;height:48px;min-width:48px;min-height:48px;margin:0;border:0;border-radius:50%;background:var(--control);color:var(--text);box-shadow:none}
.habit-progress-ring{position:absolute;inset:0;width:100%;height:100%;fill:none;stroke:var(--ring-track);stroke-width:2.7;transform:rotate(-90deg);pointer-events:none}
.habit-progress-ring .ring-value{stroke:var(--accent-ink);transition:stroke-dasharray .42s ease;stroke-linecap:round}
.habit-action-glyph{display:grid;place-items:center;position:relative;z-index:1;width:100%;height:100%}
.habit-action-glyph>svg{width:24px;height:24px;filter:none}
.habit-action.done .ring-value{stroke:var(--green)}
.habit-action.done .habit-action-glyph{color:var(--green)}
.habit-action-glyph .empty-circle{width:22px;height:22px;border:1.6px solid var(--muted);border-radius:50%;display:block}
.habit-action[disabled]{opacity:.5}
.habit-card-history{grid-column:1/-1;display:block;min-width:0;margin-top:18px;padding-top:12px;border-top:1px solid var(--line)}
.habit-mini-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:0;min-width:0;width:100%}
.mini-day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:54px;min-width:0;padding:2px 0;border-radius:8px;color:var(--muted)}
.mini-day>span{position:relative;display:grid;place-items:center;width:28px;height:28px;background:var(--surface-3);border-radius:50%;font-size:13px;color:var(--muted);outline:0}
.mini-day small{font-size:11px;line-height:1.3;font-weight:450;color:var(--muted)}
.mini-day.completed>span{background:var(--green-soft);color:var(--green)}
.mini-day.partial>span{border:0;background:var(--surface-3);color:var(--text)}
.mini-day.has-percent b{position:relative;z-index:1;font-size:10px;font-weight:500}
.mini-day .habit-progress-ring{stroke-width:4}
.mini-day .ring-value{stroke:var(--accent-ink);stroke-linecap:butt}
.mini-day.future{opacity:1}
.mini-day.selected>span{outline:0}
.mini-day.selected small{color:var(--text)}
.week-missed-mark{width:7px;height:1.5px;background:var(--muted);border-radius:1px}
.habits-v2 .habit-card.can-reorder{grid-template-columns:18px 40px minmax(0,1fr) 44px;column-gap:10px;padding-inline:14px}
.habits-v2 .habit-card.can-reorder>.icon-tile{width:40px;min-width:40px;height:40px}
.habits-v2 .habit-card.can-reorder>.habit-action{width:44px;min-width:44px;height:44px;min-height:44px}
.habits-v2 .habit-day-summary{margin:6px 3px 20px;row-gap:12px;font-size:13px}
.habit-day-summary .progress-track{height:4px;margin-top:0;background:var(--ring-track)}
.habit-day-summary strong{font-size:18px;font-weight:600}
.habits-v2 .footnote{font-size:11px;color:var(--faint)}
/* Every form/detail is a page, with its own back button and scroll area. */
#modal .screen-backdrop{padding:0;align-items:stretch;background:var(--bg);backdrop-filter:none;-webkit-backdrop-filter:none;animation:none}
#modal .sheet.screen-page{width:100%;max-width:none!important;height:100vh;height:100dvh;max-height:none!important;border:0;border-radius:0!important;background:var(--bg);box-shadow:none;animation:screen-enter .2s ease-out}
#modal .screen-page>form{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;max-width:760px;margin:0 auto}
#modal .screen-page .sheet-header{flex:none;padding:calc(14px + env(safe-area-inset-top)) 20px 14px;justify-content:flex-start;gap:12px;border-bottom:1px solid var(--line);background:var(--bg)}
#modal .screen-page .sheet-header .icon-btn{margin:0;width:40px;min-width:40px;height:40px;border-radius:12px;color:var(--text)}
#modal .screen-page .sheet-header h2{font-size:20px;font-weight:650;letter-spacing:-.4px;line-height:1.35;margin:0;min-width:0;overflow-wrap:anywhere}
#modal .screen-page .sheet-content{flex:1;padding:24px 24px calc(30px + env(safe-area-inset-bottom));overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;min-height:0;background:var(--bg)}
#modal .screen-page .sheet-footer{position:relative;bottom:auto;flex:none;justify-content:center;padding:14px 24px calc(16px + env(safe-area-inset-bottom));background:var(--bg);border-color:var(--line)}
#modal .screen-page .sheet-footer .btn.primary{width:100%;min-height:50px;border-radius:16px;font-size:14px}
#modal .screen-page .settings-back{display:none}
#modal .screen-page .settings-card{background:var(--surface);border:1px solid var(--line);box-shadow:none;border-radius:20px;min-height:82px}
.settings-card-icon{background:var(--accent-soft);box-shadow:none}
.theme-option-swatch{background:var(--swatch);box-shadow:none}
.theme-option-body{background:var(--surface);border-radius:16px;min-height:100px}
.visible-section{display:block;margin:20px 0 0;padding:18px 0 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent}
.visible-section-heading{font-size:14px;line-height:1.5;font-weight:600;margin:0 0 15px;color:var(--text)}
.visible-section-heading .disclosure-hint{float:right;color:var(--muted);font-size:11px;font-weight:400}
.visible-section .field{margin:0 0 16px}
.visible-section>p,.visible-section>div>p{font-size:12px;line-height:1.7;color:var(--muted)}
.habit-editor-v2{gap:22px}
.habit-editor-v2 .habit-summary-row{display:none}
.habit-editor-v2 .habit-picker-panel:not(.habit-icon-screen){background:transparent;border:0;padding:0;margin:0;box-shadow:none;border-radius:0;display:grid;gap:16px}
.habit-editor-v2 [hidden],.habit-icon-screen[hidden]{display:none!important}
.habit-editor-v2 .habit-advanced{margin:2px 0 0;padding:20px 0 0}
.habit-editor-v2 .habit-advanced-body{padding:0;display:grid;gap:18px}
.habit-editor-v2 .habit-form-section{gap:14px;margin-top:0}
.habit-editor-v2 .habit-form-section>h3{font-size:14px;color:var(--text);font-weight:600}
.habit-editor-v2 .habit-appearance-button{min-height:70px;border-radius:18px;box-shadow:none;font-size:14px}
.habit-icon-preview{border-radius:50%}
.habit-goal-segment button[aria-pressed=true]{background:var(--accent);box-shadow:none}
.habit-icon-screen{position:fixed!important;inset:0!important;z-index:210!important;max-width:none!important;max-height:none!important;margin:0!important;padding:calc(14px + env(safe-area-inset-top)) max(20px,calc((100vw - 700px)/2)) calc(24px + env(safe-area-inset-bottom))!important;background:var(--bg)!important;border:0!important;border-radius:0!important;overflow-y:auto!important;box-shadow:none!important}
.habit-icon-screen>header{display:flex;align-items:center;gap:12px;margin-bottom:20px}
.habit-icon-screen h3{font-size:20px;font-weight:600}
.habit-icon-screen .icon-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));max-height:none;overflow:visible}
.habit-icon-screen .icon-option{min-height:76px;height:auto;padding:12px 3px}
.habit-icon-screen .icon-option[aria-pressed=true]{border-color:var(--accent-ink);background:var(--accent-soft)}
.habit-detail-more .habit-detail-actions{display:flex;flex-wrap:wrap;gap:10px;margin:0}
#modal .timer-sheet .sheet-content{display:flex;flex-direction:column;padding-top:30px}
.focus-timer{display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1;gap:24px;width:100%;max-width:520px;margin:0 auto;padding:0 0 20px}
.focus-habit{margin:0;text-align:center}
.focus-habit>svg{width:30px;height:30px;color:var(--muted);filter:none}
.focus-habit h2{font-size:23px;line-height:1.35;font-weight:600;margin-top:12px}
.focus-habit p{font-size:12px;color:var(--muted);margin-top:7px}
.focus-clock{width:min(270px,75vw);height:min(270px,75vw);padding:4px;box-shadow:none;background:conic-gradient(var(--accent-ink) var(--timer-progress),var(--ring-track) 0);border:0;border-radius:50%;display:grid;place-items:center}
.focus-clock>div{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;border-radius:50%;background:var(--bg)}
.focus-clock strong{font-size:51px;line-height:1;font-weight:500;letter-spacing:-2px;font-variant-numeric:tabular-nums}
.focus-clock small,.focus-clock span{font-size:12px;line-height:1.5;color:var(--muted)}
.focus-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;width:100%;max-width:330px}
.focus-controls .btn{min-height:50px;border-radius:16px;font-size:14px}
.focus-note{max-width:310px;color:var(--muted);font-size:12px;line-height:1.65;text-align:center;margin:0}
.focus-more{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;width:100%}
.focus-more .btn{font-size:12px}
.stat-card{background:var(--surface);box-shadow:none}
.stats-grid.stats-v2.stats-clean>.strength-card{background:var(--surface)}
.status-dot.missed{background:var(--danger)}
@keyframes screen-enter{from{opacity:.7;transform:translateX(10px)}to{opacity:1;transform:none}}
@keyframes checked-stroke{from{stroke-dashoffset:36}to{stroke-dashoffset:0}}
.habit-just-completed .habit-action-glyph svg path{stroke-dasharray:36;animation:checked-stroke .4s ease-out}
@media(min-width:900px){#app[data-view=habits]{max-width:800px}.habits-v2 .habit-card{grid-template-columns:48px minmax(0,1fr) 52px;padding:24px}.habits-v2 .habit-card>.icon-tile{width:48px;height:48px}.habits-v2 .habit-card>.habit-action{width:52px;height:52px}.mini-day>span{width:32px;height:32px}.mini-day small{font-size:12px}}
@media(max-width:374px){.habits-v2 .habit-card{grid-template-columns:38px minmax(0,1fr) 44px;column-gap:10px;padding:18px 14px 14px;border-radius:24px}.habits-v2 .habit-card>.icon-tile{width:38px;min-width:38px;height:38px}.habits-v2 .habit-card>.habit-action{width:44px;min-width:44px;height:44px;min-height:44px}.habits-v2 .habit-body h3{font-size:15px}.habits-v2 .habit-body .habit-progress{font-size:13px}.mini-day>span{width:26px;height:26px}.mini-day small{font-size:10px}#modal .screen-page .sheet-header{padding-inline:12px}#modal .screen-page .sheet-content{padding-inline:16px}#modal .screen-page .sheet-footer{padding-inline:16px}.habit-icon-screen{padding-inline:16px!important}}
@media(prefers-reduced-motion:reduce){#modal .screen-page{animation:none}.habit-progress-ring .ring-value,.progress-fill{transition:none}.habit-just-completed .habit-action-glyph svg path{animation:none}}
/* Undo legacy compact SVG sizing inside the new progress controls. */
.habits-v2 .habit-card>.habit-action>svg.habit-progress-ring{position:absolute;inset:0;width:100%;height:100%;min-width:0;stroke-width:2.7;transform:rotate(-90deg);margin:0;filter:none}
.habits-v2 .habit-card>.habit-action:has(.empty-circle),.habits-v2 .habit-card>.habit-action.done{background:var(--control)}
.habits-v2 .habit-card>.habit-action.done::before{display:none}
.habits-v2 .habit-action .empty-circle{position:static!important;inset:auto;transform:none;display:block;width:22px;height:22px;border:1.6px solid var(--muted)!important;border-radius:50%;margin:0}
/* A screen has a normal header; no bottom-sheet grab handle. */
.sheet.screen-page::before{display:none}
.habit-progress-ring .ring-value[stroke-dasharray="0 100"]{stroke-opacity:0}
.account-overlay{position:fixed;inset:0;width:100%;height:100dvh;padding:0;background:var(--bg);backdrop-filter:none;display:block}
.account-overlay .account-card{width:100%;max-width:none;min-height:100%;max-height:100%;overflow:auto;border:0;border-radius:0;box-shadow:none;background:var(--bg);padding:calc(22px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom))}
.account-overlay .account-card>*{max-width:760px;margin-left:auto;margin-right:auto}
.account-overlay .account-card>header{margin-bottom:28px;padding-bottom:18px;border-bottom:1px solid var(--line)}
/* Phone corrections: one anchored dock, quiet controls, no blurred halos. */
html,body{background:var(--bg)}
#app[data-page-scroll]{height:var(--page-viewport-height,100dvh);min-height:0;padding-bottom:calc(var(--bottom-dock-height,144px) + 24px);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scroll-padding-top:12px;scroll-padding-bottom:var(--bottom-dock-height,144px)}
body:has(#app[data-page-scroll]){overflow:hidden}
#app[data-dock-compact]>.fab,#app[data-dock-hidden]>.bottom-nav{visibility:hidden;pointer-events:none}
.topbar{padding-top:16px;padding-bottom:14px;gap:10px}
.topbar-title{position:static;left:auto;transform:none;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:center;font-size:23px;line-height:1.3}
.topbar .topbar-companion>.icon-btn{width:44px;min-width:44px;height:44px;min-height:44px;padding:0;flex-shrink:0}
.topbar-streak{position:relative;display:flex;align-items:center;justify-content:center;gap:5px;min-width:44px;min-height:44px;color:var(--accent-ink);font-size:14px;font-weight:600;background:none}
.topbar-streak .streak-flame{width:18px;height:21px;color:var(--accent-ink);opacity:1}
.topbar-streak .is-resting{opacity:.5}
.topbar-streak[data-feedback]::after{content:attr(data-feedback);position:absolute;top:39px;right:0;white-space:nowrap;font-size:10px;font-weight:400;color:var(--muted)}
.bottom-nav{position:fixed!important;top:auto!important;bottom:calc(6px + env(safe-area-inset-bottom,0px) + var(--dock-bottom-inset,0px))!important;left:50%;display:flex;gap:0;width:440px;max-width:calc(100% - 24px);height:auto;min-height:64px;align-items:stretch;padding:4px 6px;border-radius:21px;background:var(--surface);border:1px solid var(--line);box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.bottom-nav-items{display:flex;flex:1;min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;scroll-padding-inline:2px}
.bottom-nav-items::-webkit-scrollbar{display:none}
.bottom-nav .bottom-nav-items>.nav-item{flex:1 0 auto;min-width:44px;min-height:54px;justify-content:center;gap:4px;padding:5px 6px;font-size:10px;line-height:1.3}
.bottom-nav .nav-item.active{background:var(--accent-soft)}
.bottom-nav .nav-scroll-control{display:flex;flex:none;align-items:center;justify-content:center;width:44px;min-width:44px;padding:0;color:var(--text);border-radius:14px}
.bottom-nav .nav-scroll-control[hidden]{display:none}
.bottom-nav .nav-scroll-control:disabled{opacity:.35}
.bottom-nav .nav-scroll-control>svg{width:20px;height:20px;flex:none}
.bottom-nav .nav-item>span{display:block;white-space:nowrap;overflow-wrap:normal;word-break:normal;text-align:center}
.bottom-nav .nav-item svg{width:22px;height:22px}
.bottom-nav .nav-indicator{display:none}
.fab{bottom:calc(var(--bottom-nav-height,64px) + 22px + env(safe-area-inset-bottom,0px) + var(--dock-bottom-inset,0px));width:48px;height:48px;border-radius:16px;right:max(18px,calc((100vw - 760px)/2));box-shadow:none}
@media (max-height:480px) and (min-width:480px){
 #app:has(>.fab)>.bottom-nav{left:max(12px,calc((100vw - 514px)/2));transform:none;width:calc(100% - 86px);max-width:440px}
 #app>.fab{right:max(18px,calc((100vw - 514px)/2));bottom:calc(14px + env(safe-area-inset-bottom,0px) + var(--dock-bottom-inset,0px))}
}
.habits-v2 .habit-card{grid-template-columns:40px minmax(0,1fr) 44px;column-gap:12px;padding:18px 17px 14px;border-radius:24px;min-height:140px}
.habits-v2 .habit-card>.icon-tile{width:40px;height:40px;min-width:40px}
.habits-v2 .habit-card>.icon-tile svg{width:23px;height:23px}
.habits-v2 .habit-card>.habit-action{width:44px;height:44px;min-width:44px;min-height:44px;background:transparent}
.habits-v2 .habit-card>.habit-action[data-goal-type=check],.habits-v2 .habit-card>.habit-action.done{background:transparent}
.habit-action-glyph>svg{width:21px;height:21px}
.habits-v2 .habit-action .empty-circle{width:21px;height:21px}
.habit-card-history{margin-top:14px;padding-top:10px}
.habit-streak-chip .streak-flame{color:var(--accent-ink)}
#modal .menu-backdrop{padding:12px;align-items:flex-start;justify-content:flex-start;background:#0006;backdrop-filter:none}
#modal .sheet.screen-page.menu-sheet{margin:calc(52px + env(safe-area-inset-top)) auto 0;width:min(100%,380px);height:auto;max-height:calc(100dvh - 90px)!important;border:1px solid var(--line);border-radius:22px!important;background:var(--surface);box-shadow:0 12px 36px #0008;animation:screen-enter .16s ease-out}
#modal .menu-sheet>form{height:auto}
#modal .menu-sheet .sheet-header{padding:12px 14px 6px;background:var(--surface);border:0}
#modal .menu-sheet .sheet-header h2{font-size:16px}
#modal .menu-sheet .sheet-header .icon-btn{width:32px;min-width:32px;height:36px}
#modal .menu-sheet .sheet-content{padding:4px 14px 16px;background:var(--surface);flex:initial}
.menu-sheet .view-menu-option{font-size:14px;min-height:44px;padding:10px;border-radius:12px}
.menu-sheet .view-menu-option>svg{width:19px;height:19px}
.app-menu-footer{padding-top:8px;margin-top:10px;border-top:1px solid var(--line)}
.app-menu-footer>.btn,.app-menu-footer>.view-menu-option{width:100%;justify-content:flex-start}
#modal .screen-page .settings-card{min-height:68px;padding:12px 14px;border:0;border-radius:16px;gap:12px}
#modal .settings-menu{gap:9px}
#modal .settings-card-icon{width:34px;min-width:34px;height:34px;border-radius:11px}
#modal .settings-card-icon svg{width:18px;height:18px}
#modal .settings-card h3,#modal .settings-card strong{font-size:14px}
#modal .settings-card p,#modal .settings-card small{font-size:11px;line-height:1.45}
.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.theme-option-body{min-height:78px;padding:12px 5px;gap:9px;font-size:12px;border-radius:16px}
.theme-option-swatch{width:25px;height:25px;border-radius:50%}
.theme-option-swatch svg{width:16px;height:16px}
.theme-custom{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:16px;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.theme-custom>label{display:flex;align-items:center;gap:9px;font-size:14px;min-height:36px}
.theme-custom input[type=radio]{accent-color:var(--accent-ink);width:18px;height:18px;margin:0}
.theme-custom input[type=color]{width:46px;height:36px;padding:0;border:0;background:none;cursor:pointer}
#modal .timer-sheet .sheet-header{border:0;padding-block:8px}
#modal .timer-sheet .sheet-header h2{font-size:18px}
#modal .timer-sheet .sheet-content{padding-top:8px;padding-bottom:20px}
.focus-timer{justify-content:flex-start;gap:18px;margin:0 auto;padding:0;flex:initial;text-align:center}
.focus-habit{display:flex;align-items:center;justify-content:center;gap:8px}
.focus-habit>svg{width:19px;height:19px;color:var(--accent-ink)}
.focus-habit p{margin:0;font-size:12px}
.focus-clock{width:min(260px,72vw);height:min(260px,72vw);padding:2px;margin:12px 0;background:conic-gradient(var(--accent-ink) var(--timer-progress),var(--ring-track) 0)}
.focus-clock strong{font-size:clamp(44px,12vw,55px);letter-spacing:-1.8px}
.focus-clock>div{gap:12px}
.focus-controls{grid-template-columns:1fr 1fr;gap:10px;max-width:330px}
.focus-controls:not(:has([data-action=timer-stop])){grid-template-columns:1fr}
.focus-controls .btn{min-height:44px;font-size:13px;padding:10px 12px;border-radius:14px}
.focus-controls .btn svg{width:18px;height:18px}
.focus-more{gap:8px}
.focus-more .btn{padding:8px 10px;font-size:11px;border:0;min-height:40px}
.focus-more .btn svg{width:16px;height:16px}
.focus-note{font-size:11px;line-height:1.55;max-width:270px}
.running-banner{border:1px solid var(--line);background:var(--surface-2);box-shadow:none;padding:8px 10px;border-radius:15px;gap:6px}
.running-banner .icon-btn{width:34px;min-width:34px;height:38px}
.running-banner .icon-btn svg{width:18px;height:18px}
#modal .sheet:has(.habit-detail-actions) .detail-hero{padding:0;gap:12px;margin-bottom:18px;text-align:left;align-items:center}
#modal .sheet:has(.habit-detail-actions) .detail-hero .icon-tile{width:44px;height:44px;min-width:44px;border-radius:14px}
#modal .sheet:has(.habit-detail-actions) .detail-hero .icon-tile svg{width:23px;height:23px}
#modal .sheet:has(.habit-detail-actions) .detail-hero h2{font-size:20px;line-height:1.35}
.habit-detail-actions{margin-bottom:18px!important;gap:8px}
.habit-detail-actions>.btn,.habit-detail-timer>.btn{min-height:44px;font-size:12px;border-radius:13px;padding:10px 12px}
.habit-detail-actions svg{width:18px;height:18px}
.stats-grid.stats-v2.stats-clean{gap:12px}
.stats-grid.stats-v2.stats-clean>.stat-card,#modal .stats-grid.stats-v2.stats-clean>.stat-card{padding:18px;border:0;border-radius:20px;background:var(--surface)}
.stats-clean .section-title{margin:0;align-items:flex-start;gap:8px}
.stats-clean .section-title h3{font-size:15px;font-weight:600}
.stats-clean .section-title .icon-btn{width:32px;min-width:32px;height:32px;margin:-5px -5px 0 0}
.stats-clean .section-title .icon-btn svg{width:17px;height:17px}
.stats-v2.stats-clean .gauge,#modal .stats-v2.stats-clean .gauge{width:210px;max-width:100%;margin:16px auto 0}
.stats-v2.stats-clean .gauge-value,#modal .stats-v2.stats-clean .gauge-value{font-size:29px;letter-spacing:-1px}
.stats-v2.stats-clean .gauge-value small{font-size:11px}
.stats-v2.stats-clean .ring,#modal .stats-v2.stats-clean .ring{width:160px;height:160px}
.stats-v2.stats-clean .ring>span,#modal .stats-v2.stats-clean .ring>span{font-size:29px;letter-spacing:-1px}
.stats-v2.stats-clean .ring>span>small,#modal .stats-v2.stats-clean .ring>span>small{font-size:10px;max-width:120px}
.stats-v2.stats-clean .success-wrap,#modal .stats-v2.stats-clean .success-wrap{margin:20px auto}
.stats-clean .success-statuses{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.stats-clean .success-statuses>span{padding:8px;background:var(--surface-2);border:0;border-radius:10px;font-size:11px;text-align:left;justify-content:flex-start}
.stats-v2.stats-clean .metrics-grid,#modal .stats-v2.stats-clean .metrics-grid{grid-template-columns:1fr 1fr;gap:18px 14px;margin-top:18px}
.stats-clean .metrics-grid>.metric,.stats-clean .metrics-grid>.metric:nth-child(-n+2){grid-column:auto;min-width:0;padding:0;border:0;text-align:left}
.stats-v2.stats-clean .metric>strong,#modal .stats-v2.stats-clean .metric>strong{font-size:24px}
.stats-v2.stats-clean .metric>span,#modal .stats-v2.stats-clean .metric>span{font-size:11px;line-height:1.4}
.stats-clean .stat-caption,.stats-clean .stat-footnote{font-size:11px;line-height:1.5}
.activity-series-summary{display:grid;grid-template-columns:24px 1fr;gap:5px 10px;padding:0 0 22px;border-bottom:1px solid var(--line);margin-bottom:22px}
.activity-series-summary>span{align-self:center;color:var(--accent-ink)}
.activity-series-summary>strong{font-size:27px;font-weight:600;line-height:1.2}
.activity-series-summary>p,.activity-series-summary>small{grid-column:1/-1;font-size:12px;line-height:1.55;color:var(--muted)}
@media(max-height:680px){.focus-timer{gap:12px}.focus-clock{width:min(220px,65vw);height:min(220px,65vw);margin:4px 0}.focus-note{font-size:10px}}
@media(prefers-reduced-motion:reduce){.topbar-streak{animation:none}}

#modal .screen-page .sheet-header::before,#modal .screen-page .sheet-header::after{display:none}
.focus-habit{flex-direction:row}

/* A single progress arc and a quiet streak summary, following the new references. */
.focus-clock{position:relative;background:none;padding:0}
.focus-clock>div{background:transparent;position:relative;z-index:1}
.focus-progress{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg);fill:none;stroke:var(--ring-track);stroke-width:7}
.focus-progress [data-timer-arc]{stroke:var(--accent-ink);stroke-linecap:round;transition:stroke-dasharray .3s linear}
.focus-progress [stroke-dasharray="0 100"]{stroke-opacity:0}
.activity-series-summary{display:flex;align-items:center;flex-direction:column;text-align:center;gap:10px;padding:14px 0 24px;margin-bottom:22px}
.activity-series-summary>span{color:var(--accent-ink)}
.activity-series-summary .streak-flame{width:32px;height:38px}
.activity-series-summary>strong{font-size:54px;line-height:1.1;letter-spacing:-2px;font-weight:600}
.activity-series-summary>h3{font-size:17px;font-weight:550}
.activity-series-summary>p{font-size:12px;color:var(--muted)}
.activity-series-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;width:100%;margin:16px 0}
.activity-series-week>div{display:grid;justify-items:center;gap:10px}
.activity-series-week small{font-size:10px;color:var(--muted)}
.activity-series-week span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--surface-3);color:var(--muted);font-size:12px}
.activity-series-week .completed span{background:var(--accent-soft);color:var(--accent-ink)}
.activity-series-records{display:grid;grid-template-columns:1fr 1fr;gap:16px;width:100%;padding:15px 12px;background:var(--surface);border-radius:18px}
.activity-series-records>div{display:flex;flex-direction:column;gap:4px;align-items:center}
.activity-series-records strong{font-size:22px;font-weight:600}
.activity-series-records span{font-size:10px;color:var(--muted)}
.series-habit{padding:14px;border:0;border-radius:18px;background:var(--surface);gap:12px}
.series-habit .series-habit-icon{width:36px;height:36px;border-radius:12px}
.series-habit h3{font-size:14px;font-weight:600}
.series-habit p{font-size:12px}
.series-habit small{font-size:10px}
.series-habit .streak-flame{color:var(--accent-ink)}
.series-help{background:none;border:0;padding:18px 0;margin-top:18px;border-top:1px solid var(--line)}
.series-help h3{font-size:12px;color:var(--muted);font-weight:500}
.series-help p{font-size:11px;line-height:1.7;margin-top:8px;color:var(--muted)}
@media(prefers-reduced-motion:reduce){.focus-progress [data-timer-arc]{transition:none}}
