/* The Calendar page (public/calendar.js): a seven-day strip, then the days as quiet lists, soonest first. */
.cal-head { display: flex; flex-direction: column; gap: 12px; }

.cal-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 640px; margin-top: -12px; }
.cal-chip { min-width: 0; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--card); color: var(--ink-2); text-decoration: none; transition: border-color .2s var(--ease), transform .2s var(--ease); }
.cal-chip:hover { border-color: var(--ink-3); color: var(--ink); }
.cal-chip:active { transform: scale(.96); }
.cal-chip:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }
.cal-chip-day { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-chip b { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.cal-chip.today { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.cal-chip.today b { color: var(--on-ink); }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.cal-dot.on { background: var(--rust); }
.cal-chip.today .cal-dot.on { background: var(--butter); }

.cal-day, .cal-week { display: flex; flex-direction: column; max-width: 640px; scroll-margin-top: 16px; }
.cal-day .day-head, .cal-week .day-head { margin-top: 0; flex-wrap: wrap; }
.cal-week { gap: 18px; }
.cal-week > .day-head { margin-bottom: 0; }
.cal-day.small .day-head { margin-bottom: 8px; }
.cal-day.small h3, .cal-later-day h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.cal-later-day { display: flex; flex-direction: column; gap: 8px; }
.cal-later-day + .cal-later-day { margin-top: 14px; }
.cal-free { margin: 0; font-size: 14px; color: var(--ink-3); padding: 0 2px; }
.cal-note { margin: 0; display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.45; color: var(--ink-2); background: var(--wash); border: 1px solid var(--rule); border-radius: 14px; padding: 10px 14px; }
.cal-note svg { flex: none; margin-top: 2px; color: var(--ink-3); }

.cal-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.cal-item + .cal-item { border-top: 1px solid var(--rule); }
.cal-row { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border: 0; background: transparent; text-align: left; transition: background .2s var(--ease); }
.cal-row:hover { background: var(--paper); }
.cal-row:focus-visible { outline: 2px solid var(--pen); outline-offset: -2px; }
.cal-time { flex: none; width: 66px; font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.cal-backlog .cal-time { color: var(--rust); }
.cal-kind { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.cal-reminder .cal-kind { background: var(--butter-soft); color: var(--butter-ink); }
.cal-routine .cal-kind { background: var(--lilac); color: var(--lilac-ink); }
.cal-backlog .cal-kind { background: var(--peach); color: var(--peach-ink); }
.cal-dayloop .cal-kind, .cal-event .cal-kind { background: var(--mint); color: var(--mint-ink); }
.cal-row.still { cursor: default; padding-right: 6px; }
.cal-row.still:hover { background: transparent; }
.cal-tag { font-style: normal; font-size: 11px; font-weight: 600; color: var(--mint-ink); background: var(--mint); border-radius: 999px; padding: 1px 7px; margin-left: 6px; white-space: nowrap; }
.cal-tick { position: relative; flex: none; width: 44px; height: 44px; border: 0; background: transparent; padding: 0; display: grid; place-items: center; color: transparent; cursor: pointer; }
.cal-tick::before { content: ''; position: absolute; width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--mute); background: var(--card); transition: background .2s var(--ease), border-color .2s var(--ease); }
.cal-tick svg { position: relative; }
.cal-tick:hover::before { border-color: var(--ink-2); }
.cal-tick.on { color: var(--on-ink); }
.cal-tick.on::before { background: var(--ink); border-color: var(--ink); }
.cal-tick:focus-visible { outline: 2px solid var(--pen); outline-offset: -4px; border-radius: 12px; }
.cal-item.done .cal-text b { color: var(--ink-3); text-decoration: line-through; }
.cal-note.quiet { color: var(--ink-3); }
.cal-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cal-text b { font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cal-text span { font-size: 12px; color: var(--ink-3); }
.cal-go { flex: none; color: var(--ink-3); display: grid; place-items: center; transition: transform .25s var(--ease); }
.cal-row:hover .cal-go { color: var(--ink); }
.cal-item.open .cal-go { transform: rotate(180deg); }
.cal-more { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 0 16px 14px 124px; font-size: 13px; color: var(--ink-2); }
.cal-more .btn { margin-left: auto; }

@media (max-width: 560px) {
  .cal-strip { gap: 4px; }
  .cal-chip { min-height: 60px; border-radius: 12px; }
  .cal-chip-day { font-size: 11px; }
  .cal-time { width: 58px; font-size: 13px; }
  .cal-kind { display: none; }
  .cal-row { gap: 10px; padding-left: 14px; }
  .cal-more { padding-left: 14px; }
}
@media (prefers-reduced-motion: reduce) { .cal-chip, .cal-go, .cal-row, .cal-tick::before { transition: none; } }
