:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1c1c1e;
  background: #f5f5f7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --red: #e5484d;
  --muted: #8e8e93;
  --line: #ededf0;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; }
button { font: inherit; }
.app { width: min(100%, 560px); min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-bottom: clamp(38px, 10vh, 76px); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 650; letter-spacing: -.35px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: white; background: #1c1c1e; font-size: 15px; font-weight: 700; }
.privacy { color: var(--muted); font-size: 12px; }
.calendar-card { padding: 26px 25px 18px; border: 1px solid rgba(20,20,30,.045); border-radius: 23px; background: #fff; box-shadow: 0 12px 40px rgba(25,25,35,.055); }
.calendar-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 27px; }
.eyebrow { margin: 0 0 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1.35px; }
h1 { margin: 0; font-size: clamp(27px, 7vw, 34px); line-height: 1.1; font-weight: 700; letter-spacing: -1.1px; }
.month-controls { display: flex; gap: 8px; padding-bottom: 2px; }
.nav-button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0 0 4px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #303036; cursor: pointer; font-size: 30px; line-height: 1; -webkit-tap-highlight-color: transparent; }
.nav-button:active { background: #f3f3f5; }
.nav-button:focus-visible, .day:focus-visible { outline: 3px solid #82aaff; outline-offset: 2px; }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekdays { margin-bottom: 8px; color: #9b9ba1; text-align: center; font-size: 11px; font-weight: 600; }
.weekdays span { padding: 7px 0; }
.calendar-grid { gap: 5px 0; }
.day { position: relative; display: grid; justify-items: center; align-content: center; justify-self: center; width: min(100%, 48px); aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #242429; cursor: pointer; font-size: 14px; font-weight: 500; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.day:active:not(:disabled) { transform: scale(.94); }
.day.outside { visibility: hidden; pointer-events: none; }
.day.today:not(.absent)::after { position: absolute; bottom: 5px; width: 3px; height: 3px; border-radius: 50%; background: #3478f6; content: ""; }
.day.absent { background: var(--red); color: white; font-weight: 650; }
.day.absent::after { display: none; }
.day.unsure { background: #fff0c2; color: #795400; font-weight: 650; }
.day.unsure::after { display: none; }
.calendar-footer { display: flex; align-items: center; gap: 8px; padding-top: 20px; margin-top: 14px; border-top: 1px solid #f0f0f2; color: #56565d; font-size: 12px; }
.summary-card { margin-top: 14px; padding: 20px 22px; border: 1px solid rgba(20,20,30,.045); border-radius: 20px; background: #fff; box-shadow: 0 8px 28px rgba(25,25,35,.035); }
.summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-heading .eyebrow { margin-bottom: 5px; }
.summary-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.3px; }
.absence-total { display: flex; align-items: baseline; gap: 5px; margin: 0; color: var(--red); }
.absence-total strong { font-size: 25px; letter-spacing: -.8px; }
.absence-total span { color: #77777e; font-size: 11px; }
.empty-state { margin: 16px 0 0; color: #929299; font-size: 13px; }
.absence-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 8px; padding: 0; margin: 15px 0 0; list-style: none; }
.absence-list:empty { display: none; }
.absence-list li { display: flex; flex-direction: column; gap: 7px; padding: 10px 11px; border-radius: 10px; background: #fff5f5; color: #bd3038; font-size: 12px; font-weight: 550; }
.absence-list li .date-note { color: #6c5556; font-size: 11px; font-weight: 400; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.absence-list li button { align-self: flex-start; padding: 0; border: 0; background: transparent; color: #a92b32; cursor: pointer; font-size: 11px; font-weight: 650; }
.note-dialog { width: min(calc(100% - 32px), 420px); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 20px 70px rgba(0,0,0,.22); }
.note-dialog::backdrop { background: rgba(20,20,25,.34); backdrop-filter: blur(3px); }
.note-dialog form { padding: 24px; }
.note-dialog h2 { margin: 0; font-size: 22px; letter-spacing: -.5px; }
.note-date { margin: 7px 0 16px; color: #85858c; font-size: 13px; }
.note-dialog textarea { display: block; width: 100%; min-height: 108px; resize: vertical; padding: 12px; border: 1px solid #dedee3; border-radius: 12px; outline: none; color: #242429; background: #fff; font: inherit; font-size: 14px; line-height: 1.45; }
.note-dialog textarea:focus { border-color: #8daff5; box-shadow: 0 0 0 3px rgba(52,120,246,.12); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.dialog-actions button { min-height: 40px; padding: 0 15px; border-radius: 11px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
.text-button { border: 0; color: #68686f; background: #f2f2f4; }
.save-button { border: 0; color: #fff; background: #1c1c1e; }
.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; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.unsure-dot { margin-left: 8px; background: #e8aa24; }
.status-label { align-self: flex-start; padding: 3px 7px; border-radius: 7px; background: #ffe2e2; color: #bd3038; font-size: 10px; font-weight: 650; }
.status-label.unsure-label { background: #fff0c2; color: #795400; }
.hint { margin-left: auto; color: #9b9ba1; }
.app-note { margin: 19px 0 0; color: #98989e; text-align: center; font-size: 11px; }
@media (max-width: 380px) { .app { padding-right: 14px; padding-left: 14px; } .calendar-card { padding: 21px 15px 15px; } .day { font-size: 13px; } }
@media (prefers-reduced-motion: no-preference) { .day { transition: transform 100ms ease, background-color 140ms ease; } }
