*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:#f5f5f7;
  color:#1c1c1e;
  font:16px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  padding:28px 16px 48px;
}
.wrap{max-width:720px;margin:0 auto}
h1{margin:0 0 18px;font-size:26px;font-weight:700;letter-spacing:-.02em}
.card{
  background:#fff;
  border-radius:18px;
  padding:20px;
  box-shadow:0 1px 2px rgba(16,16,24,.05),0 8px 24px rgba(16,16,24,.06);
}
.card + .card{margin-top:16px}
.row{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}
label{display:block;font-size:13px;color:#8a8a8e;margin-bottom:6px}
input[type=date]{
  font:inherit;color:inherit;
  padding:11px 12px;
  border:1px solid #e3e3e8;border-radius:12px;background:#fff;
  min-width:170px;
}
.stepper{display:flex;align-items:center;gap:8px}
.stepper button{
  width:44px;height:44px;flex:0 0 44px;
  font-size:22px;line-height:1;
  border:1px solid #e3e3e8;border-radius:12px;background:#fff;color:#1c1c1e;
  cursor:pointer;user-select:none;
}
.stepper button:active{background:#f0eefb}
.val{position:relative}
.val input{
  font:600 22px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  width:132px;padding:11px 40px 11px 14px;
  border:1px solid #e3e3e8;border-radius:12px;background:#fff;color:#1c1c1e;
  text-align:center;
  -moz-appearance:textfield;
}
.val input::-webkit-outer-spin-button,.val input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.val span{position:absolute;right:14px;top:50%;transform:translateY(-50%);color:#8a8a8e;font-size:14px}
#save{
  margin-left:auto;
  font:600 15px/1 inherit;
  padding:15px 26px;border:0;border-radius:12px;
  background:#705ABF;color:#fff;cursor:pointer;
}
#save:active{background:#5f4bab}
#save[disabled]{opacity:.55;cursor:default}
.status{min-height:18px;margin:12px 0 0;font-size:13px;color:#8a8a8e}
.status.ok{color:#2f9461}
.status.err{color:#d9483b}
.ranges{display:flex;gap:6px;margin-bottom:14px;flex-wrap:wrap}
.ranges button{
  font:500 14px/1 inherit;
  padding:9px 14px;border:1px solid #e3e3e8;border-radius:10px;background:#fff;color:#5b5b60;cursor:pointer;
}
.ranges button.on{background:#705ABF;border-color:#705ABF;color:#fff}
.chart{position:relative;height:280px}
canvas{width:100%;height:100%;display:block}
.empty{
  position:absolute;inset:0;display:none;
  align-items:center;justify-content:center;
  color:#a1a1a6;font-size:14px;
}
.empty.on{display:flex}
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 18px}
.who{display:flex;align-items:center;gap:4px;font-size:14px;color:#8a8a8e;white-space:nowrap}
.who button{display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:0;border-radius:12px;background:none;color:#8a8a8e;cursor:pointer}
.who button:active{background:#e9e9ee;color:#705ABF}
.who svg{width:20px;height:20px}
.tabs{display:inline-flex;gap:2px;padding:3px;background:#e9e9ee;border-radius:12px}
.tabs button{
  font:600 15px/1 inherit;
  padding:10px 20px;border:0;border-radius:10px;background:none;color:#5b5b60;cursor:pointer;
}
.tabs button.on{background:#fff;color:#1c1c1e;box-shadow:0 1px 3px rgba(16,16,24,.1)}
.pane{display:none}
.pane.on{display:block}
.cnt b{display:block;font-size:40px;line-height:1.1;font-weight:700;letter-spacing:-.02em}
.cnt p{margin:6px 0 0;font-size:14px;color:#8a8a8e}
.cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.cal-head b{font-size:17px;font-weight:600}
.cal-head button{
  width:40px;height:40px;
  font-size:20px;line-height:1;
  border:1px solid #e3e3e8;border-radius:12px;background:#fff;color:#1c1c1e;cursor:pointer;
}
.grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.wd{padding:4px 0;font-size:12px;color:#a1a1a6;text-align:center}
.day{
  height:52px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  font:500 15px/1 inherit;
  border:0;border-radius:12px;background:none;color:#1c1c1e;cursor:pointer;
}
.day small{font-size:10px;color:#a1a1a6}
.day.future{color:#c7c7cc}
.day.today{color:#705ABF;font-weight:700}
.day.phase2{box-shadow:inset 0 0 0 2px #705ABF}
.day.start{background:#705ABF;color:#fff}
.day.start small{color:rgba(255,255,255,.75)}
.day.sel{outline:2px solid #1c1c1e;outline-offset:1px}
.psel{margin:16px 0 0;font-size:15px;font-weight:600}
.acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.acts button{
  flex:1 1 auto;
  font:600 14px/1 inherit;
  padding:13px 14px;border:1px solid #e3e3e8;border-radius:12px;background:#fff;color:#1c1c1e;cursor:pointer;
}
.acts button.on{background:#705ABF;border-color:#705ABF;color:#fff}
.acts button[hidden]{display:none}
.login{max-width:380px;margin:24px auto 0}
.login input{
  display:block;width:100%;margin:0 0 14px;
  font:inherit;color:inherit;
  padding:12px 14px;border:1px solid #e3e3e8;border-radius:12px;background:#fff;
}
.login .go{
  width:100%;
  font:600 15px/1 inherit;
  padding:15px 26px;border:0;border-radius:12px;
  background:#705ABF;color:#fff;cursor:pointer;
}
.login .go[disabled]{opacity:.55;cursor:default}
@media (max-width:560px){
  body{padding:18px 12px 36px}
  h1{font-size:22px}
  .tabs{flex:1}
  .tabs button{flex:1}
  .cnt b{font-size:34px}
  .grid{gap:2px}
  .day{height:auto;aspect-ratio:1;font-size:14px;border-radius:10px}
  .card{padding:16px;border-radius:16px}
  input[type=date]{
    -webkit-appearance:none;appearance:none;
    width:100%;min-width:0;max-width:100%;
    text-align:center;
  }
  .field{width:100%}
  .stepper{width:100%;justify-content:space-between}
  .val{flex:1}
  .val input{width:100%}
  #save{margin-left:0;width:100%}
  .chart{height:220px}
  .ranges button{flex:1 1 auto;padding:9px 8px;font-size:13px}
}
.grow{flex:1}
.seg{display:inline-flex;gap:2px;padding:3px;background:#e9e9ee;border-radius:12px}
.seg button{font:600 15px/1 inherit;padding:11px 18px;border:0;border-radius:10px;background:none;color:#5b5b60;cursor:pointer}
.seg button.on{background:#fff;color:#1c1c1e;box-shadow:0 1px 3px rgba(16,16,24,.1)}
.bpm{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:10px;margin:16px 0 14px}
.bpm .val input{width:100%;padding:11px 12px}
.bpm div:first-child .val input{padding-right:64px}
.chk{display:flex;align-items:center;gap:10px;font-size:15px;color:#1c1c1e;margin:0 0 12px;cursor:pointer}
.chk input{width:20px;height:20px;accent-color:#705ABF}
.notes{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
.notes button{font:500 14px/1 inherit;padding:10px 12px;border:1px solid #e3e3e8;border-radius:10px;background:#fff;color:#5b5b60;cursor:pointer}
.notes button.on{background:#fff4e5;border-color:#e8a23a;color:#8a5200}
.txt{display:block;width:100%;font:inherit;color:inherit;padding:11px 12px;border:1px solid #e3e3e8;border-radius:12px;background:#fff;margin:0 0 14px}
.row.end{justify-content:flex-end;align-items:center}
.primary{font:600 15px/1 inherit;padding:15px 26px;border:0;border-radius:12px;background:#705ABF;color:#fff;cursor:pointer}
.primary[disabled]{opacity:.55;cursor:default}
.del,.ghost{font:500 14px/1 inherit;padding:12px 14px;border:1px solid #e3e3e8;border-radius:12px;background:#fff;color:#5b5b60;cursor:pointer}
.del{border:0;color:#d9483b;background:none;margin-right:auto}
.del[hidden]{display:none}
.sum{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.sum b{display:block;font-size:30px;line-height:1.1;font-weight:700;letter-spacing:-.02em}
.sum p{margin:4px 0 0;font-size:13px;color:#8a8a8e}
.sum .warn b{color:#d9483b}
.legend{margin:10px 0 0;font-size:13px;color:#8a8a8e;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.legend i{display:inline-block;width:14px;height:3px;border-radius:2px;margin-left:8px}
.legend i:first-child{margin-left:0}
.legend .am{background:#705ABF}
.legend .pm{background:#e8a23a}
.legend .band{height:10px;width:4px;background:rgba(112,90,191,.3)}
.list-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.list-head b{font-size:17px}
.ent{display:grid;grid-template-columns:76px 52px 1fr;gap:8px;align-items:baseline;padding:10px 0;border-top:1px solid #f0f0f3;font-size:14px;cursor:pointer}
.ent:first-child{border-top:0}
.ent .d{color:#8a8a8e}
.ent .n{font-weight:700;font-size:16px}
.ent .x{color:#8a8a8e}
.ent .x em{font-style:normal;color:#8a5200}
.doc{display:none}
@media (max-width:560px){
  .sum{grid-template-columns:repeat(2,1fr)}
  .seg{width:100%}
  .seg button{flex:1}
  .row.end .primary{width:100%}
}
@media print{
  body{background:#fff;padding:0}
  .wrap{display:none}
  .doc{display:block;color:#000;font-size:12px}
  .doc h2{font-size:18px;margin:0 0 4px}
  .doc p{margin:0 0 10px}
  .doc table{width:100%;border-collapse:collapse;margin:0 0 14px}
  .doc th,.doc td{border:1px solid #bbb;padding:4px 6px;text-align:left}
  .doc img{width:100%;margin:0 0 12px}
}
