/* 은언교회 2차 디자인: 상용 서비스 수준의 타이포그래피·여백, 로고 색 체계, 새 화면 컴포넌트
   (app.css 위에 덮어쓴다) */
:root {
  --primary: #2B94DB;          /* 로고 블루 */
  --primary-dark: #0E639F;
  --primary-ink: #0B5A93;
  --primary-soft: #E4F1FB;
  --primary-softer: #F2F8FD;
  --leaf: #8DB534;             /* 로고 그린 — 포인트로만 */
  --leaf-soft: #F0F6DF;
  --bg: #F4F7FA;
  --surface: #FFFFFF;
  --text: #0F2A3D;
  --text-2: #5B7083;
  --text-3: #8A9BAB;
  --border: #E8EEF3;
  --border-strong: #D3DEE8;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 42, 61, .04), 0 8px 24px rgba(15, 42, 61, .06);
  --shadow-lg: 0 2px 6px rgba(15, 42, 61, .06), 0 18px 48px rgba(15, 42, 61, .12);
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
  font-size: 16px;
}
html[data-font="sm"] { font-size: 15px; }
html[data-font="md"] { font-size: 16px; }
html[data-font="lg"] { font-size: 18px; }
html[data-font="xl"] { font-size: 20px; }

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  letter-spacing: -0.011em; line-height: 1.62; font-feature-settings: 'tnum' 0;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { letter-spacing: -0.028em; font-weight: 700; line-height: 1.32; }
h1 { font-size: 1.62rem; font-weight: 800; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.04rem; }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.content { max-width: 780px; padding: 18px 18px calc(var(--bottom-h) + 40px); }
.content.wide { max-width: 1160px; }
@media (min-width: 960px) { .content { padding: 34px 40px 64px; } }

/* 상단바·사이드바·하단 내비 */
.topbar { height: 58px; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--border); padding: 0 10px 0 16px; }
.topbar .brand { gap: 8px; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-word { height: 19px; width: auto; display: block; }
.avatar-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; }
.sidebar { width: 264px; padding: 22px 16px; border-right: 1px solid var(--border); }
.side-brand { padding: 2px 8px 22px; }
.side-brand img { height: 44px; width: auto; }
.side-label { font-size: .72rem; letter-spacing: .06em; color: var(--text-3); padding: 8px 12px 6px; }
.side-link { border-radius: 14px; padding: 10px 12px; font-weight: 600; font-size: .95rem; color: #2A4558; }
.side-link.active { background: var(--primary-soft); color: var(--primary-dark); }
.bottom-nav { height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); }
.bottom-nav a { font-size: .7rem; font-weight: 600; gap: 3px; color: var(--text-3); letter-spacing: -.01em; }
.bottom-nav a svg { width: 23px; height: 23px; }
.bottom-nav a.active { color: var(--primary-dark); }
.bottom-nav a.active svg { color: var(--primary); stroke-width: 2.3; }

/* 카드·버튼·입력 */
.card { border: 0; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.flat { box-shadow: none; border: 1px solid var(--border); }
.card-head { margin-bottom: 12px; }
.card-head h2 svg, .card-head h3 svg { color: var(--primary); }
.more-link { font-weight: 600; font-size: .86rem; color: var(--text-2); gap: 2px; }
.more-link:hover { color: var(--primary-dark); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 2px 12px; }
.sec-head h2 { margin: 0; font-size: 1.22rem; font-weight: 800; }
.btn { border-radius: 14px; min-height: 48px; font-weight: 700; font-size: .96rem; letter-spacing: -.012em; background: var(--primary-dark); box-shadow: 0 1px 2px rgba(14, 99, 159, .25); }
.btn:hover { background: #0A5488; }
.btn.secondary { box-shadow: none; border-color: var(--border-strong); color: var(--text); }
.btn.secondary:hover { background: var(--primary-softer); border-color: var(--primary); }
.btn.soft, .btn.ghost, .btn.danger { box-shadow: none; }
.btn.small { min-height: 40px; border-radius: 12px; font-size: .88rem; }
.input, select.input, textarea.input { border-radius: 14px; border-color: var(--border-strong); background: #fff; min-height: 50px; font-size: 1rem; }
.field label, .field .label { font-size: .9rem; font-weight: 700; color: #2A4558; }
.chip { min-height: 38px; border-color: var(--border); background: #fff; font-weight: 600; font-size: .88rem; color: #2A4558; box-shadow: 0 1px 2px rgba(15, 42, 61, .04); }
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }
.chip svg { width: 16px; height: 16px; }
.badge { font-weight: 700; font-size: .72rem; padding: 2px 9px; letter-spacing: 0; }
.badge.leaf { background: var(--leaf-soft); color: #55710F; }
.tabs { gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab { font-weight: 700; font-size: .95rem; color: var(--text-3); padding: 10px 14px; }
.tab.active { color: var(--text); border-bottom-color: var(--text); }
.list-item { padding: 14px 2px; gap: 14px; border-bottom-color: var(--border); }
.list-item .li-title { font-weight: 650; letter-spacing: -.02em; }
.list-item .li-sub { font-size: .86rem; margin-top: 1px; }
.list-item .li-icon { border-radius: 14px; width: 44px; height: 44px; }
.date-box { border-radius: 14px; background: var(--primary-softer); }
.notice { border-radius: 14px; border: 0; background: var(--primary-softer); font-size: .92rem; }
.page-head { margin: 6px 0 18px; }
.page-head .sub { font-size: .94rem; margin-top: 4px; }
.prose { font-size: 1.03rem; line-height: 1.85; letter-spacing: -.008em; }
.modal { border-radius: 26px 26px 0 0; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); }
@media (min-width: 640px) { .modal { border-radius: 26px; } }
.toast { border-radius: 14px; font-weight: 600; box-shadow: var(--shadow-lg); }
.fab { border-radius: 22px; background: var(--text); box-shadow: 0 10px 28px rgba(15, 42, 61, .32); }
.state-box h2 { font-size: 1.15rem; }

/* 아바타 */
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover; background: var(--primary-soft); color: var(--primary-dark); display: inline-grid; place-items: center; font-weight: 800; font-size: .95rem; overflow: hidden; }
.avatar.sm { width: 30px; height: 30px; font-size: .78rem; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; }
.avatar.xl { width: 104px; height: 104px; font-size: 2rem; }
.avatar.c1 { background: #E4F1FB; color: #0E639F; } .avatar.c2 { background: #F0F6DF; color: #55710F; } .avatar.c3 { background: #FBEDE4; color: #A1501B; } .avatar.c4 { background: #EEE9F8; color: #5B3F9A; } .avatar.c5 { background: #FBE9EC; color: #A3283C; }

/* ── 홈: 공동 공간 ── */
.home-hero { position: relative; border-radius: 26px; overflow: hidden; min-height: 210px; padding: 26px 22px; display: flex; flex-direction: column; justify-content: flex-end; margin-bottom: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.9) 100%), url('/img/gen/hero.jpg') center 62% / cover; box-shadow: var(--shadow); }
.home-hero .eyebrow { font-size: .8rem; font-weight: 700; color: var(--primary-dark); letter-spacing: .02em; }
.home-hero h1 { font-size: 1.55rem; margin: 4px 0 2px; }
.home-hero p { margin: 0; color: #36536A; font-size: .95rem; }
@media (min-width: 720px) { .home-hero { min-height: 280px; padding: 36px; } .home-hero h1 { font-size: 2rem; } }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--text); font-weight: 700; font-size: .82rem; }
.quick a span.qi { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; background: var(--primary-softer); color: var(--primary-dark); }
.quick a span.qi svg { width: 23px; height: 23px; }
.hscroll { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 18px 14px; margin: 0 -18px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.ad-card { flex: none; width: min(82vw, 340px); scroll-snap-align: start; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.ad-card .ad-img { aspect-ratio: 16 / 9; background: var(--primary-soft) center / cover; position: relative; }
.ad-card .ad-img .badge { position: absolute; left: 12px; top: 12px; background: rgba(255, 255, 255, .92); color: var(--text); }
.ad-card .ad-body { padding: 14px 16px 16px; }
.ad-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.ad-card p { margin: 0; color: var(--text-2); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-list { display: grid; gap: 16px; }
@media (min-width: 720px) { .ad-list { grid-template-columns: 1fr 1fr; } }
.ad-list .ad-card { width: auto; }
.ad-page-img { width: 100%; border-radius: 22px; margin-bottom: 18px; box-shadow: var(--shadow); display: block; }
.duo { display: grid; gap: 16px; }
@media (min-width: 720px) { .duo { grid-template-columns: 1fr 1fr; } .duo > .card { margin: 0; } }
.duo > * { min-width: 0; }
.feature { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--text); }
.feature .thumb16 { width: 132px; border-radius: 14px; }
.feature h3 { margin: 0 0 2px; }
.worship-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.worship-row:last-child { border: 0; }
.worship-row b { flex: 1; font-weight: 650; }
.worship-row span { color: var(--text-2); font-size: .9rem; font-variant-numeric: tabular-nums; }

/* ── 공동체: 열린 피드 ── */
.composer { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--text-3); margin-bottom: 16px; font-weight: 500; }
.composer .fake { flex: 1; background: var(--bg); border-radius: 999px; padding: 11px 16px; }
.composer svg { color: var(--primary); width: 22px; height: 22px; }
.feed { display: grid; gap: 16px; }
.post-card { display: block; background: #fff; border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: var(--text); }
.post-card .pc-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.post-card .pc-head .who { flex: 1; min-width: 0; line-height: 1.3; }
.post-card .pc-head .who b { font-weight: 700; font-size: .95rem; }
.post-card .pc-head .who span { display: block; color: var(--text-3); font-size: .8rem; }
.post-card .pc-body { padding: 10px 18px 4px; }
.post-card h3 { margin: 0 0 4px; font-size: 1.08rem; }
.post-card p { margin: 0; color: #36536A; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; }
.post-card .pc-img { margin: 12px 0 0; aspect-ratio: 16 / 10; background: var(--primary-soft) center / cover; }
.post-card .pc-foot { display: flex; gap: 16px; padding: 12px 18px 14px; color: var(--text-2); font-size: .86rem; font-weight: 600; }
.post-card .pc-foot span { display: inline-flex; align-items: center; gap: 5px; }
.post-card .pc-foot svg { width: 17px; height: 17px; }
.post-card.tone-prayer { background: linear-gradient(180deg, #F3F8FE, #fff 60%); }
.post-card.tone-thanks { background: linear-gradient(180deg, #F6FAE9, #fff 60%); }
.post-card.tone-news { background: linear-gradient(180deg, #EEF6FD, #fff 60%); }
.cat-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 18px 14px; margin: 0 -18px 4px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; text-decoration: none; color: var(--text-2); font-size: .76rem; font-weight: 700; text-align: center; line-height: 1.25; }
.cat i { width: 54px; height: 54px; border-radius: 20px; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow); color: var(--primary-dark); font-style: normal; }
.cat i svg { width: 24px; height: 24px; }
.cat.active { color: var(--text); }
.cat.active i { background: var(--text); color: #fff; }
.c-row { display: flex; gap: 10px; align-items: flex-start; }
.c-row .c-main { flex: 1; min-width: 0; }

/* ── 성경 ── */
.bible-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.bible-bar select.input { flex: 1 1 120px; min-height: 46px; }
.verses { font-family: var(--serif); font-size: 1.1rem; line-height: 2.05; letter-spacing: 0; }
.verses p { margin: 0 0 .35em; padding: 2px 6px; border-radius: 8px; cursor: pointer; }
.verses p:hover, .verses p.sel { background: var(--primary-softer); }
.verses p.sel { background: #FFF6D6; }
.verses sup { font-family: 'Pretendard Variable', sans-serif; font-size: .68em; color: var(--primary); font-weight: 700; margin-right: 6px; vertical-align: .35em; }
.hit { display: block; padding: 12px 4px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.hit b { color: var(--primary-dark); font-size: .86rem; margin-right: 8px; }
.hit mark { background: #FFF1B8; border-radius: 3px; padding: 0 1px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.book-grid button { min-height: 44px; border-radius: 12px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-weight: 650; font-size: .88rem; }
.book-grid button:hover, .book-grid button.on { border-color: var(--primary); background: var(--primary-softer); color: var(--primary-dark); }

/* ── 찬송가 ── */
.hymn-no { width: 52px; height: 52px; border-radius: 16px; background: var(--primary-softer); color: var(--primary-dark); display: grid; place-items: center; font-weight: 800; font-variant-numeric: tabular-nums; flex: none; }
.player { position: sticky; bottom: calc(var(--bottom-h) + 10px); z-index: 15; background: rgba(15, 42, 61, .96); color: #fff; border-radius: 24px; padding: 16px 18px; box-shadow: var(--shadow-lg); margin-top: 16px; }
@media (min-width: 960px) { .player { bottom: 16px; } }
.player .transport { display: flex; align-items: center; gap: 10px; }
.player .pbtn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fff; color: var(--text); display: grid; place-items: center; cursor: pointer; flex: none; }
.player .pbtn.sub { width: 42px; height: 42px; background: rgba(255, 255, 255, .14); color: #fff; }
.player .pbtn svg { width: 22px; height: 22px; }
.player input[type=range] { width: 100%; accent-color: #8CC8F2; }
.player .prog { flex: 1; }
.player .ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 12px; }
.player .ctl label { font-size: .78rem; color: #BCD3E4; font-weight: 600; display: block; }
.player .ctl b { color: #fff; font-variant-numeric: tabular-nums; }
.player .stepper { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.player .stepper button { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.2rem; cursor: pointer; }
.player .stepper span { flex: 1; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.player .toggles { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.player .tg { border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #DDEAF4; border-radius: 999px; min-height: 38px; padding: 0 14px; font-weight: 700; font-size: .84rem; cursor: pointer; }
.player .tg.on { background: #fff; color: var(--text); border-color: #fff; }
.score-wrap { background: #fff; border-radius: 20px; padding: 14px 8px; box-shadow: var(--shadow); overflow-x: auto; }
.score .st { stroke: #33485A; stroke-width: 1; }
.score .stem { stroke: #0F2A3D; stroke-width: 1.3; }
.score .flag { stroke: #0F2A3D; stroke-width: 1.6; fill: none; }
.score .hd { fill: #0F2A3D; }
.score .hd.o { fill: #fff; stroke: #0F2A3D; stroke-width: 1.5; }
.score .mus { font-family: 'Noto Music', 'Segoe UI Symbol', serif; fill: #0F2A3D; }
.score .ts { font-family: var(--serif); font-weight: 700; fill: #0F2A3D; }
.score .ly { fill: #36536A; font-family: 'Pretendard Variable', sans-serif; }
.score .nt.on .hd { fill: var(--primary); }
.score .nt.on .hd.o { stroke: var(--primary); fill: #E4F1FB; }
.score .nt.on .stem, .score .nt.on .flag { stroke: var(--primary); }
.score-img { width: 100%; border-radius: 14px; }

/* ── 고풍스러운 모바일 주보 ── */
.bulletin { --ink: #1C2B3A; --gold: #A8894E; background: #FCFAF5; color: var(--ink); border-radius: 6px; padding: 30px 22px 34px; box-shadow: var(--shadow); font-family: var(--serif); position: relative;
  background-image: radial-gradient(rgba(168, 137, 78, .05) 1px, transparent 1px); background-size: 14px 14px; }
.bulletin::before { content: ''; position: absolute; inset: 9px; border: 1px solid rgba(168, 137, 78, .55); pointer-events: none; }
.bulletin::after { content: ''; position: absolute; inset: 13px; border: 1px solid rgba(168, 137, 78, .25); pointer-events: none; }
.bulletin > * { position: relative; z-index: 1; }
.bl-head { text-align: center; padding: 8px 0 4px; }
.bl-head img { height: 54px; margin-bottom: 8px; }
.bl-head .denom { font-size: .78rem; letter-spacing: .32em; color: var(--gold); font-weight: 600; }
.bl-head h1 { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; letter-spacing: .08em; margin: 6px 0 4px; color: var(--ink); }
.bl-head .date { font-size: .9rem; color: #5A6775; letter-spacing: .04em; }
.orn { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold); margin: 20px 0 14px; }
.orn::before, .orn::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, rgba(168, 137, 78, .7)); }
.orn::after { transform: scaleX(-1); }
.orn span { font-size: .82rem; letter-spacing: .34em; font-weight: 700; white-space: nowrap; padding-left: .34em; }
.bl-sermon { text-align: center; }
.bl-sermon .t { font-size: 1.28rem; font-weight: 700; line-height: 1.5; margin: 2px 0 6px; }
.bl-sermon .s { color: #5A6775; font-size: .95rem; }
.bl-order { list-style: none; margin: 0; padding: 0; }
.bl-order li { display: flex; align-items: baseline; gap: 8px; padding: 9px 2px; font-size: 1rem; }
.bl-order .i { font-weight: 700; letter-spacing: .12em; white-space: nowrap; }
.bl-order .dots { flex: 1; border-bottom: 1px dotted rgba(28, 43, 58, .4); transform: translateY(-4px); min-width: 16px; }
.bl-order .d { color: #3D4C5B; text-align: center; font-size: .93rem; max-width: 46%; }
.bl-order .w { white-space: nowrap; color: #3D4C5B; font-size: .93rem; }
.bl-order .star { color: var(--gold); width: .9em; display: inline-block; }
.bl-order a { color: inherit; text-decoration: underline; text-decoration-color: rgba(168, 137, 78, .6); text-underline-offset: 3px; }
.bl-text { white-space: pre-wrap; font-size: .98rem; line-height: 1.95; }
.bl-note { text-align: center; font-size: .8rem; color: #7A8794; margin-top: 8px; }
.bl-foot { text-align: center; font-size: .8rem; color: #7A8794; margin-top: 24px; letter-spacing: .04em; line-height: 1.8; }

/* ── 성도 관리 ── */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.person-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 18px 12px 14px; text-align: center; text-decoration: none; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.person-card b { font-size: .98rem; }
.person-card span { font-size: .78rem; color: var(--text-2); }
.portrait-box { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.portrait-box img, .portrait-box .ph { width: 132px; height: 132px; border-radius: 28px; object-fit: cover; background: var(--primary-soft); display: grid; place-items: center; color: var(--primary-dark); }
.swatches { display: flex; gap: 8px; }
.swatches label input { position: absolute; opacity: 0; }
.swatches label span { display: block; width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; }
.swatches label input:checked + span { box-shadow: 0 0 0 2.5px var(--text); }

/* ── 사역팀 공간 ── */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .team-grid { grid-template-columns: repeat(4, 1fr); } }
.team-tile { position: relative; background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 18px 14px 16px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 10px; min-height: 138px; }
.team-tile .ti { width: 50px; height: 50px; border-radius: 17px; display: grid; place-items: center; background: var(--primary-softer); color: var(--primary-dark); }
.team-tile .ti svg { width: 26px; height: 26px; }
.team-tile b { font-size: 1rem; }
.team-tile small { color: var(--text-2); font-size: .78rem; line-height: 1.4; }
.team-tile .cnt { position: absolute; right: 12px; top: 12px; min-width: 24px; height: 24px; border-radius: 12px; background: #FDEDE3; color: #B4480F; font-weight: 800; font-size: .76rem; display: grid; place-items: center; padding: 0 7px; }
.team-tile.mine { outline: 2px solid var(--primary); }
.team-tile:nth-child(3n+2) .ti { background: var(--leaf-soft); color: #55710F; }
.team-tile:nth-child(3n) .ti { background: #FBEDE4; color: #A1501B; }
.member-strip { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.member-strip > div { text-align: center; font-size: .78rem; font-weight: 600; flex: none; width: 64px; }

/* ── 인쇄용 주보 ── */
.print-tools { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.print-tools .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.sheet-wrap { overflow: auto; padding: 8px; background: #DCE4EB; border-radius: 16px; }
.sheet { background: #fff; margin: 0 auto 16px; box-shadow: 0 4px 18px rgba(0, 0, 0, .18); display: grid; color: #111; font-family: var(--serif); position: relative; transform-origin: top left; }
.sheet .panel { padding: var(--pm); overflow: hidden; border-left: 1px dashed rgba(0, 0, 0, .18); display: flex; flex-direction: column; gap: 2.6mm; min-width: 0; }
.sheet .panel:first-child { border-left: 0; }
.sheet.text-only .deco { visibility: hidden; }
.sheet h4 { font-family: var(--serif); font-size: 1.15em; text-align: center; letter-spacing: .3em; margin: 0 0 1.2mm; padding-bottom: 1mm; border-bottom: .3mm solid #222; font-weight: 700; color: #111; }
.sheet .pv-cover { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2.5mm; }
.sheet .pv-cover img { width: 46%; }
.sheet .pv-cover .nm { font-size: 1.9em; font-weight: 700; letter-spacing: .12em; }
.sheet .pv-cover .dn { letter-spacing: .4em; font-size: .9em; }
.sheet .pv-order { list-style: none; margin: 0; padding: 0; }
.sheet .pv-order li { display: flex; align-items: baseline; gap: 1.2mm; padding: .9mm 0; }
.sheet .pv-order .i { font-weight: 700; letter-spacing: .14em; white-space: nowrap; }
.sheet .pv-order .dots { flex: 1; border-bottom: .2mm dotted #555; transform: translateY(-1mm); }
.sheet .pv-order .d { max-width: 48%; text-align: center; }
.sheet .pv-text { white-space: pre-wrap; line-height: 1.7; }
.sheet .pv-kv { display: grid; grid-template-columns: max-content 1fr; gap: .6mm 3mm; }
.sheet .pv-kv b { font-weight: 700; }
.sheet .pv-center { text-align: center; }
.sheet-label { text-align: center; font-size: .8rem; color: #4A6275; margin: 4px 0 8px; font-weight: 600; }
.block-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.block-pick label { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: .8rem; cursor: pointer; background: #fff; }
.block-pick input { accent-color: var(--primary-dark); }
.doc-print { background: #fff; padding: 20mm 18mm; max-width: 210mm; margin: 0 auto; box-shadow: var(--shadow); font-family: var(--serif); color: #111; line-height: 1.9; }
.doc-print h1 { font-family: var(--serif); font-size: 1.5rem; text-align: center; color: #111; }
.doc-print .meta { text-align: center; color: #444; margin-bottom: 8mm; }
.doc-print .body { white-space: pre-wrap; font-size: 11.5pt; }
.search-pick { border: 1px solid var(--border); border-radius: 14px; max-height: 260px; overflow-y: auto; margin-top: 8px; }
.search-pick button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--border); background: #fff; cursor: pointer; }
.search-pick button:hover { background: var(--primary-softer); }
.split { display: grid; gap: 16px; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); align-items: start; } .split .side { position: sticky; top: 74px; max-height: calc(100vh - 100px); overflow-y: auto; } }

@media print {
  @page { margin: 0; }
  body { background: #fff !important; }
  .sidebar, .topbar, .bottom-nav, .no-print, .toast-root, .fab, .skip-link { display: none !important; }
  .app, .main-col { display: block; }
  .content { max-width: none !important; padding: 0 !important; margin: 0 !important; }
  .sheet-wrap { padding: 0; background: none; overflow: visible; border-radius: 0; }
  .sheet { box-shadow: none; margin: 0; transform: none !important; page-break-after: always; break-after: page; }
  .sheet .panel { border-left: 0; }
  .sheet-label { display: none; }
  .doc-print { box-shadow: none; max-width: none; padding: 0; }
}

.rot { transform: rotate(90deg); }
.grid-2 { display: grid; gap: 12px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
form .grid-2 > .field { margin-bottom: 14px; }

svg.score { width: 100%; height: auto; display: block; min-width: 320px; }
.brand-logo, .brand-word, .side-brand img { flex: none; }

/* 유튜브 예배 영상 */
.yt-card { flex: none; width: min(64vw, 260px); scroll-snap-align: start; text-decoration: none; color: var(--text); }
.yt-card .yt-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #DCE4EB center / cover; box-shadow: var(--shadow); }
.yt-card .yt-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.35)); }
.yt-card .yt-play { position: absolute; left: 10px; bottom: 10px; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; color: #E62117; }
.yt-card .yt-play svg { width: 16px; height: 16px; }
.yt-card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; font-size: .94rem; line-height: 1.4; }
.yt-card span { color: var(--text-2); font-size: .8rem; }
.yt-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #C4302B; }
.yt-badge svg { width: 18px; height: 18px; }

/* ── PC 화면 최적화 (1200px 이상) ──────────────────────────────
   모바일 기준 780px 단일 열을 넓히고, 가로 스크롤 목록을 격자로 바꾼다. */
@media (min-width: 1200px) {
  .content { max-width: 1140px; padding: 36px 48px 72px; }
  .content.wide { max-width: 1320px; }
  .prose { max-width: 72ch; }

  /* 홈 상단: 큰 배너 + 바로가기 4개를 한 줄 높이에 */
  .home-hero { min-height: 300px; padding: 44px; }
  .home-hero h1 { font-size: 2.3rem; }
  .quick { gap: 14px; margin-bottom: 16px; }
  .quick a { flex-direction: row; justify-content: center; gap: 12px; padding: 18px 12px; font-size: .95rem; }

  /* 가로 스크롤 → 격자 */
  .hscroll { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; overflow: visible; padding: 2px 0 8px; margin: 0; scroll-snap-type: none; }
  .hscroll > .ad-card, .hscroll > .yt-card { width: auto; }
  .ad-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .sec-head { margin-top: 34px; }
  .duo { gap: 20px; }
  .grid-2 { gap: 20px; }
}
@media (min-width: 1500px) {
  .content { max-width: 1240px; }
  .hscroll { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── 홈 광고 캐러셀: 와이드 이미지 + 글자 ───────────────────── */
.ad-carousel { position: relative; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); background: var(--primary-soft); }
.ac-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.ac-track::-webkit-scrollbar { display: none; }
.ad-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; aspect-ratio: 16 / 9; background: #DCE8F2 center / cover no-repeat; display: flex; align-items: flex-end; text-decoration: none; color: #fff; }
.ad-slide::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,28,45,0) 30%, rgba(8,28,45,.62) 100%); }
.ad-slide-text { position: relative; padding: 20px 22px 40px; max-width: 640px; }
.ad-slide-text .badge { background: rgba(255,255,255,.92); color: var(--text); }
.ad-slide-text h3 { margin: 8px 0 4px; font-size: 1.35rem; line-height: 1.3; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.25); word-break: keep-all; }
.ad-slide-text p { margin: 0; font-size: .95rem; color: rgba(255,255,255,.92); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; }
.ac-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 2px; }
.ac-dots button { width: 28px; height: 24px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.ac-dots button::after { content: ''; width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.55); transition: width .2s, background .2s; }
.ac-dots button[aria-current]::after { width: 22px; background: #fff; }
.ac-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.88); color: var(--text); display: none; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.ac-nav.prev { left: 14px; } .ac-nav.next { right: 14px; }
.ac-nav svg { width: 22px; height: 22px; }
@media (hover: hover) and (min-width: 720px) { .ac-nav { display: grid; opacity: 0; transition: opacity .2s; } .ad-carousel:hover .ac-nav, .ac-nav:focus-visible { opacity: 1; } }
@media (min-width: 720px) { .ad-slide { aspect-ratio: 21 / 9; } .ad-slide-text { padding: 32px 36px 48px; } .ad-slide-text h3 { font-size: 1.8rem; } .ad-slide-text p { font-size: 1.05rem; } }
.ad-preview { border-radius: 20px; overflow: hidden; margin-bottom: 12px; box-shadow: var(--shadow); }

/* ── 홈 최근 예배 영상 하나 ─────────────────────────────────── */
.yt-feature { display: grid; gap: 12px; }
.yt-feature .yt-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; cursor: pointer; border-radius: 20px; overflow: hidden; background: #DCE4EB center / cover; box-shadow: var(--shadow); }
.yt-feature .yt-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.3)); }
.yt-feature .yt-play.big { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; width: 68px; height: 68px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; color: #E62117; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.yt-feature .yt-play.big svg { width: 28px; height: 28px; margin-left: 3px; }
.yt-feature .yt-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.yt-feature .yt-meta b { font-size: 1.08rem; flex: 1 1 100%; }
.yt-feature .yt-meta span { color: var(--text-2); font-size: .88rem; }
.yt-feature .yt-meta .more-link { margin-left: auto; }
@media (min-width: 1200px) { .yt-feature { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; gap: 28px; } .yt-feature .yt-meta { flex-direction: column; align-items: flex-start; } .yt-feature .yt-meta b { font-size: 1.3rem; } .yt-feature .yt-meta .more-link { margin-left: 0; } .yt-feature .video-wrap { grid-column: 1; } }

/* ── 바로가기 버튼: 은은한 배경 이미지 ─────────────────────── */
.quick a { position: relative; overflow: hidden; isolation: isolate; background-color: #fff; background-size: cover; background-position: center; }
.quick a::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.78)); }
.quick a.q-bulletin { background-image: url('/img/gen/q-bulletin.jpg'); }
.quick a.q-bible { background-image: url('/img/gen/q-bible.jpg'); }
.quick a.q-hymn { background-image: url('/img/gen/q-hymn.jpg'); }
.quick a.q-sermon { background-image: url('/img/gen/q-sermon.jpg'); }
.quick a span.qi { background: rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(15,42,61,.08); }
.quick a { min-height: 92px; justify-content: center; }
@media (min-width: 1200px) { .quick a { min-height: 96px; font-size: 1rem; } }

/* ── 봉사: 방송팀 하위 파트 ─────────────────────────────────── */
.part-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .part-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.part-tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.part-tile .ti { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--primary-softer); color: var(--primary-dark); }
.part-tile .ti svg { width: 21px; height: 21px; }
.part-tile b { display: block; font-size: .98rem; }
.part-tile small { color: var(--text-2); font-size: .8rem; }
