* { box-sizing: border-box; }

:root {
  --bg: #f3eadc;
  --paper: #fffaf2;
  --ink: #211b17;
  --muted: #756a60;
  --accent: #b9392f;
  --accent-dark: #8d2b24;
  --border: rgba(33, 27, 23, .13);
  --shadow: 0 22px 60px rgba(77, 52, 31, .16);
}

html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.85), transparent 36rem),
    var(--bg);
}

button, select { font: inherit; }

button:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(185, 57, 47, .28);
  outline-offset: 3px;
}

.app {
  width: min(940px, calc(100% - 28px));
  margin: 0 auto;
  padding: 48px 0 36px;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.eyebrow,
.kicker {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 800;
  font-size: .76rem;
  color: var(--accent);
}

.hero h1 {
  margin: 8px 0 8px;
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.subtitle {
  margin: 0 auto;
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.18rem);
}

.calendar-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.month-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 4px 15px;
}

.month-head h2 {
  margin: 2px 0 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1;
}

.counter {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 700;
}

.image-wrap {
  margin: 0;
  overflow: hidden;
  border-radius: 19px;
  background: #ddd2c4;
  aspect-ratio: 4 / 3;
}

.image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity .18s ease, transform .18s ease;
}

.image-wrap img.changing {
  opacity: .3;
  transform: scale(.992);
}

.controls {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 10px;
  margin-top: 14px;
}

.nav-btn,
.today-btn,
select {
  border: 1px solid var(--border);
  min-height: 48px;
  border-radius: 14px;
}

.nav-btn {
  cursor: pointer;
  background: var(--ink);
  color: white;
  border-color: var(--ink);
  font-size: 1.4rem;
  font-weight: 800;
}

.nav-btn:hover { background: #000; }

.select-wrap { display: block; }

select {
  width: 100%;
  padding: 0 42px 0 16px;
  color: var(--ink);
  background: white;
  font-weight: 750;
  cursor: pointer;
}

.today-btn {
  width: 100%;
  margin-top: 10px;
  padding: 0 16px;
  color: white;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

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

.hint {
  margin: 16px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .app { padding-top: 28px; }
  .calendar-card { padding: 12px; border-radius: 20px; }
  .image-wrap { border-radius: 15px; }
  .controls { grid-template-columns: 52px minmax(0, 1fr) 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .image-wrap img { transition: none; }
}
