:root {
  color-scheme: dark;
  --espresso: #211711;
  --espresso-deep: #17100c;
  --charcoal: #2c231d;
  --ivory: #f5ecdc;
  --ivory-soft: rgba(245, 236, 220, .78);
  --ivory-faint: rgba(245, 236, 220, .56);
  --sand: #d9bc90;
  --sand-bright: #ecd6b2;
  --line: rgba(255, 244, 228, .14);
  --glass: rgba(255, 238, 214, .13);
  --glass-strong: rgba(92, 72, 56, .46);
  --glass-edge: rgba(255, 246, 232, .3);
  --reading: rgba(30, 21, 16, .9);
  --gutter: 16px;
  --nav-space: calc(104px + env(safe-area-inset-bottom));
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--espresso-deep); }
body {
  margin: 0;
  background: var(--espresso);
  color: var(--ivory);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--sand-bright); outline-offset: 2px; }

.loading { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--ivory-soft); }
.preview-flag {
  position: fixed; z-index: 30; top: calc(8px + env(safe-area-inset-top)); right: 10px;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--sand); color: #2b1e15;
}

/* ─ 유리 공통 ─ */
.glass {
  background: linear-gradient(135deg, rgba(255, 240, 218, .2), rgba(255, 232, 204, .07));
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, .22), 0 10px 30px rgba(10, 6, 3, .28);
}

/* ─ 표지 ─ */
.cover {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  isolation: isolate;
  background: var(--charcoal);
}
.cover-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; z-index: -2; }
.cover::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(36, 25, 18, .62) 0%, rgba(36, 25, 18, .38) 17%, rgba(33, 23, 17, 0) 34%, rgba(33, 23, 17, 0) 48%, rgba(33, 23, 17, .68) 74%, rgba(33, 23, 17, .96) 100%);
}
.cover-logo {
  width: 96px; height: auto;
  margin: calc(22px + env(safe-area-inset-top)) 0 0 22px;
  filter: drop-shadow(0 1px 6px rgba(30, 20, 12, .55));
}
.cover-foot { padding: 0 22px calc(30px + env(safe-area-inset-bottom)); }
.cover-title { font-size: 38px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; text-shadow: 0 1px 16px rgba(20, 12, 7, .45); }
.cover-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 10px; font-size: 16px; color: rgba(245, 236, 220, .92); line-height: 1.5; }
.cover-meta i { width: 1px; height: 12px; background: rgba(245, 236, 220, .5); }
.read-btn {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; margin-top: 26px; padding: 0 10px 0 28px;
  border-radius: 32px; text-decoration: none; font-size: 18px; font-weight: 600;
  color: #2b1e15;
  background: linear-gradient(100deg, var(--read-a, rgba(232, 208, 170, .95)) 0%, var(--read-b, rgba(214, 186, 146, .72)) 38%, rgba(190, 165, 135, .26) 78%, rgba(160, 136, 112, .18) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 244, 226, .5);
  box-shadow: inset 0 1px 0 rgba(255, 252, 244, .5), 0 12px 30px rgba(10, 6, 3, .35);
}
.read-btn .arrow {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(45, 32, 23, .88); color: var(--ivory);
}
.read-btn svg { width: 22px; height: 22px; }

/* ─ 장 공통 ─ */
.chapter { position: relative; min-height: 100vh; min-height: 100svh; padding: 0 var(--gutter); isolation: isolate; }
.chapter > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.chapter:last-of-type { padding-bottom: var(--nav-space); }
.chapter-title { font-size: 32px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; padding-top: calc(30px + env(safe-area-inset-top)); margin-bottom: 18px; text-shadow: 0 1px 14px rgba(20, 12, 7, .35); }
.chapter-sub { color: var(--ivory-soft); margin: -12px auto 18px; font-size: 18px; }
.sub-title { font-size: 20px; font-weight: 600; margin-top: 34px; margin-bottom: 12px; letter-spacing: -.01em; }

/* ─ 예배 ─ */
#worship { padding-bottom: 28px; }
.worship-bg { position: absolute; inset: 0 0 auto 0; height: 560px; max-width: none; z-index: -1; overflow: hidden; }
.worship-bg img { width: 100%; height: 100%; object-fit: cover; }
.worship-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(33, 23, 17, .18), rgba(33, 23, 17, .42) 45%, var(--espresso) 100%); }

.chapter-eyebrow { padding-top: calc(26px + env(safe-area-inset-top)); color: rgba(245, 236, 220, .9); font-size: 14px; line-height: 1.4; text-shadow: 0 1px 8px rgba(20, 12, 7, .5); }
.chapter-eyebrow + .chapter-title { padding-top: 4px; }

/* 1·2부 선택과 순서를 네모 하나에 담습니다. */
.worship-box {
  padding: 8px 16px 6px; border-radius: 24px;
  background: linear-gradient(145deg, rgba(126, 101, 80, .62), rgba(64, 49, 38, .72));
}
.service-picker { display: flex; gap: 4px; padding: 4px; margin: 0 -8px; border-radius: 18px; background: rgba(25, 16, 11, .32); border: 1px solid rgba(255, 246, 232, .16); }
.service {
  flex: 1 1 0; min-width: 0; min-height: 48px; border-radius: 14px; font-size: 16px; font-weight: 500; color: var(--ivory-soft);
  transition: background .2s ease, color .2s ease;
}
.service[aria-pressed="true"] {
  color: #2b1e15; font-weight: 600;
  background: linear-gradient(160deg, var(--sand-bright), var(--sand));
  box-shadow: inset 0 1px 0 rgba(255, 252, 244, .55), 0 3px 10px rgba(10, 6, 3, .25);
}
.service-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 14px 0 12px; border-bottom: 1px solid var(--line); line-height: 1.45; }
.service-info strong { font-size: 19px; font-weight: 600; }
.service-info span { font-size: 14px; color: rgba(245, 236, 220, .88); }

.order-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; min-height: 56px; }
.order-row + .order-row { border-top: 1px solid var(--line); }
.order-row.is-message .order-value strong { color: var(--sand-bright); font-weight: 600; font-size: 16px; }
.order-icon { flex: 0 0 26px; width: 26px; height: 26px; color: var(--ivory); }
.order-title { flex: 0 0 auto; font-weight: 500; font-size: 16px; line-height: 1.4; }
.order-value { flex: 1 1 auto; min-width: 0; text-align: right; font-size: 15px; line-height: 1.45; color: rgba(245, 236, 220, .9); }
.order-value strong { display: block; font-weight: 500; color: var(--ivory); }
.order-value span { display: block; }
.order-value strong + span { color: var(--ivory-soft); font-size: 14px; }

.memory { padding: 16px 0 14px; border-top: 1px solid var(--line); }
.memory-label { color: var(--sand-bright); font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.memory-text { font-size: 17px; line-height: 1.75; font-weight: 500; }
.memory-ref { margin-top: 10px; color: var(--ivory-soft); font-size: 15px; }
.memory-credit { margin-top: 2px; color: var(--ivory-faint); font-size: 13px; }

/* ─ 말씀 ─ */
#word { padding-bottom: var(--nav-space); }
.word-hero { position: relative; margin: 0 calc(var(--gutter) * -1); max-width: none; height: min(36vh, 320px); overflow: hidden; }
.word-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.word-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(33, 23, 17, 0) 55%, var(--espresso) 100%); }
#word .chapter-title { padding-top: 6px; margin-top: -6px; position: relative; }
.prayer-row {
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 18px; border-radius: 18px; margin-top: 14px; font-weight: 500;
  background: linear-gradient(135deg, rgba(120, 96, 76, .46), rgba(70, 54, 42, .46));
}
.prayer-row svg { width: 26px; height: 26px; flex: none; }
.reading { padding: 20px; border-radius: 22px; background: var(--reading); border: 1px solid var(--line); margin-top: 14px; }
.reading-label { color: var(--sand); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.verses { margin: 0; padding: 0; list-style: none; }
.verses li { display: flex; gap: 10px; line-height: 1.75; }
.verses li + li { margin-top: 8px; }
.verses .n { flex: 0 0 18px; color: var(--sand); font-weight: 600; font-size: 14px; line-height: 2.1; font-variant-numeric: tabular-nums; }
.summary p + p { margin-top: 1em; }
.summary p { line-height: 1.8; }
.question { padding: 20px; border-radius: 22px; background: linear-gradient(160deg, rgba(58, 44, 34, .94), rgba(30, 21, 16, .94)); border: 1px solid rgba(255, 244, 228, .2); margin-top: 12px; }
.question-label { color: var(--sand); font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.question-text { font-size: 20px; line-height: 1.55; font-weight: 500; letter-spacing: -.01em; }

/* ─ 소식 ─ */
.news-item { padding: 18px 20px 20px; border-radius: 22px; background: var(--reading); border: 1px solid var(--line); }
.news-item + .news-item { margin-top: 12px; }
.news-title { font-size: 18px; line-height: 1.45; font-weight: 600; color: var(--sand-bright); margin-bottom: 6px; letter-spacing: -.01em; }
.news-body { white-space: pre-line; line-height: 1.75; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.news-item { position: relative; }
.news-more { display: flex; justify-content: flex-end; align-items: center; gap: 5px; margin-top: 10px; color: var(--sand-bright); font-size: 15px; font-weight: 500; text-decoration: none; line-height: 1.4; }
.news-more svg { width: 18px; height: 18px; }
.news-more::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

/* ─ 헌금 ─ */
.offer-list { margin-top: 16px; padding: 4px 14px; border-radius: 20px; background: var(--reading); border: 1px solid var(--line); }
.offer-group { padding: 14px 0 16px; }
.offer-group + .offer-group { border-top: 1px solid var(--line); }
.offer-title { color: var(--sand-bright); font-size: 17px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.acc-sub { color: var(--sand); font-size: 14px; font-weight: 600; margin: 8px 0 0; }
.names { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px 4px; margin: 4px 0 0; padding: 0; list-style: none; }
.names li { line-height: 1.8; white-space: nowrap; font-size: clamp(11px, 3.55vw, 16px); letter-spacing: -.02em; }
.offer-note { margin-top: 12px; color: var(--ivory-soft); line-height: 1.6; font-size: 16px; }
.online { padding: 18px 20px; border-radius: 22px; background: linear-gradient(160deg, rgba(58, 44, 34, .94), rgba(30, 21, 16, .94)); border: 1px solid rgba(255, 244, 228, .22); }
.online h3 { color: var(--sand); font-size: 15px; font-weight: 600; }
.online-bank { margin-top: 6px; font-size: 16px; color: var(--ivory-soft); }
.online-account { font-size: 22px; font-weight: 600; letter-spacing: .01em; line-height: 1.4; font-variant-numeric: tabular-nums; }
.online-holder { font-size: 15px; color: var(--ivory-soft); margin-top: 2px; }
.btn-line { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 12px; padding: 0 18px; border-radius: 22px; border: 1px solid rgba(217, 188, 144, .6); color: var(--sand-bright); font-size: 15px; font-weight: 500; text-decoration: none; }

/* ─ 안내 ─ */
.meeting { padding: 4px 18px; border-radius: 20px; background: var(--reading); border: 1px solid var(--line); }
.meeting-row { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 12px 0; }
.meeting-row + .meeting-row { border-top: 1px solid var(--line); }
.meeting-name { font-weight: 500; line-height: 1.45; }
.meeting-time { color: var(--sand-bright); font-weight: 500; font-size: 16px; line-height: 1.55; text-align: right; }
.meeting-place { grid-column: 1 / -1; color: var(--ivory-soft); font-size: 15px; line-height: 1.5; }

.seg { display: flex; gap: 6px; padding: 4px; border-radius: 16px; background: rgba(255, 238, 214, .08); border: 1px solid var(--line); }
.seg button { flex: 1 1 0; min-height: 44px; border-radius: 12px; font-size: 15px; font-weight: 500; color: var(--ivory-soft); line-height: 1.2; padding: 4px 2px; min-width: 0; }
.seg button[aria-pressed="true"] { background: var(--sand); color: #2b1e15; font-weight: 600; }

.church { padding: 18px 20px; border-radius: 20px; background: var(--reading); border: 1px solid var(--line); }
.church-name { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.staff { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 0; }
.staff dt { color: var(--ivory-soft); }
.staff dd { margin: 0; font-weight: 500; }
.church-address { margin-top: 12px; line-height: 1.6; color: var(--ivory-soft); }

/* ─ 하단 메뉴 ─ */
.tabbar {
  position: fixed; z-index: 20; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(calc(100% - 16px), 560px); transform: translate(-50%, 0);
  display: flex; gap: 0; padding: 5px; border-radius: 30px;
  background: linear-gradient(135deg, rgba(92, 73, 58, .74), rgba(52, 40, 31, .8));
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, .24), 0 14px 34px rgba(10, 6, 3, .42);
  transition: transform .28s ease, opacity .28s ease, visibility .28s;
}
.tab-home { opacity: .86; }
.tabbar[data-hidden="true"] { transform: translate(-50%, 130%); opacity: 0; visibility: hidden; }
.tab {
  text-decoration: none; white-space: nowrap;
  flex: 1 1 0; min-width: 0; min-height: 58px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: clamp(10.5px, 3vw, 12px); line-height: 1.3; font-weight: 500; color: var(--ivory); transition: background .2s ease, color .2s ease;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="true"] {
  color: #2b1e15; font-weight: 600;
  background: linear-gradient(160deg, var(--sand-bright), var(--sand));
  box-shadow: inset 0 1px 0 rgba(255, 252, 244, .55);
}

.toast {
  position: fixed; z-index: 40; left: 50%; bottom: var(--nav-space); transform: translateX(-50%);
  padding: 8px 16px; border-radius: 20px; font-size: 14px; background: rgba(15, 10, 7, .92); border: 1px solid var(--line); white-space: nowrap;
}

.blank { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; color: var(--ivory-soft); }
.blank img { width: 130px; }

/* ─ 첫 화면 ─ */
.home { min-height: 100vh; min-height: 100svh; }
.home-menu { display: grid; gap: 10px; margin-top: 22px; }
.home-menu .read-btn { margin-top: 0; }
.home-link {
  display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 10px 0 28px; border-radius: 32px;
  color: var(--ivory); font-size: 18px; font-weight: 600; text-decoration: none;
}
.home-link .arrow { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 244, 228, .16); }
.home-link svg { width: 22px; height: 22px; }
.install-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; margin-top: 8px; color: rgba(245, 236, 220, .9); font-size: 14px; }
.install-btn svg { width: 18px; height: 18px; flex: none; }
.sheet { width: min(calc(100% - 32px), 420px); padding: 22px; border: 1px solid var(--glass-edge); border-radius: 24px; background: #2c211a; color: var(--ivory); }
.sheet::backdrop { background: rgba(8, 5, 3, .66); }
.sheet h2 { font-size: 20px; font-weight: 600; line-height: 1.35; }
.sheet-lead { margin-top: 6px; color: var(--ivory-soft); font-size: 15px; line-height: 1.55; }
.sheet-steps { list-style: none; margin: 14px 0 4px; padding: 0; }
.sheet-steps li { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 15px; line-height: 1.5; }
.sheet-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: #2b1e15; font-size: 13px; font-weight: 600; }
.sheet-icon { flex: none; width: 22px; height: 22px; margin-left: auto; color: var(--sand-bright); }

/* ─ 라운드교회 페이지 ─ */
.church-page .chapter:first-child { padding-top: 0; }
.church-hero { position: relative; display: grid; place-items: center; margin: 0 calc(var(--gutter) * -1); max-width: none; height: min(46vh, 420px); overflow: hidden; }
.church-hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; filter: sepia(.28) saturate(.82) brightness(.82); }
.church-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(33, 23, 17, .58) 0%, rgba(33, 23, 17, .34) 50%, var(--espresso) 100%); }
.church-logo { position: relative; z-index: 1; width: 148px; height: auto; filter: drop-shadow(0 2px 12px rgba(20, 12, 7, .6)); animation: logo-in .9s ease both; }
@keyframes logo-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.church-page #about-title { padding-top: 10px; }
.intro-text { margin-top: 0; }
.intro-text p + p { margin-top: 1em; }
.intro-text p:first-child { font-size: 20px; font-weight: 500; line-height: 1.6; letter-spacing: -.01em; color: var(--sand-bright); }
.intro-text p { line-height: 1.8; }
.visit { padding: 18px 20px 20px; border-radius: 20px; background: var(--reading); border: 1px solid var(--line); }
.visit-row { display: flex; gap: 10px; line-height: 1.55; }
.visit-row + .visit-row { margin-top: 8px; }
.visit-row svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--sand); }
.visit-row a { color: var(--sand-bright); }
.routes { margin: 14px 0 12px; }
.routes div { padding: 11px 0; border-top: 1px solid var(--line); }
.routes dt { color: var(--sand); font-size: 14px; font-weight: 600; line-height: 1.5; }
.routes dd { margin: 2px 0 0; font-size: 15px; line-height: 1.7; white-space: pre-line; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.person { padding: 18px 20px; border-radius: 20px; background: var(--reading); border: 1px solid var(--line); }
.person + .person { margin-top: 10px; }
.person-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 15%; border-radius: 14px; margin-bottom: 14px; background: var(--charcoal); }
.person-bio { margin-top: 8px; color: var(--ivory-soft); font-size: 15px; line-height: 1.7; white-space: pre-line; }
.person-role { color: var(--sand); font-size: 14px; font-weight: 600; }
.person-names { font-size: 21px; font-weight: 500; line-height: 1.45; letter-spacing: -.01em; }
.info-list { margin: 0; padding: 4px 20px; border-radius: 20px; background: var(--reading); border: 1px solid var(--line); }
.info-list div { padding: 12px 0; }
.info-list div + div { border-top: 1px solid var(--line); }
.info-list dt { color: var(--ivory-faint); font-size: 13px; line-height: 1.5; }
.info-list dd { margin: 0; line-height: 1.55; font-weight: 500; }
.info-list a { color: var(--sand-bright); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gallery-grid figure { margin: 0; }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: var(--charcoal); }
.gallery-grid figcaption { margin-top: 5px; color: var(--ivory-soft); font-size: 13px; line-height: 1.45; }
.gallery-grid a { display: block; }
.gallery-empty { padding: 28px 20px; border-radius: 20px; background: var(--reading); border: 1px solid var(--line); margin-top: 0; text-align: center; }
/* 내용이 짧은 장의 빈 공간을 줄이되, 메뉴로 이동했을 때 현재 장 표시가 어긋나지 않을 높이는 남깁니다. */
#people, #info, #duty { min-height: 50vh; min-height: 50svh; }
#duty { padding-bottom: 24px; }
#people, #services, #info { padding-bottom: 24px; }

@media (min-width: 768px) {
  .church-logo { width: 190px; }
  .chapter { --gutter: 24px; }
  .cover-foot { width: 100%; max-width: 768px; margin: 0 auto; }
  .word-hero { max-width: none; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media (min-width: 768px) {
  .cover-photo { object-position: 50% 42%; }
}

/* 첫 화면은 버튼이 두 개라 글자가 사진의 밝은 벽까지 올라옵니다. 그만큼 아래쪽을 더 어둡게 합니다. */
.home::after {
  background: linear-gradient(180deg, rgba(36, 25, 18, .62) 0%, rgba(36, 25, 18, .36) 15%, rgba(33, 23, 17, .05) 30%, rgba(33, 23, 17, .58) 50%, rgba(33, 23, 17, .84) 68%, rgba(33, 23, 17, .97) 100%);
}

/* 대표 사진의 인물이 가려지지 않도록 로고를 하늘 쪽에 둡니다. */
.church-hero { place-items: start center; }
.church-logo { width: 112px; margin-top: calc(18px + env(safe-area-inset-top)); }
.church-hero-photo { object-position: 50% 100%; filter: sepia(.5) saturate(.75) brightness(.86); }
.church-hero::after { background: linear-gradient(180deg, rgba(40, 27, 18, .66) 0%, rgba(40, 27, 18, .34) 42%, rgba(33, 23, 17, .08) 62%, var(--espresso) 100%); }
@media (min-width: 768px) { .church-logo { width: 150px; } }

/* ─ 라운드교회: 로고 인트로 ─ */
.splash { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, #3a2a20, var(--espresso-deep) 72%); transition: opacity .5s ease; }
.splash-logo { width: min(46vw, 190px); height: auto; opacity: 0; }
.splash.ready .splash-logo { opacity: 1; animation: splash-in 1s cubic-bezier(.2, .7, .2, 1) both; }
.splash.leaving { opacity: 0; pointer-events: none; }
.splash.leaving .splash-logo { transition: transform .5s ease; transform: translateY(-28px) scale(.94); }
@keyframes splash-in { from { opacity: 0; transform: translateY(16px) scale(.9); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }

/* ─ 라운드교회: 스크롤 모션 ─ */
.motion-ready { opacity: 0; transform: translateY(28px); transition: opacity .75s ease, transform .85s cubic-bezier(.2, .7, .2, 1); will-change: opacity, transform; }
.motion-ready.in { opacity: 1; transform: none; }
.curve { display: block; width: 76px; height: 12px; margin: -10px 0 18px; overflow: visible; }
.curve path { fill: none; stroke: var(--sand); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.curve.motion-ready { transform: none; opacity: 1; }
.curve.in path { transition: stroke-dashoffset 1.1s .15s ease; stroke-dashoffset: 0; }
.church-hero { will-change: auto; }
.church-hero-photo { will-change: transform; transform-origin: 50% 100%; }

/* ─ 라운드교회: 소개 ─ */
.statement { margin-top: 4px; font-size: 25px; font-weight: 600; line-height: 1.55; letter-spacing: -.02em; color: var(--sand-bright); }
.intro-body { margin-top: 22px; line-height: 1.85; color: rgba(245, 236, 220, .92); }
#about { padding-bottom: 36px; }

/* ─ 라운드교회: 섬기는 이 ─ */
.person-frame { overflow: hidden; border-radius: 14px; margin-bottom: 14px; }
.person-frame .person-photo { margin-bottom: 0; border-radius: 0; transform: scale(1.08); transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.person.in .person-photo { transform: none; }
.chapter + .chapter { margin-top: 26px; }

/* ─ 라운드교회: 예배 안내 ─ */
#services .meeting { padding: 2px 18px; }

/* ─ 오시는 길·교회 정보: 박스 없이 ─ */
#visit { min-height: 50vh; min-height: 50svh; padding-bottom: 32px; }
.plain-list { margin: 0; }
.plain-row { padding: 12px 0; }
.plain-row dt { color: var(--sand); font-size: 14px; font-weight: 600; line-height: 1.5; }
.plain-row dd { margin: 2px 0 0; font-size: 18px; line-height: 1.55; }
.plain-row a { color: var(--ivory); text-decoration: underline; text-decoration-color: rgba(217, 188, 144, .6); text-underline-offset: 4px; }
.plain-second { padding-top: 30px; margin-bottom: 6px; font-size: 24px; }

/* ─ 공동체 소식: 계속 스크롤 ─ */
.feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.feed-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding-top: 18px; font-size: 18px; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; }
.feed-head:first-child { padding-top: 0; }
.feed-head small { color: var(--ivory-faint); font-size: 13px; font-weight: 400; }
.feed-tile { display: block; min-width: 0; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: var(--charcoal); }
.feed-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.feed-tile:active img { transform: scale(.97); }
.feed-sentinel { height: 1px; }
.feed-status { padding: 22px 0 8px; text-align: center; color: var(--ivory-faint); font-size: 14px; }
.feed-status:empty { padding: 0; }
@media (min-width: 768px) { .feed { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ─ 사진 크게 보기 ─ */
html.viewer-open { overflow: hidden; }
.viewer { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: #0e0906; color: var(--ivory); }
.viewer[open] { display: flex; flex-direction: column; animation: viewer-in .25s ease; }
.viewer::backdrop { background: #0e0906; }
@keyframes viewer-in { from { opacity: 0; } to { opacity: 1; } }
.viewer-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(8px + env(safe-area-inset-top)) 10px 6px 16px; }
.viewer-count { font-size: 14px; color: var(--ivory-soft); }
.viewer-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; font-size: 28px; line-height: 1; background: rgba(255, 244, 228, .12); }
.viewer-stage { position: relative; flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.viewer-photo { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; background-position: center; background-size: contain; background-repeat: no-repeat; }
.viewer-nav { position: absolute; top: 50%; width: 44px; height: 64px; margin-top: -32px; font-size: 32px; line-height: 1; border-radius: 12px; background: rgba(14, 9, 6, .42); }
.viewer-nav.prev { left: 6px; }
.viewer-nav.next { right: 6px; }
.viewer-caption { flex: none; min-height: 28px; padding: 6px 16px 2px; text-align: center; font-size: 15px; line-height: 1.4; }
.viewer-strip { flex: none; display: flex; gap: 5px; overflow-x: auto; padding: 6px 12px; scrollbar-width: none; }
.viewer-strip::-webkit-scrollbar, .viewer-years::-webkit-scrollbar { display: none; }
.viewer-thumb { flex: none; width: 54px; height: 54px; overflow: hidden; border-radius: 8px; opacity: .55; background: var(--charcoal); border: 2px solid transparent; }
.viewer-thumb[aria-current="true"] { opacity: 1; border-color: var(--sand-bright); }
.viewer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.viewer-years { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 6px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(44, 33, 26, .9); scrollbar-width: none; }
.viewer-year { flex: none; min-height: 44px; padding: 4px 14px; border-radius: 22px; font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--ivory-soft); background: rgba(255, 244, 228, .08); }
.viewer-year small { margin-left: 5px; font-size: 12px; opacity: .72; }
.viewer-year[aria-pressed="true"] { color: #2b1e15; font-weight: 600; background: var(--sand); }

@media (prefers-reduced-motion: reduce) {
  .motion-ready, .splash-logo, .person-frame .person-photo { animation: none; transition: none; opacity: 1; transform: none; }
  .curve path { stroke-dashoffset: 0; }
}

/* ─ 사역자 프로필: 배경 없는 인물 + 빛 ─ */
.person.has-photo { padding: 0; border: 0; border-radius: 0; background: none; }
.person.has-photo + .person { margin-top: 22px; }
.person-frame {
  position: relative; display: flex; justify-content: center; align-items: flex-end; margin: 0; padding-top: 22px;
  overflow: hidden; border-radius: 0; isolation: isolate;
  background: radial-gradient(ellipse 66% 62% at 50% 46%, rgba(226, 190, 141, .34), rgba(226, 190, 141, .1) 56%, rgba(226, 190, 141, 0) 76%);
}
.person-frame .person-photo {
  display: block; width: min(86%, 430px); height: auto; aspect-ratio: auto; margin: 0; object-fit: contain; background: none; border-radius: 0;
  filter: drop-shadow(0 14px 26px rgba(8, 5, 3, .5));
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
  transform: translateY(26px) scale(1.03); transform-origin: 50% 100%;
}
.person.has-photo.in .person-photo { transform: none; }
.person.has-photo .person-text { position: relative; margin-top: -24px; text-align: center; }
.person.has-photo .person-role { font-size: 15px; letter-spacing: .12em; }
.person.has-photo .person-names { font-size: 34px; font-weight: 600; line-height: 1.3; letter-spacing: .02em; }
.person-bio { list-style: none; margin: 16px 0 0; padding: 0; font-size: 15px; line-height: 1.6; white-space: normal; }
.person-bio li { padding: 10px 0; border-top: 1px solid var(--line); color: rgba(245, 236, 220, .86); }
.person-bio li:last-child { border-bottom: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { .person-frame .person-photo { transform: none; } }

/* 넓은 화면에서도 곡선이 제목과 같은 왼쪽 선에 오도록 맞춥니다. */
.chapter > .curve { margin-left: max(0px, calc((100% - 720px) / 2)); margin-right: 0; }

/* ─ 전도사 프로필: 한 줄에 두 분 ─ */
.person-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 34px; margin-bottom: 26px; }
.person-grid .person, .person-grid .person.has-photo + .person { margin-top: 0; min-width: 0; }
.person-grid .person-frame { padding-top: 12px; }
.person-grid .person-frame .person-photo { width: 92%; }
.person-grid .person-text { margin-top: -14px; }
.person-grid .person-role { font-size: 13px; letter-spacing: .1em; }
.person-grid .person-names { font-size: clamp(22px, 6.6vw, 28px); }
.person-grid .person-bio { margin-top: 8px; font-size: 14px; }
.person-grid .person-bio li { padding: 7px 0; }

/* ─ 시작 인트로: ‘환영합니다’를 붓펜으로 쓰고 로고 등장 ─ */
.splash { align-content: center; justify-items: center; gap: 26px; }
.splash-welcome .splash-logo { width: min(36vw, 150px); }
.written { width: min(84vw, 400px); min-height: 90px; }
.written svg { display: block; width: 100%; height: auto; overflow: visible; }
.written-ink { fill: var(--ivory); }
.written-plain { text-align: center; font-size: 34px; font-weight: 600; }
#smallGroupsTitle { margin-top: 38px; }

/* ─ 봉사표: 월 전체 ─ */
.duty { margin-top: 12px; padding: 4px 14px 14px; border-radius: 20px; background: var(--reading); border: 1px solid var(--line); }
.duty-scroll { overflow-x: auto; }
.duty-table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 15px; line-height: 1.45; }
.duty-table thead th { padding: 11px 5px 9px; color: var(--sand); font-size: 13px; font-weight: 600; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.duty-table td, .duty-table tbody th { padding: 11px 5px; text-align: left; vertical-align: top; font-weight: 400; word-break: keep-all; }
.duty-table tbody tr + tr > * { border-top: 1px solid var(--line); }
.duty-table tbody th { width: 46px; font-weight: 600; white-space: nowrap; }
.duty-table tbody th small { display: block; color: var(--ivory-faint); font-size: 12px; font-weight: 400; }
.duty-table tr.is-today > * { background: rgba(217, 188, 144, .15); }
.duty-table tr.is-today > :first-child { border-radius: 10px 0 0 10px; }
.duty-table tr.is-today > :last-child { border-radius: 0 10px 10px 0; }
.duty-shared { margin: 6px 0 0; padding-top: 12px; border-top: 1px solid rgba(217, 188, 144, .35); }
.duty-shared-title { color: var(--sand); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.duty-shared div { display: flex; gap: 12px; padding: 4px 0; font-size: 15px; line-height: 1.45; }
.duty-shared dt { flex: 0 0 86px; color: var(--ivory-soft); }
.duty-shared dd { margin: 0; font-weight: 500; }

/* ─ 라운드소식 게시물 ─ */
html.post-open { overflow: hidden; }
.post { position: fixed; inset: 0; z-index: 25; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--espresso); animation: post-in .28s cubic-bezier(.2, .7, .2, 1); }
.post[hidden] { display: none; }
@keyframes post-in { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
.post-inner { max-width: 720px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) var(--gutter) calc(32px + env(safe-area-inset-bottom)); }
.post-back { position: sticky; top: calc(10px + env(safe-area-inset-top)); z-index: 2; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px 0 13px; border-radius: 22px; font-size: 15px; font-weight: 500; }
.post-label { margin-top: 24px; color: var(--sand); font-size: 14px; font-weight: 600; }
.post-title { margin-top: 4px; font-size: 28px; font-weight: 600; line-height: 1.35; letter-spacing: -.02em; }
.post-body { margin-top: 18px; white-space: pre-line; font-size: 17px; line-height: 1.85; }
.post-photos { display: grid; gap: 10px; margin-top: 22px; }
.post-photos a { display: block; }
.post-photos img { width: 100%; height: auto; border-radius: 16px; background: var(--charcoal); }
.post-nav { align-items: start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); }
.post-near { min-width: 0; min-height: 64px; padding: 10px 2px; text-align: left; line-height: 1.4; font-size: 14px; }
.post-near.next { text-align: right; }
.post-near small { display: block; color: var(--sand); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .post { animation: none; } }

/* ─ 화면 전환 ─ */
body { transition: opacity .22s ease; }
html.page-leaving body { opacity: 0; pointer-events: none; }
#app > main, #app > header, #app > .blank { animation: page-in .42s ease-out both; }
.loading { animation: page-in .25s ease .5s both; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

.post.closing { animation: post-out .24s ease-in forwards; pointer-events: none; }
@keyframes post-out { to { opacity: 0; transform: translateX(26px); } }
.post-inner.from-next { animation: post-from-right .3s cubic-bezier(.2, .7, .2, 1); }
.post-inner.from-prev { animation: post-from-left .3s cubic-bezier(.2, .7, .2, 1); }
@keyframes post-from-right { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes post-from-left { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }

#worshipBody > *, #dutyMonth { animation: page-in .3s ease-out; }

@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
  #app > main, #app > header, #app > .blank, .post.closing, .post-inner, #worshipBody > *, #dutyMonth { animation: none; }
  .loading { animation: none; }
  .splash.ready .splash-logo { animation: none; opacity: 1; }
}

/* ─ 주보 도구·서랍 ─ */
.bulletin-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px auto 14px; }
.tool-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 20px; font-size: 14px; font-weight: 500; color: var(--ivory); text-decoration: none; background: rgba(30, 21, 16, .55); border: 1px solid rgba(255, 246, 232, .3); }
.tool-pill svg { width: 18px; height: 18px; }
.drawer-page { padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: 48px; }
.drawer-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ivory-soft); text-decoration: none; font-size: 15px; }
.drawer-back svg { width: 20px; height: 20px; }
.drawer-page .chapter-title { padding-top: 8px; }
.drawer-months { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.drawer-months button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 20px; font-size: 14px; color: var(--ivory-soft); background: rgba(255, 238, 214, .08); }
.drawer-months button[aria-pressed="true"] { background: var(--sand); color: #2b1e15; font-weight: 600; }
.drawer-list { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 680px) { .drawer-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.drawer-card { overflow: hidden; border-radius: 20px; background: var(--reading); border: 1px solid var(--line); }
.drawer-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 30%; background: var(--charcoal); }
.drawer-text { padding: 14px 16px 16px; }
.drawer-date { color: var(--sand); font-size: 14px; font-weight: 600; }
.drawer-title { font-size: 20px; font-weight: 600; line-height: 1.4; }
.drawer-season { color: var(--ivory-soft); font-size: 14px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.post-card + .post-card { margin-top: 12px; }
.post-card-date { color: var(--ivory-faint); font-size: 13px; margin-bottom: 6px; }
.post-card-body { white-space: pre-line; line-height: 1.8; }
.post-card-photo { width: 100%; height: auto; margin-top: 12px; border-radius: 14px; }
