:root {
  color-scheme: light;
  --canvas: #f4f7f3;
  --surface: #fff;
  --ink: #1a2d25;
  --muted: #4d6358;
  --line: #dae5dd;
  --wash: #e8f2eb;
  --green: #1b5b44;
  --dark-green: #123e31;
  --danger: #8d343b;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
p, h1, h2, dl, dd { margin: 0; }
h1, h2, strong, p, a, small { overflow-wrap: anywhere; }
h1 { font-size: clamp(1.55rem, 6.2vw, 2.15rem); letter-spacing: -.043em; line-height: 1.12; }
h2 { font-size: 1.08rem; letter-spacing: -.015em; line-height: 1.3; }
a { color: var(--green); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.shell { width: min(100% - 32px, 670px); margin-inline: auto; }
.header {
  background: var(--dark-green);
  color: white;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-name { font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.brand-org { color: #c2d9ca; font-size: .76rem; font-weight: 600; letter-spacing: .12em; }
.brand-mark {
  position: relative;
  flex: 0 0 38px;
  height: 38px;
  border-radius: 12px;
  background: #cbe6d4;
}
.brand-mark::before,
.brand-mark::after { position: absolute; content: ""; left: 50%; top: 50%; background: var(--dark-green); border-radius: 4px; transform: translate(-50%, -50%); }
.brand-mark::before { width: 18px; height: 6px; }
.brand-mark::after { width: 6px; height: 18px; }

main.shell { padding-top: 24px; padding-bottom: max(30px, env(safe-area-inset-bottom)); }
nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; }
.tab { background: none; border: 1px solid transparent; border-radius: 10px; min-height: 44px; padding: 7px 11px; font-size: .88rem; font-weight: 640; }
.tab[aria-pressed="true"] { background: var(--wash); border-color: var(--line); color: var(--dark-green); }
#notice, #delivery { border-radius: 14px; background: var(--wash); padding: 12px 14px; margin-bottom: 14px; }
#notice.error { color: var(--danger); background: #fbeced; }
#delivery { margin-top: 16px; font-size: .9rem; }
#delivery > p { margin-block: .3rem .45rem; color: var(--muted); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.stack > .page-heading { margin-bottom: 0; }
.zone { padding: 4px 8px; flex-shrink: 0; border-radius: 7px; background: var(--wash); color: var(--green); font-size: .75rem; font-weight: 750; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: clamp(13px, 4vw, 24px); }
.welcome { display: grid; gap: 13px; }
.calendar { padding: clamp(10px, 3vw, 20px); box-shadow: 0 5px 18px #183e2910; }
.month-heading { display: grid; grid-template-columns: 44px 1fr 44px; gap: 4px; align-items: center; margin-bottom: 11px; text-align: center; }
.month-heading h2 { font-size: clamp(1.04rem, 5vw, 1.34rem); }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.weekday { text-align: center; color: var(--muted); font-size: .75rem; padding-bottom: 3px; font-weight: 650; }
.day { position: relative; display: grid; place-items: center; min-width: 0; min-height: 42px; background: var(--canvas); border: 1px solid transparent; border-radius: 9px; padding: 0 0 3px; font-weight: 590; font-size: .93rem; }
.day.has-event { background: var(--wash); }
.day[aria-current="date"] { border-color: var(--green); }
.day[aria-pressed="true"] { background: var(--green); color: white; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.day .dot { position: absolute; bottom: 5px; left: calc(50% - 3px); }
.day[aria-pressed="true"] .dot { background: #cbe6d4; }
.legend { display: flex; align-items: center; gap: 7px; padding-top: 12px; color: var(--muted); font-size: .76rem; }
.day-list { display: grid; gap: 8px; margin-top: 21px; }
.month-heading h2::first-letter, .day-list h2::first-letter { text-transform: uppercase; }
.event-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 55px; text-align: left; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); padding: 10px 12px; }
.event-time { flex: 0 0 auto; color: var(--green); background: var(--wash); padding: 4px 6px; border-radius: 6px; font-size: .85rem; font-variant-numeric: tabular-nums; font-weight: 690; }
.event-title { flex: 1; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.event-title small { display: block; font-weight: 450; }
.chevron { margin-left: auto; font-size: 1.3rem; color: var(--muted); }
.empty { border: 1px dashed #bfcfc3; border-radius: 12px; padding: 14px; }
.muted { color: var(--muted); }
.time-label { color: var(--green); font-weight: 650; }
.place, .preserve { white-space: pre-wrap; }
.state { color: var(--dark-green); background: var(--wash); border-radius: 8px; padding: 7px 9px; width: fit-content; font-size: .9rem; }

.stack { display: grid; gap: 12px; align-content: start; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.button { justify-self: start; min-height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; font-weight: 650; }
.button.primary { color: #fff; background: var(--green); border-color: var(--green); }
.button.ghost, .month-arrow { color: var(--green); background: var(--canvas); }
.button.danger { color: var(--danger); }
.month-arrow { width: 44px; height: 44px; padding: 0; font: 1.5rem/1 system-ui, sans-serif; }
.back { background: transparent; color: var(--green); border: 0; padding: 2px 4px; min-height: 42px; justify-self: start; font-weight: 650; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-weight: 650; font-size: .9rem; }
.field :is(input, textarea, select) { border: 1px solid #a9bdb1; border-radius: 8px; width: 100%; min-width: 0; padding: 8px; background: white; min-height: 44px; }
textarea { resize: vertical; }
.two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.check input { width: 19px; height: 19px; accent-color: var(--green); }
summary { cursor: pointer; color: var(--green); padding-block: 10px; font-weight: 650; }
details[open] summary { margin-bottom: 8px; }
.person, .answer { border-top: 1px solid var(--line); padding-top: 10px; }
.counts { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 12px; background: var(--canvas); border-radius: 10px; }
.counts dd { text-align: right; font-variant-numeric: tabular-nums; }
.counts > :nth-last-child(-n + 2) { font-weight: 700; }
@media (min-width: 520px) {
  .day { min-height: 47px; }
  .month-grid { gap: 5px; }
}
