*{box-sizing:border-box}body{margin:0;background:#eef3f7;font-family:system-ui;color:#0f172a}.app{max-width:600px;margin:auto;padding:18px;min-height:100vh;background:#f8fafc}header,.spread{display:flex;justify-content:space-between;align-items:center}h1{margin:3px 0 15px}header button{font-size:22px;border:0;border-radius:12px;padding:10px}.card,.status{background:#fff;border-radius:18px;padding:18px;margin-bottom:14px;box-shadow:0 4px 16px #0000000b}.status{background:#dcfce7;display:grid;gap:5px}.status.pause{background:#e2e8f0}.status.off{background:#fef3c7}.status b{font-size:25px}.status strong{font-size:38px}.axis{height:30px;background:#cbd5e1;margin:50px 0 8px;position:relative;border-radius:6px}.axis:before,.axis:after{content:"";position:absolute;top:-5px;width:3px;height:40px;background:#0f172a}.axis:before{left:0}.axis:after{right:0}#fill{height:100%;background:#22c55e;border-radius:6px 0 0 6px}#marker{position:absolute;top:-10px;height:50px;width:3px;background:#ef4444}#marker em{position:absolute;bottom:48px;transform:translateX(-45%);font-size:11px;color:#ef4444;font-style:normal;font-weight:800}.axislabels{font-size:13px}.hour{height:42px;background:#e2e8f0;position:relative;border-radius:6px;margin-top:30px}.seg{position:absolute;top:0;height:100%}.work{background:#4ade80}.pauseSeg{background:#94a3b8}.now{position:absolute;top:-5px;height:52px;width:3px;background:#ef4444}.legend{margin-top:14px;font-size:13px}.phase{padding:10px 0;border-top:1px solid #e2e8f0}.setting{display:flex;align-items:center;gap:7px;padding:10px 0;border-top:1px solid #e2e8f0}.setting label{flex:1}.setting input{width:55px;padding:9px;text-align:center}.setting button{width:38px;height:38px}.window{padding:12px 0;border-top:1px solid #e2e8f0}.times{display:flex;gap:8px;margin-top:8px}.times select{flex:1;padding:10px}.anchorGrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.anchorGrid label{font-size:13px;color:#64748b}.anchorGrid input{display:block;width:100%;padding:12px 9px;margin-top:5px;border:1px solid #cbd5e1;border-radius:10px;font-size:16px}.anchorButtons{display:flex;gap:8px;margin-top:10px}.anchorButtons button{flex:1;padding:11px;border:0;border-radius:10px;background:#e2e8f0;font-weight:700}.primary,.secondary{width:100%;padding:14px;border:0;border-radius:12px;font-weight:800;font-size:16px;margin-top:8px}.primary{background:#2563eb;color:#fff}.secondary{background:#e2e8f0}footer{text-align:center;color:#94a3b8;font-size:12px;margin-top:20px}p,small{color:#64748b}@media(max-width:430px){.anchorGrid{grid-template-columns:1fr}.status strong{font-size:34px}}
.modeDuration{font-size:16px;font-weight:800;color:#166534;margin-top:2px}
.status.pause .modeDuration{color:#334155}.status.off .modeDuration{color:#92400e}
.modeBadge{display:inline-block;margin-top:12px;padding:8px 12px;border-radius:10px;background:#eef2ff;color:#3730a3;font-weight:850;font-size:16px}

.counters{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.counter{background:#ffffffaa;border-radius:14px;padding:12px;display:grid;gap:4px}
.counter span{font-size:12px;font-weight:900;letter-spacing:.06em;color:#64748b}
.counter strong{font-size:26px!important;font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:360px){.counter strong{font-size:22px!important}}

.statusSub{font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#64748b}
.phase{display:flex;align-items:center;gap:10px}
.phaseDot{width:10px;height:10px;border-radius:50%;flex:0 0 auto}
.phaseDot.workDot{background:#22c55e}.phaseDot.pauseDot{background:#94a3b8}.phaseDot.offDot{background:#f59e0b}
.phaseText{display:grid;gap:2px}.phaseText small{font-size:12px}
.nextStart{font-weight:800;color:#92400e}

.timelineLabels{position:relative;height:24px;margin-top:7px;font-size:11px;color:#64748b;font-variant-numeric:tabular-nums}
.timelineLabels span{position:absolute;transform:translateX(-50%);white-space:nowrap}
#tlStart{left:0;transform:none}.timelineLabels #tlNow{left:33.333%;color:#dc2626;font-weight:900}
#tlPlus15{left:66.666%}#tlEnd{right:0;left:auto;transform:none}
.hour:before,.hour:after{content:"";position:absolute;top:0;bottom:0;width:1px;background:#94a3b855;z-index:5}
.hour:before{left:33.333%}.hour:after{left:66.666%}

.offSeg{background:#e2e8f0}

.fixedHours #tlStart{left:0;transform:none}
.fixedHours #tlHour1{left:33.333%;transform:translateX(-50%)}
.fixedHours #tlHour2{left:66.666%;transform:translateX(-50%)}
.fixedHours #tlEnd{right:0;left:auto;transform:none}
.hour .hourLine{position:absolute;top:0;bottom:0;width:1px;background:#64748b66;z-index:6}
.hour .hourLine.h1{left:33.333%}.hour .hourLine.h2{left:66.666%}

.hour .seg{cursor:pointer}
.timelineTip{position:absolute;z-index:30;bottom:52px;max-width:230px;padding:9px 11px;border-radius:9px;background:#0f172a;color:#fff;font-size:12px;line-height:1.35;box-shadow:0 5px 18px #0003;pointer-events:none;white-space:nowrap;transform:translateX(-50%)}
.timelineTip b{display:block;font-size:13px;margin-bottom:2px}
.timelineTip:after{content:"";position:absolute;left:50%;top:100%;transform:translateX(-50%);border:6px solid transparent;border-top-color:#0f172a}


.timelineWrap{position:relative}
.timelineWrap .timelineTip{bottom:52px}
@media (hover:hover) and (pointer:fine){
  #hourAxis .seg:hover{filter:brightness(.92)}
}

.stepDuration{font-weight:700;color:#64748b;white-space:nowrap}

.updateBar{position:sticky;bottom:12px;z-index:100;margin:18px 0 4px;padding:12px 14px;border-radius:14px;background:#0f172a;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;box-shadow:0 8px 24px #0003}
.updateBar[hidden]{display:none}
.updateBar div{min-width:0;display:grid;gap:2px}
.updateBar small{color:#cbd5e1;line-height:1.25}
.updateBar button{flex:0 0 auto;border:0;border-radius:10px;padding:11px 14px;background:#fff;color:#0f172a;font-weight:850;font-size:15px}
