:root {
  --accent-sun: #C97A2B;
  --accent-moon: #3E6E8E;
}

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.text-sun { color: var(--accent-sun); }
.text-moon { color: var(--accent-moon); }

.month-title {
  font-family: "Fraunces", serif;
  text-align: center;
  display: inline-block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cell {
  position: relative;
  min-height: 215px;
  background: var(--bs-tertiary-bg);
  border: 1.5px solid #9aa5b8;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.cell-center {
  flex: 1;
  text-align: center;
  font-size: 0.58rem;
  color: var(--bs-secondary-color);
  letter-spacing: 0.02em;
  line-height: 1.35;
  padding: 0 4px;
}

.cell.today {
  background: #fdf1cf;
  box-shadow: inset 0 0 0 2px var(--accent-sun);
}

.moon-block,
.sun-block {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.moon-block { align-items: flex-start; }
.sun-block { align-items: flex-end; }

.icon {
  display: inline-flex;
  flex-shrink: 0;
}

.icon svg { width: 11px; height: 11px; }
.icon.moon { color: var(--accent-moon); }
.icon.sun { color: var(--accent-sun); }

.num-big {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(1.25rem, 3.6vw, 1.85rem);
}

.num-big.moon { color: var(--accent-moon); }
.num-big.sun { color: var(--accent-sun); }

.cycle-codes {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  margin-top: 3px;
  font-size: 0.62rem;
  color: var(--bs-secondary-color);
  cursor: help;
}

.weekday-name {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--accent-moon);
  margin-top: 3px;
}

.greg-day {
  font-size: 0.65rem;
  color: var(--bs-secondary-color);
  margin-top: 2px;
}

.event-icons {
  position: absolute;
  right: 6px;
  bottom: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.event-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  line-height: 1;
}

.event-icon svg { width: 100%; height: 100%; }
.event-icon .glyph { font-size: 15px; }
.event-icon.moon { color: var(--accent-moon); }
.event-icon.sun { color: var(--accent-sun); }
.event-icon.meteor { color: #8B5FBF; }
.event-icon.year { color: #B8860B; }

@media (max-width: 480px) {
  .icon svg { width: 9px; height: 9px; }
  .greg-day { font-size: 0.58rem; }
  .cell-center { font-size: 0.5rem; }
}
