/* Week and Month views. Sizes use rem so the kitchen (larger root font) scales up. */

.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.cal-toolbar strong { font-size: 1.05rem; text-align: center; flex: 1; }
.cal-toolbar button { border: 1px solid var(--line); background: var(--panel); border-radius: 0.6rem; padding: 0.4rem 0.8rem; font: inherit; color: inherit; }
.cal-toolbar .cal-today-btn { font-size: 0.85rem; }

/* ----- Week ----- */
.cal-week { display: grid; gap: 0.5rem; }
.cal-day { background: var(--panel); border: 1px solid var(--line); border-radius: 0.9rem; overflow: hidden; }
.cal-day.today { border-color: var(--ink); }
.cal-day.today .cal-num { background: var(--sun, #ffd45c); border-radius: 999px; padding: 0 0.4rem; }
.cal-day.past { opacity: 0.6; }
.cal-day-head { display: flex; align-items: baseline; gap: 0.45rem; width: 100%; border: 0; background: none; padding: 0.55rem 0.8rem 0.2rem; text-align: left; font: inherit; color: inherit; }
.cal-dow { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.cal-num { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-day.today .cal-num { color: var(--ink); }
.cal-add { margin-left: auto; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.cal-items { display: grid; gap: 0.3rem; padding: 0.25rem 0.6rem 0.65rem; }
.cal-empty { color: var(--line); font-size: 0.85rem; padding-left: 0.2rem; }

.cal-ev, .cal-task { display: flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; line-height: 1.25; border-radius: 0.45rem; padding: 0.3rem 0.45rem; min-width: 0; }
.cal-ev { background: color-mix(in srgb, var(--c, #8d99a6) 16%, white); border-left: 3px solid var(--c, #8d99a6); }
.cal-ev .cal-time { font-size: 0.75rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cal-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.cal-task { background: transparent; }
.cal-box { flex: none; width: 0.95rem; height: 0.95rem; border-radius: 50%; border: 2px solid var(--c, var(--muted)); display: grid; place-items: center; font-size: 0.6rem; color: #fff; font-weight: 700; }
.cal-task.done .cal-box { background: var(--c, var(--muted)); }
.cal-task.done .cal-title { text-decoration: line-through; color: var(--muted); }
.cal-task.late .cal-title { color: var(--danger, #b42318); font-weight: 600; }
.cal-task.projected { opacity: 0.55; }
.cal-task.projected .cal-box { border-style: dashed; }
.cal-who { flex: none; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--c); color: #fff; font-size: 0.65rem; font-weight: 700; display: grid; place-items: center; }

/* Wide screens: seven columns side by side */
@media (min-width: 900px) {
  .cal-week { grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: stretch; }
  .cal-day { min-height: 14rem; }
}

/* ----- Month ----- */
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.25rem; }
.cal-mhead { text-align: center; font-size: 0.75rem; font-weight: 500; color: var(--muted); padding-bottom: 0.2rem; }
.cal-cell { display: flex; flex-direction: column; align-items: stretch; gap: 0.15rem; min-height: 4.4rem; padding: 0.3rem; background: var(--panel); border: 1px solid var(--line); border-radius: 0.55rem; text-align: left; font: inherit; color: inherit; overflow: hidden; }
.cal-cell .cal-num { font-size: 0.85rem; }
.cal-cell.other { opacity: 0.4; }
.cal-cell.today { border-color: var(--ink); }
.cal-cell.today .cal-num { background: var(--sun, #ffd45c); border-radius: 999px; padding: 0 0.35rem; align-self: flex-start; }
.cal-cell.past .cal-line { opacity: 0.6; }
.cal-line { display: block; font-size: 0.68rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 0.25rem; padding: 0.05rem 0.25rem; }
.cal-line.ev { background: color-mix(in srgb, var(--c, #8d99a6) 22%, white); color: color-mix(in srgb, var(--c, #8d99a6) 60%, #1f2933); }
.cal-line.task { border-left: 3px solid var(--c, var(--muted)); color: var(--ink); background: var(--bg); }
.cal-line.done { text-decoration: line-through; opacity: 0.6; }
.cal-line.projected { opacity: 0.5; border-left-style: dashed; }
.cal-lines { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.cal-more { font-size: 0.65rem; color: var(--muted); padding-left: 0.2rem; }

/* Phones: month cells are too narrow for text, so show a colored dot per item (tap the day for details). */
@media (max-width: 599px) {
  .cal-cell { min-height: 3.6rem; }
  .cal-lines { flex-direction: row; flex-wrap: wrap; gap: 3px; }
  .cal-line { width: 8px; height: 8px; padding: 0; font-size: 0; border-radius: 50%; }
  .cal-line.ev { background: var(--c, #8d99a6); }
  .cal-line.task { background: transparent; border: 2px solid var(--c, var(--muted)); border-left-width: 2px; }
  .cal-line.projected { border-style: dashed; }
  .cal-line.done { opacity: 0.35; text-decoration: none; }
  .cal-more { font-size: 0.6rem; line-height: 8px; padding: 0; }
}

@media (min-width: 900px) {
  .cal-cell { min-height: 7rem; }
  .cal-line { font-size: 0.78rem; }
}

/* Version label */
.version-tag { display: block; margin: 1.5rem auto 0.5rem; border: 0; background: none; color: var(--muted); font: inherit; font-size: 0.75rem; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.changelog h4 { margin: 1rem 0 0.3rem; font-size: 0.95rem; }
.changelog h4 small { color: var(--muted); font-weight: 400; margin-left: 0.4rem; }
.changelog ul { margin: 0; padding-left: 1.1rem; color: var(--ink); font-size: 0.92rem; line-height: 1.5; }
