:root {
  color-scheme: dark;
  --ink: #f5f3f5;
  --muted: #b9b5c8;
  --paper: #1b2032;
  --paper-soft: #242848;
  --panel: #252b49;
  --panel-strong: #342876;
  --line: rgba(245, 243, 245, .14);
  --faith: #38a3a5;
  --faith-dark: #8de0e1;
  --gold: #d61976;
  --danger: #ff7bae;
  --violet: #7d4597;
  --purple: #4c3281;
  --shadow: 0 18px 44px rgba(0, 0, 0, .34);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding-bottom: 78px;
  background: linear-gradient(180deg, #1b1e6b 0%, var(--paper) 34rem);
  color: var(--ink);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(27, 32, 50, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  flex: 0 0 auto;
  box-shadow: 0 10px 24px rgba(214, 25, 118, .18);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.hero {
  min-height: calc(100vh - 64px);
  position: relative;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(180deg, rgba(27, 30, 107, .26), rgba(27, 32, 50, .92)),
    url("assets/hero-fellowship.png");
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 22vh;
  background: linear-gradient(180deg, rgba(27, 32, 50, 0), var(--paper));
}

.hero-content {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 18px 46px;
}

.eyebrow {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(27, 32, 50, .48);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

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

h1 {
  max-width: 760px;
  margin: 18px 0 12px;
  font-size: clamp(42px, 13vw, 92px);
  line-height: .92;
  letter-spacing: 0;
  text-wrap: balance;
}

h2, .page-title {
  margin-bottom: 14px;
  font-size: clamp(30px, 8vw, 52px);
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero p {
  max-width: 650px;
  color: rgba(255, 255, 255, .9);
  font-size: 17px;
}

.section {
  padding: 34px 18px;
}

.wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.wrap.narrow {
  width: min(760px, 100%);
}

.band {
  background: rgba(52, 40, 118, .34);
  border-block: 1px solid var(--line);
}

.kicker {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lead {
  max-width: 780px;
  color: var(--muted);
  font-size: 17px;
}

.actions, .toolbar, .admin-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-login {
  min-height: 44px;
}

.admin-controls,
.wall-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(27, 30, 107, .24);
}

.admin-toolbar {
  gap: 12px;
  padding-block: 4px;
}

.page-info {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.toolbar, .admin-head {
  justify-content: space-between;
  margin-bottom: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: var(--radius);
  padding: 0 16px;
  font-weight: 900;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.button.primary {
  background: linear-gradient(135deg, var(--faith), var(--violet));
  color: var(--ink);
  box-shadow: 0 14px 28px rgba(56, 163, 165, .2);
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  color: var(--ink);
}

.button.light {
  background: rgba(255, 255, 255, .12);
  color: var(--ink);
}

.button.danger {
  border: 1px solid rgba(214, 25, 118, .38);
  background: rgba(214, 25, 118, .15);
  color: var(--danger);
}

.button.full {
  width: 100%;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two, .grid.four {
  margin-top: 20px;
}

.card, .panel, .request-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 16px;
  background: linear-gradient(180deg, rgba(245, 243, 245, .07), rgba(245, 243, 245, .025));
}

.card.small i {
  width: 34px;
  height: 34px;
  color: var(--gold);
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
}

.panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: rgba(37, 43, 73, .9);
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 6px;
  font-weight: 900;
}

small {
  color: var(--muted);
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #1f2440;
  color: var(--ink);
  padding: 12px;
  outline: none;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--faith);
  box-shadow: 0 0 0 3px rgba(56, 163, 165, .2);
}

::placeholder {
  color: #8984a8;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(27, 30, 107, .24);
  font-weight: 800;
}

.check input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  accent-color: var(--faith);
}

.check.disabled {
  opacity: .55;
}

.status, .notice {
  min-height: 24px;
  font-weight: 800;
  color: var(--faith-dark);
}

.status.error, .notice.error {
  color: var(--danger);
}

.list {
  display: grid;
  gap: 12px;
}

.request-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.admin-row {
  gap: 14px;
}

.admin-row-main {
  min-width: 0;
}

.compact-detail {
  grid-template-columns: 1fr;
  gap: 4px 12px;
  padding: 10px;
}

.row-actions {
  align-items: stretch;
}

.row-actions .button {
  min-height: 38px;
  padding-inline: 12px;
  font-size: 13px;
}

.wall-row .actions {
  justify-content: flex-start;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(56, 163, 165, .22);
  background: rgba(56, 163, 165, .13);
  color: var(--faith-dark);
  font-size: 12px;
  font-weight: 900;
}

.pill.urgent {
  border-color: rgba(214, 25, 118, .34);
  background: rgba(214, 25, 118, .16);
  color: var(--danger);
}

.request-card p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.detail {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(27, 30, 107, .24);
  color: var(--muted);
  font-size: 14px;
}

.empty {
  padding: 34px 18px;
  border: 1px dashed rgba(231, 225, 211, .24);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  inset: auto 10px 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(27, 32, 50, .92);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .35);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  min-height: 48px;
  display: grid;
  place-items: center;
  gap: 2px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.bottom-nav a.active {
  background: rgba(56, 163, 165, .16);
  color: var(--faith-dark);
}

.button:hover,
.bottom-nav a:hover {
  transform: translateY(-1px);
}

@media (min-width: 720px) {
  body { padding-bottom: 0; }
  .topbar { padding: 14px 30px; }
  .bottom-nav { display: none; }
  .hero-content { padding: 0 30px 70px; }
  .section { padding: 58px 30px; }
  .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-head { flex-wrap: nowrap; }
  .admin-controls,
  .wall-controls {
    grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(130px, .7fr));
    align-items: end;
  }
  .compact-detail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
  .row-actions {
    display: grid;
    min-width: 132px;
  }
}

@media (min-width: 980px) {
  .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
