 :root {
  --bg: #f3efe4;
  --bg-soft: #e7dfcf;
  --card: rgba(255,253,246,0.94);
  --card-border: rgba(20,59,45,0.16);
  --text: #10261e;
  --muted: #596b5b;
  --accent: #143b2d;
  --accent-2: #2f5f46;
  --warning: #9a5b18;
  --success: #246b3d;
  --shadow: 0 20px 50px rgba(16,38,30,.14);
  --radius: 24px;
  --radius-sm: 14px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(47,95,70,.16), transparent 28%),
    radial-gradient(circle at left, rgba(140,124,76,.12), transparent 22%),
    var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(243,239,228,.90);
  border-bottom: 1px solid var(--card-border);
}
.header-inner {
  display: flex; flex-direction: column; gap: 12px;
  padding: 10px 0 12px;
}
.brand { display:flex; align-items:center; gap:20px; }
.brand-banner {
  width: 100%; display:flex; align-items:center; justify-content:center; gap: 16px;
  padding: 8px 18px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(231,223,207,.88));
  border: 1px solid rgba(20,59,45,.18);
  box-shadow: 0 18px 40px rgba(16,38,30,.08);
}
.brand-banner-copy {
  display:flex; flex-direction:column; align-items:center; text-align:center;
}
.brand-mark {
  width: 104px; height: 104px; border-radius: 24px;
  display:grid; place-items:center;
  background: rgba(20,59,45,.06);
  border: 1px solid rgba(20,59,45,.18);
  box-shadow: 0 0 30px rgba(20,59,45,.10);
  padding: 10px;
}
.brand-eyebrow { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.brand-wordmark {
  font-family: "Avenir Next", Avenir, "Gill Sans", "Gill Sans MT", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(24px, 2.8vw, 38px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: .02em;
  margin: 4px 0 6px;
  text-align: center;
  text-wrap: nowrap;
  white-space: nowrap;
}

.brand-domain { font-size: 12px; color: var(--muted); margin-top: 1px; }
.header-nav-row {
  width: 100%; display:flex; align-items:center; justify-content:space-between; gap: 24px;
}
.nav { display:flex; align-items:center; gap: 14px; flex-wrap: wrap; }
.nav a { font-size: 14px; color: var(--muted); }
.nav a:hover { color: var(--text); }
.button {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height: 46px; padding: 0 18px; border-radius: 16px; border: 1px solid transparent;
  font-weight: 600; cursor: pointer; transition: .2s ease; background: var(--accent); color: white;
}
.button:hover { transform: translateY(-1px); }
.button.secondary { background: white; color: var(--accent); border-color: rgba(20,59,45,.16); }
.button.ghost { background: transparent; color: var(--accent); border-color: rgba(20,59,45,.20); }
.hero { padding: 72px 0 52px; }
.hero-grid { display:grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: stretch; }
.pill {
  display:inline-flex; align-items:center; gap:8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(79,209,255,.26); background: rgba(20,59,45,.08); color: var(--accent);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
}
.hero h1 { font-size: clamp(40px, 6vw, 78px); line-height: 1.02; margin: 20px 0 16px; }
.hero p.lead { font-size: 19px; line-height: 1.8; color: var(--muted); max-width: 780px; }
.hero-actions { display:flex; gap:12px; flex-wrap:wrap; margin: 26px 0 30px; }
.grid-4 { display:grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display:grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display:grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.small-radius { border-radius: 18px; }
.card-pad { padding: 22px; }
.stat-label, .meta, .muted { color: var(--muted); }
.stat-value { margin-top: 8px; font-size: 28px; font-weight: 700; }
.section { padding: 70px 0; }
.section-alt { background: rgba(255,255,255,.04); border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); }
.section-head { max-width: 800px; margin-bottom: 28px; }
.section-head .eyebrow { display:inline-block; color: var(--accent); text-transform: uppercase; letter-spacing: .22em; font-size: 12px; font-weight: 700; margin-bottom: 12px; }
.section-head h2 { margin: 0 0 12px; font-size: clamp(30px, 4vw, 44px); }
.section-head p { color: var(--muted); line-height: 1.8; font-size: 17px; }
.event-card .tag, .doc-tag, .portal-tag {
  display:inline-flex; align-items:center; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(20,59,45,.08); color: var(--accent);
}
.event-card h3, .simple-card h3 { margin: 12px 0 10px; font-size: 22px; }
.stack { display:flex; flex-direction:column; gap:14px; }
.list { display:flex; flex-direction:column; gap:10px; margin: 0; padding: 0; list-style: none; }
.list li { display:flex; gap:10px; color: var(--muted); line-height: 1.7; }
.list li::before { content: "•"; color: var(--accent); }
.table-like { display:grid; gap: 12px; }
.doc-row, .portal-row {
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  padding: 16px 18px; border-radius: 18px; background: rgba(255,255,255,.55); border: 1px solid var(--card-border);
}
.notice {
  padding: 18px; border-radius: 20px; background: rgba(20,59,45,.08); border: 1px solid rgba(20,59,45,.16); color: var(--text);
}
.cta-band {
  display:grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 20px 0;
  border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); background: rgba(20,59,45,.04);
}
.footer { padding: 34px 0 54px; border-top: 1px solid var(--card-border); background: rgba(20,59,45,.05); }
.footer-grid { display:grid; grid-template-columns: 1fr auto; gap: 24px; }
.footer-links { display:grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 12px 28px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.form-grid { display:grid; gap:14px; }
.field label { display:block; margin-bottom:8px; color: var(--text); font-size: 14px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--card-border);
  background: rgba(255,255,255,.92); color: var(--text); font: inherit;
}
.field textarea { min-height: 120px; resize: vertical; }
.split { display:grid; grid-template-columns: 280px 1fr; gap: 18px; }
.sidebar {
  position: sticky; top: 94px; align-self: start; padding: 16px; border-radius: 24px;
  background: rgba(255,255,255,.9); border: 1px solid var(--card-border);
}
.sidebar .nav-button {
  width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid transparent;
  background: transparent; color: var(--muted); cursor: pointer; font: inherit; margin-bottom: 8px;
}
.sidebar .nav-button.active { background: rgba(20,59,45,.08); border-color: rgba(20,59,45,.20); color: var(--text); }
.editor-toolbar { display:flex; gap:10px; flex-wrap:wrap; margin-bottom: 16px; }
.editor-section { padding: 22px; border-radius: 24px; border: 1px solid var(--card-border); background: rgba(255,255,255,.9); }

.editor-mobile-menu { display: none; }
.editor-mobile-menu-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.editor-mobile-menu-tile {
  min-height: 92px;
  justify-content: center;
  text-align: center;
}
.editor-mobile-menu-tile .mobile-tile-label { font-size: 15px; }
.editor-main-shell { min-width: 0; }
.editor-mobile-toolbar {
  display: none;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 46;
  margin-bottom: 14px;
  padding: 8px 0;
  background: rgba(255,247,247,.96);
  border-bottom: 1px solid var(--card-border);
}
.editor-mobile-title-block { min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 6px; text-align: center; white-space: nowrap; overflow: hidden; }
.editor-mobile-title { font-size: 17px; font-weight: 800; text-align: center; flex: 0 0 auto; }
.editor-mobile-subtitle { font-size: 13px; color: var(--muted); line-height: 1.2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-mobile-subtitle::before { content: "·"; margin-right: 6px; }
.editor-mobile-back { border: 0; background: transparent; padding: 0; }
.editor-mobile-toolbar-end {
  min-width: 52px;
  display: grid;
  align-items: center;
  justify-items: end;
}
.editor-mobile-toolbar-end .mobile-section-spacer { display: block; }
.editor-mobile-toolbar-end .button { width: auto; }

.repeater { display:grid; gap: 12px; }
.inline-grid-2 { display:grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.help { color: var(--muted); font-size: 13px; line-height: 1.7; }
.page-banner { margin-bottom: 20px; }
.hidden { display: none !important; }
@media (max-width: 980px) {
  .hero-grid, .grid-4, .grid-3, .grid-2, .footer-grid, .split, .cta-band { grid-template-columns: 1fr; }
  .brand-banner, .header-nav-row { flex-direction: column; text-align: center; }
  .nav { display:none; }
}
@media (max-width: 640px) {
  .brand-banner { padding: 14px 16px; gap: 14px; }
  .brand-logo { width: 74px; height: 74px; }
}

.brand-logo { width: 74px; height: 74px; object-fit: contain; border-radius: 18px; background: white; flex: 0 0 auto; }


.calendar-wrap {
  margin-top: 16px;
  overflow-x: auto;
}
.calendar-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.calendar-table th,
.calendar-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-border);
  vertical-align: top;
}
.calendar-table th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  background: rgba(20,59,45,.05);
}
.calendar-table tbody tr:hover {
  background: rgba(20,59,45,.04);
}


/* Member auth and file sharing */
.auth-toolbar,.table-toolbar{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap}.auth-actions{display:flex;gap:10px;flex-wrap:wrap}.compact-grid{grid-template-columns:1fr}.hidden{display:none !important}.calendar-table button{white-space:nowrap}.calendar-table td,.calendar-table th{vertical-align:top}.portal-row{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:16px 18px;border:1px solid var(--card-border);border-radius:16px;background:rgba(255,255,255,.72)}.portal-tag{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:rgba(20,59,45,.08);color:var(--accent-strong);font-size:12px;font-weight:700}.help{font-size:14px;line-height:1.7;color:var(--muted)}


body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 24px);
  background: rgba(74, 13, 13, 0.46);
  backdrop-filter: blur(8px);
}

.modal-shell {
  width: min(96vw, 1340px);
  max-width: 1340px;
  height: min(92vh, 1000px);
  max-height: min(92vh, 1000px);
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,.98);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(74, 13, 13, 0.22);
  position: relative;
  overflow: hidden;
}


.global-login-modal-card {
  width: min(92vw, 560px);
  max-width: 560px;
  height: auto;
  max-height: min(92vh, 760px);
}

.global-login-modal-body {
  margin: 0 18px 18px;
  padding: 24px;
  border-radius: 18px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(74, 13, 13, 0.08);
}

@media (max-width: 720px) {
  .global-login-modal-card {
    width: min(100%, 560px);
    max-height: calc(100vh - 16px);
  }

  .global-login-modal-body {
    margin: 0 12px 12px;
    padding: 18px;
  }
}

.event-info-modal-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.event-info-modal-head {
  padding: 18px 56px 10px 22px;
  flex: 0 0 auto;
}

.event-info-modal-head .eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.event-info-modal-head h3 {
  margin: 0 0 6px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.2;
}

.event-info-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 18px;
  overflow: hidden;
}

#eventInfoModalFrame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(20,59,45,.14);
  border-radius: 18px;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(20,59,45,.04);
}

.event-info-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 18px 0;
  border-top: 1px solid rgba(20,59,45,.10);
  background: rgba(255,255,255,.98);
  position: relative;
  z-index: 2;
}

.event-info-modal-card > p.muted {
  flex: 0 0 auto;
  padding: 12px 18px 22px;
  margin: 0 !important;
  background: rgba(255,255,255,.98);
  position: relative;
  z-index: 2;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(20,59,45,.16);
  background: rgba(255,255,255,.96);
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(20,59,45,.08);
}

@media (max-width: 1100px) {
  .modal-shell {
    width: min(97vw, 1180px);
    height: 93vh;
    max-height: 93vh;
  }

  .event-info-modal-head {
    padding-bottom: 10px;
  }

  .event-info-actions {
    margin-top: 14px;
    padding-top: 12px;
  }

  .event-info-modal-card > p.muted {
    padding-top: 10px;
  }
}

@media (max-width: 980px) {
  .install-help { padding-top: 4px; }
  .install-help-card { padding: 14px; }
}

@media (max-width: 720px) {
  .modal-overlay {
    padding: 8px;
  }

  .modal-shell {
    width: 100%;
    height: 96vh;
    max-height: 96vh;
    border-radius: 18px;
  }

  .event-info-modal-head {
    padding: 16px 54px 10px 16px;
  }

  .event-info-frame-wrap,
  .event-info-actions,
  .event-info-modal-card > p.muted {
    padding-left: 12px;
    padding-right: 12px;
  }

  #eventInfoModalFrame {
    border-radius: 14px;
  }

  .event-info-actions {
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
  }

  .event-info-modal-card > p.muted {
    padding-top: 10px;
    padding-bottom: 18px;
  }
}

  align-items: start;
}

.inline-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-actions input {
  flex: 1 1 220px;
}

  position: relative;
}

  align-items: stretch;
}

  margin-top: 10px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,.96);
  box-shadow: 0 16px 34px rgba(16,38,30,.10);
  max-height: 340px;
  overflow: auto;
}

  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

  background: rgba(20,59,45,.08);
}

  display: grid;
  gap: 4px;
}

  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(20,59,45,.10);
  color: var(--accent);
}

  padding: 14px;
  border-radius: 14px;
  color: var(--muted);
}

  max-height: 480px;
  overflow: auto;
  padding-right: 4px;
}

  gap: 16px;
}

  position: relative;
  z-index: 0;
  isolation: isolate;
  width: 100%;
  height: 560px;
  margin-top: 18px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

  margin-top: 14px;
  line-height: 1.7;
}

  min-width: 220px;
  text-align: right;
}

  margin-top: 16px;
}

  margin-bottom: 12px;
}

  display: grid;
  gap: 10px;
  color: var(--muted);
  line-height: 1.7;
}

  margin-top: 16px;
}

@media (max-width: 900px) {
    height: 420px;
  }

    text-align: left;
  }
}

@media (max-width: 720px) {
  .inline-actions {
    flex-direction: column;
    align-items: stretch;
  }

    align-items: flex-start;
    flex-direction: column;
  }

    height: 340px;
    border-radius: 18px;
  }
}


  background: rgba(255,255,255,.94);
  border: 1px solid rgba(20,59,45,.18);
  border-radius: 999px;
  color: var(--text);
  box-shadow: 0 8px 20px rgba(16,38,30,.12);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  white-space: nowrap;
}

  display: none;
}

  pointer-events: none;
}

  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,.04);
}

  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
}

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.user-location-icon {
  background: transparent;
  border: 0;
}

.user-location-icon-inner {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(20,59,45,.25);
  box-shadow: 0 8px 18px rgba(16,38,30,.18);
  font-size: 15px;
  line-height: 1;
}

  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 18px 18px;
}

  margin-top: 14px;
}

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  color: var(--muted);
  line-height: 1.7;
}

  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(20,59,45,.12);
  color: var(--muted);
  line-height: 1.7;
}

  display: grid;
  gap: 12px;
}

  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(20,59,45,.10);
}

  border-top: 0;
  padding-top: 0;
}

  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 820px) {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
    padding: 0 12px 14px;
  }
}

@media (max-width: 900px) {
    grid-template-columns: 1fr;
  }
}


.install-help { padding: 8px 0 26px; }
.install-help-card h3 { margin: 4px 0 8px; }
.install-help-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top: 14px; }
.install-help-actions .button { flex: 1 1 220px; }
.install-help-modal-card { max-width: 560px; }
.install-help-copy { padding: 0 16px 4px; box-sizing: border-box; }
.install-help-copy ol { margin: 0 0 14px 18px; padding: 0; line-height: 1.8; }
.install-help-copy p { margin: 0; }

.mobile-dashboard,
.mobile-section-header,
.mobile-only-block { display: none; }
.desktop-only-block { display: block; }

.mobile-dashboard { padding: 14px 0 8px; }
.mobile-dashboard-hero {
  padding: 11px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,240,240,.9));
}
.mobile-dashboard-brand-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.mobile-dashboard-logo {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  object-fit: contain;
  background: white;
  flex: 0 0 auto;
}
.mobile-dashboard-brand-copy { min-width: 0; overflow: visible; }
.mobile-dashboard-short {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .20em;
  line-height: 1;
}
.mobile-dashboard-wordmark {
  margin-top: 4px;
  color: var(--accent);
  font-family: "Avenir Next", Avenir, "Gill Sans", "Gill Sans MT", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(11px, 3.45vw, 18px);
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
.app-version {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(20,59,45,.16);
  background: rgba(20,59,45,.06);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 4px 8px;
  line-height: 1;
}
.app-version-mobile { justify-self: center; }
.mobile-dashboard-version { display:flex; justify-content:center; margin-top: 10px; }
.app-version-footer { margin-top: 8px; }
.mobile-dashboard-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top: 12px; }
.mobile-dashboard-actions .button { flex:1 1 0; min-width: 0; }
.mobile-dashboard-subtitle { margin-top: 8px; color: var(--muted); line-height: 1.6; }

.mobile-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.mobile-tile {
  min-height: 108px;
  padding: 12px 12px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 6px;
}
.mobile-tile-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(20,59,45,.10);
  font-size: 20px;
}
.mobile-tile-label { font-size: 15px; font-weight: 700; }
.mobile-tile-summary { color: var(--muted); font-size: 12px; line-height: 1.35; }

.mobile-section-header {
  position: sticky;
  top: 0;
  z-index: 45;
  padding: 8px 0 4px;
  backdrop-filter: blur(14px);
  background: rgba(255,247,247,.92);
  border-bottom: 1px solid var(--card-border);
}
.mobile-section-header-inner {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  min-height: 54px;
}
.mobile-back-link {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 38px;
  line-height: 1;
  color: var(--text);
}
.mobile-section-title { text-align: center; font-size: 22px; font-weight: 800; }
.mobile-section-spacer { width: 44px; height: 44px; }

.mobile-event-list { display: grid; gap: 12px; }
.mobile-event-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 16px;
  align-items: start;
}
.mobile-event-date {
  border-radius: 18px;
  background: rgba(20,59,45,.08);
  border: 1px solid rgba(20,59,45,.16);
  padding: 12px 10px;
  text-align: center;
}
.mobile-event-dow,
.mobile-event-month { font-size: 12px; letter-spacing: .08em; font-weight: 800; color: var(--accent); }
.mobile-event-day { margin-top: 6px; font-size: 32px; line-height: 1; font-weight: 800; color: var(--text); }
.mobile-event-content h3 { margin: 0 0 6px; font-size: 20px; }
.mobile-event-detail { color: var(--muted); line-height: 1.6; margin-bottom: 8px; }
.mobile-event-meta { color: var(--muted); line-height: 1.6; }
.mobile-event-actions { margin-top: 12px; }

@media (max-width: 380px) {
  .mobile-dashboard-hero { padding: 9px 10px; }
  .mobile-dashboard-brand-row { gap: 6px; }
  .mobile-dashboard-logo { width: 34px; height: 34px; border-radius: 10px; }
  .mobile-dashboard-wordmark { font-size: clamp(10px, 3.2vw, 15px); }
  .mobile-dashboard-short { font-size: 9px; letter-spacing: .14em; }
  .app-version-mobile { font-size: 10px; padding: 3px 7px; }
}

@media (max-width: 980px) {
  .site-header,
  .footer { display: none; }
  body[data-page="admin"] .admin-desktop-intro,
  body[data-page="admin"] .admin-desktop-sidebar,
  body[data-page="admin"] .admin-desktop-toolbar { display: none; }
  body[data-page="admin"] .editor-mobile-menu { display: block; }
  body[data-page="admin"] .editor-shell { display: block; }
  body[data-page="admin"] .editor-main-shell { width: 100%; }
  body[data-page="admin"] .editor-mobile-toolbar { display: grid; }
  body[data-page="admin"] .editor-mobile-toolbar .button { width: auto; }
  body[data-page="admin"] .editor-panes-wrap { display: none; }
  body[data-page="admin"] .editor-shell.editor-mobile-detail .editor-panes-wrap { display: block; }
  body[data-page="admin"] .editor-shell.editor-mobile-detail .editor-pane.hidden { display: none; }
  body[data-page="admin"] .editor-shell.editor-mobile-detail .editor-pane:not(.hidden) { display: block; }
  body[data-page="admin"] .editor-section { padding: 16px; border-radius: 18px; }
  body[data-page="admin"] .section { padding-top: 14px; }
}

@media (max-width: 980px) {
  .header-inner {
    gap: 12px;
    padding: 12px 0 14px;
  }
  .brand-banner {
    padding: 10px 14px;
    gap: 12px;
    justify-content: flex-start;
  }
  .brand-banner-copy { align-items: flex-start; text-align: left; }
  .brand-wordmark { font-size: 28px; margin: 0; }
  .brand-eyebrow, .brand-domain { display: none; }
  .brand-logo { width: 56px; height: 56px; border-radius: 16px; }
  .header-nav-row {
    width: 100%;
    flex-direction: row;
    justify-content: flex-end;
    gap: 12px;
  }
  .header-account { width: 100%; justify-content: flex-end; }
  .header-account .button { min-height: 42px; padding: 0 14px; }
  .mobile-dashboard,
  .mobile-section-header,
  .mobile-only-block,
  .install-help { display: block; }
  body[data-page="home"] .mobile-section-header { display: none; }
  .desktop-home-shell,
  .desktop-only-block { display: none; }
  .section { padding: 26px 0 40px; }
  .section-head { margin-bottom: 18px; }
  .section-head .eyebrow { display: none; }
  .section-head h2 { font-size: 30px; margin-bottom: 8px; }
  .section-head p { font-size: 15px; line-height: 1.7; }
  body[data-page="home"] .site-header { position: static; }
  body[data-page="home"] .header-nav-row { display: none; }
  body[data-page="home"] .brand-banner { justify-content: center; }
  body[data-page="home"] .brand-banner-copy { align-items: center; text-align: center; }
}

@media (max-width: 720px) {
  .container { width: min(var(--max), calc(100% - 18px)); }
  .mobile-tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mobile-tile { min-height: 104px; padding: 12px 10px; }
  .card-pad { padding: 16px; }
  .doc-row, .portal-row { padding: 14px; border-radius: 16px; }
  .button { width: 100%; }
  .auth-actions .button,
  .hero-actions .button,
  .mobile-event-actions .button,
  .header-account .button { width: auto; }
  .grid-2,
  .grid-3,
  .grid-4,
}

@media (pointer: coarse) {
  .button,
  .doc-row,
  .portal-row,
  .event-info-btn,
  .mobile-back-link {
    min-height: 48px;
  }
}

@media (orientation: landscape) and (max-width: 1024px) {
}

@media (min-width: 768px) and (max-width: 1180px) {
  .mobile-tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


@media (min-width: 390px) and (max-width: 980px) {
  .mobile-tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    display: none;
  }

}

@media (max-width: 389px) {
  .editor-mobile-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.chat-sidebar {
  display: grid;
  gap: 16px;
}

.chat-room-list {
  display: grid;
  gap: 10px;
}

.chat-room-btn {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.02);
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.chat-room-btn:hover,
.chat-room-btn:focus-visible {
  border-color: rgba(185, 28, 28, 0.45);
  transform: translateY(-1px);
}

.chat-room-btn.active {
  border-color: rgba(185, 28, 28, 0.65);
  background: rgba(185, 28, 28, 0.06);
}

.chat-room-btn-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.chat-room-btn-meta,
.chat-room-btn-desc {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.72);
}

.chat-main-panel {
  min-height: 640px;
}

.chat-room-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.chat-room-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chat-messages {
  margin-top: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.03);
  min-height: 360px;
  max-height: 60vh;
  overflow-y: auto;
  display: grid;
  gap: 12px;
}

.chat-message {
  border-radius: 14px;
  padding: 12px 14px;
  background: white;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.chat-message.system {
  background: rgba(185, 28, 28, 0.06);
  border-color: rgba(185, 28, 28, 0.18);
}

.chat-message-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.chat-message-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.chat-message-body {
  line-height: 1.55;
  word-break: break-word;
}

.chat-compose textarea {
  min-height: 96px;
  resize: vertical;
}

@media (max-width: 980px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }

  .chat-main-panel {
    min-height: 0;
  }

  .chat-room-header {
    flex-direction: column;
  }
}


.mobile-chat-rooms-toggle { display: none; min-width: 44px; padding: 8px 12px; justify-self: end; }
.chat-page-section .section-head { display:none; }
.chat-page-shell { padding-top: 16px; }
.chat-page-toolbar { margin-bottom: 8px; }
.chat-layout--conversation-first { display:grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 16px; align-items:start; }
.chat-sidebar-wrap { position: relative; }
.chat-sidebar-backdrop { display:none; }
.chat-room-notice { min-height: 1.2em; }
.chat-room-meta-inline { font-size: 0.95rem; }
.chat-rooms-toolbar { margin-bottom: 12px; }
.chat-sidebar-sections { display:grid; gap: 12px; }
.chat-room-section-title { margin: 0 0 8px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.chat-room-list--compact { gap: 6px; }
.chat-room-btn { padding: 8px 10px; border-radius: 12px; }
.chat-room-btn-meta, .chat-room-btn-desc { margin-top: 3px; font-size: 0.79rem; line-height: 1.35; }
.chat-main-panel { min-height: 0; display:flex; flex-direction:column; }
.chat-room-header--clean { margin-bottom: 8px; }
.chat-messages--conversation { flex: 0 1 auto; min-height: 280px; height: min(44vh, 360px); max-height: min(44vh, 360px); padding: 14px; gap: 10px; background: rgba(15, 23, 42, 0.025); }
.chat-message-row { display:flex; justify-content:flex-start; }
.chat-message-row.own { justify-content:flex-end; }
.chat-message { max-width: min(78%, 720px); border-radius: 18px; padding: 10px 12px; background: #ffffff; border: 1px solid rgba(148, 163, 184, 0.18); box-shadow: 0 4px 12px rgba(15,23,42,0.04); }
.chat-message.own { background: rgba(15, 23, 42, 0.08); border-color: rgba(15, 23, 42, 0.12); }
.chat-message.system { max-width: 100%; background: rgba(185, 28, 28, 0.06); border-color: rgba(185, 28, 28, 0.16); }
.chat-message-head { display:none; }
.chat-message-author { font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.chat-message-stamp { margin-top: 6px; font-size: 0.72rem; color: var(--muted); text-align: right; }
.chat-message.system .chat-message-stamp { text-align: left; }
.chat-compose--sticky { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(255,247,247,0), rgba(255,247,247,.96) 24%, rgba(255,247,247,.96)); padding-top: 8px; margin-top: 10px; }
.chat-compose-field textarea { min-height: 72px; resize: vertical; }
.chat-compose-actions { display:flex; flex-wrap: wrap; gap: 10px; align-items:center; }

@media (max-width: 980px) {
  .mobile-chat-rooms-toggle { display: inline-flex; }
  .desktop-chat-rooms-toggle { display:none; }
  .chat-page-shell { padding-top: 12px; }
  .chat-page-toolbar { display:none; }
  .chat-layout--conversation-first { grid-template-columns: 1fr; }
  .chat-main-panel { order: 1; }
  .chat-sidebar-wrap { order: 2; }
  .chat-sidebar-wrap { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
  .chat-sidebar-wrap.open { pointer-events: auto; }
  .chat-sidebar-backdrop { display:block; position:absolute; inset:0; background: rgba(15, 23, 42, 0.45); opacity:0; transition: opacity .2s ease; }
  .chat-sidebar-wrap.open .chat-sidebar-backdrop { opacity: 1; }
  .chat-sidebar { position:absolute; top:0; right:0; width:min(84vw, 360px); max-height:100vh; overflow:auto; padding: 14px; background: #f3efe4; box-shadow: -18px 0 36px rgba(15,23,42,.22); transform: translateX(100%); transition: transform .25s ease; }
  .chat-sidebar-wrap.open .chat-sidebar { transform: translateX(0); }
  .chat-messages--conversation { min-height: 240px; height: 42vh; max-height: 42vh; }
  .chat-message { max-width: 88%; }
}


.chat-sidebar.open { transform: translateX(0); }
.chat-sidebar-backdrop.open { opacity: 1; }
.chat-rooms-close-btn { display:none; }
@media (max-width: 980px) {
  .chat-rooms-close-btn { display:inline-flex; }
}


.chat-reply-preview,
.chat-attachment-preview {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
  padding:8px 10px;
  border-radius:12px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--muted);
  font-size: 0.86rem;
}
.chat-reply-preview.hidden,
.chat-attachment-preview.hidden { display:none; }
.chat-reply-preview-copy { display:grid; gap:2px; min-width:0; }
.chat-reply-preview-copy span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-reply-cancel { border:0; background:transparent; color:var(--muted); font-size:22px; line-height:1; cursor:pointer; }
.chat-message.replyable { cursor:pointer; }
.chat-message.replyable:hover { border-color: rgba(185, 28, 28, 0.28); }
.chat-message-quote {
  display:grid;
  gap:3px;
  margin-bottom:8px;
  padding:7px 9px;
  border-left:3px solid rgba(185, 28, 28, 0.45);
  border-radius:10px;
  background: rgba(185, 28, 28, 0.055);
  color: var(--muted);
  font-size: 0.82rem;
}
.chat-message-quote span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-link { color: var(--accent); text-decoration: underline; overflow-wrap:anywhere; }
.chat-attachments { display:grid; gap:8px; margin-top:8px; }
.chat-attachment {
  border:1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255,255,255,.78);
  border-radius:12px;
  padding:8px 10px;
  text-align:left;
  color:var(--text);
  cursor:pointer;
}
.chat-attachment small { color:var(--muted); }
.chat-attachment-image-wrap { display:grid; gap:6px; max-width:220px; }
.chat-attachment-image {
  width:180px;
  max-width:100%;
  height:120px;
  object-fit:cover;
  border-radius:10px;
  background:rgba(15,23,42,.08);
  display:block;
}
.chat-attachment-file { width:100%; overflow-wrap:anywhere; }

.global-login-secondary-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.global-login-secondary-actions .button,
.global-login-reset-actions .button,
.global-login-primary-actions .button {
  width: auto;
}
@media (max-width: 720px) {
  .global-login-secondary-actions .button,
  .global-login-reset-actions .button,
  .global-login-primary-actions .button {
    width: 100%;
  }
}

.password-toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 6px;
}
.password-toggle-row input {
  margin: 0;
}
.button.is-busy {
  opacity: 0.9;
}
.button-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: currentColor;
  border-radius: 999px;
  display: inline-block;
  animation: lroc-spin 0.8s linear infinite;
}
@keyframes lroc-spin {
  to { transform: rotate(360deg); }
}

.inline-spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(20,59,45,.18);
  border-top-color: var(--accent);
  display: inline-block;
  animation: lroc-spin .8s linear infinite;
}

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 140px;
  color: var(--muted);
  font-weight: 600;
}

  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@keyframes lroc-spin {
  to { transform: rotate(360deg); }
}

/* LROC theme additions */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(243,239,228,.96), rgba(243,239,228,.76), rgba(243,239,228,.92)), url("assets/lroc-banner.jpeg") center/cover no-repeat;
  opacity: .32;
  z-index: -1;
}
.brand-logo { object-fit: contain; }
.pill, .tag, .doc-tag { font-family: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif; letter-spacing: .12em; }
