:root {
  color-scheme: dark;
  --background: #000;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.42);
  --line: rgba(255, 255, 255, 0.22);
  --holiday: #fff;
}

* { box-sizing: border-box; }

html,
body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--background);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.screen {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 2.4vw, 42px);
}

.calendar {
  width: min(96vw, 1840px);
  height: min(92vh, 1020px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: clamp(10px, 1.5vh, 18px);
}

.month-header {
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 5vw, 6rem);
  font-weight: 650;
  line-height: 1;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(6px, 0.9vw, 12px);
}

.weekday {
  min-width: 0;
  padding: clamp(6px, 1vh, 12px) 4px;
  border-bottom: 2px solid var(--line);
  color: var(--text);
  font-size: clamp(0.95rem, 1.8vw, 2rem);
  font-weight: 800;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekday.weekend { color: var(--muted); }

.days {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: clamp(6px, 0.9vw, 12px);
}

.day {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: clamp(8px, 1.1vw, 18px);
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #000;
  color: var(--text);
}

.day::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 42%, rgba(255, 255, 255, 0.05));
}

.day.weekend,
.day.outside {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.12);
  background: #050505;
}

.day.holiday {
  border-color: var(--holiday);
  background: #111;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.day.today {
  box-shadow: inset 0 0 0 5px var(--text);
}

.day.outside {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.12);
  background: #050505;
}

.day-number {
  position: absolute;
  left: clamp(8px, 1vw, 16px);
  top: clamp(7px, 0.9vw, 14px);
  z-index: 1;
  font-size: clamp(1.9rem, 4.1vw, 5.2rem);
  font-weight: 850;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.holiday-name {
  position: absolute;
  left: clamp(8px, 1vw, 16px);
  right: clamp(8px, 1vw, 16px);
  bottom: clamp(8px, 1vw, 16px);
  z-index: 1;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.8vw, 2.35rem);
  font-weight: 700;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.day.outside .holiday-name { color: var(--muted); }

.day.outside {
  color: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.06);
  background: #020202;
}

.day.outside .holiday-name { color: rgba(255, 255, 255, 0.18); }
