﻿:root {
  --font-main: Tahoma, "Segoe UI", Arial, sans-serif;
  --font-heading: "Segoe UI", Tahoma, Arial, sans-serif;
  --ink: #3c2a18;
  --muted: #746456;
  --gold: #bd7b1b;
  --gold-dark: #9b6212;
  --line: #efe4d5;
  --paper: #fbf7ef;
  --white: #ffffff;
  --shadow: 0 8px 22px rgba(73, 43, 14, 0.1);
}

* {
  box-sizing: border-box;
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #fbf8f2;
  font-family: var(--font-main);
  font-size: 14px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  object-fit: cover;
  background: #f7efe3;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 62px;
  padding: 0 18px 0 30px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(72, 46, 20, 0.04);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 118px;
  font-weight: 800;
  font-size: 10px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand-mark {
  color: var(--gold);
  font-size: 28px;
  line-height: 1;
}

.main-nav {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  flex: 0 1 auto;
  align-self: stretch;
  font-size: 15px;
  font-weight: 700;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #4e3825;
  min-height: 100%;
}

.site-header:not(.admin-header) .main-nav a + a::before {
  content: "";
  width: 1px;
  height: 14px;
  margin-right: 12px;
  background: rgba(189, 123, 27, 0.55);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--gold-dark);
}

.main-nav a.active::after,
.main-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background: var(--gold);
}

.site-header:not(.admin-header) .main-nav a + a.active::after,
.site-header:not(.admin-header) .main-nav a + a:hover::after {
  left: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

.icon-button,
.round-arrow {
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(66, 39, 14, 0.11);
}

.icon-button {
  width: 39px;
  height: 39px;
  background: transparent;
  box-shadow: none;
  font-size: 26px;
}

.login-button,
.primary-button,
.light-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
}

.home-dashboard {
  display: grid;
  grid-template-columns: minmax(600px, 52.4%) minmax(520px, 47.6%);
  min-height: calc(100vh - 62px);
  flex: 1;
}

main {
  flex: 1;
}

.left-column,
.right-column {
  min-width: 0;
}

.left-column {
  border-right: 1px solid var(--line);
  background: #fbf7ef;
}

.right-column {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 24px 30px 28px;
  background: #fffdf9;
}

.top-panels {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 22px;
  align-items: start;
}

@media (min-width: 1181px) {
  body.home-page .site-header,
  body:has(.home-dashboard) .site-header {
    position: absolute;
    width: 52.4%;
    min-height: 62px;
  }

  body.home-page .home-dashboard,
  body:has(.home-dashboard) .home-dashboard {
    min-height: 100vh;
  }

  body.home-page .left-column,
  body:has(.home-dashboard) .left-column {
    padding-top: 62px;
  }

  body.home-page .right-column,
  body:has(.home-dashboard) .right-column {
    border-left: 1px solid var(--line);
    padding-top: 25px;
  }
}

.login-button,
.primary-button {
  color: var(--white);
  background: var(--gold);
}

.primary-button:hover,
.login-button:hover {
  background: var(--gold-dark);
}

.hero {
  position: relative;
  min-height: 460px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(90deg, rgba(48, 29, 17, 0.1), rgba(255, 224, 176, 0.5)),
    var(--hero-image, none);
  background-position: center, center;
  background-size: auto, cover;
  background-repeat: no-repeat;
  background-color: #f1dfc5;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 72% 38%, rgba(255, 242, 197, 0.58), rgba(122, 69, 26, 0.05) 32%, rgba(56, 35, 22, 0.27) 76%),
    linear-gradient(0deg, rgba(91, 52, 16, 0.18), rgba(255, 248, 231, 0.1));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 32px));
  padding-top: 22px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.14;
  color: #563615;
}

.hero p {
  max-width: 600px;
  margin: 0 auto;
  color: #fff8ec;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-line;
  -webkit-text-stroke: 0.35px rgba(49, 31, 18, 0.75);
  text-shadow:
    0 1px 1px rgba(49, 31, 18, 0.96),
    0 2px 8px rgba(49, 31, 18, 0.72);
}

.hero-dots,
.mini-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}

.hero-dots span,
.mini-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
  opacity: 0.85;
}

.mini-dots span {
  background: #d5b17a;
}

.mini-dots .active {
  background: var(--gold);
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: none;
  margin: 0;
  padding: 24px 30px;
  background: #fffdf9;
  border-bottom: 1px solid var(--line);
}

.quick-links a {
  display: grid;
  grid-template-columns: 54px 1fr;
  column-gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 6px 14px;
  background: transparent;
  border-right: 1px solid var(--line);
  box-shadow: none;
}

.quick-links a:last-child {
  border-right: 0;
}

.quick-links span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid #e7c88e;
  border-radius: 50%;
  color: var(--gold);
  font-size: 26px;
  background: #fff;
}

.quick-links strong {
  font-size: 13px;
}

.quick-links small,
.content-card p,
.article-card p,
.event-card p,
.event-card small,
.church-card p,
.site-footer p,
.admin-intro p,
.admin-item p {
  color: var(--muted);
  line-height: 1.5;
  font-size: 12px;
}

.section-block,
.daily-panel {
  min-width: 0;
}

.left-column .section-block,
.right-column .section-block,
.related-section,
.category-grid {
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

.section-heading h2 {
  position: relative;
  margin: 0;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
}

.section-heading h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 52px;
  height: 2px;
  background: var(--gold);
}

.section-heading a,
.content-card a,
.article-card a,
.church-card a,
.event-card a,
.prayer-card a {
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 12px;
}

.card-row,
.church-grid,
.article-grid,
.event-list,
.prayer-grid {
  display: grid;
  gap: 16px;
}

.card-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0 30px 24px;
}

.church-grid {
  grid-template-columns: repeat(3, 1fr);
}

.article-grid {
  grid-template-columns: repeat(3, 1fr);
}

.event-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prayer-grid {
  display: flex;
  width: max-content;
  min-width: 100%;
  animation: prayer-marquee 72s linear infinite;
  backface-visibility: hidden;
  contain: layout paint style;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

#prayers {
  overflow: hidden;
}

#prayers:hover .prayer-grid {
  animation-play-state: running;
}

.prayer-grid .prayer-card {
  width: min(270px, 24vw);
  min-width: 195px;
  flex: 0 0 auto;
}

#saints {
  padding-top: 20px;
}

#saints .section-heading {
  padding: 0 30px;
}

#saints .content-card img {
  height: 152px;
  width: 100%;
  object-fit: cover;
  object-position: center 22%;
}

#saints .content-card p {
  max-height: 42px;
  margin-bottom: 8px;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

.content-card,
.church-card,
.article-card,
.event-card,
.daily-card,
.prayer-card,
.editor-panel,
.table-panel,
.admin-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.content-card,
.church-card,
.article-card {
  display: flex;
  flex-direction: column;
}

.clickable-card {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.clickable-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(73, 43, 14, 0.14);
}

.content-card img {
  height: 115px;
  object-fit: contain;
  background: #f7efe3;
}

.church-card img {
  height: 104px;
  object-fit: contain;
  background: #f7efe3;
}

.article-card img {
  height: 115px;
  object-fit: contain;
  background: #f7efe3;
}

.content-card div,
.church-card div,
.article-card div {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 10px;
}

.content-card h3,
.church-card h3,
.article-card h3,
.event-card h3,
.admin-item h3 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.35;
}

.content-card p,
.church-card p,
.article-card p {
  margin: 0 0 10px;
  display: -webkit-box;
  min-height: 0;
  max-height: 40px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: pre-line;
}

.content-card a,
.church-card a,
.article-card a {
  margin-top: auto;
}

.event-card small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.daily-card {
  position: relative;
  min-height: 210px;
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  gap: 8px;
  padding: 18px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(95, 53, 20, 0.92), rgba(115, 69, 25, 0.72)),
    var(--daily-image, url("https://images.unsplash.com/photo-1509021436665-8f07dbf5bf1d?auto=format&fit=crop&w=1200&q=80")) center/cover no-repeat;
  background-color: #5f3514;
}

.daily-card blockquote {
  margin: 0 0 10px;
  font-family: Cambria, "Palatino Linotype", "Times New Roman", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-line;
}

.daily-card small {
  font-family: Cambria, "Palatino Linotype", "Times New Roman", serif;
  font-size: 10px;
}

.prayer-card {
  min-height: 158px;
  display: grid;
  align-items: center;
  contain: layout paint;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(95, 53, 20, 0.94), rgba(115, 69, 25, 0.62)),
    var(--prayer-image, url("https://images.unsplash.com/photo-1504052434569-70ad5836ab65?auto=format&fit=crop&w=1200&q=80")) center/cover no-repeat;
}

.prayer-card > div {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 14px;
  justify-items: center;
  text-align: center;
}

.prayer-card p {
  margin: 0;
  color: #ffe8bf;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.prayer-card h3 {
  margin: 0;
  display: -webkit-box;
  max-height: 44px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--white);
  font-size: 15px;
  line-height: 1.3;
}

.prayer-card blockquote {
  display: -webkit-box;
  max-height: 54px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-family: Cambria, "Palatino Linotype", "Times New Roman", serif;
  font-style: italic;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.prayer-card .light-button {
  justify-self: start;
  margin-top: 4px;
}

@keyframes prayer-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(calc(-50% - 8px), 0, 0);
  }
}

.light-button {
  margin-top: 18px;
  color: var(--gold-dark);
  background: #fff7ea;
  min-height: 32px;
  padding: 0 14px;
  font-size: 12px;
}

.round-arrow {
  width: 24px;
  height: 24px;
  color: var(--gold-dark);
  font-size: 20px;
}

.event-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  min-height: 120px;
  height: 100%;
}

.event-date {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 66px;
  align-self: stretch;
  width: 66px;
  border-radius: 6px;
  background: #fff4e3;
  color: var(--gold-dark);
}

.event-date strong {
  font-size: 26px;
}

.event-date span {
  font-size: 11px;
  font-weight: 800;
}

.event-date.is-text-date {
  padding: 8px;
  text-align: center;
}

.event-date.is-text-date span {
  display: -webkit-box;
  max-height: 48px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.event-card > div:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.event-card h3 {
  display: -webkit-box;
  max-height: 40px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.event-card p {
  margin: 0 0 4px;
  display: -webkit-box;
  max-height: 36px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.event-card small {
  display: -webkit-box;
  max-height: 32px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.event-card a {
  display: inline-flex;
  margin-top: 6px;
  align-self: flex-start;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 30px;
  min-height: 44px;
  align-items: center;
  background: #2d2118;
  color: #fff7ea;
  font-size: 12px;
}

.site-footer p {
  margin-bottom: 0;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.25;
}

.site-footer strong {
  font-size: 12px;
}

.search-drawer {
  position: fixed;
  top: 62px;
  right: 22px;
  z-index: 30;
  width: min(360px, calc(100% - 44px));
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: translateX(-4px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.search-drawer.open {
  transform: translateX(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

label span {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

textarea {
  resize: vertical;
}

#searchResults {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

#searchResults a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: #fff7ea;
}

#searchResults span {
  color: var(--muted);
  font-size: 14px;
}

.admin-page {
  background: #fff7ec;
}

.admin-header {
  position: static;
}

.admin-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.login-panel,
.notice-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.notice-panel {
  display: block;
}

.login-panel h1,
.notice-panel h1,
.notice-panel h2 {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.login-form {
  display: grid;
  gap: 14px;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--gold-dark);
  font-weight: 700;
}

.session-pill,
.permission-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--gold-dark);
  background: #fff4e3;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.permission-badge {
  justify-self: end;
}

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

.admin-intro h1 {
  max-width: 760px;
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
}

.detail-shell,
.category-shell {
  width: min(100% - 40px, 1320px);
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 20px 46px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--gold-dark);
  font-weight: 700;
}

.detail-article {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  column-gap: clamp(24px, 4vw, 54px);
  row-gap: 8px;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-cover {
  min-height: 0;
  margin: 0;
  padding: 28px 0 8px 28px;
}

.detail-cover img {
  width: 100%;
  height: auto;
  max-height: 520px;
  aspect-ratio: auto;
  border-radius: 8px;
  object-fit: contain;
  background: #f7efe3;
}

.detail-heading {
  padding: clamp(24px, 4vw, 42px) clamp(28px, 4vw, 56px) 8px 0;
}

.detail-heading h1,
.detail-empty h1 {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.detail-content {
  grid-column: 1 / -1;
  padding: 8px clamp(28px, 4vw, 56px) clamp(28px, 4vw, 52px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--gold-dark);
  font-weight: 700;
}

.detail-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff4e3;
}

.detail-meta .detail-meta-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  color: var(--gold);
}

.detail-meta .cross-tile-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--gold);
}

.detail-meta .cross-tile-icon::before,
.detail-meta .cross-tile-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: var(--white);
  transform: translate(-50%, -50%);
}

.detail-meta .cross-tile-icon::before {
  width: 9px;
  height: 2px;
}

.detail-meta .cross-tile-icon::after {
  width: 2px;
  height: 9px;
}

.detail-meta .calendar-clock-icon {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gold);
  border-radius: 3px;
  box-shadow: inset 0 5px 0 rgba(194, 125, 28, 0.16);
}

.detail-meta .calendar-clock-icon::before {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--gold);
  border-radius: 999px;
  background: #fff4e3;
}

.detail-meta .calendar-clock-icon::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: 0;
  width: 5px;
  height: 5px;
  border-left: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
}

.lead-box {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  max-width: 820px;
  margin-top: 4px;
  padding: 22px 26px 22px 20px;
  border: 1px solid rgba(194, 125, 28, 0.35);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: linear-gradient(135deg, #fffaf1 0%, #fffdf8 100%);
  box-shadow: 0 14px 34px rgba(93, 58, 20, 0.08);
  overflow: hidden;
}

.lead-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-self: start;
  width: 38px;
  height: 38px;
  margin-top: 4px;
  border-radius: 999px;
  color: var(--white);
  background: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  line-height: 1;
}

.lead {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 760px;
  color: #4b3622;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.75;
  white-space: pre-line;
}

.detail-content p,
.detail-empty p {
  line-height: 1.8;
  white-space: pre-line;
}

.detail-body {
  display: grid;
  gap: 16px;
  color: #4b3622;
  font-size: 16px;
  line-height: 1.8;
  white-space: pre-line;
}

.detail-body p,
.detail-body blockquote,
.detail-body ul,
.detail-body ol {
  margin: 0;
}

.detail-body h2,
.detail-body h3,
.detail-body h4 {
  margin: 10px 0 0;
  font-family: var(--font-heading);
  line-height: 1.25;
}

.detail-body img {
  width: min(100%, 560px);
  max-height: 420px;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: contain;
  background: #f7efe3;
  box-shadow: var(--shadow);
}

.detail-body a {
  color: var(--gold-dark);
  font-weight: 800;
}

.detail-source {
  margin: 18px 0 0;
  text-align: right;
  color: #1d4ed8;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.detail-source a {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.detail-body blockquote {
  padding: 14px 18px;
  border-left: 3px solid var(--gold);
  background: #fff7ea;
}

.rating-panel {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.rating-panel p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.rating-panel .rating-note {
  font-size: 85%;
  line-height: 1.55;
  font-style: italic;
}

.rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.rating-group {
  display: grid;
  gap: 6px;
}

.rating-group strong {
  color: var(--ink);
}

.rating-stars {
  display: inline-flex;
  gap: 2px;
}

.rating-stars button {
  padding: 0;
  border: 0;
  color: #d7c6ad;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.rating-stars button.active {
  color: var(--gold);
}

.rating-panel small {
  min-height: 18px;
  color: var(--gold-dark);
  font-weight: 700;
}

.feedback-box {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.feedback-box label {
  color: var(--ink);
  font-weight: 800;
}

.feedback-box textarea {
  min-height: 104px;
}

.visit-panel {
  margin-top: 26px;
}

.visit-heading {
  align-items: center;
}

.visit-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.visit-total-card,
.visit-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.visit-total-card {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.visit-total-card span,
.visit-item span {
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.visit-total-card strong {
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 32px;
  line-height: 1;
}

.visit-total-card small,
.visit-item small,
.visit-item p {
  color: var(--muted);
}

.visit-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  gap: 12px;
  margin-bottom: 12px;
}

.visit-tools label {
  display: grid;
  gap: 8px;
}

.visit-tools span {
  color: var(--gold-dark);
  font-weight: 800;
}

.visit-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 8px;
}

.visit-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
}

.visit-item h3 {
  margin: 4px 0;
  color: var(--ink);
  font-size: 15px;
}

.visit-item p {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}

.visit-item > strong {
  color: var(--gold-dark);
  font-family: var(--font-heading);
  font-size: 26px;
}
.feedback-panel {
  margin-top: 26px;
}

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

.prayer-review-list {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 8px;
}

.feedback-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.feedback-item-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.feedback-item h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.feedback-item time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.prayer-review-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
  flex: 0 0 auto;
}

.feedback-item p {
  margin: 10px 0;
  color: #4b3622;
  white-space: pre-line;
}

.feedback-item a {
  color: var(--gold-dark);
  font-weight: 800;
  font-size: 12px;
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.feedback-actions button {
  border: 1px solid #f0c0a7;
  border-radius: 6px;
  padding: 7px 10px;
  color: #9b2c1f;
  background: #fff4ef;
  font-weight: 800;
  cursor: pointer;
}

.prayer-request-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 48px;
}

.prayer-request-panel {
  display: grid;
  gap: 22px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.prayer-request-panel h1 {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.prayer-request-form,
.prayer-review-item {
  display: grid;
  gap: 14px;
}

.name-anonymous-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.anonymous-switch {
  justify-self: end;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  width: auto;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.anonymous-label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.switch-track {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #e5d7c3;
  transition: 0.2s ease;
}

.switch-thumb {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(73, 43, 14, 0.2);
  transition: 0.2s ease;
}

.anonymous-switch.active .switch-track {
  background: var(--gold);
}

.anonymous-switch.active .switch-thumb {
  transform: translateX(22px);
}

.submit-prayer-button {
  justify-self: center;
  width: min(160px, 100%);
}

.prayer-request-help {
  margin: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  background: #fff7ea;
  color: #4b3622;
  font-weight: 400;
  line-height: 1.7;
}

.prayer-review-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.inline-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.inline-check input {
  width: auto;
}

.detail-empty {
  grid-column: 1 / -1;
  padding: 48px;
}

.related-section {
  margin-top: 30px;
}

.related-section .article-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: #f7efe3;
}

.related-section .article-card div {
  padding: 8px 10px 10px;
}

.related-section .article-card h3 {
  margin-bottom: 6px;
}

.related-section .article-card p {
  max-height: 36px;
  margin-bottom: 8px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.category-intro {
  max-width: 760px;
  margin-bottom: 26px;
}

.category-intro h1 {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
}

#categoryDescription {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.category-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.category-search {
  display: grid;
  gap: 8px;
}

.category-search input,
.category-search select {
  width: min(280px, 100%);
}

.category-search span {
  color: var(--gold-dark);
  font-weight: 800;
}

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

.category-card {
  display: grid;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.category-card img {
  height: 210px;
  object-fit: cover;
  object-position: center 28%;
}

.category-card div {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
}

.category-card h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 19px;
  line-height: 1.25;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
}

.category-card small,
.category-card a {
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 800;
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
}

.pagination button {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--gold-dark);
  background: var(--white);
  font-weight: 800;
  cursor: pointer;
}

.pagination button.active {
  color: var(--white);
  border-color: var(--gold);
  background: var(--gold);
}

.eyebrow {
  color: var(--gold-dark);
  font-weight: 800;
  text-transform: uppercase;
}

.danger-button {
  color: #9a321d;
  background: #fff0ec;
  border: 1px solid #f3c7bd;
}

.ghost-button {
  color: var(--gold-dark);
  background: #fff7ea;
  border: 1px solid #e8c98e;
}

.manager-layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) 1fr;
  gap: 22px;
  align-items: start;
}

.editor-panel,
.table-panel {
  padding: 20px;
}

.editor-panel {
  display: grid;
  gap: 16px;
}

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

.image-preview {
  display: none;
  height: 210px;
  border-radius: 8px;
}

.image-preview.show {
  display: block;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-list-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px);
  gap: 12px;
  margin: 0 0 14px;
}

.admin-list {
  display: grid;
  gap: 14px;
  max-height: 620px;
  overflow-y: auto;
  padding-right: 6px;
}

.admin-item {
  display: grid;
  grid-template-columns: 116px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.admin-item.is-draggable {
  cursor: grab;
}

.admin-item.is-draggable:active {
  cursor: grabbing;
}

.admin-item.dragging {
  opacity: 0.55;
}

.admin-item.drag-over {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.admin-item img {
  height: 92px;
  object-fit: contain;
  background: #f7efe3;
  border-radius: 8px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 8px;
  color: var(--white);
  background: var(--gold);
  font-size: 32px;
  font-weight: 800;
}

.admin-item span {
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-state {
  display: inline-flex;
  width: fit-content;
  margin: 2px 0;
  padding: 3px 7px;
  border-radius: 999px;
  font-weight: 800;
}

.admin-state.is-on {
  color: #1f6b3a;
  background: #e9f7ee;
}

.admin-state.is-off {
  color: #9a321d;
  background: #fff0ec;
}

.admin-item p {
  margin: 0 0 6px;
  white-space: pre-line;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.admin-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.admin-rating {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
}

.reset-rating-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.row-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}

.row-actions button:last-child {
  color: #9a321d;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

@media (max-width: 1180px) {
  .home-dashboard,
  .top-panels {
    grid-template-columns: 1fr;
  }

  .left-column {
    border-right: 0;
  }

  .right-column {
    border-left: 0;
  }
}

@media (max-width: 1100px) {
  .site-header:not(.admin-header) {
    flex-wrap: wrap;
    align-content: center;
    row-gap: 4px;
    min-height: 82px;
  }

  .site-header:not(.admin-header) .main-nav {
    order: 3;
    display: flex;
    flex: 1 0 100%;
    align-self: auto;
    gap: 14px;
    min-height: 32px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 2px 4px;
    margin-top: 2px;
    font-size: 13px;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .site-header:not(.admin-header) .main-nav::-webkit-scrollbar {
    display: none;
  }

  .site-header:not(.admin-header) .main-nav a {
    flex: 0 0 auto;
    min-height: 30px;
  }

  .site-header:not(.admin-header) .main-nav a + a::before {
    display: none;
  }

  .site-header:not(.admin-header) .main-nav a.active::after,
  .site-header:not(.admin-header) .main-nav a:hover::after {
    bottom: 0;
    left: 0;
  }

  .admin-header .main-nav {
    display: none;
  }

  .quick-links,
  .manager-layout,
  .admin-list-tools {
    grid-template-columns: 1fr;
  }

  .quick-links {
    gap: 12px;
  }

  .quick-links a {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
  }

  .card-row,
  .church-grid,
  .article-grid,
  .event-list,
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .site-header {
    position: sticky;
    min-height: 56px;
    padding: 0 12px;
  }

  .site-header:not(.admin-header) {
    min-height: 86px;
    padding: 6px 12px 4px;
  }

  .brand {
    min-width: 0;
    font-size: 8px;
  }

  .brand-mark {
    font-size: 24px;
  }

  .header-actions {
    gap: 6px;
    margin-left: auto;
  }

  .icon-button {
    width: 34px;
    height: 34px;
    font-size: 23px;
  }

  .login-button,
  .primary-button,
  .light-button,
  .ghost-button,
  .danger-button {
    min-height: 28px;
    padding: 0 10px;
    font-size: 10px;
  }

  .category-tools {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .category-search {
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    width: 100%;
  }

  .category-search span {
    margin: 0;
    white-space: nowrap;
  }

  .category-search input,
  .category-search select {
    width: 100%;
    min-width: 0;
    height: 40px;
  }
  .visit-summary,
  .visit-tools,
  .visit-item {
    grid-template-columns: 1fr;
  }

  .visit-item > strong {
    justify-self: start;
  }
  .home-dashboard {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .left-column {
    padding-top: 0;
  }

  .right-column {
    gap: 18px;
    padding: 20px 14px 24px;
  }

  .quick-links,
  .card-row,
  .church-grid,
  .article-grid,
  .event-list,
  .two-fields {
    grid-template-columns: 1fr;
  }

  .prayer-grid .prayer-card {
    width: min(225px, 64vw);
    min-width: min(225px, 64vw);
  }

  .hero {
    min-height: 420px;
  }

  .hero-content {
    width: min(100% - 24px, 520px);
    padding-top: 0;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 12px;
  }

  .quick-links a {
    grid-template-columns: 48px 1fr;
  }

  .quick-links span {
    width: 46px;
    height: 46px;
    font-size: 22px;
  }

  .daily-card {
    grid-template-columns: 1fr;
  }

  .round-arrow {
    display: none;
  }

  .site-footer,
  .admin-intro,
  .login-panel {
    display: block;
  }

  .login-form {
    margin-top: 16px;
  }

  .site-footer {
    padding: 10px 16px;
  }

  .search-drawer {
    left: 12px !important;
    right: 12px !important;
    width: auto;
  }

  .detail-shell,
  .category-shell {
    width: 100%;
    padding: 18px 12px 32px;
  }

  .name-anonymous-row {
    grid-template-columns: 1fr;
  }

  .anonymous-switch {
    justify-self: start;
  }

  .lead-box {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
  }

  .lead-icon {
    width: 32px;
    height: 32px;
    font-size: 32px;
  }

  .admin-intro .danger-button {
    margin-top: 12px;
  }

  .admin-item {
    grid-template-columns: 88px 1fr;
  }

  .admin-item img,
  .account-avatar {
    width: 82px;
    height: 82px;
  }

  .row-actions {
    grid-column: 1 / -1;
  }

  .detail-article {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    padding: 18px 18px 0;
  }

  .detail-cover img {
    max-height: none;
    aspect-ratio: auto;
  }

  .detail-heading {
    padding: 18px;
  }

  .detail-heading h1,
  .detail-empty h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 15px;
    line-height: 1.6;
  }

  .detail-content {
    padding: 0 18px 24px;
  }

  .detail-body {
    font-size: 15px;
  }

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