.habits-feature{font:inherit;font-size:14px;color:var(--text);--green:var(--success,#719450);--green-soft:color-mix(in srgb,var(--green) 16%,var(--surface));--amber:#b7791f;--amber-soft:color-mix(in srgb,var(--amber) 18%,var(--surface))}
.habits-feature[data-habit-theme^=dark]{--amber:#e5b75c}
.habits-feature *{box-sizing:border-box}
.habits-feature{margin:0;background:var(--canvas);color:var(--text);-webkit-font-smoothing:antialiased}
.habits-feature button,.habits-feature input,.habits-feature select{font:inherit;color:inherit}
.habits-feature button{cursor:pointer;border:0;background:none}
.habits-feature button:disabled{cursor:default;opacity:.42}
.habits-feature button,.habits-feature a,.habits-feature input,.habits-feature select{-webkit-tap-highlight-color:transparent}
.habits-feature button:focus-visible,.habits-feature a:focus-visible,.habits-feature input:focus-visible,.habits-feature select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.habits-feature a{color:var(--accent)}
.habits-feature svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;vertical-align:middle}
.habits-feature button svg{pointer-events:none}
.habits-feature h1,.habits-feature h2,.habits-feature h3,.habits-feature p{margin:0}
.habits-feature button,.habits-feature input,.habits-feature select{transition:background .15s,border-color .15s,box-shadow .15s}
.habits-feature button:hover:not(:disabled){filter:brightness(.97)}
.habits-feature [hidden]{display:none!important}
.habits-feature .loading{padding:40px}
.habits-feature .shell{display:grid;grid-template-columns:76px minmax(0,1fr);min-height:100dvh}
.habits-feature .rail{position:sticky;top:0;height:100dvh;display:flex;flex-direction:column;align-items:center;padding:24px 8px;gap:22px}
.habits-feature .app-symbol{display:block;width:46px;height:46px}
.habits-feature .app-symbol img{width:46px;height:46px}
.habits-feature .rail-capsule{display:flex;flex-direction:column;align-items:center;gap:10px;padding:9px 5px;background:var(--surface);border-radius:25px}
.habits-feature .rail-button{display:grid;place-items:center;width:39px;height:43px;color:var(--muted);border-radius:13px}
.habits-feature .rail-button.selected{color:var(--accent);background:var(--accent-soft)}
.habits-feature .rail-bottom{margin-top:auto;display:flex;flex-direction:column;gap:12px;align-items:center}
.habits-feature .avatar{width:32px;height:32px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);border-radius:50%;font-size:11px;font-weight:650}
.habits-feature .main{padding:0 32px 0 20px;min-width:0;display:flex;flex-direction:column;min-height:100dvh}
.habits-feature .topbar{height:88px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:20px}
.habits-feature .identity{display:flex;align-items:center;gap:26px}
.habits-feature .wordmark{width:160px;height:auto}
.habits-feature .dark-wordmark{display:none}
.habits-feature[data-habit-theme^=dark] .light-wordmark{display:none}
.habits-feature[data-habit-theme^=dark] .dark-wordmark{display:block}
.habits-feature .workspace-name{font-size:12px;color:var(--muted);border-left:1px solid var(--line);padding-left:25px}
.habits-feature .top-actions{display:flex;align-items:center;gap:18px}
.habits-feature .prototype-tag{font-size:10px;letter-spacing:.7px;text-transform:uppercase;color:var(--muted);border:1px solid var(--line);border-radius:5px;padding:5px 7px}
.habits-feature .top-date{font-size:12px;color:var(--muted)}
.habits-feature .icon-button{display:inline-grid;place-items:center;width:34px;height:34px;border:1px solid var(--line);border-radius:9px;background:var(--surface)}
.habits-feature .icon-button svg{width:16px;height:16px}
.habits-feature .page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:30px 0 24px}
.habits-feature .page-heading h1{font-size:29px;font-weight:650;letter-spacing:-1px}
.habits-feature .subtitle{color:var(--muted);font-size:13px;line-height:1.6;margin-top:6px}
.habits-feature .primary,.habits-feature .secondary{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:39px;border-radius:9px;padding:10px 16px;font-weight:600;font-size:12px}
.habits-feature .primary{background:var(--accent);color:white}
.habits-feature[data-habit-theme^=dark] .primary{color:#1a1922}
.habits-feature .secondary{background:var(--surface);border:1px solid var(--line)}
.habits-feature .primary svg,.habits-feature .secondary svg{width:16px;height:16px}
.habits-feature .view-tabs{display:flex;padding:4px;background:color-mix(in srgb,var(--line) 45%,transparent);border-radius:10px;gap:4px;width:max-content}
.habits-feature .view-tab{display:flex;align-items:center;justify-content:center;gap:8px;padding:9px 18px;color:var(--muted);font-size:12px;border-radius:7px}
.habits-feature .view-tab svg{width:16px;height:16px}
.habits-feature .view-tab.active{background:var(--surface);color:var(--accent);font-weight:600;box-shadow:0 1px 3px #00000008}
.habits-feature .view-topline{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:24px}
.habits-feature .quiet-label{font-size:11px;color:var(--muted)}
.habits-feature .workspace{flex:1;min-width:0}
.habits-feature .today-layout{display:grid;grid-template-columns:minmax(0,1fr) 304px;gap:22px}
.habits-feature .panel{background:var(--surface);border:1px solid var(--line);border-radius:16px;overflow:hidden}
.habits-feature .panel-top{padding:25px 27px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.habits-feature .panel-top h2{font-size:21px;font-weight:600;letter-spacing:-.4px}
.habits-feature .panel-top p{font-size:12px;color:var(--muted);margin-top:5px}
.habits-feature .date-controls{display:flex;align-items:center;gap:7px}
.habits-feature .small-button{font-size:11px;padding:7px 10px;background:var(--soft);border-radius:7px;color:var(--muted)}
.habits-feature .day-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;padding:0 27px 24px}
.habits-feature .day-button{display:flex;flex-direction:column;align-items:center;gap:8px;padding:11px 3px 8px;border-radius:11px;background:var(--soft);border:1px solid transparent;color:var(--muted)}
.habits-feature .day-button span{font-size:10px}
.habits-feature .day-button strong{font-size:17px;font-weight:600}
.habits-feature .day-button .day-today-label{height:12px;line-height:12px;font-size:9px;color:var(--green);white-space:nowrap}
.habits-feature .day-button.selected{background:var(--green-soft);color:var(--green);border-color:color-mix(in srgb,var(--green) 35%,transparent)}
.habits-feature .today-progress{margin:0 27px 10px;padding:16px 18px;background:var(--soft);border-radius:11px;display:flex;align-items:center;gap:16px}
.habits-feature .progress-ring{width:43px;height:43px;border-radius:50%;flex-shrink:0;background:conic-gradient(var(--green) var(--angle),var(--line) 0);display:grid;place-items:center}
.habits-feature .progress-ring::before{content:'';width:33px;height:33px;border-radius:50%;background:var(--soft)}
.habits-feature .progress-ring svg{position:absolute;color:var(--green);width:17px;height:17px}
.habits-feature .today-progress strong{font-size:13px;font-weight:600}
.habits-feature .today-progress p{color:var(--muted);font-size:11px;line-height:1.5;margin-top:4px}
.habits-feature .progress-percentage{margin-left:auto;color:var(--green);font-size:20px;font-weight:600;letter-spacing:-.7px}
.habits-feature .habit-list{padding:4px 27px 10px}
.habits-feature .habit-row{display:flex;gap:14px;align-items:center;padding:20px 0;border-bottom:1px solid var(--line)}
.habits-feature .habit-row:last-child{border-bottom:0}
.habits-feature .habit-symbol{width:43px;height:43px;display:grid;place-items:center;border-radius:12px;color:var(--habit-color);background:color-mix(in srgb,var(--habit-color) 11%,var(--surface));flex-shrink:0}
.habits-feature .habit-info{min-width:0;flex:1;text-align:left;padding:0}
.habits-feature .habit-name{display:block;font-size:14px;line-height:1.4;font-weight:600;overflow-wrap:anywhere}
.habits-feature .habit-subline{display:flex;align-items:center;flex-wrap:wrap;gap:5px 9px;margin-top:5px;color:var(--muted);font-size:11px;line-height:1.5}
.habits-feature .habit-streak{display:flex;align-items:center;gap:4px;color:var(--habit-color)}
.habits-feature .habit-streak svg{width:12px;height:12px}
.habits-feature .habit-row.done .habit-name{color:var(--muted)}
.habits-feature .mark-button{width:35px;height:35px;border:1.5px solid var(--line);border-radius:50%;display:grid;place-items:center;flex-shrink:0;color:var(--muted)}
.habits-feature .mark-button:hover{border-color:var(--green);color:var(--green)}
.habits-feature .mark-button.done{color:var(--surface);background:var(--green);border-color:var(--green);animation:hf-mark-in .2s ease-out}
.habits-feature .habit-row.partial .mark-button{color:var(--amber);background:var(--amber-soft);border-color:var(--amber)}
.habits-feature .habit-row.partial .value-button strong{color:var(--amber)}
.habits-feature .habit-row.done .value-button strong{color:var(--green)}
.habits-feature .mark-button svg{width:17px;height:17px}
.habits-feature .numeric-control{display:flex;align-items:center;gap:5px}
.habits-feature .numeric-control .icon-button{width:28px;height:28px;border-radius:50%}
.habits-feature .value-button{font-size:11px;min-width:50px;font-variant-numeric:tabular-nums;padding:7px 3px;color:var(--muted)}
.habits-feature .value-button strong{color:var(--text);font-weight:600}
.habits-feature .tiny-meter{display:block;height:3px;background:var(--line);border-radius:4px;overflow:hidden;margin-top:6px;max-width:140px}
.habits-feature .tiny-meter i{display:block;height:100%;background:var(--habit-color);border-radius:4px}
.habits-feature .habit-row.partial .tiny-meter i{background:var(--amber)}
.habits-feature .habit-row.done .tiny-meter i{background:var(--green)}
.habits-feature .row-more{color:var(--muted);width:24px;flex-shrink:0;padding:3px}
.habits-feature .row-more svg{width:16px;height:16px}
.habits-feature .add-row{display:flex;align-items:center;gap:7px;color:var(--accent);font-size:12px;padding:16px 27px 22px}
.habits-feature .add-row svg{width:16px;height:16px}
.habits-feature .side-stack{display:flex;flex-direction:column;gap:18px}
.habits-feature .side-panel{padding:23px}
.habits-feature .side-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.habits-feature .side-heading h3{font-size:13px;font-weight:600}
.habits-feature .side-heading>svg{width:16px;color:var(--muted)}
.habits-feature .side-caption{font-size:11px;color:var(--muted);line-height:1.7;margin-top:8px}
.habits-feature .week-chart{display:flex;align-items:end;gap:10px;margin-top:25px;height:110px}
.habits-feature .week-bar{display:flex;align-items:center;flex-direction:column;justify-content:flex-end;gap:9px;height:100%;flex:1;color:var(--muted);font-size:10px}
.habits-feature .week-bar i{display:block;width:100%;max-width:22px;background:var(--accent-soft);border-radius:5px 5px 2px 2px;min-height:4px}
.habits-feature .week-bar.current{color:var(--accent);font-weight:600}
.habits-feature .week-bar.current i{background:var(--accent)}
.habits-feature .week-bar b{font-size:10px;font-weight:500}
.habits-feature .week-summary{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);margin-top:21px;padding-top:16px}
.habits-feature .week-summary strong{display:block;font-size:19px;font-weight:600;letter-spacing:-.5px}
.habits-feature .week-summary span{display:block;font-size:10px;color:var(--muted);margin-top:4px}
.habits-feature .gentle-panel{background:var(--accent-soft);border:1px solid color-mix(in srgb,var(--accent) 12%,transparent);border-radius:14px;padding:22px}
.habits-feature .gentle-panel>svg{color:var(--accent);margin-bottom:12px}
.habits-feature .gentle-panel h3{font-size:13px;font-weight:600}
.habits-feature .gentle-panel p{font-size:12px;line-height:1.8;color:var(--muted);margin-top:8px}
.habits-feature .sidebar-link{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:11px;padding:2px 4px}
.habits-feature .sidebar-link svg{width:14px}
.habits-feature .footer{display:flex;justify-content:space-between;align-items:center;gap:15px;min-height:65px;color:var(--muted);font-size:10px;margin-top:22px}
.habits-feature .footer span{display:flex;align-items:center;gap:6px}
.habits-feature .footer svg{width:13px;height:13px}
.habits-feature .footer button{color:var(--accent);font-size:10px;padding:4px}
.habits-feature .save-warning{padding:12px 16px;border:1px solid #dcbf78;background:#fff4d7;color:#705b22;border-radius:9px;margin-top:14px;font-size:12px}
.habits-feature .calendar-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:22px 23px}
.habits-feature .month-controls{display:flex;align-items:center;gap:8px}
.habits-feature .month-controls h2{font-size:18px;font-weight:600;min-width:142px;text-align:center;letter-spacing:-.4px}
.habits-feature .calendar-filters{display:flex;gap:8px;align-items:center}
.habits-feature .search{height:35px;display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:8px;padding:0 10px;max-width:200px;color:var(--muted)}
.habits-feature .search svg{width:15px;height:15px}
.habits-feature .search input{border:0;background:none;width:100%;min-width:0;font-size:11px;outline:none}
.habits-feature .filter-select{height:35px;max-width:170px;border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:0 9px;font-size:11px}
.habits-feature .calendar-scroll{overflow:auto;scrollbar-width:thin}
.habits-feature .calendar-table{width:100%;min-width:1080px;table-layout:fixed;border-collapse:separate;border-spacing:0}
.habits-feature .calendar-table th{height:51px;font-size:10px;font-weight:500;color:var(--muted);background:var(--soft);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.habits-feature .calendar-table th:first-child{width:227px;padding-left:23px;text-align:left;position:sticky;left:0;z-index:2}
.habits-feature .calendar-table th:last-child{width:86px}
.habits-feature .calendar-table td{height:77px;border-bottom:1px solid var(--line);text-align:center}
.habits-feature .calendar-table td:first-child{text-align:left;padding:0 14px 0 23px;background:var(--surface);position:sticky;left:0;z-index:1}
.habits-feature .calendar-table tr:last-child td{border-bottom:0}
.habits-feature .calendar-table .habit-symbol{width:32px;height:32px;border-radius:9px}
.habits-feature .calendar-table .habit-symbol svg{width:17px;height:17px}
.habits-feature .table-habit{display:flex;align-items:center;gap:10px;min-width:0}
.habits-feature .table-habit .habit-name{font-size:12px}
.habits-feature .table-habit .habit-subline{font-size:10px}
.habits-feature .calendar-table .today-col{background:color-mix(in srgb,var(--accent) 7%,var(--surface))}
.habits-feature .calendar-table th small{display:block;margin-bottom:5px;font-size:9px;opacity:.7}
.habits-feature .day-number{display:grid;place-items:center;margin:auto;height:23px;width:23px}
.habits-feature .today-col .day-number{background:var(--accent);border-radius:50%;color:var(--surface)}
.habits-feature .weekend{background:color-mix(in srgb,var(--soft) 65%,var(--surface))}
.habits-feature .cell{display:grid;place-items:center;width:22px;height:24px;padding:0;margin:auto;color:var(--muted);border-radius:5px;font-size:11px;border:1px solid var(--line);background:var(--surface)}
.habits-feature .cell svg{height:13px;width:13px}
.habits-feature .cell.complete{color:var(--green);background:var(--green-soft);border-color:color-mix(in srgb,var(--green) 30%,transparent)}
.habits-feature .cell.partial{background:linear-gradient(to top,var(--amber-soft) var(--fill),var(--surface) var(--fill));border-color:color-mix(in srgb,var(--amber) 45%,var(--line));color:var(--amber);font-size:9px}
.habits-feature .cell.missed{background:var(--soft);border-color:transparent;color:#b8afc1}
.habits-feature .cell.rest{border-color:transparent;background:none;opacity:.6}
.habits-feature .cell.future{border-style:dashed;background:none;opacity:.4}
.habits-feature .calendar-progress{font-size:10px;font-variant-numeric:tabular-nums;color:var(--muted)}
.habits-feature .calendar-progress strong{color:var(--text);font-weight:600}
.habits-feature .calendar-progress .tiny-meter{margin:7px 12px 0;height:3px}
.habits-feature .calendar-legend{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 23px;border-top:1px solid var(--line);font-size:10px;color:var(--muted)}
.habits-feature .legend-items{display:flex;flex-wrap:wrap;gap:15px}
.habits-feature .legend-items span{display:flex;align-items:center;gap:6px}
.habits-feature .legend-items .cell{width:15px;height:15px;font-size:10px}
.habits-feature .calendar-overview{display:flex;gap:25px;align-items:center;flex-wrap:wrap;padding:18px 23px;background:var(--soft);border-top:1px solid var(--line);font-size:11px;color:var(--muted)}
.habits-feature .calendar-overview strong{color:var(--text)}
.habits-feature .empty-state{text-align:center;padding:55px 25px;max-width:450px;margin:auto}
.habits-feature .empty-state>.habit-symbol{margin:0 auto 20px;width:55px;height:55px}
.habits-feature .empty-state h3{font-size:17px;font-weight:600}
.habits-feature .empty-state p{font-size:12px;line-height:1.8;color:var(--muted);margin:10px 0 20px}
.habits-feature .empty-state .secondary{margin-left:5px}
.habits-feature dialog{padding:0;border:1px solid var(--line);border-radius:18px;background:var(--surface);color:var(--text);box-shadow:var(--shadow);max-width:calc(100vw - 30px);max-height:90dvh}
.habits-feature dialog::backdrop{background:#21182f60;backdrop-filter:blur(4px)}
.habits-feature .editor{width:480px}
.habits-feature .modal-header{padding:23px 26px 18px;display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid var(--line)}
.habits-feature .modal-header h2{font-size:19px;font-weight:600;letter-spacing:-.4px}
.habits-feature .modal-body{padding:24px 26px;overflow:auto;max-height:calc(90dvh - 157px)}
.habits-feature .field{display:block;margin-bottom:20px}
.habits-feature .field>span,.habits-feature .field-label{display:block;font-size:12px;font-weight:600;margin-bottom:9px}
.habits-feature .field input,.habits-feature .field select{display:block;width:100%;height:42px;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-size:13px}
.habits-feature .field input::placeholder{color:var(--muted)}
.habits-feature .field-hint{display:block;font-size:11px;color:var(--muted);line-height:1.7;margin-top:7px}
.habits-feature .field-row{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.habits-feature .schedule-options{display:flex;gap:5px;padding:4px;background:var(--soft);border-radius:9px;margin-bottom:14px}
.habits-feature .schedule-options button{flex:1;padding:9px 6px;font-size:11px;border-radius:6px;color:var(--muted)}
.habits-feature .schedule-options button.active{background:var(--surface);color:var(--accent);box-shadow:0 1px 4px #00000007;font-weight:600}
.habits-feature .weekday-options{display:flex;justify-content:space-between;gap:5px;margin-bottom:17px}
.habits-feature .weekday-options button{width:37px;height:37px;border:1px solid var(--line);border-radius:50%;color:var(--muted);font-size:11px}
.habits-feature .weekday-options button.active{background:var(--accent-soft);border-color:var(--accent-soft);color:var(--accent);font-weight:600}
.habits-feature .palette{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:20px}
.habits-feature .color-choice{width:28px;height:28px;background:var(--color);border-radius:50%;border:3px solid var(--surface);outline:1px solid transparent}
.habits-feature .color-choice.selected{outline-color:var(--color)}
.habits-feature .icon-options{display:flex;flex-wrap:wrap;gap:7px}
.habits-feature .icon-choice{display:grid;place-items:center;width:36px;height:36px;border:1px solid var(--line);border-radius:9px;color:var(--muted)}
.habits-feature .icon-choice.selected{color:var(--accent);border-color:var(--accent);background:var(--accent-soft)}
.habits-feature .modal-footer{display:flex;justify-content:flex-end;gap:9px;padding:17px 26px;border-top:1px solid var(--line)}
.habits-feature .form-error{font-size:12px;color:#be654f;line-height:1.5;margin-top:12px}
.habits-feature .detail{width:480px;margin:16px 16px 16px auto;max-height:calc(100dvh - 32px);height:calc(100dvh - 32px)}
.habits-feature .detail .modal-body{max-height:calc(100dvh - 115px);padding-bottom:35px}
.habits-feature .detail-title{display:flex;align-items:center;gap:13px;margin-bottom:25px}
.habits-feature .detail-title h2{font-size:21px;letter-spacing:-.5px;overflow-wrap:anywhere}
.habits-feature .detail-title p{font-size:12px;color:var(--muted);margin-top:6px}
.habits-feature .detail-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:25px}
.habits-feature .stat-box{padding:17px;border:1px solid var(--line);border-radius:11px}
.habits-feature .stat-box span{font-size:11px;color:var(--muted)}
.habits-feature .stat-box strong{display:block;font-size:23px;font-weight:600;margin-top:8px;color:var(--accent)}
.habits-feature .detail-section-title{font-size:12px;font-weight:600;margin-bottom:13px}
.habits-feature .detail-month{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.habits-feature .detail-month h3{font-size:13px;font-weight:600}
.habits-feature .mini-calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:7px;margin-bottom:12px}
.habits-feature .mini-calendar .weekday{font-size:10px;color:var(--muted);text-align:center;padding:5px}
.habits-feature .mini-calendar .cell{width:100%;height:35px;font-size:11px}
.habits-feature .mini-calendar .cell svg{height:15px;width:15px}
.habits-feature .mini-calendar .cell.current-day{outline:1px solid var(--accent);outline-offset:2px}
.habits-feature .detail-caption{font-size:11px;color:var(--muted);line-height:1.8}
.habits-feature .detail-rate{display:flex;align-items:center;justify-content:space-between;font-size:12px;margin:22px 0 10px}
.habits-feature .detail-actions{display:flex;gap:9px;margin-top:25px;flex-wrap:wrap}
.habits-feature .detail-actions .secondary{font-size:11px;padding:9px 11px}
.habits-feature .text-action{padding:10px 0;color:var(--muted);font-size:11px}
.habits-feature .entry-dialog{width:360px}
.habits-feature .entry-dialog .modal-body{max-height:60dvh}
.habits-feature .entry-heading{font-size:13px;font-weight:600;overflow-wrap:anywhere;line-height:1.6;margin-bottom:18px}
.habits-feature .entry-options{display:flex;flex-direction:column;gap:8px}
.habits-feature .entry-options button{justify-content:flex-start}
.habits-feature .entry-date{font-size:11px;color:var(--muted);margin-bottom:8px}
.habits-feature .toast{position:fixed;bottom:27px;left:50%;transform:translate(-50%,15px);z-index:100;pointer-events:none;opacity:0;transition:.2s;padding:13px 20px;max-width:calc(100vw - 28px);border-radius:10px;box-shadow:var(--shadow);background:var(--text);color:var(--surface);font-size:12px;line-height:1.6}
.habits-feature .toast.visible{opacity:1;transform:translate(-50%,0)}
.habits-feature .calendar-span{display:flex;gap:2px;padding:3px;background:var(--soft);border-radius:8px}
.habits-feature .calendar-span button{padding:7px 9px;border-radius:5px;font-size:10px;color:var(--muted)}
.habits-feature .calendar-span button.active{background:var(--surface);color:var(--accent);box-shadow:0 1px 3px #00000008}
.habits-feature .week-table{min-width:650px}
.habits-feature .week-table th:first-child{width:260px}
.habits-feature .week-table .cell{width:30px;height:30px}
.habits-feature .calendar-filters{flex-wrap:wrap}
.habits-feature .entry-dialog:has(.help-content){width:740px}
.habits-feature .entry-dialog .help-content{max-height:calc(90dvh - 85px);font-size:13px;line-height:1.8}
.habits-feature .help-intro{color:var(--muted)}
.habits-feature .help-key{padding:15px 18px;margin:18px 0 24px;background:var(--accent-soft);border-radius:10px;font-size:12px}
.habits-feature .help-key strong{color:var(--accent);display:block;margin-top:4px}
.habits-feature .help-section{margin:0 0 27px}
.habits-feature .help-section h3{display:flex;align-items:center;gap:10px;font-size:15px;font-weight:600;line-height:1.5;margin-bottom:12px}
.habits-feature .help-section h3>span{display:grid;place-items:center;flex-shrink:0;width:27px;height:27px;background:var(--accent-soft);color:var(--accent);border-radius:8px;font-size:12px}
.habits-feature .help-section p+p,.habits-feature .help-more p+p{margin-top:10px}
.habits-feature .help-section ul{margin:0 0 12px;padding-left:20px}
.habits-feature .help-section li+li{margin-top:8px}
.habits-feature .help-section strong,.habits-feature .help-more strong{font-weight:600}
.habits-feature .help-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:9px}
.habits-feature .help-table{border-collapse:collapse;min-width:535px;width:100%;font-size:11px;line-height:1.6;text-align:left}
.habits-feature .help-table th,.habits-feature .help-table td{padding:11px 12px;border-bottom:1px solid var(--line);vertical-align:top}
.habits-feature .help-table thead{background:var(--soft)}
.habits-feature .help-table th{font-weight:600}
.habits-feature .help-table tr:last-child>*{border-bottom:0}
.habits-feature .help-table thead tr:last-child>*{border-bottom:1px solid var(--line)}
.habits-feature .help-more{border-top:1px solid var(--line);padding:14px 0}
.habits-feature .help-more:last-child{padding-bottom:0}
.habits-feature .help-more summary{cursor:pointer;font-size:13px;font-weight:600;line-height:1.6}
.habits-feature .help-more>div{padding:12px 0 0;color:var(--muted);font-size:12px}
.habits-feature .help-more summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.habits-feature .help-content{scrollbar-width:thin}
@media(max-width:560px){.habits-feature .entry-dialog .help-content{font-size:12px}
.habits-feature .help-section h3{font-size:14px}
.habits-feature .help-key{padding:13px}
.habits-feature .top-actions{gap:7px}
}
@keyframes hf-mark-in{from{transform:scale(.85)}to{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.habits-feature *{animation:none!important;transition:none!important}
}
@media(min-width:1600px){.habits-feature .main{padding-right:45px}
.habits-feature .today-layout{grid-template-columns:minmax(0,1fr) 330px;gap:26px}
.habits-feature .habit-row{padding:23px 0}
.habits-feature .panel-top{padding-top:29px}
.habits-feature .page-heading{padding-top:35px;padding-bottom:28px}
}
@media(max-width:1100px){.habits-feature .main{padding:0 20px 0 10px}
.habits-feature .today-layout{grid-template-columns:minmax(0,1fr) 260px;gap:15px}
.habits-feature .side-panel{padding:19px}
.habits-feature .panel-top{padding:23px 20px 18px}
.habits-feature .day-strip{padding:0 20px 20px;gap:6px}
.habits-feature .today-progress{margin-left:20px;margin-right:20px}
.habits-feature .habit-list{padding-left:20px;padding-right:20px}
.habits-feature .habit-row{gap:11px}
.habits-feature .habit-symbol{width:37px;height:37px}
.habits-feature .habit-subline{font-size:10px}
.habits-feature .row-more{display:none}
.habits-feature .numeric-control{gap:2px}
.habits-feature .habit-name{font-size:13px}
.habits-feature .top-date{display:none}
.habits-feature .calendar-legend>p{display:none}
}
@media(max-width:800px){.habits-feature .today-layout{grid-template-columns:1fr}
.habits-feature .side-stack{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.habits-feature .side-stack>.sidebar-link{display:none}
.habits-feature .week-chart{height:75px;margin-top:17px}
.habits-feature .gentle-panel{padding:20px}
.habits-feature .topbar{height:74px}
.habits-feature .identity{gap:14px}
.habits-feature .workspace-name{padding-left:14px;font-size:11px}
.habits-feature .wordmark{width:135px}
.habits-feature .page-heading{padding-top:24px}
.habits-feature .calendar-toolbar{padding:18px}
.habits-feature .calendar-filters{flex:1}
.habits-feature .search{max-width:none;flex:1}
.habits-feature .calendar-table{min-width:1050px}
.habits-feature .calendar-overview{gap:15px}
.habits-feature .footer{flex-wrap:wrap;gap:8px;padding:15px 0;font-size:10px}
.habits-feature .prototype-tag{font-size:9px}
}
@media(max-width:560px){.habits-feature .shell{grid-template-columns:1fr}
.habits-feature .rail{display:none}
.habits-feature .main{padding:0 16px}
.habits-feature .topbar{height:67px}
.habits-feature .wordmark{width:126px}
.habits-feature .workspace-name{display:none}
.habits-feature .top-actions{gap:10px}
.habits-feature .prototype-tag{font-size:9px}
.habits-feature .page-heading{padding:22px 0 19px;gap:12px;align-items:flex-start}
.habits-feature .page-heading h1{font-size:25px}
.habits-feature .page-heading .subtitle{font-size:11px;max-width:195px}
.habits-feature .page-heading .primary{padding:10px 12px;font-size:11px;margin-top:2px}
.habits-feature .view-topline{margin-bottom:17px}
.habits-feature .view-tab{padding:9px 17px}
.habits-feature .quiet-label{font-size:10px}
.habits-feature .today-layout{gap:15px}
.habits-feature .panel{border-radius:13px}
.habits-feature .panel-top{padding:20px 16px 16px}
.habits-feature .panel-top h2{font-size:19px}
.habits-feature .panel-top p{font-size:11px}
.habits-feature .date-controls{gap:5px}
.habits-feature .day-strip{padding:0 13px 18px;gap:5px}
.habits-feature .day-button{padding:10px 2px 8px;gap:6px;border-radius:9px}
.habits-feature .day-button strong{font-size:15px}
.habits-feature .day-button span{font-size:9px}
.habits-feature .today-progress{margin:0 14px 5px;padding:13px 12px;gap:11px}
.habits-feature .today-progress strong{font-size:12px}
.habits-feature .today-progress p{font-size:10px}
.habits-feature .progress-percentage{font-size:18px}
.habits-feature .habit-list{padding:4px 16px 8px}
.habits-feature .habit-row{padding:18px 0;gap:10px;flex-wrap:wrap}
.habits-feature .habit-info{min-width:120px}
.habits-feature .habit-name{font-size:13px}
.habits-feature .habit-subline{font-size:10px;gap:3px 7px}
.habits-feature .habit-symbol{width:35px;height:35px;border-radius:10px}
.habits-feature .habit-symbol svg{width:18px;height:18px}
.habits-feature .mark-button{width:34px;height:34px}
.habits-feature .numeric-control .icon-button{width:27px;height:29px}
.habits-feature .numeric-control .value-button{min-width:41px;font-size:10px}
.habits-feature .add-row{padding:13px 16px 21px}
.habits-feature .side-stack{grid-template-columns:1fr}
.habits-feature .gentle-panel{display:none}
.habits-feature .side-panel{padding:19px}
.habits-feature .week-chart{height:70px}
.habits-feature .week-summary strong{font-size:17px}
.habits-feature .week-summary{padding-top:13px;margin-top:17px}
.habits-feature .footer{margin-top:10px;align-items:flex-start}
.habits-feature .footer>span:first-child{max-width:245px;line-height:1.6;align-items:flex-start}
.habits-feature .footer>span:first-child svg{margin-top:2px;flex-shrink:0}
.habits-feature .calendar-toolbar{padding:17px 14px}
.habits-feature .month-controls{width:100%;justify-content:space-between}
.habits-feature .month-controls h2{min-width:140px}
.habits-feature .calendar-filters{width:100%}
.habits-feature .filter-select{max-width:142px}
.habits-feature .calendar-legend{padding:14px;gap:8px}
.habits-feature .legend-items{gap:9px;font-size:9px}
.habits-feature .calendar-overview{padding:15px 14px;gap:10px 20px;font-size:10px}
.habits-feature .calendar-table th:first-child{width:170px;padding-left:14px}
.habits-feature .calendar-table td:first-child{padding-left:14px;padding-right:9px}
.habits-feature .calendar-table .habit-symbol{width:27px;height:27px}
.habits-feature .table-habit{gap:8px}
.habits-feature .table-habit .habit-name{font-size:11px}
.habits-feature .table-habit .habit-subline{font-size:9px}
.habits-feature .calendar-table{min-width:1020px}
.habits-feature .modal-header{padding:19px 20px 16px}
.habits-feature .modal-body{padding:21px 20px}
.habits-feature .modal-footer{padding:16px 20px}
.habits-feature .detail{margin:8px;max-width:calc(100vw - 16px);width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px)}
.habits-feature .detail .modal-body{max-height:calc(100dvh - 95px)}
.habits-feature .field-row{gap:9px}
.habits-feature .weekday-options button{width:34px;height:34px}
.habits-feature .toast{bottom:18px;width:max-content;text-align:center}
}
@media(max-width:560px){.habits-feature .calendar-filters{gap:8px}
.habits-feature .calendar-span{order:0}
.habits-feature .calendar-filters .search{order:2;flex-basis:100%}
.habits-feature .calendar-filters .filter-select{margin-left:auto}
.habits-feature .week-table{min-width:0}
.habits-feature .week-table th:first-child{width:145px;padding-left:12px}
.habits-feature .week-table td:first-child{padding-left:12px}
.habits-feature .week-table .habit-symbol{display:none}
.habits-feature .week-table th:last-child,.habits-feature .week-table td:last-child{display:none}
.habits-feature .week-table .cell{width:21px;height:26px}
.habits-feature .week-table .day-number{width:21px;height:21px}
.habits-feature .week-table .habit-name{font-size:11px}
.habits-feature .week-table .table-habit{gap:0}
}
.habits-feature .history-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 1px 20px;flex-wrap:wrap}
.habits-feature .history-toolbar h2{font-size:19px;font-weight:600;letter-spacing:-.4px}
.habits-feature .history-toolbar p{font-size:11px;color:var(--muted);margin-top:5px}
.habits-feature .history-filters{display:flex;gap:8px;align-items:center}
.habits-feature .history-view-legend{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;margin:0 1px 18px;color:var(--muted);font-size:10px;line-height:1.7}
.habits-feature .heatmap-scale{display:flex;align-items:center;gap:5px;--habit-color:var(--accent);white-space:nowrap}
.habits-feature .heatmap-scale span{margin:0 3px}
.habits-feature .heatmap-scale .heatmap-cell{width:12px;height:12px;aspect-ratio:auto;flex-shrink:0}
.habits-feature .history-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,600px),1fr));gap:14px;align-items:start}
.habits-feature .history-card{min-width:0}
.habits-feature .history-cards>.empty-state{grid-column:1 / -1}
.habits-feature .history-card-heading{padding:14px 16px 12px;display:flex;align-items:center;justify-content:space-between;gap:15px}
.habits-feature .history-card-heading .habit-symbol{width:32px;height:32px;border-radius:9px}
.habits-feature .history-card-heading .habit-symbol svg{width:18px;height:18px}
.habits-feature .history-card-heading .habit-name{font-size:13px}
.habits-feature .history-card-heading .habit-subline{font-size:10px}
.habits-feature .history-created{font-size:10px;color:var(--muted);white-space:nowrap}
.habits-feature .history-scroll{overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent;padding:0 16px 8px}
.habits-feature .history-map{width:100%;min-width:600px;max-width:900px}
.habits-feature .heatmap-months{display:grid;grid-template-columns:repeat(var(--weeks),minmax(0,1fr));column-gap:2px;margin-left:25px;height:20px;font-size:9px;color:var(--muted);align-items:start;line-height:1.4}
.habits-feature .heatmap-months>span{grid-row:1;white-space:nowrap;overflow:hidden}
.habits-feature .heatmap-body{display:grid;grid-template-columns:21px minmax(0,1fr);gap:4px}
.habits-feature .heatmap-weekdays{display:grid;grid-template-rows:repeat(7,1fr);gap:2px;align-items:center;font-size:9px;color:var(--muted)}
.habits-feature .heatmap-grid{display:grid;grid-template-columns:repeat(var(--weeks),minmax(0,1fr));gap:2px}
.habits-feature .heatmap-week{display:grid;grid-template-rows:repeat(7,1fr);gap:2px}
.habits-feature .heatmap-cell{display:block;width:100%;aspect-ratio:1;min-width:0;border:1px solid transparent;border-radius:1.5px;padding:0;background:var(--soft)}
.habits-feature .heatmap-cell:disabled{opacity:1}
.habits-feature .heatmap-cell.heat-padding{visibility:hidden}
.habits-feature .heat-level-0{background:var(--soft)}
.habits-feature .heat-level-1{background:color-mix(in srgb,var(--amber) 30%,var(--surface));border-color:color-mix(in srgb,var(--amber) 35%,var(--line))}
.habits-feature .heat-level-2{background:color-mix(in srgb,var(--amber) 55%,var(--surface));border-color:transparent}
.habits-feature .heat-level-3{background:color-mix(in srgb,var(--amber) 80%,var(--surface));border-color:transparent}
.habits-feature .heat-level-4{background:var(--green);border-color:transparent}
.habits-feature .heat-before{background:color-mix(in srgb,var(--line) 50%,var(--surface));border-color:transparent}
.habits-feature .heat-rest,.habits-feature .heat-skip{background:transparent;border-color:var(--line);border-style:dashed}
.habits-feature .heat-skip{background:var(--soft)}
.habits-feature .heat-today{outline:1px solid var(--habit-color);outline-offset:1px}
.habits-feature .heatmap-cell:focus-visible{outline:2px solid var(--text);outline-offset:2px;position:relative;z-index:1}
.habits-feature .heatmap-cell:hover:not(:disabled){outline:1px solid var(--habit-color);outline-offset:1px;filter:brightness(.95)}
.habits-feature .history-card-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:6px 16px 13px}
.habits-feature .history-metrics{display:flex;align-items:center;flex-wrap:wrap;gap:6px 15px;font-size:10px;color:var(--muted);line-height:1.7}
.habits-feature .history-metrics strong{font-weight:600;color:var(--text);margin-left:4px}
.habits-feature .history-metrics small{display:block;font-size:9px;line-height:1.2}
.habits-feature .history-today{display:flex;gap:14px;align-items:center;justify-content:space-between;border:1px solid var(--line);border-radius:8px;padding:7px 9px;background:var(--soft);font-size:10px;color:var(--muted)}
.habits-feature .history-today strong{font-weight:500;color:var(--text)}
.habits-feature .history-today svg{width:14px;height:14px;color:var(--habit-color)}
.habits-feature .history-today:disabled{opacity:.65}
.habits-feature .history-view .empty-state{width:100%}
.habits-feature .history-tooltip{position:fixed;z-index:50;display:flex;flex-direction:column;gap:5px;max-width:min(300px,calc(100vw - 20px));padding:11px 14px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);box-shadow:0 6px 24px #30244926;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.habits-feature .history-tooltip-date{color:var(--muted);font-size:10px}
.habits-feature .history-tooltip strong{font-weight:600}
.habits-feature .history-tooltip small{color:var(--muted);font-size:10px}
@media(max-width:800px){.habits-feature .history-card-heading{padding:14px 16px 12px}
.habits-feature .history-scroll{padding-left:16px;padding-right:16px}
.habits-feature .history-card-footer{padding-left:16px;padding-right:16px}
.habits-feature .history-metrics{gap:8px 16px}
}
@media(max-width:560px){.habits-feature .view-topline>.quiet-label{display:none}
.habits-feature .view-tabs{width:100%}
.habits-feature .view-tab{flex:1;padding:9px 10px;font-size:11px}
.habits-feature .history-toolbar{gap:15px;margin-bottom:15px}
.habits-feature .history-toolbar h2{font-size:17px}
.habits-feature .history-filters{width:100%}
.habits-feature .history-filters .search{flex:1;max-width:none;min-width:0}
.habits-feature .history-filters .filter-select{max-width:138px}
.habits-feature .history-view-legend{gap:10px;margin-bottom:14px}
.habits-feature .history-card-heading{padding:13px 15px 10px;align-items:flex-start}
.habits-feature .history-created{display:none}
.habits-feature .history-card-heading .habit-name{font-size:13px}
.habits-feature .history-scroll{padding-left:15px;padding-right:15px}
.habits-feature .history-map{min-width:600px}
.habits-feature .history-card-footer{padding:6px 15px 12px;gap:10px}
.habits-feature .history-metrics{font-size:10px;gap:8px 15px}
.habits-feature .history-today{width:100%;font-size:11px}
.habits-feature .history-cards{gap:14px}
}
.habits-feature .page-heading-actions{display:flex;gap:9px;align-items:center}
.habits-feature .habits-manager{width:780px}
.habits-feature .manager-caption,.habits-feature .manager-note,.habits-feature .manager-count{font-size:11px;color:var(--muted);line-height:1.6}
.habits-feature .manager-caption{margin-top:5px}
.habits-feature .manager-body{padding-top:18px}
.habits-feature .manager-filters{display:flex;align-items:center;gap:9px;margin-bottom:12px;flex-wrap:wrap}
.habits-feature .manager-filters .search{flex:1;max-width:none}
.habits-feature .manager-count{margin-left:auto;white-space:nowrap}
.habits-feature .manager-row{padding:17px 0;border-bottom:1px solid var(--line)}
.habits-feature .manager-row:last-child{border:0}
.habits-feature .manager-habit{display:flex;align-items:center;gap:12px}
.habits-feature .manager-habit .habit-info{min-width:0}
.habits-feature .habit-status{font-size:10px;border-radius:6px;padding:5px 8px;white-space:nowrap;background:var(--soft);color:var(--muted)}
.habits-feature .status-active{color:var(--accent);background:var(--accent-soft)}
.habits-feature .manager-actions{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0 0 55px}
.habits-feature .manager-actions .small-button{display:inline-flex;align-items:center;gap:5px;background:var(--soft);padding:8px 10px}
.habits-feature .manager-actions svg{width:13px;height:13px}
.habits-feature .manager-note{margin-right:auto;align-self:center}
.habits-feature .danger-action{color:#b44e60}
.habits-feature .danger-button{background:#b44e60;color:#fff}
.habits-feature .delete-habit{width:460px}
.habits-feature .deletion-warning{font-size:13px;line-height:1.7;margin-bottom:12px}
.habits-feature .delete-habit .modal-footer{flex-wrap:wrap}
.habits-feature .delete-habit .modal-footer button{font-size:11px}
.habits-feature .habits-manager[open]{display:flex;flex-direction:column;height:min(760px,90dvh);overflow:hidden}
.habits-feature .habits-manager>.modal-header,.habits-feature .habits-manager>.modal-footer{flex-shrink:0}
.habits-feature .habits-manager .manager-body{min-height:0;max-height:none;flex:1;overflow:auto}
@media(max-width:560px){.habits-feature .page-heading{flex-wrap:wrap}
.habits-feature .page-heading-actions{width:100%}
.habits-feature .page-heading-actions button{flex:1;font-size:11px;padding:10px 8px}
.habits-feature .page-heading-actions .primary{margin:0}
.habits-feature .manager-habit{gap:9px;flex-wrap:wrap}
.habits-feature .manager-habit .habit-info{flex-basis:calc(100% - 50px)}
.habits-feature .habit-status{margin-left:44px}
.habits-feature .manager-actions{margin-left:0}
.habits-feature .manager-actions .small-button{font-size:10px}
.habits-feature .manager-note{width:100%}
.habits-feature .manager-filters .search{min-width:120px}
.habits-feature .manager-count{width:100%}
.habits-feature .manager-body{padding-top:12px}
}
@media(max-width:560px){.habits-feature .habits-manager .modal-footer{gap:12px;padding:14px 20px}
.habits-feature .habits-manager .modal-footer .primary{font-size:11px;padding:10px 12px;white-space:nowrap}
.habits-feature .manager-note{width:auto;flex:1;min-width:0}
.habits-feature .manager-actions{display:grid;grid-template-columns:1fr 1fr}
.habits-feature .manager-actions .small-button{justify-content:center}
}


.habits-feature{min-width:0;padding:0 2px 24px;background:transparent;--canvas:inherit;font-family:inherit}.habits-feature .habit-network-status:empty{display:none}.habits-feature .habit-network-status{position:fixed;bottom:20px;right:24px;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:10px 16px;z-index:120}.habits-feature .habit-network-error{padding:12px 16px;color:var(--danger,#be654f);border:1px solid currentColor;border-radius:9px;margin:12px 0}.habits-feature .habit-import-banner{display:flex;align-items:center;justify-content:space-between;gap:14px;background:var(--accent-soft);border:1px solid var(--line);border-radius:12px;padding:14px 18px;font-size:12px;line-height:1.6;margin-top:14px}.habits-feature .habit-import-banner button{flex-shrink:0}.habits-feature .workspace{padding:0}.habits-feature .progress-ring{position:relative}.habits-feature dialog{overflow:hidden}.habits-feature .field{gap:0;color:var(--text)}.habits-feature .primary.danger-button{padding:10px 16px;color:#fff}.habits-feature .history-tooltip{z-index:200}.habits-feature .page-heading-actions{flex-wrap:wrap}@media(max-width:560px){.habits-feature .habit-import-banner{align-items:stretch;flex-direction:column}.habits-feature .page-heading{align-items:flex-start}.habits-feature .page-heading-actions{align-items:stretch}}
.habits-feature .row-more-label{display:none}
@media(max-width:560px){
 .habits-feature .day-button .day-today-label{font-size:8px}
 .habits-feature .primary,.habits-feature .secondary,.habits-feature .small-button,.habits-feature .icon-button,.habits-feature .view-tab,.habits-feature .calendar-span button,.habits-feature .history-today,.habits-feature .schedule-options button,.habits-feature .text-action{min-height:44px}
 .habits-feature .icon-button{width:44px;height:44px;min-width:44px}
 .habits-feature .view-topline{align-items:stretch;flex-wrap:wrap;gap:8px}
 .habits-feature .view-tabs{min-width:0;flex:1 1 100%;width:100%}
 .habits-feature .view-tab{min-width:0;padding:10px 6px;gap:6px;font-size:12px}
 .habits-feature .view-topline>.small-button{margin-left:auto;display:flex;align-items:center;gap:6px;padding:8px 12px}
 .habits-feature .page-heading-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .habits-feature .page-heading-actions button{min-width:0;line-height:1.4;font-size:12px}
 .habits-feature .panel-top{align-items:flex-start;flex-wrap:wrap;gap:12px}
 .habits-feature .panel-top>div:first-child{min-width:0;flex:1 1 145px}
 .habits-feature .date-controls{margin-left:auto;flex-wrap:wrap;justify-content:flex-end;gap:6px}
 .habits-feature .day-strip{grid-template-columns:repeat(7,minmax(44px,1fr));gap:0;padding:0 8px 18px;overflow-x:auto}
 .habits-feature .day-button{min-width:44px;min-height:60px;border-radius:8px;margin:0;padding:10px 0 8px}
 .habits-feature .today-progress{align-items:flex-start}
 .habits-feature .today-progress>div{min-width:0}
 .habits-feature .progress-percentage{flex-shrink:0;font-size:17px}
 .habits-feature .habit-row{display:grid;grid-template-columns:35px minmax(0,1fr) 44px;gap:10px;align-items:center;padding:16px 0}
 .habits-feature .habit-row>.habit-symbol{grid-column:1;grid-row:1}
 .habits-feature .habit-row>.habit-info{grid-column:2;grid-row:1;min-width:0;min-height:44px}
 .habits-feature .habit-row>.mark-button{grid-column:3;grid-row:1;width:44px;height:44px}
 .habits-feature .habit-row>.numeric-control{grid-column:2 / -1;grid-row:2;justify-self:start;min-width:0;gap:8px}
 .habits-feature .numeric-control .icon-button{width:44px;height:44px;min-width:44px}
 .habits-feature .numeric-control .value-button{min-width:76px;min-height:44px;padding:5px 8px;font-size:12px;line-height:1.5}
 .habits-feature .habit-row>.row-more{display:inline-flex;grid-column:2 / -1;grid-row:2;align-items:center;justify-content:flex-start;gap:7px;min-height:44px;width:auto;padding:8px 0;font-size:11px}
 .habits-feature .row-more-label{display:inline}
 .habits-feature .numeric-habit>.row-more{grid-column:1;width:44px;height:44px;padding:0;justify-content:center}
 .habits-feature .numeric-habit .row-more-label{display:none}
 .habits-feature .add-row{min-height:52px;font-size:12px}
 .habits-feature .search,.habits-feature .filter-select,.habits-feature .field input,.habits-feature .field select{height:44px;min-height:44px;font-size:16px}
 .habits-feature .search{min-width:0;padding:0 12px}
 .habits-feature .search input{min-height:42px;font-size:16px}
 .habits-feature .calendar-filters,.habits-feature .history-filters,.habits-feature .manager-filters{min-width:0;flex-wrap:wrap;gap:8px}
 .habits-feature .calendar-filters .search,.habits-feature .history-filters .search,.habits-feature .manager-filters .search{width:100%;max-width:none;min-width:0;flex:1 1 100%}
 .habits-feature .calendar-filters .filter-select,.habits-feature .history-filters .filter-select,.habits-feature .manager-filters .filter-select{width:100%;max-width:none;min-width:0;flex:1 1 100%;margin:0}
 .habits-feature .calendar-span{flex:1;min-width:0}
 .habits-feature .calendar-span button{flex:1;font-size:12px}
 .habits-feature .month-controls{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;width:100%;gap:8px}
 .habits-feature .month-controls h2{min-width:0;font-size:16px;line-height:1.5}
 .habits-feature .month-controls>.small-button{grid-column:1 / -1;justify-self:end;padding:8px 14px}
 .habits-feature .calendar-scroll{max-width:100%;overscroll-behavior-x:contain}
 .habits-feature .calendar-table{min-width:1720px}
 .habits-feature .calendar-table th:first-child{width:180px}
 .habits-feature .calendar-table .cell{width:44px;height:44px;font-size:12px}
 .habits-feature .week-table{min-width:480px}
 .habits-feature .week-table th:first-child{width:145px}
 .habits-feature .week-table .cell{width:44px;height:44px}
 .habits-feature .mini-calendar{gap:0}
 .habits-feature .mini-calendar .cell{width:100%;height:44px;min-width:0;border-radius:6px}
 .habits-feature dialog{max-width:calc(100vw - 16px);max-height:92dvh}
 .habits-feature dialog[open]{display:flex;flex-direction:column}
 .habits-feature dialog>.modal-header,.habits-feature dialog>.modal-footer{flex-shrink:0}
 .habits-feature dialog>.modal-body{min-height:0;max-height:none;overflow-y:auto;flex:1}
 .habits-feature .detail[open]{height:calc(100dvh - 16px);max-height:calc(100dvh - 16px)}
 .habits-feature .detail .modal-body{min-height:0;max-height:none;overflow-y:auto;flex:1}
 .habits-feature .modal-header{padding:16px;align-items:flex-start}
 .habits-feature .modal-header h2{min-width:0;font-size:18px;overflow-wrap:anywhere}
 .habits-feature .modal-header>.icon-button{flex-shrink:0}
 .habits-feature .modal-body{padding:18px 16px;overscroll-behavior-y:contain}
 .habits-feature .modal-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));gap:8px;flex-wrap:wrap}
 .habits-feature .modal-footer button{min-width:0;flex:1;white-space:normal}
 .habits-feature .editor form,.habits-feature .entry-dialog form{display:flex;flex-direction:column;min-height:0;max-height:calc(92dvh - 2px)}
 .habits-feature .editor .modal-header,.habits-feature .editor .modal-footer,.habits-feature .entry-dialog .modal-header{flex-shrink:0}
 .habits-feature .editor .modal-body,.habits-feature .entry-dialog form>.modal-body{min-height:0;max-height:none;overflow-y:auto;flex:1}
 .habits-feature .field-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .habits-feature .weekday-options{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:0}
 .habits-feature .weekday-options button{width:100%;height:44px;min-width:0}
 .habits-feature .palette{gap:6px;flex-wrap:wrap}
 .habits-feature .color-choice,.habits-feature .icon-choice{width:44px;height:44px;flex-shrink:0}
 .habits-feature .manager-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .habits-feature .manager-actions .small-button{min-width:0;min-height:44px;font-size:11px;line-height:1.4;white-space:normal}
 .habits-feature .manager-habit .habit-info{min-width:0;flex-basis:calc(100% - 44px)}
 .habits-feature .manager-count{width:100%;margin-left:0}
 .habits-feature .habits-manager .modal-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));flex-direction:column;align-items:stretch}
 .habits-feature .habits-manager .modal-footer .primary{width:100%;min-height:44px;white-space:normal}
 .habits-feature .manager-note{width:100%;flex:auto;text-align:center}
 .habits-feature .delete-habit .modal-footer{flex-direction:column;align-items:stretch}
 .habits-feature .delete-habit .modal-footer button{width:100%;min-height:44px;font-size:12px}
 .habits-feature .detail-actions .secondary{min-height:44px;min-width:0;line-height:1.5}
 .habits-feature .help-more summary{min-height:44px;padding:10px 0}
 .habits-feature .habit-network-status{max-width:calc(100vw - 32px);right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px))}
 .habits-feature .toast{bottom:calc(18px + env(safe-area-inset-bottom,0px))}
}

@media(max-width:560px){.habits-feature .view-topline{flex-wrap:nowrap;gap:8px}.habits-feature .view-tabs{width:auto;flex:1;min-width:0}.habits-feature .view-tab{min-width:0;padding:9px 6px;gap:5px;white-space:nowrap}.habits-feature .view-topline>.small-button{width:44px;min-width:44px;padding:0;font-size:0;display:grid;place-items:center}.habits-feature .numeric-habit .row-more{display:none}.habits-feature .day-strip{grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;padding-left:7px;padding-right:7px;overflow:visible}.habits-feature .day-button{min-width:0}}

/* Keep the habits heading compact while letting narrow screens wrap. */
.habits-feature .page-heading{padding:16px 0 12px;gap:12px 20px;flex-wrap:wrap}
.habits-feature .page-heading-intro{display:flex;align-items:center;flex-wrap:wrap;gap:6px 16px;min-width:0}
.habits-feature .page-heading .subtitle{margin:0;max-width:none}
.habits-feature .page-heading-actions{flex-shrink:0}
.habits-feature .habit-help-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:39px;padding:8px 10px}
.habits-feature .view-topline{margin-bottom:16px}
@media(max-width:560px){
 .habits-feature .page-heading{padding:12px 0 10px}
 .habits-feature .page-heading-intro{gap:6px 12px;width:100%}
 .habits-feature .page-heading .subtitle{flex:1 1 140px}
 .habits-feature .page-heading-actions{grid-template-columns:44px repeat(2,minmax(0,1fr))}
 .habits-feature .page-heading-actions .habit-help-button{font-size:0;padding:0;gap:0;min-height:44px}
 .habits-feature .view-topline{margin-bottom:12px}
}

/* Today combines the daily ritual counters with the editable week. */
.habits-feature{--habit-ring-size:96px;--habit-active:var(--accent);--habit-active-text:var(--accent)}
.habits-feature[data-habit-theme^=dark]{--habit-active:#b8a2f6;--habit-active-text:#c9b7fb}
.habits-feature .today-main{min-width:0;display:flex;flex-direction:column;gap:22px}
.habits-feature .today-panel .panel-top{padding-bottom:12px}
.habits-feature .today-count{font-size:12px;color:var(--muted);white-space:nowrap}
.habits-feature .habit-circles{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:26px 15px;padding:25px 23px 30px}
.habits-feature .habit-ritual.habit-row{display:flex;flex-direction:column;align-items:center;gap:0;padding:0;border:0;min-width:0;text-align:center}
.habits-feature .habit-circle{width:var(--habit-ring-size);height:var(--habit-ring-size);display:grid;place-items:center;border-radius:50%;position:relative;isolation:isolate;background:conic-gradient(var(--habit-color) var(--habit-angle),var(--soft) 0);margin-bottom:15px;flex-shrink:0}
.habits-feature .habit-circle:before{content:'';position:absolute;inset:5px;border-radius:50%;background:var(--surface);z-index:-1}
.habits-feature .habit-circle>svg{width:30px;height:30px;color:var(--habit-color)}
.habits-feature .circle-step{position:absolute;bottom:0;right:0;display:grid;place-items:center;min-width:27px;height:27px;padding:0 5px;border-radius:50%;background:var(--habit-color);border:3px solid var(--surface);color:white;font-size:10px;font-weight:600}
.habits-feature .circle-step svg{width:13px;height:13px}
.habits-feature .habit-circle.complete .circle-step{background:var(--green)}
.habits-feature .habit-ritual .habit-info{flex:none;text-align:center;min-height:24px;max-width:100%;padding:0;line-height:1.4}
.habits-feature .habit-ritual .habit-name{font-size:14px;font-weight:600;white-space:normal;overflow-wrap:anywhere}
.habits-feature .habit-ritual.done .habit-name{color:var(--text)}
.habits-feature .habit-goal{font-size:11px;color:var(--muted);margin-top:5px;min-height:26px;line-height:1.5}
.habits-feature .habit-ritual .numeric-control{gap:8px;justify-content:center;max-width:100%}
.habits-feature .habit-ritual .numeric-control .icon-button{position:relative;display:grid;place-items:center;width:25px;height:28px;min-width:25px;min-height:28px;padding:0;border:0;background:transparent;color:var(--muted)}
.habits-feature .habit-ritual .numeric-control .icon-button::before{content:'';position:absolute;width:20px;height:20px;box-sizing:border-box;border:1px solid var(--line);border-radius:50%;pointer-events:none}
.habits-feature .habit-ritual .numeric-control .icon-button svg{position:relative;width:10px;height:10px}
.habits-feature .habit-ritual .value-button{padding:3px 2px;min-width:0;min-height:28px;font-size:11px;line-height:1.4}
.habits-feature .habit-ritual .value-button strong{font-weight:400}
.habits-feature .circle-streak{display:flex;align-items:center;gap:3px;font-size:10px;color:var(--muted);margin-top:3px}
.habits-feature .circle-streak svg{width:12px;height:12px}
.habits-feature.hide-habit-goals .habit-goal{display:none}
.habits-feature .week-grid-scroll{overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
.habits-feature .week-grid{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:12px}
.habits-feature .week-grid thead th{height:62px;font-weight:400;color:var(--muted);background:var(--soft);border-block:1px solid var(--line);text-align:center}
.habits-feature .week-grid thead th:first-child{width:25%;text-align:left;padding-left:23px}
.habits-feature .week-grid thead .week-action-column{width:19%}
.habits-feature .week-grid-day span{display:block;font-size:11px}
.habits-feature .week-grid-day b{display:inline-grid;place-items:center;width:23px;height:23px;margin-top:5px;font-size:12px;font-weight:500}
.habits-feature .week-grid .today-col{background:color-mix(in srgb,var(--accent) 7%,var(--surface))}
.habits-feature .week-grid-day.today-col b{background:var(--habit-active);color:var(--surface);border-radius:50%}
.habits-feature .week-grid tbody th{font-weight:400;text-align:left;padding:14px 10px 14px 22px}
.habits-feature .week-grid tbody th,.habits-feature .week-grid td{height:77px;border-bottom:1px solid var(--line)}
.habits-feature .week-grid tbody tr:last-child th,.habits-feature .week-grid tbody tr:last-child td{border-bottom:0}
.habits-feature .week-grid .table-habit{gap:9px;min-width:0;max-width:100%}
.habits-feature .week-grid .habit-info{min-width:0;width:100%;max-width:100%;overflow:hidden}
.habits-feature .week-grid .habit-symbol{width:32px;height:32px;border-radius:9px}
.habits-feature .week-grid .habit-symbol svg{width:17px;height:17px}
.habits-feature .week-grid .habit-name{font-size:13px;white-space:normal;overflow-wrap:anywhere}
.habits-feature .week-grid .habit-subline{font-size:11px;margin-top:4px}
.habits-feature .week-grid td{text-align:center;padding:0 4px}
.habits-feature .week-grid .cell{width:30px;height:30px;max-width:100%;border-radius:7px;margin:auto;font-size:12px}
.habits-feature .week-panel .cell.complete{background:color-mix(in srgb,var(--green) 16%,var(--surface));border-color:transparent;color:var(--green)}
.habits-feature .week-panel .cell.partial{background:var(--accent-soft);border-color:transparent;color:var(--habit-active-text);font-size:12px}
.habits-feature .week-panel .cell.empty{border:1px dashed var(--line);color:var(--habit-active-text);background:none}
.habits-feature .week-panel .cell.future{width:7px;height:7px;border:1px solid var(--line);border-radius:50%;background:none;padding:0;opacity:1}
.habits-feature .week-panel .cell.rest{border:0;background:none}
.habits-feature .week-day-action{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:9px;min-width:0}
.habits-feature .week-day-value{min-width:0;padding:0;background:none;border:0;color:var(--text);font-size:12px;line-height:1.4;text-align:center;font-variant-numeric:tabular-nums}
.habits-feature .week-day-value strong{display:block;font-weight:400}
.habits-feature .week-day-value small{display:block;color:var(--muted);font-size:11px;overflow-wrap:anywhere;max-width:90px}
.habits-feature .week-quick-action{display:grid;place-items:center;min-width:34px;min-height:34px;padding:0 6px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--habit-active-text);font-size:12px;font-weight:600;white-space:nowrap}
.habits-feature .week-quick-action svg{width:16px;height:16px}
.habits-feature .week-quick-action.complete{background:color-mix(in srgb,var(--green) 16%,var(--surface));border-color:transparent;color:var(--green)}
.habits-feature .week-plan-complete{font-size:11px;line-height:1.5;color:var(--muted)}
.habits-feature .week-mobile-cards{display:none}
.habits-feature .week-legend{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:16px 23px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}
.habits-feature .week-legend b{font-weight:500;color:var(--green)}
.habits-feature .week-empty{padding:24px;color:var(--muted);font-size:12px}
.habits-feature .habit-desktop-controls{display:flex;align-items:center;gap:8px;margin-left:auto}
.habits-feature .habit-controls{width:390px}
.habits-feature .controls-body{display:flex;flex-direction:column;gap:18px}
.habits-feature .controls-body .field{margin:0}
.habits-feature .controls-body .field input[type=range]{padding:0}
.habits-feature .calendar-period{border:0;padding:0;margin:0;min-width:0}
.habits-feature .calendar-period legend{padding:0;margin-bottom:9px;font-size:12px;font-weight:600}
.habits-feature .control-check{display:flex;align-items:center;gap:10px;min-height:44px;font-size:13px;line-height:1.5}
.habits-feature .control-check input{width:18px;height:18px;accent-color:var(--habit-active)}

/* Calendar day selection and readonly four month history. */
.habits-feature .habit-calendar-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr);align-items:start;gap:22px}
.habits-feature .calendar-month-panel{padding-bottom:20px}
.habits-feature .calendar-month-panel .calendar-toolbar{padding:20px 22px 13px;flex-wrap:nowrap}
.habits-feature .calendar-month-panel .calendar-filters{padding:0 22px 16px}
.habits-feature .calendar-month-weekdays,.habits-feature .calendar-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin:0 22px}
.habits-feature .calendar-month-weekdays{margin-bottom:9px;color:var(--muted);text-align:center;font-size:11px}
.habits-feature .calendar-month-day{min-height:76px;border:1px solid transparent;border-radius:10px;background:var(--soft);display:flex;flex-direction:column;align-items:center;gap:5px;padding:10px 4px;min-width:0}
.habits-feature .calendar-month-day strong{font-size:16px;font-weight:500}
.habits-feature .calendar-month-day span{font-size:10px;color:var(--muted)}
.habits-feature .calendar-month-day i{display:block;width:20px;height:3px;border-radius:3px;background:linear-gradient(to right,var(--habit-active) var(--calendar-done),var(--line) 0)}
.habits-feature .calendar-month-day.is-today{box-shadow:inset 0 0 0 1px var(--habit-active)}
.habits-feature .calendar-month-day.selected{background:var(--accent-soft);border-color:var(--habit-active);color:var(--habit-active-text)}
.habits-feature .calendar-month-day.future{opacity:.6}
.habits-feature .calendar-month-hint{margin:17px 22px 0;font-size:11px;color:var(--muted);line-height:1.6}
.habits-feature .calendar-day-habits{padding:0 22px}
.habits-feature .calendar-day-habit{display:flex;align-items:center;gap:11px;min-height:78px;border-bottom:1px solid var(--line)}
.habits-feature .calendar-day-habit:last-child{border:0}
.habits-feature .calendar-day-habit .habit-info{padding:12px 0;min-width:0}
.habits-feature .calendar-day-habit .habit-name{white-space:normal;overflow-wrap:anywhere}
.habits-feature .calendar-day-habit .cell{width:39px;height:39px;min-width:39px;margin:0}
.habits-feature .history-toolbar{flex-wrap:wrap;gap:12px}
.habits-feature .history-toolbar>.month-controls{margin-left:auto}
.habits-feature .history-toolbar h2{font-size:20px}
.habits-feature .history-toolbar .history-filters{width:100%;justify-content:flex-end}
.habits-feature .history-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.habits-feature .history-card{min-width:0;overflow:hidden}
.habits-feature .history-card-heading{padding:21px 22px 16px}
.habits-feature .history-ratio{font-size:21px;font-weight:600;color:var(--habit-color)}
.habits-feature .history-months{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;padding:0 22px 20px}
.habits-feature .history-month{min-width:0}
.habits-feature .history-month h3{font-size:11px;margin-bottom:9px;font-weight:500}
.habits-feature .history-month-weekdays,.habits-feature .history-month .heatmap-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.habits-feature .history-month-weekdays{font-size:7px;color:var(--muted);text-align:center;margin-bottom:4px}
.habits-feature .history-month .heatmap-cell{height:auto;border-radius:3px;aspect-ratio:1;min-width:0;position:relative}
.habits-feature .history-month .heatmap-cell span{display:none}
.habits-feature .history-month .heat-future{opacity:.25}
.habits-feature .history-month .heatmap-cell.heat-before{opacity:.45}
.habits-feature .history-card-footer{padding:0 22px}
.habits-feature .history-window{padding:0 22px 18px;min-width:0}
.habits-feature .history-window .heatmap-months{height:22px;font-size:10px}
.habits-feature .history-window .heatmap-cell{border-radius:3px}
.habits-feature .history-window .heat-future{opacity:.25}
.habits-feature .history-window .heat-level-1{background:color-mix(in srgb,var(--habit-color) 28%,var(--surface));border:0}
.habits-feature .history-window .heat-level-2{background:color-mix(in srgb,var(--habit-color) 48%,var(--surface));border:0}
.habits-feature .history-window .heat-level-3{background:color-mix(in srgb,var(--habit-color) 72%,var(--surface));border:0}
.habits-feature .history-window .heat-level-4{background:var(--habit-color);border:0}
.habits-feature .history-ratio small{font-size:11px;font-weight:400;color:var(--muted)}
.habits-feature .history-metrics{display:flex;gap:8px 15px;padding:12px 0;font-size:10px}
.habits-feature .history-today{border-top:1px solid var(--line);padding:13px 0;min-height:48px;width:100%;text-align:left}
.habits-feature .readonly-result{font-size:23px;font-weight:600;color:var(--habit-active-text);margin:24px 0}

/* Detail and complete editor use native dialogs for focus and Escape support. */
.habits-feature .detail{width:620px}
.habits-feature .detail[open]{display:flex;flex-direction:column;max-height:92dvh}
.habits-feature .detail .modal-header,.habits-feature .detail .modal-footer{flex-shrink:0}
.habits-feature .detail .modal-body{padding:25px 28px;max-height:none;overflow-y:auto;min-height:0}
.habits-feature .detail .modal-header h2{font-size:13px;color:var(--muted);font-weight:400}
.habits-feature .detail-status{margin-left:auto;color:var(--green);font-size:11px;background:var(--green-soft);padding:5px 8px;border-radius:6px}
.habits-feature .detail-title{gap:15px;margin:0;align-items:center}
.habits-feature .detail-title>div{min-width:0}
.habits-feature .detail-title .habit-symbol{width:56px;height:56px;border-radius:15px;background:color-mix(in srgb,var(--habit-color) 25%,var(--surface));border:1px solid color-mix(in srgb,var(--habit-color) 38%,transparent)}
.habits-feature .detail-title h2{font-size:28px;line-height:1.2;overflow-wrap:anywhere;letter-spacing:-.6px;margin-top:4px}
.habits-feature .detail-type{font-size:11px;color:var(--muted)}
.habits-feature .detail-intro{font-size:13px;line-height:1.7;margin:17px 0;color:var(--muted)}
.habits-feature .detail-actions{margin:0 0 23px;display:flex;gap:8px;flex-wrap:wrap}
.habits-feature .detail-actions button{min-height:44px;font-size:12px}
.habits-feature .detail-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;background:var(--soft);border:1px solid var(--line);border-radius:11px;padding:16px 18px;margin-bottom:23px}
.habits-feature .detail-facts>div{display:flex;flex-direction:column;gap:5px;min-width:0}
.habits-feature .detail-facts span{font-size:11px;color:var(--muted)}
.habits-feature .detail-facts strong{font-size:14px;font-weight:600;overflow-wrap:anywhere}
.habits-feature .detail-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.habits-feature .detail-section-head h3{font-size:13px;font-weight:600}
.habits-feature .detail-section-head span{font-size:11px;color:var(--muted)}
.habits-feature .detail-schedule,.habits-feature .detail-recent{margin-bottom:23px}
.habits-feature .detail-schedule-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px}
.habits-feature .detail-schedule-days span{display:grid;place-items:center;min-height:32px;border:1px solid var(--line);border-radius:7px;font-size:11px;color:var(--muted)}
.habits-feature .detail-schedule-days .planned{background:var(--accent-soft);color:var(--habit-active-text);border-color:color-mix(in srgb,var(--habit-active) 45%,var(--line));font-weight:600}
.habits-feature .detail-today{padding:17px 18px;background:color-mix(in srgb,var(--habit-color) 14%,var(--surface));border:1px solid color-mix(in srgb,var(--habit-color) 40%,var(--line));border-radius:11px;margin-bottom:23px}
.habits-feature .detail-today .detail-section-head>div>span{display:block;margin-top:4px}
.habits-feature .detail-today-value{font-size:24px;color:var(--habit-active-text);font-weight:600}
.habits-feature .detail-today-value small{font-size:12px;font-weight:400;color:var(--muted)}
.habits-feature .detail-track{height:6px;border-radius:4px;background:var(--line);overflow:hidden}
.habits-feature .detail-track i{display:block;height:100%;background:var(--habit-color)}
.habits-feature .detail-today p{margin-top:10px;font-size:11px;line-height:1.6}
.habits-feature .detail-recent-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.habits-feature .detail-recent-days>div{display:flex;flex-direction:column;align-items:center;gap:6px;padding:9px 2px;background:var(--soft);border:1px solid transparent;border-radius:9px;min-width:0}
.habits-feature .detail-recent-days span{font-size:11px;color:var(--muted)}
.habits-feature .detail-recent-days b{font-size:13px;font-weight:500}
.habits-feature .detail-recent-days em{font-size:13px;font-style:normal}
.habits-feature .detail-recent-days .current{border-color:var(--habit-active);background:var(--accent-soft)}
.habits-feature .detail-recent-days .complete{color:var(--green)}
.habits-feature .detail-stat-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.habits-feature .detail-stat-row>div{display:flex;flex-direction:column;gap:6px}
.habits-feature .detail-stat-row strong{font-size:23px;font-weight:600;font-variant-numeric:tabular-nums}
.habits-feature .detail-stat-row small,.habits-feature .detail-stat-row span{font-size:11px;font-weight:400;color:var(--muted)}
.habits-feature .detail .text-action{margin-top:22px}
.habits-feature .detail .modal-footer{gap:9px}
.habits-feature .detail .modal-footer button{font-size:12px;min-height:42px}
.habits-feature .editor{width:860px;max-width:calc(100vw - 48px)}
.habits-feature .editor form{display:flex;flex-direction:column;max-height:90dvh}
.habits-feature .editor .modal-header,.habits-feature .editor .modal-footer{flex-shrink:0}
.habits-feature .editor .modal-body{min-height:0;max-height:none;overflow-y:auto;padding:28px}
.habits-feature .editor-grid{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:32px}
.habits-feature .editor-main{min-width:0;padding:0}
.habits-feature .editor-name{margin-bottom:25px}
.habits-feature .editor .field{margin-bottom:22px;min-width:0}
.habits-feature .editor .field>span{font-size:13px;margin-bottom:9px}
.habits-feature .editor .field input,.habits-feature .editor .field select{height:46px;padding:11px 13px;font-size:15px;background:var(--soft);border-radius:9px;min-width:0}
.habits-feature .editor .field input[type=number]{appearance:textfield}
.habits-feature .editor .schedule-options{padding:4px;background:var(--soft);border:1px solid var(--line);border-radius:10px;gap:4px;margin-bottom:15px}
.habits-feature .editor .schedule-options button{min-height:40px;min-width:0;flex:1;padding:7px 6px;font-size:11px;border:0;border-radius:7px;white-space:normal;background:transparent}
.habits-feature .editor .schedule-options button.active{background:var(--accent-soft);color:var(--habit-active-text);font-weight:600}
.habits-feature .editor .weekday-options{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin-bottom:15px}
.habits-feature .editor .weekday-options button{width:100%;min-height:44px;height:44px;min-width:0;border-radius:8px;font-size:12px}
.habits-feature .editor .weekday-options button.active{background:var(--habit-active);color:var(--surface);font-weight:600;border-color:var(--habit-active)}
.habits-feature .editor-schedule-hint{font-size:11px;color:var(--muted);line-height:1.6;margin:12px 0 20px}
.habits-feature .editor .field-row{gap:14px 16px}
.habits-feature .editor .field-row .field{margin-bottom:10px}
.habits-feature .step-preview{display:flex;gap:9px;align-items:center;font-size:11px;line-height:1.6;color:var(--muted);padding-top:20px}
.habits-feature .step-preview>svg{color:var(--habit-active-text);background:var(--accent-soft);width:27px;height:27px;padding:5px;border-radius:7px}
.habits-feature .step-preview strong{font-weight:600;color:var(--habit-active-text)}
.habits-feature .editor-appearance{padding:19px;background:var(--soft);border:1px solid var(--line);border-radius:12px;align-self:start;min-width:0}
.habits-feature .editor-preview{display:flex;align-items:center;gap:12px;margin-bottom:24px}
.habits-feature .editor-preview>div{min-width:0}
.habits-feature .editor-preview span:not(.habit-symbol){display:block;font-size:10px;color:var(--muted);margin-bottom:4px}
.habits-feature .editor-preview strong{display:block;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.habits-feature .editor-preview .habit-symbol{width:43px;height:43px;border-radius:12px}
.habits-feature .editor .palette{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin-bottom:25px}
.habits-feature .editor .color-choice{width:30px;height:30px;margin:auto;border:3px solid transparent;padding:5px;background:var(--color);border-radius:50%;outline:0}
.habits-feature .editor .color-choice svg{width:13px;height:13px;opacity:0;color:white}
.habits-feature .editor .color-choice.selected{border-color:var(--surface);box-shadow:0 0 0 2px var(--color)}
.habits-feature .editor .color-choice.selected svg{opacity:1}
.habits-feature .editor .icon-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.habits-feature .editor .icon-choice{width:100%;height:37px;min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--muted)}
.habits-feature .editor .icon-choice.selected{background:var(--accent-soft);border-color:var(--habit-active);color:var(--habit-active-text)}
.habits-feature .editor-appearance>.field-hint{text-align:center;display:block;margin-top:12px}
.habits-feature .editor-notice{font-size:11px;color:var(--muted);line-height:1.6;margin-top:22px}
.habits-feature .editor .form-error:empty{display:none}

@media(max-width:1200px){
 .habits-feature .history-cards{grid-template-columns:minmax(0,1fr)}
 .habits-feature .habit-calendar-layout{grid-template-columns:minmax(0,1fr) minmax(260px,.8fr);gap:16px}
 .habits-feature .habit-circles{grid-template-columns:repeat(auto-fit,minmax(105px,1fr))}
}
@media(max-width:900px){
 .habits-feature .habit-calendar-layout{grid-template-columns:minmax(0,1fr)}
 .habits-feature .calendar-month-grid,.habits-feature .calendar-month-weekdays{gap:6px}
 .habits-feature .editor-grid{grid-template-columns:minmax(0,1fr) 220px;gap:22px}
}
@media(max-width:760px){
 .habits-feature .page-heading,.habits-feature .habit-import-banner,.habits-feature .habit-desktop-controls,.habits-feature .calendar-filters,.habits-feature .history-filters{display:none}
 .habits-feature .view-topline{margin:0 0 17px;padding:0;min-height:0}
 .habits-feature .view-tabs{display:flex;width:100%;padding:0;gap:0;background:transparent;border-radius:0;border-bottom:1px solid var(--line)}
 .habits-feature .view-tab{flex:1;padding:12px 5px;min-height:44px;border-radius:0;font-size:12px;border-bottom:2px solid transparent}
 .habits-feature .view-tab svg{display:none}
 .habits-feature .view-tab.active{background:transparent;box-shadow:none;border-bottom-color:var(--habit-active);color:var(--habit-active-text)}
 .habits-feature .today-layout{grid-template-columns:minmax(0,1fr);gap:16px}
 .habits-feature .today-main{gap:17px}
 .habits-feature .side-stack{display:none}
 .habits-feature .habit-circles{grid-template-columns:repeat(auto-fit,minmax(min(100%,max(calc((100% - 12px)/2),var(--habit-ring-size))),1fr));gap:24px 12px;padding:22px 14px 25px}
 .habits-feature .habit-circle{width:min(var(--habit-ring-size),100%);height:auto;aspect-ratio:1}
 .habits-feature .habit-circle>svg{width:27px;height:27px}
 .habits-feature .habit-ritual .habit-name{font-size:12px}
 .habits-feature .habit-ritual .numeric-control{width:100%;max-width:120px}
 .habits-feature .habit-ritual .numeric-control .value-button{font-size:10px;min-width:44px;min-height:44px;line-height:1.5;padding:3px 0;flex:1}
 .habits-feature .habit-ritual .numeric-control .icon-button{width:44px;min-width:44px;height:44px;min-height:44px;padding:0}
 .habits-feature .today-count{font-size:10px}
 .habits-feature .panel-top{padding:19px 14px}
 .habits-feature .panel-top h2{font-size:18px}
 .habits-feature .panel-top p{font-size:11px}
 .habits-feature .week-panel{border:0;background:none;box-shadow:none;overflow:visible}
 .habits-feature .week-panel .panel-top{gap:6px;flex-wrap:wrap;padding:3px 2px 13px}
 .habits-feature .week-panel .panel-top h2{font-size:19px}
 .habits-feature .week-panel .date-controls{margin-left:auto;gap:2px}
 .habits-feature .week-panel .date-controls .icon-button{width:36px;min-height:44px}
 .habits-feature .week-panel .week-date-range{font-size:11px;padding:4px 3px;min-height:44px;color:var(--muted);background:none;border:0}
 .habits-feature .week-grid-scroll,.habits-feature .week-legend{display:none}
 .habits-feature .week-mobile-cards{display:grid;gap:10px}
 .habits-feature .week-mobile-card{min-width:0;padding:15px 14px;background:var(--surface);border:1px solid var(--line);border-radius:13px}
 .habits-feature .week-mobile-card-top{display:grid;grid-template-columns:31px minmax(0,1fr) auto;align-items:center;gap:9px;margin-bottom:13px}
 .habits-feature .week-mobile-card-top>.habit-symbol{width:31px;height:31px;border-radius:9px}
 .habits-feature .week-mobile-card-top>.habit-symbol svg{width:17px;height:17px}
 .habits-feature .week-mobile-card .habit-info{min-width:0;text-align:left}
 .habits-feature .week-mobile-card .habit-name{display:block;font-size:13px;line-height:1.45;white-space:normal;overflow-wrap:anywhere}
 .habits-feature .week-mobile-subtitle{display:block;font-size:11px;color:var(--muted);line-height:1.5;margin-top:3px;overflow-wrap:anywhere}
 .habits-feature .week-mobile-card .week-day-action{gap:7px;max-width:125px}
 .habits-feature .week-mobile-card .week-day-value{min-height:44px;display:flex;flex-direction:column;justify-content:center;font-size:11px}
 .habits-feature .week-mobile-card .week-quick-action{min-width:44px;min-height:44px}
 .habits-feature .week-mobile-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;text-align:center}
 .habits-feature .week-mobile-day{min-width:0}
 .habits-feature .week-mobile-day>span{display:block;font-size:11px;color:var(--muted);margin-bottom:8px}
 .habits-feature .week-mobile-day.is-today>span{color:var(--habit-active-text);font-weight:600}
 .habits-feature .week-mobile-mark{display:grid;place-items:center;min-height:40px}
 .habits-feature .week-mobile-mark .cell{width:100%;max-width:100%;height:40px;margin:0;border-radius:7px;font-size:12px}
 .habits-feature .week-mobile-mark .cell.future{width:7px;height:7px;border-radius:50%}
 .habits-feature .week-panel .add-row{padding:16px 2px 8px}
 .habits-feature .calendar-month-panel .calendar-toolbar{padding:17px 12px 14px;gap:5px}
 .habits-feature .month-controls{display:flex;align-items:center;gap:5px;width:auto}
 .habits-feature .month-controls h2{font-size:18px;min-width:0}
 .habits-feature .month-controls>.small-button{grid-column:auto;white-space:nowrap}
 .habits-feature .calendar-month-grid,.habits-feature .calendar-month-weekdays{margin-left:12px;margin-right:12px;gap:4px}
 .habits-feature .calendar-month-day{min-height:59px;padding:7px 2px 6px;gap:3px;border-radius:8px}
 .habits-feature .calendar-month-day strong{font-size:14px}
 .habits-feature .calendar-day-habits{padding:0 14px}
 .habits-feature .calendar-day-habit{min-height:69px;gap:9px}
 .habits-feature .calendar-day-habit .habit-symbol{width:30px;height:30px;border-radius:8px}
 .habits-feature .calendar-day-habit .habit-name{font-size:13px}
 .habits-feature .history-toolbar{align-items:center}
 .habits-feature .history-toolbar h2{font-size:19px}
 .habits-feature .history-toolbar p{font-size:11px}
 .habits-feature .history-toolbar>.month-controls{margin-left:0}
 .habits-feature .history-view-legend{align-items:start;gap:10px;flex-wrap:wrap}
 .habits-feature .history-view-legend p{font-size:11px;line-height:1.6}
 .habits-feature .history-card-heading{padding:17px 14px 16px}
 .habits-feature .history-card-heading .habit-name{font-size:14px}
 .habits-feature .history-card-heading .habit-subline{font-size:10px}
 .habits-feature .history-months{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;padding:0 14px 12px}
 .habits-feature .history-month h3{font-size:9px}
 .habits-feature .history-month-weekdays{display:none}
 .habits-feature .history-month .heatmap-grid{gap:2px}
 .habits-feature .history-month .heatmap-cell{border-radius:1.5px}
 .habits-feature .history-card-footer{padding:0 14px}
 .habits-feature .history-window{padding:0 14px 12px}
 .habits-feature .history-window .heatmap-months{font-size:9px}
 .habits-feature .history-window .heatmap-cell{border-radius:2px}
 .habits-feature .history-metrics{gap:9px;font-size:10px;line-height:1.7;flex-wrap:wrap}
 .habits-feature .history-today{font-size:11px}
 .habits-feature .habit-controls{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;border-radius:18px 18px 0 0;max-height:85dvh;padding-bottom:env(safe-area-inset-bottom,0px)}
 .habits-feature .habit-controls .modal-body{padding-bottom:26px}
 .habits-feature .detail,.habits-feature .editor{position:fixed;inset:0;width:100%;max-width:none;margin:0;border-radius:0;border:0;height:100dvh;max-height:100dvh}
 .habits-feature .detail[open],.habits-feature .editor[open]{height:100dvh;max-height:100dvh;display:flex;flex-direction:column}
 .habits-feature .detail .modal-header,.habits-feature .editor .modal-header{padding:12px 15px;min-height:65px;align-items:center}
 .habits-feature .detail .modal-header h2{font-size:15px;font-weight:600;color:var(--text)}
 .habits-feature .detail .modal-body{padding:23px 18px}
 .habits-feature .detail-title h2{font-size:26px}
 .habits-feature .detail-title .habit-symbol{width:50px;height:50px;border-radius:13px}
 .habits-feature .detail-actions .primary{width:100%}
 .habits-feature .detail-facts{padding:15px;gap:14px}
 .habits-feature .detail-facts strong{font-size:13px}
 .habits-feature .detail-recent-days{gap:4px}
 .habits-feature .detail-stat-row{gap:10px}
 .habits-feature .detail-stat-row strong{font-size:22px}
 .habits-feature .detail .modal-footer{padding:15px 14px calc(15px + env(safe-area-inset-bottom,0px));gap:7px;flex-wrap:nowrap}
 .habits-feature .detail .modal-footer button{flex:1;min-width:0;font-size:11px;padding:9px 7px;min-height:44px}
 .habits-feature .detail .modal-footer button svg{width:16px;height:16px}
 .habits-feature .editor{width:100%;max-width:none}
 .habits-feature .editor form{height:100dvh;max-height:100dvh;min-height:0;flex:1}
 .habits-feature .editor .modal-body{padding:23px 18px;min-height:0;flex:1}
 .habits-feature .editor-grid{grid-template-columns:minmax(0,1fr);gap:24px}
 .habits-feature .editor .field input,.habits-feature .editor .field select{font-size:16px}
 .habits-feature .editor .field-row{gap:20px 12px}
 .habits-feature .editor .schedule-options button{min-height:44px;font-size:11px}
 .habits-feature .editor-appearance{padding:18px}
 .habits-feature .editor .palette{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
 .habits-feature .editor .color-choice{width:40px;height:40px}
 .habits-feature .editor .color-choice svg{width:17px;height:17px}
 .habits-feature .editor .icon-options{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
 .habits-feature .editor .icon-choice{height:44px}
 .habits-feature .editor .modal-footer{flex-wrap:nowrap;padding:15px 18px calc(15px + env(safe-area-inset-bottom,0px))}
 .habits-feature .editor .modal-footer button{flex:1;min-height:44px}
}
@media(max-width:360px){
 .habits-feature .habit-circles{gap:22px 5px;padding-left:9px;padding-right:9px}
 .habits-feature .week-grid .cell{width:25px;height:32px}
 .habits-feature .week-grid tbody th{padding-left:9px;padding-right:3px}
 .habits-feature .week-grid thead th:first-child{width:26%;padding-left:9px}
 .habits-feature .detail .modal-body,.habits-feature .editor .modal-body{padding:20px 14px}
 .habits-feature .editor .field-row{gap:18px 10px}
}
