:root {
  --navy: #14223a;
  --navy-2: #24344f;
  --terracotta: #c8522d;
  --cream: #f5f2eb;
  --paper: #fffdf9;
  --line: #ddd8ce;
  --muted: #687287;
  --green: #2f7a4b;
  --font-serif: "Newsreader", Georgia, serif;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --shadow: 0 22px 60px rgba(20, 34, 58, .09);
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--cream); color: var(--navy); font-family: var(--font-sans); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.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; }

.site-header {
  height: 86px; padding: 0 clamp(18px, 3vw, 48px); display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,253,249,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(18px);
}
.brand { color: var(--navy); text-decoration: none; display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 47px; height: 47px; display: grid; place-items: center; color: #d9b26f; background: var(--navy); border-radius: 14px; }
.brand-mark svg { width: 25px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.brand small { color: var(--muted); margin-top: 2px; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.live-status { display: inline-flex; align-items: center; gap: 8px; color: var(--green); background: #e6f6ea; border: 1px solid #bce5c7; border-radius: 999px; padding: 9px 14px; font-size: .82rem; font-weight: 700; }
.live-status i { width: 7px; height: 7px; background: #36a460; border-radius: 50%; box-shadow: 0 0 0 4px rgba(54,164,96,.12); }
.sign-in-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 15px; color: var(--navy); text-decoration: none; border: 1px solid var(--line); border-radius: 12px; background: white; font-weight: 700; font-size: .88rem; }

.calendar-shell { max-width: 1740px; margin: 0 auto; padding: 32px clamp(16px, 3vw, 48px) 56px; }
.calendar-intro { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 7px; color: var(--terracotta); font-weight: 800; letter-spacing: .15em; text-transform: uppercase; font-size: .7rem; }
.calendar-intro h1 { margin: 0; font: 700 clamp(2.5rem, 5vw, 4.9rem)/.95 var(--font-serif); letter-spacing: -.035em; }
.intro-copy { margin: 12px 0 0; color: var(--muted); font-size: 1rem; }
.event-count { min-width: 185px; display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.event-count svg { color: var(--terracotta); width: 25px; }
.event-count strong, .event-count small { display: block; }
.event-count strong { font-size: 1.4rem; line-height: 1; }
.event-count small { margin-top: 4px; color: var(--muted); font-size: .74rem; }

/* Leader quick reference */
.leader-guide { margin: 0 0 30px; }
.leader-guide-label { margin: 0 0 13px; color: #8d867d; font-size: .7rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.leader-guide-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.leader-guide-heading { min-height: 65px; display: flex; align-items: center; gap: 12px; padding: 15px 24px; border-bottom: 1px solid var(--line); }
.leader-guide-icon { width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center; color: var(--terracotta); background: #fbede7; border-radius: 10px; }
.leader-guide-icon svg { width: 20px; }
.leader-guide-heading h2 { flex: 1; margin: 0; font: 700 1.2rem/1.2 var(--font-serif); letter-spacing: -.01em; }
.leader-guide-heading h2 span { font-family: var(--font-sans); font-size: .92rem; font-weight: 700; letter-spacing: 0; }
.wednesday-rotation { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); }
.wednesday-rotation article { min-width: 0; min-height: 138px; padding: 20px 24px; border-right: 1px solid var(--line); }
.wednesday-rotation article:last-child { border-right: 0; }
.wednesday-rotation p, .wednesday-rotation h3 { margin: 0; }
.wednesday-rotation .rotation-label { margin-bottom: 8px; color: #b27b23; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.wednesday-rotation h3 { font-size: .95rem; }
.wednesday-rotation article > p:last-child { margin-top: 5px; color: #817b73; font-size: .76rem; line-height: 1.42; }
.leader-guide-notice { display: flex; align-items: flex-start; gap: 12px; margin: 12px 0; padding: 15px 22px; color: #79500f; background: #fcf4e8; border: 1px solid #dfa542; border-radius: 13px; }
.leader-guide-notice svg { width: 18px; flex: 0 0 auto; margin-top: 1px; }
.leader-guide-notice p { margin: 0; font-size: .8rem; line-height: 1.55; }
.assignment-heading > p { margin: 0; color: #8d867d; font-size: .73rem; white-space: nowrap; }
.assignment-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); }
.assignment-grid article { min-width: 0; min-height: 78px; padding: 14px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.assignment-grid article:nth-child(6n) { border-right: 0; }
.assignment-grid article:nth-last-child(-n+6) { border-bottom: 0; }
.assignment-grid h3 { margin: 0 0 8px; color: #8d867d; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.assignment-grid p { display: flex; align-items: flex-start; gap: 7px; margin: 0; font-size: .7rem; font-weight: 700; line-height: 1.35; }
.assignment-dot { width: 8px; height: 8px; flex: 0 0 auto; display: inline-block; margin-top: .25em; border-radius: 50%; }
.assignment-dot.priest { background: #c65d47; }
.assignment-dot.teacher { background: #3a8f7f; }
.assignment-dot.deacon { background: #f2868f; }
.assignment-key { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 25px; margin-top: 12px; padding: 13px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-size: .72rem; }
.assignment-key strong { margin-right: 3px; color: #8d867d; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; }
.assignment-key span { display: inline-flex; align-items: center; gap: 7px; }
.assignment-key .assignment-dot { margin-top: 0; }

.calendar-workspace { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 22px; align-items: start; }
.filter-panel, .calendar-main { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.filter-panel { padding: 22px 20px; border-radius: 18px; position: sticky; top: 108px; }
.filter-heading { display: flex; align-items: center; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.filter-heading h2 { margin: 0; font-size: .95rem; }
.filter-heading svg { width: 20px; }
.filter-close { display: none; margin-left: auto; border: 0; background: none; color: var(--navy); font-size: 1.8rem; }
.search-field { margin: 20px 0 17px; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; display: flex; gap: 9px; align-items: center; background: white; }
.search-field:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(20,34,58,.08); }
.search-field svg { width: 18px; color: #8790a0; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--navy); background: transparent; }
.filter-field { display: block; margin-top: 15px; color: var(--navy-2); font-size: .75rem; font-weight: 700; }
.filter-field select { width: 100%; height: 45px; margin-top: 7px; padding: 0 34px 0 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--navy); background: white; }
.clear-filters { margin: 17px 0 20px; padding: 0; color: var(--terracotta); background: none; border: 0; font-size: .78rem; font-weight: 800; cursor: pointer; }
.legend-block { border-top: 1px solid var(--line); padding-top: 17px; }
.legend-block > p { margin: 0 0 10px; color: var(--muted); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; }
#legend-root { display: grid; gap: 7px; max-height: 198px; overflow: auto; }
.legend-item { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .72rem; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.meeting-times { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 15px; }
.meeting-times summary { cursor: pointer; font-size: .75rem; font-weight: 800; }
.meeting-times dl { margin: 12px 0 0; }
.meeting-times dl div { margin-bottom: 10px; }
.meeting-times dt { font-size: .7rem; font-weight: 700; }
.meeting-times dd { margin: 2px 0 0; color: var(--muted); font-size: .68rem; }

.calendar-main { min-width: 0; border-radius: 20px; padding: 28px; }
.calendar-toolbar { min-height: 52px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px; }
.calendar-toolbar h2 { margin: 0; font: 700 clamp(1.6rem,3vw,2.35rem)/1 var(--font-serif); letter-spacing: -.02em; }
.date-controls { display: flex; gap: 7px; justify-self: start; }
.icon-button, .today-button { height: 42px; border: 1px solid var(--line); background: white; color: var(--navy); cursor: pointer; }
.icon-button { width: 42px; border-radius: 9px; font-size: 1.6rem; line-height: 1; }
.today-button { padding: 0 14px; border-radius: 9px; font-size: .8rem; font-weight: 700; }
.view-switch { justify-self: end; display: inline-flex; padding: 4px; border: 1px solid var(--line); background: var(--cream); border-radius: 11px; }
.view-switch button { border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 8px 13px; font-size: .75rem; font-weight: 800; cursor: pointer; }
.view-switch button.active { background: white; color: var(--navy); box-shadow: 0 2px 8px rgba(20,34,58,.09); }
.calendar-status { min-height: 430px; display: grid; place-items: center; color: var(--muted); }
.calendar-status[hidden] { display: none; }
.weekday-row, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.weekday-row { border: 1px solid var(--line); border-bottom: 0; background: #f3f0ea; }
.weekday-row span { padding: 11px 8px; text-align: center; color: var(--muted); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; }
.month-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); animation: calendar-in .32s ease both; }
@keyframes calendar-in { from { opacity: 0; transform: translateY(8px); } }
.day-cell { position: relative; min-width: 0; min-height: 128px; padding: 9px 7px 7px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); text-align: left; color: var(--navy); overflow: hidden; }
.day-cell { cursor: pointer; }
.authorized .day-cell::after { content: "+"; position: absolute; top: 7px; left: 8px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: var(--terracotta); background: #fff2ec; font-size: .8rem; font-weight: 800; opacity: 0; transform: scale(.75); transition: opacity .14s ease, transform .14s ease; }
.authorized .day-cell:hover::after, .authorized .day-cell:focus-visible::after { opacity: 1; transform: scale(1); }
.day-cell.outside { background: #f7f5f0; }
.day-cell.outside .day-number { color: #c4c1ba; }
.day-cell.today { box-shadow: inset 0 0 0 2px var(--terracotta); z-index: 1; }
.day-cell.selected { background: #f7f1e8; }
.day-number { display: block; margin: 0 2px 7px; text-align: right; font-size: .72rem; font-weight: 800; }
.today .day-number { color: var(--terracotta); }
.event-chip { width: 100%; display: block; margin: 3px 0; padding: 5px 6px 5px 9px; border: 0; border-left: 3px solid var(--event-color); border-radius: 5px; background: var(--event-bg); color: var(--event-text); text-align: left; font-size: .64rem; line-height: 1.25; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; cursor: pointer; transition: transform .14s ease, filter .14s ease; }
.event-chip:hover { transform: translateX(2px); filter: saturate(1.12); }
.event-chip time { display: block; margin-bottom: 1px; opacity: .72; font-size: .56rem; font-weight: 700; }
.more-events { display: block; margin: 4px 5px; color: var(--muted); font-size: .62rem; font-weight: 700; }
.event-dots { display: none; }
.mobile-day-agenda { display: none; }

.agenda-view { animation: calendar-in .32s ease both; }
.agenda-date { display: grid; grid-template-columns: 72px 1fr; gap: 18px; padding: 17px 0; border-top: 1px solid var(--line); }
.agenda-date:first-child { border-top: 0; }
.agenda-date-heading { font: 700 1.05rem/1.05 var(--font-serif); }
.agenda-date-heading small { display: block; margin-top: 5px; color: var(--muted); font: 700 .62rem/1 var(--font-sans); text-transform: uppercase; letter-spacing: .08em; }
.agenda-event { width: 100%; padding: 11px 13px; border: 0; border-left: 3px solid var(--event-color); border-radius: 7px; color: var(--navy); background: var(--event-bg); text-align: left; cursor: pointer; }
.agenda-event + .agenda-event { margin-top: 7px; }
.agenda-event strong { display: block; font-size: .84rem; }
.agenda-event span { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; }
.empty-month { padding: 70px 20px; text-align: center; color: var(--muted); }

.mobile-filter-button { display: none; }
.drawer-scrim { position: fixed; inset: 0; z-index: 29; background: rgba(20,34,58,.45); backdrop-filter: blur(2px); }
.event-dialog { width: min(510px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 20px; color: var(--navy); box-shadow: 0 30px 90px rgba(20,34,58,.28); overflow: hidden; }
.event-dialog::backdrop, .quick-add-dialog::backdrop { background: rgba(20,34,58,.55); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; top: 12px; right: 14px; z-index: 1; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.88); color: var(--navy); font-size: 1.6rem; cursor: pointer; }
.dialog-accent { height: 9px; background: var(--event-color); }
.dialog-body { padding: 27px; }
.dialog-kicker { margin: 0 0 7px; color: var(--event-color); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.dialog-body h2 { margin: 0 45px 15px 0; font: 700 2rem/1.05 var(--font-serif); }
.dialog-meta { display: grid; gap: 9px; margin: 0; }
.dialog-meta div { display: grid; grid-template-columns: 76px 1fr; gap: 10px; font-size: .8rem; }
.dialog-meta dt { color: var(--muted); }
.dialog-meta dd { margin: 0; font-weight: 700; }
.dialog-description { margin: 18px 0 0; padding-top: 17px; border-top: 1px solid var(--line); color: #505a6b; font-size: .85rem; line-height: 1.65; }
.dialog-map { display: inline-flex; margin-top: 18px; color: var(--terracotta); font-size: .8rem; font-weight: 800; }
.dialog-series { margin: 14px 0 0; color: var(--muted); font-size: .72rem; font-weight: 700; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; padding-top: 17px; border-top: 1px solid var(--line); }
.dialog-actions a { text-decoration: none; }

.quick-add-dialog { width: min(620px, calc(100% - 28px)); max-height: min(860px, calc(100svh - 30px)); padding: 0; border: 0; border-radius: 22px; color: var(--navy); background: var(--paper); box-shadow: 0 30px 90px rgba(20,34,58,.3); overflow: auto; }
.quick-add-dialog[open] { animation: quick-add-in .22s ease both; }
@keyframes quick-add-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.quick-add-head { padding: 28px 30px 20px; border-bottom: 1px solid var(--line); background: #faf6ef; }
.quick-add-head .dialog-kicker { color: var(--terracotta); }
.quick-add-head h2 { margin: 0; font: 700 2rem/1 var(--font-serif); }
.quick-add-head > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: .78rem; }
.quick-add-fields { padding: 24px 30px 6px; }
.quick-add-fields .form-group { display: block; }
.quick-add-actions { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 30px; border-top: 1px solid var(--line); background: rgba(255,253,249,.96); backdrop-filter: blur(12px); }
.quick-add-actions > div { display: flex; gap: 8px; }
.quick-add-actions button:disabled { opacity: .55; cursor: wait; }
.dashboard-link { color: var(--navy); font-size: .74rem; font-weight: 800; }
.calendar-toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; padding: 12px 16px; color: white; background: var(--navy); border-radius: 10px; box-shadow: 0 16px 40px rgba(20,34,58,.25); font-size: .78rem; font-weight: 700; opacity: 0; transform: translate(-50%, 12px); transition: opacity .2s ease, transform .2s ease; }
.calendar-toast.visible { opacity: 1; transform: translate(-50%, 0); }
.mobile-day-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mobile-add-event { min-height: 36px; padding: 0 10px; border: 1px solid #efc5bb; border-radius: 8px; color: var(--terracotta); background: #fff5f0; font-size: .7rem; font-weight: 800; }

.site-footer { max-width: 1740px; margin: 0 auto; padding: 0 clamp(16px,3vw,48px) 34px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .7rem; }

/* Admin */
.admin-page { background: var(--cream); }
.admin-shell { max-width: 1040px; margin: 0 auto; padding: 36px 20px 70px; }
.admin-top { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 28px; }
.admin-top h1 { margin: 0; font: 700 2.4rem/1 var(--font-serif); }
.admin-user { margin-top: 7px; color: var(--muted); font-size: .8rem; }
.login-wrap { min-height: calc(100svh - 86px); display: grid; place-items: center; padding: 24px; }
.login-card { width: min(430px,100%); padding: 38px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); text-align: center; }
.login-mark { margin: 0 auto 20px; }
.login-card h1 { margin: 0; font: 700 2.2rem/1 var(--font-serif); }
.login-card .sub { margin: 12px 0 25px; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; font-weight: 800; font-size: .78rem; }
.btn-primary { color: white; background: var(--navy); }
.btn-secondary { color: var(--navy); background: white; border-color: var(--line); }
.btn-danger { color: #9c302b; background: #fff4f1; border-color: #efc5bb; }
.btn-accent { color: white; background: var(--terracotta); }
.btn-small { min-height: 34px; padding: 0 11px; font-size: .7rem; }
.google-button { width: 100%; background: white; border-color: var(--line); color: var(--navy); }
.tab-bar { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab-btn { flex: 0 0 auto; padding: 11px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); cursor: pointer; font-weight: 800; font-size: .78rem; }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--terracotta); }
.admin-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label { display: block; margin-bottom: 6px; color: var(--navy-2); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.field-help { display: block; margin-top: 6px; color: var(--muted); font-size: .65rem; line-height: 1.35; }
.form-input, .form-select, .form-textarea { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--navy); outline: none; }
.form-textarea { min-height: 100px; resize: vertical; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(20,34,58,.08); }
.tag-checklist { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-check { display: inline-flex; gap: 6px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .7rem; cursor: pointer; }
.tag-check.checked { border-color: var(--terracotta); background: #fff2ec; }
.recurrence-panel { margin: 2px 0 20px; padding: 17px 18px 2px; border: 1px solid var(--line); border-radius: 12px; background: #faf8f3; }
.recurrence-panel legend { padding: 0 7px; color: var(--navy); font-size: .75rem; font-weight: 800; }
.weekday-checklist { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; }
.weekday-checklist label { cursor: pointer; }
.weekday-checklist input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-checklist span { min-height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: white; font-size: .68rem; font-weight: 800; transition: border-color .14s ease, color .14s ease, background .14s ease; }
.weekday-checklist input:checked + span { color: var(--terracotta); border-color: #e4a895; background: #fff1eb; }
.weekday-checklist input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.series-exceptions { margin: 1px 0 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.series-exception-item { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.series-exception-item:last-child { border-bottom: 0; }
.series-exception-item p { margin: 0; font-size: .72rem; font-weight: 700; }
.series-exception-item small { display: block; margin-top: 3px; color: var(--muted); font-size: .64rem; font-weight: 500; }
.occurrence-banner { margin-bottom: 18px; padding: 12px 14px; border-left: 3px solid var(--terracotta); color: var(--navy); background: #fff2ec; border-radius: 0 9px 9px 0; }
.occurrence-banner strong, .occurrence-banner span { display: block; }
.occurrence-banner strong { font-size: .78rem; }
.occurrence-banner span { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.activity-card { padding: 16px 0; border-bottom: 1px solid var(--line); }
.activity-card:first-child { padding-top: 0; }
.activity-card:last-child { border-bottom: 0; padding-bottom: 0; }
.activity-card-top { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.activity-card-title { font-weight: 800; font-size: .9rem; }
.activity-card-meta, .activity-card-desc { margin-top: 4px; color: var(--muted); font-size: .72rem; }
.status-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #e9edf2; color: var(--navy); font-size: .61rem; font-weight: 800; text-transform: uppercase; }
.status-published { background: #e3f2e6; color: var(--green); }
.status-draft { background: #eeeae2; color: #716a5e; }
.status-pending { background: #fff0d4; color: #8e5d08; }
.status-rejected { background: #fbe5df; color: #9c302b; }
.alert { margin-bottom: 16px; padding: 11px 13px; border-radius: 9px; font-size: .78rem; }
.alert-error { color: #8d2b27; background: #fde9e4; }
.alert-success { color: var(--green); background: #e6f4e9; }
.empty-state { padding: 45px 15px; text-align: center; color: var(--muted); font-size: .82rem; }
.modal-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(20,34,58,.55); }
.modal-card { width: min(480px,100%); padding: 24px; background: var(--paper); border-radius: 18px; }
.modal-title { margin-bottom: 15px; font: 700 1.6rem/1 var(--font-serif); }

@media (max-width: 900px) {
  .wednesday-rotation { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .wednesday-rotation article:nth-child(2) { border-right: 0; }
  .wednesday-rotation article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .assignment-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .assignment-grid article:nth-child(3n) { border-right: 0; }
  .assignment-grid article:nth-child(6n) { border-right: 0; }
  .assignment-grid article:nth-child(-n+9) { border-bottom: 1px solid var(--line); }
  .assignment-grid article:nth-last-child(-n+3) { border-bottom: 0; }
  .assignment-heading { align-items: flex-start; }
  .assignment-heading > p { white-space: normal; }
  .calendar-workspace { grid-template-columns: 1fr; }
  .mobile-filter-button { display: inline-flex; align-items: center; gap: 8px; width: max-content; min-height: 44px; padding: 0 13px; color: var(--navy); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; font-weight: 800; }
  .mobile-filter-button span { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; color: white; background: var(--terracotta); border-radius: 999px; font-size: .65rem; }
  .filter-panel { position: fixed; top: 0; left: 0; bottom: 0; z-index: 30; width: min(330px,88vw); border-radius: 0 18px 18px 0; transform: translateX(-105%); transition: transform .24s ease; overflow-y: auto; }
  .filter-panel.open { transform: translateX(0); }
  .filter-close { display: block; }
}

@media (max-width: 680px) {
  .site-header { height: 72px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 11px; }
  .brand strong { font-size: .78rem; }
  .brand small { font-size: .68rem; }
  .live-status { display: none; }
  .sign-in-link { width: 44px; padding: 0; justify-content: center; font-size: 0; }
  .sign-in-link svg { width: 20px; }
  .calendar-shell { padding-top: 24px; }
  .calendar-intro { align-items: start; margin-bottom: 22px; }
  .calendar-intro h1 { font-size: 2.6rem; }
  .intro-copy { max-width: 270px; font-size: .8rem; }
  .event-count { min-width: 75px; padding: 11px; justify-content: center; }
  .event-count svg, .event-count small { display: none; }
  .leader-guide { margin-bottom: 22px; }
  .leader-guide-label { margin-bottom: 10px; }
  .leader-guide-heading { align-items: flex-start; padding: 14px 16px; }
  .leader-guide-icon { width: 34px; height: 34px; }
  .leader-guide-heading h2 { font-size: 1.02rem; }
  .leader-guide-heading h2 span { display: block; margin-top: 3px; font-size: .72rem; }
  .wednesday-rotation { grid-template-columns: 1fr; }
  .wednesday-rotation article { min-height: 0; padding: 14px 17px; border-right: 0; border-bottom: 1px solid var(--line); }
  .wednesday-rotation article:nth-child(2) { border-bottom: 1px solid var(--line); }
  .wednesday-rotation article:last-child { border-bottom: 0; }
  .leader-guide-notice { padding: 13px 15px; }
  .leader-guide-notice p { font-size: .73rem; }
  .assignment-heading { flex-wrap: wrap; }
  .assignment-heading > p { flex-basis: 100%; padding-left: 46px; font-size: .68rem; }
  .assignment-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .assignment-grid article { min-height: 72px; padding: 12px 14px; }
  .assignment-grid article:nth-child(3n) { border-right: 1px solid var(--line); }
  .assignment-grid article:nth-child(2n) { border-right: 0; }
  .assignment-grid article:nth-child(-n+10) { border-bottom: 1px solid var(--line); }
  .assignment-grid article:nth-last-child(-n+2) { border-bottom: 0; }
  .assignment-key { align-items: flex-start; flex-direction: column; gap: 8px; padding: 13px 16px; }
  .calendar-main { padding: 15px; border-radius: 16px; }
  .calendar-toolbar { grid-template-columns: 1fr auto; row-gap: 15px; margin-bottom: 15px; }
  .calendar-toolbar h2 { grid-row: 1; grid-column: 1 / -1; text-align: center; font-size: 1.8rem; }
  .date-controls { grid-row: 2; }
  .view-switch { grid-row: 2; }
  .today-button { padding: 0 10px; }
  .weekday-row span { padding: 9px 0; font-size: .55rem; letter-spacing: 0; }
  .day-cell { min-height: 58px; padding: 5px 2px; }
  .authorized .day-cell::after { display: none; }
  .day-number { margin: 0 3px 5px; font-size: .61rem; }
  .event-chip, .more-events { display: none; }
  .event-dots { display: flex; justify-content: center; gap: 2px; flex-wrap: wrap; }
  .event-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--event-color); }
  .mobile-day-agenda { display: block; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
  .mobile-day-agenda h3 { margin: 0 0 10px; font: 700 1.25rem/1 var(--font-serif); }
  .mobile-day-heading h3 { margin-bottom: 0; }
  .agenda-date { grid-template-columns: 55px 1fr; }
  .site-footer { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .weekday-checklist { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .admin-top h1 { font-size: 2rem; }
  .admin-panel { padding: 18px; }
  .login-card { padding: 28px 22px; }
  .quick-add-head { padding: 24px 20px 17px; }
  .quick-add-fields { padding: 20px 20px 4px; }
  .quick-add-actions { align-items: stretch; flex-direction: column-reverse; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); }
  .quick-add-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .dashboard-link { text-align: center; padding: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
