/* ===== RESET & TOKENS ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Update banner */
#update-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: #0f172a; color: #fff; padding: 0;
  animation: slideDown .3s ease;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.update-banner-inner {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px;
  font-size: .82rem; font-weight: 500;
}
.update-banner-inner button {
  background: var(--teal); color: #fff; border: none; border-radius: 6px;
  padding: 6px 16px; font-size: .78rem; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.update-banner-inner button:hover { background: #0f766e; }
.update-dismiss {
  background: none !important; color: rgba(255,255,255,.6) !important;
  font-size: 1.1rem !important; padding: 4px 8px !important;
}
.update-dismiss:hover { color: #fff !important; }

/* PWA standalone mode — safe areas for notch devices */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .site-footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --border: #e5e7eb;
  --border-light: #f0f0f0;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;

  /* Brand — teal-forward, no purple */
  --accent: #0d9488;
  --accent-light: #ccfbf1;
  --accent-hover: #0f766e;

  /* Semantic */
  --teal: #0d9488;
  --teal-bg: #f0fdfa;
  --rose: #e11d48;
  --rose-bg: #fff1f2;
  --amber: #d97706;
  --amber-bg: #fffbeb;
  --slate: #475569;
  --slate-bg: #f1f5f9;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 24px rgba(0,0,0,.08);
  --transition: .18s ease;
}

html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* ===== TAB NAV ===== */
.tab-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding: calc(6px + env(safe-area-inset-top, 0px)) 0 6px;
}
.nav-inner {
  display: flex; align-items: center; justify-content: center;
}

/* Logo — sits inside the nav pill row */
.logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0;
  margin-right: 6px;
}
.logo-svg {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 8px;
  transition: transform .2s ease;
}
.logo:hover .logo-svg { transform: scale(1.08); }
.logo-text {
  font-size: .82rem; font-weight: 800; color: var(--text);
  letter-spacing: -.01em; line-height: 1.1;
  white-space: nowrap;
}

.main-nav {
  display: inline-flex; align-items: center; gap: 1px;
  background: rgba(0,0,0,.05);
  border-radius: 10px; padding: 3px;
}
.nav-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; padding: 7px 18px; border-radius: 9px;
  font: inherit; font-weight: 500; font-size: .8rem; color: var(--text-secondary);
  cursor: pointer; transition: var(--transition);
}
.nav-btn svg { opacity: .4; transition: var(--transition); width: 14px; height: 14px; }
.nav-btn:hover { color: var(--text); }
.nav-btn:hover svg { opacity: .7; }
.nav-btn.active {
  background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 1px rgba(0,0,0,.04);
}
.nav-btn.active svg { opacity: 1; }

/* ===== ALERT BANNER (school closures from @FCCPS) ===== */
.alert-banner { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.alert-banner-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  animation: alertSlideIn .4s ease;
}
@keyframes alertSlideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.alert-closure { background: #fef2f2; border: 1px solid #fca5a5; }
.alert-delay { background: #fffbeb; border: 1px solid #fcd34d; }
.alert-early-dismissal { background: #eff6ff; border: 1px solid #93c5fd; }
.alert-virtual { background: #f5f3ff; border: 1px solid #c4b5fd; }
.alert-banner-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 1px; }
.alert-banner-content { flex: 1; min-width: 0; }
.alert-banner-label {
  font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  display: block; margin-bottom: 4px;
}
.alert-closure .alert-banner-label { color: #dc2626; }
.alert-delay .alert-banner-label { color: #d97706; }
.alert-early-dismissal .alert-banner-label { color: #2563eb; }
.alert-virtual .alert-banner-label { color: #7c3aed; }
.alert-banner-msg {
  font-size: .85rem; color: #374151; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.alert-banner-source {
  font-size: .72rem; color: #6b7280; text-decoration: none; margin-top: 4px; display: inline-block;
}
.alert-banner-source:hover { text-decoration: underline; }
.alert-banner-dismiss {
  background: none; border: none; font-size: 1.2rem; color: #9ca3af; cursor: pointer;
  padding: 4px 8px; flex-shrink: 0; line-height: 1;
}
.alert-banner-dismiss:hover { color: #374151; }

/* ===== HERO ===== */
.hero {
  position: relative;
  background: linear-gradient(170deg, #f0fdfa 0%, #e0f7f3 30%, #d5f0eb 60%, #c7e8e1 100%);
  padding: 0;
  text-align: center;
  overflow: hidden;
  min-height: 380px;
  display: flex; align-items: center; justify-content: center;
}
.hero-bg {
  position: absolute; inset: 0;
  overflow: hidden;
}
.hero-skyline {
  position: absolute; bottom: 0; left: 0; right: 0;
  width: 100%; height: 120px;
  color: rgba(13,148,136,.08);
}
.hero-content { position: relative; z-index: 1; padding: 48px 0 64px; }
.hero-eyebrow {
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .14em; color: var(--teal); margin-bottom: 10px;
}
.hero-title {
  font-size: clamp(1.8rem, 5.5vw, 3.2rem);
  font-weight: 800; letter-spacing: -.04em; line-height: 1.1;
  white-space: nowrap;
  color: var(--text);
}
.hero-sub {
  margin-top: 14px; font-size: .92rem; color: var(--text-secondary);
  max-width: 360px; margin-inline: auto; line-height: 1.6; font-weight: 400;
}
.hero-actions {
  display: flex; gap: 10px; justify-content: center; margin-top: 28px;
  flex-wrap: wrap;
}
.hero-btn {
  font: inherit; font-size: .84rem; font-weight: 600;
  padding: 11px 22px; border-radius: 12px; cursor: pointer;
  transition: all .2s ease; border: none; letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 7px;
}
.hero-btn svg { flex-shrink: 0; }
.hero-btn-primary {
  background: var(--teal); color: #fff;
  box-shadow: 0 2px 8px rgba(13,148,136,.25);
}
.hero-btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(13,148,136,.3); }
.hero-btn-secondary {
  background: #fff; color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.hero-btn-secondary:hover { background: #fafafa; transform: translateY(-1px); box-shadow: var(--shadow); }

/* ===== THIS WEEK STRIP ===== */
.tw-strip {
  padding: 16px 0 6px;
  background: var(--bg);
}
.tw-strip-header {
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px; margin-bottom: 12px;
}
.tw-strip-title {
  font-size: .88rem; font-weight: 800; color: var(--text); letter-spacing: -.02em;
}
.tw-strip-date {
  font-size: .72rem; color: var(--text-tertiary); font-weight: 500;
}
.tw-strip-hint {
  margin-left: auto; font-size: .68rem; color: var(--text-tertiary);
  display: flex; align-items: center; gap: 4px; font-weight: 500;
  animation: hint-nudge 2s ease-in-out infinite;
}
@keyframes hint-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}
.tw-scroll {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 0 20px 10px 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 20px;
}
.tw-scroll::-webkit-scrollbar { display: none; }
.tw-chip {
  flex: 0 0 calc(50% - 25px); scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 8px;
  background: var(--surface);
  border-radius: 16px;
  padding: 18px 12px 14px;
  border: 1px solid var(--border-light);
  cursor: pointer; position: relative;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.tw-chip:hover { box-shadow: var(--shadow-md); }
.tw-chip:active { transform: scale(.96); }
.tw-chip.tw-active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }
/* Tap hint text */
.tw-chip-tap {
  font-size: .6rem; color: var(--accent); font-weight: 600;
  letter-spacing: .03em; opacity: .7;
  margin-top: 2px;
}
.tw-chip.tw-active .tw-chip-tap { opacity: 0; }
.tw-chip-icon {
  flex-shrink: 0; width: 40px; height: 40px;
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
}
.tw-chip-icon svg { width: 22px; height: 22px; }
.tw-chip-icon-lunch { background: var(--amber-bg); }
.tw-chip-icon-school { background: var(--rose-bg); }
.tw-chip-icon-school-ok { background: var(--teal-bg); }
.tw-chip-icon-weather { background: #e0f2fe; }
.tw-chip-icon-event { background: #ede9fe; }
.tw-chip-icon-deadline { background: var(--amber-bg); }
.tw-chip-icon-deadline-urgent { background: var(--rose-bg); }
.tw-chip-icon-camp { background: var(--teal-bg); }
.tw-chip-body { min-width: 0; width: 100%; }
.tw-chip-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-tertiary);
}
.tw-chip-value {
  font-size: .88rem; font-weight: 700; color: var(--text);
  line-height: 1.3; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tw-chip-sub {
  font-size: .66rem; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tw-chip-urgent { border-color: var(--rose); }
.tw-chip-urgent .tw-chip-value { color: var(--rose); }
.tw-chip.tw-active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }
/* Detail panel */
.tw-detail-panel {
  max-width: 700px; margin: 0 auto;
  overflow: hidden; transition: max-height .3s ease, opacity .3s ease;
  max-height: 0; opacity: 0; padding: 0 20px;
}
.tw-detail-panel.open { max-height: 400px; opacity: 1; padding: 10px 20px 14px; }
.tw-detail-inner {
  background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border-light); padding: 14px 16px;
}
.tw-detail-title {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-tertiary); margin-bottom: 10px;
}
.tw-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px solid var(--border-light);
  font-size: .82rem;
}
.tw-detail-row:last-child { border-bottom: none; }
.tw-detail-header { border-bottom: 2px solid var(--border); padding-bottom: 6px; margin-bottom: 2px; }
.tw-detail-day { font-weight: 600; color: var(--text); min-width: 36px; }
.tw-detail-info { flex: 1; margin-left: 10px; color: var(--text-secondary); }
.tw-detail-temp { font-weight: 700; min-width: 40px; text-align: right; }
.tw-detail-icon { width: 20px; height: 20px; margin-left: 6px; flex-shrink: 0; }

/* Dropdown menus */
.dropdown-wrap { position: relative; display: inline-block; }
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 4px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  min-width: 190px; z-index: 50; padding: 4px 0;
}
.dropdown-menu.open { display: block; }
.dropdown-item {
  display: block; width: 100%; text-align: left;
  padding: 10px 16px; font: inherit; font-size: .82rem; font-weight: 500;
  background: none; border: none; color: var(--text); cursor: pointer;
}
.dropdown-item:hover { background: var(--bg); }

/* Camp card deadline badges */
.badge-deadline-urgent {
  background: var(--rose-bg); color: var(--rose); border: 1px solid var(--rose);
  font-weight: 700; animation: pulse-badge 2s ease-in-out infinite;
}
.badge-deadline-soon {
  background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber);
  font-weight: 600;
}
.badge-deadline-upcoming {
  background: var(--slate-bg); color: var(--slate); border: 1px solid var(--border);
}
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}

/* ===== HOME EVENTS CALENDAR ===== */
.home-events {
  padding: 40px 0 48px;
  background: var(--bg);
}
.home-events-title {
  font-size: 1.4rem; font-weight: 800; color: var(--text);
  text-align: center; margin-bottom: 4px; letter-spacing: -.03em;
}
.home-events-sub {
  text-align: center; color: var(--text-tertiary);
  font-size: .88rem; margin-bottom: 20px;
}
.home-events-filters {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 24px;
}
.home-events-chip {
  font: inherit; font-size: .75rem; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
  background: var(--bg); color: var(--text-secondary);
  border: 1px solid var(--border); transition: all .2s ease;
}
.home-events-chip:hover { background: #f0f0f0; color: var(--text); }
.home-events-chip.active {
  background: var(--teal); color: #fff;
  border-color: var(--teal);
}
.home-events-list {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 520px; margin-inline: auto;
}
.home-event-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px; border-radius: 14px;
  background: #fff; cursor: pointer;
  border: 1px solid var(--border);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.home-event-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.home-event-expanded { border-color: var(--teal); box-shadow: 0 2px 12px rgba(13,148,136,.08); }
.home-event-date {
  flex-shrink: 0; text-align: center; min-width: 44px;
}
.home-event-month {
  font-size: .6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--teal); line-height: 1;
}
.home-event-day {
  font-size: 1.3rem; font-weight: 800; color: var(--text); line-height: 1.2;
}
.home-event-dow {
  font-size: .58rem; font-weight: 600; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: .04em; margin-top: 1px;
}
.home-event-info { flex: 1; min-width: 0; }
.home-event-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
}
.home-event-name {
  font-size: .88rem; font-weight: 600; color: var(--text);
  margin-bottom: 2px; line-height: 1.3; flex: 1;
}
.home-event-chevron {
  flex-shrink: 0; color: var(--text-tertiary); margin-top: 2px;
  transition: transform .2s ease;
}
.home-event-expanded .home-event-chevron { transform: rotate(180deg); color: var(--teal); }
.home-event-desc {
  font-size: .76rem; color: var(--text-tertiary);
  line-height: 1.4;
}
.home-event-badge {
  display: inline-block; font-size: .6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 7px; border-radius: 4px; margin-top: 4px;
}
.home-event-badge-festival { background: rgba(244,63,94,.08); color: var(--rose); }
.home-event-badge-music { background: rgba(139,92,246,.08); color: #8b5cf6; }
.home-event-badge-market { background: rgba(34,197,94,.08); color: #16a34a; }
.home-event-badge-holiday { background: rgba(217,119,6,.08); color: var(--amber); }
.home-event-badge-family { background: rgba(13,148,136,.08); color: var(--teal); }
.home-event-badge-arts { background: rgba(236,72,153,.08); color: #ec4899; }

/* Expandable details */
.home-event-details {
  display: none; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border-light);
}
.home-event-expanded .home-event-details { display: block; }
.he-detail-row {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--text-secondary);
  margin-bottom: 5px; line-height: 1.3;
}
.he-detail-row svg { flex-shrink: 0; color: var(--teal); }
.he-detail-text {
  font-size: .76rem; color: var(--text-tertiary);
  line-height: 1.5; margin-top: 8px;
}

/* Hide events when a tab is active */
.home-events-hidden { display: none; }

/* ===== CITY MAP ===== */
/* Hero collapse when navigating to a tab */
.hero-collapsed {
  display: none;
}

/* ===== TABS ===== */
.tab-content { display: none; padding: 32px 0 56px; scroll-margin-top: 72px; }
.tab-content.active { display: block; }
.section-header { text-align: center; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border-light); }
.section-header h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.section-sub { color: var(--text-secondary); margin-top: 4px; font-size: .86rem; font-weight: 400; }

/* ===== FILTER CHIPS ===== */
.filter-bar { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.filter-chip {
  background: transparent; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 16px; font: inherit; font-size: .78rem; font-weight: 500;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.filter-chip:hover { background: var(--bg); color: var(--text); border-color: var(--text-tertiary); }
.filter-chip.active { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ===== SCHOOL CALENDAR CARDS ===== */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.cal-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  transition: var(--transition); box-shadow: var(--shadow-sm);
}
.cal-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.cal-date-badge {
  flex-shrink: 0; width: 44px; height: 48px;
  border-radius: var(--radius-xs);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; line-height: 1;
}
.cal-date-badge .month { font-size: .58rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.cal-date-badge .day { font-size: 1.15rem; }

.cal-card[data-cat="start-end"] .cal-date-badge { background: var(--teal-bg); color: var(--teal); }
.cal-card[data-cat="holiday"] .cal-date-badge { background: var(--rose-bg); color: var(--rose); }
.cal-card[data-cat="early-release"] .cal-date-badge { background: var(--amber-bg); color: var(--amber); }
.cal-card[data-cat="teacher"] .cal-date-badge { background: var(--slate-bg); color: var(--slate); }

.cal-info { flex: 1; min-width: 0; }
.cal-title { font-weight: 600; font-size: .88rem; }
.cal-detail { font-size: .78rem; color: var(--text-secondary); margin-top: 2px; }
.cal-tag {
  display: inline-block; margin-top: 5px; font-size: .64rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px;
}
.cal-card[data-cat="start-end"] .cal-tag { background: var(--teal-bg); color: var(--teal); }
.cal-card[data-cat="holiday"] .cal-tag { background: var(--rose-bg); color: var(--rose); }
.cal-card[data-cat="early-release"] .cal-tag { background: var(--amber-bg); color: var(--amber); }
.cal-card[data-cat="teacher"] .cal-tag { background: var(--slate-bg); color: var(--slate); }

.calendar-legend { display: flex; gap: 16px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: .75rem; color: var(--text-secondary); }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-teal { background: var(--teal); }
.dot-rose { background: var(--rose); }
.dot-amber { background: var(--amber); }
.dot-slate { background: var(--slate); }

/* ===== SCHOOL YEAR MONTH GRID ===== */
.sy-section { margin-top: 48px; }
.sy-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; flex-wrap: wrap; gap: 12px;
}
.sy-section-title {
  font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em;
  margin-bottom: 2px;
}
.sy-section-sub {
  font-size: .85rem; color: var(--text-tertiary);
}
.sy-legend {
  display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.sy-legend-item {
  display: flex; align-items: center; gap: 5px;
  font-size: .72rem; color: var(--text-secondary); font-weight: 500;
}
.sy-legend-dot {
  width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0;
}
.sy-dot-teal { background: var(--teal); }
.sy-dot-rose { background: var(--rose); }
.sy-dot-amber { background: var(--amber); }
.sy-dot-slate { background: var(--slate); }
.sy-dot-amber-light { background: #fff7ed; border: 1px solid var(--amber); }
.sy-dot-out { background: #e0e0e0; }

.sy-months {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.sy-month {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.sy-month-title {
  font-size: .82rem; font-weight: 700; padding: 8px 12px;
  background: var(--teal); color: #fff; text-align: center;
}
.sy-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
}
.sy-dow {
  font-size: .56rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; text-align: center; padding: 5px 1px;
  color: var(--text-tertiary); background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}
.sy-cell {
  aspect-ratio: 1; padding: 3px; display: flex; flex-direction: column;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  font-size: .72rem; position: relative;
  min-height: 0;
}
.sy-cell:nth-child(7n + 7) { border-right: none; }
.sy-cell-pad { background: var(--bg); opacity: .4; }
.sy-cell-weekend { background: #fafafa; }
.sy-cell-weekend .sy-day-num { color: var(--text-tertiary); }

.sy-day-num { font-weight: 700; font-size: .7rem; display: block; line-height: 1; }

.sy-cell-start-end { background: var(--teal-bg); border-color: rgba(13,148,136,.2); }
.sy-cell-holiday { background: var(--rose-bg); border-color: rgba(225,29,72,.15); }
.sy-cell-early-release { background: var(--amber-bg); border-color: rgba(217,119,6,.15); }
.sy-cell-teacher { background: var(--slate-bg); border-color: rgba(71,85,105,.12); }
.sy-cell-out { background: #f0f0f0; }
.sy-cell-out .sy-day-num { color: #bbb; }
.sy-cell-er-wed { background: #fff7ed; border-color: rgba(217,119,6,.12); }

.sy-label {
  font-size: .48rem; line-height: 1.2; display: block; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.sy-cell-start-end .sy-label { color: var(--teal); font-weight: 700; }
.sy-cell-holiday .sy-label { color: var(--rose); font-weight: 700; }
.sy-cell-early-release .sy-label { color: var(--amber); font-weight: 600; }
.sy-cell-teacher .sy-label { color: var(--slate); font-weight: 600; }
.sy-cell-er-wed .sy-label { color: var(--amber); font-weight: 600; }
.sy-cell-er-wed .sy-day-num { color: var(--amber); }

/* Semester divider row (injected by JS) */
.sy-semester-divider {
  grid-column: 1 / -1;
  text-align: center; padding: 10px 0 4px;
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-tertiary);
}

@media (max-width: 900px) {
  .sy-months { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .sy-months { grid-template-columns: 1fr; }
  .sy-header { flex-direction: column; align-items: flex-start; }
}

/* ===== PRINT STYLES ===== */
@media print {
  /* Hide everything except the calendar */
  .tab-nav, .hero, .site-footer, .install-banner, .toast,
  .section-header, .calendar-grid, .calendar-legend,
  .filter-bar, #tab-camps, #tab-planner,
  .export-bar, .sy-header .btn,
  .camp-controls { display: none !important; }

  body { background: #fff; min-height: auto; }
  main { padding: 0; }
  .container { max-width: 100%; padding: 0; }
  .tab-content { display: none !important; padding: 0; }
  #tab-school { display: block !important; padding: 0; }

  .sy-section { margin-top: 0; }
  .sy-section-title { font-size: 16pt; text-align: center; margin-bottom: 2px; }
  .sy-section-sub { text-align: center; margin-bottom: 8px; }
  .sy-header { justify-content: center; }

  .sy-legend { justify-content: center; margin-bottom: 10px; }
  .sy-legend-item { font-size: 7pt; }
  .sy-legend-dot { width: 8px; height: 8px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }

  .sy-months {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .sy-month {
    border: 1px solid #ccc;
    border-radius: 4px;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .sy-month-title {
    font-size: 9pt; padding: 4px 8px;
    background: #111 !important; color: #fff !important;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  .sy-dow { font-size: 5pt; padding: 3px 1px; }
  .sy-cell { padding: 2px; }
  .sy-day-num { font-size: 7pt; }
  .sy-label { font-size: 4.5pt; }

  .sy-cell-start-end,
  .sy-cell-holiday,
  .sy-cell-early-release,
  .sy-cell-teacher,
  .sy-cell-weekend,
  .sy-cell-er-wed, .sy-cell-out,
  .sy-dot-teal, .sy-dot-rose, .sy-dot-amber, .sy-dot-slate,
  .sy-dot-amber-light, .sy-dot-out {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  @page {
    size: landscape;
    margin: 0.4in;
  }
}

/* ===== CAMP CONTROLS ===== */
.camp-controls {
  display: flex; gap: 16px; justify-content: center; align-items: end;
  margin-top: 20px; flex-wrap: wrap;
}
.control-group { display: flex; flex-direction: column; gap: 4px; }
.control-group > label:first-child {
  font-size: .68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-tertiary);
}
.control-group select {
  font: inherit; font-size: .82rem; padding: 7px 28px 7px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface); cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.control-group select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* Toggle */
.toggle { position: relative; width: 40px; height: 22px; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--border); cursor: pointer; transition: var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.toggle input:checked + .toggle-slider { background: var(--teal); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ===== CAMP WEEK SECTIONS ===== */
.camp-week-section { margin-bottom: 28px; }
.camp-week-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 2px solid var(--teal-bg);
}
.camp-week-label {
  background: var(--teal); color: #fff; font-weight: 700; font-size: .7rem;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.camp-week-dates { font-size: .82rem; color: var(--text-secondary); font-weight: 500; }

.camp-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px;
}
.camp-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  box-shadow: var(--shadow-sm); transition: var(--transition);
  display: flex; flex-direction: column; gap: 8px;
}
.camp-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.camp-card.no-results {
  grid-column: 1 / -1; text-align: center; color: var(--text-tertiary); padding: 36px;
}
.camp-provider {
  font-size: .66rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--accent); margin-bottom: 2px;
}
.camp-name { font-weight: 700; font-size: .95rem; }
.camp-desc { font-size: .8rem; color: var(--text-secondary); line-height: 1.5; }
.camp-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.camp-badge {
  font-size: .66rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; padding: 2px 8px; border-radius: 999px;
}
.badge-age { background: #eff6ff; color: #2563eb; }
.badge-aftercare { background: var(--teal-bg); color: var(--teal); }
.badge-no-aftercare { background: var(--rose-bg); color: var(--rose); }
.badge-price { background: #f9fafb; color: var(--text-secondary); }

/* Camp card expand/collapse */
.camp-card-summary { cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.camp-expand-icon {
  display: inline-block; vertical-align: middle; margin-left: 4px;
  transition: transform .25s ease; opacity: .35;
}
.camp-card-expanded .camp-expand-icon { transform: rotate(180deg); opacity: .6; }
.camp-card-summary:hover .camp-expand-icon { opacity: .6; }

.camp-detail {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .3s ease, opacity .25s ease, padding .25s ease;
  padding: 0;
}
.camp-detail.camp-detail-open {
  max-height: 200px; opacity: 1;
  padding: 10px 0 4px;
  border-top: 1px solid var(--border-light);
  margin-top: 8px;
}
.camp-detail-row {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: .8rem; color: var(--text-secondary); line-height: 1.5;
  padding: 3px 0;
}
.camp-detail-row svg { flex-shrink: 0; color: var(--accent); margin-top: 2px; }
.camp-detail-row strong { color: var(--text); font-weight: 600; }

.camp-actions { margin-top: auto; display: flex; gap: 6px; }
.camp-enroll-btn, .camp-add-btn {
  flex: 1; padding: 9px 0; border: none; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: .78rem;
  cursor: pointer; transition: all .2s ease; text-align: center;
  text-decoration: none; display: block; letter-spacing: -.01em;
}
.camp-enroll-btn {
  background: var(--teal); color: #fff;
}
.camp-enroll-btn:hover { background: var(--accent-hover); transform: scale(1.02); }
.camp-add-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.camp-add-btn:hover { background: var(--bg); border-color: var(--text-tertiary); }
.camp-add-btn.added { background: var(--teal-bg); color: var(--teal); border-color: var(--teal); }

/* Kid picker popup */
.kid-picker-popup {
  position: absolute; bottom: 100%; right: 0; z-index: 50;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  min-width: 180px; padding: 6px;
  animation: fadeUp .15s ease both;
  margin-bottom: 6px;
}
.kid-picker-title {
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-tertiary);
  padding: 4px 8px 6px; border-bottom: 1px solid var(--border-light);
  margin-bottom: 4px;
}
.kid-picker-option {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 8px 10px; border: none; background: none;
  font: inherit; font-size: .82rem; font-weight: 500; color: var(--text);
  border-radius: var(--radius-xs); cursor: pointer;
  transition: var(--transition); text-align: left;
}
.kid-picker-option:hover { background: var(--teal-bg); }
.kid-picker-option:disabled { cursor: default; opacity: .7; }
.kid-picker-option:disabled:hover { background: none; }
.kid-picker-age { font-size: .72rem; color: var(--text-tertiary); }
.kid-picker-check {
  font-size: .68rem; font-weight: 600; color: var(--teal);
  text-transform: uppercase; letter-spacing: .04em;
}

/* ===== PLANNER TAB ===== */

/* Add child form */
.add-child-form {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 20px;
  margin-bottom: 24px;
}
.form-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.form-row:last-child { margin-bottom: 0; }
.form-actions { justify-content: flex-end; }
.input {
  font: inherit; font-size: .85rem; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface); color: var(--text);
  transition: var(--transition); flex: 1; min-width: 0;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
.input-sm { flex: 0 0 70px; }
.birthday-field { display: flex; flex-direction: column; gap: 2px; flex: 0 0 auto; }
.birthday-field .input-sm { flex: unset; width: auto; min-width: 140px; }
.birthday-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; }
.input-md { flex: 0 0 130px; }
.input-full { flex: 1 1 100%; }
.input::placeholder { color: var(--text-tertiary); }

/* Form helper / value prop */
.form-helper {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--teal-bg); border-radius: var(--radius-xs);
  padding: 10px 14px; margin-bottom: 10px;
  font-size: .78rem; color: var(--text-secondary); line-height: 1.55;
}
.form-helper svg { flex-shrink: 0; color: var(--teal); margin-top: 1px; }
.form-helper strong { color: var(--text); font-weight: 600; }

/* Buttons — Apple-style high contrast */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: .82rem; font-weight: 600;
  padding: 9px 18px; border-radius: 999px;
  cursor: pointer; transition: all .2s ease; border: none;
  letter-spacing: -.01em;
}
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 1px 4px rgba(13,148,136,.2); }
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); }
.btn-outline {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.btn-outline:hover { background: var(--bg); border-color: var(--text-tertiary); transform: scale(1.02); }
.btn-gcal { border-color: #4285f4; color: #4285f4; }
.btn-gcal:hover { background: rgba(66,133,244,.08); border-color: #3367d6; color: #3367d6; }
.btn-gcal-primary { background: #4285f4; color: #fff; border: none; }
.btn-gcal-primary:hover { background: #3367d6; transform: scale(1.02); }
.btn-sm { padding: 7px 14px; font-size: .78rem; }
.btn-danger { background: none; border: none; color: var(--rose); font-size: .75rem; padding: 4px 8px; }
.btn-danger:hover { background: var(--rose-bg); }

/* Kid tabs */
.kid-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; justify-content: center; }
.kid-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 500;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary);
  cursor: pointer; transition: var(--transition);
}
.kid-tab:hover { border-color: var(--accent); }
.kid-tab.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.kid-tab-add {
  border-style: dashed; color: var(--teal); border-color: var(--teal);
  background: var(--teal-bg);
}
.kid-tab-add:hover { background: rgba(13,148,136,.1); }
.kid-tab .kid-age { font-size: .68rem; opacity: .7; }
.kid-tab .remove-kid {
  width: 16px; height: 16px; border-radius: 50%; border: none; background: rgba(255,255,255,.25);
  color: inherit; font-size: .7rem; cursor: pointer; display: grid; place-items: center;
  line-height: 1; transition: var(--transition);
}
.kid-tab .remove-kid:hover { background: rgba(255,255,255,.5); }
.kid-tab:not(.active) .remove-kid { background: rgba(0,0,0,.06); }
.kid-tab:not(.active) .remove-kid:hover { background: var(--rose-bg); color: var(--rose); }
.kid-progress {
  font-size: .62rem; font-weight: 700; background: rgba(255,255,255,.2);
  padding: 1px 6px; border-radius: 999px; margin-left: 2px;
}
.kid-tab:not(.active) .kid-progress { background: var(--teal-bg); color: var(--teal); }

/* Planner subtabs */
.planner-subtabs {
  display: flex; gap: 4px; justify-content: center; margin-bottom: 20px;
}
.planner-subtab {
  background: transparent; border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 16px; font: inherit; font-size: .78rem; font-weight: 500;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.planner-subtab:hover { border-color: var(--text-tertiary); color: var(--text); }
.planner-subtab.active { background: var(--teal); color: #fff; border-color: var(--teal); }

/* Planner grid */
.planner-grid { display: flex; flex-direction: column; gap: 12px; }
.planner-week {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.planner-week-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--border-light);
}
.planner-week-title { font-size: .82rem; font-weight: 600; }
.planner-week-dates { font-size: .75rem; color: var(--text-tertiary); flex: 1; text-align: right; margin-right: 8px; }
.planner-week-body { padding: 12px 16px; }

/* Change button in week header */
.btn-change {
  background: none; border: 1px solid var(--border); border-radius: var(--radius-xs);
  font: inherit; font-size: .72rem; font-weight: 600; color: var(--accent);
  padding: 3px 10px; cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.btn-change:hover { background: var(--teal-bg); border-color: var(--accent); }

/* Selected camp (collapsed view) */
.planner-selected {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 4px 0;
}
.planner-selected-info { flex: 1; min-width: 0; }
.planner-selected-provider { font-size: .64rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); display: block; margin-bottom: 1px; }
.planner-selected-name { font-weight: 600; font-size: .88rem; display: block; margin-bottom: 4px; }
.planner-selected-meta { display: flex; flex-wrap: wrap; gap: 5px; }

.planner-camp-remove {
  background: none; border: 1px solid var(--border); cursor: pointer;
  color: var(--text-tertiary); font-size: .72rem; font-weight: 500; padding: 3px 10px;
  border-radius: var(--radius-xs); transition: var(--transition); white-space: nowrap;
}
.planner-camp-remove:hover { background: var(--rose-bg); color: var(--rose); border-color: var(--rose); }

/* Picker grid (expanded: all camps for the week) */
.picker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px;
}
.picker-card {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); padding: 12px 14px;
  cursor: pointer; transition: var(--transition); text-align: left;
  font: inherit; color: var(--text);
}
.picker-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.picker-card.picked { border-color: var(--accent); background: var(--teal-bg); }
.picker-provider { font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.picker-name { font-weight: 700; font-size: .88rem; }
.picker-desc { font-size: .75rem; color: var(--text-secondary); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.picker-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.picker-action {
  font-size: .7rem; font-weight: 600; color: var(--accent); margin-top: 4px;
  text-transform: uppercase; letter-spacing: .04em;
}
.picker-card.picked .picker-action { color: var(--rose); }

/* Picker expand/collapse */
.picker-card-top { cursor: pointer; display: flex; flex-direction: column; gap: 5px; }
.picker-expand-icon {
  display: inline-block; vertical-align: middle; margin-left: 3px;
  transition: transform .25s ease; opacity: .3;
}
.picker-card-expanded .picker-expand-icon { transform: rotate(180deg); opacity: .6; }
.picker-card-top:hover .picker-expand-icon { opacity: .6; }

.picker-detail {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .3s ease, opacity .25s ease, padding .25s ease;
  padding: 0;
}
.picker-detail.picker-detail-open {
  max-height: 120px; opacity: 1;
  padding: 8px 0 2px;
  border-top: 1px solid var(--border-light);
  margin-top: 6px;
}

.picker-select-btn {
  background: none; border: none; cursor: pointer;
  font: inherit; font-size: .7rem; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: .04em;
  margin-top: 4px; padding: 4px 0; text-align: left;
  transition: var(--transition);
}
.picker-select-btn:hover { opacity: .8; }
.picker-select-btn-picked { color: var(--rose); }

/* Skip week states */
.planner-skipped .planner-selected-name.planner-skip-label {
  color: var(--text-tertiary); font-weight: 500; font-style: italic;
}
.picker-card.picker-skip {
  border-style: dashed; background: var(--bg); align-items: center; text-align: center;
}
.picker-card.picker-skip:hover { border-color: var(--text-tertiary); background: var(--slate-bg); }
.picker-card.picker-skip.picked { border-color: var(--slate); background: var(--slate-bg); border-style: solid; }
.picker-skip-icon { color: var(--text-tertiary); margin-bottom: 2px; }
.picker-card.picker-skip .picker-name { color: var(--text-secondary); }
.picker-card.picker-skip .picker-action { color: var(--text-tertiary); }
.picker-card.picker-skip.picked .picker-action { color: var(--slate); }

.planner-empty {
  text-align: center; padding: 12px; font-size: .8rem; color: var(--text-tertiary);
}
.planner-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; margin-top: 8px; border-top: 2px solid var(--border);
  font-weight: 700; font-size: .95rem;
}

.btn-share {
  display: flex; align-items: center; gap: 6px; margin: 10px auto 0;
  font-size: .82rem; padding: 8px 18px;
}
.btn-share svg { flex-shrink: 0; }

/* Shared schedule viewer */
.shared-schedule-overlay {
  position: fixed; inset: 0; z-index: 2500;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: fadeIn .25s ease;
}
.shared-schedule-card {
  background: var(--surface); border-radius: 20px; padding: 28px 24px 20px;
  max-width: 420px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.25); position: relative;
}
.shared-schedule-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 1.5rem; color: var(--text-tertiary);
  cursor: pointer; line-height: 1; padding: 4px;
}
.shared-schedule-close:hover { color: var(--text); }
.shared-schedule-header { text-align: center; margin-bottom: 20px; }
.shared-schedule-icon { font-size: 2.2rem; margin-bottom: 4px; }
.shared-schedule-title {
  font-size: 1.15rem; font-weight: 800; color: var(--text);
  margin: 0 0 4px;
}
.shared-schedule-age {
  font-size: .78rem; color: var(--text-secondary);
  background: var(--bg); padding: 2px 10px; border-radius: 10px;
}
.shared-schedule-weeks {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px;
}
.shared-week {
  display: grid; grid-template-columns: 68px 1fr; grid-template-rows: auto auto;
  gap: 0 10px; padding: 10px 12px;
  background: var(--teal-bg); border-radius: 10px; border-left: 3px solid var(--teal);
}
.shared-week-empty { background: var(--bg); border-left-color: var(--border); opacity: .5; }
.shared-week-skip { background: #fefce8; border-left-color: #eab308; }
.shared-week-label {
  font-size: .72rem; font-weight: 700; color: var(--teal);
  text-transform: uppercase; letter-spacing: .03em;
}
.shared-week-empty .shared-week-label { color: var(--text-tertiary); }
.shared-week-skip .shared-week-label { color: #a16207; }
.shared-week-dates {
  grid-column: 1; font-size: .68rem; color: var(--text-tertiary);
}
.shared-week-camp {
  grid-column: 2; grid-row: 1;
  font-size: .88rem; font-weight: 600; color: var(--text);
}
.shared-week-provider {
  grid-column: 2; grid-row: 2;
  font-size: .72rem; color: var(--text-secondary);
}
.shared-schedule-footer { text-align: center; }
.shared-schedule-stats {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--bg); border-radius: 10px;
  font-size: .8rem; color: var(--text-secondary); margin-bottom: 14px;
}
.shared-schedule-total { font-weight: 700; color: var(--teal); }
.shared-schedule-cta {
  margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--border);
}
.shared-schedule-cta p {
  font-size: .88rem; font-weight: 600; color: var(--text);
  margin-bottom: 10px;
}
.shared-schedule-cta .btn { width: 100%; justify-content: center; font-size: .9rem; }
.shared-open-in-app {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--teal-bg); border-radius: 10px;
  margin-bottom: 12px; text-align: left;
}
.shared-open-in-app strong {
  display: block; font-size: .85rem; color: var(--text); margin-bottom: 2px;
}
.shared-open-in-app span {
  font-size: .74rem; color: var(--text-secondary); line-height: 1.3;
}
.shared-schedule-brand {
  text-align: center; font-size: .68rem; color: var(--text-tertiary);
  margin-top: 14px; letter-spacing: .04em;
}

/* Week confirmed flash */
.planner-week-confirmed {
  animation: weekConfirm .6s ease;
}
@keyframes weekConfirm {
  0% { box-shadow: 0 0 0 0 rgba(13,148,136,.4); }
  40% { box-shadow: 0 0 0 6px rgba(13,148,136,.15); border-color: var(--accent); }
  100% { box-shadow: 0 0 0 0 rgba(13,148,136,0); }
}

/* Schedule complete CTA */
.schedule-complete {
  text-align: center; padding: 32px 20px; margin-top: 16px;
  background: var(--teal-bg); border: 1px solid var(--accent);
  border-radius: var(--radius); animation: fadeUp .35s ease both;
}
.schedule-complete-icon { color: var(--accent); margin-bottom: 8px; }
.schedule-complete-title {
  font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em;
  margin-bottom: 6px;
}
.schedule-complete-sub {
  font-size: .85rem; color: var(--text-secondary); line-height: 1.5;
  max-width: 380px; margin: 0 auto 16px;
}
.schedule-complete-actions {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}

/* Export bar */
.export-bar {
  display: flex; gap: 8px; justify-content: center; margin-top: 24px; flex-wrap: wrap;
}

/* Empty state */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-tertiary); }
.empty-state svg { margin-bottom: 12px; opacity: .35; }
.empty-state p { font-size: .88rem; line-height: 1.6; }

/* Planner empty state */
.planner-empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--text-tertiary);
}
.planner-empty-state p { font-size: .88rem; line-height: 1.6; }
.planner-empty-state .hint { font-size: .78rem; margin-top: 8px; }

/* ===== CALENDAR VIEW ===== */
.cal-view-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
  padding: 0 16px;
}
.cal-view-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; }

.cal-view-legend {
  display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
  padding: 0 16px;
}
.cal-view-legend-item {
  display: flex; align-items: center; gap: 5px;
  font-size: .72rem; color: var(--text-secondary);
}
.cal-view-dot {
  width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0;
}
.cal-view-dot-camp { background: var(--teal); }
.cal-view-dot-skip { background: var(--slate); }
.cal-view-dot-school { background: #2563eb; }

/* Key dates callout */
.cal-view-key-dates {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  margin: 0 16px 20px;
}
.cal-view-key-dates-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-tertiary); margin-bottom: 10px;
}
.cal-view-key-date {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border-light);
}
.cal-view-key-date:last-child { border-bottom: none; }
.cal-view-key-date-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.cal-view-key-date-info { display: flex; flex-direction: column; gap: 1px; }
.cal-view-key-date-info strong { font-size: .85rem; font-weight: 600; }
.cal-view-key-date-info span { font-size: .78rem; color: var(--text-secondary); }
.cal-view-dot-holiday { background: var(--rose); }

.cal-view-months {
  display: flex; flex-direction: column; gap: 20px;
  padding: 0 16px;
}
.cal-view-month {
  width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  box-sizing: border-box;
}
.cal-view-month-title {
  font-size: .88rem; font-weight: 700; padding: 10px 14px;
  background: var(--bg); border-bottom: 1px solid var(--border-light);
}
.cal-view-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
}
.cal-view-dow {
  font-size: .62rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; text-align: center; padding: 6px 2px;
  color: var(--text-tertiary); background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}
.cal-view-cell {
  min-height: 64px; padding: 4px 5px;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  font-size: .75rem; position: relative;
  transition: background .15s ease;
}
.cal-view-cell:nth-child(7n) { border-right: none; }
.cal-view-cell-empty { background: var(--bg); min-height: 0; }
.cal-view-cell-weekend { background: var(--bg); }
.cal-view-cell-weekend .cal-view-day-num { color: var(--text-tertiary); }

.cal-view-day-num {
  font-weight: 600; font-size: .72rem; display: block; margin-bottom: 2px;
}

.cal-view-cell-camp { background: var(--teal-bg); }
.cal-view-cell-skip { background: var(--slate-bg); }
.cal-view-cell-school { background: #eff6ff; }
.cal-view-cell-holiday { background: var(--rose-bg); }

.cal-view-cell-label {
  font-size: .6rem; line-height: 1.3; display: block;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.cal-view-label-camp { color: var(--teal); font-weight: 600; }
.cal-view-label-skip { color: var(--slate); font-style: italic; }
.cal-view-label-school { color: #2563eb; }
.cal-view-label-holiday { color: var(--rose); font-weight: 600; }

/* ===== CART ===== */
.cart-progress { text-align: center; margin-bottom: 20px; }
.cart-progress-text { font-size: .82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.cart-progress-bar {
  height: 6px; background: var(--border); border-radius: 999px; overflow: hidden;
  max-width: 320px; margin: 0 auto;
}
.cart-progress-fill {
  height: 100%; background: var(--accent); border-radius: 999px;
  transition: width .4s ease;
}

.cart-group {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden;
  border-left: 3px solid var(--border);
  transition: var(--transition);
}
.cart-group.in-progress { border-left-color: var(--amber); }
.cart-group.done { border-left-color: var(--accent); }

.cart-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--border-light);
}
.cart-group-info { display: flex; flex-direction: column; gap: 2px; }
.cart-group-provider { font-weight: 700; font-size: .88rem; }
.cart-group-count { font-size: .72rem; color: var(--text-tertiary); }
.cart-group-subtotal { font-weight: 700; font-size: .92rem; }

.cart-items { padding: 8px 16px; }
.cart-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border-light);
}
.cart-item:last-child { border-bottom: none; }

.cart-item-check { display: flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.cart-item-check input { display: none; }
.cart-check-box {
  width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 6px;
  display: grid; place-items: center; transition: var(--transition);
}
.cart-item-check input:checked + .cart-check-box {
  background: var(--accent); border-color: var(--accent);
}
.cart-item-check input:checked + .cart-check-box::after {
  content: ''; width: 6px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg); margin-top: -2px;
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: .85rem; display: block; }
.cart-item-name.cart-done { text-decoration: line-through; color: var(--text-tertiary); }
.cart-item-week { font-size: .72rem; color: var(--text-tertiary); }
.cart-item-price { font-size: .82rem; font-weight: 600; color: var(--text-secondary); flex-shrink: 0; }

.cart-group-actions { padding: 10px 16px; border-top: 1px solid var(--border-light); }
.cart-enrolled-badge {
  font-size: .72rem; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .04em;
}

.cart-note {
  text-align: center; font-size: .75rem; color: var(--text-tertiary);
  margin-top: 12px; font-style: italic;
}

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--teal); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: .82rem; font-weight: 500; box-shadow: var(--shadow-lg);
  transition: transform .3s ease, opacity .3s ease; opacity: 0; z-index: 200;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ===== PWA INSTALL BANNER ===== */
.install-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  padding: 0 16px env(safe-area-inset-bottom, 12px);
  transform: translateY(100%); opacity: 0;
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .3s ease;
}
.install-banner.show { transform: translateY(0); opacity: 1; }
.install-banner-content {
  max-width: 600px; margin: 0 auto 12px;
  display: flex; align-items: center; gap: 12px;
  background: #1e293b; color: #fff;
  padding: 14px 16px; border-radius: var(--radius);
  box-shadow: 0 -4px 24px rgba(0,0,0,.18);
}
.install-banner-icon { flex-shrink: 0; }
.install-banner-text {
  flex: 1; min-width: 0;
}
.install-banner-text strong {
  display: block; font-size: .88rem; font-weight: 700; margin-bottom: 2px;
}
.install-banner-text span {
  font-size: .78rem; opacity: .7; line-height: 1.4;
}
.install-banner-btn {
  flex-shrink: 0; background: #fff; color: #000;
  border: none; border-radius: 999px;
  padding: 8px 18px; font: inherit; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .2s ease;
}
.install-banner-btn:hover { background: #f0f0f0; transform: scale(1.03); }
.install-banner-close {
  flex-shrink: 0; background: none; border: none; color: rgba(255,255,255,.5);
  font-size: 1.3rem; cursor: pointer; padding: 0 4px; line-height: 1;
  transition: color .15s ease;
}
.install-banner-close:hover { color: #fff; }

/* ===== iOS INSTALL OVERLAY ===== */
.ios-install-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .3s ease;
}
.ios-install-overlay.show { opacity: 1; }
.ios-install-card {
  background: #fff; border-radius: 20px 20px 0 0;
  padding: 32px 24px calc(24px + env(safe-area-inset-bottom, 12px));
  max-width: 420px; width: 100%; text-align: center;
  transform: translateY(100%); transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.ios-install-overlay.show .ios-install-card { transform: translateY(0); }
.ios-install-header { margin-bottom: 24px; }
.ios-install-header img { margin-bottom: 12px; }
.ios-install-title { font-size: 1.2rem; font-weight: 800; margin: 0 0 6px; }
.ios-install-sub { font-size: .85rem; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.ios-install-steps {
  display: flex; flex-direction: column; gap: 16px;
  text-align: left; margin-bottom: 20px;
}
.ios-install-step {
  display: flex; align-items: center; gap: 14px;
}
.ios-install-step-num {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: 800; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
}
.ios-install-step-text {
  font-size: .88rem; line-height: 1.4; color: var(--text);
}
.ios-install-step-text strong { font-weight: 700; }
.ios-share-icon {
  display: inline-block; vertical-align: -5px; margin: 0 2px;
  color: #007AFF;
}
.ios-install-arrow {
  color: var(--text-secondary); margin-bottom: 12px;
  animation: ios-bounce 1.5s ease-in-out infinite;
}
@keyframes ios-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
.ios-install-dismiss {
  background: none; border: none; color: var(--text-secondary);
  font-size: .88rem; font-weight: 600; cursor: pointer; padding: 8px 16px;
  font-family: inherit;
}
.ios-install-dismiss:hover { color: var(--text); }

/* ===== FULL-SCREEN CALENDAR OVERLAY ===== */
.cal-overlay {
  display: none;
}
.cal-overlay.open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  height: 100dvh; /* dynamic viewport height for iOS */
  z-index: 99999;
  background: var(--bg);
  overflow: hidden;
}

.cal-overlay-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
  background: var(--teal);
  color: #fff;
  flex-shrink: 0;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}
.cal-overlay-title-group { flex: 1; min-width: 0; }
.cal-overlay-title {
  font-size: 1.2rem; font-weight: 800; letter-spacing: -.03em;
  margin: 0;
}
.cal-overlay-sub {
  font-size: .78rem; color: rgba(255,255,255,.5); margin-top: 2px;
}
.cal-overlay-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.cal-overlay-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: 999px; padding: 7px 16px;
  font: inherit; font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .2s ease;
}
.cal-overlay-btn:hover { background: rgba(255,255,255,.2); }
.cal-overlay-close {
  background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.4);
  color: #fff; width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.6rem; font-weight: 700; cursor: pointer; display: grid; place-items: center;
  transition: all .2s ease; line-height: 1;
}
.cal-overlay-close:hover { background: rgba(255,255,255,.3); border-color: rgba(255,255,255,.6); }

/* Floating back button for full-screen overlays */
.overlay-fab-close {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 100000;
  display: flex; align-items: center; gap: 6px;
  background: var(--text); color: #fff;
  border: none; border-radius: 999px;
  padding: 12px 24px 12px 18px;
  font: inherit; font-size: .85rem; font-weight: 700;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.overlay-fab-close:hover { transform: translateX(-50%) scale(1.04); box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.overlay-fab-close:active { transform: translateX(-50%) scale(.96); }
.overlay-fab-close svg { flex-shrink: 0; }

.cal-overlay-legend {
  display: flex; gap: 14px; padding: 10px 20px;
  background: #0a0a0a;
  flex-shrink: 0; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cal-ol-legend-item {
  display: flex; align-items: center; gap: 5px;
  font-size: .7rem; color: rgba(255,255,255,.55); font-weight: 500;
}
.cal-ol-dot { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }

.cal-overlay-scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; gap: 0;
}

/* Calendar grid side */
.cal-overlay-grid {
  flex: 1; min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 20px;
  align-content: start;
}

/* Upcoming dates sidebar */
.cal-overlay-upcoming {
  width: 280px; flex-shrink: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
}

.co-upcoming-title {
  font-size: .82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-tertiary);
  margin-bottom: 12px;
}
.co-upcoming-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border-light);
}
.co-upcoming-item:last-child { border-bottom: none; }
.co-upcoming-item.co-past { opacity: .45; }
.co-upcoming-item.co-today { background: var(--teal-bg); margin: 0 -16px; padding: 10px 16px; border-radius: var(--radius-xs); }
.co-upcoming-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.co-upcoming-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.co-upcoming-name { font-size: .85rem; font-weight: 600; }
.co-upcoming-date { font-size: .75rem; color: var(--text-secondary); }
.co-upcoming-tag {
  display: inline-block; margin-top: 3px; font-size: .62rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 999px; width: fit-content;
}
.co-tag-start-end { background: var(--teal-bg); color: var(--teal); }
.co-tag-holiday { background: var(--rose-bg); color: var(--rose); }
.co-tag-early-release { background: var(--amber-bg); color: var(--amber); }
.co-tag-teacher { background: var(--slate-bg); color: var(--slate); }

/* Month cards in overlay */
.co-month {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.co-month-title {
  font-size: .82rem; font-weight: 700; padding: 8px 12px;
  background: var(--teal); color: #fff; text-align: center;
}
.co-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
}
.co-dow {
  font-size: .58rem; font-weight: 700; text-transform: uppercase;
  text-align: center; padding: 5px 1px;
  color: var(--text-tertiary); background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}
.co-cell {
  aspect-ratio: 1; padding: 3px; display: flex; flex-direction: column;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  position: relative; cursor: default;
  transition: background .15s ease;
}
.co-cell:nth-child(7n + 7) { border-right: none; }
.co-cell-pad { background: var(--bg); opacity: .4; }
.co-cell-weekend { background: #fafafa; }
.co-cell-weekend .co-day { color: var(--text-tertiary); }

.co-day { font-weight: 700; font-size: .7rem; line-height: 1; }

.co-cell-start-end { background: var(--teal-bg); }
.co-cell-holiday { background: var(--rose-bg); }
.co-cell-early-release { background: var(--amber-bg); }
.co-cell-teacher { background: var(--slate-bg); }
.co-cell-out { background: #ebebeb; }
.co-cell-out .co-day { color: #bbb; }
.co-cell-er-wed { background: #fff7ed; }
.co-cell-er-wed .co-day { color: var(--amber); }

.co-cell-start-end:hover, .co-cell-holiday:hover,
.co-cell-early-release:hover, .co-cell-teacher:hover,
.co-cell-er-wed:hover {
  filter: brightness(.95);
}

.co-label {
  font-size: .48rem; line-height: 1.2; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.co-cell-start-end .co-label { color: var(--teal); font-weight: 700; }
.co-cell-holiday .co-label { color: var(--rose); font-weight: 700; }
.co-cell-early-release .co-label { color: var(--amber); font-weight: 600; }
.co-cell-teacher .co-label { color: var(--slate); font-weight: 600; }
.co-cell-er-wed .co-label { color: var(--amber); font-weight: 600; }

/* Responsive overlay */
@media (max-width: 900px) {
  .cal-overlay-scroll { flex-direction: column; }
  .cal-overlay-grid { grid-template-columns: repeat(2, 1fr); }
  .cal-overlay-upcoming {
    width: 100%; border-left: none;
    border-top: 1px solid var(--border);
  }
}
@media (max-width: 640px) {
  .cal-overlay-header { padding: 12px 16px 10px; padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .cal-overlay-title { font-size: 1rem; }
  .cal-overlay-legend { padding: 8px 16px; gap: 10px; }
  .cal-overlay-grid { grid-template-columns: 1fr; padding: 12px 16px; }
  .cal-overlay-btn span { display: none; }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--border-light);
  padding: 20px 0; text-align: center; font-size: .75rem; color: var(--text-tertiary);
}
.footer-links { margin-top: 6px; display: flex; gap: 16px; justify-content: center; }
.footer-links a { color: var(--accent); text-decoration: none; font-weight: 500; }
.footer-links a:hover { text-decoration: underline; }

/* ===== ANIMATION ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.cal-card, .camp-card, .planner-week { animation: fadeUp .25s ease both; }

/* ===== NOTIFICATION BELL & DRAWER ===== */
.nav-bell {
  background: none; border: none; cursor: pointer; padding: 6px;
  color: var(--text-secondary); transition: color .2s;
  display: flex; align-items: center; position: relative;
}
.nav-bell:hover { color: var(--teal); }

/* ===== AUTH BUTTON & ACCOUNT MENU ===== */
.nav-auth {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--text-secondary); transition: all .2s;
  display: flex; align-items: center; position: relative;
  border-radius: 50%; overflow: hidden;
}
.nav-auth:hover { color: var(--teal); }
.nav-auth.signed-in { padding: 0; }
.auth-avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--teal);
}
.account-menu {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.4); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 60px 12px 0;
}
.account-menu-card {
  background: var(--bg); border-radius: 14px; padding: 20px;
  width: 280px; box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.account-menu-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border-light);
}
.account-menu-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.account-menu-name { font-weight: 700; font-size: .9rem; color: var(--text); }
.account-menu-email { font-size: .75rem; color: var(--text-secondary); }
.account-menu-actions { display: flex; flex-direction: column; gap: 6px; }
.account-menu-btn {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; padding: 10px 12px; border-radius: 8px;
  font-size: .85rem; color: var(--text); cursor: pointer;
  transition: background .2s; text-align: left; width: 100%;
}
.account-menu-btn:hover { background: var(--border-light); }
.account-menu-signout { color: #dc2626; margin-top: 6px; border-top: 1px solid var(--border-light); padding-top: 12px; }
.notif-drawer {
  position: fixed; top: 52px; right: 12px; z-index: 1000;
  width: 340px; max-width: calc(100vw - 24px);
  animation: notifSlideIn .2s ease;
}
@keyframes notifSlideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.notif-drawer-inner {
  background: var(--bg); border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  border: 1px solid var(--border);
  overflow: hidden;
}
.notif-drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border-light);
}
.notif-drawer-title { font-weight: 700; font-size: .9rem; color: var(--text); }
.notif-drawer-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--text-secondary); padding: 0 4px; }
.notif-main-toggle {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px; border-bottom: 1px solid var(--border-light);
}
.notif-toggle-title { font-weight: 600; font-size: .85rem; display: block; color: var(--text); }
.notif-toggle-desc { font-size: .75rem; color: var(--text-secondary); }
.notif-options { padding: 8px 16px 16px; }
.notif-option {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 0;
  cursor: pointer; border-bottom: 1px solid var(--border-light);
}
.notif-option:last-child { border-bottom: none; }
.notif-option input { display: none; }
.notif-option-check {
  width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--border);
  flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
.notif-option input:checked + .notif-option-check {
  background: var(--teal); border-color: var(--teal);
}
.notif-option input:checked + .notif-option-check::after {
  content: ''; display: block; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -2px;
}
.notif-option-label { font-size: .82rem; font-weight: 600; color: var(--text); display: block; }
.notif-option-hint { font-size: .72rem; color: var(--text-secondary); display: block; margin-top: 1px; }
.notif-blocked-warning { font-size: .75rem; color: #dc2626; padding: 8px 16px 12px; margin: 0; }
.notif-test-btn {
  display: block; width: calc(100% - 32px); margin: 8px 16px 12px;
  padding: 10px; border-radius: 8px; border: 1px dashed var(--border);
  background: var(--bg); color: var(--text-secondary); font-size: .8rem;
  font-weight: 600; cursor: pointer; transition: all .2s ease;
}
.notif-test-btn:hover { background: var(--border-light); color: var(--text); }

/* ===== SCHOOL TOP BUTTONS ===== */
.school-top-btns {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 16px; margin-bottom: 20px;
}

/* ===== LUNCH MENU OVERLAY ===== */
.lunch-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: var(--bg);
  display: none; flex-direction: column;
  overflow: hidden;
}
.lunch-overlay.active { display: flex; }
.lunch-overlay-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 16px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, #f0fdfa 0%, #fff 100%);
  flex-shrink: 0;
}
.lunch-overlay-title { font-size: 1.15rem; font-weight: 800; color: var(--text); margin: 0; }
.lunch-overlay-sub { font-size: .78rem; color: var(--text-secondary); margin: 2px 0 0; }
.lunch-overlay-close {
  background: var(--border-light); border: 2px solid var(--border);
  color: var(--text); width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.6rem; font-weight: 700; cursor: pointer; display: grid; place-items: center;
  transition: all .2s ease; line-height: 1; flex-shrink: 0;
}
.lunch-overlay-close:hover { background: var(--border); color: var(--text); }
.lunch-overlay-scroll {
  flex: 1; overflow-y: auto; padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.lunch-week { margin-bottom: 24px; }
.lunch-week-current { }
.lunch-week-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.lunch-week-label {
  font-size: .88rem; font-weight: 700; color: var(--text);
}
.lunch-week-range {
  font-size: .75rem; color: var(--text-secondary); margin-left: 8px;
}
.lunch-cycle-badge {
  font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 6px;
  background: var(--teal); color: #fff;
}
.lunch-week-off {
  text-align: center; padding: 24px 16px; color: var(--text-secondary);
  font-size: .88rem; background: #fef2f2; border-radius: 12px;
  border: 1px solid #fecaca;
}
.lunch-week-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.lunch-day-card {
  background: #fff; border: 1px solid var(--border-light); border-radius: 12px;
  padding: 10px; text-align: center; transition: all .15s ease;
}
.lunch-day-today { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.lunch-day-off { background: #fef2f2; border-color: #fecaca; }
.lunch-day-name { font-size: .7rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; }
.lunch-day-date { font-size: .65rem; color: var(--text-tertiary); margin-bottom: 6px; }
.lunch-day-main { font-size: .78rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.lunch-day-closed { color: #dc2626; }
.lunch-day-reason { font-size: .65rem; color: var(--text-tertiary); margin-top: 2px; }
.lunch-day-sides { font-size: .65rem; color: var(--text-tertiary); margin-top: 4px; line-height: 1.3; }

/* ===== REGISTRATION CARD ===== */
.reg-card-btn {
  width: 100%; margin-top: 12px; justify-content: center;
  display: flex; align-items: center; gap: 6px;
}
/* ===== CALENDAR EXPORT MODAL ===== */
.cal-export-modal {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.cal-export-card {
  background: var(--bg); border-radius: 16px; padding: 24px;
  max-width: 400px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.cal-export-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.cal-export-header h3 { font-size: 1.1rem; font-weight: 800; color: var(--text); margin: 0; }
.cal-export-close {
  background: none; border: none; font-size: 1.4rem; color: var(--text-secondary);
  cursor: pointer; padding: 4px 8px; line-height: 1;
}
.cal-export-close:hover { color: var(--text); }
.cal-export-desc {
  font-size: .82rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.4;
}
.cal-export-checks {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px;
}
.cal-export-check {
  display: flex; align-items: center; gap: 10px; font-size: .85rem;
  color: var(--text); cursor: pointer;
}
.cal-export-check input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--teal);
}
.cal-export-btns {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px;
}
.cal-export-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: .88rem; padding: 12px;
}
.cal-export-hint {
  font-size: .72rem; color: var(--text-tertiary); text-align: center; line-height: 1.4;
}
.cal-export-cancel {
  width: 100%; margin-top: 8px; font-size: .9rem; padding: 12px;
}

/* Kid profile modal */
.kid-profile-card { max-width: 420px; }
.kid-profile-form {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px;
}
.kid-profile-label {
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-tertiary); margin-top: 6px;
}
.kid-profile-label:first-child { margin-top: 0; }
.kid-profile-actions {
  display: flex; flex-direction: column; gap: 8px;
}

/* Sync progress & summary modals */
.sync-progress-card { text-align: center; }
.sync-progress-bar-wrap {
  width: 100%; height: 8px; background: var(--bg); border-radius: 4px;
  overflow: hidden; margin-bottom: 8px;
}
.sync-progress-bar {
  height: 100%; background: var(--teal); border-radius: 4px;
  transition: width .2s ease;
}
.sync-progress-bar.sync-progress-indeterminate {
  width: 100% !important;
  background: linear-gradient(90deg, var(--teal) 25%, #5eead4 50%, var(--teal) 75%);
  background-size: 200% 100%;
  animation: indeterminateSlide 1.4s linear infinite;
}
@keyframes indeterminateSlide {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sync-progress-pct {
  font-size: 1.5rem; font-weight: 800; color: var(--teal); margin: 4px 0;
}
.sync-progress-msg {
  font-size: .78rem; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.sync-summary-lines {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg); border-radius: 10px; padding: 14px 16px;
}
.sync-line {
  display: flex; align-items: center; gap: 10px;
  font-size: .85rem; color: var(--text);
}
.sync-line-icon { font-size: 1.1rem; flex-shrink: 0; width: 24px; text-align: center; }
.sync-line-error { color: var(--amber); }

.reg-card-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.reg-card {
  background: #fff; border-radius: 20px; width: 100%; max-width: 400px;
  max-height: 80vh; overflow-y: auto; box-shadow: 0 12px 48px rgba(0,0,0,.2);
}
.reg-card-header {
  padding: 20px 20px 16px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  border-bottom: 1px solid var(--border-light);
  border-radius: 20px 20px 0 0;
}
.reg-card-title { font-size: 1.05rem; font-weight: 800; color: var(--text); }
.reg-card-subtitle { font-size: .85rem; color: var(--text-secondary); margin-top: 2px; }
.reg-card-section { padding: 14px 20px; border-bottom: 1px solid var(--border-light); }
.reg-card-section-title {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--teal); margin-bottom: 8px;
}
.reg-card-field { font-size: .82rem; color: var(--text-secondary); line-height: 1.6; }
.reg-card-medical { color: #d97706; font-weight: 500; }
.reg-card-camp {
  display: flex; flex-wrap: wrap; gap: 2px 8px; padding: 6px 0;
  border-bottom: 1px solid var(--border-light); align-items: baseline;
}
.reg-card-camp:last-of-type { border-bottom: none; }
.reg-card-camp-name { font-size: .82rem; font-weight: 600; color: var(--text); flex: 1; min-width: 120px; }
.reg-card-camp-week { font-size: .72rem; color: var(--text-secondary); }
.reg-card-camp-price { font-size: .82rem; font-weight: 600; color: var(--teal); }
.reg-card-actions {
  display: flex; gap: 8px; margin-top: 10px;
}
.reg-card-total {
  display: flex; justify-content: space-between; padding: 14px 20px;
  font-weight: 700; font-size: .95rem; color: var(--text);
  border-bottom: 1px solid var(--border-light);
}
.reg-card-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 14px 20px;
}

/* ===== WEATHER + SCHOOL CLOSURE (unified) ===== */
.tw-chip-predictor-hot { border: 2px solid var(--rose); background: #fff1f2; }
.tw-chip-predictor-warm { border: 2px solid #f59e0b; background: #fffbeb; }
.tw-chip-subtitle { font-size: .7rem; font-weight: 700; margin-top: 2px; }
.predictor-closure { color: var(--rose); }
.predictor-delay { color: #d97706; }

.weather-risk-badge {
  display: inline-block; font-size: .65rem; font-weight: 700;
  margin-left: 6px; padding: 1px 6px; border-radius: 8px;
}
.weather-risk-badge.predictor-closure { background: #fff1f2; }
.weather-risk-badge.predictor-delay { background: #fffbeb; }
.weather-risk-badge.predictor-normal { background: #ecfdf5; color: var(--teal); }
.predictor-normal { color: var(--teal); font-weight: 500; }

.tw-detail-row-risk { background: #fef9f0; border-radius: 6px; margin: 0 -6px; padding: 6px; }

.weather-closure-section {
  border-top: 1px solid var(--border); margin-top: 8px; padding-top: 4px;
}

.predictor-disclaimer {
  font-size: .7rem; color: var(--text-tertiary);
  padding: 8px 0 0; line-height: 1.3; font-style: italic;
}

.predictor-day-row {
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.predictor-day-row:last-child { border-bottom: none; }

.predictor-day-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.predictor-day-label { font-weight: 600; font-size: .82rem; }
.predictor-day-status { font-size: .78rem; font-weight: 600; }

.predictor-bar-track {
  height: 6px; background: var(--bg); border-radius: 3px;
  overflow: hidden; margin-bottom: 6px;
}
.predictor-bar-fill {
  height: 100%; border-radius: 3px; transition: width .4s ease;
  min-width: 2px;
}

.predictor-factors { margin-top: 4px; }
.predictor-factor {
  font-size: .7rem; color: var(--text-secondary);
  line-height: 1.4; padding-left: 4px;
}

/* ===== COMMUNITY BADGE ===== */
.badge-community {
  background: #ede9fe; color: #6d28d9; font-weight: 600;
  display: inline-flex; align-items: center; gap: 3px;
}
.badge-community::before {
  content: '';
  display: inline-block; width: 6px; height: 6px;
  background: #8b5cf6; border-radius: 50%;
}

/* ===== PLANNER SHARE ROW ===== */
.planner-share-row {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 8px;
}
.planner-share-row .btn-share { flex: 1; min-width: 140px; }

/* ===== SUMMER GLANCE MODAL ===== */
.glance-card { max-width: 440px; }
.glance-preview {
  padding: 16px; display: flex; justify-content: center;
  background: #f8fafc; border-radius: 12px; margin: 0 16px;
}
.glance-img {
  width: 100%; max-width: 400px; border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.1);
}

/* ===== FEEDBACK ===== */
.feedback-card { max-width: 420px; }
.feedback-form { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; }
.feedback-textarea {
  resize: vertical; min-height: 80px; font-family: inherit;
  padding: 10px 12px; font-size: .88rem; line-height: 1.5;
}

/* ===== ADMIN DASHBOARD ===== */
.admin-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.5); display: flex;
  justify-content: center; align-items: stretch;
}
.admin-panel {
  background: var(--surface); width: 100%; max-width: 640px;
  display: flex; flex-direction: column; overflow: hidden;
}
@media (min-width: 641px) {
  .admin-panel { border-radius: 16px; margin: 20px auto; max-height: calc(100vh - 40px); }
}
.admin-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: max(env(safe-area-inset-top, 16px), 16px) 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.admin-topbar-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.admin-close {
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
  color: var(--text-secondary); padding: 0 4px; line-height: 1;
}
.admin-tabs {
  display: flex; gap: 0; overflow-x: auto; flex-shrink: 0;
  border-bottom: 1px solid var(--border); padding: 0 12px;
}
.admin-tab {
  background: none; border: none; padding: 10px 14px; font-size: .78rem;
  font-weight: 600; color: var(--text-secondary); cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.admin-tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.admin-tab:hover { color: var(--text-primary); }
.admin-body {
  flex: 1; overflow-y: auto; padding: 16px 20px;
}
.admin-menu-btn { color: var(--teal) !important; font-weight: 600 !important; }

/* Role badges */
.admin-topbar-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.admin-role-badge {
  display: inline-block; font-size: .6rem; font-weight: 700; padding: 2px 8px;
  border-radius: 8px; text-transform: uppercase; letter-spacing: .04em;
}
.admin-role-super { background: #ede9fe; color: #6d28d9; }
.admin-role-district { background: #dbeafe; color: #1d4ed8; }
.admin-district-select {
  font-size: .78rem; font-weight: 600; color: var(--text-primary);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 3px 8px; cursor: pointer; max-width: 180px;
}

/* District cards (super admin) */
.admin-districts-list { display: flex; flex-direction: column; gap: 10px; }
.admin-district-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  background: var(--bg); transition: border-color .15s;
}
.admin-district-active { border-color: var(--teal); background: var(--teal-bg); }
.admin-district-header { display: flex; justify-content: space-between; align-items: flex-start; }
.admin-district-name { font-size: .88rem; font-weight: 700; }
.admin-district-current {
  font-size: .6rem; font-weight: 700; background: var(--teal); color: white;
  padding: 1px 6px; border-radius: 6px; margin-left: 6px; vertical-align: middle;
}
.admin-district-meta { font-size: .72rem; color: var(--text-secondary); margin-top: 2px; }
.admin-district-stats {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px;
  font-size: .7rem; color: var(--text-tertiary);
}

/* Admin summary row */
.admin-summary-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.admin-stat { font-size: .78rem; color: var(--text-secondary); }
.admin-stat-val { font-weight: 800; font-size: 1rem; margin-right: 2px; }
.admin-stat-new { color: var(--rose); }
.admin-stat-reviewed { color: var(--amber); }
.admin-stat-fixed { color: var(--teal); }

/* Feedback list */
.admin-feedback-item {
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.admin-feedback-item:last-child { border-bottom: none; }
.admin-feedback-top {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 6px;
}
.admin-feedback-cat {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  background: var(--bg); padding: 2px 8px; border-radius: 8px;
  letter-spacing: .03em;
}
.admin-feedback-date { font-size: .72rem; color: var(--text-tertiary); }
.admin-feedback-user { font-size: .72rem; color: var(--text-secondary); }
.admin-feedback-msg { font-size: .82rem; line-height: 1.5; color: var(--text-primary); }
.admin-feedback-contact { font-size: .72rem; color: var(--text-tertiary); margin-top: 4px; }

.admin-status-select {
  font-size: .7rem; font-weight: 600; padding: 2px 8px; border-radius: 8px;
  border: 1px solid var(--border); margin-left: auto; cursor: pointer;
}
.admin-status-new { background: #fff1f2; color: var(--rose); }
.admin-status-reviewed { background: #fffbeb; color: var(--amber); }
.admin-status-fixed { background: #dcfce7; color: #166534; }

/* Admin tables */
.admin-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.admin-toolbar-title { font-size: .88rem; font-weight: 700; margin: 0; }

.admin-add-form {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px;
  background: var(--bg); border-radius: 10px; margin-bottom: 12px;
}
.admin-add-form .input { flex: 1; min-width: 140px; }
.admin-add-form-camp { flex-direction: column; }
.admin-add-form-camp .input { min-width: unset; }
.admin-add-actions { display: flex; gap: 8px; width: 100%; }

.admin-table { margin-bottom: 16px; }
.admin-table-header {
  display: flex; gap: 8px; padding: 6px 0; border-bottom: 2px solid var(--border);
  font-size: .68rem; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .03em;
}
.admin-table-row {
  display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: .78rem; align-items: center;
}
.admin-table-row:last-child { border-bottom: none; }
.admin-col-date { flex: 0 0 90px; font-weight: 600; }
.admin-col-title { flex: 1; }
.admin-col-cat { flex: 0 0 90px; }
.admin-col-actions { flex: 0 0 32px; text-align: right; }
.admin-col-camp-name { flex: 1; }
.admin-col-sm { flex: 0 0 60px; text-align: center; }

.admin-cat-badge {
  display: inline-block; font-size: .65rem; font-weight: 700;
  color: white; padding: 2px 8px; border-radius: 8px;
}
.admin-delete-btn {
  background: none; border: none; color: var(--rose); font-size: 1.1rem;
  cursor: pointer; padding: 0 4px; opacity: .5; transition: opacity .15s;
}
.admin-delete-btn:hover { opacity: 1; }

.admin-section-divider {
  height: 1px; background: var(--border); margin: 20px 0;
}

/* District settings */
.admin-settings-section {
  margin-bottom: 20px; padding: 16px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg);
}
.admin-settings-section:last-of-type { border-bottom: 1px solid var(--border); }
.admin-settings-title { font-size: .95rem; font-weight: 700; margin: 0 0 14px; }
.admin-settings-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.admin-settings-grid > div, .admin-settings-grid > label, .admin-settings-grid > .input, .admin-settings-grid > textarea {
  grid-column: span 2;
}
.admin-settings-field {
  display: flex; flex-direction: column; gap: 4px;
}
.admin-settings-field.half {
  grid-column: span 1;
}
.admin-settings-grid label, .admin-settings-label {
  font-size: .72rem; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .03em;
}
.admin-settings-grid .input { font-size: .85rem; }
.admin-settings-grid textarea { resize: vertical; }

@media (max-width: 480px) {
  .admin-tabs { padding: 0 8px; }
  .admin-tab { padding: 8px 10px; font-size: .72rem; }
  .admin-body { padding: 12px 14px; }
  .admin-settings-grid label { margin-top: 6px; }
  .admin-col-date { flex: 0 0 75px; }
  .admin-col-cat { flex: 0 0 70px; }
}

/* ===== ANALYTICS (shared) ===== */
.analytics-dashboard {
  background: var(--surface); border-radius: 16px; max-width: 520px;
  width: 95vw; max-height: 90vh; overflow-y: auto; margin: auto;
  padding: 20px; position: relative;
}
.analytics-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; position: sticky; top: 0; background: var(--surface);
  padding: 0 0 8px; z-index: 1; border-bottom: 1px solid var(--border);
}
.analytics-title { font-size: 1.1rem; font-weight: 700; margin: 0; }

.analytics-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 20px;
}
.analytics-kpi {
  text-align: center; padding: 12px 6px; border-radius: 12px;
  background: var(--bg);
}
.analytics-kpi-value {
  font-size: 1.5rem; font-weight: 800; color: var(--teal);
}
.analytics-kpi-label { font-size: .72rem; font-weight: 700; color: var(--text-primary); text-transform: uppercase; letter-spacing: .04em; }
.analytics-kpi-sub { font-size: .65rem; color: var(--text-tertiary); }

.analytics-section {
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.analytics-section:last-of-type { border-bottom: none; }
.analytics-section-title {
  font-size: .82rem; font-weight: 700; margin-bottom: 10px;
  color: var(--text-primary);
}

/* Bar charts */
.analytics-chart {
  display: flex; align-items: flex-end; gap: 2px; height: 100px;
}
.analytics-chart-wide { gap: 4px; }
.analytics-bar-col {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%;
}
.analytics-bar {
  width: 100%; min-width: 4px; border-radius: 3px 3px 0 0;
  background: var(--teal); transition: height .3s ease;
}
.analytics-bar-teal { background: #14b8a6; }
.analytics-bar-amber { background: #f59e0b; }
.analytics-bar-label {
  font-size: .55rem; color: var(--text-tertiary); margin-top: 3px;
  white-space: nowrap; overflow: hidden;
}

/* Retention heatmap */
.analytics-retention-table { overflow-x: auto; }
.analytics-retention-row {
  display: flex; gap: 2px; margin-bottom: 2px;
}
.analytics-retention-header { font-weight: 700; font-size: .65rem; color: var(--text-secondary); }
.analytics-retention-cell {
  flex: 0 0 48px; text-align: center; font-size: .68rem; padding: 4px 2px;
  border-radius: 4px; white-space: nowrap;
}
.analytics-retention-cell:first-child { flex: 0 0 56px; text-align: left; }

/* Feature engagement bars */
.analytics-features { display: flex; flex-direction: column; gap: 8px; }
.analytics-feature-row {
  display: grid; grid-template-columns: 140px 1fr 80px; gap: 8px;
  align-items: center;
}
.analytics-feature-label { font-size: .75rem; font-weight: 600; color: var(--text-primary); }
.analytics-feature-bar-track {
  height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden;
}
.analytics-feature-bar {
  height: 100%; border-radius: 4px; background: var(--teal);
  transition: width .3s ease;
}
.analytics-feature-stat {
  font-size: .72rem; font-weight: 700; color: var(--text-primary); text-align: right;
}
.analytics-feature-users { font-weight: 500; color: var(--text-tertiary); font-size: .65rem; }

.analytics-empty {
  font-size: .78rem; color: var(--text-tertiary); font-style: italic;
  padding: 8px 0;
}
.analytics-footer {
  font-size: .68rem; color: var(--text-tertiary); font-style: italic;
  text-align: center; padding-top: 8px;
}

@media (max-width: 480px) {
  .analytics-kpis { grid-template-columns: repeat(2, 1fr); }
  .analytics-feature-row { grid-template-columns: 110px 1fr 60px; }
  .analytics-retention-cell { flex: 0 0 38px; font-size: .6rem; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .tab-nav { top: 0; }
  .nav-btn { font-size: .72rem; padding: 6px 10px; }
  .nav-btn svg { display: none; }
  .hero { min-height: 320px; }
  .hero-content { padding: 40px 0 56px; }
  .hero-title { font-size: 2rem; }
  .hero-sub { font-size: .85rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-btn { width: 220px; justify-content: center; }
  .camp-controls { flex-direction: column; align-items: stretch; }
  .calendar-grid, .camp-cards { grid-template-columns: 1fr; }
  .picker-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .input-sm, .input-md { flex: 1; }
  .export-bar { flex-direction: column; align-items: stretch; }
  .notif-drawer { right: 4px; width: calc(100vw - 8px); }
  .school-top-btns { flex-direction: column; align-items: stretch; }
  .lunch-week-grid { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .lunch-day-card { padding: 6px 4px; }
  .lunch-day-main { font-size: .7rem; }
  .lunch-day-sides { font-size: .6rem; }
  .lunch-overlay-scroll { padding: 12px; }
  .reg-card { max-width: 100%; }
}

/* ===== SCHOOL CALENDAR — PAST/UPCOMING ===== */
.cal-card-past {
  opacity: 0.45;
}
.cal-card-next {
  border-left: 3px solid var(--teal);
}
.cal-past-divider {
  text-align: center; padding: 16px 0 8px; font-size: .75rem;
  color: var(--text-tertiary); font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em;
}

/* ===== AI IMPORT ===== */
.btn-ai { background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #fff; border: none; }
.ai-import-spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--border); border-top-color: var(--teal);
  border-radius: 50%; animation: ai-spin .8s linear infinite;
  margin-right: 8px; vertical-align: middle;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }

/* ===== DISTRICT PICKER ===== */
.district-picker-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.district-picker-card {
  background: var(--surface, #fff); border-radius: 20px;
  width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  overflow: hidden;
}
.district-picker-header {
  padding: 28px 24px 16px; text-align: center; position: relative;
}
.district-picker-title {
  font-size: 1.3rem; font-weight: 700; margin: 0 0 6px;
  color: var(--text, #1a1a1a);
}
.district-picker-sub {
  font-size: .85rem; color: var(--text-secondary, #666); margin: 0;
}
.district-picker-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; font-size: 1.5rem;
  color: var(--text-secondary); cursor: pointer; line-height: 1;
}
.district-picker-list {
  padding: 0 16px 20px; display: flex; flex-direction: column; gap: 10px;
}
.district-picker-option {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-radius: 14px;
  border: 2px solid var(--border, #e5e7eb);
  background: var(--surface, #fff); cursor: pointer;
  transition: all .15s ease; text-align: left;
  font-family: inherit;
}
.district-picker-option:hover, .district-picker-option:focus {
  border-color: var(--teal, #0d9488);
  background: var(--teal-50, #f0fdfa);
}
.district-picker-current {
  border-color: var(--teal, #0d9488);
  background: var(--teal-50, #f0fdfa);
}
.district-picker-option-name {
  font-size: 1rem; font-weight: 600;
  color: var(--text, #1a1a1a);
}
.district-picker-option-meta {
  font-size: .78rem; color: var(--text-secondary, #666); margin-top: 2px;
}
.district-picker-arrow {
  color: var(--text-secondary, #999); flex-shrink: 0;
}
