/* ═══════════════════════════════════════════════════════════
   삶의 예배 — 디자인 시스템
   컨셉: 아침 햇살이 스민 묵상집. 따뜻한 종이 질감, 골드 브라운 포인트,
   Pretendard의 굵기·여백으로 위계를 만들고, 부드러운 모션으로 온기를 전한다.
   ═══════════════════════════════════════════════════════════ */
:root {
  --bg: #faf7f1;            /* 따뜻한 종이 */
  --panel: #ffffff;
  --ink: #35302a;
  --ink-soft: #6b6257; /* 4.3:1 → 5.2:1 (WCAG AA, 고령 성도 가독성) */
  --accent: #a98253;        /* 골드 브라운 */
  --accent-deep: #7c5c33;
  --accent-soft: #f4ead9;
  --line: #eae2d3;
  --danger: #b3423a;
  --ok: #4a7c53;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(124, 92, 51, 0.08);
  --sans: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", system-ui, sans-serif;
  --serif: var(--sans);     /* 기존 선택자 호환: 제목도 Pretendard로 통일 */
  font-size: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(1200px 500px at 80% -10%, #f6eddc 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── 모션 ─────────────────────────────────── */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.rise { animation: riseIn 0.55s cubic-bezier(0.22, 0.8, 0.36, 1) both; }
.rise.d1 { animation-delay: 0.08s; }
.rise.d2 { animation-delay: 0.16s; }
.rise.d3 { animation-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── 상단 바 ──────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 24px 14px;
  background: rgba(250, 247, 241, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.brand:active .brand-mark { transform: scale(0.95); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 0; flex-shrink: 0;
  display: block; object-fit: contain;
}
.brand h1 { font-family: var(--sans); font-size: 1.25rem; font-weight: 650; letter-spacing: -0.035em; white-space: nowrap; }
.tagline { color: var(--ink-soft); font-size: 0.8125rem; margin-top: 2px; letter-spacing: 0; }

.top-nav { display: flex; gap: 4px; margin-left: auto; }
.nav-item {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 0.88rem; font-weight: 500;
  color: var(--ink-soft); padding: 9px 16px; border-radius: 999px;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}
.nav-item:hover { background: var(--accent-soft); color: var(--accent-deep); }
.nav-item.active { background: var(--accent-deep); color: #fff; font-weight: 700; }
.nav-icon { font-size: 0.95rem; }

.admin-btn {
  background: none; color: #c9c0b2; border: none; cursor: pointer;
  padding: 6px 8px; font-size: 1rem; border-radius: 10px;
  transition: color 0.2s ease;
}
.admin-btn:hover { color: var(--accent-deep); }
body.admin .admin-btn { color: var(--accent); }

/* 관리자 전용 요소 */
.admin-only { display: none !important; }
body.admin .top-nav .admin-only,
body.admin .bottom-nav .admin-only { display: flex !important; }
body.admin .admin-only { display: block !important; }
body.admin .top-nav .nav-item.admin-only { display: flex !important; }

/* ── 레이아웃 / 뷰 전환 ────────────────────── */
.container {
  flex: 1; width: 100%; max-width: 760px;
  margin: 0 auto; padding: 28px 20px 40px;
}
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.35s ease both; }

.section-title {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
  color: var(--ink); margin: 26px 0 6px;
}
.section-sub { color: var(--ink-soft); font-size: 0.86rem; margin-bottom: 16px; line-height: 1.6; }

.home-greeting {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 600;
  line-height: 1.5; margin-bottom: 18px; color: var(--ink);
  white-space: pre-line;
}

/* ── 오늘의 말씀 카드 ─────────────────────── */
.daily-card {
  background: linear-gradient(150deg, #fffdf8, #f7efe0);
  border: 1px solid #e9dcc4;
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.daily-loading { color: var(--ink-soft); font-size: 0.88rem; }
.daily-state { min-height: 148px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.daily-state-title { font-size: 1.12rem; font-weight: 650; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.daily-state-copy { max-width: 34em; margin-top: 8px; color: var(--ink-soft); font-size: 0.94rem; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.daily-state-dots { display: flex; gap: 5px; margin: 4px 0 14px; color: var(--accent-deep); }
.daily-state-dots span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: dailyBreathe 1.8s ease-in-out infinite; }
.daily-state-dots span:nth-child(2) { animation-delay: 0.2s; }
.daily-state-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dailyBreathe { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.daily-state-retry { margin-top: 14px; min-height: 44px; padding: 9px 15px; border: 1px solid #d8c8ad; border-radius: 12px; background: transparent; color: var(--accent-deep); font: 600 0.88rem var(--sans); cursor: pointer; }
.daily-state-retry:hover { background: var(--accent-soft); }
.daily-state-retry:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }
.daily-state-retry:disabled { opacity: 0.6; cursor: wait; }
.daily-greeting { font-size: 0.8125rem; color: var(--accent-deep); letter-spacing: 0.03em; margin-bottom: 8px; }
.daily-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.daily-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.daily-scripture {
  font-size: 0.8125rem; color: var(--accent-deep); background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px;
}
.daily-summary { font-size: 0.93rem; line-height: 1.75; margin-top: 10px; color: #4d463c; }
.daily-more { margin-top: 12px; }
.daily-more summary {
  cursor: pointer; font-size: 0.82rem; color: var(--accent-deep); font-weight: 600;
  user-select: none; transition: opacity 0.2s;
}
.daily-more summary:hover { opacity: 0.75; }
.daily-more[open] summary { margin-bottom: 4px; }
.daily-label { font-size: 0.8125rem; font-weight: 700; color: var(--accent-deep); margin: 12px 0 4px; letter-spacing: 0.05em; }
.daily-meditation { padding-left: 18px; font-size: 0.88rem; line-height: 1.8; color: #4d463c; }
.daily-prayer { font-size: 0.88rem; line-height: 1.8; color: #4d463c; }
.daily-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.daily-watch {
  font-size: 0.86rem; font-weight: 600; color: #fff; background: var(--accent-deep);
  padding: 11px 16px; border-radius: 12px; text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center;
  transition: background 0.2s ease, transform 0.15s ease;
}
.daily-watch:hover { background: #654a28; }
.daily-watch:active { transform: scale(0.97); }
.daily-regen { background: none; color: var(--ink-soft); border: 1px solid #a3937b; font-size: 0.8125rem; padding: 7px 11px; min-height: 44px; border-radius: 10px; cursor: pointer; }

/* ── 원탭 추천 ────────────────────────────── */
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-btn {
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; font-family: var(--sans); font-size: 0.88rem; font-weight: 600;
  padding: 16px 14px; cursor: pointer; text-align: left; line-height: 1.4;
  box-shadow: 0 2px 10px rgba(124, 92, 51, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.quick-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d9c8a8; }
.quick-btn:active { transform: scale(0.98); }
.quick-btn .qb-desc { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--ink-soft); margin-top: 4px; }

.ghost-cta {
  display: block; width: 100%; margin-top: 14px;
  background: none; border: 1px dashed #d9c8a8; color: var(--accent-deep);
  border-radius: 14px; padding: 14px; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s ease;
}
.ghost-cta:hover { background: var(--accent-soft); }

/* ── 로그인 / 회원가입 ─────────────────────── */
.auth-card {
  max-width: 420px; margin: 4vh auto 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow);
}
.auth-brand { text-align: center; margin-bottom: 22px; }
.brand-mark.big { width: 56px; height: 56px; font-size: 26px; border-radius: 0; margin: 0 auto 12px; }
.auth-brand h2 { font-family: var(--serif); font-size: 1.4rem; }
.auth-brand p { color: var(--ink-soft); font-size: 0.8125rem; margin-top: 6px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; background: #f3eee3; border-radius: 12px; padding: 4px; }
.auth-tab {
  flex: 1; background: none; border: none; padding: 10px; border-radius: 9px;
  font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); cursor: pointer;
  font-family: var(--sans); transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  min-height: 44px;
}
.auth-tab.active { background: #fff; color: var(--accent-deep); box-shadow: 0 1px 6px rgba(124,92,51,0.12); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); display: flex; flex-direction: column; gap: 6px; }
.auth-form input {
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 16px; background: #fdfcf8; font-family: var(--sans);
}
.auth-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(169,130,83,0.15); }
#auth-code { text-transform: uppercase; letter-spacing: 0.15em; font-weight: 700; }
.auth-help { font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.7; text-align: center; margin-top: 16px; }
.auth-card .ghost-cta { margin-top: 12px; }

/* 알림 버튼·패널 */
.icon-btn {
  position: relative; margin-left: auto; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  flex-shrink: 0; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.icon-btn:hover { color: var(--accent-deep); box-shadow: 0 3px 12px rgba(124, 92, 51, 0.15); }
.icon-btn:active { transform: scale(0.92); }
.notif-dot {
  position: absolute; top: 7px; right: 8px; width: 8px; height: 8px;
  border-radius: 50%; background: #d96c47; border: 1.5px solid #fff;
}
.notif-panel {
  position: absolute; top: 62px; right: 16px; z-index: 50;
  width: min(340px, calc(100vw - 32px));
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 12px 40px rgba(60, 45, 25, 0.18); overflow: hidden;
  animation: riseIn 0.25s ease both;
}
.notif-empty { padding: 26px 20px; text-align: center; color: var(--ink-soft); font-size: 0.85rem; white-space: pre-line; line-height: 1.7; }
.notif-item {
  display: flex; gap: 12px; align-items: flex-start; width: 100%;
  background: none; border: none; text-align: left; cursor: pointer;
  padding: 14px 16px; font-family: var(--sans); transition: background 0.15s ease;
}
.notif-item:hover { background: var(--accent-soft); }
.notif-item + .notif-item { border-top: 1px solid #f4eee2; }
.notif-icon { font-size: 1.2rem; }
.notif-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.notif-title { font-size: 0.87rem; font-weight: 700; color: var(--ink); }
.notif-time { font-size: 0.8125rem; color: #9a8f7e; white-space: nowrap; flex-shrink: 0; }
.notif-desc { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 2px; }

.avatar-btn {
  margin-left: 10px; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid #e5d5b8; background: var(--accent-soft); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 0.95rem; font-weight: 700; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.avatar-btn.logged {
  background: var(--accent-deep);
  color: #fff8ec; border: none;
}
.avatar-btn:hover { box-shadow: 0 3px 12px rgba(124, 92, 51, 0.25); }
.avatar-btn:active { transform: scale(0.92); }

/* 모바일: 내 정보는 하단 내비로 — 상단 아바타 숨김 */
@media (max-width: 720px) {
  .desktop-only { display: none !important; }
}

/* 테넌트 어드민 전용 */
.tadmin-only { display: none !important; }
body.tadmin .top-nav .nav-item.tadmin-only { display: flex !important; }
body.tadmin .bottom-nav .nav-item.tadmin-only { display: flex !important; }

.member-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 24px; }
.member-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; flex-wrap: wrap;
}
.mr-name { font-size: 0.88rem; font-weight: 600; }
.mr-meta { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 2px; }
.mr-actions { display: flex; gap: 6px; }
.mr-btn {
  background: none; border: 1px solid var(--line); color: var(--accent-deep);
  border-radius: 9px; padding: 7px 11px; font-size: 0.8125rem; font-weight: 600;
  cursor: pointer; font-family: var(--sans); transition: background 0.2s ease;
}
.mr-btn:hover { background: var(--accent-soft); }

/* ── 마이페이지 (토스식 그룹 리스트) ────────── */
.mp-profile {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(150deg, #fffdf8, #f7efe0);
  border: 1px solid #e9dcc4; border-radius: var(--radius);
  padding: 20px; margin-bottom: 8px; box-shadow: var(--shadow);
}
.mp-avatar {
  width: 52px; height: 52px; border-radius: 18px; flex-shrink: 0;
  background: var(--accent-deep);
  color: #fff8ec; font-family: var(--serif); font-size: 1.3rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.mp-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; }
.mp-meta { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 3px; }

.mp-section { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); margin: 22px 4px 8px; letter-spacing: 0.02em; }
.mp-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 6px 0; overflow: hidden; box-shadow: 0 2px 10px rgba(124,92,51,0.04);
}
.mp-card > .mp-hint { padding: 14px 18px; }
.mp-hint { font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.6; }
.mp-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; padding: 14px 18px; font-size: 0.9rem; font-family: var(--sans);
  background: none; border: none; text-align: left; color: var(--ink);
}
.mp-row + .mp-row, .mp-row + .mp-history, .mp-history + .mp-history { border-top: 1px solid #f4eee2; }
.mp-action { cursor: pointer; transition: background 0.15s ease; }
.mp-action:hover { background: var(--accent-soft); }
.mp-action.danger { color: var(--danger); }
.mp-tag {
  font-size: 0.8125rem; font-weight: 700; color: var(--accent-deep);
  background: var(--accent-soft); border-radius: 6px; padding: 2px 8px;
}
.mp-history { padding: 12px 18px; }
.mp-history summary { cursor: pointer; font-size: 0.85rem; user-select: none; }
.mp-history-a { font-size: 0.82rem; color: #4d463c; line-height: 1.7; margin-top: 10px; white-space: pre-wrap; }

.qr-card { padding: 18px; text-align: center; }
.qr-box { display: flex; justify-content: center; margin: 14px 0 8px; min-height: 40px; }
.qr-box img, .qr-box canvas { border-radius: 12px; border: 8px solid #fff; box-shadow: var(--shadow); }
.qr-expired { color: var(--ink-soft); font-size: 0.85rem; padding: 20px; }
.qr-meta { font-size: 0.82rem; font-weight: 700; color: var(--accent-deep); min-height: 1.4em; margin-bottom: 10px; }
.mp-btn-primary {
  background: var(--accent-deep); color: #fff; border: none; border-radius: 12px;
  padding: 13px 22px; font-size: 0.9rem; font-weight: 700; cursor: pointer;
  font-family: var(--sans); transition: background 0.2s ease, transform 0.15s ease;
}
.mp-btn-primary:hover { background: #654a28; }
.mp-btn-primary:active { transform: scale(0.97); }

/* ── 월간 리포트 / 기도 노트 / 스크랩 ────────── */
.report-card { padding: 16px 18px; }
.report-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.report-cell { text-align: center; padding: 10px 4px; background: var(--accent-soft); border-radius: 12px; }
.report-cell .st-num { font-size: 1.35rem; }
.report-msg { margin: 12px 2px 10px; }
.report-card .daily-share { width: 100%; }
@media (max-width: 480px) { .report-grid { grid-template-columns: repeat(2, 1fr); } }

.msg-btns { display: flex; gap: 6px; align-items: center; }
/* U2 후속 버튼 */
.follow-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 4px; }
.follow-label { font-size: 13px; color: var(--muted); margin-right: 2px; }
.follow-btn { border: 1px solid var(--accent); background: var(--accent-soft, #fff7ea); color: var(--accent); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.follow-btn:hover { background: var(--accent-deep); color: #fff; }
.mp-inline-actions { display: flex; gap: 6px; margin-top: 8px; }
.mp-inline-actions .tts-btn { margin-top: 0; text-decoration: none; }

.prayer-card { padding-bottom: 6px; }
.prayer-form { display: flex; gap: 8px; padding: 14px 16px 8px; }
.prayer-form input {
  flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; font-size: 16px; font-family: var(--sans); background: #fdfcf8;
}
.prayer-form input:focus { outline: none; border-color: var(--accent); }
.prayer-form .mp-btn-primary { padding: 12px 18px; }
.prayer-row .pr-text { font-size: 0.9rem; line-height: 1.5; }
.prayer-row.answered .pr-text { color: var(--ink-soft); }
.prayer-row.answered { background: #f7f9f4; }

/* ── QR 스캐너 오버레이 ─────────────────────── */
.scan-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(30, 25, 18, 0.85); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.scan-box {
  background: var(--panel); border-radius: 20px; padding: 20px;
  max-width: 420px; width: 100%; text-align: center;
}
.scan-title { font-family: var(--serif); font-weight: 700; margin-bottom: 12px; }
.scan-box video { width: 100%; border-radius: 14px; background: #000; aspect-ratio: 1; object-fit: cover; }
.scan-result { font-size: 0.88rem; margin: 12px 0; min-height: 1.4em; color: var(--ink-soft); }
.scan-result.ok { color: var(--ok); font-weight: 700; }
.scan-result.err { color: var(--danger); font-weight: 700; }

/* ── 테넌트 어드민: 대시보드/명부/출석 ─────── */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat-tile {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; text-align: center; box-shadow: 0 2px 10px rgba(124,92,51,0.04);
}
.st-num { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--accent-deep); }
.st-label { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 4px; }

.roster-edit {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px; background: var(--accent-soft); border-radius: 12px; padding: 14px;
  margin: -4px 0 8px;
}
.re-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); }
.re-field input, .re-field select {
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 0.85rem; font-family: var(--sans); background: #fff;
}
.re-save { align-self: end; background: var(--accent-deep) !important; color: #fff !important; border: none !important; }

.att-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.att-controls input, .att-controls select {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 0.88rem; font-family: var(--sans); background: var(--panel);
}
.att-row {
  display: flex; gap: 10px; align-items: center; width: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; font-size: 0.9rem; font-family: var(--sans); cursor: pointer;
  text-align: left; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.att-row:hover { border-color: var(--accent); }
.att-row.on { background: #eef5ea; border-color: #b9d4b0; font-weight: 600; }
.att-row.on .sv-check { color: var(--ok); }

.church-detail {
  background: var(--panel); border: 1px solid #d9c8a8; border-radius: var(--radius);
  padding: 18px; margin-bottom: 24px; box-shadow: var(--shadow);
}
.cd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.cd-title { font-family: var(--serif); font-size: 1.05rem; margin-right: auto; }
.church-detail .member-row { background: #fdfcf8; }

.announce-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.announce-form input[type="text"], .announce-form textarea {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 16px; font-family: var(--sans); background: var(--panel); resize: vertical;
}
.announce-form input:focus, .announce-form textarea:focus { outline: none; border-color: var(--accent); }
.announce-push { font-size: 0.82rem; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.announce-form .mp-btn-primary { align-self: flex-start; }
.review-row .mr-info { max-width: 75%; }
.review-summary { font-size: 0.8125rem; color: #4d463c; margin-top: 5px; line-height: 1.6; }
.svc-checks { align-items: center; }
.svc-check { display: flex; align-items: center; gap: 4px; font-size: 0.8125rem; color: var(--ink-soft); }
.founded-input {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 0.84rem; font-family: var(--sans); background: var(--panel);
}

/* ── 스트릭 / 공유 / 낭독 ──────────────────── */
.home-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.streak-badge {
  flex-shrink: 0; font-size: 0.8125rem; font-weight: 700; color: var(--accent-deep);
  background: var(--accent-soft); border: 1px solid #e5d5b8;
  border-radius: 999px; padding: 7px 13px; margin-top: 4px;
  max-width: 50%; text-align: center; line-height: 1.4;   /* 좁은 폰에서 인사말을 짓누르지 않게 줄바꿈 허용 */
}
.daily-share {
  background: none; border: 1px solid var(--line); color: var(--accent-deep);
  border-radius: 12px; padding: 12px 18px; font-size: 0.82rem; font-weight: 600;
  min-height: 44px; cursor: pointer; font-family: var(--sans); transition: background 0.2s ease;
}
.daily-share:hover { background: var(--accent-soft); }
.tts-btn {
  background: none; border: 1px solid var(--line); color: var(--ink-soft);
  border-radius: 999px; padding: 10px 16px; font-size: 0.8125rem; cursor: pointer;
  min-height: 40px; font-family: var(--sans); margin-top: 8px; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.tts-btn:hover { color: var(--accent-deep); border-color: var(--accent); }

/* ── 미니 예배 코스 ────────────────────────── */
.course-entry {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: linear-gradient(140deg, #8a6a41, #6b4e2c);
  border-radius: var(--radius); padding: 20px 22px; margin-top: 18px;
  box-shadow: 0 8px 28px rgba(107, 78, 44, 0.25);
  flex-wrap: wrap;
}
.ce-text h2 { font-family: var(--serif); font-size: 1.1rem; color: #fff8ec; }
.ce-text p { font-size: 0.8125rem; color: #e5d2b5; margin-top: 3px; }
.ce-buttons { display: flex; gap: 8px; }
.ce-btn {
  background: rgba(255, 248, 236, 0.14); color: #fff8ec;
  border: 1px solid rgba(255, 248, 236, 0.35);
  border-radius: 999px; padding: 10px 18px; font-size: 0.88rem; font-weight: 700;
  cursor: pointer; font-family: var(--sans); transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.ce-btn:hover { background: rgba(255, 248, 236, 0.28); }
.ce-btn:active { transform: scale(0.95); }

.course-exit {
  background: none; border: none; color: var(--ink-soft); font-size: 0.86rem;
  cursor: pointer; font-family: var(--sans); padding: 6px 0; margin-bottom: 10px;
}
.course-exit:hover { color: var(--accent-deep); }
/* 미니 예배 코스 — #view-course 스코프. 뒤쪽 '교육 과정' 규칙(.course-progress/.course-card)과 이름이 같아
   여백이 0으로 덮이며 단계 표시가 카드와 겹치던 버그(2026-09-07 외부 후기) */
#view-course .course-progress { display: flex; gap: 8px; margin: 0 0 16px; font-size: inherit; color: inherit; }
#view-course .cp-step {
  flex: 1; text-align: center; font-size: 0.8125rem; font-weight: 600; font-family: inherit;
  padding: 10px 0; min-height: 40px; border-radius: 999px; color: var(--ink-soft);
  background: #f0e9da; border: 1px solid transparent; transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease, transform 0.3s ease; cursor: pointer;
}
#view-course .cp-step.now { background: var(--accent-deep); color: #fff; }
#view-course .cp-step.done { background: #dccdae; color: #7c5c33; }
#view-course .cp-step.done:hover { border-color: var(--accent); }
#view-course .cp-step:disabled { cursor: default; opacity: 0.55; }
#view-course .course-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 0; box-shadow: var(--shadow);
}
#view-course .course-card:hover { border-color: var(--line); }
.cc-nav { display: flex; gap: 10px; align-items: stretch; }
.cc-prev {
  flex: 0 0 auto; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-soft); font: inherit; font-weight: 600; cursor: pointer; min-height: 44px;
}
.cc-prev:hover { border-color: var(--accent); color: var(--accent-deep); }
.cc-nav .cc-next { flex: 1; }
.cc-label { font-size: 0.8125rem; font-weight: 700; color: var(--accent-deep); letter-spacing: 0.05em; margin-bottom: 8px; }
.cc-title { font-family: var(--serif); font-size: 1.15rem; margin-bottom: 10px; }
.cc-video {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden; margin: 12px 0; background: #000;
}
.cc-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cc-nav { margin-top: 18px; }
.cc-next {
  width: 100%; background: var(--accent-deep); color: #fff; border: none;
  border-radius: 12px; padding: 15px; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; font-family: var(--sans); transition: background 0.2s ease, transform 0.15s ease;
}
.cc-next:hover { background: #654a28; }
.cc-next:active { transform: scale(0.98); }

/* ── 모드 칩 / 질문 폼 ─────────────────────── */
.mode-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  background: #f3eee3; color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 16px; font-size: 0.85rem; font-weight: 500;
  cursor: pointer; font-family: var(--sans); min-height: 40px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.chip:hover { background: var(--accent-soft); }
.chip.active { background: var(--accent-deep); color: #fff; border-color: var(--accent-deep); font-weight: 700; }

.ask-form { display: flex; gap: 10px; align-items: stretch; }
.ask-form textarea {
  flex: 1; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px;
  font-size: 16px; font-family: var(--sans); resize: vertical; background: var(--panel);
  color: var(--ink); line-height: 1.6;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ask-form textarea:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; border-color: var(--accent-deep); }
.ask-form button { align-self: flex-end; }

button[type="submit"], #ask-btn, #ingest-btn {
  border: none; border-radius: 12px; padding: 12px 20px;
  background: var(--accent-deep); color: #fff; font-size: 0.9rem; font-family: var(--sans);
  cursor: pointer; font-weight: 700; min-height: 46px;
  transition: background 0.2s ease, transform 0.15s ease;
  touch-action: manipulation;
}
button[type="submit"]:hover { background: #654a28; }
button[type="submit"]:active { transform: scale(0.97); }
button:disabled { opacity: 0.55; cursor: wait; }

/* ── 대화 ─────────────────────────────────── */
.conversation { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.empty-state {
  color: var(--ink-soft); font-size: 0.9rem; line-height: 1.9; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 34px 20px;
  background: rgba(255, 255, 255, 0.5);
}
.msg { border-radius: 16px; padding: 16px 18px; line-height: 1.75; font-size: 0.92rem; overflow-wrap: break-word; animation: riseIn 0.4s ease both; }
.msg-user { background: var(--accent-soft); align-self: flex-end; max-width: 85%; white-space: pre-wrap; }
.msg-ai { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 2px 12px rgba(124, 92, 51, 0.05); }
.msg-ai .mode-tag {
  display: inline-block; font-size: 0.8125rem; color: var(--accent-deep);
  background: var(--accent-soft); border-radius: 6px; padding: 2px 9px; margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.msg-ai .empathy {
  font-size: 0.82rem; color: var(--accent-deep); font-style: italic;
  border-left: 2px solid #ddc9a6; padding-left: 10px; margin-bottom: 10px;
}
.msg-ai .answer { white-space: pre-wrap; color: #443e35; }
.msg-ai .warn { color: #9a6b1f; font-size: 0.8125rem; margin-top: 10px; }

.sources { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.sources-label { font-size: 0.8125rem; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.05em; }
.source-card {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px;
  text-decoration: none; color: inherit; background: #fdfcf8;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.source-card:hover { border-color: var(--accent); transform: translateX(2px); }
.source-num {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px;
  background: var(--accent-deep); color: #fff; font-size: 0.8125rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.source-card .sc-body { min-width: 0; }
.source-card .sc-title { font-size: 0.82rem; font-weight: 600; }
.source-card .sc-snippet {
  font-size: 0.8125rem; color: var(--ink-soft); margin-top: 3px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.source-card .sc-time { font-size: 0.8125rem; color: var(--accent-deep); margin-top: 5px; font-weight: 600; }

.loading-dots::after { content: "…"; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

/* ── 시리즈 ───────────────────────────────── */
.series-list { display: flex; flex-direction: column; gap: 10px; }
.series-box {
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
  padding: 14px 16px; box-shadow: 0 2px 10px rgba(124, 92, 51, 0.04);
}
.series-head { cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.series-name { font-family: var(--serif); font-size: 0.95rem; font-weight: 600; }
.series-progress { font-size: 0.8125rem; color: var(--accent-deep); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; }
.series-continue {
  width: 100%; margin-top: 12px; font-size: 0.84rem; text-align: left;
  background: var(--accent-soft); color: var(--accent-deep); border: none;
  border-radius: 10px; padding: 12px 14px; font-weight: 700; cursor: pointer;
  transition: background 0.2s ease;
}
.series-continue:hover { background: #ecdfc6; }
.series-videos { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
.series-video {
  display: flex; gap: 8px; align-items: baseline; text-decoration: none; color: inherit;
  font-size: 0.8125rem; padding: 7px 8px; border-radius: 8px; line-height: 1.4;
  transition: background 0.15s ease;
}
.series-video:hover { background: var(--accent-soft); }
.series-video.watched { color: var(--ink-soft); }
.sv-check { color: var(--ok); font-weight: 700; flex-shrink: 0; width: 14px; }
.sv-title { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }

/* ── 관리 ─────────────────────────────────── */
.ingest-form { display: flex; gap: 8px; }
.ingest-form input {
  flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; font-size: 16px; background: var(--panel); font-family: var(--sans);
}
.ingest-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(169, 130, 83, 0.15); }
.hint { font-size: 0.8125rem; color: var(--ink-soft); margin: 10px 2px; min-height: 1.2em; }
.hint.error { color: var(--danger); }
.hint.ok { color: var(--ok); }

.video-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.video-card {
  display: flex; gap: 10px; padding: 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
}
.video-card img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; background: #eee; flex-shrink: 0; }
.video-card .vc-body { flex: 1; min-width: 0; }
.video-card .vc-title {
  font-size: 0.84rem; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-card .vc-meta { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 4px; }
.video-card .vc-del {
  background: none; border: none; color: var(--ink-soft); padding: 4px 8px;
  font-size: 0.95rem; cursor: pointer; align-self: flex-start;
}
.video-card .vc-del:hover { color: var(--danger); }

/* ── 하단 내비 (모바일) / 푸터 ─────────────── */
.bottom-nav { display: none; }
.foot {
  text-align: center; color: var(--ink-soft); font-size: 0.8125rem; line-height: 1.6;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.foot-link { color: var(--ink-soft); text-decoration: underline; display: inline-block; padding: 12px 2px; }
.foot-link:hover { color: var(--accent-deep); }

/* ═══ 반응형 ═══════════════════════════════ */
@media (max-width: 720px) {
  .container { padding: 20px 16px 90px; }
  .topbar { padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; }
  .top-nav { display: none; }
  .tagline { display: none; }
  .brand h1 { font-size: 1.15rem; }
  .home-greeting { font-size: 1.2rem; }
  .daily-card { padding: 18px; }
  .daily-title { font-size: 1.15rem; }

  .quick-actions { grid-template-columns: 1fr; }

  .ask-form { flex-direction: column; }
  .ask-form button { align-self: stretch; width: 100%; }
  .msg-user { max-width: 95%; }

  .mode-chips {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px 4px;
  }
  .mode-chips::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; flex-shrink: 0; }

  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .bottom-nav .nav-item {
    flex-direction: column; gap: 3px; font-size: 0.8125rem; padding: 6px 14px;
    border-radius: 12px;
  }
  .bottom-nav .nav-icon { font-size: 1.25rem; }
  .bottom-nav .nav-item.active { background: none; color: var(--accent-deep); }

  .foot { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* 380px 이하에서 루트 글자를 14px 로 줄이던 규칙은 10/31 없앴다 — 작은 폰에서 탭 10px·약관 9.8px 까지 줄었다(가이드 v2 5.2). */

/* ═══ 갤럭시 등 소형 안드로이드 (≤365px) ═══ */
@media (max-width: 365px) {
  .container { padding: 16px 12px 90px; }
  .daily-card, .course-card { padding: 16px 14px; }
  .quick-btn { padding: 13px 12px; font-size: 0.84rem; }
  .bottom-nav .nav-item { padding: 6px 10px; }
  .report-grid { gap: 6px; }
  .mp-profile { padding: 16px; }
}

/* ═══ 어드민 진입(/admin, /console) — PC 해상도 대응 ═══
   성도 화면(/)은 모바일 퍼스트 그대로, 어드민은 넓은 작업 화면 제공 */
body.entry-admin .container,

/* FHD (≥1600px 뷰포트) */
@media (min-width: 1600px) {
  body.entry-admin .container,
  body.entry-admin #member-panel .member-list,
  body.entry-admin .member-list,
  body.entry-console .video-list,
}

/* QHD (≥2200px 뷰포트) */
@media (min-width: 2200px) {
  body.entry-admin .container,
  body.entry-admin #member-panel .member-list,
  body.entry-admin .member-list,
  body.entry-console .video-list,
}

/* UHD/4K (≥3200px 뷰포트) */
@media (min-width: 3200px) {
  body.entry-admin .container,
  body.entry-admin #member-panel .member-list,
  body.entry-admin .member-list,
  body.entry-console .video-list,
}

/* ── 공지 (성도) ───────────────────────────── */
.nav-badge {
  position: absolute; top: 4px; right: calc(50% - 20px);
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 0.8125rem; font-weight: 700; line-height: 16px; text-align: center;
}
.bottom-nav .nav-item { position: relative; }

.ann-list { display: flex; flex-direction: column; gap: 12px; }
.ann-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.ann-card:hover { transform: translateY(-1px); }
.ann-card.unread { border-left: 3px solid var(--accent); }
.ann-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ann-flag {
  font-size: 0.8125rem; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-deep);
}
.ann-flag.req { background: #fbeceb; color: var(--danger); }
.ann-flag.new { background: var(--accent-deep); color: #fff; }
.ann-date { font-size: 0.8125rem; color: var(--ink-soft); margin-left: auto; }
.ann-title { font-family: var(--serif); font-size: 1.02rem; font-weight: 700; line-height: 1.45; }
.ann-sum { font-size: 0.84rem; color: var(--ink-soft); line-height: 1.65; margin-top: 4px; }
.ann-thumbs { display: flex; gap: 6px; margin-top: 10px; }
.ann-thumbs img { width: 62px; height: 62px; object-fit: cover; border-radius: 9px; }
.ann-marks { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 8px; display: flex; gap: 10px; }
/* 교회 소식 목록(PO 10/31): 제목·날짜·표시만, 10개씩 페이지, 맨 아래 검색창 하나 */
#view-announce > .tg-seg { margin-top: 12px; }
.ann-card:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; }
.ann-search-note { margin: 0; font-size: 0.875rem; color: var(--ink-soft); }
.ann-search-note:empty { display: none; }
.ann-pages { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 8px 0 0; flex-wrap: wrap; }
.ann-page { min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-size: 0.95rem; cursor: pointer; }
.ann-page[aria-current="page"] { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; font-weight: 700; }
.ann-page:disabled { opacity: .4; cursor: default; }
.ann-page:focus-visible,.ann-search :focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; }
.ann-search { display: flex; gap: 8px; margin: 12px 0 4px; }
.ann-search input { flex: 1; min-width: 0; min-height: 48px; padding: 10px 14px; border: 1px solid #d8d1c8; border-radius: 12px; background: var(--panel); color: var(--ink); font: inherit; font-size: 1rem; box-sizing: border-box; }
.ann-search-btn { min-height: 48px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--accent-deep); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }

.ann-detail { animation: riseIn .3s ease both; }
.ann-back {
  background: none; border: none; font: inherit; font-size: 0.84rem;
  color: var(--ink-soft); cursor: pointer; padding: 4px 0 12px;
}
.ann-detail .ann-title { font-size: 1.24rem; margin-bottom: 6px; }
.ann-images { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.ann-images img { width: 100%; border-radius: 12px; display: block; }
.ann-files { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; }
.ann-file {
  display: flex; align-items: center; gap: 9px; padding: 10px 13px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel);
  font-size: 0.84rem; color: var(--ink); text-decoration: none;
}
.ann-file:hover { background: var(--accent-soft); }
.ann-react { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 18px; }
.ann-react button {
  font: inherit; font-size: 0.86rem; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); cursor: pointer;
  transition: background .12s, border-color .12s;
}
.ann-react button.on { background: var(--accent-soft); border-color: var(--accent); font-weight: 700; }

/* 링크 복사 등 짧은 안내 */
.toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%) translateY(12px);
  background: #35302a; color: #fffdf8; padding: 11px 20px; border-radius: 999px;
  font-size: 14px; opacity: 0; transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease, opacity .25s ease, transform .25s ease; z-index: 999;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 시리즈 목록: 찬양 모음 구분선 */
.series-divider {
  margin: 26px 4px 10px; font-size: 0.95rem; color: var(--ink-soft);
  font-family: var(--serif); font-weight: 700;
}


/* ── 나눔 탭: 채팅 레이아웃 ─────────────── */
/* 대화가 본문, 입력은 하단 고정 — 메신저 문법 */
.chat-view { padding-bottom: 150px; }             /* 고정 입력부에 가리지 않게 */
.composer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  background: rgba(255, 253, 248, 0.96); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  display: none;                                   /* 나눔 탭에서만 */
}
#view-chat.active ~ * .composer, #view-chat.active .composer { display: block; }
.composer .mode-chips {
  flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; margin: 0 0 8px; padding-bottom: 2px;
  /* 오른쪽 페이드 — 칩이 더 있음을 암시 */
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
          mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.composer .mode-chips::-webkit-scrollbar { display: none; }
.composer .chip { white-space: nowrap; flex-shrink: 0; min-height: 40px; }
.composer .ask-form { align-items: flex-end; }
.home-ask input::placeholder, .composer textarea::placeholder { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }   /* 힌트가 두 줄로 넘어가 잘리지 않게 */
.composer textarea {
  max-height: 120px; min-height: 46px; resize: none; border-radius: 22px;
  padding: 12px 16px;
}
.composer #ask-btn { min-width: 74px; border-radius: 22px; }
.conversation { margin-top: 4px; }
.msg-context {
  align-self: flex-end; font-size: 0.8125rem; color: var(--accent-deep);
  background: var(--accent-soft); border-radius: 999px; padding: 5px 12px;
  margin-bottom: -6px;
}

@media (max-width: 768px) {
  /* 모바일: 하단 탭바 위에 얹는다 */
  .composer { bottom: calc(70px + env(safe-area-inset-bottom)); padding-bottom: 12px; }
  .chat-view { padding-bottom: 230px; }
  /* 채팅 입력은 모바일에서도 한 줄 (입력창 + 버튼) — 폼 세로 전환 규칙보다 우선 */
  .composer .ask-form { flex-direction: row; }
  .composer .ask-form button { align-self: flex-end; width: auto; min-width: 74px; }
}

/* 로그인 유도 배너 (첫 방문 홈) */
.login-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 16px; font-size: 0.82rem; color: var(--ink-soft);
}
.login-banner span { flex: 1; line-height: 1.5; }
.lb-btn {
  border: none; background: var(--accent-deep); color: #fff; font-weight: 700;
  border-radius: 999px; padding: 10px 18px; min-height: 40px; font-size: 0.8125rem;
  cursor: pointer; font-family: var(--sans); flex-shrink: 0;
}
.lb-close {
  border: none; background: none; color: var(--ink-soft); font-size: 0.9rem;
  cursor: pointer; padding: 8px; min-width: 36px; min-height: 36px;
}

/* ── 시리즈 탭 v2: 이어듣기 히어로 · 진행바 · 인앱 재생 ── */
.series-hero {
  display: flex; gap: 14px; align-items: center; cursor: pointer;
  background: linear-gradient(145deg, #7c5c33, #5d4423); color: #fff;
  border-radius: var(--radius); padding: 14px; margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(90, 66, 33, 0.25);
}
.sh-thumb {
  width: 132px; aspect-ratio: 16/9; border-radius: 12px; flex-shrink: 0;
  background-size: cover; background-position: center; position: relative;
  display: grid; place-items: center;
}
.sh-play {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.55); color: #fff; font-size: 15px; padding-left: 3px;
}
.sh-meta { min-width: 0; }
.sh-kicker { font-size: 0.8125rem; color: #e8d5b5; font-weight: 700; }
.sh-series { font-weight: 800; font-size: 1.02rem; margin-top: 3px; }
.sh-title {
  font-size: 0.8125rem; color: #d9c8a8; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sd-sub { font-size: 0.8125rem; color: var(--ink-soft); font-weight: 400; margin-left: 8px; }
.sh-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.series-badge {
  font-size: 0.8125rem; background: var(--accent-soft); color: var(--accent-deep);
  border-radius: 999px; padding: 3px 9px; font-weight: 700; flex-shrink: 0;
}
.series-bar {
  height: 5px; border-radius: 99px; background: var(--accent-soft);
  margin-top: 10px; overflow: hidden; flex-basis: 100%;
}
.series-head { flex-wrap: wrap; }
.series-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.series-videos.flat { border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); overflow: hidden; margin-bottom: 26px; }
.series-video {
  display: flex; gap: 12px; align-items: center; padding: 10px 14px;
  cursor: pointer; border-bottom: 1px solid var(--line);
}
.series-video:last-child { border-bottom: none; }
.sv-thumb {
  width: 74px; aspect-ratio: 16/9; border-radius: 8px; flex-shrink: 0;
  background-size: cover; background-position: center; background-color: var(--accent-soft);
}
.sv-mid { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sv-sub { font-size: 0.8125rem; color: var(--accent-deep); }
.series-video.watched .sv-title { color: var(--ink-soft); }
.sv-yt {
  font-size: 0.8125rem; color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 12px; text-decoration: none; flex-shrink: 0;
  min-height: 44px; display: inline-flex; align-items: center;
}
.sv-yt:hover { color: var(--accent-deep); border-color: var(--accent); }
.series-more {
  width: 100%; border: none; background: none; padding: 13px; cursor: pointer;
  color: var(--accent-deep); font-weight: 700; font-size: 0.82rem; font-family: var(--sans);
}
.yt-embed { position: relative; margin: 10px 0 16px; }
.yt-embed iframe {
  width: 100%; aspect-ratio: 16/9; border: none; border-radius: 14px;
  background: #000; box-shadow: 0 12px 34px rgba(40, 30, 15, 0.3);
}
.yt-close {
  position: absolute; top: -12px; right: 8px; border: none; cursor: pointer;
  background: #35302a; color: #fffdf8; border-radius: 999px; padding: 6px 14px;
  font-size: 0.8125rem; font-family: var(--sans);
}

/* ── 문서 미리보기 시트 ───────────────── */
.dv-sheet {
  position: fixed; inset: 0; z-index: 200; background: #efe9dc;
  display: flex; flex-direction: column;
}
body.dv-open { overflow: hidden; }
.dv-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: #35302a; color: #fffdf8; flex-shrink: 0;
}
.dv-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
            white-space: nowrap; font-weight: 700; font-size: 0.9rem; }
.dv-btn {
  border: 1px solid rgba(255,255,255,.35); background: none; color: #fffdf8;
  border-radius: 999px; padding: 8px 14px; font-size: 0.8125rem; cursor: pointer;
  font-family: var(--sans, sans-serif); text-decoration: none; white-space: nowrap;
}
.dv-stage { flex: 1; overflow: auto; padding: 14px; -webkit-overflow-scrolling: touch; }
.dv-stage-editor { padding: 0; overflow: hidden; }
.dv-editor-holder, .dv-editor-holder iframe { width: 100%; height: 100%; border: none; }
.dv-hint { text-align: center; color: #6d6354; padding: 40px 20px 8px; }
.dv-hint-inline { font-size: 0.8125rem; color: #cfc4ae; }
.dv-err { font-size: 0.8125rem; color: #a05b4c; }
.dv-hwp svg { background: #fff; border-radius: 8px; box-shadow: 0 4px 18px rgba(0,0,0,.12);
              display: block; margin: 0 auto; max-width: 900px; }
.dv-nav { display: flex; align-items: center; justify-content: center; gap: 14px;
          padding: 8px; background: #46403a; flex-shrink: 0; }
.dv-nav .dv-btn:disabled { opacity: .35; cursor: default; }
.dv-page { color: #fffdf8; font-size: 0.82rem; min-width: 64px; text-align: center; }
.dv-docx { background: #d8d2c6; border-radius: 8px; padding: 10px 0; }
.dv-docx .docx-wrapper { background: none !important; padding: 0 !important; }
.dv-docx .docx-wrapper > section { margin: 0 auto 12px !important; box-shadow: 0 4px 18px rgba(0,0,0,.12); max-width: 100%; }
.dv-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.dv-tabs .dv-btn { border-color: #b7a889; color: #5d5445; }
.dv-tabs .dv-btn.on { background: #7c5c33; color: #fff; border-color: #7c5c33; }
.dv-sheet-table { overflow: auto; background: #fff; border-radius: 8px; padding: 6px; }
.dv-sheet-table table { border-collapse: collapse; font-size: 0.82rem; }
.dv-sheet-table td { border: 1px solid #e3dcc9; padding: 5px 9px; white-space: nowrap; }
.dv-edit { margin-top: 6px; font-size: 0.8125rem; padding: 5px 10px; }

/* 로그인 폼 — 교회 코드·아이디 기억 */
.auth-remember {
  display: flex !important; flex-direction: row !important;
  align-items: center; gap: 8px; cursor: pointer; min-height: 44px;
  font-size: 0.82rem; color: var(--ink-soft, #6d6354); font-weight: 400;
}
.auth-remember input[type="checkbox"] {
  width: 17px; height: 17px; accent-color: var(--accent, #7c5c33); margin: 0;
}
.auth-remember .ar-hint { font-size: 0.8125rem; color: var(--ink-soft); }

/* ═══ 함께 탭 ═══════════════════════════ */
.tg-seg { display: flex; gap: 6px; margin: 4px 0 16px; background: #efe9dc;
          padding: 4px; border-radius: 12px; }
.tg-tab {
  flex: 1; border: none; background: none; padding: 9px 4px; border-radius: 9px;
  font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; white-space: nowrap;
  min-height: 44px;
}
.tg-tab.active { background: #fffdf8; color: var(--ink); box-shadow: 0 1px 5px rgba(0,0,0,.08); }
.tg-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tg-chip {
  border: 1px solid var(--line); background: #fffdf8; border-radius: 999px;
  padding: 7px 14px; font: inherit; font-size: 0.8125rem; cursor: pointer; color: var(--ink-soft);
}
.tg-chip.on { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }

/* 안내팀 스캔 진입 */
.scan-cta {
  width: 100%; margin-bottom: 14px; padding: 13px; border-radius: 13px;
  border: 1.5px dashed var(--accent); background: var(--accent-soft);
  color: var(--accent-deep, #5d4423); font: inherit; font-weight: 700; cursor: pointer;
}

/* 셀 공간 */
.cell-head { background: #fffdf8; border: 1px solid var(--line); border-radius: 14px;
             padding: 14px 16px; margin-bottom: 12px; }
.cell-title { display: flex; align-items: baseline; gap: 8px; font-size: 1.02rem; }
.cell-count { color: var(--ink-soft); font-size: 0.8125rem; }
.cell-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.cell-member { font-size: 0.8125rem; background: #f3eee2; border-radius: 999px;
               padding: 4px 10px; color: var(--ink-soft); }
.cell-member.leader { background: #f5e9d2; color: #7c5c33; font-weight: 600; }
.cell-composer { background: #fffdf8; border: 1px solid var(--line); border-radius: 14px;
                 padding: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 9px; }
.cell-kind { display: flex; gap: 6px; }
.cell-input { font: inherit; font-size: 0.9rem; border: 1px solid var(--line);
              border-radius: 10px; padding: 10px 12px; resize: vertical; background: #fff; }
.cell-input:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; border-color: var(--accent-deep); }
.cell-send { align-self: flex-end; padding: 9px 22px; }
.cell-post { background: #fffdf8; border: 1px solid var(--line); border-radius: 14px;
             padding: 14px 16px; margin-bottom: 12px; }
.cell-post.notice { border-left: 4px solid var(--accent); }
.cell-post-head { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; }
.cell-post-kind { font-size: 0.8125rem; color: var(--accent-deep, #7c5c33); font-weight: 700; }
.cell-post-date { color: var(--ink-soft); font-size: 0.8125rem; margin-left: auto; }
.cell-del { border: none; background: none; color: #a05b4c; font-size: 0.8125rem;
            cursor: pointer; padding: 2px 4px; }
.cell-post-body { margin: 8px 0 0; font-size: 0.92rem; white-space: pre-wrap; line-height: 1.65; }
.cell-comments { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 9px;
                 display: flex; flex-direction: column; gap: 6px; }
.cell-comment { display: flex; gap: 7px; font-size: 0.84rem; align-items: baseline; }
.cell-comment b { font-size: 0.8125rem; color: var(--ink-soft); flex-shrink: 0; }
.cell-comment span { flex: 1; }
.cell-comment-input { display: flex; gap: 7px; margin-top: 3px; }
.cell-comment-input input {
  flex: 1; font: inherit; font-size: 0.84rem; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; background: #fff;
}
.cell-comment-send { border: none; background: var(--accent-soft); color: var(--accent-deep, #7c5c33);
                     border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 0.8125rem;
                     font-weight: 600; cursor: pointer; white-space: nowrap; }

/* 내 교육 */
.course-card { background: #fffdf8; border: 1px solid var(--line); border-radius: 14px;
               padding: 14px 16px; margin-bottom: 12px; cursor: pointer; }
.course-card:hover { border-color: var(--accent); }
.course-card.done { opacity: 0.75; }
.course-head { display: flex; align-items: center; gap: 8px; }
.course-role { font-size: 0.8125rem; background: #f5e9d2; color: #7c5c33; border-radius: 999px;
               padding: 3px 9px; font-weight: 700; }
.course-with { margin: 6px 0 9px; color: var(--ink-soft); font-size: 0.82rem; }
.course-bar { height: 7px; background: #efe9dc; border-radius: 999px; overflow: hidden; }
.course-bar-fill { height: 100%; background: var(--accent); border-radius: 999px;
                   transition: width 0.4s; }
.course-progress { margin: 7px 0 0; font-size: 0.8125rem; color: var(--ink-soft); }
.course-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; }
.course-step {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line);
  background: #fff; font: inherit; font-size: 0.8125rem; cursor: pointer; color: var(--ink-soft);
}
.course-step.on { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; font-weight: 700; }
.course-step:disabled { cursor: default; }

/* 스캐너 시트 */
.scan-sheet { position: fixed; inset: 0; z-index: 210; background: #14110d;
              display: flex; flex-direction: column; align-items: center; padding: 14px; }
.scan-bar { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 480px;
            color: #fffdf8; padding: 4px 2px 12px; }
.scan-bar b { flex: 1; font-size: 1rem; }
.scan-service { font: inherit; font-size: 0.84rem; padding: 7px 10px; border-radius: 9px;
                border: 1px solid rgba(255,255,255,.3); background: #2a251f; color: #fffdf8; }
.scan-close { border: 1px solid rgba(255,255,255,.35); background: none; color: #fffdf8;
              border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 0.8125rem; cursor: pointer; }
.scan-video { width: 100%; max-width: 480px; border-radius: 16px; background: #000; aspect-ratio: 3/4; object-fit: cover; }
.scan-msg { color: #cfc4ae; font-size: 0.84rem; margin: 12px 0 6px; text-align: center; }
.scan-toasts { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 6px;
               overflow-y: auto; flex: 1; }
.scan-toast { border-radius: 11px; padding: 11px 14px; font-size: 0.9rem; font-weight: 600;
              animation: rise 0.25s ease; }
.scan-toast.ok { background: #23301f; color: #bfe3b0; }
.scan-toast.err { background: #33221d; color: #eab6a5; }

/* 수료증 받기 */
.cert-btn { margin-top: 12px; width: 100%; }

/* 셀모임 일정 + 참석 응답 */
.cell-meet-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cell-meet-row input { font: inherit; font-size: 0.86rem; border: 1px solid var(--line);
                       border-radius: 10px; padding: 9px 12px; background: #fff; flex: 1; min-width: 150px; }
.cell-meet-info { margin: 8px 0 0; font-size: 0.86rem; font-weight: 700; color: #7c5c33;
                  background: var(--accent-soft); border-radius: 9px; padding: 8px 12px; }
.cell-rsvp { display: flex; gap: 8px; margin-top: 10px; }
.rsvp-btn { flex: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
            padding: 9px; font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer;
            color: var(--ink-soft); }
.rsvp-btn.on { border-color: var(--accent); background: var(--accent-soft); color: #5d4423; }
.cell-rsvp-names { margin: 7px 0 0; font-size: 0.8125rem; color: var(--ink-soft); }

/* 셀 사진 + 셀모임 출석 */
.cell-photo-row { display: flex; align-items: center; gap: 8px; }
.cell-photo-btn { border: 1px solid var(--line); background: #fffdf8; border-radius: 999px;
                  padding: 8px 14px; font: inherit; font-size: 0.82rem; cursor: pointer; color: var(--ink-soft); }
.cell-photo-count { font-size: 0.8125rem; color: var(--accent-deep, #7c5c33); }
.cell-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
               gap: 6px; margin-top: 10px; }
.cell-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px;
                   cursor: pointer; background: #efe9dc; }
.cell-att { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 9px; }
.cell-att-title { font-size: 0.8125rem; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.att-chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
            padding: 6px 12px; margin: 0 5px 5px 0; font: inherit; font-size: 0.82rem;
            cursor: pointer; color: var(--ink-soft); }
.att-chip.on { border-color: #8fae7e; background: #eef7ea; color: #4c7a3d; font-weight: 600; }
.cell-att-summary { margin: 9px 0 0; font-size: 0.8125rem; color: var(--ink-soft); }

/* 비밀번호 변경 인라인 폼 (prompt 대체) */
.mp-pwform { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 14px; }
.mp-input { font-size: 16px; padding: 10px 12px; border: 1px solid var(--line, #e3ddd0); border-radius: 10px; background: #fff; }
.mp-btn-ghost { background: transparent; border: 1px solid var(--line, #e3ddd0); border-radius: 10px; padding: 9px; color: var(--ink-soft, #7d7468); }

/* 스트리밍 답변 — 흘러나오는 동안 커서 */
.msg-ai .answer.streaming::after { content: "▍"; margin-left: 2px; color: var(--accent, #8a6d3b); animation: blink 1s steps(2) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* ── 홈 검색바(설교에서 찾기) ── */
.home-ask { position: relative; margin: 14px 0 6px; }
.home-ask input {
  width: 100%; font: inherit; font-size: 16px; padding: 14px 84px 14px 16px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); color: var(--ink);
}
.home-ask input:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; border-color: var(--accent-deep); }
.home-ask-btn {
  position: absolute; right: 6px; top: 5px; height: 44px; padding: 0 16px; border-radius: 10px; border: none;
  background: var(--accent-deep); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.home-ask-btn:hover { background: #654a28; }
.home-ask-hint { margin: 8px 4px 0; font-size: 0.8125rem; color: var(--ink-soft); }
/* ── 2단 답변 · 민감 주제 ── */
.answer-tiers { display: flex; flex-direction: column; gap: 10px; }
.tier { border-left: 3px solid var(--accent); padding-left: 12px; }
.tier.bg { border-left-color: #cfc3ad; }
.tier-label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent-deep); margin-bottom: 4px; }
.tier.bg .tier-label { color: var(--ink-soft); }
.sens-badge { display: inline-block; font-size: 0.8125rem; font-weight: 600; color: #6b5a3a; background: #f4ecdd; border: 1px solid #e6d9bf; border-radius: 999px; padding: 4px 10px; margin: 6px 0 8px; }
.sens-notice { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #f8f4ec; color: #5b5142; font-size: 0.9rem; line-height: 1.55; }

/* ── 오늘의 말씀 카드 안 예배 드리기(U1) · 설교 0편 안내(U7) ── */
.daily-worship { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.dw-label { flex-basis: 100%; font-size: 0.84rem; font-weight: 600; color: var(--accent-deep); }   /* 좁은 폰에서 30분만 다음 줄로 떨어지지 않게 — 이름표 한 줄, 버튼 세 개는 같은 폭 */
.dw-btn { flex: 1 1 0; min-width: 0; font: inherit; font-size: 0.84rem; font-weight: 700; padding: 8px 14px; min-height: 40px; border-radius: 999px; border: 1px solid var(--accent); background: var(--panel); color: var(--accent-deep); cursor: pointer; }
.dw-btn:hover { background: var(--accent-deep); color: #fff; }
.not-ready { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; }
.not-ready h3 { font-family: var(--serif); font-size: 1.05rem; margin-bottom: 6px; }
.not-ready p { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.6; }

/* ── 노트 탭 ── */
.note-new { width: 100%; font: inherit; font-size: 1rem; font-weight: 700; padding: 16px; border-radius: 16px; border: none; background: var(--accent-deep); color: #fff; cursor: pointer; box-shadow: var(--shadow); margin: 10px 0 12px; min-height: 52px; }
.note-new:hover { background: #654a28; }
.note-search input { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 10px; }
.note-kinds { margin-bottom: 10px; }
/* 목록 아래 한 줄(이 폰에만 저장 중일 때) */
.note-foot { font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.55; padding: 12px 6px 4px; text-align: center; }
.note-foot button { font: inherit; font-size: 0.8125rem; font-weight: 700; color: var(--accent-deep); background: none; border: none; padding: 8px 6px; min-height: 40px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
/* 저장 위치 — (구) 카드 스타일은 첫 저장 시트로 대체됨 */
.note-storage { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; font-size: 0.84rem; color: var(--ink-soft); background: var(--panel); border: 1px solid var(--line); }
.note-storage .ns-icon { font-size: 1.05rem; line-height: 1; }
.note-storage .ns-text { flex: 1; min-width: 0; }
.note-storage .ns-title { color: var(--ink); font-weight: 600; }
.note-storage .ns-desc { margin-top: 1px; line-height: 1.45; }
.note-storage .ns-link { font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--accent-deep); background: none; border: none; padding: 6px 4px; cursor: pointer; white-space: nowrap; }
.note-storage.offer { display: block; background: #fffaf0; border-color: #ecd9a8; padding: 14px; }
.note-storage.offer .ns-top { display: flex; gap: 10px; align-items: flex-start; }
.note-storage.offer .ns-title { font-size: 0.95rem; }
.note-storage.offer .ns-desc { font-size: 0.86rem; }
.note-storage .ns-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.note-storage .ns-btn { font: inherit; font-size: 0.88rem; font-weight: 700; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; min-height: 42px; }
.note-storage .ns-btn.primary { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.note-storage .ns-btn.primary:hover { background: #654a28; }
/* 바텀 시트(설정·확인) */
.sheet { position: fixed; inset: 0; z-index: 260; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(28, 22, 14, 0.42); }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px; background: var(--panel); border-radius: 22px 22px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0,0,0,0.18); animation: sheet-up 0.22s ease-out; max-height: 88dvh; overflow-y: auto; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: #d9d0bf; margin: 6px auto 12px; }
.sheet-title { font-family: var(--serif); font-size: 1.12rem; margin: 0 0 12px; color: var(--ink); }
.sheet-sec { padding: 10px 0; border-top: 1px solid var(--line); }
.sheet-sec:first-of-type { border-top: none; padding-top: 0; }
.sheet-sec-title { font-size: 0.8125rem; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.04em; margin-bottom: 6px; }
.sheet-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.sheet-row-text { flex: 1; min-width: 0; }
.sheet-row-title { font-weight: 700; color: var(--ink); font-size: 0.96rem; }
.sheet-row-desc { font-size: 0.82rem; color: var(--ink-soft); margin-top: 2px; }
.sheet-note { font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.55; margin: 6px 0 0; }
.sheet-body { font-size: 0.93rem; color: var(--ink); line-height: 1.6; margin: 0 0 8px; white-space: pre-line; }
.sheet-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; background: none; border: none; padding: 10px 2px; cursor: pointer; border-radius: 10px; color: var(--ink); }
.sheet-item:hover { background: var(--accent-soft); }
.sheet-item .si-icon { font-size: 1.1rem; width: 28px; text-align: center; }
.sheet-item .si-text { flex: 1; display: flex; flex-direction: column; gap: 1px; font-size: 0.95rem; font-weight: 600; }
.sheet-item .si-text small { font-size: 0.8125rem; color: var(--ink-soft); font-weight: 400; }
.sheet-item .si-chev { color: #b9ae9a; font-size: 1.2rem; }
.sheet-item.danger { color: #9b3b30; }
.sheet-link { display: block; font-size: 0.82rem; color: var(--accent-deep); margin: 8px 0 12px; text-decoration: underline; text-underline-offset: 3px; }
.sheet-close { width: 100%; font: inherit; font-size: 0.95rem; font-weight: 700; padding: 13px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.sheet-small { font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.55; margin: 0 0 4px; }
.sheet-btn { width: 100%; font: inherit; font-size: 0.98rem; font-weight: 700; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; min-height: 48px; }
.sheet-btn.primary { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.sheet-btn.danger { background: #b7443a; border-color: #b7443a; color: #fff; }
.sheet-btn.ghost { background: transparent; }
/* 가입 폼 선택 동의 */
.auth-form label.auth-consent { flex-direction: row; gap: 10px; font-size: 14px; color: var(--ink); }   /* .auth-form label(column) 보다 명시도 높게; 14px 이상 */
.sheet-body, .sheet-small, .sheet-title, .note-foot, .note-empty, .auth-consent .ac-text, .mp-hint, .mt-desc { word-break: keep-all; overflow-wrap: anywhere; }
.view-as-bar:not([hidden]) + .topbar { top: 46px; }
.view-as-bar button { min-height: 36px; }
/* 맨 주소 안내 화면 */
.welcome-gate { position: fixed; inset: 0; z-index: 250; background: var(--bg, #faf7f1); display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.welcome-gate .wg-card { width: 100%; max-width: 380px; text-align: center; }
.welcome-gate .wg-mark { width: 64px; height: 64px; border-radius: 16px; }
.welcome-gate h1 { font-family: var(--serif); font-size: 1.5rem; margin: 14px 0 4px; color: var(--ink); }
.welcome-gate .wg-sub { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 26px; word-break: keep-all; }
.welcome-gate label { display: block; font-size: 0.86rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; text-align: left; word-break: keep-all; }
.welcome-gate input { width: 100%; font: inherit; font-size: 16px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.welcome-gate button { width: 100%; font: inherit; font-size: 1rem; font-weight: 700; padding: 15px; margin-top: 10px; border-radius: 14px; border: none; background: var(--accent-deep); color: #fff; cursor: pointer; min-height: 50px; }
.welcome-gate .wg-error { font-size: 0.84rem; color: #9b3b30; min-height: 20px; margin-top: 8px; word-break: keep-all; }
.welcome-gate .wg-help { margin-top: 20px; text-align: left; font-size: 0.84rem; color: var(--ink-soft); }
.welcome-gate .wg-help summary { cursor: pointer; font-weight: 600; color: var(--accent-deep); padding: 8px 0; }
.welcome-gate .wg-help p { line-height: 1.6; word-break: keep-all; margin-top: 6px; }
/* 교회 전환 안내 — 내 교회와 다른 교회 주소를 열었을 때. 운영자 보기 띠(.view-as-bar)와 색·문구를 구분한다. */
.church-switch { position: fixed; inset: 0; z-index: 240; background: rgba(28,22,14,0.5); display: flex; align-items: center; justify-content: center; padding: 20px; }
.church-switch .cs-card { background: var(--panel); border-radius: 20px; padding: 24px 20px; max-width: 360px; width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.church-switch h3 { font-family: var(--serif); font-size: 1.12rem; margin: 0 0 8px; color: var(--ink); word-break: keep-all; }
.church-switch p { font-size: 0.92rem; color: var(--ink); line-height: 1.6; margin: 0 0 6px; word-break: keep-all; }
.church-switch .cs-note { font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.55; margin: 10px 0 0; }
.church-switch .cs-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.church-switch button { font: inherit; font-size: 0.98rem; font-weight: 700; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; min-height: 48px; }
.church-switch button.primary { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.church-switch .cs-link { font-size: 0.84rem; font-weight: 600; color: var(--accent-deep); background: none; border: none; text-decoration: underline; text-underline-offset: 3px; min-height: 40px; }
/* 주소로 교회가 정해진 경우의 확인 줄 */
.auth-church-fixed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--accent-soft); font-size: 0.92rem; font-weight: 700; color: var(--ink); }
.auth-church-fixed .acf-name { flex: 1; }
.auth-church-fixed .acf-other { font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--accent-deep); background: none; border: none; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 2px; min-height: 44px; }
.auth-agree { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin: 4px 0 2px; overflow: hidden; }
.auth-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.86rem; line-height: 1.5; padding: 12px 12px; cursor: pointer; }
.auth-consent + .auth-consent { border-top: 1px solid var(--line); }
.auth-consent input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; accent-color: var(--accent); }
.auth-consent input:disabled + .ac-text { opacity: 0.55; }
.auth-consent .ac-text { display: flex; flex-direction: column; gap: 3px; color: var(--ink); font-weight: 600; }
.auth-consent .ac-text a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.auth-consent em { font-style: normal; color: var(--ink-soft); font-weight: 400; }
.auth-consent em.req { color: var(--accent-deep); font-weight: 600; }
.auth-consent small { font-size: 0.86rem; color: var(--ink-soft); font-weight: 400; line-height: 1.5; }
.ks-check small.ks-note { display: block; margin-top: 2px; font-size: 0.86rem; color: var(--ink-soft); font-weight: 400; line-height: 1.5; }
/* 내 정보 > 노트 보관 */
.mp-toggle-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.mp-toggle-row .mt-text { flex: 1; min-width: 0; }
.mp-toggle-row .mt-title { font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.mp-toggle-row .mt-desc { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 2px; line-height: 1.5; }
.mp-row.danger { color: #9b3b30; }
/* 토글 스위치 */
.switch::after { content: ""; position: absolute; inset: -7px -2px; }  /* 보이는 크기는 그대로, 누르는 영역만 44px */
.switch { position: relative; width: 50px; height: 30px; border-radius: 15px; border: none; background: #d8d0c2; cursor: pointer; flex-shrink: 0; transition: background 0.18s; padding: 0; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: left 0.18s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] .knob { left: 23px; }
.switch:disabled { opacity: 0.5; cursor: default; }
.switch.busy { opacity: 0.7; }
/* 확인 다이얼로그는 가운데 카드 — 설정 시트 위에 겹쳐도 구분되고, 그립이 두 개 보이지 않게 */
#confirm-sheet .sheet-panel { top: 50%; bottom: auto; left: 16px; right: 16px; max-width: 360px; transform: translateY(-50%); border-radius: 20px; padding: 22px 20px 18px; animation: dialog-in 0.18s ease-out; }
#confirm-sheet .sheet-grip { display: none; }
#confirm-sheet .sheet-title { margin-bottom: 8px; }
@keyframes dialog-in { from { transform: translateY(-50%) scale(0.96); opacity: 0.5; } to { transform: translateY(-50%) scale(1); opacity: 1; } }
.note-list { display: flex; flex-direction: column; gap: 10px; }
.note-month { font-size: 0.8125rem; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.04em; margin: 8px 2px 0; }
.note-item { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; text-align: left; font: inherit; width: 100%; }
.note-item:hover { border-color: var(--accent); }
.note-item .ni-head { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--ink-soft); }
.note-item .ni-kind { background: #f0e9da; color: #6b5a3a; border-radius: 999px; padding: 2px 8px; font-weight: 600; }
.note-item .ni-kind.prayer { background: #e8f0e6; color: #3f5e3a; }
.note-item .ni-kind.scrap { background: #e9edf5; color: #3a4a6b; }
.note-item .ni-local { color: #7a6a4c; }   /* 4.5:1 이상 */
.note-item .ni-title { font-weight: 700; margin-top: 4px; color: var(--ink); }
.note-item .ni-body { margin-top: 3px; font-size: 0.9rem; color: #5b5142; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.note-empty { text-align: center; color: var(--ink-soft); padding: 28px 10px; font-size: 0.92rem; line-height: 1.6; }
.ghost-cta.danger { color: #9b3b30; border-color: #e7c8c3; }
/* 에디터 */
.note-edit { display: none; }
.note-edit.active { display: flex; flex-direction: column; gap: 10px; min-height: calc(100dvh - 140px); }
.ne-top { display: flex; align-items: center; justify-content: space-between; }
.ne-status { font-size: 0.8125rem; color: var(--ink-soft); }
.ne-title { font: inherit; font-family: var(--serif); font-size: 1.15rem; font-weight: 700; padding: 10px 12px; border: none; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); width: 100%; }
.ne-title:focus { outline: none; border-bottom-color: var(--accent); }
.ne-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.ne-meta input, .ne-meta select { font: inherit; font-size: 16px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); min-height: 40px; }
.ne-body { flex: 1; width: 100%; min-height: 40vh; font: inherit; font-size: 16px; line-height: 1.7; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); resize: vertical; }
.ne-body:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; border-color: var(--accent-deep); }
.ne-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding-bottom: calc(74px + env(safe-area-inset-bottom)); }   /* 하단 탭바에 가리지 않게 */
.ne-actions .mp-btn-primary { min-height: 46px; padding: 0 18px; white-space: nowrap; min-width: 72px; }
#ne-back { min-height: 44px; }

/* 말씀 탭 [묻기|시리즈] · 노트 종류 필터 — 교회 탭(.tg-tab) 핸들러와 섞이지 않도록 전용 클래스, 모양은 동일 */
.ws-seg { display: flex; gap: 6px; margin: 4px 0 16px; background: #efe9dc; border-radius: 12px; padding: 4px; }
.ws-tab, .nk-tab { flex: 1; font: inherit; font-size: 0.86rem; font-weight: 600; padding: 9px 6px; min-height: 44px; border: none; border-radius: 9px; background: transparent; color: var(--ink-soft); cursor: pointer; }
.ws-tab.active, .nk-tab.active { background: #fffdf8; color: var(--ink); box-shadow: 0 1px 5px rgba(0,0,0,.08); }
.ne-answered { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--ink); min-height: 40px; }
.ne-answered input { width: 20px; height: 20px; accent-color: var(--accent); }
.note-item .ni-kind.answered { background: #e8f0e6; color: #2f5a2a; }

/* 노트 — 검수 반영 */
.home-note-btn { width: 100%; font: inherit; font-size: 0.98rem; font-weight: 700; padding: 14px; border-radius: 16px; border: 1px solid var(--accent); background: var(--panel); color: var(--accent-deep); cursor: pointer; margin: 0 0 12px; min-height: 50px; box-shadow: var(--shadow); }
.home-note-btn:hover { background: var(--accent-deep); color: #fff; }
.ne-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ne-meta-toggle { font: inherit; font-size: 0.86rem; color: var(--ink-soft); background: none; border: none; cursor: pointer; padding: 6px 2px; min-height: 40px; text-align: left; }
.ne-dark { font: inherit; font-size: 0.8125rem; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft); cursor: pointer; min-height: 36px; }
.ne-status::before { content: "●"; margin-right: 5px; color: #b9ad97; }
.ne-status.saved::before { content: "✓"; color: #4f7d47; }
.ne-status.warn::before { content: "⚠"; color: #b5632a; }
.note-edit.dark { background: #15130f; color: #e9e2d3; margin: -8px -16px; padding: 8px 16px; border-radius: 0; }
.note-edit.dark .ne-title, .note-edit.dark .ne-body { background: #1f1b15; color: #f1ead9; border-color: #3a3328; }
.note-edit.dark .ne-body::placeholder, .note-edit.dark .ne-title::placeholder { color: #8a8070; }
.note-edit.dark .ne-meta input, .note-edit.dark .ne-meta select, .note-edit.dark .ne-dark, .note-edit.dark .course-exit { background: #1f1b15; color: #e9e2d3; border-color: #3a3328; }
.note-edit.dark .ne-status, .note-edit.dark .ne-meta-toggle, .note-edit.dark .ne-answered { color: #cfc6b3; }
.note-empty .ghost-cta { margin-top: 10px; }

/* 운영자 교회 전환 띠 */
.view-as-bar { position: sticky; top: 0; z-index: 300; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 12px; background: #2e2a24; color: #fbe9c8; font-size: 0.84rem; font-weight: 600; }
.view-as-bar button { font: inherit; font-size: 0.8125rem; font-weight: 700; color: #2e2a24; background: #fbe9c8; border: none; border-radius: 999px; padding: 5px 12px; cursor: pointer; min-height: 30px; }

/* 말씀 탭 v2 — 목적별 탭·예배 칩(2026-09-23). 다른 화면의 세그먼트 클래스와 섞지 않는다 */
.wt-seg { display: flex; gap: 6px; overflow-x: auto; margin: 16px 0 10px; padding-bottom: 2px; scrollbar-width: none; }
.wt-seg::-webkit-scrollbar { display: none; }
.wt-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.9rem; font-weight: 600; padding: 9px 14px; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft); cursor: pointer; }
.wt-tab.active { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.wt-count { font-size: 0.8125rem; font-weight: 500; opacity: 0.8; }
.wt-intro { font-size: 0.88rem; color: var(--ink-soft); margin: 4px 2px 12px; line-height: 1.55; word-break: keep-all; }
.wt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.wt-chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.86rem; padding: 7px 12px; min-height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.wt-chip.active { border-color: var(--accent); background: #f6efe2; color: var(--accent-deep); font-weight: 700; }
.wt-desc { font-size: 0.86rem; color: var(--ink-soft); margin: 2px 2px 10px; line-height: 1.5; word-break: keep-all; }
.wt-desc strong { color: var(--ink); }
.wt-note { font-size: 0.8125rem; color: var(--ink-soft); margin: 10px 2px 0; text-align: center; }

/* 교회 찾기 — 찾은 교회 확인(D1) */
.wg-confirm { display: grid; gap: 8px; margin-top: 12px; text-align: center; }
.wg-confirm-label { margin: 0; color: var(--muted, #7a6f63); font-size: 14px; }
.wg-confirm-name { margin: 0; font-size: 22px; font-weight: 700; }
.wg-confirm-addr { margin: 0 0 6px; color: var(--muted, #7a6f63); font-size: 13px; word-break: break-all; }
.wg-confirm .wg-again { background: none; border: none; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }

/* 가입 전 교회 확인 체크(D3) */
.auth-form label.auth-church-ok { flex-basis: 100%; flex-direction: row; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; color: var(--ink); }   /* 상자(flex 가로) 안에서 한 줄 전체 — .auth-form label(column) 보다 명시도 높게 */
.auth-church-ok span { word-break: keep-all; }
.auth-church-ok input { width: 20px; height: 20px; margin-top: 1px; padding: 0; flex-shrink: 0; accent-color: var(--accent); }

/* 카카오 로그인(S5) — 카카오 디자인 가이드(노란 바탕 #FEE500·검정 85% 글자·말풍선 심볼). 다른 버튼 클래스와 섞지 않는다 */
.social-login { margin-top: 14px; }
.sl-or { display: flex; align-items: center; gap: 10px; color: #a3988a; font-size: 0.8125rem; margin: 4px 0 12px; }
.sl-or::before, .sl-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.kakao-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: none; border-radius: 12px; background: #FEE500; color: rgba(0,0,0,0.85); font: 700 0.9rem var(--sans); cursor: pointer; }
.kakao-btn:hover { filter: brightness(0.97); }
.kakao-btn:active { transform: scale(0.98); }
.sl-hint { margin: 8px 2px 0; font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.55; text-align: center; word-break: keep-all; }
.kakao-signup { position: fixed; inset: 0; z-index: 260; background: rgba(28,22,14,0.5); display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto; }
.ks-card { background: var(--panel); border-radius: 20px; padding: 22px 20px; max-width: 400px; width: 100%; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); margin: auto 0; }
.ks-card h3 { font-family: var(--serif); font-size: 1.12rem; margin: 0; color: var(--ink); word-break: keep-all; }
.ks-lead { margin: -4px 0 2px; font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.55; word-break: keep-all; }
.ks-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); }
.ks-field input { padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; background: #fdfcf8; font-family: var(--sans); }
.ks-check { display: flex; align-items: flex-start; gap: 9px; font-size: 0.82rem; color: var(--ink); line-height: 1.5; cursor: pointer; }
.ks-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent-deep); flex: none; }
.ks-check em { font-style: normal; color: var(--ink-soft); font-size: 0.8125rem; }
.ks-check em.req { color: var(--danger); }
.ks-card .ks-cancel { background: none; border: none; color: var(--ink-soft); text-decoration: underline; font: inherit; font-size: 0.82rem; cursor: pointer; padding: 6px; }
.mp-render { display: contents; }   /* 내 정보 렌더 그릇 — 레이아웃에 영향 없음 */

/* 셀 리더 — 우리 셀 주일 출석(출석 고도화 A4). 전용 클래스(.tg-* 를 섞지 않는다 — chip 만 재사용) */
.cellw-att { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 10px 0; }
.cellw-att summary { cursor: pointer; font-weight: 700; font-size: 0.95rem; }
.cellw-att-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.cellw-att-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.cellw-att-name { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; min-width: 0; }
.cellw-att-name b { font-size: 0.95rem; word-break: keep-all; }
.cellw-att-stage, .cellw-att-tag { font-size: 0.8125rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--accent-soft); color: var(--accent-deep); }
.cellw-att-stage.s2 { background: #fbf1d3; color: #8a6510; }
.cellw-att-stage.s3 { background: #fbe3cf; color: #9a4b12; }
.cellw-att-stage.s4, .cellw-att-stage.s5 { background: #f7d9d3; color: #9b3222; }
.cellw-att-dots { display: flex; gap: 3px; }
.cellw-att-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #cdbfa8; }
.cellw-att-dots i.on { background: var(--ok); border-color: var(--ok); }
.cellw-att-reason { font: inherit; font-size: 0.8125rem; min-height: 36px; padding: 4px 10px; border-radius: 10px; border: 1px dashed var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; }
.cellw-att-reason.set { border-style: solid; border-color: #e7b56a; background: #fdf3dc; color: #8a5a10; }
.cellw-att-sheet { background: var(--accent-soft); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.cellw-att-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cellw-att-legend .cellw-att-dots { display: inline-flex; vertical-align: -1px; }
@media (max-width: 360px) { .cellw-att-dots i { width: 8px; height: 8px; } }

/* ── 주일 출석 본인 확인(040) — 결과 시트·예배 고르기·오후 보완 ── */
.ck-hint { background: var(--accent-soft); color: var(--accent-deep); border-radius: 12px; padding: 11px 14px;
           font-weight: 700; font-size: 0.95rem; margin-bottom: 14px; text-align: center; }
.ck-result { text-align: center; padding: 6px 4px 14px; }
.ck-icon { font-size: 2.6rem; line-height: 1; margin: 4px 0 10px; color: var(--ok); }
.ck-title { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); margin: 0 0 8px; line-height: 1.4; }
.ck-body { font-size: 1.02rem; color: var(--ink-soft); margin: 0 0 4px; }
.ck-small { font-size: 0.86rem; color: var(--ink-soft); margin-top: 8px; }
.ck-ok { width: 100%; min-height: 52px; font-size: 1.05rem; }
.ck-choices { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 14px; }
.ck-choice { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 12px 18px;
             border: 1.5px solid var(--accent); border-radius: 14px; background: #fffdf8; color: var(--ink);
             font: inherit; font-size: 1.08rem; cursor: pointer; }
.ck-choice b { font-weight: 700; }
.ck-choice span { color: var(--ink-soft); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.ck-choice:active { background: var(--accent-soft); }
.bk-cta { border-style: solid; background: #fffdf8; }
body.bk-open { overflow: hidden; }
.bk-sheet { position: fixed; inset: 0; z-index: 210; background: var(--bg); display: flex; flex-direction: column;
            padding: calc(10px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; }
.bk-bar { display: flex; align-items: center; gap: 10px; padding: 4px 0 12px; }
.bk-bar b { flex: 1; font-family: var(--serif); font-size: 1.08rem; color: var(--ink); }
.bk-close { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 14px; font: inherit;
            font-size: 0.82rem; cursor: pointer; min-height: 40px; }
.bk-search { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px;
             font: inherit; font-size: 1rem; background: #fff; }
.bk-note { color: var(--ink-soft); font-size: 0.88rem; margin: 10px 2px; }
.bk-group { font-size: 0.8125rem; color: var(--accent-deep); margin: 14px 2px 6px; letter-spacing: 0.02em; }
.bk-row { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.bk-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.bk-who b { font-size: 1.05rem; color: var(--ink); }
.bk-who span { font-size: 0.8125rem; color: var(--ink-soft); }
.bk-who .bk-tag { background: var(--accent-soft); color: var(--accent-deep); border-radius: 999px; padding: 2px 9px; font-weight: 700; }
.bk-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bk-btn { min-height: 44px; border-radius: 11px; border: 1px solid var(--line); background: #fffdf8; font: inherit;
          font-size: 0.9rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.bk-btn.ok { border-color: var(--ok); color: var(--ok); }
.bk-btn.no { border-color: var(--danger); color: var(--danger); }
.bk-btn.skip { color: var(--ink-soft); }
.bk-btn:disabled { opacity: 0.45; cursor: default; }
.bk-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.bk-extra:empty { display: none; }
.bk-ask { font-size: 0.8125rem; color: var(--ink-soft); margin-right: 2px; }
.bk-btn.chip { min-height: 40px; padding: 0 12px; font-weight: 600; }
.bk-done-box { margin-top: 14px; }
.bk-done-box summary { cursor: pointer; color: var(--ink-soft); font-size: 0.9rem; padding: 8px 2px; min-height: 40px; }

.mp-undo { margin-left: 8px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px;
           font: inherit; font-size: 0.8125rem; color: var(--danger); cursor: pointer; min-height: 32px; }
.cell-bk { margin-bottom: 10px; }

/* 개인 초대 링크(039) — 가입 화면 안내 상자, 로그인 교회 고르기 */
.auth-invite-hint { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--accent-soft); font-size: 0.92rem; line-height: 1.5; color: var(--ink); }
.auth-invite-hint.warn { background: #fbf1e4; border-color: #e7cfa8; color: #7a5420; }
.auth-code-open { display: block; margin: -4px 0 4px; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--accent-deep); background: none; border: none; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 2px; min-height: 44px; }
.sheet-item.lg-pick { min-height: 52px; border-bottom: 1px solid var(--line); border-radius: 0; }

/* 마이페이지 '지난 기록 보기'(PO 10/31) — 예전 기능의 기록을 접어 둔다 */
.mp-past { margin-top: 8px; }
.mp-past > summary { cursor: pointer; list-style: none; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.mp-past > summary::-webkit-details-marker { display: none; }
.mp-past > summary::after { content: '▾'; font-size: .85em; color: var(--ink-soft); transition: transform .15s; }
.mp-past[open] > summary::after { transform: rotate(180deg); }
.mp-past > summary:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; border-radius: 8px; }
