:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3faf6;
  --surface: #ffffff;
  --surface-2: #e6f5ec;
  --text: #10231a;
  --muted: #466255;
  --line: #b8d5c4;
  --emerald: #4ade80;
  --turquoise: #5eead4;
  --on-accent: #10231a;
  --focus: #075e54;
  --danger: #9f1239;
  --warning-bg: #fff7d6;
  --shadow: 0 18px 50px rgb(16 35 26 / 0.1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07120d;
  --surface: #10241a;
  --surface-2: #153023;
  --text: #f4fff8;
  --muted: #b8d4c3;
  --line: #315c46;
  --emerald: #15803d;
  --turquoise: #0f766e;
  --on-accent: #ffffff;
  --focus: #5eead4;
  --danger: #fda4af;
  --warning-bg: #3a3213;
  --shadow: 0 18px 50px rgb(0 0 0 / 0.28);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    color-scheme: dark;
    --bg: #07120d;
    --surface: #10241a;
    --surface-2: #153023;
    --text: #f4fff8;
    --muted: #b8d4c3;
    --line: #315c46;
    --emerald: #15803d;
    --turquoise: #0f766e;
    --on-accent: #ffffff;
    --focus: #5eead4;
    --danger: #fda4af;
    --warning-bg: #3a3213;
    --shadow: 0 18px 50px rgb(0 0 0 / 0.28);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  overflow-wrap: anywhere;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  transition: background-color 180ms ease, color 180ms ease;
}

body.is-drawer-open { overflow: hidden; }

button,
input,
select,
textarea { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; text-underline-offset: 0.2em; }

img { display: block; max-width: 100%; height: auto; }

h1,
h2,
h3,
p { margin-top: 0; }

h1,
h2,
h3 {
  line-height: 1.12;
  text-wrap: balance;
}

h1 { font-size: clamp(2.35rem, 8vw, 5.8rem); letter-spacing: -0.055em; }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); letter-spacing: -0.035em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  translate: 0 -180%;
  border-radius: 0.5rem;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
}

.skip-link:focus { translate: 0; }

.shell { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }

.theme-radius-small { --radius: 0.45rem; --radius-lg: 0.75rem; }
.theme-radius-medium { --radius: 0.8rem; --radius-lg: 1.4rem; }
.theme-radius-large { --radius: 1.25rem; --radius-lg: 2rem; }

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 22%);
  background: color-mix(in srgb, var(--bg), transparent 8%);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.brand__avatar,
.brand__mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.brand__avatar { object-fit: cover; }

.brand__mark {
  display: grid;
  place-items: center;
  background: var(--emerald);
  color: var(--on-accent);
  font-size: 0.78rem;
}

.brand__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.header-actions { display: flex; align-items: center; gap: 0.45rem; }

.quick-action,
.language-switcher,
.icon-button,
.menu-button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.quick-action:hover,
.language-switcher:hover,
.icon-button:hover,
.menu-button:hover { border-color: var(--emerald); background: var(--surface-2); }

.quick-action { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.8rem; font-size: 0.9rem; font-weight: 800; }
.quick-action--live { border-color: var(--emerald); }
.language-switcher,
.icon-button { display: inline-grid; place-items: center; padding: 0.4rem; font-weight: 900; }

.status-dot {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 0.22rem color-mix(in srgb, var(--emerald), transparent 75%);
}

.menu-button { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; font-weight: 800; }
.menu-button__icon { display: grid; gap: 4px; width: 19px; }
.menu-button__icon span { display: block; height: 2px; border-radius: 1px; background: currentColor; }

.drawer-layer { position: fixed; z-index: 100; inset: 0; }
.drawer-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgb(0 0 0 / 0.62); cursor: pointer; }
.site-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, calc(100% - 1rem));
  height: 100%;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--bg);
  box-shadow: -16px 0 48px rgb(0 0 0 / 0.25);
  transform: translateX(100%);
  transition: transform 190ms ease;
}

.drawer-layer.is-open .site-drawer { transform: translateX(0); }
.site-drawer__header { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); }
.site-drawer__title { font-weight: 900; }
.drawer-nav { display: grid; gap: 0.35rem; margin: 0; padding: 1rem; list-style: none; }
.drawer-nav a { display: block; padding: 0.9rem 1rem; border-radius: var(--radius); text-decoration: none; font-size: 1.15rem; font-weight: 800; }
.drawer-nav a:hover,
.drawer-nav a[aria-current="page"] { background: var(--surface-2); }

main { min-height: 65vh; }
.module-section { margin-block: clamp(2.5rem, 8vw, 6.5rem); scroll-margin-top: 6rem; }
.page { padding-block: clamp(3rem, 8vw, 7rem); }
.page-header { max-width: 850px; margin-bottom: 2.5rem; }
.page-header h1 { margin-bottom: 0; }
.page-intro { margin-bottom: -2rem; }
.eyebrow { margin-bottom: 0.6rem; color: var(--muted); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.15em; text-transform: uppercase; }
.lede { max-width: 68ch; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.35rem); }
.meta,
.muted,
.timezone-note { color: var(--muted); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.theme-cards-elevated .card { border-color: transparent; box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-heading h2 { margin-bottom: 0; }

.hero {
  position: relative;
  margin-top: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--emerald), transparent 65%), transparent 45%, color-mix(in srgb, var(--turquoise), transparent 68%));
}

.hero__inner { display: grid; min-height: min(760px, calc(100svh - 72px)); grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(4rem, 10vw, 9rem); }
.hero__content { position: relative; z-index: 1; }
.hero h1 { max-width: 12ch; margin-bottom: 1.25rem; }
.hero__lede { max-width: 58ch; margin-bottom: 2rem; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.4rem); }
.hero__visual { position: relative; display: grid; aspect-ratio: 4 / 5; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--turquoise), var(--line) 40%); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.hero__visual img { width: 100%; height: 100%; object-fit: cover; }
.hero__monogram { font-size: clamp(5rem, 15vw, 11rem); font-weight: 950; letter-spacing: -0.1em; opacity: 0.18; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border: 2px solid var(--emerald);
  border-radius: var(--radius);
  background: var(--emerald);
  color: var(--on-accent);
  cursor: pointer;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  transition: filter 160ms ease, transform 160ms ease;
}

.button:hover { filter: brightness(0.95); transform: translateY(-1px); }
.button--secondary { border-color: var(--line); background: var(--surface); color: var(--text); }
.button--hero { border-color: var(--turquoise); box-shadow: 0 0 0 2px var(--emerald); }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.text-link { color: var(--text); font-weight: 850; }
.text-button { min-height: 44px; padding: 0.65rem 0.8rem; border: 0; background: transparent; color: var(--text); cursor: pointer; font-weight: 800; text-decoration: underline; text-underline-offset: 0.2em; }
.module-actions { display: flex; margin-top: 1.25rem; }

.hero.module-layout-compact .hero__inner { min-height: auto; padding-block: clamp(3rem, 7vw, 5rem); }
.hero.module-layout-compact .hero__visual { max-height: 360px; }
.module-layout-banner .live-card,
.module-layout-banner .community-card { border-radius: var(--radius); }
.module-layout-compact .live-card__content,
.module-layout-compact .community-card,
.module-layout-compact .about-card,
.module-layout-compact .contact-card,
.module-layout-compact .footer-cta { padding: 1.25rem; }
.module-layout-list .video-grid { grid-template-columns: 1fr; }
.module-layout-list .video-card { display: grid; grid-template-columns: minmax(180px, 0.4fr) 1fr; }
.module-layout-list .video-card:first-child { grid-column: auto; }
.module-layout-buttons .social-link { justify-content: center; border-color: var(--emerald); background: var(--emerald); color: var(--on-accent); }
.module-layout-cards .schedule-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.module-layout-cards .schedule-item { grid-template-columns: 1fr; align-content: start; }

.live-card { display: grid; grid-template-columns: 0.5rem 1fr; overflow: hidden; }
.live-card::before { content: ""; background: linear-gradient(var(--emerald), var(--turquoise)); }
.live-card--offline::before,
.live-card--unknown::before,
.live-card--disabled::before { background: var(--line); }
.live-card__status { display: flex; align-items: center; gap: 0.55rem; padding: 1rem 1.5rem 0; grid-column: 2; color: var(--muted); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.12em; }
.live-card__content { padding: clamp(1.5rem, 5vw, 3rem); grid-column: 2; }
.live-card__content h2 { margin-bottom: 0.65rem; }

.schedule-list { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.schedule-item { display: grid; grid-template-columns: minmax(155px, 0.55fr) minmax(0, 1fr) auto; align-items: center; gap: 1.25rem; padding: 1.1rem 1.25rem; }
.schedule-item time { font-weight: 900; }
.schedule-item h3,
.schedule-item p { margin-bottom: 0.2rem; }
.schedule-item--cancelled { opacity: 0.72; }
.badge { display: inline-block; border-radius: 100px; padding: 0.15rem 0.5rem; background: var(--warning-bg); color: var(--text); font-size: 0.75rem; font-weight: 900; }

.community-card,
.about-card,
.contact-card { display: grid; align-items: center; gap: clamp(1.5rem, 5vw, 3rem); padding: clamp(1.5rem, 5vw, 3rem); }
.community-card { grid-template-columns: auto 1fr; }
.community-card__mark { display: grid; width: clamp(80px, 16vw, 150px); aspect-ratio: 1; place-items: center; border-radius: var(--radius-lg); background: var(--turquoise); color: var(--on-accent); font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 950; }
.online-count { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; }
.about-card { grid-template-columns: auto 1fr; }
.about-card__avatar { width: clamp(100px, 18vw, 160px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.contact-card { grid-template-columns: minmax(0, 1fr) auto; }

.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.video-card { min-width: 0; overflow: hidden; }
.video-card__visual { display: grid; aspect-ratio: 16 / 9; place-items: center; overflow: hidden; background: var(--surface-2); }
.video-card__visual img { width: 100%; height: 100%; object-fit: cover; }
.video-card__play { font-size: 2rem; opacity: 0.65; }
.video-card__body { padding: 1.1rem; }
.video-card__body h3 { margin-bottom: 0.75rem; }
.video-card__body time { display: block; margin-bottom: 0.75rem; color: var(--muted); }

.social-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.social-link { display: flex; min-height: 64px; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; font-weight: 850; text-decoration: none; transition: border-color 160ms ease, transform 160ms ease; }
.social-link:hover { border-color: var(--turquoise); transform: translateY(-2px); }

.footer-cta { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(1.5rem, 5vw, 3rem); border: 2px solid transparent; border-radius: var(--radius-lg); background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--emerald), var(--turquoise)) border-box; }
.footer-cta h2 { margin-bottom: 0.5rem; }

.module-state { padding: 1.25rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.module-state p { margin: 0; }
.module-state--warning { display: flex; align-items: center; gap: 0.75rem; border-style: solid; background: var(--warning-bg); color: var(--text); }

.media-consent { margin-top: 1rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.media-consent__placeholder { display: grid; min-height: 320px; place-items: center; align-content: center; padding: clamp(1.5rem, 6vw, 4rem); text-align: center; }
.media-consent__placeholder p { max-width: 60ch; color: var(--muted); }
.media-consent__icon { display: grid; width: 64px; height: 64px; place-items: center; margin-bottom: 1rem; border-radius: 50%; background: var(--surface-2); }
.media-consent iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.media-consent__error { padding: 2rem; color: var(--danger); text-align: center; }

.prose { max-width: 860px; }
.prose > * + * { margin-top: 1.25em; }
.prose h2,
.prose h3 { margin-top: 1.8em; }
.prose a { font-weight: 750; }
.prose :where(ul, ol) { padding-left: 1.4rem; }
.legal-notice:empty { display: none; }
.legal-notice { margin-bottom: 2rem; padding: 1rem; border-left: 4px solid var(--turquoise); background: var(--surface); }
.legal-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 0 0 2.5rem; }
.legal-details div { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.legal-details dt { color: var(--muted); font-size: 0.8rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.legal-details dd { margin: 0.35rem 0 0; }
.legal-sections { margin-bottom: 2.5rem; }
.legal-sections section { padding-block: 0.5rem 1.25rem; border-bottom: 1px solid var(--line); }
.legal-sections h2 { font-size: 1.35rem; }
.preserve-lines { white-space: pre-line; }
.about-business-contact { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding: 1.25rem; }
.about-business-contact h2 { margin: 0; font-size: 1.35rem; }

.consent-settings { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.consent-setting { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.consent-setting__status { display: block; color: var(--muted); font-size: 0.9rem; }

.settings-dialog { width: min(640px, calc(100% - 2rem)); max-height: calc(100svh - 2rem); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); color: var(--text); box-shadow: var(--shadow); }
.settings-dialog::backdrop { background: rgb(0 0 0 / 0.7); }
.settings-dialog__body { padding: 1.25rem; }
.settings-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.settings-dialog__header h2 { margin-bottom: 0; }

.analytics-consent {
  position: fixed;
  z-index: 80;
  right: 0;
  bottom: 0;
  left: 0;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg), transparent 3%);
  box-shadow: 0 -16px 48px rgb(0 0 0 / 0.2);
  backdrop-filter: blur(16px);
}
.analytics-consent__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1.25rem; padding-block: 1rem; }
.analytics-consent h2 { margin-bottom: 0.25rem; font-size: 1.15rem; }
.analytics-consent p { max-width: 72ch; margin-bottom: 0; color: var(--muted); font-size: 0.92rem; }
.analytics-consent__error { grid-column: 1 / -1; color: var(--danger) !important; }

.error-page { padding-block: clamp(5rem, 14vw, 10rem); text-align: center; }
.error-code { margin-bottom: 0; color: var(--muted); font-size: clamp(5rem, 20vw, 12rem); font-weight: 950; letter-spacing: -0.08em; line-height: 0.8; opacity: 0.28; }
.error-page .lede { margin-inline: auto; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; min-height: 120px; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; }
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.65rem 1rem; justify-content: end; margin: 0; padding: 0; list-style: none; }

@media (max-width: 820px) {
  .brand__name,
  .menu-button__label { display: none; }
  .hero__inner { min-height: auto; grid-template-columns: 1fr; }
  .hero__visual { max-height: 420px; aspect-ratio: 16 / 10; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-card:first-child { grid-column: 1 / -1; }
  .social-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 1.25rem, 1180px); }
  .site-header__inner { min-height: 64px; }
  .brand__avatar,
  .brand__mark { width: 36px; height: 36px; }
  .header-actions { gap: 0.25rem; }
  .quick-action { padding-inline: 0.55rem; }
  .quick-action span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .hero__inner { padding-block: 3.5rem; }
  .hero__visual { aspect-ratio: 4 / 3; }
  .schedule-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .community-card,
  .about-card,
  .contact-card { grid-template-columns: 1fr; }
  .video-grid,
  .social-list { grid-template-columns: 1fr; }
  .legal-details { grid-template-columns: 1fr; }
  .module-layout-cards .schedule-list { grid-template-columns: 1fr; }
  .module-layout-list .video-card { grid-template-columns: 1fr; }
  .video-card:first-child { grid-column: auto; }
  .footer-cta,
  .site-footer__inner { align-items: stretch; flex-direction: column; }
  .footer-links { justify-content: start; }
  .consent-setting { align-items: stretch; flex-direction: column; }
  .media-consent__placeholder { min-height: 280px; }
  .about-business-contact { align-items: stretch; flex-direction: column; }
  .analytics-consent__inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

@media (forced-colors: active) {
  .status-dot,
  .hero__monogram { forced-color-adjust: none; }
  .card,
  .button { border: 2px solid ButtonText; }
}
