/* Calendar widget - month grid. */
.cw-head { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.cw-title { flex: 1; margin: 0; font-size: 1.05em; font-weight: 650; text-align: center; min-width: 0; }
.cw-nav { min-width: 38px; padding: 4px 10px; font-size: 1.2em; line-height: 1; }
.cw-today { padding: 6px 10px; }
.cw-wrap { overflow-x: auto; }
.cw-grid { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; font-variant-numeric: tabular-nums; }
.cw-grid th { font-size: .75em; font-weight: 650; color: var(--e-ink-3); padding: 2px 0 4px; text-align: center; }
.cw-day {
    position: relative; text-align: center; padding: 0; height: 40px; border-radius: 8px; cursor: pointer;
    color: var(--e-ink); border: 1px solid transparent;
}
.cw-day:hover { background: var(--e-surface); }
.cw-day:focus-visible { outline: 2px solid var(--e-focus); outline-offset: 1px; }
.cw-num { font-size: .92em; }
.cw-out { color: var(--e-ink-3); opacity: .7; }
.cw-is-today { border-color: var(--e-accent); font-weight: 700; }
.cw-sel { background: var(--e-accent); color: var(--e-accent-ink); opacity: 1; }
.cw-sel:hover { background: var(--e-accent); }
.cw-dot { position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--e-warn); }
.cw-sel .cw-dot { background: var(--e-accent-ink); }
.cw-marked .cw-num { font-weight: 700; }
.cw-info { margin: 8px 0 0; font-size: .88em; color: var(--e-ink-2); min-height: 1.3em; overflow-wrap: anywhere; }
.cw-legend { margin: 6px 0 0; font-size: .76em; color: var(--e-ink-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cw-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.cw-key-today { border: 2px solid var(--e-accent); }
.cw-key-mark { background: var(--e-warn); width: 7px; height: 7px; border-radius: 50%; margin-left: 8px; }
@media (max-width: 360px) {
    .cw-grid { border-spacing: 1px; }
    .cw-day { height: 34px; }
    .cw-today { padding: 6px 8px; }
}
html[data-compact="1"] .cw-day { height: 32px; }
