:root{--ink:#172b4d;--blue:#164e86;--red:#a51d22;--redbg:#ffe1e1;--green:#07643b;--greenbg:#d9f7e6;--line:#c3cfdd;--muted:#52657d;--week:#e8eef5}
*{box-sizing:border-box}body{margin:0;background:#f2f5f9;color:var(--ink);font-family:Arial,Helvetica,sans-serif}
.wrap{max-width:1440px;margin:auto;padding:clamp(10px,2vw,26px)}header{background:linear-gradient(120deg,#0b355d,#17669a);color:white;border-radius:14px;padding:20px clamp(15px,3vw,30px);margin-bottom:16px}
h1{margin:0;text-align:center;font-size:clamp(24px,3vw,34px)}.year-nav{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0}
.year-nav a{padding:8px 12px;border-radius:8px;background:white;border:1px solid #9aaec3;color:#0b355d;font-weight:bold;text-decoration:none}
.year-nav a.current{background:#164e86;color:white}.legend{display:flex;gap:12px;flex-wrap:wrap;background:white;border:1px solid var(--line);padding:11px 13px;border-radius:10px;margin-bottom:16px;font-size:13px}
.legend span{display:inline-flex;align-items:center;gap:7px}.dot{width:13px;height:13px;border-radius:3px;display:inline-block}
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.month{background:white;border:1px solid var(--line);border-radius:11px;overflow:hidden;box-shadow:0 4px 14px #172b4d12;min-width:0}
.month h2{margin:0;padding:10px 13px;background:#164e86;color:white;font-size:18px}table{width:100%;border-collapse:collapse;table-layout:fixed}
th,td{text-align:center;padding:clamp(5px,.75vw,9px) 2px;border-bottom:1px solid #e1e7ee;font-size:clamp(12px,1vw,14px);font-variant-numeric:tabular-nums}
thead th{background:#dce8f4;color:#183653}th.week,td.week{width:11%;background:var(--week);color:var(--muted);font-size:11px}
td.empty{color:transparent}td.sat,td.sun{background:#f1f5f9}td.special-official{background:var(--redbg)!important;color:var(--red);font-weight:800;outline:1px solid #eaa0a0;outline-offset:-2px}
td.special-religious{background:var(--greenbg)!important;color:var(--green);font-weight:800;outline:1px solid #8bd4a8;outline-offset:-2px}
td.special-mixed{background:linear-gradient(135deg,var(--redbg) 0 50%,var(--greenbg) 50%)!important;color:#172b4d;font-weight:800}
td[data-events]{cursor:help}td[data-events]:focus{outline:2px solid #164e86;outline-offset:-2px}
.tooltip{position:fixed;z-index:1000;max-width:min(320px,calc(100vw - 24px));padding:10px 12px;background:#102a43;color:white;border-radius:8px;box-shadow:0 6px 22px #0004;font-size:13px;line-height:1.45;pointer-events:none;display:none}
.tooltip strong{display:block;margin-bottom:4px}.tooltip ul{padding-left:17px;margin:4px 0 0}
footer{margin:17px 0 5px;color:var(--muted);font-size:12px;line-height:1.5}
@media(max-width:980px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.grid{grid-template-columns:1fr}.wrap{padding:9px}.year-nav a{flex:1 0 auto;text-align:center}th,td{padding:9px 3px;font-size:14px}}
@media print{.year-nav,.tooltip{display:none!important}.grid{grid-template-columns:repeat(3,1fr);gap:8px}.month{box-shadow:none;break-inside:avoid}}
