*{box-sizing:border-box}
body{margin:0;background:#f5f7fb;color:#172033;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
#app{max-width:1050px;margin:auto;padding:20px}h1{margin:0;font-size:25px}
#subtitle{color:#718096;font-size:13px;margin-top:4px}
.card,.next-card{background:#fff;border:1px solid #e1e6ef;border-radius:16px;padding:15px;margin:12px 0}
.next-card{font-size:14px}.next-label{color:#718096;font-weight:800;margin-right:10px}
.pill{background:#fce7f3;color:#be185d;padding:6px 10px;border-radius:99px;font-size:11px;font-weight:800}
.tabs{display:flex;gap:7px;margin-bottom:12px}.tab{padding:9px 14px;border-radius:10px;border:1px solid #e1e6ef;background:#fff;font-weight:750;color:#1683e8}
.tab.active{background:#172033;color:#fff}
.head{display:grid;grid-template-columns:40px 1fr 40px;align-items:center;gap:8px;margin-bottom:12px}
.month{text-align:center;font-size:20px;font-weight:800}.month-btn{border:1px solid #e1e6ef;background:#fff;border-radius:9px;width:36px;height:34px;font-size:20px;color:#536174}
.grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.dow{text-align:center;color:#718096;font-size:11px;font-weight:800;padding:5px}
.empty{min-height:100px}.day{min-height:100px;border:1px solid #e1e6ef;border-radius:11px;background:#fafbfe;padding:8px;display:flex;flex-direction:column;cursor:pointer}
.day:hover{border-color:#aab7ca}.num{font-size:12px;font-weight:850}.who{display:block;margin-top:auto;text-align:center;padding:7px 3px;border-radius:8px;font-size:10px;font-weight:850}
.day.avi .who{background:#bfdbfe;color:#1d4ed8}.day.tehila .who{background:#fbcfe8;color:#be185d}.day.both .who{background:#ddd6fe;color:#6d28d9}.day.other .who{background:#cbd5e1;color:#334155}
.legend{display:flex;gap:16px;flex-wrap:wrap;margin-top:13px;color:#718096;font-size:12px}.legend span{display:flex;align-items:center;gap:6px}
.dot{width:10px;height:10px;border-radius:50%;display:inline-block}.dot.avi{background:#3b82f6}.dot.tehila{background:#ec4899}.dot.both{background:#8b5cf6}.dot.other{background:#94a3b8}
.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.stat{border:1px solid #e1e6ef;border-radius:12px;padding:14px;background:#fafbfe}.stat b{display:block;font-size:23px}.stat span{color:#718096;font-size:12px}
.hidden{display:none!important}.modal{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:18px}.shade{position:absolute;inset:0;background:rgba(23,32,51,.4)}
.editor{position:relative;z-index:2;background:#fff;border-radius:20px;padding:20px;width:min(410px,calc(100vw - 28px));box-shadow:0 24px 70px rgba(23,32,51,.3)}
.close{position:absolute;right:15px;top:15px;border:0;border-radius:50%;width:32px;height:32px;font-size:23px;background:#f1f4f8}.editor h2{margin:0 40px 4px 0;font-size:19px}.editor p{color:#718096;font-size:13px}
.choice{display:flex;align-items:center;gap:10px;padding:11px 6px;border-radius:9px;cursor:pointer}.choice:hover{background:#f5f7fb}.choice input{width:18px;height:18px}
.save{width:100%;margin-top:10px;border:0;background:#172033;color:#fff;padding:11px;border-radius:10px;font-weight:750;font-size:15px}
@media(max-width:650px){#app{padding:11px}.grid{gap:4px}.day,.empty{min-height:76px}.day{padding:6px}.who{font-size:8px;padding:5px 2px}.summary-grid{grid-template-columns:1fr 1fr}}
