:root {
  /* App is dark-mode only for now. */
  color-scheme: dark;

  --app-max-width: 980px;
  --app-gutter: 16px;
  --app-header-height: 60px;

  /* GitHub-ish dark palette */
  --app-bg: #0d1117;
  --app-surface: rgba(13, 17, 23, 0.9);
  --app-surface-2: #161b22;
  --app-fg: #c9d1d9;
  --app-muted: #8b949e;
  --app-border: rgba(240, 246, 252, 0.12);
}

/* ── Family Calendar Grid ─────────────────────────────── */

.cal-page {
  padding: 0.5em 1em;
  overflow-x: hidden;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1em;
  width: 100%;
}

.cal-day {
  min-width: 0;
}

.cal-day-label {
  font-size: 1em;
  margin-bottom: 0.4em;
  border-bottom: 1px solid var(--app-border);
  padding-bottom: 0.3em;
}

.cal-empty {
  color: var(--app-muted);
  font-size: 0.9em;
  font-style: italic;
}

.cal-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
  padding: 0.5em 0;
  border-bottom: 1px solid var(--app-border);
}

.cal-entry:last-child {
  border-bottom: none;
}

.cal-entry-color {
  flex-shrink: 0;
  width: 4px;
  align-self: stretch;
  border-radius: 2px;
}

.cal-entry-body {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  min-width: 0;
}

.cal-entry-time {
  font-size: 0.85em;
  color: var(--app-muted);
  font-variant-numeric: tabular-nums;
}

.cal-entry-title {
  font-weight: 500;
}

.cal-entry-desc {
  font-size: 0.9em;
  color: var(--app-muted);
  margin: 0;
}



.cal-time-marker {
  font-size: 1.3em;
  font-weight: 600;
  background: rgba(110, 118, 129, 0.2);
  color: var(--app-muted);
  padding: 0.3em 0.6em;
  border-radius: 4px;
  margin: 0.4em 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cal-entry--past {
  opacity: 0.5;
}

.cal-entry--active .cal-entry-title,
.cal-entry--active .cal-entry-time {
  color: #e3b341;
}
