.auth-shell{min-height:100vh;padding:0 1rem 2rem;background:var(--bg-color)}.auth-top-bar{display:flex;justify-content:flex-end;align-items:center;padding:.65rem 0 1rem;max-width:420px;margin:0 auto}.auth-page{max-width:360px;margin:0 auto;padding:1.5rem}.auth-form{display:flex;flex-direction:column;gap:1rem}.auth-form label{display:flex;flex-direction:column;gap:.35rem;font-size:.9rem;color:var(--text-main)}.auth-form .site-field{width:100%}.auth-error{margin:0;font-size:.875rem;color:var(--error-text);background:var(--error-bg);padding:.5rem .65rem;border-radius:10px;border:1px solid var(--border-subtle)}.auth-switch{margin:1.25rem 0 0;font-size:.9rem}.habit-form{display:flex;flex-direction:column;gap:1rem}.habit-form-field{display:flex;flex-direction:column;gap:.35rem;font-size:.9rem}.habit-form-field input[type=text].site-field{width:100%}.habit-form-palette{display:flex;flex-wrap:wrap;gap:.5rem}.habit-form-swatch{width:32px;height:32px;padding:0;border:2px solid var(--border-subtle);border-radius:10px;cursor:pointer;flex-shrink:0;transition:border-color .15s,box-shadow .15s}.habit-form-swatch:hover{border-color:var(--link)}.habit-form-swatch--active{border-color:var(--text-main);box-shadow:0 0 0 2px var(--card-bg),0 0 0 4px var(--link)}.habit-form-actions{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.25rem}.habit-form-actions--single{justify-content:flex-start}.habit-form-actions--cancel-only{justify-content:flex-end}.habit-form-actions .site-nav-btn:disabled{opacity:.6;cursor:not-allowed}.habit-form-danger{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;padding-top:.75rem;margin-top:.5rem;border-top:1px solid var(--border-subtle)}.habit-form-archive{padding:.45rem .75rem;border:1px solid #ca8a04;border-radius:999px;background:#fffbeb;color:#a16207;font-size:.875rem}html[data-theme=dark] .habit-form-archive{background:#ca8a0426;color:#fbbf24;border-color:#fbbf2473}.habit-form-delete{padding:.45rem .75rem;border:1px solid #dc2626;border-radius:999px;background:var(--error-bg);color:var(--error-text);font-size:.875rem}html[data-theme=dark] .habit-form-delete{border-color:#f8717173}.habit-modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;display:flex;align-items:flex-start;justify-content:center;padding:2rem 1rem;background:#0006;overflow-y:auto}.habit-modal{width:100%;max-width:400px;margin:auto;padding:1.25rem;background:var(--card-bg);border-radius:12px;box-shadow:var(--shadow-modal)}.habit-modal-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:1rem}.habit-modal-head h2{margin:0;font-size:1.1rem;color:var(--text-main)}.habit-modal-close{flex-shrink:0;font-size:1.35rem;line-height:1;color:var(--text-muted)}.habit-modal-close:hover:not(:disabled){color:var(--text-main)}.habit-day-modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:1.5rem 1rem;background:#00000073;overflow-y:auto}.habit-day-modal--minimal{width:100%;max-width:300px;margin:auto;padding:0;overflow:hidden;background:var(--card-bg);border:1px solid var(--border-subtle);border-radius:12px;box-shadow:var(--shadow-modal)}.habit-day-modal-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.habit-day-modal-body{display:flex;flex-direction:column;align-items:stretch;min-height:9rem;padding:1.25rem 1rem 1rem;box-sizing:border-box}.habit-day-modal-notes-label{margin:0 0 .75rem;font-size:1rem;font-weight:500;text-align:center;color:var(--text-main)}.habit-day-modal-notes-input{flex:1;width:100%;min-height:5rem;margin:0;padding:.55rem .65rem;box-sizing:border-box;border:1px solid var(--border-subtle);border-radius:8px;background:var(--bg-color);color:var(--text-main);font:inherit;font-size:.95rem;line-height:1.45;resize:vertical;text-align:left}.habit-day-modal-notes-input:focus{outline:none;border-color:var(--link)}.habit-day-modal-notes-input::placeholder{color:var(--text-muted)}.habit-day-modal-notes-input:disabled{opacity:.6}.habit-day-modal-footer{display:flex;flex-direction:row;align-items:stretch;border-top:1px solid var(--border-subtle);min-height:3.25rem}.habit-day-modal-foot-btn{flex:1;margin:0;padding:0;border:none;background:transparent;cursor:pointer;font-family:inherit;display:inline-flex;align-items:center;justify-content:center;font-size:1.35rem;line-height:0;transition:background .15s,color .15s}.habit-day-modal-foot-btn:disabled{opacity:.45;cursor:not-allowed}.habit-day-modal-foot-btn--done{color:var(--link)}.habit-day-modal-foot-btn--done:hover:not(:disabled){background:var(--bg-color)}.habit-day-modal-foot-btn--cancel{color:var(--text-muted)}.habit-day-modal-foot-btn--cancel:hover:not(:disabled){background:var(--bg-color);color:var(--text-main)}.habit-day-modal-foot-sep{width:1px;flex-shrink:0;background:var(--border-subtle)}.habit-day-modal-foot-btn span{display:inline-flex;align-items:center;justify-content:center;line-height:1}.habit-row{border-bottom:1px solid var(--border-subtle)}.habit-row-label{padding:.5rem .65rem;text-align:left;font-weight:500;vertical-align:middle;background:var(--bg-color);color:var(--text-main)}.habit-row-label-inner{display:flex;align-items:center;gap:.4rem;min-width:0}.habit-row-handle{cursor:grab;color:var(--text-muted);font-size:.85rem;line-height:1;-webkit-user-select:none;user-select:none;flex-shrink:0}.habit-row-handle:active{cursor:grabbing}.habit-row-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}.habit-row-name{flex:1;min-width:0;padding:0;border:none;background:none;text-align:left;font:inherit;font-weight:500;text-decoration:none;white-space:normal;overflow-wrap:anywhere;word-break:break-word;color:inherit}.habit-row-name:hover{color:var(--link);text-decoration:underline}.habit-cell{padding:.35rem;text-align:center;vertical-align:middle;border-left:1px solid var(--border-subtle)}.habit-cell-inner{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:2rem;min-height:2rem;padding:0;border:none;border-radius:8px;font-size:.85rem;cursor:pointer;font:inherit}.habit-cell-inner--todo{color:var(--text-muted);background:var(--bg-color)}.habit-cell-inner--not_done{color:var(--text-muted);background:var(--bg-color);opacity:.95}.habit-cell-inner--done{color:var(--success-text);background:var(--success-bg)}.habit-cell-glyph{line-height:1}.habit-cell-note{position:absolute;top:3px;right:4px;width:5px;height:5px;border-radius:50%;background:var(--link)}.habits-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.5rem}.habits-toolbar-nav,.habits-toolbar-extra{display:contents}@media(max-width:640px){.habits-toolbar{flex-direction:column;align-items:stretch;justify-content:flex-start;gap:.5rem}.habits-toolbar-nav,.habits-toolbar-extra{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}.habits-toolbar-nav{justify-content:flex-start}.habits-toolbar-extra{justify-content:flex-start;padding-top:.45rem;border-top:1px solid var(--border-subtle)}}.habits-toolbar-link--active{color:var(--text-main);border-color:var(--link)}.habits-import-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.habits-menu-toggle{flex-shrink:0;font-size:1.2rem;font-weight:500;line-height:1}.habits-header-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:60;background:#00000059;animation:habits-backdrop-in .2s ease}@keyframes habits-backdrop-in{0%{opacity:0}to{opacity:1}}.habits-header-drawer{position:fixed;top:0;right:0;z-index:70;height:100%;height:100dvh;width:min(18.5rem,88vw);max-width:100%;padding:max(.85rem,env(safe-area-inset-top)) max(.85rem,env(safe-area-inset-right)) max(1rem,env(safe-area-inset-bottom)) max(.85rem,env(safe-area-inset-left));background:var(--card-bg);border-left:1px solid var(--border-subtle);box-shadow:-8px 0 32px #0000001f;transform:translate(100%);transition:transform .22s ease;display:flex;flex-direction:column;pointer-events:none;visibility:hidden}html[data-theme=dark] .habits-header-drawer{box-shadow:-8px 0 32px #00000073}.habits-header-drawer--open{transform:translate(0);pointer-events:auto;visibility:visible}.habits-header-drawer-inner{display:flex;flex-direction:column;align-items:stretch;gap:1rem;flex:1;min-height:0;overflow-y:auto}.habits-header-drawer-inner .habits-toolbar{flex-direction:column;align-items:stretch;justify-content:flex-start;width:100%}.habits-header-drawer-inner .habits-toolbar-nav,.habits-header-drawer-inner .habits-toolbar-extra{display:flex;flex-direction:column;align-items:stretch;gap:.5rem}.habits-header-drawer-inner .site-nav-btn{width:100%;justify-content:center;box-sizing:border-box}.habits-header-drawer-inner a.site-nav-btn{text-align:center}.habits-header>.habits-add-btn.site-icon-btn{flex-shrink:0}.habits-screen{max-width:960px;margin:0 auto;padding:1rem 1.25rem 2rem}.habits-header{display:flex;align-items:flex-start;justify-content:flex-start;gap:1rem;flex-wrap:wrap;margin-bottom:1.5rem}@media(min-width:640px){.habits-header{align-items:center}}.habits-title{margin:0;flex:1;min-width:0;font-size:1.25rem;font-weight:600;color:var(--text-main)}.habits-add-btn.site-icon-btn{font-size:1.5rem;font-weight:300;line-height:0}.habits-error{margin:0 0 1rem;padding:.65rem 1rem;font-size:.875rem;color:var(--error-text);background:var(--error-bg);border-radius:10px;border:1px solid var(--border-subtle)}.habits-empty{margin:0;padding:2rem 1rem;text-align:center;color:var(--text-muted);background:var(--card-bg);border-radius:12px;border:1px dashed var(--border-subtle);box-shadow:var(--shadow-card)}.habits-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.habits-list-item{display:flex;align-items:center;gap:.65rem;width:100%;padding:.75rem 1rem;text-align:left;border:1px solid var(--border-subtle);border-radius:10px;background:var(--card-bg);font-size:1rem;color:var(--text-main)}.habits-list-item:hover{border-color:var(--link);background:var(--card-bg)}.habits-dot{width:12px;height:12px;border-radius:50%;flex-shrink:0}.habits-list-title{flex:1;min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:break-word}.habit-detail .habits-header{flex-wrap:wrap}.habits-back{text-decoration:none;color:var(--link);font-size:.95rem}.habits-back:hover{text-decoration:underline}.habits-calendar-frame{width:100%;max-width:100%;border-radius:12px;border:1px solid var(--border-subtle);background:var(--card-bg);box-shadow:var(--shadow-card);overflow:hidden}.habits-table-scroll{overflow-x:auto;overflow-y:visible;width:100%;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:var(--border-subtle) transparent;-ms-overflow-style:auto;cursor:grab;overscroll-behavior-x:contain}.habits-table-scroll::-webkit-scrollbar{height:8px}.habits-table-scroll::-webkit-scrollbar-thumb{background:var(--border-subtle);border-radius:4px}.habits-table-scroll--panning{cursor:grabbing;-webkit-user-select:none;user-select:none}.habits-table-scroll--panning *{cursor:grabbing!important}.habits-table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-size:.875rem}.habits-table--sized{min-width:0}.habits-table thead th{padding:.5rem .35rem;font-weight:600;color:var(--text-main);border-bottom:1px solid var(--border-subtle);background:var(--bg-color)}.habits-table .habits-table-corner{position:sticky;left:0;z-index:3;width:var(--habits-sticky-px, 180px);min-width:var(--habits-sticky-px, 180px);max-width:var(--habits-sticky-px, 180px);text-align:left;padding-left:.75rem;box-shadow:4px 0 12px -6px #0000001f;white-space:nowrap}html[data-theme=dark] .habits-table .habits-table-corner{box-shadow:4px 0 12px -6px #00000073}.habits-table-day{width:var(--habits-day-col-px, 3.25rem);min-width:var(--habits-day-col-px, 3.25rem);max-width:var(--habits-day-col-px, 3.25rem);box-sizing:border-box;text-align:center;vertical-align:bottom;overflow:hidden;white-space:normal;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}.habits-table-day--compact{padding:.35rem .15rem;font-size:.72rem;line-height:1.2}.habits-table-day-line{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.habits-table-day-num{display:block;margin-top:.12rem;font-weight:600;font-size:.95rem;line-height:1.1;color:var(--text-main);letter-spacing:-.02em}.habits-table-day--compact .habits-table-day-num{margin-top:.06rem;font-size:.78rem}.habits-table tbody th.habit-row-label{position:sticky;left:0;z-index:2;width:var(--habits-sticky-px, 180px);min-width:var(--habits-sticky-px, 180px);max-width:var(--habits-sticky-px, 180px);box-sizing:border-box;box-shadow:4px 0 12px -6px #0000001f;overflow:hidden}html[data-theme=dark] .habits-table tbody th.habit-row-label{box-shadow:4px 0 12px -6px #00000073}.habits-table .habit-cell{width:var(--habits-day-col-px, 3.25rem);min-width:var(--habits-day-col-px, 3.25rem);max-width:var(--habits-day-col-px, 3.25rem);box-sizing:border-box}.habit-progress{margin:0;display:flex;flex-direction:column;gap:1rem}.habit-progress-card{padding:1rem;background:var(--card-bg);border:1px solid var(--border-subtle);border-radius:12px;box-shadow:var(--shadow-card)}.habit-progress-card--overview{padding:1rem 1.1rem}.habit-progress-card--wide{grid-column:1 / -1}.habit-progress-card-title{margin:0 0 .35rem;font-size:.95rem;font-weight:600;color:var(--text-main)}.habit-progress-card-sub{margin:0 0 .75rem;font-size:.8rem;color:var(--text-muted);line-height:1.4}.habit-progress-card-sub--tight{margin-bottom:0}.habit-progress-card-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.25rem}.habit-progress-card-badge{font-size:.75rem;color:var(--text-muted);padding:.2rem .5rem;border:1px solid var(--border-subtle);border-radius:8px}.habit-progress-card-select{font-size:.8rem;color:var(--text-main);padding:.35rem 1.75rem .35rem .55rem;border:1px solid var(--border-subtle);border-radius:8px;background:var(--card-bg);cursor:pointer;max-width:11rem}.habit-progress-card-select:focus{outline:2px solid var(--link);outline-offset:1px}.habit-progress-overview-row{display:flex;flex-wrap:wrap;align-items:center;gap:1.25rem}.habit-progress-ring-wrap{position:relative;flex-shrink:0}.habit-progress-ring-svg{display:block}.habit-progress-ring-bg{stroke:var(--border-subtle);opacity:.6}.habit-progress-ring-fg{transition:stroke-dashoffset .35s ease}.habit-progress-ring-label{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-size:1rem;font-weight:600;color:var(--text-main);pointer-events:none}.habit-progress-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem 1.25rem;flex:1;min-width:0}@media(min-width:480px){.habit-progress-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}}.habit-progress-metric{display:flex;flex-direction:column;gap:.15rem}.habit-progress-metric-value{font-size:1.1rem;font-weight:600;color:var(--text-main)}.habit-progress-metric-value--accent{color:var(--link)}.habit-progress-metric-value--up{color:var(--success-text)}.habit-progress-metric-value--down{color:var(--error-text)}.habit-progress-metric-label{font-size:.72rem;color:var(--text-muted);text-transform:uppercase;letter-spacing:.02em}.habit-heatmap-wrap{display:flex;align-items:stretch;gap:.35rem;max-width:100%}.habit-heatmap-scroll{overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch;flex:1;min-width:0;padding-bottom:.25rem;scroll-padding-inline-end:12px;overscroll-behavior-x:contain;scrollbar-width:none;scrollbar-color:transparent transparent;-ms-overflow-style:none;cursor:grab;touch-action:pan-x pan-y}.habit-heatmap-scroll--panning{cursor:grabbing;-webkit-user-select:none;user-select:none}.habit-heatmap-scroll--panning *{cursor:grabbing!important;-webkit-user-select:none;user-select:none}.habit-heatmap-scroll::-webkit-scrollbar{display:none;width:0!important;height:0!important}.habit-heatmap-scroll::-webkit-scrollbar:horizontal{height:0!important}.habit-heatmap-scroll::-webkit-scrollbar-track,.habit-heatmap-scroll::-webkit-scrollbar-thumb{background:transparent}.habit-heatmap-inner{display:flex;flex-direction:column;gap:4px;width:max-content;min-width:100%;flex-shrink:0;box-sizing:border-box;padding-inline-end:12px;user-select:none;-webkit-user-select:none}.habit-heatmap-month-row{display:flex;flex-direction:row;flex-wrap:nowrap;gap:3px;min-height:32px;align-items:flex-end;width:max-content}.habit-heatmap-month-cap{width:22px;flex-shrink:0;min-height:30px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;font-size:.48rem;line-height:1.15;text-align:center;color:var(--text-muted);word-break:break-word;-webkit-hyphens:auto;hyphens:auto}.habit-heatmap-month-cap--empty{visibility:hidden;min-height:30px}.habit-heatmap-cols{display:flex;flex-direction:row;flex-wrap:nowrap;gap:3px;width:max-content}.habit-heatmap-col{display:flex;flex-direction:column;gap:3px;flex-shrink:0}.habit-heatmap-cell{position:relative;width:22px;height:22px;border-radius:4px;border:1px solid transparent;display:flex;align-items:center;justify-content:center;font-size:.55rem;font-weight:600;color:var(--text-muted);box-sizing:border-box}.habit-heatmap-cell--done{color:#ffffffeb}.habit-heatmap-cell--empty{background:var(--bg-color);border-color:var(--border-subtle)}.habit-heatmap-cell--pad{background:transparent;border-color:transparent;opacity:.35}.habit-heatmap-cell-num{line-height:1;user-select:none;-webkit-user-select:none;pointer-events:none}.habit-heatmap-cell-note-dot{position:absolute;right:2px;bottom:2px;width:5px;height:5px;border-radius:50%;background:var(--link);box-shadow:0 0 0 1px var(--card-bg);pointer-events:none}.habit-heatmap-cell--done .habit-heatmap-cell-note-dot{box-shadow:0 0 0 1px #00000040}.habit-heatmap-side-labels{display:flex;flex-direction:column;flex-shrink:0}.habit-heatmap-month-spacer{min-height:32px;flex-shrink:0}.habit-heatmap-wd-labels{display:flex;flex-direction:column;gap:3px;font-size:.6rem;color:var(--text-muted);line-height:1}.habit-heatmap-wd-label{height:22px;display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box}.habit-history-bars{display:flex;align-items:stretch;justify-content:space-between;gap:4px;height:140px;padding:.25rem 0 0;box-sizing:border-box}.habit-history-col{flex:1;min-width:0;max-width:56px;min-height:0;display:flex;flex-direction:column;align-items:center;gap:4px}.habit-history-val{font-size:.7rem;font-weight:600;color:var(--text-main);flex-shrink:0}.habit-history-bar-track{width:100%;flex:1 1 0;min-height:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch}.habit-history-bar-fill{width:100%;min-height:2px;border-radius:4px 4px 0 0;transition:height .2s ease}.habit-history-month{font-size:.55rem;color:var(--text-muted);text-align:center;line-height:1.15;word-break:break-word;flex-shrink:0}.habit-streak-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.65rem}.habit-streak-row{display:grid;grid-template-columns:minmax(0,5.5rem) 1fr minmax(0,5.5rem);align-items:center;gap:.5rem;font-size:.72rem}@media(max-width:520px){.habit-streak-row{grid-template-columns:1fr;gap:.35rem}.habit-streak-date{text-align:center}}.habit-streak-date{color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.habit-streak-bar-wrap{min-width:0;height:28px;display:flex;align-items:center;background:var(--bg-color);border-radius:6px;border:1px solid var(--border-subtle)}.habit-streak-bar{min-width:2rem;height:100%;border-radius:5px;display:flex;align-items:center;justify-content:center;transition:width .2s ease}.habit-streak-bar--top{box-shadow:0 0 0 1px #ffffff14}.habit-streak-bar--mid{background:#60a5fa59}.habit-streak-bar--rest{background:var(--border-subtle);opacity:.9}.habit-streak-count{font-size:.75rem;font-weight:700;color:var(--text-main)}.habit-streak-bar--top .habit-streak-count{color:#fff}.habit-progress-empty-chart{margin:0;font-size:.875rem;color:var(--text-muted)}.habit-detail-archived-banner{margin:0 0 1rem;padding:.75rem 1rem;font-size:.9rem;color:var(--text-muted);background:var(--bg-color);border:1px solid var(--border-subtle);border-radius:10px;display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.habit-detail-top{margin-bottom:1.25rem}.habit-detail-heading{display:flex;align-items:center;gap:.5rem;margin-top:.75rem}.habit-detail-dot{width:14px;height:14px;border-radius:50%;flex-shrink:0}.habit-detail-block{margin-bottom:1.75rem}.habit-detail-block-title{margin:0 0 .65rem;font-size:.95rem;font-weight:600;color:var(--text-main)}.habit-detail-card{padding:1rem;background:var(--card-bg);border:1px solid var(--border-subtle);border-radius:12px;box-shadow:var(--shadow-card)}.habit-detail-card .habit-form{max-width:100%}.archive-page .habits-header{align-items:center}.archive-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.archive-item{display:flex;align-items:center;gap:.75rem;padding:.85rem 1rem;flex-wrap:wrap}.archive-item-actions{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.archive-delete-btn{padding:.45rem .85rem;border:1px solid #dc2626;border-radius:999px;background:var(--error-bg);color:var(--error-text);font-size:.875rem;font-weight:500;cursor:pointer}.archive-delete-btn:hover:not(:disabled){filter:brightness(.97)}.archive-delete-btn:disabled{opacity:.55;cursor:not-allowed}html[data-theme=dark] .archive-delete-btn{border-color:#f8717173}.archive-dot{width:12px;height:12px;border-radius:50%;flex-shrink:0}.archive-item-main{flex:1;min-width:0}.archive-title{font-weight:600;color:var(--text-main);text-decoration:none}.archive-title:hover{color:var(--link);text-decoration:underline}.app-shell{min-height:100vh;display:flex;flex-direction:column}.app-topbar{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.75rem;padding:.65rem 1.25rem;background:var(--sidebar-bg);border-bottom:1px solid var(--border-subtle)}.app-topbar-segmented{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.app-topbar-profile{position:relative;flex-shrink:0}.app-profile-trigger{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;color:var(--text-muted);background:var(--card-bg);border:1px solid var(--border-subtle);border-radius:999px;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s}.app-profile-trigger:hover{color:var(--text-main);border-color:var(--link)}.app-profile-trigger-icon{flex-shrink:0;opacity:.9}.app-profile-menu{position:absolute;top:calc(100% + .45rem);right:0;z-index:200;min-width:min(16.5rem,calc(100vw - 2rem));padding:.5rem;background:var(--card-bg);border:1px solid var(--border-subtle);border-radius:12px;box-shadow:var(--shadow-card)}.app-profile-menu-inner{display:flex;flex-direction:column;gap:.5rem;align-items:stretch}.app-profile-menu-head{padding:.35rem .4rem .65rem;margin-bottom:.15rem;border-bottom:1px solid var(--border-subtle)}.app-profile-menu-title{margin:0 0 .35rem;font-size:.95rem;font-weight:600;color:var(--text-main);line-height:1.25}.app-profile-menu-email{margin:0;font-size:.8125rem;color:var(--text-muted);line-height:1.35;overflow-wrap:anywhere;word-break:break-word}.app-profile-menu-inner .theme-toggle{width:100%;justify-content:center}.app-profile-menu-logout{width:100%}@media(max-width:640px){.app-topbar-segmented{flex:1;min-width:0;flex-wrap:nowrap;gap:2px;padding:3px;background:var(--avatar-bg);border-radius:999px;border:1px solid var(--border-subtle)}.app-topbar-segmented .app-topbar-segment{flex:1;min-width:0;margin:0;border:none;border-radius:999px;padding:7px 4px;font-size:9px;letter-spacing:.08em;text-transform:uppercase;text-decoration:none;transition:background .2s ease,color .2s ease}.app-topbar-segmented .app-topbar-segment:hover{text-decoration:none}.app-topbar-segmented .app-topbar-segment--active{background:var(--link);color:#fff}.app-topbar-segmented .app-topbar-segment--active:hover{color:#fff;border-color:transparent}.app-topbar-segmented .app-topbar-segment:not(.app-topbar-segment--active){background:transparent;color:var(--text-muted)}.app-topbar-segmented .app-topbar-segment:not(.app-topbar-segment--active):hover{color:var(--text-main);border-color:transparent}}.app-main{flex:1}.timer-page{min-height:calc(100vh - 56px)}.timer-frame{width:100%;height:calc(100vh - 56px);border:0;display:block}.dependencies-list{display:flex;flex-direction:column;gap:.8rem}.dependency-card{background:var(--card-bg);border:1px solid var(--border-subtle);border-radius:14px;padding:.9rem 1rem;box-shadow:var(--shadow-card);position:relative}.dependency-dnd-item{min-width:0}.dependency-card-top{display:flex;align-items:center;gap:.95rem}.dependency-progress{--dependency-progress-color: #6366f1;--dependency-progress-value: 0%;width:72px;height:72px;border-radius:999px;background:conic-gradient(var(--dependency-progress-color) var(--dependency-progress-value),var(--border-subtle) 0);display:grid;place-items:center;flex-shrink:0}.dependency-progress-inner{width:52px;height:52px;border-radius:999px;background:var(--card-bg);color:var(--text-main);font-size:1rem;font-weight:700;display:grid;place-items:center}.dependency-progress-symbol{transform:translateY(-1px)}.dependency-card-body{flex:1;min-width:0}.dependency-card-head{display:flex;align-items:center;gap:.4rem;min-width:0;margin-bottom:.55rem}.dependency-card-handle{position:absolute;top:.4rem;left:.5rem;cursor:grab;-webkit-user-select:none;user-select:none;color:var(--text-muted);z-index:2;line-height:1}.dependency-card-link{color:inherit;text-decoration:none;transition:filter .16s ease,opacity .16s ease}.dependency-card-link:hover{text-decoration:none;filter:brightness(1.12)}.dependency-card-title{margin:0;font-size:32px;color:var(--text-main);min-width:0;overflow-wrap:anywhere;line-height:1.2}.dependency-card-stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem}.dependency-stat{display:flex;flex-direction:column;gap:.15rem}.dependency-stat-label{font-size:.86rem;color:var(--text-muted);text-align:center}.dependency-stat-value{font-size:1.35rem;font-weight:700;line-height:1;color:var(--text-main);text-align:center}.dependencies-screen{max-width:700px;padding-bottom:5.5rem}.dependencies-title{margin-bottom:.2rem}.dependencies-search.site-field{width:100%;background:var(--input-bg);border-radius:999px}.dependencies-fab{position:fixed;right:1.4rem;bottom:1.4rem;width:58px;height:58px;border:1px solid var(--border-subtle);border-radius:999px;background:var(--card-bg);color:var(--text-main);font-size:1.8rem;line-height:1;box-shadow:var(--shadow-card)}.dependencies-fab:disabled{opacity:.6}.dependency-detail-screen{max-width:560px}.dependency-detail-header{margin-bottom:.6rem}.dependency-detail-back{font-size:1.55rem;line-height:1;text-decoration:none;padding:.15rem .2rem}.dependency-detail-back:hover{text-decoration:none}.dependency-detail-title{text-transform:uppercase;text-align:center;flex:1}.dependency-detail-card{background:var(--card-bg);border:1px solid var(--border-subtle);border-radius:14px;box-shadow:var(--shadow-card);padding:1rem;display:flex;flex-direction:column;gap:1rem}.dependency-detail-progress-wrap{display:flex;align-items:flex-start;justify-content:center;gap:0}.dependency-detail-progress{--dependency-progress-color: #6366f1;--dependency-progress-value: 0%;width:200px;height:200px;border-radius:999px;background:conic-gradient(from 0deg at 50% 50%,var(--dependency-progress-color) 0%,var(--dependency-progress-color) var(--dependency-progress-value),var(--border-subtle) var(--dependency-progress-value),var(--border-subtle) 100%);display:grid;place-items:center;margin:0;box-shadow:0 4px 12px #00000026}.dependency-detail-progress-inner{width:146px;height:146px;border-radius:999px;background:var(--card-bg);color:var(--text-main);font-size:2.5rem;font-weight:700;display:grid;place-items:center}.dependency-detail-goal-title{display:block;text-align:center;color:var(--text-muted)}.dependency-detail-goal-value{display:block;text-align:center;margin-top:-.6rem;font-size:1.2rem;color:var(--text-main)}.dependency-detail-timer{display:flex;justify-content:center;align-items:baseline;gap:.35rem;font-size:2.2rem;font-weight:700;color:var(--text-main);letter-spacing:.04em}.dependency-detail-timer span{min-width:1.5ch;text-align:center}.dependency-detail-timer-labels{margin-top:-.5rem;display:flex;justify-content:center;gap:1.6rem;font-size:.82rem;color:var(--text-muted)}.dependency-detail-timer-labels span{text-align:center}.dependency-detail-meta-row{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:.8rem}.dependency-detail-meta-col{display:flex;flex-direction:column;gap:.15rem}.dependency-detail-meta-col span{color:var(--text-muted);text-align:center}.dependency-detail-meta-col strong{color:var(--text-main);font-size:1.6rem;line-height:1;text-align:center}.dependency-relapse-btn.site-nav-btn.site-nav-btn--primary{border-radius:999px;padding:.55rem 1.2rem}.dependency-relapse-confirm-text{margin:0;color:var(--text-main);line-height:1.45}.dependency-relapse-modal{background:var(--card-bg);border:1px solid var(--border-subtle);border-radius:14px}.dependency-relapse-modal .site-field{background:var(--input-bg);border-color:var(--border-subtle)}:root{--bg-color: #f5f5f5;--text-main: #111111;--text-muted: #666666;--accent: #2563eb;--link: #2563eb;--border-subtle: #e0e0e0;--card-bg: #ffffff;--sidebar-bg: #ffffff;--avatar-bg: #e4e4e4;--font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--shadow-card: 0 4px 24px rgba(0, 0, 0, .12);--shadow-modal: 0 4px 24px rgba(0, 0, 0, .18);--error-bg: #fef2f2;--error-text: #b91c1c;--success-bg: #ecfdf5;--success-text: #15803d}html[data-theme=dark]{--bg-color: #0f172a;--text-main: #f9fafb;--text-muted: #9ca3af;--accent: #60a5fa;--link: #60a5fa;--border-subtle: #334155;--card-bg: #1e293b;--sidebar-bg: #1e293b;--avatar-bg: #334155;--shadow-card: 0 4px 24px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .06);--shadow-modal: 0 4px 24px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);--error-bg: rgba(185, 28, 28, .15);--error-text: #fca5a5;--success-bg: rgba(21, 128, 61, .2);--success-text: #86efac}*,*:before,*:after{box-sizing:border-box}html{font-family:var(--font-main);-webkit-font-smoothing:antialiased}body{margin:0;min-height:100vh;background:var(--bg-color);color:var(--text-main);line-height:1.5}#root{min-height:100vh}a{color:var(--link);text-decoration:none}a:hover{text-decoration:underline}button{font:inherit;cursor:pointer}input,textarea{font:inherit;color:var(--text-main);background:var(--card-bg)}.theme-toggle,.site-nav-btn{display:inline-flex;align-items:center;justify-content:center;font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--text-muted);background:none;border:1px solid var(--border-subtle);border-radius:999px;padding:6px 14px;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none}.theme-toggle:hover,.site-nav-btn:hover:not(:disabled){color:var(--text-main);border-color:var(--link)}.site-nav-btn:disabled{opacity:.5;cursor:not-allowed}.site-nav-btn--primary{border-color:var(--link);color:var(--link)}.site-nav-btn--primary:hover:not(:disabled){color:var(--text-main);border-color:var(--link)}.site-icon-btn{width:40px;height:40px;margin:0;padding:0;border-radius:50%;border:1px solid var(--border-subtle);background:var(--card-bg);color:var(--text-muted);display:inline-flex;align-items:center;justify-content:center;font-size:1.25rem;line-height:0;font-family:inherit;transition:color .2s,border-color .2s}.habit-modal-close.site-icon-btn,.habit-day-modal-close.site-icon-btn{font-size:1.35rem;font-weight:300}.site-icon-btn:hover:not(:disabled){color:var(--text-main);border-color:var(--link)}.site-card{background:var(--card-bg);border-radius:12px;box-shadow:var(--shadow-card)}html[data-theme=dark] .site-card{box-shadow:var(--shadow-card)}.site-field{border:1px solid var(--border-subtle);border-radius:10px;padding:10px 14px}.site-section-title{font-size:18px;font-weight:600;margin:0 0 12px;color:var(--text-main)}.site-muted{color:var(--text-muted)}@media(max-width:640px){.app-topbar{padding:.5rem max(.65rem,env(safe-area-inset-right)) .5rem max(.65rem,env(safe-area-inset-left));gap:.5rem;flex-wrap:nowrap}.app-profile-menu{right:max(0px,calc(env(safe-area-inset-right,0px) - .25rem));min-width:min(16.5rem,calc(100vw - 1.3rem - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)))}.app-profile-menu-email{font-size:.78rem}.app-main{min-width:0}.habits-screen{max-width:100%;padding:.75rem max(.65rem,env(safe-area-inset-left)) 1.5rem max(.65rem,env(safe-area-inset-right))}.habits-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:1.15rem}.habits-title{flex:1;min-width:0;font-size:1.1rem;line-height:1.25;word-break:break-word}.archive-page .habits-header{align-items:center}.habit-detail-heading .habits-title{font-size:1.05rem}.habit-detail-card{padding:.85rem}.habit-detail-block-title{font-size:.9rem}.habit-progress{gap:.75rem}.habit-progress-card{padding:.85rem}.habit-progress-card--overview{padding:.85rem .9rem}.habit-progress-card-head{flex-direction:column;align-items:stretch;gap:.5rem}.habit-progress-card-title{margin-bottom:0}.habit-progress-card-select{max-width:none;width:100%;box-sizing:border-box}.habit-progress-overview-row{flex-direction:column;align-items:center;gap:1rem}.habit-progress-metrics{width:100%}.habit-history-bars{height:120px}.habit-modal-backdrop{padding:max(.75rem,env(safe-area-inset-top)) max(.65rem,env(safe-area-inset-right)) max(1rem,env(safe-area-inset-bottom)) max(.65rem,env(safe-area-inset-left))}.habit-modal{max-width:min(400px,100%);padding:1rem}.auth-shell{padding-left:max(.75rem,env(safe-area-inset-left));padding-right:max(.75rem,env(safe-area-inset-right))}.auth-page{padding:1rem .5rem}.archive-item{padding:.75rem .85rem}.habits-table thead th{padding:.4rem .3rem;font-size:.8rem}.habits-table .habits-table-corner{padding-left:.5rem;font-size:.8rem}.habit-row-label{padding:.45rem .5rem}}@media(max-width:480px){.habits-screen{padding-top:.65rem;padding-bottom:1.25rem}.habit-history-bars{height:110px;gap:2px}.habit-history-col{max-width:none}.habit-history-month{font-size:.5rem}.habit-history-val{font-size:.65rem}.habit-form-danger{flex-direction:column;align-items:stretch}.habit-form-danger .site-nav-btn--primary,.habit-form-danger .habit-form-archive,.habit-form-danger .habit-form-delete{width:100%;display:inline-flex;justify-content:center;box-sizing:border-box}.habit-form-actions--cancel-only{justify-content:stretch}.habit-form-actions--cancel-only .site-nav-btn{width:100%}}
