/* 주보플러스 Plus 템플릿 공용 베이스 — VISION · GRACE · FOREST · LIGHT
   템플릿별 색/형태는 plus-<key>.css 의 토큰으로만 바꾼다. */

.pt-shell {
  --pt-primary: var(--cs-primary, #3D63C9);
  --pt-primary-ink: #fff;
  --pt-ink: #1d2433;
  --pt-muted: #677084;
  --pt-line: #e3e7ee;
  --pt-bg: #ffffff;
  --pt-surface: #ffffff;
  --pt-soft: #f4f6f9;
  --pt-radius: 20px;
  --pt-radius-sm: 12px;
  --pt-shadow: 0 18px 50px rgba(29, 36, 51, 0.08);
  --pt-display: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --pt-header-bg: rgba(255, 255, 255, 0.94);
  --pt-header-ink: var(--pt-ink);
  --pt-footer-bg: #1f2329;
  --pt-footer-ink: #e9ebef;
  --pt-footer-muted: #a3a9b4;
  --pt-page-hero-bg: var(--pt-soft);
  --pt-page-hero-ink: var(--pt-ink);
  --cs-ink: var(--pt-ink);
  --cs-muted: var(--pt-muted);
  --cs-line: var(--pt-line);
  --cs-soft: var(--pt-soft);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--pt-bg);
  color: var(--pt-ink);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

:where(.pt-shell) a { color: inherit; }

/* church-site.css 의 `.church-site h1..h4` 폰트 고정을 템플릿 토큰으로 넘긴다.
   헤딩에 디스플레이 폰트가 필요하면 해당 요소에서 --pt-heading-font 를 지정한다. */
.church-site .pt-shell :is(h1, h2, h3, h4, h5) {
  font-family: var(--pt-heading-font, Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif);
}
:where(.pt-shell) img { max-width: 100%; }
.pt-main { flex: 1 0 auto; }

.pt-wrap {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.pt-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pt-clamp-1 {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Header */
.pt-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--pt-header-bg);
  color: var(--pt-header-ink);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--pt-line) 80%, transparent);
}
.pt-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 78px;
}
.pt-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: min(62vw, 360px);
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.pt-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}
.pt-brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--pt-primary);
  color: var(--pt-primary-ink);
  font-weight: 800;
  flex-shrink: 0;
}
.pt-brand-text { display: grid; min-width: 0; line-height: 1.25; }
.pt-brand-text strong {
  --pt-heading-font: var(--pt-display);
  font-family: var(--pt-display);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-brand-text em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--pt-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pt-shell .pt-nav {
  margin-left: auto;
  flex-wrap: nowrap;
  gap: 2px;
}
.pt-shell .pt-nav > a,
.pt-shell .pt-nav .cs-nav-parent-row > a {
  padding: 10px 14px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--pt-header-ink) 78%, transparent);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.pt-shell .pt-nav > a:hover,
.pt-shell .pt-nav .cs-nav-parent-row > a:hover {
  color: var(--pt-header-ink);
  background: color-mix(in srgb, var(--pt-primary) 9%, transparent);
}
.pt-shell .pt-nav a.is-active {
  color: var(--pt-primary);
  background: color-mix(in srgb, var(--pt-primary) 11%, transparent);
}
.pt-shell .pt-nav .cs-nav-sub {
  border-radius: 14px;
  border-color: var(--pt-line);
  padding: 8px;
}
.pt-shell .pt-nav .cs-nav-sub a {
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
}
.pt-menu-btn {
  margin-left: auto;
  color: var(--pt-header-ink);
}

@media (max-width: 1080px) {
  .pt-shell .pt-nav > a,
  .pt-shell .pt-nav .cs-nav-parent-row > a { padding: 9px 10px; font-size: 14px; }
}

@media (max-width: 920px) and (min-width: 769px) {
  .pt-brand-text em { display: none; }
  .pt-shell .pt-nav > a,
  .pt-shell .pt-nav .cs-nav-parent-row > a { padding: 8px 7px; font-size: 13.5px; }
}

/* Drawer theming (markup: partials/cs-mobile-menu) */
@media (max-width: 768px) {
  .pt-header-inner { min-height: 64px; gap: 12px; }
  .pt-brand img { width: 36px; height: 36px; }
  .pt-brand-mark { width: 36px; height: 36px; border-radius: 10px; }
  .pt-brand-text strong { font-size: 1.06rem; }
  .pt-menu-btn { display: block; }
  .pt-shell ~ .cs-mobile-menu,
  .pt-shell .cs-mobile-menu { border-radius: 22px 0 0 22px; }
  .pt-shell .cs-mobile-nav a.is-active { color: var(--pt-primary); }
  .pt-shell .cs-mobile-cta {
    background: var(--pt-primary);
    color: var(--pt-primary-ink);
    border-color: var(--pt-primary);
  }
}

/* Buttons & links */
.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 24px;
  border: 1.5px solid color-mix(in srgb, var(--pt-ink) 22%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--pt-ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.pt-btn:hover { border-color: var(--pt-primary); color: var(--pt-primary); }
.pt-btn-solid {
  background: var(--pt-primary);
  border-color: var(--pt-primary);
  color: var(--pt-primary-ink);
}
.pt-btn-solid:hover {
  background: color-mix(in srgb, var(--pt-primary) 86%, black);
  border-color: color-mix(in srgb, var(--pt-primary) 86%, black);
  color: var(--pt-primary-ink);
}
.pt-btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.pt-btn:focus-visible,
.pt-text-link:focus-visible,
.pt-more:focus-visible,
.pt-shell a:focus-visible {
  outline: 2px solid var(--pt-primary);
  outline-offset: 3px;
}
.pt-text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pt-primary);
  font-weight: 700;
  text-decoration: none;
}
.pt-text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.pt-more {
  flex-shrink: 0;
  color: var(--pt-muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}
.pt-more::after { content: " +"; color: var(--pt-primary); }
.pt-more:hover { color: var(--pt-primary); }
.pt-empty {
  margin: 0;
  padding: 18px 0;
  color: var(--pt-muted);
  font-size: 14px;
}

/* Broken image placeholder (album cover deleted 등) */
.pt-shell img.cs-img-broken,
.church-site img.cs-img-broken { visibility: hidden; }
.cs-img-broken-host {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--cs-primary, #94a3b8) 14%, white), color-mix(in srgb, var(--cs-primary, #94a3b8) 4%, white)) !important;
}

/* Sub pages */
.pt-page { flex: 1 0 auto; }
.pt-page-hero {
  padding: 64px 0 52px;
  background: var(--pt-page-hero-bg);
  color: var(--pt-page-hero-ink);
}
.pt-page-kicker {
  margin: 0 0 6px;
  color: var(--pt-primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.pt-page-hero h1 {
  margin: 0;
  --pt-heading-font: var(--pt-display);
  font-family: var(--pt-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.pt-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: color-mix(in srgb, var(--pt-page-hero-ink) 62%, transparent);
  font-size: 13px;
}
.pt-crumbs a { text-decoration: none; }
.pt-crumbs a:hover { text-decoration: underline; }
.pt-page-body { padding: 40px 0 88px; }
.pt-page-body .cs-main { width: 100%; }

/* Footer */
.pt-footer {
  margin-top: auto;
  background: var(--pt-footer-bg);
  color: var(--pt-footer-ink);
}
.pt-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px 40px;
  padding: 52px 0 40px;
}
.pt-footer-brand { display: flex; align-items: center; gap: 14px; }
.pt-footer-brand img { width: 44px; height: 44px; object-fit: contain; }
.pt-footer-brand strong {
  --pt-heading-font: var(--pt-display);
  font-family: var(--pt-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.pt-footer-brand p { margin: 2px 0 0; color: var(--pt-footer-muted); font-size: 13px; }
.pt-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: center;
  gap: 6px 22px;
  font-size: 14px;
  font-weight: 600;
}
.pt-footer-links a { text-decoration: none; color: var(--pt-footer-ink); }
.pt-footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.pt-footer-contact {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--pt-footer-ink) 14%, transparent);
  color: var(--pt-footer-muted);
  font-size: 13.5px;
  font-style: normal;
}
.pt-footer-contact b {
  margin-right: 8px;
  color: var(--pt-footer-ink);
  font-weight: 700;
}
.pt-footer-contact a { color: inherit; }
.pt-footer-copy {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--pt-footer-muted);
  font-size: 12.5px;
}
.pt-footer-copy a { margin-left: 8px; color: inherit; }

@media (max-width: 768px) {
  .pt-wrap { width: calc(100% - 32px); }
  .pt-page-hero { padding: 40px 0 34px; }
  .pt-page-body { padding: 24px 0 64px; }
  .pt-footer-inner { grid-template-columns: 1fr; padding: 40px 0 32px; }
  .pt-footer-links { justify-content: flex-start; }
  .pt-footer-contact { flex-direction: column; }
  .pt-btn { min-height: 46px; padding: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .pt-shell *,
  .pt-shell *::before,
  .pt-shell *::after { transition: none !important; animation: none !important; }
}
