:root {
  color-scheme: light;
  --paper: #fff4f8;
  --ink: #42152b;
  --muted: #79455e;
  --rose: #a61e56;
  --deep-rose: #75113e;
  --line: #edc6d6;
  --blush: #fbe4ee;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.5 system-ui, sans-serif;
}
header {
  padding: 46px 20px;
  text-align: center;
  color: #433323;
  background: #fff3c8;
  border-bottom: 5px solid #f3dda0;
}
.brand { font-size: 13px; letter-spacing: .18em; font-weight: 700; }
h1 { font: normal clamp(34px, 6vw, 60px)/1.1 Georgia, serif; margin: 12px 0; }
header p { margin: 0; color: #635137; }
main { max-width: 1180px; margin: auto; padding: 26px 20px; }
h2 { font: normal 30px Georgia, serif; margin: 18px 0; }
.controls {
  display: flex; flex-wrap: wrap; align-items: end; gap: 14px;
  background: white; padding: 18px; border: 1px solid var(--line); border-radius: 14px;
}
label { display: grid; gap: 5px; font-weight: 650; flex: 1; min-width: 180px; }
input, select, button {
  font: inherit; padding: 9px 12px; color: var(--ink);
  border: 1px solid #ac758e; border-radius: 8px; background: white;
}
button { cursor: pointer; }
button[aria-pressed=true] { background: var(--rose); color: white; border-color: var(--rose); }
.buttons { display: flex; gap: 8px; flex-wrap: wrap; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }
.note, footer, #count { color: var(--muted); font-size: 14px; }
.upcoming { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 12px; }
.next, .month {
  min-width: 0; background: white; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 4px 12px #75113e0d;
}
.next { padding: 11px 12px 7px; }
.next-highlight { border-color: #bd4a79; background: #fff1f7; }
.date { font-size: 14px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.person { display: flex; gap: 10px; align-items: center; padding: 10px 8px; }
.person + .person { border-top: 1px solid var(--blush); }
.initial {
  flex: none; background: var(--blush); border-radius: 50%; width: 34px; height: 34px;
  display: grid; place-items: center; font-size: 12px; font-weight: 750;
}
.name { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.person.birthday-highlight {
  background: #fbd9e8; border-radius: 8px; border-inline-start: 3px solid var(--rose);
}
.tag {
  display: table; margin-top: 3px; padding: 1px 8px; border-radius: 20px;
  font-size: 12px; color: white; background: var(--deep-rose); font-weight: 700;
}
#calendar { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 285px),1fr)); gap: 18px; }
#calendar.simple { grid-template-columns: 1fr; }
.month-heading {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; align-items: center;
  margin: 0; padding: 16px; color: #26443d; background: #eaf6f2;
  border-radius: 13px 13px 0 0;
}
.month-name { font-size: 34px; line-height: 1.08; }
.current-month { border-color: #81ae9f; }
.current-month .month-heading { background: #d9eee6; }
.current-label {
  font: 700 12px system-ui, sans-serif; color: #26443d;
  background: #f5fcf8; padding: 5px 10px; border-radius: 20px;
}
.month-people { padding: 8px 10px; }
.month-people > .note { margin: 8px; }
.simple .month-name { font-size: 27px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 10px; background: white; padding: 10px; z-index: 5; }
footer { margin-top: 24px; }
@media (max-width: 450px) {
  main { padding: 16px 12px; }
  .controls { padding: 12px; }
  .person { gap: 7px; }
}
@media print {
  body, header { background: white; color: black; }
  body { font-size: 11pt; }
  header { border-bottom: 1px solid black; padding: 8px; }
  header p, .date, .tag, .current-label { color: black; }
  .controls, .upcoming, main > section:nth-of-type(2), footer, .skip { display: none !important; }
  #calendar { display: block; }
  .month { break-inside: avoid; margin: 0 0 12px; border: 1px solid #aaa; box-shadow: none; }
  .month .month-heading { color: black; background: white; border-bottom: 1px solid #aaa; padding: 5px 8px; }
  .month-name { font-size: 18pt; }
  .person { padding: 3px; }
  .initial { display: none; }
  main { padding: 0; }
}

