/* Weekday headings span the top; dates read left to right in calendar week rows. */
.month-days-panel{display:grid;grid-template-columns:minmax(0,2.9fr) minmax(200px,1fr);align-items:stretch;gap:20px;padding:24px;border:1.5px solid var(--line);border-radius:20px;background:white}
.month-visual{min-width:0}.month-visual h2{font-size:clamp(34px,2.8vw,48px);font-weight:950;text-align:center;margin:0 0 14px;line-height:1.2}
.month-controls{display:flex;justify-content:center;align-items:end;gap:14px;flex-wrap:wrap;margin-bottom:14px}.month-controls label{font-size:16px;font-weight:800;margin:0;display:flex;align-items:center;gap:8px}.month-controls input{min-width:0;max-width:210px;padding:8px;color:var(--navy);font:inherit;min-height:44px}.month-controls button{min-height:44px;font-size:15px;font-weight:850;background:var(--pale);color:var(--blue);padding:8px 12px}
#month-error{font-size:17px;margin:10px 0;color:#78500e}#month-error:empty{display:none}
.count-caption{display:none;text-align:center;font-size:22px;font-weight:850;margin:14px 0}
.month-legend{display:flex;justify-content:center;gap:12px;font-size:15px;font-weight:850;margin-bottom:16px}.month-legend>span{display:flex;align-items:center;gap:5px;padding:5px 9px;border-radius:8px}
.month-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:26px;grid-auto-rows:minmax(56px,auto);gap:6px;align-items:stretch}.weekday-label{display:flex;align-items:center;justify-content:center;font-size:clamp(12px,1vw,16px);font-weight:850;min-width:0}.month-calendar .short-label{display:none}
.calendar-cell{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:2px;border:2px solid transparent;border-radius:10px;color:var(--navy);font:inherit;cursor:pointer}.date-number{font-size:26px;line-height:1.1;font-weight:950}.date-cue{display:flex;align-items:center;justify-content:center;gap:3px;font-size:11px;font-weight:850;min-height:14px;line-height:1.2}.direction-arrow{width:14px;height:14px;flex-shrink:0}.past .direction-arrow{transform:rotate(180deg)}
.calendar-cell.past,.month-legend>.past{background:#f0eafb;border-color:#b8a3d4}.past .date-cue,.month-legend>.past{color:#513578}.calendar-cell.future,.month-legend>.future{background:#e4f5ef;border-color:#8dbbad}.future .date-cue,.month-legend>.future{color:#175d4a}.calendar-cell.today{border:3px solid var(--blue);background:#e5f2ff}.today .date-cue,.month-legend>.today{background:var(--blue);color:white;border-radius:5px;padding:1px 2px}
.calendar-cell.selected{outline:3px solid #76590b;outline-offset:2px}.calendar-cell:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.month-days-summary{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:28px;text-align:center;border-left:1px solid var(--line);padding-left:20px}.month-total p{font-size:clamp(32px,2.7vw,46px);font-weight:950;line-height:1.2;margin:12px 0}.month-count-practice #question{font-size:24px;font-weight:850;line-height:1.3}.month-count-practice .date-answers{flex-direction:column}.month-count-practice .date-answers button{font-size:24px;flex:auto;width:100%}.date-detail{grid-column:1/-1;text-align:center;font-size:23px;font-weight:850;margin:0;line-height:1.4}.date-detail,.month-count-practice .date-feedback{scroll-margin-bottom:110px}
@media(max-width:1399px){.month-days-panel{grid-template-columns:minmax(0,1fr);padding:22px 18px;gap:22px}.month-visual h2{font-size:40px}.count-caption{display:block}.month-total{display:none}.month-days-summary{border-left:0;padding-left:0;gap:0}.month-count-practice .date-answers{flex-direction:row;max-width:500px;margin-inline:auto}.month-count-practice .date-answers button{flex:1 1 140px;width:auto}}
@media(max-width:1000px){.weekday-label{font-size:15px}.month-calendar .full-label{display:none}.month-calendar .short-label{display:inline}.date-number{font-size:25px}.date-cue{font-size:11px}.date-cue .direction-arrow{width:13px;height:13px}}
@media(max-width:700px){.month-calendar{gap:4px}.weekday-label{font-size:16px}.date-cue .cue-word{display:none}.today .date-cue .cue-word{display:inline}.date-cue .direction-arrow{width:16px;height:16px}.date-cue{font-size:11px}}
@media(max-width:640px){.month-days-panel{padding:18px 12px;gap:18px}.month-visual h2{font-size:32px;margin-bottom:14px}.month-controls{gap:10px}.month-controls label{flex-wrap:wrap;justify-content:center;font-size:15px}.month-controls input{width:170px}.month-controls button{font-size:14px}.month-legend{gap:7px;font-size:13px}.month-legend>span{padding:4px 6px}.month-calendar{gap:3px;grid-auto-rows:minmax(58px,auto)}.calendar-cell{padding:4px 1px;border-radius:7px}.date-number{font-size:22px}.weekday-label{font-size:14px}.calendar-cell.today{border-width:2px}.calendar-cell.selected{outline-width:2px;outline-offset:1px}.date-detail{font-size:20px}.month-count-practice #question{font-size:22px}.month-count-practice .date-answers button{font-size:22px}}
@media(max-width:640px){.calendar-cell.today .date-cue{padding-inline:0}}
@media(max-width:360px){.month-calendar{gap:2px}.calendar-cell.today{padding-inline:0}.calendar-cell.today .date-cue{font-size:10px}}
