:root,:root[data-theme=dark]{--bg: #0e0a07;--surface: #1a130d;--surface-2: #241a11;--border: rgba(212, 169, 79, .22);--gold: #d4a94f;--gold-soft: rgba(212, 169, 79, .14);--text: #f3e9d2;--muted: #a89a80;--on-gold: #0e0a07;--success: #5cc08a;--success-soft: rgba(92, 192, 138, .16);--on-success: #0e0a07;--danger: #ef6b62;--danger-soft: rgba(239, 107, 98, .16);--shadow: 0 10px 30px rgba(0, 0, 0, .45)}:root[data-theme=light]{--bg: #f7f1e5;--surface: #fffaf0;--surface-2: #f0e6d0;--border: rgba(140, 100, 20, .25);--gold: #82590d;--gold-soft: rgba(130, 89, 13, .14);--text: #2a1d0e;--muted: #6a5a3e;--on-gold: #fffaf0;--success: #1a6f45;--success-soft: rgba(26, 111, 69, .14);--on-success: #fffaf0;--danger: #b8332a;--danger-soft: rgba(184, 51, 42, .12);--shadow: 0 10px 30px rgba(90, 60, 10, .12)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif;line-height:1.5;-webkit-font-smoothing:antialiased;transition:background .3s,color .3s}h1,h2,.time{font-family:Sora,Inter,sans-serif}button,input{font:inherit;color:inherit}button{cursor:pointer}:focus-visible{outline:2px solid var(--gold);outline-offset:2px}.app{max-width:1100px;margin:0 auto;padding:32px 16px 48px}.header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:28px}.eyebrow{margin:0 0 4px;color:var(--gold);font-size:.8rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase}h1{margin:0;font-size:clamp(1.4rem,4vw,2rem);font-weight:600}h2{margin:0;font-size:1.05rem;font-weight:600}.icon-btn{width:42px;height:42px;border-radius:50%;border:1px solid var(--border);background:var(--surface);font-size:1.1rem;transition:transform .2s,border-color .2s}.icon-btn:hover{transform:translateY(-2px);border-color:var(--gold)}.grid{display:grid;grid-template-columns:360px minmax(0,1fr);grid-template-rows:auto 1fr auto auto auto;grid-template-areas:"timer habits" "timer tasks" "completed completed" "chart chart" "heat heat";gap:20px}.timer-card{grid-area:timer}.habits-card{grid-area:habits;align-self:start}.tasks-card{grid-area:tasks}.completed-card{grid-area:completed}.chart-card{grid-area:chart}.heat-card{grid-area:heat}.card{min-width:0;background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:22px;box-shadow:var(--shadow);transition:border-color .25s,transform .25s}.card:hover{border-color:var(--gold)}.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.tabs{display:flex;gap:4px;padding:4px;margin:14px 0 20px;background:var(--surface-2);border-radius:999px}.tabs.small{margin:0}.tab{flex:1 1 0;min-width:0;padding:7px 10px;border:0;border-radius:999px;background:transparent;color:var(--muted);font-size:.82rem;font-weight:500;white-space:nowrap;transition:background .2s,color .2s}.tab.active{background:var(--gold);color:var(--on-gold)}.timer-card{text-align:center}.timer-card h2{text-align:left}.dial{position:relative;width:min(250px,100%);margin:0 auto 20px;aspect-ratio:1}.dial svg{width:100%;height:100%;transform:rotate(-90deg)}.dial circle{fill:none;stroke-width:10}.dial-track{stroke:var(--surface-2)}.dial-bar{stroke:var(--gold);stroke-linecap:round;transition:stroke-dashoffset .25s linear}.dial-text{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.time{font-size:3rem;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.02em}.mode-label{color:var(--muted);font-size:.85rem}.controls{display:flex;justify-content:center;gap:8px}.btn{padding:10px 18px;border-radius:999px;border:1px solid var(--border);background:transparent;font-weight:500;transition:transform .15s,background .2s,border-color .2s}.btn:hover{transform:translateY(-1px);border-color:var(--gold)}.btn.primary{background:var(--gold);border-color:var(--gold);color:var(--on-gold);font-weight:600;min-width:96px}.cycle{display:flex;justify-content:center;gap:8px;margin:20px 0 4px}.pip{width:10px;height:10px;border-radius:50%;border:1.5px solid var(--gold)}.pip.on{background:var(--gold)}.stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0 0}.stats div{padding:12px;border-radius:14px;background:var(--surface-2)}.stats dt{color:var(--muted);font-size:.75rem}.stats dd{margin:2px 0 0;font-family:Sora,sans-serif;font-weight:600;font-size:1.15rem}.badge.ok{background:var(--success-soft);color:var(--success)}.badge{padding:4px 10px;border-radius:999px;background:var(--gold-soft);color:var(--gold);font-size:.78rem;font-weight:600}.add{display:flex;gap:8px;margin-bottom:16px}.add input{flex:1;min-width:0;padding:10px 14px;border-radius:12px;border:1px solid var(--border);background:var(--surface-2)}.add input::placeholder{color:var(--muted)}.empty{margin:24px 0;text-align:center;color:var(--muted)}.habit-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.habit{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:14px;padding:12px 14px;border-radius:14px;background:var(--surface-2);border:1px solid transparent;transition:border-color .2s}.habit.done{border-color:var(--success)}.check{width:28px;height:28px;border-radius:8px;border:2px solid var(--gold);background:transparent;color:var(--on-gold);font-weight:700;line-height:1;transition:background .2s,transform .15s}.habit.done .check{background:var(--success);border-color:var(--success);color:var(--on-success)}.check:active{transform:scale(.9)}.habit-main{display:flex;flex-direction:column;min-width:0}.habit-name{font-weight:500;overflow-wrap:anywhere}.habit.done .habit-name{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--success)}.habit-meta{display:flex;gap:10px;font-size:.78rem;color:var(--muted)}.streak.hot{color:var(--gold);font-weight:600}.streak.risk{color:var(--danger);font-weight:600}.week-dots{display:flex;gap:4px}.dot{width:12px;height:12px;padding:0;border-radius:50%;border:1.5px solid var(--border);background:transparent}.dot.on{background:var(--gold);border-color:var(--gold)}.remove{width:28px;height:28px;border:0;border-radius:50%;background:transparent;color:var(--muted);font-size:1.3rem;line-height:1}.remove:hover{color:var(--danger);background:var(--danger-soft)}.chart-summary{margin:-8px 0 8px;color:var(--muted);font-size:.9rem}.chart{width:100%;height:auto;display:block}.grid-line{stroke:var(--border);stroke-dasharray:3 4}.axis{fill:var(--muted);font-size:11px}.today-label{fill:var(--gold);font-weight:600}.bar{fill:var(--gold);opacity:.45;transition:opacity .2s,height .4s,y .4s}.bar.today,.bar-group:hover .bar{opacity:1}.bar-value{fill:var(--text);font-size:11px;font-weight:600}.footer{margin-top:28px;text-align:center;color:var(--muted);font-size:.82rem}.overview{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}.stat{display:flex;flex-direction:column;padding:14px 16px;background:var(--surface);border:1px solid var(--border);border-radius:16px}.stat-label,.stat-hint{color:var(--muted);font-size:.78rem}.stat-value{font-family:Sora,Inter,sans-serif;font-size:1.6rem;font-weight:600;line-height:1.3}.stat-value.hot{color:var(--gold)}.task{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:14px;padding:12px 14px;border-radius:14px;background:var(--surface-2)}.task .check:hover{background:var(--gold-soft)}.log{display:flex;flex-direction:column;gap:16px;max-height:340px;overflow-y:auto}.log-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:6px;font-size:.82rem;color:var(--muted)}.log-head strong{color:var(--gold);font-weight:600}.log ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.log li{display:flex;align-items:center;gap:10px;padding:6px 4px}.log-tick{color:var(--success);font-weight:700}.log-name{flex:1;min-width:0;overflow-wrap:anywhere}.link{border:0;background:transparent;color:var(--muted);font-size:.78rem;text-decoration:underline}.link:hover{color:var(--gold)}.btn.ghost{background:transparent;border:1px solid var(--border)}.btn.small{padding:4px 12px;font-size:.78rem}@media(max-width:860px){.overview{grid-template-columns:repeat(2,1fr)}.grid{grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-template-areas:"timer" "habits" "tasks" "completed" "chart" "heat"}}@media(max-width:480px){.card{padding:18px}.tab{padding:7px 4px;font-size:.78rem}.habit{grid-template-columns:auto 1fr auto}.week-dots{display:none}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}.task-picker{display:flex;flex-direction:column;gap:6px;margin:0 0 18px;text-align:left;font-size:.78rem;color:var(--muted)}.task-picker select{width:100%;padding:9px 12px;border-radius:12px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);font:inherit;font-size:.9rem}.task.active{border:1px solid var(--gold);padding:11px 13px}.task-main{display:flex;flex-direction:column;min-width:0}.task-focus{color:var(--gold);font-size:.76rem}.log-focus{color:var(--gold);font-size:.76rem;white-space:nowrap}.task .link[aria-pressed=true]{color:var(--gold);font-weight:600}.heatmap{display:block;width:100%;max-width:560px;height:auto}.hm{fill:var(--surface-2)}.hm-1{fill:var(--gold);fill-opacity:.3}.hm-2{fill:var(--gold);fill-opacity:.55}.hm-3{fill:var(--gold);fill-opacity:.78}.hm-4{fill:var(--gold)}.hm.today{stroke:var(--text);stroke-width:1.5}.heat-legend{display:flex;align-items:center;gap:6px;margin-top:12px;color:var(--muted);font-size:.78rem}.hm-swatch{width:14px;height:14px;border-radius:4px;display:inline-block}.hm-swatch.hm-0{background:var(--surface-2)}.hm-swatch.hm-1{background:var(--gold);opacity:.3}.hm-swatch.hm-2{background:var(--gold);opacity:.55}.hm-swatch.hm-3{background:var(--gold);opacity:.78}.hm-swatch.hm-4{background:var(--gold)}.data-tools{margin-top:28px;text-align:center}.data-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px}.btn.danger:hover{color:var(--danger);border-color:var(--danger)}.data-msg{min-height:1.4em;margin:10px 0 0;color:var(--muted);font-size:.82rem}.data-msg.error{color:var(--danger)}.timer-card .card-head{margin-bottom:0}.head-actions{display:flex;gap:6px}.icon-btn.small{width:34px;height:34px;font-size:.95rem}.icon-btn[aria-pressed=false]{opacity:.6}.settings-panel{margin:14px 0 0;padding:14px;text-align:left;background:var(--surface-2);border:1px solid var(--border);border-radius:14px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field{display:flex;flex-direction:column;gap:4px;color:var(--muted);font-size:.76rem}.field input{width:100%;padding:8px 10px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text);font-size:.95rem}.field input:disabled{opacity:.5;cursor:not-allowed}.settings-hint{margin:10px 0 0;color:var(--muted);font-size:.76rem}.goal{display:flex;align-items:center;gap:14px;margin:18px 0 12px;padding:12px 14px;text-align:left;background:var(--surface-2);border-radius:14px;border:1px solid transparent;transition:border-color .3s}.goal.reached{border-color:var(--success)}.goal.reached .goal-bar{stroke:var(--success)}.goal-ring{width:56px;height:56px;flex:none;transform:rotate(-90deg)}.goal-ring circle{fill:none;stroke-width:6}.goal-track{stroke:var(--surface)}.goal-bar{stroke:var(--gold);stroke-linecap:round;transition:stroke-dashoffset .5s ease}.goal-pct{fill:var(--text);font-size:14px;font-weight:600;font-family:Sora,Inter,sans-serif;transform:rotate(90deg);transform-origin:32px 32px}.goal.reached .goal-pct{fill:var(--success);font-size:20px}.goal-text{display:flex;flex-direction:column;font-size:.8rem;color:var(--muted)}.goal-text strong{color:var(--text);font-size:.9rem;font-weight:600}.confetti{position:fixed;inset:0;pointer-events:none;z-index:50;overflow:hidden}.piece{position:absolute;width:8px;height:12px;border-radius:2px;animation:burst 1s cubic-bezier(.2,.7,.3,1) forwards}@keyframes burst{0%{transform:translate(0) rotate(0);opacity:1}70%{opacity:1}to{transform:translate(var(--dx),calc(var(--dy) + 90px)) rotate(var(--rot));opacity:0}}.shortcuts{margin:14px 0 0;color:var(--muted);font-size:.76rem}kbd{display:inline-block;min-width:1.6em;margin:0 1px;padding:1px 6px;border:1px solid var(--border);border-bottom-width:2px;border-radius:6px;background:var(--surface-2);color:var(--text);font-family:inherit;font-size:.72rem;text-align:center}@media(hover:none){.shortcuts{display:none}}.welcome{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px 24px;margin-bottom:20px;background:linear-gradient(135deg,var(--gold-soft),var(--surface));border-color:var(--gold)}.welcome-text{flex:1 1 320px}.welcome-text p{margin:6px 0 0;color:var(--muted);font-size:.92rem}.welcome-actions{display:flex;flex-wrap:wrap;gap:10px}.name-row{display:flex;align-items:center;gap:6px;min-width:0}.edit{flex:none;width:24px;height:24px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:.85rem;line-height:1}.edit:hover{color:var(--gold);background:var(--gold-soft)}@media(hover:hover){.edit{opacity:0;transition:opacity .15s}.habit:hover .edit,.task:hover .edit,.edit:focus-visible{opacity:1}}.inline-input{width:100%;min-width:0;padding:4px 8px;border:1px solid var(--gold);border-radius:8px;background:var(--surface);color:var(--text);font-weight:500}
