:root {
  --bg: #fffaf0;
  --surface: #ffffff;
  --surface-strong: #f7efe2;
  --text: #241f1b;
  --muted: #635b52;
  --gold: #f5bf31;
  --gold-dark: #b77712;
  --purple: #7160a6;
  --purple-dark: #493d78;
  --line: #e7dccb;
  --shadow: 0 22px 60px rgba(63, 47, 27, 0.13);
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 12px clamp(18px, 4vw, 58px);
  background: rgba(255, 250, 240, 0.95);
  border-bottom: 1px solid rgba(231, 220, 203, 0.9);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  font-weight: 800;
  color: var(--purple-dark);
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  background: var(--surface);
  border-radius: 8px;
  padding: 3px;
}

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

.main-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-menu a,
.main-menu .menu-disabled {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.main-menu .menu-disabled {
  color: rgba(99, 91, 82, 0.48);
  cursor: default;
  user-select: none;
}

.main-menu a:hover,
.main-menu a:focus-visible {
  background: var(--surface-strong);
  color: var(--purple-dark);
  outline: none;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--purple-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 470px);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: clamp(42px, 7vw, 96px) clamp(18px, 6vw, 84px);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  color: var(--purple-dark);
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  color: var(--purple-dark);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.content-section h1,
.signup-section h1,
.prayer-section h1 {
  margin-bottom: 18px;
  color: var(--purple-dark);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  color: var(--purple-dark);
  font-size: 1.15rem;
}

.hero-copy p:not(.eyebrow),
.signup-copy p,
.text-block p,
.info-grid p {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 12px 28px rgba(73, 61, 120, 0.24);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--purple-dark);
  outline: none;
}

.button.secondary {
  background: var(--surface);
  color: var(--purple-dark);
  border: 1px solid var(--line);
}

.hero-logo {
  justify-self: center;
  width: min(100%, 460px);
  padding: clamp(16px, 4vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.content-section,
.signup-section {
  padding: clamp(56px, 8vw, 104px) clamp(18px, 6vw, 84px);
  border-top: 1px solid var(--line);
}

.content-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
}

.text-block {
  max-width: 760px;
}

.signup-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 560px);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  background: #ffffff;
}

.prayer-section {
  padding: clamp(56px, 8vw, 104px) clamp(18px, 6vw, 84px);
  border-top: 1px solid var(--line);
  background: #fffaf0;
}

.prayer-layout {
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
  margin-top: 28px;
}

.signup-form {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 4vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 8px;
  color: var(--purple-dark);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d9ccb8;
  border-radius: 8px;
  padding: 14px 14px;
  background: #fffdfa;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--purple);
  outline: 3px solid rgba(113, 96, 166, 0.18);
}

input[readonly] {
  background: #f3ede4;
  color: #6f675e;
  cursor: not-allowed;
}

.phone-field {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(180px, 1fr);
  gap: 14px;
}

.address-field {
  display: grid;
  gap: 14px;
}

.address-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 14px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.checkbox-label input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 3px;
}

.field-hint {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.field-hint.success {
  color: #246b44;
}

.field-hint.error {
  color: #9a2f2f;
}

.optional-prayer-fields {
  display: grid;
  gap: 18px;
  padding: 16px;
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.optional-prayer-fields p {
  margin: 0;
  color: var(--purple-dark);
  font-weight: 800;
}

.choice-field {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-field legend {
  padding: 0;
  color: var(--purple-dark);
  font-weight: 800;
}

.choice-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.submit-button {
  width: 100%;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.form-status.success {
  color: #246b44;
}

.form-status.error {
  color: #9a2f2f;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-grid article {
  min-height: 190px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.site-footer {
  padding: 28px clamp(18px, 6vw, 84px);
  background: var(--purple-dark);
  color: #fff;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.club-page {
  background: #fffdf7;
}

.club-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1.18fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(42px, 7vw, 90px) clamp(18px, 6vw, 84px);
}

.club-hero-copy h1 {
  margin-bottom: 18px;
  color: var(--purple-dark);
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
}

.club-hero-copy p:not(.section-kicker),
.club-section p {
  color: var(--muted);
  font-size: 1.05rem;
}

.schedule-figure {
  margin: 0;
  padding: clamp(12px, 2vw, 18px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.schedule-figure img {
  width: 100%;
  border: 1px solid #24201d;
  border-radius: 4px;
}

.schedule-figure figcaption {
  margin-top: 10px;
  color: var(--purple-dark);
  font-weight: 800;
  text-align: center;
}

.club-section {
  padding: clamp(52px, 7vw, 90px) clamp(18px, 6vw, 84px);
  border-top: 1px solid var(--line);
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 560px);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.comments-feed-section {
  background: #ffffff;
}

.comments-feed-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.comments-feed {
  display: grid;
  gap: 16px;
  max-width: 980px;
}

.comment-card {
  position: relative;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(63, 47, 27, 0.08);
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.comment-meta strong {
  color: var(--purple-dark);
  font-size: 1.05rem;
}

.comment-meta span,
.comment-card small,
.empty-comments {
  color: var(--muted);
  font-weight: 700;
}

.comment-card p {
  margin-bottom: 12px;
  color: var(--text);
}

.prayer-feed-wrap {
  min-width: 0;
}

.prayer-feed {
  display: grid;
  gap: 16px;
}

.prayer-card {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--purple);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(63, 47, 27, 0.08);
}

.prayer-card small {
  display: block;
  margin-bottom: 12px;
  color: var(--gold-dark);
  font-weight: 800;
}

.prayer-card p {
  margin-bottom: 0;
  color: var(--text);
  white-space: pre-wrap;
}

.prayer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.prayer-action {
  min-height: 28px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.prayer-action:hover,
.prayer-action:focus-visible {
  background: rgba(113, 96, 166, 0.08);
  color: var(--purple-dark);
  outline: none;
}

.prayer-action.danger {
  color: #8f5959;
}

.admin-page {
  min-height: 100vh;
  background: #fffaf0;
}

.visible-menu {
  display: flex;
}

.admin-logout {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--purple-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-main {
  padding: clamp(36px, 6vw, 72px) clamp(18px, 6vw, 84px);
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.admin-login h1,
.admin-panel h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.admin-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.admin-count {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 800;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-summary-block {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-summary-block h2 {
  margin: 0;
  color: var(--purple-dark);
  font-size: 1.2rem;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.admin-tab {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-tab.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.admin-delete {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #c84c4c;
  border-radius: 8px;
  background: #fff5f5;
  color: #9a2f2f;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-delete:hover,
.admin-delete:focus-visible {
  background: #9a2f2f;
  color: #fff;
  outline: none;
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

.admin-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: var(--surface-strong);
  color: var(--purple-dark);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.admin-table td {
  color: var(--text);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 840px) {
  .site-header {
    min-height: 70px;
  }

  .brand img {
    width: 46px;
    height: 46px;
  }

  .brand span {
    max-width: 58vw;
  }

  .menu-button {
    display: block;
  }

  .main-menu:not(.visible-menu) {
    position: absolute;
    top: 70px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .main-menu.open {
    display: flex;
  }

  .main-menu a,
  .main-menu .menu-disabled {
    text-align: center;
    justify-content: center;
  }

  .hero,
  .club-hero,
  .content-section,
  .signup-section,
  .prayer-layout,
  .two-column-section,
  .phone-field,
  .address-grid,
  .admin-login {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 40px;
  }

  .hero-logo {
    order: -1;
    width: min(100%, 320px);
  }

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

  .comments-feed-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions .button {
    flex: 1 1 150px;
  }
}

@media (max-width: 520px) {
  .brand span {
    max-width: 46vw;
    font-size: 0.95rem;
  }

  h1 {
    font-size: 2.55rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }
}
