:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light;color:#18181b;background-color:#fafafa;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{box-sizing:border-box}a{font-weight:500;color:#2563eb;text-decoration:none}a:hover{color:#1d4ed8}body{margin:0;min-width:320px;min-height:100vh}h1,h2,h3,h4,h5,h6{margin:0;font-weight:600;letter-spacing:-.02em}h1{font-size:1.75rem;line-height:1.2}h2{font-size:1.25rem;line-height:1.3}h3{font-size:1rem;line-height:1.4}p{margin:0}button{border-radius:8px;border:1px solid transparent;padding:.5rem 1rem;font-size:.875rem;font-weight:500;font-family:inherit;background-color:#fff;cursor:pointer;transition:all .15s ease}button:focus,button:focus-visible{outline:2px solid #2563eb;outline-offset:2px}input,textarea,select{font-family:inherit;font-size:.9375rem}input:focus,textarea:focus,select:focus{outline:2px solid #2563eb;outline-offset:0}:root{--color-primary: #2563eb;--color-primary-hover: #1d4ed8;--color-primary-subtle: #eff6ff;--color-bg: #ffffff;--color-bg-secondary: #fafafa;--color-surface: #f5f5f5;--color-hover: #f9fafb;--color-border: #e5e7eb;--color-border-light: #f0f0f0;--color-border-dark: #d1d5db;--color-text: #18181b;--color-text-secondary: #52525b;--color-text-tertiary: #a1a1aa;--color-text-muted: #71717a}#root{margin:0;padding:0}.app{min-height:100vh;background-color:var(--color-bg-secondary);overflow-x:hidden}.signin-container{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;padding:2rem;text-align:center;background:#fff}.signin-container h1{font-size:2.5rem;font-weight:700;color:var(--color-text);margin-bottom:.5rem;letter-spacing:-.02em}.signin-container p{font-size:1.125rem;color:var(--color-text-secondary);margin-bottom:2rem}.app-header{display:flex;justify-content:flex-end;align-items:center;padding:1rem 2rem;max-width:720px;margin:0 auto;width:100%;box-sizing:border-box}.app-header h1{font-size:1.5rem;font-weight:700;color:var(--color-text);margin:0;letter-spacing:-.02em}@media (max-width: 480px){.app-header{padding:1rem}.app-header h1{font-size:1.25rem}}.loading{display:flex;align-items:center;justify-content:center;min-height:50vh;font-size:1rem;color:var(--color-text-secondary)}.settings-placeholder{max-width:720px;margin:0 auto;padding:2rem}.settings-placeholder h1{font-size:1.5rem;font-weight:700;color:var(--color-text);margin:2rem 0 1rem;letter-spacing:-.02em}.settings-placeholder p{font-size:1rem;color:var(--color-text-secondary)}.btn-primary,.btn-secondary,.btn-danger{padding:.625rem 1.25rem;border-radius:8px;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .15s ease;border:none}.btn-primary:hover:not(:disabled){background:var(--color-primary-hover)}.btn-primary:disabled{opacity:.5;cursor:not-allowed}.btn-secondary:hover:not(:disabled){background:var(--color-hover);border-color:var(--color-border-dark)}.btn-secondary:disabled{opacity:.5;cursor:not-allowed}.btn-danger{background:#fef2f2;border:1px solid #fecaca;color:#dc2626}.back-button{background:none;border:none;color:var(--color-text-secondary);font-size:.875rem;font-weight:500;cursor:pointer;padding:.5rem 0;transition:color .15s ease}.back-button:hover{color:var(--color-text)}.visual-curve-editor{margin-top:1rem}.curve-graph-wrapper{background:#fff;border:2px solid var(--color-border);border-radius:.5rem;padding:1rem;margin-bottom:1rem;-webkit-user-select:none;user-select:none;position:relative}.curve-graph{width:100%;height:auto;display:block;touch-action:none}.curve-graph .grid line{stroke:#f0f0f0;stroke-width:1}.curve-graph .axis-label{font-size:12px;fill:var(--color-text-muted);-webkit-user-select:none;user-select:none}.curve-graph .anchor-point circle{cursor:grab;transition:all .2s ease}.curve-graph .anchor-point:hover circle{r:10;filter:drop-shadow(0 2px 4px rgba(0,0,0,.1))}.curve-graph .anchor-point.selected circle{cursor:grabbing;filter:drop-shadow(0 4px 8px rgba(59,130,246,.3))}.curve-graph .point-label{font-size:11px;fill:var(--color-text);font-weight:600;pointer-events:none;-webkit-user-select:none;user-select:none}.graph-hint{font-size:.75rem;color:var(--color-text-muted);text-align:center;margin:.5rem 0 0;font-style:italic}.curve-controls{display:flex;gap:.5rem;margin-bottom:1rem;flex-wrap:wrap}.selected-point-editor{background:var(--color-surface);border:1px solid var(--color-border);border-radius:.5rem;padding:1rem;margin-bottom:1rem}.selected-point-editor h5{font-size:.875rem;font-weight:600;margin:0 0 .75rem;color:var(--color-text)}.point-inputs{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.point-inputs label{display:flex;flex-direction:column;gap:.25rem;font-size:.875rem;color:var(--color-text-muted)}.point-inputs input[type=number]{padding:.5rem;border:1px solid var(--color-border);border-radius:.25rem;font-size:.875rem}.point-inputs input[type=number]:focus{outline:none;border-color:var(--color-primary)}@media (max-width: 640px){.curve-graph-wrapper{padding:.5rem}.point-inputs{grid-template-columns:1fr}.curve-controls{flex-direction:column}.curve-controls button{width:100%}}.modal-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000;padding:1rem}.modal-content{background:#fff;border-radius:12px;max-width:560px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 8px 30px #0000001f,0 2px 8px #00000014}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid var(--color-border)}.modal-header h2{font-size:1.25rem;font-weight:600;color:var(--color-text);margin:0;letter-spacing:-.01em}.modal-close{background:none;border:none;font-size:2rem;color:var(--color-text-muted);cursor:pointer;padding:0;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all .15s ease}.modal-close:hover{background:var(--color-surface);color:var(--color-text)}.habit-form{padding:1.5rem}.form-group{margin-bottom:1.5rem}.form-group label{display:block;font-size:.875rem;font-weight:500;color:var(--color-text);margin-bottom:.5rem}.form-group input[type=text],.form-group input[type=number],.form-group input[type=date],.form-group textarea,.form-group select{width:100%;padding:.75rem;border:1px solid var(--color-border);border-radius:6px;font-size:1rem;font-family:inherit;transition:border-color .15s ease;box-sizing:border-box}.form-group select{cursor:pointer;background-color:#fff}.form-group input:focus,.form-group textarea:focus,.form-group select:focus{outline:none;border-color:var(--color-primary)}.form-group textarea{resize:vertical;min-height:80px}.form-group small{display:block;font-size:.75rem;color:var(--color-text-muted);margin-top:.25rem}.radio-group{display:flex;flex-direction:column;gap:.75rem}.radio-option{display:flex;align-items:flex-start;gap:.75rem;padding:1rem;border:1px solid var(--color-border);border-radius:8px;cursor:pointer;transition:all .15s ease}.radio-option:hover{background:var(--color-surface);border-color:var(--color-primary)}.radio-option input[type=radio]{margin-top:.25rem;cursor:pointer}.radio-option strong{display:block;margin-bottom:.25rem;color:var(--color-text)}.radio-option p{margin:0;font-size:.875rem;color:var(--color-text-muted)}.checkbox-label{display:flex;align-items:center;gap:.5rem;cursor:pointer}.checkbox-label input[type=checkbox]{cursor:pointer}.checkbox-label span{font-size:.875rem;color:var(--color-text)}.error-message{padding:.75rem;background:#fee;border:1px solid #fcc;border-radius:6px;color:#c33;font-size:.875rem;margin-bottom:1rem}.warning-banner{padding:.75rem;background:#fffbea;border:1px solid #fde68a;border-radius:6px;color:#92400e;font-size:.875rem;margin-bottom:1rem;margin-top:1rem}.form-actions{display:flex;gap:1rem;justify-content:flex-end;margin-top:2rem;padding-top:1.5rem;border-top:1px solid var(--color-border)}.help-text{font-size:.875rem;color:var(--color-text-muted);margin:0 0 1rem}.anchor-points-list{display:flex;flex-direction:column;gap:.75rem;margin-bottom:1rem}.anchor-point-row{display:flex;align-items:center;gap:.5rem}.anchor-point-row .anchor-input{width:100px;padding:.5rem;border:1px solid var(--color-border);border-radius:.25rem;font-size:.875rem}.anchor-point-row .anchor-target{width:80px;padding:.5rem;border:1px solid var(--color-border);border-radius:.25rem;font-size:.875rem}.anchor-arrow,.anchor-percent{font-size:.875rem;color:var(--color-text-muted)}.btn-icon-danger{background:none;border:none;color:#ef4444;font-size:1.5rem;line-height:1;cursor:pointer;padding:.25rem;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all .15s ease}.btn-icon-danger:hover:not(:disabled){background:#fee;color:#dc2626}.btn-icon-danger:disabled{opacity:.5;cursor:not-allowed}.btn-small{padding:.5rem 1rem;font-size:.875rem}.anchor-points-preview{display:block;margin-top:.75rem;padding:.75rem;background:var(--color-surface);border-radius:.25rem;font-size:.75rem;color:var(--color-text-muted)}.curve-table-toggle{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--color-border)}.curve-table-toggle summary{cursor:pointer;font-size:.875rem;color:var(--color-primary);-webkit-user-select:none;user-select:none;list-style:none}.curve-table-toggle summary::-webkit-details-marker{display:none}.curve-table-toggle summary:before{content:"▶ ";display:inline-block;transition:transform .2s}.curve-table-toggle[open] summary:before{transform:rotate(90deg)}.curve-table-toggle summary:hover{text-decoration:underline}.curve-table-toggle .anchor-points-list{margin-top:1rem}.input-range-row{display:flex;align-items:center;gap:1rem}.input-range-row label{display:flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--color-text-muted)}.input-range-row .range-input{width:100px;padding:.5rem;border:1px solid var(--color-border);border-radius:.25rem;font-size:.875rem}.input-range-row span{color:var(--color-text-muted);font-size:.875rem}.input-config-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:1rem;margin-bottom:.5rem}.input-config-grid label{display:flex;flex-direction:column;gap:.25rem;font-size:.875rem;color:var(--color-text-muted)}.input-config-grid input{padding:.5rem;border:1px solid var(--color-border);border-radius:.25rem;font-size:.875rem}.input-config-grid input:focus{outline:none;border-color:var(--color-primary)}.preset-toggle{margin-bottom:1.5rem;padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.preset-toggle summary{cursor:pointer;font-size:.875rem;font-weight:500;color:var(--color-primary);-webkit-user-select:none;user-select:none;list-style:none}.preset-toggle summary::-webkit-details-marker{display:none}.preset-toggle summary:before{content:"▶ ";display:inline-block;transition:transform .2s}.preset-toggle[open] summary:before{transform:rotate(90deg)}.preset-toggle summary:hover{text-decoration:underline}.preset-toggle .help-text,.preset-toggle .preset-buttons{margin-top:.75rem}.preset-buttons{display:flex;flex-direction:column;gap:.75rem}.preset-button{display:flex;flex-direction:column;align-items:flex-start;gap:.25rem;padding:1rem;border:2px solid var(--color-border);border-radius:8px;background:#fff;cursor:pointer;transition:all .15s ease;text-align:left;width:100%}.preset-button:hover:not(:disabled){background:var(--color-surface);border-color:var(--color-primary)}.preset-button:disabled{opacity:.5;cursor:not-allowed}.preset-button strong{display:block;font-size:.9375rem;color:var(--color-text);margin-bottom:.25rem}.preset-button .preset-description{display:block;font-size:.8125rem;color:var(--color-text-muted);line-height:1.4}@media (max-width: 640px){.modal-content{max-height:100vh;border-radius:0}.modal-overlay{padding:0}.form-actions{flex-direction:column-reverse}.form-actions button{width:100%}.anchor-point-row{flex-wrap:wrap}.anchor-point-row .anchor-input,.anchor-point-row .anchor-target{flex:1;min-width:80px}}.tracking-frequency-toggle{display:flex;gap:.5rem;margin-bottom:.5rem}.toggle-button{flex:1;padding:.75rem 1rem;border:2px solid var(--color-border);border-radius:6px;background:#fff;color:var(--color-text);font-size:1rem;font-weight:500;cursor:pointer;transition:all .15s ease}.toggle-button:hover:not(:disabled){background:var(--color-surface);border-color:var(--color-primary)}.toggle-button.active{background:var(--color-primary);border-color:var(--color-primary);color:#fff}.toggle-button:disabled{opacity:.5;cursor:not-allowed}.partnership-section{background:#fff;border:1px solid var(--color-border);border-radius:12px;padding:1.25rem;margin:1.5rem 0}.partnership-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.partnership-header h3{margin:0;font-size:1rem;font-weight:600;letter-spacing:-.01em}.partnerships-list{display:flex;flex-direction:column;gap:.75rem}.partnership-item{display:flex;justify-content:space-between;align-items:center;padding:1rem;background:var(--color-hover);border-radius:8px;border:1px solid var(--color-border-light)}.partnership-info{display:flex;flex-direction:column;gap:.25rem}.partner-header{display:flex;align-items:center;gap:.5rem}.partner-color-indicator{width:10px;height:10px;border-radius:50%;flex-shrink:0}.partner-name{font-weight:600;font-size:.9375rem;color:var(--color-text)}.partner-habit-name{font-size:.8125rem;color:var(--color-text-secondary)}.partner-score{font-size:.8125rem;font-weight:500;color:var(--color-text);margin-top:.25rem;font-variant-numeric:tabular-nums}.no-partnerships{padding:2rem 1rem;text-align:center;color:var(--color-text-tertiary);font-size:.875rem}.active-invites{margin-top:1.5rem;padding-top:1.5rem;border-top:1px solid var(--color-border-light)}.active-invites h3{margin:0 0 .75rem;font-size:.9375rem;font-weight:600;letter-spacing:-.01em}.invite-item{display:flex;justify-content:space-between;align-items:center;padding:.75rem 1rem;background:#fffbeb;border-radius:8px;border:1px solid #fde68a;margin-bottom:.5rem}.invite-info{display:flex;gap:1rem;align-items:center;font-size:.8125rem}.invite-status{font-weight:600;color:#92400e}.invite-expires{color:#78350f}.invite-actions{display:flex;gap:.5rem;align-items:center}.btn-sm{padding:.375rem .75rem;font-size:.8125rem}.btn-text{background:none;border:none;padding:.375rem .75rem;cursor:pointer;font-size:.8125rem;font-weight:500}.btn-danger-text{color:#dc2626}.btn-danger-text:hover{color:#b91c1c;text-decoration:underline}.checkbox-label{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-weight:500;font-size:.875rem}.checkbox-label input[type=checkbox]{width:1rem;height:1rem;cursor:pointer}.form-select{width:100%;padding:.625rem;border:1px solid var(--color-border);border-radius:6px;font-size:.875rem;background:#fff}.invite-link-display{display:flex;gap:.5rem;align-items:center;padding:.75rem;background:var(--color-hover);border-radius:8px;margin:1rem 0}.invite-url{flex:1;font-family:monospace;font-size:.8125rem;color:var(--color-primary);overflow-wrap:break-word;word-break:break-all}.modal-description.success{color:#065f46;font-weight:500}@media (max-width: 768px){.partnership-section{padding:1rem}}.entry-modal-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000;padding:1rem}.entry-modal-content{background:#fff;border-radius:12px;max-width:480px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 8px 30px #0000001f,0 2px 8px #00000014}.entry-modal-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem;border-bottom:1px solid var(--color-border)}.entry-modal-header h3{font-size:1.125rem;font-weight:600;color:var(--color-text);margin:0 0 .125rem;letter-spacing:-.01em}.entry-date-label{font-size:.875rem;color:var(--color-text-muted);margin:0}.entry-modal-close{background:none;border:none;font-size:2rem;color:var(--color-text-muted);cursor:pointer;padding:0;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all .15s ease}.entry-modal-close:hover{background:var(--color-surface);color:var(--color-text)}.entry-modal-body{padding:1.5rem}.rating-buttons{display:flex;flex-direction:column;gap:.5rem}.rating-btn{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.25rem;border:2px solid var(--color-border);border-radius:8px;background:#fff;cursor:pointer;transition:all .15s ease;text-align:left}.rating-btn:hover{background:var(--color-surface);border-color:var(--color-primary)}.rating-btn.selected{background:var(--color-primary);border-color:var(--color-primary);color:#fff}.rating-value{font-size:1.25rem;font-weight:700}.rating-label{font-size:.875rem;opacity:.8}.number-input-container{display:flex;flex-direction:column;gap:1.5rem;align-items:center}.number-display{display:flex;flex-direction:column;align-items:center;padding:2rem;background:var(--color-surface);border-radius:12px;width:100%}.number-value{font-size:3rem;font-weight:700;color:var(--color-primary);line-height:1}.number-unit{font-size:1rem;color:var(--color-text-muted);margin-top:.5rem}.adjustment-buttons{display:grid;grid-template-columns:1fr 1fr;gap:1rem;width:100%}.decrement-column,.increment-column{display:flex;flex-direction:column;gap:.5rem}.increment-btn,.decrement-btn{padding:1rem;border:2px solid var(--color-border);border-radius:8px;background:#fff;color:var(--color-text);font-size:1rem;font-weight:600;cursor:pointer;transition:all .15s ease}.increment-btn:hover:not(:disabled),.decrement-btn:hover:not(:disabled){background:var(--color-primary);border-color:var(--color-primary);color:#fff;transform:translateY(-2px)}.increment-btn:active:not(:disabled),.decrement-btn:active:not(:disabled){transform:translateY(0)}.increment-btn:disabled,.decrement-btn:disabled{opacity:.3;cursor:not-allowed}.increment-btn.large{background:var(--color-primary);border-color:var(--color-primary);color:#fff}.increment-btn.large:hover{opacity:.9}.boolean-buttons{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.boolean-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;padding:2rem 1rem;border:3px solid;border-radius:12px;background:#fff;cursor:pointer;transition:all .2s ease;min-height:150px}.boolean-btn.success{border-color:#10b981;color:#10b981}.boolean-btn.success:hover{background:#ecfdf5;transform:translateY(-2px)}.boolean-btn.success.selected{background:#10b981;color:#fff}.boolean-btn.failure{border-color:#ef4444;color:#ef4444}.boolean-btn.failure:hover{background:#fef2f2;transform:translateY(-2px)}.boolean-btn.failure.selected{background:#ef4444;color:#fff}.boolean-icon{font-size:3rem;font-weight:700;line-height:1}.boolean-label{font-size:1.125rem;font-weight:600}.week-day-selector{margin-top:1.5rem;padding-top:1.5rem;border-top:1px solid var(--color-border)}.week-day-selector label{display:block;font-size:.875rem;font-weight:500;color:var(--color-text);margin-bottom:.75rem}.day-buttons{display:grid;grid-template-columns:repeat(7,1fr);gap:.5rem}.day-btn{padding:.75rem .25rem;border:2px solid var(--color-border);border-radius:6px;background:#fff;color:var(--color-text);font-size:.75rem;font-weight:600;cursor:pointer;transition:all .15s ease;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.day-btn:hover:not(:disabled){background:var(--color-surface);border-color:var(--color-primary)}.day-btn.selected{background:var(--color-primary);border-color:var(--color-primary);color:#fff}.day-btn:disabled{opacity:.5;cursor:not-allowed}.day-btn:disabled:not(.selected){background:var(--color-surface)}.day-btn:disabled.selected{background:var(--color-primary);border-color:var(--color-primary);color:#fff;opacity:.7}.on-track-display{margin-top:1rem;padding:.75rem;background:var(--color-surface);border-radius:6px;text-align:center;font-size:.875rem;color:var(--color-text-muted);font-weight:500}.entry-modal-actions{display:flex;gap:1rem;justify-content:flex-end;padding:1.5rem;border-top:1px solid var(--color-border)}@media (max-width: 640px){.entry-modal-content{max-height:100vh;border-radius:0}.entry-modal-overlay{padding:0}.entry-modal-actions{flex-direction:column-reverse}.entry-modal-actions button{width:100%}.rating-btn{padding:.875rem 1rem}.rating-value{font-size:1.125rem}.number-value{font-size:2.5rem}}.habit-config-summary{background:#fff;border:1px solid var(--color-border);border-radius:12px;padding:1.25rem;margin:1.5rem 0}.habit-config-summary h3{margin:0 0 1rem;font-size:1rem;font-weight:600;color:var(--color-text);letter-spacing:-.01em}.config-detail{display:flex;gap:.75rem;margin-bottom:.625rem;align-items:flex-start}.config-detail:last-child{margin-bottom:0}.config-label{font-weight:500;color:var(--color-text-tertiary);min-width:100px;flex-shrink:0;font-size:.8125rem}.config-value{color:var(--color-text);font-size:.875rem}.config-detail.mapping-section{align-items:flex-start}.mapping-content{display:flex;flex-direction:column;gap:.75rem;flex:1}.mapping-graph{margin-top:.25rem;position:relative}.mapping-graph svg{display:block;max-width:100%;height:auto}.anchor-point{cursor:pointer}.anchor-dot{transition:r .15s ease,fill .15s ease}.anchor-hover-area{cursor:pointer}.mapping-tooltip{position:absolute;background:var(--color-text);color:#fff;padding:.25rem .5rem;border-radius:4px;font-size:.75rem;font-family:ui-monospace,monospace;white-space:nowrap;pointer-events:none;transform:translate(-50%,-100%);z-index:10;box-shadow:0 2px 8px #0000001f}.mapping-tooltip:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:5px solid transparent;border-top-color:var(--color-text)}.config-detail.passive-indicator{flex-direction:column;gap:.25rem;background:#fffbeb;border:1px solid #fde68a;border-radius:8px;padding:.75rem 1rem;margin-top:1rem}.config-badge{font-weight:600;color:#92400e;font-size:.75rem;text-transform:uppercase;letter-spacing:.04em}.config-explanation{font-size:.8125rem;color:#78350f}@media (max-width: 768px){.habit-config-summary{padding:1rem}.config-label{min-width:80px;font-size:.8125rem}.config-value{font-size:.8125rem}}.habit-details-page{max-width:720px;margin:0 auto;padding:2rem 1.5rem}.details-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:2rem}.back-button{padding:.5rem 1rem;background:#fff;border:1px solid var(--color-border);border-radius:8px;font-size:.875rem;font-weight:500;color:var(--color-text-secondary);cursor:pointer;transition:all .15s ease}.back-button:hover{background:var(--color-hover);color:var(--color-text);border-color:var(--color-border-dark)}.details-actions{display:flex;gap:.75rem}.btn-danger{padding:.5rem 1rem;background:#fef2f2;color:#dc2626;border:1px solid #fecaca;border-radius:8px;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .15s ease}.btn-danger:hover:not(:disabled){background:#fee2e2;border-color:#fca5a5}.btn-danger:disabled{opacity:.5;cursor:not-allowed}.habit-title-section{text-align:center;margin-bottom:2rem}.habit-title-section h1{font-size:1.75rem;font-weight:700;color:var(--color-text);margin:0 0 .25rem;letter-spacing:-.02em}.partner-scores-row{display:flex;gap:.5rem;justify-content:center;align-items:center;flex-wrap:wrap;margin-top:1rem}.partner-score-badge{display:inline-block;padding:.375rem .75rem;border-radius:12px;font-size:.8125rem;font-weight:500;color:#fff;white-space:nowrap}.habit-desc{font-size:.9375rem;color:var(--color-text-secondary);margin:0 0 1rem}.current-score-large{font-size:3rem;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.02em}.chart-section{background:#fff;border:1px solid var(--color-border);border-radius:12px;padding:1.25rem;margin:1.5rem 0}.chart-hint{text-align:center;color:var(--color-text-tertiary);font-size:.8125rem;margin:.25rem 0 1rem}.chart-section h2{font-size:1rem;font-weight:600;color:var(--color-text);margin:0 0 .25rem;letter-spacing:-.01em}.habit-chart{width:100%;height:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.habit-chart *{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.history-section{background:#fff;border:1px solid var(--color-border);border-radius:12px;padding:1.5rem}.history-section h2{font-size:1rem;font-weight:600;color:var(--color-text);margin:0 0 1rem;letter-spacing:-.01em}.history-table{display:flex;flex-direction:column;gap:.25rem}.history-header{display:grid;grid-template-columns:1fr 1fr;padding:.5rem .75rem;font-weight:500;color:var(--color-text-tertiary);font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--color-border-light)}.history-row{display:grid;grid-template-columns:1fr 1fr;padding:.625rem .75rem;background:#fff;border-radius:6px;transition:background .1s ease}.history-row:hover{background:var(--color-hover)}.history-date{color:var(--color-text-secondary);font-size:.8125rem}.history-value{color:var(--color-text);font-weight:500;text-align:right;font-size:.8125rem;font-variant-numeric:tabular-nums}.no-entries{padding:1.5rem;text-align:center;color:var(--color-text-tertiary);font-size:.875rem}.modal-body{padding:1.25rem}.modal-body p{margin:0;font-size:.9375rem;line-height:1.6;color:var(--color-text-secondary)}.modal-actions{display:flex;gap:.75rem;justify-content:flex-end;padding:1.25rem;border-top:1px solid var(--color-border-light)}.concept-button-section{display:flex;justify-content:center;padding:2rem 0 1.5rem}.concept-button-section .btn-secondary{padding:.5rem 1rem;font-size:.875rem}@media (max-width: 768px){.habit-details-page{padding:1rem}.details-actions{width:100%;justify-content:flex-start}.habit-title-section h1{font-size:1.5rem}.current-score-large{font-size:2.5rem}.chart-section,.history-section{padding:1rem}.history-header,.history-row{grid-template-columns:1fr auto;padding:.5rem}.modal-actions{flex-direction:column-reverse}.modal-actions button{width:100%}}.chart-tooltip{background:#fff;border:1px solid var(--color-border);border-radius:10px;padding:.75rem 1rem;box-shadow:0 4px 12px #00000014,0 1px 3px #0000000a;font-size:.8125rem;min-width:160px;position:relative}.chart-tooltip.tooltip-above:after{content:"";position:absolute;bottom:-8px;left:var(--arrow-left, 50%);transform:translate(-50%);width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid white;filter:drop-shadow(0 2px 1px rgba(0,0,0,.04))}.chart-tooltip.tooltip-above:before{content:"";position:absolute;bottom:-9px;left:var(--arrow-left, 50%);transform:translate(-50%);width:0;height:0;border-left:9px solid transparent;border-right:9px solid transparent;border-top:9px solid var(--color-border)}.chart-tooltip.tooltip-below:after{content:"";position:absolute;top:-8px;left:var(--arrow-left, 50%);transform:translate(-50%);width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid white;filter:drop-shadow(0 -2px 1px rgba(0,0,0,.04))}.chart-tooltip.tooltip-below:before{content:"";position:absolute;top:-9px;left:var(--arrow-left, 50%);transform:translate(-50%);width:0;height:0;border-left:9px solid transparent;border-right:9px solid transparent;border-bottom:9px solid var(--color-border)}.tooltip-header{display:flex;justify-content:space-between;align-items:center;gap:.75rem}.tooltip-date{font-weight:500;color:var(--color-text)}.tooltip-input-value{font-weight:700;font-size:.9375rem;color:var(--color-text);font-variant-numeric:tabular-nums}.tooltip-divider{height:1px;background:var(--color-border-light);margin:.5rem 0}.tooltip-list{display:flex;flex-direction:column;gap:.25rem}.tooltip-list-item{display:grid;grid-template-columns:auto 1fr auto;gap:.375rem;align-items:center}.tooltip-rank{font-weight:500;color:var(--color-text-tertiary);width:1.25rem;font-size:.75rem}.tooltip-name{font-weight:500;color:var(--color-text);font-size:.8125rem}.tooltip-percentage{font-weight:600;color:var(--color-text);text-align:right;font-size:.8125rem;font-variant-numeric:tabular-nums}.tooltip-actions{margin-top:.625rem;padding-top:.625rem;border-top:1px solid var(--color-border-light);display:flex;justify-content:center}.tooltip-edit-btn{background:var(--color-primary);color:#fff;border:none;border-radius:6px;padding:.5rem 1rem;font-size:.8125rem;font-weight:500;cursor:pointer;transition:all .15s ease;min-height:34px;width:100%}.tooltip-edit-btn:hover{background:var(--color-primary-hover)}.tooltip-edit-btn:active{transform:scale(.98)}.undo-banner{display:flex;justify-content:space-between;align-items:center;gap:1rem;background:var(--color-primary-subtle);border:1px solid #bfdbfe;border-radius:8px;padding:.75rem 1rem;margin-top:1rem;animation:slideDown .2s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.undo-message{font-size:.8125rem;color:var(--color-text-secondary)}.btn-undo{padding:.375rem .75rem;background:var(--color-primary);color:#fff;border:none;border-radius:6px;font-size:.8125rem;font-weight:500;cursor:pointer;transition:all .15s ease;white-space:nowrap}.btn-undo:hover{background:var(--color-primary-hover)}.btn-undo:active{background:#1d4ed8}@media (max-width: 768px){.undo-banner{flex-direction:column;align-items:stretch;padding:.625rem .875rem}.undo-message{font-size:.8125rem}.btn-undo{width:100%}}.export-section{background:#fff;border:1px solid var(--color-border);border-radius:12px;padding:1.25rem;margin:1.5rem 0}.export-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.375rem}.export-header h3{margin:0;font-size:1rem;font-weight:600;color:var(--color-text);letter-spacing:-.01em}.export-section p{color:var(--color-text-tertiary);margin:0;font-size:.8125rem}@media (max-width: 768px){.export-section{padding:1rem}}.habit-card{background:#fff;padding:1.25rem 1.5rem;cursor:pointer;transition:background-color .15s ease;border-bottom:1px solid var(--color-border-light)}.habit-card:hover{background-color:var(--color-hover)}.habit-card:last-child{border-bottom:none}.habit-card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.habit-info{flex:1;min-width:0}.habit-name-row{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.habit-name{font-size:1.125rem;font-weight:600;color:var(--color-text);margin:0;letter-spacing:-.01em}.partner-badges{display:flex;gap:.375rem;flex-wrap:wrap;align-items:center}.partner-badge{display:inline-block;padding:.125rem .5rem;border-radius:10px;font-size:.6875rem;font-weight:500;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}.habit-description{font-size:.875rem;color:var(--color-text-secondary);margin:0}.habit-score{font-size:1.5rem;font-weight:700;margin-left:1rem;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-.02em}.habit-chart-container{display:flex;align-items:center;gap:1rem}.chart-wrapper{flex:1;min-width:0}.habit-chart{width:100%;height:auto;display:block}.circle-buttons{display:flex;flex-direction:row-reverse;gap:.5rem;align-items:center;flex-shrink:0}.circle-button-container{display:flex;flex-direction:column;align-items:center;gap:.125rem}.circle-button{border-radius:50%;border:2px solid var(--color-border);background:#fff;cursor:pointer;transition:all .15s ease;display:flex;align-items:center;justify-content:center;font-weight:600;font-variant-numeric:tabular-nums}.circle-button.large{width:52px;height:52px;font-size:1rem}.circle-button.small{width:40px;height:40px;font-size:.875rem}.circle-button.has-value{border-width:2px}.circle-button:hover:not(:disabled){border-color:var(--color-primary);background:var(--color-primary-subtle)}.circle-button:active:not(:disabled){transform:scale(.96)}.circle-button:disabled{opacity:.5;cursor:not-allowed}.circle-plus{font-size:1.25rem;color:var(--color-text-tertiary);line-height:1}.circle-value{line-height:1}.circle-label{font-size:.625rem;color:var(--color-text-tertiary);font-weight:500;text-transform:uppercase;letter-spacing:.02em}@media (max-width: 768px){.habit-card{padding:1rem 1.25rem}.habit-name{font-size:1rem}.habit-score{font-size:1.25rem}.habit-chart-container{gap:.75rem}.circle-button.large{width:48px;height:48px;font-size:.9375rem}.circle-button.small{width:36px;height:36px;font-size:.8125rem}}@media (max-width: 480px){.habit-card{padding:.875rem 1rem}.habit-card-header{margin-bottom:.625rem}.habit-name{font-size:.9375rem}.habit-score{font-size:1.125rem}.circle-button.large{width:44px;height:44px;font-size:.875rem}.circle-button.small{width:34px;height:34px;font-size:.75rem}}.explainer-modal-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000;padding:1rem}.explainer-modal-content{background:#fff;border-radius:12px;max-width:700px;width:100%;max-height:90vh;display:flex;flex-direction:column;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a}.explainer-modal-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid var(--color-border)}.explainer-modal-header h2{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text)}.explainer-modal-close{background:none;border:none;font-size:2rem;color:var(--color-text-muted);cursor:pointer;line-height:1;padding:0;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s}.explainer-modal-close:hover{background-color:var(--color-bg-secondary)}.explainer-modal-body{padding:1.5rem;overflow-y:auto;flex:1}.explainer-section{margin-bottom:2rem}.explainer-section:last-child{margin-bottom:0}.explainer-pitch{font-size:1.125rem;line-height:1.6;color:var(--color-text);margin:0}.explainer-section h3{margin:0 0 1rem;font-size:1.25rem;font-weight:600;color:var(--color-text)}.explainer-section h4{margin:1.5rem 0 .75rem;font-size:1.1rem;font-weight:600;color:var(--color-text)}.explainer-section p{margin:0 0 1rem;line-height:1.6;color:var(--color-text)}.explainer-section ul{margin:0 0 1rem;padding-left:1.5rem;line-height:1.6;color:var(--color-text)}.explainer-section li{margin-bottom:.5rem}.explainer-key-insight{background:#f0f9ff;border-left:4px solid #3b82f6;padding:1rem;border-radius:4px;margin:1rem 0}.explainer-key-insight p:last-child{margin:0}.timeline-example{background:var(--color-bg-secondary);border:1px solid var(--color-border);border-radius:8px;padding:1.5rem;margin:1.5rem 0}.timeline-example-header{display:grid;grid-template-columns:1fr 1fr;margin-bottom:.5rem}.timeline-example-label{font-size:.875rem;color:var(--color-text-muted);font-weight:500}.timeline-example-label:first-child{text-align:center}.timeline-example-label:last-child{text-align:right}.timeline-example-bar{position:relative;height:60px;border-radius:4px;margin-bottom:1rem;overflow:hidden;background:#e5e7eb}.timeline-day{position:absolute;top:0;bottom:0;background:transparent}.timeline-day.weekend{background:#0000000f}.timeline-span-marker{position:absolute;right:0;top:0;bottom:0;background:linear-gradient(to left,#10b9814d,#10b98133);border-left:3px solid #10b981;border-radius:0 4px 4px 0;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;pointer-events:none}.timeline-span-label{font-size:.875rem;font-weight:600;color:#059669;background:#fff;padding:.25rem .5rem;border-radius:4px;box-shadow:0 1px 2px #0000001a;margin-left:.75rem}.timeline-span-arrow{position:absolute;left:-3px;top:50%;transform:translateY(-50%);width:0;height:0;border-right:8px solid #10b981;border-top:6px solid transparent;border-bottom:6px solid transparent}.timeline-example-explanation{font-size:.9375rem;line-height:1.6;color:var(--color-text)}.explainer-toggle{background:none;border:none;width:100%;text-align:left;display:flex;align-items:center;gap:.75rem;cursor:pointer;padding:.5rem 0;font-size:1rem;font-weight:500;color:var(--color-text);transition:color .2s}.explainer-toggle:hover{color:#3b82f6}.explainer-toggle-icon{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;background:var(--color-bg-secondary);border-radius:4px;font-size:1.25rem;line-height:1;flex-shrink:0}.explainer-technical-content{margin-top:1rem}.explainer-formula{background:#f9fafb;border:1px solid var(--color-border);border-radius:4px;padding:1rem;font-family:Courier New,monospace;font-size:1rem;text-align:center;margin:1rem 0}.explainer-modal-footer{padding:1.5rem;border-top:1px solid var(--color-border);display:flex;justify-content:flex-end}@media (max-width: 768px){.explainer-modal-content{max-height:95vh}.explainer-modal-header,.explainer-modal-body,.explainer-modal-footer{padding:1rem}.explainer-pitch{font-size:1rem}.timeline-example{padding:1rem}.timeline-span-label{font-size:.75rem}}.habit-list-container{max-width:720px;margin:0 auto;padding:2rem 1.5rem}.habit-list-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem}.header-title{display:flex;align-items:center;gap:.5rem}.sync-indicator{display:flex;align-items:center;margin-left:.25rem}.sync-spinner{width:14px;height:14px;border:2px solid var(--color-border);border-top-color:var(--color-primary);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.habit-list-header h1{font-size:1.5rem;font-weight:700;color:var(--color-text);margin:0;letter-spacing:-.02em}@media (max-width: 480px){.habit-list-header h1{font-size:1.25rem}}.help-icon-button,.add-icon-button{width:1.75rem;height:1.75rem;min-width:1.75rem;border-radius:50%;border:1.5px solid var(--color-border);background:#fff;color:var(--color-text-tertiary);font-size:1rem;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s ease;flex-shrink:0;padding:0}.add-icon-button{font-size:1.25rem;line-height:0;padding-bottom:1px}.help-icon-button:hover,.add-icon-button:hover{border-color:var(--color-primary);color:var(--color-primary);background:var(--color-primary-subtle)}.header-actions{display:flex;gap:.75rem;align-items:center}.btn-primary,.btn-secondary{padding:.5rem 1rem;border-radius:6px;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .15s ease;border:none}.btn-primary{background:var(--color-primary);color:#fff}.btn-primary:hover{background:var(--color-primary-hover)}.btn-secondary{background:#fff;color:var(--color-text);border:1px solid var(--color-border)}.btn-secondary:hover{background:var(--color-hover);border-color:var(--color-border-dark)}.habits-grid{display:flex;flex-direction:column;background:#fff;border-radius:12px;border:1px solid var(--color-border);overflow:hidden}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:50vh;text-align:center;padding:2rem}.empty-state h2{font-size:1.5rem;font-weight:600;color:var(--color-text);margin:0 0 .5rem}.empty-state p{font-size:1rem;color:var(--color-text-secondary);margin:0 0 1.5rem;max-width:400px}@media (max-width: 768px){.habit-list-container{padding:1rem}.habit-list-header{margin-bottom:1rem}.btn-primary,.btn-secondary{padding:.5rem .875rem;font-size:.8125rem}}@media (max-width: 480px){.habit-list-container{padding:.75rem}.habits-grid{border-radius:10px}}.username-onboarding-overlay{position:fixed;inset:0;background:#fff;display:flex;align-items:center;justify-content:center;z-index:2000;padding:2rem}.username-onboarding-content{max-width:500px;width:100%}.onboarding-header{text-align:center;margin-bottom:3rem}.onboarding-header h1{font-size:2.5rem;font-weight:700;color:var(--color-text);margin:0 0 .5rem}.onboarding-header p{font-size:1.125rem;color:var(--color-text-muted);margin:0}.username-form{display:flex;flex-direction:column;gap:1.5rem}.display-name-input{width:100%;padding:1rem;border:2px solid var(--color-border);border-radius:8px;font-size:1.125rem;transition:border-color .2s ease;box-sizing:border-box}.display-name-input:focus{outline:none;border-color:var(--color-primary)}.username-input-container{position:relative;display:flex;align-items:center}.username-input-container input{width:100%;padding:1rem;border:2px solid var(--color-border);border-radius:8px;font-size:1.25rem;font-weight:500;transition:all .2s ease;box-sizing:border-box}.username-input-container input:focus{outline:none;border-color:var(--color-primary)}.username-input-container input.checking{border-color:#f59e0b}.username-input-container input.available{border-color:#10b981}.username-input-container input.unavailable{border-color:#ef4444}.input-status{position:absolute;right:1rem;font-size:.875rem;font-weight:600}.input-status.checking{color:#f59e0b}.input-status.available{color:#10b981}.input-status.unavailable{color:#ef4444}.input-hint{display:block;font-size:.875rem;color:var(--color-text-muted);margin-top:.5rem}.onboarding-info{background:var(--color-surface);padding:1.5rem;border-radius:8px}.onboarding-info p{font-size:.875rem;color:var(--color-text-muted);margin:0 0 .75rem}.url-example{font-family:monospace;font-size:.875rem;color:var(--color-text);background:#fff;padding:.75rem 1rem;border-radius:6px;border:1px solid var(--color-border)}.url-example strong{color:var(--color-primary)}.btn-large{padding:1rem 2rem;font-size:1.125rem;width:100%}@media (max-width: 640px){.username-onboarding-overlay{padding:1rem}.onboarding-header h1{font-size:2rem}.onboarding-header p{font-size:1rem}.username-input-container input{font-size:1.125rem}}.invite-acceptance-page{max-width:800px;margin:0 auto;padding:40px 20px}.invite-header{text-align:center;margin-bottom:32px}.invite-header h1{font-size:2rem;margin-bottom:8px}.invite-from{font-size:1.125rem;color:var(--color-text-secondary, #6b7280)}.habit-preview{background:var(--color-card-bg, #ffffff);border:2px solid var(--color-primary, #3b82f6);border-radius:12px;padding:24px;margin-bottom:32px}.habit-preview h2{margin:0 0 12px;font-size:1.5rem}.habit-description{color:var(--color-text-secondary, #6b7280);margin-bottom:16px}.engine-description{background:var(--color-bg-subtle, #f9fafb);padding:16px;border-radius:8px;margin-top:16px}.engine-description strong{display:block;margin-bottom:8px}.engine-description ul{margin:8px 0 0 20px;list-style-type:disc}.math-requirement{margin-top:16px;padding:12px;background:#fef3c7;border:1px solid #fde047;border-radius:8px;color:#92400e;font-weight:500}.acceptance-options{margin-bottom:32px}.acceptance-options h3{font-size:1.25rem;margin-bottom:16px}.option-card{background:var(--color-card-bg, #ffffff);border:2px solid var(--color-border, #e5e7eb);border-radius:12px;padding:20px;margin-bottom:16px;cursor:pointer;transition:all .2s;display:flex;gap:16px;align-items:start}.option-card:hover{border-color:var(--color-primary, #3b82f6);box-shadow:0 4px 12px #3b82f61a}.option-card.selected{border-color:var(--color-primary, #3b82f6);background:#3b82f605}.option-card input[type=radio]{margin-top:4px;width:20px;height:20px;cursor:pointer;flex-shrink:0}.option-content{flex:1}.option-content h4{margin:0 0 8px;font-size:1.125rem}.option-content>p{color:var(--color-text-secondary, #6b7280);margin:0;font-size:.875rem}.option-details{margin-top:16px;padding-top:16px;border-top:1px solid var(--color-border, #e5e7eb)}.habit-select{width:100%;padding:10px;border:1px solid var(--color-border, #e5e7eb);border-radius:8px;font-size:1rem;background:#fff}.no-compatible{color:var(--color-text-secondary, #6b7280);font-style:italic;font-size:.875rem}.form-group{margin-bottom:16px}.form-group label{display:block;font-weight:500;margin-bottom:6px;font-size:.875rem}.form-input,.form-textarea{width:100%;padding:10px;border:1px solid var(--color-border, #e5e7eb);border-radius:8px;font-size:1rem;font-family:inherit}.form-textarea{resize:vertical}.locked-math-notice{margin-top:12px;padding:10px;background:#e0f2fe;border:1px solid #7dd3fc;border-radius:6px;color:#0c4a6e;font-size:.875rem}.invite-actions{display:flex;gap:12px;justify-content:center;padding-top:24px;border-top:1px solid var(--color-border, #e5e7eb)}.invite-error{max-width:600px;margin:100px auto;text-align:center;padding:40px}.invite-error h1{font-size:2rem;margin-bottom:16px;color:#dc2626}.invite-error p{color:var(--color-text-secondary, #6b7280);font-size:1.125rem}
