/* ---- Year view ---------------------------------------------------------- */
.calendar__year {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.calendar__year-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  min-height: 100%;
}

/* Month pane */
.year__pane {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 0;
}

.year__pane-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  padding: 5px 8px 3px;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}

.year__pane-header:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Day-of-week letters */
.year__pane-dow {
  display: grid;
  grid-template-columns: 1.4em repeat(7, 1fr);
  padding: 0 4px;
  flex-shrink: 0;
}

.year__pane-dow-cell {
  font-size: 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  line-height: 1.4;
}

/* Week-number column (leading cell in the dow row + each week row) */
.year__pane-weeknum {
  font-size: 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

/* Week rows container */
.year__pane-weeks {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 1px 4px 4px;
  min-height: 0;
  overflow: hidden;
}

/* Single week row */
.year__pane-week {
  display: grid;
  grid-template-columns: 1.4em repeat(7, 1fr);
  gap: 1px;
  flex: 1;
  min-height: 0;
  cursor: pointer;
  border-radius: 2px;
  transition: background var(--transition);
}

.year__pane-week:hover {
  background: var(--accent-soft);
}

/* Day cells */
.year__day {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5625rem;
  font-weight: 500;
  line-height: 1;
  border-radius: 2px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition), color var(--transition);
}

/* Past: solid, materialized look */
.year__day--past {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
}

/* Future: lighter, ghostly */
.year__day--future {
  color: var(--text-muted);
  opacity: 0.45;
}

/* Other month: very faint */
.year__day--other {
  opacity: 0.2;
  cursor: default;
}

/* Today: accent highlight */
.year__day--today {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* Hover states */
.year__day--past:hover,
.year__day--future:hover {
  background: var(--accent);
  color: #fff;
}

.year__day--other:hover {
  background: transparent;
  color: inherit;
}

.year__day--today:hover {
  background: var(--accent);
}