.flex_row {
  display: flex;
  flex-flow: row nowrap;
}

.flex_col, .C_date, .C_main {
  display: flex;
  flex-flow: column nowrap;
}

.fill, .C_main {
  width: 100%;
  height: 100%;
}

.C_main {
  justify-content: center;
  background-color: var(--color_4);
  padding: 0.5rem;
}

.C_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.C_header button {
  font-size: 1.5rem;
  color: var(--color_5);
  transition: color 0.2s ease;
  padding: 0.5rem;
  aspect-ratio: 1;
  margin: 0;
}
.C_header button:active {
  color: var(--color_1);
  background-color: var(--color_4);
}

.C_grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem; /* Reduced gap for mobile density */
  text-align: center;
}

.C_day_name {
  font-size: 0.9rem;
  font-weight: bold;
  color: #6b7280;
  padding-bottom: 0.25rem;
}

.C_date {
  padding: 0.25rem; /* Reduced padding to fit content */
  height: 3.5rem; /* Fixed height for consistency */
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  font-weight: 500;
  border: solid 0.1rem var(--color_5);
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}
@media only screen and (orientation: landscape) and (min-width: 600px) {
  .C_date:hover {
    background-color: var(--color_2);
  }
}
.C_date_selected {
  background-color: var(--color_3);
  color: var(--color_text_light);
  border-color: var(--color_3);
}
.C_date_today {
  font-weight: 700;
  border: solid 0.2rem var(--color_3);
}
.C_event_badge {
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  border-radius: 50%;
  font-size: 0.8rem;
  background-color: var(--color_6);
  left: 1rem;
  left: 2.4rem;
  top: 2rem;
}

.C_month_other {
  color: var(--color_5);
  background-color: rgba(0, 0, 0, 0.02);
}
.C_month_other .C_event_badge {
  opacity: 0.5;
}