/* 스마트주보 웹 주보 — 앱(Flutter)과 같은 모양. 디자인규칙.md 의 색·크기.
 * 글자 크기는 모두 rem(기본 16px 기준) → 휴대폰·브라우저 글자 크기 설정 + 서랍의 「글자 크기」를 함께 따름.
 * 오래된 폰 고려: gap·aspect-ratio·inset·dvh 안 씀. */
:root {
  --p: #1D4E9E; --ps: #E8EDF5; --ink: #1B2433; --ink2: #5B6573; --line: #E6E9EE;
  --ground: #F6F7F9; --surface: #fff; --chip: #EEF1F5; --alert: #E5484D;
  --radius: 1rem; --title-weight: 700; /* 분위기 테마(settings.theme.mood)가 바꿈 */
}
* { box-sizing: border-box; -webkit-tap-highlight-color: rgba(0,0,0,0.06); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; height: 100%; }
body { margin: 0; height: 100%; overflow: hidden; background: var(--ground); color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "맑은 고딕", Roboto, sans-serif;
  font-size: 1rem; line-height: 1.5; word-break: keep-all; overflow-wrap: break-word; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }
svg.i { width: 1.5rem; height: 1.5rem; fill: currentColor; flex: none; vertical-align: middle; }
.nojs { padding: 2rem 1.25rem; font-size: 1.125rem; text-align: center; }
.boot { position: absolute; top: 40%; left: 0; right: 0; text-align: center; color: var(--ink2); }
.boot-dot { width: 2.25rem; height: 2.25rem; margin: 0 auto 0.75rem; border-radius: 50%; border: 0.25rem solid var(--line); border-top-color: var(--p); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───── 뼈대: 머리줄 + 위 탭 + 옆으로 넘기는 페이지 ───── */
#app { height: 100%; display: flex; flex-direction: column; position: relative; }
.top { flex: none; background: var(--surface); padding-top: env(safe-area-inset-top); z-index: 5; }
/* 앱 전(무료 기간 등) 미리보기 띠 — 작게, 한 줄 (2026-10-15) */
.preview-band { background: #FFF6E0; color: #6B4E00; font-size: 0.8125rem; line-height: 1.4; text-align: center; padding: 0.3125rem 0.75rem; border-bottom: 1px solid #F1E2B8; overflow-wrap: anywhere; }
.bar { display: flex; align-items: center; min-height: 3.5rem; padding: 0 0.5rem 0 0.25rem; }
.icon-btn { width: 3rem; height: 3rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; flex: none; }
.icon-btn:active { background: var(--chip); }
.bar .name { flex: 1; min-width: 0; display: flex; align-items: center; font-size: 1.25rem; font-weight: 700; }
.bar .name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-left: 0.5rem; }
.bar .name svg { color: var(--p); width: 1.625rem; height: 1.625rem; }
.date-chip { flex: none; display: flex; align-items: center; padding: 0.375rem 0.375rem 0.375rem 0.75rem; border-radius: 1.125rem; background: var(--chip); color: var(--ink2); font-size: 0.8125rem; font-weight: 600; margin-left: 0.5rem; }
.date-chip.past { background: var(--ps); color: var(--p); }
.date-chip svg { width: 1.125rem; height: 1.125rem; }
.tabs { display: flex; overflow-x: auto; overflow-y: hidden; padding: 0 0.5rem; border-bottom: 1px solid var(--line); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 0 0.75rem; min-height: 2.875rem; font-size: 0.9375rem; font-weight: 500; color: var(--ink2); white-space: nowrap; position: relative; }
.tab.on { color: var(--p); font-weight: 700; }
.tab.on::after { content: ""; position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--p); }
.strip { flex: none; display: flex; align-items: center; padding: 0.25rem 0.5rem 0.25rem 1rem; font-size: 0.875rem; font-weight: 600; }
.strip.past { background: var(--ps); }
.strip.past svg { color: var(--p); width: 1.125rem; height: 1.125rem; margin-right: 0.375rem; }
.strip.warn { background: #FFF4E0; font-weight: 400; font-size: 0.8125rem; }
.strip .grow { flex: 1; }
.text-btn { color: var(--p); font-weight: 600; padding: 0.5rem 0.625rem; border-radius: 0.5rem; font-size: 0.875rem; }
.pager { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.pager::-webkit-scrollbar { display: none; }
.page { flex: 0 0 100%; width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden; scroll-snap-align: start; scroll-snap-stop: always; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
.inner { max-width: 45rem; margin: 0 auto; padding-bottom: 2.5rem; }
.pad { padding-left: 1rem; padding-right: 1rem; }

/* ───── 공통 조각 ───── */
.card { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; overflow: hidden; }
button.card:active, a.card:active { background: #FAFBFC; }
.chips { display: flex; overflow-x: auto; padding: 0.25rem 1rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 2.25rem; padding: 0.375rem 1rem; border-radius: 1.25rem; background: var(--chip); color: var(--ink2); font-size: 0.9375rem; font-weight: 500; margin-right: 0.5rem; white-space: nowrap; }
.chip.on { background: var(--p); color: #fff; font-weight: 700; }
.toggle { display: flex; padding: 0.25rem; background: var(--chip); border-radius: 0.75rem; }
.toggle button { flex: 1; padding: 0.625rem 0.25rem; border-radius: 0.5625rem; font-size: 0.9375rem; font-weight: 500; color: var(--ink2); }
.toggle button.on { background: var(--surface); color: var(--p); font-weight: 700; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.badge { display: inline-block; padding: 0.1875rem 0.5rem; border-radius: 0.375rem; font-size: 0.75rem; font-weight: 700; margin: 0 0.375rem 0.25rem 0; line-height: 1.3; }
.sec-h { display: flex; align-items: center; font-size: 1.125rem; font-weight: 700; }
.sec-h svg { color: var(--p); width: 1.25rem; height: 1.25rem; margin-right: 0.375rem; }
.sec-h .grow { flex: 1; }
.sec-h .more { font-size: 0.875rem; font-weight: 400; color: var(--ink2); padding: 0.375rem 0.25rem; }
.big-title { font-size: 1.25rem; font-weight: var(--title-weight); color: var(--p); }
.msg { text-align: center; padding: 2rem 1.5rem; color: var(--ink2); }
.msg svg { width: 3rem; height: 3rem; color: var(--ink2); margin-bottom: 0.75rem; }
.msg p { margin: 0; white-space: pre-line; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0.5rem 1.125rem; border-radius: 1.5rem; background: var(--p); color: #fff; font-weight: 700; font-size: 1rem; text-align: center; }
.btn svg { width: 1.125rem; height: 1.125rem; margin-right: 0.375rem; }
.btn.line { background: transparent; color: var(--p); border: 1px solid #C9CFD8; }
.btn.soft { background: var(--ps); color: var(--p); }
.btn.wide { display: flex; width: 100%; border-radius: 0.875rem; min-height: 3.25rem; }
.btn[disabled] { opacity: 0.4; }
.btn-row { display: flex; flex-wrap: wrap; margin: 0.625rem -0.25rem -0.25rem; }
.btn-row > * { margin: 0.25rem; }
.two { display: flex; }
.two > * { flex: 1; min-width: 0; }
.two > * + * { margin-left: 0.625rem; }
.thumb { position: relative; background: var(--chip); overflow: hidden; }
.thumb > img, .thumb > .art, .thumb > div:first-child { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.ratio { position: relative; width: 100%; height: 0; overflow: hidden; }
.ratio > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.art { background: #CBD2DC; }
.art svg { position: absolute; left: 55%; top: 22%; width: 42%; height: 56%; fill: rgba(255,255,255,0.45); }
.shade { background: linear-gradient(to bottom, rgba(0,0,0,0) 35%, rgba(0,0,0,0.65) 100%); }
.ratio > .play, .play { position: absolute; left: 50%; top: 50%; width: 3.75rem; height: 3.75rem; margin: -1.875rem 0 0 -1.875rem; border-radius: 50%; border: 2.5px solid #fff; background: rgba(0,0,0,0.25); display: flex; align-items: center; justify-content: center; }
.play svg { width: 2.4rem; height: 2.4rem; fill: #fff; }
.dur { position: absolute; right: 0.25rem; bottom: 0.25rem; padding: 0.125rem 0.375rem; border-radius: 0.25rem; background: rgba(0,0,0,0.7); color: #fff; font-size: 0.75rem; font-weight: 600; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.muted { color: var(--ink2); }
.gap-s { height: 0.5rem; } .gap-m { height: 0.875rem; } .gap-l { height: 1.5rem; }

/* 예배안내 */
.hero { position: relative; border-radius: 1rem; overflow: hidden; }
.hero .shade-l { background: linear-gradient(to right, rgba(0,0,0,0.55), rgba(0,0,0,0)); }
.hero .htext { position: absolute; left: 1.125rem; right: 1.125rem; top: 50%; transform: translateY(-50%); color: #fff; font-size: 1.1875rem; font-weight: 600; line-height: 1.4; white-space: pre-line; }
.when { display: flex; align-items: center; font-weight: 600; padding: 0.75rem 1rem 0; }
.when svg { color: var(--ink2); width: 1.375rem; height: 1.375rem; margin-right: 0.5rem; }
.order { background: var(--surface); border: 1px solid var(--line); border-radius: 0.875rem; overflow: hidden; }
.order .row { display: flex; align-items: center; min-height: 3rem; padding: 0.5rem 0.75rem; font-size: 0.9375rem; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.order .row:first-child { border-top: 0; }
.order .head { min-height: 0; background: rgba(238,241,245,0.6); font-size: 0.875rem; font-weight: 700; color: var(--ink2); }
.order .c { padding-right: 0.375rem; line-height: 1.35; min-width: 0; }
.order .c.b { font-weight: 700; }
.order .t { width: 1.25rem; flex: none; color: var(--p); display: flex; justify-content: center; }
.order .t svg { width: 1.375rem; height: 1.375rem; }
.order .t svg.s { width: 1rem; height: 1rem; }
.order .tap { color: var(--p); }
.order .hl { background: rgba(232,237,245,0.55); }
.order .section { background: var(--ps); color: var(--p); font-size: 0.875rem; font-weight: 700; padding: 0.5rem 0.75rem; border-top: 1px solid var(--line); }
.order .note { font-size: 0.875rem; color: var(--ink2); padding: 0.75rem; border-top: 1px solid var(--line); }
/* 노래 줄 곡 목록 (기능명세 12-6) — 곡이 여럿이면 순서·담당 칸은 첫 곡 줄에 맞춰 위로 */
.order .row.multi { align-items: flex-start; }
.order .c.songs { display: flex; flex-direction: column; }
.order .song { display: flex; align-items: center; gap: 0.25rem; min-height: 1.75rem; }
.order .song .st { flex: 1 1 auto; min-width: 0; }
.order .song .play { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; margin: -0.25rem 0; color: var(--p); border-radius: 50%; }
.order .song .play svg { width: 1.625rem; height: 1.625rem; fill: currentColor; }
.order .song .play:focus-visible { outline: 2px solid var(--p); outline-offset: 1px; }
.tl { display: flex; width: 100%; text-align: left; }
.tl .rail { width: 1.25rem; flex: none; position: relative; }
.tl .dot { position: absolute; top: 1.125rem; left: 0.3125rem; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--p); }
.tl .ln { position: absolute; top: 1.75rem; bottom: 0; left: 0.5625rem; width: 2px; background: var(--line); }
.tl .body { flex: 1; min-width: 0; padding: 0.75rem 0 0.75rem 0.5rem; }
.tl .nm { font-size: 1.0625rem; font-weight: 700; margin-right: 0.625rem; }
.tl .tm { font-weight: 600; color: var(--p); }
.tl .ds { font-size: 0.875rem; color: var(--ink2); line-height: 1.4; }
.tl .go { flex: none; align-self: center; color: var(--p); }

/* 블록 */
.blocks > * + * { margin-top: 0.875rem; }
.h1 { font-size: 1.25rem; font-weight: 700; line-height: 1.35; margin: 0; }
.h2 { font-size: 1.125rem; font-weight: 700; line-height: 1.35; margin: 0; }
.runs { line-height: 1.65; white-space: pre-line; }
.runs.lg { font-size: 1.125rem; }
.runs.center { text-align: center; }
.runs a { color: var(--p); text-decoration: underline; }
.r-accent { color: var(--p); } .r-red { color: #D92D20; } .r-gray { color: var(--ink2); }
.cap { font-size: 0.875rem; color: var(--ink2); margin-top: 0.375rem; }
.imgbox { border-radius: 0.75rem; overflow: hidden; }
.verse { background: var(--ps); border-radius: 1rem; padding: 1rem 1.125rem 1.125rem; text-align: center; }
.verse .q { text-align: left; color: var(--p); opacity: 0.5; }
.verse .q svg { width: 1.875rem; height: 1.875rem; }
.verse p { margin: 0; font-size: 1.0625rem; line-height: 1.7; white-space: pre-line; }
.verse .ref { font-size: 0.875rem; color: var(--ink2); margin-top: 0.5rem; }
.bible-h { display: flex; align-items: center; color: var(--p); }
.bible-h svg { width: 1.25rem; height: 1.25rem; margin-right: 0.375rem; }
.bible-h b { flex: 1; font-size: 1.0625rem; }
.bible-h small { font-size: 0.875rem; }
.acc { display: flex; align-items: center; }
.acc .grow { flex: 1; min-width: 0; }
.acc .num { font-size: 1.125rem; font-weight: 700; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 0.75rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gallery::-webkit-scrollbar { display: none; }
.gallery > * { flex: 0 0 100%; scroll-snap-align: start; }
.dots { display: flex; justify-content: center; margin-top: 0.5rem; }
.dots i { width: 0.4375rem; height: 0.4375rem; border-radius: 0.25rem; background: var(--line); margin: 0 0.1875rem; transition: width 0.2s; }
.dots i.on { width: 1rem; background: var(--p); }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; }
.li { display: flex; align-items: center; width: 100%; min-height: 3.5rem; padding: 0.5rem 1rem; text-align: left; border-top: 1px solid var(--line); }
.li:first-child { border-top: 0; }
.li > svg:first-child { color: var(--p); margin-right: 1rem; }
.li .grow { flex: 1; min-width: 0; }
.li .end { color: var(--ink2); }
.li:active { background: #FAFBFC; }

/* 소식 */
.notice { display: flex; align-items: center; width: 100%; text-align: left; background: var(--p); color: #fff; border-radius: 1rem; padding: 1rem; }
.notice svg { width: 1.875rem; height: 1.875rem; }
.notice .grow { flex: 1; margin: 0 0.75rem; }
.notice b { display: block; font-size: 1.125rem; }
.notice small { font-size: 0.875rem; opacity: 0.85; }
.post { display: flex; align-items: flex-start; padding: 0.625rem; }
.post .ph { width: 6.75rem; flex: none; margin-right: 0.75rem; border-radius: 0.75rem; }
.post .grow { flex: 1; min-width: 0; }
.post b { display: block; font-size: 1.0625rem; line-height: 1.35; }
.post .sm { font-size: 0.875rem; color: var(--ink2); line-height: 1.4; }
.post .dt { font-size: 0.8125rem; color: var(--ink2); margin-top: 0.125rem; }
.post .go { color: var(--ink2); margin-top: 1.5rem; }

/* 설교 */
.vid { position: relative; border-radius: 1rem; overflow: hidden; display: block; width: 100%; }
.vid .meta { position: absolute; top: auto; width: auto; height: auto; left: 1rem; right: 1rem; bottom: 0.875rem; display: flex; align-items: flex-end; color: #fff; text-align: left; }
.vid .meta .grow { flex: 1; min-width: 0; }
.vid .meta b { display: block; font-size: 1.25rem; line-height: 1.3; }
.vid .meta small { display: block; font-size: 0.875rem; opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vid .meta .dur { position: static; margin-left: 0.5rem; }
.st { display: flex; align-items: flex-start; width: 100%; text-align: left; padding: 0.625rem 1rem; }
.st .ph { width: 7.75rem; flex: none; border-radius: 0.625rem; margin-right: 0.75rem; }
.st .grow { flex: 1; min-width: 0; }
.st b { display: block; font-size: 1.0625rem; line-height: 1.35; }
.st .sm { font-size: 0.875rem; color: var(--ink2); }
.st .doc { font-size: 0.8125rem; color: var(--p); display: flex; align-items: center; margin-top: 0.25rem; }
.st .doc svg { width: 0.9375rem; height: 0.9375rem; margin-right: 0.25rem; }
.st > svg { color: var(--ink2); }
.search { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem; padding: 0 0.25rem 0 0.75rem; }
.search svg { color: var(--ink2); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; padding: 0.75rem 0.5rem; color: var(--ink); }
.search button { color: var(--p); font-weight: 700; padding: 0.5rem 0.75rem; }

/* 교회안내 */
.gcard { display: flex; align-items: center; padding: 1.125rem 0.875rem; }
.gcard .ic { width: 2.625rem; height: 2.625rem; flex: none; border-radius: 0.75rem; background: var(--ps); color: var(--p); display: flex; align-items: center; justify-content: center; margin-right: 0.75rem; }
.gcard b { font-size: 1rem; }
.grid { display: flex; flex-wrap: wrap; margin: 0 -0.375rem; }
.grid > * { width: calc(50% - 0.75rem); margin: 0.375rem; }
.big .grid > * { width: calc(100% - 0.75rem); }
.grid.g3 > * { width: calc(33.33% - 0.75rem); flex-direction: column; justify-content: center; padding: 1rem 0.375rem; text-align: center; }
.grid.g3 .gcard .ic { margin: 0 0 0.5rem; }
.grid.g3 .gcard b { font-size: 0.9375rem; }
.grid > .full { width: calc(100% - 0.75rem); }
.bigcard { position: relative; display: block; width: 100%; border-radius: 1rem; overflow: hidden; }
.bigcard .t { position: absolute; left: 1rem; right: 1rem; bottom: 0.875rem; color: #fff; font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; text-align: left; }
.bigcard .t span { flex: 1; }
.staff { display: flex; align-items: center; padding: 0.625rem 1rem; border-top: 1px solid var(--line); }
.staff:first-child { border-top: 0; }
.avatar { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--ps); color: var(--p); font-weight: 700; font-size: 1.125rem; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; margin-right: 0.875rem; position: relative; }

/* 교회소개 */
.banner { position: relative; border-radius: 1rem; overflow: hidden; }
.banner .slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; height: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.banner .slides::-webkit-scrollbar { display: none; }
.banner .slide { flex: 0 0 100%; position: relative; scroll-snap-align: start; display: block; text-align: left; }
.banner .bt { position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%); width: 72%; color: #fff; }
.banner .bt b { display: block; font-size: 1.375rem; line-height: 1.35; white-space: pre-line; text-shadow: 0 0 6px rgba(0,0,0,0.45); }
.banner .bt small { font-size: 0.875rem; opacity: 0.9; }
.banner .bt.dark { color: var(--ink); }
.banner .bt.dark b { text-shadow: none; }
.banner .bd { position: absolute; right: 0.75rem; bottom: 0.75rem; display: flex; }
.banner .bd i { width: 0.375rem; height: 0.375rem; border-radius: 3px; margin-left: 0.3125rem; background: rgba(255,255,255,0.55); }
.banner .bd i.on { width: 0.875rem; background: #fff; }
.quick { display: flex; }
.quick > * { flex: 1; min-width: 0; text-align: center; padding: 0.875rem 0.25rem; }
.quick > * + * { margin-left: 0.625rem; }
.quick svg { width: 1.75rem; height: 1.75rem; color: var(--p); }
.quick span { display: block; font-size: 0.875rem; font-weight: 600; margin-top: 0.375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today { display: flex; align-items: center; padding: 0.3125rem 0; }
.today i { width: 0.375rem; height: 0.375rem; border-radius: 50%; background: var(--p); margin-right: 0.625rem; flex: none; }
.ev { display: flex; align-items: flex-start; padding: 0.875rem; margin-bottom: 0.625rem; }
.ev .d { width: 3.25rem; flex: none; background: var(--ps); color: var(--p); border-radius: 0.625rem; text-align: center; padding: 0.375rem 0; margin-right: 0.75rem; line-height: 1.2; }
.ev .d small { font-size: 0.75rem; display: block; }
.ev .d b { font-size: 1.25rem; }
.ev .grow { flex: 1; min-width: 0; }
.ev .grow b { font-size: 1.0625rem; }

/* 겹쳐 뜨는 화면: 상세 화면 · 서랍 · 아래 창 · 사진 */
.layer { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 20; }
.screen { background: var(--ground); display: flex; flex-direction: column; animation: slideIn 0.18s ease-out; }
@keyframes slideIn { from { transform: translateX(8%); opacity: 0.4; } to { transform: none; opacity: 1; } }
.screen .top .bar .title { flex: 1; min-width: 0; font-size: 1.25rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.screen .body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.screen .top { border-bottom: 1px solid var(--line); }
.dim { background: rgba(0,0,0,0.42); animation: fade 0.15s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: absolute; top: 0; bottom: 0; left: 0; width: 86%; max-width: 22.5rem; background: var(--surface); overflow-y: auto; animation: dIn 0.2s ease-out; padding-bottom: env(safe-area-inset-bottom); }
@keyframes dIn { from { transform: translateX(-100%); } }
.drawer .dh { background: var(--ps); padding: calc(1.25rem + env(safe-area-inset-top)) 1.25rem 1rem; }
.drawer .dh svg { color: var(--p); width: 2.25rem; height: 2.25rem; }
.drawer .dh b { display: block; font-size: 1.25rem; margin-top: 0.5rem; }
.drawer .dh .d { color: var(--p); font-weight: 600; font-size: 0.875rem; margin-top: 0.375rem; }
.drawer .li { border-top: 0; padding-left: 1.25rem; }
.drawer .grp { font-size: 0.8125rem; color: var(--ink2); font-weight: 600; padding: 0.75rem 1.25rem 0.25rem; border-top: 1px solid var(--line); margin-top: 0.25rem; }
.drawer .foot { font-size: 0.8125rem; color: var(--ink2); padding: 1rem 1.25rem 1.5rem; border-top: 1px solid var(--line); margin-top: 0.25rem; }
.sizes { display: flex; padding: 0.25rem 1.25rem 0.75rem; }
.sizes button { flex: 1; min-height: 2.75rem; border-radius: 0.625rem; background: var(--chip); color: var(--ink2); font-weight: 600; }
.sizes button + button { margin-left: 0.5rem; }
.sizes button.on { background: var(--p); color: #fff; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92%; height: 80%; background: var(--surface); border-radius: 1.25rem 1.25rem 0 0; display: flex; flex-direction: column; animation: sUp 0.2s ease-out; max-width: 45rem; margin: 0 auto; }
@keyframes sUp { from { transform: translateY(40%); opacity: 0.3; } }
.sheet .handle { width: 2.75rem; height: 0.3125rem; border-radius: 3px; background: var(--line); margin: 0.625rem auto 0.375rem; flex: none; }
.sheet .sh { display: flex; align-items: center; padding: 0.25rem 1rem 0.25rem 1.25rem; flex: none; }
.sheet .sh b { flex: 1; font-size: 1.375rem; }
.sheet .sb { flex: 1; min-height: 0; overflow-y: auto; padding: 0.5rem 1.25rem 1rem; -webkit-overflow-scrolling: touch; }
.sheet .close { flex: none; padding: 0.5rem 1rem calc(0.75rem + env(safe-area-inset-bottom)); }
.fs { display: flex; flex: none; }
.fs button { min-width: 3rem; min-height: 2.75rem; border-radius: 0.625rem; background: var(--ps); font-weight: 700; margin-left: 0.5rem; }
.fs button[disabled] { color: var(--ink2); opacity: 0.6; }
.verse-line { margin: 0 0 0.7em; line-height: 1.7; }
.verse-line sup { font-size: 0.8125rem; color: var(--p); font-weight: 700; vertical-align: baseline; margin-right: 0.5em; }
.viewer { background: #000; display: flex; flex-direction: column; }
.viewer .bar { color: #fff; }
.viewer .imgs { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.viewer .imgs > div { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; overflow: auto; }
.viewer img { max-width: 100%; max-height: 100%; }
.viewer .art { width: 100%; height: 60%; position: relative; }
.toast { position: fixed; left: 1rem; right: 1rem; bottom: calc(1.25rem + env(safe-area-inset-bottom)); z-index: 40; background: #2B3240; color: #fff; padding: 0.875rem 1rem; border-radius: 0.75rem; font-size: 0.9375rem; text-align: center; animation: fade 0.2s; max-width: 30rem; margin: 0 auto; }
.tip { position: fixed; left: 0.75rem; right: 0.75rem; bottom: calc(0.75rem + env(safe-area-inset-bottom)); z-index: 15; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 6px 24px rgba(0,0,0,0.14); padding: 0.875rem 0.75rem 0.875rem 1rem; display: flex; align-items: center; max-width: 30rem; margin: 0 auto; animation: sUp 0.25s ease-out; }
.tip .grow { flex: 1; font-size: 0.9375rem; line-height: 1.45; }
.tip .text-btn { white-space: nowrap; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0.5rem 0 1rem; }
.steps li { position: relative; padding: 0.5rem 0 0.5rem 2.5rem; line-height: 1.55; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0.4rem; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--p); color: #fff; font-weight: 700; text-align: center; line-height: 1.75rem; font-size: 0.9375rem; }
.install { display: flex; align-items: center; margin: 1.25rem 1rem 0; }
.state { max-width: 30rem; margin: 0 auto; padding: 22vh 1.5rem 2rem; text-align: center; }
.state svg { width: 3.5rem; height: 3.5rem; color: var(--p); }
.state h1 { font-size: 1.375rem; margin: 0.75rem 0 0.5rem; }
.state p { color: var(--ink2); margin: 0 0 1.25rem; white-space: pre-line; }
.docimg { background: #fff; margin: 0 0 0.75rem; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
@media (min-width: 48rem) { .grid > * { width: calc(33.33% - 0.75rem); } }

/* 교회 겉모습: 로고 · 서랍 머리 배너 · 교회안내 바로가기 줄 */
.bar .name img.logo { width: 1.75rem; height: 1.75rem; border-radius: 0.4rem; object-fit: contain; flex: none; }
.drawer .dh img.logo { width: 2.5rem; height: 2.5rem; border-radius: 0.55rem; object-fit: contain; background: #fff; }
.drawer .dh { position: relative; overflow: hidden; }
.drawer .dh > * { position: relative; }
.drawer .dh > .dh-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.drawer .dh .dh-bg > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.drawer .dh .dh-bg::after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.45); }
.drawer .dh.img, .drawer .dh.img .d, .drawer .dh.img .muted, .drawer .dh.img > svg { color: #fff; }
.shortcuts { display: flex; overflow-x: auto; margin: -0.25rem -1rem 0.875rem; padding: 0 0.75rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.shortcuts::-webkit-scrollbar { display: none; }
.sc { flex: none; width: 4.5rem; padding: 0.25rem 0; text-align: center; border-radius: 0.75rem; }
.sc:active { background: var(--chip); }
.sci { display: flex; width: 3rem; height: 3rem; margin: 0 auto; border-radius: 50%; align-items: center; justify-content: center; }
.sci svg { width: 1.625rem; height: 1.625rem; }
.scl { display: block; font-size: 0.8125rem; line-height: 1.25; margin-top: 0.375rem; }
