:root {
  --ink: #173f35;
  --ink-soft: #53665f;
  --paper: #f8f5ed;
  --surface: #fffdf8;
  --green: #24745c;
  --green-dark: #185441;
  --lime: #cde875;
  --peach: #f4a278;
  --line: #d9ded7;
  --shadow: 0 20px 55px rgba(35, 61, 52, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; background: radial-gradient(circle at 8% 5%, #e5f0c7 0, transparent 28rem), var(--paper); }
.topbar { height: 76px; max-width: 1200px; margin: auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 18px; letter-spacing: -.3px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--ink); color: white; font-size: 13px; font-weight: 900; transform: rotate(-3deg); }
.profile-chip { display: flex; align-items: center; gap: 9px; padding: 5px 13px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.7); cursor: pointer; font-weight: 700; }
main { max-width: 1200px; margin: auto; padding: 30px 28px 70px; }

.onboarding { display: grid; grid-template-columns: minmax(0, 1fr) minmax(390px, 480px); gap: clamp(45px, 8vw, 110px); align-items: center; min-height: calc(100vh - 145px); }
.eyebrow { margin: 0 0 12px; color: var(--green); text-transform: uppercase; letter-spacing: .13em; font-weight: 900; font-size: 12px; }
h1, h2, p { margin-top: 0; }
.welcome-copy h1 { max-width: 700px; margin-bottom: 24px; font-family: Georgia, serif; font-size: clamp(44px, 6.5vw, 82px); line-height: .98; letter-spacing: -.055em; font-weight: 500; }
.intro { max-width: 580px; color: var(--ink-soft); font-size: 19px; line-height: 1.6; }
.feature-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 34px; }
.feature-row span { padding: 9px 13px; border: 1px solid #cfd9be; border-radius: 999px; background: rgba(255,255,255,.5); font-size: 13px; font-weight: 700; }

.identity-card { padding: clamp(26px, 4vw, 42px); border: 1px solid rgba(23,63,53,.09); border-radius: 28px; background: rgba(255,253,248,.94); box-shadow: var(--shadow); }
.step-label { margin-bottom: 7px; color: var(--green); font-size: 12px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.identity-card h2, .dialog-heading h2 { margin-bottom: 8px; font-family: Georgia, serif; font-size: 30px; font-weight: 500; letter-spacing: -.025em; }
.identity-card > p { color: var(--ink-soft); line-height: 1.5; }
.field-label, legend { display: block; margin: 23px 0 8px; font-size: 13px; font-weight: 850; }
.field-label span { color: #7b8984; font-weight: 500; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: white; padding: 13px 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(36,116,92,.12); }
textarea { resize: vertical; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

.avatar-grid { display: grid; width: 100%; min-width: 0; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.avatar-choice { position: relative; display: block; width: 100%; min-width: 0; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 50%; background: transparent; cursor: pointer; transition: transform .15s, border-color .15s; }
.avatar-choice:hover { transform: translateY(-2px); }
.avatar-choice.selected { border-color: var(--green); box-shadow: 0 0 0 3px rgba(36,116,92,.14); }
.avatar-choice.selected::after { content: "✓"; position: absolute; right: -3px; bottom: -1px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: white; font-size: 11px; font-weight: 900; }
.avatar { position: relative; display: block; overflow: hidden; border-radius: 50%; background-color: #e9eee8; }
.avatar-image { display: block; width: 100%; max-width: 100%; height: 100%; object-fit: cover; }
.avatar-choice .avatar { width: 100%; min-width: 0; height: 100%; }
.avatar-small { width: 34px; height: 34px; }
.avatar-hero { width: 108px; height: 108px; box-shadow: 0 12px 30px rgba(23,63,53,.17); }

.primary-button, .secondary-button, .text-button, .icon-button { border: 0; cursor: pointer; font-weight: 850; }
.primary-button { width: 100%; margin-top: 25px; padding: 14px 18px; border-radius: 12px; background: var(--ink); color: white; box-shadow: 0 8px 20px rgba(23,63,53,.17); }
.primary-button:hover { background: var(--green-dark); }
.primary-button.compact { width: auto; margin: 0; }
.secondary-button { padding: 12px 17px; border: 1px solid var(--ink); border-radius: 11px; background: transparent; }
.text-button { padding: 12px; background: transparent; }
.icon-button { width: 38px; height: 38px; border-radius: 50%; background: #eef0eb; font-size: 24px; font-weight: 400; }
.privacy-note { margin: 13px 0 0 !important; text-align: center; font-size: 11px; }
.form-error { min-height: 18px; margin: 10px 0 -8px !important; color: #a43b34 !important; font-size: 12px; }
#identity-form .field-label,
#identity-form input,
#identity-form fieldset,
#identity-form .privacy-note { display: none; }

.dashboard { padding-top: 55px; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 38px; }
.dashboard-heading h1 { margin-bottom: 9px; font-family: Georgia, serif; font-size: clamp(38px, 5vw, 60px); font-weight: 500; letter-spacing: -.04em; }
.dashboard-heading p:last-child { margin-bottom: 0; color: var(--ink-soft); }
.heading-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.calendar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.calendar-card { min-height: 210px; padding: 24px; border: 1px solid rgba(23,63,53,.1); border-radius: 22px; background: var(--surface); box-shadow: 0 7px 25px rgba(35,61,52,.07); cursor: pointer; transition: transform .16s, box-shadow .16s; }
.calendar-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(35,61,52,.11); }
.calendar-card-top { display: flex; align-items: center; justify-content: space-between; }
.calendar-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--lime); font-size: 21px; }
.member-stack { display: flex; }
.member-stack .avatar { width: 30px; height: 30px; margin-left: -7px; border: 2px solid white; }
.calendar-card h2 { margin: 28px 0 7px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.calendar-card p { color: var(--ink-soft); font-size: 14px; line-height: 1.45; }
.calendar-card-actions { display: flex; gap: 8px; margin-top: 20px; }
.calendar-card-actions button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: #f7f8f4; cursor: pointer; font-size: 12px; font-weight: 800; }
.empty-state { padding: 75px 25px; border: 1px dashed #bac7bf; border-radius: 25px; text-align: center; background: rgba(255,255,255,.35); }
.empty-state h2 { margin: 23px 0 9px; font-family: Georgia, serif; font-size: 29px; font-weight: 500; }
.empty-state p { max-width: 430px; margin: 0 auto 23px; color: var(--ink-soft); }
.empty-illustration { position: relative; display: inline-block; }
.calendar-page { position: absolute; right: -25px; bottom: -3px; display: grid; place-items: center; width: 52px; height: 52px; border: 4px solid var(--paper); border-radius: 14px; background: var(--peach); color: var(--ink); font-family: Georgia, serif; font-size: 23px; font-weight: 700; transform: rotate(7deg); }

dialog { width: min(520px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 23px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
#calendar-identity-dialog { max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
#calendar-identity-dialog form { min-width: 0; overflow-x: hidden; }
dialog::backdrop { background: rgba(17, 38, 32, .55); backdrop-filter: blur(3px); }
dialog form { padding: 30px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 22px; }
.dialog-copy { color: var(--ink-soft); line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 25px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 10; padding: 11px 17px; border-radius: 999px; background: var(--ink); color: white; font-size: 13px; font-weight: 750; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .2s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

.calendar-view { padding-top: 28px; }
.back-button { margin-bottom: 24px; padding: 8px 0; border: 0; background: transparent; color: var(--green); cursor: pointer; font-weight: 850; }
.calendar-view-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.calendar-view-heading h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(39px, 5vw, 61px); font-weight: 500; letter-spacing: -.045em; }
.calendar-filters { display: grid; grid-template-columns: minmax(180px, 1fr) 180px 180px auto; gap: 9px; margin-bottom: 16px; }
.calendar-filters input, .calendar-filters select { padding: 10px 11px; background: rgba(255,255,255,.8); font-size: 12px; }
.calendar-filters > button { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.search-field { position: relative; }
.search-field span { position: absolute; left: 12px; top: 8px; z-index: 1; color: var(--ink-soft); font-size: 18px; }
.search-field input { padding-left: 35px; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.calendar-main-panel, .pending-panel { border: 1px solid rgba(23,63,53,.1); border-radius: 22px; background: var(--surface); box-shadow: 0 7px 25px rgba(35,61,52,.06); }
.calendar-main-panel { padding: 22px; overflow: hidden; }
.calendar-controls { display: flex; justify-content: flex-end; margin-bottom: -36px; }
.view-switcher { display: flex; gap: 3px; padding: 3px; border-radius: 11px; background: #edf0eb; }
.view-button { padding: 7px 11px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: var(--ink-soft); font-size: 11px; font-weight: 850; }
.view-button.active { background: white; color: var(--ink); box-shadow: 0 2px 8px rgba(35,61,52,.1); }
.period-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; padding-right: 245px; }
.period-toolbar h2 { min-width: 210px; margin: 0 10px; font-family: Georgia, serif; font-size: 28px; font-weight: 500; text-transform: capitalize; }
.month-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; font-size: 24px; }
.today-button { margin-left: auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; font-size: 12px; font-weight: 800; }
.weekday-row, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekday-row { color: #7a8b84; text-align: center; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.weekday-row span { padding: 8px 2px; }
.month-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.day-cell { min-height: 112px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; overflow: hidden; }
.day-cell.outside { background: #f7f6f1; color: #a2aaa6; }
.day-cell.today { background: #fbfdea; }
.day-number { display: grid; place-items: center; width: 25px; height: 25px; margin-bottom: 5px; border-radius: 50%; font-size: 12px; font-weight: 850; }
.day-cell.today .day-number { background: var(--ink); color: white; }
.event-pill { display: block; width: 100%; margin: 3px 0; padding: 5px 6px; border: 0; border-left: 3px solid var(--event-color, var(--green)); border-radius: 5px; background: color-mix(in srgb, var(--event-color, var(--green)) 15%, white); color: var(--ink); text-align: left; font-size: 10px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-pill small { margin-right: 3px; font-size: 9px; font-weight: 600; }
.more-events { color: var(--green); font-size: 9px; font-weight: 850; }

.pending-panel { padding: 22px; }
.pending-heading { display: flex; align-items: center; justify-content: space-between; }
.pending-heading .eyebrow { margin-bottom: 5px; }
.pending-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.pending-count { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--lime); font-size: 12px; font-weight: 900; }
.pending-intro { margin: 15px 0 18px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.pending-list { display: grid; gap: 9px; }
.pending-list-toolbar { display: grid; grid-template-columns: 1fr 38px; gap: 7px; margin-bottom: 12px; }
.pending-list-toolbar select { padding: 9px 10px; font-size: 12px; }
.mini-button { border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; color: var(--green); font-size: 20px; font-weight: 700; }
.list-actions { display: flex; gap: 5px; margin: -4px 0 12px; }
.list-actions button { padding: 5px 7px; border: 0; border-radius: 7px; background: #eef0eb; cursor: pointer; color: var(--ink-soft); font-size: 9px; font-weight: 850; }
.list-actions .list-delete { margin-left: auto; color: #a13d34; }
.pending-item { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfaf5; cursor: pointer; }
.pending-item:hover { background: white; }
.pending-item strong { display: block; margin-bottom: 4px; font-size: 13px; }
.pending-item span { color: var(--ink-soft); font-size: 10px; }
.pending-empty { padding: 18px 10px; color: #829089; text-align: center; font-size: 12px; }
.pending-add { width: 100%; margin-top: 14px; padding: 10px; border: 1px dashed #9faf9f; border-radius: 10px; background: transparent; cursor: pointer; color: var(--green); font-size: 12px; font-weight: 850; }

.event-dialog { width: min(650px, calc(100% - 30px)); }
.form-grid { display: grid; gap: 12px; }
.two-columns { grid-template-columns: 1fr 1fr; }
.segmented-control { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: #edf0eb; }
.segmented-control label { cursor: pointer; }
.segmented-control input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-control span { display: block; padding: 10px; border-radius: 9px; text-align: center; font-size: 12px; font-weight: 800; }
.segmented-control input:checked + span { background: white; box-shadow: 0 2px 8px rgba(35,61,52,.1); }
.participant-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.participant-option { display: flex; align-items: center; gap: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 11px; font-size: 12px; font-weight: 750; }
.participant-option input { width: auto; }
.participant-option .avatar { flex: 0 0 auto; width: 30px; height: 30px; }
.danger-button { padding: 11px 12px; border: 0; border-radius: 9px; background: #f9e8e5; color: #a13d34; cursor: pointer; font-weight: 850; }
.dialog-spacer { flex: 1; }

.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.week-day { min-height: 410px; padding: 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; }
.week-day.today { background: #fbfdea; }
.week-day-heading { margin-bottom: 13px; text-align: center; }
.week-day-heading span { display: block; color: var(--ink-soft); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.week-day-heading strong { display: grid; place-items: center; width: 30px; height: 30px; margin: 4px auto 0; border-radius: 50%; font-size: 14px; }
.week-day.today .week-day-heading strong { background: var(--ink); color: white; }
.week-event { width: 100%; margin-bottom: 7px; padding: 8px 6px; border: 0; border-top: 3px solid var(--event-color, var(--green)); border-radius: 7px; background: color-mix(in srgb, var(--event-color, var(--green)) 13%, white); text-align: left; cursor: pointer; }
.week-event strong { display: block; font-size: 10px; line-height: 1.25; }
.week-event span { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 8px; }

.agenda-list { display: grid; gap: 1px; min-height: 360px; background: var(--line); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.agenda-item { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 16px; padding: 14px 16px; border: 0; background: white; text-align: left; cursor: pointer; }
.agenda-item:hover { background: #fbfcf8; }
.agenda-date { text-align: center; }
.agenda-date strong { display: block; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.agenda-date span { color: var(--ink-soft); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.agenda-copy { padding-left: 12px; border-left: 4px solid var(--event-color, var(--green)); }
.agenda-copy strong { display: block; font-size: 13px; }
.agenda-copy span, .agenda-meta { color: var(--ink-soft); font-size: 10px; }
.agenda-empty { padding: 80px 20px; background: white; color: var(--ink-soft); text-align: center; }

.community-divider { height: 1px; margin: 30px -30px 25px; background: var(--line); }
.attendance-heading { display: flex; align-items: center; justify-content: space-between; }
.attendance-heading h3 { margin: 0; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.attendance-summary { display: flex; gap: 4px; color: var(--ink-soft); font-size: 10px; font-weight: 750; }
.attendance-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 13px; }
.attendance-actions button { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; font-size: 11px; font-weight: 850; }
.attendance-actions button.active { border-color: var(--green); background: #e9f2ec; color: var(--green-dark); }
.comments-section { margin-top: 26px; }
.comment-list { display: grid; gap: 9px; max-height: 250px; overflow: auto; }
.comment { display: grid; grid-template-columns: 34px 1fr; gap: 9px; }
.comment .avatar { width: 34px; height: 34px; }
.comment-bubble { padding: 9px 11px; border-radius: 4px 12px 12px; background: #eef1ec; }
.comment-bubble strong { display: block; margin-bottom: 3px; font-size: 10px; }
.comment-bubble p { margin: 0; font-size: 12px; line-height: 1.4; white-space: pre-wrap; }
.comment-bubble time { display: block; margin-top: 4px; color: #7e8b86; font-size: 8px; }
.comments-empty { padding: 14px; color: var(--ink-soft); text-align: center; font-size: 11px; }
.comment-composer { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 11px; }
.comment-composer input { padding: 10px 12px; }
.comment-composer .secondary-button { padding: 10px 13px; }

.members-dialog { width: min(580px, calc(100% - 30px)); }
.members-dialog-content { padding: 30px; }
.invite-box { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px; border-radius: 14px; background: #edf4df; }
.invite-box strong, .invite-box span { display: block; }
.invite-box strong { font-size: 13px; }
.invite-box span { margin-top: 3px; color: var(--ink-soft); font-size: 10px; }
.member-list { display: grid; gap: 1px; margin-top: 20px; background: var(--line); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.member-row { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; padding: 11px 13px; background: white; }
.member-row .avatar { width: 42px; height: 42px; }
.member-identity strong, .member-identity span { display: block; }
.member-identity strong { font-size: 13px; }
.member-identity span { margin-top: 2px; color: var(--ink-soft); font-size: 9px; text-transform: capitalize; }
.member-controls { display: flex; align-items: center; gap: 6px; }
.member-controls select { width: auto; padding: 7px 9px; font-size: 10px; }
.member-remove { width: 29px; height: 29px; border: 0; border-radius: 8px; background: #f9e8e5; color: #a13d34; cursor: pointer; }
.members-note { margin: 14px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.4; }

@media (max-width: 850px) {
  .onboarding { grid-template-columns: 1fr; padding: 45px 0; }
  .welcome-copy h1 { font-size: clamp(44px, 12vw, 68px); }
  .calendar-grid { grid-template-columns: repeat(2, 1fr); }
  .calendar-layout { grid-template-columns: 1fr; }
  .pending-panel { order: -1; }
  .calendar-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .topbar { height: 66px; padding: 0 17px; }
  main { padding: 15px 17px 55px; }
  .onboarding { gap: 35px; padding-top: 28px; }
  .identity-card { margin: 0 -2px; padding: 25px 20px; border-radius: 22px; }
  .avatar-grid { grid-template-columns: repeat(4, 1fr); }
  #calendar-identity-dialog { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 18px; }
  #calendar-identity-dialog form { padding: 20px 16px 16px; }
  #calendar-identity-dialog .dialog-heading { margin-bottom: 10px; }
  #calendar-identity-dialog .dialog-heading h2 { font-size: 24px; line-height: 1.05; }
  #calendar-identity-dialog .dialog-copy { margin-bottom: 10px; font-size: 14px; }
  #calendar-identity-dialog .field-label,
  #calendar-identity-dialog legend { margin-top: 13px; }
  #calendar-identity-dialog .avatar-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  #calendar-identity-dialog .dialog-actions { position: sticky; bottom: 0; margin: 15px -6px -6px; padding: 10px 6px 6px; background: linear-gradient(transparent, var(--surface) 16px); }
  .dashboard { padding-top: 30px; }
  .dashboard-heading { display: block; }
  .dashboard-heading .primary-button { margin-top: 20px; }
  .heading-actions { justify-content: flex-start; }
  .calendar-grid { grid-template-columns: 1fr; }
  .calendar-view-heading { display: block; }
  .calendar-view-heading .primary-button { margin-top: 18px; }
  .calendar-view-heading .heading-actions { margin-top: 18px; }
  .calendar-view-heading .primary-button { margin-top: 0; }
  .calendar-filters { grid-template-columns: 1fr; }
  .calendar-main-panel { margin: 0 -10px; padding: 12px 6px; border-radius: 16px; }
  .calendar-controls { justify-content: center; margin: 0 0 12px; }
  .period-toolbar { padding-right: 0; }
  .period-toolbar h2 { min-width: 0; margin: 0 3px; font-size: 22px; }
  .day-cell { min-height: 82px; padding: 4px; }
  .event-pill { padding: 4px 3px; font-size: 8px; }
  .two-columns { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: 1fr; border: 0; gap: 8px; }
  .week-day { min-height: 0; border: 1px solid var(--line); border-radius: 11px; }
  .week-day-heading { text-align: left; display: flex; align-items: center; gap: 8px; }
  .week-day-heading span, .week-day-heading strong { display: inline-grid; margin: 0; }
  .agenda-item { grid-template-columns: 48px 1fr; gap: 9px; }
  .agenda-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
