:root {
  color-scheme: light;
  --navy: #11132e;
  --deep-navy: #071425;
  --blue: #126ba8;
  --cyan: #35b6e5;
  --sky: #e4f4fb;
  --burgundy: #741020;
  --red: #af1f32;
  --gold: #f5b700;
  --green: #179b61;
  --orange: #e7841b;
  --ink: #171a2b;
  --muted: #667085;
  --soft: #ececf2;
  --canvas: #f8f6f1;
  --white: #fff;
  --line: #e4e5ea;
  --shadow: 0 10px 26px rgba(7, 20, 37, .08);
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { background: #ebe9e4; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background: #ebe9e4;
  color: var(--ink);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
a { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(18, 107, 168, .28);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.network-status {
  position: fixed;
  z-index: 150;
  inset: 0 0 auto;
  padding: 9px 18px;
  background: var(--burgundy);
  color: white;
  text-align: center;
  font-size: .82rem;
  font-weight: 800;
}

.app-frame {
  width: min(100%, 520px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--canvas);
  box-shadow: 0 0 0 1px rgba(7,20,37,.06), 0 20px 70px rgba(7,20,37,.12);
}

.app-header {
  position: sticky;
  z-index: 35;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: max(12px, env(safe-area-inset-top)) 12px 9px 18px;
  border-bottom: 1px solid rgba(228,229,234,.92);
  background: rgba(248,246,241,.96);
  backdrop-filter: blur(14px);
}
.brand-button {
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  text-align: left;
}
.brand-button img, .dialog-card > img {
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px white, 0 0 0 4px rgba(53,182,229,.24);
}
.brand-button span { min-width: 0; }
.brand-button strong {
  display: block;
  font-size: 1.18rem;
  line-height: 1.05;
  font-weight: 900;
}
.brand-button small {
  display: block;
  max-width: 240px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-icon-button, .icon-button, .text-button {
  min-height: 40px;
  padding: 8px 11px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--blue);
  font-weight: 900;
}
.header-icon-button { background: var(--sky); font-size: .78rem; }
.install-button { background: white; border: 1px solid var(--line); color: var(--navy); }
.header-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: 5px;
  place-content: center;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--burgundy);
  color: white;
  font-size: .62rem;
}

.app-content {
  min-height: calc(100dvh - 142px);
  padding: 6px 0 98px;
  outline: none;
}
.loading-card {
  display: grid;
  min-height: 60vh;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid var(--sky);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.bottom-nav {
  position: fixed;
  z-index: 40;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 520px);
  min-height: 70px;
  margin: 0 auto;
  padding: 5px 5px max(6px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.97);
  box-shadow: 0 -8px 24px rgba(7,20,37,.055);
  backdrop-filter: blur(16px);
}
.bottom-nav button {
  display: grid;
  gap: 3px;
  place-items: center;
  padding: 5px 2px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 800;
}
.bottom-nav .nav-icon { font-size: 1.25rem; line-height: 1; }
.bottom-nav button.active { color: var(--blue); }
.bottom-nav button.active .nav-icon {
  min-width: 42px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--sky);
}
.bottom-nav .scan-nav .nav-icon { color: var(--burgundy); font-size: 1.45rem; }
.bottom-nav .scan-nav.active .nav-icon { color: var(--burgundy); background: #f8e8eb; }

.screen-pad { padding: 6px 18px 22px; }
.page-heading { margin: 5px 0 14px; }
.page-heading h1, .page-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.62rem;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.025em;
}
.page-heading p { margin: 7px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: .7rem; font-weight: 900; letter-spacing: .08em; }
.section-kicker { margin: 16px 0 9px; color: var(--navy); font-size: .72rem; font-weight: 900; letter-spacing: .06em; }

.home-pager-shell { overflow: hidden; }
.home-pages {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.home-pages::-webkit-scrollbar { display: none; }
.home-page {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  padding: 6px 18px 14px;
  scroll-snap-align: start;
}
.page-navigator {
  position: sticky;
  bottom: 76px;
  z-index: 12;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin: 0 18px 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 24px rgba(7,20,37,.08);
  backdrop-filter: blur(12px);
}
.page-navigator button {
  display: grid;
  width: 38px;
  height: 38px;
  place-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--sky);
  color: var(--blue);
  font-size: 1.15rem;
  font-weight: 900;
}
.page-navigator button:disabled { visibility: hidden; }
.page-indicators { display: flex; justify-content: center; align-items: center; gap: 6px; }
.page-dot { width: 7px; height: 7px; border: 0; border-radius: 99px; padding: 0; background: #c9cdd4; transition: width .18s ease; }
.page-dot.active { width: 22px; background: var(--blue); }

.cms-list { display: grid; gap: 12px; }
.cms-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 164px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--navy);
  color: white;
  box-shadow: var(--shadow);
  text-align: left;
}
.cms-card.large { min-height: 220px; }
.cms-card.video { min-height: 205px; }
.cms-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cms-card img.contain-visual { object-fit: cover; object-position: center top; background: var(--deep-navy); }
.cms-card-fallback { position: absolute; inset: 0; background: linear-gradient(145deg, var(--deep-navy), var(--blue)); }
.cms-card-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(7,20,37,.12), rgba(7,20,37,.68) 52%, rgba(7,20,37,.95)); }
.cms-card-copy { position: relative; z-index: 2; display: flex; min-height: inherit; flex-direction: column; padding: 16px; }
.cms-card.large .cms-card-copy { padding: 18px; }
.cms-badge-row { display: flex; align-items: center; gap: 8px; }
.cms-badge {
  display: inline-flex;
  max-width: 82%;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: var(--navy);
  font-size: .56rem;
  font-weight: 900;
  letter-spacing: .055em;
}
.cms-featured { margin-left: auto; padding: 5px 8px; border-radius: 999px; background: rgba(0,0,0,.52); font-size: .52rem; font-weight: 900; letter-spacing: .05em; }
.cms-spacer { flex: 1; min-height: 28px; }
.cms-card h3 { margin: 0; color: white; font-size: 1.08rem; line-height: 1.1; font-weight: 900; }
.cms-card.large h3 { font-size: 1.4rem; }
.cms-card p { margin: 7px 0 0; color: rgba(255,255,255,.88); font-size: .74rem; line-height: 1.35; }
.cms-arrow { align-self: flex-end; margin-top: 7px; font-size: 1.2rem; }
.cms-play { position: absolute; z-index: 2; inset: 50% auto auto 50%; display: grid; width: 56px; height: 56px; place-content: center; transform: translate(-50%,-50%); border-radius: 50%; background: rgba(255,255,255,.92); color: var(--burgundy); font-size: 1.6rem; }

.empty-state, .panel, .case-card, .notification-card, .receipt-card, .form-card, .account-card, .community-card, .scanner-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  box-shadow: 0 6px 20px rgba(7,20,37,.045);
}
.empty-state { padding: 24px 20px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 7px; color: var(--navy); }
.empty-state p { margin: 0 0 14px; line-height: 1.45; }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.quick-tile {
  display: grid;
  min-height: 112px;
  align-content: space-between;
  padding: 14px;
  border: 0;
  border-radius: 18px;
  background: white;
  box-shadow: 0 0 0 1px var(--line);
  color: var(--navy);
  text-align: left;
  text-decoration: none;
}
.quick-icon { display: grid; width: 36px; height: 36px; place-content: center; border-radius: 12px; background: var(--tile-soft, var(--sky)); color: var(--tile, var(--blue)); font-size: 1.15rem; font-weight: 900; }
.quick-tile strong { display: block; margin-top: 10px; font-size: .77rem; font-weight: 900; letter-spacing: .02em; }
.quick-tile small { display: block; margin-top: 3px; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.quick-tile.blue { --tile: var(--blue); --tile-soft: var(--sky); }
.quick-tile.burgundy { --tile: var(--burgundy); --tile-soft: #f8e8eb; }
.quick-tile.green { --tile: var(--green); --tile-soft: #e6f6ee; }
.quick-tile.orange { --tile: var(--orange); --tile-soft: #fff0df; }

.account-card { padding: 18px; }
.account-card h3 { margin: 0; color: var(--navy); font-size: 1.05rem; }
.account-card p { margin: 6px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.account-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin: 15px 0; }
.account-stat { padding: 12px; border-radius: 15px; background: var(--canvas); }
.account-stat strong { display: block; color: var(--navy); font-size: 1.1rem; }
.account-stat small { color: var(--muted); font-size: .66rem; font-weight: 700; }
.account-links { display: grid; gap: 8px; }
.website-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--navy); color: white; text-decoration: none; }
.website-card strong { display: block; font-size: .9rem; }
.website-card small { color: #d6dae3; font-size: .7rem; }

.connect-hero {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--navy);
  box-shadow: var(--shadow);
}
.connect-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.connect-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(7,20,37,.15), rgba(7,20,37,.93)); }
.connect-hero-copy { position: relative; z-index: 2; display: flex; min-height: 240px; flex-direction: column; justify-content: flex-end; padding: 20px; color: white; }
.connect-hero-copy .eyebrow { color: white; opacity: .9; }
.connect-hero-copy h2 { margin: 0; font-size: 1.55rem; line-height: 1.05; font-weight: 900; white-space: pre-line; }
.connect-hero-copy p { margin: 9px 0 0; color: rgba(255,255,255,.86); font-size: .77rem; line-height: 1.4; }
.connect-hero-copy button { align-self: flex-start; margin-top: 14px; }

.community-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 20px; }
.community-head strong { color: var(--navy); font-size: .75rem; letter-spacing: .06em; }
.live-pill { padding: 5px 9px; border-radius: 999px; background: var(--sky); color: var(--blue); font-size: .56rem; font-weight: 900; letter-spacing: .04em; }
.channel-tabs { display: grid; grid-template-columns: repeat(2,1fr); gap: 5px; margin: 10px 0; padding: 4px; border-radius: 16px; background: var(--soft); }
.channel-tabs button { min-height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 900; }
.channel-tabs button.active { background: white; color: var(--navy); box-shadow: 0 3px 12px rgba(7,20,37,.08); }
.community-compose { display: grid; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.community-compose textarea { min-height: 84px; }
.community-list { display: grid; gap: 10px; margin-top: 10px; }
.community-card { padding: 15px; }
.community-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.community-card strong { color: var(--navy); font-size: .82rem; }
.community-card time { color: var(--muted); font-size: .64rem; }
.community-card p { margin: 10px 0 0; color: var(--ink); font-size: .8rem; line-height: 1.45; white-space: pre-wrap; }
.pending-pill { display: inline-flex; margin-top: 10px; padding: 5px 8px; border-radius: 999px; background: #fff3d2; color: #7a5900; font-size: .55rem; font-weight: 900; letter-spacing: .04em; }
.area-label { margin: 7px 0 0; color: var(--muted); font-size: .7rem; }

.scanner-card { padding: 18px; }
.scanner-frame { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 22px; background: var(--deep-navy); }
.scanner-frame video { width: 100%; height: 100%; object-fit: cover; }
.scanner-corners { position: absolute; inset: 14%; border: 3px solid rgba(255,255,255,.9); border-radius: 20px; box-shadow: 0 0 0 999px rgba(7,20,37,.38); pointer-events: none; }
.scanner-status { min-height: 42px; margin: 12px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.scanner-status.error { color: var(--burgundy); font-weight: 800; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 20px 18px 12px; }
.section-heading h1, .section-heading h2 { margin: 0; color: var(--navy); line-height: 1.08; letter-spacing: -.02em; }
.section-heading h1 { font-size: 1.62rem; }
.section-heading h2 { font-size: 1.25rem; }
.section-heading p { margin: 6px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.panel, .case-card, .notification-card, .receipt-card, .form-card, .error-card, .empty-card { margin-right: 18px; margin-left: 18px; }
.panel { padding: 18px; }
.empty-card { padding: 26px 20px; color: var(--muted); text-align: center; }
.empty-card strong { display: block; margin-bottom: 8px; color: var(--navy); font-size: 1rem; }

.status-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status-pill, .category-pill { display: inline-flex; align-items: center; min-height: 27px; padding: 5px 10px; border-radius: 999px; background: var(--sky); color: var(--blue); font-size: .68rem; font-weight: 900; }
.status-pill.due { background: #fff0df; color: #a14c00; }
.status-pill.closed { background: #def5e8; color: var(--green); }
.category-pill { background: var(--soft); color: var(--navy); }
.case-list, .notification-list, .timeline { display: grid; gap: 12px; padding: 0 18px; }
.case-list .case-card, .notification-list .notification-card { margin: 0; }
.case-card, .notification-card { width: 100%; padding: 16px; color: var(--ink); text-align: left; }
.case-card { display: grid; gap: 10px; border: 1px solid var(--line); }
.case-card h3, .notification-card h3 { margin: 0; color: var(--navy); font-size: .95rem; }
.case-card p, .notification-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.case-reference { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--navy); font-size: .78rem; font-weight: 900; overflow-wrap: anywhere; }
.case-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .7rem; }

.form-card { display: grid; gap: 17px; padding: 20px; }
label { display: grid; gap: 8px; color: var(--navy); font-size: .84rem; font-weight: 800; }
input, select, textarea { width: 100%; min-height: 52px; padding: 13px 15px; border: 1px solid #d9dee7; border-radius: 18px; background: white; color: var(--ink); }
textarea { min-height: 125px; resize: vertical; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #9ba3b1; }
.help-text { margin: -3px 0 0; color: var(--muted); font-size: .74rem; font-weight: 500; line-height: 1.45; }
.form-grid { display: grid; gap: 15px; }
.check-row { grid-template-columns: 24px 1fr; align-items: start; color: var(--ink); font-size: .76rem; font-weight: 600; line-height: 1.45; }
.check-row input { width: 20px; min-height: 20px; margin: 2px 0 0; accent-color: var(--blue); }
.primary-button, .secondary-button, .danger-button { min-height: 50px; padding: 12px 16px; border: 0; border-radius: 16px; font-weight: 900; }
.primary-button { background: var(--blue); color: white; }
.secondary-button { border: 1px solid var(--blue); background: white; color: var(--blue); }
.danger-button { background: var(--burgundy); color: white; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.button-row > * { flex: 1 1 145px; }
.location-box { display: grid; gap: 12px; padding: 16px; border-radius: 18px; background: var(--sky); }
.location-state { color: var(--blue); font-size: .76rem; font-weight: 800; }

.receipt-card { overflow: hidden; }
.receipt-head { padding: 20px; background: var(--navy); color: white; }
.receipt-head h2 { margin: 8px 0; font-size: 1.55rem; overflow-wrap: anywhere; }
.receipt-body { display: grid; gap: 13px; padding: 20px; }
.receipt-item { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.receipt-item:last-child { border: 0; }
.receipt-item small { color: var(--muted); font-weight: 800; }
.timeline { position: relative; margin-left: 9px; }
.timeline::before { content: ""; position: absolute; inset: 14px auto 14px 31px; width: 3px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 14px; }
.timeline-dot { position: relative; z-index: 1; display: grid; width: 28px; height: 28px; place-content: center; border: 4px solid var(--canvas); border-radius: 50%; background: var(--blue); color: white; font-size: .65rem; font-weight: 900; }
.timeline-copy { padding: 2px 0 18px; }
.timeline-copy h4 { margin: 0 0 5px; color: var(--navy); }
.timeline-copy p { margin: 0 0 5px; color: var(--muted); line-height: 1.45; }
.timeline-copy time { color: var(--muted); font-size: .72rem; }
.message-list { display: grid; gap: 10px; max-height: 420px; overflow: auto; padding: 5px 2px; }
.message { max-width: 82%; padding: 11px 13px; border-radius: 16px; background: var(--soft); }
.message.resident { justify-self: end; background: var(--sky); color: var(--navy); }
.message p { margin: 0; line-height: 1.4; }
.message small { display: block; margin-top: 6px; color: var(--muted); font-size: .68rem; }
.outcome-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.outcome-button { min-height: 55px; padding: 10px; border: 2px solid var(--line); border-radius: 15px; background: white; color: var(--navy); font-weight: 900; }
.outcome-button[data-outcome="fixed"] { border-color: var(--green); color: var(--green); }
.outcome-button[data-outcome="not_fixed"] { border-color: var(--red); color: var(--red); }
.outcome-button[data-outcome="problem_returned"] { border-color: var(--burgundy); color: var(--burgundy); }
.notification-card { display: grid; grid-template-columns: 11px 1fr; gap: 13px; }
.notification-card.unread { border-color: var(--cyan); background: #f8fdff; }
.notification-mark { width: 11px; height: 11px; margin-top: 5px; border-radius: 50%; background: var(--line); }
.notification-card.unread .notification-mark { background: var(--blue); }

.privacy-note { margin: 14px 18px; padding: 15px; border-left: 5px solid var(--burgundy); border-radius: 14px; background: #fff6f6; color: #5c2830; line-height: 1.5; font-size: .78rem; }
.draft-note { margin: 0 18px 12px; padding: 13px; border-radius: 14px; background: #fff7d6; color: #735b00; font-size: .78rem; font-weight: 700; }
.error-card { padding: 20px; border: 1px solid #efb8bd; border-radius: 18px; background: #fff4f5; color: #7e1824; }
.legal-links { display: flex; flex-wrap: wrap; gap: 18px; }
.legal-links a, .check-row a { color: var(--blue); font-weight: 900; }

.auth-dialog, .content-sheet {
  width: min(calc(100% - 18px), 500px);
  max-height: calc(100vh - 18px);
  padding: 0;
  border: 0;
  background: transparent;
}
.auth-dialog { border-radius: 24px; }
.auth-dialog::backdrop, .content-sheet::backdrop { background: rgba(7,20,37,.66); backdrop-filter: blur(4px); }
.dialog-card { position: relative; display: grid; gap: 16px; max-height: calc(100vh - 24px); padding: 26px; overflow: auto; border-radius: 24px; background: white; }
.dialog-card > img { margin: 2px auto 8px; }
.dialog-card h1 { margin: -4px 0 0; color: var(--navy); text-align: center; }
.dialog-card > p:not(.eyebrow):not(.form-message) { margin: -5px 0 3px; color: var(--muted); line-height: 1.5; text-align: center; }
.dialog-card .eyebrow { text-align: center; }
.dialog-close { position: absolute; z-index: 5; top: 13px; right: 13px; display: grid; width: 38px; height: 38px; place-content: center; border: 0; border-radius: 50%; background: var(--soft); color: var(--navy); font-size: 1.4rem; }
.otp-input { letter-spacing: .5em; text-align: center; font-size: 1.4rem; font-weight: 900; }
.form-message { min-height: 20px; margin: 0; color: var(--red); font-size: .78rem; font-weight: 700; text-align: center; }

.content-sheet { margin: auto auto 0; width: min(100%, 520px); max-height: 82dvh; }
.content-sheet-card { position: relative; max-height: 82dvh; overflow: auto; padding: 12px 20px 28px; border-radius: 26px 26px 0 0; background: white; }
.sheet-handle { width: 46px; height: 5px; margin: 0 auto 12px; border-radius: 99px; background: #d7d9df; }
.sheet-visual { width: 100%; max-height: 260px; margin-bottom: 16px; border-radius: 18px; object-fit: cover; background: var(--soft); }
.sheet-visual.contain-visual { display: block; max-height: none; aspect-ratio: 2 / 3; object-fit: contain; object-position: center; background: var(--deep-navy); }
.sheet-video { width: 100%; max-height: 320px; margin-bottom: 16px; border-radius: 18px; background: black; }
.content-sheet-card .eyebrow { margin-right: 50px; }
.content-sheet-card h2 { margin: 0; color: var(--navy); font-size: 1.45rem; line-height: 1.12; font-weight: 900; }
.content-sheet-card .sheet-summary { margin: 10px 0 0; color: var(--muted); font-weight: 700; line-height: 1.45; }
.content-sheet-card .sheet-body { margin: 12px 0 0; color: var(--navy); line-height: 1.55; white-space: pre-wrap; }
.content-sheet-actions { display: grid; gap: 9px; margin-top: 18px; }
.content-sheet-actions a { display: grid; min-height: 50px; place-content: center; border-radius: 16px; background: var(--blue); color: white; text-align: center; text-decoration: none; font-weight: 900; }

.toast {
  position: fixed;
  z-index: 170;
  right: 18px;
  bottom: 86px;
  left: 18px;
  width: min(calc(100% - 36px), 460px);
  margin: 0 auto;
  padding: 13px 16px;
  border-radius: 16px;
  background: var(--navy);
  color: white;
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 800;
  font-size: .8rem;
}

@media (min-width: 700px) {
  .app-frame { margin-top: 14px; margin-bottom: 14px; min-height: calc(100vh - 28px); border-radius: 30px; overflow: clip; }
  .app-header { top: 14px; }
  .bottom-nav { bottom: 14px; border-radius: 0 0 30px 30px; }
  .content-sheet { border-radius: 26px 26px 0 0; }
}
@media (max-width: 380px) {
  .brand-button small { max-width: 165px; }
  .home-page { padding-right: 14px; padding-left: 14px; }
  .quick-grid { gap: 8px; }
  .quick-tile { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ============================================================
   CONNECT ACCESS GATE V1.1
   First screen mirrors the approved MSJ mobile entry experience.
   Real CMS/community content is not rendered until this browser has
   either completed MSJ registration from the gate or verified login.
   ============================================================ */
body.connect-gated {
  background: #061a2e;
}
body.connect-gated .app-frame {
  width: min(100%, 520px);
  min-height: 100vh;
  min-height: 100dvh;
  background: #071a2d;
  box-shadow: none;
}
body.connect-gated .app-content {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
}
.access-gateway {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  padding: max(18px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #07233d 0%, #07192b 54%, #061525 100%);
  color: #fff;
}
.gateway-orb {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  opacity: .42;
}
.gateway-orb-top {
  width: 250px;
  height: 250px;
  top: -84px;
  right: -104px;
  background: #0f4772;
}
.gateway-orb-bottom {
  width: 220px;
  height: 220px;
  left: -125px;
  bottom: 82px;
  background: #66213d;
  opacity: .34;
}
.gateway-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}
.gateway-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.gateway-brand img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 0 0 4px rgba(53,182,229,.35);
}
.gateway-brand strong {
  display: block;
  font-size: 1rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .01em;
}
.gateway-brand small {
  display: block;
  margin-top: 5px;
  color: rgba(255,255,255,.66);
  font-size: .61rem;
  font-weight: 700;
}
.gateway-web {
  display: grid;
  width: 40px;
  height: 40px;
  place-content: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
}
.gateway-body {
  position: relative;
  z-index: 2;
}
.gateway-body h1 {
  max-width: 370px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.75rem, 11vw, 4.25rem);
  line-height: .9;
  font-weight: 950;
  letter-spacing: -.055em;
}
.gateway-intro {
  max-width: 410px;
  margin: 20px 0 24px;
  color: rgba(255,255,255,.82);
  font-size: .84rem;
  line-height: 1.55;
  font-weight: 650;
}
.gateway-steps {
  display: grid;
  gap: 10px;
}
.gateway-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: start;
  min-height: 76px;
  padding: 14px 15px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 18px;
  background: rgba(255,255,255,.085);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  backdrop-filter: blur(7px);
}
.gateway-step > span {
  padding-top: 1px;
  color: #ffb600;
  font-size: .62rem;
  font-weight: 950;
}
.gateway-step strong {
  display: block;
  color: #fff;
  font-size: .83rem;
  font-weight: 950;
}
.gateway-step p {
  margin: 5px 0 0;
  color: rgba(255,255,255,.62);
  font-size: .68rem;
  line-height: 1.35;
}
.gateway-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
.gateway-button {
  display: grid;
  min-height: 54px;
  place-content: center;
  border-radius: 16px;
  text-decoration: none;
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .02em;
}
.gateway-button.register {
  border: 1px solid #ffb600;
  background: #ffb600;
  color: #071425;
}
.gateway-button.login {
  border: 1px solid rgba(255,255,255,.56);
  background: transparent;
  color: #fff;
}
.gateway-scan {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: .72rem;
  font-weight: 850;
}
.gateway-scan span {
  color: rgba(255,255,255,.72);
  font-size: 1rem;
}
.gateway-disclaimer {
  max-width: 390px;
  margin: 12px auto 0;
  color: rgba(255,255,255,.42);
  font-size: .57rem;
  line-height: 1.45;
  text-align: center;
}
.gate-scanner-pad {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: max(20px, env(safe-area-inset-top));
  background: #071a2d;
  color: #fff;
}
.gate-scanner-pad .page-heading h1,
.gate-scanner-pad .page-heading p { color: #fff; }
.gate-scanner-pad .page-heading p { opacity: .72; }
.gate-back {
  margin-bottom: 18px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 850;
}

@media (min-width: 700px) {
  body.connect-gated { background: #e8e6e0; }
  body.connect-gated .app-frame {
    box-shadow: 0 20px 70px rgba(7,20,37,.18);
  }
}

/* MSJ candidate card face-focus */
.cms-card img.contain-visual {
  object-fit: cover;
  object-position: 74% 24%;
  background: transparent;
}

/* MSJ CONNECT QR DISPLAY FIX V1.0.0 START */
.scanner-frame .official-registration-qr {
  position: absolute;
  inset: 5%;
  z-index: 4;
  width: 90%;
  height: 90%;
  object-fit: contain;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(7,20,37,.18);
}

.scanner-frame .official-registration-qr[hidden] {
  display: none !important;
}

.scanner-frame .scanner-corners {
  z-index: 3;
}

.official-qr-help {
  margin: 12px 0 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .82rem;
  line-height: 1.45;
  font-weight: 700;
}

@media (max-width: 520px) {
  .scanner-frame .official-registration-qr {
    inset: 4%;
    width: 92%;
    height: 92%;
    padding: 8px;
    border-radius: 16px;
  }
}
/* MSJ CONNECT QR DISPLAY FIX V1.0.0 END */
