:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #687086;
  --soft: #f3f5fa;
  --line: #e5e8f1;
  --surface: #ffffff;
  --primary: #4b4bce;
  --primary-dark: #3535a8;
  --primary-soft: #eeeeff;
  --amber: #f4a94f;
  --amber-soft: #fff4e4;
  --teal: #148477;
  --teal-soft: #e5f7f3;
  --shadow: 0 18px 50px rgba(39, 44, 74, 0.1);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: #e9edf6;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(75, 75, 206, 0.12), transparent 34rem),
    #e9edf6;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(75, 75, 206, 0.35);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
}

.demo-banner {
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.48rem 1rem;
  color: #ffffff;
  background: #252554;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}

.demo-banner span {
  opacity: 0.72;
}

.app-shell {
  position: relative;
  width: min(100%, 720px);
  min-height: calc(100vh - 31px);
  min-height: calc(100dvh - 31px);
  margin: 0 auto;
  padding-bottom: 6.5rem;
  overflow: hidden;
  background: #f8f9fc;
  box-shadow: var(--shadow);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  padding: 0 1.25rem;
  background: rgba(248, 249, 252, 0.92);
  border-bottom: 1px solid rgba(229, 232, 241, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-mark {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  border-radius: 0.8rem 0.8rem 0.8rem 0.28rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(75, 75, 206, 0.25);
}

.brand > span:last-child {
  display: flex;
  align-items: baseline;
  font-size: 1.05rem;
}

.brand small {
  margin-left: 0.2rem;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.avatar {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  place-items: center;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 0;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
}

.main-content {
  padding: 1.6rem 1.2rem 2rem;
}

.page-heading {
  margin-bottom: 1.35rem;
}

.page-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.page-heading h1 {
  max-width: 18ch;
  margin: 0.2rem 0 0.42rem;
  font-size: clamp(1.8rem, 8vw, 2.5rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.page-heading > p:last-child,
.page-heading > div > p:last-child {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.3rem;
  color: #ffffff;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.18), transparent 45%),
    linear-gradient(145deg, #4b4bce, #34348f);
  border-radius: 1.5rem;
  box-shadow: 0 18px 36px rgba(75, 75, 206, 0.24);
}

.progress-copy {
  min-width: 0;
  flex: 1;
}

.status-pill {
  display: inline-flex;
  padding: 0.35rem 0.55rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.progress-card h2 {
  margin: 0.8rem 0 0.4rem;
  font-size: 1.3rem;
  line-height: 1.18;
}

.progress-card h2 small {
  display: inline-block;
  padding: 0.16rem 0.34rem;
  color: #3535a8;
  background: #ffffff;
  border-radius: 0.35rem;
  font-size: 0.56rem;
  vertical-align: 0.2rem;
}

.progress-card p {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.83rem;
  line-height: 1.5;
}

.progress-ring {
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  flex: 0 0 auto;
  place-items: center;
  background:
    radial-gradient(circle, #4141a8 55%, transparent 57%),
    conic-gradient(#ffffff 40%, rgba(255, 255, 255, 0.18) 0);
  border-radius: 50%;
}

.progress-ring span {
  font-size: 1.15rem;
  font-weight: 800;
}

.progress-ring small {
  font-size: 0.62rem;
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.72rem 0.9rem;
  border: 0;
  border-radius: 0.8rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.button-primary {
  color: var(--primary-dark);
  background: #ffffff;
}

.button-secondary {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(75, 75, 206, 0.18);
}

.button-full {
  width: 100%;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
}

.button .icon,
.quick-card > .icon {
  width: 1rem;
  height: 1rem;
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.section-title-compact {
  margin-top: 1.8rem;
}

.section-title h2 {
  margin: 0.15rem 0 0;
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--teal);
  font-size: 0.65rem;
  font-weight: 800;
}

.live-dot::before {
  width: 0.42rem;
  height: 0.42rem;
  content: "";
  background: var(--teal);
  border-radius: 50%;
}

.event-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  box-shadow: 0 9px 24px rgba(39, 44, 74, 0.06);
}

.event-time {
  display: grid;
  min-width: 3.5rem;
  min-height: 3.5rem;
  place-items: center;
  align-content: center;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 0.85rem;
}

.event-time strong {
  font-size: 0.92rem;
}

.event-time span {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.event-card h3,
.event-card p {
  margin: 0;
}

.event-card h3 {
  margin-bottom: 0.28rem;
  font-size: 0.95rem;
}

.event-card p {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.event-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 50%;
}

.quick-grid {
  display: grid;
  gap: 0.7rem;
}

.quick-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.05rem;
}

.quick-icon {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border-radius: 0.8rem;
}

.quick-icon-violet {
  color: var(--primary);
  background: var(--primary-soft);
}

.quick-icon-amber {
  color: #a55d04;
  background: var(--amber-soft);
}

.quick-card strong,
.quick-card small {
  display: block;
}

.quick-card strong {
  margin-bottom: 0.2rem;
  font-size: 0.86rem;
}

.quick-card small {
  color: var(--muted);
  font-size: 0.7rem;
}

.quick-card > .icon {
  color: #949bad;
}

.step-count,
.preview-status {
  flex: 0 0 auto;
  padding: 0.42rem 0.6rem;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.step-track {
  height: 0.35rem;
  margin-bottom: 1.4rem;
  overflow: hidden;
  background: #e4e6ef;
  border-radius: 999px;
}

.step-track span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.setup-list {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  list-style: none;
}

.setup-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem;
  color: #72798c;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.setup-item.is-current {
  color: var(--ink);
  background: var(--surface);
  border-color: rgba(75, 75, 206, 0.35);
  box-shadow: 0 10px 26px rgba(39, 44, 74, 0.06);
}

.step-number {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  background: #eceef4;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
}

.is-current .step-number {
  color: #ffffff;
  background: var(--primary);
}

.setup-item strong,
.setup-item p {
  margin: 0;
}

.setup-item strong {
  font-size: 0.86rem;
}

.setup-item p {
  margin-top: 0.2rem;
  font-size: 0.7rem;
}

.step-state {
  font-size: 0.62rem;
  font-weight: 700;
}

.is-current .step-state {
  color: var(--primary);
}

.demo-notice {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0.9rem;
  color: #6b511d;
  background: var(--amber-soft);
  border: 1px solid #f6ddb6;
  border-radius: 1rem;
}

.demo-notice-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  color: #ffffff;
  background: var(--amber);
  border-radius: 50%;
}

.demo-notice strong,
.demo-notice p {
  margin: 0;
}

.demo-notice strong {
  font-size: 0.78rem;
}

.demo-notice p {
  margin-top: 0.25rem;
  font-size: 0.68rem;
  line-height: 1.45;
}

.public-preview {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e4ed;
  border-radius: 1.5rem;
  box-shadow: 0 20px 44px rgba(39, 44, 74, 0.12);
}

.public-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem;
  border-bottom: 1px solid #edf0f5;
}

.parish-symbol {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  background: #eeeaf9;
  border-radius: 50%;
}

.parish-symbol::before,
.parish-symbol::after,
.parish-symbol span {
  position: absolute;
  content: "";
  background: var(--primary);
  border-radius: 2px;
}

.parish-symbol {
  position: relative;
}

.parish-symbol::before {
  width: 0.22rem;
  height: 1.25rem;
}

.parish-symbol::after {
  width: 0.85rem;
  height: 0.22rem;
  transform: translateY(-0.24rem);
}

.public-header p,
.public-header strong {
  display: block;
  margin: 0;
}

.public-header p {
  color: var(--muted);
  font-size: 0.62rem;
}

.public-header strong {
  font-family: Georgia, serif;
  font-size: 0.98rem;
}

.menu-button {
  margin-left: auto;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.hero-card {
  margin: 0.9rem;
  padding: 1.35rem 1.1rem;
  color: #ffffff;
  background:
    linear-gradient(115deg, rgba(37, 37, 84, 0.93), rgba(75, 75, 206, 0.78)),
    radial-gradient(circle at 70% 20%, #a09ef4, #31316e);
  border-radius: 1.15rem;
}

.hero-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-card h2 {
  max-width: 19ch;
  margin: 0.55rem 0;
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.12;
}

.hero-card p {
  max-width: 34ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.7rem;
  line-height: 1.5;
}

.next-mass {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0.9rem 0.9rem;
  padding: 0.8rem;
  color: #6f4b13;
  background: var(--amber-soft);
  border-radius: 0.9rem;
}

.mass-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #ffffff;
  background: var(--amber);
  border-radius: 50%;
}

.next-mass p,
.next-mass strong {
  display: block;
  margin: 0;
}

.next-mass p {
  font-size: 0.58rem;
}

.next-mass strong {
  margin-top: 0.15rem;
  font-size: 0.82rem;
}

.time-until {
  font-size: 0.62rem;
  font-weight: 800;
}

.public-grid {
  display: grid;
  gap: 0.75rem;
  padding: 0 0.9rem 0.9rem;
}

.public-grid section {
  padding: 0.9rem;
  background: #f7f8fb;
  border: 1px solid #eceef4;
  border-radius: 0.9rem;
}

.public-kicker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  color: var(--primary);
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
}

.public-kicker .icon {
  width: 0.9rem;
  height: 0.9rem;
}

.schedule-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-top: 1px solid #e6e8ef;
  font-size: 0.72rem;
}

.public-grid section > strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.8rem;
}

.public-grid section > p:not(.public-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.text-link {
  display: inline-block;
  margin-top: 0.65rem;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 800;
}

.support-button {
  width: calc(100% - 1.8rem);
  margin: 0 0.9rem 0.9rem;
  padding: 0.8rem;
  color: #72798c;
  background: #f0f1f5;
  border: 0;
  border-radius: 0.85rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.support-button small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.55rem;
  font-weight: 500;
}

.bottom-nav {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0.55rem max(0.6rem, env(safe-area-inset-right))
    calc(0.6rem + env(safe-area-inset-bottom))
    max(0.6rem, env(safe-area-inset-left));
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-item {
  display: grid;
  min-height: 3.4rem;
  place-items: center;
  align-content: center;
  gap: 0.25rem;
  color: #858c9d;
  border-radius: 0.8rem;
  font-size: 0.62rem;
  font-weight: 700;
}

.nav-item .icon {
  width: 1.3rem;
  height: 1.3rem;
}

.nav-item.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

@media (min-width: 560px) {
  .app-shell {
    min-height: calc(100vh - 4rem);
    margin-block: 2rem;
    border-radius: 1.8rem;
  }

  .main-content {
    padding-inline: 2rem;
  }

  .public-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bottom-nav {
    border-radius: 0 0 1.8rem 1.8rem;
  }
}

@media (max-width: 360px) {
  .main-content {
    padding-inline: 0.9rem;
  }

  .progress-card {
    padding: 1rem;
  }

  .progress-ring {
    width: 3.8rem;
    height: 3.8rem;
  }

  .page-heading h1 {
    font-size: 1.7rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .quick-card,
  .nav-item,
  .button {
    transition:
      transform 160ms ease,
      background-color 160ms ease;
  }

  .quick-card:hover,
  .button:hover {
    transform: translateY(-1px);
  }
}
