/* 성지교회 심방 — 목사님 '스마트 사역 수첩'과 같은 모양 (목사님 2026-12-02: "내 앱이랑 비슷하게")
   원본 모양: tools/app/android_app/index.html — 연회색 바탕 · 흰 둥근 카드(20px, 옅은 그림자) · 남색 굵은 제목 · 파랑 강조 #2b6cb0 ·
   프리텐다드 · 카드 안 줄마다 왼쪽 파란 시간 / 오른쪽 내용 · 회색 판 위 흰 단추 고르기 · 오른쪽 아래 파란 둥근 단추 · 어두운 화면 자동.
   글씨 크기는 --fs(설정의 막대) 배율을 따른다. 옛 '단정한 수첩' 모양은 교회심방시스템/.backup/ */

@font-face { font-family: "Pretendard"; src: url(fonts/pretendard-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url(fonts/pretendard-SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url(fonts/pretendard-Bold.woff2) format("woff2"); font-weight: 700 800; font-display: swap; }

:root {
  --fs: 1;
  --bg: #f7fafc;
  --card: #ffffff;
  --soft: #edf2f7;
  --soft-2: #f8fafc;
  --line: #edf2f7;
  --line-2: #cbd5e0;
  --title: #1a365d;
  --text: #2d3748;
  --text-2: #4a5568;
  --muted: #718096;
  --faint: #a0aec0;
  --blue: #2b6cb0;
  --blue-ink: #2b6cb0;   /* 글씨용 파랑 — 어두운 화면에선 밝게 (목사님 앱 --f-2b6cb0) */
  --blue-soft: #ebf8ff;
  --green: #276749;
  --green-soft: #f0fff4;
  --orange: #c05621;
  --orange-soft: #feebc8;
  --red: #c53030;
  --red-soft: #fff5f5;
  --red-dot: #e53e3e;
  --on-blue: #ffffff;
  --shadow: 0 1px 2px rgba(17, 20, 24, .04), 0 6px 20px rgba(17, 20, 24, .05);
}
/* 어두운 화면: 휴대폰 따라 자동 + 설정에서 어둡게·밝게 고정 (목사님 앱과 같은 방식, html data-theme) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #12161f; --card: #1a202c; --soft: #2d3545; --soft-2: #222a38; --line: #2d3545; --line-2: #4a5568;
    --title: #ccdbf1; --text: #c9d0dd; --text-2: #bbc2cf; --muted: #a6b0be; --faint: #8a9bb2;
    --blue: #2b6cb0; --blue-ink: #9ec2e7; --blue-soft: #16262f; --green: #c6ead9; --green-soft: #152c1b;
    --orange: #edb395; --orange-soft: #443821; --red: #e59393; --red-soft: #281313;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12161f; --card: #1a202c; --soft: #2d3545; --soft-2: #222a38; --line: #2d3545; --line-2: #4a5568;
  --title: #ccdbf1; --text: #c9d0dd; --text-2: #bbc2cf; --muted: #a6b0be; --faint: #8a9bb2;
  --blue: #2b6cb0; --blue-ink: #9ec2e7; --blue-soft: #16262f; --green: #c6ead9; --green-soft: #152c1b;
  --orange: #edb395; --orange-soft: #443821; --red: #e59393; --red-soft: #281313;
  --shadow: none;
  }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: calc(16px * var(--fs)); line-height: 1.5; letter-spacing: -0.2px; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { max-width: 760px; margin: 0 auto; min-height: 100dvh; padding: 0 16px 150px; }
svg.i { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- 머리 */
.top { display: flex; align-items: center; gap: 8px; padding: 18px 0 14px; }
.top-text { flex: 1; min-width: 0; }
.top h1 { margin: 0; font-size: calc(26px * var(--fs)); font-weight: 800; letter-spacing: -0.8px; color: var(--title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top p { margin: 2px 0 0; font-size: calc(13px * var(--fs)); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--soft); color: var(--text-2); }
.icon-btn svg.i { width: 21px; height: 21px; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red-dot); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* 보기 고르기 — 회색 판 위 흰 단추 (목사님 앱 kind-selector) */
.views { display: flex; background: var(--soft); border-radius: 12px; padding: 4px; margin-bottom: 16px; overflow-x: auto; }
.views button {
  flex: 1 0 auto; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent;
  font-size: calc(15px * var(--fs)); font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.views button[aria-pressed="true"] { background: var(--card); color: var(--blue-ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }

/* ---------------------------------------------------------------- 날짜 카드 */
.card { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 16px 18px 6px; margin-bottom: 12px; }
.day.past { opacity: .6; }
.day-h { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; font-size: calc(17px * var(--fs)); font-weight: 800; letter-spacing: -0.4px; color: var(--title); }
.day-h small { font-size: calc(12px * var(--fs)); font-weight: 500; color: var(--faint); letter-spacing: 0; }
.day-h .today { color: var(--red); }

.visit { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.day-h + .visit { border-top: 0; }
.visit:active { opacity: .7; }
.v-time { flex: none; min-width: calc(52px * var(--fs)); padding-top: 1px; font-size: calc(15px * var(--fs)); font-weight: 700; color: var(--blue-ink); font-variant-numeric: tabular-nums; }
.v-body { flex: 1; min-width: 0; }
.v-target { font-size: calc(17px * var(--fs)); font-weight: 800; letter-spacing: -0.3px; line-height: 1.4; color: var(--text); word-break: keep-all; }
.v-meta { margin-top: 2px; font-size: calc(13px * var(--fs)); color: var(--muted); }
.v-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--soft); color: var(--text-2); font-size: calc(12px * var(--fs)); font-weight: 600; }
.tag.senior { background: var(--blue-soft); color: var(--blue-ink); }
.tag.leave { background: var(--green-soft); color: var(--green); }
.tag.req { background: var(--orange-soft); color: var(--orange); }
.tag.cancel { background: var(--red-soft); color: var(--red); }
.visit.cancel .v-target { text-decoration: line-through; color: var(--faint); }
.visit.cancel .v-time { color: var(--faint); }

.empty { padding: 28px 18px; text-align: center; color: var(--faint); font-size: calc(15px * var(--fs)); }
.empty b { display: block; margin-bottom: 4px; color: var(--text-2); font-size: calc(17px * var(--fs)); }

/* 오른쪽 아래 둥근 단추 (목사님 앱 ✎ 자리) */
.fab {
  position: fixed; right: max(16px, calc(50% - 364px)); bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 15;
  height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 18px; background: var(--blue); color: var(--on-blue);
  display: flex; align-items: center; gap: 6px; font-size: calc(16px * var(--fs)); font-weight: 700; box-shadow: 0 4px 14px rgba(17, 20, 24, .18);
}

/* ---------------------------------------------------------------- 단추 */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 50px; padding: 12px 16px; border: 0; border-radius: 14px; background: var(--soft); color: var(--text);
  font-size: calc(16px * var(--fs)); font-weight: 700; text-decoration: none;
}
.btn.main { background: var(--blue); color: var(--on-blue); }
.btn.warn { background: var(--orange-soft); color: var(--orange); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn:disabled { opacity: .5; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions { display: grid; gap: 8px; margin-top: 18px; }
.back-link { border: 0; background: none; padding: 0; min-height: 44px; color: var(--blue-ink); font-weight: 700; font-size: calc(14px * var(--fs)); }

/* ---------------------------------------------------------------- 올라오는 판 (목사님 앱 .sheet) */
.sheet-back { position: fixed; inset: 0; z-index: 20; background: rgba(26, 32, 44, .55); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 560px; margin: 0 auto; max-height: 90dvh;
  overflow-y: auto; overscroll-behavior: contain; background: var(--card); border-radius: 18px 18px 0 0;
  padding: 18px 18px calc(24px + env(safe-area-inset-bottom)); animation: up .2s ease-out;
}
@keyframes up { from { transform: translateY(20px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet-grip { display: none; }
.sheet-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.sheet-head h2 { flex: 1; margin: 8px 0 0; font-size: calc(20px * var(--fs)); font-weight: 800; letter-spacing: -0.5px; color: var(--title); word-break: keep-all; }
.sheet h3 { margin: 20px 0 6px; font-size: calc(13px * var(--fs)); font-weight: 700; color: var(--muted); }

.d-when { font-size: calc(17px * var(--fs)); font-weight: 700; color: var(--blue-ink); }
.d-line { margin: 4px 0; font-size: calc(15px * var(--fs)); color: var(--text-2); }
.leave-box { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--green-soft); }
.leave-box .big { font-size: calc(19px * var(--fs)); font-weight: 800; color: var(--green); }
.leave-box .small { margin: 2px 0 10px; font-size: calc(13px * var(--fs)); color: var(--text-2); }
.leave-box .btn { background: var(--card); color: var(--green); min-height: 46px; }
.memo { white-space: pre-wrap; padding: 12px 13px; border-radius: 12px; background: var(--soft-2); font-size: calc(15px * var(--fs)); line-height: 1.65; }
.request-box { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--orange-soft); }
.request-box p { margin: 0 0 10px; color: var(--text); font-size: calc(15px * var(--fs)); }
.request-box strong { color: var(--orange); }
.request-box .btn { background: var(--card); }
.history { list-style: none; margin: 0; padding: 0; font-size: calc(14px * var(--fs)); }
.history li { display: grid; grid-template-columns: calc(84px * var(--fs)) 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.history time { color: var(--faint); font-size: calc(13px * var(--fs)); font-variant-numeric: tabular-nums; }

/* 입력 (목사님 앱 sched-form) */
.field { margin-top: 14px; }
.field > label, .field > .label, .label { display: block; margin-bottom: 5px; font-size: calc(13px * var(--fs)); font-weight: 700; color: var(--muted); }
.field small { font-weight: 400; color: var(--faint); }
.input {
  width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--card); color: var(--text); font-size: calc(16px * var(--fs));
}
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43, 108, 176, .2); }
textarea.input { min-height: 90px; line-height: 1.5; resize: vertical; }
.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card);
  color: var(--text-2); font-size: calc(15px * var(--fs)); font-weight: 600;
}
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.chip.more { border-style: dashed; color: var(--muted); }
.people { display: grid; gap: 6px; }
.person {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border: 1px solid var(--line-2);
  border-radius: 12px; background: var(--card); font-size: calc(16px * var(--fs)); font-weight: 600;
}
.person input { width: 22px; height: 22px; flex: none; accent-color: var(--blue); }
.person span { flex: 1; }
.person em { font-style: normal; font-weight: 400; font-size: calc(12px * var(--fs)); color: var(--faint); }
.person:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.hint { margin: 6px 0 0; font-size: calc(13px * var(--fs)); color: var(--muted); line-height: 1.5; }
.err { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: calc(14px * var(--fs)); font-weight: 600; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.toggle > span { flex: 1; }
.toggle input { width: 24px; height: 24px; accent-color: var(--blue); flex: none; }

/* 알림 목록 */
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { padding: 12px 0; border-top: 1px solid var(--line); }
.notes li:first-child { border-top: 0; }
.notes li.new button { font-weight: 700; }
.notes li.new button::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 7px 2px 0; border-radius: 50%; background: var(--red-dot); }
.notes button { all: unset; display: block; cursor: pointer; font-size: calc(15px * var(--fs)); line-height: 1.5; word-break: keep-all; }
.notes time { display: block; margin-top: 2px; font-size: calc(12px * var(--fs)); color: var(--faint); font-weight: 400; }

/* 글씨 크기 */
.fs-box { padding: 14px 0 8px; border-top: 1px solid var(--line); }
.fs-box .label { font-size: calc(15px * var(--fs)); color: var(--text); }
.fs-now { color: var(--blue-ink); }
.fs-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.fs-row .a { font-weight: 700; color: var(--muted); }
.fs-row .a.small { font-size: 14px; }
.fs-row .a.big { font-size: 24px; }
.fs-row input[type=range] { flex: 1; height: 44px; accent-color: var(--blue); }
.fs-sample { margin-top: 4px; padding: 12px 14px; border-radius: 12px; background: var(--soft-2); display: flex; gap: 12px; }
.fs-sample .t { color: var(--blue-ink); font-weight: 700; font-size: calc(15px * var(--fs)); }
.fs-sample strong { display: block; font-size: calc(17px * var(--fs)); font-weight: 800; }
.fs-sample span { color: var(--muted); font-size: calc(13px * var(--fs)); }

/* ---------------------------------------------------------------- 로그인 */
.login { padding: 48px 4px 32px; }
.login h1 { margin: 0 0 4px; font-size: calc(26px * var(--fs)); font-weight: 800; letter-spacing: -0.8px; color: var(--title); }
.login .lead { margin: 0 0 22px; color: var(--muted); font-size: calc(15px * var(--fs)); }
.who { display: grid; gap: 8px; }
.who button { min-height: 56px; padding: 0 18px; border: 0; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); text-align: left; font-size: calc(17px * var(--fs)); font-weight: 700; color: var(--text); }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 22px 0; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--soft); border: 2px solid var(--line-2); }
.pin-dots i.on { background: var(--blue); border-color: var(--blue); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; margin: 0 auto; }
.pad button { height: 62px; border: 0; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); font-size: 24px; font-weight: 600; color: var(--text); }
.pad button.fn { font-size: 15px; color: var(--muted); background: transparent; box-shadow: none; }
.pad button:active { background: var(--soft); }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40;
  max-width: 90vw; padding: 12px 18px; border-radius: 12px; background: #2d3748; color: #fff; font-size: 14px; font-weight: 600;
}

/* ---------------------------------------------------------------- 아래 탭 (목사님 앱 nav-bar) */
.wrap { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.nav-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 14; display: flex; justify-content: center;
  height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); border-top: 1px solid var(--line);
}
.nav-item {
  flex: 1; max-width: 110px; min-width: 0; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: none; color: var(--faint); font-size: 11px; font-weight: 600;
}
.nav-item.active { color: var(--title); font-weight: 700; }
.nav-icon { position: relative; line-height: 0; }
.nav-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active .nav-icon svg { stroke-width: 2.2; }
.nav-icon .badge { top: -5px; right: -12px; }
.fab { bottom: calc(78px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(150px + env(safe-area-inset-bottom)); }
.icon-btn.wide { width: auto; padding: 0 12px; font-size: 13px; font-weight: 600; }
.tl-none { margin: 0; padding: 8px 0 12px; font-size: calc(14px * var(--fs)); color: var(--faint); }
.tl-more { display: block; width: 100%; margin: 8px 0 12px; padding: 10px; border: 0; border-radius: 12px; background: var(--soft); color: var(--text-2); font-size: calc(14px * var(--fs)); font-weight: 600; }
.plan { margin: 6px 0 4px; padding-left: 18px; font-size: calc(15px * var(--fs)); line-height: 1.6; color: var(--text-2); }
.card > .hint { margin: 4px 0 12px; }
#hbHost { margin: 0; }
.theme-seg { display: flex; background: var(--soft); border-radius: 10px; padding: 3px; gap: 2px; }
.theme-seg button { flex: 1; min-height: 40px; border: 0; border-radius: 8px; background: none; font-size: calc(14px * var(--fs)); font-weight: 600; color: var(--muted); }
.theme-seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* ---------------------------------------------------------------- 돌봄 · 심방 기록 (목사님 앱 같은 이름·모양, 2026-12-02) */
.tr { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.day-h + .tr { border-top: 0; }
.tr .tt { flex: none; min-width: 50px; font-size: calc(15px * var(--fs)); font-weight: 700; color: var(--blue-ink); }
.tr .tm { flex: 1; min-width: 0; font-size: calc(16px * var(--fs)); line-height: 1.45; word-break: keep-all; }
.tr .tm small { display: block; margin-top: 2px; font-size: calc(13px * var(--fs)); color: var(--faint); }
.tcall { flex: none; min-height: 40px; padding: 7px 13px; border: 0; border-radius: 10px; background: var(--soft); color: var(--blue-ink); font-size: calc(14px * var(--fs)); font-weight: 700; }
.ctoday { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; text-align: left; padding: 16px 18px; font-size: calc(15px * var(--fs)); color: var(--text); }
.ctoday .cgo { flex: none; color: var(--blue-ink); font-weight: 700; font-size: calc(14px * var(--fs)); }
.cchips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; scrollbar-width: none; }
.cchip { flex: none; min-height: 38px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: calc(14px * var(--fs)); }
.cchip b { color: var(--muted); font-weight: 600; margin-left: 2px; }
.cchip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.cchip.on b { color: #fff; }
.csearch { margin: 2px 0 12px; }
.cperson { margin-bottom: 14px; }
.cph { display: flex; align-items: baseline; gap: 8px; margin: 4px 2px 6px; font-size: calc(16px * var(--fs)); }
.cph small { color: var(--muted); font-size: calc(13px * var(--fs)); }
details.cc { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
details.cc.s-news { border-left-color: #63b3ed; }
details.cc.s-answered { border-left-color: #48bb78; }
details.cc.s-entrusted { border-left-color: #b794f4; }
details.cc > summary { list-style: none; padding: 11px 13px; cursor: pointer; }
details.cc > summary::-webkit-details-marker { display: none; }
.cbadge { display: inline-block; font-size: calc(12px * var(--fs)); font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--soft); color: var(--text); }
.cbadge.s-answered { background: var(--green-soft); color: var(--green); }
.cmark { margin-left: 5px; font-size: 13px; }
.ct1 { margin-top: 5px; font-size: calc(16px * var(--fs)); font-weight: 700; line-height: 1.4; }
.ct2 { margin-top: 3px; font-size: calc(14px * var(--fs)); color: var(--text-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ct3 { margin-top: 3px; font-size: calc(12px * var(--fs)); color: var(--faint); }
.cbody { padding: 0 13px 13px; display: grid; gap: 6px; }
.cbox { background: var(--soft-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: calc(13px * var(--fs)); }
.chist { padding: 6px 0; border-top: 1px dashed var(--line); }
.chh { display: flex; align-items: center; gap: 4px; font-size: calc(12px * var(--fs)); color: var(--muted); }
.cedit { margin-left: auto; min-width: 32px; min-height: 32px; border: 0; background: transparent; color: var(--blue-ink); font-size: 15px; }
.chn { margin-top: 2px; font-size: calc(14px * var(--fs)); line-height: 1.55; white-space: pre-wrap; }
.cpick { margin: 4px 0 2px; }
.cpick small { color: var(--muted); font-size: calc(12px * var(--fs)); }
.cpick div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.cpick button, .cmore button { min-height: 40px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); border-radius: 10px; padding: 7px 10px; font-size: calc(14px * var(--fs)); font-weight: 600; }
.cmore { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: calc(14px * var(--fs)); color: var(--text-2); }
.cmore label { display: flex; align-items: center; gap: 6px; min-height: 40px; }
.cmore input { width: 20px; height: 20px; margin: 0; accent-color: var(--blue); }
.cmore .cdel { color: var(--red); border-color: transparent; background: transparent; padding-left: 0; }
.waiting-bar { margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; background: #fffaf0; border: 1px solid #fbd38d; color: #9c4221; font-size: calc(14px * var(--fs)); font-weight: 600; }
.record-item { background: var(--card); border-radius: 18px; padding: 16px 16px 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.record-title { font-size: calc(17px * var(--fs)); font-weight: 800; letter-spacing: -0.3px; line-height: 1.4; }
.record-meta { margin-top: 2px; font-size: calc(13px * var(--fs)); line-height: 1.5; color: var(--muted); }
.record-content { margin-top: 8px; padding: 12px 13px; border-radius: 12px; background: var(--soft-2); font-size: calc(15px * var(--fs)); line-height: 1.65; white-space: pre-wrap; color: var(--text-2); }
.record-content.prayer { background: var(--orange-soft); color: var(--text); }
.rec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rec-actions button { flex: 1 1 auto; min-height: 44px; padding: 0 10px; border: 0; border-radius: 12px; background: var(--soft); color: var(--text); font-size: calc(14px * var(--fs)); font-weight: 600; }
.rec-actions button.del { background: var(--red-soft); color: var(--red); }
.rec-actions button.dm { background: #553c9a; color: #fff; }
.tag.rec { background: var(--soft); color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .waiting-bar { background: #2c2415; border-color: #635336; color: #f3d1ac; } }
:root[data-theme="dark"] .waiting-bar { background: #2c2415; border-color: #635336; color: #f3d1ac; }

/* ---------------------------------------------------------------- 어르신도 바로 알게 (목사님 12-02) — 그림 단추 아래 글자 */
.icon-btn.lab { width: 54px; height: 54px; flex-direction: column; gap: 1px; display: flex; align-items: center; justify-content: center; }
.icon-btn.lab span:not(.badge) { font-size: 11px; font-weight: 700; line-height: 1; }
.icon-btn.lab svg.i { width: 20px; height: 20px; }
.icon-btn.wide { height: 54px; }

/* 달력 (목사님 앱 cal-grid와 같은 모양) */
.card.cal { padding-bottom: 12px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-head b { flex: 1; text-align: center; font-size: calc(18px * var(--fs)); color: var(--title); }
.cal-head button { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: var(--soft); color: var(--text-2); font-size: 22px; font-weight: 700; }
.cal-head .to-today { font-size: 14px; padding: 0 12px; color: var(--blue-ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-grid .wd { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-grid .wd.sun, .cal-grid .d.sun .n { color: #e53e3e; }
.cal-grid .wd.sat, .cal-grid .d.sat .n { color: #3182ce; }
.cal-grid .d { min-height: 64px; border-radius: 6px; background: var(--soft-2); padding: 3px 2px; overflow: hidden; border: 2px solid transparent; text-align: left; display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.cal-grid .d.empty { background: transparent; }
.cal-grid .d.today { border-color: var(--blue); background: var(--blue-soft); }
.cal-grid .d.sel { border-color: #c2456e; }
.cal-grid .d .n { font-size: 13px; font-weight: 700; color: var(--text); padding-left: 2px; }
.e { display: block; font-size: 11px; line-height: 1.3; padding: 1px 3px; border-radius: 3px; background: #fed7e2; color: #97266d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.e.sr { background: #bee3f8; color: #2c5282; }
.e.rq { background: #feebc8; color: #9c4221; }
.cal-grid .d .more { font-size: 11px; color: var(--muted); padding-left: 2px; }
.cal-key { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.cal-key .e { display: inline-block; padding: 2px 8px; font-size: 12px; }

/* 사람 단추·카드 */
.pchip { display: inline-flex; align-items: center; min-height: 34px; margin: 6px 0 2px; padding: 3px 11px; border: 0; border-radius: 999px; background: var(--soft); color: var(--blue-ink); font-size: calc(14px * var(--fs)); font-weight: 700; }
.cph .pchip { margin: 0; }
.tr .tm small .pchip { min-height: 28px; margin: 2px 0 0; font-size: calc(13px * var(--fs)); }
.tt.hot { color: var(--red) !important; }
.pinfo { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0 0; font-size: calc(15px * var(--fs)); }
.pinfo dt { color: var(--muted); font-weight: 600; }
.pinfo dd { margin: 0; }
ul.plain { margin: 0; padding-left: 18px; font-size: calc(15px * var(--fs)); line-height: 1.6; }

/* 달력 이름표: 위 줄 종류(작게) · 아래 줄 이름 — 휴대폰 칸이 좁아 '대심방/홍길동'을 두 줄로 (목사님 12-02) */
.cal-grid .d { min-height: 78px; }
.e i { display: block; font-style: normal; font-size: 10px; font-weight: 700; opacity: .85; line-height: 1.2; }
.e b { display: block; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 560px) { .e i, .e b { display: inline; } .e i::after { content: "/"; margin: 0 1px; } .cal-grid .d { min-height: 70px; } }
.cal-key .e { display: inline-block; }
.toggle.senior-all { background: var(--card); border-radius: 16px; padding: 12px 16px; margin-bottom: 12px; border-top: 0; box-shadow: var(--shadow); }

/* 기도 카드 보는 분 고르기 */
.scope-row { width: 100%; display: grid; gap: 6px; }
.scope-row small { color: var(--muted); font-size: calc(12px * var(--fs)); }
.chips.scope .chip { min-height: 40px; font-size: calc(14px * var(--fs)); }

/* ---------------------------------------------------------------- 📞 연락 (12-03) */
.ct-sum { padding: 14px 16px; }
.ct-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: center; }
.ct-stats b { display: block; font-size: calc(22px * var(--fs)); color: var(--title); font-weight: 800; line-height: 1.2; }
.ct-stats span { font-size: calc(12px * var(--fs)); color: var(--muted); }
.ct-list { padding: 0; overflow: hidden; }
details.ctf + details.ctf { border-top: 1px solid var(--line); }
details.ctf > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 52px; padding: 10px 16px; cursor: pointer; }
details.ctf > summary::-webkit-details-marker { display: none; }
details.ctf > summary::after { content: "▾"; color: var(--faint); transition: transform .15s; }
details.ctf[open] > summary::after { transform: rotate(180deg); }
.ctf-t { flex: 1; font-weight: 800; color: var(--title); font-size: calc(16px * var(--fs)); }
details.ctf > summary small { color: var(--muted); font-size: calc(13px * var(--fs)); white-space: nowrap; }
.ct { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--line); }
.ct-b { flex: 1; min-width: 0; }
.ct-n { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 700; }
.ct-r { margin-top: 2px; font-size: calc(14px * var(--fs)); color: var(--text); }
.ct-a { display: block; margin-top: 2px; font-size: calc(13px * var(--fs)); color: var(--muted); }
.ct-d { margin-top: 6px; display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: calc(13px * var(--fs)); background: var(--green-soft); color: var(--green); }
.ct-d.s-hold { background: var(--soft); color: var(--text-2); }
.ct-d.s-noanswer { background: var(--orange-soft); color: var(--orange); }
.ct.done.s-done .ct-n, .ct.done.s-hold .ct-n { opacity: .55; }
.cg { padding: 0 7px; border-radius: 7px; font-size: calc(12px * var(--fs)); font-weight: 700; background: var(--soft); color: var(--text-2); }
.cg.g-S { background: var(--red-soft); color: var(--red); }
.cg.g-A { background: var(--orange-soft); color: var(--orange); }
.cg.g-새가족 { background: var(--green-soft); color: var(--green); }
.ct-btn { display: flex; gap: 8px; flex: none; }
.ct-call, .ct-chk { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; text-decoration: none; font-size: 20px; }
.ct-call { background: var(--blue-soft); }
.ct-chk { border: 2px solid var(--line-2); background: var(--card); color: var(--green); font-weight: 800; cursor: pointer; }
.ct-chk.s-done { background: var(--green-soft); border-color: var(--green); }
.ct-chk.s-hold { background: var(--soft); }
.ct-chk.s-noanswer { background: var(--orange-soft); border-color: var(--orange); }
.ct-acts { display: grid; gap: 8px; margin-top: 12px; }
.ct-acts .btn { width: 100%; min-height: 48px; }
.ct-stage { padding: 4px 16px 10px; border-top: 1px solid var(--line); }
.ct-sh { padding: 8px 0 4px; font-weight: 700; color: var(--text-2); font-size: calc(14px * var(--fs)); }
.ct-l { padding: 6px 0; }
.ct-foot { margin: 4px 4px 24px; }
.ct-sum > .hint { margin-bottom: 0; }

/* 🌱 새가족 (12-03) */
.nc { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--line); }
.nc-w { flex: none; min-width: 40px; padding-top: 6px; font-weight: 800; color: var(--green); font-size: calc(14px * var(--fs)); }
.nc-b { flex: 1; min-width: 0; }
.nc-b .bad, .nc-x { color: var(--red); }
.nc-x { display: block; margin-top: 2px; font-size: calc(13px * var(--fs)); }
.nc-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin-top: 6px; }
.nc-dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.nc-dots i.on { background: var(--green); border-color: var(--green); }
.nc-dots small { color: var(--muted); font-size: calc(12px * var(--fs)); }
.nc-h { padding: 0 16px 8px; margin: 0; }
.nc-p { padding: 8px 16px 0; }

/* 🎂 생일 (12-03) */
.bd { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.bd-d { flex: none; min-width: 52px; font-weight: 700; color: var(--muted); font-size: calc(14px * var(--fs)); }
.bd.now .bd-d { color: var(--red); }

/* 📊 보고 (담임목사님, 12-03) */
.rp .day-h { margin-bottom: 8px; }
.rp-t { width: 100%; border-collapse: collapse; font-size: calc(14px * var(--fs)); font-variant-numeric: tabular-nums; }
.rp-t th, .rp-t td { padding: 7px 6px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
.rp-t thead th { border-top: 0; color: var(--muted); font-weight: 700; font-size: calc(13px * var(--fs)); }
.rp-t tbody th { text-align: left; color: var(--text-2); font-weight: 600; }
.rp-t td { color: var(--text); }
.rp-t td.low { color: var(--red); font-weight: 700; }
.rp-scroll { overflow-x: auto; margin: 0 -4px; }
.rp-area th:first-child { position: sticky; left: 0; background: var(--card); }
.rp-copy { margin-top: 12px; }
.rp-pre { white-space: pre-wrap; font: inherit; font-size: calc(14px * var(--fs)); line-height: 1.6; background: var(--soft-2); padding: 12px; border-radius: 10px; max-height: 50vh; overflow: auto; }
.rp-chart { margin-top: 4px; }
.rp-svg { width: 100%; height: auto; display: block; }
.rp-svg .rp-b rect:last-of-type { fill: var(--blue-ink); opacity: .35; }
.rp-svg .rp-b.last rect:last-of-type, .rp-svg .rp-b.on rect:last-of-type { opacity: 1; }
.rp-svg .rp-b { cursor: pointer; }
.rp-ax { fill: var(--muted); font-size: 11px; }
.rp-tip { min-height: 22px; margin-top: 4px; font-size: calc(13px * var(--fs)); color: var(--text-2); font-variant-numeric: tabular-nums; }
.rp-h { display: grid; gap: 6px; }
.rp-hr { display: grid; grid-template-columns: minmax(64px, auto) 1fr auto; gap: 8px; align-items: center; font-size: calc(14px * var(--fs)); }
.rp-hn { color: var(--text-2); white-space: nowrap; }
.rp-ht { height: 10px; background: var(--soft); border-radius: 5px; overflow: hidden; }
.rp-ht i { display: block; height: 100%; background: var(--blue-ink); border-radius: 5px; min-width: 2px; }
.rp-hr b { font-variant-numeric: tabular-nums; color: var(--text); font-size: calc(13px * var(--fs)); }
.rp-2 { display: grid; gap: 14px; margin-top: 12px; }
.rp-2 h4 { margin: 0 0 6px; font-size: calc(13px * var(--fs)); color: var(--muted); }
@media (min-width: 560px) { .rp-2 { grid-template-columns: 1fr 1fr; } }
.rp-h4 { margin: 12px 0 6px; font-size: calc(13px * var(--fs)); color: var(--muted); }
.rp-t:not(.rp-area) th, .rp-t:not(.rp-area) td { white-space: normal; }
.rp-t:not(.rp-area) tbody th { white-space: nowrap; }
.rp .day-h small { white-space: normal; }
.e.cx { background: var(--soft); color: var(--faint); text-decoration: line-through; }

/* ---------------- 🎙 말로 적기 · ✨ 정리 · 기도제목 칩 · 📤 디모데 (12-03) */
.rec-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.rec-tools .btn { flex: 1 1 140px; min-height: 46px; width: auto; }
.btn.mic.on { background: var(--red-soft); color: var(--red); border-color: var(--red); animation: micpulse 1.4s ease-in-out infinite; }
@keyframes micpulse { 50% { box-shadow: 0 0 0 5px var(--red-soft); } }
@media (prefers-reduced-motion: reduce) { .btn.mic.on { animation: none; } }
.btn.ai { background: var(--blue-soft); color: var(--blue-ink); border-color: var(--blue-soft); font-weight: 700; }
.btn:disabled { opacity: .6; }
.rawbox { margin-top: 8px; font-size: calc(13px * var(--fs)); color: var(--muted); }
.rawbox summary { cursor: pointer; min-height: 32px; }
.hint.warn { color: var(--orange); }
.hint.small { font-size: calc(12px * var(--fs)); margin: 4px 0 0; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pr-chip { min-height: 38px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--text);
  font-size: calc(14px * var(--fs)); text-align: left; line-height: 1.35; }
.pr-chip:active { background: var(--soft); }
.tag.dmok { background: var(--blue-soft); color: var(--blue-ink); }
.dmprev .pinfo dd { white-space: pre-wrap; word-break: break-word; }

/* ---------------- 👤 교인 카드 (12-03) */
.phead { display: flex; gap: 14px; align-items: center; margin: 4px 0 10px; }
.pphoto { width: 76px; height: 96px; object-fit: cover; border-radius: 12px; background: var(--soft); flex: none; }
.phead-t { min-width: 0; }
.phead-n { font-size: calc(18px * var(--fs)); color: var(--title); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.phead-a { font-size: calc(13px * var(--fs)); color: var(--muted); margin-top: 2px; }
.poverall { background: var(--blue-soft); border-radius: 12px; padding: 10px 12px; margin: 6px 0 10px; font-size: calc(14px * var(--fs)); line-height: 1.55; color: var(--text); }
.patt { margin: 6px 0 8px; }
.patt-h small { color: var(--muted); }
.patt .ncdots { display: flex; gap: 4px; margin-top: 6px; }
.patt .ncdots i { width: 16px; height: 16px; border-radius: 4px; background: var(--soft); border: 1px solid var(--line-2); }
.patt .ncdots i.on { background: var(--green); border-color: var(--green); }
.pfold { margin: 4px 0 6px; }
.pfold summary { min-height: 36px; display: flex; align-items: center; color: var(--blue-ink); font-weight: 600; cursor: pointer; }
.pfam { display: flex; flex-wrap: wrap; gap: 8px; }
.pfam-i { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px 4px 4px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--text); font-size: calc(14px * var(--fs)); }
.pfam-ph { width: 34px; height: 42px; object-fit: cover; border-radius: 7px; }
.pfam-r { color: var(--muted); font-size: calc(12px * var(--fs)); }
.pdv li small { color: var(--muted); }

/* ---------------- 📲 앱 녹음 (12-03) */
.recbar { position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--title); color: #fff; font-weight: 700; font-size: calc(15px * var(--fs)); box-shadow: var(--shadow); }
.recbar button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: #fff; color: var(--title); font-weight: 800; font-size: calc(15px * var(--fs)); }
.recdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #68d391; margin-right: 4px; vertical-align: middle; }
.fab.fab2 { bottom: calc(144px + env(safe-area-inset-bottom)); background: var(--title); }
.btn.rec-go { background: var(--title); color: #fff; }
.tag.stt { background: var(--blue-soft); color: var(--blue-ink); }

/* 개인 앱과 같은 항목 (12-03): 기억할 일·할 일·예배·확인할 것 */
.record-sec { margin: 8px 0 0; font-size: .95rem; line-height: 1.55; }
.record-sec b { display: block; font-size: .85rem; color: #4a5568; margin-bottom: 2px; }
.record-sec ul { margin: 0; padding-left: 1.2em; }
.record-sec .muted { color: #4a5568; }
.record-sec.warn b { color: #b7791f; }

/* 📌 기록 한 줄 눌러 보내기 (12-03) — 줄 전체가 누르는 자리, 보낸 줄은 ✓ 표시 */
.pick-line { display: block; width: 100%; text-align: left; min-height: 40px; padding: 6px 8px; margin: 2px 0; border: 1px dashed var(--line-2);
  border-radius: 8px; background: none; color: var(--text); font: inherit; line-height: 1.45; }
.pick-line:active { background: var(--soft); }
.pick-line.sent, .pr-chip.sent { border-style: solid; background: var(--soft); }
.sent-mark { color: var(--muted); font-weight: 600; white-space: nowrap; }
.record-sec ul:has(.pick-line) { list-style: none; padding-left: 0; }
.pick-seg button { font-size: calc(13px * var(--fs)); }
.applog { max-height: 40vh; overflow: auto; white-space: pre-wrap; word-break: break-all; font-size: .78rem; line-height: 1.45;
  background: var(--soft); border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
