/* Month grid: 6 rows x 7 columns. */
.month { display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--surface); }
.month-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.month-weekdays span { padding: 9px 8px 8px; font-size: 12.5px; color: var(--muted); text-align: left; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(76px, 1fr)); overflow: auto; }

.m-cell {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 4px 4px 3px; cursor: cell;
  border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.m-cell:nth-child(7n) { border-right: 0; }
.m-cell:hover { background: color-mix(in oklab, var(--accent) 4%, var(--surface)); }
.m-cell.is-muted { background: color-mix(in oklab, var(--surface-2) 70%, var(--surface)); }
.m-cell.is-muted .m-day { color: var(--muted); }
.m-top { display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
.m-day { min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; font-size: 13.5px; font-weight: 500; text-align: center; line-height: 28px; white-space: nowrap; }
.m-mon { margin-left: 0.3em; font-weight: 600; }
.m-day:hover { background: var(--surface-3); }
.m-cell.is-today .m-day { background: var(--sun); color: var(--sun-ink); font-weight: 700; }
.m-add { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); opacity: 0; }
.m-cell:hover .m-add, .m-add:focus-visible { opacity: 1; }
.m-add:hover { background: var(--accent-soft); color: var(--accent); }
.m-list { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.chip {
  --ev: var(--accent);
  display: flex; align-items: center; gap: 5px; height: 22px; min-width: 0; padding: 0 6px 0 5px; border-radius: 5px; text-align: left;
  background: color-mix(in oklab, var(--ev) 17%, var(--surface)); border-left: 3px solid var(--ev); font-size: 12px; white-space: nowrap;
}
.chip:hover { background: color-mix(in oklab, var(--ev) 28%, var(--surface)); }
.chip-time { color: var(--ink-2); font-weight: 600; flex: none; font-size: 11.5px; }
.chip-title { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chip-badge { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--ev); color: var(--surface); flex: none; }
.chip-dot { display: none; }
.m-more { height: 22px; padding: 0 6px; text-align: left; font-size: 12px; font-weight: 600; color: var(--accent); border-radius: 5px; }
.m-more:hover { background: var(--accent-soft); }

@media (max-width: 720px) {
  .month-weekdays span { text-align: center; padding: 7px 0; }
  .month-grid { grid-template-rows: repeat(6, minmax(62px, 1fr)); }
  .m-cell { padding: 2px; }
  .m-add { display: none; }
  .m-top { justify-content: center; }
  .m-day { font-size: 13px; min-width: 26px; height: 26px; line-height: 26px; padding: 0 3px; }
  .m-day--mon { font-size: 11px; padding: 0 4px; letter-spacing: -0.01em; }
  .m-day--mon .m-mon { margin-left: 0.2em; }
  .chip { height: 18px; padding: 0 3px; gap: 3px; justify-content: center; border-left-width: 2px; }
  .chip { pointer-events: none; }
  .chip-title, .chip-badge { display: none; }
  .chip-time { font-size: 10.5px; }
  .m-more { font-size: 11px; text-align: center; padding: 0; height: 18px; }
}
