@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,800&display=swap");

:root {
  --bg: #e9eef2;
  --paper: #ffffff;
  --ink: #1c2b39;
  --muted: #6b7c8c;
  --line: #d3dce4;
  --accent: #2f5d8a;
  --accent-ink: #ffffff;
  --today: #f2b33d;
  --ok: #2e7d4f;
  --err: #b3392f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141c24;
    --paper: #1d2833;
    --ink: #e6edf3;
    --muted: #8fa1b2;
    --line: #2e3c4a;
    --accent: #6fa3d6;
    --accent-ink: #0f1820;
    --ok: #6cc896;
    --err: #f08a80;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 24px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.card {
  width: 100%;
  max-width: 380px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.month { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.year { color: var(--muted); font-weight: 400; }
.nav { display: flex; gap: 4px; }
.nav button {
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
}
.nav button:hover { border-color: var(--accent); }
.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.dow {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding-bottom: 6px;
}
.day {
  aspect-ratio: 1;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  position: relative;
}
.day:hover { background: var(--bg); }
.day.other { color: var(--muted); opacity: 0.5; }
.day.today::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 5px;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--today);
}
.day.selected { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.footer { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.send {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.send:disabled { opacity: 0.5; cursor: not-allowed; }
.status { min-height: 1.4em; margin: 10px 0 0; font-size: 0.9rem; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }

img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;
  margin: 1rem auto;
  border-radius: 10px;
}
