/* 교회 지도 — 휴대폰 먼저. 따뜻한 흰 바탕 + 남색 + 금빛 한 가지 */
:root {
  --bg: #fbfaf6; --card: #ffffff; --ink: #1d2433; --sub: #4f5a6e; --line: #e4e1d8; --soft: #f3f0e8;
  --navy: #1f3a6b; --navy2: #2c4f8c; --gold: #b07d1e; --gold-bg: #fff6e2; --ok: #1d7a4a; --warn: #9a5b00; --bad: #b3261e;
  --r: 14px; --sh: 0 4px 18px rgba(25, 35, 60, .10);
  --font: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); word-break: keep-all; overflow-wrap: anywhere; -webkit-text-size-adjust: 100%; }
a { color: var(--navy2); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.muted { color: var(--sub); } .tiny { font-size: 13px; } .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #f0b429; outline-offset: 2px; }

/* 단추 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.3; text-align: center; }
.btn:hover { border-color: #c9c3b3; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy2); }
.btn.gold { background: var(--gold-bg); border-color: #e9cf95; color: #6a4a08; }
.btn.danger { color: var(--bad); border-color: #f0c7c3; }
.btn.sm { min-height: 36px; padding: 4px 12px; font-size: 14px; border-radius: 10px; }
.btn.wide { display: flex; width: 100%; margin: 8px 0; }
.btn[disabled] { opacity: .55; cursor: wait; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 14.5px; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.badge { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--sub); white-space: nowrap; vertical-align: middle; }
.badge.ok { background: #e5f4ec; color: var(--ok); }
.badge.wait { background: var(--gold-bg); color: var(--warn); }

/* 맨 위 */
.top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 19px; letter-spacing: -.3px; }
.brand svg { flex-shrink: 0; }
.brand small { font-weight: 700; color: var(--gold); font-size: 14px; }
.top .sp { flex: 1; }
.top .btn { min-height: 40px; padding: 6px 13px; font-size: 14.5px; }

/* 지도 화면 */
body.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.shell { flex: 1; min-height: 0; display: flex; position: relative; }
.side { width: 420px; max-width: 100%; display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--line); min-height: 0; z-index: 5; }
.mapbox { flex: 1; position: relative; min-width: 0; }
#map { position: absolute; inset: 0; background: #eef0ea; }
.searchbar { padding: 12px 16px 8px; display: flex; gap: 8px; }
.search { flex: 1; position: relative; }
.search input { width: 100%; height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; padding: 0 40px 0 14px; font-size: 16px; }
.search input:focus { border-color: var(--navy2); outline: none; box-shadow: 0 0 0 3px rgba(44, 79, 140, .18); }
.search .clear { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; background: none; font-size: 18px; color: var(--sub); cursor: pointer; display: none; }
.search.has .clear { display: block; }
.quick { display: flex; gap: 6px; padding: 0 16px 8px; overflow-x: auto; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 8px; }
.tabs button { flex: 1; border: 0; background: none; padding: 11px 4px; font-weight: 700; color: var(--sub); border-bottom: 3px solid transparent; cursor: pointer; font-size: 15.5px; }
.tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--navy); }
.pane { flex: 1; overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.pane[hidden] { display: none; }
.count { padding: 10px 16px 4px; font-size: 14px; color: var(--sub); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.count label { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; cursor: pointer; }
.list { list-style: none; margin: 0; padding: 4px 12px 90px; }
.item { display: flex; gap: 12px; padding: 12px; margin: 6px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; text-align: left; width: 100%; }
.item:hover, .item.sel { border-color: var(--navy2); box-shadow: var(--sh); }
.item .th { width: 64px; height: 64px; border-radius: 10px; flex-shrink: 0; background: linear-gradient(135deg, #e9edf6, #f7f1e3); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.item .th img { width: 100%; height: 100%; object-fit: cover; }
.item .bd { flex: 1; min-width: 0; }
.item h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.item .meta { font-size: 14px; color: var(--sub); margin-top: 2px; }
.item .wt { font-size: 14px; margin-top: 3px; color: var(--ink); }
.item .r { text-align: right; font-size: 13px; color: var(--sub); white-space: nowrap; }
.empty { padding: 30px 20px; text-align: center; color: var(--sub); }

/* 지도 위 */
.mapctl { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.mapctl .btn { background: #fff; box-shadow: var(--sh); border: 0; min-height: 44px; padding: 6px 12px; font-size: 14px; }
.mapctl .btn.around[aria-pressed="false"] { color: var(--sub); }
/* 주소 찾기 후보 — 핀은 사람이 고른다 */
.geo-box { margin-top: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.geo-msg { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; }
.geo-msg.ok { color: var(--ok); } .geo-msg.warn { color: var(--warn); }
.cands { list-style: none; margin: 0; padding: 0; }
.cands li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--soft); font-size: 14px; }
.cands .cn { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--gold-bg); border: 1.5px solid var(--gold); color: #6a4a08; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.cands .ct { flex: 1; min-width: 0; }
.cands .k { font-size: 12.5px; padding: 0 6px; border-radius: 6px; margin-right: 2px; }
.cands .k.ok { background: #e3f4ea; color: var(--ok); } .cands .k.warn { background: #fff1d6; color: var(--warn); } .cands .k.bad { background: #fbe4e2; color: var(--bad); }
.cand-dot { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid #fff; background: var(--gold); color: #fff; font: 700 14px/1 var(--font); box-shadow: 0 2px 8px rgba(0,0,0,.3); cursor: pointer; padding: 0; }
.cand-dot.bad { background: #8a8f99; } .cand-dot.warn { background: #c08a2a; } .cand-dot.ok { background: var(--ok); }
.card-pop { position: absolute; left: 12px; right: 12px; bottom: 16px; z-index: 4; max-width: 440px; margin: 0 auto; background: #fff; border-radius: 18px; box-shadow: 0 10px 30px rgba(20, 30, 50, .25); padding: 14px 16px 12px; }
.card-pop h3 { margin: 0 34px 2px 0; font-size: 19px; }
.card-pop .x { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--sub); }
.card-pop .acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 10px; }
.card-pop .acts .btn { padding: 6px; font-size: 14.5px; min-height: 42px; }
.wlist { margin: 6px 0 0; padding: 0; list-style: none; font-size: 14.5px; }
.wlist li { display: flex; gap: 8px; }
.wlist b { min-width: 74px; color: var(--sub); font-weight: 600; }

/* 휴대폰: 아래 탭으로 지도/목록/둘러보기 */
.bnav { display: none; }
@media (max-width: 899px) {
  .shell { flex-direction: column; }
  .side { width: 100%; border-right: 0; flex: 1; }
  .side.map-only { flex: 0 0 auto; }
  .side.map-only .tabs, .side.map-only .pane { display: none; }
  .mapbox { display: none; }
  body.view-map .mapbox { display: block; }
  body.view-map .side { flex: 0 0 auto; }
  body.view-map .side .tabs, body.view-map .side .pane { display: none; }
  .bnav { display: flex; border-top: 1px solid var(--line); background: #fff; padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
  .bnav a, .bnav button { flex: 1; border: 0; background: none; padding: 7px 2px 6px; font-size: 12.5px; font-weight: 700; color: var(--sub); display: flex; flex-direction: column; align-items: center; gap: 1px; text-decoration: none; cursor: pointer; min-height: 54px; }
  .bnav [aria-current="true"] { color: var(--navy); }
  .bnav svg { width: 24px; height: 24px; }
  .tabs { display: none; }
  .brand small { display: none; }
}
@media (max-width: 380px) { .brand { font-size: 17px; } .top .btn { padding: 6px 10px; } }

/* 둘러보기 */
.ov { padding: 12px 16px 90px; }
.ov h2 { font-size: 17px; margin: 22px 0 8px; display: flex; align-items: center; gap: 8px; }
.ov h2:first-child { margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px; text-align: center; }
.stat b { display: block; font-size: 24px; color: var(--navy); line-height: 1.2; }
.stat span { font-size: 13px; color: var(--sub); }
.bars { list-style: none; margin: 0; padding: 0; }
.bars li button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 5px 0; cursor: pointer; text-align: left; font-size: 15px; }
.bars .nm { width: 70px; flex-shrink: 0; }
.bars .bar { flex: 1; height: 14px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.bars .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy2), var(--navy)); border-radius: 99px; }
.bars .v { width: 34px; text-align: right; font-weight: 700; color: var(--navy); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin: 8px 0; }
.feed a { display: flex; gap: 12px; padding: 12px; color: inherit; text-decoration: none; }
.feed .ph { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--soft); }
.feed h4 { margin: 0; font-size: 16px; }
.feed p { margin: 3px 0 0; font-size: 14.5px; color: var(--sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dt { display: inline-block; min-width: 54px; text-align: center; background: var(--gold-bg); color: #6a4a08; border-radius: 10px; padding: 4px 6px; font-weight: 700; font-size: 13.5px; line-height: 1.3; flex-shrink: 0; }

/* 거르기 창 */
.modal-wrap { position: fixed; inset: 0; background: rgba(15, 20, 35, .45); z-index: 2147483100; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 520px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); position: relative; }
@media (min-width: 640px) { .modal-wrap { align-items: center; } .modal { border-radius: 20px; padding: 24px; } }
.modal h3 { margin: 0 40px 8px 0; font-size: 20px; }
.modal-x { position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--sub); }
.fgroup { margin: 14px 0; }
.fgroup h4 { margin: 0 0 6px; font-size: 15px; color: var(--sub); }
.fgroup .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fl { display: block; margin: 10px 0; font-weight: 600; font-size: 15px; }
.fl input, .fl select, .fl textarea, input.in, select.in, textarea.in { display: block; width: 100%; margin-top: 5px; min-height: 46px; border: 1.5px solid var(--line); border-radius: 11px; padding: 9px 12px; background: #fff; font-weight: 400; font-size: 16px; }
.fl textarea, textarea.in { min-height: 90px; resize: vertical; line-height: 1.6; }
.fl input:focus, .fl select:focus, .fl textarea:focus, .in:focus { border-color: var(--navy2); outline: none; box-shadow: 0 0 0 3px rgba(44, 79, 140, .15); }
.fl .hint { display: block; font-weight: 400; color: var(--sub); font-size: 13.5px; margin-top: 3px; }
.err { color: var(--bad); font-size: 14px; font-weight: 600; }
.ck { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-size: 15.5px; }
.ck input { width: 22px; height: 22px; accent-color: var(--navy); }

#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: #1d2433; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 15px; opacity: 0; pointer-events: none; transition: .25s; z-index: 2147483200; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 편집 정보 */
.keys .key-row { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 12px; padding: 10px; margin: 8px 0; flex-wrap: wrap; }
.keys .key-row span { font-weight: 700; width: 74px; font-size: 14px; }
.keys code { flex: 1; min-width: 0; word-break: break-all; font-size: 13.5px; }
.keys code.pin { font-size: 28px; letter-spacing: 6px; font-weight: 800; color: var(--navy); }
.keys .key-acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 10px 0; }
.keys .key-acts .btn { font-size: 13.5px; padding: 6px; }
@media print { body.print-keys > *:not(.modal-wrap) { display: none !important; } body.print-keys .modal-wrap { position: static; background: none; } body.print-keys .btn, body.print-keys .modal-x { display: none !important; }
  body.print-inline * { visibility: hidden !important; } body.print-inline .kc-print, body.print-inline .kc-print * { visibility: visible !important; } body.print-inline .kc-print { position: absolute; left: 0; top: 0; width: 100%; animation: none !important; } body.print-inline .kc-print .btn, body.print-inline .kc-print .kc-state { display: none !important; } }

/* 일반 페이지(교회·등록·안내) */
.page { max-width: 760px; margin: 0 auto; padding: 0 16px 60px; }
.page h1 { font-size: 26px; line-height: 1.3; margin: 18px 0 6px; letter-spacing: -.4px; }
.sec { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin: 14px 0; }
.sec > h2 { font-size: 18px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.sec > h2 .sp { flex: 1; }
.hero { margin: 0 -16px; position: relative; background: linear-gradient(135deg, #20365f, #34528a); min-height: 160px; overflow: hidden; }
@media (min-width: 792px) { .hero { margin: 16px 0 0; border-radius: 18px; } }
.hero .slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero .slides::-webkit-scrollbar { display: none; }
.hero .slides img { flex: 0 0 100%; width: 100%; height: 260px; object-fit: cover; scroll-snap-align: center; cursor: zoom-in; }
.hero .noimg { height: 160px; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .8); }
.hero .dots { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.sub-line { color: var(--sub); font-size: 15px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.acts4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.acts4 .btn { flex-direction: column; gap: 2px; min-height: 64px; padding: 6px 4px; font-size: 13.5px; }
.acts4 .btn svg { width: 22px; height: 22px; }
.acts4 .btn.amen.done { background: var(--gold-bg); border-color: #e9cf95; color: #6a4a08; }
.notice { background: var(--gold-bg); border: 1px solid #f0d9a6; color: #5a4000; border-radius: 14px; padding: 12px 14px; font-size: 15px; margin: 12px 0; }
.notice b { color: #6a4a08; }
.notice .btn { margin-top: 8px; }
.wtable { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.wtable th { text-align: left; color: var(--sub); font-weight: 600; width: 96px; padding: 7px 8px 7px 0; vertical-align: top; }
.wtable td { padding: 7px 0; border-top: 1px solid var(--soft); }
.wtable tr:first-child td { border-top: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: #eef2fa; color: var(--navy); font-weight: 600; border-radius: 999px; padding: 4px 12px; font-size: 14.5px; }
.links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.links a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; min-height: 48px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; background: var(--soft); }
.post { border-top: 1px solid var(--soft); padding: 14px 0; }
.post:first-of-type { border-top: 0; padding-top: 4px; }
.post h3 { margin: 0 0 2px; font-size: 17px; }
.post .d { font-size: 13.5px; color: var(--sub); }
.post p { margin: 8px 0; white-space: normal; }
.post .pph { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.post .pph img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.ev { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--soft); }
.ev:first-of-type { border-top: 0; }
.ev h3 { margin: 0; font-size: 16px; }
.ev p { margin: 2px 0 0; font-size: 14.5px; color: var(--sub); }
.ev > div { flex: 1; min-width: 0; }
.evph { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 8px; }
.evph button { padding: 0; border: 0; background: var(--soft); border-radius: 10px; overflow: hidden; cursor: zoom-in; display: block; }
.evph img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.evph.one { grid-template-columns: 1fr; }
.evph.one img { aspect-ratio: auto; height: auto; max-height: 420px; object-fit: contain; }
.ev-ph .ph-grid { margin-top: 6px; }
.ev .dt { align-self: flex-start; }
.upl input[hidden] { display: none !important; }   /* .fl 안에 있어도 파일 고르기 칸은 숨김(행사·담임목사님·섬기는 분들 사진) */
input[type=file][hidden] { display: none !important; }   /* 10-23 칭찬 글 쓰기 「사진 고르기」 안 「파일 선택」 상자가 보이던 것 — 숨긴 파일 칸은 어디서나 숨김 */
.minimap { height: 220px; border-radius: 12px; overflow: hidden; margin: 10px 0; background: #eef0ea; }
.foot { text-align: center; color: var(--sub); font-size: 13.5px; padding: 24px 16px 40px; line-height: 1.8; }
.foot a { color: var(--sub); }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .9); z-index: 2147483300; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button { position: absolute; top: 10px; right: 10px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 22px; cursor: pointer; }

/* 편집 양식 */
.form-sec { background: #fff; border: 1px solid var(--line); border-radius: 18px; margin: 14px 0; }
.form-sec > summary { list-style: none; cursor: pointer; padding: 15px 16px; font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.form-sec > summary::-webkit-details-marker { display: none; }
.form-sec > summary::after { content: "▾"; margin-left: auto; color: var(--sub); }
.form-sec[open] > summary::after { content: "▴"; }
.form-sec .in-sec { padding: 0 16px 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wrow { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr auto; gap: 6px; align-items: center; margin: 6px 0; }
.wrow select, .wrow input { min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 8px; background: #fff; width: 100%; min-width: 0; font-size: 15px; }
.wrow { padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.wdays { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.wdays > span { font-size: 13.5px; color: var(--sub); margin-right: 4px; }
.wdays .wd { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; border: 1.5px solid var(--line); border-radius: 99px; background: #fff; font-weight: 700; cursor: pointer; user-select: none; }
.wdays .wd input { position: absolute; opacity: 0; pointer-events: none; }
.wdays .wd.on { background: #1f3a6b; border-color: #1f3a6b; color: #fff; }
@media (max-width: 520px) { .wrow { grid-template-columns: 1fr 1fr; } .wrow .wl { grid-column: 1 / 2; } }
.xbtn { width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; color: var(--bad); font-size: 16px; }
.pickmap { height: 300px; border-radius: 14px; overflow: hidden; border: 1.5px solid var(--line); position: relative; }
.pick-hint { font-size: 14px; color: var(--sub); margin: 6px 0; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph-grid .ph { position: relative; }
.ph-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.ph-grid .ph button { position: absolute; top: 4px; right: 4px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; }
.ph-grid .ph .mv { right: auto; left: 4px; }
.ph-grid .ph .ph-badge { position: absolute; left: 4px; bottom: 4px; background: #1f3a6b; color: #fff; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 99px; pointer-events: none; }   /* 10-24 「마법사 사진 3장은 어디서 고쳐요?」 */
.ph-help { background: #fff7e0; border: 1px solid #f0d68a; border-radius: 10px; padding: 9px 12px; font-size: 14.5px; line-height: 1.6; margin: 4px 0 10px; }
.upl { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border: 2px dashed var(--line); border-radius: 10px; cursor: pointer; color: var(--sub); font-size: 14px; text-align: center; padding: 4px; background: var(--bg); }
.subcard { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; margin: 10px 0; background: var(--bg); }
.savebar { position: sticky; bottom: 0; background: rgba(251, 250, 246, .96); backdrop-filter: blur(6px); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; z-index: 5; }
.savebar .btn.primary { flex: 1; }
.savebar .st { font-size: 14px; color: var(--sub); }

/* 관리자 */
.adm table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm td, .adm th { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
.adm .acts { display: flex; flex-wrap: wrap; gap: 4px; }
.adm .acts .btn { min-height: 32px; padding: 2px 9px; font-size: 13px; }
.tabbar { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }

/* 출처 */
.src-list { list-style: none; padding: 0; margin: 0; }
.src-list li { border-top: 1px solid var(--soft); padding: 12px 0; }
.src-list li:first-child { border-top: 0; }
.src-list b { font-size: 16px; }
.src-list .lic { display: inline-block; background: #eef2fa; color: var(--navy); border-radius: 8px; padding: 0 8px; font-size: 13px; font-weight: 700; margin-left: 4px; }

/* 지도 위 글자 (MapLibre) */
.maplibregl-ctrl-attrib { font-size: 11.5px; }
.maplibregl-ctrl-attrib a { color: #333; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(26, 115, 232, .25); }

/* ── 2026-10-22 개편 공용 ── */
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper .btn { width: 56px; height: 56px; font-size: 24px; padding: 0; border-radius: 50%; }
.stepper b { font-size: 30px; min-width: 36px; text-align: center; }
.lightbox .x { position: absolute; top: 10px; right: 10px; }

/* 교회 관리(편집) 화면 */
.dash-url { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.dash-url a { color: var(--navy); word-break: break-all; font-size: 16.5px; }
.dash-url .acts { display: flex; gap: 6px; margin-left: auto; }
.dtabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0; }
@media (min-width: 700px) { .dtabs { grid-template-columns: repeat(5, 1fr); } }
.dtabs button { min-height: 52px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-weight: 700; font-size: 14.5px; cursor: pointer; padding: 6px 4px; line-height: 1.3; }
.dtabs button[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.nb { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; background: #c0362c; color: #fff; font-size: 12.5px; line-height: 20px; }
.nb:empty { display: none; }
.dpane { padding-bottom: 30px; }
.dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dcard { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; cursor: pointer; text-decoration: none; color: var(--ink); font: inherit; }
.dcard .ic { font-size: 26px; }
.dcard b { font-size: 16.5px; }
.dcard span:last-child { font-size: 14px; color: var(--sub); }
.dcard.hot { border-color: #e9b44c; background: var(--gold-bg); }
.dh { font-size: 17px; margin: 20px 0 8px; }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.todo button { width: 100%; text-align: left; background: #fff; border: 1.5px dashed #d8cfb9; border-radius: 14px; padding: 12px 14px; cursor: pointer; font: inherit; }
.todo b { display: block; font-size: 16px; }
.todo span { font-size: 14px; color: var(--sub); }
.ib { display: grid; gap: 10px; }
.msg { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.msg.unread { border-color: #e9b44c; box-shadow: 0 0 0 1px #e9b44c inset; }
.msg .mh { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.msg .mh b { font-size: 16px; flex: 1; min-width: 60%; }
.msg .dot { width: 10px; height: 10px; border-radius: 50%; background: #c0362c; }
.msg p { margin: 6px 0; }
.msg .ma { display: flex; gap: 6px; flex-wrap: wrap; }
.bigstat { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; text-align: center; }
.bigstat b { display: block; font-size: 40px; color: var(--navy); line-height: 1.2; }
.bigstat span { color: var(--sub); }
.wchart { width: 100%; max-width: 520px; height: auto; display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px; }
.slugrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.slugrow .pre { color: var(--sub); font-size: 14.5px; }
.slugrow input { flex: 1; min-width: 140px; min-height: 46px; border: 1.5px solid var(--line); border-radius: 11px; padding: 8px 10px; font-size: 17px; }
.phcap { width: 100%; margin-top: 4px; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font-size: 13px; }
.upl.locked { opacity: .45; cursor: not-allowed; }
.tg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 8px; }
.tg-chips .chip { white-space: normal; text-align: left; font-size: 13.5px; }
.ck.consent { background: var(--gold-bg); border-radius: 10px; padding: 6px 10px; margin: 6px 0; }

/* ── 해외 한인교회 (2026-10-23) ── 국내/해외 고르기 · 나라 고르기 창 */
.scope-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 10px; border: 1.5px solid var(--navy); border-radius: 12px; overflow: hidden; }
.scope-seg button { min-height: 48px; border: 0; background: #fff; color: var(--navy); font: 700 16.5px/1.2 var(--font); cursor: pointer; }
.scope-seg button + button { border-left: 1.5px solid var(--navy); }
.scope-seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.abroad-box { padding: 10px 12px 2px; margin: 0 0 10px; border: 1.5px solid var(--line); border-radius: 12px; background: #fbfaf6; }
.abroad-box .pk-cc { gap: 6px; text-align: left; }
.abroad-box .pk-cc .sp { flex: 1; }
.cp-list { max-height: 55vh; overflow-y: auto; margin: 4px -4px 0; padding: 0 4px; }
.cp-it { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 10px; border: 0; border-bottom: 1px solid var(--soft); background: #fff; font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.cp-it[aria-selected="true"] { background: var(--gold-bg); }
.cp-it .fl1 { font-size: 22px; width: 30px; text-align: center; flex: none; }
.cp-it .tiny { margin-left: auto; }
.cp-sep { margin: 10px 4px 4px; }
.tz-note { font-size: 13px; font-weight: 600; color: #6a4a08; background: var(--gold-bg); border-radius: 6px; padding: 1px 7px; vertical-align: middle; }
.chip.scope { font-weight: 700; }
/* 이메일 넣기 권하는 띠(교회 관리 한눈에·만들기 끝) */
.mail-tip { display: grid; gap: 4px; background: var(--gold-bg); border: 1px solid #ecd9a8; border-radius: 14px; padding: 12px 14px; margin: 10px 0 14px; }
.mail-tip b { color: #6b4a00; } .mail-tip span { font-size: 13.5px; color: var(--sub); } .mail-tip .btn { justify-self: start; margin-top: 4px; }

/* 편집 링크·PIN 「꼭 저장하세요」 칸 — 어르신도 읽기 쉽게 크게 */
.kc { background: #fff; border: 3px solid var(--navy); border-radius: 18px; padding: 16px; margin: 10px 0; font-size: 17px; }
.kc .kc-h { margin: 0 0 8px; font-size: 21px; line-height: 1.35; color: var(--navy); }
.kc .kc-h span { color: var(--bad); }
.kc .kc-why { margin: 0 0 12px; line-height: 1.6; }
.kc .kc-pin, .kc .kc-link { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 12px; padding: 10px 12px; margin: 8px 0; flex-wrap: wrap; }
.kc .kc-pin > span, .kc .kc-link > span { font-weight: 800; font-size: 15px; width: 72px; }
.kc code { flex: 1; min-width: 0; word-break: break-all; font-size: 14px; }
.kc code.pin { white-space: nowrap; font-size: clamp(28px, 8vw, 36px); letter-spacing: 4px; font-weight: 800; color: var(--navy); font-family: inherit; }
.kc .kc-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 6px; }
.kc .kc-acts .btn { min-height: 54px; font-size: 16.5px; padding: 6px 8px; }
.kc .kc-acts #kShare { grid-column: 1 / -1; font-size: 18px; }
.kc .kc-state { margin: 8px 0 0; font-size: 16px; }
.kc.kc-unsaved { border-color: var(--bad); animation: kcPulse 1.6s ease-in-out infinite; }
.kc.kc-unsaved .kc-state { color: var(--bad); }
@keyframes kcPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, .0); } 50% { box-shadow: 0 0 0 7px rgba(179, 38, 30, .22); } }
@media (prefers-reduced-motion: reduce) { .kc.kc-unsaved { animation: none; box-shadow: 0 0 0 4px rgba(179, 38, 30, .22); } }
.kc-strip { flex-basis: 100%; display: flex; align-items: center; gap: 8px; font-size: 15.5px; background: #fff; border: 2px solid var(--navy); border-radius: 12px; padding: 6px 10px; }
.kc-strip b { font-size: 20px; letter-spacing: 2px; color: var(--navy); white-space: nowrap; } .kc-strip .tiny { white-space: nowrap; } .kc-strip .btn { white-space: nowrap; }
.kc-strip .sp { flex: 1; }
.kc-strip.kc-unsaved { border-color: var(--bad); }
.kc-confirm { display: flex; gap: 10px; align-items: flex-start; font-size: 18px; font-weight: 700; background: var(--gold-bg); border: 2px solid #ecd9a8; border-radius: 14px; padding: 14px; margin: 16px 0; cursor: pointer; }
.kc-confirm input { width: 26px; height: 26px; flex: none; margin-top: 2px; }
.kc-confirm.need { border-color: var(--bad); }
.kc-open { margin: 0 0 12px; } .kc-open > .btn { min-height: 56px; font-size: 18px; border: 2px solid var(--navy); color: var(--navy); }
.kc-open.kc-unsaved > .btn { border-color: var(--bad); }

/* 고치기 찾기 쉽게 (2026-10-23) — 교회 관리 큰 칸 · 교회 페이지 고치기 단추 · 저장 알림 */
.etiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 16px; }
@media (min-width: 700px) { .etiles { grid-template-columns: repeat(3, 1fr); } }
.etiles button { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-size: 17px; font-weight: 800; color: var(--ink); text-align: left; cursor: pointer; line-height: 1.3; }
.etiles button:hover, .etiles button:focus-visible { border-color: var(--navy2); }
.etiles .ic { font-size: 24px; }
.savebar .saved-ok { color: var(--ok); font-size: 16px; }
.savebar #save { min-height: 54px; font-size: 18px; }
.mine-edit { margin: 10px 0 4px; min-height: 54px; font-size: 18px; }
.mine-fab { display: none; }
@media (max-width: 700px) { .mine-fab { display: inline-flex; position: fixed; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40; align-items: center; gap: 4px; background: var(--navy); color: #fff; font-weight: 800; font-size: 16px; text-decoration: none; padding: 12px 16px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.25); } }
.edit-foot { margin: 6px 0 4px; min-height: 48px; font-size: 16px; }
.me-help { background: var(--soft); border-radius: 14px; padding: 12px; margin-top: 12px; } .me-help p { margin: 6px 0 10px; } .me-help .btn { margin-top: 6px; }
.me-ch { justify-content: flex-start; min-height: 54px; font-size: 17px; margin: 6px 0; flex-wrap: wrap; }
.mine-fab, .mine-fab:visited { color: #fff !important; }
.top .brand span, .top .btn { white-space: nowrap; }
@media (max-width: 430px) { .top { gap: 6px; } .top .brand { font-size: 16px; } .top .btn { padding: 6px 9px; font-size: 13.5px; } }
@media (max-width: 360px) { .top .brand span { font-size: 14px; } .top .btn { padding: 5px 7px; font-size: 12.5px; } }

/* ── 주보 크게 보기(두 손가락 키우기) — 교회 페이지·교회 관리·운영자 함께 ── */
html.noscroll, html.noscroll body { overflow: hidden; }
.zoomer { position: fixed; inset: 0; z-index: 2147483300; background: #111; color: #fff; }
.zoomer .zs { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: zoom-in; }
.zoomer.zoomed .zs { cursor: grab; }
.zoomer .zs img { display: block; max-width: none; transform-origin: center center; will-change: transform; background: #fff; -webkit-user-drag: none; pointer-events: none; }
.zoomer .zhead { position: absolute; top: 0; left: 0; right: 0; padding: 14px 130px 14px 16px; background: linear-gradient(rgba(0, 0, 0, .75), transparent); font-size: 15px; pointer-events: none; display: flex; gap: 10px; flex-wrap: wrap; }
.zoomer .zhead .cnt { font-weight: 800; }
.zoomer button { border: 0; color: #fff; background: rgba(255, 255, 255, .18); font: inherit; cursor: pointer; }
.zoomer .zx { position: absolute; top: 8px; right: 8px; width: 52px; height: 52px; border-radius: 50%; font-size: 24px; }
.zoomer .zr { position: absolute; top: 14px; right: 68px; min-height: 40px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; }
.zoomer .zbar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 8px; padding: 12px 10px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .8)); }
.zoomer .zbar button { min-width: 56px; min-height: 52px; padding: 0 14px; border-radius: 14px; font-size: 20px; font-weight: 800; }
.zoomer .zbar .zp, .zoomer .zbar .zn { font-size: 16px; }
/* 10-23 앱 안 브라우저에서 사진 올리기 안내 */
.inapp-up{grid-column:1/-1;margin:0 0 6px;color:var(--bad,#b3261e)}
.inapp-up .linkbtn{background:none;border:0;padding:0;color:inherit;font:inherit;font-weight:700;text-decoration:underline;cursor:pointer}
