:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", sans-serif;
  --page: #f2efea;
  --panel: rgba(255, 255, 255, .66);
  --ink: #34383f;
  --muted: #777c84;
  --blue: #1683ee;
  --green: #34bd59;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--page);
  background-image:
    radial-gradient(circle at 12% 12%, transparent 0 15px, rgba(100,105,110,.055) 16px 17px, transparent 18px),
    radial-gradient(circle at 84% 29%, rgba(100,105,110,.055) 0 3px, transparent 4px),
    linear-gradient(35deg, transparent 48%, rgba(100,105,110,.035) 49% 51%, transparent 52%);
  background-size: 170px 190px, 130px 160px, 220px 220px;
}
button { font: inherit; cursor: pointer; }
.app { width: min(100%, 560px); margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 16px 36px; }
.topbar { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 12px; margin-bottom: 16px; }
h1 { color: var(--blue); font-size: clamp(22px, 6vw, 28px); text-align: center; margin: 0; font-weight: 900; letter-spacing: -.03em; }
.round-button {
  border: 0;
  color: var(--blue);
  font-size: 25px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  box-shadow: 0 3px 12px rgba(35,40,48,.12);
  transition: transform .16s ease;
}
.round-button:active { transform: scale(.91); }
.calendar-panel {
  padding: 14px 10px 12px;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 5px 18px rgba(35,40,48,.07);
  backdrop-filter: blur(12px);
}
.month-nav { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin-bottom: 12px; }
.month-nav button { border: 0; background: transparent; color: var(--blue); font-size: 24px; font-weight: 900; min-height: 36px; }
#month-title { font-size: 17px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; color: var(--muted); text-align: center; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.week .today { color: var(--blue); font-weight: 900; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.day {
  aspect-ratio: 1;
  min-width: 0;
  border: 2.5px solid rgba(52,189,89,var(--border-alpha));
  border-radius: 10px;
  background: rgba(120,125,130,.08);
  color: var(--ink);
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 750;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 20px rgba(52,189,89,var(--fill-alpha));
  transition: transform .16s ease, border-color .16s ease;
}
.day:active { transform: scale(.90); }
.day.outside { opacity: .34; }
.day.today { outline: 2.5px solid var(--blue); outline-offset: -2.5px; color: var(--blue); font-weight: 900; }
.day.selected:not(.today) { outline: 1.5px solid var(--blue); outline-offset: -4px; color: var(--blue); }
.cards { display: grid; gap: 18px; margin-top: 20px; }
.section { display: grid; gap: 10px; }
.section h2 { color: var(--muted); font-size: 17px; margin: 0 0 0 4px; font-weight: 900; }
.card {
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) 44px;
  align-items: center;
  gap: 13px;
  min-height: 94px;
  border-radius: 16px;
  padding: 14px 15px 20px;
  color: white;
  box-shadow: inset 0 -7px 0 rgba(0,0,0,.18), 0 6px 14px color-mix(in srgb, var(--card) 22%, transparent);
}
.icon { font-size: 38px; text-align: center; filter: drop-shadow(0 2px 2px rgba(0,0,0,.08)); }
.title { font-size: 18px; font-weight: 900; line-height: 1.18; }
.subtitle { font-size: 14px; font-weight: 600; opacity: .9; margin-top: 5px; line-height: 1.25; }
.check {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: white;
  display: grid;
  place-items: center;
  color: var(--card);
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
footer { color: var(--muted); text-align: center; font-size: 12px; margin-top: 18px; }
.empty { color: var(--muted); text-align: center; padding: 44px 10px; font-weight: 700; }
@media (max-width: 380px) {
  .app { padding-inline: 12px; }
  .grid, .week { gap: 4px; }
  .card { grid-template-columns: 48px minmax(0,1fr) 40px; gap: 10px; padding-inline: 12px; }
  .icon { font-size: 33px; }
  .check { width: 38px; height: 38px; }
}
@media (prefers-color-scheme: dark) {
  :root { --page: #19191b; --panel: rgba(255,255,255,.07); --ink: #f2f2f4; --muted: #a3a4aa; }
  .round-button { background: rgba(255,255,255,.12); }
  .calendar-panel { box-shadow: 0 5px 18px rgba(0,0,0,.22); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
